element-ios/Riot/libs/jitsi-meet/JitsiMeet.framework/main.jsbundle

110469 lines
No EOL
3.8 MiB

(function(global) {
global.__DEV__ = true;
global.__BUNDLE_START_TIME__ = Date.now();
})(typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : this);
(function(global) {
'use strict';
global.require = _require;
global.__d = define;
var modules = Object.create(null);
if (__DEV__) {
var verboseNamesToModuleIds = Object.create(null);
}
function define(factory, moduleId, dependencyMap) {
if (moduleId in modules) {
return;
}
modules[moduleId] = {
dependencyMap: dependencyMap,
exports: undefined,
factory: factory,
hasError: false,
isInitialized: false
};
if (__DEV__) {
modules[moduleId].hot = createHotReloadingObject();
var _verboseName = arguments[3];
if (_verboseName) {
modules[moduleId].verboseName = _verboseName;
verboseNamesToModuleIds[_verboseName] = moduleId;
}
}
}
function _require(moduleId) {
if (__DEV__ && typeof moduleId === 'string') {
var _verboseName2 = moduleId;
moduleId = verboseNamesToModuleIds[moduleId];
if (moduleId == null) {
throw new Error('Unknown named module: \'' + _verboseName2 + '\'');
} else {
console.warn('Requiring module \'' + _verboseName2 + '\' by name is only supported for ' + 'debugging purposes and will BREAK IN PRODUCTION!');
}
}
var moduleIdReallyIsNumber = moduleId;
var module = modules[moduleIdReallyIsNumber];
return module && module.isInitialized ? module.exports : guardedLoadModule(moduleIdReallyIsNumber, module);
}
var inGuard = false;
function guardedLoadModule(moduleId, module) {
if (!inGuard && global.ErrorUtils) {
inGuard = true;
var returnValue = void 0;
try {
returnValue = loadModuleImplementation(moduleId, module);
} catch (e) {
global.ErrorUtils.reportFatalError(e);
}
inGuard = false;
return returnValue;
} else {
return loadModuleImplementation(moduleId, module);
}
}
function loadModuleImplementation(moduleId, module) {
var nativeRequire = global.nativeRequire;
if (!module && nativeRequire) {
nativeRequire(moduleId);
module = modules[moduleId];
}
if (!module) {
throw unknownModuleError(moduleId);
}
if (module.hasError) {
throw moduleThrewError(moduleId);
}
if (__DEV__) {
var Systrace = _require.Systrace;
}
module.isInitialized = true;
var exports = module.exports = {};
var _module = module,
factory = _module.factory,
dependencyMap = _module.dependencyMap;
try {
if (__DEV__) {
Systrace.beginEvent('JS_require_' + (module.verboseName || moduleId));
}
var _moduleObject = { exports: exports };
if (__DEV__ && module.hot) {
_moduleObject.hot = module.hot;
}
factory(global, _require, _moduleObject, exports, dependencyMap);
if (!__DEV__) {
module.factory = undefined;
}
if (__DEV__) {
Systrace.endEvent();
}
return module.exports = _moduleObject.exports;
} catch (e) {
module.hasError = true;
module.isInitialized = false;
module.exports = undefined;
throw e;
}
}
function unknownModuleError(id) {
var message = 'Requiring unknown module "' + id + '".';
if (__DEV__) {
message += 'If you are sure the module is there, try restarting the packager or running "npm install".';
}
return Error(message);
}
function moduleThrewError(id) {
return Error('Requiring module "' + id + '", which threw an exception.');
}
if (__DEV__) {
_require.Systrace = { beginEvent: function beginEvent() {}, endEvent: function endEvent() {} };
var createHotReloadingObject = function createHotReloadingObject() {
var hot = {
acceptCallback: null,
accept: function accept(callback) {
hot.acceptCallback = callback;
}
};
return hot;
};
var acceptAll = function acceptAll(dependentModules, inverseDependencies) {
if (!dependentModules || dependentModules.length === 0) {
return true;
}
var notAccepted = dependentModules.filter(function (module) {
return !_accept(module, undefined, inverseDependencies);
});
var parents = [];
for (var i = 0; i < notAccepted.length; i++) {
if (inverseDependencies[notAccepted[i]].length === 0) {
return false;
}
parents.push.apply(parents, babelHelpers.toConsumableArray(inverseDependencies[notAccepted[i]]));
}
return acceptAll(parents, inverseDependencies);
};
var _accept = function _accept(id, factory, inverseDependencies) {
var mod = modules[id];
if (!mod && factory) {
define(factory, id);
return true;
}
var hot = mod.hot;
if (!hot) {
console.warn('Cannot accept module because Hot Module Replacement ' + 'API was not installed.');
return false;
}
if (factory) {
mod.factory = factory;
}
mod.hasError = false;
mod.isInitialized = false;
_require(id);
if (hot.acceptCallback) {
hot.acceptCallback();
return true;
} else {
if (!inverseDependencies) {
throw new Error('Undefined `inverseDependencies`');
}
return acceptAll(inverseDependencies[id], inverseDependencies);
}
};
global.__accept = _accept;
}
})(typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : this);
(function(global) {
Object.assign = function (target, sources) {
if (__DEV__) {
if (target == null) {
throw new TypeError('Object.assign target cannot be null or undefined');
}
if (typeof target !== 'object' && typeof target !== 'function') {
throw new TypeError('In this environment the target of assign MUST be an object.' + 'This error is a performance optimization and not spec compliant.');
}
}
for (var nextIndex = 1; nextIndex < arguments.length; nextIndex++) {
var nextSource = arguments[nextIndex];
if (nextSource == null) {
continue;
}
if (__DEV__) {
if (typeof nextSource !== 'object' && typeof nextSource !== 'function') {
throw new TypeError('In this environment the sources for assign MUST be an object.' + 'This error is a performance optimization and not spec compliant.');
}
}
for (var key in nextSource) {
if (__DEV__) {
var hasOwnProperty = Object.prototype.hasOwnProperty;
if (!hasOwnProperty.call(nextSource, key)) {
throw new TypeError('One of the sources for assign has an enumerable key on the ' + 'prototype chain. Are you trying to assign a prototype property? ' + 'We don\'t allow it, as this is an edge case that we do not support. ' + 'This error is a performance optimization and not spec compliant.');
}
}
target[key] = nextSource[key];
}
}
return target;
};
})(typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : this);
(function(global) {
var inspect = function () {
function inspect(obj, opts) {
var ctx = {
seen: [],
stylize: stylizeNoColor
};
return formatValue(ctx, obj, opts.depth);
}
function stylizeNoColor(str, styleType) {
return str;
}
function arrayToHash(array) {
var hash = {};
array.forEach(function (val, idx) {
hash[val] = true;
});
return hash;
}
function formatValue(ctx, value, recurseTimes) {
var primitive = formatPrimitive(ctx, value);
if (primitive) {
return primitive;
}
var keys = Object.keys(value);
var visibleKeys = arrayToHash(keys);
if (isError(value) && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {
return formatError(value);
}
if (keys.length === 0) {
if (isFunction(value)) {
var name = value.name ? ': ' + value.name : '';
return ctx.stylize('[Function' + name + ']', 'special');
}
if (isRegExp(value)) {
return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
}
if (isDate(value)) {
return ctx.stylize(Date.prototype.toString.call(value), 'date');
}
if (isError(value)) {
return formatError(value);
}
}
var base = '',
array = false,
braces = ['{', '}'];
if (isArray(value)) {
array = true;
braces = ['[', ']'];
}
if (isFunction(value)) {
var n = value.name ? ': ' + value.name : '';
base = ' [Function' + n + ']';
}
if (isRegExp(value)) {
base = ' ' + RegExp.prototype.toString.call(value);
}
if (isDate(value)) {
base = ' ' + Date.prototype.toUTCString.call(value);
}
if (isError(value)) {
base = ' ' + formatError(value);
}
if (keys.length === 0 && (!array || value.length == 0)) {
return braces[0] + base + braces[1];
}
if (recurseTimes < 0) {
if (isRegExp(value)) {
return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
} else {
return ctx.stylize('[Object]', 'special');
}
}
ctx.seen.push(value);
var output;
if (array) {
output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);
} else {
output = keys.map(function (key) {
return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);
});
}
ctx.seen.pop();
return reduceToSingleString(output, base, braces);
}
function formatPrimitive(ctx, value) {
if (isUndefined(value)) return ctx.stylize('undefined', 'undefined');
if (isString(value)) {
var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '').replace(/'/g, "\\'").replace(/\\"/g, '"') + '\'';
return ctx.stylize(simple, 'string');
}
if (isNumber(value)) return ctx.stylize('' + value, 'number');
if (isBoolean(value)) return ctx.stylize('' + value, 'boolean');
if (isNull(value)) return ctx.stylize('null', 'null');
}
function formatError(value) {
return '[' + Error.prototype.toString.call(value) + ']';
}
function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
var output = [];
for (var i = 0, l = value.length; i < l; ++i) {
if (hasOwnProperty(value, String(i))) {
output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, String(i), true));
} else {
output.push('');
}
}
keys.forEach(function (key) {
if (!key.match(/^\d+$/)) {
output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, key, true));
}
});
return output;
}
function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
var name, str, desc;
desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };
if (desc.get) {
if (desc.set) {
str = ctx.stylize('[Getter/Setter]', 'special');
} else {
str = ctx.stylize('[Getter]', 'special');
}
} else {
if (desc.set) {
str = ctx.stylize('[Setter]', 'special');
}
}
if (!hasOwnProperty(visibleKeys, key)) {
name = '[' + key + ']';
}
if (!str) {
if (ctx.seen.indexOf(desc.value) < 0) {
if (isNull(recurseTimes)) {
str = formatValue(ctx, desc.value, null);
} else {
str = formatValue(ctx, desc.value, recurseTimes - 1);
}
if (str.indexOf('\n') > -1) {
if (array) {
str = str.split('\n').map(function (line) {
return ' ' + line;
}).join('\n').substr(2);
} else {
str = '\n' + str.split('\n').map(function (line) {
return ' ' + line;
}).join('\n');
}
}
} else {
str = ctx.stylize('[Circular]', 'special');
}
}
if (isUndefined(name)) {
if (array && key.match(/^\d+$/)) {
return str;
}
name = JSON.stringify('' + key);
if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
name = name.substr(1, name.length - 2);
name = ctx.stylize(name, 'name');
} else {
name = name.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'");
name = ctx.stylize(name, 'string');
}
}
return name + ': ' + str;
}
function reduceToSingleString(output, base, braces) {
var numLinesEst = 0;
var length = output.reduce(function (prev, cur) {
numLinesEst++;
if (cur.indexOf('\n') >= 0) numLinesEst++;
return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1;
}, 0);
if (length > 60) {
return braces[0] + (base === '' ? '' : base + '\n ') + ' ' + output.join(',\n ') + ' ' + braces[1];
}
return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];
}
function isArray(ar) {
return Array.isArray(ar);
}
function isBoolean(arg) {
return typeof arg === 'boolean';
}
function isNull(arg) {
return arg === null;
}
function isNullOrUndefined(arg) {
return arg == null;
}
function isNumber(arg) {
return typeof arg === 'number';
}
function isString(arg) {
return typeof arg === 'string';
}
function isSymbol(arg) {
return typeof arg === 'symbol';
}
function isUndefined(arg) {
return arg === void 0;
}
function isRegExp(re) {
return isObject(re) && objectToString(re) === '[object RegExp]';
}
function isObject(arg) {
return typeof arg === 'object' && arg !== null;
}
function isDate(d) {
return isObject(d) && objectToString(d) === '[object Date]';
}
function isError(e) {
return isObject(e) && (objectToString(e) === '[object Error]' || e instanceof Error);
}
function isFunction(arg) {
return typeof arg === 'function';
}
function isPrimitive(arg) {
return arg === null || typeof arg === 'boolean' || typeof arg === 'number' || typeof arg === 'string' || typeof arg === 'symbol' || typeof arg === 'undefined';
}
function objectToString(o) {
return Object.prototype.toString.call(o);
}
function hasOwnProperty(obj, prop) {
return Object.prototype.hasOwnProperty.call(obj, prop);
}
return inspect;
}();
var OBJECT_COLUMN_NAME = '(index)';
var LOG_LEVELS = {
trace: 0,
info: 1,
warn: 2,
error: 3
};
var INSPECTOR_LEVELS = [];
INSPECTOR_LEVELS[LOG_LEVELS.trace] = 'debug';
INSPECTOR_LEVELS[LOG_LEVELS.info] = 'log';
INSPECTOR_LEVELS[LOG_LEVELS.warn] = 'warning';
INSPECTOR_LEVELS[LOG_LEVELS.error] = 'error';
var INSPECTOR_FRAMES_TO_SKIP = __DEV__ ? 2 : 1;
function setupConsole(global) {
if (!global.nativeLoggingHook) {
return;
}
function getNativeLogFunction(level) {
return function () {
var str = void 0;
if (arguments.length === 1 && typeof arguments[0] === 'string') {
str = arguments[0];
} else {
str = Array.prototype.map.call(arguments, function (arg) {
return inspect(arg, { depth: 10 });
}).join(', ');
}
var logLevel = level;
if (str.slice(0, 9) === 'Warning: ' && logLevel >= LOG_LEVELS.error) {
logLevel = LOG_LEVELS.warn;
}
if (global.__inspectorLog) {
global.__inspectorLog(INSPECTOR_LEVELS[logLevel], str, [].slice.call(arguments), INSPECTOR_FRAMES_TO_SKIP);
}
global.nativeLoggingHook(str, logLevel);
};
}
function repeat(element, n) {
return Array.apply(null, Array(n)).map(function () {
return element;
});
};
function consoleTablePolyfill(rows) {
if (!Array.isArray(rows)) {
var data = rows;
rows = [];
for (var key in data) {
if (data.hasOwnProperty(key)) {
var row = data[key];
row[OBJECT_COLUMN_NAME] = key;
rows.push(row);
}
}
}
if (rows.length === 0) {
global.nativeLoggingHook('', LOG_LEVELS.info);
return;
}
var columns = Object.keys(rows[0]).sort();
var stringRows = [];
var columnWidths = [];
columns.forEach(function (k, i) {
columnWidths[i] = k.length;
for (var j = 0; j < rows.length; j++) {
var cellStr = (rows[j][k] || '?').toString();
stringRows[j] = stringRows[j] || [];
stringRows[j][i] = cellStr;
columnWidths[i] = Math.max(columnWidths[i], cellStr.length);
}
});
function joinRow(row, space) {
var cells = row.map(function (cell, i) {
var extraSpaces = repeat(' ', columnWidths[i] - cell.length).join('');
return cell + extraSpaces;
});
space = space || ' ';
return cells.join(space + '|' + space);
};
var separators = columnWidths.map(function (columnWidth) {
return repeat('-', columnWidth).join('');
});
var separatorRow = joinRow(separators, '-');
var header = joinRow(columns);
var table = [header, separatorRow];
for (var i = 0; i < rows.length; i++) {
table.push(joinRow(stringRows[i]));
}
global.nativeLoggingHook('\n' + table.join('\n'), LOG_LEVELS.info);
}
var originalConsole = global.console;
var descriptor = Object.getOwnPropertyDescriptor(global, 'console');
if (descriptor) {
Object.defineProperty(global, 'originalConsole', descriptor);
}
global.console = {
error: getNativeLogFunction(LOG_LEVELS.error),
info: getNativeLogFunction(LOG_LEVELS.info),
log: getNativeLogFunction(LOG_LEVELS.info),
warn: getNativeLogFunction(LOG_LEVELS.warn),
trace: getNativeLogFunction(LOG_LEVELS.trace),
debug: getNativeLogFunction(LOG_LEVELS.trace),
table: consoleTablePolyfill
};
if (__DEV__ && originalConsole) {
Object.keys(console).forEach(function (methodName) {
var reactNativeMethod = console[methodName];
if (originalConsole[methodName]) {
console[methodName] = function () {
originalConsole[methodName].apply(originalConsole, arguments);
reactNativeMethod.apply(console, arguments);
};
}
});
}
}
if (typeof module !== 'undefined') {
module.exports = setupConsole;
} else {
setupConsole(global);
}
})(typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : this);
(function(global) {
var _inGuard = 0;
var _globalHandler = function onError(e) {
throw e;
};
var ErrorUtils = {
setGlobalHandler: function setGlobalHandler(fun) {
_globalHandler = fun;
},
getGlobalHandler: function getGlobalHandler() {
return _globalHandler;
},
reportError: function reportError(error) {
_globalHandler && _globalHandler(error);
},
reportFatalError: function reportFatalError(error) {
_globalHandler && _globalHandler(error, true);
},
applyWithGuard: function applyWithGuard(fun, context, args) {
try {
_inGuard++;
return fun.apply(context, args);
} catch (e) {
ErrorUtils.reportError(e);
} finally {
_inGuard--;
}
},
applyWithGuardIfNeeded: function applyWithGuardIfNeeded(fun, context, args) {
if (ErrorUtils.inGuard()) {
return fun.apply(context, args);
} else {
ErrorUtils.applyWithGuard(fun, context, args);
}
},
inGuard: function inGuard() {
return _inGuard;
},
guard: function guard(fun, name, context) {
if (typeof fun !== 'function') {
console.warn('A function must be passed to ErrorUtils.guard, got ', fun);
return null;
}
name = name || fun.name || '<generated guard>';
function guarded() {
return ErrorUtils.applyWithGuard(fun, context || this, arguments, null, name);
}
return guarded;
}
};
global.ErrorUtils = ErrorUtils;
})(typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : this);
(function(global) {
if (Number.EPSILON === undefined) {
Object.defineProperty(Number, 'EPSILON', {
value: Math.pow(2, -52)
});
}
if (Number.MAX_SAFE_INTEGER === undefined) {
Object.defineProperty(Number, 'MAX_SAFE_INTEGER', {
value: Math.pow(2, 53) - 1
});
}
if (Number.MIN_SAFE_INTEGER === undefined) {
Object.defineProperty(Number, 'MIN_SAFE_INTEGER', {
value: -(Math.pow(2, 53) - 1)
});
}
if (!Number.isNaN) {
var globalIsNaN = global.isNaN;
Object.defineProperty(Number, 'isNaN', {
configurable: true,
enumerable: false,
value: function isNaN(value) {
return typeof value === 'number' && globalIsNaN(value);
},
writable: true
});
}
})(typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : this);
(function(global) {
if (!String.prototype.startsWith) {
String.prototype.startsWith = function (search) {
'use strict';
if (this == null) {
throw TypeError();
}
var string = String(this);
var pos = arguments.length > 1 ? Number(arguments[1]) || 0 : 0;
var start = Math.min(Math.max(pos, 0), string.length);
return string.indexOf(String(search), pos) === start;
};
}
if (!String.prototype.endsWith) {
String.prototype.endsWith = function (search) {
'use strict';
if (this == null) {
throw TypeError();
}
var string = String(this);
var stringLength = string.length;
var searchString = String(search);
var pos = arguments.length > 1 ? Number(arguments[1]) || 0 : stringLength;
var end = Math.min(Math.max(pos, 0), stringLength);
var start = end - searchString.length;
if (start < 0) {
return false;
}
return string.lastIndexOf(searchString, start) === start;
};
}
if (!String.prototype.repeat) {
String.prototype.repeat = function (count) {
'use strict';
if (this == null) {
throw TypeError();
}
var string = String(this);
count = Number(count) || 0;
if (count < 0 || count === Infinity) {
throw RangeError();
}
if (count === 1) {
return string;
}
var result = '';
while (count) {
if (count & 1) {
result += string;
}
if (count >>= 1) {
string += string;
}
}
return result;
};
}
if (!String.prototype.includes) {
String.prototype.includes = function (search, start) {
'use strict';
if (typeof start !== 'number') {
start = 0;
}
if (start + search.length > this.length) {
return false;
} else {
return this.indexOf(search, start) !== -1;
}
};
}
})(typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : this);
(function(global) {
function findIndex(predicate, context) {
if (this == null) {
throw new TypeError('Array.prototype.findIndex called on null or undefined');
}
if (typeof predicate !== 'function') {
throw new TypeError('predicate must be a function');
}
var list = Object(this);
var length = list.length >>> 0;
for (var i = 0; i < length; i++) {
if (predicate.call(context, list[i], i, list)) {
return i;
}
}
return -1;
}
if (!Array.prototype.findIndex) {
Object.defineProperty(Array.prototype, 'findIndex', {
enumerable: false,
writable: true,
configurable: true,
value: findIndex
});
}
if (!Array.prototype.find) {
Object.defineProperty(Array.prototype, 'find', {
enumerable: false,
writable: true,
configurable: true,
value: function value(predicate, context) {
if (this == null) {
throw new TypeError('Array.prototype.find called on null or undefined');
}
var index = findIndex.call(this, predicate, context);
return index === -1 ? undefined : this[index];
}
});
}
if (!Array.prototype.includes) {
Object.defineProperty(Array.prototype, 'includes', {
enumerable: false,
writable: true,
configurable: true,
value: function value(searchElement) {
var O = Object(this);
var len = parseInt(O.length) || 0;
if (len === 0) {
return false;
}
var n = parseInt(arguments[1]) || 0;
var k;
if (n >= 0) {
k = n;
} else {
k = len + n;
if (k < 0) {
k = 0;
}
}
var currentElement;
while (k < len) {
currentElement = O[k];
if (searchElement === currentElement || searchElement !== searchElement && currentElement !== currentElement) {
return true;
}
k++;
}
return false;
}
});
}
})(typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : this);
(function(global) {
if (!Array.from) {
Array.from = function (arrayLike) {
if (arrayLike == null) {
throw new TypeError('Object is null or undefined');
}
var mapFn = arguments[1];
var thisArg = arguments[2];
var C = this;
var items = Object(arrayLike);
var symbolIterator = typeof Symbol === 'function' ? typeof Symbol === 'function' ? Symbol.iterator : '@@iterator' : '@@iterator';
var mapping = typeof mapFn === 'function';
var usingIterator = typeof items[symbolIterator] === 'function';
var key = 0;
var ret;
var value;
if (usingIterator) {
ret = typeof C === 'function' ? new C() : [];
var it = items[symbolIterator]();
var next;
while (!(next = it.next()).done) {
value = next.value;
if (mapping) {
value = mapFn.call(thisArg, value, key);
}
ret[key] = value;
key += 1;
}
ret.length = key;
return ret;
}
var len = items.length;
if (isNaN(len) || len < 0) {
len = 0;
}
ret = typeof C === 'function' ? new C(len) : new Array(len);
while (key < len) {
value = items[key];
if (mapping) {
value = mapFn.call(thisArg, value, key);
}
ret[key] = value;
key += 1;
}
ret.length = key;
return ret;
};
}
})(typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : this);
(function(global) {
(function () {
'use strict';
var hasOwnProperty = Object.prototype.hasOwnProperty;
if (typeof Object.entries !== 'function') {
Object.entries = function (object) {
if (object == null) {
throw new TypeError('Object.entries called on non-object');
}
var entries = [];
for (var key in object) {
if (hasOwnProperty.call(object, key)) {
entries.push([key, object[key]]);
}
}
return entries;
};
}
if (typeof Object.values !== 'function') {
Object.values = function (object) {
if (object == null) {
throw new TypeError('Object.values called on non-object');
}
var values = [];
for (var key in object) {
if (hasOwnProperty.call(object, key)) {
values.push(object[key]);
}
}
return values;
};
}
})();
})(typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : this);
(function(global) {
var babelHelpers = global.babelHelpers = {};
babelHelpers.typeof = typeof Symbol === "function" && typeof (typeof Symbol === "function" ? Symbol.iterator : "@@iterator") === "symbol" ? function (obj) {
return typeof obj;
} : function (obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== (typeof Symbol === "function" ? Symbol.prototype : "@@prototype") ? "symbol" : typeof obj;
};
babelHelpers.createRawReactElement = function () {
var REACT_ELEMENT_TYPE = typeof Symbol === "function" && (typeof Symbol === "function" ? Symbol.for : "@@for") && (typeof Symbol === "function" ? Symbol.for : "@@for")("react.element") || 0xeac7;
return function createRawReactElement(type, key, props) {
return {
$$typeof: REACT_ELEMENT_TYPE,
type: type,
key: key,
ref: null,
props: props,
_owner: null
};
};
}();
babelHelpers.classCallCheck = function (instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
};
babelHelpers.createClass = function () {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || false;
descriptor.configurable = true;
if ("value" in descriptor) descriptor.writable = true;
Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function (Constructor, protoProps, staticProps) {
if (protoProps) defineProperties(Constructor.prototype, protoProps);
if (staticProps) defineProperties(Constructor, staticProps);
return Constructor;
};
}();
babelHelpers.defineProperty = function (obj, key, value) {
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
return obj;
};
babelHelpers._extends = babelHelpers.extends = Object.assign || function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
return target;
};
babelHelpers.get = function get(object, property, receiver) {
if (object === null) object = Function.prototype;
var desc = Object.getOwnPropertyDescriptor(object, property);
if (desc === undefined) {
var parent = Object.getPrototypeOf(object);
if (parent === null) {
return undefined;
} else {
return get(parent, property, receiver);
}
} else if ("value" in desc) {
return desc.value;
} else {
var getter = desc.get;
if (getter === undefined) {
return undefined;
}
return getter.call(receiver);
}
};
babelHelpers.inherits = function (subClass, superClass) {
if (typeof superClass !== "function" && superClass !== null) {
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
}
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: false,
writable: true,
configurable: true
}
});
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
};
babelHelpers.interopRequireDefault = function (obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
};
babelHelpers.interopRequireWildcard = function (obj) {
if (obj && obj.__esModule) {
return obj;
} else {
var newObj = {};
if (obj != null) {
for (var key in obj) {
if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
}
}
newObj.default = obj;
return newObj;
}
};
babelHelpers.objectWithoutProperties = function (obj, keys) {
var target = {};
for (var i in obj) {
if (keys.indexOf(i) >= 0) continue;
if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;
target[i] = obj[i];
}
return target;
};
babelHelpers.possibleConstructorReturn = function (self, call) {
if (!self) {
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}
return call && (typeof call === "object" || typeof call === "function") ? call : self;
};
babelHelpers.slicedToArray = function () {
function sliceIterator(arr, i) {
var _arr = [];
var _n = true;
var _d = false;
var _e = undefined;
try {
for (var _i = arr[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](), _s; !(_n = (_s = _i.next()).done); _n = true) {
_arr.push(_s.value);
if (i && _arr.length === i) break;
}
} catch (err) {
_d = true;
_e = err;
} finally {
try {
if (!_n && _i["return"]) _i["return"]();
} finally {
if (_d) throw _e;
}
}
return _arr;
}
return function (arr, i) {
if (Array.isArray(arr)) {
return arr;
} else if ((typeof Symbol === "function" ? Symbol.iterator : "@@iterator") in Object(arr)) {
return sliceIterator(arr, i);
} else {
throw new TypeError("Invalid attempt to destructure non-iterable instance");
}
};
}();
babelHelpers.taggedTemplateLiteral = function (strings, raw) {
return Object.freeze(Object.defineProperties(strings, {
raw: {
value: Object.freeze(raw)
}
}));
};
babelHelpers.toArray = function (arr) {
return Array.isArray(arr) ? arr : Array.from(arr);
};
babelHelpers.toConsumableArray = function (arr) {
if (Array.isArray(arr)) {
for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {
arr2[i] = arr[i];
}return arr2;
} else {
return Array.from(arr);
}
};
})(typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : this);
__d(/* jitsi-meet/index.ios.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _index = require(12 ); // 12 = ./react/index.native
Object.keys(_index).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _index[key];
}
});
});
}, 0, null, "jitsi-meet/index.ios.js");
__d(/* jitsi-meet/react/index.native.js */function(global, require, module, exports) {var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/react/index.native.js';
require(13 ); // 13 = es6-symbol/implement
var _react = require(34 ); // 34 = react
var _react2 = babelHelpers.interopRequireDefault(_react);
var _reactNative = require(69 ); // 69 = react-native
var _app = require(430 ); // 430 = ./features/app
var _redux = require(505 ); // 505 = ./features/base/redux
var Root = function (_Component) {
babelHelpers.inherits(Root, _Component);
function Root(props) {
babelHelpers.classCallCheck(this, Root);
var _this = babelHelpers.possibleConstructorReturn(this, (Root.__proto__ || Object.getPrototypeOf(Root)).call(this, props));
_this.state = {
url: _this.props.url
};
if (typeof _this.props.url === 'undefined') {
_reactNative.Linking.getInitialURL().then(function (url) {
if (typeof _this.state.url === 'undefined') {
_this.setState({ url: url });
}
}).catch(function (err) {
console.error('Failed to get initial URL', err);
if (typeof _this.state.url === 'undefined') {
_this.setState({ url: null });
}
});
}
return _this;
}
babelHelpers.createClass(Root, [{
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(_ref) {
var url = _ref.url;
if (!(0, _redux.equals)(this.props.url, url)) {
this.setState({ url: url || null });
}
}
}, {
key: 'render',
value: function render() {
var url = this.state.url;
if (typeof url === 'undefined') {
return null;
}
var _props = this.props,
_ = _props.url,
props = babelHelpers.objectWithoutProperties(_props, ['url']);
return _react2.default.createElement(_app.App, babelHelpers.extends({}, props, {
url: url, __source: {
fileName: _jsxFileName,
lineNumber: 122
}
}));
}
}]);
return Root;
}(_react.Component);
Root.propTypes = {
url: _react2.default.PropTypes.oneOfType([_react2.default.PropTypes.object, _react2.default.PropTypes.string]),
welcomePageEnabled: _react2.default.PropTypes.bool
};
_reactNative.AppRegistry.registerComponent('App', function () {
return Root;
});
}, 12, null, "jitsi-meet/react/index.native.js");
__d(/* es6-symbol/implement.js */function(global, require, module, exports) {'use strict';
if (!require(14 )()) { // 14 = ./is-implemented
Object.defineProperty(require(15 ), 'Symbol', { value: require(16 ), configurable: true, enumerable: false, // 16 = ./polyfill // 15 = es5-ext/global
writable: true });
}
}, 13, null, "es6-symbol/implement.js");
__d(/* es6-symbol/is-implemented.js */function(global, require, module, exports) {'use strict';
var validTypes = { object: true, symbol: true };
module.exports = function () {
var symbol;
if (typeof Symbol !== 'function') return false;
symbol = Symbol('test symbol');
try {
String(symbol);
} catch (e) {
return false;
}
if (!validTypes[typeof (typeof Symbol === 'function' ? Symbol.iterator : '@@iterator')]) return false;
if (!validTypes[typeof (typeof Symbol === 'function' ? Symbol.toPrimitive : '@@toPrimitive')]) return false;
if (!validTypes[typeof (typeof Symbol === 'function' ? Symbol.toStringTag : '@@toStringTag')]) return false;
return true;
};
}, 14, null, "es6-symbol/is-implemented.js");
__d(/* es5-ext/global.js */function(global, require, module, exports) {
module.exports = function () {
return this;
}();
}, 15, null, "es5-ext/global.js");
__d(/* es6-symbol/polyfill.js */function(global, require, module, exports) {
'use strict';
var d = require(17 ), // 17 = d
validateSymbol = require(32 ), // 32 = ./validate-symbol
create = Object.create,
defineProperties = Object.defineProperties,
defineProperty = Object.defineProperty,
objPrototype = Object.prototype,
NativeSymbol,
SymbolPolyfill,
HiddenSymbol,
globalSymbols = create(null),
isNativeSafe;
if (typeof Symbol === 'function') {
NativeSymbol = Symbol;
try {
String(NativeSymbol());
isNativeSafe = true;
} catch (ignore) {}
}
var generateName = function () {
var created = create(null);
return function (desc) {
var postfix = 0,
name,
ie11BugWorkaround;
while (created[desc + (postfix || '')]) {
++postfix;
}desc += postfix || '';
created[desc] = true;
name = '@@' + desc;
defineProperty(objPrototype, name, d.gs(null, function (value) {
if (ie11BugWorkaround) return;
ie11BugWorkaround = true;
defineProperty(this, name, d(value));
ie11BugWorkaround = false;
}));
return name;
};
}();
HiddenSymbol = function Symbol(description) {
if (this instanceof HiddenSymbol) throw new TypeError('Symbol is not a constructor');
return SymbolPolyfill(description);
};
module.exports = SymbolPolyfill = function Symbol(description) {
var symbol;
if (this instanceof Symbol) throw new TypeError('Symbol is not a constructor');
if (isNativeSafe) return NativeSymbol(description);
symbol = create(HiddenSymbol.prototype);
description = description === undefined ? '' : String(description);
return defineProperties(symbol, {
__description__: d('', description),
__name__: d('', generateName(description))
});
};
defineProperties(SymbolPolyfill, {
for: d(function (key) {
if (globalSymbols[key]) return globalSymbols[key];
return globalSymbols[key] = SymbolPolyfill(String(key));
}),
keyFor: d(function (s) {
var key;
validateSymbol(s);
for (key in globalSymbols) {
if (globalSymbols[key] === s) return key;
}
}),
hasInstance: d('', NativeSymbol && NativeSymbol.hasInstance || SymbolPolyfill('hasInstance')),
isConcatSpreadable: d('', NativeSymbol && NativeSymbol.isConcatSpreadable || SymbolPolyfill('isConcatSpreadable')),
iterator: d('', NativeSymbol && NativeSymbol.iterator || SymbolPolyfill('iterator')),
match: d('', NativeSymbol && NativeSymbol.match || SymbolPolyfill('match')),
replace: d('', NativeSymbol && NativeSymbol.replace || SymbolPolyfill('replace')),
search: d('', NativeSymbol && NativeSymbol.search || SymbolPolyfill('search')),
species: d('', NativeSymbol && NativeSymbol.species || SymbolPolyfill('species')),
split: d('', NativeSymbol && NativeSymbol.split || SymbolPolyfill('split')),
toPrimitive: d('', NativeSymbol && NativeSymbol.toPrimitive || SymbolPolyfill('toPrimitive')),
toStringTag: d('', NativeSymbol && NativeSymbol.toStringTag || SymbolPolyfill('toStringTag')),
unscopables: d('', NativeSymbol && NativeSymbol.unscopables || SymbolPolyfill('unscopables'))
});
defineProperties(HiddenSymbol.prototype, {
constructor: d(SymbolPolyfill),
toString: d('', function () {
return this.__name__;
})
});
defineProperties(SymbolPolyfill.prototype, {
toString: d(function () {
return 'Symbol (' + validateSymbol(this).__description__ + ')';
}),
valueOf: d(function () {
return validateSymbol(this);
})
});
defineProperty(SymbolPolyfill.prototype, SymbolPolyfill.toPrimitive, d('', function () {
var symbol = validateSymbol(this);
if (typeof symbol === 'symbol') return symbol;
return symbol.toString();
}));
defineProperty(SymbolPolyfill.prototype, SymbolPolyfill.toStringTag, d('c', 'Symbol'));
defineProperty(HiddenSymbol.prototype, SymbolPolyfill.toStringTag, d('c', SymbolPolyfill.prototype[SymbolPolyfill.toStringTag]));
defineProperty(HiddenSymbol.prototype, SymbolPolyfill.toPrimitive, d('c', SymbolPolyfill.prototype[SymbolPolyfill.toPrimitive]));
}, 16, null, "es6-symbol/polyfill.js");
__d(/* d/index.js */function(global, require, module, exports) {'use strict';
var assign = require(18 ), // 18 = es5-ext/object/assign
normalizeOpts = require(27 ), // 27 = es5-ext/object/normalize-options
isCallable = require(28 ), // 28 = es5-ext/object/is-callable
contains = require(29 ), // 29 = es5-ext/string/#/contains
d;
d = module.exports = function (dscr, value) {
var c, e, w, options, desc;
if (arguments.length < 2 || typeof dscr !== 'string') {
options = value;
value = dscr;
dscr = null;
} else {
options = arguments[2];
}
if (dscr == null) {
c = w = true;
e = false;
} else {
c = contains.call(dscr, 'c');
e = contains.call(dscr, 'e');
w = contains.call(dscr, 'w');
}
desc = { value: value, configurable: c, enumerable: e, writable: w };
return !options ? desc : assign(normalizeOpts(options), desc);
};
d.gs = function (dscr, get, set) {
var c, e, options, desc;
if (typeof dscr !== 'string') {
options = set;
set = get;
get = dscr;
dscr = null;
} else {
options = arguments[3];
}
if (get == null) {
get = undefined;
} else if (!isCallable(get)) {
options = get;
get = set = undefined;
} else if (set == null) {
set = undefined;
} else if (!isCallable(set)) {
options = set;
set = undefined;
}
if (dscr == null) {
c = true;
e = false;
} else {
c = contains.call(dscr, 'c');
e = contains.call(dscr, 'e');
}
desc = { get: get, set: set, configurable: c, enumerable: e };
return !options ? desc : assign(normalizeOpts(options), desc);
};
}, 17, null, "d/index.js");
__d(/* es5-ext/object/assign/index.js */function(global, require, module, exports) {"use strict";
module.exports = require(19 )() ? Object.assign : require(20 ); // 20 = ./shim // 19 = ./is-implemented
}, 18, null, "es5-ext/object/assign/index.js");
__d(/* es5-ext/object/assign/is-implemented.js */function(global, require, module, exports) {"use strict";
module.exports = function () {
var assign = Object.assign,
obj;
if (typeof assign !== "function") return false;
obj = { foo: "raz" };
assign(obj, { bar: "dwa" }, { trzy: "trzy" });
return obj.foo + obj.bar + obj.trzy === "razdwatrzy";
};
}, 19, null, "es5-ext/object/assign/is-implemented.js");
__d(/* es5-ext/object/assign/shim.js */function(global, require, module, exports) {"use strict";
var keys = require(21 ), // 21 = ../keys
value = require(26 ), // 26 = ../valid-value
max = Math.max;
module.exports = function (dest, src) {
var error,
i,
length = max(arguments.length, 2),
assign;
dest = Object(value(dest));
assign = function assign(key) {
try {
dest[key] = src[key];
} catch (e) {
if (!error) error = e;
}
};
for (i = 1; i < length; ++i) {
src = arguments[i];
keys(src).forEach(assign);
}
if (error !== undefined) throw error;
return dest;
};
}, 20, null, "es5-ext/object/assign/shim.js");
__d(/* es5-ext/object/keys/index.js */function(global, require, module, exports) {"use strict";
module.exports = require(22 )() ? Object.keys : require(23 ); // 23 = ./shim // 22 = ./is-implemented
}, 21, null, "es5-ext/object/keys/index.js");
__d(/* es5-ext/object/keys/is-implemented.js */function(global, require, module, exports) {"use strict";
module.exports = function () {
try {
Object.keys("primitive");
return true;
} catch (e) {
return false;
}
};
}, 22, null, "es5-ext/object/keys/is-implemented.js");
__d(/* es5-ext/object/keys/shim.js */function(global, require, module, exports) {"use strict";
var isValue = require(24 ); // 24 = ../is-value
var keys = Object.keys;
module.exports = function (object) {
return keys(isValue(object) ? Object(object) : object);
};
}, 23, null, "es5-ext/object/keys/shim.js");
__d(/* es5-ext/object/is-value.js */function(global, require, module, exports) {"use strict";
var _undefined = require(25 )(); // 25 = ../function/noop
module.exports = function (val) {
return val !== _undefined && val !== null;
};
}, 24, null, "es5-ext/object/is-value.js");
__d(/* es5-ext/function/noop.js */function(global, require, module, exports) {"use strict";
module.exports = function () {};
}, 25, null, "es5-ext/function/noop.js");
__d(/* es5-ext/object/valid-value.js */function(global, require, module, exports) {"use strict";
var isValue = require(24 ); // 24 = ./is-value
module.exports = function (value) {
if (!isValue(value)) throw new TypeError("Cannot use null or undefined");
return value;
};
}, 26, null, "es5-ext/object/valid-value.js");
__d(/* es5-ext/object/normalize-options.js */function(global, require, module, exports) {"use strict";
var isValue = require(24 ); // 24 = ./is-value
var forEach = Array.prototype.forEach,
create = Object.create;
var process = function process(src, obj) {
var key;
for (key in src) {
obj[key] = src[key];
}
};
module.exports = function (opts1) {
var result = create(null);
forEach.call(arguments, function (options) {
if (!isValue(options)) return;
process(Object(options), result);
});
return result;
};
}, 27, null, "es5-ext/object/normalize-options.js");
__d(/* es5-ext/object/is-callable.js */function(global, require, module, exports) {
"use strict";
module.exports = function (obj) {
return typeof obj === "function";
};
}, 28, null, "es5-ext/object/is-callable.js");
__d(/* es5-ext/string/#/contains/index.js */function(global, require, module, exports) {"use strict";
module.exports = require(30 )() ? String.prototype.contains : require(31 ); // 31 = ./shim // 30 = ./is-implemented
}, 29, null, "es5-ext/string/#/contains/index.js");
__d(/* es5-ext/string/#/contains/is-implemented.js */function(global, require, module, exports) {"use strict";
var str = "razdwatrzy";
module.exports = function () {
if (typeof str.contains !== "function") return false;
return str.contains("dwa") === true && str.contains("foo") === false;
};
}, 30, null, "es5-ext/string/#/contains/is-implemented.js");
__d(/* es5-ext/string/#/contains/shim.js */function(global, require, module, exports) {"use strict";
var indexOf = String.prototype.indexOf;
module.exports = function (searchString) {
return indexOf.call(this, searchString, arguments[1]) > -1;
};
}, 31, null, "es5-ext/string/#/contains/shim.js");
__d(/* es6-symbol/validate-symbol.js */function(global, require, module, exports) {'use strict';
var isSymbol = require(33 ); // 33 = ./is-symbol
module.exports = function (value) {
if (!isSymbol(value)) throw new TypeError(value + " is not a symbol");
return value;
};
}, 32, null, "es6-symbol/validate-symbol.js");
__d(/* es6-symbol/is-symbol.js */function(global, require, module, exports) {'use strict';
module.exports = function (x) {
if (!x) return false;
if (typeof x === 'symbol') return true;
if (!x.constructor) return false;
if (x.constructor.name !== 'Symbol') return false;
return x[x.constructor.toStringTag] === 'Symbol';
};
}, 33, null, "es6-symbol/is-symbol.js");
__d(/* react/react.js */function(global, require, module, exports) {'use strict';
module.exports = require(35 ); // 35 = ./lib/React
}, 34, null, "react/react.js");
__d(/* react/lib/React.js */function(global, require, module, exports) {
'use strict';
var _assign = require(36 ); // 36 = object-assign
var ReactBaseClasses = require(37 ); // 37 = ./ReactBaseClasses
var ReactChildren = require(46 ); // 46 = ./ReactChildren
var ReactDOMFactories = require(54 ); // 54 = ./ReactDOMFactories
var ReactElement = require(48 ); // 48 = ./ReactElement
var ReactPropTypes = require(60 ); // 60 = ./ReactPropTypes
var ReactVersion = require(65 ); // 65 = ./ReactVersion
var createReactClass = require(66 ); // 66 = ./createClass
var onlyChild = require(68 ); // 68 = ./onlyChild
var createElement = ReactElement.createElement;
var createFactory = ReactElement.createFactory;
var cloneElement = ReactElement.cloneElement;
if (process.env.NODE_ENV !== 'production') {
var lowPriorityWarning = require(45 ); // 45 = ./lowPriorityWarning
var canDefineProperty = require(42 ); // 42 = ./canDefineProperty
var ReactElementValidator = require(55 ); // 55 = ./ReactElementValidator
var didWarnPropTypesDeprecated = false;
createElement = ReactElementValidator.createElement;
createFactory = ReactElementValidator.createFactory;
cloneElement = ReactElementValidator.cloneElement;
}
var __spread = _assign;
var createMixin = function createMixin(mixin) {
return mixin;
};
if (process.env.NODE_ENV !== 'production') {
var warnedForSpread = false;
var warnedForCreateMixin = false;
__spread = function __spread() {
lowPriorityWarning(warnedForSpread, 'React.__spread is deprecated and should not be used. Use ' + 'Object.assign directly or another helper function with similar ' + 'semantics. You may be seeing this warning due to your compiler. ' + 'See https://fb.me/react-spread-deprecation for more details.');
warnedForSpread = true;
return _assign.apply(null, arguments);
};
createMixin = function createMixin(mixin) {
lowPriorityWarning(warnedForCreateMixin, 'React.createMixin is deprecated and should not be used. ' + 'In React v16.0, it will be removed. ' + 'You can use this mixin directly instead. ' + 'See https://fb.me/createmixin-was-never-implemented for more info.');
warnedForCreateMixin = true;
return mixin;
};
}
var React = {
Children: {
map: ReactChildren.map,
forEach: ReactChildren.forEach,
count: ReactChildren.count,
toArray: ReactChildren.toArray,
only: onlyChild
},
Component: ReactBaseClasses.Component,
PureComponent: ReactBaseClasses.PureComponent,
createElement: createElement,
cloneElement: cloneElement,
isValidElement: ReactElement.isValidElement,
PropTypes: ReactPropTypes,
createClass: createReactClass,
createFactory: createFactory,
createMixin: createMixin,
DOM: ReactDOMFactories,
version: ReactVersion,
__spread: __spread
};
if (process.env.NODE_ENV !== 'production') {
var warnedForCreateClass = false;
if (canDefineProperty) {
Object.defineProperty(React, 'PropTypes', {
get: function get() {
lowPriorityWarning(didWarnPropTypesDeprecated, 'Accessing PropTypes via the main React package is deprecated,' + ' and will be removed in React v16.0.' + ' Use the latest available v15.* prop-types package from npm instead.' + ' For info on usage, compatibility, migration and more, see ' + 'https://fb.me/prop-types-docs');
didWarnPropTypesDeprecated = true;
return ReactPropTypes;
}
});
Object.defineProperty(React, 'createClass', {
get: function get() {
lowPriorityWarning(warnedForCreateClass, 'Accessing createClass via the main React package is deprecated,' + ' and will be removed in React v16.0.' + " Use a plain JavaScript class instead. If you're not yet " + 'ready to migrate, create-react-class v15.* is available ' + 'on npm as a temporary, drop-in replacement. ' + 'For more info see https://fb.me/react-create-class');
warnedForCreateClass = true;
return createReactClass;
}
});
}
React.DOM = {};
var warnedForFactories = false;
Object.keys(ReactDOMFactories).forEach(function (factory) {
React.DOM[factory] = function () {
if (!warnedForFactories) {
lowPriorityWarning(false, 'Accessing factories like React.DOM.%s has been deprecated ' + 'and will be removed in v16.0+. Use the ' + 'react-dom-factories package instead. ' + ' Version 1.0 provides a drop-in replacement.' + ' For more info, see https://fb.me/react-dom-factories', factory);
warnedForFactories = true;
}
return ReactDOMFactories[factory].apply(ReactDOMFactories, arguments);
};
});
}
module.exports = React;
}, 35, null, "react/lib/React.js");
__d(/* object-assign/index.js */function(global, require, module, exports) {/*
object-assign
(c) Sindre Sorhus
@license MIT
*/
'use strict';
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
var hasOwnProperty = Object.prototype.hasOwnProperty;
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
function toObject(val) {
if (val === null || val === undefined) {
throw new TypeError('Object.assign cannot be called with null or undefined');
}
return Object(val);
}
function shouldUseNative() {
try {
if (!Object.assign) {
return false;
}
var test1 = new String('abc');
test1[5] = 'de';
if (Object.getOwnPropertyNames(test1)[0] === '5') {
return false;
}
var test2 = {};
for (var i = 0; i < 10; i++) {
test2['_' + String.fromCharCode(i)] = i;
}
var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
return test2[n];
});
if (order2.join('') !== '0123456789') {
return false;
}
var test3 = {};
'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
test3[letter] = letter;
});
if (Object.keys(babelHelpers.extends({}, test3)).join('') !== 'abcdefghijklmnopqrst') {
return false;
}
return true;
} catch (err) {
return false;
}
}
module.exports = shouldUseNative() ? Object.assign : function (target, source) {
var from;
var to = toObject(target);
var symbols;
for (var s = 1; s < arguments.length; s++) {
from = Object(arguments[s]);
for (var key in from) {
if (hasOwnProperty.call(from, key)) {
to[key] = from[key];
}
}
if (getOwnPropertySymbols) {
symbols = getOwnPropertySymbols(from);
for (var i = 0; i < symbols.length; i++) {
if (propIsEnumerable.call(from, symbols[i])) {
to[symbols[i]] = from[symbols[i]];
}
}
}
}
return to;
};
}, 36, null, "object-assign/index.js");
__d(/* react/lib/ReactBaseClasses.js */function(global, require, module, exports) {
'use strict';
var _prodInvariant = require(38 ), // 38 = ./reactProdInvariant
_assign = require(36 ); // 36 = object-assign
var ReactNoopUpdateQueue = require(39 ); // 39 = ./ReactNoopUpdateQueue
var canDefineProperty = require(42 ); // 42 = ./canDefineProperty
var emptyObject = require(43 ); // 43 = fbjs/lib/emptyObject
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var lowPriorityWarning = require(45 ); // 45 = ./lowPriorityWarning
function ReactComponent(props, context, updater) {
this.props = props;
this.context = context;
this.refs = emptyObject;
this.updater = updater || ReactNoopUpdateQueue;
}
ReactComponent.prototype.isReactComponent = {};
ReactComponent.prototype.setState = function (partialState, callback) {
!(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'setState(...): takes an object of state variables to update or a function which returns an object of state variables.') : _prodInvariant('85') : void 0;
this.updater.enqueueSetState(this, partialState);
if (callback) {
this.updater.enqueueCallback(this, callback, 'setState');
}
};
ReactComponent.prototype.forceUpdate = function (callback) {
this.updater.enqueueForceUpdate(this);
if (callback) {
this.updater.enqueueCallback(this, callback, 'forceUpdate');
}
};
if (process.env.NODE_ENV !== 'production') {
var deprecatedAPIs = {
isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],
replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']
};
var defineDeprecationWarning = function defineDeprecationWarning(methodName, info) {
if (canDefineProperty) {
Object.defineProperty(ReactComponent.prototype, methodName, {
get: function get() {
lowPriorityWarning(false, '%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]);
return undefined;
}
});
}
};
for (var fnName in deprecatedAPIs) {
if (deprecatedAPIs.hasOwnProperty(fnName)) {
defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
}
}
}
function ReactPureComponent(props, context, updater) {
this.props = props;
this.context = context;
this.refs = emptyObject;
this.updater = updater || ReactNoopUpdateQueue;
}
function ComponentDummy() {}
ComponentDummy.prototype = ReactComponent.prototype;
ReactPureComponent.prototype = new ComponentDummy();
ReactPureComponent.prototype.constructor = ReactPureComponent;
_assign(ReactPureComponent.prototype, ReactComponent.prototype);
ReactPureComponent.prototype.isPureReactComponent = true;
module.exports = {
Component: ReactComponent,
PureComponent: ReactPureComponent
};
}, 37, null, "react/lib/ReactBaseClasses.js");
__d(/* react/lib/reactProdInvariant.js */function(global, require, module, exports) {
'use strict';
function reactProdInvariant(code) {
var argCount = arguments.length - 1;
var message = 'Minified React error #' + code + '; visit ' + 'http://facebook.github.io/react/docs/error-decoder.html?invariant=' + code;
for (var argIdx = 0; argIdx < argCount; argIdx++) {
message += '&args[]=' + encodeURIComponent(arguments[argIdx + 1]);
}
message += ' for the full message or use the non-minified dev environment' + ' for full errors and additional helpful warnings.';
var error = new Error(message);
error.name = 'Invariant Violation';
error.framesToPop = 1;
throw error;
}
module.exports = reactProdInvariant;
}, 38, null, "react/lib/reactProdInvariant.js");
__d(/* react/lib/ReactNoopUpdateQueue.js */function(global, require, module, exports) {
'use strict';
var warning = require(40 ); // 40 = fbjs/lib/warning
function warnNoop(publicInstance, callerName) {
if (process.env.NODE_ENV !== 'production') {
var constructor = publicInstance.constructor;
process.env.NODE_ENV !== 'production' ? warning(false, '%s(...): Can only update a mounted or mounting component. ' + 'This usually means you called %s() on an unmounted component. ' + 'This is a no-op. Please check the code for the %s component.', callerName, callerName, constructor && (constructor.displayName || constructor.name) || 'ReactClass') : void 0;
}
}
var ReactNoopUpdateQueue = {
isMounted: function isMounted(publicInstance) {
return false;
},
enqueueCallback: function enqueueCallback(publicInstance, callback) {},
enqueueForceUpdate: function enqueueForceUpdate(publicInstance) {
warnNoop(publicInstance, 'forceUpdate');
},
enqueueReplaceState: function enqueueReplaceState(publicInstance, completeState) {
warnNoop(publicInstance, 'replaceState');
},
enqueueSetState: function enqueueSetState(publicInstance, partialState) {
warnNoop(publicInstance, 'setState');
}
};
module.exports = ReactNoopUpdateQueue;
}, 39, null, "react/lib/ReactNoopUpdateQueue.js");
__d(/* fbjs/lib/warning.js */function(global, require, module, exports) {
'use strict';
var emptyFunction = require(41 ); // 41 = ./emptyFunction
var warning = emptyFunction;
if (process.env.NODE_ENV !== 'production') {
var printWarning = function printWarning(format) {
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
args[_key - 1] = arguments[_key];
}
var argIndex = 0;
var message = 'Warning: ' + format.replace(/%s/g, function () {
return args[argIndex++];
});
if (typeof console !== 'undefined') {
console.error(message);
}
try {
throw new Error(message);
} catch (x) {}
};
warning = function warning(condition, format) {
if (format === undefined) {
throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
}
if (format.indexOf('Failed Composite propType: ') === 0) {
return;
}
if (!condition) {
for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
args[_key2 - 2] = arguments[_key2];
}
printWarning.apply(undefined, [format].concat(args));
}
};
}
module.exports = warning;
}, 40, null, "fbjs/lib/warning.js");
__d(/* fbjs/lib/emptyFunction.js */function(global, require, module, exports) {"use strict";
function makeEmptyFunction(arg) {
return function () {
return arg;
};
}
var emptyFunction = function emptyFunction() {};
emptyFunction.thatReturns = makeEmptyFunction;
emptyFunction.thatReturnsFalse = makeEmptyFunction(false);
emptyFunction.thatReturnsTrue = makeEmptyFunction(true);
emptyFunction.thatReturnsNull = makeEmptyFunction(null);
emptyFunction.thatReturnsThis = function () {
return this;
};
emptyFunction.thatReturnsArgument = function (arg) {
return arg;
};
module.exports = emptyFunction;
}, 41, null, "fbjs/lib/emptyFunction.js");
__d(/* react/lib/canDefineProperty.js */function(global, require, module, exports) {
'use strict';
var canDefineProperty = false;
if (process.env.NODE_ENV !== 'production') {
try {
Object.defineProperty({}, 'x', { get: function get() {} });
canDefineProperty = true;
} catch (x) {}
}
module.exports = canDefineProperty;
}, 42, null, "react/lib/canDefineProperty.js");
__d(/* fbjs/lib/emptyObject.js */function(global, require, module, exports) {
'use strict';
var emptyObject = {};
if (process.env.NODE_ENV !== 'production') {
Object.freeze(emptyObject);
}
module.exports = emptyObject;
}, 43, null, "fbjs/lib/emptyObject.js");
__d(/* fbjs/lib/invariant.js */function(global, require, module, exports) {
'use strict';
var validateFormat = function validateFormat(format) {};
if (process.env.NODE_ENV !== 'production') {
validateFormat = function validateFormat(format) {
if (format === undefined) {
throw new Error('invariant requires an error message argument');
}
};
}
function invariant(condition, format, a, b, c, d, e, f) {
validateFormat(format);
if (!condition) {
var error;
if (format === undefined) {
error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
} else {
var args = [a, b, c, d, e, f];
var argIndex = 0;
error = new Error(format.replace(/%s/g, function () {
return args[argIndex++];
}));
error.name = 'Invariant Violation';
}
error.framesToPop = 1;
throw error;
}
}
module.exports = invariant;
}, 44, null, "fbjs/lib/invariant.js");
__d(/* react/lib/lowPriorityWarning.js */function(global, require, module, exports) {
'use strict';
var lowPriorityWarning = function lowPriorityWarning() {};
if (process.env.NODE_ENV !== 'production') {
var printWarning = function printWarning(format) {
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
args[_key - 1] = arguments[_key];
}
var argIndex = 0;
var message = 'Warning: ' + format.replace(/%s/g, function () {
return args[argIndex++];
});
if (typeof console !== 'undefined') {
console.warn(message);
}
try {
throw new Error(message);
} catch (x) {}
};
lowPriorityWarning = function lowPriorityWarning(condition, format) {
if (format === undefined) {
throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
}
if (!condition) {
for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
args[_key2 - 2] = arguments[_key2];
}
printWarning.apply(undefined, [format].concat(args));
}
};
}
module.exports = lowPriorityWarning;
}, 45, null, "react/lib/lowPriorityWarning.js");
__d(/* react/lib/ReactChildren.js */function(global, require, module, exports) {
'use strict';
var PooledClass = require(47 ); // 47 = ./PooledClass
var ReactElement = require(48 ); // 48 = ./ReactElement
var emptyFunction = require(41 ); // 41 = fbjs/lib/emptyFunction
var traverseAllChildren = require(51 ); // 51 = ./traverseAllChildren
var twoArgumentPooler = PooledClass.twoArgumentPooler;
var fourArgumentPooler = PooledClass.fourArgumentPooler;
var userProvidedKeyEscapeRegex = /\/+/g;
function escapeUserProvidedKey(text) {
return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/');
}
function ForEachBookKeeping(forEachFunction, forEachContext) {
this.func = forEachFunction;
this.context = forEachContext;
this.count = 0;
}
ForEachBookKeeping.prototype.destructor = function () {
this.func = null;
this.context = null;
this.count = 0;
};
PooledClass.addPoolingTo(ForEachBookKeeping, twoArgumentPooler);
function forEachSingleChild(bookKeeping, child, name) {
var func = bookKeeping.func,
context = bookKeeping.context;
func.call(context, child, bookKeeping.count++);
}
function forEachChildren(children, forEachFunc, forEachContext) {
if (children == null) {
return children;
}
var traverseContext = ForEachBookKeeping.getPooled(forEachFunc, forEachContext);
traverseAllChildren(children, forEachSingleChild, traverseContext);
ForEachBookKeeping.release(traverseContext);
}
function MapBookKeeping(mapResult, keyPrefix, mapFunction, mapContext) {
this.result = mapResult;
this.keyPrefix = keyPrefix;
this.func = mapFunction;
this.context = mapContext;
this.count = 0;
}
MapBookKeeping.prototype.destructor = function () {
this.result = null;
this.keyPrefix = null;
this.func = null;
this.context = null;
this.count = 0;
};
PooledClass.addPoolingTo(MapBookKeeping, fourArgumentPooler);
function mapSingleChildIntoContext(bookKeeping, child, childKey) {
var result = bookKeeping.result,
keyPrefix = bookKeeping.keyPrefix,
func = bookKeeping.func,
context = bookKeeping.context;
var mappedChild = func.call(context, child, bookKeeping.count++);
if (Array.isArray(mappedChild)) {
mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, emptyFunction.thatReturnsArgument);
} else if (mappedChild != null) {
if (ReactElement.isValidElement(mappedChild)) {
mappedChild = ReactElement.cloneAndReplaceKey(mappedChild, keyPrefix + (mappedChild.key && (!child || child.key !== mappedChild.key) ? escapeUserProvidedKey(mappedChild.key) + '/' : '') + childKey);
}
result.push(mappedChild);
}
}
function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) {
var escapedPrefix = '';
if (prefix != null) {
escapedPrefix = escapeUserProvidedKey(prefix) + '/';
}
var traverseContext = MapBookKeeping.getPooled(array, escapedPrefix, func, context);
traverseAllChildren(children, mapSingleChildIntoContext, traverseContext);
MapBookKeeping.release(traverseContext);
}
function mapChildren(children, func, context) {
if (children == null) {
return children;
}
var result = [];
mapIntoWithKeyPrefixInternal(children, result, null, func, context);
return result;
}
function forEachSingleChildDummy(traverseContext, child, name) {
return null;
}
function countChildren(children, context) {
return traverseAllChildren(children, forEachSingleChildDummy, null);
}
function toArray(children) {
var result = [];
mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);
return result;
}
var ReactChildren = {
forEach: forEachChildren,
map: mapChildren,
mapIntoWithKeyPrefixInternal: mapIntoWithKeyPrefixInternal,
count: countChildren,
toArray: toArray
};
module.exports = ReactChildren;
}, 46, null, "react/lib/ReactChildren.js");
__d(/* react/lib/PooledClass.js */function(global, require, module, exports) {
'use strict';
var _prodInvariant = require(38 ); // 38 = ./reactProdInvariant
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var oneArgumentPooler = function oneArgumentPooler(copyFieldsFrom) {
var Klass = this;
if (Klass.instancePool.length) {
var instance = Klass.instancePool.pop();
Klass.call(instance, copyFieldsFrom);
return instance;
} else {
return new Klass(copyFieldsFrom);
}
};
var twoArgumentPooler = function twoArgumentPooler(a1, a2) {
var Klass = this;
if (Klass.instancePool.length) {
var instance = Klass.instancePool.pop();
Klass.call(instance, a1, a2);
return instance;
} else {
return new Klass(a1, a2);
}
};
var threeArgumentPooler = function threeArgumentPooler(a1, a2, a3) {
var Klass = this;
if (Klass.instancePool.length) {
var instance = Klass.instancePool.pop();
Klass.call(instance, a1, a2, a3);
return instance;
} else {
return new Klass(a1, a2, a3);
}
};
var fourArgumentPooler = function fourArgumentPooler(a1, a2, a3, a4) {
var Klass = this;
if (Klass.instancePool.length) {
var instance = Klass.instancePool.pop();
Klass.call(instance, a1, a2, a3, a4);
return instance;
} else {
return new Klass(a1, a2, a3, a4);
}
};
var standardReleaser = function standardReleaser(instance) {
var Klass = this;
!(instance instanceof Klass) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Trying to release an instance into a pool of a different type.') : _prodInvariant('25') : void 0;
instance.destructor();
if (Klass.instancePool.length < Klass.poolSize) {
Klass.instancePool.push(instance);
}
};
var DEFAULT_POOL_SIZE = 10;
var DEFAULT_POOLER = oneArgumentPooler;
var addPoolingTo = function addPoolingTo(CopyConstructor, pooler) {
var NewKlass = CopyConstructor;
NewKlass.instancePool = [];
NewKlass.getPooled = pooler || DEFAULT_POOLER;
if (!NewKlass.poolSize) {
NewKlass.poolSize = DEFAULT_POOL_SIZE;
}
NewKlass.release = standardReleaser;
return NewKlass;
};
var PooledClass = {
addPoolingTo: addPoolingTo,
oneArgumentPooler: oneArgumentPooler,
twoArgumentPooler: twoArgumentPooler,
threeArgumentPooler: threeArgumentPooler,
fourArgumentPooler: fourArgumentPooler
};
module.exports = PooledClass;
}, 47, null, "react/lib/PooledClass.js");
__d(/* react/lib/ReactElement.js */function(global, require, module, exports) {
'use strict';
var _assign = require(36 ); // 36 = object-assign
var ReactCurrentOwner = require(49 ); // 49 = ./ReactCurrentOwner
var warning = require(40 ); // 40 = fbjs/lib/warning
var canDefineProperty = require(42 ); // 42 = ./canDefineProperty
var hasOwnProperty = Object.prototype.hasOwnProperty;
var REACT_ELEMENT_TYPE = require(50 ); // 50 = ./ReactElementSymbol
var RESERVED_PROPS = {
key: true,
ref: true,
__self: true,
__source: true
};
var specialPropKeyWarningShown, specialPropRefWarningShown;
function hasValidRef(config) {
if (process.env.NODE_ENV !== 'production') {
if (hasOwnProperty.call(config, 'ref')) {
var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
if (getter && getter.isReactWarning) {
return false;
}
}
}
return config.ref !== undefined;
}
function hasValidKey(config) {
if (process.env.NODE_ENV !== 'production') {
if (hasOwnProperty.call(config, 'key')) {
var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
if (getter && getter.isReactWarning) {
return false;
}
}
}
return config.key !== undefined;
}
function defineKeyPropWarningGetter(props, displayName) {
var warnAboutAccessingKey = function warnAboutAccessingKey() {
if (!specialPropKeyWarningShown) {
specialPropKeyWarningShown = true;
process.env.NODE_ENV !== 'production' ? warning(false, '%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName) : void 0;
}
};
warnAboutAccessingKey.isReactWarning = true;
Object.defineProperty(props, 'key', {
get: warnAboutAccessingKey,
configurable: true
});
}
function defineRefPropWarningGetter(props, displayName) {
var warnAboutAccessingRef = function warnAboutAccessingRef() {
if (!specialPropRefWarningShown) {
specialPropRefWarningShown = true;
process.env.NODE_ENV !== 'production' ? warning(false, '%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName) : void 0;
}
};
warnAboutAccessingRef.isReactWarning = true;
Object.defineProperty(props, 'ref', {
get: warnAboutAccessingRef,
configurable: true
});
}
var ReactElement = function ReactElement(type, key, ref, self, source, owner, props) {
var element = {
$$typeof: REACT_ELEMENT_TYPE,
type: type,
key: key,
ref: ref,
props: props,
_owner: owner
};
if (process.env.NODE_ENV !== 'production') {
element._store = {};
if (canDefineProperty) {
Object.defineProperty(element._store, 'validated', {
configurable: false,
enumerable: false,
writable: true,
value: false
});
Object.defineProperty(element, '_self', {
configurable: false,
enumerable: false,
writable: false,
value: self
});
Object.defineProperty(element, '_source', {
configurable: false,
enumerable: false,
writable: false,
value: source
});
} else {
element._store.validated = false;
element._self = self;
element._source = source;
}
if (Object.freeze) {
Object.freeze(element.props);
Object.freeze(element);
}
}
return element;
};
ReactElement.createElement = function (type, config, children) {
var propName;
var props = {};
var key = null;
var ref = null;
var self = null;
var source = null;
if (config != null) {
if (hasValidRef(config)) {
ref = config.ref;
}
if (hasValidKey(config)) {
key = '' + config.key;
}
self = config.__self === undefined ? null : config.__self;
source = config.__source === undefined ? null : config.__source;
for (propName in config) {
if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
props[propName] = config[propName];
}
}
}
var childrenLength = arguments.length - 2;
if (childrenLength === 1) {
props.children = children;
} else if (childrenLength > 1) {
var childArray = Array(childrenLength);
for (var i = 0; i < childrenLength; i++) {
childArray[i] = arguments[i + 2];
}
if (process.env.NODE_ENV !== 'production') {
if (Object.freeze) {
Object.freeze(childArray);
}
}
props.children = childArray;
}
if (type && type.defaultProps) {
var defaultProps = type.defaultProps;
for (propName in defaultProps) {
if (props[propName] === undefined) {
props[propName] = defaultProps[propName];
}
}
}
if (process.env.NODE_ENV !== 'production') {
if (key || ref) {
if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {
var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
if (key) {
defineKeyPropWarningGetter(props, displayName);
}
if (ref) {
defineRefPropWarningGetter(props, displayName);
}
}
}
}
return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
};
ReactElement.createFactory = function (type) {
var factory = ReactElement.createElement.bind(null, type);
factory.type = type;
return factory;
};
ReactElement.cloneAndReplaceKey = function (oldElement, newKey) {
var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
return newElement;
};
ReactElement.cloneElement = function (element, config, children) {
var propName;
var props = _assign({}, element.props);
var key = element.key;
var ref = element.ref;
var self = element._self;
var source = element._source;
var owner = element._owner;
if (config != null) {
if (hasValidRef(config)) {
ref = config.ref;
owner = ReactCurrentOwner.current;
}
if (hasValidKey(config)) {
key = '' + config.key;
}
var defaultProps;
if (element.type && element.type.defaultProps) {
defaultProps = element.type.defaultProps;
}
for (propName in config) {
if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
if (config[propName] === undefined && defaultProps !== undefined) {
props[propName] = defaultProps[propName];
} else {
props[propName] = config[propName];
}
}
}
}
var childrenLength = arguments.length - 2;
if (childrenLength === 1) {
props.children = children;
} else if (childrenLength > 1) {
var childArray = Array(childrenLength);
for (var i = 0; i < childrenLength; i++) {
childArray[i] = arguments[i + 2];
}
props.children = childArray;
}
return ReactElement(element.type, key, ref, self, source, owner, props);
};
ReactElement.isValidElement = function (object) {
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
};
module.exports = ReactElement;
}, 48, null, "react/lib/ReactElement.js");
__d(/* react/lib/ReactCurrentOwner.js */function(global, require, module, exports) {
'use strict';
var ReactCurrentOwner = {
current: null
};
module.exports = ReactCurrentOwner;
}, 49, null, "react/lib/ReactCurrentOwner.js");
__d(/* react/lib/ReactElementSymbol.js */function(global, require, module, exports) {
'use strict';
var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7;
module.exports = REACT_ELEMENT_TYPE;
}, 50, null, "react/lib/ReactElementSymbol.js");
__d(/* react/lib/traverseAllChildren.js */function(global, require, module, exports) {
'use strict';
var _prodInvariant = require(38 ); // 38 = ./reactProdInvariant
var ReactCurrentOwner = require(49 ); // 49 = ./ReactCurrentOwner
var REACT_ELEMENT_TYPE = require(50 ); // 50 = ./ReactElementSymbol
var getIteratorFn = require(52 ); // 52 = ./getIteratorFn
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var KeyEscapeUtils = require(53 ); // 53 = ./KeyEscapeUtils
var warning = require(40 ); // 40 = fbjs/lib/warning
var SEPARATOR = '.';
var SUBSEPARATOR = ':';
var didWarnAboutMaps = false;
function getComponentKey(component, index) {
if (component && typeof component === 'object' && component.key != null) {
return KeyEscapeUtils.escape(component.key);
}
return index.toString(36);
}
function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) {
var type = typeof children;
if (type === 'undefined' || type === 'boolean') {
children = null;
}
if (children === null || type === 'string' || type === 'number' || type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE) {
callback(traverseContext, children, nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar);
return 1;
}
var child;
var nextName;
var subtreeCount = 0;
var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;
if (Array.isArray(children)) {
for (var i = 0; i < children.length; i++) {
child = children[i];
nextName = nextNamePrefix + getComponentKey(child, i);
subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
}
} else {
var iteratorFn = getIteratorFn(children);
if (iteratorFn) {
var iterator = iteratorFn.call(children);
var step;
if (iteratorFn !== children.entries) {
var ii = 0;
while (!(step = iterator.next()).done) {
child = step.value;
nextName = nextNamePrefix + getComponentKey(child, ii++);
subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
}
} else {
if (process.env.NODE_ENV !== 'production') {
var mapsAsChildrenAddendum = '';
if (ReactCurrentOwner.current) {
var mapsAsChildrenOwnerName = ReactCurrentOwner.current.getName();
if (mapsAsChildrenOwnerName) {
mapsAsChildrenAddendum = ' Check the render method of `' + mapsAsChildrenOwnerName + '`.';
}
}
process.env.NODE_ENV !== 'production' ? warning(didWarnAboutMaps, 'Using Maps as children is not yet fully supported. It is an ' + 'experimental feature that might be removed. Convert it to a ' + 'sequence / iterable of keyed ReactElements instead.%s', mapsAsChildrenAddendum) : void 0;
didWarnAboutMaps = true;
}
while (!(step = iterator.next()).done) {
var entry = step.value;
if (entry) {
child = entry[1];
nextName = nextNamePrefix + KeyEscapeUtils.escape(entry[0]) + SUBSEPARATOR + getComponentKey(child, 0);
subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
}
}
}
} else if (type === 'object') {
var addendum = '';
if (process.env.NODE_ENV !== 'production') {
addendum = ' If you meant to render a collection of children, use an array ' + 'instead or wrap the object using createFragment(object) from the ' + 'React add-ons.';
if (children._isReactElement) {
addendum = " It looks like you're using an element created by a different " + 'version of React. Make sure to use only one copy of React.';
}
if (ReactCurrentOwner.current) {
var name = ReactCurrentOwner.current.getName();
if (name) {
addendum += ' Check the render method of `' + name + '`.';
}
}
}
var childrenString = String(children);
!false ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Objects are not valid as a React child (found: %s).%s', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : _prodInvariant('31', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : void 0;
}
}
return subtreeCount;
}
function traverseAllChildren(children, callback, traverseContext) {
if (children == null) {
return 0;
}
return traverseAllChildrenImpl(children, '', callback, traverseContext);
}
module.exports = traverseAllChildren;
}, 51, null, "react/lib/traverseAllChildren.js");
__d(/* react/lib/getIteratorFn.js */function(global, require, module, exports) {
'use strict';
var ITERATOR_SYMBOL = typeof Symbol === 'function' && (typeof Symbol === 'function' ? Symbol.iterator : '@@iterator');
var FAUX_ITERATOR_SYMBOL = '@@iterator';
function getIteratorFn(maybeIterable) {
var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
if (typeof iteratorFn === 'function') {
return iteratorFn;
}
}
module.exports = getIteratorFn;
}, 52, null, "react/lib/getIteratorFn.js");
__d(/* react/lib/KeyEscapeUtils.js */function(global, require, module, exports) {
'use strict';
function escape(key) {
var escapeRegex = /[=:]/g;
var escaperLookup = {
'=': '=0',
':': '=2'
};
var escapedString = ('' + key).replace(escapeRegex, function (match) {
return escaperLookup[match];
});
return '$' + escapedString;
}
function unescape(key) {
var unescapeRegex = /(=0|=2)/g;
var unescaperLookup = {
'=0': '=',
'=2': ':'
};
var keySubstring = key[0] === '.' && key[1] === '$' ? key.substring(2) : key.substring(1);
return ('' + keySubstring).replace(unescapeRegex, function (match) {
return unescaperLookup[match];
});
}
var KeyEscapeUtils = {
escape: escape,
unescape: unescape
};
module.exports = KeyEscapeUtils;
}, 53, null, "react/lib/KeyEscapeUtils.js");
__d(/* react/lib/ReactDOMFactories.js */function(global, require, module, exports) {
'use strict';
var ReactElement = require(48 ); // 48 = ./ReactElement
var createDOMFactory = ReactElement.createFactory;
if (process.env.NODE_ENV !== 'production') {
var ReactElementValidator = require(55 ); // 55 = ./ReactElementValidator
createDOMFactory = ReactElementValidator.createFactory;
}
var ReactDOMFactories = {
a: createDOMFactory('a'),
abbr: createDOMFactory('abbr'),
address: createDOMFactory('address'),
area: createDOMFactory('area'),
article: createDOMFactory('article'),
aside: createDOMFactory('aside'),
audio: createDOMFactory('audio'),
b: createDOMFactory('b'),
base: createDOMFactory('base'),
bdi: createDOMFactory('bdi'),
bdo: createDOMFactory('bdo'),
big: createDOMFactory('big'),
blockquote: createDOMFactory('blockquote'),
body: createDOMFactory('body'),
br: createDOMFactory('br'),
button: createDOMFactory('button'),
canvas: createDOMFactory('canvas'),
caption: createDOMFactory('caption'),
cite: createDOMFactory('cite'),
code: createDOMFactory('code'),
col: createDOMFactory('col'),
colgroup: createDOMFactory('colgroup'),
data: createDOMFactory('data'),
datalist: createDOMFactory('datalist'),
dd: createDOMFactory('dd'),
del: createDOMFactory('del'),
details: createDOMFactory('details'),
dfn: createDOMFactory('dfn'),
dialog: createDOMFactory('dialog'),
div: createDOMFactory('div'),
dl: createDOMFactory('dl'),
dt: createDOMFactory('dt'),
em: createDOMFactory('em'),
embed: createDOMFactory('embed'),
fieldset: createDOMFactory('fieldset'),
figcaption: createDOMFactory('figcaption'),
figure: createDOMFactory('figure'),
footer: createDOMFactory('footer'),
form: createDOMFactory('form'),
h1: createDOMFactory('h1'),
h2: createDOMFactory('h2'),
h3: createDOMFactory('h3'),
h4: createDOMFactory('h4'),
h5: createDOMFactory('h5'),
h6: createDOMFactory('h6'),
head: createDOMFactory('head'),
header: createDOMFactory('header'),
hgroup: createDOMFactory('hgroup'),
hr: createDOMFactory('hr'),
html: createDOMFactory('html'),
i: createDOMFactory('i'),
iframe: createDOMFactory('iframe'),
img: createDOMFactory('img'),
input: createDOMFactory('input'),
ins: createDOMFactory('ins'),
kbd: createDOMFactory('kbd'),
keygen: createDOMFactory('keygen'),
label: createDOMFactory('label'),
legend: createDOMFactory('legend'),
li: createDOMFactory('li'),
link: createDOMFactory('link'),
main: createDOMFactory('main'),
map: createDOMFactory('map'),
mark: createDOMFactory('mark'),
menu: createDOMFactory('menu'),
menuitem: createDOMFactory('menuitem'),
meta: createDOMFactory('meta'),
meter: createDOMFactory('meter'),
nav: createDOMFactory('nav'),
noscript: createDOMFactory('noscript'),
object: createDOMFactory('object'),
ol: createDOMFactory('ol'),
optgroup: createDOMFactory('optgroup'),
option: createDOMFactory('option'),
output: createDOMFactory('output'),
p: createDOMFactory('p'),
param: createDOMFactory('param'),
picture: createDOMFactory('picture'),
pre: createDOMFactory('pre'),
progress: createDOMFactory('progress'),
q: createDOMFactory('q'),
rp: createDOMFactory('rp'),
rt: createDOMFactory('rt'),
ruby: createDOMFactory('ruby'),
s: createDOMFactory('s'),
samp: createDOMFactory('samp'),
script: createDOMFactory('script'),
section: createDOMFactory('section'),
select: createDOMFactory('select'),
small: createDOMFactory('small'),
source: createDOMFactory('source'),
span: createDOMFactory('span'),
strong: createDOMFactory('strong'),
style: createDOMFactory('style'),
sub: createDOMFactory('sub'),
summary: createDOMFactory('summary'),
sup: createDOMFactory('sup'),
table: createDOMFactory('table'),
tbody: createDOMFactory('tbody'),
td: createDOMFactory('td'),
textarea: createDOMFactory('textarea'),
tfoot: createDOMFactory('tfoot'),
th: createDOMFactory('th'),
thead: createDOMFactory('thead'),
time: createDOMFactory('time'),
title: createDOMFactory('title'),
tr: createDOMFactory('tr'),
track: createDOMFactory('track'),
u: createDOMFactory('u'),
ul: createDOMFactory('ul'),
'var': createDOMFactory('var'),
video: createDOMFactory('video'),
wbr: createDOMFactory('wbr'),
circle: createDOMFactory('circle'),
clipPath: createDOMFactory('clipPath'),
defs: createDOMFactory('defs'),
ellipse: createDOMFactory('ellipse'),
g: createDOMFactory('g'),
image: createDOMFactory('image'),
line: createDOMFactory('line'),
linearGradient: createDOMFactory('linearGradient'),
mask: createDOMFactory('mask'),
path: createDOMFactory('path'),
pattern: createDOMFactory('pattern'),
polygon: createDOMFactory('polygon'),
polyline: createDOMFactory('polyline'),
radialGradient: createDOMFactory('radialGradient'),
rect: createDOMFactory('rect'),
stop: createDOMFactory('stop'),
svg: createDOMFactory('svg'),
text: createDOMFactory('text'),
tspan: createDOMFactory('tspan')
};
module.exports = ReactDOMFactories;
}, 54, null, "react/lib/ReactDOMFactories.js");
__d(/* react/lib/ReactElementValidator.js */function(global, require, module, exports) {
'use strict';
var ReactCurrentOwner = require(49 ); // 49 = ./ReactCurrentOwner
var ReactComponentTreeHook = require(56 ); // 56 = ./ReactComponentTreeHook
var ReactElement = require(48 ); // 48 = ./ReactElement
var checkReactTypeSpec = require(57 ); // 57 = ./checkReactTypeSpec
var canDefineProperty = require(42 ); // 42 = ./canDefineProperty
var getIteratorFn = require(52 ); // 52 = ./getIteratorFn
var warning = require(40 ); // 40 = fbjs/lib/warning
var lowPriorityWarning = require(45 ); // 45 = ./lowPriorityWarning
function getDeclarationErrorAddendum() {
if (ReactCurrentOwner.current) {
var name = ReactCurrentOwner.current.getName();
if (name) {
return ' Check the render method of `' + name + '`.';
}
}
return '';
}
function getSourceInfoErrorAddendum(elementProps) {
if (elementProps !== null && elementProps !== undefined && elementProps.__source !== undefined) {
var source = elementProps.__source;
var fileName = source.fileName.replace(/^.*[\\\/]/, '');
var lineNumber = source.lineNumber;
return ' Check your code at ' + fileName + ':' + lineNumber + '.';
}
return '';
}
var ownerHasKeyUseWarning = {};
function getCurrentComponentErrorInfo(parentType) {
var info = getDeclarationErrorAddendum();
if (!info) {
var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
if (parentName) {
info = ' Check the top-level render call using <' + parentName + '>.';
}
}
return info;
}
function validateExplicitKey(element, parentType) {
if (!element._store || element._store.validated || element.key != null) {
return;
}
element._store.validated = true;
var memoizer = ownerHasKeyUseWarning.uniqueKey || (ownerHasKeyUseWarning.uniqueKey = {});
var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
if (memoizer[currentComponentErrorInfo]) {
return;
}
memoizer[currentComponentErrorInfo] = true;
var childOwner = '';
if (element && element._owner && element._owner !== ReactCurrentOwner.current) {
childOwner = ' It was passed a child from ' + element._owner.getName() + '.';
}
process.env.NODE_ENV !== 'production' ? warning(false, 'Each child in an array or iterator should have a unique "key" prop.' + '%s%s See https://fb.me/react-warning-keys for more information.%s', currentComponentErrorInfo, childOwner, ReactComponentTreeHook.getCurrentStackAddendum(element)) : void 0;
}
function validateChildKeys(node, parentType) {
if (typeof node !== 'object') {
return;
}
if (Array.isArray(node)) {
for (var i = 0; i < node.length; i++) {
var child = node[i];
if (ReactElement.isValidElement(child)) {
validateExplicitKey(child, parentType);
}
}
} else if (ReactElement.isValidElement(node)) {
if (node._store) {
node._store.validated = true;
}
} else if (node) {
var iteratorFn = getIteratorFn(node);
if (iteratorFn) {
if (iteratorFn !== node.entries) {
var iterator = iteratorFn.call(node);
var step;
while (!(step = iterator.next()).done) {
if (ReactElement.isValidElement(step.value)) {
validateExplicitKey(step.value, parentType);
}
}
}
}
}
}
function validatePropTypes(element) {
var componentClass = element.type;
if (typeof componentClass !== 'function') {
return;
}
var name = componentClass.displayName || componentClass.name;
if (componentClass.propTypes) {
checkReactTypeSpec(componentClass.propTypes, element.props, 'prop', name, element, null);
}
if (typeof componentClass.getDefaultProps === 'function') {
process.env.NODE_ENV !== 'production' ? warning(componentClass.getDefaultProps.isReactClassApproved, 'getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.') : void 0;
}
}
var ReactElementValidator = {
createElement: function createElement(type, props, children) {
var validType = typeof type === 'string' || typeof type === 'function';
if (!validType) {
if (typeof type !== 'function' && typeof type !== 'string') {
var info = '';
if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
info += ' You likely forgot to export your component from the file ' + "it's defined in.";
}
var sourceInfo = getSourceInfoErrorAddendum(props);
if (sourceInfo) {
info += sourceInfo;
} else {
info += getDeclarationErrorAddendum();
}
info += ReactComponentTreeHook.getCurrentStackAddendum();
var currentSource = props !== null && props !== undefined && props.__source !== undefined ? props.__source : null;
ReactComponentTreeHook.pushNonStandardWarningStack(true, currentSource);
process.env.NODE_ENV !== 'production' ? warning(false, 'React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', type == null ? type : typeof type, info) : void 0;
ReactComponentTreeHook.popNonStandardWarningStack();
}
}
var element = ReactElement.createElement.apply(this, arguments);
if (element == null) {
return element;
}
if (validType) {
for (var i = 2; i < arguments.length; i++) {
validateChildKeys(arguments[i], type);
}
}
validatePropTypes(element);
return element;
},
createFactory: function createFactory(type) {
var validatedFactory = ReactElementValidator.createElement.bind(null, type);
validatedFactory.type = type;
if (process.env.NODE_ENV !== 'production') {
if (canDefineProperty) {
Object.defineProperty(validatedFactory, 'type', {
enumerable: false,
get: function get() {
lowPriorityWarning(false, 'Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.');
Object.defineProperty(this, 'type', {
value: type
});
return type;
}
});
}
}
return validatedFactory;
},
cloneElement: function cloneElement(element, props, children) {
var newElement = ReactElement.cloneElement.apply(this, arguments);
for (var i = 2; i < arguments.length; i++) {
validateChildKeys(arguments[i], newElement.type);
}
validatePropTypes(newElement);
return newElement;
}
};
module.exports = ReactElementValidator;
}, 55, null, "react/lib/ReactElementValidator.js");
__d(/* react/lib/ReactComponentTreeHook.js */function(global, require, module, exports) {
'use strict';
var _prodInvariant = require(38 ); // 38 = ./reactProdInvariant
var ReactCurrentOwner = require(49 ); // 49 = ./ReactCurrentOwner
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var warning = require(40 ); // 40 = fbjs/lib/warning
function isNative(fn) {
var funcToString = Function.prototype.toString;
var hasOwnProperty = Object.prototype.hasOwnProperty;
var reIsNative = RegExp('^' + funcToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$');
try {
var source = funcToString.call(fn);
return reIsNative.test(source);
} catch (err) {
return false;
}
}
var canUseCollections = typeof Array.from === 'function' && typeof Map === 'function' && isNative(Map) && Map.prototype != null && typeof Map.prototype.keys === 'function' && isNative(Map.prototype.keys) && typeof Set === 'function' && isNative(Set) && Set.prototype != null && typeof Set.prototype.keys === 'function' && isNative(Set.prototype.keys);
var setItem;
var getItem;
var removeItem;
var getItemIDs;
var addRoot;
var removeRoot;
var getRootIDs;
if (canUseCollections) {
var itemMap = new Map();
var rootIDSet = new Set();
setItem = function setItem(id, item) {
itemMap.set(id, item);
};
getItem = function getItem(id) {
return itemMap.get(id);
};
removeItem = function removeItem(id) {
itemMap['delete'](id);
};
getItemIDs = function getItemIDs() {
return Array.from(itemMap.keys());
};
addRoot = function addRoot(id) {
rootIDSet.add(id);
};
removeRoot = function removeRoot(id) {
rootIDSet['delete'](id);
};
getRootIDs = function getRootIDs() {
return Array.from(rootIDSet.keys());
};
} else {
var itemByKey = {};
var rootByKey = {};
var getKeyFromID = function getKeyFromID(id) {
return '.' + id;
};
var getIDFromKey = function getIDFromKey(key) {
return parseInt(key.substr(1), 10);
};
setItem = function setItem(id, item) {
var key = getKeyFromID(id);
itemByKey[key] = item;
};
getItem = function getItem(id) {
var key = getKeyFromID(id);
return itemByKey[key];
};
removeItem = function removeItem(id) {
var key = getKeyFromID(id);
delete itemByKey[key];
};
getItemIDs = function getItemIDs() {
return Object.keys(itemByKey).map(getIDFromKey);
};
addRoot = function addRoot(id) {
var key = getKeyFromID(id);
rootByKey[key] = true;
};
removeRoot = function removeRoot(id) {
var key = getKeyFromID(id);
delete rootByKey[key];
};
getRootIDs = function getRootIDs() {
return Object.keys(rootByKey).map(getIDFromKey);
};
}
var unmountedIDs = [];
function purgeDeep(id) {
var item = getItem(id);
if (item) {
var childIDs = item.childIDs;
removeItem(id);
childIDs.forEach(purgeDeep);
}
}
function describeComponentFrame(name, source, ownerName) {
return '\n in ' + (name || 'Unknown') + (source ? ' (at ' + source.fileName.replace(/^.*[\\\/]/, '') + ':' + source.lineNumber + ')' : ownerName ? ' (created by ' + ownerName + ')' : '');
}
function _getDisplayName(element) {
if (element == null) {
return '#empty';
} else if (typeof element === 'string' || typeof element === 'number') {
return '#text';
} else if (typeof element.type === 'string') {
return element.type;
} else {
return element.type.displayName || element.type.name || 'Unknown';
}
}
function describeID(id) {
var name = ReactComponentTreeHook.getDisplayName(id);
var element = ReactComponentTreeHook.getElement(id);
var ownerID = ReactComponentTreeHook.getOwnerID(id);
var ownerName;
if (ownerID) {
ownerName = ReactComponentTreeHook.getDisplayName(ownerID);
}
process.env.NODE_ENV !== 'production' ? warning(element, 'ReactComponentTreeHook: Missing React element for debugID %s when ' + 'building stack', id) : void 0;
return describeComponentFrame(name, element && element._source, ownerName);
}
var ReactComponentTreeHook = {
onSetChildren: function onSetChildren(id, nextChildIDs) {
var item = getItem(id);
!item ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Item must have been set') : _prodInvariant('144') : void 0;
item.childIDs = nextChildIDs;
for (var i = 0; i < nextChildIDs.length; i++) {
var nextChildID = nextChildIDs[i];
var nextChild = getItem(nextChildID);
!nextChild ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected hook events to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('140') : void 0;
!(nextChild.childIDs != null || typeof nextChild.element !== 'object' || nextChild.element == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected onSetChildren() to fire for a container child before its parent includes it in onSetChildren().') : _prodInvariant('141') : void 0;
!nextChild.isMounted ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected onMountComponent() to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('71') : void 0;
if (nextChild.parentID == null) {
nextChild.parentID = id;
}
!(nextChild.parentID === id) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected onBeforeMountComponent() parent and onSetChildren() to be consistent (%s has parents %s and %s).', nextChildID, nextChild.parentID, id) : _prodInvariant('142', nextChildID, nextChild.parentID, id) : void 0;
}
},
onBeforeMountComponent: function onBeforeMountComponent(id, element, parentID) {
var item = {
element: element,
parentID: parentID,
text: null,
childIDs: [],
isMounted: false,
updateCount: 0
};
setItem(id, item);
},
onBeforeUpdateComponent: function onBeforeUpdateComponent(id, element) {
var item = getItem(id);
if (!item || !item.isMounted) {
return;
}
item.element = element;
},
onMountComponent: function onMountComponent(id) {
var item = getItem(id);
!item ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Item must have been set') : _prodInvariant('144') : void 0;
item.isMounted = true;
var isRoot = item.parentID === 0;
if (isRoot) {
addRoot(id);
}
},
onUpdateComponent: function onUpdateComponent(id) {
var item = getItem(id);
if (!item || !item.isMounted) {
return;
}
item.updateCount++;
},
onUnmountComponent: function onUnmountComponent(id) {
var item = getItem(id);
if (item) {
item.isMounted = false;
var isRoot = item.parentID === 0;
if (isRoot) {
removeRoot(id);
}
}
unmountedIDs.push(id);
},
purgeUnmountedComponents: function purgeUnmountedComponents() {
if (ReactComponentTreeHook._preventPurging) {
return;
}
for (var i = 0; i < unmountedIDs.length; i++) {
var id = unmountedIDs[i];
purgeDeep(id);
}
unmountedIDs.length = 0;
},
isMounted: function isMounted(id) {
var item = getItem(id);
return item ? item.isMounted : false;
},
getCurrentStackAddendum: function getCurrentStackAddendum(topElement) {
var info = '';
if (topElement) {
var name = _getDisplayName(topElement);
var owner = topElement._owner;
info += describeComponentFrame(name, topElement._source, owner && owner.getName());
}
var currentOwner = ReactCurrentOwner.current;
var id = currentOwner && currentOwner._debugID;
info += ReactComponentTreeHook.getStackAddendumByID(id);
return info;
},
getStackAddendumByID: function getStackAddendumByID(id) {
var info = '';
while (id) {
info += describeID(id);
id = ReactComponentTreeHook.getParentID(id);
}
return info;
},
getChildIDs: function getChildIDs(id) {
var item = getItem(id);
return item ? item.childIDs : [];
},
getDisplayName: function getDisplayName(id) {
var element = ReactComponentTreeHook.getElement(id);
if (!element) {
return null;
}
return _getDisplayName(element);
},
getElement: function getElement(id) {
var item = getItem(id);
return item ? item.element : null;
},
getOwnerID: function getOwnerID(id) {
var element = ReactComponentTreeHook.getElement(id);
if (!element || !element._owner) {
return null;
}
return element._owner._debugID;
},
getParentID: function getParentID(id) {
var item = getItem(id);
return item ? item.parentID : null;
},
getSource: function getSource(id) {
var item = getItem(id);
var element = item ? item.element : null;
var source = element != null ? element._source : null;
return source;
},
getText: function getText(id) {
var element = ReactComponentTreeHook.getElement(id);
if (typeof element === 'string') {
return element;
} else if (typeof element === 'number') {
return '' + element;
} else {
return null;
}
},
getUpdateCount: function getUpdateCount(id) {
var item = getItem(id);
return item ? item.updateCount : 0;
},
getRootIDs: getRootIDs,
getRegisteredIDs: getItemIDs,
pushNonStandardWarningStack: function pushNonStandardWarningStack(isCreatingElement, currentSource) {
if (typeof console.reactStack !== 'function') {
return;
}
var stack = [];
var currentOwner = ReactCurrentOwner.current;
var id = currentOwner && currentOwner._debugID;
try {
if (isCreatingElement) {
stack.push({
name: id ? ReactComponentTreeHook.getDisplayName(id) : null,
fileName: currentSource ? currentSource.fileName : null,
lineNumber: currentSource ? currentSource.lineNumber : null
});
}
while (id) {
var element = ReactComponentTreeHook.getElement(id);
var parentID = ReactComponentTreeHook.getParentID(id);
var ownerID = ReactComponentTreeHook.getOwnerID(id);
var ownerName = ownerID ? ReactComponentTreeHook.getDisplayName(ownerID) : null;
var source = element && element._source;
stack.push({
name: ownerName,
fileName: source ? source.fileName : null,
lineNumber: source ? source.lineNumber : null
});
id = parentID;
}
} catch (err) {}
console.reactStack(stack);
},
popNonStandardWarningStack: function popNonStandardWarningStack() {
if (typeof console.reactStackEnd !== 'function') {
return;
}
console.reactStackEnd();
}
};
module.exports = ReactComponentTreeHook;
}, 56, null, "react/lib/ReactComponentTreeHook.js");
__d(/* react/lib/checkReactTypeSpec.js */function(global, require, module, exports) {
'use strict';
var _prodInvariant = require(38 ); // 38 = ./reactProdInvariant
var ReactPropTypeLocationNames = require(58 ); // 58 = ./ReactPropTypeLocationNames
var ReactPropTypesSecret = require(59 ); // 59 = ./ReactPropTypesSecret
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var warning = require(40 ); // 40 = fbjs/lib/warning
var ReactComponentTreeHook;
if (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'test') {
ReactComponentTreeHook = require(56 ); // 56 = ./ReactComponentTreeHook
}
var loggedTypeFailures = {};
function checkReactTypeSpec(typeSpecs, values, location, componentName, element, debugID) {
for (var typeSpecName in typeSpecs) {
if (typeSpecs.hasOwnProperty(typeSpecName)) {
var error;
try {
!(typeof typeSpecs[typeSpecName] === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName) : _prodInvariant('84', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName) : void 0;
error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
} catch (ex) {
error = ex;
}
process.env.NODE_ENV !== 'production' ? warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName, typeof error) : void 0;
if (error instanceof Error && !(error.message in loggedTypeFailures)) {
loggedTypeFailures[error.message] = true;
var componentStackInfo = '';
if (process.env.NODE_ENV !== 'production') {
if (!ReactComponentTreeHook) {
ReactComponentTreeHook = require(56 ); // 56 = ./ReactComponentTreeHook
}
if (debugID !== null) {
componentStackInfo = ReactComponentTreeHook.getStackAddendumByID(debugID);
} else if (element !== null) {
componentStackInfo = ReactComponentTreeHook.getCurrentStackAddendum(element);
}
}
process.env.NODE_ENV !== 'production' ? warning(false, 'Failed %s type: %s%s', location, error.message, componentStackInfo) : void 0;
}
}
}
}
module.exports = checkReactTypeSpec;
}, 57, null, "react/lib/checkReactTypeSpec.js");
__d(/* react/lib/ReactPropTypeLocationNames.js */function(global, require, module, exports) {
'use strict';
var ReactPropTypeLocationNames = {};
if (process.env.NODE_ENV !== 'production') {
ReactPropTypeLocationNames = {
prop: 'prop',
context: 'context',
childContext: 'child context'
};
}
module.exports = ReactPropTypeLocationNames;
}, 58, null, "react/lib/ReactPropTypeLocationNames.js");
__d(/* react/lib/ReactPropTypesSecret.js */function(global, require, module, exports) {
'use strict';
var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
module.exports = ReactPropTypesSecret;
}, 59, null, "react/lib/ReactPropTypesSecret.js");
__d(/* react/lib/ReactPropTypes.js */function(global, require, module, exports) {
'use strict';
var _require = require(48 ), // 48 = ./ReactElement
isValidElement = _require.isValidElement;
var factory = require(61 ); // 61 = prop-types/factory
module.exports = factory(isValidElement);
}, 60, null, "react/lib/ReactPropTypes.js");
__d(/* prop-types/factory.js */function(global, require, module, exports) {
'use strict';
var factory = require(62 ); // 62 = ./factoryWithTypeCheckers
module.exports = function (isValidElement) {
var throwOnDirectAccess = false;
return factory(isValidElement, throwOnDirectAccess);
};
}, 61, null, "prop-types/factory.js");
__d(/* prop-types/factoryWithTypeCheckers.js */function(global, require, module, exports) {
'use strict';
var emptyFunction = require(41 ); // 41 = fbjs/lib/emptyFunction
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var warning = require(40 ); // 40 = fbjs/lib/warning
var ReactPropTypesSecret = require(63 ); // 63 = ./lib/ReactPropTypesSecret
var checkPropTypes = require(64 ); // 64 = ./checkPropTypes
module.exports = function (isValidElement, throwOnDirectAccess) {
var ITERATOR_SYMBOL = typeof Symbol === 'function' && (typeof Symbol === 'function' ? Symbol.iterator : '@@iterator');
var FAUX_ITERATOR_SYMBOL = '@@iterator';
function getIteratorFn(maybeIterable) {
var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
if (typeof iteratorFn === 'function') {
return iteratorFn;
}
}
var ANONYMOUS = '<<anonymous>>';
var ReactPropTypes = {
array: createPrimitiveTypeChecker('array'),
bool: createPrimitiveTypeChecker('boolean'),
func: createPrimitiveTypeChecker('function'),
number: createPrimitiveTypeChecker('number'),
object: createPrimitiveTypeChecker('object'),
string: createPrimitiveTypeChecker('string'),
symbol: createPrimitiveTypeChecker('symbol'),
any: createAnyTypeChecker(),
arrayOf: createArrayOfTypeChecker,
element: createElementTypeChecker(),
instanceOf: createInstanceTypeChecker,
node: createNodeChecker(),
objectOf: createObjectOfTypeChecker,
oneOf: createEnumTypeChecker,
oneOfType: createUnionTypeChecker,
shape: createShapeTypeChecker
};
function is(x, y) {
if (x === y) {
return x !== 0 || 1 / x === 1 / y;
} else {
return x !== x && y !== y;
}
}
function PropTypeError(message) {
this.message = message;
this.stack = '';
}
PropTypeError.prototype = Error.prototype;
function createChainableTypeChecker(validate) {
if (process.env.NODE_ENV !== 'production') {
var manualPropTypeCallCache = {};
var manualPropTypeWarningCount = 0;
}
function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
componentName = componentName || ANONYMOUS;
propFullName = propFullName || propName;
if (secret !== ReactPropTypesSecret) {
if (throwOnDirectAccess) {
invariant(false, 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use `PropTypes.checkPropTypes()` to call them. ' + 'Read more at http://fb.me/use-check-prop-types');
} else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {
var cacheKey = componentName + ':' + propName;
if (!manualPropTypeCallCache[cacheKey] && manualPropTypeWarningCount < 3) {
warning(false, 'You are manually calling a React.PropTypes validation ' + 'function for the `%s` prop on `%s`. This is deprecated ' + 'and will throw in the standalone `prop-types` package. ' + 'You may be seeing this warning due to a third-party PropTypes ' + 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.', propFullName, componentName);
manualPropTypeCallCache[cacheKey] = true;
manualPropTypeWarningCount++;
}
}
}
if (props[propName] == null) {
if (isRequired) {
if (props[propName] === null) {
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
}
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
}
return null;
} else {
return validate(props, propName, componentName, location, propFullName);
}
}
var chainedCheckType = checkType.bind(null, false);
chainedCheckType.isRequired = checkType.bind(null, true);
return chainedCheckType;
}
function createPrimitiveTypeChecker(expectedType) {
function validate(props, propName, componentName, location, propFullName, secret) {
var propValue = props[propName];
var propType = getPropType(propValue);
if (propType !== expectedType) {
var preciseType = getPreciseType(propValue);
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
}
return null;
}
return createChainableTypeChecker(validate);
}
function createAnyTypeChecker() {
return createChainableTypeChecker(emptyFunction.thatReturnsNull);
}
function createArrayOfTypeChecker(typeChecker) {
function validate(props, propName, componentName, location, propFullName) {
if (typeof typeChecker !== 'function') {
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
}
var propValue = props[propName];
if (!Array.isArray(propValue)) {
var propType = getPropType(propValue);
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
}
for (var i = 0; i < propValue.length; i++) {
var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
if (error instanceof Error) {
return error;
}
}
return null;
}
return createChainableTypeChecker(validate);
}
function createElementTypeChecker() {
function validate(props, propName, componentName, location, propFullName) {
var propValue = props[propName];
if (!isValidElement(propValue)) {
var propType = getPropType(propValue);
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
}
return null;
}
return createChainableTypeChecker(validate);
}
function createInstanceTypeChecker(expectedClass) {
function validate(props, propName, componentName, location, propFullName) {
if (!(props[propName] instanceof expectedClass)) {
var expectedClassName = expectedClass.name || ANONYMOUS;
var actualClassName = getClassName(props[propName]);
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
}
return null;
}
return createChainableTypeChecker(validate);
}
function createEnumTypeChecker(expectedValues) {
if (!Array.isArray(expectedValues)) {
process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0;
return emptyFunction.thatReturnsNull;
}
function validate(props, propName, componentName, location, propFullName) {
var propValue = props[propName];
for (var i = 0; i < expectedValues.length; i++) {
if (is(propValue, expectedValues[i])) {
return null;
}
}
var valuesString = JSON.stringify(expectedValues);
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
}
return createChainableTypeChecker(validate);
}
function createObjectOfTypeChecker(typeChecker) {
function validate(props, propName, componentName, location, propFullName) {
if (typeof typeChecker !== 'function') {
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
}
var propValue = props[propName];
var propType = getPropType(propValue);
if (propType !== 'object') {
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
}
for (var key in propValue) {
if (propValue.hasOwnProperty(key)) {
var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
if (error instanceof Error) {
return error;
}
}
}
return null;
}
return createChainableTypeChecker(validate);
}
function createUnionTypeChecker(arrayOfTypeCheckers) {
if (!Array.isArray(arrayOfTypeCheckers)) {
process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
return emptyFunction.thatReturnsNull;
}
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
var checker = arrayOfTypeCheckers[i];
if (typeof checker !== 'function') {
warning(false, 'Invalid argument supplid to oneOfType. Expected an array of check functions, but ' + 'received %s at index %s.', getPostfixForTypeWarning(checker), i);
return emptyFunction.thatReturnsNull;
}
}
function validate(props, propName, componentName, location, propFullName) {
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
var checker = arrayOfTypeCheckers[i];
if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {
return null;
}
}
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
}
return createChainableTypeChecker(validate);
}
function createNodeChecker() {
function validate(props, propName, componentName, location, propFullName) {
if (!isNode(props[propName])) {
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
}
return null;
}
return createChainableTypeChecker(validate);
}
function createShapeTypeChecker(shapeTypes) {
function validate(props, propName, componentName, location, propFullName) {
var propValue = props[propName];
var propType = getPropType(propValue);
if (propType !== 'object') {
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
}
for (var key in shapeTypes) {
var checker = shapeTypes[key];
if (!checker) {
continue;
}
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
if (error) {
return error;
}
}
return null;
}
return createChainableTypeChecker(validate);
}
function isNode(propValue) {
switch (typeof propValue) {
case 'number':
case 'string':
case 'undefined':
return true;
case 'boolean':
return !propValue;
case 'object':
if (Array.isArray(propValue)) {
return propValue.every(isNode);
}
if (propValue === null || isValidElement(propValue)) {
return true;
}
var iteratorFn = getIteratorFn(propValue);
if (iteratorFn) {
var iterator = iteratorFn.call(propValue);
var step;
if (iteratorFn !== propValue.entries) {
while (!(step = iterator.next()).done) {
if (!isNode(step.value)) {
return false;
}
}
} else {
while (!(step = iterator.next()).done) {
var entry = step.value;
if (entry) {
if (!isNode(entry[1])) {
return false;
}
}
}
}
} else {
return false;
}
return true;
default:
return false;
}
}
function isSymbol(propType, propValue) {
if (propType === 'symbol') {
return true;
}
if (propValue['@@toStringTag'] === 'Symbol') {
return true;
}
if (typeof Symbol === 'function' && propValue instanceof Symbol) {
return true;
}
return false;
}
function getPropType(propValue) {
var propType = typeof propValue;
if (Array.isArray(propValue)) {
return 'array';
}
if (propValue instanceof RegExp) {
return 'object';
}
if (isSymbol(propType, propValue)) {
return 'symbol';
}
return propType;
}
function getPreciseType(propValue) {
if (typeof propValue === 'undefined' || propValue === null) {
return '' + propValue;
}
var propType = getPropType(propValue);
if (propType === 'object') {
if (propValue instanceof Date) {
return 'date';
} else if (propValue instanceof RegExp) {
return 'regexp';
}
}
return propType;
}
function getPostfixForTypeWarning(value) {
var type = getPreciseType(value);
switch (type) {
case 'array':
case 'object':
return 'an ' + type;
case 'boolean':
case 'date':
case 'regexp':
return 'a ' + type;
default:
return type;
}
}
function getClassName(propValue) {
if (!propValue.constructor || !propValue.constructor.name) {
return ANONYMOUS;
}
return propValue.constructor.name;
}
ReactPropTypes.checkPropTypes = checkPropTypes;
ReactPropTypes.PropTypes = ReactPropTypes;
return ReactPropTypes;
};
}, 62, null, "prop-types/factoryWithTypeCheckers.js");
__d(/* prop-types/lib/ReactPropTypesSecret.js */function(global, require, module, exports) {
'use strict';
var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
module.exports = ReactPropTypesSecret;
}, 63, null, "prop-types/lib/ReactPropTypesSecret.js");
__d(/* prop-types/checkPropTypes.js */function(global, require, module, exports) {
'use strict';
if (process.env.NODE_ENV !== 'production') {
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var warning = require(40 ); // 40 = fbjs/lib/warning
var ReactPropTypesSecret = require(63 ); // 63 = ./lib/ReactPropTypesSecret
var loggedTypeFailures = {};
}
function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
if (process.env.NODE_ENV !== 'production') {
for (var typeSpecName in typeSpecs) {
if (typeSpecs.hasOwnProperty(typeSpecName)) {
var error;
try {
invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', componentName || 'React class', location, typeSpecName);
error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
} catch (ex) {
error = ex;
}
warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error);
if (error instanceof Error && !(error.message in loggedTypeFailures)) {
loggedTypeFailures[error.message] = true;
var stack = getStack ? getStack() : '';
warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : '');
}
}
}
}
}
module.exports = checkPropTypes;
}, 64, null, "prop-types/checkPropTypes.js");
__d(/* react/lib/ReactVersion.js */function(global, require, module, exports) {
'use strict';
module.exports = '15.6.1';
}, 65, null, "react/lib/ReactVersion.js");
__d(/* react/lib/createClass.js */function(global, require, module, exports) {
'use strict';
var _require = require(37 ), // 37 = ./ReactBaseClasses
Component = _require.Component;
var _require2 = require(48 ), // 48 = ./ReactElement
isValidElement = _require2.isValidElement;
var ReactNoopUpdateQueue = require(39 ); // 39 = ./ReactNoopUpdateQueue
var factory = require(67 ); // 67 = create-react-class/factory
module.exports = factory(Component, isValidElement, ReactNoopUpdateQueue);
}, 66, null, "react/lib/createClass.js");
__d(/* create-react-class/factory.js */function(global, require, module, exports) {
'use strict';
var _assign = require(36 ); // 36 = object-assign
var emptyObject = require(43 ); // 43 = fbjs/lib/emptyObject
var _invariant = require(44 ); // 44 = fbjs/lib/invariant
if (process.env.NODE_ENV !== 'production') {
var warning = require(40 ); // 40 = fbjs/lib/warning
}
var MIXINS_KEY = 'mixins';
function identity(fn) {
return fn;
}
var ReactPropTypeLocationNames;
if (process.env.NODE_ENV !== 'production') {
ReactPropTypeLocationNames = {
prop: 'prop',
context: 'context',
childContext: 'child context'
};
} else {
ReactPropTypeLocationNames = {};
}
function factory(ReactComponent, isValidElement, ReactNoopUpdateQueue) {
var injectedMixins = [];
var ReactClassInterface = {
mixins: 'DEFINE_MANY',
statics: 'DEFINE_MANY',
propTypes: 'DEFINE_MANY',
contextTypes: 'DEFINE_MANY',
childContextTypes: 'DEFINE_MANY',
getDefaultProps: 'DEFINE_MANY_MERGED',
getInitialState: 'DEFINE_MANY_MERGED',
getChildContext: 'DEFINE_MANY_MERGED',
render: 'DEFINE_ONCE',
componentWillMount: 'DEFINE_MANY',
componentDidMount: 'DEFINE_MANY',
componentWillReceiveProps: 'DEFINE_MANY',
shouldComponentUpdate: 'DEFINE_ONCE',
componentWillUpdate: 'DEFINE_MANY',
componentDidUpdate: 'DEFINE_MANY',
componentWillUnmount: 'DEFINE_MANY',
updateComponent: 'OVERRIDE_BASE'
};
var RESERVED_SPEC_KEYS = {
displayName: function displayName(Constructor, _displayName) {
Constructor.displayName = _displayName;
},
mixins: function mixins(Constructor, _mixins) {
if (_mixins) {
for (var i = 0; i < _mixins.length; i++) {
mixSpecIntoComponent(Constructor, _mixins[i]);
}
}
},
childContextTypes: function childContextTypes(Constructor, _childContextTypes) {
if (process.env.NODE_ENV !== 'production') {
validateTypeDef(Constructor, _childContextTypes, 'childContext');
}
Constructor.childContextTypes = _assign({}, Constructor.childContextTypes, _childContextTypes);
},
contextTypes: function contextTypes(Constructor, _contextTypes) {
if (process.env.NODE_ENV !== 'production') {
validateTypeDef(Constructor, _contextTypes, 'context');
}
Constructor.contextTypes = _assign({}, Constructor.contextTypes, _contextTypes);
},
getDefaultProps: function getDefaultProps(Constructor, _getDefaultProps) {
if (Constructor.getDefaultProps) {
Constructor.getDefaultProps = createMergedResultFunction(Constructor.getDefaultProps, _getDefaultProps);
} else {
Constructor.getDefaultProps = _getDefaultProps;
}
},
propTypes: function propTypes(Constructor, _propTypes) {
if (process.env.NODE_ENV !== 'production') {
validateTypeDef(Constructor, _propTypes, 'prop');
}
Constructor.propTypes = _assign({}, Constructor.propTypes, _propTypes);
},
statics: function statics(Constructor, _statics) {
mixStaticSpecIntoComponent(Constructor, _statics);
},
autobind: function autobind() {}
};
function validateTypeDef(Constructor, typeDef, location) {
for (var propName in typeDef) {
if (typeDef.hasOwnProperty(propName)) {
if (process.env.NODE_ENV !== 'production') {
warning(typeof typeDef[propName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', Constructor.displayName || 'ReactClass', ReactPropTypeLocationNames[location], propName);
}
}
}
}
function validateMethodOverride(isAlreadyDefined, name) {
var specPolicy = ReactClassInterface.hasOwnProperty(name) ? ReactClassInterface[name] : null;
if (ReactClassMixin.hasOwnProperty(name)) {
_invariant(specPolicy === 'OVERRIDE_BASE', 'ReactClassInterface: You are attempting to override ' + '`%s` from your class specification. Ensure that your method names ' + 'do not overlap with React methods.', name);
}
if (isAlreadyDefined) {
_invariant(specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED', 'ReactClassInterface: You are attempting to define ' + '`%s` on your component more than once. This conflict may be due ' + 'to a mixin.', name);
}
}
function mixSpecIntoComponent(Constructor, spec) {
if (!spec) {
if (process.env.NODE_ENV !== 'production') {
var typeofSpec = typeof spec;
var isMixinValid = typeofSpec === 'object' && spec !== null;
if (process.env.NODE_ENV !== 'production') {
warning(isMixinValid, "%s: You're attempting to include a mixin that is either null " + 'or not an object. Check the mixins included by the component, ' + 'as well as any mixins they include themselves. ' + 'Expected object but got %s.', Constructor.displayName || 'ReactClass', spec === null ? null : typeofSpec);
}
}
return;
}
_invariant(typeof spec !== 'function', "ReactClass: You're attempting to " + 'use a component class or function as a mixin. Instead, just use a ' + 'regular object.');
_invariant(!isValidElement(spec), "ReactClass: You're attempting to " + 'use a component as a mixin. Instead, just use a regular object.');
var proto = Constructor.prototype;
var autoBindPairs = proto.__reactAutoBindPairs;
if (spec.hasOwnProperty(MIXINS_KEY)) {
RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins);
}
for (var name in spec) {
if (!spec.hasOwnProperty(name)) {
continue;
}
if (name === MIXINS_KEY) {
continue;
}
var property = spec[name];
var isAlreadyDefined = proto.hasOwnProperty(name);
validateMethodOverride(isAlreadyDefined, name);
if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) {
RESERVED_SPEC_KEYS[name](Constructor, property);
} else {
var isReactClassMethod = ReactClassInterface.hasOwnProperty(name);
var isFunction = typeof property === 'function';
var shouldAutoBind = isFunction && !isReactClassMethod && !isAlreadyDefined && spec.autobind !== false;
if (shouldAutoBind) {
autoBindPairs.push(name, property);
proto[name] = property;
} else {
if (isAlreadyDefined) {
var specPolicy = ReactClassInterface[name];
_invariant(isReactClassMethod && (specPolicy === 'DEFINE_MANY_MERGED' || specPolicy === 'DEFINE_MANY'), 'ReactClass: Unexpected spec policy %s for key %s ' + 'when mixing in component specs.', specPolicy, name);
if (specPolicy === 'DEFINE_MANY_MERGED') {
proto[name] = createMergedResultFunction(proto[name], property);
} else if (specPolicy === 'DEFINE_MANY') {
proto[name] = createChainedFunction(proto[name], property);
}
} else {
proto[name] = property;
if (process.env.NODE_ENV !== 'production') {
if (typeof property === 'function' && spec.displayName) {
proto[name].displayName = spec.displayName + '_' + name;
}
}
}
}
}
}
}
function mixStaticSpecIntoComponent(Constructor, statics) {
if (!statics) {
return;
}
for (var name in statics) {
var property = statics[name];
if (!statics.hasOwnProperty(name)) {
continue;
}
var isReserved = name in RESERVED_SPEC_KEYS;
_invariant(!isReserved, 'ReactClass: You are attempting to define a reserved ' + 'property, `%s`, that shouldn\'t be on the "statics" key. Define it ' + 'as an instance property instead; it will still be accessible on the ' + 'constructor.', name);
var isInherited = name in Constructor;
_invariant(!isInherited, 'ReactClass: You are attempting to define ' + '`%s` on your component more than once. This conflict may be ' + 'due to a mixin.', name);
Constructor[name] = property;
}
}
function mergeIntoWithNoDuplicateKeys(one, two) {
_invariant(one && two && typeof one === 'object' && typeof two === 'object', 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.');
for (var key in two) {
if (two.hasOwnProperty(key)) {
_invariant(one[key] === undefined, 'mergeIntoWithNoDuplicateKeys(): ' + 'Tried to merge two objects with the same key: `%s`. This conflict ' + 'may be due to a mixin; in particular, this may be caused by two ' + 'getInitialState() or getDefaultProps() methods returning objects ' + 'with clashing keys.', key);
one[key] = two[key];
}
}
return one;
}
function createMergedResultFunction(one, two) {
return function mergedResult() {
var a = one.apply(this, arguments);
var b = two.apply(this, arguments);
if (a == null) {
return b;
} else if (b == null) {
return a;
}
var c = {};
mergeIntoWithNoDuplicateKeys(c, a);
mergeIntoWithNoDuplicateKeys(c, b);
return c;
};
}
function createChainedFunction(one, two) {
return function chainedFunction() {
one.apply(this, arguments);
two.apply(this, arguments);
};
}
function bindAutoBindMethod(component, method) {
var boundMethod = method.bind(component);
if (process.env.NODE_ENV !== 'production') {
boundMethod.__reactBoundContext = component;
boundMethod.__reactBoundMethod = method;
boundMethod.__reactBoundArguments = null;
var componentName = component.constructor.displayName;
var _bind = boundMethod.bind;
boundMethod.bind = function (newThis) {
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
args[_key - 1] = arguments[_key];
}
if (newThis !== component && newThis !== null) {
if (process.env.NODE_ENV !== 'production') {
warning(false, 'bind(): React component methods may only be bound to the ' + 'component instance. See %s', componentName);
}
} else if (!args.length) {
if (process.env.NODE_ENV !== 'production') {
warning(false, 'bind(): You are binding a component method to the component. ' + 'React does this for you automatically in a high-performance ' + 'way, so you can safely remove this call. See %s', componentName);
}
return boundMethod;
}
var reboundMethod = _bind.apply(boundMethod, arguments);
reboundMethod.__reactBoundContext = component;
reboundMethod.__reactBoundMethod = method;
reboundMethod.__reactBoundArguments = args;
return reboundMethod;
};
}
return boundMethod;
}
function bindAutoBindMethods(component) {
var pairs = component.__reactAutoBindPairs;
for (var i = 0; i < pairs.length; i += 2) {
var autoBindKey = pairs[i];
var method = pairs[i + 1];
component[autoBindKey] = bindAutoBindMethod(component, method);
}
}
var IsMountedPreMixin = {
componentDidMount: function componentDidMount() {
this.__isMounted = true;
}
};
var IsMountedPostMixin = {
componentWillUnmount: function componentWillUnmount() {
this.__isMounted = false;
}
};
var ReactClassMixin = {
replaceState: function replaceState(newState, callback) {
this.updater.enqueueReplaceState(this, newState, callback);
},
isMounted: function isMounted() {
if (process.env.NODE_ENV !== 'production') {
warning(this.__didWarnIsMounted, '%s: isMounted is deprecated. Instead, make sure to clean up ' + 'subscriptions and pending requests in componentWillUnmount to ' + 'prevent memory leaks.', this.constructor && this.constructor.displayName || this.name || 'Component');
this.__didWarnIsMounted = true;
}
return !!this.__isMounted;
}
};
var ReactClassComponent = function ReactClassComponent() {};
_assign(ReactClassComponent.prototype, ReactComponent.prototype, ReactClassMixin);
function createClass(spec) {
var Constructor = identity(function (props, context, updater) {
if (process.env.NODE_ENV !== 'production') {
warning(this instanceof Constructor, 'Something is calling a React component directly. Use a factory or ' + 'JSX instead. See: https://fb.me/react-legacyfactory');
}
if (this.__reactAutoBindPairs.length) {
bindAutoBindMethods(this);
}
this.props = props;
this.context = context;
this.refs = emptyObject;
this.updater = updater || ReactNoopUpdateQueue;
this.state = null;
var initialState = this.getInitialState ? this.getInitialState() : null;
if (process.env.NODE_ENV !== 'production') {
if (initialState === undefined && this.getInitialState._isMockFunction) {
initialState = null;
}
}
_invariant(typeof initialState === 'object' && !Array.isArray(initialState), '%s.getInitialState(): must return an object or null', Constructor.displayName || 'ReactCompositeComponent');
this.state = initialState;
});
Constructor.prototype = new ReactClassComponent();
Constructor.prototype.constructor = Constructor;
Constructor.prototype.__reactAutoBindPairs = [];
injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor));
mixSpecIntoComponent(Constructor, IsMountedPreMixin);
mixSpecIntoComponent(Constructor, spec);
mixSpecIntoComponent(Constructor, IsMountedPostMixin);
if (Constructor.getDefaultProps) {
Constructor.defaultProps = Constructor.getDefaultProps();
}
if (process.env.NODE_ENV !== 'production') {
if (Constructor.getDefaultProps) {
Constructor.getDefaultProps.isReactClassApproved = {};
}
if (Constructor.prototype.getInitialState) {
Constructor.prototype.getInitialState.isReactClassApproved = {};
}
}
_invariant(Constructor.prototype.render, 'createClass(...): Class specification must implement a `render` method.');
if (process.env.NODE_ENV !== 'production') {
warning(!Constructor.prototype.componentShouldUpdate, '%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', spec.displayName || 'A component');
warning(!Constructor.prototype.componentWillRecieveProps, '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', spec.displayName || 'A component');
}
for (var methodName in ReactClassInterface) {
if (!Constructor.prototype[methodName]) {
Constructor.prototype[methodName] = null;
}
}
return Constructor;
}
return createClass;
}
module.exports = factory;
}, 67, null, "create-react-class/factory.js");
__d(/* react/lib/onlyChild.js */function(global, require, module, exports) {
'use strict';
var _prodInvariant = require(38 ); // 38 = ./reactProdInvariant
var ReactElement = require(48 ); // 48 = ./ReactElement
var invariant = require(44 ); // 44 = fbjs/lib/invariant
function onlyChild(children) {
!ReactElement.isValidElement(children) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'React.Children.only expected to receive a single React element child.') : _prodInvariant('143') : void 0;
return children;
}
module.exports = onlyChild;
}, 68, null, "react/lib/onlyChild.js");
__d(/* react-native/Libraries/react-native/react-native.js */function(global, require, module, exports) {
'use strict';
var warning = require(40 ); // 40 = fbjs/lib/warning
if (__DEV__) {
var warningDedupe = {};
var addonWarn = function addonWarn(prevName, newPackageName) {
warning(warningDedupe[prevName], 'React.addons.' + prevName + ' is deprecated. Please import the "' + newPackageName + '" package instead.');
warningDedupe[prevName] = true;
};
}
var ReactNative = {
get ActivityIndicator() {
return require(70 ); // 70 = ActivityIndicator
},
get ART() {
return require(203 ); // 203 = ReactNativeART
},
get Button() {
return require(209 ); // 209 = Button
},
get DatePickerIOS() {
return require(297 ); // 297 = DatePickerIOS
},
get DrawerLayoutAndroid() {
return require(298 ); // 298 = DrawerLayoutAndroid
},
get Image() {
return require(237 ); // 237 = Image
},
get ImageEditor() {
return require(299 ); // 299 = ImageEditor
},
get ImageStore() {
return require(300 ); // 300 = ImageStore
},
get KeyboardAvoidingView() {
return require(301 ); // 301 = KeyboardAvoidingView
},
get ListView() {
return require(303 ); // 303 = ListView
},
get MapView() {
return require(308 ); // 308 = MapView
},
get Modal() {
return require(309 ); // 309 = Modal
},
get Navigator() {
return require(332 ); // 332 = Navigator
},
get NavigatorIOS() {
return require(350 ); // 350 = NavigatorIOS
},
get Picker() {
return require(352 ); // 352 = Picker
},
get PickerIOS() {
return require(353 ); // 353 = PickerIOS
},
get ProgressBarAndroid() {
return require(355 ); // 355 = ProgressBarAndroid
},
get ProgressViewIOS() {
return require(356 ); // 356 = ProgressViewIOS
},
get ScrollView() {
return require(239 ); // 239 = ScrollView
},
get SegmentedControlIOS() {
return require(357 ); // 357 = SegmentedControlIOS
},
get Slider() {
return require(358 ); // 358 = Slider
},
get SnapshotViewIOS() {
return require(359 ); // 359 = SnapshotViewIOS
},
get Switch() {
return require(360 ); // 360 = Switch
},
get RefreshControl() {
return require(361 ); // 361 = RefreshControl
},
get StatusBar() {
return require(362 ); // 362 = StatusBar
},
get SwipeableListView() {
return require(363 ); // 363 = SwipeableListView
},
get TabBarIOS() {
return require(366 ); // 366 = TabBarIOS
},
get Text() {
return require(210 ); // 210 = Text
},
get TextInput() {
return require(368 ); // 368 = TextInput
},
get ToastAndroid() {
return require(375 ); // 375 = ToastAndroid
},
get ToolbarAndroid() {
return require(376 ); // 376 = ToolbarAndroid
},
get Touchable() {
return require(211 ); // 211 = Touchable
},
get TouchableHighlight() {
return require(321 ); // 321 = TouchableHighlight
},
get TouchableNativeFeedback() {
return require(217 ); // 217 = TouchableNativeFeedback
},
get TouchableOpacity() {
return require(218 ); // 218 = TouchableOpacity
},
get TouchableWithoutFeedback() {
return require(295 ); // 295 = TouchableWithoutFeedback
},
get View() {
return require(146 ); // 146 = View
},
get ViewPagerAndroid() {
return require(377 ); // 377 = ViewPagerAndroid
},
get WebView() {
return require(378 ); // 378 = WebView
},
get ActionSheetIOS() {
return require(379 ); // 379 = ActionSheetIOS
},
get AdSupportIOS() {
return require(380 ); // 380 = AdSupportIOS
},
get Alert() {
return require(250 ); // 250 = Alert
},
get AlertIOS() {
return require(251 ); // 251 = AlertIOS
},
get Animated() {
return require(219 ); // 219 = Animated
},
get AppRegistry() {
return require(381 ); // 381 = AppRegistry
},
get AppState() {
return require(111 ); // 111 = AppState
},
get AsyncStorage() {
return require(389 ); // 389 = AsyncStorage
},
get BackAndroid() {
return require(386 ); // 386 = BackAndroid
},
get CameraRoll() {
return require(390 ); // 390 = CameraRoll
},
get Clipboard() {
return require(391 ); // 391 = Clipboard
},
get DatePickerAndroid() {
return require(392 ); // 392 = DatePickerAndroid
},
get Dimensions() {
return require(129 ); // 129 = Dimensions
},
get Easing() {
return require(235 ); // 235 = Easing
},
get I18nManager() {
return require(331 ); // 331 = I18nManager
},
get ImagePickerIOS() {
return require(393 ); // 393 = ImagePickerIOS
},
get InteractionManager() {
return require(221 ); // 221 = InteractionManager
},
get Keyboard() {
return require(109 ); // 109 = Keyboard
},
get LayoutAnimation() {
return require(302 ); // 302 = LayoutAnimation
},
get Linking() {
return require(394 ); // 394 = Linking
},
get NativeEventEmitter() {
return require(102 ); // 102 = NativeEventEmitter
},
get NavigationExperimental() {
return require(395 ); // 395 = NavigationExperimental
},
get NetInfo() {
return require(416 ); // 416 = NetInfo
},
get PanResponder() {
return require(346 ); // 346 = PanResponder
},
get PermissionsAndroid() {
return require(417 ); // 417 = PermissionsAndroid
},
get PixelRatio() {
return require(128 ); // 128 = PixelRatio
},
get PushNotificationIOS() {
return require(418 ); // 418 = PushNotificationIOS
},
get Settings() {
return require(419 ); // 419 = Settings
},
get Share() {
return require(420 ); // 420 = Share
},
get StatusBarIOS() {
return require(108 ); // 108 = StatusBarIOS
},
get StyleSheet() {
return require(127 ); // 127 = StyleSheet
},
get Systrace() {
return require(85 ); // 85 = Systrace
},
get TimePickerAndroid() {
return require(421 ); // 421 = TimePickerAndroid
},
get UIManager() {
return require(123 ); // 123 = UIManager
},
get Vibration() {
return require(422 ); // 422 = Vibration
},
get VibrationIOS() {
return require(423 ); // 423 = VibrationIOS
},
get DeviceEventEmitter() {
return require(107 ); // 107 = RCTDeviceEventEmitter
},
get NativeAppEventEmitter() {
return require(272 ); // 272 = RCTNativeAppEventEmitter
},
get NativeModules() {
return require(80 ); // 80 = NativeModules
},
get Platform() {
return require(79 ); // 79 = Platform
},
get processColor() {
return require(121 ); // 121 = processColor
},
get requireNativeComponent() {
return require(155 ); // 155 = requireNativeComponent
},
get ColorPropType() {
return require(71 ); // 71 = ColorPropType
},
get EdgeInsetsPropType() {
return require(147 ); // 147 = EdgeInsetsPropType
},
get PointPropType() {
return require(240 ); // 240 = PointPropType
},
addons: {
get LinkedStateMixin() {
if (__DEV__) {
addonWarn('LinkedStateMixin', 'react-addons-linked-state-mixin');
}
return require(424 ); // 424 = react/lib/LinkedStateMixin
},
get PureRenderMixin() {
if (__DEV__) {
addonWarn('PureRenderMixin', 'react-addons-pure-render-mixin');
}
return require(413 ); // 413 = react/lib/ReactComponentWithPureRenderMixin
},
get TestModule() {
if (__DEV__) {
warning(warningDedupe.TestModule, 'React.addons.TestModule is deprecated. ' + 'Use ReactNative.NativeModules.TestModule instead.');
warningDedupe.TestModule = true;
}
return require(80 ).TestModule; // 80 = NativeModules
},
get batchedUpdates() {
if (__DEV__) {
warning(warningDedupe.batchedUpdates, 'React.addons.batchedUpdates is deprecated. ' + 'Use ReactNative.unstable_batchedUpdates instead.');
warningDedupe.batchedUpdates = true;
}
return require(169 ).batchedUpdates; // 169 = ReactUpdates
},
get createFragment() {
if (__DEV__) {
addonWarn('createFragment', 'react-addons-create-fragment');
}
return require(427 ).create; // 427 = react/lib/ReactFragment
},
get update() {
if (__DEV__) {
addonWarn('update', 'react-addons-update');
}
return require(428 ); // 428 = react/lib/update
}
}
};
if (__DEV__) {
(function () {
var throwOnWrongReactAPI = require(429 ); // 429 = throwOnWrongReactAPI
var reactAPIs = ['createClass', 'Component'];
var _loop = function _loop(key) {
Object.defineProperty(ReactNative, key, {
get: function get() {
throwOnWrongReactAPI(key);
},
enumerable: false,
configurable: false
});
};
for (var _iterator = reactAPIs, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[typeof Symbol === 'function' ? Symbol.iterator : '@@iterator']();;) {
var _ref;
if (_isArray) {
if (_i >= _iterator.length) break;
_ref = _iterator[_i++];
} else {
_i = _iterator.next();
if (_i.done) break;
_ref = _i.value;
}
var key = _ref;
_loop(key);
}
})();
}
var ReactNativeInternal = require(241 ); // 241 = ReactNative
function applyForwarding(key) {
if (__DEV__) {
Object.defineProperty(ReactNative, key, Object.getOwnPropertyDescriptor(ReactNativeInternal, key));
return;
}
ReactNative[key] = ReactNativeInternal[key];
}
for (var key in ReactNativeInternal) {
applyForwarding(key);
}
module.exports = ReactNative;
}, 69, null, "react-native/Libraries/react-native/react-native.js");
__d(/* ActivityIndicator */function(global, require, module, exports) {
'use strict';
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/node_modules/react-native/Libraries/Components/ActivityIndicator/ActivityIndicator.js';
var ColorPropType = require(71 ); // 71 = ColorPropType
var NativeMethodsMixin = require(73 ); // 73 = NativeMethodsMixin
var Platform = require(79 ); // 79 = Platform
var React = require(126 ); // 126 = React
var StyleSheet = require(127 ); // 127 = StyleSheet
var View = require(146 ); // 146 = View
var requireNativeComponent = require(155 ); // 155 = requireNativeComponent
var PropTypes = React.PropTypes;
var GRAY = '#999999';
var ActivityIndicator = React.createClass({
displayName: 'ActivityIndicator',
mixins: [NativeMethodsMixin],
propTypes: babelHelpers.extends({}, View.propTypes, {
animating: PropTypes.bool,
color: ColorPropType,
size: PropTypes.oneOfType([PropTypes.oneOf(['small', 'large']), PropTypes.number]),
hidesWhenStopped: PropTypes.bool
}),
getDefaultProps: function getDefaultProps() {
return {
animating: true,
color: Platform.OS === 'ios' ? GRAY : undefined,
hidesWhenStopped: true,
size: 'small'
};
},
render: function render() {
var _props = this.props,
onLayout = _props.onLayout,
style = _props.style,
props = babelHelpers.objectWithoutProperties(_props, ['onLayout', 'style']);
var sizeStyle = void 0;
switch (props.size) {
case 'small':
sizeStyle = styles.sizeSmall;
break;
case 'large':
sizeStyle = styles.sizeLarge;
break;
default:
sizeStyle = { height: props.size, width: props.size };
break;
}
return React.createElement(
View,
{
onLayout: onLayout,
style: [styles.container, style], __source: {
fileName: _jsxFileName,
lineNumber: 94
}
},
React.createElement(RCTActivityIndicator, babelHelpers.extends({}, props, {
style: sizeStyle,
styleAttr: 'Normal',
indeterminate: true,
__source: {
fileName: _jsxFileName,
lineNumber: 97
}
}))
);
}
});
var styles = StyleSheet.create({
container: {
alignItems: 'center',
justifyContent: 'center'
},
sizeSmall: {
width: 20,
height: 20
},
sizeLarge: {
width: 36,
height: 36
}
});
if (Platform.OS === 'ios') {
var RCTActivityIndicator = requireNativeComponent('RCTActivityIndicatorView', ActivityIndicator, { nativeOnly: { activityIndicatorViewStyle: true } });
} else if (Platform.OS === 'android') {
var RCTActivityIndicator = requireNativeComponent('AndroidProgressBar', ActivityIndicator, { nativeOnly: {
indeterminate: true,
progress: true,
styleAttr: true
} });
}
module.exports = ActivityIndicator;
}, 70, null, "ActivityIndicator");
__d(/* ColorPropType */function(global, require, module, exports) {
'use strict';
var ReactPropTypeLocationNames = require(58 ); // 58 = react/lib/ReactPropTypeLocationNames
var normalizeColor = require(72 ); // 72 = normalizeColor
var colorPropType = function colorPropType(isRequired, props, propName, componentName, location, propFullName) {
var color = props[propName];
if (color === undefined || color === null) {
if (isRequired) {
var locationName = ReactPropTypeLocationNames[location];
return new Error('Required ' + locationName + ' `' + (propFullName || propName) + '` was not specified in `' + componentName + '`.');
}
return;
}
if (typeof color === 'number') {
return;
}
if (normalizeColor(color) === null) {
var locationName = ReactPropTypeLocationNames[location];
return new Error('Invalid ' + locationName + ' `' + (propFullName || propName) + '` supplied to `' + componentName + '`: ' + color + '\n' + 'Valid color formats are\n - \'#f0f\' (#rgb)\n - \'#f0fc\' (#rgba)\n - \'#ff00ff\' (#rrggbb)\n - \'#ff00ff00\' (#rrggbbaa)\n - \'rgb(255, 255, 255)\'\n - \'rgba(255, 255, 255, 1.0)\'\n - \'hsl(360, 100%, 100%)\'\n - \'hsla(360, 100%, 100%, 1.0)\'\n - \'transparent\'\n - \'red\'\n - 0xff00ff00 (0xrrggbbaa)\n');
}
};
var ColorPropType = colorPropType.bind(null, false);
ColorPropType.isRequired = colorPropType.bind(null, true);
module.exports = ColorPropType;
}, 71, null, "ColorPropType");
__d(/* normalizeColor */function(global, require, module, exports) {
'use strict';
function normalizeColor(color) {
var match;
if (typeof color === 'number') {
if (color >>> 0 === color && color >= 0 && color <= 0xffffffff) {
return color;
}
return null;
}
if (match = matchers.hex6.exec(color)) {
return parseInt(match[1] + 'ff', 16) >>> 0;
}
if (names.hasOwnProperty(color)) {
return names[color];
}
if (match = matchers.rgb.exec(color)) {
return (parse255(match[1]) << 24 | parse255(match[2]) << 16 | parse255(match[3]) << 8 | 0x000000ff) >>> 0;
}
if (match = matchers.rgba.exec(color)) {
return (parse255(match[1]) << 24 | parse255(match[2]) << 16 | parse255(match[3]) << 8 | parse1(match[4])) >>> 0;
}
if (match = matchers.hex3.exec(color)) {
return parseInt(match[1] + match[1] + match[2] + match[2] + match[3] + match[3] + 'ff', 16) >>> 0;
}
if (match = matchers.hex8.exec(color)) {
return parseInt(match[1], 16) >>> 0;
}
if (match = matchers.hex4.exec(color)) {
return parseInt(match[1] + match[1] + match[2] + match[2] + match[3] + match[3] + match[4] + match[4], 16) >>> 0;
}
if (match = matchers.hsl.exec(color)) {
return (hslToRgb(parse360(match[1]), parsePercentage(match[2]), parsePercentage(match[3])) | 0x000000ff) >>> 0;
}
if (match = matchers.hsla.exec(color)) {
return (hslToRgb(parse360(match[1]), parsePercentage(match[2]), parsePercentage(match[3])) | parse1(match[4])) >>> 0;
}
return null;
}
function hue2rgb(p, q, t) {
if (t < 0) {
t += 1;
}
if (t > 1) {
t -= 1;
}
if (t < 1 / 6) {
return p + (q - p) * 6 * t;
}
if (t < 1 / 2) {
return q;
}
if (t < 2 / 3) {
return p + (q - p) * (2 / 3 - t) * 6;
}
return p;
}
function hslToRgb(h, s, l) {
var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
var p = 2 * l - q;
var r = hue2rgb(p, q, h + 1 / 3);
var g = hue2rgb(p, q, h);
var b = hue2rgb(p, q, h - 1 / 3);
return Math.round(r * 255) << 24 | Math.round(g * 255) << 16 | Math.round(b * 255) << 8;
}
var NUMBER = '[-+]?\\d*\\.?\\d+';
var PERCENTAGE = NUMBER + '%';
function call() {
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return '\\(\\s*(' + args.join(')\\s*,\\s*(') + ')\\s*\\)';
}
var matchers = {
rgb: new RegExp('rgb' + call(NUMBER, NUMBER, NUMBER)),
rgba: new RegExp('rgba' + call(NUMBER, NUMBER, NUMBER, NUMBER)),
hsl: new RegExp('hsl' + call(NUMBER, PERCENTAGE, PERCENTAGE)),
hsla: new RegExp('hsla' + call(NUMBER, PERCENTAGE, PERCENTAGE, NUMBER)),
hex3: /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
hex4: /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
hex6: /^#([0-9a-fA-F]{6})$/,
hex8: /^#([0-9a-fA-F]{8})$/
};
function parse255(str) {
var int = parseInt(str, 10);
if (int < 0) {
return 0;
}
if (int > 255) {
return 255;
}
return int;
}
function parse360(str) {
var int = parseFloat(str);
return (int % 360 + 360) % 360 / 360;
}
function parse1(str) {
var num = parseFloat(str);
if (num < 0) {
return 0;
}
if (num > 1) {
return 255;
}
return Math.round(num * 255);
}
function parsePercentage(str) {
var int = parseFloat(str, 10);
if (int < 0) {
return 0;
}
if (int > 100) {
return 1;
}
return int / 100;
}
var names = {
transparent: 0x00000000,
aliceblue: 0xf0f8ffff,
antiquewhite: 0xfaebd7ff,
aqua: 0x00ffffff,
aquamarine: 0x7fffd4ff,
azure: 0xf0ffffff,
beige: 0xf5f5dcff,
bisque: 0xffe4c4ff,
black: 0x000000ff,
blanchedalmond: 0xffebcdff,
blue: 0x0000ffff,
blueviolet: 0x8a2be2ff,
brown: 0xa52a2aff,
burlywood: 0xdeb887ff,
burntsienna: 0xea7e5dff,
cadetblue: 0x5f9ea0ff,
chartreuse: 0x7fff00ff,
chocolate: 0xd2691eff,
coral: 0xff7f50ff,
cornflowerblue: 0x6495edff,
cornsilk: 0xfff8dcff,
crimson: 0xdc143cff,
cyan: 0x00ffffff,
darkblue: 0x00008bff,
darkcyan: 0x008b8bff,
darkgoldenrod: 0xb8860bff,
darkgray: 0xa9a9a9ff,
darkgreen: 0x006400ff,
darkgrey: 0xa9a9a9ff,
darkkhaki: 0xbdb76bff,
darkmagenta: 0x8b008bff,
darkolivegreen: 0x556b2fff,
darkorange: 0xff8c00ff,
darkorchid: 0x9932ccff,
darkred: 0x8b0000ff,
darksalmon: 0xe9967aff,
darkseagreen: 0x8fbc8fff,
darkslateblue: 0x483d8bff,
darkslategray: 0x2f4f4fff,
darkslategrey: 0x2f4f4fff,
darkturquoise: 0x00ced1ff,
darkviolet: 0x9400d3ff,
deeppink: 0xff1493ff,
deepskyblue: 0x00bfffff,
dimgray: 0x696969ff,
dimgrey: 0x696969ff,
dodgerblue: 0x1e90ffff,
firebrick: 0xb22222ff,
floralwhite: 0xfffaf0ff,
forestgreen: 0x228b22ff,
fuchsia: 0xff00ffff,
gainsboro: 0xdcdcdcff,
ghostwhite: 0xf8f8ffff,
gold: 0xffd700ff,
goldenrod: 0xdaa520ff,
gray: 0x808080ff,
green: 0x008000ff,
greenyellow: 0xadff2fff,
grey: 0x808080ff,
honeydew: 0xf0fff0ff,
hotpink: 0xff69b4ff,
indianred: 0xcd5c5cff,
indigo: 0x4b0082ff,
ivory: 0xfffff0ff,
khaki: 0xf0e68cff,
lavender: 0xe6e6faff,
lavenderblush: 0xfff0f5ff,
lawngreen: 0x7cfc00ff,
lemonchiffon: 0xfffacdff,
lightblue: 0xadd8e6ff,
lightcoral: 0xf08080ff,
lightcyan: 0xe0ffffff,
lightgoldenrodyellow: 0xfafad2ff,
lightgray: 0xd3d3d3ff,
lightgreen: 0x90ee90ff,
lightgrey: 0xd3d3d3ff,
lightpink: 0xffb6c1ff,
lightsalmon: 0xffa07aff,
lightseagreen: 0x20b2aaff,
lightskyblue: 0x87cefaff,
lightslategray: 0x778899ff,
lightslategrey: 0x778899ff,
lightsteelblue: 0xb0c4deff,
lightyellow: 0xffffe0ff,
lime: 0x00ff00ff,
limegreen: 0x32cd32ff,
linen: 0xfaf0e6ff,
magenta: 0xff00ffff,
maroon: 0x800000ff,
mediumaquamarine: 0x66cdaaff,
mediumblue: 0x0000cdff,
mediumorchid: 0xba55d3ff,
mediumpurple: 0x9370dbff,
mediumseagreen: 0x3cb371ff,
mediumslateblue: 0x7b68eeff,
mediumspringgreen: 0x00fa9aff,
mediumturquoise: 0x48d1ccff,
mediumvioletred: 0xc71585ff,
midnightblue: 0x191970ff,
mintcream: 0xf5fffaff,
mistyrose: 0xffe4e1ff,
moccasin: 0xffe4b5ff,
navajowhite: 0xffdeadff,
navy: 0x000080ff,
oldlace: 0xfdf5e6ff,
olive: 0x808000ff,
olivedrab: 0x6b8e23ff,
orange: 0xffa500ff,
orangered: 0xff4500ff,
orchid: 0xda70d6ff,
palegoldenrod: 0xeee8aaff,
palegreen: 0x98fb98ff,
paleturquoise: 0xafeeeeff,
palevioletred: 0xdb7093ff,
papayawhip: 0xffefd5ff,
peachpuff: 0xffdab9ff,
peru: 0xcd853fff,
pink: 0xffc0cbff,
plum: 0xdda0ddff,
powderblue: 0xb0e0e6ff,
purple: 0x800080ff,
rebeccapurple: 0x663399ff,
red: 0xff0000ff,
rosybrown: 0xbc8f8fff,
royalblue: 0x4169e1ff,
saddlebrown: 0x8b4513ff,
salmon: 0xfa8072ff,
sandybrown: 0xf4a460ff,
seagreen: 0x2e8b57ff,
seashell: 0xfff5eeff,
sienna: 0xa0522dff,
silver: 0xc0c0c0ff,
skyblue: 0x87ceebff,
slateblue: 0x6a5acdff,
slategray: 0x708090ff,
slategrey: 0x708090ff,
snow: 0xfffafaff,
springgreen: 0x00ff7fff,
steelblue: 0x4682b4ff,
tan: 0xd2b48cff,
teal: 0x008080ff,
thistle: 0xd8bfd8ff,
tomato: 0xff6347ff,
turquoise: 0x40e0d0ff,
violet: 0xee82eeff,
wheat: 0xf5deb3ff,
white: 0xffffffff,
whitesmoke: 0xf5f5f5ff,
yellow: 0xffff00ff,
yellowgreen: 0x9acd32ff
};
module.exports = normalizeColor;
}, 72, null, "normalizeColor");
__d(/* NativeMethodsMixin */function(global, require, module, exports) {
'use strict';
var ReactNativeAttributePayload = require(74 ); // 74 = ReactNativeAttributePayload
var TextInputState = require(78 ); // 78 = TextInputState
var UIManager = require(123 ); // 123 = UIManager
var findNodeHandle = require(124 ); // 124 = findNodeHandle
var invariant = require(44 ); // 44 = fbjs/lib/invariant
function warnForStyleProps(props, validAttributes) {
for (var key in validAttributes.style) {
if (!(validAttributes[key] || props[key] === undefined)) {
console.error('You are setting the style `{ ' + key + ': ... }` as a prop. You ' + 'should nest it in a style object. ' + 'E.g. `{ style: { ' + key + ': ... } }`');
}
}
}
var NativeMethodsMixin = {
measure: function measure(callback) {
UIManager.measure(findNodeHandle(this), mountSafeCallback(this, callback));
},
measureInWindow: function measureInWindow(callback) {
UIManager.measureInWindow(findNodeHandle(this), mountSafeCallback(this, callback));
},
measureLayout: function measureLayout(relativeToNativeNode, onSuccess, onFail) {
UIManager.measureLayout(findNodeHandle(this), relativeToNativeNode, mountSafeCallback(this, onFail), mountSafeCallback(this, onSuccess));
},
setNativeProps: function setNativeProps(nativeProps) {
if (!this.viewConfig) {
var ctor = this.constructor;
var componentName = ctor.displayName || ctor.name || '<Unknown Component>';
invariant(false, componentName + ' "viewConfig" is not defined.');
}
if (__DEV__) {
warnForStyleProps(nativeProps, this.viewConfig.validAttributes);
}
var updatePayload = ReactNativeAttributePayload.create(nativeProps, this.viewConfig.validAttributes);
UIManager.updateView(findNodeHandle(this), this.viewConfig.uiViewClassName, updatePayload);
},
focus: function focus() {
TextInputState.focusTextInput(findNodeHandle(this));
},
blur: function blur() {
TextInputState.blurTextInput(findNodeHandle(this));
}
};
function throwOnStylesProp(component, props) {
if (props.styles !== undefined) {
var owner = component._owner || null;
var name = component.constructor.displayName;
var msg = '`styles` is not a supported property of `' + name + '`, did ' + 'you mean `style` (singular)?';
if (owner && owner.constructor && owner.constructor.displayName) {
msg += '\n\nCheck the `' + owner.constructor.displayName + '` parent ' + ' component.';
}
throw new Error(msg);
}
}
if (__DEV__) {
var NativeMethodsMixin_DEV = NativeMethodsMixin;
invariant(!NativeMethodsMixin_DEV.componentWillMount && !NativeMethodsMixin_DEV.componentWillReceiveProps, 'Do not override existing functions.');
NativeMethodsMixin_DEV.componentWillMount = function () {
throwOnStylesProp(this, this.props);
};
NativeMethodsMixin_DEV.componentWillReceiveProps = function (newProps) {
throwOnStylesProp(this, newProps);
};
}
function mountSafeCallback(context, callback) {
return function () {
if (!callback || context.isMounted && !context.isMounted()) {
return undefined;
}
return callback.apply(context, arguments);
};
}
module.exports = NativeMethodsMixin;
}, 73, null, "NativeMethodsMixin");
__d(/* ReactNativeAttributePayload */function(global, require, module, exports) {
'use strict';
var ReactNativePropRegistry = require(75 ); // 75 = ReactNativePropRegistry
var deepDiffer = require(76 ); // 76 = deepDiffer
var flattenStyle = require(77 ); // 77 = flattenStyle
var emptyObject = {};
var removedKeys = null;
var removedKeyCount = 0;
function defaultDiffer(prevProp, nextProp) {
if (typeof nextProp !== 'object' || nextProp === null) {
return true;
} else {
return deepDiffer(prevProp, nextProp);
}
}
function resolveObject(idOrObject) {
if (typeof idOrObject === 'number') {
return ReactNativePropRegistry.getByID(idOrObject);
}
return idOrObject;
}
function restoreDeletedValuesInNestedArray(updatePayload, node, validAttributes) {
if (Array.isArray(node)) {
var i = node.length;
while (i-- && removedKeyCount > 0) {
restoreDeletedValuesInNestedArray(updatePayload, node[i], validAttributes);
}
} else if (node && removedKeyCount > 0) {
var obj = resolveObject(node);
for (var propKey in removedKeys) {
if (!removedKeys[propKey]) {
continue;
}
var nextProp = obj[propKey];
if (nextProp === undefined) {
continue;
}
var attributeConfig = validAttributes[propKey];
if (!attributeConfig) {
continue;
}
if (typeof nextProp === 'function') {
nextProp = true;
}
if (typeof nextProp === 'undefined') {
nextProp = null;
}
if (typeof attributeConfig !== 'object') {
updatePayload[propKey] = nextProp;
} else if (typeof attributeConfig.diff === 'function' || typeof attributeConfig.process === 'function') {
var nextValue = typeof attributeConfig.process === 'function' ? attributeConfig.process(nextProp) : nextProp;
updatePayload[propKey] = nextValue;
}
removedKeys[propKey] = false;
removedKeyCount--;
}
}
}
function diffNestedArrayProperty(updatePayload, prevArray, nextArray, validAttributes) {
var minLength = prevArray.length < nextArray.length ? prevArray.length : nextArray.length;
var i;
for (i = 0; i < minLength; i++) {
updatePayload = diffNestedProperty(updatePayload, prevArray[i], nextArray[i], validAttributes);
}
for (; i < prevArray.length; i++) {
updatePayload = clearNestedProperty(updatePayload, prevArray[i], validAttributes);
}
for (; i < nextArray.length; i++) {
updatePayload = addNestedProperty(updatePayload, nextArray[i], validAttributes);
}
return updatePayload;
}
function diffNestedProperty(updatePayload, prevProp, nextProp, validAttributes) {
if (!updatePayload && prevProp === nextProp) {
return updatePayload;
}
if (!prevProp || !nextProp) {
if (nextProp) {
return addNestedProperty(updatePayload, nextProp, validAttributes);
}
if (prevProp) {
return clearNestedProperty(updatePayload, prevProp, validAttributes);
}
return updatePayload;
}
if (!Array.isArray(prevProp) && !Array.isArray(nextProp)) {
return diffProperties(updatePayload, resolveObject(prevProp), resolveObject(nextProp), validAttributes);
}
if (Array.isArray(prevProp) && Array.isArray(nextProp)) {
return diffNestedArrayProperty(updatePayload, prevProp, nextProp, validAttributes);
}
if (Array.isArray(prevProp)) {
return diffProperties(updatePayload, flattenStyle(prevProp), resolveObject(nextProp), validAttributes);
}
return diffProperties(updatePayload, resolveObject(prevProp), flattenStyle(nextProp), validAttributes);
}
function addNestedProperty(updatePayload, nextProp, validAttributes) {
if (!nextProp) {
return updatePayload;
}
if (!Array.isArray(nextProp)) {
return addProperties(updatePayload, resolveObject(nextProp), validAttributes);
}
for (var i = 0; i < nextProp.length; i++) {
updatePayload = addNestedProperty(updatePayload, nextProp[i], validAttributes);
}
return updatePayload;
}
function clearNestedProperty(updatePayload, prevProp, validAttributes) {
if (!prevProp) {
return updatePayload;
}
if (!Array.isArray(prevProp)) {
return clearProperties(updatePayload, resolveObject(prevProp), validAttributes);
}
for (var i = 0; i < prevProp.length; i++) {
updatePayload = clearNestedProperty(updatePayload, prevProp[i], validAttributes);
}
return updatePayload;
}
function diffProperties(updatePayload, prevProps, nextProps, validAttributes) {
var attributeConfig;
var nextProp;
var prevProp;
for (var propKey in nextProps) {
attributeConfig = validAttributes[propKey];
if (!attributeConfig) {
continue;
}
prevProp = prevProps[propKey];
nextProp = nextProps[propKey];
if (typeof nextProp === 'function') {
nextProp = true;
if (typeof prevProp === 'function') {
prevProp = true;
}
}
if (typeof nextProp === 'undefined') {
nextProp = null;
if (typeof prevProp === 'undefined') {
prevProp = null;
}
}
if (removedKeys) {
removedKeys[propKey] = false;
}
if (updatePayload && updatePayload[propKey] !== undefined) {
if (typeof attributeConfig !== 'object') {
updatePayload[propKey] = nextProp;
} else if (typeof attributeConfig.diff === 'function' || typeof attributeConfig.process === 'function') {
var nextValue = typeof attributeConfig.process === 'function' ? attributeConfig.process(nextProp) : nextProp;
updatePayload[propKey] = nextValue;
}
continue;
}
if (prevProp === nextProp) {
continue;
}
if (typeof attributeConfig !== 'object') {
if (defaultDiffer(prevProp, nextProp)) {
(updatePayload || (updatePayload = {}))[propKey] = nextProp;
}
} else if (typeof attributeConfig.diff === 'function' || typeof attributeConfig.process === 'function') {
var shouldUpdate = prevProp === undefined || (typeof attributeConfig.diff === 'function' ? attributeConfig.diff(prevProp, nextProp) : defaultDiffer(prevProp, nextProp));
if (shouldUpdate) {
nextValue = typeof attributeConfig.process === 'function' ? attributeConfig.process(nextProp) : nextProp;
(updatePayload || (updatePayload = {}))[propKey] = nextValue;
}
} else {
removedKeys = null;
removedKeyCount = 0;
updatePayload = diffNestedProperty(updatePayload, prevProp, nextProp, attributeConfig);
if (removedKeyCount > 0 && updatePayload) {
restoreDeletedValuesInNestedArray(updatePayload, nextProp, attributeConfig);
removedKeys = null;
}
}
}
for (propKey in prevProps) {
if (nextProps[propKey] !== undefined) {
continue;
}
attributeConfig = validAttributes[propKey];
if (!attributeConfig) {
continue;
}
if (updatePayload && updatePayload[propKey] !== undefined) {
continue;
}
prevProp = prevProps[propKey];
if (prevProp === undefined) {
continue;
}
if (typeof attributeConfig !== 'object' || typeof attributeConfig.diff === 'function' || typeof attributeConfig.process === 'function') {
(updatePayload || (updatePayload = {}))[propKey] = null;
if (!removedKeys) {
removedKeys = {};
}
if (!removedKeys[propKey]) {
removedKeys[propKey] = true;
removedKeyCount++;
}
} else {
updatePayload = clearNestedProperty(updatePayload, prevProp, attributeConfig);
}
}
return updatePayload;
}
function addProperties(updatePayload, props, validAttributes) {
return diffProperties(updatePayload, emptyObject, props, validAttributes);
}
function clearProperties(updatePayload, prevProps, validAttributes) {
return diffProperties(updatePayload, prevProps, emptyObject, validAttributes);
}
var ReactNativeAttributePayload = {
create: function create(props, validAttributes) {
return addProperties(null, props, validAttributes);
},
diff: function diff(prevProps, nextProps, validAttributes) {
return diffProperties(null, prevProps, nextProps, validAttributes);
}
};
module.exports = ReactNativeAttributePayload;
}, 74, null, "ReactNativeAttributePayload");
__d(/* ReactNativePropRegistry */function(global, require, module, exports) {
'use strict';
var objects = {};
var uniqueID = 1;
var emptyObject = {};
var ReactNativePropRegistry = function () {
function ReactNativePropRegistry() {
babelHelpers.classCallCheck(this, ReactNativePropRegistry);
}
babelHelpers.createClass(ReactNativePropRegistry, null, [{
key: 'register',
value: function register(object) {
var id = ++uniqueID;
if (__DEV__) {
Object.freeze(object);
}
objects[id] = object;
return id;
}
}, {
key: 'getByID',
value: function getByID(id) {
if (!id) {
return emptyObject;
}
var object = objects[id];
if (!object) {
console.warn('Invalid style with id `' + id + '`. Skipping ...');
return emptyObject;
}
return object;
}
}]);
return ReactNativePropRegistry;
}();
module.exports = ReactNativePropRegistry;
}, 75, null, "ReactNativePropRegistry");
__d(/* deepDiffer */function(global, require, module, exports) {
'use strict';
var deepDiffer = function deepDiffer(one, two) {
if (one === two) {
return false;
}
if (typeof one === 'function' && typeof two === 'function') {
return false;
}
if (typeof one !== 'object' || one === null) {
return one !== two;
}
if (typeof two !== 'object' || two === null) {
return true;
}
if (one.constructor !== two.constructor) {
return true;
}
if (Array.isArray(one)) {
var len = one.length;
if (two.length !== len) {
return true;
}
for (var ii = 0; ii < len; ii++) {
if (deepDiffer(one[ii], two[ii])) {
return true;
}
}
} else {
for (var key in one) {
if (deepDiffer(one[key], two[key])) {
return true;
}
}
for (var twoKey in two) {
if (one[twoKey] === undefined && two[twoKey] !== undefined) {
return true;
}
}
}
return false;
};
module.exports = deepDiffer;
}, 76, null, "deepDiffer");
__d(/* flattenStyle */function(global, require, module, exports) {
'use strict';
var ReactNativePropRegistry = require(75 ); // 75 = ReactNativePropRegistry
var invariant = require(44 ); // 44 = fbjs/lib/invariant
function getStyle(style) {
if (typeof style === 'number') {
return ReactNativePropRegistry.getByID(style);
}
return style;
}
function flattenStyle(style) {
if (!style) {
return undefined;
}
invariant(style !== true, 'style may be false but not true');
if (!Array.isArray(style)) {
return getStyle(style);
}
var result = {};
for (var i = 0, styleLength = style.length; i < styleLength; ++i) {
var computedStyle = flattenStyle(style[i]);
if (computedStyle) {
for (var key in computedStyle) {
result[key] = computedStyle[key];
}
}
}
return result;
}
module.exports = flattenStyle;
}, 77, null, "flattenStyle");
__d(/* TextInputState */function(global, require, module, exports) {
'use strict';
var Platform = require(79 ); // 79 = Platform
var UIManager = require(123 ); // 123 = UIManager
var TextInputState = {
_currentlyFocusedID: null,
currentlyFocusedField: function currentlyFocusedField() {
return this._currentlyFocusedID;
},
focusTextInput: function focusTextInput(textFieldID) {
if (this._currentlyFocusedID !== textFieldID && textFieldID !== null) {
this._currentlyFocusedID = textFieldID;
if (Platform.OS === 'ios') {
UIManager.focus(textFieldID);
} else if (Platform.OS === 'android') {
UIManager.dispatchViewManagerCommand(textFieldID, UIManager.AndroidTextInput.Commands.focusTextInput, null);
}
}
},
blurTextInput: function blurTextInput(textFieldID) {
if (this._currentlyFocusedID === textFieldID && textFieldID !== null) {
this._currentlyFocusedID = null;
if (Platform.OS === 'ios') {
UIManager.blur(textFieldID);
} else if (Platform.OS === 'android') {
UIManager.dispatchViewManagerCommand(textFieldID, UIManager.AndroidTextInput.Commands.blurTextInput, null);
}
}
}
};
module.exports = TextInputState;
}, 78, null, "TextInputState");
__d(/* Platform */function(global, require, module, exports) {
'use strict';
var Platform = {
OS: 'ios',
get Version() {
var constants = require(80 ).IOSConstants; // 80 = NativeModules
return constants ? constants.osVersion : '';
},
get isTVOS() {
var constants = require(80 ).IOSConstants; // 80 = NativeModules
return constants ? constants.interfaceIdiom === 'tv' : false;
},
get isTesting() {
var constants = require(80 ).IOSConstants; // 80 = NativeModules
return constants && constants.isTesting;
},
select: function select(obj) {
return obj.ios;
}
};
module.exports = Platform;
}, 79, null, "Platform");
__d(/* NativeModules */function(global, require, module, exports) {
'use strict';
var BatchedBridge = require(81 ); // 81 = BatchedBridge
var defineLazyObjectProperty = require(122 ); // 122 = defineLazyObjectProperty
var invariant = require(44 ); // 44 = fbjs/lib/invariant
function genModule(config, moduleID) {
if (!config) {
return null;
}
var _config = babelHelpers.slicedToArray(config, 5),
moduleName = _config[0],
constants = _config[1],
methods = _config[2],
promiseMethods = _config[3],
syncMethods = _config[4];
invariant(!moduleName.startsWith('RCT') && !moduleName.startsWith('RK'), 'Module name prefixes should\'ve been stripped by the native side ' + 'but wasn\'t for ' + moduleName);
if (!constants && !methods) {
return { name: moduleName };
}
var module = {};
methods && methods.forEach(function (methodName, methodID) {
var isPromise = promiseMethods && arrayContains(promiseMethods, methodID);
var isSync = syncMethods && arrayContains(syncMethods, methodID);
invariant(!isPromise || !isSync, 'Cannot have a method that is both async and a sync hook');
var methodType = isPromise ? 'promise' : isSync ? 'sync' : 'async';
module[methodName] = genMethod(moduleID, methodID, methodType);
});
babelHelpers.extends(module, constants);
if (__DEV__) {
BatchedBridge.createDebugLookup(moduleID, moduleName, methods);
}
return { name: moduleName, module: module };
}
global.__fbGenNativeModule = genModule;
function loadModule(name, moduleID) {
invariant(global.nativeRequireModuleConfig, 'Can\'t lazily create module without nativeRequireModuleConfig');
var config = global.nativeRequireModuleConfig(name);
var info = genModule(config, moduleID);
return info && info.module;
}
function genMethod(moduleID, methodID, type) {
var fn = null;
if (type === 'promise') {
fn = function fn() {
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return new Promise(function (resolve, reject) {
BatchedBridge.enqueueNativeCall(moduleID, methodID, args, function (data) {
return resolve(data);
}, function (errorData) {
return reject(createErrorFromErrorData(errorData));
});
});
};
} else if (type === 'sync') {
fn = function fn() {
for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
args[_key2] = arguments[_key2];
}
return global.nativeCallSyncHook(moduleID, methodID, args);
};
} else {
fn = function fn() {
for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
args[_key3] = arguments[_key3];
}
var lastArg = args.length > 0 ? args[args.length - 1] : null;
var secondLastArg = args.length > 1 ? args[args.length - 2] : null;
var hasSuccessCallback = typeof lastArg === 'function';
var hasErrorCallback = typeof secondLastArg === 'function';
hasErrorCallback && invariant(hasSuccessCallback, 'Cannot have a non-function arg after a function arg.');
var onSuccess = hasSuccessCallback ? lastArg : null;
var onFail = hasErrorCallback ? secondLastArg : null;
var callbackCount = hasSuccessCallback + hasErrorCallback;
args = args.slice(0, args.length - callbackCount);
BatchedBridge.enqueueNativeCall(moduleID, methodID, args, onFail, onSuccess);
};
}
fn.type = type;
return fn;
}
function arrayContains(array, value) {
return array.indexOf(value) !== -1;
}
function createErrorFromErrorData(errorData) {
var message = errorData.message,
extraErrorInfo = babelHelpers.objectWithoutProperties(errorData, ['message']);
var error = new Error(message);
error.framesToPop = 1;
return babelHelpers.extends(error, extraErrorInfo);
}
var NativeModules = {};
if (global.nativeModuleProxy) {
NativeModules = global.nativeModuleProxy;
} else {
var bridgeConfig = global.__fbBatchedBridgeConfig;
invariant(bridgeConfig, '__fbBatchedBridgeConfig is not set, cannot invoke native modules');
(bridgeConfig.remoteModuleConfig || []).forEach(function (config, moduleID) {
var info = genModule(config, moduleID);
if (!info) {
return;
}
if (info.module) {
NativeModules[info.name] = info.module;
} else {
defineLazyObjectProperty(NativeModules, info.name, {
get: function get() {
return loadModule(info.name, moduleID);
}
});
}
});
}
module.exports = NativeModules;
}, 80, null, "NativeModules");
__d(/* BatchedBridge */function(global, require, module, exports) {
'use strict';
var MessageQueue = require(82 ); // 82 = MessageQueue
var BatchedBridge = new MessageQueue();
BatchedBridge.registerCallableModule('Systrace', require(85 )); // 85 = Systrace
BatchedBridge.registerCallableModule('JSTimersExecution', require(84 )); // 84 = JSTimersExecution
BatchedBridge.registerCallableModule('HeapCapture', require(98 )); // 98 = HeapCapture
BatchedBridge.registerCallableModule('SamplingProfiler', require(99 )); // 99 = SamplingProfiler
if (__DEV__) {
BatchedBridge.registerCallableModule('HMRClient', require(100 )); // 100 = HMRClient
}
Object.defineProperty(global, '__fbBatchedBridge', {
configurable: true,
value: BatchedBridge
});
module.exports = BatchedBridge;
}, 81, null, "BatchedBridge");
__d(/* MessageQueue */function(global, require, module, exports) {
'use strict';
var ErrorUtils = require(83 ); // 83 = ErrorUtils
var JSTimersExecution = require(84 ); // 84 = JSTimersExecution
var Systrace = require(85 ); // 85 = Systrace
var deepFreezeAndThrowOnMutationInDev = require(96 ); // 96 = deepFreezeAndThrowOnMutationInDev
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var stringifySafe = require(97 ); // 97 = stringifySafe
var TO_JS = 0;
var TO_NATIVE = 1;
var MODULE_IDS = 0;
var METHOD_IDS = 1;
var PARAMS = 2;
var MIN_TIME_BETWEEN_FLUSHES_MS = 5;
var TRACE_TAG_REACT_APPS = 1 << 17;
var DEBUG_INFO_LIMIT = 32;
var guard = function guard(fn) {
try {
fn();
} catch (error) {
ErrorUtils.reportFatalError(error);
}
};
var MessageQueue = function () {
function MessageQueue() {
babelHelpers.classCallCheck(this, MessageQueue);
this._callableModules = {};
this._queue = [[], [], [], 0];
this._callbacks = [];
this._callbackID = 0;
this._callID = 0;
this._lastFlush = 0;
this._eventLoopStartTime = new Date().getTime();
if (__DEV__) {
this._debugInfo = {};
this._remoteModuleTable = {};
this._remoteMethodTable = {};
}
this.callFunctionReturnFlushedQueue = this.callFunctionReturnFlushedQueue.bind(this);
this.callFunctionReturnResultAndFlushedQueue = this.callFunctionReturnResultAndFlushedQueue.bind(this);
this.flushedQueue = this.flushedQueue.bind(this);
this.invokeCallbackAndReturnFlushedQueue = this.invokeCallbackAndReturnFlushedQueue.bind(this);
}
babelHelpers.createClass(MessageQueue, [{
key: 'callFunctionReturnFlushedQueue',
value: function callFunctionReturnFlushedQueue(module, method, args) {
var _this = this;
guard(function () {
_this.__callFunction(module, method, args);
_this.__callImmediates();
});
return this.flushedQueue();
}
}, {
key: 'callFunctionReturnResultAndFlushedQueue',
value: function callFunctionReturnResultAndFlushedQueue(module, method, args) {
var _this2 = this;
var result = void 0;
guard(function () {
result = _this2.__callFunction(module, method, args);
_this2.__callImmediates();
});
return [result, this.flushedQueue()];
}
}, {
key: 'invokeCallbackAndReturnFlushedQueue',
value: function invokeCallbackAndReturnFlushedQueue(cbID, args) {
var _this3 = this;
guard(function () {
_this3.__invokeCallback(cbID, args);
_this3.__callImmediates();
});
return this.flushedQueue();
}
}, {
key: 'flushedQueue',
value: function flushedQueue() {
this.__callImmediates();
var queue = this._queue;
this._queue = [[], [], [], this._callID];
return queue[0].length ? queue : null;
}
}, {
key: 'getEventLoopRunningTime',
value: function getEventLoopRunningTime() {
return new Date().getTime() - this._eventLoopStartTime;
}
}, {
key: 'registerCallableModule',
value: function registerCallableModule(name, module) {
this._callableModules[name] = module;
}
}, {
key: 'enqueueNativeCall',
value: function enqueueNativeCall(moduleID, methodID, params, onFail, onSucc) {
if (onFail || onSucc) {
if (__DEV__) {
var callId = this._callbackID >> 1;
this._debugInfo[callId] = [moduleID, methodID];
if (callId > DEBUG_INFO_LIMIT) {
delete this._debugInfo[callId - DEBUG_INFO_LIMIT];
}
}
onFail && params.push(this._callbackID);
this._callbacks[this._callbackID++] = onFail;
onSucc && params.push(this._callbackID);
this._callbacks[this._callbackID++] = onSucc;
}
if (__DEV__) {
global.nativeTraceBeginAsyncFlow && global.nativeTraceBeginAsyncFlow(TRACE_TAG_REACT_APPS, 'native', this._callID);
}
this._callID++;
this._queue[MODULE_IDS].push(moduleID);
this._queue[METHOD_IDS].push(methodID);
if (__DEV__) {
JSON.stringify(params);
deepFreezeAndThrowOnMutationInDev(params);
}
this._queue[PARAMS].push(params);
var now = new Date().getTime();
if (global.nativeFlushQueueImmediate && now - this._lastFlush >= MIN_TIME_BETWEEN_FLUSHES_MS) {
global.nativeFlushQueueImmediate(this._queue);
this._queue = [[], [], [], this._callID];
this._lastFlush = now;
}
Systrace.counterEvent('pending_js_to_native_queue', this._queue[0].length);
if (__DEV__ && this.__spy && isFinite(moduleID)) {
this.__spy({ type: TO_NATIVE,
module: this._remoteModuleTable[moduleID],
method: this._remoteMethodTable[moduleID][methodID],
args: params });
}
}
}, {
key: 'createDebugLookup',
value: function createDebugLookup(moduleID, name, methods) {
if (__DEV__) {
this._remoteModuleTable[moduleID] = name;
this._remoteMethodTable[moduleID] = methods;
}
}
}, {
key: '__callImmediates',
value: function __callImmediates() {
Systrace.beginEvent('JSTimersExecution.callImmediates()');
guard(function () {
return JSTimersExecution.callImmediates();
});
Systrace.endEvent();
}
}, {
key: '__callFunction',
value: function __callFunction(module, method, args) {
this._lastFlush = new Date().getTime();
this._eventLoopStartTime = this._lastFlush;
Systrace.beginEvent(module + '.' + method + '()');
if (__DEV__ && this.__spy) {
this.__spy({ type: TO_JS, module: module, method: method, args: args });
}
var moduleMethods = this._callableModules[module];
invariant(!!moduleMethods, 'Module %s is not a registered callable module (calling %s)', module, method);
invariant(!!moduleMethods[method], 'Method %s does not exist on module %s', method, module);
var result = moduleMethods[method].apply(moduleMethods, args);
Systrace.endEvent();
return result;
}
}, {
key: '__invokeCallback',
value: function __invokeCallback(cbID, args) {
this._lastFlush = new Date().getTime();
this._eventLoopStartTime = this._lastFlush;
var callback = this._callbacks[cbID];
if (__DEV__) {
var debug = this._debugInfo[cbID >> 1];
var _module = debug && this._remoteModuleTable[debug[0]];
var _method = debug && this._remoteMethodTable[debug[0]][debug[1]];
if (callback == null) {
var errorMessage = 'Callback with id ' + cbID + ': ' + _module + '.' + _method + '() not found';
if (_method) {
errorMessage = 'The callback ' + _method + '() exists in module ' + _module + ', ' + 'but only one callback may be registered to a function in a native module.';
}
invariant(callback, errorMessage);
}
var profileName = debug ? '<callback for ' + _module + '.' + _method + '>' : cbID;
if (callback && this.__spy && __DEV__) {
this.__spy({ type: TO_JS, module: null, method: profileName, args: args });
}
Systrace.beginEvent('MessageQueue.invokeCallback(' + profileName + ', ' + stringifySafe(args) + ')');
} else {
if (!callback) {
return;
}
}
this._callbacks[cbID & ~1] = null;
this._callbacks[cbID | 1] = null;
callback.apply(null, args);
if (__DEV__) {
Systrace.endEvent();
}
}
}], [{
key: 'spy',
value: function spy(spyOrToggle) {
if (spyOrToggle === true) {
MessageQueue.prototype.__spy = function (info) {
console.log((info.type === TO_JS ? 'N->JS' : 'JS->N') + ' : ' + ('' + (info.module ? info.module + '.' : '') + info.method) + ('(' + JSON.stringify(info.args) + ')'));
};
} else if (spyOrToggle === false) {
MessageQueue.prototype.__spy = null;
} else {
MessageQueue.prototype.__spy = spyOrToggle;
}
}
}]);
return MessageQueue;
}();
module.exports = MessageQueue;
}, 82, null, "MessageQueue");
__d(/* ErrorUtils */function(global, require, module, exports) {
module.exports = global.ErrorUtils;
}, 83, null, "ErrorUtils");
__d(/* JSTimersExecution */function(global, require, module, exports) {
'use strict';
var Systrace = require(85 ); // 85 = Systrace
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var performanceNow = require(90 ); // 90 = fbjs/lib/performanceNow
var warning = require(40 ); // 40 = fbjs/lib/warning
var FRAME_DURATION = 1000 / 60;
var IDLE_CALLBACK_FRAME_DEADLINE = 1;
var hasEmittedTimeDriftWarning = false;
var JSTimersExecution = {
GUID: 1,
callbacks: [],
types: [],
timerIDs: [],
immediates: [],
requestIdleCallbacks: [],
identifiers: [],
errors: null,
callTimer: function callTimer(timerID, frameTime) {
warning(timerID <= JSTimersExecution.GUID, 'Tried to call timer with ID %s but no such timer exists.', timerID);
var timerIndex = JSTimersExecution.timerIDs.indexOf(timerID);
if (timerIndex === -1) {
return;
}
var type = JSTimersExecution.types[timerIndex];
var callback = JSTimersExecution.callbacks[timerIndex];
if (!callback || !type) {
console.error('No callback found for timerID ' + timerID);
return;
}
if (__DEV__) {
var identifier = JSTimersExecution.identifiers[timerIndex] || {};
Systrace.beginEvent('Systrace.callTimer: ' + identifier.methodName);
}
if (type === 'setTimeout' || type === 'setImmediate' || type === 'requestAnimationFrame' || type === 'requestIdleCallback') {
JSTimersExecution._clearIndex(timerIndex);
}
try {
if (type === 'setTimeout' || type === 'setInterval' || type === 'setImmediate') {
callback();
} else if (type === 'requestAnimationFrame') {
callback(performanceNow());
} else if (type === 'requestIdleCallback') {
callback({
timeRemaining: function timeRemaining() {
return Math.max(0, FRAME_DURATION - (performanceNow() - frameTime));
}
});
} else {
console.error('Tried to call a callback with invalid type: ' + type);
}
} catch (e) {
if (!JSTimersExecution.errors) {
JSTimersExecution.errors = [e];
} else {
JSTimersExecution.errors.push(e);
}
}
if (__DEV__) {
Systrace.endEvent();
}
},
callTimers: function callTimers(timerIDs) {
invariant(timerIDs.length !== 0, 'Cannot call `callTimers` with an empty list of IDs.');
JSTimersExecution.errors = null;
for (var i = 0; i < timerIDs.length; i++) {
JSTimersExecution.callTimer(timerIDs[i], 0);
}
var errors = JSTimersExecution.errors;
if (errors) {
var errorCount = errors.length;
if (errorCount > 1) {
for (var ii = 1; ii < errorCount; ii++) {
require(92 ).setTimeout(function (error) { // 92 = JSTimers
throw error;
}.bind(null, errors[ii]), 0);
}
}
throw errors[0];
}
},
callIdleCallbacks: function callIdleCallbacks(frameTime) {
if (FRAME_DURATION - (performanceNow() - frameTime) < IDLE_CALLBACK_FRAME_DEADLINE) {
return;
}
JSTimersExecution.errors = null;
if (JSTimersExecution.requestIdleCallbacks.length > 0) {
var passIdleCallbacks = JSTimersExecution.requestIdleCallbacks.slice();
JSTimersExecution.requestIdleCallbacks = [];
for (var i = 0; i < passIdleCallbacks.length; ++i) {
JSTimersExecution.callTimer(passIdleCallbacks[i], frameTime);
}
}
if (JSTimersExecution.requestIdleCallbacks.length === 0) {
var _require = require(80 ), // 80 = NativeModules
Timing = _require.Timing;
Timing.setSendIdleEvents(false);
}
if (JSTimersExecution.errors) {
JSTimersExecution.errors.forEach(function (error) {
return require(92 ).setTimeout(function () { // 92 = JSTimers
throw error;
}, 0);
});
}
},
callImmediatesPass: function callImmediatesPass() {
Systrace.beginEvent('JSTimersExecution.callImmediatesPass()');
if (JSTimersExecution.immediates.length > 0) {
var passImmediates = JSTimersExecution.immediates.slice();
JSTimersExecution.immediates = [];
for (var i = 0; i < passImmediates.length; ++i) {
JSTimersExecution.callTimer(passImmediates[i], 0);
}
}
Systrace.endEvent();
return JSTimersExecution.immediates.length > 0;
},
callImmediates: function callImmediates() {
JSTimersExecution.errors = null;
while (JSTimersExecution.callImmediatesPass()) {}
if (JSTimersExecution.errors) {
JSTimersExecution.errors.forEach(function (error) {
return require(92 ).setTimeout(function () { // 92 = JSTimers
throw error;
}, 0);
});
}
},
emitTimeDriftWarning: function emitTimeDriftWarning(warningMessage) {
if (hasEmittedTimeDriftWarning) {
return;
}
hasEmittedTimeDriftWarning = true;
console.warn(warningMessage);
},
_clearIndex: function _clearIndex(i) {
JSTimersExecution.timerIDs[i] = null;
JSTimersExecution.callbacks[i] = null;
JSTimersExecution.types[i] = null;
JSTimersExecution.identifiers[i] = null;
}
};
module.exports = JSTimersExecution;
}, 84, null, "JSTimersExecution");
__d(/* Systrace */function(global, require, module, exports) {
'use strict';
var TRACE_TAG_REACT_APPS = 1 << 17;
var TRACE_TAG_JSC_CALLS = 1 << 27;
var _enabled = false;
var _asyncCookie = 0;
var ReactSystraceDevtool = __DEV__ ? {
onBeforeMountComponent: function onBeforeMountComponent(debugID) {
var displayName = require(56 ).getDisplayName(debugID); // 56 = react/lib/ReactComponentTreeHook
Systrace.beginEvent('ReactReconciler.mountComponent(' + displayName + ')');
},
onMountComponent: function onMountComponent(debugID) {
Systrace.endEvent();
},
onBeforeUpdateComponent: function onBeforeUpdateComponent(debugID) {
var displayName = require(56 ).getDisplayName(debugID); // 56 = react/lib/ReactComponentTreeHook
Systrace.beginEvent('ReactReconciler.updateComponent(' + displayName + ')');
},
onUpdateComponent: function onUpdateComponent(debugID) {
Systrace.endEvent();
},
onBeforeUnmountComponent: function onBeforeUnmountComponent(debugID) {
var displayName = require(56 ).getDisplayName(debugID); // 56 = react/lib/ReactComponentTreeHook
Systrace.beginEvent('ReactReconciler.unmountComponent(' + displayName + ')');
},
onUnmountComponent: function onUnmountComponent(debugID) {
Systrace.endEvent();
},
onBeginLifeCycleTimer: function onBeginLifeCycleTimer(debugID, timerType) {
var displayName = require(56 ).getDisplayName(debugID); // 56 = react/lib/ReactComponentTreeHook
Systrace.beginEvent(displayName + '.' + timerType + '()');
},
onEndLifeCycleTimer: function onEndLifeCycleTimer(debugID, timerType) {
Systrace.endEvent();
}
} : null;
var Systrace = {
setEnabled: function setEnabled(enabled) {
if (_enabled !== enabled) {
if (__DEV__) {
if (enabled) {
global.nativeTraceBeginLegacy && global.nativeTraceBeginLegacy(TRACE_TAG_JSC_CALLS);
require(86 ).addHook(ReactSystraceDevtool); // 86 = ReactDebugTool
} else {
global.nativeTraceEndLegacy && global.nativeTraceEndLegacy(TRACE_TAG_JSC_CALLS);
require(86 ).removeHook(ReactSystraceDevtool); // 86 = ReactDebugTool
}
}
_enabled = enabled;
}
},
beginEvent: function beginEvent(profileName, args) {
if (_enabled) {
profileName = typeof profileName === 'function' ? profileName() : profileName;
global.nativeTraceBeginSection(TRACE_TAG_REACT_APPS, profileName, args);
}
},
endEvent: function endEvent() {
if (_enabled) {
global.nativeTraceEndSection(TRACE_TAG_REACT_APPS);
}
},
beginAsyncEvent: function beginAsyncEvent(profileName) {
var cookie = _asyncCookie;
if (_enabled) {
_asyncCookie++;
profileName = typeof profileName === 'function' ? profileName() : profileName;
global.nativeTraceBeginAsyncSection(TRACE_TAG_REACT_APPS, profileName, cookie, 0);
}
return cookie;
},
endAsyncEvent: function endAsyncEvent(profileName, cookie) {
if (_enabled) {
profileName = typeof profileName === 'function' ? profileName() : profileName;
global.nativeTraceEndAsyncSection(TRACE_TAG_REACT_APPS, profileName, cookie, 0);
}
},
counterEvent: function counterEvent(profileName, value) {
if (_enabled) {
profileName = typeof profileName === 'function' ? profileName() : profileName;
global.nativeTraceCounter && global.nativeTraceCounter(TRACE_TAG_REACT_APPS, profileName, value);
}
},
attachToRelayProfiler: function attachToRelayProfiler(relayProfiler) {
relayProfiler.attachProfileHandler('*', function (name) {
var cookie = Systrace.beginAsyncEvent(name);
return function () {
Systrace.endAsyncEvent(name, cookie);
};
});
relayProfiler.attachAggregateHandler('*', function (name, callback) {
Systrace.beginEvent(name);
callback();
Systrace.endEvent();
});
},
swizzleJSON: function swizzleJSON() {
Systrace.measureMethods(JSON, 'JSON', ['parse', 'stringify']);
},
measureMethods: function measureMethods(object, objectName, methodNames) {
if (!__DEV__) {
return;
}
methodNames.forEach(function (methodName) {
object[methodName] = Systrace.measure(objectName, methodName, object[methodName]);
});
},
measure: function measure(objName, fnName, func) {
if (!__DEV__) {
return func;
}
var profileName = objName + '.' + fnName;
return function () {
if (!_enabled) {
return func.apply(this, arguments);
}
Systrace.beginEvent(profileName);
var ret = func.apply(this, arguments);
Systrace.endEvent();
return ret;
};
}
};
if (__DEV__) {
require.Systrace = Systrace;
}
module.exports = Systrace;
}, 85, null, "Systrace");
__d(/* ReactDebugTool */function(global, require, module, exports) {
'use strict';
var ReactInvalidSetStateWarningHook = require(87 ); // 87 = ReactInvalidSetStateWarningHook
var ReactHostOperationHistoryHook = require(88 ); // 88 = ReactHostOperationHistoryHook
var ReactComponentTreeHook = require(56 ); // 56 = react/lib/ReactComponentTreeHook
var ExecutionEnvironment = require(89 ); // 89 = fbjs/lib/ExecutionEnvironment
var performanceNow = require(90 ); // 90 = fbjs/lib/performanceNow
var warning = require(40 ); // 40 = fbjs/lib/warning
var hooks = [];
var didHookThrowForEvent = {};
function callHook(event, fn, context, arg1, arg2, arg3, arg4, arg5) {
try {
fn.call(context, arg1, arg2, arg3, arg4, arg5);
} catch (e) {
warning(didHookThrowForEvent[event], 'Exception thrown by hook while handling %s: %s', event, e + '\n' + e.stack);
didHookThrowForEvent[event] = true;
}
}
function emitEvent(event, arg1, arg2, arg3, arg4, arg5) {
for (var i = 0; i < hooks.length; i++) {
var hook = hooks[i];
var fn = hook[event];
if (fn) {
callHook(event, fn, hook, arg1, arg2, arg3, arg4, arg5);
}
}
}
var _isProfiling = false;
var flushHistory = [];
var lifeCycleTimerStack = [];
var currentFlushNesting = 0;
var currentFlushMeasurements = [];
var currentFlushStartTime = 0;
var currentTimerDebugID = null;
var currentTimerStartTime = 0;
var currentTimerNestedFlushDuration = 0;
var currentTimerType = null;
var lifeCycleTimerHasWarned = false;
function clearHistory() {
ReactComponentTreeHook.purgeUnmountedComponents();
ReactHostOperationHistoryHook.clearHistory();
}
function getTreeSnapshot(registeredIDs) {
return registeredIDs.reduce(function (tree, id) {
var ownerID = ReactComponentTreeHook.getOwnerID(id);
var parentID = ReactComponentTreeHook.getParentID(id);
tree[id] = {
displayName: ReactComponentTreeHook.getDisplayName(id),
text: ReactComponentTreeHook.getText(id),
updateCount: ReactComponentTreeHook.getUpdateCount(id),
childIDs: ReactComponentTreeHook.getChildIDs(id),
ownerID: ownerID || parentID && ReactComponentTreeHook.getOwnerID(parentID) || 0,
parentID: parentID
};
return tree;
}, {});
}
function resetMeasurements() {
var previousStartTime = currentFlushStartTime;
var previousMeasurements = currentFlushMeasurements;
var previousOperations = ReactHostOperationHistoryHook.getHistory();
if (currentFlushNesting === 0) {
currentFlushStartTime = 0;
currentFlushMeasurements = [];
clearHistory();
return;
}
if (previousMeasurements.length || previousOperations.length) {
var registeredIDs = ReactComponentTreeHook.getRegisteredIDs();
flushHistory.push({
duration: performanceNow() - previousStartTime,
measurements: previousMeasurements || [],
operations: previousOperations || [],
treeSnapshot: getTreeSnapshot(registeredIDs)
});
}
clearHistory();
currentFlushStartTime = performanceNow();
currentFlushMeasurements = [];
}
function checkDebugID(debugID) {
var allowRoot = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
if (allowRoot && debugID === 0) {
return;
}
if (!debugID) {
warning(false, 'ReactDebugTool: debugID may not be empty.');
}
}
function beginLifeCycleTimer(debugID, timerType) {
if (currentFlushNesting === 0) {
return;
}
if (currentTimerType && !lifeCycleTimerHasWarned) {
warning(false, 'There is an internal error in the React performance measurement code. ' + 'Did not expect %s timer to start while %s timer is still in ' + 'progress for %s instance.', timerType, currentTimerType || 'no', debugID === currentTimerDebugID ? 'the same' : 'another');
lifeCycleTimerHasWarned = true;
}
currentTimerStartTime = performanceNow();
currentTimerNestedFlushDuration = 0;
currentTimerDebugID = debugID;
currentTimerType = timerType;
}
function endLifeCycleTimer(debugID, timerType) {
if (currentFlushNesting === 0) {
return;
}
if (currentTimerType !== timerType && !lifeCycleTimerHasWarned) {
warning(false, 'There is an internal error in the React performance measurement code. ' + 'We did not expect %s timer to stop while %s timer is still in ' + 'progress for %s instance. Please report this as a bug in React.', timerType, currentTimerType || 'no', debugID === currentTimerDebugID ? 'the same' : 'another');
lifeCycleTimerHasWarned = true;
}
if (_isProfiling) {
currentFlushMeasurements.push({
timerType: timerType,
instanceID: debugID,
duration: performanceNow() - currentTimerStartTime - currentTimerNestedFlushDuration
});
}
currentTimerStartTime = 0;
currentTimerNestedFlushDuration = 0;
currentTimerDebugID = null;
currentTimerType = null;
}
function pauseCurrentLifeCycleTimer() {
var currentTimer = {
startTime: currentTimerStartTime,
nestedFlushStartTime: performanceNow(),
debugID: currentTimerDebugID,
timerType: currentTimerType
};
lifeCycleTimerStack.push(currentTimer);
currentTimerStartTime = 0;
currentTimerNestedFlushDuration = 0;
currentTimerDebugID = null;
currentTimerType = null;
}
function resumeCurrentLifeCycleTimer() {
var _lifeCycleTimerStack$ = lifeCycleTimerStack.pop(),
startTime = _lifeCycleTimerStack$.startTime,
nestedFlushStartTime = _lifeCycleTimerStack$.nestedFlushStartTime,
debugID = _lifeCycleTimerStack$.debugID,
timerType = _lifeCycleTimerStack$.timerType;
var nestedFlushDuration = performanceNow() - nestedFlushStartTime;
currentTimerStartTime = startTime;
currentTimerNestedFlushDuration += nestedFlushDuration;
currentTimerDebugID = debugID;
currentTimerType = timerType;
}
var lastMarkTimeStamp = 0;
var canUsePerformanceMeasure = typeof performance !== 'undefined' && typeof performance.mark === 'function' && typeof performance.clearMarks === 'function' && typeof performance.measure === 'function' && typeof performance.clearMeasures === 'function';
function shouldMark(debugID) {
if (!_isProfiling || !canUsePerformanceMeasure) {
return false;
}
var element = ReactComponentTreeHook.getElement(debugID);
if (element == null || typeof element !== 'object') {
return false;
}
var isHostElement = typeof element.type === 'string';
if (isHostElement) {
return false;
}
return true;
}
function markBegin(debugID, markType) {
if (!shouldMark(debugID)) {
return;
}
var markName = debugID + '::' + markType;
lastMarkTimeStamp = performanceNow();
performance.mark(markName);
}
function markEnd(debugID, markType) {
if (!shouldMark(debugID)) {
return;
}
var markName = debugID + '::' + markType;
var displayName = ReactComponentTreeHook.getDisplayName(debugID) || 'Unknown';
var timeStamp = performanceNow();
if (timeStamp - lastMarkTimeStamp > 0.1) {
var measurementName = displayName + ' [' + markType + ']';
performance.measure(measurementName, markName);
}
performance.clearMarks(markName);
performance.clearMeasures(measurementName);
}
var ReactDebugTool = {
addHook: function addHook(hook) {
hooks.push(hook);
},
removeHook: function removeHook(hook) {
for (var i = 0; i < hooks.length; i++) {
if (hooks[i] === hook) {
hooks.splice(i, 1);
i--;
}
}
},
isProfiling: function isProfiling() {
return _isProfiling;
},
beginProfiling: function beginProfiling() {
if (_isProfiling) {
return;
}
_isProfiling = true;
flushHistory.length = 0;
resetMeasurements();
ReactDebugTool.addHook(ReactHostOperationHistoryHook);
},
endProfiling: function endProfiling() {
if (!_isProfiling) {
return;
}
_isProfiling = false;
resetMeasurements();
ReactDebugTool.removeHook(ReactHostOperationHistoryHook);
},
getFlushHistory: function getFlushHistory() {
return flushHistory;
},
onBeginFlush: function onBeginFlush() {
currentFlushNesting++;
resetMeasurements();
pauseCurrentLifeCycleTimer();
emitEvent('onBeginFlush');
},
onEndFlush: function onEndFlush() {
resetMeasurements();
currentFlushNesting--;
resumeCurrentLifeCycleTimer();
emitEvent('onEndFlush');
},
onBeginLifeCycleTimer: function onBeginLifeCycleTimer(debugID, timerType) {
checkDebugID(debugID);
emitEvent('onBeginLifeCycleTimer', debugID, timerType);
markBegin(debugID, timerType);
beginLifeCycleTimer(debugID, timerType);
},
onEndLifeCycleTimer: function onEndLifeCycleTimer(debugID, timerType) {
checkDebugID(debugID);
endLifeCycleTimer(debugID, timerType);
markEnd(debugID, timerType);
emitEvent('onEndLifeCycleTimer', debugID, timerType);
},
onBeginProcessingChildContext: function onBeginProcessingChildContext() {
emitEvent('onBeginProcessingChildContext');
},
onEndProcessingChildContext: function onEndProcessingChildContext() {
emitEvent('onEndProcessingChildContext');
},
onHostOperation: function onHostOperation(operation) {
checkDebugID(operation.instanceID);
emitEvent('onHostOperation', operation);
},
onSetState: function onSetState() {
emitEvent('onSetState');
},
onSetChildren: function onSetChildren(debugID, childDebugIDs) {
checkDebugID(debugID);
childDebugIDs.forEach(checkDebugID);
emitEvent('onSetChildren', debugID, childDebugIDs);
},
onBeforeMountComponent: function onBeforeMountComponent(debugID, element, parentDebugID) {
checkDebugID(debugID);
checkDebugID(parentDebugID, true);
emitEvent('onBeforeMountComponent', debugID, element, parentDebugID);
markBegin(debugID, 'mount');
},
onMountComponent: function onMountComponent(debugID) {
checkDebugID(debugID);
markEnd(debugID, 'mount');
emitEvent('onMountComponent', debugID);
},
onBeforeUpdateComponent: function onBeforeUpdateComponent(debugID, element) {
checkDebugID(debugID);
emitEvent('onBeforeUpdateComponent', debugID, element);
markBegin(debugID, 'update');
},
onUpdateComponent: function onUpdateComponent(debugID) {
checkDebugID(debugID);
markEnd(debugID, 'update');
emitEvent('onUpdateComponent', debugID);
},
onBeforeUnmountComponent: function onBeforeUnmountComponent(debugID) {
checkDebugID(debugID);
emitEvent('onBeforeUnmountComponent', debugID);
markBegin(debugID, 'unmount');
},
onUnmountComponent: function onUnmountComponent(debugID) {
checkDebugID(debugID);
markEnd(debugID, 'unmount');
emitEvent('onUnmountComponent', debugID);
},
onTestEvent: function onTestEvent() {
emitEvent('onTestEvent');
}
};
ReactDebugTool.addHook(ReactInvalidSetStateWarningHook);
ReactDebugTool.addHook(ReactComponentTreeHook);
var url = ExecutionEnvironment.canUseDOM && window.location.href || '';
if (/[?&]react_perf\b/.test(url)) {
ReactDebugTool.beginProfiling();
}
module.exports = ReactDebugTool;
}, 86, null, "ReactDebugTool");
__d(/* ReactInvalidSetStateWarningHook */function(global, require, module, exports) {
'use strict';
var warning = require(40 ); // 40 = fbjs/lib/warning
if (__DEV__) {
var processingChildContext = false;
var warnInvalidSetState = function warnInvalidSetState() {
warning(!processingChildContext, 'setState(...): Cannot call setState() inside getChildContext()');
};
}
var ReactInvalidSetStateWarningHook = {
onBeginProcessingChildContext: function onBeginProcessingChildContext() {
processingChildContext = true;
},
onEndProcessingChildContext: function onEndProcessingChildContext() {
processingChildContext = false;
},
onSetState: function onSetState() {
warnInvalidSetState();
}
};
module.exports = ReactInvalidSetStateWarningHook;
}, 87, null, "ReactInvalidSetStateWarningHook");
__d(/* ReactHostOperationHistoryHook */function(global, require, module, exports) {
'use strict';
var history = [];
var ReactHostOperationHistoryHook = {
onHostOperation: function onHostOperation(operation) {
history.push(operation);
},
clearHistory: function clearHistory() {
if (ReactHostOperationHistoryHook._preventClearing) {
return;
}
history = [];
},
getHistory: function getHistory() {
return history;
}
};
module.exports = ReactHostOperationHistoryHook;
}, 88, null, "ReactHostOperationHistoryHook");
__d(/* fbjs/lib/ExecutionEnvironment.js */function(global, require, module, exports) {
'use strict';
var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
var ExecutionEnvironment = {
canUseDOM: canUseDOM,
canUseWorkers: typeof Worker !== 'undefined',
canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent),
canUseViewport: canUseDOM && !!window.screen,
isInWorker: !canUseDOM };
module.exports = ExecutionEnvironment;
}, 89, null, "fbjs/lib/ExecutionEnvironment.js");
__d(/* fbjs/lib/performanceNow.js */function(global, require, module, exports) {'use strict';
var performance = require(91 ); // 91 = ./performance
var performanceNow;
if (performance.now) {
performanceNow = function performanceNow() {
return performance.now();
};
} else {
performanceNow = function performanceNow() {
return Date.now();
};
}
module.exports = performanceNow;
}, 90, null, "fbjs/lib/performanceNow.js");
__d(/* fbjs/lib/performance.js */function(global, require, module, exports) {
'use strict';
var ExecutionEnvironment = require(89 ); // 89 = ./ExecutionEnvironment
var performance;
if (ExecutionEnvironment.canUseDOM) {
performance = window.performance || window.msPerformance || window.webkitPerformance;
}
module.exports = performance || {};
}, 91, null, "fbjs/lib/performance.js");
__d(/* JSTimers */function(global, require, module, exports) {
'use strict';
var RCTTiming = require(80 ).Timing; // 80 = NativeModules
var JSTimersExecution = require(84 ); // 84 = JSTimersExecution
var parseErrorStack = require(93 ); // 93 = parseErrorStack
function _getFreeIndex() {
var freeIndex = JSTimersExecution.timerIDs.indexOf(null);
if (freeIndex === -1) {
freeIndex = JSTimersExecution.timerIDs.length;
}
return freeIndex;
}
function _allocateCallback(func, type) {
var id = JSTimersExecution.GUID++;
var freeIndex = _getFreeIndex();
JSTimersExecution.timerIDs[freeIndex] = id;
JSTimersExecution.callbacks[freeIndex] = func;
JSTimersExecution.types[freeIndex] = type;
if (__DEV__) {
var e = new Error();
e.framesToPop = 1;
var stack = parseErrorStack(e);
if (stack) {
JSTimersExecution.identifiers[freeIndex] = stack.shift();
}
}
return id;
}
function _freeCallback(timerID) {
if (timerID == null) {
return;
}
var index = JSTimersExecution.timerIDs.indexOf(timerID);
if (index !== -1) {
JSTimersExecution._clearIndex(index);
var type = JSTimersExecution.types[index];
if (type !== 'setImmediate' && type !== 'requestIdleCallback') {
RCTTiming.deleteTimer(timerID);
}
}
}
var JSTimers = {
setTimeout: function setTimeout(func, duration) {
for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
args[_key - 2] = arguments[_key];
}
var id = _allocateCallback(function () {
return func.apply(undefined, args);
}, 'setTimeout');
RCTTiming.createTimer(id, duration || 0, Date.now(), false);
return id;
},
setInterval: function setInterval(func, duration) {
for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
args[_key2 - 2] = arguments[_key2];
}
var id = _allocateCallback(function () {
return func.apply(undefined, args);
}, 'setInterval');
RCTTiming.createTimer(id, duration || 0, Date.now(), true);
return id;
},
setImmediate: function setImmediate(func) {
for (var _len3 = arguments.length, args = Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
args[_key3 - 1] = arguments[_key3];
}
var id = _allocateCallback(function () {
return func.apply(undefined, args);
}, 'setImmediate');
JSTimersExecution.immediates.push(id);
return id;
},
requestAnimationFrame: function requestAnimationFrame(func) {
var id = _allocateCallback(func, 'requestAnimationFrame');
RCTTiming.createTimer(id, 1, Date.now(), false);
return id;
},
requestIdleCallback: function requestIdleCallback(func) {
if (JSTimersExecution.requestIdleCallbacks.length === 0) {
RCTTiming.setSendIdleEvents(true);
}
var id = _allocateCallback(func, 'requestIdleCallback');
JSTimersExecution.requestIdleCallbacks.push(id);
return id;
},
cancelIdleCallback: function cancelIdleCallback(timerID) {
_freeCallback(timerID);
var index = JSTimersExecution.requestIdleCallbacks.indexOf(timerID);
if (index !== -1) {
JSTimersExecution.requestIdleCallbacks.splice(index, 1);
}
if (JSTimersExecution.requestIdleCallbacks.length === 0) {
RCTTiming.setSendIdleEvents(false);
}
},
clearTimeout: function clearTimeout(timerID) {
_freeCallback(timerID);
},
clearInterval: function clearInterval(timerID) {
_freeCallback(timerID);
},
clearImmediate: function clearImmediate(timerID) {
_freeCallback(timerID);
var index = JSTimersExecution.immediates.indexOf(timerID);
if (index !== -1) {
JSTimersExecution.immediates.splice(index, 1);
}
},
cancelAnimationFrame: function cancelAnimationFrame(timerID) {
_freeCallback(timerID);
}
};
module.exports = JSTimers;
}, 92, null, "JSTimers");
__d(/* parseErrorStack */function(global, require, module, exports) {
'use strict';
var stacktraceParser = require(94 ); // 94 = stacktrace-parser
function parseErrorStack(e) {
if (!e || !e.stack) {
return [];
}
var stack = Array.isArray(e.stack) ? e.stack : stacktraceParser.parse(e.stack);
var framesToPop = typeof e.framesToPop === 'number' ? e.framesToPop : 0;
while (framesToPop--) {
stack.shift();
}
return stack;
}
module.exports = parseErrorStack;
}, 93, null, "parseErrorStack");
__d(/* stacktrace-parser/index.js */function(global, require, module, exports) {module.exports = require(95 ); // 95 = ./lib/stacktrace-parser.js
}, 94, null, "stacktrace-parser/index.js");
__d(/* stacktrace-parser/lib/stacktrace-parser.js */function(global, require, module, exports) {
var UNKNOWN_FUNCTION = '<unknown>';
var StackTraceParser = {
parse: function parse(stackString) {
var chrome = /^\s*at (?:(?:(?:Anonymous function)?|((?:\[object object\])?\S+(?: \[as \S+\])?)) )?\(?((?:file|http|https):.*?):(\d+)(?::(\d+))?\)?\s*$/i,
gecko = /^(?:\s*([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i,
node = /^\s*at (?:((?:\[object object\])?\S+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i,
lines = stackString.split('\n'),
stack = [],
parts,
element;
for (var i = 0, j = lines.length; i < j; ++i) {
if (parts = gecko.exec(lines[i])) {
element = {
'file': parts[3],
'methodName': parts[1] || UNKNOWN_FUNCTION,
'lineNumber': +parts[4],
'column': parts[5] ? +parts[5] : null
};
} else if (parts = chrome.exec(lines[i])) {
element = {
'file': parts[2],
'methodName': parts[1] || UNKNOWN_FUNCTION,
'lineNumber': +parts[3],
'column': parts[4] ? +parts[4] : null
};
} else if (parts = node.exec(lines[i])) {
element = {
'file': parts[2],
'methodName': parts[1] || UNKNOWN_FUNCTION,
'lineNumber': +parts[3],
'column': parts[4] ? +parts[4] : null
};
} else {
continue;
}
stack.push(element);
}
return stack;
}
};
module.exports = StackTraceParser;
}, 95, null, "stacktrace-parser/lib/stacktrace-parser.js");
__d(/* deepFreezeAndThrowOnMutationInDev */function(global, require, module, exports) {
'use strict';
function deepFreezeAndThrowOnMutationInDev(object) {
if (__DEV__) {
if (typeof object !== 'object' || object === null || Object.isFrozen(object) || Object.isSealed(object)) {
return;
}
var keys = Object.keys(object);
for (var i = 0; i < keys.length; i++) {
var key = keys[i];
if (object.hasOwnProperty(key)) {
object.__defineGetter__(key, identity.bind(null, object[key]));
object.__defineSetter__(key, throwOnImmutableMutation.bind(null, key));
}
}
Object.freeze(object);
Object.seal(object);
for (var i = 0; i < keys.length; i++) {
var key = keys[i];
if (object.hasOwnProperty(key)) {
deepFreezeAndThrowOnMutationInDev(object[key]);
}
}
}
}
function throwOnImmutableMutation(key, value) {
throw Error('You attempted to set the key `' + key + '` with the value `' + JSON.stringify(value) + '` on an object that is meant to be immutable ' + 'and has been frozen.');
}
function identity(value) {
return value;
}
module.exports = deepFreezeAndThrowOnMutationInDev;
}, 96, null, "deepFreezeAndThrowOnMutationInDev");
__d(/* stringifySafe */function(global, require, module, exports) {
'use strict';
function stringifySafe(arg) {
var ret;
var type = typeof arg;
if (arg === undefined) {
ret = 'undefined';
} else if (arg === null) {
ret = 'null';
} else if (type === 'string') {
ret = '"' + arg + '"';
} else if (type === 'function') {
try {
ret = arg.toString();
} catch (e) {
ret = '[function unknown]';
}
} else {
try {
ret = JSON.stringify(arg);
} catch (e) {
if (typeof arg.toString === 'function') {
try {
ret = arg.toString();
} catch (E) {}
}
}
}
return ret || '["' + type + '" failed to stringify]';
}
module.exports = stringifySafe;
}, 97, null, "stringifySafe");
__d(/* HeapCapture */function(global, require, module, exports) {
'use strict';
var HeapCapture = {
captureHeap: function captureHeap(path) {
var error = null;
try {
global.nativeCaptureHeap(path);
console.log('HeapCapture.captureHeap succeeded: ' + path);
} catch (e) {
console.log('HeapCapture.captureHeap error: ' + e.toString());
error = e.toString();
}
require(80 ).JSCHeapCapture.captureComplete(path, error); // 80 = NativeModules
}
};
module.exports = HeapCapture;
}, 98, null, "HeapCapture");
__d(/* SamplingProfiler */function(global, require, module, exports) {
'use strict';
var SamplingProfiler = {
poke: function poke(token) {
var error = null;
var result = null;
try {
result = global.pokeSamplingProfiler();
if (result === null) {
console.log('The JSC Sampling Profiler has started');
} else {
console.log('The JSC Sampling Profiler has stopped');
}
} catch (e) {
console.log('Error occured when restarting Sampling Profiler: ' + e.toString());
error = e.toString();
}
require(80 ).JSCSamplingProfiler.operationComplete(token, result, error); // 80 = NativeModules
}
};
module.exports = SamplingProfiler;
}, 99, null, "SamplingProfiler");
__d(/* HMRClient */function(global, require, module, exports) {
'use strict';
var Platform = require(79 ); // 79 = Platform
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var HMRClient = {
enable: function enable(platform, bundleEntry, host, port) {
invariant(platform, 'Missing required parameter `platform`');
invariant(bundleEntry, 'Missing required paramenter `bundleEntry`');
invariant(host, 'Missing required paramenter `host`');
var WebSocket = require(101 ); // 101 = WebSocket
var wsHostPort = port !== null && port !== '' ? host + ':' + port : host;
var wsUrl = 'ws://' + wsHostPort + '/hot?' + ('platform=' + platform + '&') + ('bundleEntry=' + bundleEntry.replace('.bundle', '.js'));
var activeWS = new WebSocket(wsUrl);
activeWS.onerror = function (e) {
var error = 'Hot loading isn\'t working because it cannot connect to the development server.\n\nTry the following to fix the issue:\n- Ensure that the packager server is running and available on the same network';
if (Platform.OS === 'ios') {
error += '\n- Ensure that the Packager server URL is correctly set in AppDelegate';
} else {
error += '\n- Ensure that your device/emulator is connected to your machine and has USB debugging enabled - run \'adb devices\' to see a list of connected devices\n- If you\'re on a physical device connected to the same machine, run \'adb reverse tcp:8081 tcp:8081\' to forward requests from your device\n- If your device is on the same Wi-Fi network, set \'Debug server host & port for device\' in \'Dev settings\' to your machine\'s IP address and the port of the local dev server - e.g. 10.0.1.1:8081';
}
error += '\n\nURL: ' + host + ':' + port + '\n\nError: ' + e.message;
throw new Error(error);
};
activeWS.onmessage = function (_ref) {
var data = _ref.data;
var HMRLoadingView = require(120 ); // 120 = HMRLoadingView
data = JSON.parse(data);
switch (data.type) {
case 'update-start':
{
HMRLoadingView.showMessage('Hot Loading...');
break;
}
case 'update':
{
var _data$body = data.body,
modules = _data$body.modules,
sourceMappingURLs = _data$body.sourceMappingURLs,
sourceURLs = _data$body.sourceURLs,
inverseDependencies = _data$body.inverseDependencies;
if (Platform.OS === 'ios') {
var RCTRedBox = require(80 ).RedBox; // 80 = NativeModules
RCTRedBox && RCTRedBox.dismiss && RCTRedBox.dismiss();
} else {
var RCTExceptionsManager = require(80 ).ExceptionsManager; // 80 = NativeModules
RCTExceptionsManager && RCTExceptionsManager.dismissRedbox && RCTExceptionsManager.dismissRedbox();
}
modules.forEach(function (_ref2, i) {
var id = _ref2.id,
code = _ref2.code;
code = code + '\n\n' + sourceMappingURLs[i];
var injectFunction = typeof global.nativeInjectHMRUpdate === 'function' ? global.nativeInjectHMRUpdate : eval;
code = ['__accept(', id + ',', 'function(global,require,module,exports){', '' + code, '\n},', '' + JSON.stringify(inverseDependencies), ');'].join('');
injectFunction(code, sourceURLs[i]);
});
HMRLoadingView.hide();
break;
}
case 'update-done':
{
HMRLoadingView.hide();
break;
}
case 'error':
{
HMRLoadingView.hide();
throw new Error(data.body.type + ' ' + data.body.description);
}
default:
{
throw new Error('Unexpected message: ' + data);
}
}
};
}
};
module.exports = HMRClient;
}, 100, null, "HMRClient");
__d(/* WebSocket */function(global, require, module, exports) {
'use strict';
var NativeEventEmitter = require(102 ); // 102 = NativeEventEmitter
var Platform = require(79 ); // 79 = Platform
var RCTWebSocketModule = require(80 ).WebSocketModule; // 80 = NativeModules
var WebSocketEvent = require(113 ); // 113 = WebSocketEvent
var binaryToBase64 = require(114 ); // 114 = binaryToBase64
var EventTarget = require(116 ); // 116 = event-target-shim
var base64 = require(115 ); // 115 = base64-js
var CONNECTING = 0;
var OPEN = 1;
var CLOSING = 2;
var CLOSED = 3;
var CLOSE_NORMAL = 1000;
var WEBSOCKET_EVENTS = ['close', 'error', 'message', 'open'];
var nextWebSocketId = 0;
var WebSocket = function (_EventTarget) {
babelHelpers.inherits(WebSocket, _EventTarget);
function WebSocket(url, protocols, options) {
babelHelpers.classCallCheck(this, WebSocket);
var _this = babelHelpers.possibleConstructorReturn(this, (WebSocket.__proto__ || Object.getPrototypeOf(WebSocket)).call(this));
_this.CONNECTING = CONNECTING;
_this.OPEN = OPEN;
_this.CLOSING = CLOSING;
_this.CLOSED = CLOSED;
_this.readyState = CONNECTING;
if (typeof protocols === 'string') {
protocols = [protocols];
}
if (!Array.isArray(protocols)) {
protocols = null;
}
_this._eventEmitter = new NativeEventEmitter(RCTWebSocketModule);
_this._socketId = nextWebSocketId++;
RCTWebSocketModule.connect(url, protocols, options, _this._socketId);
_this._registerEvents();
return _this;
}
babelHelpers.createClass(WebSocket, [{
key: 'close',
value: function close(code, reason) {
if (this.readyState === this.CLOSING || this.readyState === this.CLOSED) {
return;
}
this.readyState = this.CLOSING;
this._close(code, reason);
}
}, {
key: 'send',
value: function send(data) {
if (this.readyState === this.CONNECTING) {
throw new Error('INVALID_STATE_ERR');
}
if (typeof data === 'string') {
RCTWebSocketModule.send(data, this._socketId);
return;
}
if (data instanceof ArrayBuffer || ArrayBuffer.isView(data)) {
RCTWebSocketModule.sendBinary(binaryToBase64(data), this._socketId);
return;
}
throw new Error('Unsupported data type');
}
}, {
key: 'ping',
value: function ping() {
if (this.readyState === this.CONNECTING) {
throw new Error('INVALID_STATE_ERR');
}
RCTWebSocketModule.ping(this._socketId);
}
}, {
key: '_close',
value: function _close(code, reason) {
if (Platform.OS === 'android') {
var statusCode = typeof code === 'number' ? code : CLOSE_NORMAL;
var closeReason = typeof reason === 'string' ? reason : '';
RCTWebSocketModule.close(statusCode, closeReason, this._socketId);
} else {
RCTWebSocketModule.close(this._socketId);
}
}
}, {
key: '_unregisterEvents',
value: function _unregisterEvents() {
this._subscriptions.forEach(function (e) {
return e.remove();
});
this._subscriptions = [];
}
}, {
key: '_registerEvents',
value: function _registerEvents() {
var _this2 = this;
this._subscriptions = [this._eventEmitter.addListener('websocketMessage', function (ev) {
if (ev.id !== _this2._socketId) {
return;
}
_this2.dispatchEvent(new WebSocketEvent('message', {
data: ev.type === 'binary' ? base64.toByteArray(ev.data).buffer : ev.data
}));
}), this._eventEmitter.addListener('websocketOpen', function (ev) {
if (ev.id !== _this2._socketId) {
return;
}
_this2.readyState = _this2.OPEN;
_this2.dispatchEvent(new WebSocketEvent('open'));
}), this._eventEmitter.addListener('websocketClosed', function (ev) {
if (ev.id !== _this2._socketId) {
return;
}
_this2.readyState = _this2.CLOSED;
_this2.dispatchEvent(new WebSocketEvent('close', {
code: ev.code,
reason: ev.reason
}));
_this2._unregisterEvents();
_this2.close();
}), this._eventEmitter.addListener('websocketFailed', function (ev) {
if (ev.id !== _this2._socketId) {
return;
}
_this2.readyState = _this2.CLOSED;
_this2.dispatchEvent(new WebSocketEvent('error', {
message: ev.message
}));
_this2.dispatchEvent(new WebSocketEvent('close', {
message: ev.message
}));
_this2._unregisterEvents();
_this2.close();
})];
}
}]);
return WebSocket;
}(EventTarget.apply(undefined, WEBSOCKET_EVENTS));
WebSocket.CONNECTING = CONNECTING;
WebSocket.OPEN = OPEN;
WebSocket.CLOSING = CLOSING;
WebSocket.CLOSED = CLOSED;
module.exports = WebSocket;
}, 101, null, "WebSocket");
__d(/* NativeEventEmitter */function(global, require, module, exports) {
'use strict';
var EventEmitter = require(103 ); // 103 = EventEmitter
var Platform = require(79 ); // 79 = Platform
var RCTDeviceEventEmitter = require(107 ); // 107 = RCTDeviceEventEmitter
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var NativeEventEmitter = function (_EventEmitter) {
babelHelpers.inherits(NativeEventEmitter, _EventEmitter);
function NativeEventEmitter(nativeModule) {
babelHelpers.classCallCheck(this, NativeEventEmitter);
var _this = babelHelpers.possibleConstructorReturn(this, (NativeEventEmitter.__proto__ || Object.getPrototypeOf(NativeEventEmitter)).call(this, RCTDeviceEventEmitter.sharedSubscriber));
if (Platform.OS === 'ios') {
invariant(nativeModule, 'Native module cannot be null.');
_this._nativeModule = nativeModule;
}
return _this;
}
babelHelpers.createClass(NativeEventEmitter, [{
key: 'addListener',
value: function addListener(eventType, listener, context) {
if (Platform.OS === 'ios') {
this._nativeModule.addListener(eventType);
}
return babelHelpers.get(NativeEventEmitter.prototype.__proto__ || Object.getPrototypeOf(NativeEventEmitter.prototype), 'addListener', this).call(this, eventType, listener, context);
}
}, {
key: 'removeAllListeners',
value: function removeAllListeners(eventType) {
invariant(eventType, 'eventType argument is required.');
if (Platform.OS === 'ios') {
var count = this.listeners(eventType).length;
this._nativeModule.removeListeners(count);
}
babelHelpers.get(NativeEventEmitter.prototype.__proto__ || Object.getPrototypeOf(NativeEventEmitter.prototype), 'removeAllListeners', this).call(this, eventType);
}
}, {
key: 'removeSubscription',
value: function removeSubscription(subscription) {
if (Platform.OS === 'ios') {
this._nativeModule.removeListeners(1);
}
babelHelpers.get(NativeEventEmitter.prototype.__proto__ || Object.getPrototypeOf(NativeEventEmitter.prototype), 'removeSubscription', this).call(this, subscription);
}
}]);
return NativeEventEmitter;
}(EventEmitter);
module.exports = NativeEventEmitter;
}, 102, null, "NativeEventEmitter");
__d(/* EventEmitter */function(global, require, module, exports) {
'use strict';
var EmitterSubscription = require(104 ); // 104 = EmitterSubscription
var EventSubscriptionVendor = require(106 ); // 106 = EventSubscriptionVendor
var emptyFunction = require(41 ); // 41 = fbjs/lib/emptyFunction
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var EventEmitter = function () {
function EventEmitter(subscriber) {
babelHelpers.classCallCheck(this, EventEmitter);
this._subscriber = subscriber || new EventSubscriptionVendor();
}
babelHelpers.createClass(EventEmitter, [{
key: 'addListener',
value: function addListener(eventType, listener, context) {
return this._subscriber.addSubscription(eventType, new EmitterSubscription(this, this._subscriber, listener, context));
}
}, {
key: 'once',
value: function once(eventType, listener, context) {
var _this = this;
return this.addListener(eventType, function () {
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
_this.removeCurrentListener();
listener.apply(context, args);
});
}
}, {
key: 'removeAllListeners',
value: function removeAllListeners(eventType) {
this._subscriber.removeAllSubscriptions(eventType);
}
}, {
key: 'removeCurrentListener',
value: function removeCurrentListener() {
invariant(!!this._currentSubscription, 'Not in an emitting cycle; there is no current subscription');
this.removeSubscription(this._currentSubscription);
}
}, {
key: 'removeSubscription',
value: function removeSubscription(subscription) {
invariant(subscription.emitter === this, 'Subscription does not belong to this emitter.');
this._subscriber.removeSubscription(subscription);
}
}, {
key: 'listeners',
value: function listeners(eventType) {
var subscriptions = this._subscriber.getSubscriptionsForType(eventType);
return subscriptions ? subscriptions.filter(emptyFunction.thatReturnsTrue).map(function (subscription) {
return subscription.listener;
}) : [];
}
}, {
key: 'emit',
value: function emit(eventType) {
var subscriptions = this._subscriber.getSubscriptionsForType(eventType);
if (subscriptions) {
for (var i = 0, l = subscriptions.length; i < l; i++) {
var subscription = subscriptions[i];
if (subscription) {
this._currentSubscription = subscription;
subscription.listener.apply(subscription.context, Array.prototype.slice.call(arguments, 1));
}
}
this._currentSubscription = null;
}
}
}, {
key: 'removeListener',
value: function removeListener(eventType, listener) {
var subscriptions = this._subscriber.getSubscriptionsForType(eventType);
if (subscriptions) {
for (var i = 0, l = subscriptions.length; i < l; i++) {
var subscription = subscriptions[i];
if (subscription && subscription.listener === listener) {
subscription.remove();
}
}
}
}
}]);
return EventEmitter;
}();
module.exports = EventEmitter;
}, 103, null, "EventEmitter");
__d(/* EmitterSubscription */function(global, require, module, exports) {
'use strict';
var EventSubscription = require(105 ); // 105 = EventSubscription
var EmitterSubscription = function (_EventSubscription) {
babelHelpers.inherits(EmitterSubscription, _EventSubscription);
function EmitterSubscription(emitter, subscriber, listener, context) {
babelHelpers.classCallCheck(this, EmitterSubscription);
var _this = babelHelpers.possibleConstructorReturn(this, (EmitterSubscription.__proto__ || Object.getPrototypeOf(EmitterSubscription)).call(this, subscriber));
_this.emitter = emitter;
_this.listener = listener;
_this.context = context;
return _this;
}
babelHelpers.createClass(EmitterSubscription, [{
key: 'remove',
value: function remove() {
this.emitter.removeSubscription(this);
}
}]);
return EmitterSubscription;
}(EventSubscription);
module.exports = EmitterSubscription;
}, 104, null, "EmitterSubscription");
__d(/* EventSubscription */function(global, require, module, exports) {
'use strict';
var EventSubscription = function () {
function EventSubscription(subscriber) {
babelHelpers.classCallCheck(this, EventSubscription);
this.subscriber = subscriber;
}
babelHelpers.createClass(EventSubscription, [{
key: 'remove',
value: function remove() {
this.subscriber.removeSubscription(this);
}
}]);
return EventSubscription;
}();
module.exports = EventSubscription;
}, 105, null, "EventSubscription");
__d(/* EventSubscriptionVendor */function(global, require, module, exports) {
'use strict';
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var EventSubscriptionVendor = function () {
function EventSubscriptionVendor() {
babelHelpers.classCallCheck(this, EventSubscriptionVendor);
this._subscriptionsForType = {};
this._currentSubscription = null;
}
babelHelpers.createClass(EventSubscriptionVendor, [{
key: 'addSubscription',
value: function addSubscription(eventType, subscription) {
invariant(subscription.subscriber === this, 'The subscriber of the subscription is incorrectly set.');
if (!this._subscriptionsForType[eventType]) {
this._subscriptionsForType[eventType] = [];
}
var key = this._subscriptionsForType[eventType].length;
this._subscriptionsForType[eventType].push(subscription);
subscription.eventType = eventType;
subscription.key = key;
return subscription;
}
}, {
key: 'removeAllSubscriptions',
value: function removeAllSubscriptions(eventType) {
if (eventType === undefined) {
this._subscriptionsForType = {};
} else {
delete this._subscriptionsForType[eventType];
}
}
}, {
key: 'removeSubscription',
value: function removeSubscription(subscription) {
var eventType = subscription.eventType;
var key = subscription.key;
var subscriptionsForType = this._subscriptionsForType[eventType];
if (subscriptionsForType) {
delete subscriptionsForType[key];
}
}
}, {
key: 'getSubscriptionsForType',
value: function getSubscriptionsForType(eventType) {
return this._subscriptionsForType[eventType];
}
}]);
return EventSubscriptionVendor;
}();
module.exports = EventSubscriptionVendor;
}, 106, null, "EventSubscriptionVendor");
__d(/* RCTDeviceEventEmitter */function(global, require, module, exports) {
'use strict';
var EventEmitter = require(103 ); // 103 = EventEmitter
var EventSubscriptionVendor = require(106 ); // 106 = EventSubscriptionVendor
var BatchedBridge = require(81 ); // 81 = BatchedBridge
var RCTDeviceEventEmitter = function (_EventEmitter) {
babelHelpers.inherits(RCTDeviceEventEmitter, _EventEmitter);
function RCTDeviceEventEmitter() {
babelHelpers.classCallCheck(this, RCTDeviceEventEmitter);
var sharedSubscriber = new EventSubscriptionVendor();
var _this = babelHelpers.possibleConstructorReturn(this, (RCTDeviceEventEmitter.__proto__ || Object.getPrototypeOf(RCTDeviceEventEmitter)).call(this, sharedSubscriber));
_this.sharedSubscriber = sharedSubscriber;
return _this;
}
babelHelpers.createClass(RCTDeviceEventEmitter, [{
key: '_nativeEventModule',
value: function _nativeEventModule(eventType) {
if (eventType) {
if (eventType.lastIndexOf('statusBar', 0) === 0) {
console.warn('`%s` event should be registered via the StatusBarIOS module', eventType);
return require(108 ); // 108 = StatusBarIOS
}
if (eventType.lastIndexOf('keyboard', 0) === 0) {
console.warn('`%s` event should be registered via the Keyboard module', eventType);
return require(109 ); // 109 = Keyboard
}
if (eventType === 'appStateDidChange' || eventType === 'memoryWarning') {
console.warn('`%s` event should be registered via the AppState module', eventType);
return require(111 ); // 111 = AppState
}
}
return null;
}
}, {
key: 'addListener',
value: function addListener(eventType, listener, context) {
var eventModule = this._nativeEventModule(eventType);
return eventModule ? eventModule.addListener(eventType, listener, context) : babelHelpers.get(RCTDeviceEventEmitter.prototype.__proto__ || Object.getPrototypeOf(RCTDeviceEventEmitter.prototype), 'addListener', this).call(this, eventType, listener, context);
}
}, {
key: 'removeAllListeners',
value: function removeAllListeners(eventType) {
var eventModule = this._nativeEventModule(eventType);
eventModule && eventType ? eventModule.removeAllListeners(eventType) : babelHelpers.get(RCTDeviceEventEmitter.prototype.__proto__ || Object.getPrototypeOf(RCTDeviceEventEmitter.prototype), 'removeAllListeners', this).call(this, eventType);
}
}, {
key: 'removeSubscription',
value: function removeSubscription(subscription) {
if (subscription.emitter !== this) {
subscription.emitter.removeSubscription(subscription);
} else {
babelHelpers.get(RCTDeviceEventEmitter.prototype.__proto__ || Object.getPrototypeOf(RCTDeviceEventEmitter.prototype), 'removeSubscription', this).call(this, subscription);
}
}
}]);
return RCTDeviceEventEmitter;
}(EventEmitter);
RCTDeviceEventEmitter = new RCTDeviceEventEmitter();
BatchedBridge.registerCallableModule('RCTDeviceEventEmitter', RCTDeviceEventEmitter);
module.exports = RCTDeviceEventEmitter;
}, 107, null, "RCTDeviceEventEmitter");
__d(/* StatusBarIOS */function(global, require, module, exports) {
'use strict';
var NativeEventEmitter = require(102 ); // 102 = NativeEventEmitter
var _require = require(80 ), // 80 = NativeModules
StatusBarManager = _require.StatusBarManager;
var StatusBarIOS = function (_NativeEventEmitter) {
babelHelpers.inherits(StatusBarIOS, _NativeEventEmitter);
function StatusBarIOS() {
babelHelpers.classCallCheck(this, StatusBarIOS);
return babelHelpers.possibleConstructorReturn(this, (StatusBarIOS.__proto__ || Object.getPrototypeOf(StatusBarIOS)).apply(this, arguments));
}
return StatusBarIOS;
}(NativeEventEmitter);
module.exports = new StatusBarIOS(StatusBarManager);
}, 108, null, "StatusBarIOS");
__d(/* Keyboard */function(global, require, module, exports) {
'use strict';
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var NativeEventEmitter = require(102 ); // 102 = NativeEventEmitter
var KeyboardObserver = require(80 ).KeyboardObserver; // 80 = NativeModules
var dismissKeyboard = require(110 ); // 110 = dismissKeyboard
var KeyboardEventEmitter = new NativeEventEmitter(KeyboardObserver);
var Keyboard = {
addListener: function addListener(eventName, callback) {
invariant(false, 'Dummy method used for documentation');
},
removeListener: function removeListener(eventName, callback) {
invariant(false, 'Dummy method used for documentation');
},
removeAllListeners: function removeAllListeners(eventName) {
invariant(false, 'Dummy method used for documentation');
},
dismiss: function dismiss() {
invariant(false, 'Dummy method used for documentation');
}
};
Keyboard = KeyboardEventEmitter;
Keyboard.dismiss = dismissKeyboard;
module.exports = Keyboard;
}, 109, null, "Keyboard");
__d(/* dismissKeyboard */function(global, require, module, exports) {
'use strict';
var TextInputState = require(78 ); // 78 = TextInputState
function dismissKeyboard() {
TextInputState.blurTextInput(TextInputState.currentlyFocusedField());
}
module.exports = dismissKeyboard;
}, 110, null, "dismissKeyboard");
__d(/* AppState */function(global, require, module, exports) {
'use strict';
var NativeEventEmitter = require(102 ); // 102 = NativeEventEmitter
var NativeModules = require(80 ); // 80 = NativeModules
var RCTAppState = NativeModules.AppState;
var logError = require(112 ); // 112 = logError
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var AppState = function (_NativeEventEmitter) {
babelHelpers.inherits(AppState, _NativeEventEmitter);
function AppState() {
babelHelpers.classCallCheck(this, AppState);
var _this = babelHelpers.possibleConstructorReturn(this, (AppState.__proto__ || Object.getPrototypeOf(AppState)).call(this, RCTAppState));
_this._eventHandlers = {
change: new Map(),
memoryWarning: new Map()
};
_this.currentState = RCTAppState.initialAppState || 'active';
_this.addListener('appStateDidChange', function (appStateData) {
_this.currentState = appStateData.app_state;
});
RCTAppState.getCurrentAppState(function (appStateData) {
_this.currentState = appStateData.app_state;
}, logError);
return _this;
}
babelHelpers.createClass(AppState, [{
key: 'addEventListener',
value: function addEventListener(type, handler) {
invariant(['change', 'memoryWarning'].indexOf(type) !== -1, 'Trying to subscribe to unknown event: "%s"', type);
if (type === 'change') {
this._eventHandlers[type].set(handler, this.addListener('appStateDidChange', function (appStateData) {
handler(appStateData.app_state);
}));
} else if (type === 'memoryWarning') {
this._eventHandlers[type].set(handler, this.addListener('memoryWarning', handler));
}
}
}, {
key: 'removeEventListener',
value: function removeEventListener(type, handler) {
invariant(['change', 'memoryWarning'].indexOf(type) !== -1, 'Trying to remove listener for unknown event: "%s"', type);
if (!this._eventHandlers[type].has(handler)) {
return;
}
this._eventHandlers[type].get(handler).remove();
this._eventHandlers[type].delete(handler);
}
}]);
return AppState;
}(NativeEventEmitter);
AppState = new AppState();
module.exports = AppState;
}, 111, null, "AppState");
__d(/* logError */function(global, require, module, exports) {
'use strict';
var logError = function logError() {
if (arguments.length === 1 && arguments[0] instanceof Error) {
var err = arguments[0];
console.error('Error: "' + err.message + '". Stack:\n' + err.stack);
} else {
console.error.apply(console, arguments);
}
};
module.exports = logError;
}, 112, null, "logError");
__d(/* WebSocketEvent */function(global, require, module, exports) {
'use strict';
var WebSocketEvent = function WebSocketEvent(type, eventInitDict) {
babelHelpers.classCallCheck(this, WebSocketEvent);
this.type = type.toString();
babelHelpers.extends(this, eventInitDict);
};
module.exports = WebSocketEvent;
}, 113, null, "WebSocketEvent");
__d(/* binaryToBase64 */function(global, require, module, exports) {
'use strict';
var base64 = require(115 ); // 115 = base64-js
function binaryToBase64(data) {
if (data instanceof ArrayBuffer) {
data = new Uint8Array(data);
}
if (data instanceof Uint8Array) {
return base64.fromByteArray(data);
}
if (!ArrayBuffer.isView(data)) {
throw new Error('data must be ArrayBuffer or typed array');
}
var _data = data,
buffer = _data.buffer,
byteOffset = _data.byteOffset,
byteLength = _data.byteLength;
return base64.fromByteArray(new Uint8Array(buffer, byteOffset, byteLength));
}
module.exports = binaryToBase64;
}, 114, null, "binaryToBase64");
__d(/* base64-js/index.js */function(global, require, module, exports) {'use strict';
exports.byteLength = byteLength;
exports.toByteArray = toByteArray;
exports.fromByteArray = fromByteArray;
var lookup = [];
var revLookup = [];
var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array;
var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
for (var i = 0, len = code.length; i < len; ++i) {
lookup[i] = code[i];
revLookup[code.charCodeAt(i)] = i;
}
revLookup['-'.charCodeAt(0)] = 62;
revLookup['_'.charCodeAt(0)] = 63;
function placeHoldersCount(b64) {
var len = b64.length;
if (len % 4 > 0) {
throw new Error('Invalid string. Length must be a multiple of 4');
}
return b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0;
}
function byteLength(b64) {
return b64.length * 3 / 4 - placeHoldersCount(b64);
}
function toByteArray(b64) {
var i, l, tmp, placeHolders, arr;
var len = b64.length;
placeHolders = placeHoldersCount(b64);
arr = new Arr(len * 3 / 4 - placeHolders);
l = placeHolders > 0 ? len - 4 : len;
var L = 0;
for (i = 0; i < l; i += 4) {
tmp = revLookup[b64.charCodeAt(i)] << 18 | revLookup[b64.charCodeAt(i + 1)] << 12 | revLookup[b64.charCodeAt(i + 2)] << 6 | revLookup[b64.charCodeAt(i + 3)];
arr[L++] = tmp >> 16 & 0xFF;
arr[L++] = tmp >> 8 & 0xFF;
arr[L++] = tmp & 0xFF;
}
if (placeHolders === 2) {
tmp = revLookup[b64.charCodeAt(i)] << 2 | revLookup[b64.charCodeAt(i + 1)] >> 4;
arr[L++] = tmp & 0xFF;
} else if (placeHolders === 1) {
tmp = revLookup[b64.charCodeAt(i)] << 10 | revLookup[b64.charCodeAt(i + 1)] << 4 | revLookup[b64.charCodeAt(i + 2)] >> 2;
arr[L++] = tmp >> 8 & 0xFF;
arr[L++] = tmp & 0xFF;
}
return arr;
}
function tripletToBase64(num) {
return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F];
}
function encodeChunk(uint8, start, end) {
var tmp;
var output = [];
for (var i = start; i < end; i += 3) {
tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + uint8[i + 2];
output.push(tripletToBase64(tmp));
}
return output.join('');
}
function fromByteArray(uint8) {
var tmp;
var len = uint8.length;
var extraBytes = len % 3;
var output = '';
var parts = [];
var maxChunkLength = 16383;
for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
parts.push(encodeChunk(uint8, i, i + maxChunkLength > len2 ? len2 : i + maxChunkLength));
}
if (extraBytes === 1) {
tmp = uint8[len - 1];
output += lookup[tmp >> 2];
output += lookup[tmp << 4 & 0x3F];
output += '==';
} else if (extraBytes === 2) {
tmp = (uint8[len - 2] << 8) + uint8[len - 1];
output += lookup[tmp >> 10];
output += lookup[tmp >> 4 & 0x3F];
output += lookup[tmp << 2 & 0x3F];
output += '=';
}
parts.push(output);
return parts.join('');
}
}, 115, null, "base64-js/index.js");
__d(/* event-target-shim/lib/event-target.js */function(global, require, module, exports) {
"use strict";
var Commons = require(117 ); // 117 = ./commons
var CustomEventTarget = require(118 ); // 118 = ./custom-event-target
var EventWrapper = require(119 ); // 119 = ./event-wrapper
var LISTENERS = Commons.LISTENERS;
var CAPTURE = Commons.CAPTURE;
var BUBBLE = Commons.BUBBLE;
var ATTRIBUTE = Commons.ATTRIBUTE;
var newNode = Commons.newNode;
var defineCustomEventTarget = CustomEventTarget.defineCustomEventTarget;
var createEventWrapper = EventWrapper.createEventWrapper;
var STOP_IMMEDIATE_PROPAGATION_FLAG = EventWrapper.STOP_IMMEDIATE_PROPAGATION_FLAG;
var HAS_EVENTTARGET_INTERFACE = typeof window !== "undefined" && typeof window.EventTarget !== "undefined";
var EventTarget = module.exports = function EventTarget() {
if (this instanceof EventTarget) {
Object.defineProperty(this, LISTENERS, { value: Object.create(null) });
} else if (arguments.length === 1 && Array.isArray(arguments[0])) {
return defineCustomEventTarget(EventTarget, arguments[0]);
} else if (arguments.length > 0) {
var types = Array(arguments.length);
for (var i = 0; i < arguments.length; ++i) {
types[i] = arguments[i];
}
return defineCustomEventTarget(EventTarget, types);
} else {
throw new TypeError("Cannot call a class as a function");
}
};
EventTarget.prototype = Object.create((HAS_EVENTTARGET_INTERFACE ? window.EventTarget : Object).prototype, {
constructor: {
value: EventTarget,
writable: true,
configurable: true
},
addEventListener: {
value: function addEventListener(type, listener, capture) {
if (listener == null) {
return false;
}
if (typeof listener !== "function" && typeof listener !== "object") {
throw new TypeError("\"listener\" is not an object.");
}
var kind = capture ? CAPTURE : BUBBLE;
var node = this[LISTENERS][type];
if (node == null) {
this[LISTENERS][type] = newNode(listener, kind);
return true;
}
var prev = null;
while (node != null) {
if (node.listener === listener && node.kind === kind) {
return false;
}
prev = node;
node = node.next;
}
prev.next = newNode(listener, kind);
return true;
},
configurable: true,
writable: true
},
removeEventListener: {
value: function removeEventListener(type, listener, capture) {
if (listener == null) {
return false;
}
var kind = capture ? CAPTURE : BUBBLE;
var prev = null;
var node = this[LISTENERS][type];
while (node != null) {
if (node.listener === listener && node.kind === kind) {
if (prev == null) {
this[LISTENERS][type] = node.next;
} else {
prev.next = node.next;
}
return true;
}
prev = node;
node = node.next;
}
return false;
},
configurable: true,
writable: true
},
dispatchEvent: {
value: function dispatchEvent(event) {
var node = this[LISTENERS][event.type];
if (node == null) {
return true;
}
var wrapped = createEventWrapper(event, this);
while (node != null) {
if (typeof node.listener === "function") {
node.listener.call(this, wrapped);
} else if (node.kind !== ATTRIBUTE && typeof node.listener.handleEvent === "function") {
node.listener.handleEvent(wrapped);
}
if (wrapped[STOP_IMMEDIATE_PROPAGATION_FLAG]) {
break;
}
node = node.next;
}
return !wrapped.defaultPrevented;
},
configurable: true,
writable: true
}
});
}, 116, null, "event-target-shim/lib/event-target.js");
__d(/* event-target-shim/lib/commons.js */function(global, require, module, exports) {
"use strict";
var createUniqueKey = exports.createUniqueKey = typeof Symbol !== "undefined" ? Symbol : function createUniqueKey(name) {
return "[[" + name + "_" + Math.random().toFixed(8).slice(2) + "]]";
};
exports.LISTENERS = createUniqueKey("listeners");
exports.CAPTURE = 1;
exports.BUBBLE = 2;
exports.ATTRIBUTE = 3;
exports.newNode = function newNode(listener, kind) {
return { listener: listener, kind: kind, next: null };
};
}, 117, null, "event-target-shim/lib/commons.js");
__d(/* event-target-shim/lib/custom-event-target.js */function(global, require, module, exports) {
"use strict";
var Commons = require(117 ); // 117 = ./commons
var LISTENERS = Commons.LISTENERS;
var ATTRIBUTE = Commons.ATTRIBUTE;
var newNode = Commons.newNode;
function getAttributeListener(eventTarget, type) {
var node = eventTarget[LISTENERS][type];
while (node != null) {
if (node.kind === ATTRIBUTE) {
return node.listener;
}
node = node.next;
}
return null;
}
function setAttributeListener(eventTarget, type, listener) {
if (typeof listener !== "function" && typeof listener !== "object") {
listener = null;
}
var prev = null;
var node = eventTarget[LISTENERS][type];
while (node != null) {
if (node.kind === ATTRIBUTE) {
if (prev == null) {
eventTarget[LISTENERS][type] = node.next;
} else {
prev.next = node.next;
}
} else {
prev = node;
}
node = node.next;
}
if (listener != null) {
if (prev == null) {
eventTarget[LISTENERS][type] = newNode(listener, ATTRIBUTE);
} else {
prev.next = newNode(listener, ATTRIBUTE);
}
}
}
exports.defineCustomEventTarget = function (EventTargetBase, types) {
function EventTarget() {
EventTargetBase.call(this);
}
var descripter = {
constructor: {
value: EventTarget,
configurable: true,
writable: true
}
};
types.forEach(function (type) {
descripter["on" + type] = {
get: function get() {
return getAttributeListener(this, type);
},
set: function set(listener) {
setAttributeListener(this, type, listener);
},
configurable: true,
enumerable: true
};
});
EventTarget.prototype = Object.create(EventTargetBase.prototype, descripter);
return EventTarget;
};
}, 118, null, "event-target-shim/lib/custom-event-target.js");
__d(/* event-target-shim/lib/event-wrapper.js */function(global, require, module, exports) {
"use strict";
var createUniqueKey = require(117 ).createUniqueKey; // 117 = ./commons
var STOP_IMMEDIATE_PROPAGATION_FLAG = createUniqueKey("stop_immediate_propagation_flag");
var CANCELED_FLAG = createUniqueKey("canceled_flag");
var ORIGINAL_EVENT = createUniqueKey("original_event");
var wrapperPrototypeDefinition = Object.freeze({
stopPropagation: Object.freeze({
value: function stopPropagation() {
var e = this[ORIGINAL_EVENT];
if (typeof e.stopPropagation === "function") {
e.stopPropagation();
}
},
writable: true,
configurable: true
}),
stopImmediatePropagation: Object.freeze({
value: function stopImmediatePropagation() {
this[STOP_IMMEDIATE_PROPAGATION_FLAG] = true;
var e = this[ORIGINAL_EVENT];
if (typeof e.stopImmediatePropagation === "function") {
e.stopImmediatePropagation();
}
},
writable: true,
configurable: true
}),
preventDefault: Object.freeze({
value: function preventDefault() {
if (this.cancelable === true) {
this[CANCELED_FLAG] = true;
}
var e = this[ORIGINAL_EVENT];
if (typeof e.preventDefault === "function") {
e.preventDefault();
}
},
writable: true,
configurable: true
}),
defaultPrevented: Object.freeze({
get: function defaultPrevented() {
return this[CANCELED_FLAG];
},
enumerable: true,
configurable: true
})
});
exports.STOP_IMMEDIATE_PROPAGATION_FLAG = STOP_IMMEDIATE_PROPAGATION_FLAG;
exports.createEventWrapper = function createEventWrapper(event, eventTarget) {
var timeStamp = typeof event.timeStamp === "number" ? event.timeStamp : Date.now();
var propertyDefinition = {
type: { value: event.type, enumerable: true },
target: { value: eventTarget, enumerable: true },
currentTarget: { value: eventTarget, enumerable: true },
eventPhase: { value: 2, enumerable: true },
bubbles: { value: Boolean(event.bubbles), enumerable: true },
cancelable: { value: Boolean(event.cancelable), enumerable: true },
timeStamp: { value: timeStamp, enumerable: true },
isTrusted: { value: false, enumerable: true }
};
propertyDefinition[STOP_IMMEDIATE_PROPAGATION_FLAG] = { value: false, writable: true };
propertyDefinition[CANCELED_FLAG] = { value: false, writable: true };
propertyDefinition[ORIGINAL_EVENT] = { value: event };
if (typeof event.detail !== "undefined") {
propertyDefinition.detail = { value: event.detail, enumerable: true };
}
return Object.create(Object.create(event, wrapperPrototypeDefinition), propertyDefinition);
};
}, 119, null, "event-target-shim/lib/event-wrapper.js");
__d(/* HMRLoadingView */function(global, require, module, exports) {
'use strict';
var processColor = require(121 ); // 121 = processColor
var _require = require(80 ), // 80 = NativeModules
DevLoadingView = _require.DevLoadingView;
var HMRLoadingView = function () {
function HMRLoadingView() {
babelHelpers.classCallCheck(this, HMRLoadingView);
}
babelHelpers.createClass(HMRLoadingView, null, [{
key: 'showMessage',
value: function showMessage(message) {
DevLoadingView.showMessage(message, processColor('#000000'), processColor('#aaaaaa'));
}
}, {
key: 'hide',
value: function hide() {
DevLoadingView.hide();
}
}]);
return HMRLoadingView;
}();
module.exports = HMRLoadingView;
}, 120, null, "HMRLoadingView");
__d(/* processColor */function(global, require, module, exports) {
'use strict';
var Platform = require(79 ); // 79 = Platform
var normalizeColor = require(72 ); // 72 = normalizeColor
function processColor(color) {
if (color === undefined || color === null) {
return color;
}
var int32Color = normalizeColor(color);
if (int32Color === null) {
return undefined;
}
int32Color = (int32Color << 24 | int32Color >>> 8) >>> 0;
if (Platform.OS === 'android') {
int32Color = int32Color | 0x0;
}
return int32Color;
}
module.exports = processColor;
}, 121, null, "processColor");
__d(/* defineLazyObjectProperty */function(global, require, module, exports) {
'use strict';
function defineLazyObjectProperty(object, name, descriptor) {
var get = descriptor.get;
var enumerable = descriptor.enumerable !== false;
var writable = descriptor.writable !== false;
var value = void 0;
var valueSet = false;
function getValue() {
if (!valueSet) {
valueSet = true;
setValue(get());
}
return value;
}
function setValue(newValue) {
value = newValue;
valueSet = true;
Object.defineProperty(object, name, {
value: newValue,
configurable: true,
enumerable: enumerable,
writable: writable
});
}
Object.defineProperty(object, name, {
get: getValue,
set: setValue,
configurable: true,
enumerable: enumerable
});
}
module.exports = defineLazyObjectProperty;
}, 122, null, "defineLazyObjectProperty");
__d(/* UIManager */function(global, require, module, exports) {
'use strict';
var NativeModules = require(80 ); // 80 = NativeModules
var Platform = require(79 ); // 79 = Platform
var defineLazyObjectProperty = require(122 ); // 122 = defineLazyObjectProperty
var findNodeHandle = require(124 ); // 124 = findNodeHandle
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var UIManager = NativeModules.UIManager;
invariant(UIManager, 'UIManager is undefined. The native module config is probably incorrect.');
var _takeSnapshot = UIManager.takeSnapshot;
UIManager.takeSnapshot = function _callee(view, options) {
return regeneratorRuntime.async(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
if (_takeSnapshot) {
_context.next = 3;
break;
}
console.warn('UIManager.takeSnapshot is not available on this platform');
return _context.abrupt('return');
case 3:
if (typeof view !== 'number' && view !== 'window') {
view = findNodeHandle(view) || 'window';
}
return _context.abrupt('return', _takeSnapshot(view, options));
case 5:
case 'end':
return _context.stop();
}
}
}, null, this);
};
if (Platform.OS === 'ios') {
Object.keys(UIManager).forEach(function (viewName) {
var viewConfig = UIManager[viewName];
if (viewConfig.Manager) {
defineLazyObjectProperty(viewConfig, 'Constants', {
get: function get() {
var viewManager = NativeModules[viewConfig.Manager];
var constants = {};
viewManager && Object.keys(viewManager).forEach(function (key) {
var value = viewManager[key];
if (typeof value !== 'function') {
constants[key] = value;
}
});
return constants;
}
});
defineLazyObjectProperty(viewConfig, 'Commands', {
get: function get() {
var viewManager = NativeModules[viewConfig.Manager];
var commands = {};
var index = 0;
viewManager && Object.keys(viewManager).forEach(function (key) {
var value = viewManager[key];
if (typeof value === 'function') {
commands[key] = index++;
}
});
return commands;
}
});
}
});
} else if (Platform.OS === 'android' && UIManager.AndroidLazyViewManagersEnabled) {
UIManager.ViewManagerNames.forEach(function (viewManagerName) {
defineLazyObjectProperty(UIManager, viewManagerName, {
get: function get() {
return NativeModules[viewManagerName.replace(/^(RCT|RK)/, '')];
}
});
});
}
module.exports = UIManager;
}, 123, null, "UIManager");
__d(/* findNodeHandle */function(global, require, module, exports) {
'use strict';
var ReactCurrentOwner = require(49 ); // 49 = react/lib/ReactCurrentOwner
var ReactInstanceMap = require(125 ); // 125 = ReactInstanceMap
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var warning = require(40 ); // 40 = fbjs/lib/warning
function findNodeHandle(componentOrHandle) {
if (__DEV__) {
var owner = ReactCurrentOwner.current;
if (owner !== null) {
warning(owner._warnedAboutRefsInRender, '%s is accessing findNodeHandle inside its render(). ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', owner.getName() || 'A component');
owner._warnedAboutRefsInRender = true;
}
}
if (componentOrHandle == null) {
return null;
}
if (typeof componentOrHandle === 'number') {
return componentOrHandle;
}
var component = componentOrHandle;
var internalInstance = ReactInstanceMap.get(component);
if (internalInstance) {
return internalInstance.getHostNode();
} else {
var rootNodeID = component._rootNodeID;
if (rootNodeID) {
return rootNodeID;
} else {
invariant(typeof component === 'object' && '_rootNodeID' in component || component.render != null && typeof component.render === 'function', 'findNodeHandle(...): Argument is not a component ' + '(type: %s, keys: %s)', typeof component, Object.keys(component));
invariant(false, 'findNodeHandle(...): Unable to find node handle for unmounted ' + 'component.');
}
}
}
module.exports = findNodeHandle;
}, 124, null, "findNodeHandle");
__d(/* ReactInstanceMap */function(global, require, module, exports) {
'use strict';
var ReactInstanceMap = {
remove: function remove(key) {
key._reactInternalInstance = undefined;
},
get: function get(key) {
return key._reactInternalInstance;
},
has: function has(key) {
return key._reactInternalInstance !== undefined;
},
set: function set(key, value) {
key._reactInternalInstance = value;
}
};
module.exports = ReactInstanceMap;
}, 125, null, "ReactInstanceMap");
__d(/* React */function(global, require, module, exports) {
'use strict';
module.exports = require(35 ); // 35 = react/lib/React
}, 126, null, "React");
__d(/* StyleSheet */function(global, require, module, exports) {
'use strict';
var PixelRatio = require(128 ); // 128 = PixelRatio
var ReactNativePropRegistry = require(75 ); // 75 = ReactNativePropRegistry
var ReactNativeStyleAttributes = require(130 ); // 130 = ReactNativeStyleAttributes
var StyleSheetValidation = require(145 ); // 145 = StyleSheetValidation
var flatten = require(77 ); // 77 = flattenStyle
var hairlineWidth = PixelRatio.roundToNearestPixel(0.4);
if (hairlineWidth === 0) {
hairlineWidth = 1 / PixelRatio.get();
}
var absoluteFillObject = {
position: 'absolute',
left: 0,
right: 0,
top: 0,
bottom: 0
};
var absoluteFill = ReactNativePropRegistry.register(absoluteFillObject);
module.exports = {
hairlineWidth: hairlineWidth,
absoluteFill: absoluteFill,
absoluteFillObject: absoluteFillObject,
flatten: flatten,
setStyleAttributePreprocessor: function setStyleAttributePreprocessor(property, process) {
var value = void 0;
if (typeof ReactNativeStyleAttributes[property] === 'string') {
value = {};
} else if (typeof ReactNativeStyleAttributes[property] === 'object') {
value = ReactNativeStyleAttributes[property];
} else {
console.error(property + ' is not a valid style attribute');
return;
}
if (__DEV__ && typeof value.process === 'function') {
console.warn('Overwriting ' + property + ' style attribute preprocessor');
}
ReactNativeStyleAttributes[property] = babelHelpers.extends({}, value, { process: process });
},
create: function create(obj) {
var result = {};
for (var key in obj) {
StyleSheetValidation.validateStyle(key, obj);
result[key] = ReactNativePropRegistry.register(obj[key]);
}
return result;
}
};
}, 127, null, "StyleSheet");
__d(/* PixelRatio */function(global, require, module, exports) {
'use strict';
var Dimensions = require(129 ); // 129 = Dimensions
var PixelRatio = function () {
function PixelRatio() {
babelHelpers.classCallCheck(this, PixelRatio);
}
babelHelpers.createClass(PixelRatio, null, [{
key: 'get',
value: function get() {
return Dimensions.get('window').scale;
}
}, {
key: 'getFontScale',
value: function getFontScale() {
return Dimensions.get('window').fontScale || PixelRatio.get();
}
}, {
key: 'getPixelSizeForLayoutSize',
value: function getPixelSizeForLayoutSize(layoutSize) {
return Math.round(layoutSize * PixelRatio.get());
}
}, {
key: 'roundToNearestPixel',
value: function roundToNearestPixel(layoutSize) {
var ratio = PixelRatio.get();
return Math.round(layoutSize * ratio) / ratio;
}
}, {
key: 'startDetecting',
value: function startDetecting() {}
}]);
return PixelRatio;
}();
module.exports = PixelRatio;
}, 128, null, "PixelRatio");
__d(/* Dimensions */function(global, require, module, exports) {
'use strict';
var Platform = require(79 ); // 79 = Platform
var UIManager = require(123 ); // 123 = UIManager
var RCTDeviceEventEmitter = require(107 ); // 107 = RCTDeviceEventEmitter
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var dimensions = {};
var Dimensions = function () {
function Dimensions() {
babelHelpers.classCallCheck(this, Dimensions);
}
babelHelpers.createClass(Dimensions, null, [{
key: 'set',
value: function set(dims) {
if (dims && dims.windowPhysicalPixels) {
dims = JSON.parse(JSON.stringify(dims));
var windowPhysicalPixels = dims.windowPhysicalPixels;
dims.window = {
width: windowPhysicalPixels.width / windowPhysicalPixels.scale,
height: windowPhysicalPixels.height / windowPhysicalPixels.scale,
scale: windowPhysicalPixels.scale,
fontScale: windowPhysicalPixels.fontScale
};
if (Platform.OS === 'android') {
var screenPhysicalPixels = dims.screenPhysicalPixels;
dims.screen = {
width: screenPhysicalPixels.width / screenPhysicalPixels.scale,
height: screenPhysicalPixels.height / screenPhysicalPixels.scale,
scale: screenPhysicalPixels.scale,
fontScale: screenPhysicalPixels.fontScale
};
delete dims.screenPhysicalPixels;
} else {
dims.screen = dims.window;
}
delete dims.windowPhysicalPixels;
}
babelHelpers.extends(dimensions, dims);
}
}, {
key: 'get',
value: function get(dim) {
invariant(dimensions[dim], 'No dimension set for key ' + dim);
return dimensions[dim];
}
}]);
return Dimensions;
}();
Dimensions.set(UIManager.Dimensions);
RCTDeviceEventEmitter.addListener('didUpdateDimensions', function (update) {
Dimensions.set(update);
});
module.exports = Dimensions;
}, 129, null, "Dimensions");
__d(/* ReactNativeStyleAttributes */function(global, require, module, exports) {
'use strict';
var ImageStylePropTypes = require(131 ); // 131 = ImageStylePropTypes
var TextStylePropTypes = require(139 ); // 139 = TextStylePropTypes
var ViewStylePropTypes = require(140 ); // 140 = ViewStylePropTypes
var keyMirror = require(133 ); // 133 = fbjs/lib/keyMirror
var matricesDiffer = require(141 ); // 141 = matricesDiffer
var processColor = require(121 ); // 121 = processColor
var processTransform = require(142 ); // 142 = processTransform
var sizesDiffer = require(144 ); // 144 = sizesDiffer
var ReactNativeStyleAttributes = babelHelpers.extends({}, keyMirror(ViewStylePropTypes), keyMirror(TextStylePropTypes), keyMirror(ImageStylePropTypes));
ReactNativeStyleAttributes.transform = { process: processTransform };
ReactNativeStyleAttributes.transformMatrix = { diff: matricesDiffer };
ReactNativeStyleAttributes.shadowOffset = { diff: sizesDiffer };
ReactNativeStyleAttributes.decomposedMatrix = 'decomposedMatrix';
var colorAttributes = { process: processColor };
ReactNativeStyleAttributes.backgroundColor = colorAttributes;
ReactNativeStyleAttributes.borderBottomColor = colorAttributes;
ReactNativeStyleAttributes.borderColor = colorAttributes;
ReactNativeStyleAttributes.borderLeftColor = colorAttributes;
ReactNativeStyleAttributes.borderRightColor = colorAttributes;
ReactNativeStyleAttributes.borderTopColor = colorAttributes;
ReactNativeStyleAttributes.color = colorAttributes;
ReactNativeStyleAttributes.shadowColor = colorAttributes;
ReactNativeStyleAttributes.textDecorationColor = colorAttributes;
ReactNativeStyleAttributes.tintColor = colorAttributes;
ReactNativeStyleAttributes.textShadowColor = colorAttributes;
ReactNativeStyleAttributes.overlayColor = colorAttributes;
module.exports = ReactNativeStyleAttributes;
}, 130, null, "ReactNativeStyleAttributes");
__d(/* ImageStylePropTypes */function(global, require, module, exports) {
'use strict';
var ImageResizeMode = require(132 ); // 132 = ImageResizeMode
var LayoutPropTypes = require(134 ); // 134 = LayoutPropTypes
var ColorPropType = require(71 ); // 71 = ColorPropType
var ShadowPropTypesIOS = require(135 ); // 135 = ShadowPropTypesIOS
var TransformPropTypes = require(136 ); // 136 = TransformPropTypes
var ReactPropTypes = require(126 ).PropTypes; // 126 = React
var ImageStylePropTypes = babelHelpers.extends({}, LayoutPropTypes, ShadowPropTypesIOS, TransformPropTypes, {
resizeMode: ReactPropTypes.oneOf(Object.keys(ImageResizeMode)),
backfaceVisibility: ReactPropTypes.oneOf(['visible', 'hidden']),
backgroundColor: ColorPropType,
borderColor: ColorPropType,
borderWidth: ReactPropTypes.number,
borderRadius: ReactPropTypes.number,
overflow: ReactPropTypes.oneOf(['visible', 'hidden']),
tintColor: ColorPropType,
opacity: ReactPropTypes.number,
overlayColor: ReactPropTypes.string,
borderTopLeftRadius: ReactPropTypes.number,
borderTopRightRadius: ReactPropTypes.number,
borderBottomLeftRadius: ReactPropTypes.number,
borderBottomRightRadius: ReactPropTypes.number
});
module.exports = ImageStylePropTypes;
}, 131, null, "ImageStylePropTypes");
__d(/* ImageResizeMode */function(global, require, module, exports) {
'use strict';
var keyMirror = require(133 ); // 133 = fbjs/lib/keyMirror
var ImageResizeMode = keyMirror({
contain: null,
cover: null,
stretch: null,
center: null,
repeat: null
});
module.exports = ImageResizeMode;
}, 132, null, "ImageResizeMode");
__d(/* fbjs/lib/keyMirror.js */function(global, require, module, exports) {
'use strict';
var invariant = require(44 ); // 44 = ./invariant
var keyMirror = function keyMirror(obj) {
var ret = {};
var key;
!(obj instanceof Object && !Array.isArray(obj)) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'keyMirror(...): Argument must be an object.') : invariant(false) : void 0;
for (key in obj) {
if (!obj.hasOwnProperty(key)) {
continue;
}
ret[key] = key;
}
return ret;
};
module.exports = keyMirror;
}, 133, null, "fbjs/lib/keyMirror.js");
__d(/* LayoutPropTypes */function(global, require, module, exports) {
'use strict';
var ReactPropTypes = require(126 ).PropTypes; // 126 = React
var LayoutPropTypes = {
width: ReactPropTypes.oneOfType([ReactPropTypes.number, ReactPropTypes.string]),
height: ReactPropTypes.oneOfType([ReactPropTypes.number, ReactPropTypes.string]),
top: ReactPropTypes.oneOfType([ReactPropTypes.number, ReactPropTypes.string]),
left: ReactPropTypes.oneOfType([ReactPropTypes.number, ReactPropTypes.string]),
right: ReactPropTypes.oneOfType([ReactPropTypes.number, ReactPropTypes.string]),
bottom: ReactPropTypes.oneOfType([ReactPropTypes.number, ReactPropTypes.string]),
minWidth: ReactPropTypes.oneOfType([ReactPropTypes.number, ReactPropTypes.string]),
maxWidth: ReactPropTypes.oneOfType([ReactPropTypes.number, ReactPropTypes.string]),
minHeight: ReactPropTypes.oneOfType([ReactPropTypes.number, ReactPropTypes.string]),
maxHeight: ReactPropTypes.oneOfType([ReactPropTypes.number, ReactPropTypes.string]),
margin: ReactPropTypes.oneOfType([ReactPropTypes.number, ReactPropTypes.string]),
marginVertical: ReactPropTypes.oneOfType([ReactPropTypes.number, ReactPropTypes.string]),
marginHorizontal: ReactPropTypes.oneOfType([ReactPropTypes.number, ReactPropTypes.string]),
marginTop: ReactPropTypes.oneOfType([ReactPropTypes.number, ReactPropTypes.string]),
marginBottom: ReactPropTypes.oneOfType([ReactPropTypes.number, ReactPropTypes.string]),
marginLeft: ReactPropTypes.oneOfType([ReactPropTypes.number, ReactPropTypes.string]),
marginRight: ReactPropTypes.oneOfType([ReactPropTypes.number, ReactPropTypes.string]),
padding: ReactPropTypes.oneOfType([ReactPropTypes.number, ReactPropTypes.string]),
paddingVertical: ReactPropTypes.oneOfType([ReactPropTypes.number, ReactPropTypes.string]),
paddingHorizontal: ReactPropTypes.oneOfType([ReactPropTypes.number, ReactPropTypes.string]),
paddingTop: ReactPropTypes.oneOfType([ReactPropTypes.number, ReactPropTypes.string]),
paddingBottom: ReactPropTypes.oneOfType([ReactPropTypes.number, ReactPropTypes.string]),
paddingLeft: ReactPropTypes.oneOfType([ReactPropTypes.number, ReactPropTypes.string]),
paddingRight: ReactPropTypes.oneOfType([ReactPropTypes.number, ReactPropTypes.string]),
borderWidth: ReactPropTypes.number,
borderTopWidth: ReactPropTypes.number,
borderRightWidth: ReactPropTypes.number,
borderBottomWidth: ReactPropTypes.number,
borderLeftWidth: ReactPropTypes.number,
position: ReactPropTypes.oneOf(['absolute', 'relative']),
flexDirection: ReactPropTypes.oneOf(['row', 'row-reverse', 'column', 'column-reverse']),
flexWrap: ReactPropTypes.oneOf(['wrap', 'nowrap']),
justifyContent: ReactPropTypes.oneOf(['flex-start', 'flex-end', 'center', 'space-between', 'space-around']),
alignItems: ReactPropTypes.oneOf(['flex-start', 'flex-end', 'center', 'stretch', 'baseline']),
alignSelf: ReactPropTypes.oneOf(['auto', 'flex-start', 'flex-end', 'center', 'stretch', 'baseline']),
overflow: ReactPropTypes.oneOf(['visible', 'hidden', 'scroll']),
flex: ReactPropTypes.number,
flexGrow: ReactPropTypes.number,
flexShrink: ReactPropTypes.number,
flexBasis: ReactPropTypes.oneOfType([ReactPropTypes.number, ReactPropTypes.string]),
aspectRatio: ReactPropTypes.number,
zIndex: ReactPropTypes.number
};
module.exports = LayoutPropTypes;
}, 134, null, "LayoutPropTypes");
__d(/* ShadowPropTypesIOS */function(global, require, module, exports) {
'use strict';
var ColorPropType = require(71 ); // 71 = ColorPropType
var ReactPropTypes = require(126 ).PropTypes; // 126 = React
var ShadowPropTypesIOS = {
shadowColor: ColorPropType,
shadowOffset: ReactPropTypes.shape({ width: ReactPropTypes.number, height: ReactPropTypes.number }),
shadowOpacity: ReactPropTypes.number,
shadowRadius: ReactPropTypes.number
};
module.exports = ShadowPropTypesIOS;
}, 135, null, "ShadowPropTypesIOS");
__d(/* TransformPropTypes */function(global, require, module, exports) {
'use strict';
var deprecatedPropType = require(137 ); // 137 = deprecatedPropType
var ReactPropTypes = require(126 ).PropTypes; // 126 = React
var TransformMatrixPropType = function TransformMatrixPropType(props, propName, componentName) {
if (props[propName]) {
return new Error('The transformMatrix style property is deprecated. ' + 'Use `transform: [{ matrix: ... }]` instead.');
}
};
var DecomposedMatrixPropType = function DecomposedMatrixPropType(props, propName, componentName) {
if (props[propName]) {
return new Error('The decomposedMatrix style property is deprecated. ' + 'Use `transform: [...]` instead.');
}
};
var TransformPropTypes = {
transform: ReactPropTypes.arrayOf(ReactPropTypes.oneOfType([ReactPropTypes.shape({ perspective: ReactPropTypes.number }), ReactPropTypes.shape({ rotate: ReactPropTypes.string }), ReactPropTypes.shape({ rotateX: ReactPropTypes.string }), ReactPropTypes.shape({ rotateY: ReactPropTypes.string }), ReactPropTypes.shape({ rotateZ: ReactPropTypes.string }), ReactPropTypes.shape({ scale: ReactPropTypes.number }), ReactPropTypes.shape({ scaleX: ReactPropTypes.number }), ReactPropTypes.shape({ scaleY: ReactPropTypes.number }), ReactPropTypes.shape({ translateX: ReactPropTypes.number }), ReactPropTypes.shape({ translateY: ReactPropTypes.number }), ReactPropTypes.shape({ skewX: ReactPropTypes.string }), ReactPropTypes.shape({ skewY: ReactPropTypes.string })])),
transformMatrix: TransformMatrixPropType,
decomposedMatrix: DecomposedMatrixPropType,
scaleX: deprecatedPropType(ReactPropTypes.number, 'Use the transform prop instead.'),
scaleY: deprecatedPropType(ReactPropTypes.number, 'Use the transform prop instead.'),
rotation: deprecatedPropType(ReactPropTypes.number, 'Use the transform prop instead.'),
translateX: deprecatedPropType(ReactPropTypes.number, 'Use the transform prop instead.'),
translateY: deprecatedPropType(ReactPropTypes.number, 'Use the transform prop instead.')
};
module.exports = TransformPropTypes;
}, 136, null, "TransformPropTypes");
__d(/* deprecatedPropType */function(global, require, module, exports) {
'use strict';
var UIManager = require(123 ); // 123 = UIManager
var ReactPropTypesSecret = require(59 ); // 59 = react/lib/ReactPropTypesSecret
var ReactPropTypeLocations = require(138 ); // 138 = react/lib/ReactPropTypeLocations
function deprecatedPropType(propType, explanation) {
return function validate(props, propName, componentName) {
if (!UIManager[componentName] && props[propName] !== undefined) {
console.warn('`' + propName + '` supplied to `' + componentName + '` has been deprecated. ' + explanation);
}
return propType(props, propName, componentName, ReactPropTypeLocations.prop, null, ReactPropTypesSecret);
};
}
module.exports = deprecatedPropType;
}, 137, null, "deprecatedPropType");
__d(/* react/lib/ReactPropTypeLocations.js */function(global, require, module, exports) {
'use strict';
}, 138, null, "react/lib/ReactPropTypeLocations.js");
__d(/* TextStylePropTypes */function(global, require, module, exports) {
'use strict';
var ReactPropTypes = require(126 ).PropTypes; // 126 = React
var ColorPropType = require(71 ); // 71 = ColorPropType
var ViewStylePropTypes = require(140 ); // 140 = ViewStylePropTypes
var TextStylePropTypes = babelHelpers.extends({}, ViewStylePropTypes, {
color: ColorPropType,
fontFamily: ReactPropTypes.string,
fontSize: ReactPropTypes.number,
fontStyle: ReactPropTypes.oneOf(['normal', 'italic']),
fontWeight: ReactPropTypes.oneOf(['normal', 'bold', '100', '200', '300', '400', '500', '600', '700', '800', '900']),
fontVariant: ReactPropTypes.arrayOf(ReactPropTypes.oneOf(['small-caps', 'oldstyle-nums', 'lining-nums', 'tabular-nums', 'proportional-nums'])),
textShadowOffset: ReactPropTypes.shape({ width: ReactPropTypes.number, height: ReactPropTypes.number }),
textShadowRadius: ReactPropTypes.number,
textShadowColor: ColorPropType,
letterSpacing: ReactPropTypes.number,
lineHeight: ReactPropTypes.number,
textAlign: ReactPropTypes.oneOf(['auto', 'left', 'right', 'center', 'justify']),
textAlignVertical: ReactPropTypes.oneOf(['auto', 'top', 'bottom', 'center']),
includeFontPadding: ReactPropTypes.bool,
textDecorationLine: ReactPropTypes.oneOf(['none', 'underline', 'line-through', 'underline line-through']),
textDecorationStyle: ReactPropTypes.oneOf(['solid', 'double', 'dotted', 'dashed']),
textDecorationColor: ColorPropType,
writingDirection: ReactPropTypes.oneOf(['auto', 'ltr', 'rtl'])
});
module.exports = TextStylePropTypes;
}, 139, null, "TextStylePropTypes");
__d(/* ViewStylePropTypes */function(global, require, module, exports) {
'use strict';
var LayoutPropTypes = require(134 ); // 134 = LayoutPropTypes
var ReactPropTypes = require(126 ).PropTypes; // 126 = React
var ColorPropType = require(71 ); // 71 = ColorPropType
var ShadowPropTypesIOS = require(135 ); // 135 = ShadowPropTypesIOS
var TransformPropTypes = require(136 ); // 136 = TransformPropTypes
var ViewStylePropTypes = babelHelpers.extends({}, LayoutPropTypes, ShadowPropTypesIOS, TransformPropTypes, {
backfaceVisibility: ReactPropTypes.oneOf(['visible', 'hidden']),
backgroundColor: ColorPropType,
borderColor: ColorPropType,
borderTopColor: ColorPropType,
borderRightColor: ColorPropType,
borderBottomColor: ColorPropType,
borderLeftColor: ColorPropType,
borderRadius: ReactPropTypes.number,
borderTopLeftRadius: ReactPropTypes.number,
borderTopRightRadius: ReactPropTypes.number,
borderBottomLeftRadius: ReactPropTypes.number,
borderBottomRightRadius: ReactPropTypes.number,
borderStyle: ReactPropTypes.oneOf(['solid', 'dotted', 'dashed']),
borderWidth: ReactPropTypes.number,
borderTopWidth: ReactPropTypes.number,
borderRightWidth: ReactPropTypes.number,
borderBottomWidth: ReactPropTypes.number,
borderLeftWidth: ReactPropTypes.number,
opacity: ReactPropTypes.number,
elevation: ReactPropTypes.number
});
module.exports = ViewStylePropTypes;
}, 140, null, "ViewStylePropTypes");
__d(/* matricesDiffer */function(global, require, module, exports) {
'use strict';
var matricesDiffer = function matricesDiffer(one, two) {
if (one === two) {
return false;
}
return !one || !two || one[12] !== two[12] || one[13] !== two[13] || one[14] !== two[14] || one[5] !== two[5] || one[10] !== two[10] || one[1] !== two[1] || one[2] !== two[2] || one[3] !== two[3] || one[4] !== two[4] || one[6] !== two[6] || one[7] !== two[7] || one[8] !== two[8] || one[9] !== two[9] || one[11] !== two[11] || one[15] !== two[15];
};
module.exports = matricesDiffer;
}, 141, null, "matricesDiffer");
__d(/* processTransform */function(global, require, module, exports) {
'use strict';
var MatrixMath = require(143 ); // 143 = MatrixMath
var Platform = require(79 ); // 79 = Platform
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var stringifySafe = require(97 ); // 97 = stringifySafe
function processTransform(transform) {
if (__DEV__) {
_validateTransforms(transform);
}
if (Platform.OS === 'android' || Platform.OS === 'ios') {
return transform;
}
var result = MatrixMath.createIdentityMatrix();
transform.forEach(function (transformation) {
var key = Object.keys(transformation)[0];
var value = transformation[key];
switch (key) {
case 'matrix':
MatrixMath.multiplyInto(result, result, value);
break;
case 'perspective':
_multiplyTransform(result, MatrixMath.reusePerspectiveCommand, [value]);
break;
case 'rotateX':
_multiplyTransform(result, MatrixMath.reuseRotateXCommand, [_convertToRadians(value)]);
break;
case 'rotateY':
_multiplyTransform(result, MatrixMath.reuseRotateYCommand, [_convertToRadians(value)]);
break;
case 'rotate':
case 'rotateZ':
_multiplyTransform(result, MatrixMath.reuseRotateZCommand, [_convertToRadians(value)]);
break;
case 'scale':
_multiplyTransform(result, MatrixMath.reuseScaleCommand, [value]);
break;
case 'scaleX':
_multiplyTransform(result, MatrixMath.reuseScaleXCommand, [value]);
break;
case 'scaleY':
_multiplyTransform(result, MatrixMath.reuseScaleYCommand, [value]);
break;
case 'translate':
_multiplyTransform(result, MatrixMath.reuseTranslate3dCommand, [value[0], value[1], value[2] || 0]);
break;
case 'translateX':
_multiplyTransform(result, MatrixMath.reuseTranslate2dCommand, [value, 0]);
break;
case 'translateY':
_multiplyTransform(result, MatrixMath.reuseTranslate2dCommand, [0, value]);
break;
case 'skewX':
_multiplyTransform(result, MatrixMath.reuseSkewXCommand, [_convertToRadians(value)]);
break;
case 'skewY':
_multiplyTransform(result, MatrixMath.reuseSkewYCommand, [_convertToRadians(value)]);
break;
default:
throw new Error('Invalid transform name: ' + key);
}
});
return result;
}
function _multiplyTransform(result, matrixMathFunction, args) {
var matrixToApply = MatrixMath.createIdentityMatrix();
var argsWithIdentity = [matrixToApply].concat(args);
matrixMathFunction.apply(this, argsWithIdentity);
MatrixMath.multiplyInto(result, result, matrixToApply);
}
function _convertToRadians(value) {
var floatValue = parseFloat(value, 10);
return value.indexOf('rad') > -1 ? floatValue : floatValue * Math.PI / 180;
}
function _validateTransforms(transform) {
transform.forEach(function (transformation) {
var keys = Object.keys(transformation);
invariant(keys.length === 1, 'You must specify exactly one property per transform object. Passed properties: %s', stringifySafe(transformation));
var key = keys[0];
var value = transformation[key];
_validateTransform(key, value, transformation);
});
}
function _validateTransform(key, value, transformation) {
invariant(!value.getValue, 'You passed an Animated.Value to a normal component. ' + 'You need to wrap that component in an Animated. For example, ' + 'replace <View /> by <Animated.View />.');
var multivalueTransforms = ['matrix', 'translate'];
if (multivalueTransforms.indexOf(key) !== -1) {
invariant(Array.isArray(value), 'Transform with key of %s must have an array as the value: %s', key, stringifySafe(transformation));
}
switch (key) {
case 'matrix':
invariant(value.length === 9 || value.length === 16, 'Matrix transform must have a length of 9 (2d) or 16 (3d). ' + 'Provided matrix has a length of %s: %s', value.length, stringifySafe(transformation));
break;
case 'translate':
invariant(value.length === 2 || value.length === 3, 'Transform with key translate must be an array of length 2 or 3, found %s: %s', value.length, stringifySafe(transformation));
break;
case 'rotateX':
case 'rotateY':
case 'rotateZ':
case 'rotate':
case 'skewX':
case 'skewY':
invariant(typeof value === 'string', 'Transform with key of "%s" must be a string: %s', key, stringifySafe(transformation));
invariant(value.indexOf('deg') > -1 || value.indexOf('rad') > -1, 'Rotate transform must be expressed in degrees (deg) or radians ' + '(rad): %s', stringifySafe(transformation));
break;
case 'perspective':
invariant(typeof value === 'number', 'Transform with key of "%s" must be a number: %s', key, stringifySafe(transformation));
invariant(value !== 0, 'Transform with key of "%s" cannot be zero: %s', key, stringifySafe(transformation));
break;
case 'translateX':
case 'translateY':
case 'scale':
case 'scaleX':
case 'scaleY':
invariant(typeof value === 'number', 'Transform with key of "%s" must be a number: %s', key, stringifySafe(transformation));
break;
default:
invariant(false, 'Invalid transform %s: %s', key, stringifySafe(transformation));
}
}
module.exports = processTransform;
}, 142, null, "processTransform");
__d(/* MatrixMath */function(global, require, module, exports) {
'use strict';
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var MatrixMath = {
createIdentityMatrix: function createIdentityMatrix() {
return [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
},
createCopy: function createCopy(m) {
return [m[0], m[1], m[2], m[3], m[4], m[5], m[6], m[7], m[8], m[9], m[10], m[11], m[12], m[13], m[14], m[15]];
},
createOrthographic: function createOrthographic(left, right, bottom, top, near, far) {
var a = 2 / (right - left);
var b = 2 / (top - bottom);
var c = -2 / (far - near);
var tx = -(right + left) / (right - left);
var ty = -(top + bottom) / (top - bottom);
var tz = -(far + near) / (far - near);
return [a, 0, 0, 0, 0, b, 0, 0, 0, 0, c, 0, tx, ty, tz, 1];
},
createFrustum: function createFrustum(left, right, bottom, top, near, far) {
var r_width = 1 / (right - left);
var r_height = 1 / (top - bottom);
var r_depth = 1 / (near - far);
var x = 2 * (near * r_width);
var y = 2 * (near * r_height);
var A = (right + left) * r_width;
var B = (top + bottom) * r_height;
var C = (far + near) * r_depth;
var D = 2 * (far * near * r_depth);
return [x, 0, 0, 0, 0, y, 0, 0, A, B, C, -1, 0, 0, D, 0];
},
createPerspective: function createPerspective(fovInRadians, aspect, near, far) {
var h = 1 / Math.tan(fovInRadians / 2);
var r_depth = 1 / (near - far);
var C = (far + near) * r_depth;
var D = 2 * (far * near * r_depth);
return [h / aspect, 0, 0, 0, 0, h, 0, 0, 0, 0, C, -1, 0, 0, D, 0];
},
createTranslate2d: function createTranslate2d(x, y) {
var mat = MatrixMath.createIdentityMatrix();
MatrixMath.reuseTranslate2dCommand(mat, x, y);
return mat;
},
reuseTranslate2dCommand: function reuseTranslate2dCommand(matrixCommand, x, y) {
matrixCommand[12] = x;
matrixCommand[13] = y;
},
reuseTranslate3dCommand: function reuseTranslate3dCommand(matrixCommand, x, y, z) {
matrixCommand[12] = x;
matrixCommand[13] = y;
matrixCommand[14] = z;
},
createScale: function createScale(factor) {
var mat = MatrixMath.createIdentityMatrix();
MatrixMath.reuseScaleCommand(mat, factor);
return mat;
},
reuseScaleCommand: function reuseScaleCommand(matrixCommand, factor) {
matrixCommand[0] = factor;
matrixCommand[5] = factor;
},
reuseScale3dCommand: function reuseScale3dCommand(matrixCommand, x, y, z) {
matrixCommand[0] = x;
matrixCommand[5] = y;
matrixCommand[10] = z;
},
reusePerspectiveCommand: function reusePerspectiveCommand(matrixCommand, p) {
matrixCommand[11] = -1 / p;
},
reuseScaleXCommand: function reuseScaleXCommand(matrixCommand, factor) {
matrixCommand[0] = factor;
},
reuseScaleYCommand: function reuseScaleYCommand(matrixCommand, factor) {
matrixCommand[5] = factor;
},
reuseScaleZCommand: function reuseScaleZCommand(matrixCommand, factor) {
matrixCommand[10] = factor;
},
reuseRotateXCommand: function reuseRotateXCommand(matrixCommand, radians) {
matrixCommand[5] = Math.cos(radians);
matrixCommand[6] = Math.sin(radians);
matrixCommand[9] = -Math.sin(radians);
matrixCommand[10] = Math.cos(radians);
},
reuseRotateYCommand: function reuseRotateYCommand(matrixCommand, amount) {
matrixCommand[0] = Math.cos(amount);
matrixCommand[2] = -Math.sin(amount);
matrixCommand[8] = Math.sin(amount);
matrixCommand[10] = Math.cos(amount);
},
reuseRotateZCommand: function reuseRotateZCommand(matrixCommand, radians) {
matrixCommand[0] = Math.cos(radians);
matrixCommand[1] = Math.sin(radians);
matrixCommand[4] = -Math.sin(radians);
matrixCommand[5] = Math.cos(radians);
},
createRotateZ: function createRotateZ(radians) {
var mat = MatrixMath.createIdentityMatrix();
MatrixMath.reuseRotateZCommand(mat, radians);
return mat;
},
reuseSkewXCommand: function reuseSkewXCommand(matrixCommand, radians) {
matrixCommand[4] = Math.tan(radians);
},
reuseSkewYCommand: function reuseSkewYCommand(matrixCommand, radians) {
matrixCommand[1] = Math.tan(radians);
},
multiplyInto: function multiplyInto(out, a, b) {
var a00 = a[0],
a01 = a[1],
a02 = a[2],
a03 = a[3],
a10 = a[4],
a11 = a[5],
a12 = a[6],
a13 = a[7],
a20 = a[8],
a21 = a[9],
a22 = a[10],
a23 = a[11],
a30 = a[12],
a31 = a[13],
a32 = a[14],
a33 = a[15];
var b0 = b[0],
b1 = b[1],
b2 = b[2],
b3 = b[3];
out[0] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;
out[1] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;
out[2] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;
out[3] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;
b0 = b[4];b1 = b[5];b2 = b[6];b3 = b[7];
out[4] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;
out[5] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;
out[6] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;
out[7] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;
b0 = b[8];b1 = b[9];b2 = b[10];b3 = b[11];
out[8] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;
out[9] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;
out[10] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;
out[11] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;
b0 = b[12];b1 = b[13];b2 = b[14];b3 = b[15];
out[12] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;
out[13] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;
out[14] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;
out[15] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;
},
determinant: function determinant(matrix) {
var _matrix = babelHelpers.slicedToArray(matrix, 16),
m00 = _matrix[0],
m01 = _matrix[1],
m02 = _matrix[2],
m03 = _matrix[3],
m10 = _matrix[4],
m11 = _matrix[5],
m12 = _matrix[6],
m13 = _matrix[7],
m20 = _matrix[8],
m21 = _matrix[9],
m22 = _matrix[10],
m23 = _matrix[11],
m30 = _matrix[12],
m31 = _matrix[13],
m32 = _matrix[14],
m33 = _matrix[15];
return m03 * m12 * m21 * m30 - m02 * m13 * m21 * m30 - m03 * m11 * m22 * m30 + m01 * m13 * m22 * m30 + m02 * m11 * m23 * m30 - m01 * m12 * m23 * m30 - m03 * m12 * m20 * m31 + m02 * m13 * m20 * m31 + m03 * m10 * m22 * m31 - m00 * m13 * m22 * m31 - m02 * m10 * m23 * m31 + m00 * m12 * m23 * m31 + m03 * m11 * m20 * m32 - m01 * m13 * m20 * m32 - m03 * m10 * m21 * m32 + m00 * m13 * m21 * m32 + m01 * m10 * m23 * m32 - m00 * m11 * m23 * m32 - m02 * m11 * m20 * m33 + m01 * m12 * m20 * m33 + m02 * m10 * m21 * m33 - m00 * m12 * m21 * m33 - m01 * m10 * m22 * m33 + m00 * m11 * m22 * m33;
},
inverse: function inverse(matrix) {
var det = MatrixMath.determinant(matrix);
if (!det) {
return matrix;
}
var _matrix2 = babelHelpers.slicedToArray(matrix, 16),
m00 = _matrix2[0],
m01 = _matrix2[1],
m02 = _matrix2[2],
m03 = _matrix2[3],
m10 = _matrix2[4],
m11 = _matrix2[5],
m12 = _matrix2[6],
m13 = _matrix2[7],
m20 = _matrix2[8],
m21 = _matrix2[9],
m22 = _matrix2[10],
m23 = _matrix2[11],
m30 = _matrix2[12],
m31 = _matrix2[13],
m32 = _matrix2[14],
m33 = _matrix2[15];
return [(m12 * m23 * m31 - m13 * m22 * m31 + m13 * m21 * m32 - m11 * m23 * m32 - m12 * m21 * m33 + m11 * m22 * m33) / det, (m03 * m22 * m31 - m02 * m23 * m31 - m03 * m21 * m32 + m01 * m23 * m32 + m02 * m21 * m33 - m01 * m22 * m33) / det, (m02 * m13 * m31 - m03 * m12 * m31 + m03 * m11 * m32 - m01 * m13 * m32 - m02 * m11 * m33 + m01 * m12 * m33) / det, (m03 * m12 * m21 - m02 * m13 * m21 - m03 * m11 * m22 + m01 * m13 * m22 + m02 * m11 * m23 - m01 * m12 * m23) / det, (m13 * m22 * m30 - m12 * m23 * m30 - m13 * m20 * m32 + m10 * m23 * m32 + m12 * m20 * m33 - m10 * m22 * m33) / det, (m02 * m23 * m30 - m03 * m22 * m30 + m03 * m20 * m32 - m00 * m23 * m32 - m02 * m20 * m33 + m00 * m22 * m33) / det, (m03 * m12 * m30 - m02 * m13 * m30 - m03 * m10 * m32 + m00 * m13 * m32 + m02 * m10 * m33 - m00 * m12 * m33) / det, (m02 * m13 * m20 - m03 * m12 * m20 + m03 * m10 * m22 - m00 * m13 * m22 - m02 * m10 * m23 + m00 * m12 * m23) / det, (m11 * m23 * m30 - m13 * m21 * m30 + m13 * m20 * m31 - m10 * m23 * m31 - m11 * m20 * m33 + m10 * m21 * m33) / det, (m03 * m21 * m30 - m01 * m23 * m30 - m03 * m20 * m31 + m00 * m23 * m31 + m01 * m20 * m33 - m00 * m21 * m33) / det, (m01 * m13 * m30 - m03 * m11 * m30 + m03 * m10 * m31 - m00 * m13 * m31 - m01 * m10 * m33 + m00 * m11 * m33) / det, (m03 * m11 * m20 - m01 * m13 * m20 - m03 * m10 * m21 + m00 * m13 * m21 + m01 * m10 * m23 - m00 * m11 * m23) / det, (m12 * m21 * m30 - m11 * m22 * m30 - m12 * m20 * m31 + m10 * m22 * m31 + m11 * m20 * m32 - m10 * m21 * m32) / det, (m01 * m22 * m30 - m02 * m21 * m30 + m02 * m20 * m31 - m00 * m22 * m31 - m01 * m20 * m32 + m00 * m21 * m32) / det, (m02 * m11 * m30 - m01 * m12 * m30 - m02 * m10 * m31 + m00 * m12 * m31 + m01 * m10 * m32 - m00 * m11 * m32) / det, (m01 * m12 * m20 - m02 * m11 * m20 + m02 * m10 * m21 - m00 * m12 * m21 - m01 * m10 * m22 + m00 * m11 * m22) / det];
},
transpose: function transpose(m) {
return [m[0], m[4], m[8], m[12], m[1], m[5], m[9], m[13], m[2], m[6], m[10], m[14], m[3], m[7], m[11], m[15]];
},
multiplyVectorByMatrix: function multiplyVectorByMatrix(v, m) {
var _v = babelHelpers.slicedToArray(v, 4),
vx = _v[0],
vy = _v[1],
vz = _v[2],
vw = _v[3];
return [vx * m[0] + vy * m[4] + vz * m[8] + vw * m[12], vx * m[1] + vy * m[5] + vz * m[9] + vw * m[13], vx * m[2] + vy * m[6] + vz * m[10] + vw * m[14], vx * m[3] + vy * m[7] + vz * m[11] + vw * m[15]];
},
v3Length: function v3Length(a) {
return Math.sqrt(a[0] * a[0] + a[1] * a[1] + a[2] * a[2]);
},
v3Normalize: function v3Normalize(vector, v3Length) {
var im = 1 / (v3Length || MatrixMath.v3Length(vector));
return [vector[0] * im, vector[1] * im, vector[2] * im];
},
v3Dot: function v3Dot(a, b) {
return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];
},
v3Combine: function v3Combine(a, b, aScale, bScale) {
return [aScale * a[0] + bScale * b[0], aScale * a[1] + bScale * b[1], aScale * a[2] + bScale * b[2]];
},
v3Cross: function v3Cross(a, b) {
return [a[1] * b[2] - a[2] * b[1], a[2] * b[0] - a[0] * b[2], a[0] * b[1] - a[1] * b[0]];
},
quaternionToDegreesXYZ: function quaternionToDegreesXYZ(q, matrix, row) {
var _q = babelHelpers.slicedToArray(q, 4),
qx = _q[0],
qy = _q[1],
qz = _q[2],
qw = _q[3];
var qw2 = qw * qw;
var qx2 = qx * qx;
var qy2 = qy * qy;
var qz2 = qz * qz;
var test = qx * qy + qz * qw;
var unit = qw2 + qx2 + qy2 + qz2;
var conv = 180 / Math.PI;
if (test > 0.49999 * unit) {
return [0, 2 * Math.atan2(qx, qw) * conv, 90];
}
if (test < -0.49999 * unit) {
return [0, -2 * Math.atan2(qx, qw) * conv, -90];
}
return [MatrixMath.roundTo3Places(Math.atan2(2 * qx * qw - 2 * qy * qz, 1 - 2 * qx2 - 2 * qz2) * conv), MatrixMath.roundTo3Places(Math.atan2(2 * qy * qw - 2 * qx * qz, 1 - 2 * qy2 - 2 * qz2) * conv), MatrixMath.roundTo3Places(Math.asin(2 * qx * qy + 2 * qz * qw) * conv)];
},
roundTo3Places: function roundTo3Places(n) {
var arr = n.toString().split('e');
return Math.round(arr[0] + 'e' + (arr[1] ? +arr[1] - 3 : 3)) * 0.001;
},
decomposeMatrix: function decomposeMatrix(transformMatrix) {
invariant(transformMatrix.length === 16, 'Matrix decomposition needs a list of 3d matrix values, received %s', transformMatrix);
var perspective = [];
var quaternion = [];
var scale = [];
var skew = [];
var translation = [];
if (!transformMatrix[15]) {
return;
}
var matrix = [];
var perspectiveMatrix = [];
for (var i = 0; i < 4; i++) {
matrix.push([]);
for (var j = 0; j < 4; j++) {
var value = transformMatrix[i * 4 + j] / transformMatrix[15];
matrix[i].push(value);
perspectiveMatrix.push(j === 3 ? 0 : value);
}
}
perspectiveMatrix[15] = 1;
if (!MatrixMath.determinant(perspectiveMatrix)) {
return;
}
if (matrix[0][3] !== 0 || matrix[1][3] !== 0 || matrix[2][3] !== 0) {
var rightHandSide = [matrix[0][3], matrix[1][3], matrix[2][3], matrix[3][3]];
var inversePerspectiveMatrix = MatrixMath.inverse(perspectiveMatrix);
var transposedInversePerspectiveMatrix = MatrixMath.transpose(inversePerspectiveMatrix);
var perspective = MatrixMath.multiplyVectorByMatrix(rightHandSide, transposedInversePerspectiveMatrix);
} else {
perspective[0] = perspective[1] = perspective[2] = 0;
perspective[3] = 1;
}
for (var i = 0; i < 3; i++) {
translation[i] = matrix[3][i];
}
var row = [];
for (i = 0; i < 3; i++) {
row[i] = [matrix[i][0], matrix[i][1], matrix[i][2]];
}
scale[0] = MatrixMath.v3Length(row[0]);
row[0] = MatrixMath.v3Normalize(row[0], scale[0]);
skew[0] = MatrixMath.v3Dot(row[0], row[1]);
row[1] = MatrixMath.v3Combine(row[1], row[0], 1.0, -skew[0]);
skew[0] = MatrixMath.v3Dot(row[0], row[1]);
row[1] = MatrixMath.v3Combine(row[1], row[0], 1.0, -skew[0]);
scale[1] = MatrixMath.v3Length(row[1]);
row[1] = MatrixMath.v3Normalize(row[1], scale[1]);
skew[0] /= scale[1];
skew[1] = MatrixMath.v3Dot(row[0], row[2]);
row[2] = MatrixMath.v3Combine(row[2], row[0], 1.0, -skew[1]);
skew[2] = MatrixMath.v3Dot(row[1], row[2]);
row[2] = MatrixMath.v3Combine(row[2], row[1], 1.0, -skew[2]);
scale[2] = MatrixMath.v3Length(row[2]);
row[2] = MatrixMath.v3Normalize(row[2], scale[2]);
skew[1] /= scale[2];
skew[2] /= scale[2];
var pdum3 = MatrixMath.v3Cross(row[1], row[2]);
if (MatrixMath.v3Dot(row[0], pdum3) < 0) {
for (i = 0; i < 3; i++) {
scale[i] *= -1;
row[i][0] *= -1;
row[i][1] *= -1;
row[i][2] *= -1;
}
}
quaternion[0] = 0.5 * Math.sqrt(Math.max(1 + row[0][0] - row[1][1] - row[2][2], 0));
quaternion[1] = 0.5 * Math.sqrt(Math.max(1 - row[0][0] + row[1][1] - row[2][2], 0));
quaternion[2] = 0.5 * Math.sqrt(Math.max(1 - row[0][0] - row[1][1] + row[2][2], 0));
quaternion[3] = 0.5 * Math.sqrt(Math.max(1 + row[0][0] + row[1][1] + row[2][2], 0));
if (row[2][1] > row[1][2]) {
quaternion[0] = -quaternion[0];
}
if (row[0][2] > row[2][0]) {
quaternion[1] = -quaternion[1];
}
if (row[1][0] > row[0][1]) {
quaternion[2] = -quaternion[2];
}
var rotationDegrees;
if (quaternion[0] < 0.001 && quaternion[0] >= 0 && quaternion[1] < 0.001 && quaternion[1] >= 0) {
rotationDegrees = [0, 0, MatrixMath.roundTo3Places(Math.atan2(row[0][1], row[0][0]) * 180 / Math.PI)];
} else {
rotationDegrees = MatrixMath.quaternionToDegreesXYZ(quaternion, matrix, row);
}
return {
rotationDegrees: rotationDegrees,
perspective: perspective,
quaternion: quaternion,
scale: scale,
skew: skew,
translation: translation,
rotate: rotationDegrees[2],
rotateX: rotationDegrees[0],
rotateY: rotationDegrees[1],
scaleX: scale[0],
scaleY: scale[1],
translateX: translation[0],
translateY: translation[1]
};
}
};
module.exports = MatrixMath;
}, 143, null, "MatrixMath");
__d(/* sizesDiffer */function(global, require, module, exports) {
'use strict';
var dummySize = { width: undefined, height: undefined };
var sizesDiffer = function sizesDiffer(one, two) {
one = one || dummySize;
two = two || dummySize;
return one !== two && (one.width !== two.width || one.height !== two.height);
};
module.exports = sizesDiffer;
}, 144, null, "sizesDiffer");
__d(/* StyleSheetValidation */function(global, require, module, exports) {
'use strict';
var ImageStylePropTypes = require(131 ); // 131 = ImageStylePropTypes
var ReactPropTypeLocations = require(138 ); // 138 = react/lib/ReactPropTypeLocations
var ReactPropTypesSecret = require(59 ); // 59 = react/lib/ReactPropTypesSecret
var TextStylePropTypes = require(139 ); // 139 = TextStylePropTypes
var ViewStylePropTypes = require(140 ); // 140 = ViewStylePropTypes
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var StyleSheetValidation = function () {
function StyleSheetValidation() {
babelHelpers.classCallCheck(this, StyleSheetValidation);
}
babelHelpers.createClass(StyleSheetValidation, null, [{
key: 'validateStyleProp',
value: function validateStyleProp(prop, style, caller) {
if (!__DEV__) {
return;
}
if (allStylePropTypes[prop] === undefined) {
var message1 = '"' + prop + '" is not a valid style property.';
var message2 = '\nValid style props: ' + JSON.stringify(Object.keys(allStylePropTypes).sort(), null, ' ');
styleError(message1, style, caller, message2);
}
var error = allStylePropTypes[prop](style, prop, caller, ReactPropTypeLocations.prop, null, ReactPropTypesSecret);
if (error) {
styleError(error.message, style, caller);
}
}
}, {
key: 'validateStyle',
value: function validateStyle(name, styles) {
if (!__DEV__) {
return;
}
for (var prop in styles[name]) {
StyleSheetValidation.validateStyleProp(prop, styles[name], 'StyleSheet ' + name);
}
}
}, {
key: 'addValidStylePropTypes',
value: function addValidStylePropTypes(stylePropTypes) {
for (var key in stylePropTypes) {
allStylePropTypes[key] = stylePropTypes[key];
}
}
}]);
return StyleSheetValidation;
}();
var styleError = function styleError(message1, style, caller, message2) {
invariant(false, message1 + '\n' + (caller || '<<unknown>>') + ': ' + JSON.stringify(style, null, ' ') + (message2 || ''));
};
var allStylePropTypes = {};
StyleSheetValidation.addValidStylePropTypes(ImageStylePropTypes);
StyleSheetValidation.addValidStylePropTypes(TextStylePropTypes);
StyleSheetValidation.addValidStylePropTypes(ViewStylePropTypes);
module.exports = StyleSheetValidation;
}, 145, null, "StyleSheetValidation");
__d(/* View */function(global, require, module, exports) {
'use strict';
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/node_modules/react-native/Libraries/Components/View/View.js';
var EdgeInsetsPropType = require(147 ); // 147 = EdgeInsetsPropType
var NativeMethodsMixin = require(73 ); // 73 = NativeMethodsMixin
var NativeModules = require(80 ); // 80 = NativeModules
var Platform = require(79 ); // 79 = Platform
var React = require(126 ); // 126 = React
var ReactNativeStyleAttributes = require(130 ); // 130 = ReactNativeStyleAttributes
var ReactNativeViewAttributes = require(152 ); // 152 = ReactNativeViewAttributes
var StyleSheetPropType = require(153 ); // 153 = StyleSheetPropType
var ViewStylePropTypes = require(140 ); // 140 = ViewStylePropTypes
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var TVViewPropTypes = {};
if (Platform.isTVOS) {
TVViewPropTypes = require(154 ); // 154 = TVViewPropTypes
}
var requireNativeComponent = require(155 ); // 155 = requireNativeComponent
var PropTypes = React.PropTypes;
var stylePropType = StyleSheetPropType(ViewStylePropTypes);
var AccessibilityTraits = ['none', 'button', 'link', 'header', 'search', 'image', 'selected', 'plays', 'key', 'text', 'summary', 'disabled', 'frequentUpdates', 'startsMedia', 'adjustable', 'allowsDirectInteraction', 'pageTurn'];
var AccessibilityComponentType = ['none', 'button', 'radiobutton_checked', 'radiobutton_unchecked'];
var forceTouchAvailable = NativeModules.IOSConstants && NativeModules.IOSConstants.forceTouchAvailable || false;
var statics = {
AccessibilityTraits: AccessibilityTraits,
AccessibilityComponentType: AccessibilityComponentType,
forceTouchAvailable: forceTouchAvailable
};
var View = React.createClass({
displayName: 'View',
mixins: [NativeMethodsMixin],
viewConfig: {
uiViewClassName: 'RCTView',
validAttributes: ReactNativeViewAttributes.RCTView
},
statics: babelHelpers.extends({}, statics),
propTypes: babelHelpers.extends({}, TVViewPropTypes, {
accessible: PropTypes.bool,
accessibilityLabel: PropTypes.node,
accessibilityComponentType: PropTypes.oneOf(AccessibilityComponentType),
accessibilityLiveRegion: PropTypes.oneOf(['none', 'polite', 'assertive']),
importantForAccessibility: PropTypes.oneOf(['auto', 'yes', 'no', 'no-hide-descendants']),
accessibilityTraits: PropTypes.oneOfType([PropTypes.oneOf(AccessibilityTraits), PropTypes.arrayOf(PropTypes.oneOf(AccessibilityTraits))]),
onAccessibilityTap: PropTypes.func,
onMagicTap: PropTypes.func,
testID: PropTypes.string,
onResponderGrant: PropTypes.func,
onResponderMove: PropTypes.func,
onResponderReject: PropTypes.func,
onResponderRelease: PropTypes.func,
onResponderTerminate: PropTypes.func,
onResponderTerminationRequest: PropTypes.func,
onStartShouldSetResponder: PropTypes.func,
onStartShouldSetResponderCapture: PropTypes.func,
onMoveShouldSetResponder: PropTypes.func,
onMoveShouldSetResponderCapture: PropTypes.func,
hitSlop: EdgeInsetsPropType,
onLayout: PropTypes.func,
pointerEvents: PropTypes.oneOf(['box-none', 'none', 'box-only', 'auto']),
style: stylePropType,
removeClippedSubviews: PropTypes.bool,
renderToHardwareTextureAndroid: PropTypes.bool,
shouldRasterizeIOS: PropTypes.bool,
collapsable: PropTypes.bool,
needsOffscreenAlphaCompositing: PropTypes.bool
}),
contextTypes: {
isInAParentText: React.PropTypes.bool
},
render: function render() {
invariant(!(this.context.isInAParentText && Platform.OS === 'android'), 'Nesting of <View> within <Text> is not supported on Android.');
return React.createElement(RCTView, babelHelpers.extends({}, this.props, {
__source: {
fileName: _jsxFileName,
lineNumber: 524
}
}));
}
});
var RCTView = requireNativeComponent('RCTView', View, {
nativeOnly: {
nativeBackgroundAndroid: true,
nativeForegroundAndroid: true
}
});
if (__DEV__) {
var UIManager = require(123 ); // 123 = UIManager
var viewConfig = UIManager.viewConfigs && UIManager.viewConfigs.RCTView || {};
for (var prop in viewConfig.nativeProps) {
var viewAny = View;
if (!viewAny.propTypes[prop] && !ReactNativeStyleAttributes[prop]) {
throw new Error('View is missing propType for native prop `' + prop + '`');
}
}
}
var ViewToExport = RCTView;
if (__DEV__) {
ViewToExport = View;
} else {
babelHelpers.extends(RCTView, statics);
}
module.exports = ViewToExport;
}, 146, null, "View");
__d(/* EdgeInsetsPropType */function(global, require, module, exports) {
'use strict';
var _require = require(126 ), // 126 = React
PropTypes = _require.PropTypes;
var createStrictShapeTypeChecker = require(148 ); // 148 = createStrictShapeTypeChecker
var EdgeInsetsPropType = createStrictShapeTypeChecker({
top: PropTypes.number,
left: PropTypes.number,
bottom: PropTypes.number,
right: PropTypes.number
});
module.exports = EdgeInsetsPropType;
}, 147, null, "EdgeInsetsPropType");
__d(/* createStrictShapeTypeChecker */function(global, require, module, exports) {
'use strict';
var ReactPropTypeLocationNames = require(58 ); // 58 = react/lib/ReactPropTypeLocationNames
var ReactPropTypesSecret = require(59 ); // 59 = react/lib/ReactPropTypesSecret
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var merge = require(149 ); // 149 = merge
function createStrictShapeTypeChecker(shapeTypes) {
function checkType(isRequired, props, propName, componentName, location) {
if (!props[propName]) {
if (isRequired) {
invariant(false, 'Required object `' + propName + '` was not specified in ' + ('`' + componentName + '`.'));
}
return;
}
var propValue = props[propName];
var propType = typeof propValue;
var locationName = location && ReactPropTypeLocationNames[location] || '(unknown)';
if (propType !== 'object') {
invariant(false, 'Invalid ' + locationName + ' `' + propName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
}
var allKeys = merge(props[propName], shapeTypes);
for (var key in allKeys) {
var checker = shapeTypes[key];
if (!checker) {
invariant(false, 'Invalid props.' + propName + ' key `' + key + '` supplied to `' + componentName + '`.' + '\nBad object: ' + JSON.stringify(props[propName], null, ' ') + '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' '));
}
var error = checker(propValue, key, componentName, location, null, ReactPropTypesSecret);
if (error) {
invariant(false, error.message + '\nBad object: ' + JSON.stringify(props[propName], null, ' '));
}
}
}
function chainedCheckType(props, propName, componentName, location) {
return checkType(false, props, propName, componentName, location);
}
chainedCheckType.isRequired = checkType.bind(null, true);
return chainedCheckType;
}
module.exports = createStrictShapeTypeChecker;
}, 148, null, "createStrictShapeTypeChecker");
__d(/* merge */function(global, require, module, exports) {
"use strict";
var mergeInto = require(150 ); // 150 = mergeInto
var merge = function merge(one, two) {
var result = {};
mergeInto(result, one);
mergeInto(result, two);
return result;
};
module.exports = merge;
}, 149, null, "merge");
__d(/* mergeInto */function(global, require, module, exports) {
"use strict";
var mergeHelpers = require(151 ); // 151 = mergeHelpers
var checkMergeObjectArg = mergeHelpers.checkMergeObjectArg;
var checkMergeIntoObjectArg = mergeHelpers.checkMergeIntoObjectArg;
function mergeInto(one, two) {
checkMergeIntoObjectArg(one);
if (two != null) {
checkMergeObjectArg(two);
for (var key in two) {
if (!two.hasOwnProperty(key)) {
continue;
}
one[key] = two[key];
}
}
}
module.exports = mergeInto;
}, 150, null, "mergeInto");
__d(/* mergeHelpers */function(global, require, module, exports) {
"use strict";
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var keyMirror = require(133 ); // 133 = fbjs/lib/keyMirror
var MAX_MERGE_DEPTH = 36;
var isTerminal = function isTerminal(o) {
return typeof o !== 'object' || o === null;
};
var mergeHelpers = {
MAX_MERGE_DEPTH: MAX_MERGE_DEPTH,
isTerminal: isTerminal,
normalizeMergeArg: function normalizeMergeArg(arg) {
return arg === undefined || arg === null ? {} : arg;
},
checkMergeArrayArgs: function checkMergeArrayArgs(one, two) {
invariant(Array.isArray(one) && Array.isArray(two), 'Tried to merge arrays, instead got %s and %s.', one, two);
},
checkMergeObjectArgs: function checkMergeObjectArgs(one, two) {
mergeHelpers.checkMergeObjectArg(one);
mergeHelpers.checkMergeObjectArg(two);
},
checkMergeObjectArg: function checkMergeObjectArg(arg) {
invariant(!isTerminal(arg) && !Array.isArray(arg), 'Tried to merge an object, instead got %s.', arg);
},
checkMergeIntoObjectArg: function checkMergeIntoObjectArg(arg) {
invariant((!isTerminal(arg) || typeof arg === 'function') && !Array.isArray(arg), 'Tried to merge into an object, instead got %s.', arg);
},
checkMergeLevel: function checkMergeLevel(level) {
invariant(level < MAX_MERGE_DEPTH, 'Maximum deep merge depth exceeded. You may be attempting to merge ' + 'circular structures in an unsupported way.');
},
checkArrayStrategy: function checkArrayStrategy(strategy) {
invariant(strategy === undefined || strategy in mergeHelpers.ArrayStrategies, 'You must provide an array strategy to deep merge functions to ' + 'instruct the deep merge how to resolve merging two arrays.');
},
ArrayStrategies: keyMirror({
Clobber: true,
IndexByIndex: true
})
};
module.exports = mergeHelpers;
}, 151, null, "mergeHelpers");
__d(/* ReactNativeViewAttributes */function(global, require, module, exports) {
'use strict';
var ReactNativeStyleAttributes = require(130 ); // 130 = ReactNativeStyleAttributes
var ReactNativeViewAttributes = {};
ReactNativeViewAttributes.UIView = {
pointerEvents: true,
accessible: true,
accessibilityLabel: true,
accessibilityComponentType: true,
accessibilityLiveRegion: true,
accessibilityTraits: true,
importantForAccessibility: true,
testID: true,
renderToHardwareTextureAndroid: true,
shouldRasterizeIOS: true,
onLayout: true,
onAccessibilityTap: true,
onMagicTap: true,
collapsable: true,
needsOffscreenAlphaCompositing: true,
style: ReactNativeStyleAttributes
};
ReactNativeViewAttributes.RCTView = babelHelpers.extends({}, ReactNativeViewAttributes.UIView, {
removeClippedSubviews: true
});
module.exports = ReactNativeViewAttributes;
}, 152, null, "ReactNativeViewAttributes");
__d(/* StyleSheetPropType */function(global, require, module, exports) {
'use strict';
var createStrictShapeTypeChecker = require(148 ); // 148 = createStrictShapeTypeChecker
var flattenStyle = require(77 ); // 77 = flattenStyle
function StyleSheetPropType(shape) {
var shapePropType = createStrictShapeTypeChecker(shape);
return function (props, propName, componentName, location) {
var newProps = props;
if (props[propName]) {
newProps = {};
newProps[propName] = flattenStyle(props[propName]);
}
return shapePropType(newProps, propName, componentName, location);
};
}
module.exports = StyleSheetPropType;
}, 153, null, "StyleSheetPropType");
__d(/* TVViewPropTypes */function(global, require, module, exports) {
'use strict';
var PropTypes = require(126 ).PropTypes; // 126 = React
var TVViewPropTypes = {
isTVSelectable: PropTypes.bool,
hasTVPreferredFocus: PropTypes.bool,
tvParallaxProperties: PropTypes.object,
tvParallaxShiftDistanceX: PropTypes.number,
tvParallaxShiftDistanceY: PropTypes.number,
tvParallaxTiltAngle: PropTypes.number,
tvParallaxMagnification: PropTypes.number
};
module.exports = TVViewPropTypes;
}, 154, null, "TVViewPropTypes");
__d(/* requireNativeComponent */function(global, require, module, exports) {
'use strict';
var ReactNativeStyleAttributes = require(130 ); // 130 = ReactNativeStyleAttributes
var UIManager = require(123 ); // 123 = UIManager
var UnimplementedView = require(156 ); // 156 = UnimplementedView
var createReactNativeComponentClass = require(157 ); // 157 = createReactNativeComponentClass
var insetsDiffer = require(196 ); // 196 = insetsDiffer
var matricesDiffer = require(141 ); // 141 = matricesDiffer
var pointsDiffer = require(197 ); // 197 = pointsDiffer
var processColor = require(121 ); // 121 = processColor
var resolveAssetSource = require(198 ); // 198 = resolveAssetSource
var sizesDiffer = require(144 ); // 144 = sizesDiffer
var verifyPropTypes = require(202 ); // 202 = verifyPropTypes
var warning = require(40 ); // 40 = fbjs/lib/warning
function requireNativeComponent(viewName, componentInterface, extraConfig) {
var viewConfig = UIManager[viewName];
if (!viewConfig || !viewConfig.NativeProps) {
warning(false, 'Native component for "%s" does not exist', viewName);
return UnimplementedView;
}
viewConfig.uiViewClassName = viewName;
viewConfig.validAttributes = {};
viewConfig.propTypes = componentInterface && componentInterface.propTypes;
var nativeProps = babelHelpers.extends({}, UIManager.RCTView.NativeProps, viewConfig.NativeProps);
for (var key in nativeProps) {
var useAttribute = false;
var attribute = {};
var differ = TypeToDifferMap[nativeProps[key]];
if (differ) {
attribute.diff = differ;
useAttribute = true;
}
var processor = TypeToProcessorMap[nativeProps[key]];
if (processor) {
attribute.process = processor;
useAttribute = true;
}
viewConfig.validAttributes[key] = useAttribute ? attribute : true;
}
viewConfig.validAttributes.style = ReactNativeStyleAttributes;
if (__DEV__) {
componentInterface && verifyPropTypes(componentInterface, viewConfig, extraConfig && extraConfig.nativeOnly);
}
return createReactNativeComponentClass(viewConfig);
}
var TypeToDifferMap = {
CATransform3D: matricesDiffer,
CGPoint: pointsDiffer,
CGSize: sizesDiffer,
UIEdgeInsets: insetsDiffer
};
function processColorArray(colors) {
return colors && colors.map(processColor);
}
var TypeToProcessorMap = {
CGColor: processColor,
CGColorArray: processColorArray,
UIColor: processColor,
UIColorArray: processColorArray,
CGImage: resolveAssetSource,
UIImage: resolveAssetSource,
RCTImageSource: resolveAssetSource,
Color: processColor,
ColorArray: processColorArray
};
module.exports = requireNativeComponent;
}, 155, null, "requireNativeComponent");
__d(/* UnimplementedView */function(global, require, module, exports) {
'use strict';
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/node_modules/react-native/Libraries/Components/UnimplementedViews/UnimplementedView.js';
var React = require(126 ); // 126 = React
var StyleSheet = require(127 ); // 127 = StyleSheet
var UnimplementedView = function (_React$Component) {
babelHelpers.inherits(UnimplementedView, _React$Component);
function UnimplementedView() {
var _ref;
var _temp, _this, _ret;
babelHelpers.classCallCheck(this, UnimplementedView);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = babelHelpers.possibleConstructorReturn(this, (_ref = UnimplementedView.__proto__ || Object.getPrototypeOf(UnimplementedView)).call.apply(_ref, [this].concat(args))), _this), _this.setNativeProps = function () {}, _temp), babelHelpers.possibleConstructorReturn(_this, _ret);
}
babelHelpers.createClass(UnimplementedView, [{
key: 'render',
value: function render() {
var View = require(146 ); // 146 = View
return React.createElement(
View,
{ style: [styles.unimplementedView, this.props.style], __source: {
fileName: _jsxFileName,
lineNumber: 24
}
},
this.props.children
);
}
}]);
return UnimplementedView;
}(React.Component);
var styles = StyleSheet.create({
unimplementedView: {
borderWidth: 1,
borderColor: 'red',
alignSelf: 'flex-start'
}
});
module.exports = UnimplementedView;
}, 156, null, "UnimplementedView");
__d(/* createReactNativeComponentClass */function(global, require, module, exports) {
'use strict';
var ReactNativeBaseComponent = require(158 ); // 158 = ReactNativeBaseComponent
var createReactNativeComponentClass = function createReactNativeComponentClass(viewConfig) {
var Constructor = function Constructor(element) {
this._currentElement = element;
this._topLevelWrapper = null;
this._hostParent = null;
this._hostContainerInfo = null;
this._rootNodeID = 0;
this._renderedChildren = null;
};
Constructor.displayName = viewConfig.uiViewClassName;
Constructor.viewConfig = viewConfig;
Constructor.propTypes = viewConfig.propTypes;
Constructor.prototype = new ReactNativeBaseComponent(viewConfig);
Constructor.prototype.constructor = Constructor;
return Constructor;
};
module.exports = createReactNativeComponentClass;
}, 157, null, "createReactNativeComponentClass");
__d(/* ReactNativeBaseComponent */function(global, require, module, exports) {
'use strict';
var NativeMethodsMixin = require(73 ); // 73 = NativeMethodsMixin
var ReactNativeAttributePayload = require(74 ); // 74 = ReactNativeAttributePayload
var ReactNativeComponentTree = require(159 ); // 159 = ReactNativeComponentTree
var ReactNativeEventEmitter = require(160 ); // 160 = ReactNativeEventEmitter
var ReactNativeTagHandles = require(168 ); // 168 = ReactNativeTagHandles
var ReactMultiChild = require(178 ); // 178 = ReactMultiChild
var UIManager = require(123 ); // 123 = UIManager
var deepFreezeAndThrowOnMutationInDev = require(96 ); // 96 = deepFreezeAndThrowOnMutationInDev
var registrationNames = ReactNativeEventEmitter.registrationNames;
var putListener = ReactNativeEventEmitter.putListener;
var deleteListener = ReactNativeEventEmitter.deleteListener;
var deleteAllListeners = ReactNativeEventEmitter.deleteAllListeners;
var ReactNativeBaseComponent = function ReactNativeBaseComponent(viewConfig) {
this.viewConfig = viewConfig;
};
ReactNativeBaseComponent.Mixin = {
getPublicInstance: function getPublicInstance() {
return this;
},
unmountComponent: function unmountComponent() {
ReactNativeComponentTree.uncacheNode(this);
deleteAllListeners(this);
this.unmountChildren();
this._rootNodeID = 0;
},
initializeChildren: function initializeChildren(children, containerTag, transaction, context) {
var mountImages = this.mountChildren(children, transaction, context);
if (mountImages.length) {
var createdTags = [];
for (var i = 0, l = mountImages.length; i < l; i++) {
var mountImage = mountImages[i];
var childTag = mountImage;
createdTags[i] = childTag;
}
UIManager.setChildren(containerTag, createdTags);
}
},
receiveComponent: function receiveComponent(nextElement, transaction, context) {
var prevElement = this._currentElement;
this._currentElement = nextElement;
if (__DEV__) {
for (var key in this.viewConfig.validAttributes) {
if (nextElement.props.hasOwnProperty(key)) {
deepFreezeAndThrowOnMutationInDev(nextElement.props[key]);
}
}
}
var updatePayload = ReactNativeAttributePayload.diff(prevElement.props, nextElement.props, this.viewConfig.validAttributes);
if (updatePayload) {
UIManager.updateView(this._rootNodeID, this.viewConfig.uiViewClassName, updatePayload);
}
this._reconcileListenersUponUpdate(prevElement.props, nextElement.props);
this.updateChildren(nextElement.props.children, transaction, context);
},
_registerListenersUponCreation: function _registerListenersUponCreation(initialProps) {
for (var key in initialProps) {
if (registrationNames[key] && initialProps[key]) {
var listener = initialProps[key];
putListener(this, key, listener);
}
}
},
_reconcileListenersUponUpdate: function _reconcileListenersUponUpdate(prevProps, nextProps) {
for (var key in nextProps) {
if (registrationNames[key] && nextProps[key] !== prevProps[key]) {
if (nextProps[key]) {
putListener(this, key, nextProps[key]);
} else {
deleteListener(this, key);
}
}
}
},
getHostNode: function getHostNode() {
return this._rootNodeID;
},
mountComponent: function mountComponent(transaction, hostParent, hostContainerInfo, context) {
var tag = ReactNativeTagHandles.allocateTag();
this._rootNodeID = tag;
this._hostParent = hostParent;
this._hostContainerInfo = hostContainerInfo;
if (__DEV__) {
for (var key in this.viewConfig.validAttributes) {
if (this._currentElement.props.hasOwnProperty(key)) {
deepFreezeAndThrowOnMutationInDev(this._currentElement.props[key]);
}
}
}
var updatePayload = ReactNativeAttributePayload.create(this._currentElement.props, this.viewConfig.validAttributes);
var nativeTopRootTag = hostContainerInfo._tag;
UIManager.createView(tag, this.viewConfig.uiViewClassName, nativeTopRootTag, updatePayload);
ReactNativeComponentTree.precacheNode(this, tag);
this._registerListenersUponCreation(this._currentElement.props);
this.initializeChildren(this._currentElement.props.children, tag, transaction, context);
return tag;
}
};
babelHelpers.extends(ReactNativeBaseComponent.prototype, ReactMultiChild, ReactNativeBaseComponent.Mixin, NativeMethodsMixin);
module.exports = ReactNativeBaseComponent;
}, 158, null, "ReactNativeBaseComponent");
__d(/* ReactNativeComponentTree */function(global, require, module, exports) {
'use strict';
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var instanceCache = {};
function getRenderedHostOrTextFromComponent(component) {
var rendered;
while (rendered = component._renderedComponent) {
component = rendered;
}
return component;
}
function precacheNode(inst, tag) {
var nativeInst = getRenderedHostOrTextFromComponent(inst);
instanceCache[tag] = nativeInst;
}
function uncacheNode(inst) {
var tag = inst._rootNodeID;
if (tag) {
delete instanceCache[tag];
}
}
function getInstanceFromTag(tag) {
return instanceCache[tag] || null;
}
function getTagFromInstance(inst) {
invariant(inst._rootNodeID, 'All native instances should have a tag.');
return inst._rootNodeID;
}
var ReactNativeComponentTree = {
getClosestInstanceFromNode: getInstanceFromTag,
getInstanceFromNode: getInstanceFromTag,
getNodeFromInstance: getTagFromInstance,
precacheNode: precacheNode,
uncacheNode: uncacheNode
};
module.exports = ReactNativeComponentTree;
}, 159, null, "ReactNativeComponentTree");
__d(/* ReactNativeEventEmitter */function(global, require, module, exports) {
'use strict';
var EventPluginHub = require(161 ); // 161 = EventPluginHub
var EventPluginRegistry = require(162 ); // 162 = EventPluginRegistry
var ReactEventEmitterMixin = require(167 ); // 167 = ReactEventEmitterMixin
var ReactNativeComponentTree = require(159 ); // 159 = ReactNativeComponentTree
var ReactNativeTagHandles = require(168 ); // 168 = ReactNativeTagHandles
var ReactUpdates = require(169 ); // 169 = ReactUpdates
var warning = require(40 ); // 40 = fbjs/lib/warning
var EMPTY_NATIVE_EVENT = {};
var touchSubsequence = function touchSubsequence(touches, indices) {
var ret = [];
for (var i = 0; i < indices.length; i++) {
ret.push(touches[indices[i]]);
}
return ret;
};
var removeTouchesAtIndices = function removeTouchesAtIndices(touches, indices) {
var rippedOut = [];
var temp = touches;
for (var i = 0; i < indices.length; i++) {
var index = indices[i];
rippedOut.push(touches[index]);
temp[index] = null;
}
var fillAt = 0;
for (var j = 0; j < temp.length; j++) {
var cur = temp[j];
if (cur !== null) {
temp[fillAt++] = cur;
}
}
temp.length = fillAt;
return rippedOut;
};
var ReactNativeEventEmitter = babelHelpers.extends({}, ReactEventEmitterMixin, {
registrationNames: EventPluginRegistry.registrationNameModules,
putListener: EventPluginHub.putListener,
getListener: EventPluginHub.getListener,
deleteListener: EventPluginHub.deleteListener,
deleteAllListeners: EventPluginHub.deleteAllListeners,
_receiveRootNodeIDEvent: function _receiveRootNodeIDEvent(rootNodeID, topLevelType, nativeEventParam) {
var nativeEvent = nativeEventParam || EMPTY_NATIVE_EVENT;
var inst = ReactNativeComponentTree.getInstanceFromNode(rootNodeID);
if (!inst) {
return;
}
ReactUpdates.batchedUpdates(function () {
ReactNativeEventEmitter.handleTopLevel(topLevelType, inst, nativeEvent, nativeEvent.target);
});
},
receiveEvent: function receiveEvent(tag, topLevelType, nativeEventParam) {
var rootNodeID = tag;
ReactNativeEventEmitter._receiveRootNodeIDEvent(rootNodeID, topLevelType, nativeEventParam);
},
receiveTouches: function receiveTouches(eventTopLevelType, touches, changedIndices) {
var changedTouches = eventTopLevelType === 'topTouchEnd' || eventTopLevelType === 'topTouchCancel' ? removeTouchesAtIndices(touches, changedIndices) : touchSubsequence(touches, changedIndices);
for (var jj = 0; jj < changedTouches.length; jj++) {
var touch = changedTouches[jj];
touch.changedTouches = changedTouches;
touch.touches = touches;
var nativeEvent = touch;
var rootNodeID = null;
var target = nativeEvent.target;
if (target !== null && target !== undefined) {
if (target < ReactNativeTagHandles.tagsStartAt) {
if (__DEV__) {
warning(false, 'A view is reporting that a touch occured on tag zero.');
}
} else {
rootNodeID = target;
}
}
ReactNativeEventEmitter._receiveRootNodeIDEvent(rootNodeID, eventTopLevelType, nativeEvent);
}
}
});
module.exports = ReactNativeEventEmitter;
}, 160, null, "ReactNativeEventEmitter");
__d(/* EventPluginHub */function(global, require, module, exports) {
'use strict';
var EventPluginRegistry = require(162 ); // 162 = EventPluginRegistry
var EventPluginUtils = require(163 ); // 163 = EventPluginUtils
var ReactErrorUtils = require(164 ); // 164 = ReactErrorUtils
var accumulateInto = require(165 ); // 165 = accumulateInto
var forEachAccumulated = require(166 ); // 166 = forEachAccumulated
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var listenerBank = {};
var eventQueue = null;
var executeDispatchesAndRelease = function executeDispatchesAndRelease(event, simulated) {
if (event) {
EventPluginUtils.executeDispatchesInOrder(event, simulated);
if (!event.isPersistent()) {
event.constructor.release(event);
}
}
};
var executeDispatchesAndReleaseSimulated = function executeDispatchesAndReleaseSimulated(e) {
return executeDispatchesAndRelease(e, true);
};
var executeDispatchesAndReleaseTopLevel = function executeDispatchesAndReleaseTopLevel(e) {
return executeDispatchesAndRelease(e, false);
};
var getDictionaryKey = function getDictionaryKey(inst) {
return '.' + inst._rootNodeID;
};
var EventPluginHub = {
injection: {
injectEventPluginOrder: EventPluginRegistry.injectEventPluginOrder,
injectEventPluginsByName: EventPluginRegistry.injectEventPluginsByName
},
putListener: function putListener(inst, registrationName, listener) {
invariant(typeof listener === 'function', 'Expected %s listener to be a function, instead got type %s', registrationName, typeof listener);
var key = getDictionaryKey(inst);
var bankForRegistrationName = listenerBank[registrationName] || (listenerBank[registrationName] = {});
bankForRegistrationName[key] = listener;
var PluginModule = EventPluginRegistry.registrationNameModules[registrationName];
if (PluginModule && PluginModule.didPutListener) {
PluginModule.didPutListener(inst, registrationName, listener);
}
},
getListener: function getListener(inst, registrationName) {
var bankForRegistrationName = listenerBank[registrationName];
var key = getDictionaryKey(inst);
return bankForRegistrationName && bankForRegistrationName[key];
},
deleteListener: function deleteListener(inst, registrationName) {
var PluginModule = EventPluginRegistry.registrationNameModules[registrationName];
if (PluginModule && PluginModule.willDeleteListener) {
PluginModule.willDeleteListener(inst, registrationName);
}
var bankForRegistrationName = listenerBank[registrationName];
if (bankForRegistrationName) {
var key = getDictionaryKey(inst);
delete bankForRegistrationName[key];
}
},
deleteAllListeners: function deleteAllListeners(inst) {
var key = getDictionaryKey(inst);
for (var registrationName in listenerBank) {
if (!listenerBank.hasOwnProperty(registrationName)) {
continue;
}
if (!listenerBank[registrationName][key]) {
continue;
}
var PluginModule = EventPluginRegistry.registrationNameModules[registrationName];
if (PluginModule && PluginModule.willDeleteListener) {
PluginModule.willDeleteListener(inst, registrationName);
}
delete listenerBank[registrationName][key];
}
},
extractEvents: function extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
var events;
var plugins = EventPluginRegistry.plugins;
for (var i = 0; i < plugins.length; i++) {
var possiblePlugin = plugins[i];
if (possiblePlugin) {
var extractedEvents = possiblePlugin.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget);
if (extractedEvents) {
events = accumulateInto(events, extractedEvents);
}
}
}
return events;
},
enqueueEvents: function enqueueEvents(events) {
if (events) {
eventQueue = accumulateInto(eventQueue, events);
}
},
processEventQueue: function processEventQueue(simulated) {
var processingEventQueue = eventQueue;
eventQueue = null;
if (simulated) {
forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseSimulated);
} else {
forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseTopLevel);
}
invariant(!eventQueue, 'processEventQueue(): Additional events were enqueued while processing ' + 'an event queue. Support for this has not yet been implemented.');
ReactErrorUtils.rethrowCaughtError();
},
__purge: function __purge() {
listenerBank = {};
},
__getListenerBank: function __getListenerBank() {
return listenerBank;
}
};
module.exports = EventPluginHub;
}, 161, null, "EventPluginHub");
__d(/* EventPluginRegistry */function(global, require, module, exports) {
'use strict';
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var eventPluginOrder = null;
var namesToPlugins = {};
function recomputePluginOrdering() {
if (!eventPluginOrder) {
return;
}
for (var pluginName in namesToPlugins) {
var pluginModule = namesToPlugins[pluginName];
var pluginIndex = eventPluginOrder.indexOf(pluginName);
invariant(pluginIndex > -1, 'EventPluginRegistry: Cannot inject event plugins that do not exist in ' + 'the plugin ordering, `%s`.', pluginName);
if (EventPluginRegistry.plugins[pluginIndex]) {
continue;
}
invariant(pluginModule.extractEvents, 'EventPluginRegistry: Event plugins must implement an `extractEvents` ' + 'method, but `%s` does not.', pluginName);
EventPluginRegistry.plugins[pluginIndex] = pluginModule;
var publishedEvents = pluginModule.eventTypes;
for (var eventName in publishedEvents) {
invariant(publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName), 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName);
}
}
}
function publishEventForPlugin(dispatchConfig, pluginModule, eventName) {
invariant(!EventPluginRegistry.eventNameDispatchConfigs.hasOwnProperty(eventName), 'EventPluginHub: More than one plugin attempted to publish the same ' + 'event name, `%s`.', eventName);
EventPluginRegistry.eventNameDispatchConfigs[eventName] = dispatchConfig;
var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;
if (phasedRegistrationNames) {
for (var phaseName in phasedRegistrationNames) {
if (phasedRegistrationNames.hasOwnProperty(phaseName)) {
var phasedRegistrationName = phasedRegistrationNames[phaseName];
publishRegistrationName(phasedRegistrationName, pluginModule, eventName);
}
}
return true;
} else if (dispatchConfig.registrationName) {
publishRegistrationName(dispatchConfig.registrationName, pluginModule, eventName);
return true;
}
return false;
}
function publishRegistrationName(registrationName, pluginModule, eventName) {
invariant(!EventPluginRegistry.registrationNameModules[registrationName], 'EventPluginHub: More than one plugin attempted to publish the same ' + 'registration name, `%s`.', registrationName);
EventPluginRegistry.registrationNameModules[registrationName] = pluginModule;
EventPluginRegistry.registrationNameDependencies[registrationName] = pluginModule.eventTypes[eventName].dependencies;
if (__DEV__) {
var lowerCasedName = registrationName.toLowerCase();
EventPluginRegistry.possibleRegistrationNames[lowerCasedName] = registrationName;
if (registrationName === 'onDoubleClick') {
EventPluginRegistry.possibleRegistrationNames.ondblclick = registrationName;
}
}
}
var EventPluginRegistry = {
plugins: [],
eventNameDispatchConfigs: {},
registrationNameModules: {},
registrationNameDependencies: {},
possibleRegistrationNames: __DEV__ ? {} : null,
injectEventPluginOrder: function injectEventPluginOrder(injectedEventPluginOrder) {
invariant(!eventPluginOrder, 'EventPluginRegistry: Cannot inject event plugin ordering more than ' + 'once. You are likely trying to load more than one copy of React.');
eventPluginOrder = Array.prototype.slice.call(injectedEventPluginOrder);
recomputePluginOrdering();
},
injectEventPluginsByName: function injectEventPluginsByName(injectedNamesToPlugins) {
var isOrderingDirty = false;
for (var pluginName in injectedNamesToPlugins) {
if (!injectedNamesToPlugins.hasOwnProperty(pluginName)) {
continue;
}
var pluginModule = injectedNamesToPlugins[pluginName];
if (!namesToPlugins.hasOwnProperty(pluginName) || namesToPlugins[pluginName] !== pluginModule) {
invariant(!namesToPlugins[pluginName], 'EventPluginRegistry: Cannot inject two different event plugins ' + 'using the same name, `%s`.', pluginName);
namesToPlugins[pluginName] = pluginModule;
isOrderingDirty = true;
}
}
if (isOrderingDirty) {
recomputePluginOrdering();
}
},
getPluginModuleForEvent: function getPluginModuleForEvent(event) {
var dispatchConfig = event.dispatchConfig;
if (dispatchConfig.registrationName) {
return EventPluginRegistry.registrationNameModules[dispatchConfig.registrationName] || null;
}
if (dispatchConfig.phasedRegistrationNames !== undefined) {
var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;
for (var phase in phasedRegistrationNames) {
if (!phasedRegistrationNames.hasOwnProperty(phase)) {
continue;
}
var pluginModule = EventPluginRegistry.registrationNameModules[phasedRegistrationNames[phase]];
if (pluginModule) {
return pluginModule;
}
}
}
return null;
},
_resetEventPlugins: function _resetEventPlugins() {
eventPluginOrder = null;
for (var pluginName in namesToPlugins) {
if (namesToPlugins.hasOwnProperty(pluginName)) {
delete namesToPlugins[pluginName];
}
}
EventPluginRegistry.plugins.length = 0;
var eventNameDispatchConfigs = EventPluginRegistry.eventNameDispatchConfigs;
for (var eventName in eventNameDispatchConfigs) {
if (eventNameDispatchConfigs.hasOwnProperty(eventName)) {
delete eventNameDispatchConfigs[eventName];
}
}
var registrationNameModules = EventPluginRegistry.registrationNameModules;
for (var registrationName in registrationNameModules) {
if (registrationNameModules.hasOwnProperty(registrationName)) {
delete registrationNameModules[registrationName];
}
}
if (__DEV__) {
var possibleRegistrationNames = EventPluginRegistry.possibleRegistrationNames;
for (var lowerCasedName in possibleRegistrationNames) {
if (possibleRegistrationNames.hasOwnProperty(lowerCasedName)) {
delete possibleRegistrationNames[lowerCasedName];
}
}
}
}
};
module.exports = EventPluginRegistry;
}, 162, null, "EventPluginRegistry");
__d(/* EventPluginUtils */function(global, require, module, exports) {
'use strict';
var ReactErrorUtils = require(164 ); // 164 = ReactErrorUtils
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var warning = require(40 ); // 40 = fbjs/lib/warning
var ComponentTree;
var TreeTraversal;
var injection = {
injectComponentTree: function injectComponentTree(Injected) {
ComponentTree = Injected;
if (__DEV__) {
warning(Injected && Injected.getNodeFromInstance && Injected.getInstanceFromNode, 'EventPluginUtils.injection.injectComponentTree(...): Injected ' + 'module is missing getNodeFromInstance or getInstanceFromNode.');
}
},
injectTreeTraversal: function injectTreeTraversal(Injected) {
TreeTraversal = Injected;
if (__DEV__) {
warning(Injected && Injected.isAncestor && Injected.getLowestCommonAncestor, 'EventPluginUtils.injection.injectTreeTraversal(...): Injected ' + 'module is missing isAncestor or getLowestCommonAncestor.');
}
}
};
function isEndish(topLevelType) {
return topLevelType === 'topMouseUp' || topLevelType === 'topTouchEnd' || topLevelType === 'topTouchCancel';
}
function isMoveish(topLevelType) {
return topLevelType === 'topMouseMove' || topLevelType === 'topTouchMove';
}
function isStartish(topLevelType) {
return topLevelType === 'topMouseDown' || topLevelType === 'topTouchStart';
}
var validateEventDispatches;
if (__DEV__) {
validateEventDispatches = function validateEventDispatches(event) {
var dispatchListeners = event._dispatchListeners;
var dispatchInstances = event._dispatchInstances;
var listenersIsArr = Array.isArray(dispatchListeners);
var listenersLen = listenersIsArr ? dispatchListeners.length : dispatchListeners ? 1 : 0;
var instancesIsArr = Array.isArray(dispatchInstances);
var instancesLen = instancesIsArr ? dispatchInstances.length : dispatchInstances ? 1 : 0;
warning(instancesIsArr === listenersIsArr && instancesLen === listenersLen, 'EventPluginUtils: Invalid `event`.');
};
}
function executeDispatch(event, simulated, listener, inst) {
var type = event.type || 'unknown-event';
event.currentTarget = EventPluginUtils.getNodeFromInstance(inst);
if (simulated) {
ReactErrorUtils.invokeGuardedCallbackWithCatch(type, listener, event);
} else {
ReactErrorUtils.invokeGuardedCallback(type, listener, event);
}
event.currentTarget = null;
}
function executeDispatchesInOrder(event, simulated) {
var dispatchListeners = event._dispatchListeners;
var dispatchInstances = event._dispatchInstances;
if (__DEV__) {
validateEventDispatches(event);
}
if (Array.isArray(dispatchListeners)) {
for (var i = 0; i < dispatchListeners.length; i++) {
if (event.isPropagationStopped()) {
break;
}
executeDispatch(event, simulated, dispatchListeners[i], dispatchInstances[i]);
}
} else if (dispatchListeners) {
executeDispatch(event, simulated, dispatchListeners, dispatchInstances);
}
event._dispatchListeners = null;
event._dispatchInstances = null;
}
function executeDispatchesInOrderStopAtTrueImpl(event) {
var dispatchListeners = event._dispatchListeners;
var dispatchInstances = event._dispatchInstances;
if (__DEV__) {
validateEventDispatches(event);
}
if (Array.isArray(dispatchListeners)) {
for (var i = 0; i < dispatchListeners.length; i++) {
if (event.isPropagationStopped()) {
break;
}
if (dispatchListeners[i](event, dispatchInstances[i])) {
return dispatchInstances[i];
}
}
} else if (dispatchListeners) {
if (dispatchListeners(event, dispatchInstances)) {
return dispatchInstances;
}
}
return null;
}
function executeDispatchesInOrderStopAtTrue(event) {
var ret = executeDispatchesInOrderStopAtTrueImpl(event);
event._dispatchInstances = null;
event._dispatchListeners = null;
return ret;
}
function executeDirectDispatch(event) {
if (__DEV__) {
validateEventDispatches(event);
}
var dispatchListener = event._dispatchListeners;
var dispatchInstance = event._dispatchInstances;
invariant(!Array.isArray(dispatchListener), 'executeDirectDispatch(...): Invalid `event`.');
event.currentTarget = dispatchListener ? EventPluginUtils.getNodeFromInstance(dispatchInstance) : null;
var res = dispatchListener ? dispatchListener(event) : null;
event.currentTarget = null;
event._dispatchListeners = null;
event._dispatchInstances = null;
return res;
}
function hasDispatches(event) {
return !!event._dispatchListeners;
}
var EventPluginUtils = {
isEndish: isEndish,
isMoveish: isMoveish,
isStartish: isStartish,
executeDirectDispatch: executeDirectDispatch,
executeDispatchesInOrder: executeDispatchesInOrder,
executeDispatchesInOrderStopAtTrue: executeDispatchesInOrderStopAtTrue,
hasDispatches: hasDispatches,
getInstanceFromNode: function getInstanceFromNode(node) {
return ComponentTree.getInstanceFromNode(node);
},
getNodeFromInstance: function getNodeFromInstance(node) {
return ComponentTree.getNodeFromInstance(node);
},
isAncestor: function isAncestor(a, b) {
return TreeTraversal.isAncestor(a, b);
},
getLowestCommonAncestor: function getLowestCommonAncestor(a, b) {
return TreeTraversal.getLowestCommonAncestor(a, b);
},
getParentInstance: function getParentInstance(inst) {
return TreeTraversal.getParentInstance(inst);
},
traverseTwoPhase: function traverseTwoPhase(target, fn, arg) {
return TreeTraversal.traverseTwoPhase(target, fn, arg);
},
traverseEnterLeave: function traverseEnterLeave(from, to, fn, argFrom, argTo) {
return TreeTraversal.traverseEnterLeave(from, to, fn, argFrom, argTo);
},
injection: injection
};
module.exports = EventPluginUtils;
}, 163, null, "EventPluginUtils");
__d(/* ReactErrorUtils */function(global, require, module, exports) {
'use strict';
var caughtError = null;
function invokeGuardedCallback(name, func, a) {
try {
func(a);
} catch (x) {
if (caughtError === null) {
caughtError = x;
}
}
}
var ReactErrorUtils = {
invokeGuardedCallback: invokeGuardedCallback,
invokeGuardedCallbackWithCatch: invokeGuardedCallback,
rethrowCaughtError: function rethrowCaughtError() {
if (caughtError) {
var error = caughtError;
caughtError = null;
throw error;
}
}
};
if (__DEV__) {
if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function' && typeof document !== 'undefined' && typeof document.createEvent === 'function') {
var fakeNode = document.createElement('react');
ReactErrorUtils.invokeGuardedCallback = function (name, func, a) {
var boundFunc = func.bind(null, a);
var evtType = 'react-' + name;
fakeNode.addEventListener(evtType, boundFunc, false);
var evt = document.createEvent('Event');
evt.initEvent(evtType, false, false);
fakeNode.dispatchEvent(evt);
fakeNode.removeEventListener(evtType, boundFunc, false);
};
}
}
module.exports = ReactErrorUtils;
}, 164, null, "ReactErrorUtils");
__d(/* accumulateInto */function(global, require, module, exports) {
'use strict';
var invariant = require(44 ); // 44 = fbjs/lib/invariant
function accumulateInto(current, next) {
invariant(next != null, 'accumulateInto(...): Accumulated items must not be null or undefined.');
if (current == null) {
return next;
}
if (Array.isArray(current)) {
if (Array.isArray(next)) {
current.push.apply(current, next);
return current;
}
current.push(next);
return current;
}
if (Array.isArray(next)) {
return [current].concat(next);
}
return [current, next];
}
module.exports = accumulateInto;
}, 165, null, "accumulateInto");
__d(/* forEachAccumulated */function(global, require, module, exports) {
'use strict';
function forEachAccumulated(arr, cb, scope) {
if (Array.isArray(arr)) {
arr.forEach(cb, scope);
} else if (arr) {
cb.call(scope, arr);
}
}
module.exports = forEachAccumulated;
}, 166, null, "forEachAccumulated");
__d(/* ReactEventEmitterMixin */function(global, require, module, exports) {
'use strict';
var EventPluginHub = require(161 ); // 161 = EventPluginHub
function runEventQueueInBatch(events) {
EventPluginHub.enqueueEvents(events);
EventPluginHub.processEventQueue(false);
}
var ReactEventEmitterMixin = {
handleTopLevel: function handleTopLevel(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
var events = EventPluginHub.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget);
runEventQueueInBatch(events);
}
};
module.exports = ReactEventEmitterMixin;
}, 167, null, "ReactEventEmitterMixin");
__d(/* ReactNativeTagHandles */function(global, require, module, exports) {
'use strict';
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var INITIAL_TAG_COUNT = 1;
var ReactNativeTagHandles = {
tagsStartAt: INITIAL_TAG_COUNT,
tagCount: INITIAL_TAG_COUNT,
allocateTag: function allocateTag() {
while (this.reactTagIsNativeTopRootID(ReactNativeTagHandles.tagCount)) {
ReactNativeTagHandles.tagCount++;
}
var tag = ReactNativeTagHandles.tagCount;
ReactNativeTagHandles.tagCount++;
return tag;
},
assertRootTag: function assertRootTag(tag) {
invariant(this.reactTagIsNativeTopRootID(tag), 'Expect a native root tag, instead got %s', tag);
},
reactTagIsNativeTopRootID: function reactTagIsNativeTopRootID(reactTag) {
return reactTag % 10 === 1;
}
};
module.exports = ReactNativeTagHandles;
}, 168, null, "ReactNativeTagHandles");
__d(/* ReactUpdates */function(global, require, module, exports) {
'use strict';
var CallbackQueue = require(170 ); // 170 = CallbackQueue
var PooledClass = require(171 ); // 171 = PooledClass
var ReactFeatureFlags = require(172 ); // 172 = ReactFeatureFlags
var ReactReconciler = require(173 ); // 173 = ReactReconciler
var Transaction = require(177 ); // 177 = Transaction
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var dirtyComponents = [];
var updateBatchNumber = 0;
var asapCallbackQueue = CallbackQueue.getPooled();
var asapEnqueued = false;
var batchingStrategy = null;
function ensureInjected() {
invariant(ReactUpdates.ReactReconcileTransaction && batchingStrategy, 'ReactUpdates: must inject a reconcile transaction class and batching ' + 'strategy');
}
var NESTED_UPDATES = {
initialize: function initialize() {
this.dirtyComponentsLength = dirtyComponents.length;
},
close: function close() {
if (this.dirtyComponentsLength !== dirtyComponents.length) {
dirtyComponents.splice(0, this.dirtyComponentsLength);
flushBatchedUpdates();
} else {
dirtyComponents.length = 0;
}
}
};
var UPDATE_QUEUEING = {
initialize: function initialize() {
this.callbackQueue.reset();
},
close: function close() {
this.callbackQueue.notifyAll();
}
};
var TRANSACTION_WRAPPERS = [NESTED_UPDATES, UPDATE_QUEUEING];
function ReactUpdatesFlushTransaction() {
this.reinitializeTransaction();
this.dirtyComponentsLength = null;
this.callbackQueue = CallbackQueue.getPooled();
this.reconcileTransaction = ReactUpdates.ReactReconcileTransaction.getPooled(true);
}
babelHelpers.extends(ReactUpdatesFlushTransaction.prototype, Transaction, {
getTransactionWrappers: function getTransactionWrappers() {
return TRANSACTION_WRAPPERS;
},
destructor: function destructor() {
this.dirtyComponentsLength = null;
CallbackQueue.release(this.callbackQueue);
this.callbackQueue = null;
ReactUpdates.ReactReconcileTransaction.release(this.reconcileTransaction);
this.reconcileTransaction = null;
},
perform: function perform(method, scope, a) {
return Transaction.perform.call(this, this.reconcileTransaction.perform, this.reconcileTransaction, method, scope, a);
}
});
PooledClass.addPoolingTo(ReactUpdatesFlushTransaction);
function batchedUpdates(callback, a, b, c, d, e) {
ensureInjected();
return batchingStrategy.batchedUpdates(callback, a, b, c, d, e);
}
function mountOrderComparator(c1, c2) {
return c1._mountOrder - c2._mountOrder;
}
function runBatchedUpdates(transaction) {
var len = transaction.dirtyComponentsLength;
invariant(len === dirtyComponents.length, 'Expected flush transaction\'s stored dirty-components length (%s) to ' + 'match dirty-components array length (%s).', len, dirtyComponents.length);
dirtyComponents.sort(mountOrderComparator);
updateBatchNumber++;
for (var i = 0; i < len; i++) {
var component = dirtyComponents[i];
var callbacks = component._pendingCallbacks;
component._pendingCallbacks = null;
var markerName;
if (ReactFeatureFlags.logTopLevelRenders) {
var namedComponent = component;
if (component._currentElement.type.isReactTopLevelWrapper) {
namedComponent = component._renderedComponent;
}
markerName = 'React update: ' + namedComponent.getName();
console.time(markerName);
}
ReactReconciler.performUpdateIfNecessary(component, transaction.reconcileTransaction, updateBatchNumber);
if (markerName) {
console.timeEnd(markerName);
}
if (callbacks) {
for (var j = 0; j < callbacks.length; j++) {
transaction.callbackQueue.enqueue(callbacks[j], component.getPublicInstance());
}
}
}
}
var flushBatchedUpdates = function flushBatchedUpdates() {
while (dirtyComponents.length || asapEnqueued) {
if (dirtyComponents.length) {
var transaction = ReactUpdatesFlushTransaction.getPooled();
transaction.perform(runBatchedUpdates, null, transaction);
ReactUpdatesFlushTransaction.release(transaction);
}
if (asapEnqueued) {
asapEnqueued = false;
var queue = asapCallbackQueue;
asapCallbackQueue = CallbackQueue.getPooled();
queue.notifyAll();
CallbackQueue.release(queue);
}
}
};
function enqueueUpdate(component) {
ensureInjected();
if (!batchingStrategy.isBatchingUpdates) {
batchingStrategy.batchedUpdates(enqueueUpdate, component);
return;
}
dirtyComponents.push(component);
if (component._updateBatchNumber == null) {
component._updateBatchNumber = updateBatchNumber + 1;
}
}
function asap(callback, context) {
invariant(batchingStrategy.isBatchingUpdates, 'ReactUpdates.asap: Can\'t enqueue an asap callback in a context where' + 'updates are not being batched.');
asapCallbackQueue.enqueue(callback, context);
asapEnqueued = true;
}
var ReactUpdatesInjection = {
injectReconcileTransaction: function injectReconcileTransaction(ReconcileTransaction) {
invariant(ReconcileTransaction, 'ReactUpdates: must provide a reconcile transaction class');
ReactUpdates.ReactReconcileTransaction = ReconcileTransaction;
},
injectBatchingStrategy: function injectBatchingStrategy(_batchingStrategy) {
invariant(_batchingStrategy, 'ReactUpdates: must provide a batching strategy');
invariant(typeof _batchingStrategy.batchedUpdates === 'function', 'ReactUpdates: must provide a batchedUpdates() function');
invariant(typeof _batchingStrategy.isBatchingUpdates === 'boolean', 'ReactUpdates: must provide an isBatchingUpdates boolean attribute');
batchingStrategy = _batchingStrategy;
},
getBatchingStrategy: function getBatchingStrategy() {
return batchingStrategy;
}
};
var ReactUpdates = {
ReactReconcileTransaction: null,
batchedUpdates: batchedUpdates,
enqueueUpdate: enqueueUpdate,
flushBatchedUpdates: flushBatchedUpdates,
injection: ReactUpdatesInjection,
asap: asap
};
module.exports = ReactUpdates;
}, 169, null, "ReactUpdates");
__d(/* CallbackQueue */function(global, require, module, exports) {
'use strict';
var PooledClass = require(171 ); // 171 = PooledClass
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var CallbackQueue = function () {
function CallbackQueue(arg) {
babelHelpers.classCallCheck(this, CallbackQueue);
this._callbacks = null;
this._contexts = null;
this._arg = arg;
}
babelHelpers.createClass(CallbackQueue, [{
key: 'enqueue',
value: function enqueue(callback, context) {
this._callbacks = this._callbacks || [];
this._callbacks.push(callback);
this._contexts = this._contexts || [];
this._contexts.push(context);
}
}, {
key: 'notifyAll',
value: function notifyAll() {
var callbacks = this._callbacks;
var contexts = this._contexts;
var arg = this._arg;
if (callbacks && contexts) {
invariant(callbacks.length === contexts.length, 'Mismatched list of contexts in callback queue');
this._callbacks = null;
this._contexts = null;
for (var i = 0; i < callbacks.length; i++) {
callbacks[i].call(contexts[i], arg);
}
callbacks.length = 0;
contexts.length = 0;
}
}
}, {
key: 'checkpoint',
value: function checkpoint() {
return this._callbacks ? this._callbacks.length : 0;
}
}, {
key: 'rollback',
value: function rollback(len) {
if (this._callbacks && this._contexts) {
this._callbacks.length = len;
this._contexts.length = len;
}
}
}, {
key: 'reset',
value: function reset() {
this._callbacks = null;
this._contexts = null;
}
}, {
key: 'destructor',
value: function destructor() {
this.reset();
}
}]);
return CallbackQueue;
}();
module.exports = PooledClass.addPoolingTo(CallbackQueue);
}, 170, null, "CallbackQueue");
__d(/* PooledClass */function(global, require, module, exports) {
'use strict';
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var oneArgumentPooler = function oneArgumentPooler(copyFieldsFrom) {
var Klass = this;
if (Klass.instancePool.length) {
var instance = Klass.instancePool.pop();
Klass.call(instance, copyFieldsFrom);
return instance;
} else {
return new Klass(copyFieldsFrom);
}
};
var twoArgumentPooler = function twoArgumentPooler(a1, a2) {
var Klass = this;
if (Klass.instancePool.length) {
var instance = Klass.instancePool.pop();
Klass.call(instance, a1, a2);
return instance;
} else {
return new Klass(a1, a2);
}
};
var threeArgumentPooler = function threeArgumentPooler(a1, a2, a3) {
var Klass = this;
if (Klass.instancePool.length) {
var instance = Klass.instancePool.pop();
Klass.call(instance, a1, a2, a3);
return instance;
} else {
return new Klass(a1, a2, a3);
}
};
var fourArgumentPooler = function fourArgumentPooler(a1, a2, a3, a4) {
var Klass = this;
if (Klass.instancePool.length) {
var instance = Klass.instancePool.pop();
Klass.call(instance, a1, a2, a3, a4);
return instance;
} else {
return new Klass(a1, a2, a3, a4);
}
};
var fiveArgumentPooler = function fiveArgumentPooler(a1, a2, a3, a4, a5) {
var Klass = this;
if (Klass.instancePool.length) {
var instance = Klass.instancePool.pop();
Klass.call(instance, a1, a2, a3, a4, a5);
return instance;
} else {
return new Klass(a1, a2, a3, a4, a5);
}
};
var standardReleaser = function standardReleaser(instance) {
var Klass = this;
invariant(instance instanceof Klass, 'Trying to release an instance into a pool of a different type.');
instance.destructor();
if (Klass.instancePool.length < Klass.poolSize) {
Klass.instancePool.push(instance);
}
};
var DEFAULT_POOL_SIZE = 10;
var DEFAULT_POOLER = oneArgumentPooler;
var addPoolingTo = function addPoolingTo(CopyConstructor, pooler) {
var NewKlass = CopyConstructor;
NewKlass.instancePool = [];
NewKlass.getPooled = pooler || DEFAULT_POOLER;
if (!NewKlass.poolSize) {
NewKlass.poolSize = DEFAULT_POOL_SIZE;
}
NewKlass.release = standardReleaser;
return NewKlass;
};
var PooledClass = {
addPoolingTo: addPoolingTo,
oneArgumentPooler: oneArgumentPooler,
twoArgumentPooler: twoArgumentPooler,
threeArgumentPooler: threeArgumentPooler,
fourArgumentPooler: fourArgumentPooler,
fiveArgumentPooler: fiveArgumentPooler
};
module.exports = PooledClass;
}, 171, null, "PooledClass");
__d(/* ReactFeatureFlags */function(global, require, module, exports) {
'use strict';
var ReactFeatureFlags = {
logTopLevelRenders: false
};
module.exports = ReactFeatureFlags;
}, 172, null, "ReactFeatureFlags");
__d(/* ReactReconciler */function(global, require, module, exports) {
'use strict';
var ReactRef = require(174 ); // 174 = ReactRef
var ReactInstrumentation = require(176 ); // 176 = ReactInstrumentation
var warning = require(40 ); // 40 = fbjs/lib/warning
function attachRefs(transaction) {
ReactRef.attachRefs(this, this._currentElement, transaction);
}
var ReactReconciler = {
mountComponent: function mountComponent(internalInstance, transaction, hostParent, hostContainerInfo, context, parentDebugID) {
if (__DEV__) {
if (internalInstance._debugID !== 0) {
ReactInstrumentation.debugTool.onBeforeMountComponent(internalInstance._debugID, internalInstance._currentElement, parentDebugID);
}
}
var markup = internalInstance.mountComponent(transaction, hostParent, hostContainerInfo, context, parentDebugID);
if (internalInstance._currentElement && internalInstance._currentElement.ref != null) {
transaction.getReactMountReady().enqueue(attachRefs, internalInstance);
}
if (__DEV__) {
if (internalInstance._debugID !== 0) {
ReactInstrumentation.debugTool.onMountComponent(internalInstance._debugID);
}
}
return markup;
},
getHostNode: function getHostNode(internalInstance) {
return internalInstance.getHostNode();
},
unmountComponent: function unmountComponent(internalInstance, safely) {
if (__DEV__) {
if (internalInstance._debugID !== 0) {
ReactInstrumentation.debugTool.onBeforeUnmountComponent(internalInstance._debugID);
}
}
ReactRef.detachRefs(internalInstance, internalInstance._currentElement);
internalInstance.unmountComponent(safely);
if (__DEV__) {
if (internalInstance._debugID !== 0) {
ReactInstrumentation.debugTool.onUnmountComponent(internalInstance._debugID);
}
}
},
receiveComponent: function receiveComponent(internalInstance, nextElement, transaction, context) {
var prevElement = internalInstance._currentElement;
if (nextElement === prevElement && context === internalInstance._context) {
return;
}
if (__DEV__) {
if (internalInstance._debugID !== 0) {
ReactInstrumentation.debugTool.onBeforeUpdateComponent(internalInstance._debugID, nextElement);
}
}
var refsChanged = ReactRef.shouldUpdateRefs(prevElement, nextElement);
if (refsChanged) {
ReactRef.detachRefs(internalInstance, prevElement);
}
internalInstance.receiveComponent(nextElement, transaction, context);
if (refsChanged && internalInstance._currentElement && internalInstance._currentElement.ref != null) {
transaction.getReactMountReady().enqueue(attachRefs, internalInstance);
}
if (__DEV__) {
if (internalInstance._debugID !== 0) {
ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID);
}
}
},
performUpdateIfNecessary: function performUpdateIfNecessary(internalInstance, transaction, updateBatchNumber) {
if (internalInstance._updateBatchNumber !== updateBatchNumber) {
warning(internalInstance._updateBatchNumber == null || internalInstance._updateBatchNumber === updateBatchNumber + 1, 'performUpdateIfNecessary: Unexpected batch number (current %s, ' + 'pending %s)', updateBatchNumber, internalInstance._updateBatchNumber);
return;
}
if (__DEV__) {
if (internalInstance._debugID !== 0) {
ReactInstrumentation.debugTool.onBeforeUpdateComponent(internalInstance._debugID, internalInstance._currentElement);
}
}
internalInstance.performUpdateIfNecessary(transaction);
if (__DEV__) {
if (internalInstance._debugID !== 0) {
ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID);
}
}
}
};
module.exports = ReactReconciler;
}, 173, null, "ReactReconciler");
__d(/* ReactRef */function(global, require, module, exports) {
'use strict';
var ReactOwner = require(175 ); // 175 = ReactOwner
var ReactRef = {};
function attachRef(ref, component, owner, transaction) {
if (typeof ref === 'function') {
ref(component.getPublicInstance(transaction));
} else {
ReactOwner.addComponentAsRefTo(component, ref, owner, transaction);
}
}
function detachRef(ref, component, owner) {
if (typeof ref === 'function') {
ref(null);
} else {
ReactOwner.removeComponentAsRefFrom(component, ref, owner);
}
}
ReactRef.attachRefs = function (instance, element, transaction) {
if (element === null || typeof element !== 'object') {
return;
}
var ref = element.ref;
if (ref != null) {
attachRef(ref, instance, element._owner, transaction);
}
};
ReactRef.shouldUpdateRefs = function (prevElement, nextElement) {
var prevRef = null;
var prevOwner = null;
if (prevElement !== null && typeof prevElement === 'object') {
prevRef = prevElement.ref;
prevOwner = prevElement._owner;
}
var nextRef = null;
var nextOwner = null;
if (nextElement !== null && typeof nextElement === 'object') {
nextRef = nextElement.ref;
nextOwner = nextElement._owner;
}
return prevRef !== nextRef || typeof nextRef === 'string' && nextOwner !== prevOwner;
};
ReactRef.detachRefs = function (instance, element) {
if (element === null || typeof element !== 'object') {
return;
}
var ref = element.ref;
if (ref != null) {
detachRef(ref, instance, element._owner);
}
};
module.exports = ReactRef;
}, 174, null, "ReactRef");
__d(/* ReactOwner */function(global, require, module, exports) {
'use strict';
var invariant = require(44 ); // 44 = fbjs/lib/invariant
function isValidOwner(object) {
return !!(object && typeof object.attachRef === 'function' && typeof object.detachRef === 'function');
}
var ReactOwner = {
addComponentAsRefTo: function addComponentAsRefTo(component, ref, owner, transaction) {
invariant(isValidOwner(owner), 'addComponentAsRefTo(...): Only a ReactOwner can have refs. You might ' + 'be adding a ref to a component that was not created inside a component\'s ' + '`render` method, or you have multiple copies of React loaded ' + '(details: https://fb.me/react-refs-must-have-owner).');
owner.attachRef(ref, component, transaction);
},
removeComponentAsRefFrom: function removeComponentAsRefFrom(component, ref, owner) {
invariant(isValidOwner(owner), 'removeComponentAsRefFrom(...): Only a ReactOwner can have refs. You might ' + 'be removing a ref to a component that was not created inside a component\'s ' + '`render` method, or you have multiple copies of React loaded ' + '(details: https://fb.me/react-refs-must-have-owner).');
var ownerPublicInstance = owner.getPublicInstance();
if (ownerPublicInstance && ownerPublicInstance.refs[ref] === component.getPublicInstance()) {
owner.detachRef(ref);
}
}
};
module.exports = ReactOwner;
}, 175, null, "ReactOwner");
__d(/* ReactInstrumentation */function(global, require, module, exports) {
'use strict';
var debugTool = null;
if (__DEV__) {
var ReactDebugTool = require(86 ); // 86 = ReactDebugTool
debugTool = ReactDebugTool;
}
module.exports = { debugTool: debugTool };
}, 176, null, "ReactInstrumentation");
__d(/* Transaction */function(global, require, module, exports) {
'use strict';
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var OBSERVED_ERROR = {};
var TransactionImpl = {
reinitializeTransaction: function reinitializeTransaction() {
this.transactionWrappers = this.getTransactionWrappers();
if (this.wrapperInitData) {
this.wrapperInitData.length = 0;
} else {
this.wrapperInitData = [];
}
this._isInTransaction = false;
},
_isInTransaction: false,
getTransactionWrappers: null,
isInTransaction: function isInTransaction() {
return !!this._isInTransaction;
},
perform: function perform(method, scope, a, b, c, d, e, f) {
invariant(!this.isInTransaction(), 'Transaction.perform(...): Cannot initialize a transaction when there ' + 'is already an outstanding transaction.');
var errorThrown;
var ret;
try {
this._isInTransaction = true;
errorThrown = true;
this.initializeAll(0);
ret = method.call(scope, a, b, c, d, e, f);
errorThrown = false;
} finally {
try {
if (errorThrown) {
try {
this.closeAll(0);
} catch (err) {}
} else {
this.closeAll(0);
}
} finally {
this._isInTransaction = false;
}
}
return ret;
},
initializeAll: function initializeAll(startIndex) {
var transactionWrappers = this.transactionWrappers;
for (var i = startIndex; i < transactionWrappers.length; i++) {
var wrapper = transactionWrappers[i];
try {
this.wrapperInitData[i] = OBSERVED_ERROR;
this.wrapperInitData[i] = wrapper.initialize ? wrapper.initialize.call(this) : null;
} finally {
if (this.wrapperInitData[i] === OBSERVED_ERROR) {
try {
this.initializeAll(i + 1);
} catch (err) {}
}
}
}
},
closeAll: function closeAll(startIndex) {
invariant(this.isInTransaction(), 'Transaction.closeAll(): Cannot close transaction when none are open.');
var transactionWrappers = this.transactionWrappers;
for (var i = startIndex; i < transactionWrappers.length; i++) {
var wrapper = transactionWrappers[i];
var initData = this.wrapperInitData[i];
var errorThrown;
try {
errorThrown = true;
if (initData !== OBSERVED_ERROR && wrapper.close) {
wrapper.close.call(this, initData);
}
errorThrown = false;
} finally {
if (errorThrown) {
try {
this.closeAll(i + 1);
} catch (e) {}
}
}
}
this.wrapperInitData.length = 0;
}
};
module.exports = TransactionImpl;
}, 177, null, "Transaction");
__d(/* ReactMultiChild */function(global, require, module, exports) {
'use strict';
var ReactComponentEnvironment = require(179 ); // 179 = ReactComponentEnvironment
var ReactInstanceMap = require(125 ); // 125 = ReactInstanceMap
var ReactInstrumentation = require(176 ); // 176 = ReactInstrumentation
var ReactCurrentOwner = require(49 ); // 49 = react/lib/ReactCurrentOwner
var ReactReconciler = require(173 ); // 173 = ReactReconciler
var ReactChildReconciler = require(180 ); // 180 = ReactChildReconciler
var emptyFunction = require(41 ); // 41 = fbjs/lib/emptyFunction
var flattenChildren = require(195 ); // 195 = flattenChildren
var invariant = require(44 ); // 44 = fbjs/lib/invariant
function makeInsertMarkup(markup, afterNode, toIndex) {
return {
type: 'INSERT_MARKUP',
content: markup,
fromIndex: null,
fromNode: null,
toIndex: toIndex,
afterNode: afterNode
};
}
function makeMove(child, afterNode, toIndex) {
return {
type: 'MOVE_EXISTING',
content: null,
fromIndex: child._mountIndex,
fromNode: ReactReconciler.getHostNode(child),
toIndex: toIndex,
afterNode: afterNode
};
}
function makeRemove(child, node) {
return {
type: 'REMOVE_NODE',
content: null,
fromIndex: child._mountIndex,
fromNode: node,
toIndex: null,
afterNode: null
};
}
function makeSetMarkup(markup) {
return {
type: 'SET_MARKUP',
content: markup,
fromIndex: null,
fromNode: null,
toIndex: null,
afterNode: null
};
}
function makeTextContent(textContent) {
return {
type: 'TEXT_CONTENT',
content: textContent,
fromIndex: null,
fromNode: null,
toIndex: null,
afterNode: null
};
}
function enqueue(queue, update) {
if (update) {
queue = queue || [];
queue.push(update);
}
return queue;
}
function processQueue(inst, updateQueue) {
ReactComponentEnvironment.processChildrenUpdates(inst, updateQueue);
}
var setChildrenForInstrumentation = emptyFunction;
if (__DEV__) {
var getDebugID = function getDebugID(inst) {
if (!inst._debugID) {
var internal;
if (internal = ReactInstanceMap.get(inst)) {
inst = internal;
}
}
return inst._debugID;
};
setChildrenForInstrumentation = function setChildrenForInstrumentation(children) {
var debugID = getDebugID(this);
if (debugID !== 0) {
ReactInstrumentation.debugTool.onSetChildren(debugID, children ? Object.keys(children).map(function (key) {
return children[key]._debugID;
}) : []);
}
};
}
var ReactMultiChild = {
_reconcilerInstantiateChildren: function _reconcilerInstantiateChildren(nestedChildren, transaction, context) {
if (__DEV__) {
var selfDebugID = getDebugID(this);
if (this._currentElement) {
try {
ReactCurrentOwner.current = this._currentElement._owner;
return ReactChildReconciler.instantiateChildren(nestedChildren, transaction, context, selfDebugID);
} finally {
ReactCurrentOwner.current = null;
}
}
}
return ReactChildReconciler.instantiateChildren(nestedChildren, transaction, context);
},
_reconcilerUpdateChildren: function _reconcilerUpdateChildren(prevChildren, nextNestedChildrenElements, mountImages, removedNodes, transaction, context) {
var nextChildren;
var selfDebugID = 0;
if (__DEV__) {
selfDebugID = getDebugID(this);
if (this._currentElement) {
try {
ReactCurrentOwner.current = this._currentElement._owner;
nextChildren = flattenChildren(nextNestedChildrenElements, selfDebugID);
} finally {
ReactCurrentOwner.current = null;
}
ReactChildReconciler.updateChildren(prevChildren, nextChildren, mountImages, removedNodes, transaction, this, this._hostContainerInfo, context, selfDebugID);
return nextChildren;
}
}
nextChildren = flattenChildren(nextNestedChildrenElements, selfDebugID);
ReactChildReconciler.updateChildren(prevChildren, nextChildren, mountImages, removedNodes, transaction, this, this._hostContainerInfo, context, selfDebugID);
return nextChildren;
},
mountChildren: function mountChildren(nestedChildren, transaction, context) {
var children = this._reconcilerInstantiateChildren(nestedChildren, transaction, context);
this._renderedChildren = children;
var mountImages = [];
var index = 0;
for (var name in children) {
if (children.hasOwnProperty(name)) {
var child = children[name];
var selfDebugID = 0;
if (__DEV__) {
selfDebugID = getDebugID(this);
}
var mountImage = ReactReconciler.mountComponent(child, transaction, this, this._hostContainerInfo, context, selfDebugID);
child._mountIndex = index++;
mountImages.push(mountImage);
}
}
if (__DEV__) {
setChildrenForInstrumentation.call(this, children);
}
return mountImages;
},
updateTextContent: function updateTextContent(nextContent) {
var prevChildren = this._renderedChildren;
ReactChildReconciler.unmountChildren(prevChildren, false);
for (var name in prevChildren) {
if (prevChildren.hasOwnProperty(name)) {
invariant(false, 'updateTextContent called on non-empty component.');
}
}
var updates = [makeTextContent(nextContent)];
processQueue(this, updates);
},
updateMarkup: function updateMarkup(nextMarkup) {
var prevChildren = this._renderedChildren;
ReactChildReconciler.unmountChildren(prevChildren, false);
for (var name in prevChildren) {
if (prevChildren.hasOwnProperty(name)) {
invariant(false, 'updateTextContent called on non-empty component.');
}
}
var updates = [makeSetMarkup(nextMarkup)];
processQueue(this, updates);
},
updateChildren: function updateChildren(nextNestedChildrenElements, transaction, context) {
this._updateChildren(nextNestedChildrenElements, transaction, context);
},
_updateChildren: function _updateChildren(nextNestedChildrenElements, transaction, context) {
var prevChildren = this._renderedChildren;
var removedNodes = {};
var mountImages = [];
var nextChildren = this._reconcilerUpdateChildren(prevChildren, nextNestedChildrenElements, mountImages, removedNodes, transaction, context);
if (!nextChildren && !prevChildren) {
return;
}
var updates = null;
var name;
var nextIndex = 0;
var lastIndex = 0;
var nextMountIndex = 0;
var lastPlacedNode = null;
for (name in nextChildren) {
if (!nextChildren.hasOwnProperty(name)) {
continue;
}
var prevChild = prevChildren && prevChildren[name];
var nextChild = nextChildren[name];
if (prevChild === nextChild) {
updates = enqueue(updates, this.moveChild(prevChild, lastPlacedNode, nextIndex, lastIndex));
lastIndex = Math.max(prevChild._mountIndex, lastIndex);
prevChild._mountIndex = nextIndex;
} else {
if (prevChild) {
lastIndex = Math.max(prevChild._mountIndex, lastIndex);
}
updates = enqueue(updates, this._mountChildAtIndex(nextChild, mountImages[nextMountIndex], lastPlacedNode, nextIndex, transaction, context));
nextMountIndex++;
}
nextIndex++;
lastPlacedNode = ReactReconciler.getHostNode(nextChild);
}
for (name in removedNodes) {
if (removedNodes.hasOwnProperty(name)) {
updates = enqueue(updates, this._unmountChild(prevChildren[name], removedNodes[name]));
}
}
if (updates) {
processQueue(this, updates);
}
this._renderedChildren = nextChildren;
if (__DEV__) {
setChildrenForInstrumentation.call(this, nextChildren);
}
},
unmountChildren: function unmountChildren(safely) {
var renderedChildren = this._renderedChildren;
ReactChildReconciler.unmountChildren(renderedChildren, safely);
this._renderedChildren = null;
},
moveChild: function moveChild(child, afterNode, toIndex, lastIndex) {
if (child._mountIndex < lastIndex) {
return makeMove(child, afterNode, toIndex);
}
},
createChild: function createChild(child, afterNode, mountImage) {
return makeInsertMarkup(mountImage, afterNode, child._mountIndex);
},
removeChild: function removeChild(child, node) {
return makeRemove(child, node);
},
_mountChildAtIndex: function _mountChildAtIndex(child, mountImage, afterNode, index, transaction, context) {
child._mountIndex = index;
return this.createChild(child, afterNode, mountImage);
},
_unmountChild: function _unmountChild(child, node) {
var update = this.removeChild(child, node);
child._mountIndex = null;
return update;
}
};
module.exports = ReactMultiChild;
}, 178, null, "ReactMultiChild");
__d(/* ReactComponentEnvironment */function(global, require, module, exports) {
'use strict';
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var injected = false;
var ReactComponentEnvironment = {
replaceNodeWithMarkup: null,
processChildrenUpdates: null,
injection: {
injectEnvironment: function injectEnvironment(environment) {
invariant(!injected, 'ReactCompositeComponent: injectEnvironment() can only be called once.');
ReactComponentEnvironment.replaceNodeWithMarkup = environment.replaceNodeWithMarkup;
ReactComponentEnvironment.processChildrenUpdates = environment.processChildrenUpdates;
injected = true;
}
}
};
module.exports = ReactComponentEnvironment;
}, 179, null, "ReactComponentEnvironment");
__d(/* ReactChildReconciler */function(global, require, module, exports) {
'use strict';
var ReactReconciler = require(173 ); // 173 = ReactReconciler
var instantiateReactComponent = require(181 ); // 181 = instantiateReactComponent
var KeyEscapeUtils = require(191 ); // 191 = KeyEscapeUtils
var shouldUpdateReactComponent = require(188 ); // 188 = shouldUpdateReactComponent
var traverseAllChildren = require(192 ); // 192 = traverseAllChildren
var warning = require(40 ); // 40 = fbjs/lib/warning
var ReactComponentTreeHook;
if (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'test') {
ReactComponentTreeHook = require(56 ); // 56 = react/lib/ReactComponentTreeHook
}
function instantiateChild(childInstances, child, name, selfDebugID) {
var keyUnique = childInstances[name] === undefined;
if (__DEV__) {
if (!ReactComponentTreeHook) {
ReactComponentTreeHook = require(56 ); // 56 = react/lib/ReactComponentTreeHook
}
if (!keyUnique) {
warning(false, 'flattenChildren(...): Encountered two children with the same key, ' + '`%s`. Child keys must be unique; when two children share a key, only ' + 'the first child will be used.%s', KeyEscapeUtils.unescape(name), ReactComponentTreeHook.getStackAddendumByID(selfDebugID));
}
}
if (child != null && keyUnique) {
childInstances[name] = instantiateReactComponent(child, true);
}
}
var ReactChildReconciler = {
instantiateChildren: function instantiateChildren(nestedChildNodes, transaction, context, selfDebugID) {
if (nestedChildNodes == null) {
return null;
}
var childInstances = {};
if (__DEV__) {
traverseAllChildren(nestedChildNodes, function (childInsts, child, name) {
return instantiateChild(childInsts, child, name, selfDebugID);
}, childInstances);
} else {
traverseAllChildren(nestedChildNodes, instantiateChild, childInstances);
}
return childInstances;
},
updateChildren: function updateChildren(prevChildren, nextChildren, mountImages, removedNodes, transaction, hostParent, hostContainerInfo, context, selfDebugID) {
if (!nextChildren && !prevChildren) {
return;
}
var name;
var prevChild;
for (name in nextChildren) {
if (!nextChildren.hasOwnProperty(name)) {
continue;
}
prevChild = prevChildren && prevChildren[name];
var prevElement = prevChild && prevChild._currentElement;
var nextElement = nextChildren[name];
if (prevChild != null && shouldUpdateReactComponent(prevElement, nextElement)) {
ReactReconciler.receiveComponent(prevChild, nextElement, transaction, context);
nextChildren[name] = prevChild;
} else {
if (prevChild) {
removedNodes[name] = ReactReconciler.getHostNode(prevChild);
ReactReconciler.unmountComponent(prevChild, false);
}
var nextChildInstance = instantiateReactComponent(nextElement, true);
nextChildren[name] = nextChildInstance;
var nextChildMountImage = ReactReconciler.mountComponent(nextChildInstance, transaction, hostParent, hostContainerInfo, context, selfDebugID);
mountImages.push(nextChildMountImage);
}
}
for (name in prevChildren) {
if (prevChildren.hasOwnProperty(name) && !(nextChildren && nextChildren.hasOwnProperty(name))) {
prevChild = prevChildren[name];
removedNodes[name] = ReactReconciler.getHostNode(prevChild);
ReactReconciler.unmountComponent(prevChild, false);
}
}
},
unmountChildren: function unmountChildren(renderedChildren, safely) {
for (var name in renderedChildren) {
if (renderedChildren.hasOwnProperty(name)) {
var renderedChild = renderedChildren[name];
ReactReconciler.unmountComponent(renderedChild, safely);
}
}
}
};
module.exports = ReactChildReconciler;
}, 180, null, "ReactChildReconciler");
__d(/* instantiateReactComponent */function(global, require, module, exports) {
'use strict';
var ReactCompositeComponent = require(182 ); // 182 = ReactCompositeComponent
var ReactEmptyComponent = require(189 ); // 189 = ReactEmptyComponent
var ReactHostComponent = require(190 ); // 190 = ReactHostComponent
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var warning = require(40 ); // 40 = fbjs/lib/warning
var ReactCompositeComponentWrapper = function ReactCompositeComponentWrapper(element) {
this.construct(element);
};
babelHelpers.extends(ReactCompositeComponentWrapper.prototype, ReactCompositeComponent, {
_instantiateReactComponent: instantiateReactComponent
});
function getDeclarationErrorAddendum(owner) {
if (owner) {
var name = owner.getName();
if (name) {
return ' Check the render method of `' + name + '`.';
}
}
return '';
}
function isInternalComponentType(type) {
return typeof type === 'function' && typeof type.prototype !== 'undefined' && typeof type.prototype.mountComponent === 'function' && typeof type.prototype.receiveComponent === 'function';
}
var nextDebugID = 1;
function instantiateReactComponent(node, shouldHaveDebugID) {
var instance;
if (node === null || node === false) {
instance = ReactEmptyComponent.create(instantiateReactComponent);
} else if (typeof node === 'object') {
var element = node;
invariant(element && (typeof element.type === 'function' || typeof element.type === 'string'), 'Element type is invalid: expected a string (for built-in components) ' + 'or a class/function (for composite components) but got: %s.%s', element.type == null ? element.type : typeof element.type, getDeclarationErrorAddendum(element._owner));
if (typeof element.type === 'string') {
instance = ReactHostComponent.createInternalComponent(element);
} else if (isInternalComponentType(element.type)) {
instance = new element.type(element);
if (!instance.getHostNode) {
instance.getHostNode = instance.getNativeNode;
}
} else {
instance = new ReactCompositeComponentWrapper(element);
}
} else if (typeof node === 'string' || typeof node === 'number') {
instance = ReactHostComponent.createInstanceForText(node);
} else {
invariant(false, 'Encountered invalid React node of type %s', typeof node);
}
if (__DEV__) {
warning(typeof instance.mountComponent === 'function' && typeof instance.receiveComponent === 'function' && typeof instance.getHostNode === 'function' && typeof instance.unmountComponent === 'function', 'Only React Components can be mounted.');
}
instance._mountIndex = 0;
instance._mountImage = null;
if (__DEV__) {
instance._debugID = shouldHaveDebugID ? nextDebugID++ : 0;
}
if (__DEV__) {
if (Object.preventExtensions) {
Object.preventExtensions(instance);
}
}
return instance;
}
module.exports = instantiateReactComponent;
}, 181, null, "instantiateReactComponent");
__d(/* ReactCompositeComponent */function(global, require, module, exports) {
'use strict';
var React = require(126 ); // 126 = React
var ReactComponentEnvironment = require(179 ); // 179 = ReactComponentEnvironment
var ReactCurrentOwner = require(49 ); // 49 = react/lib/ReactCurrentOwner
var ReactErrorUtils = require(164 ); // 164 = ReactErrorUtils
var ReactInstanceMap = require(125 ); // 125 = ReactInstanceMap
var ReactInstrumentation = require(176 ); // 176 = ReactInstrumentation
var ReactNodeTypes = require(183 ); // 183 = ReactNodeTypes
var ReactReconciler = require(173 ); // 173 = ReactReconciler
if (__DEV__) {
var checkReactTypeSpec = require(184 ); // 184 = checkReactTypeSpec
}
var emptyObject = require(43 ); // 43 = fbjs/lib/emptyObject
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var shallowEqual = require(187 ); // 187 = fbjs/lib/shallowEqual
var shouldUpdateReactComponent = require(188 ); // 188 = shouldUpdateReactComponent
var warning = require(40 ); // 40 = fbjs/lib/warning
var CompositeTypes = {
ImpureClass: 0,
PureClass: 1,
StatelessFunctional: 2
};
function StatelessComponent(Component) {}
StatelessComponent.prototype.render = function () {
var Component = ReactInstanceMap.get(this)._currentElement.type;
var element = Component(this.props, this.context, this.updater);
warnIfInvalidElement(Component, element);
return element;
};
function warnIfInvalidElement(Component, element) {
if (__DEV__) {
warning(element === null || element === false || React.isValidElement(element), '%s(...): A valid React element (or null) must be returned. You may have ' + 'returned undefined, an array or some other invalid object.', Component.displayName || Component.name || 'Component');
warning(!Component.childContextTypes, '%s(...): childContextTypes cannot be defined on a functional component.', Component.displayName || Component.name || 'Component');
}
}
function shouldConstruct(Component) {
return !!(Component.prototype && Component.prototype.isReactComponent);
}
function isPureComponent(Component) {
return !!(Component.prototype && Component.prototype.isPureReactComponent);
}
function measureLifeCyclePerf(fn, debugID, timerType) {
if (debugID === 0) {
return fn();
}
ReactInstrumentation.debugTool.onBeginLifeCycleTimer(debugID, timerType);
try {
return fn();
} finally {
ReactInstrumentation.debugTool.onEndLifeCycleTimer(debugID, timerType);
}
}
var nextMountID = 1;
var ReactCompositeComponent = {
construct: function construct(element) {
this._currentElement = element;
this._rootNodeID = 0;
this._compositeType = null;
this._instance = null;
this._hostParent = null;
this._hostContainerInfo = null;
this._updateBatchNumber = null;
this._pendingElement = null;
this._pendingStateQueue = null;
this._pendingReplaceState = false;
this._pendingForceUpdate = false;
this._renderedNodeType = null;
this._renderedComponent = null;
this._context = null;
this._mountOrder = 0;
this._topLevelWrapper = null;
this._pendingCallbacks = null;
this._calledComponentWillUnmount = false;
if (__DEV__) {
this._warnedAboutRefsInRender = false;
}
},
mountComponent: function mountComponent(transaction, hostParent, hostContainerInfo, context) {
var _this = this;
this._context = context;
this._mountOrder = nextMountID++;
this._hostParent = hostParent;
this._hostContainerInfo = hostContainerInfo;
var publicProps = this._currentElement.props;
var publicContext = this._processContext(context);
var Component = this._currentElement.type;
var updateQueue = transaction.getUpdateQueue();
var doConstruct = shouldConstruct(Component);
var inst = this._constructComponent(doConstruct, publicProps, publicContext, updateQueue);
var renderedElement;
if (!doConstruct && (inst == null || inst.render == null)) {
renderedElement = inst;
warnIfInvalidElement(Component, renderedElement);
invariant(inst === null || inst === false || React.isValidElement(inst), '%s(...): A valid React element (or null) must be returned. You may have ' + 'returned undefined, an array or some other invalid object.', Component.displayName || Component.name || 'Component');
inst = new StatelessComponent(Component);
this._compositeType = CompositeTypes.StatelessFunctional;
} else {
if (isPureComponent(Component)) {
this._compositeType = CompositeTypes.PureClass;
} else {
this._compositeType = CompositeTypes.ImpureClass;
}
}
if (__DEV__) {
if (inst.render == null) {
warning(false, '%s(...): No `render` method found on the returned component ' + 'instance: you may have forgotten to define `render`.', Component.displayName || Component.name || 'Component');
}
var propsMutated = inst.props !== publicProps;
var componentName = Component.displayName || Component.name || 'Component';
warning(inst.props === undefined || !propsMutated, '%s(...): When calling super() in `%s`, make sure to pass ' + 'up the same props that your component\'s constructor was passed.', componentName, componentName);
}
inst.props = publicProps;
inst.context = publicContext;
inst.refs = emptyObject;
inst.updater = updateQueue;
this._instance = inst;
ReactInstanceMap.set(inst, this);
if (__DEV__) {
warning(!inst.getInitialState || inst.getInitialState.isReactClassApproved, 'getInitialState was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Did you mean to define a state property instead?', this.getName() || 'a component');
warning(!inst.getDefaultProps || inst.getDefaultProps.isReactClassApproved, 'getDefaultProps was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Use a static property to define defaultProps instead.', this.getName() || 'a component');
warning(!inst.propTypes, 'propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', this.getName() || 'a component');
warning(!inst.contextTypes, 'contextTypes was defined as an instance property on %s. Use a ' + 'static property to define contextTypes instead.', this.getName() || 'a component');
warning(typeof inst.componentShouldUpdate !== 'function', '%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', this.getName() || 'A component');
warning(typeof inst.componentDidUnmount !== 'function', '%s has a method called ' + 'componentDidUnmount(). But there is no such lifecycle method. ' + 'Did you mean componentWillUnmount()?', this.getName() || 'A component');
warning(typeof inst.componentWillRecieveProps !== 'function', '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', this.getName() || 'A component');
}
var initialState = inst.state;
if (initialState === undefined) {
inst.state = initialState = null;
}
invariant(typeof initialState === 'object' && !Array.isArray(initialState), '%s.state: must be set to an object or null', this.getName() || 'ReactCompositeComponent');
this._pendingStateQueue = null;
this._pendingReplaceState = false;
this._pendingForceUpdate = false;
var markup;
if (inst.unstable_handleError) {
markup = this.performInitialMountWithErrorHandling(renderedElement, hostParent, hostContainerInfo, transaction, context);
} else {
markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context);
}
if (inst.componentDidMount) {
if (__DEV__) {
transaction.getReactMountReady().enqueue(function () {
measureLifeCyclePerf(function () {
return inst.componentDidMount();
}, _this._debugID, 'componentDidMount');
});
} else {
transaction.getReactMountReady().enqueue(inst.componentDidMount, inst);
}
}
return markup;
},
_constructComponent: function _constructComponent(doConstruct, publicProps, publicContext, updateQueue) {
if (__DEV__) {
ReactCurrentOwner.current = this;
try {
return this._constructComponentWithoutOwner(doConstruct, publicProps, publicContext, updateQueue);
} finally {
ReactCurrentOwner.current = null;
}
} else {
return this._constructComponentWithoutOwner(doConstruct, publicProps, publicContext, updateQueue);
}
},
_constructComponentWithoutOwner: function _constructComponentWithoutOwner(doConstruct, publicProps, publicContext, updateQueue) {
var Component = this._currentElement.type;
if (doConstruct) {
if (__DEV__) {
return measureLifeCyclePerf(function () {
return new Component(publicProps, publicContext, updateQueue);
}, this._debugID, 'ctor');
} else {
return new Component(publicProps, publicContext, updateQueue);
}
}
if (__DEV__) {
return measureLifeCyclePerf(function () {
return Component(publicProps, publicContext, updateQueue);
}, this._debugID, 'render');
} else {
return Component(publicProps, publicContext, updateQueue);
}
},
performInitialMountWithErrorHandling: function performInitialMountWithErrorHandling(renderedElement, hostParent, hostContainerInfo, transaction, context) {
var markup;
var checkpoint = transaction.checkpoint();
try {
markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context);
} catch (e) {
transaction.rollback(checkpoint);
this._instance.unstable_handleError(e);
if (this._pendingStateQueue) {
this._instance.state = this._processPendingState(this._instance.props, this._instance.context);
}
checkpoint = transaction.checkpoint();
this._renderedComponent.unmountComponent(true);
transaction.rollback(checkpoint);
markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context);
}
return markup;
},
performInitialMount: function performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context) {
var inst = this._instance;
var debugID = 0;
if (__DEV__) {
debugID = this._debugID;
}
if (inst.componentWillMount) {
if (__DEV__) {
measureLifeCyclePerf(function () {
return inst.componentWillMount();
}, debugID, 'componentWillMount');
} else {
inst.componentWillMount();
}
if (this._pendingStateQueue) {
inst.state = this._processPendingState(inst.props, inst.context);
}
}
if (renderedElement === undefined) {
renderedElement = this._renderValidatedComponent();
}
var nodeType = ReactNodeTypes.getType(renderedElement);
this._renderedNodeType = nodeType;
var child = this._instantiateReactComponent(renderedElement, nodeType !== ReactNodeTypes.EMPTY);
this._renderedComponent = child;
var markup = ReactReconciler.mountComponent(child, transaction, hostParent, hostContainerInfo, this._processChildContext(context), debugID);
if (__DEV__) {
if (debugID !== 0) {
var childDebugIDs = child._debugID !== 0 ? [child._debugID] : [];
ReactInstrumentation.debugTool.onSetChildren(debugID, childDebugIDs);
}
}
return markup;
},
getHostNode: function getHostNode() {
return ReactReconciler.getHostNode(this._renderedComponent);
},
unmountComponent: function unmountComponent(safely) {
if (!this._renderedComponent) {
return;
}
var inst = this._instance;
if (inst.componentWillUnmount && !inst._calledComponentWillUnmount) {
inst._calledComponentWillUnmount = true;
if (safely) {
var name = this.getName() + '.componentWillUnmount()';
ReactErrorUtils.invokeGuardedCallback(name, inst.componentWillUnmount.bind(inst));
} else {
if (__DEV__) {
measureLifeCyclePerf(function () {
return inst.componentWillUnmount();
}, this._debugID, 'componentWillUnmount');
} else {
inst.componentWillUnmount();
}
}
}
if (this._renderedComponent) {
ReactReconciler.unmountComponent(this._renderedComponent, safely);
this._renderedNodeType = null;
this._renderedComponent = null;
this._instance = null;
}
this._pendingStateQueue = null;
this._pendingReplaceState = false;
this._pendingForceUpdate = false;
this._pendingCallbacks = null;
this._pendingElement = null;
this._context = null;
this._rootNodeID = 0;
this._topLevelWrapper = null;
ReactInstanceMap.remove(inst);
},
_maskContext: function _maskContext(context) {
var Component = this._currentElement.type;
var contextTypes = Component.contextTypes;
if (!contextTypes) {
return emptyObject;
}
var maskedContext = {};
for (var contextName in contextTypes) {
maskedContext[contextName] = context[contextName];
}
return maskedContext;
},
_processContext: function _processContext(context) {
var maskedContext = this._maskContext(context);
if (__DEV__) {
var Component = this._currentElement.type;
if (Component.contextTypes) {
this._checkContextTypes(Component.contextTypes, maskedContext, 'context');
}
}
return maskedContext;
},
_processChildContext: function _processChildContext(currentContext) {
var Component = this._currentElement.type;
var inst = this._instance;
var childContext;
if (inst.getChildContext) {
if (__DEV__) {
ReactInstrumentation.debugTool.onBeginProcessingChildContext();
try {
childContext = inst.getChildContext();
} finally {
ReactInstrumentation.debugTool.onEndProcessingChildContext();
}
} else {
childContext = inst.getChildContext();
}
}
if (childContext) {
invariant(typeof Component.childContextTypes === 'object', '%s.getChildContext(): childContextTypes must be defined in order to ' + 'use getChildContext().', this.getName() || 'ReactCompositeComponent');
if (__DEV__) {
this._checkContextTypes(Component.childContextTypes, childContext, 'childContext');
}
for (var name in childContext) {
invariant(name in Component.childContextTypes, '%s.getChildContext(): key "%s" is not defined in childContextTypes.', this.getName() || 'ReactCompositeComponent', name);
}
return babelHelpers.extends({}, currentContext, childContext);
}
return currentContext;
},
_checkContextTypes: function _checkContextTypes(typeSpecs, values, location) {
if (__DEV__) {
checkReactTypeSpec(typeSpecs, values, location, this.getName(), null, this._debugID);
}
},
receiveComponent: function receiveComponent(nextElement, transaction, nextContext) {
var prevElement = this._currentElement;
var prevContext = this._context;
this._pendingElement = null;
this.updateComponent(transaction, prevElement, nextElement, prevContext, nextContext);
},
performUpdateIfNecessary: function performUpdateIfNecessary(transaction) {
if (this._pendingElement != null) {
ReactReconciler.receiveComponent(this, this._pendingElement, transaction, this._context);
} else if (this._pendingStateQueue !== null || this._pendingForceUpdate) {
this.updateComponent(transaction, this._currentElement, this._currentElement, this._context, this._context);
} else {
this._updateBatchNumber = null;
}
},
updateComponent: function updateComponent(transaction, prevParentElement, nextParentElement, prevUnmaskedContext, nextUnmaskedContext) {
var inst = this._instance;
invariant(inst != null, 'Attempted to update component `%s` that has already been unmounted ' + '(or failed to mount).', this.getName() || 'ReactCompositeComponent');
var willReceive = false;
var nextContext;
if (this._context === nextUnmaskedContext) {
nextContext = inst.context;
} else {
nextContext = this._processContext(nextUnmaskedContext);
willReceive = true;
}
var prevProps = prevParentElement.props;
var nextProps = nextParentElement.props;
if (prevParentElement !== nextParentElement) {
willReceive = true;
}
if (willReceive && inst.componentWillReceiveProps) {
if (__DEV__) {
measureLifeCyclePerf(function () {
return inst.componentWillReceiveProps(nextProps, nextContext);
}, this._debugID, 'componentWillReceiveProps');
} else {
inst.componentWillReceiveProps(nextProps, nextContext);
}
}
var nextState = this._processPendingState(nextProps, nextContext);
var shouldUpdate = true;
if (!this._pendingForceUpdate) {
if (inst.shouldComponentUpdate) {
if (__DEV__) {
shouldUpdate = measureLifeCyclePerf(function () {
return inst.shouldComponentUpdate(nextProps, nextState, nextContext);
}, this._debugID, 'shouldComponentUpdate');
} else {
shouldUpdate = inst.shouldComponentUpdate(nextProps, nextState, nextContext);
}
} else {
if (this._compositeType === CompositeTypes.PureClass) {
shouldUpdate = !shallowEqual(prevProps, nextProps) || !shallowEqual(inst.state, nextState);
}
}
}
if (__DEV__) {
warning(shouldUpdate !== undefined, '%s.shouldComponentUpdate(): Returned undefined instead of a ' + 'boolean value. Make sure to return true or false.', this.getName() || 'ReactCompositeComponent');
}
this._updateBatchNumber = null;
if (shouldUpdate) {
this._pendingForceUpdate = false;
this._performComponentUpdate(nextParentElement, nextProps, nextState, nextContext, transaction, nextUnmaskedContext);
} else {
this._currentElement = nextParentElement;
this._context = nextUnmaskedContext;
inst.props = nextProps;
inst.state = nextState;
inst.context = nextContext;
}
},
_processPendingState: function _processPendingState(props, context) {
var inst = this._instance;
var queue = this._pendingStateQueue;
var replace = this._pendingReplaceState;
this._pendingReplaceState = false;
this._pendingStateQueue = null;
if (!queue) {
return inst.state;
}
if (replace && queue.length === 1) {
return queue[0];
}
var nextState = babelHelpers.extends({}, replace ? queue[0] : inst.state);
for (var i = replace ? 1 : 0; i < queue.length; i++) {
var partial = queue[i];
babelHelpers.extends(nextState, typeof partial === 'function' ? partial.call(inst, nextState, props, context) : partial);
}
return nextState;
},
_performComponentUpdate: function _performComponentUpdate(nextElement, nextProps, nextState, nextContext, transaction, unmaskedContext) {
var _this2 = this;
var inst = this._instance;
var hasComponentDidUpdate = Boolean(inst.componentDidUpdate);
var prevProps;
var prevState;
var prevContext;
if (hasComponentDidUpdate) {
prevProps = inst.props;
prevState = inst.state;
prevContext = inst.context;
}
if (inst.componentWillUpdate) {
if (__DEV__) {
measureLifeCyclePerf(function () {
return inst.componentWillUpdate(nextProps, nextState, nextContext);
}, this._debugID, 'componentWillUpdate');
} else {
inst.componentWillUpdate(nextProps, nextState, nextContext);
}
}
this._currentElement = nextElement;
this._context = unmaskedContext;
inst.props = nextProps;
inst.state = nextState;
inst.context = nextContext;
this._updateRenderedComponent(transaction, unmaskedContext);
if (hasComponentDidUpdate) {
if (__DEV__) {
transaction.getReactMountReady().enqueue(function () {
measureLifeCyclePerf(inst.componentDidUpdate.bind(inst, prevProps, prevState, prevContext), _this2._debugID, 'componentDidUpdate');
});
} else {
transaction.getReactMountReady().enqueue(inst.componentDidUpdate.bind(inst, prevProps, prevState, prevContext), inst);
}
}
},
_updateRenderedComponent: function _updateRenderedComponent(transaction, context) {
var prevComponentInstance = this._renderedComponent;
var prevRenderedElement = prevComponentInstance._currentElement;
var nextRenderedElement = this._renderValidatedComponent();
var debugID = 0;
if (__DEV__) {
debugID = this._debugID;
}
if (shouldUpdateReactComponent(prevRenderedElement, nextRenderedElement)) {
ReactReconciler.receiveComponent(prevComponentInstance, nextRenderedElement, transaction, this._processChildContext(context));
} else {
var oldHostNode = ReactReconciler.getHostNode(prevComponentInstance);
ReactReconciler.unmountComponent(prevComponentInstance, false);
var nodeType = ReactNodeTypes.getType(nextRenderedElement);
this._renderedNodeType = nodeType;
var child = this._instantiateReactComponent(nextRenderedElement, nodeType !== ReactNodeTypes.EMPTY);
this._renderedComponent = child;
var nextMarkup = ReactReconciler.mountComponent(child, transaction, this._hostParent, this._hostContainerInfo, this._processChildContext(context), debugID);
if (__DEV__) {
if (debugID !== 0) {
var childDebugIDs = child._debugID !== 0 ? [child._debugID] : [];
ReactInstrumentation.debugTool.onSetChildren(debugID, childDebugIDs);
}
}
this._replaceNodeWithMarkup(oldHostNode, nextMarkup, prevComponentInstance);
}
},
_replaceNodeWithMarkup: function _replaceNodeWithMarkup(oldHostNode, nextMarkup, prevInstance) {
ReactComponentEnvironment.replaceNodeWithMarkup(oldHostNode, nextMarkup, prevInstance);
},
_renderValidatedComponentWithoutOwnerOrContext: function _renderValidatedComponentWithoutOwnerOrContext() {
var inst = this._instance;
var renderedElement;
if (__DEV__) {
renderedElement = measureLifeCyclePerf(function () {
return inst.render();
}, this._debugID, 'render');
} else {
renderedElement = inst.render();
}
if (__DEV__) {
if (renderedElement === undefined && inst.render._isMockFunction) {
renderedElement = null;
}
}
return renderedElement;
},
_renderValidatedComponent: function _renderValidatedComponent() {
var renderedElement;
if (__DEV__ || this._compositeType !== CompositeTypes.StatelessFunctional) {
ReactCurrentOwner.current = this;
try {
renderedElement = this._renderValidatedComponentWithoutOwnerOrContext();
} finally {
ReactCurrentOwner.current = null;
}
} else {
renderedElement = this._renderValidatedComponentWithoutOwnerOrContext();
}
invariant(renderedElement === null || renderedElement === false || React.isValidElement(renderedElement), '%s.render(): A valid React element (or null) must be returned. You may have ' + 'returned undefined, an array or some other invalid object.', this.getName() || 'ReactCompositeComponent');
return renderedElement;
},
attachRef: function attachRef(ref, component, transaction) {
var inst = this.getPublicInstance();
invariant(inst != null, 'Stateless function components cannot have refs.');
var publicComponentInstance = component.getPublicInstance(transaction);
if (__DEV__) {
var componentName = component && component.getName ? component.getName() : 'a component';
warning(publicComponentInstance != null || component._compositeType !== CompositeTypes.StatelessFunctional, 'Stateless function components cannot be given refs ' + '(See ref "%s" in %s created by %s). ' + 'Attempts to access this ref will fail.', ref, componentName, this.getName());
}
var refs = inst.refs === emptyObject ? inst.refs = {} : inst.refs;
refs[ref] = publicComponentInstance;
},
detachRef: function detachRef(ref) {
var refs = this.getPublicInstance().refs;
delete refs[ref];
},
getName: function getName() {
var type = this._currentElement.type;
var constructor = this._instance && this._instance.constructor;
return type.displayName || constructor && constructor.displayName || type.name || constructor && constructor.name || null;
},
getPublicInstance: function getPublicInstance() {
var inst = this._instance;
if (this._compositeType === CompositeTypes.StatelessFunctional) {
return null;
}
return inst;
},
_instantiateReactComponent: null
};
module.exports = ReactCompositeComponent;
}, 182, null, "ReactCompositeComponent");
__d(/* ReactNodeTypes */function(global, require, module, exports) {
'use strict';
var React = require(126 ); // 126 = React
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var ReactNodeTypes = {
HOST: 0,
COMPOSITE: 1,
EMPTY: 2,
getType: function getType(node) {
if (node === null || node === false) {
return ReactNodeTypes.EMPTY;
} else if (React.isValidElement(node)) {
if (typeof node.type === 'function') {
return ReactNodeTypes.COMPOSITE;
} else {
return ReactNodeTypes.HOST;
}
}
invariant(false, 'Unexpected node: %s', node);
}
};
module.exports = ReactNodeTypes;
}, 183, null, "ReactNodeTypes");
__d(/* checkReactTypeSpec */function(global, require, module, exports) {
'use strict';
var ReactPropTypeLocationNames = require(185 ); // 185 = ReactPropTypeLocationNames
var ReactPropTypesSecret = require(186 ); // 186 = ReactPropTypesSecret
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var warning = require(40 ); // 40 = fbjs/lib/warning
var ReactComponentTreeHook;
if (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'test') {
ReactComponentTreeHook = require(56 ); // 56 = react/lib/ReactComponentTreeHook
}
var loggedTypeFailures = {};
function checkReactTypeSpec(typeSpecs, values, location, componentName, element, debugID) {
for (var typeSpecName in typeSpecs) {
if (typeSpecs.hasOwnProperty(typeSpecName)) {
var error;
try {
invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName);
error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
} catch (ex) {
error = ex;
}
warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName, typeof error);
if (error instanceof Error && !(error.message in loggedTypeFailures)) {
loggedTypeFailures[error.message] = true;
var componentStackInfo = '';
if (__DEV__) {
if (!ReactComponentTreeHook) {
ReactComponentTreeHook = require(56 ); // 56 = react/lib/ReactComponentTreeHook
}
if (debugID !== null) {
componentStackInfo = ReactComponentTreeHook.getStackAddendumByID(debugID);
} else if (element !== null) {
componentStackInfo = ReactComponentTreeHook.getCurrentStackAddendum(element);
}
}
warning(false, 'Failed %s type: %s%s', location, error.message, componentStackInfo);
}
}
}
}
module.exports = checkReactTypeSpec;
}, 184, null, "checkReactTypeSpec");
__d(/* ReactPropTypeLocationNames */function(global, require, module, exports) {
'use strict';
var ReactPropTypeLocationNames = {};
if (__DEV__) {
ReactPropTypeLocationNames = {
prop: 'prop',
context: 'context',
childContext: 'child context'
};
}
module.exports = ReactPropTypeLocationNames;
}, 185, null, "ReactPropTypeLocationNames");
__d(/* ReactPropTypesSecret */function(global, require, module, exports) {
'use strict';
var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
module.exports = ReactPropTypesSecret;
}, 186, null, "ReactPropTypesSecret");
__d(/* fbjs/lib/shallowEqual.js */function(global, require, module, exports) {
'use strict';
var hasOwnProperty = Object.prototype.hasOwnProperty;
function is(x, y) {
if (x === y) {
return x !== 0 || y !== 0 || 1 / x === 1 / y;
} else {
return x !== x && y !== y;
}
}
function shallowEqual(objA, objB) {
if (is(objA, objB)) {
return true;
}
if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {
return false;
}
var keysA = Object.keys(objA);
var keysB = Object.keys(objB);
if (keysA.length !== keysB.length) {
return false;
}
for (var i = 0; i < keysA.length; i++) {
if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {
return false;
}
}
return true;
}
module.exports = shallowEqual;
}, 187, null, "fbjs/lib/shallowEqual.js");
__d(/* shouldUpdateReactComponent */function(global, require, module, exports) {
'use strict';
function shouldUpdateReactComponent(prevElement, nextElement) {
var prevEmpty = prevElement === null || prevElement === false;
var nextEmpty = nextElement === null || nextElement === false;
if (prevEmpty || nextEmpty) {
return prevEmpty === nextEmpty;
}
var prevType = typeof prevElement;
var nextType = typeof nextElement;
if (prevType === 'string' || prevType === 'number') {
return nextType === 'string' || nextType === 'number';
} else {
return nextType === 'object' && prevElement.type === nextElement.type && prevElement.key === nextElement.key;
}
}
module.exports = shouldUpdateReactComponent;
}, 188, null, "shouldUpdateReactComponent");
__d(/* ReactEmptyComponent */function(global, require, module, exports) {
'use strict';
var emptyComponentFactory;
var ReactEmptyComponentInjection = {
injectEmptyComponentFactory: function injectEmptyComponentFactory(factory) {
emptyComponentFactory = factory;
}
};
var ReactEmptyComponent = {
create: function create(instantiate) {
return emptyComponentFactory(instantiate);
}
};
ReactEmptyComponent.injection = ReactEmptyComponentInjection;
module.exports = ReactEmptyComponent;
}, 189, null, "ReactEmptyComponent");
__d(/* ReactHostComponent */function(global, require, module, exports) {
'use strict';
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var genericComponentClass = null;
var tagToComponentClass = {};
var textComponentClass = null;
var ReactHostComponentInjection = {
injectGenericComponentClass: function injectGenericComponentClass(componentClass) {
genericComponentClass = componentClass;
},
injectTextComponentClass: function injectTextComponentClass(componentClass) {
textComponentClass = componentClass;
},
injectComponentClasses: function injectComponentClasses(componentClasses) {
babelHelpers.extends(tagToComponentClass, componentClasses);
}
};
function createInternalComponent(element) {
invariant(genericComponentClass, 'There is no registered component for the tag %s', element.type);
return new genericComponentClass(element);
}
function createInstanceForText(text) {
return new textComponentClass(text);
}
function isTextComponent(component) {
return component instanceof textComponentClass;
}
var ReactHostComponent = {
createInternalComponent: createInternalComponent,
createInstanceForText: createInstanceForText,
isTextComponent: isTextComponent,
injection: ReactHostComponentInjection
};
module.exports = ReactHostComponent;
}, 190, null, "ReactHostComponent");
__d(/* KeyEscapeUtils */function(global, require, module, exports) {
'use strict';
function escape(key) {
var escapeRegex = /[=:]/g;
var escaperLookup = {
'=': '=0',
':': '=2'
};
var escapedString = ('' + key).replace(escapeRegex, function (match) {
return escaperLookup[match];
});
return '$' + escapedString;
}
function unescape(key) {
var unescapeRegex = /(=0|=2)/g;
var unescaperLookup = {
'=0': '=',
'=2': ':'
};
var keySubstring = key[0] === '.' && key[1] === '$' ? key.substring(2) : key.substring(1);
return ('' + keySubstring).replace(unescapeRegex, function (match) {
return unescaperLookup[match];
});
}
var KeyEscapeUtils = {
escape: escape,
unescape: unescape
};
module.exports = KeyEscapeUtils;
}, 191, null, "KeyEscapeUtils");
__d(/* traverseAllChildren */function(global, require, module, exports) {
'use strict';
var ReactCurrentOwner = require(49 ); // 49 = react/lib/ReactCurrentOwner
var REACT_ELEMENT_TYPE = require(193 ); // 193 = ReactElementSymbol
var getIteratorFn = require(194 ); // 194 = getIteratorFn
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var KeyEscapeUtils = require(191 ); // 191 = KeyEscapeUtils
var warning = require(40 ); // 40 = fbjs/lib/warning
var SEPARATOR = '.';
var SUBSEPARATOR = ':';
var didWarnAboutMaps = false;
function getComponentKey(component, index) {
if (component && typeof component === 'object' && component.key != null) {
return KeyEscapeUtils.escape(component.key);
}
return index.toString(36);
}
function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) {
var type = typeof children;
if (type === 'undefined' || type === 'boolean') {
children = null;
}
if (children === null || type === 'string' || type === 'number' || type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE) {
callback(traverseContext, children, nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar);
return 1;
}
var child;
var nextName;
var subtreeCount = 0;
var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;
if (Array.isArray(children)) {
for (var i = 0; i < children.length; i++) {
child = children[i];
nextName = nextNamePrefix + getComponentKey(child, i);
subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
}
} else {
var iteratorFn = getIteratorFn(children);
if (iteratorFn) {
var iterator = iteratorFn.call(children);
var step;
if (iteratorFn !== children.entries) {
var ii = 0;
while (!(step = iterator.next()).done) {
child = step.value;
nextName = nextNamePrefix + getComponentKey(child, ii++);
subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
}
} else {
if (__DEV__) {
var mapsAsChildrenAddendum = '';
if (ReactCurrentOwner.current) {
var mapsAsChildrenOwnerName = ReactCurrentOwner.current.getName();
if (mapsAsChildrenOwnerName) {
mapsAsChildrenAddendum = ' Check the render method of `' + mapsAsChildrenOwnerName + '`.';
}
}
warning(didWarnAboutMaps, 'Using Maps as children is not yet fully supported. It is an ' + 'experimental feature that might be removed. Convert it to a ' + 'sequence / iterable of keyed ReactElements instead.%s', mapsAsChildrenAddendum);
didWarnAboutMaps = true;
}
while (!(step = iterator.next()).done) {
var entry = step.value;
if (entry) {
child = entry[1];
nextName = nextNamePrefix + KeyEscapeUtils.escape(entry[0]) + SUBSEPARATOR + getComponentKey(child, 0);
subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
}
}
}
} else if (type === 'object') {
var addendum = '';
if (__DEV__) {
addendum = ' If you meant to render a collection of children, use an array ' + 'instead or wrap the object using createFragment(object) from the ' + 'React add-ons.';
if (children._isReactElement) {
addendum = ' It looks like you\'re using an element created by a different ' + 'version of React. Make sure to use only one copy of React.';
}
if (ReactCurrentOwner.current) {
var name = ReactCurrentOwner.current.getName();
if (name) {
addendum += ' Check the render method of `' + name + '`.';
}
}
}
var childrenString = String(children);
invariant(false, 'Objects are not valid as a React child (found: %s).%s', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum);
}
}
return subtreeCount;
}
function traverseAllChildren(children, callback, traverseContext) {
if (children == null) {
return 0;
}
return traverseAllChildrenImpl(children, '', callback, traverseContext);
}
module.exports = traverseAllChildren;
}, 192, null, "traverseAllChildren");
__d(/* ReactElementSymbol */function(global, require, module, exports) {
'use strict';
var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && (typeof Symbol === 'function' ? Symbol.for : '@@for') && (typeof Symbol === 'function' ? Symbol.for : '@@for')('react.element') || 0xeac7;
module.exports = REACT_ELEMENT_TYPE;
}, 193, null, "ReactElementSymbol");
__d(/* getIteratorFn */function(global, require, module, exports) {
'use strict';
var ITERATOR_SYMBOL = typeof Symbol === 'function' && (typeof Symbol === 'function' ? Symbol.iterator : '@@iterator');
var FAUX_ITERATOR_SYMBOL = '@@iterator';
function getIteratorFn(maybeIterable) {
var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
if (typeof iteratorFn === 'function') {
return iteratorFn;
}
}
module.exports = getIteratorFn;
}, 194, null, "getIteratorFn");
__d(/* flattenChildren */function(global, require, module, exports) {
'use strict';
var KeyEscapeUtils = require(191 ); // 191 = KeyEscapeUtils
var traverseAllChildren = require(192 ); // 192 = traverseAllChildren
var warning = require(40 ); // 40 = fbjs/lib/warning
var ReactComponentTreeHook;
if (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'test') {
ReactComponentTreeHook = require(56 ); // 56 = react/lib/ReactComponentTreeHook
}
function flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID) {
if (traverseContext && typeof traverseContext === 'object') {
var result = traverseContext;
var keyUnique = result[name] === undefined;
if (__DEV__) {
if (!ReactComponentTreeHook) {
ReactComponentTreeHook = require(56 ); // 56 = react/lib/ReactComponentTreeHook
}
if (!keyUnique) {
warning(false, 'flattenChildren(...): Encountered two children with the same key, ' + '`%s`. Child keys must be unique; when two children share a key, only ' + 'the first child will be used.%s', KeyEscapeUtils.unescape(name), ReactComponentTreeHook.getStackAddendumByID(selfDebugID));
}
}
if (keyUnique && child != null) {
result[name] = child;
}
}
}
function flattenChildren(children, selfDebugID) {
if (children == null) {
return children;
}
var result = {};
if (__DEV__) {
traverseAllChildren(children, function (traverseContext, child, name) {
return flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID);
}, result);
} else {
traverseAllChildren(children, flattenSingleChildIntoContext, result);
}
return result;
}
module.exports = flattenChildren;
}, 195, null, "flattenChildren");
__d(/* insetsDiffer */function(global, require, module, exports) {
'use strict';
var dummyInsets = {
top: undefined,
left: undefined,
right: undefined,
bottom: undefined
};
var insetsDiffer = function insetsDiffer(one, two) {
one = one || dummyInsets;
two = two || dummyInsets;
return one !== two && (one.top !== two.top || one.left !== two.left || one.right !== two.right || one.bottom !== two.bottom);
};
module.exports = insetsDiffer;
}, 196, null, "insetsDiffer");
__d(/* pointsDiffer */function(global, require, module, exports) {
'use strict';
var dummyPoint = { x: undefined, y: undefined };
var pointsDiffer = function pointsDiffer(one, two) {
one = one || dummyPoint;
two = two || dummyPoint;
return one !== two && (one.x !== two.x || one.y !== two.y);
};
module.exports = pointsDiffer;
}, 197, null, "pointsDiffer");
__d(/* resolveAssetSource */function(global, require, module, exports) {
'use strict';
var AssetRegistry = require(199 ); // 199 = AssetRegistry
var AssetSourceResolver = require(200 ); // 200 = AssetSourceResolver
var _require = require(80 ), // 80 = NativeModules
SourceCode = _require.SourceCode;
var _customSourceTransformer = void 0,
_serverURL = void 0,
_bundleSourcePath = void 0;
function getDevServerURL() {
if (_serverURL === undefined) {
var scriptURL = SourceCode.scriptURL;
var match = scriptURL && scriptURL.match(/^https?:\/\/.*?\//);
if (match) {
_serverURL = match[0];
} else {
_serverURL = null;
}
}
return _serverURL;
}
function getBundleSourcePath() {
if (_bundleSourcePath === undefined) {
var scriptURL = SourceCode.scriptURL;
if (!scriptURL) {
_bundleSourcePath = null;
return _bundleSourcePath;
}
if (scriptURL.startsWith('assets://')) {
_bundleSourcePath = null;
return _bundleSourcePath;
}
if (scriptURL.startsWith('file://')) {
_bundleSourcePath = scriptURL.substring(7, scriptURL.lastIndexOf('/') + 1);
} else {
_bundleSourcePath = scriptURL.substring(0, scriptURL.lastIndexOf('/') + 1);
}
}
return _bundleSourcePath;
}
function setCustomSourceTransformer(transformer) {
_customSourceTransformer = transformer;
}
function resolveAssetSource(source) {
if (typeof source === 'object') {
return source;
}
var asset = AssetRegistry.getAssetByID(source);
if (!asset) {
return null;
}
var resolver = new AssetSourceResolver(getDevServerURL(), getBundleSourcePath(), asset);
if (_customSourceTransformer) {
return _customSourceTransformer(resolver);
}
return resolver.defaultAsset();
}
module.exports = resolveAssetSource;
module.exports.pickScale = AssetSourceResolver.pickScale;
module.exports.setCustomSourceTransformer = setCustomSourceTransformer;
}, 198, null, "resolveAssetSource");
__d(/* AssetRegistry */function(global, require, module, exports) {
'use strict';
var assets = [];
function registerAsset(asset) {
return assets.push(asset);
}
function getAssetByID(assetId) {
return assets[assetId - 1];
}
module.exports = { registerAsset: registerAsset, getAssetByID: getAssetByID };
}, 199, null, "AssetRegistry");
__d(/* AssetSourceResolver */function(global, require, module, exports) {
'use strict';
var PixelRatio = require(128 ); // 128 = PixelRatio
var Platform = require(79 ); // 79 = Platform
var assetPathUtils = require(201 ); // 201 = ../../local-cli/bundle/assetPathUtils
var invariant = require(44 ); // 44 = fbjs/lib/invariant
function getScaledAssetPath(asset) {
var scale = AssetSourceResolver.pickScale(asset.scales, PixelRatio.get());
var scaleSuffix = scale === 1 ? '' : '@' + scale + 'x';
var assetDir = assetPathUtils.getBasePath(asset);
return assetDir + '/' + asset.name + scaleSuffix + '.' + asset.type;
}
function getAssetPathInDrawableFolder(asset) {
var scale = AssetSourceResolver.pickScale(asset.scales, PixelRatio.get());
var drawbleFolder = assetPathUtils.getAndroidDrawableFolderName(asset, scale);
var fileName = assetPathUtils.getAndroidResourceIdentifier(asset);
return drawbleFolder + '/' + fileName + '.' + asset.type;
}
var AssetSourceResolver = function () {
function AssetSourceResolver(serverUrl, bundlePath, asset) {
babelHelpers.classCallCheck(this, AssetSourceResolver);
this.serverUrl = serverUrl;
this.bundlePath = bundlePath;
this.asset = asset;
}
babelHelpers.createClass(AssetSourceResolver, [{
key: 'isLoadedFromServer',
value: function isLoadedFromServer() {
return !!this.serverUrl;
}
}, {
key: 'isLoadedFromFileSystem',
value: function isLoadedFromFileSystem() {
return !!this.bundlePath;
}
}, {
key: 'defaultAsset',
value: function defaultAsset() {
if (this.isLoadedFromServer()) {
return this.assetServerURL();
}
if (Platform.OS === 'android') {
return this.isLoadedFromFileSystem() ? this.drawableFolderInBundle() : this.resourceIdentifierWithoutScale();
} else {
return this.scaledAssetPathInBundle();
}
}
}, {
key: 'assetServerURL',
value: function assetServerURL() {
invariant(!!this.serverUrl, 'need server to load from');
return this.fromSource(this.serverUrl + getScaledAssetPath(this.asset) + '?platform=' + Platform.OS + '&hash=' + this.asset.hash);
}
}, {
key: 'scaledAssetPath',
value: function scaledAssetPath() {
return this.fromSource(getScaledAssetPath(this.asset));
}
}, {
key: 'scaledAssetPathInBundle',
value: function scaledAssetPathInBundle() {
var path = this.bundlePath || '';
return this.fromSource(path + getScaledAssetPath(this.asset));
}
}, {
key: 'resourceIdentifierWithoutScale',
value: function resourceIdentifierWithoutScale() {
invariant(Platform.OS === 'android', 'resource identifiers work on Android');
return this.fromSource(assetPathUtils.getAndroidResourceIdentifier(this.asset));
}
}, {
key: 'drawableFolderInBundle',
value: function drawableFolderInBundle() {
var path = this.bundlePath || '';
return this.fromSource('file://' + path + getAssetPathInDrawableFolder(this.asset));
}
}, {
key: 'fromSource',
value: function fromSource(source) {
return {
__packager_asset: true,
width: this.asset.width,
height: this.asset.height,
uri: source,
scale: AssetSourceResolver.pickScale(this.asset.scales, PixelRatio.get())
};
}
}], [{
key: 'pickScale',
value: function pickScale(scales, deviceScale) {
for (var i = 0; i < scales.length; i++) {
if (scales[i] >= deviceScale) {
return scales[i];
}
}
return scales[scales.length - 1] || 1;
}
}]);
return AssetSourceResolver;
}();
module.exports = AssetSourceResolver;
}, 200, null, "AssetSourceResolver");
__d(/* react-native/local-cli/bundle/assetPathUtils.js */function(global, require, module, exports) {
'use strict';
function getAndroidAssetSuffix(scale) {
switch (scale) {
case 0.75:
return 'ldpi';
case 1:
return 'mdpi';
case 1.5:
return 'hdpi';
case 2:
return 'xhdpi';
case 3:
return 'xxhdpi';
case 4:
return 'xxxhdpi';
}
}
function getAndroidDrawableFolderName(asset, scale) {
var suffix = getAndroidAssetSuffix(scale);
if (!suffix) {
throw new Error('Don\'t know which android drawable suffix to use for asset: ' + JSON.stringify(asset));
}
var androidFolder = 'drawable-' + suffix;
return androidFolder;
}
function getAndroidResourceIdentifier(asset) {
var folderPath = getBasePath(asset);
return (folderPath + '/' + asset.name).toLowerCase().replace(/\//g, '_').replace(/([^a-z0-9_])/g, '').replace(/^assets_/, '');
}
function getBasePath(asset) {
var basePath = asset.httpServerLocation;
if (basePath[0] === '/') {
basePath = basePath.substr(1);
}
return basePath;
}
module.exports = {
getAndroidAssetSuffix: getAndroidAssetSuffix,
getAndroidDrawableFolderName: getAndroidDrawableFolderName,
getAndroidResourceIdentifier: getAndroidResourceIdentifier,
getBasePath: getBasePath
};
}, 201, null, "react-native/local-cli/bundle/assetPathUtils.js");
__d(/* verifyPropTypes */function(global, require, module, exports) {
'use strict';
var ReactNativeStyleAttributes = require(130 ); // 130 = ReactNativeStyleAttributes
function verifyPropTypes(componentInterface, viewConfig, nativePropsToIgnore) {
if (!viewConfig) {
return;
}
var componentName = componentInterface.displayName || componentInterface.name || 'unknown';
if (!componentInterface.propTypes) {
throw new Error('`' + componentName + '` has no propTypes defined`');
}
var nativeProps = viewConfig.NativeProps;
for (var prop in nativeProps) {
if (!componentInterface.propTypes[prop] && !ReactNativeStyleAttributes[prop] && (!nativePropsToIgnore || !nativePropsToIgnore[prop])) {
var message;
if (componentInterface.propTypes.hasOwnProperty(prop)) {
message = '`' + componentName + '` has incorrectly defined propType for native prop `' + viewConfig.uiViewClassName + '.' + prop + '` of native type `' + nativeProps[prop];
} else {
message = '`' + componentName + '` has no propType for native prop `' + viewConfig.uiViewClassName + '.' + prop + '` of native type `' + nativeProps[prop] + '`';
}
message += '\nIf you haven\'t changed this prop yourself, this usually means that ' + 'your versions of the native code and JavaScript code are out of sync. Updating both ' + 'should make this error go away.';
throw new Error(message);
}
}
}
module.exports = verifyPropTypes;
}, 202, null, "verifyPropTypes");
__d(/* ReactNativeART */function(global, require, module, exports) {
'use strict';
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/node_modules/react-native/Libraries/ART/ReactNativeART.js';
var Color = require(204 ); // 204 = art/core/color
var Path = require(205 ); // 205 = ARTSerializablePath
var Transform = require(208 ); // 208 = art/core/transform
var React = require(126 ); // 126 = React
var ReactNativeViewAttributes = require(152 ); // 152 = ReactNativeViewAttributes
var createReactNativeComponentClass = require(157 ); // 157 = createReactNativeComponentClass
var merge = require(149 ); // 149 = merge
var invariant = require(44 ); // 44 = fbjs/lib/invariant
function arrayDiffer(a, b) {
if (a == null || b == null) {
return true;
}
if (a.length !== b.length) {
return true;
}
for (var i = 0; i < a.length; i++) {
if (a[i] !== b[i]) {
return true;
}
}
return false;
}
function fontAndLinesDiffer(a, b) {
if (a === b) {
return false;
}
if (a.font !== b.font) {
if (a.font === null) {
return true;
}
if (b.font === null) {
return true;
}
if (a.font.fontFamily !== b.font.fontFamily || a.font.fontSize !== b.font.fontSize || a.font.fontWeight !== b.font.fontWeight || a.font.fontStyle !== b.font.fontStyle) {
return true;
}
}
return arrayDiffer(a.lines, b.lines);
}
var SurfaceViewAttributes = merge(ReactNativeViewAttributes.UIView, {});
var NodeAttributes = {
transform: { diff: arrayDiffer },
opacity: true
};
var GroupAttributes = merge(NodeAttributes, {
clipping: { diff: arrayDiffer }
});
var RenderableAttributes = merge(NodeAttributes, {
fill: { diff: arrayDiffer },
stroke: { diff: arrayDiffer },
strokeWidth: true,
strokeCap: true,
strokeJoin: true,
strokeDash: { diff: arrayDiffer }
});
var ShapeAttributes = merge(RenderableAttributes, {
d: { diff: arrayDiffer }
});
var TextAttributes = merge(RenderableAttributes, {
alignment: true,
frame: { diff: fontAndLinesDiffer },
path: { diff: arrayDiffer }
});
var NativeSurfaceView = createReactNativeComponentClass({
validAttributes: SurfaceViewAttributes,
uiViewClassName: 'ARTSurfaceView'
});
var NativeGroup = createReactNativeComponentClass({
validAttributes: GroupAttributes,
uiViewClassName: 'ARTGroup'
});
var NativeShape = createReactNativeComponentClass({
validAttributes: ShapeAttributes,
uiViewClassName: 'ARTShape'
});
var NativeText = createReactNativeComponentClass({
validAttributes: TextAttributes,
uiViewClassName: 'ARTText'
});
function childrenAsString(children) {
if (!children) {
return '';
}
if (typeof children === 'string') {
return children;
}
if (children.length) {
return children.join('\n');
}
return '';
}
var Surface = function (_React$Component) {
babelHelpers.inherits(Surface, _React$Component);
function Surface() {
babelHelpers.classCallCheck(this, Surface);
return babelHelpers.possibleConstructorReturn(this, (Surface.__proto__ || Object.getPrototypeOf(Surface)).apply(this, arguments));
}
babelHelpers.createClass(Surface, [{
key: 'getChildContext',
value: function getChildContext() {
return { isInSurface: true };
}
}, {
key: 'render',
value: function render() {
var props = this.props;
var w = extractNumber(props.width, 0);
var h = extractNumber(props.height, 0);
return React.createElement(
NativeSurfaceView,
{ style: [props.style, { width: w, height: h }], __source: {
fileName: _jsxFileName,
lineNumber: 154
}
},
this.props.children
);
}
}]);
return Surface;
}(React.Component);
Surface.childContextTypes = {
isInSurface: React.PropTypes.bool
};
function extractNumber(value, defaultValue) {
if (value == null) {
return defaultValue;
}
return +value;
}
var pooledTransform = new Transform();
function extractTransform(props) {
var scaleX = props.scaleX != null ? props.scaleX : props.scale != null ? props.scale : 1;
var scaleY = props.scaleY != null ? props.scaleY : props.scale != null ? props.scale : 1;
pooledTransform.transformTo(1, 0, 0, 1, 0, 0).move(props.x || 0, props.y || 0).rotate(props.rotation || 0, props.originX, props.originY).scale(scaleX, scaleY, props.originX, props.originY);
if (props.transform != null) {
pooledTransform.transform(props.transform);
}
return [pooledTransform.xx, pooledTransform.yx, pooledTransform.xy, pooledTransform.yy, pooledTransform.x, pooledTransform.y];
}
function extractOpacity(props) {
if (props.visible === false) {
return 0;
}
if (props.opacity == null) {
return 1;
}
return +props.opacity;
}
var Group = function (_React$Component2) {
babelHelpers.inherits(Group, _React$Component2);
function Group() {
babelHelpers.classCallCheck(this, Group);
return babelHelpers.possibleConstructorReturn(this, (Group.__proto__ || Object.getPrototypeOf(Group)).apply(this, arguments));
}
babelHelpers.createClass(Group, [{
key: 'render',
value: function render() {
var props = this.props;
invariant(this.context.isInSurface, 'ART: <Group /> must be a child of a <Surface />');
return React.createElement(
NativeGroup,
{
opacity: extractOpacity(props),
transform: extractTransform(props), __source: {
fileName: _jsxFileName,
lineNumber: 226
}
},
this.props.children
);
}
}]);
return Group;
}(React.Component);
Group.contextTypes = {
isInSurface: React.PropTypes.bool.isRequired
};
var ClippingRectangle = function (_React$Component3) {
babelHelpers.inherits(ClippingRectangle, _React$Component3);
function ClippingRectangle() {
babelHelpers.classCallCheck(this, ClippingRectangle);
return babelHelpers.possibleConstructorReturn(this, (ClippingRectangle.__proto__ || Object.getPrototypeOf(ClippingRectangle)).apply(this, arguments));
}
babelHelpers.createClass(ClippingRectangle, [{
key: 'render',
value: function render() {
var props = this.props;
var x = extractNumber(props.x, 0);
var y = extractNumber(props.y, 0);
var w = extractNumber(props.width, 0);
var h = extractNumber(props.height, 0);
var clipping = [x, y, w, h];
var propsExcludingXAndY = merge(props);
delete propsExcludingXAndY.x;
delete propsExcludingXAndY.y;
return React.createElement(
NativeGroup,
{
clipping: clipping,
opacity: extractOpacity(props),
transform: extractTransform(propsExcludingXAndY), __source: {
fileName: _jsxFileName,
lineNumber: 248
}
},
this.props.children
);
}
}]);
return ClippingRectangle;
}(React.Component);
var SOLID_COLOR = 0;
var LINEAR_GRADIENT = 1;
var RADIAL_GRADIENT = 2;
var PATTERN = 3;
function insertColorIntoArray(color, targetArray, atIndex) {
var c = new Color(color);
targetArray[atIndex + 0] = c.red / 255;
targetArray[atIndex + 1] = c.green / 255;
targetArray[atIndex + 2] = c.blue / 255;
targetArray[atIndex + 3] = c.alpha;
}
function insertColorsIntoArray(stops, targetArray, atIndex) {
var i = 0;
if ('length' in stops) {
while (i < stops.length) {
insertColorIntoArray(stops[i], targetArray, atIndex + i * 4);
i++;
}
} else {
for (var offset in stops) {
insertColorIntoArray(stops[offset], targetArray, atIndex + i * 4);
i++;
}
}
return atIndex + i * 4;
}
function insertOffsetsIntoArray(stops, targetArray, atIndex, multi, reverse) {
var offsetNumber;
var i = 0;
if ('length' in stops) {
while (i < stops.length) {
offsetNumber = i / (stops.length - 1) * multi;
targetArray[atIndex + i] = reverse ? 1 - offsetNumber : offsetNumber;
i++;
}
} else {
for (var offsetString in stops) {
offsetNumber = +offsetString * multi;
targetArray[atIndex + i] = reverse ? 1 - offsetNumber : offsetNumber;
i++;
}
}
return atIndex + i;
}
function insertColorStopsIntoArray(stops, targetArray, atIndex) {
var lastIndex = insertColorsIntoArray(stops, targetArray, atIndex);
insertOffsetsIntoArray(stops, targetArray, lastIndex, 1, false);
}
function insertDoubleColorStopsIntoArray(stops, targetArray, atIndex) {
var lastIndex = insertColorsIntoArray(stops, targetArray, atIndex);
lastIndex = insertColorsIntoArray(stops, targetArray, lastIndex);
lastIndex = insertOffsetsIntoArray(stops, targetArray, lastIndex, 0.5, false);
insertOffsetsIntoArray(stops, targetArray, lastIndex, 0.5, true);
}
function applyBoundingBoxToBrushData(brushData, props) {
var type = brushData[0];
var width = +props.width;
var height = +props.height;
if (type === LINEAR_GRADIENT) {
brushData[1] *= width;
brushData[2] *= height;
brushData[3] *= width;
brushData[4] *= height;
} else if (type === RADIAL_GRADIENT) {
brushData[1] *= width;
brushData[2] *= height;
brushData[3] *= width;
brushData[4] *= height;
brushData[5] *= width;
brushData[6] *= height;
} else if (type === PATTERN) {}
}
function extractBrush(colorOrBrush, props) {
if (colorOrBrush == null) {
return null;
}
if (colorOrBrush._brush) {
if (colorOrBrush._bb) {
applyBoundingBoxToBrushData(colorOrBrush._brush, props);
colorOrBrush._bb = false;
}
return colorOrBrush._brush;
}
var c = new Color(colorOrBrush);
return [SOLID_COLOR, c.red / 255, c.green / 255, c.blue / 255, c.alpha];
}
function extractColor(color) {
if (color == null) {
return null;
}
var c = new Color(color);
return [c.red / 255, c.green / 255, c.blue / 255, c.alpha];
}
function extractStrokeCap(strokeCap) {
switch (strokeCap) {
case 'butt':
return 0;
case 'square':
return 2;
default:
return 1;}
}
function extractStrokeJoin(strokeJoin) {
switch (strokeJoin) {
case 'miter':
return 0;
case 'bevel':
return 2;
default:
return 1;}
}
var Shape = function (_React$Component4) {
babelHelpers.inherits(Shape, _React$Component4);
function Shape() {
babelHelpers.classCallCheck(this, Shape);
return babelHelpers.possibleConstructorReturn(this, (Shape.__proto__ || Object.getPrototypeOf(Shape)).apply(this, arguments));
}
babelHelpers.createClass(Shape, [{
key: 'render',
value: function render() {
var props = this.props;
var path = props.d || childrenAsString(props.children);
var d = new Path(path).toJSON();
return React.createElement(NativeShape, {
fill: extractBrush(props.fill, props),
opacity: extractOpacity(props),
stroke: extractColor(props.stroke),
strokeCap: extractStrokeCap(props.strokeCap),
strokeDash: props.strokeDash || null,
strokeJoin: extractStrokeJoin(props.strokeJoin),
strokeWidth: extractNumber(props.strokeWidth, 1),
transform: extractTransform(props),
d: d,
__source: {
fileName: _jsxFileName,
lineNumber: 396
}
});
}
}]);
return Shape;
}(React.Component);
var cachedFontObjectsFromString = {};
var fontFamilyPrefix = /^[\s"']*/;
var fontFamilySuffix = /[\s"']*$/;
function extractSingleFontFamily(fontFamilyString) {
return fontFamilyString.split(',')[0].replace(fontFamilyPrefix, '').replace(fontFamilySuffix, '');
}
function parseFontString(font) {
if (cachedFontObjectsFromString.hasOwnProperty(font)) {
return cachedFontObjectsFromString[font];
}
var regexp = /^\s*((?:(?:normal|bold|italic)\s+)*)(?:(\d+(?:\.\d+)?)[ptexm\%]*(?:\s*\/.*?)?\s+)?\s*\"?([^\"]*)/i;
var match = regexp.exec(font);
if (!match) {
return null;
}
var fontFamily = extractSingleFontFamily(match[3]);
var fontSize = +match[2] || 12;
var isBold = /bold/.exec(match[1]);
var isItalic = /italic/.exec(match[1]);
cachedFontObjectsFromString[font] = {
fontFamily: fontFamily,
fontSize: fontSize,
fontWeight: isBold ? 'bold' : 'normal',
fontStyle: isItalic ? 'italic' : 'normal'
};
return cachedFontObjectsFromString[font];
}
function extractFont(font) {
if (font == null) {
return null;
}
if (typeof font === 'string') {
return parseFontString(font);
}
var fontFamily = extractSingleFontFamily(font.fontFamily);
var fontSize = +font.fontSize || 12;
return {
fontFamily: fontFamily,
fontSize: fontSize,
fontWeight: font.fontWeight,
fontStyle: font.fontStyle
};
}
var newLine = /\n/g;
function extractFontAndLines(font, text) {
return { font: extractFont(font), lines: text.split(newLine) };
}
function extractAlignment(alignment) {
switch (alignment) {
case 'right':
return 1;
case 'center':
return 2;
default:
return 0;
}
}
var Text = function (_React$Component5) {
babelHelpers.inherits(Text, _React$Component5);
function Text() {
babelHelpers.classCallCheck(this, Text);
return babelHelpers.possibleConstructorReturn(this, (Text.__proto__ || Object.getPrototypeOf(Text)).apply(this, arguments));
}
babelHelpers.createClass(Text, [{
key: 'render',
value: function render() {
var props = this.props;
var textPath = props.path ? new Path(props.path).toJSON() : null;
var textFrame = extractFontAndLines(props.font, childrenAsString(props.children));
return React.createElement(NativeText, {
fill: extractBrush(props.fill, props),
opacity: extractOpacity(props),
stroke: extractColor(props.stroke),
strokeCap: extractStrokeCap(props.strokeCap),
strokeDash: props.strokeDash || null,
strokeJoin: extractStrokeJoin(props.strokeJoin),
strokeWidth: extractNumber(props.strokeWidth, 1),
transform: extractTransform(props),
alignment: extractAlignment(props.alignment),
frame: textFrame,
path: textPath,
__source: {
fileName: _jsxFileName,
lineNumber: 493
}
});
}
}]);
return Text;
}(React.Component);
function LinearGradient(stops, x1, y1, x2, y2) {
var type = LINEAR_GRADIENT;
if (arguments.length < 5) {
var angle = (x1 == null ? 270 : x1) * Math.PI / 180;
var x = Math.cos(angle);
var y = -Math.sin(angle);
var l = (Math.abs(x) + Math.abs(y)) / 2;
x *= l;y *= l;
x1 = 0.5 - x;
x2 = 0.5 + x;
y1 = 0.5 - y;
y2 = 0.5 + y;
this._bb = true;
} else {
this._bb = false;
}
var brushData = [type, +x1, +y1, +x2, +y2];
insertColorStopsIntoArray(stops, brushData, 5);
this._brush = brushData;
}
function RadialGradient(stops, fx, fy, rx, ry, cx, cy) {
if (ry == null) {
ry = rx;
}
if (cx == null) {
cx = fx;
}
if (cy == null) {
cy = fy;
}
if (fx == null) {
fx = fy = rx = ry = cx = cy = 0.5;
this._bb = true;
} else {
this._bb = false;
}
var brushData = [RADIAL_GRADIENT, +fx, +fy, +rx * 2, +ry * 2, +cx, +cy];
insertDoubleColorStopsIntoArray(stops, brushData, 7);
this._brush = brushData;
}
function Pattern(url, width, height, left, top) {
this._brush = [PATTERN, url, +left || 0, +top || 0, +width, +height];
}
var ReactART = {
LinearGradient: LinearGradient,
RadialGradient: RadialGradient,
Pattern: Pattern,
Transform: Transform,
Path: Path,
Surface: Surface,
Group: Group,
ClippingRectangle: ClippingRectangle,
Shape: Shape,
Text: Text
};
module.exports = ReactART;
}, 203, null, "ReactNativeART");
__d(/* art/core/color.js */function(global, require, module, exports) {var colors = {
maroon: '#800000', red: '#ff0000', orange: '#ffA500', yellow: '#ffff00', olive: '#808000',
purple: '#800080', fuchsia: "#ff00ff", white: '#ffffff', lime: '#00ff00', green: '#008000',
navy: '#000080', blue: '#0000ff', aqua: '#00ffff', teal: '#008080',
black: '#000000', silver: '#c0c0c0', gray: '#808080'
};
var map = function map(array, fn) {
var results = [];
for (var i = 0, l = array.length; i < l; i++) {
results[i] = fn(array[i], i);
}return results;
};
var Color = function Color(color, type) {
if (color.isColor) {
this.red = color.red;
this.green = color.green;
this.blue = color.blue;
this.alpha = color.alpha;
} else {
var namedColor = colors[color];
if (namedColor) {
color = namedColor;
type = 'hex';
}
switch (typeof color) {
case 'string':
if (!type) type = (type = color.match(/^rgb|^hsb|^hsl/)) ? type[0] : 'hex';break;
case 'object':
type = type || 'rgb';color = color.toString();break;
case 'number':
type = 'hex';color = color.toString(16);break;
}
color = Color['parse' + type.toUpperCase()](color);
this.red = color[0];
this.green = color[1];
this.blue = color[2];
this.alpha = color[3];
}
this.isColor = true;
};
var limit = function limit(number, min, max) {
return Math.min(max, Math.max(min, number));
};
var listMatch = /([-.\d]+\%?)\s*,\s*([-.\d]+\%?)\s*,\s*([-.\d]+\%?)\s*,?\s*([-.\d]*\%?)/;
var hexMatch = /^#?([a-f0-9]{1,2})([a-f0-9]{1,2})([a-f0-9]{1,2})([a-f0-9]{0,2})$/i;
Color.parseRGB = function (color) {
return map(color.match(listMatch).slice(1), function (bit, i) {
if (bit) bit = parseFloat(bit) * (bit[bit.length - 1] == '%' ? 2.55 : 1);
return i < 3 ? Math.round((bit %= 256) < 0 ? bit + 256 : bit) : limit(bit === '' ? 1 : Number(bit), 0, 1);
});
};
Color.parseHEX = function (color) {
if (color.length == 1) color = color + color + color;
return map(color.match(hexMatch).slice(1), function (bit, i) {
if (i == 3) return bit ? parseInt(bit, 16) / 255 : 1;
return parseInt(bit.length == 1 ? bit + bit : bit, 16);
});
};
Color.parseHSB = function (color) {
var hsb = map(color.match(listMatch).slice(1), function (bit, i) {
if (bit) bit = parseFloat(bit);
if (i === 0) return Math.round((bit %= 360) < 0 ? bit + 360 : bit);else if (i < 3) return limit(Math.round(bit), 0, 100);else return limit(bit === '' ? 1 : Number(bit), 0, 1);
});
var a = hsb[3];
var br = Math.round(hsb[2] / 100 * 255);
if (hsb[1] == 0) return [br, br, br, a];
var hue = hsb[0];
var f = hue % 60;
var p = Math.round(hsb[2] * (100 - hsb[1]) / 10000 * 255);
var q = Math.round(hsb[2] * (6000 - hsb[1] * f) / 600000 * 255);
var t = Math.round(hsb[2] * (6000 - hsb[1] * (60 - f)) / 600000 * 255);
switch (Math.floor(hue / 60)) {
case 0:
return [br, t, p, a];
case 1:
return [q, br, p, a];
case 2:
return [p, br, t, a];
case 3:
return [p, q, br, a];
case 4:
return [t, p, br, a];
default:
return [br, p, q, a];
}
};
Color.parseHSL = function (color) {
var hsb = map(color.match(listMatch).slice(1), function (bit, i) {
if (bit) bit = parseFloat(bit);
if (i === 0) return Math.round((bit %= 360) < 0 ? bit + 360 : bit);else if (i < 3) return limit(Math.round(bit), 0, 100);else return limit(bit === '' ? 1 : Number(bit), 0, 1);
});
var h = hsb[0] / 60;
var s = hsb[1] / 100;
var l = hsb[2] / 100;
var a = hsb[3];
var c = (1 - Math.abs(2 * l - 1)) * s;
var x = c * (1 - Math.abs(h % 2 - 1));
var m = l - c / 2;
var p = Math.round((c + m) * 255);
var q = Math.round((x + m) * 255);
var t = Math.round(m * 255);
switch (Math.floor(h)) {
case 0:
return [p, q, t, a];
case 1:
return [q, p, t, a];
case 2:
return [t, p, q, a];
case 3:
return [t, q, p, a];
case 4:
return [q, t, p, a];
default:
return [p, t, q, a];
}
};
var toString = function toString(type, array) {
if (array[3] != 1) type += 'a';else array.pop();
return type + '(' + array.join(', ') + ')';
};
Color.prototype = {
toHSB: function toHSB(array) {
var red = this.red,
green = this.green,
blue = this.blue,
alpha = this.alpha;
var max = Math.max(red, green, blue),
min = Math.min(red, green, blue),
delta = max - min;
var hue = 0,
saturation = delta != 0 ? delta / max : 0,
brightness = max / 255;
if (saturation) {
var rr = (max - red) / delta,
gr = (max - green) / delta,
br = (max - blue) / delta;
hue = red == max ? br - gr : green == max ? 2 + rr - br : 4 + gr - rr;
if ((hue /= 6) < 0) hue++;
}
var hsb = [Math.round(hue * 360), Math.round(saturation * 100), Math.round(brightness * 100), alpha];
return array ? hsb : toString('hsb', hsb);
},
toHSL: function toHSL(array) {
var red = this.red,
green = this.green,
blue = this.blue,
alpha = this.alpha;
var max = Math.max(red, green, blue),
min = Math.min(red, green, blue),
delta = max - min;
var hue = 0,
saturation = delta != 0 ? delta / (255 - Math.abs(max + min - 255)) : 0,
lightness = (max + min) / 512;
if (saturation) {
var rr = (max - red) / delta,
gr = (max - green) / delta,
br = (max - blue) / delta;
hue = red == max ? br - gr : green == max ? 2 + rr - br : 4 + gr - rr;
if ((hue /= 6) < 0) hue++;
}
var hsl = [Math.round(hue * 360), Math.round(saturation * 100), Math.round(lightness * 100), alpha];
return array ? hsl : toString('hsl', hsl);
},
toHEX: function toHEX(array) {
var a = this.alpha;
var alpha = (a = Math.round(a * 255).toString(16)).length == 1 ? a + a : a;
var hex = map([this.red, this.green, this.blue], function (bit) {
bit = bit.toString(16);
return bit.length == 1 ? '0' + bit : bit;
});
return array ? hex.concat(alpha) : '#' + hex.join('') + (alpha == 'ff' ? '' : alpha);
},
toRGB: function toRGB(array) {
var rgb = [this.red, this.green, this.blue, this.alpha];
return array ? rgb : toString('rgb', rgb);
}
};
Color.prototype.toString = Color.prototype.toRGB;
Color.hex = function (hex) {
return new Color(hex, 'hex');
};
if (this.hex == null) this.hex = Color.hex;
Color.hsb = function (h, s, b, a) {
return new Color([h || 0, s || 0, b || 0, a == null ? 1 : a], 'hsb');
};
if (this.hsb == null) this.hsb = Color.hsb;
Color.hsl = function (h, s, l, a) {
return new Color([h || 0, s || 0, l || 0, a == null ? 1 : a], 'hsl');
};
if (this.hsl == null) this.hsl = Color.hsl;
Color.rgb = function (r, g, b, a) {
return new Color([r || 0, g || 0, b || 0, a == null ? 1 : a], 'rgb');
};
if (this.rgb == null) this.rgb = Color.rgb;
Color.detach = function (color) {
color = new Color(color);
return [Color.rgb(color.red, color.green, color.blue).toString(), color.alpha];
};
module.exports = Color;
}, 204, null, "art/core/color.js");
__d(/* ARTSerializablePath */function(global, require, module, exports) {
'use strict';
var Class = require(206 ); // 206 = art/core/class.js
var Path = require(207 ); // 207 = art/core/path.js
var MOVE_TO = 0;
var CLOSE = 1;
var LINE_TO = 2;
var CURVE_TO = 3;
var ARC = 4;
var SerializablePath = Class(Path, {
initialize: function initialize(path) {
this.reset();
if (path instanceof SerializablePath) {
this.path = path.path.slice(0);
} else if (path) {
if (path.applyToPath) {
path.applyToPath(this);
} else {
this.push(path);
}
}
},
onReset: function onReset() {
this.path = [];
},
onMove: function onMove(sx, sy, x, y) {
this.path.push(MOVE_TO, x, y);
},
onLine: function onLine(sx, sy, x, y) {
this.path.push(LINE_TO, x, y);
},
onBezierCurve: function onBezierCurve(sx, sy, p1x, p1y, p2x, p2y, x, y) {
this.path.push(CURVE_TO, p1x, p1y, p2x, p2y, x, y);
},
_arcToBezier: Path.prototype.onArc,
onArc: function onArc(sx, sy, ex, ey, cx, cy, rx, ry, sa, ea, ccw, rotation) {
if (rx !== ry || rotation) {
return this._arcToBezier(sx, sy, ex, ey, cx, cy, rx, ry, sa, ea, ccw, rotation);
}
this.path.push(ARC, cx, cy, rx, sa, ea, ccw ? 0 : 1);
},
onClose: function onClose() {
this.path.push(CLOSE);
},
toJSON: function toJSON() {
return this.path;
}
});
module.exports = SerializablePath;
}, 205, null, "ARTSerializablePath");
__d(/* art/core/class.js */function(global, require, module, exports) {module.exports = function (mixins) {
var proto = {};
for (var i = 0, l = arguments.length; i < l; i++) {
var mixin = arguments[i];
if (typeof mixin == 'function') mixin = mixin.prototype;
for (var key in mixin) {
proto[key] = mixin[key];
}
}
if (!proto.initialize) proto.initialize = function () {};
proto.constructor = function (a, b, c, d, e, f, g, h) {
return new proto.initialize(a, b, c, d, e, f, g, h);
};
proto.constructor.prototype = proto.initialize.prototype = proto;
return proto.constructor;
};
}, 206, null, "art/core/class.js");
__d(/* art/core/path.js */function(global, require, module, exports) {var Class = require(206 ); // 206 = ./class
module.exports = Class({
initialize: function initialize(path) {
this.reset().push(path);
},
push: function push() {
var p = Array.prototype.join.call(arguments, ' ').match(/[a-df-z]|[\-+]?(?:[\d\.]e[\-+]?|[^\s\-+,a-z])+/ig);
if (!p) return this;
var last,
cmd = p[0],
i = 1;
while (cmd) {
switch (cmd) {
case 'm':
this.move(p[i++], p[i++]);break;
case 'l':
this.line(p[i++], p[i++]);break;
case 'c':
this.curve(p[i++], p[i++], p[i++], p[i++], p[i++], p[i++]);break;
case 's':
this.curve(p[i++], p[i++], null, null, p[i++], p[i++]);break;
case 'q':
this.curve(p[i++], p[i++], p[i++], p[i++]);break;
case 't':
this.curve(p[i++], p[i++]);break;
case 'a':
this.arc(p[i + 5], p[i + 6], p[i], p[i + 1], p[i + 3], !+p[i + 4], p[i + 2]);i += 7;break;
case 'h':
this.line(p[i++], 0);break;
case 'v':
this.line(0, p[i++]);break;
case 'M':
this.moveTo(p[i++], p[i++]);break;
case 'L':
this.lineTo(p[i++], p[i++]);break;
case 'C':
this.curveTo(p[i++], p[i++], p[i++], p[i++], p[i++], p[i++]);break;
case 'S':
this.curveTo(p[i++], p[i++], null, null, p[i++], p[i++]);break;
case 'Q':
this.curveTo(p[i++], p[i++], p[i++], p[i++]);break;
case 'T':
this.curveTo(p[i++], p[i++]);break;
case 'A':
this.arcTo(p[i + 5], p[i + 6], p[i], p[i + 1], p[i + 3], !+p[i + 4], p[i + 2]);i += 7;break;
case 'H':
this.lineTo(p[i++], this.penY);break;
case 'V':
this.lineTo(this.penX, p[i++]);break;
case 'Z':case 'z':
this.close();break;
default:
cmd = last;i--;continue;
}
last = cmd;
if (last == 'm') last = 'l';else if (last == 'M') last = 'L';
cmd = p[i++];
}
return this;
},
reset: function reset() {
this.penX = this.penY = 0;
this.penDownX = this.penDownY = null;
this._pivotX = this._pivotY = 0;
this.onReset();
return this;
},
move: function move(x, y) {
this.onMove(this.penX, this.penY, this._pivotX = this.penX += +x, this._pivotY = this.penY += +y);
return this;
},
moveTo: function moveTo(x, y) {
this.onMove(this.penX, this.penY, this._pivotX = this.penX = +x, this._pivotY = this.penY = +y);
return this;
},
line: function line(x, y) {
return this.lineTo(this.penX + +x, this.penY + +y);
},
lineTo: function lineTo(x, y) {
if (this.penDownX == null) {
this.penDownX = this.penX;this.penDownY = this.penY;
}
this.onLine(this.penX, this.penY, this._pivotX = this.penX = +x, this._pivotY = this.penY = +y);
return this;
},
curve: function curve(c1x, c1y, c2x, c2y, ex, ey) {
var x = this.penX,
y = this.penY;
return this.curveTo(x + +c1x, y + +c1y, c2x == null ? null : x + +c2x, c2y == null ? null : y + +c2y, ex == null ? null : x + +ex, ey == null ? null : y + +ey);
},
curveTo: function curveTo(c1x, c1y, c2x, c2y, ex, ey) {
var x = this.penX,
y = this.penY;
if (c2x == null) {
c2x = +c1x;c2y = +c1y;
c1x = x * 2 - (this._pivotX || 0);c1y = y * 2 - (this._pivotY || 0);
}
if (ex == null) {
this._pivotX = +c1x;this._pivotY = +c1y;
ex = +c2x;ey = +c2y;
c2x = (ex + +c1x * 2) / 3;c2y = (ey + +c1y * 2) / 3;
c1x = (x + +c1x * 2) / 3;c1y = (y + +c1y * 2) / 3;
} else {
this._pivotX = +c2x;this._pivotY = +c2y;
}
if (this.penDownX == null) {
this.penDownX = x;this.penDownY = y;
}
this.onBezierCurve(x, y, +c1x, +c1y, +c2x, +c2y, this.penX = +ex, this.penY = +ey);
return this;
},
arc: function arc(x, y, rx, ry, outer, counterClockwise, rotation) {
return this.arcTo(this.penX + +x, this.penY + +y, rx, ry, outer, counterClockwise, rotation);
},
arcTo: function arcTo(x, y, rx, ry, outer, counterClockwise, rotation) {
ry = Math.abs(+ry || +rx || +y - this.penY);
rx = Math.abs(+rx || +x - this.penX);
if (!rx || !ry || x == this.penX && y == this.penY) return this.lineTo(x, y);
var tX = this.penX,
tY = this.penY,
clockwise = !+counterClockwise,
large = !!+outer;
var rad = rotation ? rotation * Math.PI / 180 : 0,
cos = Math.cos(rad),
sin = Math.sin(rad);
x -= tX;y -= tY;
var cx = cos * x / 2 + sin * y / 2,
cy = -sin * x / 2 + cos * y / 2,
rxry = rx * rx * ry * ry,
rycx = ry * ry * cx * cx,
rxcy = rx * rx * cy * cy,
a = rxry - rxcy - rycx;
if (a < 0) {
a = Math.sqrt(1 - a / rxry);
rx *= a;ry *= a;
cx = x / 2;cy = y / 2;
} else {
a = Math.sqrt(a / (rxcy + rycx));
if (large == clockwise) a = -a;
var cxd = -a * cy * rx / ry,
cyd = a * cx * ry / rx;
cx = cos * cxd - sin * cyd + x / 2;
cy = sin * cxd + cos * cyd + y / 2;
}
var xx = cos / rx,
yx = sin / rx,
xy = -sin / ry,
yy = cos / ry;
var sa = Math.atan2(xy * -cx + yy * -cy, xx * -cx + yx * -cy),
ea = Math.atan2(xy * (x - cx) + yy * (y - cy), xx * (x - cx) + yx * (y - cy));
cx += tX;cy += tY;
x += tX;y += tY;
if (this.penDownX == null) {
this.penDownX = this.penX;this.penDownY = this.penY;
}
this.onArc(tX, tY, this._pivotX = this.penX = x, this._pivotY = this.penY = y, cx, cy, rx, ry, sa, ea, !clockwise, rotation);
return this;
},
counterArc: function counterArc(x, y, rx, ry, outer) {
return this.arc(x, y, rx, ry, outer, true);
},
counterArcTo: function counterArcTo(x, y, rx, ry, outer) {
return this.arcTo(x, y, rx, ry, outer, true);
},
close: function close() {
if (this.penDownX != null) {
this.onClose(this.penX, this.penY, this.penX = this.penDownX, this.penY = this.penDownY);
this.penDownX = null;
}
return this;
},
onReset: function onReset() {},
onMove: function onMove(sx, sy, ex, ey) {},
onLine: function onLine(sx, sy, ex, ey) {
this.onBezierCurve(sx, sy, sx, sy, ex, ey, ex, ey);
},
onBezierCurve: function onBezierCurve(sx, sy, c1x, c1y, c2x, c2y, ex, ey) {
var gx = ex - sx,
gy = ey - sy,
g = gx * gx + gy * gy,
v1,
v2,
cx,
cy,
u;
cx = c1x - sx;cy = c1y - sy;
u = cx * gx + cy * gy;
if (u > g) {
cx -= gx;
cy -= gy;
} else if (u > 0 && g != 0) {
cx -= u / g * gx;
cy -= u / g * gy;
}
v1 = cx * cx + cy * cy;
cx = c2x - sx;cy = c2y - sy;
u = cx * gx + cy * gy;
if (u > g) {
cx -= gx;
cy -= gy;
} else if (u > 0 && g != 0) {
cx -= u / g * gx;
cy -= u / g * gy;
}
v2 = cx * cx + cy * cy;
if (v1 < 0.01 && v2 < 0.01) {
this.onLine(sx, sy, ex, ey);
return;
}
if (isNaN(v1) || isNaN(v2)) {
throw new Error('Bad input');
}
var s1x = (c1x + c2x) * 0.5,
s1y = (c1y + c2y) * 0.5,
l1x = (c1x + sx) * 0.5,
l1y = (c1y + sy) * 0.5,
l2x = (l1x + s1x) * 0.5,
l2y = (l1y + s1y) * 0.5,
r2x = (ex + c2x) * 0.5,
r2y = (ey + c2y) * 0.5,
r1x = (r2x + s1x) * 0.5,
r1y = (r2y + s1y) * 0.5,
l2r1x = (l2x + r1x) * 0.5,
l2r1y = (l2y + r1y) * 0.5;
this.onBezierCurve(sx, sy, l1x, l1y, l2x, l2y, l2r1x, l2r1y);
this.onBezierCurve(l2r1x, l2r1y, r1x, r1y, r2x, r2y, ex, ey);
},
onArc: function onArc(sx, sy, ex, ey, cx, cy, rx, ry, sa, ea, ccw, rotation) {
var rad = rotation ? rotation * Math.PI / 180 : 0,
cos = Math.cos(rad),
sin = Math.sin(rad),
xx = cos * rx,
yx = -sin * ry,
xy = sin * rx,
yy = cos * ry;
var arc = ea - sa;
if (arc < 0 && !ccw) arc += Math.PI * 2;else if (arc > 0 && ccw) arc -= Math.PI * 2;
var n = Math.ceil(Math.abs(arc / (Math.PI / 2))),
step = arc / n,
k = 4 / 3 * Math.tan(step / 4);
var x = Math.cos(sa),
y = Math.sin(sa);
for (var i = 0; i < n; i++) {
var cp1x = x - k * y,
cp1y = y + k * x;
sa += step;
x = Math.cos(sa);y = Math.sin(sa);
var cp2x = x + k * y,
cp2y = y - k * x;
this.onBezierCurve(sx, sy, cx + xx * cp1x + yx * cp1y, cy + xy * cp1x + yy * cp1y, cx + xx * cp2x + yx * cp2y, cy + xy * cp2x + yy * cp2y, sx = cx + xx * x + yx * y, sy = cy + xy * x + yy * y);
}
},
onClose: function onClose(sx, sy, ex, ey) {
this.onLine(sx, sy, ex, ey);
}
});
}, 207, null, "art/core/path.js");
__d(/* art/core/transform.js */function(global, require, module, exports) {var Class = require(206 ); // 206 = ./class
function Transform(xx, yx, xy, yy, x, y) {
if (xx && typeof xx == 'object') {
yx = xx.yx;yy = xx.yy;y = xx.y;
xy = xx.xy;x = xx.x;xx = xx.xx;
}
this.xx = xx == null ? 1 : xx;
this.yx = yx || 0;
this.xy = xy || 0;
this.yy = yy == null ? 1 : yy;
this.x = (x == null ? this.x : x) || 0;
this.y = (y == null ? this.y : y) || 0;
this._transform();
return this;
};
module.exports = Class({
initialize: Transform,
_transform: function _transform() {},
xx: 1, yx: 0, x: 0,
xy: 0, yy: 1, y: 0,
transform: function transform(xx, yx, xy, yy, x, y) {
var m = this;
if (xx && typeof xx == 'object') {
yx = xx.yx;yy = xx.yy;y = xx.y;
xy = xx.xy;x = xx.x;xx = xx.xx;
}
if (!x) x = 0;
if (!y) y = 0;
return this.transformTo(m.xx * xx + m.xy * yx, m.yx * xx + m.yy * yx, m.xx * xy + m.xy * yy, m.yx * xy + m.yy * yy, m.xx * x + m.xy * y + m.x, m.yx * x + m.yy * y + m.y);
},
transformTo: Transform,
translate: function translate(x, y) {
return this.transform(1, 0, 0, 1, x, y);
},
move: function move(x, y) {
this.x += x || 0;
this.y += y || 0;
this._transform();
return this;
},
scale: function scale(x, y) {
if (y == null) y = x;
return this.transform(x, 0, 0, y, 0, 0);
},
rotate: function rotate(deg, x, y) {
if (x == null || y == null) {
x = (this.left || 0) + (this.width || 0) / 2;
y = (this.top || 0) + (this.height || 0) / 2;
}
var rad = deg * Math.PI / 180,
sin = Math.sin(rad),
cos = Math.cos(rad);
this.transform(1, 0, 0, 1, x, y);
var m = this;
return this.transformTo(cos * m.xx - sin * m.yx, sin * m.xx + cos * m.yx, cos * m.xy - sin * m.yy, sin * m.xy + cos * m.yy, m.x, m.y).transform(1, 0, 0, 1, -x, -y);
},
moveTo: function moveTo(x, y) {
var m = this;
return this.transformTo(m.xx, m.yx, m.xy, m.yy, x, y);
},
rotateTo: function rotateTo(deg, x, y) {
var m = this;
var flip = m.yx / m.xx > m.yy / m.xy ? -1 : 1;
if (m.xx < 0 ? m.xy >= 0 : m.xy < 0) flip = -flip;
return this.rotate(deg - Math.atan2(flip * m.yx, flip * m.xx) * 180 / Math.PI, x, y);
},
scaleTo: function scaleTo(x, y) {
var m = this;
var h = Math.sqrt(m.xx * m.xx + m.yx * m.yx);
m.xx /= h;m.yx /= h;
h = Math.sqrt(m.yy * m.yy + m.xy * m.xy);
m.yy /= h;m.xy /= h;
return this.scale(x, y);
},
resizeTo: function resizeTo(width, height) {
var w = this.width,
h = this.height;
if (!w || !h) return this;
return this.scaleTo(width / w, height / h);
},
inversePoint: function inversePoint(x, y) {
var a = this.xx,
b = this.yx,
c = this.xy,
d = this.yy,
e = this.x,
f = this.y;
var det = b * c - a * d;
if (det == 0) return null;
return {
x: (d * (e - x) + c * (y - f)) / det,
y: (a * (f - y) + b * (x - e)) / det
};
},
point: function point(x, y) {
var m = this;
return {
x: m.xx * x + m.xy * y + m.x,
y: m.yx * x + m.yy * y + m.y
};
}
});
}, 208, null, "art/core/transform.js");
__d(/* Button */function(global, require, module, exports) {
'use strict';
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/node_modules/react-native/Libraries/Components/Button.js';
var ColorPropType = require(71 ); // 71 = ColorPropType
var Platform = require(79 ); // 79 = Platform
var React = require(126 ); // 126 = React
var StyleSheet = require(127 ); // 127 = StyleSheet
var Text = require(210 ); // 210 = Text
var TouchableNativeFeedback = require(217 ); // 217 = TouchableNativeFeedback
var TouchableOpacity = require(218 ); // 218 = TouchableOpacity
var View = require(146 ); // 146 = View
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var Button = function (_React$Component) {
babelHelpers.inherits(Button, _React$Component);
function Button() {
babelHelpers.classCallCheck(this, Button);
return babelHelpers.possibleConstructorReturn(this, (Button.__proto__ || Object.getPrototypeOf(Button)).apply(this, arguments));
}
babelHelpers.createClass(Button, [{
key: 'render',
value: function render() {
var _props = this.props,
accessibilityLabel = _props.accessibilityLabel,
color = _props.color,
onPress = _props.onPress,
title = _props.title,
disabled = _props.disabled,
testID = _props.testID;
var buttonStyles = [styles.button];
var textStyles = [styles.text];
var Touchable = Platform.OS === 'android' ? TouchableNativeFeedback : TouchableOpacity;
if (color && Platform.OS === 'ios') {
textStyles.push({ color: color });
} else if (color) {
buttonStyles.push({ backgroundColor: color });
}
if (disabled) {
buttonStyles.push(styles.buttonDisabled);
textStyles.push(styles.textDisabled);
}
invariant(typeof title === 'string', 'The title prop of a Button must be a string');
var formattedTitle = Platform.OS === 'android' ? title.toUpperCase() : title;
return React.createElement(
Touchable,
{
accessibilityComponentType: 'button',
accessibilityLabel: accessibilityLabel,
accessibilityTraits: ['button'],
testID: testID,
disabled: disabled,
onPress: onPress, __source: {
fileName: _jsxFileName,
lineNumber: 115
}
},
React.createElement(
View,
{ style: buttonStyles, __source: {
fileName: _jsxFileName,
lineNumber: 122
}
},
React.createElement(
Text,
{ style: textStyles, __source: {
fileName: _jsxFileName,
lineNumber: 123
}
},
formattedTitle
)
)
);
}
}]);
return Button;
}(React.Component);
Button.propTypes = {
title: React.PropTypes.string.isRequired,
accessibilityLabel: React.PropTypes.string,
color: ColorPropType,
disabled: React.PropTypes.bool,
onPress: React.PropTypes.func.isRequired,
testID: React.PropTypes.string
};
var defaultBlue = '#2196F3';
if (Platform.OS === 'ios') {
defaultBlue = '#0C42FD';
}
var styles = StyleSheet.create({
button: Platform.select({
ios: {},
android: {
elevation: 4,
backgroundColor: defaultBlue,
borderRadius: 2
}
}),
text: Platform.select({
ios: {
color: defaultBlue,
textAlign: 'center',
padding: 8,
fontSize: 18
},
android: {
textAlign: 'center',
color: 'white',
padding: 8,
fontWeight: '500'
}
}),
buttonDisabled: Platform.select({
ios: {},
android: {
elevation: 0,
backgroundColor: '#dfdfdf'
}
}),
textDisabled: Platform.select({
ios: {
color: '#cdcdcd'
},
android: {
color: '#a1a1a1'
}
})
});
module.exports = Button;
}, 209, null, "Button");
__d(/* Text */function(global, require, module, exports) {
'use strict';
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/node_modules/react-native/Libraries/Text/Text.js';
var ColorPropType = require(71 ); // 71 = ColorPropType
var EdgeInsetsPropType = require(147 ); // 147 = EdgeInsetsPropType
var NativeMethodsMixin = require(73 ); // 73 = NativeMethodsMixin
var Platform = require(79 ); // 79 = Platform
var React = require(126 ); // 126 = React
var ReactNativeViewAttributes = require(152 ); // 152 = ReactNativeViewAttributes
var StyleSheetPropType = require(153 ); // 153 = StyleSheetPropType
var TextStylePropTypes = require(139 ); // 139 = TextStylePropTypes
var Touchable = require(211 ); // 211 = Touchable
var processColor = require(121 ); // 121 = processColor
var createReactNativeComponentClass = require(157 ); // 157 = createReactNativeComponentClass
var mergeFast = require(216 ); // 216 = mergeFast
var PropTypes = React.PropTypes;
var stylePropType = StyleSheetPropType(TextStylePropTypes);
var viewConfig = {
validAttributes: mergeFast(ReactNativeViewAttributes.UIView, {
isHighlighted: true,
numberOfLines: true,
ellipsizeMode: true,
allowFontScaling: true,
selectable: true,
selectionColor: true,
adjustsFontSizeToFit: true,
minimumFontScale: true,
textBreakStrategy: true
}),
uiViewClassName: 'RCTText'
};
var Text = React.createClass({
displayName: 'Text',
propTypes: {
ellipsizeMode: PropTypes.oneOf(['head', 'middle', 'tail', 'clip']),
numberOfLines: PropTypes.number,
textBreakStrategy: PropTypes.oneOf(['simple', 'highQuality', 'balanced']),
onLayout: PropTypes.func,
onPress: PropTypes.func,
onLongPress: PropTypes.func,
pressRetentionOffset: EdgeInsetsPropType,
selectable: PropTypes.bool,
selectionColor: ColorPropType,
suppressHighlighting: PropTypes.bool,
style: stylePropType,
testID: PropTypes.string,
allowFontScaling: PropTypes.bool,
accessible: PropTypes.bool,
adjustsFontSizeToFit: PropTypes.bool,
minimumFontScale: PropTypes.number
},
getDefaultProps: function getDefaultProps() {
return {
accessible: true,
allowFontScaling: true,
ellipsizeMode: 'tail'
};
},
getInitialState: function getInitialState() {
return mergeFast(Touchable.Mixin.touchableGetInitialState(), {
isHighlighted: false
});
},
mixins: [NativeMethodsMixin],
viewConfig: viewConfig,
getChildContext: function getChildContext() {
return { isInAParentText: true };
},
childContextTypes: {
isInAParentText: PropTypes.bool
},
contextTypes: {
isInAParentText: PropTypes.bool
},
_handlers: null,
_hasPressHandler: function _hasPressHandler() {
return !!this.props.onPress || !!this.props.onLongPress;
},
touchableHandleActivePressIn: null,
touchableHandleActivePressOut: null,
touchableHandlePress: null,
touchableHandleLongPress: null,
touchableGetPressRectOffset: null,
render: function render() {
var _this = this;
var newProps = this.props;
if (this.props.onStartShouldSetResponder || this._hasPressHandler()) {
if (!this._handlers) {
this._handlers = {
onStartShouldSetResponder: function onStartShouldSetResponder() {
var shouldSetFromProps = _this.props.onStartShouldSetResponder && _this.props.onStartShouldSetResponder();
var setResponder = shouldSetFromProps || _this._hasPressHandler();
if (setResponder && !_this.touchableHandleActivePressIn) {
for (var key in Touchable.Mixin) {
if (typeof Touchable.Mixin[key] === 'function') {
_this[key] = Touchable.Mixin[key].bind(_this);
}
}
_this.touchableHandleActivePressIn = function () {
if (_this.props.suppressHighlighting || !_this._hasPressHandler()) {
return;
}
_this.setState({
isHighlighted: true
});
};
_this.touchableHandleActivePressOut = function () {
if (_this.props.suppressHighlighting || !_this._hasPressHandler()) {
return;
}
_this.setState({
isHighlighted: false
});
};
_this.touchableHandlePress = function (e) {
_this.props.onPress && _this.props.onPress(e);
};
_this.touchableHandleLongPress = function (e) {
_this.props.onLongPress && _this.props.onLongPress(e);
};
_this.touchableGetPressRectOffset = function () {
return this.props.pressRetentionOffset || PRESS_RECT_OFFSET;
};
}
return setResponder;
},
onResponderGrant: function (e, dispatchID) {
this.touchableHandleResponderGrant(e, dispatchID);
this.props.onResponderGrant && this.props.onResponderGrant.apply(this, arguments);
}.bind(this),
onResponderMove: function (e) {
this.touchableHandleResponderMove(e);
this.props.onResponderMove && this.props.onResponderMove.apply(this, arguments);
}.bind(this),
onResponderRelease: function (e) {
this.touchableHandleResponderRelease(e);
this.props.onResponderRelease && this.props.onResponderRelease.apply(this, arguments);
}.bind(this),
onResponderTerminate: function (e) {
this.touchableHandleResponderTerminate(e);
this.props.onResponderTerminate && this.props.onResponderTerminate.apply(this, arguments);
}.bind(this),
onResponderTerminationRequest: function () {
var allowTermination = this.touchableHandleResponderTerminationRequest();
if (allowTermination && this.props.onResponderTerminationRequest) {
allowTermination = this.props.onResponderTerminationRequest.apply(this, arguments);
}
return allowTermination;
}.bind(this)
};
}
newProps = babelHelpers.extends({}, this.props, this._handlers, {
isHighlighted: this.state.isHighlighted
});
}
if (newProps.selectionColor != null) {
newProps = babelHelpers.extends({}, newProps, {
selectionColor: processColor(newProps.selectionColor)
});
}
if (Touchable.TOUCH_TARGET_DEBUG && newProps.onPress) {
newProps = babelHelpers.extends({}, newProps, {
style: [this.props.style, { color: 'magenta' }]
});
}
if (this.context.isInAParentText) {
return React.createElement(RCTVirtualText, babelHelpers.extends({}, newProps, {
__source: {
fileName: _jsxFileName,
lineNumber: 342
}
}));
} else {
return React.createElement(RCTText, babelHelpers.extends({}, newProps, {
__source: {
fileName: _jsxFileName,
lineNumber: 344
}
}));
}
}
});
var PRESS_RECT_OFFSET = { top: 20, left: 20, right: 20, bottom: 30 };
var RCTText = createReactNativeComponentClass(viewConfig);
var RCTVirtualText = RCTText;
if (Platform.OS === 'android') {
RCTVirtualText = createReactNativeComponentClass({
validAttributes: mergeFast(ReactNativeViewAttributes.UIView, {
isHighlighted: true
}),
uiViewClassName: 'RCTVirtualText'
});
}
module.exports = Text;
}, 210, null, "Text");
__d(/* Touchable */function(global, require, module, exports) {
'use strict';
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/node_modules/react-native/Libraries/Components/Touchable/Touchable.js';
var BoundingDimensions = require(212 ); // 212 = BoundingDimensions
var Platform = require(79 ); // 79 = Platform
var Position = require(213 ); // 213 = Position
var React = require(126 ); // 126 = React
var TVEventHandler = require(214 ); // 214 = TVEventHandler
var TouchEventUtils = require(215 ); // 215 = fbjs/lib/TouchEventUtils
var UIManager = require(123 ); // 123 = UIManager
var View = require(146 ); // 146 = View
var findNodeHandle = require(124 ); // 124 = findNodeHandle
var keyMirror = require(133 ); // 133 = fbjs/lib/keyMirror
var normalizeColor = require(72 ); // 72 = normalizeColor
var States = keyMirror({
NOT_RESPONDER: null,
RESPONDER_INACTIVE_PRESS_IN: null,
RESPONDER_INACTIVE_PRESS_OUT: null,
RESPONDER_ACTIVE_PRESS_IN: null,
RESPONDER_ACTIVE_PRESS_OUT: null,
RESPONDER_ACTIVE_LONG_PRESS_IN: null,
RESPONDER_ACTIVE_LONG_PRESS_OUT: null,
ERROR: null
});
var IsActive = {
RESPONDER_ACTIVE_PRESS_OUT: true,
RESPONDER_ACTIVE_PRESS_IN: true
};
var IsPressingIn = {
RESPONDER_INACTIVE_PRESS_IN: true,
RESPONDER_ACTIVE_PRESS_IN: true,
RESPONDER_ACTIVE_LONG_PRESS_IN: true
};
var IsLongPressingIn = {
RESPONDER_ACTIVE_LONG_PRESS_IN: true
};
var Signals = keyMirror({
DELAY: null,
RESPONDER_GRANT: null,
RESPONDER_RELEASE: null,
RESPONDER_TERMINATED: null,
ENTER_PRESS_RECT: null,
LEAVE_PRESS_RECT: null,
LONG_PRESS_DETECTED: null
});
var Transitions = {
NOT_RESPONDER: {
DELAY: States.ERROR,
RESPONDER_GRANT: States.RESPONDER_INACTIVE_PRESS_IN,
RESPONDER_RELEASE: States.ERROR,
RESPONDER_TERMINATED: States.ERROR,
ENTER_PRESS_RECT: States.ERROR,
LEAVE_PRESS_RECT: States.ERROR,
LONG_PRESS_DETECTED: States.ERROR
},
RESPONDER_INACTIVE_PRESS_IN: {
DELAY: States.RESPONDER_ACTIVE_PRESS_IN,
RESPONDER_GRANT: States.ERROR,
RESPONDER_RELEASE: States.NOT_RESPONDER,
RESPONDER_TERMINATED: States.NOT_RESPONDER,
ENTER_PRESS_RECT: States.RESPONDER_INACTIVE_PRESS_IN,
LEAVE_PRESS_RECT: States.RESPONDER_INACTIVE_PRESS_OUT,
LONG_PRESS_DETECTED: States.ERROR
},
RESPONDER_INACTIVE_PRESS_OUT: {
DELAY: States.RESPONDER_ACTIVE_PRESS_OUT,
RESPONDER_GRANT: States.ERROR,
RESPONDER_RELEASE: States.NOT_RESPONDER,
RESPONDER_TERMINATED: States.NOT_RESPONDER,
ENTER_PRESS_RECT: States.RESPONDER_INACTIVE_PRESS_IN,
LEAVE_PRESS_RECT: States.RESPONDER_INACTIVE_PRESS_OUT,
LONG_PRESS_DETECTED: States.ERROR
},
RESPONDER_ACTIVE_PRESS_IN: {
DELAY: States.ERROR,
RESPONDER_GRANT: States.ERROR,
RESPONDER_RELEASE: States.NOT_RESPONDER,
RESPONDER_TERMINATED: States.NOT_RESPONDER,
ENTER_PRESS_RECT: States.RESPONDER_ACTIVE_PRESS_IN,
LEAVE_PRESS_RECT: States.RESPONDER_ACTIVE_PRESS_OUT,
LONG_PRESS_DETECTED: States.RESPONDER_ACTIVE_LONG_PRESS_IN
},
RESPONDER_ACTIVE_PRESS_OUT: {
DELAY: States.ERROR,
RESPONDER_GRANT: States.ERROR,
RESPONDER_RELEASE: States.NOT_RESPONDER,
RESPONDER_TERMINATED: States.NOT_RESPONDER,
ENTER_PRESS_RECT: States.RESPONDER_ACTIVE_PRESS_IN,
LEAVE_PRESS_RECT: States.RESPONDER_ACTIVE_PRESS_OUT,
LONG_PRESS_DETECTED: States.ERROR
},
RESPONDER_ACTIVE_LONG_PRESS_IN: {
DELAY: States.ERROR,
RESPONDER_GRANT: States.ERROR,
RESPONDER_RELEASE: States.NOT_RESPONDER,
RESPONDER_TERMINATED: States.NOT_RESPONDER,
ENTER_PRESS_RECT: States.RESPONDER_ACTIVE_LONG_PRESS_IN,
LEAVE_PRESS_RECT: States.RESPONDER_ACTIVE_LONG_PRESS_OUT,
LONG_PRESS_DETECTED: States.RESPONDER_ACTIVE_LONG_PRESS_IN
},
RESPONDER_ACTIVE_LONG_PRESS_OUT: {
DELAY: States.ERROR,
RESPONDER_GRANT: States.ERROR,
RESPONDER_RELEASE: States.NOT_RESPONDER,
RESPONDER_TERMINATED: States.NOT_RESPONDER,
ENTER_PRESS_RECT: States.RESPONDER_ACTIVE_LONG_PRESS_IN,
LEAVE_PRESS_RECT: States.RESPONDER_ACTIVE_LONG_PRESS_OUT,
LONG_PRESS_DETECTED: States.ERROR
},
error: {
DELAY: States.NOT_RESPONDER,
RESPONDER_GRANT: States.RESPONDER_INACTIVE_PRESS_IN,
RESPONDER_RELEASE: States.NOT_RESPONDER,
RESPONDER_TERMINATED: States.NOT_RESPONDER,
ENTER_PRESS_RECT: States.NOT_RESPONDER,
LEAVE_PRESS_RECT: States.NOT_RESPONDER,
LONG_PRESS_DETECTED: States.NOT_RESPONDER
}
};
var HIGHLIGHT_DELAY_MS = 130;
var PRESS_EXPAND_PX = 20;
var LONG_PRESS_THRESHOLD = 500;
var LONG_PRESS_DELAY_MS = LONG_PRESS_THRESHOLD - HIGHLIGHT_DELAY_MS;
var LONG_PRESS_ALLOWED_MOVEMENT = 10;
var TouchableMixin = {
componentDidMount: function componentDidMount() {
if (!Platform.isTVOS) {
return;
}
this._tvEventHandler = new TVEventHandler();
this._tvEventHandler.enable(this, function (cmp, evt) {
var myTag = findNodeHandle(cmp);
evt.dispatchConfig = {};
if (myTag === evt.tag) {
if (evt.eventType === 'focus') {
cmp.touchableHandleActivePressIn && cmp.touchableHandleActivePressIn(evt);
} else if (evt.eventType === 'blur') {
cmp.touchableHandleActivePressOut && cmp.touchableHandleActivePressOut(evt);
} else if (evt.eventType === 'select') {
cmp.touchableHandlePress && cmp.touchableHandlePress(evt);
}
}
});
},
componentWillUnmount: function componentWillUnmount() {
if (this._tvEventHandler) {
this._tvEventHandler.disable();
delete this._tvEventHandler;
}
this.touchableDelayTimeout && clearTimeout(this.touchableDelayTimeout);
this.longPressDelayTimeout && clearTimeout(this.longPressDelayTimeout);
this.pressOutDelayTimeout && clearTimeout(this.pressOutDelayTimeout);
},
touchableGetInitialState: function touchableGetInitialState() {
return {
touchable: { touchState: undefined, responderID: null }
};
},
touchableHandleResponderTerminationRequest: function touchableHandleResponderTerminationRequest() {
return !this.props.rejectResponderTermination;
},
touchableHandleStartShouldSetResponder: function touchableHandleStartShouldSetResponder() {
return !this.props.disabled;
},
touchableLongPressCancelsPress: function touchableLongPressCancelsPress() {
return true;
},
touchableHandleResponderGrant: function touchableHandleResponderGrant(e) {
var dispatchID = e.currentTarget;
e.persist();
this.pressOutDelayTimeout && clearTimeout(this.pressOutDelayTimeout);
this.pressOutDelayTimeout = null;
this.state.touchable.touchState = States.NOT_RESPONDER;
this.state.touchable.responderID = dispatchID;
this._receiveSignal(Signals.RESPONDER_GRANT, e);
var delayMS = this.touchableGetHighlightDelayMS !== undefined ? Math.max(this.touchableGetHighlightDelayMS(), 0) : HIGHLIGHT_DELAY_MS;
delayMS = isNaN(delayMS) ? HIGHLIGHT_DELAY_MS : delayMS;
if (delayMS !== 0) {
this.touchableDelayTimeout = setTimeout(this._handleDelay.bind(this, e), delayMS);
} else {
this._handleDelay(e);
}
var longDelayMS = this.touchableGetLongPressDelayMS !== undefined ? Math.max(this.touchableGetLongPressDelayMS(), 10) : LONG_PRESS_DELAY_MS;
longDelayMS = isNaN(longDelayMS) ? LONG_PRESS_DELAY_MS : longDelayMS;
this.longPressDelayTimeout = setTimeout(this._handleLongDelay.bind(this, e), longDelayMS + delayMS);
},
touchableHandleResponderRelease: function touchableHandleResponderRelease(e) {
this._receiveSignal(Signals.RESPONDER_RELEASE, e);
},
touchableHandleResponderTerminate: function touchableHandleResponderTerminate(e) {
this._receiveSignal(Signals.RESPONDER_TERMINATED, e);
},
touchableHandleResponderMove: function touchableHandleResponderMove(e) {
if (this.state.touchable.touchState === States.RESPONDER_INACTIVE_PRESS_IN) {
return;
}
if (!this.state.touchable.positionOnActivate) {
return;
}
var positionOnActivate = this.state.touchable.positionOnActivate;
var dimensionsOnActivate = this.state.touchable.dimensionsOnActivate;
var pressRectOffset = this.touchableGetPressRectOffset ? this.touchableGetPressRectOffset() : {
left: PRESS_EXPAND_PX,
right: PRESS_EXPAND_PX,
top: PRESS_EXPAND_PX,
bottom: PRESS_EXPAND_PX
};
var pressExpandLeft = pressRectOffset.left;
var pressExpandTop = pressRectOffset.top;
var pressExpandRight = pressRectOffset.right;
var pressExpandBottom = pressRectOffset.bottom;
var hitSlop = this.touchableGetHitSlop ? this.touchableGetHitSlop() : null;
if (hitSlop) {
pressExpandLeft += hitSlop.left;
pressExpandTop += hitSlop.top;
pressExpandRight += hitSlop.right;
pressExpandBottom += hitSlop.bottom;
}
var touch = TouchEventUtils.extractSingleTouch(e.nativeEvent);
var pageX = touch && touch.pageX;
var pageY = touch && touch.pageY;
if (this.pressInLocation) {
var movedDistance = this._getDistanceBetweenPoints(pageX, pageY, this.pressInLocation.pageX, this.pressInLocation.pageY);
if (movedDistance > LONG_PRESS_ALLOWED_MOVEMENT) {
this._cancelLongPressDelayTimeout();
}
}
var isTouchWithinActive = pageX > positionOnActivate.left - pressExpandLeft && pageY > positionOnActivate.top - pressExpandTop && pageX < positionOnActivate.left + dimensionsOnActivate.width + pressExpandRight && pageY < positionOnActivate.top + dimensionsOnActivate.height + pressExpandBottom;
if (isTouchWithinActive) {
this._receiveSignal(Signals.ENTER_PRESS_RECT, e);
var curState = this.state.touchable.touchState;
if (curState === States.RESPONDER_INACTIVE_PRESS_IN) {
this._cancelLongPressDelayTimeout();
}
} else {
this._cancelLongPressDelayTimeout();
this._receiveSignal(Signals.LEAVE_PRESS_RECT, e);
}
},
_remeasureMetricsOnActivation: function _remeasureMetricsOnActivation() {
var tag = this.state.touchable.responderID;
if (tag == null) {
return;
}
UIManager.measure(tag, this._handleQueryLayout);
},
_handleQueryLayout: function _handleQueryLayout(l, t, w, h, globalX, globalY) {
this.state.touchable.positionOnActivate && Position.release(this.state.touchable.positionOnActivate);
this.state.touchable.dimensionsOnActivate && BoundingDimensions.release(this.state.touchable.dimensionsOnActivate);
this.state.touchable.positionOnActivate = Position.getPooled(globalX, globalY);
this.state.touchable.dimensionsOnActivate = BoundingDimensions.getPooled(w, h);
},
_handleDelay: function _handleDelay(e) {
this.touchableDelayTimeout = null;
this._receiveSignal(Signals.DELAY, e);
},
_handleLongDelay: function _handleLongDelay(e) {
this.longPressDelayTimeout = null;
var curState = this.state.touchable.touchState;
if (curState !== States.RESPONDER_ACTIVE_PRESS_IN && curState !== States.RESPONDER_ACTIVE_LONG_PRESS_IN) {
console.error('Attempted to transition from state `' + curState + '` to `' + States.RESPONDER_ACTIVE_LONG_PRESS_IN + '`, which is not supported. This is ' + 'most likely due to `Touchable.longPressDelayTimeout` not being cancelled.');
} else {
this._receiveSignal(Signals.LONG_PRESS_DETECTED, e);
}
},
_receiveSignal: function _receiveSignal(signal, e) {
var responderID = this.state.touchable.responderID;
var curState = this.state.touchable.touchState;
var nextState = Transitions[curState] && Transitions[curState][signal];
if (!responderID && signal === Signals.RESPONDER_RELEASE) {
return;
}
if (!nextState) {
throw new Error('Unrecognized signal `' + signal + '` or state `' + curState + '` for Touchable responder `' + responderID + '`');
}
if (nextState === States.ERROR) {
throw new Error('Touchable cannot transition from `' + curState + '` to `' + signal + '` for responder `' + responderID + '`');
}
if (curState !== nextState) {
this._performSideEffectsForTransition(curState, nextState, signal, e);
this.state.touchable.touchState = nextState;
}
},
_cancelLongPressDelayTimeout: function _cancelLongPressDelayTimeout() {
this.longPressDelayTimeout && clearTimeout(this.longPressDelayTimeout);
this.longPressDelayTimeout = null;
},
_isHighlight: function _isHighlight(state) {
return state === States.RESPONDER_ACTIVE_PRESS_IN || state === States.RESPONDER_ACTIVE_LONG_PRESS_IN;
},
_savePressInLocation: function _savePressInLocation(e) {
var touch = TouchEventUtils.extractSingleTouch(e.nativeEvent);
var pageX = touch && touch.pageX;
var pageY = touch && touch.pageY;
var locationX = touch && touch.locationX;
var locationY = touch && touch.locationY;
this.pressInLocation = { pageX: pageX, pageY: pageY, locationX: locationX, locationY: locationY };
},
_getDistanceBetweenPoints: function _getDistanceBetweenPoints(aX, aY, bX, bY) {
var deltaX = aX - bX;
var deltaY = aY - bY;
return Math.sqrt(deltaX * deltaX + deltaY * deltaY);
},
_performSideEffectsForTransition: function _performSideEffectsForTransition(curState, nextState, signal, e) {
var curIsHighlight = this._isHighlight(curState);
var newIsHighlight = this._isHighlight(nextState);
var isFinalSignal = signal === Signals.RESPONDER_TERMINATED || signal === Signals.RESPONDER_RELEASE;
if (isFinalSignal) {
this._cancelLongPressDelayTimeout();
}
if (!IsActive[curState] && IsActive[nextState]) {
this._remeasureMetricsOnActivation();
}
if (IsPressingIn[curState] && signal === Signals.LONG_PRESS_DETECTED) {
this.touchableHandleLongPress && this.touchableHandleLongPress(e);
}
if (newIsHighlight && !curIsHighlight) {
this._startHighlight(e);
} else if (!newIsHighlight && curIsHighlight) {
this._endHighlight(e);
}
if (IsPressingIn[curState] && signal === Signals.RESPONDER_RELEASE) {
var hasLongPressHandler = !!this.props.onLongPress;
var pressIsLongButStillCallOnPress = IsLongPressingIn[curState] && (!hasLongPressHandler || !this.touchableLongPressCancelsPress());
var shouldInvokePress = !IsLongPressingIn[curState] || pressIsLongButStillCallOnPress;
if (shouldInvokePress && this.touchableHandlePress) {
if (!newIsHighlight && !curIsHighlight) {
this._startHighlight(e);
this._endHighlight(e);
}
this.touchableHandlePress(e);
}
}
this.touchableDelayTimeout && clearTimeout(this.touchableDelayTimeout);
this.touchableDelayTimeout = null;
},
_startHighlight: function _startHighlight(e) {
this._savePressInLocation(e);
this.touchableHandleActivePressIn && this.touchableHandleActivePressIn(e);
},
_endHighlight: function _endHighlight(e) {
var _this = this;
if (this.touchableHandleActivePressOut) {
if (this.touchableGetPressOutDelayMS && this.touchableGetPressOutDelayMS()) {
this.pressOutDelayTimeout = setTimeout(function () {
_this.touchableHandleActivePressOut(e);
}, this.touchableGetPressOutDelayMS());
} else {
this.touchableHandleActivePressOut(e);
}
}
}
};
var Touchable = {
Mixin: TouchableMixin,
TOUCH_TARGET_DEBUG: false,
renderDebugView: function renderDebugView(_ref) {
var color = _ref.color,
hitSlop = _ref.hitSlop;
if (!Touchable.TOUCH_TARGET_DEBUG) {
return null;
}
if (!__DEV__) {
throw Error('Touchable.TOUCH_TARGET_DEBUG should not be enabled in prod!');
}
var debugHitSlopStyle = {};
hitSlop = hitSlop || { top: 0, bottom: 0, left: 0, right: 0 };
for (var key in hitSlop) {
debugHitSlopStyle[key] = -hitSlop[key];
}
var hexColor = '#' + ('00000000' + normalizeColor(color).toString(16)).substr(-8);
return React.createElement(View, {
pointerEvents: 'none',
style: babelHelpers.extends({
position: 'absolute',
borderColor: hexColor.slice(0, -2) + '55',
borderWidth: 1,
borderStyle: 'dashed',
backgroundColor: hexColor.slice(0, -2) + '0F' }, debugHitSlopStyle),
__source: {
fileName: _jsxFileName,
lineNumber: 789
}
});
}
};
module.exports = Touchable;
}, 211, null, "Touchable");
__d(/* BoundingDimensions */function(global, require, module, exports) {
'use strict';
var PooledClass = require(47 ); // 47 = react/lib/PooledClass
var twoArgumentPooler = PooledClass.twoArgumentPooler;
function BoundingDimensions(width, height) {
this.width = width;
this.height = height;
}
BoundingDimensions.prototype.destructor = function () {
this.width = null;
this.height = null;
};
BoundingDimensions.getPooledFromElement = function (element) {
return BoundingDimensions.getPooled(element.offsetWidth, element.offsetHeight);
};
PooledClass.addPoolingTo(BoundingDimensions, twoArgumentPooler);
module.exports = BoundingDimensions;
}, 212, null, "BoundingDimensions");
__d(/* Position */function(global, require, module, exports) {
'use strict';
var PooledClass = require(47 ); // 47 = react/lib/PooledClass
var twoArgumentPooler = PooledClass.twoArgumentPooler;
function Position(left, top) {
this.left = left;
this.top = top;
}
Position.prototype.destructor = function () {
this.left = null;
this.top = null;
};
PooledClass.addPoolingTo(Position, twoArgumentPooler);
module.exports = Position;
}, 213, null, "Position");
__d(/* TVEventHandler */function(global, require, module, exports) {
'use strict';
var React = require(126 ); // 126 = React
var TVNavigationEventEmitter = require(80 ).TVNavigationEventEmitter; // 80 = NativeModules
var NativeEventEmitter = require(102 ); // 102 = NativeEventEmitter
function TVEventHandler() {
this.__nativeTVNavigationEventListener = null;
this.__nativeTVNavigationEventEmitter = null;
}
TVEventHandler.prototype.enable = function (component, callback) {
if (!TVNavigationEventEmitter) {
return;
}
this.__nativeTVNavigationEventEmitter = new NativeEventEmitter(TVNavigationEventEmitter);
this.__nativeTVNavigationEventListener = this.__nativeTVNavigationEventEmitter.addListener('onTVNavEvent', function (data) {
if (callback) {
callback(component, data);
}
});
};
TVEventHandler.prototype.disable = function () {
if (this.__nativeTVNavigationEventListener) {
this.__nativeTVNavigationEventListener.remove();
delete this.__nativeTVNavigationEventListener;
}
if (this.__nativeTVNavigationEventEmitter) {
delete this.__nativeTVNavigationEventEmitter;
}
};
module.exports = TVEventHandler;
}, 214, null, "TVEventHandler");
__d(/* fbjs/lib/TouchEventUtils.js */function(global, require, module, exports) {"use strict";
var TouchEventUtils = {
extractSingleTouch: function extractSingleTouch(nativeEvent) {
var touches = nativeEvent.touches;
var changedTouches = nativeEvent.changedTouches;
var hasTouches = touches && touches.length > 0;
var hasChangedTouches = changedTouches && changedTouches.length > 0;
return !hasTouches && hasChangedTouches ? changedTouches[0] : hasTouches ? touches[0] : nativeEvent;
}
};
module.exports = TouchEventUtils;
}, 215, null, "fbjs/lib/TouchEventUtils.js");
__d(/* mergeFast */function(global, require, module, exports) {
'use strict';
var mergeFast = function mergeFast(one, two) {
var ret = {};
for (var keyOne in one) {
ret[keyOne] = one[keyOne];
}
for (var keyTwo in two) {
ret[keyTwo] = two[keyTwo];
}
return ret;
};
module.exports = mergeFast;
}, 216, null, "mergeFast");
__d(/* TouchableNativeFeedback */function(global, require, module, exports) {
'use strict';
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/node_modules/react-native/Libraries/Components/Touchable/TouchableNativeFeedback.ios.js';
var React = require(126 ); // 126 = React
var StyleSheet = require(127 ); // 127 = StyleSheet
var Text = require(210 ); // 210 = Text
var View = require(146 ); // 146 = View
var DummyTouchableNativeFeedback = function (_React$Component) {
babelHelpers.inherits(DummyTouchableNativeFeedback, _React$Component);
function DummyTouchableNativeFeedback() {
babelHelpers.classCallCheck(this, DummyTouchableNativeFeedback);
return babelHelpers.possibleConstructorReturn(this, (DummyTouchableNativeFeedback.__proto__ || Object.getPrototypeOf(DummyTouchableNativeFeedback)).apply(this, arguments));
}
babelHelpers.createClass(DummyTouchableNativeFeedback, [{
key: 'render',
value: function render() {
return React.createElement(
View,
{ style: [styles.container, this.props.style], __source: {
fileName: _jsxFileName,
lineNumber: 22
}
},
React.createElement(
Text,
{ style: styles.info, __source: {
fileName: _jsxFileName,
lineNumber: 23
}
},
'TouchableNativeFeedback is not supported on this platform!'
)
);
}
}]);
return DummyTouchableNativeFeedback;
}(React.Component);
var styles = StyleSheet.create({
container: {
height: 100,
width: 300,
backgroundColor: '#ffbcbc',
borderWidth: 1,
borderColor: 'red',
alignItems: 'center',
justifyContent: 'center',
margin: 10
},
info: {
color: '#333333',
margin: 20
}
});
module.exports = DummyTouchableNativeFeedback;
}, 217, null, "TouchableNativeFeedback");
__d(/* TouchableOpacity */function(global, require, module, exports) {
'use strict';
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/node_modules/react-native/Libraries/Components/Touchable/TouchableOpacity.js';
var Animated = require(219 ); // 219 = Animated
var Easing = require(235 ); // 235 = Easing
var NativeMethodsMixin = require(73 ); // 73 = NativeMethodsMixin
var React = require(126 ); // 126 = React
var TimerMixin = require(294 ); // 294 = react-timer-mixin
var Touchable = require(211 ); // 211 = Touchable
var TouchableWithoutFeedback = require(295 ); // 295 = TouchableWithoutFeedback
var ensurePositiveDelayProps = require(296 ); // 296 = ensurePositiveDelayProps
var flattenStyle = require(77 ); // 77 = flattenStyle
var PRESS_RETENTION_OFFSET = { top: 20, left: 20, right: 20, bottom: 30 };
var TouchableOpacity = React.createClass({
displayName: 'TouchableOpacity',
mixins: [TimerMixin, Touchable.Mixin, NativeMethodsMixin],
propTypes: babelHelpers.extends({}, TouchableWithoutFeedback.propTypes, {
activeOpacity: React.PropTypes.number,
focusedOpacity: React.PropTypes.number,
tvParallaxProperties: React.PropTypes.object
}),
getDefaultProps: function getDefaultProps() {
return {
activeOpacity: 0.2,
focusedOpacity: 0.7
};
},
getInitialState: function getInitialState() {
return babelHelpers.extends({}, this.touchableGetInitialState(), {
anim: new Animated.Value(1)
});
},
componentDidMount: function componentDidMount() {
ensurePositiveDelayProps(this.props);
},
componentWillReceiveProps: function componentWillReceiveProps(nextProps) {
ensurePositiveDelayProps(nextProps);
},
setOpacityTo: function setOpacityTo(value, duration) {
Animated.timing(this.state.anim, {
toValue: value,
duration: duration,
easing: Easing.inOut(Easing.quad),
useNativeDriver: true
}).start();
},
touchableHandleActivePressIn: function touchableHandleActivePressIn(e) {
if (e.dispatchConfig.registrationName === 'onResponderGrant') {
this._opacityActive(0);
} else {
this._opacityActive(150);
}
this.props.onPressIn && this.props.onPressIn(e);
},
touchableHandleActivePressOut: function touchableHandleActivePressOut(e) {
this._opacityInactive(250);
this.props.onPressOut && this.props.onPressOut(e);
},
touchableHandlePress: function touchableHandlePress(e) {
this.props.onPress && this.props.onPress(e);
},
touchableHandleLongPress: function touchableHandleLongPress(e) {
this.props.onLongPress && this.props.onLongPress(e);
},
touchableGetPressRectOffset: function touchableGetPressRectOffset() {
return this.props.pressRetentionOffset || PRESS_RETENTION_OFFSET;
},
touchableGetHitSlop: function touchableGetHitSlop() {
return this.props.hitSlop;
},
touchableGetHighlightDelayMS: function touchableGetHighlightDelayMS() {
return this.props.delayPressIn || 0;
},
touchableGetLongPressDelayMS: function touchableGetLongPressDelayMS() {
return this.props.delayLongPress === 0 ? 0 : this.props.delayLongPress || 500;
},
touchableGetPressOutDelayMS: function touchableGetPressOutDelayMS() {
return this.props.delayPressOut;
},
_opacityActive: function _opacityActive(duration) {
this.setOpacityTo(this.props.activeOpacity, duration);
},
_opacityInactive: function _opacityInactive(duration) {
var childStyle = flattenStyle(this.props.style) || {};
this.setOpacityTo(childStyle.opacity === undefined ? 1 : childStyle.opacity, duration);
},
_opacityFocused: function _opacityFocused() {
this.setOpacityTo(this.props.focusedOpacity);
},
render: function render() {
return React.createElement(
Animated.View,
{
accessible: this.props.accessible !== false,
accessibilityLabel: this.props.accessibilityLabel,
accessibilityComponentType: this.props.accessibilityComponentType,
accessibilityTraits: this.props.accessibilityTraits,
style: [this.props.style, { opacity: this.state.anim }],
testID: this.props.testID,
onLayout: this.props.onLayout,
isTVSelectable: true,
tvParallaxProperties: this.props.tvParallaxProperties,
hitSlop: this.props.hitSlop,
onStartShouldSetResponder: this.touchableHandleStartShouldSetResponder,
onResponderTerminationRequest: this.touchableHandleResponderTerminationRequest,
onResponderGrant: this.touchableHandleResponderGrant,
onResponderMove: this.touchableHandleResponderMove,
onResponderRelease: this.touchableHandleResponderRelease,
onResponderTerminate: this.touchableHandleResponderTerminate, __source: {
fileName: _jsxFileName,
lineNumber: 171
}
},
this.props.children,
Touchable.renderDebugView({ color: 'cyan', hitSlop: this.props.hitSlop })
);
}
});
module.exports = TouchableOpacity;
}, 218, null, "TouchableOpacity");
__d(/* Animated */function(global, require, module, exports) {
'use strict';
var AnimatedImplementation = require(220 ); // 220 = AnimatedImplementation
var Image = require(237 ); // 237 = Image
var Text = require(210 ); // 210 = Text
var View = require(146 ); // 146 = View
var ScrollView = require(239 ); // 239 = ScrollView
module.exports = babelHelpers.extends({}, AnimatedImplementation, {
View: AnimatedImplementation.createAnimatedComponent(View),
Text: AnimatedImplementation.createAnimatedComponent(Text),
Image: AnimatedImplementation.createAnimatedComponent(Image),
ScrollView: AnimatedImplementation.createAnimatedComponent(ScrollView)
});
}, 219, null, "Animated");
__d(/* AnimatedImplementation */function(global, require, module, exports) {
'use strict';
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/node_modules/react-native/Libraries/Animated/src/AnimatedImplementation.js';
var InteractionManager = require(221 ); // 221 = InteractionManager
var Interpolation = require(230 ); // 230 = Interpolation
var NativeAnimatedHelper = require(231 ); // 231 = NativeAnimatedHelper
var React = require(126 ); // 126 = React
var Set = require(222 ); // 222 = Set
var SpringConfig = require(232 ); // 232 = SpringConfig
var ViewStylePropTypes = require(140 ); // 140 = ViewStylePropTypes
var findNodeHandle = require(124 ); // 124 = findNodeHandle
var flattenStyle = require(77 ); // 77 = flattenStyle
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var requestAnimationFrame = require(233 ); // 233 = fbjs/lib/requestAnimationFrame
var NativeAnimatedAPI = NativeAnimatedHelper.API;
var warnedMissingNativeAnimated = false;
function shouldUseNativeDriver(config) {
if (config.useNativeDriver && !NativeAnimatedHelper.isNativeAnimatedAvailable()) {
if (!warnedMissingNativeAnimated) {
console.warn('Animated: `useNativeDriver` is not supported because the native ' + 'animated module is missing. Falling back to JS-based animation. To ' + 'resolve this, add `RCTAnimation` module to this app, or remove ' + '`useNativeDriver`. ' + 'More info: https://github.com/facebook/react-native/issues/11094#issuecomment-263240420');
warnedMissingNativeAnimated = true;
}
return false;
}
return config.useNativeDriver || false;
}
var Animated = function () {
function Animated() {
babelHelpers.classCallCheck(this, Animated);
}
babelHelpers.createClass(Animated, [{
key: '__attach',
value: function __attach() {}
}, {
key: '__detach',
value: function __detach() {
if (this.__isNative && this.__nativeTag != null) {
NativeAnimatedAPI.dropAnimatedNode(this.__nativeTag);
this.__nativeTag = undefined;
}
}
}, {
key: '__getValue',
value: function __getValue() {}
}, {
key: '__getAnimatedValue',
value: function __getAnimatedValue() {
return this.__getValue();
}
}, {
key: '__addChild',
value: function __addChild(child) {}
}, {
key: '__removeChild',
value: function __removeChild(child) {}
}, {
key: '__getChildren',
value: function __getChildren() {
return [];
}
}, {
key: '__makeNative',
value: function __makeNative() {
if (!this.__isNative) {
throw new Error('This node cannot be made a "native" animated node');
}
}
}, {
key: '__getNativeTag',
value: function __getNativeTag() {
NativeAnimatedHelper.assertNativeAnimatedModule();
invariant(this.__isNative, 'Attempt to get native tag from node not marked as "native"');
if (this.__nativeTag == null) {
var nativeTag = NativeAnimatedHelper.generateNewNodeTag();
NativeAnimatedAPI.createAnimatedNode(nativeTag, this.__getNativeConfig());
this.__nativeTag = nativeTag;
}
return this.__nativeTag;
}
}, {
key: '__getNativeConfig',
value: function __getNativeConfig() {
throw new Error('This JS animated node type cannot be used as native animated node');
}
}, {
key: 'toJSON',
value: function toJSON() {
return this.__getValue();
}
}]);
return Animated;
}();
var Animation = function () {
function Animation() {
babelHelpers.classCallCheck(this, Animation);
}
babelHelpers.createClass(Animation, [{
key: 'start',
value: function start(fromValue, onUpdate, onEnd, previousAnimation, animatedValue) {}
}, {
key: 'stop',
value: function stop() {
if (this.__nativeId) {
NativeAnimatedAPI.stopAnimation(this.__nativeId);
}
}
}, {
key: '__getNativeAnimationConfig',
value: function __getNativeAnimationConfig() {
throw new Error('This animation type cannot be offloaded to native');
}
}, {
key: '__debouncedOnEnd',
value: function __debouncedOnEnd(result) {
var onEnd = this.__onEnd;
this.__onEnd = null;
onEnd && onEnd(result);
}
}, {
key: '__startNativeAnimation',
value: function __startNativeAnimation(animatedValue) {
animatedValue.__makeNative();
this.__nativeId = NativeAnimatedHelper.generateNewAnimationId();
NativeAnimatedAPI.startAnimatingNode(this.__nativeId, animatedValue.__getNativeTag(), this.__getNativeAnimationConfig(), this.__debouncedOnEnd.bind(this));
}
}]);
return Animation;
}();
var AnimatedWithChildren = function (_Animated) {
babelHelpers.inherits(AnimatedWithChildren, _Animated);
function AnimatedWithChildren() {
babelHelpers.classCallCheck(this, AnimatedWithChildren);
var _this = babelHelpers.possibleConstructorReturn(this, (AnimatedWithChildren.__proto__ || Object.getPrototypeOf(AnimatedWithChildren)).call(this));
_this._children = [];
return _this;
}
babelHelpers.createClass(AnimatedWithChildren, [{
key: '__makeNative',
value: function __makeNative() {
if (!this.__isNative) {
this.__isNative = true;
for (var _iterator = this._children, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[typeof Symbol === 'function' ? Symbol.iterator : '@@iterator']();;) {
var _ref;
if (_isArray) {
if (_i >= _iterator.length) break;
_ref = _iterator[_i++];
} else {
_i = _iterator.next();
if (_i.done) break;
_ref = _i.value;
}
var child = _ref;
child.__makeNative();
NativeAnimatedAPI.connectAnimatedNodes(this.__getNativeTag(), child.__getNativeTag());
}
}
}
}, {
key: '__addChild',
value: function __addChild(child) {
if (this._children.length === 0) {
this.__attach();
}
this._children.push(child);
if (this.__isNative) {
child.__makeNative();
NativeAnimatedAPI.connectAnimatedNodes(this.__getNativeTag(), child.__getNativeTag());
}
}
}, {
key: '__removeChild',
value: function __removeChild(child) {
var index = this._children.indexOf(child);
if (index === -1) {
console.warn('Trying to remove a child that doesn\'t exist');
return;
}
if (this.__isNative && child.__isNative) {
NativeAnimatedAPI.disconnectAnimatedNodes(this.__getNativeTag(), child.__getNativeTag());
}
this._children.splice(index, 1);
if (this._children.length === 0) {
this.__detach();
}
}
}, {
key: '__getChildren',
value: function __getChildren() {
return this._children;
}
}]);
return AnimatedWithChildren;
}(Animated);
function _flush(rootNode) {
var animatedStyles = new Set();
function findAnimatedStyles(node) {
if (typeof node.update === 'function') {
animatedStyles.add(node);
} else {
node.__getChildren().forEach(findAnimatedStyles);
}
}
findAnimatedStyles(rootNode);
animatedStyles.forEach(function (animatedStyle) {
return animatedStyle.update();
});
}
var _easeInOut = void 0;
function easeInOut() {
if (!_easeInOut) {
var Easing = require(235 ); // 235 = Easing
_easeInOut = Easing.inOut(Easing.ease);
}
return _easeInOut;
}
var TimingAnimation = function (_Animation) {
babelHelpers.inherits(TimingAnimation, _Animation);
function TimingAnimation(config) {
babelHelpers.classCallCheck(this, TimingAnimation);
var _this2 = babelHelpers.possibleConstructorReturn(this, (TimingAnimation.__proto__ || Object.getPrototypeOf(TimingAnimation)).call(this));
_this2._toValue = config.toValue;
_this2._easing = config.easing !== undefined ? config.easing : easeInOut();
_this2._duration = config.duration !== undefined ? config.duration : 500;
_this2._delay = config.delay !== undefined ? config.delay : 0;
_this2.__isInteraction = config.isInteraction !== undefined ? config.isInteraction : true;
_this2._useNativeDriver = shouldUseNativeDriver(config);
return _this2;
}
babelHelpers.createClass(TimingAnimation, [{
key: '__getNativeAnimationConfig',
value: function __getNativeAnimationConfig() {
var frameDuration = 1000.0 / 60.0;
var frames = [];
for (var dt = 0.0; dt < this._duration; dt += frameDuration) {
frames.push(this._easing(dt / this._duration));
}
frames.push(this._easing(1));
return {
type: 'frames',
frames: frames,
toValue: this._toValue,
delay: this._delay
};
}
}, {
key: 'start',
value: function start(fromValue, onUpdate, onEnd, previousAnimation, animatedValue) {
var _this3 = this;
this.__active = true;
this._fromValue = fromValue;
this._onUpdate = onUpdate;
this.__onEnd = onEnd;
var start = function start() {
if (_this3._duration === 0 && !_this3._useNativeDriver) {
_this3._onUpdate(_this3._toValue);
_this3.__debouncedOnEnd({ finished: true });
} else {
_this3._startTime = Date.now();
if (_this3._useNativeDriver) {
_this3.__startNativeAnimation(animatedValue);
} else {
_this3._animationFrame = requestAnimationFrame(_this3.onUpdate.bind(_this3));
}
}
};
if (this._delay) {
this._timeout = setTimeout(start, this._delay);
} else {
start();
}
}
}, {
key: 'onUpdate',
value: function onUpdate() {
var now = Date.now();
if (now >= this._startTime + this._duration) {
if (this._duration === 0) {
this._onUpdate(this._toValue);
} else {
this._onUpdate(this._fromValue + this._easing(1) * (this._toValue - this._fromValue));
}
this.__debouncedOnEnd({ finished: true });
return;
}
this._onUpdate(this._fromValue + this._easing((now - this._startTime) / this._duration) * (this._toValue - this._fromValue));
if (this.__active) {
this._animationFrame = requestAnimationFrame(this.onUpdate.bind(this));
}
}
}, {
key: 'stop',
value: function stop() {
babelHelpers.get(TimingAnimation.prototype.__proto__ || Object.getPrototypeOf(TimingAnimation.prototype), 'stop', this).call(this);
this.__active = false;
clearTimeout(this._timeout);
global.cancelAnimationFrame(this._animationFrame);
this.__debouncedOnEnd({ finished: false });
}
}]);
return TimingAnimation;
}(Animation);
var DecayAnimation = function (_Animation2) {
babelHelpers.inherits(DecayAnimation, _Animation2);
function DecayAnimation(config) {
babelHelpers.classCallCheck(this, DecayAnimation);
var _this4 = babelHelpers.possibleConstructorReturn(this, (DecayAnimation.__proto__ || Object.getPrototypeOf(DecayAnimation)).call(this));
_this4._deceleration = config.deceleration !== undefined ? config.deceleration : 0.998;
_this4._velocity = config.velocity;
_this4._useNativeDriver = shouldUseNativeDriver(config);
_this4.__isInteraction = config.isInteraction !== undefined ? config.isInteraction : true;
return _this4;
}
babelHelpers.createClass(DecayAnimation, [{
key: '__getNativeAnimationConfig',
value: function __getNativeAnimationConfig() {
return {
type: 'decay',
deceleration: this._deceleration,
velocity: this._velocity
};
}
}, {
key: 'start',
value: function start(fromValue, onUpdate, onEnd, previousAnimation, animatedValue) {
this.__active = true;
this._lastValue = fromValue;
this._fromValue = fromValue;
this._onUpdate = onUpdate;
this.__onEnd = onEnd;
this._startTime = Date.now();
if (this._useNativeDriver) {
this.__startNativeAnimation(animatedValue);
} else {
this._animationFrame = requestAnimationFrame(this.onUpdate.bind(this));
}
}
}, {
key: 'onUpdate',
value: function onUpdate() {
var now = Date.now();
var value = this._fromValue + this._velocity / (1 - this._deceleration) * (1 - Math.exp(-(1 - this._deceleration) * (now - this._startTime)));
this._onUpdate(value);
if (Math.abs(this._lastValue - value) < 0.1) {
this.__debouncedOnEnd({ finished: true });
return;
}
this._lastValue = value;
if (this.__active) {
this._animationFrame = requestAnimationFrame(this.onUpdate.bind(this));
}
}
}, {
key: 'stop',
value: function stop() {
babelHelpers.get(DecayAnimation.prototype.__proto__ || Object.getPrototypeOf(DecayAnimation.prototype), 'stop', this).call(this);
this.__active = false;
global.cancelAnimationFrame(this._animationFrame);
this.__debouncedOnEnd({ finished: false });
}
}]);
return DecayAnimation;
}(Animation);
function withDefault(value, defaultValue) {
if (value === undefined || value === null) {
return defaultValue;
}
return value;
}
var SpringAnimation = function (_Animation3) {
babelHelpers.inherits(SpringAnimation, _Animation3);
function SpringAnimation(config) {
babelHelpers.classCallCheck(this, SpringAnimation);
var _this5 = babelHelpers.possibleConstructorReturn(this, (SpringAnimation.__proto__ || Object.getPrototypeOf(SpringAnimation)).call(this));
_this5._overshootClamping = withDefault(config.overshootClamping, false);
_this5._restDisplacementThreshold = withDefault(config.restDisplacementThreshold, 0.001);
_this5._restSpeedThreshold = withDefault(config.restSpeedThreshold, 0.001);
_this5._initialVelocity = config.velocity;
_this5._lastVelocity = withDefault(config.velocity, 0);
_this5._toValue = config.toValue;
_this5._useNativeDriver = shouldUseNativeDriver(config);
_this5.__isInteraction = config.isInteraction !== undefined ? config.isInteraction : true;
var springConfig;
if (config.bounciness !== undefined || config.speed !== undefined) {
invariant(config.tension === undefined && config.friction === undefined, 'You can only define bounciness/speed or tension/friction but not both');
springConfig = SpringConfig.fromBouncinessAndSpeed(withDefault(config.bounciness, 8), withDefault(config.speed, 12));
} else {
springConfig = SpringConfig.fromOrigamiTensionAndFriction(withDefault(config.tension, 40), withDefault(config.friction, 7));
}
_this5._tension = springConfig.tension;
_this5._friction = springConfig.friction;
return _this5;
}
babelHelpers.createClass(SpringAnimation, [{
key: '__getNativeAnimationConfig',
value: function __getNativeAnimationConfig() {
return {
type: 'spring',
overshootClamping: this._overshootClamping,
restDisplacementThreshold: this._restDisplacementThreshold,
restSpeedThreshold: this._restSpeedThreshold,
tension: this._tension,
friction: this._friction,
initialVelocity: withDefault(this._initialVelocity, this._lastVelocity),
toValue: this._toValue
};
}
}, {
key: 'start',
value: function start(fromValue, onUpdate, onEnd, previousAnimation, animatedValue) {
this.__active = true;
this._startPosition = fromValue;
this._lastPosition = this._startPosition;
this._onUpdate = onUpdate;
this.__onEnd = onEnd;
this._lastTime = Date.now();
if (previousAnimation instanceof SpringAnimation) {
var internalState = previousAnimation.getInternalState();
this._lastPosition = internalState.lastPosition;
this._lastVelocity = internalState.lastVelocity;
this._lastTime = internalState.lastTime;
}
if (this._initialVelocity !== undefined && this._initialVelocity !== null) {
this._lastVelocity = this._initialVelocity;
}
if (this._useNativeDriver) {
this.__startNativeAnimation(animatedValue);
} else {
this.onUpdate();
}
}
}, {
key: 'getInternalState',
value: function getInternalState() {
return {
lastPosition: this._lastPosition,
lastVelocity: this._lastVelocity,
lastTime: this._lastTime
};
}
}, {
key: 'onUpdate',
value: function onUpdate() {
var position = this._lastPosition;
var velocity = this._lastVelocity;
var tempPosition = this._lastPosition;
var tempVelocity = this._lastVelocity;
var MAX_STEPS = 64;
var now = Date.now();
if (now > this._lastTime + MAX_STEPS) {
now = this._lastTime + MAX_STEPS;
}
var TIMESTEP_MSEC = 1;
var numSteps = Math.floor((now - this._lastTime) / TIMESTEP_MSEC);
for (var i = 0; i < numSteps; ++i) {
var step = TIMESTEP_MSEC / 1000;
var aVelocity = velocity;
var aAcceleration = this._tension * (this._toValue - tempPosition) - this._friction * tempVelocity;
var tempPosition = position + aVelocity * step / 2;
var tempVelocity = velocity + aAcceleration * step / 2;
var bVelocity = tempVelocity;
var bAcceleration = this._tension * (this._toValue - tempPosition) - this._friction * tempVelocity;
tempPosition = position + bVelocity * step / 2;
tempVelocity = velocity + bAcceleration * step / 2;
var cVelocity = tempVelocity;
var cAcceleration = this._tension * (this._toValue - tempPosition) - this._friction * tempVelocity;
tempPosition = position + cVelocity * step / 2;
tempVelocity = velocity + cAcceleration * step / 2;
var dVelocity = tempVelocity;
var dAcceleration = this._tension * (this._toValue - tempPosition) - this._friction * tempVelocity;
tempPosition = position + cVelocity * step / 2;
tempVelocity = velocity + cAcceleration * step / 2;
var dxdt = (aVelocity + 2 * (bVelocity + cVelocity) + dVelocity) / 6;
var dvdt = (aAcceleration + 2 * (bAcceleration + cAcceleration) + dAcceleration) / 6;
position += dxdt * step;
velocity += dvdt * step;
}
this._lastTime = now;
this._lastPosition = position;
this._lastVelocity = velocity;
this._onUpdate(position);
if (!this.__active) {
return;
}
var isOvershooting = false;
if (this._overshootClamping && this._tension !== 0) {
if (this._startPosition < this._toValue) {
isOvershooting = position > this._toValue;
} else {
isOvershooting = position < this._toValue;
}
}
var isVelocity = Math.abs(velocity) <= this._restSpeedThreshold;
var isDisplacement = true;
if (this._tension !== 0) {
isDisplacement = Math.abs(this._toValue - position) <= this._restDisplacementThreshold;
}
if (isOvershooting || isVelocity && isDisplacement) {
if (this._tension !== 0) {
this._onUpdate(this._toValue);
}
this.__debouncedOnEnd({ finished: true });
return;
}
this._animationFrame = requestAnimationFrame(this.onUpdate.bind(this));
}
}, {
key: 'stop',
value: function stop() {
babelHelpers.get(SpringAnimation.prototype.__proto__ || Object.getPrototypeOf(SpringAnimation.prototype), 'stop', this).call(this);
this.__active = false;
global.cancelAnimationFrame(this._animationFrame);
this.__debouncedOnEnd({ finished: false });
}
}]);
return SpringAnimation;
}(Animation);
var _uniqueId = 1;
var AnimatedValue = function (_AnimatedWithChildren) {
babelHelpers.inherits(AnimatedValue, _AnimatedWithChildren);
function AnimatedValue(value) {
babelHelpers.classCallCheck(this, AnimatedValue);
var _this6 = babelHelpers.possibleConstructorReturn(this, (AnimatedValue.__proto__ || Object.getPrototypeOf(AnimatedValue)).call(this));
_this6._value = value;
_this6._offset = 0;
_this6._animation = null;
_this6._listeners = {};
return _this6;
}
babelHelpers.createClass(AnimatedValue, [{
key: '__detach',
value: function __detach() {
this.stopAnimation();
babelHelpers.get(AnimatedValue.prototype.__proto__ || Object.getPrototypeOf(AnimatedValue.prototype), '__detach', this).call(this);
}
}, {
key: '__getValue',
value: function __getValue() {
return this._value + this._offset;
}
}, {
key: '__makeNative',
value: function __makeNative() {
babelHelpers.get(AnimatedValue.prototype.__proto__ || Object.getPrototypeOf(AnimatedValue.prototype), '__makeNative', this).call(this);
if (Object.keys(this._listeners).length) {
this._startListeningToNativeValueUpdates();
}
}
}, {
key: 'setValue',
value: function setValue(value) {
if (this._animation) {
this._animation.stop();
this._animation = null;
}
this._updateValue(value, !this.__isNative);
if (this.__isNative) {
NativeAnimatedAPI.setAnimatedNodeValue(this.__getNativeTag(), value);
}
}
}, {
key: 'setOffset',
value: function setOffset(offset) {
this._offset = offset;
if (this.__isNative) {
NativeAnimatedAPI.setAnimatedNodeOffset(this.__getNativeTag(), offset);
}
}
}, {
key: 'flattenOffset',
value: function flattenOffset() {
this._value += this._offset;
this._offset = 0;
if (this.__isNative) {
NativeAnimatedAPI.flattenAnimatedNodeOffset(this.__getNativeTag());
}
}
}, {
key: 'extractOffset',
value: function extractOffset() {
this._offset += this._value;
this._value = 0;
if (this.__isNative) {
NativeAnimatedAPI.extractAnimatedNodeOffset(this.__getNativeTag());
}
}
}, {
key: 'addListener',
value: function addListener(callback) {
var id = String(_uniqueId++);
this._listeners[id] = callback;
if (this.__isNative) {
this._startListeningToNativeValueUpdates();
}
return id;
}
}, {
key: 'removeListener',
value: function removeListener(id) {
delete this._listeners[id];
if (this.__isNative && Object.keys(this._listeners).length === 0) {
this._stopListeningForNativeValueUpdates();
}
}
}, {
key: 'removeAllListeners',
value: function removeAllListeners() {
this._listeners = {};
if (this.__isNative) {
this._stopListeningForNativeValueUpdates();
}
}
}, {
key: '_startListeningToNativeValueUpdates',
value: function _startListeningToNativeValueUpdates() {
var _this7 = this;
if (this.__nativeAnimatedValueListener) {
return;
}
NativeAnimatedAPI.startListeningToAnimatedNodeValue(this.__getNativeTag());
this.__nativeAnimatedValueListener = NativeAnimatedHelper.nativeEventEmitter.addListener('onAnimatedValueUpdate', function (data) {
if (data.tag !== _this7.__getNativeTag()) {
return;
}
_this7._updateValue(data.value, false);
});
}
}, {
key: '_stopListeningForNativeValueUpdates',
value: function _stopListeningForNativeValueUpdates() {
if (!this.__nativeAnimatedValueListener) {
return;
}
this.__nativeAnimatedValueListener.remove();
this.__nativeAnimatedValueListener = null;
NativeAnimatedAPI.stopListeningToAnimatedNodeValue(this.__getNativeTag());
}
}, {
key: 'stopAnimation',
value: function stopAnimation(callback) {
this.stopTracking();
this._animation && this._animation.stop();
this._animation = null;
callback && callback(this.__getValue());
}
}, {
key: 'interpolate',
value: function interpolate(config) {
return new AnimatedInterpolation(this, config);
}
}, {
key: 'animate',
value: function animate(animation, callback) {
var _this8 = this;
var handle = null;
if (animation.__isInteraction) {
handle = InteractionManager.createInteractionHandle();
}
var previousAnimation = this._animation;
this._animation && this._animation.stop();
this._animation = animation;
animation.start(this._value, function (value) {
_this8._updateValue(value, true);
}, function (result) {
_this8._animation = null;
if (handle !== null) {
InteractionManager.clearInteractionHandle(handle);
}
callback && callback(result);
}, previousAnimation, this);
}
}, {
key: 'stopTracking',
value: function stopTracking() {
this._tracking && this._tracking.__detach();
this._tracking = null;
}
}, {
key: 'track',
value: function track(tracking) {
this.stopTracking();
this._tracking = tracking;
}
}, {
key: '_updateValue',
value: function _updateValue(value, flush) {
this._value = value;
if (flush) {
_flush(this);
}
for (var key in this._listeners) {
this._listeners[key]({ value: this.__getValue() });
}
}
}, {
key: '__getNativeConfig',
value: function __getNativeConfig() {
return {
type: 'value',
value: this._value,
offset: this._offset
};
}
}]);
return AnimatedValue;
}(AnimatedWithChildren);
var AnimatedValueXY = function (_AnimatedWithChildren2) {
babelHelpers.inherits(AnimatedValueXY, _AnimatedWithChildren2);
function AnimatedValueXY(valueIn) {
babelHelpers.classCallCheck(this, AnimatedValueXY);
var _this9 = babelHelpers.possibleConstructorReturn(this, (AnimatedValueXY.__proto__ || Object.getPrototypeOf(AnimatedValueXY)).call(this));
var value = valueIn || { x: 0, y: 0 };
if (typeof value.x === 'number' && typeof value.y === 'number') {
_this9.x = new AnimatedValue(value.x);
_this9.y = new AnimatedValue(value.y);
} else {
invariant(value.x instanceof AnimatedValue && value.y instanceof AnimatedValue, 'AnimatedValueXY must be initalized with an object of numbers or ' + 'AnimatedValues.');
_this9.x = value.x;
_this9.y = value.y;
}
_this9._listeners = {};
return _this9;
}
babelHelpers.createClass(AnimatedValueXY, [{
key: 'setValue',
value: function setValue(value) {
this.x.setValue(value.x);
this.y.setValue(value.y);
}
}, {
key: 'setOffset',
value: function setOffset(offset) {
this.x.setOffset(offset.x);
this.y.setOffset(offset.y);
}
}, {
key: 'flattenOffset',
value: function flattenOffset() {
this.x.flattenOffset();
this.y.flattenOffset();
}
}, {
key: '__getValue',
value: function __getValue() {
return {
x: this.x.__getValue(),
y: this.y.__getValue()
};
}
}, {
key: 'stopAnimation',
value: function stopAnimation(callback) {
this.x.stopAnimation();
this.y.stopAnimation();
callback && callback(this.__getValue());
}
}, {
key: 'addListener',
value: function addListener(callback) {
var _this10 = this;
var id = String(_uniqueId++);
var jointCallback = function jointCallback(_ref2) {
var number = _ref2.value;
callback(_this10.__getValue());
};
this._listeners[id] = {
x: this.x.addListener(jointCallback),
y: this.y.addListener(jointCallback)
};
return id;
}
}, {
key: 'removeListener',
value: function removeListener(id) {
this.x.removeListener(this._listeners[id].x);
this.y.removeListener(this._listeners[id].y);
delete this._listeners[id];
}
}, {
key: 'removeAllListeners',
value: function removeAllListeners() {
this.x.removeAllListeners();
this.y.removeAllListeners();
this._listeners = {};
}
}, {
key: 'getLayout',
value: function getLayout() {
return {
left: this.x,
top: this.y
};
}
}, {
key: 'getTranslateTransform',
value: function getTranslateTransform() {
return [{ translateX: this.x }, { translateY: this.y }];
}
}]);
return AnimatedValueXY;
}(AnimatedWithChildren);
var AnimatedInterpolation = function (_AnimatedWithChildren3) {
babelHelpers.inherits(AnimatedInterpolation, _AnimatedWithChildren3);
function AnimatedInterpolation(parent, config) {
babelHelpers.classCallCheck(this, AnimatedInterpolation);
var _this11 = babelHelpers.possibleConstructorReturn(this, (AnimatedInterpolation.__proto__ || Object.getPrototypeOf(AnimatedInterpolation)).call(this));
_this11._parent = parent;
_this11._config = config;
_this11._interpolation = Interpolation.create(config);
return _this11;
}
babelHelpers.createClass(AnimatedInterpolation, [{
key: '__getValue',
value: function __getValue() {
var parentValue = this._parent.__getValue();
invariant(typeof parentValue === 'number', 'Cannot interpolate an input which is not a number.');
return this._interpolation(parentValue);
}
}, {
key: 'interpolate',
value: function interpolate(config) {
return new AnimatedInterpolation(this, config);
}
}, {
key: '__attach',
value: function __attach() {
this._parent.__addChild(this);
}
}, {
key: '__detach',
value: function __detach() {
this._parent.__removeChild(this);
babelHelpers.get(AnimatedInterpolation.prototype.__proto__ || Object.getPrototypeOf(AnimatedInterpolation.prototype), '__detach', this).call(this);
}
}, {
key: '__transformDataType',
value: function __transformDataType(range) {
return range.map(function (value) {
if (typeof value !== 'string') {
return value;
}
if (/deg$/.test(value)) {
var degrees = parseFloat(value, 10) || 0;
var radians = degrees * Math.PI / 180.0;
return radians;
} else {
return parseFloat(value, 10) || 0;
}
});
}
}, {
key: '__getNativeConfig',
value: function __getNativeConfig() {
if (__DEV__) {
NativeAnimatedHelper.validateInterpolation(this._config);
}
return {
inputRange: this._config.inputRange,
outputRange: this.__transformDataType(this._config.outputRange),
extrapolateLeft: this._config.extrapolateLeft || this._config.extrapolate || 'extend',
extrapolateRight: this._config.extrapolateRight || this._config.extrapolate || 'extend',
type: 'interpolation'
};
}
}]);
return AnimatedInterpolation;
}(AnimatedWithChildren);
var AnimatedAddition = function (_AnimatedWithChildren4) {
babelHelpers.inherits(AnimatedAddition, _AnimatedWithChildren4);
function AnimatedAddition(a, b) {
babelHelpers.classCallCheck(this, AnimatedAddition);
var _this12 = babelHelpers.possibleConstructorReturn(this, (AnimatedAddition.__proto__ || Object.getPrototypeOf(AnimatedAddition)).call(this));
_this12._a = typeof a === 'number' ? new AnimatedValue(a) : a;
_this12._b = typeof b === 'number' ? new AnimatedValue(b) : b;
return _this12;
}
babelHelpers.createClass(AnimatedAddition, [{
key: '__makeNative',
value: function __makeNative() {
this._a.__makeNative();
this._b.__makeNative();
babelHelpers.get(AnimatedAddition.prototype.__proto__ || Object.getPrototypeOf(AnimatedAddition.prototype), '__makeNative', this).call(this);
}
}, {
key: '__getValue',
value: function __getValue() {
return this._a.__getValue() + this._b.__getValue();
}
}, {
key: 'interpolate',
value: function interpolate(config) {
return new AnimatedInterpolation(this, config);
}
}, {
key: '__attach',
value: function __attach() {
this._a.__addChild(this);
this._b.__addChild(this);
}
}, {
key: '__detach',
value: function __detach() {
this._a.__removeChild(this);
this._b.__removeChild(this);
babelHelpers.get(AnimatedAddition.prototype.__proto__ || Object.getPrototypeOf(AnimatedAddition.prototype), '__detach', this).call(this);
}
}, {
key: '__getNativeConfig',
value: function __getNativeConfig() {
return {
type: 'addition',
input: [this._a.__getNativeTag(), this._b.__getNativeTag()]
};
}
}]);
return AnimatedAddition;
}(AnimatedWithChildren);
var AnimatedDivision = function (_AnimatedWithChildren5) {
babelHelpers.inherits(AnimatedDivision, _AnimatedWithChildren5);
function AnimatedDivision(a, b) {
babelHelpers.classCallCheck(this, AnimatedDivision);
var _this13 = babelHelpers.possibleConstructorReturn(this, (AnimatedDivision.__proto__ || Object.getPrototypeOf(AnimatedDivision)).call(this));
_this13._a = typeof a === 'number' ? new AnimatedValue(a) : a;
_this13._b = typeof b === 'number' ? new AnimatedValue(b) : b;
return _this13;
}
babelHelpers.createClass(AnimatedDivision, [{
key: '__makeNative',
value: function __makeNative() {
babelHelpers.get(AnimatedDivision.prototype.__proto__ || Object.getPrototypeOf(AnimatedDivision.prototype), '__makeNative', this).call(this);
this._a.__makeNative();
this._b.__makeNative();
}
}, {
key: '__getValue',
value: function __getValue() {
var a = this._a.__getValue();
var b = this._b.__getValue();
if (b === 0) {
console.error('Detected division by zero in AnimatedDivision');
}
return a / b;
}
}, {
key: 'interpolate',
value: function interpolate(config) {
return new AnimatedInterpolation(this, config);
}
}, {
key: '__attach',
value: function __attach() {
this._a.__addChild(this);
this._b.__addChild(this);
}
}, {
key: '__detach',
value: function __detach() {
this._a.__removeChild(this);
this._b.__removeChild(this);
babelHelpers.get(AnimatedDivision.prototype.__proto__ || Object.getPrototypeOf(AnimatedDivision.prototype), '__detach', this).call(this);
}
}, {
key: '__getNativeConfig',
value: function __getNativeConfig() {
return {
type: 'division',
input: [this._a.__getNativeTag(), this._b.__getNativeTag()]
};
}
}]);
return AnimatedDivision;
}(AnimatedWithChildren);
var AnimatedMultiplication = function (_AnimatedWithChildren6) {
babelHelpers.inherits(AnimatedMultiplication, _AnimatedWithChildren6);
function AnimatedMultiplication(a, b) {
babelHelpers.classCallCheck(this, AnimatedMultiplication);
var _this14 = babelHelpers.possibleConstructorReturn(this, (AnimatedMultiplication.__proto__ || Object.getPrototypeOf(AnimatedMultiplication)).call(this));
_this14._a = typeof a === 'number' ? new AnimatedValue(a) : a;
_this14._b = typeof b === 'number' ? new AnimatedValue(b) : b;
return _this14;
}
babelHelpers.createClass(AnimatedMultiplication, [{
key: '__makeNative',
value: function __makeNative() {
babelHelpers.get(AnimatedMultiplication.prototype.__proto__ || Object.getPrototypeOf(AnimatedMultiplication.prototype), '__makeNative', this).call(this);
this._a.__makeNative();
this._b.__makeNative();
}
}, {
key: '__getValue',
value: function __getValue() {
return this._a.__getValue() * this._b.__getValue();
}
}, {
key: 'interpolate',
value: function interpolate(config) {
return new AnimatedInterpolation(this, config);
}
}, {
key: '__attach',
value: function __attach() {
this._a.__addChild(this);
this._b.__addChild(this);
}
}, {
key: '__detach',
value: function __detach() {
this._a.__removeChild(this);
this._b.__removeChild(this);
babelHelpers.get(AnimatedMultiplication.prototype.__proto__ || Object.getPrototypeOf(AnimatedMultiplication.prototype), '__detach', this).call(this);
}
}, {
key: '__getNativeConfig',
value: function __getNativeConfig() {
return {
type: 'multiplication',
input: [this._a.__getNativeTag(), this._b.__getNativeTag()]
};
}
}]);
return AnimatedMultiplication;
}(AnimatedWithChildren);
var AnimatedModulo = function (_AnimatedWithChildren7) {
babelHelpers.inherits(AnimatedModulo, _AnimatedWithChildren7);
function AnimatedModulo(a, modulus) {
babelHelpers.classCallCheck(this, AnimatedModulo);
var _this15 = babelHelpers.possibleConstructorReturn(this, (AnimatedModulo.__proto__ || Object.getPrototypeOf(AnimatedModulo)).call(this));
_this15._a = a;
_this15._modulus = modulus;
return _this15;
}
babelHelpers.createClass(AnimatedModulo, [{
key: '__makeNative',
value: function __makeNative() {
babelHelpers.get(AnimatedModulo.prototype.__proto__ || Object.getPrototypeOf(AnimatedModulo.prototype), '__makeNative', this).call(this);
this._a.__makeNative();
}
}, {
key: '__getValue',
value: function __getValue() {
return (this._a.__getValue() % this._modulus + this._modulus) % this._modulus;
}
}, {
key: 'interpolate',
value: function interpolate(config) {
return new AnimatedInterpolation(this, config);
}
}, {
key: '__attach',
value: function __attach() {
this._a.__addChild(this);
}
}, {
key: '__detach',
value: function __detach() {
this._a.__removeChild(this);
}
}, {
key: '__getNativeConfig',
value: function __getNativeConfig() {
return {
type: 'modulus',
input: this._a.__getNativeTag(),
modulus: this._modulus
};
}
}]);
return AnimatedModulo;
}(AnimatedWithChildren);
var AnimatedDiffClamp = function (_AnimatedWithChildren8) {
babelHelpers.inherits(AnimatedDiffClamp, _AnimatedWithChildren8);
function AnimatedDiffClamp(a, min, max) {
babelHelpers.classCallCheck(this, AnimatedDiffClamp);
var _this16 = babelHelpers.possibleConstructorReturn(this, (AnimatedDiffClamp.__proto__ || Object.getPrototypeOf(AnimatedDiffClamp)).call(this));
_this16._a = a;
_this16._min = min;
_this16._max = max;
_this16._value = _this16._lastValue = _this16._a.__getValue();
return _this16;
}
babelHelpers.createClass(AnimatedDiffClamp, [{
key: '__makeNative',
value: function __makeNative() {
babelHelpers.get(AnimatedDiffClamp.prototype.__proto__ || Object.getPrototypeOf(AnimatedDiffClamp.prototype), '__makeNative', this).call(this);
this._a.__makeNative();
}
}, {
key: 'interpolate',
value: function interpolate(config) {
return new AnimatedInterpolation(this, config);
}
}, {
key: '__getValue',
value: function __getValue() {
var value = this._a.__getValue();
var diff = value - this._lastValue;
this._lastValue = value;
this._value = Math.min(Math.max(this._value + diff, this._min), this._max);
return this._value;
}
}, {
key: '__attach',
value: function __attach() {
this._a.__addChild(this);
}
}, {
key: '__detach',
value: function __detach() {
this._a.__removeChild(this);
}
}, {
key: '__getNativeConfig',
value: function __getNativeConfig() {
return {
type: 'diffclamp',
input: this._a.__getNativeTag(),
min: this._min,
max: this._max
};
}
}]);
return AnimatedDiffClamp;
}(AnimatedWithChildren);
var AnimatedTransform = function (_AnimatedWithChildren9) {
babelHelpers.inherits(AnimatedTransform, _AnimatedWithChildren9);
function AnimatedTransform(transforms) {
babelHelpers.classCallCheck(this, AnimatedTransform);
var _this17 = babelHelpers.possibleConstructorReturn(this, (AnimatedTransform.__proto__ || Object.getPrototypeOf(AnimatedTransform)).call(this));
_this17._transforms = transforms;
return _this17;
}
babelHelpers.createClass(AnimatedTransform, [{
key: '__makeNative',
value: function __makeNative() {
babelHelpers.get(AnimatedTransform.prototype.__proto__ || Object.getPrototypeOf(AnimatedTransform.prototype), '__makeNative', this).call(this);
this._transforms.forEach(function (transform) {
for (var key in transform) {
var value = transform[key];
if (value instanceof Animated) {
value.__makeNative();
}
}
});
}
}, {
key: '__getValue',
value: function __getValue() {
return this._transforms.map(function (transform) {
var result = {};
for (var key in transform) {
var value = transform[key];
if (value instanceof Animated) {
result[key] = value.__getValue();
} else {
result[key] = value;
}
}
return result;
});
}
}, {
key: '__getAnimatedValue',
value: function __getAnimatedValue() {
return this._transforms.map(function (transform) {
var result = {};
for (var key in transform) {
var value = transform[key];
if (value instanceof Animated) {
result[key] = value.__getAnimatedValue();
} else {
result[key] = value;
}
}
return result;
});
}
}, {
key: '__attach',
value: function __attach() {
var _this18 = this;
this._transforms.forEach(function (transform) {
for (var key in transform) {
var value = transform[key];
if (value instanceof Animated) {
value.__addChild(_this18);
}
}
});
}
}, {
key: '__detach',
value: function __detach() {
var _this19 = this;
this._transforms.forEach(function (transform) {
for (var key in transform) {
var value = transform[key];
if (value instanceof Animated) {
value.__removeChild(_this19);
}
}
});
}
}, {
key: '__getNativeConfig',
value: function __getNativeConfig() {
var transConfigs = [];
this._transforms.forEach(function (transform) {
for (var key in transform) {
var value = transform[key];
if (value instanceof Animated) {
transConfigs.push({
type: 'animated',
property: key,
nodeTag: value.__getNativeTag()
});
} else {
transConfigs.push({
type: 'static',
property: key,
value: value
});
}
}
});
NativeAnimatedHelper.validateTransform(transConfigs);
return {
type: 'transform',
transforms: transConfigs
};
}
}]);
return AnimatedTransform;
}(AnimatedWithChildren);
var AnimatedStyle = function (_AnimatedWithChildren10) {
babelHelpers.inherits(AnimatedStyle, _AnimatedWithChildren10);
function AnimatedStyle(style) {
babelHelpers.classCallCheck(this, AnimatedStyle);
var _this20 = babelHelpers.possibleConstructorReturn(this, (AnimatedStyle.__proto__ || Object.getPrototypeOf(AnimatedStyle)).call(this));
style = flattenStyle(style) || {};
if (style.transform) {
style = babelHelpers.extends({}, style, {
transform: new AnimatedTransform(style.transform)
});
}
_this20._style = style;
return _this20;
}
babelHelpers.createClass(AnimatedStyle, [{
key: '__getValue',
value: function __getValue() {
var style = {};
for (var key in this._style) {
var value = this._style[key];
if (value instanceof Animated) {
if (!value.__isNative) {
style[key] = value.__getValue();
}
} else {
style[key] = value;
}
}
return style;
}
}, {
key: '__getAnimatedValue',
value: function __getAnimatedValue() {
var style = {};
for (var key in this._style) {
var value = this._style[key];
if (value instanceof Animated) {
style[key] = value.__getAnimatedValue();
}
}
return style;
}
}, {
key: '__attach',
value: function __attach() {
for (var key in this._style) {
var value = this._style[key];
if (value instanceof Animated) {
value.__addChild(this);
}
}
}
}, {
key: '__detach',
value: function __detach() {
for (var key in this._style) {
var value = this._style[key];
if (value instanceof Animated) {
value.__removeChild(this);
}
}
}
}, {
key: '__makeNative',
value: function __makeNative() {
babelHelpers.get(AnimatedStyle.prototype.__proto__ || Object.getPrototypeOf(AnimatedStyle.prototype), '__makeNative', this).call(this);
for (var key in this._style) {
var value = this._style[key];
if (value instanceof Animated) {
value.__makeNative();
}
}
}
}, {
key: '__getNativeConfig',
value: function __getNativeConfig() {
var styleConfig = {};
for (var styleKey in this._style) {
if (this._style[styleKey] instanceof Animated) {
styleConfig[styleKey] = this._style[styleKey].__getNativeTag();
}
}
NativeAnimatedHelper.validateStyles(styleConfig);
return {
type: 'style',
style: styleConfig
};
}
}]);
return AnimatedStyle;
}(AnimatedWithChildren);
var AnimatedProps = function (_Animated2) {
babelHelpers.inherits(AnimatedProps, _Animated2);
function AnimatedProps(props, callback) {
babelHelpers.classCallCheck(this, AnimatedProps);
var _this21 = babelHelpers.possibleConstructorReturn(this, (AnimatedProps.__proto__ || Object.getPrototypeOf(AnimatedProps)).call(this));
if (props.style) {
props = babelHelpers.extends({}, props, {
style: new AnimatedStyle(props.style)
});
}
_this21._props = props;
_this21._callback = callback;
_this21.__attach();
return _this21;
}
babelHelpers.createClass(AnimatedProps, [{
key: '__getValue',
value: function __getValue() {
var props = {};
for (var key in this._props) {
var value = this._props[key];
if (value instanceof Animated) {
if (!value.__isNative || value instanceof AnimatedStyle) {
props[key] = value.__getValue();
}
} else if (value instanceof AnimatedEvent) {
props[key] = value.__getHandler();
} else {
props[key] = value;
}
}
return props;
}
}, {
key: '__getAnimatedValue',
value: function __getAnimatedValue() {
var props = {};
for (var key in this._props) {
var value = this._props[key];
if (value instanceof Animated) {
props[key] = value.__getAnimatedValue();
}
}
return props;
}
}, {
key: '__attach',
value: function __attach() {
for (var key in this._props) {
var value = this._props[key];
if (value instanceof Animated) {
value.__addChild(this);
}
}
}
}, {
key: '__detach',
value: function __detach() {
if (this.__isNative && this._animatedView) {
this.__disconnectAnimatedView();
}
for (var key in this._props) {
var value = this._props[key];
if (value instanceof Animated) {
value.__removeChild(this);
}
}
babelHelpers.get(AnimatedProps.prototype.__proto__ || Object.getPrototypeOf(AnimatedProps.prototype), '__detach', this).call(this);
}
}, {
key: 'update',
value: function update() {
this._callback();
}
}, {
key: '__makeNative',
value: function __makeNative() {
if (!this.__isNative) {
this.__isNative = true;
for (var key in this._props) {
var value = this._props[key];
if (value instanceof Animated) {
value.__makeNative();
}
}
if (this._animatedView) {
this.__connectAnimatedView();
}
}
}
}, {
key: 'setNativeView',
value: function setNativeView(animatedView) {
invariant(this._animatedView === undefined, 'Animated view already set.');
this._animatedView = animatedView;
if (this.__isNative) {
this.__connectAnimatedView();
}
}
}, {
key: '__connectAnimatedView',
value: function __connectAnimatedView() {
invariant(this.__isNative, 'Expected node to be marked as "native"');
var nativeViewTag = findNodeHandle(this._animatedView);
invariant(nativeViewTag != null, 'Unable to locate attached view in the native tree');
NativeAnimatedAPI.connectAnimatedNodeToView(this.__getNativeTag(), nativeViewTag);
}
}, {
key: '__disconnectAnimatedView',
value: function __disconnectAnimatedView() {
invariant(this.__isNative, 'Expected node to be marked as "native"');
var nativeViewTag = findNodeHandle(this._animatedView);
invariant(nativeViewTag != null, 'Unable to locate attached view in the native tree');
NativeAnimatedAPI.disconnectAnimatedNodeFromView(this.__getNativeTag(), nativeViewTag);
}
}, {
key: '__getNativeConfig',
value: function __getNativeConfig() {
var propsConfig = {};
for (var propKey in this._props) {
var value = this._props[propKey];
if (value instanceof Animated) {
propsConfig[propKey] = value.__getNativeTag();
}
}
return {
type: 'props',
props: propsConfig
};
}
}]);
return AnimatedProps;
}(Animated);
function createAnimatedComponent(Component) {
var AnimatedComponent = function (_React$Component) {
babelHelpers.inherits(AnimatedComponent, _React$Component);
function AnimatedComponent(props) {
babelHelpers.classCallCheck(this, AnimatedComponent);
var _this22 = babelHelpers.possibleConstructorReturn(this, (AnimatedComponent.__proto__ || Object.getPrototypeOf(AnimatedComponent)).call(this, props));
_this22._setComponentRef = _this22._setComponentRef.bind(_this22);
return _this22;
}
babelHelpers.createClass(AnimatedComponent, [{
key: 'componentWillUnmount',
value: function componentWillUnmount() {
this._propsAnimated && this._propsAnimated.__detach();
this._detachNativeEvents(this.props);
}
}, {
key: 'setNativeProps',
value: function setNativeProps(props) {
this._component.setNativeProps(props);
}
}, {
key: 'componentWillMount',
value: function componentWillMount() {
this._attachProps(this.props);
}
}, {
key: 'componentDidMount',
value: function componentDidMount() {
this._propsAnimated.setNativeView(this._component);
this._attachNativeEvents(this.props);
}
}, {
key: '_attachNativeEvents',
value: function _attachNativeEvents(newProps) {
if (newProps !== this.props) {
this._detachNativeEvents(this.props);
}
var ref = this._component.getScrollableNode ? this._component.getScrollableNode() : this._component;
for (var _key in newProps) {
var prop = newProps[_key];
if (prop instanceof AnimatedEvent && prop.__isNative) {
prop.__attach(ref, _key);
}
}
}
}, {
key: '_detachNativeEvents',
value: function _detachNativeEvents(props) {
var ref = this._component.getScrollableNode ? this._component.getScrollableNode() : this._component;
for (var _key2 in props) {
var prop = props[_key2];
if (prop instanceof AnimatedEvent && prop.__isNative) {
prop.__detach(ref, _key2);
}
}
}
}, {
key: '_attachProps',
value: function _attachProps(nextProps) {
var _this23 = this;
var oldPropsAnimated = this._propsAnimated;
var callback = function callback() {
if (_this23._component.setNativeProps) {
if (!_this23._propsAnimated.__isNative) {
_this23._component.setNativeProps(_this23._propsAnimated.__getAnimatedValue());
} else {
throw new Error('Attempting to run JS driven animation on animated ' + 'node that has been moved to "native" earlier by starting an ' + 'animation with `useNativeDriver: true`');
}
} else {
_this23.forceUpdate();
}
};
this._propsAnimated = new AnimatedProps(nextProps, callback);
if (this._component) {
this._propsAnimated.setNativeView(this._component);
}
oldPropsAnimated && oldPropsAnimated.__detach();
}
}, {
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(nextProps) {
this._attachProps(nextProps);
this._attachNativeEvents(nextProps);
}
}, {
key: 'render',
value: function render() {
return React.createElement(Component, babelHelpers.extends({}, this._propsAnimated.__getValue(), {
ref: this._setComponentRef,
__source: {
fileName: _jsxFileName,
lineNumber: 1802
}
}));
}
}, {
key: '_setComponentRef',
value: function _setComponentRef(c) {
this._component = c;
}
}, {
key: 'getNode',
value: function getNode() {
return this._component;
}
}]);
return AnimatedComponent;
}(React.Component);
AnimatedComponent.propTypes = {
style: function style(props, propName, componentName) {
if (!Component.propTypes) {
return;
}
for (var key in ViewStylePropTypes) {
if (!Component.propTypes[key] && props[key] !== undefined) {
console.warn('You are setting the style `{ ' + key + ': ... }` as a prop. You ' + 'should nest it in a style object. ' + 'E.g. `{ style: { ' + key + ': ... } }`');
}
}
}
};
return AnimatedComponent;
}
var AnimatedTracking = function (_Animated3) {
babelHelpers.inherits(AnimatedTracking, _Animated3);
function AnimatedTracking(value, parent, animationClass, animationConfig, callback) {
babelHelpers.classCallCheck(this, AnimatedTracking);
var _this24 = babelHelpers.possibleConstructorReturn(this, (AnimatedTracking.__proto__ || Object.getPrototypeOf(AnimatedTracking)).call(this));
_this24._value = value;
_this24._parent = parent;
_this24._animationClass = animationClass;
_this24._animationConfig = animationConfig;
_this24._callback = callback;
_this24.__attach();
return _this24;
}
babelHelpers.createClass(AnimatedTracking, [{
key: '__getValue',
value: function __getValue() {
return this._parent.__getValue();
}
}, {
key: '__attach',
value: function __attach() {
this._parent.__addChild(this);
}
}, {
key: '__detach',
value: function __detach() {
this._parent.__removeChild(this);
babelHelpers.get(AnimatedTracking.prototype.__proto__ || Object.getPrototypeOf(AnimatedTracking.prototype), '__detach', this).call(this);
}
}, {
key: 'update',
value: function update() {
this._value.animate(new this._animationClass(babelHelpers.extends({}, this._animationConfig, {
toValue: this._animationConfig.toValue.__getValue()
})), this._callback);
}
}]);
return AnimatedTracking;
}(Animated);
var add = function add(a, b) {
return new AnimatedAddition(a, b);
};
var divide = function divide(a, b) {
return new AnimatedDivision(a, b);
};
var multiply = function multiply(a, b) {
return new AnimatedMultiplication(a, b);
};
var modulo = function modulo(a, modulus) {
return new AnimatedModulo(a, modulus);
};
var diffClamp = function diffClamp(a, min, max) {
return new AnimatedDiffClamp(a, min, max);
};
var _combineCallbacks = function _combineCallbacks(callback, config) {
if (callback && config.onComplete) {
return function () {
config.onComplete && config.onComplete.apply(config, arguments);
callback && callback.apply(undefined, arguments);
};
} else {
return callback || config.onComplete;
}
};
var maybeVectorAnim = function maybeVectorAnim(value, config, anim) {
if (value instanceof AnimatedValueXY) {
var configX = babelHelpers.extends({}, config);
var configY = babelHelpers.extends({}, config);
for (var key in config) {
var _config$key = config[key],
x = _config$key.x,
y = _config$key.y;
if (x !== undefined && y !== undefined) {
configX[key] = x;
configY[key] = y;
}
}
var aX = anim(value.x, configX);
var aY = anim(value.y, configY);
return parallel([aX, aY], { stopTogether: false });
}
return null;
};
var spring = function spring(value, config) {
return maybeVectorAnim(value, config, spring) || {
start: function start(callback) {
callback = _combineCallbacks(callback, config);
var singleValue = value;
var singleConfig = config;
singleValue.stopTracking();
if (config.toValue instanceof Animated) {
singleValue.track(new AnimatedTracking(singleValue, config.toValue, SpringAnimation, singleConfig, callback));
} else {
singleValue.animate(new SpringAnimation(singleConfig), callback);
}
},
stop: function stop() {
value.stopAnimation();
}
};
};
var timing = function timing(value, config) {
return maybeVectorAnim(value, config, timing) || {
start: function start(callback) {
callback = _combineCallbacks(callback, config);
var singleValue = value;
var singleConfig = config;
singleValue.stopTracking();
if (config.toValue instanceof Animated) {
singleValue.track(new AnimatedTracking(singleValue, config.toValue, TimingAnimation, singleConfig, callback));
} else {
singleValue.animate(new TimingAnimation(singleConfig), callback);
}
},
stop: function stop() {
value.stopAnimation();
}
};
};
var decay = function decay(value, config) {
return maybeVectorAnim(value, config, decay) || {
start: function start(callback) {
callback = _combineCallbacks(callback, config);
var singleValue = value;
var singleConfig = config;
singleValue.stopTracking();
singleValue.animate(new DecayAnimation(singleConfig), callback);
},
stop: function stop() {
value.stopAnimation();
}
};
};
var sequence = function sequence(animations) {
var current = 0;
return {
start: function start(callback) {
var onComplete = function onComplete(result) {
if (!result.finished) {
callback && callback(result);
return;
}
current++;
if (current === animations.length) {
callback && callback(result);
return;
}
animations[current].start(onComplete);
};
if (animations.length === 0) {
callback && callback({ finished: true });
} else {
animations[current].start(onComplete);
}
},
stop: function stop() {
if (current < animations.length) {
animations[current].stop();
}
}
};
};
var parallel = function parallel(animations, config) {
var doneCount = 0;
var hasEnded = {};
var stopTogether = !(config && config.stopTogether === false);
var result = {
start: function start(callback) {
if (doneCount === animations.length) {
callback && callback({ finished: true });
return;
}
animations.forEach(function (animation, idx) {
var cb = function cb(endResult) {
hasEnded[idx] = true;
doneCount++;
if (doneCount === animations.length) {
doneCount = 0;
callback && callback(endResult);
return;
}
if (!endResult.finished && stopTogether) {
result.stop();
}
};
if (!animation) {
cb({ finished: true });
} else {
animation.start(cb);
}
});
},
stop: function stop() {
animations.forEach(function (animation, idx) {
!hasEnded[idx] && animation.stop();
hasEnded[idx] = true;
});
}
};
return result;
};
var delay = function delay(time) {
return timing(new AnimatedValue(0), { toValue: 0, delay: time, duration: 0 });
};
var stagger = function stagger(time, animations) {
return parallel(animations.map(function (animation, i) {
return sequence([delay(time * i), animation]);
}));
};
var AnimatedEvent = function () {
function AnimatedEvent(argMapping) {
var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
babelHelpers.classCallCheck(this, AnimatedEvent);
this._argMapping = argMapping;
this._listener = config.listener;
this.__isNative = shouldUseNativeDriver(config);
if (this.__isNative) {
invariant(!this._listener, 'Listener is not supported for native driven events.');
}
if (__DEV__) {
this._validateMapping();
}
}
babelHelpers.createClass(AnimatedEvent, [{
key: '__attach',
value: function __attach(viewRef, eventName) {
invariant(this.__isNative, 'Only native driven events need to be attached.');
var eventMappings = [];
var traverse = function traverse(value, path) {
if (value instanceof AnimatedValue) {
value.__makeNative();
eventMappings.push({
nativeEventPath: path,
animatedValueTag: value.__getNativeTag()
});
} else if (typeof value === 'object') {
for (var _key3 in value) {
traverse(value[_key3], path.concat(_key3));
}
}
};
invariant(this._argMapping[0] && this._argMapping[0].nativeEvent, 'Native driven events only support animated values contained inside `nativeEvent`.');
traverse(this._argMapping[0].nativeEvent, []);
var viewTag = findNodeHandle(viewRef);
eventMappings.forEach(function (mapping) {
NativeAnimatedAPI.addAnimatedEventToView(viewTag, eventName, mapping);
});
}
}, {
key: '__detach',
value: function __detach(viewTag, eventName) {
invariant(this.__isNative, 'Only native driven events need to be detached.');
NativeAnimatedAPI.removeAnimatedEventFromView(viewTag, eventName);
}
}, {
key: '__getHandler',
value: function __getHandler() {
var _this25 = this;
return function () {
for (var _len = arguments.length, args = Array(_len), _key4 = 0; _key4 < _len; _key4++) {
args[_key4] = arguments[_key4];
}
var traverse = function traverse(recMapping, recEvt, key) {
if (typeof recEvt === 'number' && recMapping instanceof AnimatedValue) {
recMapping.setValue(recEvt);
} else if (typeof recMapping === 'object') {
for (var mappingKey in recMapping) {
traverse(recMapping[mappingKey], recEvt[mappingKey], mappingKey);
}
}
};
if (!_this25.__isNative) {
_this25._argMapping.forEach(function (mapping, idx) {
traverse(mapping, args[idx], 'arg' + idx);
});
}
if (_this25._listener) {
_this25._listener.apply(null, args);
}
};
}
}, {
key: '_validateMapping',
value: function _validateMapping() {
var traverse = function traverse(recMapping, recEvt, key) {
if (typeof recEvt === 'number') {
invariant(recMapping instanceof AnimatedValue, 'Bad mapping of type ' + typeof recMapping + ' for key ' + key + ', event value must map to AnimatedValue');
return;
}
invariant(typeof recMapping === 'object', 'Bad mapping of type ' + typeof recMapping + ' for key ' + key);
invariant(typeof recEvt === 'object', 'Bad event of type ' + typeof recEvt + ' for key ' + key);
for (var mappingKey in recMapping) {
traverse(recMapping[mappingKey], recEvt[mappingKey], mappingKey);
}
};
}
}]);
return AnimatedEvent;
}();
var event = function event(argMapping, config) {
var animatedEvent = new AnimatedEvent(argMapping, config);
if (animatedEvent.__isNative) {
return animatedEvent;
} else {
return animatedEvent.__getHandler();
}
};
module.exports = {
Value: AnimatedValue,
ValueXY: AnimatedValueXY,
decay: decay,
timing: timing,
spring: spring,
add: add,
divide: divide,
multiply: multiply,
modulo: modulo,
diffClamp: diffClamp,
delay: delay,
sequence: sequence,
parallel: parallel,
stagger: stagger,
event: event,
createAnimatedComponent: createAnimatedComponent,
__PropsOnlyForTests: AnimatedProps
};
}, 220, null, "AnimatedImplementation");
__d(/* InteractionManager */function(global, require, module, exports) {
'use strict';
var BatchedBridge = require(81 ); // 81 = BatchedBridge
var EventEmitter = require(103 ); // 103 = EventEmitter
var Set = require(222 ); // 222 = Set
var TaskQueue = require(228 ); // 228 = TaskQueue
var infoLog = require(229 ); // 229 = infoLog
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var keyMirror = require(133 ); // 133 = fbjs/lib/keyMirror
var _emitter = new EventEmitter();
var DEBUG_DELAY = 0;
var DEBUG = false;
var InteractionManager = {
Events: keyMirror({
interactionStart: true,
interactionComplete: true
}),
runAfterInteractions: function runAfterInteractions(task) {
var tasks = [];
var promise = new Promise(function (resolve) {
_scheduleUpdate();
if (task) {
tasks.push(task);
}
tasks.push({ run: resolve, name: 'resolve ' + (task && task.name || '?') });
_taskQueue.enqueueTasks(tasks);
});
return {
then: promise.then.bind(promise),
done: function done() {
if (promise.done) {
return promise.done.apply(promise, arguments);
} else {
console.warn('Tried to call done when not supported by current Promise implementation.');
}
},
cancel: function cancel() {
_taskQueue.cancelTasks(tasks);
}
};
},
createInteractionHandle: function createInteractionHandle() {
DEBUG && infoLog('create interaction handle');
_scheduleUpdate();
var handle = ++_inc;
_addInteractionSet.add(handle);
return handle;
},
clearInteractionHandle: function clearInteractionHandle(handle) {
DEBUG && infoLog('clear interaction handle');
invariant(!!handle, 'Must provide a handle to clear.');
_scheduleUpdate();
_addInteractionSet.delete(handle);
_deleteInteractionSet.add(handle);
},
addListener: _emitter.addListener.bind(_emitter),
setDeadline: function setDeadline(deadline) {
_deadline = deadline;
}
};
var _interactionSet = new Set();
var _addInteractionSet = new Set();
var _deleteInteractionSet = new Set();
var _taskQueue = new TaskQueue({ onMoreTasks: _scheduleUpdate });
var _nextUpdateHandle = 0;
var _inc = 0;
var _deadline = -1;
function _scheduleUpdate() {
if (!_nextUpdateHandle) {
if (_deadline > 0) {
_nextUpdateHandle = setTimeout(_processUpdate, 0 + DEBUG_DELAY);
} else {
_nextUpdateHandle = setImmediate(_processUpdate);
}
}
}
function _processUpdate() {
_nextUpdateHandle = 0;
var interactionCount = _interactionSet.size;
_addInteractionSet.forEach(function (handle) {
return _interactionSet.add(handle);
});
_deleteInteractionSet.forEach(function (handle) {
return _interactionSet.delete(handle);
});
var nextInteractionCount = _interactionSet.size;
if (interactionCount !== 0 && nextInteractionCount === 0) {
_emitter.emit(InteractionManager.Events.interactionComplete);
} else if (interactionCount === 0 && nextInteractionCount !== 0) {
_emitter.emit(InteractionManager.Events.interactionStart);
}
if (nextInteractionCount === 0) {
while (_taskQueue.hasTasksToProcess()) {
_taskQueue.processNext();
if (_deadline > 0 && BatchedBridge.getEventLoopRunningTime() >= _deadline) {
_scheduleUpdate();
break;
}
}
}
_addInteractionSet.clear();
_deleteInteractionSet.clear();
}
module.exports = InteractionManager;
}, 221, null, "InteractionManager");
__d(/* Set */function(global, require, module, exports) {
'use strict';
var Map = require(223 ); // 223 = Map
var _shouldPolyfillES6Collection = require(224 ); // 224 = _shouldPolyfillES6Collection
var toIterator = require(227 ); // 227 = toIterator
module.exports = function (global) {
if (!_shouldPolyfillES6Collection('Set')) {
return global.Set;
}
var Set = function () {
function Set(iterable) {
babelHelpers.classCallCheck(this, Set);
if (this == null || typeof this !== 'object' && typeof this !== 'function') {
throw new TypeError('Wrong set object type.');
}
initSet(this);
if (iterable != null) {
var it = toIterator(iterable);
var next;
while (!(next = it.next()).done) {
this.add(next.value);
}
}
}
babelHelpers.createClass(Set, [{
key: 'add',
value: function add(value) {
this._map.set(value, value);
this.size = this._map.size;
return this;
}
}, {
key: 'clear',
value: function clear() {
initSet(this);
}
}, {
key: 'delete',
value: function _delete(value) {
var ret = this._map.delete(value);
this.size = this._map.size;
return ret;
}
}, {
key: 'entries',
value: function entries() {
return this._map.entries();
}
}, {
key: 'forEach',
value: function forEach(callback) {
var thisArg = arguments[1];
var it = this._map.keys();
var next;
while (!(next = it.next()).done) {
callback.call(thisArg, next.value, next.value, this);
}
}
}, {
key: 'has',
value: function has(value) {
return this._map.has(value);
}
}, {
key: 'values',
value: function values() {
return this._map.values();
}
}]);
return Set;
}();
Set.prototype[toIterator.ITERATOR_SYMBOL] = Set.prototype.values;
Set.prototype.keys = Set.prototype.values;
function initSet(set) {
set._map = new Map();
set.size = set._map.size;
}
return Set;
}(Function('return this')());
}, 222, null, "Set");
__d(/* Map */function(global, require, module, exports) {
'use strict';
var _shouldPolyfillES6Collection = require(224 ); // 224 = _shouldPolyfillES6Collection
var guid = require(225 ); // 225 = guid
var isNode = require(226 ); // 226 = fbjs/lib/isNode
var toIterator = require(227 ); // 227 = toIterator
module.exports = function (global, undefined) {
if (!_shouldPolyfillES6Collection('Map')) {
return global.Map;
}
var KIND_KEY = 'key';
var KIND_VALUE = 'value';
var KIND_KEY_VALUE = 'key+value';
var KEY_PREFIX = '$map_';
var SECRET_SIZE_PROP;
if (__DEV__) {
SECRET_SIZE_PROP = '$size' + guid();
}
var OLD_IE_HASH_PREFIX = 'IE_HASH_';
var Map = function () {
function Map(iterable) {
babelHelpers.classCallCheck(this, Map);
if (!isObject(this)) {
throw new TypeError('Wrong map object type.');
}
initMap(this);
if (iterable != null) {
var it = toIterator(iterable);
var next;
while (!(next = it.next()).done) {
if (!isObject(next.value)) {
throw new TypeError('Expected iterable items to be pair objects.');
}
this.set(next.value[0], next.value[1]);
}
}
}
babelHelpers.createClass(Map, [{
key: 'clear',
value: function clear() {
initMap(this);
}
}, {
key: 'has',
value: function has(key) {
var index = getIndex(this, key);
return !!(index != null && this._mapData[index]);
}
}, {
key: 'set',
value: function set(key, value) {
var index = getIndex(this, key);
if (index != null && this._mapData[index]) {
this._mapData[index][1] = value;
} else {
index = this._mapData.push([key, value]) - 1;
setIndex(this, key, index);
if (__DEV__) {
this[SECRET_SIZE_PROP] += 1;
} else {
this.size += 1;
}
}
return this;
}
}, {
key: 'get',
value: function get(key) {
var index = getIndex(this, key);
if (index == null) {
return undefined;
} else {
return this._mapData[index][1];
}
}
}, {
key: 'delete',
value: function _delete(key) {
var index = getIndex(this, key);
if (index != null && this._mapData[index]) {
setIndex(this, key, undefined);
this._mapData[index] = undefined;
if (__DEV__) {
this[SECRET_SIZE_PROP] -= 1;
} else {
this.size -= 1;
}
return true;
} else {
return false;
}
}
}, {
key: 'entries',
value: function entries() {
return new MapIterator(this, KIND_KEY_VALUE);
}
}, {
key: 'keys',
value: function keys() {
return new MapIterator(this, KIND_KEY);
}
}, {
key: 'values',
value: function values() {
return new MapIterator(this, KIND_VALUE);
}
}, {
key: 'forEach',
value: function forEach(callback, thisArg) {
if (typeof callback !== 'function') {
throw new TypeError('Callback must be callable.');
}
var boundCallback = callback.bind(thisArg || undefined);
var mapData = this._mapData;
for (var i = 0; i < mapData.length; i++) {
var entry = mapData[i];
if (entry != null) {
boundCallback(entry[1], entry[0], this);
}
}
}
}]);
return Map;
}();
Map.prototype[toIterator.ITERATOR_SYMBOL] = Map.prototype.entries;
var MapIterator = function () {
function MapIterator(map, kind) {
babelHelpers.classCallCheck(this, MapIterator);
if (!(isObject(map) && map._mapData)) {
throw new TypeError('Object is not a map.');
}
if ([KIND_KEY, KIND_KEY_VALUE, KIND_VALUE].indexOf(kind) === -1) {
throw new Error('Invalid iteration kind.');
}
this._map = map;
this._nextIndex = 0;
this._kind = kind;
}
babelHelpers.createClass(MapIterator, [{
key: 'next',
value: function next() {
if (!this instanceof Map) {
throw new TypeError('Expected to be called on a MapIterator.');
}
var map = this._map;
var index = this._nextIndex;
var kind = this._kind;
if (map == null) {
return createIterResultObject(undefined, true);
}
var entries = map._mapData;
while (index < entries.length) {
var record = entries[index];
index += 1;
this._nextIndex = index;
if (record) {
if (kind === KIND_KEY) {
return createIterResultObject(record[0], false);
} else if (kind === KIND_VALUE) {
return createIterResultObject(record[1], false);
} else if (kind) {
return createIterResultObject(record, false);
}
}
}
this._map = undefined;
return createIterResultObject(undefined, true);
}
}]);
return MapIterator;
}();
MapIterator.prototype[toIterator.ITERATOR_SYMBOL] = function () {
return this;
};
function getIndex(map, key) {
if (isObject(key)) {
var hash = getHash(key);
return map._objectIndex[hash];
} else {
var prefixedKey = KEY_PREFIX + key;
if (typeof key === 'string') {
return map._stringIndex[prefixedKey];
} else {
return map._otherIndex[prefixedKey];
}
}
}
function setIndex(map, key, index) {
var shouldDelete = index == null;
if (isObject(key)) {
var hash = getHash(key);
if (shouldDelete) {
delete map._objectIndex[hash];
} else {
map._objectIndex[hash] = index;
}
} else {
var prefixedKey = KEY_PREFIX + key;
if (typeof key === 'string') {
if (shouldDelete) {
delete map._stringIndex[prefixedKey];
} else {
map._stringIndex[prefixedKey] = index;
}
} else {
if (shouldDelete) {
delete map._otherIndex[prefixedKey];
} else {
map._otherIndex[prefixedKey] = index;
}
}
}
}
function initMap(map) {
map._mapData = [];
map._objectIndex = {};
map._stringIndex = {};
map._otherIndex = {};
if (__DEV__) {
if (isES5) {
if (map.hasOwnProperty(SECRET_SIZE_PROP)) {
map[SECRET_SIZE_PROP] = 0;
} else {
Object.defineProperty(map, SECRET_SIZE_PROP, {
value: 0,
writable: true
});
Object.defineProperty(map, 'size', {
set: function set(v) {
console.error('PLEASE FIX ME: You are changing the map size property which ' + 'should not be writable and will break in production.');
throw new Error('The map size property is not writable.');
},
get: function get() {
return map[SECRET_SIZE_PROP];
}
});
}
return;
}
}
map.size = 0;
}
function isObject(o) {
return o != null && (typeof o === 'object' || typeof o === 'function');
}
function createIterResultObject(value, done) {
return { value: value, done: done };
}
var isES5 = function () {
try {
Object.defineProperty({}, 'x', {});
return true;
} catch (e) {
return false;
}
}();
function isExtensible(o) {
if (!isES5) {
return true;
} else {
return Object.isExtensible(o);
}
}
function getIENodeHash(node) {
var uniqueID;
switch (node.nodeType) {
case 1:
uniqueID = node.uniqueID;
break;
case 9:
uniqueID = node.documentElement.uniqueID;
break;
default:
return null;
}
if (uniqueID) {
return OLD_IE_HASH_PREFIX + uniqueID;
} else {
return null;
}
}
var getHash = function () {
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
var hashProperty = guid();
var hashCounter = 0;
return function getHash(o) {
if (o[hashProperty]) {
return o[hashProperty];
} else if (!isES5 && o.propertyIsEnumerable && o.propertyIsEnumerable[hashProperty]) {
return o.propertyIsEnumerable[hashProperty];
} else if (!isES5 && isNode(o) && getIENodeHash(o)) {
return getIENodeHash(o);
} else if (!isES5 && o[hashProperty]) {
return o[hashProperty];
}
if (isExtensible(o)) {
hashCounter += 1;
if (isES5) {
Object.defineProperty(o, hashProperty, {
enumerable: false,
writable: false,
configurable: false,
value: hashCounter
});
} else if (o.propertyIsEnumerable) {
o.propertyIsEnumerable = function () {
return propIsEnumerable.apply(this, arguments);
};
o.propertyIsEnumerable[hashProperty] = hashCounter;
} else if (isNode(o)) {
o[hashProperty] = hashCounter;
} else {
throw new Error('Unable to set a non-enumerable property on object.');
}
return hashCounter;
} else {
throw new Error('Non-extensible objects are not allowed as keys.');
}
};
}();
return Map;
}(Function('return this')());
}, 223, null, "Map");
__d(/* _shouldPolyfillES6Collection */function(global, require, module, exports) {
'use strict';
function shouldPolyfillES6Collection(collectionName) {
var Collection = global[collectionName];
if (Collection == null) {
return true;
}
if (typeof global.Symbol !== 'function') {
return true;
}
var proto = Collection.prototype;
return Collection == null || typeof Collection !== 'function' || typeof proto.clear !== 'function' || new Collection().size !== 0 || typeof proto.keys !== 'function' || typeof proto.forEach !== 'function';
}
module.exports = shouldPolyfillES6Collection;
}, 224, null, "_shouldPolyfillES6Collection");
__d(/* guid */function(global, require, module, exports) {
'use strict';
function guid() {
return 'f' + (Math.random() * (1 << 30)).toString(16).replace('.', '');
}
module.exports = guid;
}, 225, null, "guid");
__d(/* fbjs/lib/isNode.js */function(global, require, module, exports) {'use strict';
function isNode(object) {
var doc = object ? object.ownerDocument || object : document;
var defaultView = doc.defaultView || window;
return !!(object && (typeof defaultView.Node === 'function' ? object instanceof defaultView.Node : typeof object === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string'));
}
module.exports = isNode;
}, 226, null, "fbjs/lib/isNode.js");
__d(/* toIterator */function(global, require, module, exports) {
'use strict';
var KIND_KEY = 'key';
var KIND_VALUE = 'value';
var KIND_KEY_VAL = 'key+value';
var ITERATOR_SYMBOL = typeof Symbol === 'function' ? typeof Symbol === 'function' ? Symbol.iterator : '@@iterator' : '@@iterator';
var toIterator = function () {
if (!(Array.prototype[ITERATOR_SYMBOL] && String.prototype[ITERATOR_SYMBOL])) {
return function () {
var ArrayIterator = function () {
function ArrayIterator(array, kind) {
babelHelpers.classCallCheck(this, ArrayIterator);
if (!Array.isArray(array)) {
throw new TypeError('Object is not an Array');
}
this._iteratedObject = array;
this._kind = kind;
this._nextIndex = 0;
}
babelHelpers.createClass(ArrayIterator, [{
key: 'next',
value: function next() {
if (!this instanceof ArrayIterator) {
throw new TypeError('Object is not an ArrayIterator');
}
if (this._iteratedObject == null) {
return createIterResultObject(undefined, true);
}
var array = this._iteratedObject;
var len = this._iteratedObject.length;
var index = this._nextIndex;
var kind = this._kind;
if (index >= len) {
this._iteratedObject = undefined;
return createIterResultObject(undefined, true);
}
this._nextIndex = index + 1;
if (kind === KIND_KEY) {
return createIterResultObject(index, false);
} else if (kind === KIND_VALUE) {
return createIterResultObject(array[index], false);
} else if (kind === KIND_KEY_VAL) {
return createIterResultObject([index, array[index]], false);
}
}
}, {
key: '@@iterator',
value: function iterator() {
return this;
}
}]);
return ArrayIterator;
}();
var StringIterator = function () {
function StringIterator(string) {
babelHelpers.classCallCheck(this, StringIterator);
if (typeof string !== 'string') {
throw new TypeError('Object is not a string');
}
this._iteratedString = string;
this._nextIndex = 0;
}
babelHelpers.createClass(StringIterator, [{
key: 'next',
value: function next() {
if (!this instanceof StringIterator) {
throw new TypeError('Object is not a StringIterator');
}
if (this._iteratedString == null) {
return createIterResultObject(undefined, true);
}
var index = this._nextIndex;
var s = this._iteratedString;
var len = s.length;
if (index >= len) {
this._iteratedString = undefined;
return createIterResultObject(undefined, true);
}
var ret;
var first = s.charCodeAt(index);
if (first < 0xD800 || first > 0xDBFF || index + 1 === len) {
ret = s[index];
} else {
var second = s.charCodeAt(index + 1);
if (second < 0xDC00 || second > 0xDFFF) {
ret = s[index];
} else {
ret = s[index] + s[index + 1];
}
}
this._nextIndex = index + ret.length;
return createIterResultObject(ret, false);
}
}, {
key: '@@iterator',
value: function iterator() {
return this;
}
}]);
return StringIterator;
}();
function createIterResultObject(value, done) {
return { value: value, done: done };
}
return function (object, kind) {
if (typeof object === 'string') {
return new StringIterator(object);
} else if (Array.isArray(object)) {
return new ArrayIterator(object, kind || KIND_VALUE);
} else {
return object[ITERATOR_SYMBOL]();
}
};
}();
} else {
return function (object) {
return object[ITERATOR_SYMBOL]();
};
}
}();
babelHelpers.extends(toIterator, {
KIND_KEY: KIND_KEY,
KIND_VALUE: KIND_VALUE,
KIND_KEY_VAL: KIND_KEY_VAL,
ITERATOR_SYMBOL: ITERATOR_SYMBOL
});
module.exports = toIterator;
}, 227, null, "toIterator");
__d(/* TaskQueue */function(global, require, module, exports) {
'use strict';
var infoLog = require(229 ); // 229 = infoLog
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var DEBUG = false;
var TaskQueue = function () {
function TaskQueue(_ref) {
var onMoreTasks = _ref.onMoreTasks;
babelHelpers.classCallCheck(this, TaskQueue);
this._onMoreTasks = onMoreTasks;
this._queueStack = [{ tasks: [], popable: false }];
}
babelHelpers.createClass(TaskQueue, [{
key: 'enqueue',
value: function enqueue(task) {
this._getCurrentQueue().push(task);
}
}, {
key: 'enqueueTasks',
value: function enqueueTasks(tasks) {
var _this = this;
tasks.forEach(function (task) {
return _this.enqueue(task);
});
}
}, {
key: 'cancelTasks',
value: function cancelTasks(tasksToCancel) {
this._queueStack = this._queueStack.map(function (queue) {
return babelHelpers.extends({}, queue, {
tasks: queue.tasks.filter(function (task) {
return tasksToCancel.indexOf(task) === -1;
})
});
}).filter(function (queue, idx) {
return queue.tasks.length > 0 || idx === 0;
});
}
}, {
key: 'hasTasksToProcess',
value: function hasTasksToProcess() {
return this._getCurrentQueue().length > 0;
}
}, {
key: 'processNext',
value: function processNext() {
var queue = this._getCurrentQueue();
if (queue.length) {
var task = queue.shift();
try {
if (task.gen) {
DEBUG && infoLog('genPromise for task ' + task.name);
this._genPromise(task);
} else if (task.run) {
DEBUG && infoLog('run task ' + task.name);
task.run();
} else {
invariant(typeof task === 'function', 'Expected Function, SimpleTask, or PromiseTask, but got:\n' + JSON.stringify(task, null, 2));
DEBUG && infoLog('run anonymous task');
task();
}
} catch (e) {
e.message = 'TaskQueue: Error with task ' + (task.name || '') + ': ' + e.message;
throw e;
}
}
}
}, {
key: '_getCurrentQueue',
value: function _getCurrentQueue() {
var stackIdx = this._queueStack.length - 1;
var queue = this._queueStack[stackIdx];
if (queue.popable && queue.tasks.length === 0 && this._queueStack.length > 1) {
this._queueStack.pop();
DEBUG && infoLog('popped queue: ', { stackIdx: stackIdx, queueStackSize: this._queueStack.length });
return this._getCurrentQueue();
} else {
return queue.tasks;
}
}
}, {
key: '_genPromise',
value: function _genPromise(task) {
var _this2 = this;
this._queueStack.push({ tasks: [], popable: false });
var stackIdx = this._queueStack.length - 1;
DEBUG && infoLog('push new queue: ', { stackIdx: stackIdx });
DEBUG && infoLog('exec gen task ' + task.name);
task.gen().then(function () {
DEBUG && infoLog('onThen for gen task ' + task.name, { stackIdx: stackIdx, queueStackSize: _this2._queueStack.length });
_this2._queueStack[stackIdx].popable = true;
_this2.hasTasksToProcess() && _this2._onMoreTasks();
}).catch(function (ex) {
ex.message = 'TaskQueue: Error resolving Promise in task ' + task.name + ': ' + ex.message;
throw ex;
}).done();
}
}]);
return TaskQueue;
}();
module.exports = TaskQueue;
}, 228, null, "TaskQueue");
__d(/* infoLog */function(global, require, module, exports) {
'use strict';
function infoLog() {
var _console;
return (_console = console).log.apply(_console, arguments);
}
module.exports = infoLog;
}, 229, null, "infoLog");
__d(/* Interpolation */function(global, require, module, exports) {
'use strict';
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var normalizeColor = require(72 ); // 72 = normalizeColor
var linear = function linear(t) {
return t;
};
var Interpolation = function () {
function Interpolation() {
babelHelpers.classCallCheck(this, Interpolation);
}
babelHelpers.createClass(Interpolation, null, [{
key: 'create',
value: function create(config) {
if (config.outputRange && typeof config.outputRange[0] === 'string') {
return createInterpolationFromStringOutputRange(config);
}
var outputRange = config.outputRange;
checkInfiniteRange('outputRange', outputRange);
var inputRange = config.inputRange;
checkInfiniteRange('inputRange', inputRange);
checkValidInputRange(inputRange);
invariant(inputRange.length === outputRange.length, 'inputRange (' + inputRange.length + ') and outputRange (' + outputRange.length + ') must have the same length');
var easing = config.easing || linear;
var extrapolateLeft = 'extend';
if (config.extrapolateLeft !== undefined) {
extrapolateLeft = config.extrapolateLeft;
} else if (config.extrapolate !== undefined) {
extrapolateLeft = config.extrapolate;
}
var extrapolateRight = 'extend';
if (config.extrapolateRight !== undefined) {
extrapolateRight = config.extrapolateRight;
} else if (config.extrapolate !== undefined) {
extrapolateRight = config.extrapolate;
}
return function (input) {
invariant(typeof input === 'number', 'Cannot interpolation an input which is not a number');
var range = findRange(input, inputRange);
return interpolate(input, inputRange[range], inputRange[range + 1], outputRange[range], outputRange[range + 1], easing, extrapolateLeft, extrapolateRight);
};
}
}]);
return Interpolation;
}();
function interpolate(input, inputMin, inputMax, outputMin, outputMax, easing, extrapolateLeft, extrapolateRight) {
var result = input;
if (result < inputMin) {
if (extrapolateLeft === 'identity') {
return result;
} else if (extrapolateLeft === 'clamp') {
result = inputMin;
} else if (extrapolateLeft === 'extend') {}
}
if (result > inputMax) {
if (extrapolateRight === 'identity') {
return result;
} else if (extrapolateRight === 'clamp') {
result = inputMax;
} else if (extrapolateRight === 'extend') {}
}
if (outputMin === outputMax) {
return outputMin;
}
if (inputMin === inputMax) {
if (input <= inputMin) {
return outputMin;
}
return outputMax;
}
if (inputMin === -Infinity) {
result = -result;
} else if (inputMax === Infinity) {
result = result - inputMin;
} else {
result = (result - inputMin) / (inputMax - inputMin);
}
result = easing(result);
if (outputMin === -Infinity) {
result = -result;
} else if (outputMax === Infinity) {
result = result + outputMin;
} else {
result = result * (outputMax - outputMin) + outputMin;
}
return result;
}
function colorToRgba(input) {
var int32Color = normalizeColor(input);
if (int32Color === null) {
return input;
}
int32Color = int32Color || 0;
var r = (int32Color & 0xff000000) >>> 24;
var g = (int32Color & 0x00ff0000) >>> 16;
var b = (int32Color & 0x0000ff00) >>> 8;
var a = (int32Color & 0x000000ff) / 255;
return 'rgba(' + r + ', ' + g + ', ' + b + ', ' + a + ')';
}
var stringShapeRegex = /[0-9\.-]+/g;
function createInterpolationFromStringOutputRange(config) {
var outputRange = config.outputRange;
invariant(outputRange.length >= 2, 'Bad output range');
outputRange = outputRange.map(colorToRgba);
checkPattern(outputRange);
var outputRanges = outputRange[0].match(stringShapeRegex).map(function () {
return [];
});
outputRange.forEach(function (value) {
value.match(stringShapeRegex).forEach(function (number, i) {
outputRanges[i].push(+number);
});
});
var interpolations = outputRange[0].match(stringShapeRegex).map(function (value, i) {
return Interpolation.create(babelHelpers.extends({}, config, {
outputRange: outputRanges[i]
}));
});
var shouldRound = isRgbOrRgba(outputRange[0]);
return function (input) {
var i = 0;
return outputRange[0].replace(stringShapeRegex, function () {
var val = +interpolations[i++](input);
var rounded = shouldRound && i < 4 ? Math.round(val) : Math.round(val * 1000) / 1000;
return String(rounded);
});
};
}
function isRgbOrRgba(range) {
return typeof range === 'string' && range.startsWith('rgb');
}
function checkPattern(arr) {
var pattern = arr[0].replace(stringShapeRegex, '');
for (var i = 1; i < arr.length; ++i) {
invariant(pattern === arr[i].replace(stringShapeRegex, ''), 'invalid pattern ' + arr[0] + ' and ' + arr[i]);
}
}
function findRange(input, inputRange) {
for (var i = 1; i < inputRange.length - 1; ++i) {
if (inputRange[i] >= input) {
break;
}
}
return i - 1;
}
function checkValidInputRange(arr) {
invariant(arr.length >= 2, 'inputRange must have at least 2 elements');
for (var i = 1; i < arr.length; ++i) {
invariant(arr[i] >= arr[i - 1], 'inputRange must be monotonically increasing ' + arr);
}
}
function checkInfiniteRange(name, arr) {
invariant(arr.length >= 2, name + ' must have at least 2 elements');
invariant(arr.length !== 2 || arr[0] !== -Infinity || arr[1] !== Infinity, name + 'cannot be ]-infinity;+infinity[ ' + arr);
}
module.exports = Interpolation;
}, 230, null, "Interpolation");
__d(/* NativeAnimatedHelper */function(global, require, module, exports) {
'use strict';
var NativeAnimatedModule = require(80 ).NativeAnimatedModule; // 80 = NativeModules
var NativeEventEmitter = require(102 ); // 102 = NativeEventEmitter
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var __nativeAnimatedNodeTagCount = 1;
var __nativeAnimationIdCount = 1;
var nativeEventEmitter = void 0;
var API = {
createAnimatedNode: function createAnimatedNode(tag, config) {
assertNativeAnimatedModule();
NativeAnimatedModule.createAnimatedNode(tag, config);
},
startListeningToAnimatedNodeValue: function startListeningToAnimatedNodeValue(tag) {
assertNativeAnimatedModule();
NativeAnimatedModule.startListeningToAnimatedNodeValue(tag);
},
stopListeningToAnimatedNodeValue: function stopListeningToAnimatedNodeValue(tag) {
assertNativeAnimatedModule();
NativeAnimatedModule.stopListeningToAnimatedNodeValue(tag);
},
connectAnimatedNodes: function connectAnimatedNodes(parentTag, childTag) {
assertNativeAnimatedModule();
NativeAnimatedModule.connectAnimatedNodes(parentTag, childTag);
},
disconnectAnimatedNodes: function disconnectAnimatedNodes(parentTag, childTag) {
assertNativeAnimatedModule();
NativeAnimatedModule.disconnectAnimatedNodes(parentTag, childTag);
},
startAnimatingNode: function startAnimatingNode(animationId, nodeTag, config, endCallback) {
assertNativeAnimatedModule();
NativeAnimatedModule.startAnimatingNode(animationId, nodeTag, config, endCallback);
},
stopAnimation: function stopAnimation(animationId) {
assertNativeAnimatedModule();
NativeAnimatedModule.stopAnimation(animationId);
},
setAnimatedNodeValue: function setAnimatedNodeValue(nodeTag, value) {
assertNativeAnimatedModule();
NativeAnimatedModule.setAnimatedNodeValue(nodeTag, value);
},
setAnimatedNodeOffset: function setAnimatedNodeOffset(nodeTag, offset) {
assertNativeAnimatedModule();
NativeAnimatedModule.setAnimatedNodeOffset(nodeTag, offset);
},
flattenAnimatedNodeOffset: function flattenAnimatedNodeOffset(nodeTag) {
assertNativeAnimatedModule();
NativeAnimatedModule.flattenAnimatedNodeOffset(nodeTag);
},
extractAnimatedNodeOffset: function extractAnimatedNodeOffset(nodeTag) {
assertNativeAnimatedModule();
NativeAnimatedModule.extractAnimatedNodeOffset(nodeTag);
},
connectAnimatedNodeToView: function connectAnimatedNodeToView(nodeTag, viewTag) {
assertNativeAnimatedModule();
NativeAnimatedModule.connectAnimatedNodeToView(nodeTag, viewTag);
},
disconnectAnimatedNodeFromView: function disconnectAnimatedNodeFromView(nodeTag, viewTag) {
assertNativeAnimatedModule();
NativeAnimatedModule.disconnectAnimatedNodeFromView(nodeTag, viewTag);
},
dropAnimatedNode: function dropAnimatedNode(tag) {
assertNativeAnimatedModule();
NativeAnimatedModule.dropAnimatedNode(tag);
},
addAnimatedEventToView: function addAnimatedEventToView(viewTag, eventName, eventMapping) {
assertNativeAnimatedModule();
NativeAnimatedModule.addAnimatedEventToView(viewTag, eventName, eventMapping);
},
removeAnimatedEventFromView: function removeAnimatedEventFromView(viewTag, eventName) {
assertNativeAnimatedModule();
NativeAnimatedModule.removeAnimatedEventFromView(viewTag, eventName);
}
};
var STYLES_WHITELIST = {
opacity: true,
transform: true,
scaleX: true,
scaleY: true,
translateX: true,
translateY: true
};
var TRANSFORM_WHITELIST = {
translateX: true,
translateY: true,
scale: true,
scaleX: true,
scaleY: true,
rotate: true,
rotateX: true,
rotateY: true,
perspective: true
};
function validateTransform(configs) {
configs.forEach(function (config) {
if (!TRANSFORM_WHITELIST.hasOwnProperty(config.property)) {
throw new Error('Property \'' + config.property + '\' is not supported by native animated module');
}
});
}
function validateStyles(styles) {
for (var key in styles) {
if (!STYLES_WHITELIST.hasOwnProperty(key)) {
throw new Error('Style property \'' + key + '\' is not supported by native animated module');
}
}
}
function validateInterpolation(config) {
var SUPPORTED_INTERPOLATION_PARAMS = {
inputRange: true,
outputRange: true,
extrapolate: true,
extrapolateRight: true,
extrapolateLeft: true
};
for (var key in config) {
if (!SUPPORTED_INTERPOLATION_PARAMS.hasOwnProperty(key)) {
throw new Error('Interpolation property \'' + key + '\' is not supported by native animated module');
}
}
}
function generateNewNodeTag() {
return __nativeAnimatedNodeTagCount++;
}
function generateNewAnimationId() {
return __nativeAnimationIdCount++;
}
function assertNativeAnimatedModule() {
invariant(NativeAnimatedModule, 'Native animated module is not available');
}
function isNativeAnimatedAvailable() {
return !!NativeAnimatedModule;
}
module.exports = {
API: API,
validateStyles: validateStyles,
validateTransform: validateTransform,
validateInterpolation: validateInterpolation,
generateNewNodeTag: generateNewNodeTag,
generateNewAnimationId: generateNewAnimationId,
assertNativeAnimatedModule: assertNativeAnimatedModule,
isNativeAnimatedAvailable: isNativeAnimatedAvailable,
get nativeEventEmitter() {
if (!nativeEventEmitter) {
nativeEventEmitter = new NativeEventEmitter(NativeAnimatedModule);
}
return nativeEventEmitter;
}
};
}, 231, null, "NativeAnimatedHelper");
__d(/* SpringConfig */function(global, require, module, exports) {
'use strict';
function tensionFromOrigamiValue(oValue) {
return (oValue - 30) * 3.62 + 194;
}
function frictionFromOrigamiValue(oValue) {
return (oValue - 8) * 3 + 25;
}
function fromOrigamiTensionAndFriction(tension, friction) {
return {
tension: tensionFromOrigamiValue(tension),
friction: frictionFromOrigamiValue(friction)
};
}
function fromBouncinessAndSpeed(bounciness, speed) {
function normalize(value, startValue, endValue) {
return (value - startValue) / (endValue - startValue);
}
function projectNormal(n, start, end) {
return start + n * (end - start);
}
function linearInterpolation(t, start, end) {
return t * end + (1 - t) * start;
}
function quadraticOutInterpolation(t, start, end) {
return linearInterpolation(2 * t - t * t, start, end);
}
function b3Friction1(x) {
return 0.0007 * Math.pow(x, 3) - 0.031 * Math.pow(x, 2) + 0.64 * x + 1.28;
}
function b3Friction2(x) {
return 0.000044 * Math.pow(x, 3) - 0.006 * Math.pow(x, 2) + 0.36 * x + 2;
}
function b3Friction3(x) {
return 0.00000045 * Math.pow(x, 3) - 0.000332 * Math.pow(x, 2) + 0.1078 * x + 5.84;
}
function b3Nobounce(tension) {
if (tension <= 18) {
return b3Friction1(tension);
} else if (tension > 18 && tension <= 44) {
return b3Friction2(tension);
} else {
return b3Friction3(tension);
}
}
var b = normalize(bounciness / 1.7, 0, 20);
b = projectNormal(b, 0, 0.8);
var s = normalize(speed / 1.7, 0, 20);
var bouncyTension = projectNormal(s, 0.5, 200);
var bouncyFriction = quadraticOutInterpolation(b, b3Nobounce(bouncyTension), 0.01);
return {
tension: tensionFromOrigamiValue(bouncyTension),
friction: frictionFromOrigamiValue(bouncyFriction)
};
}
module.exports = {
fromOrigamiTensionAndFriction: fromOrigamiTensionAndFriction,
fromBouncinessAndSpeed: fromBouncinessAndSpeed
};
}, 232, null, "SpringConfig");
__d(/* fbjs/lib/requestAnimationFrame.js */function(global, require, module, exports) {'use strict';
var emptyFunction = require(41 ); // 41 = ./emptyFunction
var nativeRequestAnimationFrame = require(234 ); // 234 = ./nativeRequestAnimationFrame
var lastTime = 0;
var requestAnimationFrame = nativeRequestAnimationFrame || function (callback) {
var currTime = Date.now();
var timeDelay = Math.max(0, 16 - (currTime - lastTime));
lastTime = currTime + timeDelay;
return global.setTimeout(function () {
callback(Date.now());
}, timeDelay);
};
requestAnimationFrame(emptyFunction);
module.exports = requestAnimationFrame;
}, 233, null, "fbjs/lib/requestAnimationFrame.js");
__d(/* fbjs/lib/nativeRequestAnimationFrame.js */function(global, require, module, exports) {"use strict";
var nativeRequestAnimationFrame = global.requestAnimationFrame || global.webkitRequestAnimationFrame || global.mozRequestAnimationFrame || global.oRequestAnimationFrame || global.msRequestAnimationFrame;
module.exports = nativeRequestAnimationFrame;
}, 234, null, "fbjs/lib/nativeRequestAnimationFrame.js");
__d(/* Easing */function(global, require, module, exports) {
'use strict';
var _ease = void 0;
var Easing = function () {
function Easing() {
babelHelpers.classCallCheck(this, Easing);
}
babelHelpers.createClass(Easing, null, [{
key: 'step0',
value: function step0(n) {
return n > 0 ? 1 : 0;
}
}, {
key: 'step1',
value: function step1(n) {
return n >= 1 ? 1 : 0;
}
}, {
key: 'linear',
value: function linear(t) {
return t;
}
}, {
key: 'ease',
value: function ease(t) {
if (!_ease) {
_ease = Easing.bezier(0.42, 0, 1, 1);
}
return _ease(t);
}
}, {
key: 'quad',
value: function quad(t) {
return t * t;
}
}, {
key: 'cubic',
value: function cubic(t) {
return t * t * t;
}
}, {
key: 'poly',
value: function poly(n) {
return function (t) {
return Math.pow(t, n);
};
}
}, {
key: 'sin',
value: function sin(t) {
return 1 - Math.cos(t * Math.PI / 2);
}
}, {
key: 'circle',
value: function circle(t) {
return 1 - Math.sqrt(1 - t * t);
}
}, {
key: 'exp',
value: function exp(t) {
return Math.pow(2, 10 * (t - 1));
}
}, {
key: 'elastic',
value: function elastic() {
var bounciness = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
var p = bounciness * Math.PI;
return function (t) {
return 1 - Math.pow(Math.cos(t * Math.PI / 2), 3) * Math.cos(t * p);
};
}
}, {
key: 'back',
value: function back(s) {
if (s === undefined) {
s = 1.70158;
}
return function (t) {
return t * t * ((s + 1) * t - s);
};
}
}, {
key: 'bounce',
value: function bounce(t) {
if (t < 1 / 2.75) {
return 7.5625 * t * t;
}
if (t < 2 / 2.75) {
t -= 1.5 / 2.75;
return 7.5625 * t * t + 0.75;
}
if (t < 2.5 / 2.75) {
t -= 2.25 / 2.75;
return 7.5625 * t * t + 0.9375;
}
t -= 2.625 / 2.75;
return 7.5625 * t * t + 0.984375;
}
}, {
key: 'bezier',
value: function bezier(x1, y1, x2, y2) {
var _bezier = require(236 ); // 236 = bezier
return _bezier(x1, y1, x2, y2);
}
}, {
key: 'in',
value: function _in(easing) {
return easing;
}
}, {
key: 'out',
value: function out(easing) {
return function (t) {
return 1 - easing(1 - t);
};
}
}, {
key: 'inOut',
value: function inOut(easing) {
return function (t) {
if (t < 0.5) {
return easing(t * 2) / 2;
}
return 1 - easing((1 - t) * 2) / 2;
};
}
}]);
return Easing;
}();
module.exports = Easing;
}, 235, null, "Easing");
__d(/* bezier */function(global, require, module, exports) {
'use strict';
var NEWTON_ITERATIONS = 4;
var NEWTON_MIN_SLOPE = 0.001;
var SUBDIVISION_PRECISION = 0.0000001;
var SUBDIVISION_MAX_ITERATIONS = 10;
var kSplineTableSize = 11;
var kSampleStepSize = 1.0 / (kSplineTableSize - 1.0);
var float32ArraySupported = typeof Float32Array === 'function';
function A(aA1, aA2) {
return 1.0 - 3.0 * aA2 + 3.0 * aA1;
}
function B(aA1, aA2) {
return 3.0 * aA2 - 6.0 * aA1;
}
function C(aA1) {
return 3.0 * aA1;
}
function calcBezier(aT, aA1, aA2) {
return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT;
}
function getSlope(aT, aA1, aA2) {
return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1);
}
function binarySubdivide(aX, aA, aB, mX1, mX2) {
var currentX,
currentT,
i = 0;
do {
currentT = aA + (aB - aA) / 2.0;
currentX = calcBezier(currentT, mX1, mX2) - aX;
if (currentX > 0.0) {
aB = currentT;
} else {
aA = currentT;
}
} while (Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS);
return currentT;
}
function newtonRaphsonIterate(aX, aGuessT, mX1, mX2) {
for (var i = 0; i < NEWTON_ITERATIONS; ++i) {
var currentSlope = getSlope(aGuessT, mX1, mX2);
if (currentSlope === 0.0) {
return aGuessT;
}
var currentX = calcBezier(aGuessT, mX1, mX2) - aX;
aGuessT -= currentX / currentSlope;
}
return aGuessT;
}
module.exports = function bezier(mX1, mY1, mX2, mY2) {
if (!(0 <= mX1 && mX1 <= 1 && 0 <= mX2 && mX2 <= 1)) {
throw new Error('bezier x values must be in [0, 1] range');
}
var sampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize);
if (mX1 !== mY1 || mX2 !== mY2) {
for (var i = 0; i < kSplineTableSize; ++i) {
sampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);
}
}
function getTForX(aX) {
var intervalStart = 0.0;
var currentSample = 1;
var lastSample = kSplineTableSize - 1;
for (; currentSample !== lastSample && sampleValues[currentSample] <= aX; ++currentSample) {
intervalStart += kSampleStepSize;
}
--currentSample;
var dist = (aX - sampleValues[currentSample]) / (sampleValues[currentSample + 1] - sampleValues[currentSample]);
var guessForT = intervalStart + dist * kSampleStepSize;
var initialSlope = getSlope(guessForT, mX1, mX2);
if (initialSlope >= NEWTON_MIN_SLOPE) {
return newtonRaphsonIterate(aX, guessForT, mX1, mX2);
} else if (initialSlope === 0.0) {
return guessForT;
} else {
return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2);
}
}
return function BezierEasing(x) {
if (mX1 === mY1 && mX2 === mY2) {
return x;
}
if (x === 0) {
return 0;
}
if (x === 1) {
return 1;
}
return calcBezier(getTForX(x), mY1, mY2);
};
};
}, 236, null, "bezier");
__d(/* Image */function(global, require, module, exports) {
'use strict';
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/node_modules/react-native/Libraries/Image/Image.ios.js';
var EdgeInsetsPropType = require(147 ); // 147 = EdgeInsetsPropType
var ImageResizeMode = require(132 ); // 132 = ImageResizeMode
var ImageSourcePropType = require(238 ); // 238 = ImageSourcePropType
var ImageStylePropTypes = require(131 ); // 131 = ImageStylePropTypes
var NativeMethodsMixin = require(73 ); // 73 = NativeMethodsMixin
var NativeModules = require(80 ); // 80 = NativeModules
var React = require(126 ); // 126 = React
var ReactNativeViewAttributes = require(152 ); // 152 = ReactNativeViewAttributes
var StyleSheet = require(127 ); // 127 = StyleSheet
var StyleSheetPropType = require(153 ); // 153 = StyleSheetPropType
var flattenStyle = require(77 ); // 77 = flattenStyle
var requireNativeComponent = require(155 ); // 155 = requireNativeComponent
var resolveAssetSource = require(198 ); // 198 = resolveAssetSource
var PropTypes = React.PropTypes;
var ImageViewManager = NativeModules.ImageViewManager;
var Image = React.createClass({
displayName: 'Image',
propTypes: {
style: StyleSheetPropType(ImageStylePropTypes),
source: ImageSourcePropType,
defaultSource: PropTypes.oneOfType([PropTypes.shape({
uri: PropTypes.string,
width: PropTypes.number,
height: PropTypes.number,
scale: PropTypes.number
}), PropTypes.number]),
accessible: PropTypes.bool,
accessibilityLabel: PropTypes.string,
blurRadius: PropTypes.number,
capInsets: EdgeInsetsPropType,
resizeMethod: PropTypes.oneOf(['auto', 'resize', 'scale']),
resizeMode: PropTypes.oneOf(['cover', 'contain', 'stretch', 'repeat', 'center']),
testID: PropTypes.string,
onLayout: PropTypes.func,
onLoadStart: PropTypes.func,
onProgress: PropTypes.func,
onError: PropTypes.func,
onPartialLoad: PropTypes.func,
onLoad: PropTypes.func,
onLoadEnd: PropTypes.func
},
statics: {
resizeMode: ImageResizeMode,
getSize: function getSize(uri, success, failure) {
ImageViewManager.getSize(uri, success, failure || function () {
console.warn('Failed to get size for image: ' + uri);
});
},
prefetch: function prefetch(url) {
return ImageViewManager.prefetchImage(url);
},
resolveAssetSource: resolveAssetSource
},
mixins: [NativeMethodsMixin],
viewConfig: {
uiViewClassName: 'UIView',
validAttributes: ReactNativeViewAttributes.UIView
},
render: function render() {
var source = resolveAssetSource(this.props.source) || { uri: undefined, width: undefined, height: undefined };
var sources = void 0;
var style = void 0;
if (Array.isArray(source)) {
style = flattenStyle([styles.base, this.props.style]) || {};
sources = source;
} else {
var _width = source.width,
_height = source.height,
uri = source.uri;
style = flattenStyle([{ width: _width, height: _height }, styles.base, this.props.style]) || {};
sources = [source];
if (uri === '') {
console.warn('source.uri should not be an empty string');
}
}
var resizeMode = this.props.resizeMode || (style || {}).resizeMode || 'cover';
var tintColor = (style || {}).tintColor;
if (this.props.src) {
console.warn('The <Image> component requires a `source` property rather than `src`.');
}
return React.createElement(RCTImageView, babelHelpers.extends({}, this.props, {
style: style,
resizeMode: resizeMode,
tintColor: tintColor,
source: sources,
__source: {
fileName: _jsxFileName,
lineNumber: 366
}
}));
}
});
var styles = StyleSheet.create({
base: {
overflow: 'hidden'
}
});
var RCTImageView = requireNativeComponent('RCTImageView', Image);
module.exports = Image;
}, 237, null, "Image");
__d(/* ImageSourcePropType */function(global, require, module, exports) {
'use strict';
var _require = require(126 ), // 126 = React
PropTypes = _require.PropTypes;
var ImageURISourcePropType = PropTypes.shape({
uri: PropTypes.string,
bundle: PropTypes.string,
method: PropTypes.string,
headers: PropTypes.objectOf(PropTypes.string),
body: PropTypes.string,
cache: PropTypes.oneOf(['default', 'reload', 'force-cache', 'only-if-cached']),
width: PropTypes.number,
height: PropTypes.number,
scale: PropTypes.number
});
var ImageSourcePropType = PropTypes.oneOfType([ImageURISourcePropType, PropTypes.number, PropTypes.arrayOf(ImageURISourcePropType)]);
module.exports = ImageSourcePropType;
}, 238, null, "ImageSourcePropType");
__d(/* ScrollView */function(global, require, module, exports) {
'use strict';
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/node_modules/react-native/Libraries/Components/ScrollView/ScrollView.js';
var ColorPropType = require(71 ); // 71 = ColorPropType
var EdgeInsetsPropType = require(147 ); // 147 = EdgeInsetsPropType
var Platform = require(79 ); // 79 = Platform
var PointPropType = require(240 ); // 240 = PointPropType
var React = require(126 ); // 126 = React
var ReactNative = require(241 ); // 241 = ReactNative
var ScrollResponder = require(291 ); // 291 = ScrollResponder
var StyleSheet = require(127 ); // 127 = StyleSheet
var StyleSheetPropType = require(153 ); // 153 = StyleSheetPropType
var View = require(146 ); // 146 = View
var ViewStylePropTypes = require(140 ); // 140 = ViewStylePropTypes
var dismissKeyboard = require(110 ); // 110 = dismissKeyboard
var flattenStyle = require(77 ); // 77 = flattenStyle
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var processDecelerationRate = require(293 ); // 293 = processDecelerationRate
var PropTypes = React.PropTypes;
var requireNativeComponent = require(155 ); // 155 = requireNativeComponent
var ScrollView = React.createClass({
displayName: 'ScrollView',
propTypes: babelHelpers.extends({}, View.propTypes, {
automaticallyAdjustContentInsets: PropTypes.bool,
contentInset: EdgeInsetsPropType,
contentOffset: PointPropType,
bounces: PropTypes.bool,
bouncesZoom: PropTypes.bool,
alwaysBounceHorizontal: PropTypes.bool,
alwaysBounceVertical: PropTypes.bool,
centerContent: PropTypes.bool,
contentContainerStyle: StyleSheetPropType(ViewStylePropTypes),
decelerationRate: PropTypes.oneOfType([PropTypes.oneOf(['fast', 'normal']), PropTypes.number]),
horizontal: PropTypes.bool,
indicatorStyle: PropTypes.oneOf(['default', 'black', 'white']),
directionalLockEnabled: PropTypes.bool,
canCancelContentTouches: PropTypes.bool,
keyboardDismissMode: PropTypes.oneOf(['none', 'interactive', 'on-drag']),
keyboardShouldPersistTaps: PropTypes.oneOf(['always', 'never', 'handled', false, true]),
maximumZoomScale: PropTypes.number,
minimumZoomScale: PropTypes.number,
onScroll: PropTypes.func,
onScrollAnimationEnd: PropTypes.func,
onContentSizeChange: PropTypes.func,
pagingEnabled: PropTypes.bool,
scrollEnabled: PropTypes.bool,
scrollEventThrottle: PropTypes.number,
scrollIndicatorInsets: EdgeInsetsPropType,
scrollsToTop: PropTypes.bool,
showsHorizontalScrollIndicator: PropTypes.bool,
showsVerticalScrollIndicator: PropTypes.bool,
stickyHeaderIndices: PropTypes.arrayOf(PropTypes.number),
style: StyleSheetPropType(ViewStylePropTypes),
snapToInterval: PropTypes.number,
snapToAlignment: PropTypes.oneOf(['start', 'center', 'end']),
removeClippedSubviews: PropTypes.bool,
zoomScale: PropTypes.number,
refreshControl: PropTypes.element,
endFillColor: ColorPropType,
scrollPerfTag: PropTypes.string,
overScrollMode: PropTypes.oneOf(['auto', 'always', 'never'])
}),
mixins: [ScrollResponder.Mixin],
getInitialState: function getInitialState() {
return this.scrollResponderMixinGetInitialState();
},
setNativeProps: function setNativeProps(props) {
this._scrollViewRef && this._scrollViewRef.setNativeProps(props);
},
getScrollResponder: function getScrollResponder() {
return this;
},
getScrollableNode: function getScrollableNode() {
return ReactNative.findNodeHandle(this._scrollViewRef);
},
getInnerViewNode: function getInnerViewNode() {
return ReactNative.findNodeHandle(this._innerViewRef);
},
scrollTo: function scrollTo(y, x, animated) {
if (typeof y === 'number') {
console.warn('`scrollTo(y, x, animated)` is deprecated. Use `scrollTo({x: 5, y: 5, animated: true})` instead.');
} else {
var _ref = y || {};
x = _ref.x;
y = _ref.y;
animated = _ref.animated;
}
this.getScrollResponder().scrollResponderScrollTo({ x: x || 0, y: y || 0, animated: animated !== false });
},
scrollToEnd: function scrollToEnd(options) {
var animated = (options && options.animated) !== false;
this.getScrollResponder().scrollResponderScrollToEnd({
animated: animated
});
},
scrollWithoutAnimationTo: function scrollWithoutAnimationTo() {
var y = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
var x = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
console.warn('`scrollWithoutAnimationTo` is deprecated. Use `scrollTo` instead');
this.scrollTo({ x: x, y: y, animated: false });
},
_handleScroll: function _handleScroll(e) {
if (__DEV__) {
if (this.props.onScroll && this.props.scrollEventThrottle == null && Platform.OS === 'ios') {
console.log('You specified `onScroll` on a <ScrollView> but not ' + '`scrollEventThrottle`. You will only receive one event. ' + 'Using `16` you get all the events but be aware that it may ' + 'cause frame drops, use a bigger number if you don\'t need as ' + 'much precision.');
}
}
if (Platform.OS === 'android') {
if (this.props.keyboardDismissMode === 'on-drag') {
dismissKeyboard();
}
}
this.scrollResponderHandleScroll(e);
},
_handleContentOnLayout: function _handleContentOnLayout(e) {
var _e$nativeEvent$layout = e.nativeEvent.layout,
width = _e$nativeEvent$layout.width,
height = _e$nativeEvent$layout.height;
this.props.onContentSizeChange && this.props.onContentSizeChange(width, height);
},
_scrollViewRef: null,
_setScrollViewRef: function _setScrollViewRef(ref) {
this._scrollViewRef = ref;
},
_innerViewRef: null,
_setInnerViewRef: function _setInnerViewRef(ref) {
this._innerViewRef = ref;
},
render: function render() {
var contentContainerStyle = [this.props.horizontal && styles.contentContainerHorizontal, this.props.contentContainerStyle];
var style = void 0,
childLayoutProps = void 0;
if (__DEV__ && this.props.style) {
style = flattenStyle(this.props.style);
childLayoutProps = ['alignItems', 'justifyContent'].filter(function (prop) {
return style && style[prop] !== undefined;
});
invariant(childLayoutProps.length === 0, 'ScrollView child layout (' + JSON.stringify(childLayoutProps) + ') must be applied through the contentContainerStyle prop.');
}
var contentSizeChangeProps = {};
if (this.props.onContentSizeChange) {
contentSizeChangeProps = {
onLayout: this._handleContentOnLayout
};
}
var contentContainer = React.createElement(
View,
babelHelpers.extends({}, contentSizeChangeProps, {
ref: this._setInnerViewRef,
style: contentContainerStyle,
removeClippedSubviews: this.props.removeClippedSubviews,
collapsable: false, __source: {
fileName: _jsxFileName,
lineNumber: 510
}
}),
this.props.children
);
var alwaysBounceHorizontal = this.props.alwaysBounceHorizontal !== undefined ? this.props.alwaysBounceHorizontal : this.props.horizontal;
var alwaysBounceVertical = this.props.alwaysBounceVertical !== undefined ? this.props.alwaysBounceVertical : !this.props.horizontal;
var baseStyle = this.props.horizontal ? styles.baseHorizontal : styles.baseVertical;
var props = babelHelpers.extends({}, this.props, {
alwaysBounceHorizontal: alwaysBounceHorizontal,
alwaysBounceVertical: alwaysBounceVertical,
style: [baseStyle, this.props.style],
onContentSizeChange: null,
onTouchStart: this.scrollResponderHandleTouchStart,
onTouchMove: this.scrollResponderHandleTouchMove,
onTouchEnd: this.scrollResponderHandleTouchEnd,
onScrollBeginDrag: this.scrollResponderHandleScrollBeginDrag,
onScrollEndDrag: this.scrollResponderHandleScrollEndDrag,
onMomentumScrollBegin: this.scrollResponderHandleMomentumScrollBegin,
onMomentumScrollEnd: this.scrollResponderHandleMomentumScrollEnd,
onStartShouldSetResponder: this.scrollResponderHandleStartShouldSetResponder,
onStartShouldSetResponderCapture: this.scrollResponderHandleStartShouldSetResponderCapture,
onScrollShouldSetResponder: this.scrollResponderHandleScrollShouldSetResponder,
onScroll: this._handleScroll,
onResponderGrant: this.scrollResponderHandleResponderGrant,
onResponderTerminationRequest: this.scrollResponderHandleTerminationRequest,
onResponderTerminate: this.scrollResponderHandleTerminate,
onResponderRelease: this.scrollResponderHandleResponderRelease,
onResponderReject: this.scrollResponderHandleResponderReject,
sendMomentumEvents: this.props.onMomentumScrollBegin || this.props.onMomentumScrollEnd ? true : false
});
var decelerationRate = this.props.decelerationRate;
if (decelerationRate) {
props.decelerationRate = processDecelerationRate(decelerationRate);
}
var ScrollViewClass = void 0;
if (Platform.OS === 'ios') {
ScrollViewClass = RCTScrollView;
} else if (Platform.OS === 'android') {
if (this.props.horizontal) {
ScrollViewClass = AndroidHorizontalScrollView;
} else {
ScrollViewClass = AndroidScrollView;
}
}
invariant(ScrollViewClass !== undefined, 'ScrollViewClass must not be undefined');
var refreshControl = this.props.refreshControl;
if (refreshControl) {
if (Platform.OS === 'ios') {
return React.createElement(
ScrollViewClass,
babelHelpers.extends({}, props, { ref: this._setScrollViewRef, __source: {
fileName: _jsxFileName,
lineNumber: 582
}
}),
refreshControl,
contentContainer
);
} else if (Platform.OS === 'android') {
return React.cloneElement(refreshControl, { style: props.style }, React.createElement(
ScrollViewClass,
babelHelpers.extends({}, props, { style: baseStyle, ref: this._setScrollViewRef, __source: {
fileName: _jsxFileName,
lineNumber: 597
}
}),
contentContainer
));
}
}
return React.createElement(
ScrollViewClass,
babelHelpers.extends({}, props, { ref: this._setScrollViewRef, __source: {
fileName: _jsxFileName,
lineNumber: 604
}
}),
contentContainer
);
}
});
var styles = StyleSheet.create({
baseVertical: {
flexGrow: 1,
flexShrink: 1,
flexDirection: 'column',
overflow: 'scroll'
},
baseHorizontal: {
flexGrow: 1,
flexShrink: 1,
flexDirection: 'row',
overflow: 'scroll'
},
contentContainerHorizontal: {
flexDirection: 'row'
}
});
var nativeOnlyProps = void 0,
AndroidScrollView = void 0,
AndroidHorizontalScrollView = void 0,
RCTScrollView = void 0;
if (Platform.OS === 'android') {
nativeOnlyProps = {
nativeOnly: {
sendMomentumEvents: true
}
};
AndroidScrollView = requireNativeComponent('RCTScrollView', ScrollView, nativeOnlyProps);
AndroidHorizontalScrollView = requireNativeComponent('AndroidHorizontalScrollView', ScrollView, nativeOnlyProps);
} else if (Platform.OS === 'ios') {
nativeOnlyProps = {
nativeOnly: {
onMomentumScrollBegin: true,
onMomentumScrollEnd: true,
onScrollBeginDrag: true,
onScrollEndDrag: true
}
};
RCTScrollView = requireNativeComponent('RCTScrollView', ScrollView, nativeOnlyProps);
}
module.exports = ScrollView;
}, 239, null, "ScrollView");
__d(/* PointPropType */function(global, require, module, exports) {
'use strict';
var PropTypes = require(126 ).PropTypes; // 126 = React
var createStrictShapeTypeChecker = require(148 ); // 148 = createStrictShapeTypeChecker
var PointPropType = createStrictShapeTypeChecker({
x: PropTypes.number,
y: PropTypes.number
});
module.exports = PointPropType;
}, 240, null, "PointPropType");
__d(/* ReactNative */function(global, require, module, exports) {
'use strict';
var ReactNativeComponentTree = require(159 ); // 159 = ReactNativeComponentTree
var ReactNativeDefaultInjection = require(242 ); // 242 = ReactNativeDefaultInjection
var ReactNativeMount = require(265 ); // 265 = ReactNativeMount
var ReactUpdates = require(169 ); // 169 = ReactUpdates
var findNodeHandle = require(124 ); // 124 = findNodeHandle
ReactNativeDefaultInjection.inject();
var render = function render(element, mountInto, callback) {
return ReactNativeMount.renderComponent(element, mountInto, callback);
};
var ReactNative = {
hasReactNativeInitialized: false,
findNodeHandle: findNodeHandle,
render: render,
unmountComponentAtNode: ReactNativeMount.unmountComponentAtNode,
unstable_batchedUpdates: ReactUpdates.batchedUpdates,
unmountComponentAtNodeAndRemoveContainer: ReactNativeMount.unmountComponentAtNodeAndRemoveContainer
};
if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject === 'function') {
__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({
ComponentTree: {
getClosestInstanceFromNode: function getClosestInstanceFromNode(node) {
return ReactNativeComponentTree.getClosestInstanceFromNode(node);
},
getNodeFromInstance: function getNodeFromInstance(inst) {
while (inst._renderedComponent) {
inst = inst._renderedComponent;
}
if (inst) {
return ReactNativeComponentTree.getNodeFromInstance(inst);
} else {
return null;
}
}
},
Mount: ReactNativeMount,
Reconciler: require(173 ) // 173 = ReactReconciler
});
}
module.exports = ReactNative;
}, 241, null, "ReactNative");
__d(/* ReactNativeDefaultInjection */function(global, require, module, exports) {
'use strict';
require(243 ); // 243 = InitializeCore
var EventPluginHub = require(161 ); // 161 = EventPluginHub
var EventPluginUtils = require(163 ); // 163 = EventPluginUtils
var RCTEventEmitter = require(274 ); // 274 = RCTEventEmitter
var React = require(126 ); // 126 = React
var ReactComponentEnvironment = require(179 ); // 179 = ReactComponentEnvironment
var ReactDefaultBatchingStrategy = require(275 ); // 275 = ReactDefaultBatchingStrategy
var ReactEmptyComponent = require(189 ); // 189 = ReactEmptyComponent
var ReactNativeBridgeEventPlugin = require(276 ); // 276 = ReactNativeBridgeEventPlugin
var ReactHostComponent = require(190 ); // 190 = ReactHostComponent
var ReactNativeComponentEnvironment = require(279 ); // 279 = ReactNativeComponentEnvironment
var ReactNativeComponentTree = require(159 ); // 159 = ReactNativeComponentTree
var ReactNativeEventEmitter = require(160 ); // 160 = ReactNativeEventEmitter
var ReactNativeEventPluginOrder = require(282 ); // 282 = ReactNativeEventPluginOrder
var ReactNativeGlobalResponderHandler = require(283 ); // 283 = ReactNativeGlobalResponderHandler
var ReactNativeTextComponent = require(284 ); // 284 = ReactNativeTextComponent
var ReactNativeTreeTraversal = require(285 ); // 285 = ReactNativeTreeTraversal
var ReactSimpleEmptyComponent = require(286 ); // 286 = ReactSimpleEmptyComponent
var ReactUpdates = require(169 ); // 169 = ReactUpdates
var ResponderEventPlugin = require(287 ); // 287 = ResponderEventPlugin
var invariant = require(44 ); // 44 = fbjs/lib/invariant
function inject() {
RCTEventEmitter.register(ReactNativeEventEmitter);
EventPluginHub.injection.injectEventPluginOrder(ReactNativeEventPluginOrder);
EventPluginUtils.injection.injectComponentTree(ReactNativeComponentTree);
EventPluginUtils.injection.injectTreeTraversal(ReactNativeTreeTraversal);
ResponderEventPlugin.injection.injectGlobalResponderHandler(ReactNativeGlobalResponderHandler);
EventPluginHub.injection.injectEventPluginsByName({
'ResponderEventPlugin': ResponderEventPlugin,
'ReactNativeBridgeEventPlugin': ReactNativeBridgeEventPlugin
});
ReactUpdates.injection.injectReconcileTransaction(ReactNativeComponentEnvironment.ReactReconcileTransaction);
ReactUpdates.injection.injectBatchingStrategy(ReactDefaultBatchingStrategy);
ReactComponentEnvironment.injection.injectEnvironment(ReactNativeComponentEnvironment);
var EmptyComponent = function EmptyComponent(instantiate) {
var View = require(146 ); // 146 = View
return new ReactSimpleEmptyComponent(React.createElement(View, {
collapsable: true,
style: { position: 'absolute' }
}), instantiate);
};
ReactEmptyComponent.injection.injectEmptyComponentFactory(EmptyComponent);
ReactHostComponent.injection.injectTextComponentClass(ReactNativeTextComponent);
ReactHostComponent.injection.injectGenericComponentClass(function (tag) {
var info = '';
if (typeof tag === 'string' && /^[a-z]/.test(tag)) {
info += ' Each component name should start with an uppercase letter.';
}
invariant(false, 'Expected a component class, got %s.%s', tag, info);
});
}
module.exports = {
inject: inject
};
}, 242, null, "ReactNativeDefaultInjection");
__d(/* InitializeCore */function(global, require, module, exports) {
'use strict';
if (global.GLOBAL === undefined) {
global.GLOBAL = global;
}
if (global.window === undefined) {
global.window = global;
}
var defineLazyObjectProperty = require(122 ); // 122 = defineLazyObjectProperty
function defineProperty(object, name, getValue, eager) {
var descriptor = Object.getOwnPropertyDescriptor(object, name);
if (descriptor) {
var backupName = 'original' + name[0].toUpperCase() + name.substr(1);
Object.defineProperty(object, backupName, babelHelpers.extends({}, descriptor, {
value: object[name]
}));
}
var _ref = descriptor || {},
enumerable = _ref.enumerable,
writable = _ref.writable,
configurable = _ref.configurable;
if (descriptor && !configurable) {
console.error('Failed to set polyfill. ' + name + ' is not configurable.');
return;
}
if (eager === true) {
Object.defineProperty(object, name, {
configurable: true,
enumerable: enumerable !== false,
writable: writable !== false,
value: getValue()
});
} else {
defineLazyObjectProperty(object, name, {
get: getValue,
enumerable: enumerable !== false,
writable: writable !== false
});
}
}
global.process = global.process || {};
global.process.env = global.process.env || {};
if (!global.process.env.NODE_ENV) {
global.process.env.NODE_ENV = __DEV__ ? 'development' : 'production';
}
var Systrace = require(85 ); // 85 = Systrace
Systrace.setEnabled(global.__RCTProfileIsProfiling || false);
var ExceptionsManager = require(244 ); // 244 = ExceptionsManager
ExceptionsManager.installConsoleErrorReporter();
require(249 ); // 249 = RCTLog
if (!global.__fbDisableExceptionsManager) {
var handleError = function handleError(e, isFatal) {
try {
ExceptionsManager.handleException(e, isFatal);
} catch (ee) {
console.log('Failed to print error: ', ee.message);
throw e;
}
};
var ErrorUtils = require(83 ); // 83 = ErrorUtils
ErrorUtils.setGlobalHandler(handleError);
}
var defineLazyTimer = function defineLazyTimer(name) {
defineProperty(global, name, function () {
return require(92 )[name]; // 92 = JSTimers
});
};
defineLazyTimer('setTimeout');
defineLazyTimer('setInterval');
defineLazyTimer('setImmediate');
defineLazyTimer('clearTimeout');
defineLazyTimer('clearInterval');
defineLazyTimer('clearImmediate');
defineLazyTimer('requestAnimationFrame');
defineLazyTimer('cancelAnimationFrame');
defineLazyTimer('requestIdleCallback');
defineLazyTimer('cancelIdleCallback');
if (!global.alert) {
global.alert = function (text) {
require(250 ).alert('Alert', '' + text); // 250 = Alert
};
}
defineProperty(global, 'Promise', function () {
return require(252 ); // 252 = Promise
});
defineProperty(global, 'regeneratorRuntime', function () {
delete global.regeneratorRuntime;
require(258 ); // 258 = regenerator-runtime/runtime
return global.regeneratorRuntime;
});
defineProperty(global, 'XMLHttpRequest', function () {
return require(259 ); // 259 = XMLHttpRequest
});
defineProperty(global, 'FormData', function () {
return require(261 ); // 261 = FormData
});
defineProperty(global, 'fetch', function () {
return require(247 ).fetch; // 247 = fetch
});
defineProperty(global, 'Headers', function () {
return require(247 ).Headers; // 247 = fetch
});
defineProperty(global, 'Request', function () {
return require(247 ).Request; // 247 = fetch
});
defineProperty(global, 'Response', function () {
return require(247 ).Response; // 247 = fetch
});
defineProperty(global, 'WebSocket', function () {
return require(101 ); // 101 = WebSocket
});
var navigator = global.navigator;
if (navigator === undefined) {
global.navigator = navigator = {};
}
defineProperty(navigator, 'product', function () {
return 'ReactNative';
}, true);
defineProperty(navigator, 'geolocation', function () {
return require(263 ); // 263 = Geolocation
});
defineProperty(global, 'Map', function () {
return require(223 ); // 223 = Map
}, true);
defineProperty(global, 'Set', function () {
return require(222 ); // 222 = Set
}, true);
if (__DEV__) {
if (!window.document) {
var setupDevtools = require(264 ); // 264 = setupDevtools
setupDevtools();
}
require(268 ); // 268 = RCTDebugComponentOwnership
}
if (__DEV__) {
var JSInspector = require(269 ); // 269 = JSInspector
JSInspector.registerAgent(require(270 )); // 270 = NetworkAgent
}
require(107 ); // 107 = RCTDeviceEventEmitter
require(272 ); // 272 = RCTNativeAppEventEmitter
require(273 ); // 273 = PerformanceLogger
}, 243, null, "InitializeCore");
__d(/* ExceptionsManager */function(global, require, module, exports) {
'use strict';
var exceptionID = 0;
function reportException(e, isFatal) {
var _require = require(80 ), // 80 = NativeModules
ExceptionsManager = _require.ExceptionsManager;
if (ExceptionsManager) {
var parseErrorStack = require(93 ); // 93 = parseErrorStack
var stack = parseErrorStack(e);
var currentExceptionID = ++exceptionID;
if (isFatal) {
ExceptionsManager.reportFatalException(e.message, stack, currentExceptionID);
} else {
ExceptionsManager.reportSoftException(e.message, stack, currentExceptionID);
}
if (__DEV__) {
var symbolicateStackTrace = require(245 ); // 245 = symbolicateStackTrace
symbolicateStackTrace(stack).then(function (prettyStack) {
if (prettyStack) {
ExceptionsManager.updateExceptionMessage(e.message, prettyStack, currentExceptionID);
} else {
throw new Error('The stack is null');
}
}).catch(function (error) {
return console.warn('Unable to symbolicate stack trace: ' + error.message);
});
}
}
}
function handleException(e, isFatal) {
if (!e.message) {
e = new Error(e);
}
if (console._errorOriginal) {
console._errorOriginal(e.message);
} else {
console.error(e.message);
}
reportException(e, isFatal);
}
function reactConsoleErrorHandler() {
console._errorOriginal.apply(console, arguments);
if (!console.reportErrorsAsExceptions) {
return;
}
if (arguments[0] && arguments[0].stack) {
reportException(arguments[0], false);
} else {
var stringifySafe = require(97 ); // 97 = stringifySafe
var str = Array.prototype.map.call(arguments, stringifySafe).join(', ');
if (str.slice(0, 10) === '"Warning: ') {
return;
}
var error = new Error('console.error: ' + str);
error.framesToPop = 1;
reportException(error, false);
}
}
function installConsoleErrorReporter() {
if (console._errorOriginal) {
return;
}
console._errorOriginal = console.error.bind(console);
console.error = reactConsoleErrorHandler;
if (console.reportErrorsAsExceptions === undefined) {
console.reportErrorsAsExceptions = true;
}
}
module.exports = { handleException: handleException, installConsoleErrorReporter: installConsoleErrorReporter };
}, 244, null, "ExceptionsManager");
__d(/* symbolicateStackTrace */function(global, require, module, exports) {
'use strict';
var getDevServer = require(246 ); // 246 = getDevServer
var _require = require(80 ), // 80 = NativeModules
SourceCode = _require.SourceCode;
var fetch = void 0;
function isSourcedFromDisk(sourcePath) {
return !/^http/.test(sourcePath) && /[\\/]/.test(sourcePath);
}
function symbolicateStackTrace(stack) {
var devServer, stackCopy, foundInternalSource, response, json;
return regeneratorRuntime.async(function symbolicateStackTrace$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
if (!fetch) {
fetch = global.fetch || require(247 ).fetch; // 247 = fetch
}
devServer = getDevServer();
if (devServer.bundleLoadedFromServer) {
_context.next = 4;
break;
}
throw new Error('Bundle was not loaded from the packager');
case 4:
stackCopy = stack;
if (SourceCode.scriptURL) {
foundInternalSource = false;
stackCopy = stack.map(function (frame) {
if (!foundInternalSource && isSourcedFromDisk(frame.file)) {
return babelHelpers.extends({}, frame, { file: SourceCode.scriptURL });
}
foundInternalSource = true;
return frame;
});
}
_context.next = 8;
return regeneratorRuntime.awrap(fetch(devServer.url + 'symbolicate', {
method: 'POST',
body: JSON.stringify({ stack: stackCopy })
}));
case 8:
response = _context.sent;
_context.next = 11;
return regeneratorRuntime.awrap(response.json());
case 11:
json = _context.sent;
return _context.abrupt('return', json.stack);
case 13:
case 'end':
return _context.stop();
}
}
}, null, this);
}
module.exports = symbolicateStackTrace;
}, 245, null, "symbolicateStackTrace");
__d(/* getDevServer */function(global, require, module, exports) {
'use strict';
var _require = require(80 ), // 80 = NativeModules
SourceCode = _require.SourceCode;
var _cachedDevServerURL = void 0;
var FALLBACK = 'http://localhost:8081/';
function getDevServer() {
if (_cachedDevServerURL === undefined) {
var match = SourceCode.scriptURL && SourceCode.scriptURL.match(/^https?:\/\/.*?\//);
_cachedDevServerURL = match ? match[0] : null;
}
return {
url: _cachedDevServerURL || FALLBACK,
bundleLoadedFromServer: _cachedDevServerURL !== null
};
}
module.exports = getDevServer;
}, 246, null, "getDevServer");
__d(/* fetch */function(global, require, module, exports) {
'use strict';
require(248 ); // 248 = whatwg-fetch
module.exports = { fetch: fetch, Headers: Headers, Request: Request, Response: Response };
}, 247, null, "fetch");
__d(/* whatwg-fetch/fetch.js */function(global, require, module, exports) {(function (self) {
'use strict';
if (self.fetch) {
return;
}
var support = {
searchParams: 'URLSearchParams' in self,
iterable: 'Symbol' in self && 'iterator' in Symbol,
blob: 'FileReader' in self && 'Blob' in self && function () {
try {
new Blob();
return true;
} catch (e) {
return false;
}
}(),
formData: 'FormData' in self,
arrayBuffer: 'ArrayBuffer' in self
};
if (support.arrayBuffer) {
var viewClasses = ['[object Int8Array]', '[object Uint8Array]', '[object Uint8ClampedArray]', '[object Int16Array]', '[object Uint16Array]', '[object Int32Array]', '[object Uint32Array]', '[object Float32Array]', '[object Float64Array]'];
var isDataView = function isDataView(obj) {
return obj && DataView.prototype.isPrototypeOf(obj);
};
var isArrayBufferView = ArrayBuffer.isView || function (obj) {
return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1;
};
}
function normalizeName(name) {
if (typeof name !== 'string') {
name = String(name);
}
if (/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(name)) {
throw new TypeError('Invalid character in header field name');
}
return name.toLowerCase();
}
function normalizeValue(value) {
if (typeof value !== 'string') {
value = String(value);
}
return value;
}
function iteratorFor(items) {
var iterator = {
next: function next() {
var value = items.shift();
return { done: value === undefined, value: value };
}
};
if (support.iterable) {
iterator[typeof Symbol === 'function' ? Symbol.iterator : '@@iterator'] = function () {
return iterator;
};
}
return iterator;
}
function Headers(headers) {
this.map = {};
if (headers instanceof Headers) {
headers.forEach(function (value, name) {
this.append(name, value);
}, this);
} else if (headers) {
Object.getOwnPropertyNames(headers).forEach(function (name) {
this.append(name, headers[name]);
}, this);
}
}
Headers.prototype.append = function (name, value) {
name = normalizeName(name);
value = normalizeValue(value);
var list = this.map[name];
if (!list) {
list = [];
this.map[name] = list;
}
list.push(value);
};
Headers.prototype['delete'] = function (name) {
delete this.map[normalizeName(name)];
};
Headers.prototype.get = function (name) {
var values = this.map[normalizeName(name)];
return values ? values[0] : null;
};
Headers.prototype.getAll = function (name) {
return this.map[normalizeName(name)] || [];
};
Headers.prototype.has = function (name) {
return this.map.hasOwnProperty(normalizeName(name));
};
Headers.prototype.set = function (name, value) {
this.map[normalizeName(name)] = [normalizeValue(value)];
};
Headers.prototype.forEach = function (callback, thisArg) {
Object.getOwnPropertyNames(this.map).forEach(function (name) {
this.map[name].forEach(function (value) {
callback.call(thisArg, value, name, this);
}, this);
}, this);
};
Headers.prototype.keys = function () {
var items = [];
this.forEach(function (value, name) {
items.push(name);
});
return iteratorFor(items);
};
Headers.prototype.values = function () {
var items = [];
this.forEach(function (value) {
items.push(value);
});
return iteratorFor(items);
};
Headers.prototype.entries = function () {
var items = [];
this.forEach(function (value, name) {
items.push([name, value]);
});
return iteratorFor(items);
};
if (support.iterable) {
Headers.prototype[typeof Symbol === 'function' ? Symbol.iterator : '@@iterator'] = Headers.prototype.entries;
}
function consumed(body) {
if (body.bodyUsed) {
return Promise.reject(new TypeError('Already read'));
}
body.bodyUsed = true;
}
function fileReaderReady(reader) {
return new Promise(function (resolve, reject) {
reader.onload = function () {
resolve(reader.result);
};
reader.onerror = function () {
reject(reader.error);
};
});
}
function readBlobAsArrayBuffer(blob) {
var reader = new FileReader();
var promise = fileReaderReady(reader);
reader.readAsArrayBuffer(blob);
return promise;
}
function readBlobAsText(blob) {
var reader = new FileReader();
var promise = fileReaderReady(reader);
reader.readAsText(blob);
return promise;
}
function readArrayBufferAsText(buf) {
var view = new Uint8Array(buf);
var chars = new Array(view.length);
for (var i = 0; i < view.length; i++) {
chars[i] = String.fromCharCode(view[i]);
}
return chars.join('');
}
function bufferClone(buf) {
if (buf.slice) {
return buf.slice(0);
} else {
var view = new Uint8Array(buf.byteLength);
view.set(new Uint8Array(buf));
return view.buffer;
}
}
function Body() {
this.bodyUsed = false;
this._initBody = function (body) {
this._bodyInit = body;
if (!body) {
this._bodyText = '';
} else if (typeof body === 'string') {
this._bodyText = body;
} else if (support.blob && Blob.prototype.isPrototypeOf(body)) {
this._bodyBlob = body;
} else if (support.formData && FormData.prototype.isPrototypeOf(body)) {
this._bodyFormData = body;
} else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
this._bodyText = body.toString();
} else if (support.arrayBuffer && support.blob && isDataView(body)) {
this._bodyArrayBuffer = bufferClone(body.buffer);
this._bodyInit = new Blob([this._bodyArrayBuffer]);
} else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {
this._bodyArrayBuffer = bufferClone(body);
} else {
throw new Error('unsupported BodyInit type');
}
if (!this.headers.get('content-type')) {
if (typeof body === 'string') {
this.headers.set('content-type', 'text/plain;charset=UTF-8');
} else if (this._bodyBlob && this._bodyBlob.type) {
this.headers.set('content-type', this._bodyBlob.type);
} else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');
}
}
};
if (support.blob) {
this.blob = function () {
var rejected = consumed(this);
if (rejected) {
return rejected;
}
if (this._bodyBlob) {
return Promise.resolve(this._bodyBlob);
} else if (this._bodyArrayBuffer) {
return Promise.resolve(new Blob([this._bodyArrayBuffer]));
} else if (this._bodyFormData) {
throw new Error('could not read FormData body as blob');
} else {
return Promise.resolve(new Blob([this._bodyText]));
}
};
this.arrayBuffer = function () {
if (this._bodyArrayBuffer) {
return consumed(this) || Promise.resolve(this._bodyArrayBuffer);
} else {
return this.blob().then(readBlobAsArrayBuffer);
}
};
}
this.text = function () {
var rejected = consumed(this);
if (rejected) {
return rejected;
}
if (this._bodyBlob) {
return readBlobAsText(this._bodyBlob);
} else if (this._bodyArrayBuffer) {
return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer));
} else if (this._bodyFormData) {
throw new Error('could not read FormData body as text');
} else {
return Promise.resolve(this._bodyText);
}
};
if (support.formData) {
this.formData = function () {
return this.text().then(decode);
};
}
this.json = function () {
return this.text().then(JSON.parse);
};
return this;
}
var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT'];
function normalizeMethod(method) {
var upcased = method.toUpperCase();
return methods.indexOf(upcased) > -1 ? upcased : method;
}
function Request(input, options) {
options = options || {};
var body = options.body;
if (typeof input === 'string') {
this.url = input;
} else {
if (input.bodyUsed) {
throw new TypeError('Already read');
}
this.url = input.url;
this.credentials = input.credentials;
if (!options.headers) {
this.headers = new Headers(input.headers);
}
this.method = input.method;
this.mode = input.mode;
if (!body && input._bodyInit != null) {
body = input._bodyInit;
input.bodyUsed = true;
}
}
this.credentials = options.credentials || this.credentials || 'omit';
if (options.headers || !this.headers) {
this.headers = new Headers(options.headers);
}
this.method = normalizeMethod(options.method || this.method || 'GET');
this.mode = options.mode || this.mode || null;
this.referrer = null;
if ((this.method === 'GET' || this.method === 'HEAD') && body) {
throw new TypeError('Body not allowed for GET or HEAD requests');
}
this._initBody(body);
}
Request.prototype.clone = function () {
return new Request(this, { body: this._bodyInit });
};
function decode(body) {
var form = new FormData();
body.trim().split('&').forEach(function (bytes) {
if (bytes) {
var split = bytes.split('=');
var name = split.shift().replace(/\+/g, ' ');
var value = split.join('=').replace(/\+/g, ' ');
form.append(decodeURIComponent(name), decodeURIComponent(value));
}
});
return form;
}
function parseHeaders(rawHeaders) {
var headers = new Headers();
rawHeaders.split('\r\n').forEach(function (line) {
var parts = line.split(':');
var key = parts.shift().trim();
if (key) {
var value = parts.join(':').trim();
headers.append(key, value);
}
});
return headers;
}
Body.call(Request.prototype);
function Response(bodyInit, options) {
if (!options) {
options = {};
}
this.type = 'default';
this.status = 'status' in options ? options.status : 200;
this.ok = this.status >= 200 && this.status < 300;
this.statusText = 'statusText' in options ? options.statusText : 'OK';
this.headers = new Headers(options.headers);
this.url = options.url || '';
this._initBody(bodyInit);
}
Body.call(Response.prototype);
Response.prototype.clone = function () {
return new Response(this._bodyInit, {
status: this.status,
statusText: this.statusText,
headers: new Headers(this.headers),
url: this.url
});
};
Response.error = function () {
var response = new Response(null, { status: 0, statusText: '' });
response.type = 'error';
return response;
};
var redirectStatuses = [301, 302, 303, 307, 308];
Response.redirect = function (url, status) {
if (redirectStatuses.indexOf(status) === -1) {
throw new RangeError('Invalid status code');
}
return new Response(null, { status: status, headers: { location: url } });
};
self.Headers = Headers;
self.Request = Request;
self.Response = Response;
self.fetch = function (input, init) {
return new Promise(function (resolve, reject) {
var request = new Request(input, init);
var xhr = new XMLHttpRequest();
xhr.onload = function () {
var options = {
status: xhr.status,
statusText: xhr.statusText,
headers: parseHeaders(xhr.getAllResponseHeaders() || '')
};
options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL');
var body = 'response' in xhr ? xhr.response : xhr.responseText;
resolve(new Response(body, options));
};
xhr.onerror = function () {
reject(new TypeError('Network request failed'));
};
xhr.ontimeout = function () {
reject(new TypeError('Network request failed'));
};
xhr.open(request.method, request.url, true);
if (request.credentials === 'include') {
xhr.withCredentials = true;
}
if ('responseType' in xhr && support.blob) {
xhr.responseType = 'blob';
}
request.headers.forEach(function (value, name) {
xhr.setRequestHeader(name, value);
});
xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit);
});
};
self.fetch.polyfill = true;
})(typeof self !== 'undefined' ? self : this);
}, 248, null, "whatwg-fetch/fetch.js");
__d(/* RCTLog */function(global, require, module, exports) {
'use strict';
var BatchedBridge = require(81 ); // 81 = BatchedBridge
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var levelsMap = {
log: 'log',
info: 'info',
warn: 'warn',
error: 'error',
fatal: 'error'
};
var RCTLog = function () {
function RCTLog() {
babelHelpers.classCallCheck(this, RCTLog);
}
babelHelpers.createClass(RCTLog, null, [{
key: 'logIfNoNativeHook',
value: function logIfNoNativeHook() {
var args = Array.prototype.slice.call(arguments);
var level = args.shift();
var logFn = levelsMap[level];
invariant(logFn, 'Level "' + level + '" not one of ' + Object.keys(levelsMap));
if (typeof global.nativeLoggingHook === 'undefined') {
console[logFn].apply(console, args);
}
return true;
}
}]);
return RCTLog;
}();
BatchedBridge.registerCallableModule('RCTLog', RCTLog);
module.exports = RCTLog;
}, 249, null, "RCTLog");
__d(/* Alert */function(global, require, module, exports) {
'use strict';
var AlertIOS = require(251 ); // 251 = AlertIOS
var Platform = require(79 ); // 79 = Platform
var DialogModuleAndroid = require(80 ).DialogManagerAndroid; // 80 = NativeModules
var Alert = function () {
function Alert() {
babelHelpers.classCallCheck(this, Alert);
}
babelHelpers.createClass(Alert, null, [{
key: 'alert',
value: function alert(title, message, buttons, options, type) {
if (Platform.OS === 'ios') {
if (typeof type !== 'undefined') {
console.warn('Alert.alert() with a 5th "type" parameter is deprecated and will be removed. Use AlertIOS.prompt() instead.');
AlertIOS.alert(title, message, buttons, type);
return;
}
AlertIOS.alert(title, message, buttons);
} else if (Platform.OS === 'android') {
AlertAndroid.alert(title, message, buttons, options);
}
}
}]);
return Alert;
}();
var AlertAndroid = function () {
function AlertAndroid() {
babelHelpers.classCallCheck(this, AlertAndroid);
}
babelHelpers.createClass(AlertAndroid, null, [{
key: 'alert',
value: function alert(title, message, buttons, options) {
var config = {
title: title || '',
message: message || ''
};
if (options) {
config = babelHelpers.extends({}, config, { cancelable: options.cancelable });
}
var validButtons = buttons ? buttons.slice(0, 3) : [{ text: 'OK' }];
var buttonPositive = validButtons.pop();
var buttonNegative = validButtons.pop();
var buttonNeutral = validButtons.pop();
if (buttonNeutral) {
config = babelHelpers.extends({}, config, { buttonNeutral: buttonNeutral.text || '' });
}
if (buttonNegative) {
config = babelHelpers.extends({}, config, { buttonNegative: buttonNegative.text || '' });
}
if (buttonPositive) {
config = babelHelpers.extends({}, config, { buttonPositive: buttonPositive.text || '' });
}
DialogModuleAndroid.showAlert(config, function (errorMessage) {
return console.warn(errorMessage);
}, function (action, buttonKey) {
if (action !== DialogModuleAndroid.buttonClicked) {
return;
}
if (buttonKey === DialogModuleAndroid.buttonNeutral) {
buttonNeutral.onPress && buttonNeutral.onPress();
} else if (buttonKey === DialogModuleAndroid.buttonNegative) {
buttonNegative.onPress && buttonNegative.onPress();
} else if (buttonKey === DialogModuleAndroid.buttonPositive) {
buttonPositive.onPress && buttonPositive.onPress();
}
});
}
}]);
return AlertAndroid;
}();
module.exports = Alert;
}, 250, null, "Alert");
__d(/* AlertIOS */function(global, require, module, exports) {
'use strict';
var RCTAlertManager = require(80 ).AlertManager; // 80 = NativeModules
var AlertIOS = function () {
function AlertIOS() {
babelHelpers.classCallCheck(this, AlertIOS);
}
babelHelpers.createClass(AlertIOS, null, [{
key: 'alert',
value: function alert(title, message, callbackOrButtons, type) {
if (typeof type !== 'undefined') {
console.warn('AlertIOS.alert() with a 4th "type" parameter is deprecated and will be removed. Use AlertIOS.prompt() instead.');
this.prompt(title, message, callbackOrButtons, type);
return;
}
this.prompt(title, message, callbackOrButtons, 'default');
}
}, {
key: 'prompt',
value: function prompt(title, message, callbackOrButtons) {
var type = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'plain-text';
var defaultValue = arguments[4];
var keyboardType = arguments[5];
if (typeof type === 'function') {
console.warn('You passed a callback function as the "type" argument to AlertIOS.prompt(). React Native is ' + 'assuming you want to use the deprecated AlertIOS.prompt(title, defaultValue, buttons, callback) ' + 'signature. The current signature is AlertIOS.prompt(title, message, callbackOrButtons, type, defaultValue, ' + 'keyboardType) and the old syntax will be removed in a future version.');
var callback = type;
var defaultValue = message;
RCTAlertManager.alertWithArgs({
title: title || undefined,
type: 'plain-text',
defaultValue: defaultValue
}, function (id, value) {
callback(value);
});
return;
}
var callbacks = [];
var buttons = [];
var cancelButtonKey;
var destructiveButtonKey;
if (typeof callbackOrButtons === 'function') {
callbacks = [callbackOrButtons];
} else if (callbackOrButtons instanceof Array) {
callbackOrButtons.forEach(function (btn, index) {
callbacks[index] = btn.onPress;
if (btn.style === 'cancel') {
cancelButtonKey = String(index);
} else if (btn.style === 'destructive') {
destructiveButtonKey = String(index);
}
if (btn.text || index < (callbackOrButtons || []).length - 1) {
var btnDef = {};
btnDef[index] = btn.text || '';
buttons.push(btnDef);
}
});
}
RCTAlertManager.alertWithArgs({
title: title || undefined,
message: message || undefined,
buttons: buttons,
type: type || undefined,
defaultValue: defaultValue,
cancelButtonKey: cancelButtonKey,
destructiveButtonKey: destructiveButtonKey,
keyboardType: keyboardType
}, function (id, value) {
var cb = callbacks[id];
cb && cb(value);
});
}
}]);
return AlertIOS;
}();
module.exports = AlertIOS;
}, 251, null, "AlertIOS");
__d(/* Promise */function(global, require, module, exports) {
'use strict';
var Promise = require(253 ); // 253 = fbjs/lib/Promise.native
if (__DEV__) {
require(257 ).enable({ // 257 = promise/setimmediate/rejection-tracking
allRejections: true,
onUnhandled: function onUnhandled(id) {
var error = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var _error$message = error.message,
message = _error$message === undefined ? null : _error$message,
_error$stack = error.stack,
stack = _error$stack === undefined ? null : _error$stack;
var warning = 'Possible Unhandled Promise Rejection (id: ' + id + '):\n' + (message == null ? '' : message + '\n') + (stack == null ? '' : stack);
console.warn(warning);
},
onHandled: function onHandled(id) {
var warning = 'Promise Rejection Handled (id: ' + id + ')\n' + 'This means you can ignore any previous messages of the form ' + ('"Possible Unhandled Promise Rejection (id: ' + id + '):"');
console.warn(warning);
}
});
}
module.exports = Promise;
}, 252, null, "Promise");
__d(/* fbjs/lib/Promise.native.js */function(global, require, module, exports) {
'use strict';
var Promise = require(254 ); // 254 = promise/setimmediate/es6-extensions
require(256 ); // 256 = promise/setimmediate/done
Promise.prototype['finally'] = function (onSettled) {
return this.then(onSettled, onSettled);
};
module.exports = Promise;
}, 253, null, "fbjs/lib/Promise.native.js");
__d(/* promise/setimmediate/es6-extensions.js */function(global, require, module, exports) {'use strict';
var Promise = require(255 ); // 255 = ./core.js
module.exports = Promise;
var TRUE = valuePromise(true);
var FALSE = valuePromise(false);
var NULL = valuePromise(null);
var UNDEFINED = valuePromise(undefined);
var ZERO = valuePromise(0);
var EMPTYSTRING = valuePromise('');
function valuePromise(value) {
var p = new Promise(Promise._61);
p._65 = 1;
p._55 = value;
return p;
}
Promise.resolve = function (value) {
if (value instanceof Promise) return value;
if (value === null) return NULL;
if (value === undefined) return UNDEFINED;
if (value === true) return TRUE;
if (value === false) return FALSE;
if (value === 0) return ZERO;
if (value === '') return EMPTYSTRING;
if (typeof value === 'object' || typeof value === 'function') {
try {
var then = value.then;
if (typeof then === 'function') {
return new Promise(then.bind(value));
}
} catch (ex) {
return new Promise(function (resolve, reject) {
reject(ex);
});
}
}
return valuePromise(value);
};
Promise.all = function (arr) {
var args = Array.prototype.slice.call(arr);
return new Promise(function (resolve, reject) {
if (args.length === 0) return resolve([]);
var remaining = args.length;
function res(i, val) {
if (val && (typeof val === 'object' || typeof val === 'function')) {
if (val instanceof Promise && val.then === Promise.prototype.then) {
while (val._65 === 3) {
val = val._55;
}
if (val._65 === 1) return res(i, val._55);
if (val._65 === 2) reject(val._55);
val.then(function (val) {
res(i, val);
}, reject);
return;
} else {
var then = val.then;
if (typeof then === 'function') {
var p = new Promise(then.bind(val));
p.then(function (val) {
res(i, val);
}, reject);
return;
}
}
}
args[i] = val;
if (--remaining === 0) {
resolve(args);
}
}
for (var i = 0; i < args.length; i++) {
res(i, args[i]);
}
});
};
Promise.reject = function (value) {
return new Promise(function (resolve, reject) {
reject(value);
});
};
Promise.race = function (values) {
return new Promise(function (resolve, reject) {
values.forEach(function (value) {
Promise.resolve(value).then(resolve, reject);
});
});
};
Promise.prototype['catch'] = function (onRejected) {
return this.then(null, onRejected);
};
}, 254, null, "promise/setimmediate/es6-extensions.js");
__d(/* promise/setimmediate/core.js */function(global, require, module, exports) {'use strict';
function noop() {}
var LAST_ERROR = null;
var IS_ERROR = {};
function getThen(obj) {
try {
return obj.then;
} catch (ex) {
LAST_ERROR = ex;
return IS_ERROR;
}
}
function tryCallOne(fn, a) {
try {
return fn(a);
} catch (ex) {
LAST_ERROR = ex;
return IS_ERROR;
}
}
function tryCallTwo(fn, a, b) {
try {
fn(a, b);
} catch (ex) {
LAST_ERROR = ex;
return IS_ERROR;
}
}
module.exports = Promise;
function Promise(fn) {
if (typeof this !== 'object') {
throw new TypeError('Promises must be constructed via new');
}
if (typeof fn !== 'function') {
throw new TypeError('Promise constructor\'s argument is not a function');
}
this._40 = 0;
this._65 = 0;
this._55 = null;
this._72 = null;
if (fn === noop) return;
doResolve(fn, this);
}
Promise._37 = null;
Promise._87 = null;
Promise._61 = noop;
Promise.prototype.then = function (onFulfilled, onRejected) {
if (this.constructor !== Promise) {
return safeThen(this, onFulfilled, onRejected);
}
var res = new Promise(noop);
handle(this, new Handler(onFulfilled, onRejected, res));
return res;
};
function safeThen(self, onFulfilled, onRejected) {
return new self.constructor(function (resolve, reject) {
var res = new Promise(noop);
res.then(resolve, reject);
handle(self, new Handler(onFulfilled, onRejected, res));
});
}
function handle(self, deferred) {
while (self._65 === 3) {
self = self._55;
}
if (Promise._37) {
Promise._37(self);
}
if (self._65 === 0) {
if (self._40 === 0) {
self._40 = 1;
self._72 = deferred;
return;
}
if (self._40 === 1) {
self._40 = 2;
self._72 = [self._72, deferred];
return;
}
self._72.push(deferred);
return;
}
handleResolved(self, deferred);
}
function handleResolved(self, deferred) {
setImmediate(function () {
var cb = self._65 === 1 ? deferred.onFulfilled : deferred.onRejected;
if (cb === null) {
if (self._65 === 1) {
resolve(deferred.promise, self._55);
} else {
reject(deferred.promise, self._55);
}
return;
}
var ret = tryCallOne(cb, self._55);
if (ret === IS_ERROR) {
reject(deferred.promise, LAST_ERROR);
} else {
resolve(deferred.promise, ret);
}
});
}
function resolve(self, newValue) {
if (newValue === self) {
return reject(self, new TypeError('A promise cannot be resolved with itself.'));
}
if (newValue && (typeof newValue === 'object' || typeof newValue === 'function')) {
var then = getThen(newValue);
if (then === IS_ERROR) {
return reject(self, LAST_ERROR);
}
if (then === self.then && newValue instanceof Promise) {
self._65 = 3;
self._55 = newValue;
finale(self);
return;
} else if (typeof then === 'function') {
doResolve(then.bind(newValue), self);
return;
}
}
self._65 = 1;
self._55 = newValue;
finale(self);
}
function reject(self, newValue) {
self._65 = 2;
self._55 = newValue;
if (Promise._87) {
Promise._87(self, newValue);
}
finale(self);
}
function finale(self) {
if (self._40 === 1) {
handle(self, self._72);
self._72 = null;
}
if (self._40 === 2) {
for (var i = 0; i < self._72.length; i++) {
handle(self, self._72[i]);
}
self._72 = null;
}
}
function Handler(onFulfilled, onRejected, promise) {
this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;
this.onRejected = typeof onRejected === 'function' ? onRejected : null;
this.promise = promise;
}
function doResolve(fn, promise) {
var done = false;
var res = tryCallTwo(fn, function (value) {
if (done) return;
done = true;
resolve(promise, value);
}, function (reason) {
if (done) return;
done = true;
reject(promise, reason);
});
if (!done && res === IS_ERROR) {
done = true;
reject(promise, LAST_ERROR);
}
}
}, 255, null, "promise/setimmediate/core.js");
__d(/* promise/setimmediate/done.js */function(global, require, module, exports) {'use strict';
var Promise = require(255 ); // 255 = ./core.js
module.exports = Promise;
Promise.prototype.done = function (onFulfilled, onRejected) {
var self = arguments.length ? this.then.apply(this, arguments) : this;
self.then(null, function (err) {
setTimeout(function () {
throw err;
}, 0);
});
};
}, 256, null, "promise/setimmediate/done.js");
__d(/* promise/setimmediate/rejection-tracking.js */function(global, require, module, exports) {'use strict';
var Promise = require(255 ); // 255 = ./core
var DEFAULT_WHITELIST = [ReferenceError, TypeError, RangeError];
var enabled = false;
exports.disable = disable;
function disable() {
enabled = false;
Promise._37 = null;
Promise._87 = null;
}
exports.enable = enable;
function enable(options) {
options = options || {};
if (enabled) disable();
enabled = true;
var id = 0;
var displayId = 0;
var rejections = {};
Promise._37 = function (promise) {
if (promise._65 === 2 && rejections[promise._51]) {
if (rejections[promise._51].logged) {
onHandled(promise._51);
} else {
clearTimeout(rejections[promise._51].timeout);
}
delete rejections[promise._51];
}
};
Promise._87 = function (promise, err) {
if (promise._40 === 0) {
promise._51 = id++;
rejections[promise._51] = {
displayId: null,
error: err,
timeout: setTimeout(onUnhandled.bind(null, promise._51), matchWhitelist(err, DEFAULT_WHITELIST) ? 100 : 2000),
logged: false
};
}
};
function onUnhandled(id) {
if (options.allRejections || matchWhitelist(rejections[id].error, options.whitelist || DEFAULT_WHITELIST)) {
rejections[id].displayId = displayId++;
if (options.onUnhandled) {
rejections[id].logged = true;
options.onUnhandled(rejections[id].displayId, rejections[id].error);
} else {
rejections[id].logged = true;
logError(rejections[id].displayId, rejections[id].error);
}
}
}
function onHandled(id) {
if (rejections[id].logged) {
if (options.onHandled) {
options.onHandled(rejections[id].displayId, rejections[id].error);
} else if (!rejections[id].onUnhandled) {
console.warn('Promise Rejection Handled (id: ' + rejections[id].displayId + '):');
console.warn(' This means you can ignore any previous messages of the form "Possible Unhandled Promise Rejection" with id ' + rejections[id].displayId + '.');
}
}
}
}
function logError(id, error) {
console.warn('Possible Unhandled Promise Rejection (id: ' + id + '):');
var errStr = (error && (error.stack || error)) + '';
errStr.split('\n').forEach(function (line) {
console.warn(' ' + line);
});
}
function matchWhitelist(error, list) {
return list.some(function (cls) {
return error instanceof cls;
});
}
}, 257, null, "promise/setimmediate/rejection-tracking.js");
__d(/* regenerator-runtime/runtime.js */function(global, require, module, exports) {
!function (global) {
"use strict";
var hasOwn = Object.prototype.hasOwnProperty;
var undefined;
var $Symbol = typeof Symbol === "function" ? Symbol : {};
var iteratorSymbol = $Symbol.iterator || "@@iterator";
var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
var inModule = typeof module === "object";
var runtime = global.regeneratorRuntime;
if (runtime) {
if (inModule) {
module.exports = runtime;
}
return;
}
runtime = global.regeneratorRuntime = inModule ? module.exports : {};
function wrap(innerFn, outerFn, self, tryLocsList) {
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
var generator = Object.create(protoGenerator.prototype);
var context = new Context(tryLocsList || []);
generator._invoke = makeInvokeMethod(innerFn, self, context);
return generator;
}
runtime.wrap = wrap;
function tryCatch(fn, obj, arg) {
try {
return { type: "normal", arg: fn.call(obj, arg) };
} catch (err) {
return { type: "throw", arg: err };
}
}
var GenStateSuspendedStart = "suspendedStart";
var GenStateSuspendedYield = "suspendedYield";
var GenStateExecuting = "executing";
var GenStateCompleted = "completed";
var ContinueSentinel = {};
function Generator() {}
function GeneratorFunction() {}
function GeneratorFunctionPrototype() {}
var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype;
GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
GeneratorFunctionPrototype.constructor = GeneratorFunction;
GeneratorFunctionPrototype[toStringTagSymbol] = GeneratorFunction.displayName = "GeneratorFunction";
function defineIteratorMethods(prototype) {
["next", "throw", "return"].forEach(function (method) {
prototype[method] = function (arg) {
return this._invoke(method, arg);
};
});
}
runtime.isGeneratorFunction = function (genFun) {
var ctor = typeof genFun === "function" && genFun.constructor;
return ctor ? ctor === GeneratorFunction || (ctor.displayName || ctor.name) === "GeneratorFunction" : false;
};
runtime.mark = function (genFun) {
if (Object.setPrototypeOf) {
Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
} else {
genFun.__proto__ = GeneratorFunctionPrototype;
if (!(toStringTagSymbol in genFun)) {
genFun[toStringTagSymbol] = "GeneratorFunction";
}
}
genFun.prototype = Object.create(Gp);
return genFun;
};
runtime.awrap = function (arg) {
return new AwaitArgument(arg);
};
function AwaitArgument(arg) {
this.arg = arg;
}
function AsyncIterator(generator) {
function invoke(method, arg, resolve, reject) {
var record = tryCatch(generator[method], generator, arg);
if (record.type === "throw") {
reject(record.arg);
} else {
var result = record.arg;
var value = result.value;
if (value instanceof AwaitArgument) {
return Promise.resolve(value.arg).then(function (value) {
invoke("next", value, resolve, reject);
}, function (err) {
invoke("throw", err, resolve, reject);
});
}
return Promise.resolve(value).then(function (unwrapped) {
result.value = unwrapped;
resolve(result);
}, reject);
}
}
if (typeof process === "object" && process.domain) {
invoke = process.domain.bind(invoke);
}
var previousPromise;
function enqueue(method, arg) {
function callInvokeWithMethodAndArg() {
return new Promise(function (resolve, reject) {
invoke(method, arg, resolve, reject);
});
}
return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
}
this._invoke = enqueue;
}
defineIteratorMethods(AsyncIterator.prototype);
runtime.async = function (innerFn, outerFn, self, tryLocsList) {
var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList));
return runtime.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
return result.done ? result.value : iter.next();
});
};
function makeInvokeMethod(innerFn, self, context) {
var state = GenStateSuspendedStart;
return function invoke(method, arg) {
if (state === GenStateExecuting) {
throw new Error("Generator is already running");
}
if (state === GenStateCompleted) {
if (method === "throw") {
throw arg;
}
return doneResult();
}
while (true) {
var delegate = context.delegate;
if (delegate) {
if (method === "return" || method === "throw" && delegate.iterator[method] === undefined) {
context.delegate = null;
var returnMethod = delegate.iterator["return"];
if (returnMethod) {
var record = tryCatch(returnMethod, delegate.iterator, arg);
if (record.type === "throw") {
method = "throw";
arg = record.arg;
continue;
}
}
if (method === "return") {
continue;
}
}
var record = tryCatch(delegate.iterator[method], delegate.iterator, arg);
if (record.type === "throw") {
context.delegate = null;
method = "throw";
arg = record.arg;
continue;
}
method = "next";
arg = undefined;
var info = record.arg;
if (info.done) {
context[delegate.resultName] = info.value;
context.next = delegate.nextLoc;
} else {
state = GenStateSuspendedYield;
return info;
}
context.delegate = null;
}
if (method === "next") {
context.sent = context._sent = arg;
} else if (method === "throw") {
if (state === GenStateSuspendedStart) {
state = GenStateCompleted;
throw arg;
}
if (context.dispatchException(arg)) {
method = "next";
arg = undefined;
}
} else if (method === "return") {
context.abrupt("return", arg);
}
state = GenStateExecuting;
var record = tryCatch(innerFn, self, context);
if (record.type === "normal") {
state = context.done ? GenStateCompleted : GenStateSuspendedYield;
var info = {
value: record.arg,
done: context.done
};
if (record.arg === ContinueSentinel) {
if (context.delegate && method === "next") {
arg = undefined;
}
} else {
return info;
}
} else if (record.type === "throw") {
state = GenStateCompleted;
method = "throw";
arg = record.arg;
}
}
};
}
defineIteratorMethods(Gp);
Gp[iteratorSymbol] = function () {
return this;
};
Gp[toStringTagSymbol] = "Generator";
Gp.toString = function () {
return "[object Generator]";
};
function pushTryEntry(locs) {
var entry = { tryLoc: locs[0] };
if (1 in locs) {
entry.catchLoc = locs[1];
}
if (2 in locs) {
entry.finallyLoc = locs[2];
entry.afterLoc = locs[3];
}
this.tryEntries.push(entry);
}
function resetTryEntry(entry) {
var record = entry.completion || {};
record.type = "normal";
delete record.arg;
entry.completion = record;
}
function Context(tryLocsList) {
this.tryEntries = [{ tryLoc: "root" }];
tryLocsList.forEach(pushTryEntry, this);
this.reset(true);
}
runtime.keys = function (object) {
var keys = [];
for (var key in object) {
keys.push(key);
}
keys.reverse();
return function next() {
while (keys.length) {
var key = keys.pop();
if (key in object) {
next.value = key;
next.done = false;
return next;
}
}
next.done = true;
return next;
};
};
function values(iterable) {
if (iterable) {
var iteratorMethod = iterable[iteratorSymbol];
if (iteratorMethod) {
return iteratorMethod.call(iterable);
}
if (typeof iterable.next === "function") {
return iterable;
}
if (!isNaN(iterable.length)) {
var i = -1,
next = function next() {
while (++i < iterable.length) {
if (hasOwn.call(iterable, i)) {
next.value = iterable[i];
next.done = false;
return next;
}
}
next.value = undefined;
next.done = true;
return next;
};
return next.next = next;
}
}
return { next: doneResult };
}
runtime.values = values;
function doneResult() {
return { value: undefined, done: true };
}
Context.prototype = {
constructor: Context,
reset: function reset(skipTempReset) {
this.prev = 0;
this.next = 0;
this.sent = this._sent = undefined;
this.done = false;
this.delegate = null;
this.tryEntries.forEach(resetTryEntry);
if (!skipTempReset) {
for (var name in this) {
if (name.charAt(0) === "t" && hasOwn.call(this, name) && !isNaN(+name.slice(1))) {
this[name] = undefined;
}
}
}
},
stop: function stop() {
this.done = true;
var rootEntry = this.tryEntries[0];
var rootRecord = rootEntry.completion;
if (rootRecord.type === "throw") {
throw rootRecord.arg;
}
return this.rval;
},
dispatchException: function dispatchException(exception) {
if (this.done) {
throw exception;
}
var context = this;
function handle(loc, caught) {
record.type = "throw";
record.arg = exception;
context.next = loc;
return !!caught;
}
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
var entry = this.tryEntries[i];
var record = entry.completion;
if (entry.tryLoc === "root") {
return handle("end");
}
if (entry.tryLoc <= this.prev) {
var hasCatch = hasOwn.call(entry, "catchLoc");
var hasFinally = hasOwn.call(entry, "finallyLoc");
if (hasCatch && hasFinally) {
if (this.prev < entry.catchLoc) {
return handle(entry.catchLoc, true);
} else if (this.prev < entry.finallyLoc) {
return handle(entry.finallyLoc);
}
} else if (hasCatch) {
if (this.prev < entry.catchLoc) {
return handle(entry.catchLoc, true);
}
} else if (hasFinally) {
if (this.prev < entry.finallyLoc) {
return handle(entry.finallyLoc);
}
} else {
throw new Error("try statement without catch or finally");
}
}
}
},
abrupt: function abrupt(type, arg) {
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
var entry = this.tryEntries[i];
if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
var finallyEntry = entry;
break;
}
}
if (finallyEntry && (type === "break" || type === "continue") && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc) {
finallyEntry = null;
}
var record = finallyEntry ? finallyEntry.completion : {};
record.type = type;
record.arg = arg;
if (finallyEntry) {
this.next = finallyEntry.finallyLoc;
} else {
this.complete(record);
}
return ContinueSentinel;
},
complete: function complete(record, afterLoc) {
if (record.type === "throw") {
throw record.arg;
}
if (record.type === "break" || record.type === "continue") {
this.next = record.arg;
} else if (record.type === "return") {
this.rval = record.arg;
this.next = "end";
} else if (record.type === "normal" && afterLoc) {
this.next = afterLoc;
}
},
finish: function finish(finallyLoc) {
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
var entry = this.tryEntries[i];
if (entry.finallyLoc === finallyLoc) {
this.complete(entry.completion, entry.afterLoc);
resetTryEntry(entry);
return ContinueSentinel;
}
}
},
"catch": function _catch(tryLoc) {
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
var entry = this.tryEntries[i];
if (entry.tryLoc === tryLoc) {
var record = entry.completion;
if (record.type === "throw") {
var thrown = record.arg;
resetTryEntry(entry);
}
return thrown;
}
}
throw new Error("illegal catch attempt");
},
delegateYield: function delegateYield(iterable, resultName, nextLoc) {
this.delegate = {
iterator: values(iterable),
resultName: resultName,
nextLoc: nextLoc
};
return ContinueSentinel;
}
};
}(typeof global === "object" ? global : typeof window === "object" ? window : typeof self === "object" ? self : this);
}, 258, null, "regenerator-runtime/runtime.js");
__d(/* XMLHttpRequest */function(global, require, module, exports) {
'use strict';
var EventTarget = require(116 ); // 116 = event-target-shim
var RCTNetworking = require(260 ); // 260 = RCTNetworking
var base64 = require(115 ); // 115 = base64-js
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var warning = require(40 ); // 40 = fbjs/lib/warning
var UNSENT = 0;
var OPENED = 1;
var HEADERS_RECEIVED = 2;
var LOADING = 3;
var DONE = 4;
var SUPPORTED_RESPONSE_TYPES = {
arraybuffer: typeof global.ArrayBuffer === 'function',
blob: typeof global.Blob === 'function',
document: false,
json: true,
text: true,
'': true
};
var REQUEST_EVENTS = ['abort', 'error', 'load', 'loadstart', 'progress', 'timeout', 'loadend'];
var XHR_EVENTS = REQUEST_EVENTS.concat('readystatechange');
var XMLHttpRequestEventTarget = function (_EventTarget) {
babelHelpers.inherits(XMLHttpRequestEventTarget, _EventTarget);
function XMLHttpRequestEventTarget() {
babelHelpers.classCallCheck(this, XMLHttpRequestEventTarget);
return babelHelpers.possibleConstructorReturn(this, (XMLHttpRequestEventTarget.__proto__ || Object.getPrototypeOf(XMLHttpRequestEventTarget)).apply(this, arguments));
}
return XMLHttpRequestEventTarget;
}(EventTarget.apply(undefined, REQUEST_EVENTS));
var XMLHttpRequest = function (_EventTarget2) {
babelHelpers.inherits(XMLHttpRequest, _EventTarget2);
babelHelpers.createClass(XMLHttpRequest, null, [{
key: 'setInterceptor',
value: function setInterceptor(interceptor) {
XMLHttpRequest._interceptor = interceptor;
}
}]);
function XMLHttpRequest() {
babelHelpers.classCallCheck(this, XMLHttpRequest);
var _this2 = babelHelpers.possibleConstructorReturn(this, (XMLHttpRequest.__proto__ || Object.getPrototypeOf(XMLHttpRequest)).call(this));
_this2.UNSENT = UNSENT;
_this2.OPENED = OPENED;
_this2.HEADERS_RECEIVED = HEADERS_RECEIVED;
_this2.LOADING = LOADING;
_this2.DONE = DONE;
_this2.readyState = UNSENT;
_this2.status = 0;
_this2.timeout = 0;
_this2.upload = new XMLHttpRequestEventTarget();
_this2._aborted = false;
_this2._hasError = false;
_this2._method = null;
_this2._response = '';
_this2._url = null;
_this2._timedOut = false;
_this2._trackingName = 'unknown';
_this2._incrementalEvents = false;
_this2._reset();
return _this2;
}
babelHelpers.createClass(XMLHttpRequest, [{
key: '_reset',
value: function _reset() {
this.readyState = this.UNSENT;
this.responseHeaders = undefined;
this.status = 0;
delete this.responseURL;
this._requestId = null;
this._cachedResponse = undefined;
this._hasError = false;
this._headers = {};
this._response = '';
this._responseType = '';
this._sent = false;
this._lowerCaseResponseHeaders = {};
this._clearSubscriptions();
this._timedOut = false;
}
}, {
key: '__didCreateRequest',
value: function __didCreateRequest(requestId) {
this._requestId = requestId;
XMLHttpRequest._interceptor && XMLHttpRequest._interceptor.requestSent(requestId, this._url || '', this._method || 'GET', this._headers);
}
}, {
key: '__didUploadProgress',
value: function __didUploadProgress(requestId, progress, total) {
if (requestId === this._requestId) {
this.upload.dispatchEvent({
type: 'progress',
lengthComputable: true,
loaded: progress,
total: total
});
}
}
}, {
key: '__didReceiveResponse',
value: function __didReceiveResponse(requestId, status, responseHeaders, responseURL) {
if (requestId === this._requestId) {
this.status = status;
this.setResponseHeaders(responseHeaders);
this.setReadyState(this.HEADERS_RECEIVED);
if (responseURL || responseURL === '') {
this.responseURL = responseURL;
} else {
delete this.responseURL;
}
XMLHttpRequest._interceptor && XMLHttpRequest._interceptor.responseReceived(requestId, responseURL || this._url || '', status, responseHeaders || {});
}
}
}, {
key: '__didReceiveData',
value: function __didReceiveData(requestId, response) {
if (requestId !== this._requestId) {
return;
}
this._response = response;
this._cachedResponse = undefined;
this.setReadyState(this.LOADING);
XMLHttpRequest._interceptor && XMLHttpRequest._interceptor.dataReceived(requestId, response);
}
}, {
key: '__didReceiveIncrementalData',
value: function __didReceiveIncrementalData(requestId, responseText, progress, total) {
if (requestId !== this._requestId) {
return;
}
if (!this._response) {
this._response = responseText;
} else {
this._response += responseText;
}
XMLHttpRequest._interceptor && XMLHttpRequest._interceptor.dataReceived(requestId, responseText);
this.setReadyState(this.LOADING);
this.__didReceiveDataProgress(requestId, progress, total);
}
}, {
key: '__didReceiveDataProgress',
value: function __didReceiveDataProgress(requestId, loaded, total) {
if (requestId !== this._requestId) {
return;
}
this.dispatchEvent({
type: 'progress',
lengthComputable: total >= 0,
loaded: loaded,
total: total
});
}
}, {
key: '__didCompleteResponse',
value: function __didCompleteResponse(requestId, error, timeOutError) {
if (requestId === this._requestId) {
if (error) {
if (this._responseType === '' || this._responseType === 'text') {
this._response = error;
}
this._hasError = true;
if (timeOutError) {
this._timedOut = true;
}
}
this._clearSubscriptions();
this._requestId = null;
this.setReadyState(this.DONE);
if (error) {
XMLHttpRequest._interceptor && XMLHttpRequest._interceptor.loadingFailed(requestId, error);
} else {
XMLHttpRequest._interceptor && XMLHttpRequest._interceptor.loadingFinished(requestId, this._response.length);
}
}
}
}, {
key: '_clearSubscriptions',
value: function _clearSubscriptions() {
(this._subscriptions || []).forEach(function (sub) {
sub.remove();
});
this._subscriptions = [];
}
}, {
key: 'getAllResponseHeaders',
value: function getAllResponseHeaders() {
if (!this.responseHeaders) {
return null;
}
var headers = this.responseHeaders || {};
return Object.keys(headers).map(function (headerName) {
return headerName + ': ' + headers[headerName];
}).join('\r\n');
}
}, {
key: 'getResponseHeader',
value: function getResponseHeader(header) {
var value = this._lowerCaseResponseHeaders[header.toLowerCase()];
return value !== undefined ? value : null;
}
}, {
key: 'setRequestHeader',
value: function setRequestHeader(header, value) {
if (this.readyState !== this.OPENED) {
throw new Error('Request has not been opened');
}
this._headers[header.toLowerCase()] = String(value);
}
}, {
key: 'setTrackingName',
value: function setTrackingName(trackingName) {
this._trackingName = trackingName;
return this;
}
}, {
key: 'open',
value: function open(method, url, async) {
if (this.readyState !== this.UNSENT) {
throw new Error('Cannot open, already sending');
}
if (async !== undefined && !async) {
throw new Error('Synchronous http requests are not supported');
}
if (!url) {
throw new Error('Cannot load an empty url');
}
this._method = method.toUpperCase();
this._url = url;
this._aborted = false;
this.setReadyState(this.OPENED);
}
}, {
key: 'send',
value: function send(data) {
var _this3 = this;
if (this.readyState !== this.OPENED) {
throw new Error('Request has not been opened');
}
if (this._sent) {
throw new Error('Request has already been sent');
}
this._sent = true;
var incrementalEvents = this._incrementalEvents || !!this.onreadystatechange || !!this.onprogress;
this._subscriptions.push(RCTNetworking.addListener('didSendNetworkData', function (args) {
return _this3.__didUploadProgress.apply(_this3, babelHelpers.toConsumableArray(args));
}));
this._subscriptions.push(RCTNetworking.addListener('didReceiveNetworkResponse', function (args) {
return _this3.__didReceiveResponse.apply(_this3, babelHelpers.toConsumableArray(args));
}));
this._subscriptions.push(RCTNetworking.addListener('didReceiveNetworkData', function (args) {
return _this3.__didReceiveData.apply(_this3, babelHelpers.toConsumableArray(args));
}));
this._subscriptions.push(RCTNetworking.addListener('didReceiveNetworkIncrementalData', function (args) {
return _this3.__didReceiveIncrementalData.apply(_this3, babelHelpers.toConsumableArray(args));
}));
this._subscriptions.push(RCTNetworking.addListener('didReceiveNetworkDataProgress', function (args) {
return _this3.__didReceiveDataProgress.apply(_this3, babelHelpers.toConsumableArray(args));
}));
this._subscriptions.push(RCTNetworking.addListener('didCompleteNetworkResponse', function (args) {
return _this3.__didCompleteResponse.apply(_this3, babelHelpers.toConsumableArray(args));
}));
var nativeResponseType = 'text';
if (this._responseType === 'arraybuffer' || this._responseType === 'blob') {
nativeResponseType = 'base64';
}
invariant(this._method, 'Request method needs to be defined.');
invariant(this._url, 'Request URL needs to be defined.');
RCTNetworking.sendRequest(this._method, this._trackingName, this._url, this._headers, data, nativeResponseType, incrementalEvents, this.timeout, this.__didCreateRequest.bind(this));
}
}, {
key: 'abort',
value: function abort() {
this._aborted = true;
if (this._requestId) {
RCTNetworking.abortRequest(this._requestId);
}
if (!(this.readyState === this.UNSENT || this.readyState === this.OPENED && !this._sent || this.readyState === this.DONE)) {
this._reset();
this.setReadyState(this.DONE);
}
this._reset();
}
}, {
key: 'setResponseHeaders',
value: function setResponseHeaders(responseHeaders) {
this.responseHeaders = responseHeaders || null;
var headers = responseHeaders || {};
this._lowerCaseResponseHeaders = Object.keys(headers).reduce(function (lcaseHeaders, headerName) {
lcaseHeaders[headerName.toLowerCase()] = headers[headerName];
return lcaseHeaders;
}, {});
}
}, {
key: 'setReadyState',
value: function setReadyState(newState) {
this.readyState = newState;
this.dispatchEvent({ type: 'readystatechange' });
if (newState === this.DONE) {
if (this._aborted) {
this.dispatchEvent({ type: 'abort' });
} else if (this._hasError) {
if (this._timedOut) {
this.dispatchEvent({ type: 'timeout' });
} else {
this.dispatchEvent({ type: 'error' });
}
} else {
this.dispatchEvent({ type: 'load' });
}
this.dispatchEvent({ type: 'loadend' });
}
}
}, {
key: 'addEventListener',
value: function addEventListener(type, listener) {
if (type === 'readystatechange' || type === 'progress') {
this._incrementalEvents = true;
}
babelHelpers.get(XMLHttpRequest.prototype.__proto__ || Object.getPrototypeOf(XMLHttpRequest.prototype), 'addEventListener', this).call(this, type, listener);
}
}, {
key: 'responseType',
get: function get() {
return this._responseType;
},
set: function set(responseType) {
if (this._sent) {
throw new Error('Failed to set the \'responseType\' property on \'XMLHttpRequest\': The ' + 'response type cannot be set after the request has been sent.');
}
if (!SUPPORTED_RESPONSE_TYPES.hasOwnProperty(responseType)) {
warning(false, 'The provided value \'' + responseType + '\' is not a valid \'responseType\'.');
return;
}
invariant(SUPPORTED_RESPONSE_TYPES[responseType] || responseType === 'document', 'The provided value \'' + responseType + '\' is unsupported in this environment.');
this._responseType = responseType;
}
}, {
key: 'responseText',
get: function get() {
if (this._responseType !== '' && this._responseType !== 'text') {
throw new Error("The 'responseText' property is only available if 'responseType' " + ('is set to \'\' or \'text\', but it is \'' + this._responseType + '\'.'));
}
if (this.readyState < LOADING) {
return '';
}
return this._response;
}
}, {
key: 'response',
get: function get() {
var responseType = this.responseType;
if (responseType === '' || responseType === 'text') {
return this.readyState < LOADING || this._hasError ? '' : this._response;
}
if (this.readyState !== DONE) {
return null;
}
if (this._cachedResponse !== undefined) {
return this._cachedResponse;
}
switch (responseType) {
case 'document':
this._cachedResponse = null;
break;
case 'arraybuffer':
this._cachedResponse = base64.toByteArray(this._response).buffer;
break;
case 'blob':
this._cachedResponse = new global.Blob([base64.toByteArray(this._response).buffer], { type: this.getResponseHeader('content-type') || '' });
break;
case 'json':
try {
this._cachedResponse = JSON.parse(this._response);
} catch (_) {
this._cachedResponse = null;
}
break;
default:
this._cachedResponse = null;
}
return this._cachedResponse;
}
}]);
return XMLHttpRequest;
}(EventTarget.apply(undefined, babelHelpers.toConsumableArray(XHR_EVENTS)));
XMLHttpRequest.UNSENT = UNSENT;
XMLHttpRequest.OPENED = OPENED;
XMLHttpRequest.HEADERS_RECEIVED = HEADERS_RECEIVED;
XMLHttpRequest.LOADING = LOADING;
XMLHttpRequest.DONE = DONE;
XMLHttpRequest._interceptor = null;
module.exports = XMLHttpRequest;
}, 259, null, "XMLHttpRequest");
__d(/* RCTNetworking */function(global, require, module, exports) {
'use strict';
var FormData = require(261 ); // 261 = FormData
var NativeEventEmitter = require(102 ); // 102 = NativeEventEmitter
var RCTNetworkingNative = require(80 ).Networking; // 80 = NativeModules
var convertRequestBody = require(262 ); // 262 = convertRequestBody
var RCTNetworking = function (_NativeEventEmitter) {
babelHelpers.inherits(RCTNetworking, _NativeEventEmitter);
function RCTNetworking() {
babelHelpers.classCallCheck(this, RCTNetworking);
return babelHelpers.possibleConstructorReturn(this, (RCTNetworking.__proto__ || Object.getPrototypeOf(RCTNetworking)).call(this, RCTNetworkingNative));
}
babelHelpers.createClass(RCTNetworking, [{
key: 'sendRequest',
value: function sendRequest(method, trackingName, url, headers, data, responseType, incrementalUpdates, timeout, callback) {
var body = convertRequestBody(data);
RCTNetworkingNative.sendRequest({
method: method,
url: url,
data: babelHelpers.extends({}, body, { trackingName: trackingName }),
headers: headers,
responseType: responseType,
incrementalUpdates: incrementalUpdates,
timeout: timeout
}, callback);
}
}, {
key: 'abortRequest',
value: function abortRequest(requestId) {
RCTNetworkingNative.abortRequest(requestId);
}
}, {
key: 'clearCookies',
value: function clearCookies(callback) {
RCTNetworkingNative.clearCookies(callback);
}
}]);
return RCTNetworking;
}(NativeEventEmitter);
module.exports = new RCTNetworking();
}, 260, null, "RCTNetworking");
__d(/* FormData */function(global, require, module, exports) {
'use strict';
var FormData = function () {
function FormData() {
babelHelpers.classCallCheck(this, FormData);
this._parts = [];
}
babelHelpers.createClass(FormData, [{
key: 'append',
value: function append(key, value) {
this._parts.push([key, value]);
}
}, {
key: 'getParts',
value: function getParts() {
return this._parts.map(function (_ref) {
var _ref2 = babelHelpers.slicedToArray(_ref, 2),
name = _ref2[0],
value = _ref2[1];
var contentDisposition = 'form-data; name="' + name + '"';
var headers = { 'content-disposition': contentDisposition };
if (typeof value === 'object') {
if (typeof value.name === 'string') {
headers['content-disposition'] += '; filename="' + value.name + '"';
}
if (typeof value.type === 'string') {
headers['content-type'] = value.type;
}
return babelHelpers.extends({}, value, { headers: headers, fieldName: name });
}
return { string: String(value), headers: headers, fieldName: name };
});
}
}]);
return FormData;
}();
module.exports = FormData;
}, 261, null, "FormData");
__d(/* convertRequestBody */function(global, require, module, exports) {
'use strict';
var binaryToBase64 = require(114 ); // 114 = binaryToBase64
var FormData = require(261 ); // 261 = FormData
function convertRequestBody(body) {
if (typeof body === 'string') {
return { string: body };
}
if (body instanceof FormData) {
return { formData: body.getParts() };
}
if (body instanceof ArrayBuffer || ArrayBuffer.isView(body)) {
return { base64: binaryToBase64(body) };
}
return body;
}
module.exports = convertRequestBody;
}, 262, null, "convertRequestBody");
__d(/* Geolocation */function(global, require, module, exports) {
'use strict';
var NativeEventEmitter = require(102 ); // 102 = NativeEventEmitter
var RCTLocationObserver = require(80 ).LocationObserver; // 80 = NativeModules
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var logError = require(112 ); // 112 = logError
var warning = require(40 ); // 40 = fbjs/lib/warning
var LocationEventEmitter = new NativeEventEmitter(RCTLocationObserver);
var subscriptions = [];
var updatesEnabled = false;
var Geolocation = {
getCurrentPosition: function getCurrentPosition(geo_success, geo_error, geo_options) {
invariant(typeof geo_success === 'function', 'Must provide a valid geo_success callback.');
RCTLocationObserver.getCurrentPosition(geo_options || {}, geo_success, geo_error || logError);
},
watchPosition: function watchPosition(success, error, options) {
if (!updatesEnabled) {
RCTLocationObserver.startObserving(options || {});
updatesEnabled = true;
}
var watchID = subscriptions.length;
subscriptions.push([LocationEventEmitter.addListener('geolocationDidChange', success), error ? LocationEventEmitter.addListener('geolocationError', error) : null]);
return watchID;
},
clearWatch: function clearWatch(watchID) {
var sub = subscriptions[watchID];
if (!sub) {
return;
}
sub[0].remove();
var sub1 = sub[1];sub1 && sub1.remove();
subscriptions[watchID] = undefined;
var noWatchers = true;
for (var ii = 0; ii < subscriptions.length; ii++) {
if (subscriptions[ii]) {
noWatchers = false;
}
}
if (noWatchers) {
Geolocation.stopObserving();
}
},
stopObserving: function stopObserving() {
if (updatesEnabled) {
RCTLocationObserver.stopObserving();
updatesEnabled = false;
for (var ii = 0; ii < subscriptions.length; ii++) {
var sub = subscriptions[ii];
if (sub) {
warning('Called stopObserving with existing subscriptions.');
sub[0].remove();
var sub1 = sub[1];sub1 && sub1.remove();
}
}
subscriptions = [];
}
}
};
module.exports = Geolocation;
}, 263, null, "Geolocation");
__d(/* setupDevtools */function(global, require, module, exports) {
'use strict';
var NativeModules = require(80 ); // 80 = NativeModules
var Platform = require(79 ); // 79 = Platform
function setupDevtools() {
var messageListeners = [];
var closeListeners = [];
var hostname = 'localhost';
if (Platform.OS === 'android' && NativeModules.AndroidConstants) {
hostname = NativeModules.AndroidConstants.ServerHost.split(':')[0];
}
var port = window.__REACT_DEVTOOLS_PORT__ || 8097;
var ws = new window.WebSocket('ws://' + hostname + ':' + port + '/devtools');
var FOR_BACKEND = {
resolveRNStyle: require(77 ), // 77 = flattenStyle
wall: {
listen: function listen(fn) {
messageListeners.push(fn);
},
onClose: function onClose(fn) {
closeListeners.push(fn);
},
send: function send(data) {
ws.send(JSON.stringify(data));
}
}
};
ws.onclose = handleClose;
ws.onerror = handleClose;
ws.onopen = function () {
tryToConnect();
};
var hasClosed = false;
function handleClose() {
if (!hasClosed) {
hasClosed = true;
setTimeout(setupDevtools, 2000);
closeListeners.forEach(function (fn) {
return fn();
});
}
}
function tryToConnect() {
ws.send('attach:agent');
var _interval = setInterval(function () {
return ws.send('attach:agent');
}, 500);
ws.onmessage = function (evt) {
if (evt.data.indexOf('eval:') === 0) {
clearInterval(_interval);
initialize(evt.data.slice('eval:'.length));
}
};
}
function initialize(text) {
try {
eval(text);
} catch (e) {
console.error('Failed to eval: ' + e.message);
return;
}
var ReactNativeComponentTree = require(159 ); // 159 = ReactNativeComponentTree
window.__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({
ComponentTree: {
getClosestInstanceFromNode: function getClosestInstanceFromNode(node) {
return ReactNativeComponentTree.getClosestInstanceFromNode(node);
},
getNodeFromInstance: function getNodeFromInstance(inst) {
while (inst._renderedComponent) {
inst = inst._renderedComponent;
}
if (inst) {
return ReactNativeComponentTree.getNodeFromInstance(inst);
} else {
return null;
}
}
},
Mount: require(265 ), // 265 = ReactNativeMount
Reconciler: require(173 ) // 173 = ReactReconciler
});
ws.onmessage = handleMessage;
}
function handleMessage(evt) {
var data;
try {
data = JSON.parse(evt.data);
} catch (e) {
return console.error('failed to parse json: ' + evt.data);
}
if (data.$close || data.$error) {
closeListeners.forEach(function (fn) {
return fn();
});
window.__REACT_DEVTOOLS_GLOBAL_HOOK__.emit('shutdown');
tryToConnect();
return;
}
if (data.$open) {
return;
}
messageListeners.forEach(function (fn) {
try {
fn(data);
} catch (e) {
console.log(data);
throw e;
}
});
}
}
module.exports = setupDevtools;
}, 264, null, "setupDevtools");
__d(/* ReactNativeMount */function(global, require, module, exports) {
'use strict';
var React = require(126 ); // 126 = React
var ReactInstrumentation = require(176 ); // 176 = ReactInstrumentation
var ReactNativeContainerInfo = require(266 ); // 266 = ReactNativeContainerInfo
var ReactNativeTagHandles = require(168 ); // 168 = ReactNativeTagHandles
var ReactReconciler = require(173 ); // 173 = ReactReconciler
var ReactUpdateQueue = require(267 ); // 267 = ReactUpdateQueue
var ReactUpdates = require(169 ); // 169 = ReactUpdates
var UIManager = require(123 ); // 123 = UIManager
var emptyObject = require(43 ); // 43 = fbjs/lib/emptyObject
var instantiateReactComponent = require(181 ); // 181 = instantiateReactComponent
var shouldUpdateReactComponent = require(188 ); // 188 = shouldUpdateReactComponent
var TopLevelWrapper = function TopLevelWrapper() {};
TopLevelWrapper.prototype.isReactComponent = {};
if (__DEV__) {
TopLevelWrapper.displayName = 'TopLevelWrapper';
}
TopLevelWrapper.prototype.render = function () {
return this.props.child;
};
TopLevelWrapper.isReactTopLevelWrapper = true;
function mountComponentIntoNode(componentInstance, containerTag, transaction) {
var markup = ReactReconciler.mountComponent(componentInstance, transaction, null, ReactNativeContainerInfo(containerTag), emptyObject, 0);
componentInstance._renderedComponent._topLevelWrapper = componentInstance;
ReactNativeMount._mountImageIntoNode(markup, containerTag);
}
function batchedMountComponentIntoNode(componentInstance, containerTag) {
var transaction = ReactUpdates.ReactReconcileTransaction.getPooled();
transaction.perform(mountComponentIntoNode, null, componentInstance, containerTag, transaction);
ReactUpdates.ReactReconcileTransaction.release(transaction);
}
var ReactNativeMount = {
_instancesByContainerID: {},
findNodeHandle: require(124 ), // 124 = findNodeHandle
renderComponent: function renderComponent(nextElement, containerTag, callback) {
var nextWrappedElement = React.createElement(TopLevelWrapper, { child: nextElement });
var topRootNodeID = containerTag;
var prevComponent = ReactNativeMount._instancesByContainerID[topRootNodeID];
if (prevComponent) {
var prevWrappedElement = prevComponent._currentElement;
var prevElement = prevWrappedElement.props.child;
if (shouldUpdateReactComponent(prevElement, nextElement)) {
ReactUpdateQueue.enqueueElementInternal(prevComponent, nextWrappedElement, emptyObject);
if (callback) {
ReactUpdateQueue.enqueueCallbackInternal(prevComponent, callback);
}
return prevComponent;
} else {
ReactNativeMount.unmountComponentAtNode(containerTag);
}
}
if (!ReactNativeTagHandles.reactTagIsNativeTopRootID(containerTag)) {
console.error('You cannot render into anything but a top root');
return null;
}
ReactNativeTagHandles.assertRootTag(containerTag);
var instance = instantiateReactComponent(nextWrappedElement, false);
ReactNativeMount._instancesByContainerID[containerTag] = instance;
ReactUpdates.batchedUpdates(batchedMountComponentIntoNode, instance, containerTag);
var component = instance.getPublicInstance();
if (callback) {
callback.call(component);
}
return component;
},
_mountImageIntoNode: function _mountImageIntoNode(mountImage, containerID) {
var childTag = mountImage;
UIManager.setChildren(containerID, [childTag]);
},
unmountComponentAtNodeAndRemoveContainer: function unmountComponentAtNodeAndRemoveContainer(containerTag) {
ReactNativeMount.unmountComponentAtNode(containerTag);
UIManager.removeRootView(containerTag);
},
unmountComponentAtNode: function unmountComponentAtNode(containerTag) {
if (!ReactNativeTagHandles.reactTagIsNativeTopRootID(containerTag)) {
console.error('You cannot render into anything but a top root');
return false;
}
var instance = ReactNativeMount._instancesByContainerID[containerTag];
if (!instance) {
return false;
}
if (__DEV__) {
ReactInstrumentation.debugTool.onBeginFlush();
}
ReactNativeMount.unmountComponentFromNode(instance, containerTag);
delete ReactNativeMount._instancesByContainerID[containerTag];
if (__DEV__) {
ReactInstrumentation.debugTool.onEndFlush();
}
return true;
},
unmountComponentFromNode: function unmountComponentFromNode(instance, containerID) {
ReactReconciler.unmountComponent(instance);
UIManager.removeSubviewsFromContainerWithID(containerID);
}
};
module.exports = ReactNativeMount;
}, 265, null, "ReactNativeMount");
__d(/* ReactNativeContainerInfo */function(global, require, module, exports) {
'use strict';
function ReactNativeContainerInfo(tag) {
var info = {
_tag: tag
};
return info;
}
module.exports = ReactNativeContainerInfo;
}, 266, null, "ReactNativeContainerInfo");
__d(/* ReactUpdateQueue */function(global, require, module, exports) {
'use strict';
var ReactCurrentOwner = require(49 ); // 49 = react/lib/ReactCurrentOwner
var ReactInstanceMap = require(125 ); // 125 = ReactInstanceMap
var ReactInstrumentation = require(176 ); // 176 = ReactInstrumentation
var ReactUpdates = require(169 ); // 169 = ReactUpdates
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var warning = require(40 ); // 40 = fbjs/lib/warning
function enqueueUpdate(internalInstance) {
ReactUpdates.enqueueUpdate(internalInstance);
}
function formatUnexpectedArgument(arg) {
var type = typeof arg;
if (type !== 'object') {
return type;
}
var displayName = arg.constructor && arg.constructor.name || type;
var keys = Object.keys(arg);
if (keys.length > 0 && keys.length < 20) {
return displayName + ' (keys: ' + keys.join(', ') + ')';
}
return displayName;
}
function getInternalInstanceReadyForUpdate(publicInstance, callerName) {
var internalInstance = ReactInstanceMap.get(publicInstance);
if (!internalInstance) {
if (__DEV__) {
var ctor = publicInstance.constructor;
warning(!callerName, '%s(...): Can only update a mounted or mounting component. ' + 'This usually means you called %s() on an unmounted component. ' + 'This is a no-op. Please check the code for the %s component.', callerName, callerName, ctor && (ctor.displayName || ctor.name) || 'ReactClass');
}
return null;
}
if (__DEV__) {
warning(ReactCurrentOwner.current == null, '%s(...): Cannot update during an existing state transition (such as ' + 'within `render` or another component\'s constructor). Render methods ' + 'should be a pure function of props and state; constructor ' + 'side-effects are an anti-pattern, but can be moved to ' + '`componentWillMount`.', callerName);
}
return internalInstance;
}
var ReactUpdateQueue = {
isMounted: function isMounted(publicInstance) {
if (__DEV__) {
var owner = ReactCurrentOwner.current;
if (owner !== null) {
warning(owner._warnedAboutRefsInRender, '%s is accessing isMounted inside its render() function. ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', owner.getName() || 'A component');
owner._warnedAboutRefsInRender = true;
}
}
var internalInstance = ReactInstanceMap.get(publicInstance);
if (internalInstance) {
return !!internalInstance._renderedComponent;
} else {
return false;
}
},
enqueueCallback: function enqueueCallback(publicInstance, callback, callerName) {
ReactUpdateQueue.validateCallback(callback, callerName);
var internalInstance = getInternalInstanceReadyForUpdate(publicInstance);
if (!internalInstance) {
return null;
}
if (internalInstance._pendingCallbacks) {
internalInstance._pendingCallbacks.push(callback);
} else {
internalInstance._pendingCallbacks = [callback];
}
enqueueUpdate(internalInstance);
},
enqueueCallbackInternal: function enqueueCallbackInternal(internalInstance, callback) {
if (internalInstance._pendingCallbacks) {
internalInstance._pendingCallbacks.push(callback);
} else {
internalInstance._pendingCallbacks = [callback];
}
enqueueUpdate(internalInstance);
},
enqueueForceUpdate: function enqueueForceUpdate(publicInstance) {
var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'forceUpdate');
if (!internalInstance) {
return;
}
internalInstance._pendingForceUpdate = true;
enqueueUpdate(internalInstance);
},
enqueueReplaceState: function enqueueReplaceState(publicInstance, completeState) {
var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'replaceState');
if (!internalInstance) {
return;
}
internalInstance._pendingStateQueue = [completeState];
internalInstance._pendingReplaceState = true;
enqueueUpdate(internalInstance);
},
enqueueSetState: function enqueueSetState(publicInstance, partialState) {
if (__DEV__) {
ReactInstrumentation.debugTool.onSetState();
warning(partialState != null, 'setState(...): You passed an undefined or null state object; ' + 'instead, use forceUpdate().');
}
var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'setState');
if (!internalInstance) {
return;
}
var queue = internalInstance._pendingStateQueue || (internalInstance._pendingStateQueue = []);
queue.push(partialState);
enqueueUpdate(internalInstance);
},
enqueueElementInternal: function enqueueElementInternal(internalInstance, nextElement, nextContext) {
internalInstance._pendingElement = nextElement;
internalInstance._context = nextContext;
enqueueUpdate(internalInstance);
},
validateCallback: function validateCallback(callback, callerName) {
invariant(!callback || typeof callback === 'function', '%s(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callerName, formatUnexpectedArgument(callback));
}
};
module.exports = ReactUpdateQueue;
}, 267, null, "ReactUpdateQueue");
__d(/* RCTDebugComponentOwnership */function(global, require, module, exports) {
'use strict';
var BatchedBridge = require(81 ); // 81 = BatchedBridge
var RCTDebugComponentOwnership = {
getOwnerHierarchy: function getOwnerHierarchy(requestID, tag) {
throw new Error('This seems to be unused. Will disable until it is needed again.');
}
};
BatchedBridge.registerCallableModule('RCTDebugComponentOwnership', RCTDebugComponentOwnership);
module.exports = RCTDebugComponentOwnership;
}, 268, null, "RCTDebugComponentOwnership");
__d(/* JSInspector */function(global, require, module, exports) {
'use strict';
var JSInspector = {
registerAgent: function registerAgent(type) {
if (global.__registerInspectorAgent) {
global.__registerInspectorAgent(type);
}
},
getTimestamp: function getTimestamp() {
return global.__inspectorTimestamp();
}
};
module.exports = JSInspector;
}, 269, null, "JSInspector");
__d(/* NetworkAgent */function(global, require, module, exports) {
'use strict';
var InspectorAgent = require(271 ); // 271 = InspectorAgent
var JSInspector = require(269 ); // 269 = JSInspector
var Map = require(223 ); // 223 = Map
var XMLHttpRequest = require(259 ); // 259 = XMLHttpRequest
var Interceptor = function () {
function Interceptor(agent) {
babelHelpers.classCallCheck(this, Interceptor);
this._agent = agent;
this._requests = new Map();
}
babelHelpers.createClass(Interceptor, [{
key: 'getData',
value: function getData(requestId) {
return this._requests.get(requestId);
}
}, {
key: 'requestSent',
value: function requestSent(id, url, method, headers) {
var requestId = String(id);
this._requests.set(requestId, '');
var request = {
url: url,
method: method,
headers: headers,
initialPriority: 'Medium'
};
var event = {
requestId: requestId,
documentURL: '',
frameId: '1',
loaderId: '1',
request: request,
timestamp: JSInspector.getTimestamp(),
initiator: {
type: 'other'
},
type: 'Other'
};
this._agent.sendEvent('requestWillBeSent', event);
}
}, {
key: 'responseReceived',
value: function responseReceived(id, url, status, headers) {
var requestId = String(id);
var response = {
url: url,
status: status,
statusText: String(status),
headers: headers,
requestHeaders: {},
mimeType: this._getMimeType(headers),
connectionReused: false,
connectionId: -1,
encodedDataLength: 0,
securityState: 'unknown'
};
var event = {
requestId: requestId,
frameId: '1',
loaderId: '1',
timestamp: JSInspector.getTimestamp(),
type: 'Other',
response: response
};
this._agent.sendEvent('responseReceived', event);
}
}, {
key: 'dataReceived',
value: function dataReceived(id, data) {
var requestId = String(id);
var existingData = this._requests.get(requestId) || '';
this._requests.set(requestId, existingData.concat(data));
var event = {
requestId: requestId,
timestamp: JSInspector.getTimestamp(),
dataLength: data.length,
encodedDataLength: data.length
};
this._agent.sendEvent('dataReceived', event);
}
}, {
key: 'loadingFinished',
value: function loadingFinished(id, encodedDataLength) {
var event = {
requestId: String(id),
timestamp: JSInspector.getTimestamp(),
encodedDataLength: encodedDataLength
};
this._agent.sendEvent('loadingFinished', event);
}
}, {
key: 'loadingFailed',
value: function loadingFailed(id, error) {
var event = {
requestId: String(id),
timestamp: JSInspector.getTimestamp(),
type: 'Other',
errorText: error
};
this._agent.sendEvent('loadingFailed', event);
}
}, {
key: '_getMimeType',
value: function _getMimeType(headers) {
var contentType = headers['Content-Type'] || '';
return contentType.split(';')[0];
}
}]);
return Interceptor;
}();
var NetworkAgent = function (_InspectorAgent) {
babelHelpers.inherits(NetworkAgent, _InspectorAgent);
function NetworkAgent() {
babelHelpers.classCallCheck(this, NetworkAgent);
return babelHelpers.possibleConstructorReturn(this, (NetworkAgent.__proto__ || Object.getPrototypeOf(NetworkAgent)).apply(this, arguments));
}
babelHelpers.createClass(NetworkAgent, [{
key: 'enable',
value: function enable(_ref) {
var maxResourceBufferSize = _ref.maxResourceBufferSize,
maxTotalBufferSize = _ref.maxTotalBufferSize;
this._interceptor = new Interceptor(this);
XMLHttpRequest.setInterceptor(this._interceptor);
}
}, {
key: 'disable',
value: function disable() {
XMLHttpRequest.setInterceptor(null);
this._interceptor = null;
}
}, {
key: 'getResponseBody',
value: function getResponseBody(_ref2) {
var requestId = _ref2.requestId;
return { body: this.interceptor().getData(requestId), base64Encoded: false };
}
}, {
key: 'interceptor',
value: function interceptor() {
if (this._interceptor) {
return this._interceptor;
} else {
throw Error('_interceptor can not be null');
}
}
}]);
return NetworkAgent;
}(InspectorAgent);
NetworkAgent.DOMAIN = 'Network';
module.exports = NetworkAgent;
}, 270, null, "NetworkAgent");
__d(/* InspectorAgent */function(global, require, module, exports) {
'use strict';
var InspectorAgent = function () {
function InspectorAgent(eventSender) {
babelHelpers.classCallCheck(this, InspectorAgent);
this._eventSender = eventSender;
}
babelHelpers.createClass(InspectorAgent, [{
key: 'sendEvent',
value: function sendEvent(name, params) {
this._eventSender(name, params);
}
}]);
return InspectorAgent;
}();
module.exports = InspectorAgent;
}, 271, null, "InspectorAgent");
__d(/* RCTNativeAppEventEmitter */function(global, require, module, exports) {
'use strict';
var BatchedBridge = require(81 ); // 81 = BatchedBridge
var RCTDeviceEventEmitter = require(107 ); // 107 = RCTDeviceEventEmitter
var RCTNativeAppEventEmitter = RCTDeviceEventEmitter;
BatchedBridge.registerCallableModule('RCTNativeAppEventEmitter', RCTNativeAppEventEmitter);
module.exports = RCTNativeAppEventEmitter;
}, 272, null, "RCTNativeAppEventEmitter");
__d(/* PerformanceLogger */function(global, require, module, exports) {
'use strict';
var BatchedBridge = require(81 ); // 81 = BatchedBridge
var performanceNow = global.nativePerformanceNow || require(90 ); // 90 = fbjs/lib/performanceNow
var timespans = {};
var extras = {};
var PerformanceLogger = {
addTimespan: function addTimespan(key, lengthInMs, description) {
if (timespans[key]) {
if (__DEV__) {
console.log('PerformanceLogger: Attempting to add a timespan that already exists ', key);
}
return;
}
timespans[key] = {
description: description,
totalTime: lengthInMs
};
},
startTimespan: function startTimespan(key, description) {
if (timespans[key]) {
if (__DEV__) {
console.log('PerformanceLogger: Attempting to start a timespan that already exists ', key);
}
return;
}
timespans[key] = {
description: description,
startTime: performanceNow()
};
},
stopTimespan: function stopTimespan(key) {
if (!timespans[key] || !timespans[key].startTime) {
if (__DEV__) {
console.log('PerformanceLogger: Attempting to end a timespan that has not started ', key);
}
return;
}
if (timespans[key].endTime) {
if (__DEV__) {
console.log('PerformanceLogger: Attempting to end a timespan that has already ended ', key);
}
return;
}
timespans[key].endTime = performanceNow();
timespans[key].totalTime = timespans[key].endTime - timespans[key].startTime;
},
clear: function clear() {
timespans = {};
extras = {};
},
clearExceptTimespans: function clearExceptTimespans(keys) {
timespans = Object.keys(timespans).reduce(function (previous, key) {
if (keys.indexOf(key) !== -1) {
previous[key] = timespans[key];
}
return previous;
}, {});
extras = {};
},
getTimespans: function getTimespans() {
return timespans;
},
hasTimespan: function hasTimespan(key) {
return !!timespans[key];
},
logTimespans: function logTimespans() {
for (var key in timespans) {
if (timespans[key].totalTime) {
console.log(key + ': ' + timespans[key].totalTime + 'ms');
}
}
},
addTimespans: function addTimespans(newTimespans, labels) {
for (var i = 0, l = newTimespans.length; i < l; i += 2) {
var label = labels[i / 2];
PerformanceLogger.addTimespan(label, newTimespans[i + 1] - newTimespans[i], label);
}
},
setExtra: function setExtra(key, value) {
if (extras[key]) {
if (__DEV__) {
console.log('PerformanceLogger: Attempting to set an extra that already exists ', key);
}
return;
}
extras[key] = value;
},
getExtras: function getExtras() {
return extras;
}
};
BatchedBridge.registerCallableModule('PerformanceLogger', PerformanceLogger);
module.exports = PerformanceLogger;
}, 273, null, "PerformanceLogger");
__d(/* RCTEventEmitter */function(global, require, module, exports) {
'use strict';
var BatchedBridge = require(81 ); // 81 = BatchedBridge
var RCTEventEmitter = {
register: function register(eventEmitter) {
BatchedBridge.registerCallableModule('RCTEventEmitter', eventEmitter);
}
};
module.exports = RCTEventEmitter;
}, 274, null, "RCTEventEmitter");
__d(/* ReactDefaultBatchingStrategy */function(global, require, module, exports) {
'use strict';
var ReactUpdates = require(169 ); // 169 = ReactUpdates
var Transaction = require(177 ); // 177 = Transaction
var emptyFunction = require(41 ); // 41 = fbjs/lib/emptyFunction
var RESET_BATCHED_UPDATES = {
initialize: emptyFunction,
close: function close() {
ReactDefaultBatchingStrategy.isBatchingUpdates = false;
}
};
var FLUSH_BATCHED_UPDATES = {
initialize: emptyFunction,
close: ReactUpdates.flushBatchedUpdates.bind(ReactUpdates)
};
var TRANSACTION_WRAPPERS = [FLUSH_BATCHED_UPDATES, RESET_BATCHED_UPDATES];
function ReactDefaultBatchingStrategyTransaction() {
this.reinitializeTransaction();
}
babelHelpers.extends(ReactDefaultBatchingStrategyTransaction.prototype, Transaction, {
getTransactionWrappers: function getTransactionWrappers() {
return TRANSACTION_WRAPPERS;
}
});
var transaction = new ReactDefaultBatchingStrategyTransaction();
var ReactDefaultBatchingStrategy = {
isBatchingUpdates: false,
batchedUpdates: function batchedUpdates(callback, a, b, c, d, e) {
var alreadyBatchingUpdates = ReactDefaultBatchingStrategy.isBatchingUpdates;
ReactDefaultBatchingStrategy.isBatchingUpdates = true;
if (alreadyBatchingUpdates) {
return callback(a, b, c, d, e);
} else {
return transaction.perform(callback, null, a, b, c, d, e);
}
}
};
module.exports = ReactDefaultBatchingStrategy;
}, 275, null, "ReactDefaultBatchingStrategy");
__d(/* ReactNativeBridgeEventPlugin */function(global, require, module, exports) {
'use strict';
var EventPropagators = require(277 ); // 277 = EventPropagators
var SyntheticEvent = require(278 ); // 278 = SyntheticEvent
var UIManager = require(123 ); // 123 = UIManager
var warning = require(40 ); // 40 = fbjs/lib/warning
var customBubblingEventTypes = UIManager.customBubblingEventTypes;
var customDirectEventTypes = UIManager.customDirectEventTypes;
var allTypesByEventName = {};
for (var bubblingTypeName in customBubblingEventTypes) {
allTypesByEventName[bubblingTypeName] = customBubblingEventTypes[bubblingTypeName];
}
for (var directTypeName in customDirectEventTypes) {
warning(!customBubblingEventTypes[directTypeName], 'Event cannot be both direct and bubbling: %s', directTypeName);
allTypesByEventName[directTypeName] = customDirectEventTypes[directTypeName];
}
var ReactNativeBridgeEventPlugin = {
eventTypes: babelHelpers.extends({}, customBubblingEventTypes, customDirectEventTypes),
extractEvents: function extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
var bubbleDispatchConfig = customBubblingEventTypes[topLevelType];
var directDispatchConfig = customDirectEventTypes[topLevelType];
var event = SyntheticEvent.getPooled(bubbleDispatchConfig || directDispatchConfig, targetInst, nativeEvent, nativeEventTarget);
if (bubbleDispatchConfig) {
EventPropagators.accumulateTwoPhaseDispatches(event);
} else if (directDispatchConfig) {
EventPropagators.accumulateDirectDispatches(event);
} else {
return null;
}
return event;
}
};
module.exports = ReactNativeBridgeEventPlugin;
}, 276, null, "ReactNativeBridgeEventPlugin");
__d(/* EventPropagators */function(global, require, module, exports) {
'use strict';
var EventPluginHub = require(161 ); // 161 = EventPluginHub
var EventPluginUtils = require(163 ); // 163 = EventPluginUtils
var accumulateInto = require(165 ); // 165 = accumulateInto
var forEachAccumulated = require(166 ); // 166 = forEachAccumulated
var warning = require(40 ); // 40 = fbjs/lib/warning
var getListener = EventPluginHub.getListener;
function listenerAtPhase(inst, event, propagationPhase) {
var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];
return getListener(inst, registrationName);
}
function accumulateDirectionalDispatches(inst, phase, event) {
if (__DEV__) {
warning(inst, 'Dispatching inst must not be null');
}
var listener = listenerAtPhase(inst, event, phase);
if (listener) {
event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);
event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);
}
}
function accumulateTwoPhaseDispatchesSingle(event) {
if (event && event.dispatchConfig.phasedRegistrationNames) {
EventPluginUtils.traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event);
}
}
function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {
if (event && event.dispatchConfig.phasedRegistrationNames) {
var targetInst = event._targetInst;
var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null;
EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);
}
}
function accumulateDispatches(inst, ignoredDirection, event) {
if (event && event.dispatchConfig.registrationName) {
var registrationName = event.dispatchConfig.registrationName;
var listener = getListener(inst, registrationName);
if (listener) {
event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);
event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);
}
}
}
function accumulateDirectDispatchesSingle(event) {
if (event && event.dispatchConfig.registrationName) {
accumulateDispatches(event._targetInst, null, event);
}
}
function accumulateTwoPhaseDispatches(events) {
forEachAccumulated(events, accumulateTwoPhaseDispatchesSingle);
}
function accumulateTwoPhaseDispatchesSkipTarget(events) {
forEachAccumulated(events, accumulateTwoPhaseDispatchesSingleSkipTarget);
}
function accumulateEnterLeaveDispatches(leave, enter, from, to) {
EventPluginUtils.traverseEnterLeave(from, to, accumulateDispatches, leave, enter);
}
function accumulateDirectDispatches(events) {
forEachAccumulated(events, accumulateDirectDispatchesSingle);
}
var EventPropagators = {
accumulateTwoPhaseDispatches: accumulateTwoPhaseDispatches,
accumulateTwoPhaseDispatchesSkipTarget: accumulateTwoPhaseDispatchesSkipTarget,
accumulateDirectDispatches: accumulateDirectDispatches,
accumulateEnterLeaveDispatches: accumulateEnterLeaveDispatches
};
module.exports = EventPropagators;
}, 277, null, "EventPropagators");
__d(/* SyntheticEvent */function(global, require, module, exports) {
'use strict';
var PooledClass = require(171 ); // 171 = PooledClass
var emptyFunction = require(41 ); // 41 = fbjs/lib/emptyFunction
var warning = require(40 ); // 40 = fbjs/lib/warning
var didWarnForAddedNewProperty = false;
var isProxySupported = typeof Proxy === 'function';
var shouldBeReleasedProperties = ['dispatchConfig', '_targetInst', 'nativeEvent', 'isDefaultPrevented', 'isPropagationStopped', '_dispatchListeners', '_dispatchInstances'];
var EventInterface = {
type: null,
target: null,
currentTarget: emptyFunction.thatReturnsNull,
eventPhase: null,
bubbles: null,
cancelable: null,
timeStamp: function timeStamp(event) {
return event.timeStamp || Date.now();
},
defaultPrevented: null,
isTrusted: null
};
function SyntheticEvent(dispatchConfig, targetInst, nativeEvent, nativeEventTarget) {
if (__DEV__) {
delete this.nativeEvent;
delete this.preventDefault;
delete this.stopPropagation;
}
this.dispatchConfig = dispatchConfig;
this._targetInst = targetInst;
this.nativeEvent = nativeEvent;
var Interface = this.constructor.Interface;
for (var propName in Interface) {
if (!Interface.hasOwnProperty(propName)) {
continue;
}
if (__DEV__) {
delete this[propName];
}
var normalize = Interface[propName];
if (normalize) {
this[propName] = normalize(nativeEvent);
} else {
if (propName === 'target') {
this.target = nativeEventTarget;
} else {
this[propName] = nativeEvent[propName];
}
}
}
var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false;
if (defaultPrevented) {
this.isDefaultPrevented = emptyFunction.thatReturnsTrue;
} else {
this.isDefaultPrevented = emptyFunction.thatReturnsFalse;
}
this.isPropagationStopped = emptyFunction.thatReturnsFalse;
return this;
}
babelHelpers.extends(SyntheticEvent.prototype, {
preventDefault: function preventDefault() {
this.defaultPrevented = true;
var event = this.nativeEvent;
if (!event) {
return;
}
if (event.preventDefault) {
event.preventDefault();
} else if (typeof event.returnValue !== 'unknown') {
event.returnValue = false;
}
this.isDefaultPrevented = emptyFunction.thatReturnsTrue;
},
stopPropagation: function stopPropagation() {
var event = this.nativeEvent;
if (!event) {
return;
}
if (event.stopPropagation) {
event.stopPropagation();
} else if (typeof event.cancelBubble !== 'unknown') {
event.cancelBubble = true;
}
this.isPropagationStopped = emptyFunction.thatReturnsTrue;
},
persist: function persist() {
this.isPersistent = emptyFunction.thatReturnsTrue;
},
isPersistent: emptyFunction.thatReturnsFalse,
destructor: function destructor() {
var Interface = this.constructor.Interface;
for (var propName in Interface) {
if (__DEV__) {
Object.defineProperty(this, propName, getPooledWarningPropertyDefinition(propName, Interface[propName]));
} else {
this[propName] = null;
}
}
for (var i = 0; i < shouldBeReleasedProperties.length; i++) {
this[shouldBeReleasedProperties[i]] = null;
}
if (__DEV__) {
Object.defineProperty(this, 'nativeEvent', getPooledWarningPropertyDefinition('nativeEvent', null));
Object.defineProperty(this, 'preventDefault', getPooledWarningPropertyDefinition('preventDefault', emptyFunction));
Object.defineProperty(this, 'stopPropagation', getPooledWarningPropertyDefinition('stopPropagation', emptyFunction));
}
}
});
SyntheticEvent.Interface = EventInterface;
if (__DEV__) {
if (isProxySupported) {
SyntheticEvent = new Proxy(SyntheticEvent, {
construct: function construct(target, args) {
return this.apply(target, Object.create(target.prototype), args);
},
apply: function apply(constructor, that, args) {
return new Proxy(constructor.apply(that, args), {
set: function set(target, prop, value) {
if (prop !== 'isPersistent' && !target.constructor.Interface.hasOwnProperty(prop) && shouldBeReleasedProperties.indexOf(prop) === -1) {
warning(didWarnForAddedNewProperty || target.isPersistent(), 'This synthetic event is reused for performance reasons. If you\'re ' + 'seeing this, you\'re adding a new property in the synthetic event object. ' + 'The property is never released. See ' + 'https://fb.me/react-event-pooling for more information.');
didWarnForAddedNewProperty = true;
}
target[prop] = value;
return true;
}
});
}
});
}
}
SyntheticEvent.augmentClass = function (Class, Interface) {
var Super = this;
var E = function E() {};
E.prototype = Super.prototype;
var prototype = new E();
babelHelpers.extends(prototype, Class.prototype);
Class.prototype = prototype;
Class.prototype.constructor = Class;
Class.Interface = babelHelpers.extends({}, Super.Interface, Interface);
Class.augmentClass = Super.augmentClass;
PooledClass.addPoolingTo(Class, PooledClass.fourArgumentPooler);
};
PooledClass.addPoolingTo(SyntheticEvent, PooledClass.fourArgumentPooler);
module.exports = SyntheticEvent;
function getPooledWarningPropertyDefinition(propName, getVal) {
var isFunction = typeof getVal === 'function';
return {
configurable: true,
set: set,
get: get
};
function set(val) {
var action = isFunction ? 'setting the method' : 'setting the property';
warn(action, 'This is effectively a no-op');
return val;
}
function get() {
var action = isFunction ? 'accessing the method' : 'accessing the property';
var result = isFunction ? 'This is a no-op function' : 'This is set to null';
warn(action, result);
return getVal;
}
function warn(action, result) {
var warningCondition = false;
warning(warningCondition, 'This synthetic event is reused for performance reasons. If you\'re seeing this, ' + 'you\'re %s `%s` on a released/nullified synthetic event. %s. ' + 'If you must keep the original synthetic event around, use event.persist(). ' + 'See https://fb.me/react-event-pooling for more information.', action, propName, result);
}
}
}, 278, null, "SyntheticEvent");
__d(/* ReactNativeComponentEnvironment */function(global, require, module, exports) {
'use strict';
var ReactNativeDOMIDOperations = require(280 ); // 280 = ReactNativeDOMIDOperations
var ReactNativeReconcileTransaction = require(281 ); // 281 = ReactNativeReconcileTransaction
var ReactNativeComponentEnvironment = {
processChildrenUpdates: ReactNativeDOMIDOperations.dangerouslyProcessChildrenUpdates,
replaceNodeWithMarkup: ReactNativeDOMIDOperations.dangerouslyReplaceNodeWithMarkupByID,
clearNode: function clearNode() {},
ReactReconcileTransaction: ReactNativeReconcileTransaction
};
module.exports = ReactNativeComponentEnvironment;
}, 279, null, "ReactNativeComponentEnvironment");
__d(/* ReactNativeDOMIDOperations */function(global, require, module, exports) {
'use strict';
var ReactNativeComponentTree = require(159 ); // 159 = ReactNativeComponentTree
var UIManager = require(123 ); // 123 = UIManager
var dangerouslyProcessChildrenUpdates = function dangerouslyProcessChildrenUpdates(inst, childrenUpdates) {
if (!childrenUpdates.length) {
return;
}
var containerTag = ReactNativeComponentTree.getNodeFromInstance(inst);
var moveFromIndices;
var moveToIndices;
var addChildTags;
var addAtIndices;
var removeAtIndices;
for (var i = 0; i < childrenUpdates.length; i++) {
var update = childrenUpdates[i];
if (update.type === 'MOVE_EXISTING') {
(moveFromIndices || (moveFromIndices = [])).push(update.fromIndex);
(moveToIndices || (moveToIndices = [])).push(update.toIndex);
} else if (update.type === 'REMOVE_NODE') {
(removeAtIndices || (removeAtIndices = [])).push(update.fromIndex);
} else if (update.type === 'INSERT_MARKUP') {
var mountImage = update.content;
var tag = mountImage;
(addAtIndices || (addAtIndices = [])).push(update.toIndex);
(addChildTags || (addChildTags = [])).push(tag);
}
}
UIManager.manageChildren(containerTag, moveFromIndices, moveToIndices, addChildTags, addAtIndices, removeAtIndices);
};
var ReactNativeDOMIDOperations = {
dangerouslyProcessChildrenUpdates: dangerouslyProcessChildrenUpdates,
dangerouslyReplaceNodeWithMarkupByID: function dangerouslyReplaceNodeWithMarkupByID(id, mountImage) {
var oldTag = id;
UIManager.replaceExistingNonRootView(oldTag, mountImage);
}
};
module.exports = ReactNativeDOMIDOperations;
}, 280, null, "ReactNativeDOMIDOperations");
__d(/* ReactNativeReconcileTransaction */function(global, require, module, exports) {
'use strict';
var CallbackQueue = require(170 ); // 170 = CallbackQueue
var PooledClass = require(171 ); // 171 = PooledClass
var Transaction = require(177 ); // 177 = Transaction
var ReactInstrumentation = require(176 ); // 176 = ReactInstrumentation
var ReactUpdateQueue = require(267 ); // 267 = ReactUpdateQueue
var ON_DOM_READY_QUEUEING = {
initialize: function initialize() {
this.reactMountReady.reset();
},
close: function close() {
this.reactMountReady.notifyAll();
}
};
var TRANSACTION_WRAPPERS = [ON_DOM_READY_QUEUEING];
if (__DEV__) {
TRANSACTION_WRAPPERS.push({
initialize: ReactInstrumentation.debugTool.onBeginFlush,
close: ReactInstrumentation.debugTool.onEndFlush
});
}
function ReactNativeReconcileTransaction() {
this.reinitializeTransaction();
this.reactMountReady = CallbackQueue.getPooled(null);
}
var Mixin = {
getTransactionWrappers: function getTransactionWrappers() {
return TRANSACTION_WRAPPERS;
},
getReactMountReady: function getReactMountReady() {
return this.reactMountReady;
},
getUpdateQueue: function getUpdateQueue() {
return ReactUpdateQueue;
},
checkpoint: function checkpoint() {
return this.reactMountReady.checkpoint();
},
rollback: function rollback(checkpoint) {
this.reactMountReady.rollback(checkpoint);
},
destructor: function destructor() {
CallbackQueue.release(this.reactMountReady);
this.reactMountReady = null;
}
};
babelHelpers.extends(ReactNativeReconcileTransaction.prototype, Transaction, ReactNativeReconcileTransaction, Mixin);
PooledClass.addPoolingTo(ReactNativeReconcileTransaction);
module.exports = ReactNativeReconcileTransaction;
}, 281, null, "ReactNativeReconcileTransaction");
__d(/* ReactNativeEventPluginOrder */function(global, require, module, exports) {
'use strict';
var ReactNativeEventPluginOrder = ['ResponderEventPlugin', 'ReactNativeBridgeEventPlugin'];
module.exports = ReactNativeEventPluginOrder;
}, 282, null, "ReactNativeEventPluginOrder");
__d(/* ReactNativeGlobalResponderHandler */function(global, require, module, exports) {
'use strict';
var UIManager = require(123 ); // 123 = UIManager
var ReactNativeGlobalResponderHandler = {
onChange: function onChange(from, to, blockNativeResponder) {
if (to !== null) {
UIManager.setJSResponder(to._rootNodeID, blockNativeResponder);
} else {
UIManager.clearJSResponder();
}
}
};
module.exports = ReactNativeGlobalResponderHandler;
}, 283, null, "ReactNativeGlobalResponderHandler");
__d(/* ReactNativeTextComponent */function(global, require, module, exports) {
'use strict';
var ReactNativeComponentTree = require(159 ); // 159 = ReactNativeComponentTree
var ReactNativeTagHandles = require(168 ); // 168 = ReactNativeTagHandles
var UIManager = require(123 ); // 123 = UIManager
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var ReactNativeTextComponent = function ReactNativeTextComponent(text) {
this._currentElement = text;
this._stringText = '' + text;
this._hostParent = null;
this._rootNodeID = 0;
};
babelHelpers.extends(ReactNativeTextComponent.prototype, {
mountComponent: function mountComponent(transaction, hostParent, hostContainerInfo, context) {
invariant(context.isInAParentText, 'RawText "%s" must be wrapped in an explicit <Text> component.', this._stringText);
this._hostParent = hostParent;
var tag = ReactNativeTagHandles.allocateTag();
this._rootNodeID = tag;
var nativeTopRootTag = hostContainerInfo._tag;
UIManager.createView(tag, 'RCTRawText', nativeTopRootTag, { text: this._stringText });
ReactNativeComponentTree.precacheNode(this, tag);
return tag;
},
getHostNode: function getHostNode() {
return this._rootNodeID;
},
receiveComponent: function receiveComponent(nextText, transaction, context) {
if (nextText !== this._currentElement) {
this._currentElement = nextText;
var nextStringText = '' + nextText;
if (nextStringText !== this._stringText) {
this._stringText = nextStringText;
UIManager.updateView(this._rootNodeID, 'RCTRawText', { text: this._stringText });
}
}
},
unmountComponent: function unmountComponent() {
ReactNativeComponentTree.uncacheNode(this);
this._currentElement = null;
this._stringText = null;
this._rootNodeID = 0;
}
});
module.exports = ReactNativeTextComponent;
}, 284, null, "ReactNativeTextComponent");
__d(/* ReactNativeTreeTraversal */function(global, require, module, exports) {
'use strict';
function getLowestCommonAncestor(instA, instB) {
var depthA = 0;
for (var tempA = instA; tempA; tempA = tempA._hostParent) {
depthA++;
}
var depthB = 0;
for (var tempB = instB; tempB; tempB = tempB._hostParent) {
depthB++;
}
while (depthA - depthB > 0) {
instA = instA._hostParent;
depthA--;
}
while (depthB - depthA > 0) {
instB = instB._hostParent;
depthB--;
}
var depth = depthA;
while (depth--) {
if (instA === instB) {
return instA;
}
instA = instA._hostParent;
instB = instB._hostParent;
}
return null;
}
function isAncestor(instA, instB) {
while (instB) {
if (instB === instA) {
return true;
}
instB = instB._hostParent;
}
return false;
}
function getParentInstance(inst) {
return inst._hostParent;
}
function traverseTwoPhase(inst, fn, arg) {
var path = [];
while (inst) {
path.push(inst);
inst = inst._hostParent;
}
var i;
for (i = path.length; i-- > 0;) {
fn(path[i], 'captured', arg);
}
for (i = 0; i < path.length; i++) {
fn(path[i], 'bubbled', arg);
}
}
function traverseEnterLeave(from, to, fn, argFrom, argTo) {
var common = from && to ? getLowestCommonAncestor(from, to) : null;
var pathFrom = [];
while (from && from !== common) {
pathFrom.push(from);
from = from._hostParent;
}
var pathTo = [];
while (to && to !== common) {
pathTo.push(to);
to = to._hostParent;
}
var i;
for (i = 0; i < pathFrom.length; i++) {
fn(pathFrom[i], 'bubbled', argFrom);
}
for (i = pathTo.length; i-- > 0;) {
fn(pathTo[i], 'captured', argTo);
}
}
module.exports = {
isAncestor: isAncestor,
getLowestCommonAncestor: getLowestCommonAncestor,
getParentInstance: getParentInstance,
traverseTwoPhase: traverseTwoPhase,
traverseEnterLeave: traverseEnterLeave
};
}, 285, null, "ReactNativeTreeTraversal");
__d(/* ReactSimpleEmptyComponent */function(global, require, module, exports) {
'use strict';
var ReactReconciler = require(173 ); // 173 = ReactReconciler
var ReactSimpleEmptyComponent = function ReactSimpleEmptyComponent(placeholderElement, instantiate) {
this._currentElement = null;
this._renderedComponent = instantiate(placeholderElement);
};
babelHelpers.extends(ReactSimpleEmptyComponent.prototype, {
mountComponent: function mountComponent(transaction, hostParent, hostContainerInfo, context, parentDebugID) {
return ReactReconciler.mountComponent(this._renderedComponent, transaction, hostParent, hostContainerInfo, context, parentDebugID);
},
receiveComponent: function receiveComponent() {},
getHostNode: function getHostNode() {
return ReactReconciler.getHostNode(this._renderedComponent);
},
unmountComponent: function unmountComponent() {
ReactReconciler.unmountComponent(this._renderedComponent);
this._renderedComponent = null;
}
});
module.exports = ReactSimpleEmptyComponent;
}, 286, null, "ReactSimpleEmptyComponent");
__d(/* ResponderEventPlugin */function(global, require, module, exports) {
'use strict';
var EventPluginUtils = require(163 ); // 163 = EventPluginUtils
var EventPropagators = require(277 ); // 277 = EventPropagators
var ResponderSyntheticEvent = require(288 ); // 288 = ResponderSyntheticEvent
var ResponderTouchHistoryStore = require(289 ); // 289 = ResponderTouchHistoryStore
var accumulate = require(290 ); // 290 = accumulate
var isStartish = EventPluginUtils.isStartish;
var isMoveish = EventPluginUtils.isMoveish;
var isEndish = EventPluginUtils.isEndish;
var executeDirectDispatch = EventPluginUtils.executeDirectDispatch;
var hasDispatches = EventPluginUtils.hasDispatches;
var executeDispatchesInOrderStopAtTrue = EventPluginUtils.executeDispatchesInOrderStopAtTrue;
var responderInst = null;
var trackedTouchCount = 0;
var previousActiveTouches = 0;
var changeResponder = function changeResponder(nextResponderInst, blockHostResponder) {
var oldResponderInst = responderInst;
responderInst = nextResponderInst;
if (ResponderEventPlugin.GlobalResponderHandler !== null) {
ResponderEventPlugin.GlobalResponderHandler.onChange(oldResponderInst, nextResponderInst, blockHostResponder);
}
};
var eventTypes = {
startShouldSetResponder: {
phasedRegistrationNames: {
bubbled: 'onStartShouldSetResponder',
captured: 'onStartShouldSetResponderCapture'
}
},
scrollShouldSetResponder: {
phasedRegistrationNames: {
bubbled: 'onScrollShouldSetResponder',
captured: 'onScrollShouldSetResponderCapture'
}
},
selectionChangeShouldSetResponder: {
phasedRegistrationNames: {
bubbled: 'onSelectionChangeShouldSetResponder',
captured: 'onSelectionChangeShouldSetResponderCapture'
}
},
moveShouldSetResponder: {
phasedRegistrationNames: {
bubbled: 'onMoveShouldSetResponder',
captured: 'onMoveShouldSetResponderCapture'
}
},
responderStart: { registrationName: 'onResponderStart' },
responderMove: { registrationName: 'onResponderMove' },
responderEnd: { registrationName: 'onResponderEnd' },
responderRelease: { registrationName: 'onResponderRelease' },
responderTerminationRequest: {
registrationName: 'onResponderTerminationRequest'
},
responderGrant: { registrationName: 'onResponderGrant' },
responderReject: { registrationName: 'onResponderReject' },
responderTerminate: { registrationName: 'onResponderTerminate' }
};
function setResponderAndExtractTransfer(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
var shouldSetEventType = isStartish(topLevelType) ? eventTypes.startShouldSetResponder : isMoveish(topLevelType) ? eventTypes.moveShouldSetResponder : topLevelType === 'topSelectionChange' ? eventTypes.selectionChangeShouldSetResponder : eventTypes.scrollShouldSetResponder;
var bubbleShouldSetFrom = !responderInst ? targetInst : EventPluginUtils.getLowestCommonAncestor(responderInst, targetInst);
var skipOverBubbleShouldSetFrom = bubbleShouldSetFrom === responderInst;
var shouldSetEvent = ResponderSyntheticEvent.getPooled(shouldSetEventType, bubbleShouldSetFrom, nativeEvent, nativeEventTarget);
shouldSetEvent.touchHistory = ResponderTouchHistoryStore.touchHistory;
if (skipOverBubbleShouldSetFrom) {
EventPropagators.accumulateTwoPhaseDispatchesSkipTarget(shouldSetEvent);
} else {
EventPropagators.accumulateTwoPhaseDispatches(shouldSetEvent);
}
var wantsResponderInst = executeDispatchesInOrderStopAtTrue(shouldSetEvent);
if (!shouldSetEvent.isPersistent()) {
shouldSetEvent.constructor.release(shouldSetEvent);
}
if (!wantsResponderInst || wantsResponderInst === responderInst) {
return null;
}
var extracted;
var grantEvent = ResponderSyntheticEvent.getPooled(eventTypes.responderGrant, wantsResponderInst, nativeEvent, nativeEventTarget);
grantEvent.touchHistory = ResponderTouchHistoryStore.touchHistory;
EventPropagators.accumulateDirectDispatches(grantEvent);
var blockHostResponder = executeDirectDispatch(grantEvent) === true;
if (responderInst) {
var terminationRequestEvent = ResponderSyntheticEvent.getPooled(eventTypes.responderTerminationRequest, responderInst, nativeEvent, nativeEventTarget);
terminationRequestEvent.touchHistory = ResponderTouchHistoryStore.touchHistory;
EventPropagators.accumulateDirectDispatches(terminationRequestEvent);
var shouldSwitch = !hasDispatches(terminationRequestEvent) || executeDirectDispatch(terminationRequestEvent);
if (!terminationRequestEvent.isPersistent()) {
terminationRequestEvent.constructor.release(terminationRequestEvent);
}
if (shouldSwitch) {
var terminateEvent = ResponderSyntheticEvent.getPooled(eventTypes.responderTerminate, responderInst, nativeEvent, nativeEventTarget);
terminateEvent.touchHistory = ResponderTouchHistoryStore.touchHistory;
EventPropagators.accumulateDirectDispatches(terminateEvent);
extracted = accumulate(extracted, [grantEvent, terminateEvent]);
changeResponder(wantsResponderInst, blockHostResponder);
} else {
var rejectEvent = ResponderSyntheticEvent.getPooled(eventTypes.responderReject, wantsResponderInst, nativeEvent, nativeEventTarget);
rejectEvent.touchHistory = ResponderTouchHistoryStore.touchHistory;
EventPropagators.accumulateDirectDispatches(rejectEvent);
extracted = accumulate(extracted, rejectEvent);
}
} else {
extracted = accumulate(extracted, grantEvent);
changeResponder(wantsResponderInst, blockHostResponder);
}
return extracted;
}
function canTriggerTransfer(topLevelType, topLevelInst, nativeEvent) {
return topLevelInst && (topLevelType === 'topScroll' && !nativeEvent.responderIgnoreScroll || trackedTouchCount > 0 && topLevelType === 'topSelectionChange' || isStartish(topLevelType) || isMoveish(topLevelType));
}
function noResponderTouches(nativeEvent) {
var touches = nativeEvent.touches;
if (!touches || touches.length === 0) {
return true;
}
for (var i = 0; i < touches.length; i++) {
var activeTouch = touches[i];
var target = activeTouch.target;
if (target !== null && target !== undefined && target !== 0) {
var targetInst = EventPluginUtils.getInstanceFromNode(target);
if (EventPluginUtils.isAncestor(responderInst, targetInst)) {
return false;
}
}
}
return true;
}
var ResponderEventPlugin = {
_getResponderID: function _getResponderID() {
return responderInst ? responderInst._rootNodeID : null;
},
eventTypes: eventTypes,
extractEvents: function extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
if (isStartish(topLevelType)) {
trackedTouchCount += 1;
} else if (isEndish(topLevelType)) {
if (trackedTouchCount >= 0) {
trackedTouchCount -= 1;
} else {
console.error('Ended a touch event which was not counted in `trackedTouchCount`.');
return null;
}
}
ResponderTouchHistoryStore.recordTouchTrack(topLevelType, nativeEvent);
var extracted = canTriggerTransfer(topLevelType, targetInst, nativeEvent) ? setResponderAndExtractTransfer(topLevelType, targetInst, nativeEvent, nativeEventTarget) : null;
var isResponderTouchStart = responderInst && isStartish(topLevelType);
var isResponderTouchMove = responderInst && isMoveish(topLevelType);
var isResponderTouchEnd = responderInst && isEndish(topLevelType);
var incrementalTouch = isResponderTouchStart ? eventTypes.responderStart : isResponderTouchMove ? eventTypes.responderMove : isResponderTouchEnd ? eventTypes.responderEnd : null;
if (incrementalTouch) {
var gesture = ResponderSyntheticEvent.getPooled(incrementalTouch, responderInst, nativeEvent, nativeEventTarget);
gesture.touchHistory = ResponderTouchHistoryStore.touchHistory;
EventPropagators.accumulateDirectDispatches(gesture);
extracted = accumulate(extracted, gesture);
}
var isResponderTerminate = responderInst && topLevelType === 'topTouchCancel';
var isResponderRelease = responderInst && !isResponderTerminate && isEndish(topLevelType) && noResponderTouches(nativeEvent);
var finalTouch = isResponderTerminate ? eventTypes.responderTerminate : isResponderRelease ? eventTypes.responderRelease : null;
if (finalTouch) {
var finalEvent = ResponderSyntheticEvent.getPooled(finalTouch, responderInst, nativeEvent, nativeEventTarget);
finalEvent.touchHistory = ResponderTouchHistoryStore.touchHistory;
EventPropagators.accumulateDirectDispatches(finalEvent);
extracted = accumulate(extracted, finalEvent);
changeResponder(null);
}
var numberActiveTouches = ResponderTouchHistoryStore.touchHistory.numberActiveTouches;
if (ResponderEventPlugin.GlobalInteractionHandler && numberActiveTouches !== previousActiveTouches) {
ResponderEventPlugin.GlobalInteractionHandler.onChange(numberActiveTouches);
}
previousActiveTouches = numberActiveTouches;
return extracted;
},
GlobalResponderHandler: null,
GlobalInteractionHandler: null,
injection: {
injectGlobalResponderHandler: function injectGlobalResponderHandler(GlobalResponderHandler) {
ResponderEventPlugin.GlobalResponderHandler = GlobalResponderHandler;
},
injectGlobalInteractionHandler: function injectGlobalInteractionHandler(GlobalInteractionHandler) {
ResponderEventPlugin.GlobalInteractionHandler = GlobalInteractionHandler;
}
}
};
module.exports = ResponderEventPlugin;
}, 287, null, "ResponderEventPlugin");
__d(/* ResponderSyntheticEvent */function(global, require, module, exports) {
'use strict';
var SyntheticEvent = require(278 ); // 278 = SyntheticEvent
var ResponderEventInterface = {
touchHistory: function touchHistory(nativeEvent) {
return null;
}
};
function ResponderSyntheticEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
}
SyntheticEvent.augmentClass(ResponderSyntheticEvent, ResponderEventInterface);
module.exports = ResponderSyntheticEvent;
}, 288, null, "ResponderSyntheticEvent");
__d(/* ResponderTouchHistoryStore */function(global, require, module, exports) {
'use strict';
var EventPluginUtils = require(163 ); // 163 = EventPluginUtils
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var warning = require(40 ); // 40 = fbjs/lib/warning
var isEndish = EventPluginUtils.isEndish,
isMoveish = EventPluginUtils.isMoveish,
isStartish = EventPluginUtils.isStartish;
var MAX_TOUCH_BANK = 20;
var touchBank = [];
var touchHistory = {
touchBank: touchBank,
numberActiveTouches: 0,
indexOfSingleActiveTouch: -1,
mostRecentTimeStamp: 0
};
function timestampForTouch(touch) {
return touch.timeStamp || touch.timestamp;
}
function createTouchRecord(touch) {
return {
touchActive: true,
startPageX: touch.pageX,
startPageY: touch.pageY,
startTimeStamp: timestampForTouch(touch),
currentPageX: touch.pageX,
currentPageY: touch.pageY,
currentTimeStamp: timestampForTouch(touch),
previousPageX: touch.pageX,
previousPageY: touch.pageY,
previousTimeStamp: timestampForTouch(touch)
};
}
function resetTouchRecord(touchRecord, touch) {
touchRecord.touchActive = true;
touchRecord.startPageX = touch.pageX;
touchRecord.startPageY = touch.pageY;
touchRecord.startTimeStamp = timestampForTouch(touch);
touchRecord.currentPageX = touch.pageX;
touchRecord.currentPageY = touch.pageY;
touchRecord.currentTimeStamp = timestampForTouch(touch);
touchRecord.previousPageX = touch.pageX;
touchRecord.previousPageY = touch.pageY;
touchRecord.previousTimeStamp = timestampForTouch(touch);
}
function getTouchIdentifier(_ref) {
var identifier = _ref.identifier;
invariant(identifier != null, 'Touch object is missing identifier.');
warning(identifier <= MAX_TOUCH_BANK, 'Touch identifier %s is greater than maximum supported %s which causes ' + 'performance issues backfilling array locations for all of the indices.', identifier, MAX_TOUCH_BANK);
return identifier;
}
function recordTouchStart(touch) {
var identifier = getTouchIdentifier(touch);
var touchRecord = touchBank[identifier];
if (touchRecord) {
resetTouchRecord(touchRecord, touch);
} else {
touchBank[identifier] = createTouchRecord(touch);
}
touchHistory.mostRecentTimeStamp = timestampForTouch(touch);
}
function recordTouchMove(touch) {
var touchRecord = touchBank[getTouchIdentifier(touch)];
if (touchRecord) {
touchRecord.touchActive = true;
touchRecord.previousPageX = touchRecord.currentPageX;
touchRecord.previousPageY = touchRecord.currentPageY;
touchRecord.previousTimeStamp = touchRecord.currentTimeStamp;
touchRecord.currentPageX = touch.pageX;
touchRecord.currentPageY = touch.pageY;
touchRecord.currentTimeStamp = timestampForTouch(touch);
touchHistory.mostRecentTimeStamp = timestampForTouch(touch);
} else {
console.error('Cannot record touch move without a touch start.\n' + 'Touch Move: %s\n', 'Touch Bank: %s', printTouch(touch), printTouchBank());
}
}
function recordTouchEnd(touch) {
var touchRecord = touchBank[getTouchIdentifier(touch)];
if (touchRecord) {
touchRecord.touchActive = false;
touchRecord.previousPageX = touchRecord.currentPageX;
touchRecord.previousPageY = touchRecord.currentPageY;
touchRecord.previousTimeStamp = touchRecord.currentTimeStamp;
touchRecord.currentPageX = touch.pageX;
touchRecord.currentPageY = touch.pageY;
touchRecord.currentTimeStamp = timestampForTouch(touch);
touchHistory.mostRecentTimeStamp = timestampForTouch(touch);
} else {
console.error('Cannot record touch end without a touch start.\n' + 'Touch End: %s\n', 'Touch Bank: %s', printTouch(touch), printTouchBank());
}
}
function printTouch(touch) {
return JSON.stringify({
identifier: touch.identifier,
pageX: touch.pageX,
pageY: touch.pageY,
timestamp: timestampForTouch(touch)
});
}
function printTouchBank() {
var printed = JSON.stringify(touchBank.slice(0, MAX_TOUCH_BANK));
if (touchBank.length > MAX_TOUCH_BANK) {
printed += ' (original size: ' + touchBank.length + ')';
}
return printed;
}
var ResponderTouchHistoryStore = {
recordTouchTrack: function recordTouchTrack(topLevelType, nativeEvent) {
if (isMoveish(topLevelType)) {
nativeEvent.changedTouches.forEach(recordTouchMove);
} else if (isStartish(topLevelType)) {
nativeEvent.changedTouches.forEach(recordTouchStart);
touchHistory.numberActiveTouches = nativeEvent.touches.length;
if (touchHistory.numberActiveTouches === 1) {
touchHistory.indexOfSingleActiveTouch = nativeEvent.touches[0].identifier;
}
} else if (isEndish(topLevelType)) {
nativeEvent.changedTouches.forEach(recordTouchEnd);
touchHistory.numberActiveTouches = nativeEvent.touches.length;
if (touchHistory.numberActiveTouches === 1) {
for (var i = 0; i < touchBank.length; i++) {
var touchTrackToCheck = touchBank[i];
if (touchTrackToCheck != null && touchTrackToCheck.touchActive) {
touchHistory.indexOfSingleActiveTouch = i;
break;
}
}
if (__DEV__) {
var activeRecord = touchBank[touchHistory.indexOfSingleActiveTouch];
warning(activeRecord != null && activeRecord.touchActive, 'Cannot find single active touch.');
}
}
}
},
touchHistory: touchHistory
};
module.exports = ResponderTouchHistoryStore;
}, 289, null, "ResponderTouchHistoryStore");
__d(/* accumulate */function(global, require, module, exports) {
'use strict';
var invariant = require(44 ); // 44 = fbjs/lib/invariant
function accumulate(current, next) {
invariant(next != null, 'accumulate(...): Accumulated items must be not be null or undefined.');
if (current == null) {
return next;
}
if (Array.isArray(current)) {
return current.concat(next);
}
if (Array.isArray(next)) {
return [current].concat(next);
}
return [current, next];
}
module.exports = accumulate;
}, 290, null, "accumulate");
__d(/* ScrollResponder */function(global, require, module, exports) {
'use strict';
var Dimensions = require(129 ); // 129 = Dimensions
var Platform = require(79 ); // 79 = Platform
var Keyboard = require(109 ); // 109 = Keyboard
var ReactNative = require(241 ); // 241 = ReactNative
var Subscribable = require(292 ); // 292 = Subscribable
var TextInputState = require(78 ); // 78 = TextInputState
var UIManager = require(123 ); // 123 = UIManager
var warning = require(40 ); // 40 = fbjs/lib/warning
var _require = require(159 ), // 159 = ReactNativeComponentTree
getInstanceFromNode = _require.getInstanceFromNode;
var _require2 = require(80 ), // 80 = NativeModules
ScrollViewManager = _require2.ScrollViewManager;
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var IS_ANIMATING_TOUCH_START_THRESHOLD_MS = 16;
function isTagInstanceOfTextInput(tag) {
var instance = getInstanceFromNode(tag);
return instance && instance.viewConfig && (instance.viewConfig.uiViewClassName === 'AndroidTextInput' || instance.viewConfig.uiViewClassName === 'RCTTextView' || instance.viewConfig.uiViewClassName === 'RCTTextField');
}
var ScrollResponderMixin = {
mixins: [Subscribable.Mixin],
scrollResponderMixinGetInitialState: function scrollResponderMixinGetInitialState() {
return {
isTouching: false,
lastMomentumScrollBeginTime: 0,
lastMomentumScrollEndTime: 0,
observedScrollSinceBecomingResponder: false,
becameResponderWhileAnimating: false
};
},
scrollResponderHandleScrollShouldSetResponder: function scrollResponderHandleScrollShouldSetResponder() {
return this.state.isTouching;
},
scrollResponderHandleStartShouldSetResponder: function scrollResponderHandleStartShouldSetResponder(e) {
var currentlyFocusedTextInput = TextInputState.currentlyFocusedField();
if (this.props.keyboardShouldPersistTaps === 'handled' && currentlyFocusedTextInput != null && e.target !== currentlyFocusedTextInput) {
return true;
}
return false;
},
scrollResponderHandleStartShouldSetResponderCapture: function scrollResponderHandleStartShouldSetResponderCapture(e) {
var currentlyFocusedTextInput = TextInputState.currentlyFocusedField();
var keyboardShouldPersistTaps = this.props.keyboardShouldPersistTaps;
var keyboardNeverPersistTaps = !keyboardShouldPersistTaps || keyboardShouldPersistTaps === 'never';
if (keyboardNeverPersistTaps && currentlyFocusedTextInput != null && !isTagInstanceOfTextInput(e.target)) {
return true;
}
return this.scrollResponderIsAnimating();
},
scrollResponderHandleResponderReject: function scrollResponderHandleResponderReject() {},
scrollResponderHandleTerminationRequest: function scrollResponderHandleTerminationRequest() {
return !this.state.observedScrollSinceBecomingResponder;
},
scrollResponderHandleTouchEnd: function scrollResponderHandleTouchEnd(e) {
var nativeEvent = e.nativeEvent;
this.state.isTouching = nativeEvent.touches.length !== 0;
this.props.onTouchEnd && this.props.onTouchEnd(e);
},
scrollResponderHandleResponderRelease: function scrollResponderHandleResponderRelease(e) {
this.props.onResponderRelease && this.props.onResponderRelease(e);
var currentlyFocusedTextInput = TextInputState.currentlyFocusedField();
if (this.props.keyboardShouldPersistTaps !== true && this.props.keyboardShouldPersistTaps !== 'always' && currentlyFocusedTextInput != null && e.target !== currentlyFocusedTextInput && !this.state.observedScrollSinceBecomingResponder && !this.state.becameResponderWhileAnimating) {
this.props.onScrollResponderKeyboardDismissed && this.props.onScrollResponderKeyboardDismissed(e);
TextInputState.blurTextInput(currentlyFocusedTextInput);
}
},
scrollResponderHandleScroll: function scrollResponderHandleScroll(e) {
this.state.observedScrollSinceBecomingResponder = true;
this.props.onScroll && this.props.onScroll(e);
},
scrollResponderHandleResponderGrant: function scrollResponderHandleResponderGrant(e) {
this.state.observedScrollSinceBecomingResponder = false;
this.props.onResponderGrant && this.props.onResponderGrant(e);
this.state.becameResponderWhileAnimating = this.scrollResponderIsAnimating();
},
scrollResponderHandleScrollBeginDrag: function scrollResponderHandleScrollBeginDrag(e) {
this.props.onScrollBeginDrag && this.props.onScrollBeginDrag(e);
},
scrollResponderHandleScrollEndDrag: function scrollResponderHandleScrollEndDrag(e) {
this.props.onScrollEndDrag && this.props.onScrollEndDrag(e);
},
scrollResponderHandleMomentumScrollBegin: function scrollResponderHandleMomentumScrollBegin(e) {
this.state.lastMomentumScrollBeginTime = Date.now();
this.props.onMomentumScrollBegin && this.props.onMomentumScrollBegin(e);
},
scrollResponderHandleMomentumScrollEnd: function scrollResponderHandleMomentumScrollEnd(e) {
this.state.lastMomentumScrollEndTime = Date.now();
this.props.onMomentumScrollEnd && this.props.onMomentumScrollEnd(e);
},
scrollResponderHandleTouchStart: function scrollResponderHandleTouchStart(e) {
this.state.isTouching = true;
this.props.onTouchStart && this.props.onTouchStart(e);
},
scrollResponderHandleTouchMove: function scrollResponderHandleTouchMove(e) {
this.props.onTouchMove && this.props.onTouchMove(e);
},
scrollResponderIsAnimating: function scrollResponderIsAnimating() {
var now = Date.now();
var timeSinceLastMomentumScrollEnd = now - this.state.lastMomentumScrollEndTime;
var isAnimating = timeSinceLastMomentumScrollEnd < IS_ANIMATING_TOUCH_START_THRESHOLD_MS || this.state.lastMomentumScrollEndTime < this.state.lastMomentumScrollBeginTime;
return isAnimating;
},
scrollResponderGetScrollableNode: function scrollResponderGetScrollableNode() {
return this.getScrollableNode ? this.getScrollableNode() : ReactNative.findNodeHandle(this);
},
scrollResponderScrollTo: function scrollResponderScrollTo(x, y, animated) {
if (typeof x === 'number') {
console.warn('`scrollResponderScrollTo(x, y, animated)` is deprecated. Use `scrollResponderScrollTo({x: 5, y: 5, animated: true})` instead.');
} else {
var _ref = x || {};
x = _ref.x;
y = _ref.y;
animated = _ref.animated;
}
UIManager.dispatchViewManagerCommand(this.scrollResponderGetScrollableNode(), UIManager.RCTScrollView.Commands.scrollTo, [x || 0, y || 0, animated !== false]);
},
scrollResponderScrollToEnd: function scrollResponderScrollToEnd(options) {
var animated = (options && options.animated) !== false;
UIManager.dispatchViewManagerCommand(this.scrollResponderGetScrollableNode(), UIManager.RCTScrollView.Commands.scrollToEnd, [animated]);
},
scrollResponderScrollWithoutAnimationTo: function scrollResponderScrollWithoutAnimationTo(offsetX, offsetY) {
console.warn('`scrollResponderScrollWithoutAnimationTo` is deprecated. Use `scrollResponderScrollTo` instead');
this.scrollResponderScrollTo({ x: offsetX, y: offsetY, animated: false });
},
scrollResponderZoomTo: function scrollResponderZoomTo(rect, animated) {
invariant(ScrollViewManager && ScrollViewManager.zoomToRect, 'zoomToRect is not implemented');
if ('animated' in rect) {
var animated = rect.animated,
rect = babelHelpers.objectWithoutProperties(rect, ['animated']);
} else if (typeof animated !== 'undefined') {
console.warn('`scrollResponderZoomTo` `animated` argument is deprecated. Use `options.animated` instead');
}
ScrollViewManager.zoomToRect(this.scrollResponderGetScrollableNode(), rect, animated !== false);
},
scrollResponderScrollNativeHandleToKeyboard: function scrollResponderScrollNativeHandleToKeyboard(nodeHandle, additionalOffset, preventNegativeScrollOffset) {
this.additionalScrollOffset = additionalOffset || 0;
this.preventNegativeScrollOffset = !!preventNegativeScrollOffset;
UIManager.measureLayout(nodeHandle, ReactNative.findNodeHandle(this.getInnerViewNode()), this.scrollResponderTextInputFocusError, this.scrollResponderInputMeasureAndScrollToKeyboard);
},
scrollResponderInputMeasureAndScrollToKeyboard: function scrollResponderInputMeasureAndScrollToKeyboard(left, top, width, height) {
var keyboardScreenY = Dimensions.get('window').height;
if (this.keyboardWillOpenTo) {
keyboardScreenY = this.keyboardWillOpenTo.endCoordinates.screenY;
}
var scrollOffsetY = top - keyboardScreenY + height + this.additionalScrollOffset;
if (this.preventNegativeScrollOffset) {
scrollOffsetY = Math.max(0, scrollOffsetY);
}
this.scrollResponderScrollTo({ x: 0, y: scrollOffsetY, animated: true });
this.additionalOffset = 0;
this.preventNegativeScrollOffset = false;
},
scrollResponderTextInputFocusError: function scrollResponderTextInputFocusError(e) {
console.error('Error measuring text field: ', e);
},
componentWillMount: function componentWillMount() {
var keyboardShouldPersistTaps = this.props.keyboardShouldPersistTaps;
warning(typeof keyboardShouldPersistTaps !== 'boolean', '\'keyboardShouldPersistTaps={' + keyboardShouldPersistTaps + '}\' is deprecated. ' + ('Use \'keyboardShouldPersistTaps="' + (keyboardShouldPersistTaps ? "always" : "never") + '"\' instead'));
this.keyboardWillOpenTo = null;
this.additionalScrollOffset = 0;
this.addListenerOn(Keyboard, 'keyboardWillShow', this.scrollResponderKeyboardWillShow);
this.addListenerOn(Keyboard, 'keyboardWillHide', this.scrollResponderKeyboardWillHide);
this.addListenerOn(Keyboard, 'keyboardDidShow', this.scrollResponderKeyboardDidShow);
this.addListenerOn(Keyboard, 'keyboardDidHide', this.scrollResponderKeyboardDidHide);
},
scrollResponderKeyboardWillShow: function scrollResponderKeyboardWillShow(e) {
this.keyboardWillOpenTo = e;
this.props.onKeyboardWillShow && this.props.onKeyboardWillShow(e);
},
scrollResponderKeyboardWillHide: function scrollResponderKeyboardWillHide(e) {
this.keyboardWillOpenTo = null;
this.props.onKeyboardWillHide && this.props.onKeyboardWillHide(e);
},
scrollResponderKeyboardDidShow: function scrollResponderKeyboardDidShow(e) {
if (e) {
this.keyboardWillOpenTo = e;
}
this.props.onKeyboardDidShow && this.props.onKeyboardDidShow(e);
},
scrollResponderKeyboardDidHide: function scrollResponderKeyboardDidHide(e) {
this.keyboardWillOpenTo = null;
this.props.onKeyboardDidHide && this.props.onKeyboardDidHide(e);
}
};
var ScrollResponder = {
Mixin: ScrollResponderMixin
};
module.exports = ScrollResponder;
}, 291, null, "ScrollResponder");
__d(/* Subscribable */function(global, require, module, exports) {
'use strict';
var Subscribable = {};
Subscribable.Mixin = {
componentWillMount: function componentWillMount() {
this._subscribableSubscriptions = [];
},
componentWillUnmount: function componentWillUnmount() {
this._subscribableSubscriptions.forEach(function (subscription) {
return subscription.remove();
});
this._subscribableSubscriptions = null;
},
addListenerOn: function addListenerOn(eventEmitter, eventType, listener, context) {
this._subscribableSubscriptions.push(eventEmitter.addListener(eventType, listener, context));
}
};
module.exports = Subscribable;
}, 292, null, "Subscribable");
__d(/* processDecelerationRate */function(global, require, module, exports) {
'use strict';
function processDecelerationRate(decelerationRate) {
if (decelerationRate === 'normal') {
decelerationRate = 0.998;
} else if (decelerationRate === 'fast') {
decelerationRate = 0.99;
}
return decelerationRate;
}
module.exports = processDecelerationRate;
}, 293, null, "processDecelerationRate");
__d(/* react-timer-mixin/TimerMixin.js */function(global, require, module, exports) {
'use strict';
var GLOBAL = typeof window === 'undefined' ? global : window;
var setter = function setter(_setter, _clearer, array) {
return function (callback, delta) {
var id = _setter(function () {
_clearer.call(this, id);
callback.apply(this, arguments);
}.bind(this), delta);
if (!this[array]) {
this[array] = [id];
} else {
this[array].push(id);
}
return id;
};
};
var clearer = function clearer(_clearer, array) {
return function (id) {
if (this[array]) {
var index = this[array].indexOf(id);
if (index !== -1) {
this[array].splice(index, 1);
}
}
_clearer(id);
};
};
var _timeouts = 'TimerMixin_timeouts';
var _clearTimeout = clearer(GLOBAL.clearTimeout, _timeouts);
var _setTimeout = setter(GLOBAL.setTimeout, _clearTimeout, _timeouts);
var _intervals = 'TimerMixin_intervals';
var _clearInterval = clearer(GLOBAL.clearInterval, _intervals);
var _setInterval = setter(GLOBAL.setInterval, function () {}, _intervals);
var _immediates = 'TimerMixin_immediates';
var _clearImmediate = clearer(GLOBAL.clearImmediate, _immediates);
var _setImmediate = setter(GLOBAL.setImmediate, _clearImmediate, _immediates);
var _rafs = 'TimerMixin_rafs';
var _cancelAnimationFrame = clearer(GLOBAL.cancelAnimationFrame, _rafs);
var _requestAnimationFrame = setter(GLOBAL.requestAnimationFrame, _cancelAnimationFrame, _rafs);
var TimerMixin = {
componentWillUnmount: function componentWillUnmount() {
this[_timeouts] && this[_timeouts].forEach(function (id) {
GLOBAL.clearTimeout(id);
});
this[_timeouts] = null;
this[_intervals] && this[_intervals].forEach(function (id) {
GLOBAL.clearInterval(id);
});
this[_intervals] = null;
this[_immediates] && this[_immediates].forEach(function (id) {
GLOBAL.clearImmediate(id);
});
this[_immediates] = null;
this[_rafs] && this[_rafs].forEach(function (id) {
GLOBAL.cancelAnimationFrame(id);
});
this[_rafs] = null;
},
setTimeout: _setTimeout,
clearTimeout: _clearTimeout,
setInterval: _setInterval,
clearInterval: _clearInterval,
setImmediate: _setImmediate,
clearImmediate: _clearImmediate,
requestAnimationFrame: _requestAnimationFrame,
cancelAnimationFrame: _cancelAnimationFrame
};
module.exports = TimerMixin;
}, 294, null, "react-timer-mixin/TimerMixin.js");
__d(/* TouchableWithoutFeedback */function(global, require, module, exports) {
'use strict';
var EdgeInsetsPropType = require(147 ); // 147 = EdgeInsetsPropType
var React = require(126 ); // 126 = React
var TimerMixin = require(294 ); // 294 = react-timer-mixin
var Touchable = require(211 ); // 211 = Touchable
var View = require(146 ); // 146 = View
var ensurePositiveDelayProps = require(296 ); // 296 = ensurePositiveDelayProps
var warning = require(40 ); // 40 = fbjs/lib/warning
var PRESS_RETENTION_OFFSET = { top: 20, left: 20, right: 20, bottom: 30 };
var TouchableWithoutFeedback = React.createClass({
displayName: 'TouchableWithoutFeedback',
mixins: [TimerMixin, Touchable.Mixin],
propTypes: {
accessible: React.PropTypes.bool,
accessibilityComponentType: React.PropTypes.oneOf(View.AccessibilityComponentType),
accessibilityTraits: React.PropTypes.oneOfType([React.PropTypes.oneOf(View.AccessibilityTraits), React.PropTypes.arrayOf(React.PropTypes.oneOf(View.AccessibilityTraits))]),
disabled: React.PropTypes.bool,
onPress: React.PropTypes.func,
onPressIn: React.PropTypes.func,
onPressOut: React.PropTypes.func,
onLayout: React.PropTypes.func,
onLongPress: React.PropTypes.func,
delayPressIn: React.PropTypes.number,
delayPressOut: React.PropTypes.number,
delayLongPress: React.PropTypes.number,
pressRetentionOffset: EdgeInsetsPropType,
hitSlop: EdgeInsetsPropType
},
getInitialState: function getInitialState() {
return this.touchableGetInitialState();
},
componentDidMount: function componentDidMount() {
ensurePositiveDelayProps(this.props);
},
componentWillReceiveProps: function componentWillReceiveProps(nextProps) {
ensurePositiveDelayProps(nextProps);
},
touchableHandlePress: function touchableHandlePress(e) {
this.props.onPress && this.props.onPress(e);
},
touchableHandleActivePressIn: function touchableHandleActivePressIn(e) {
this.props.onPressIn && this.props.onPressIn(e);
},
touchableHandleActivePressOut: function touchableHandleActivePressOut(e) {
this.props.onPressOut && this.props.onPressOut(e);
},
touchableHandleLongPress: function touchableHandleLongPress(e) {
this.props.onLongPress && this.props.onLongPress(e);
},
touchableGetPressRectOffset: function touchableGetPressRectOffset() {
return this.props.pressRetentionOffset || PRESS_RETENTION_OFFSET;
},
touchableGetHitSlop: function touchableGetHitSlop() {
return this.props.hitSlop;
},
touchableGetHighlightDelayMS: function touchableGetHighlightDelayMS() {
return this.props.delayPressIn || 0;
},
touchableGetLongPressDelayMS: function touchableGetLongPressDelayMS() {
return this.props.delayLongPress === 0 ? 0 : this.props.delayLongPress || 500;
},
touchableGetPressOutDelayMS: function touchableGetPressOutDelayMS() {
return this.props.delayPressOut || 0;
},
render: function render() {
var child = React.Children.only(this.props.children);
var children = child.props.children;
warning(!child.type || child.type.displayName !== 'Text', 'TouchableWithoutFeedback does not work well with Text children. Wrap children in a View instead. See ' + (child._owner && child._owner.getName && child._owner.getName() || '<unknown>'));
if (Touchable.TOUCH_TARGET_DEBUG && child.type && child.type.displayName === 'View') {
children = React.Children.toArray(children);
children.push(Touchable.renderDebugView({ color: 'red', hitSlop: this.props.hitSlop }));
}
var style = Touchable.TOUCH_TARGET_DEBUG && child.type && child.type.displayName === 'Text' ? [child.props.style, { color: 'red' }] : child.props.style;
return React.cloneElement(child, {
accessible: this.props.accessible !== false,
accessibilityLabel: this.props.accessibilityLabel,
accessibilityComponentType: this.props.accessibilityComponentType,
accessibilityTraits: this.props.accessibilityTraits,
testID: this.props.testID,
onLayout: this.props.onLayout,
hitSlop: this.props.hitSlop,
onStartShouldSetResponder: this.touchableHandleStartShouldSetResponder,
onResponderTerminationRequest: this.touchableHandleResponderTerminationRequest,
onResponderGrant: this.touchableHandleResponderGrant,
onResponderMove: this.touchableHandleResponderMove,
onResponderRelease: this.touchableHandleResponderRelease,
onResponderTerminate: this.touchableHandleResponderTerminate,
style: style,
children: children
});
}
});
module.exports = TouchableWithoutFeedback;
}, 295, null, "TouchableWithoutFeedback");
__d(/* ensurePositiveDelayProps */function(global, require, module, exports) {
'use strict';
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var ensurePositiveDelayProps = function ensurePositiveDelayProps(props) {
invariant(!(props.delayPressIn < 0 || props.delayPressOut < 0 || props.delayLongPress < 0), 'Touchable components cannot have negative delay properties');
};
module.exports = ensurePositiveDelayProps;
}, 296, null, "ensurePositiveDelayProps");
__d(/* DatePickerIOS */function(global, require, module, exports) {
'use strict';
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/node_modules/react-native/Libraries/Components/DatePicker/DatePickerIOS.ios.js';
var NativeMethodsMixin = require(73 ); // 73 = NativeMethodsMixin
var React = require(126 ); // 126 = React
var StyleSheet = require(127 ); // 127 = StyleSheet
var View = require(146 ); // 146 = View
var requireNativeComponent = require(155 ); // 155 = requireNativeComponent
var PropTypes = React.PropTypes;
var DatePickerIOS = React.createClass({
displayName: 'DatePickerIOS',
_picker: undefined,
mixins: [NativeMethodsMixin],
propTypes: babelHelpers.extends({}, View.propTypes, {
date: PropTypes.instanceOf(Date).isRequired,
onDateChange: PropTypes.func.isRequired,
maximumDate: PropTypes.instanceOf(Date),
minimumDate: PropTypes.instanceOf(Date),
mode: PropTypes.oneOf(['date', 'time', 'datetime']),
minuteInterval: PropTypes.oneOf([1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30]),
timeZoneOffsetInMinutes: PropTypes.number
}),
getDefaultProps: function getDefaultProps() {
return {
mode: 'datetime'
};
},
_onChange: function _onChange(event) {
var nativeTimeStamp = event.nativeEvent.timestamp;
this.props.onDateChange && this.props.onDateChange(new Date(nativeTimeStamp));
this.props.onChange && this.props.onChange(event);
var propsTimeStamp = this.props.date.getTime();
if (this._picker && nativeTimeStamp !== propsTimeStamp) {
this._picker.setNativeProps({
date: propsTimeStamp
});
}
},
render: function render() {
var _this = this;
var props = this.props;
return React.createElement(
View,
{ style: props.style, __source: {
fileName: _jsxFileName,
lineNumber: 122
}
},
React.createElement(RCTDatePickerIOS, {
ref: function ref(picker) {
_this._picker = picker;
},
style: styles.datePickerIOS,
date: props.date.getTime(),
maximumDate: props.maximumDate ? props.maximumDate.getTime() : undefined,
minimumDate: props.minimumDate ? props.minimumDate.getTime() : undefined,
mode: props.mode,
minuteInterval: props.minuteInterval,
timeZoneOffsetInMinutes: props.timeZoneOffsetInMinutes,
onChange: this._onChange,
onStartShouldSetResponder: function onStartShouldSetResponder() {
return true;
},
onResponderTerminationRequest: function onResponderTerminationRequest() {
return false;
},
__source: {
fileName: _jsxFileName,
lineNumber: 123
}
})
);
}
});
var styles = StyleSheet.create({
datePickerIOS: {
height: 216
}
});
var RCTDatePickerIOS = requireNativeComponent('RCTDatePicker', {
propTypes: babelHelpers.extends({}, DatePickerIOS.propTypes, {
date: PropTypes.number,
minimumDate: PropTypes.number,
maximumDate: PropTypes.number,
onDateChange: function onDateChange() {
return null;
},
onChange: PropTypes.func
})
});
module.exports = DatePickerIOS;
}, 297, null, "DatePickerIOS");
__d(/* DrawerLayoutAndroid */function(global, require, module, exports) {
'use strict';
module.exports = require(156 ); // 156 = UnimplementedView
}, 298, null, "DrawerLayoutAndroid");
__d(/* ImageEditor */function(global, require, module, exports) {
'use strict';
var RCTImageEditingManager = require(80 ).ImageEditingManager; // 80 = NativeModules
var ImageEditor = function () {
function ImageEditor() {
babelHelpers.classCallCheck(this, ImageEditor);
}
babelHelpers.createClass(ImageEditor, null, [{
key: 'cropImage',
value: function cropImage(uri, cropData, success, failure) {
RCTImageEditingManager.cropImage(uri, cropData, success, failure);
}
}]);
return ImageEditor;
}();
module.exports = ImageEditor;
}, 299, null, "ImageEditor");
__d(/* ImageStore */function(global, require, module, exports) {
'use strict';
var RCTImageStoreManager = require(80 ).ImageStoreManager; // 80 = NativeModules
var ImageStore = function () {
function ImageStore() {
babelHelpers.classCallCheck(this, ImageStore);
}
babelHelpers.createClass(ImageStore, null, [{
key: 'hasImageForTag',
value: function hasImageForTag(uri, callback) {
if (RCTImageStoreManager.hasImageForTag) {
RCTImageStoreManager.hasImageForTag(uri, callback);
} else {
console.warn('hasImageForTag() not implemented');
}
}
}, {
key: 'removeImageForTag',
value: function removeImageForTag(uri) {
if (RCTImageStoreManager.removeImageForTag) {
RCTImageStoreManager.removeImageForTag(uri);
} else {
console.warn('removeImageForTag() not implemented');
}
}
}, {
key: 'addImageFromBase64',
value: function addImageFromBase64(base64ImageData, success, failure) {
RCTImageStoreManager.addImageFromBase64(base64ImageData, success, failure);
}
}, {
key: 'getBase64ForTag',
value: function getBase64ForTag(uri, success, failure) {
RCTImageStoreManager.getBase64ForTag(uri, success, failure);
}
}]);
return ImageStore;
}();
module.exports = ImageStore;
}, 300, null, "ImageStore");
__d(/* KeyboardAvoidingView */function(global, require, module, exports) {
'use strict';
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/node_modules/react-native/Libraries/Components/Keyboard/KeyboardAvoidingView.js';
var Keyboard = require(109 ); // 109 = Keyboard
var LayoutAnimation = require(302 ); // 302 = LayoutAnimation
var Platform = require(79 ); // 79 = Platform
var React = require(126 ); // 126 = React
var TimerMixin = require(294 ); // 294 = react-timer-mixin
var View = require(146 ); // 146 = View
var PropTypes = React.PropTypes;
var viewRef = 'VIEW';
var KeyboardAvoidingView = React.createClass({
displayName: 'KeyboardAvoidingView',
mixins: [TimerMixin],
propTypes: babelHelpers.extends({}, View.propTypes, {
behavior: PropTypes.oneOf(['height', 'position', 'padding']),
contentContainerStyle: View.propTypes.style,
keyboardVerticalOffset: PropTypes.number.isRequired
}),
getDefaultProps: function getDefaultProps() {
return {
keyboardVerticalOffset: 0
};
},
getInitialState: function getInitialState() {
return {
bottom: 0
};
},
subscriptions: [],
frame: null,
relativeKeyboardHeight: function relativeKeyboardHeight(keyboardFrame) {
var frame = this.frame;
if (!frame || !keyboardFrame) {
return 0;
}
var y1 = Math.max(frame.y, keyboardFrame.screenY - this.props.keyboardVerticalOffset);
var y2 = Math.min(frame.y + frame.height, keyboardFrame.screenY + keyboardFrame.height - this.props.keyboardVerticalOffset);
if (frame.y > keyboardFrame.screenY) {
return frame.y + frame.height - keyboardFrame.screenY - this.props.keyboardVerticalOffset;
}
return Math.max(y2 - y1, 0);
},
onKeyboardChange: function onKeyboardChange(event) {
if (!event) {
this.setState({ bottom: 0 });
return;
}
var duration = event.duration,
easing = event.easing,
endCoordinates = event.endCoordinates;
var height = this.relativeKeyboardHeight(endCoordinates);
if (duration && easing) {
LayoutAnimation.configureNext({
duration: duration,
update: {
duration: duration,
type: LayoutAnimation.Types[easing] || 'keyboard'
}
});
}
this.setState({ bottom: height });
},
onLayout: function onLayout(event) {
this.frame = event.nativeEvent.layout;
},
componentWillUpdate: function componentWillUpdate(nextProps, nextState, nextContext) {
if (nextState.bottom === this.state.bottom && this.props.behavior === 'height' && nextProps.behavior === 'height') {
nextState.bottom = 0;
}
},
componentWillMount: function componentWillMount() {
if (Platform.OS === 'ios') {
this.subscriptions = [Keyboard.addListener('keyboardWillChangeFrame', this.onKeyboardChange)];
} else {
this.subscriptions = [Keyboard.addListener('keyboardDidHide', this.onKeyboardChange), Keyboard.addListener('keyboardDidShow', this.onKeyboardChange)];
}
},
componentWillUnmount: function componentWillUnmount() {
this.subscriptions.forEach(function (sub) {
return sub.remove();
});
},
render: function render() {
var _props = this.props,
behavior = _props.behavior,
children = _props.children,
style = _props.style,
props = babelHelpers.objectWithoutProperties(_props, ['behavior', 'children', 'style']);
switch (behavior) {
case 'height':
var heightStyle = void 0;
if (this.frame) {
heightStyle = { height: this.frame.height - this.state.bottom, flex: 0 };
}
return React.createElement(
View,
babelHelpers.extends({ ref: viewRef, style: [style, heightStyle], onLayout: this.onLayout }, props, {
__source: {
fileName: _jsxFileName,
lineNumber: 169
}
}),
children
);
case 'position':
var positionStyle = { bottom: this.state.bottom };
var contentContainerStyle = this.props.contentContainerStyle;
return React.createElement(
View,
babelHelpers.extends({ ref: viewRef, style: style, onLayout: this.onLayout }, props, {
__source: {
fileName: _jsxFileName,
lineNumber: 179
}
}),
React.createElement(
View,
{ style: [contentContainerStyle, positionStyle], __source: {
fileName: _jsxFileName,
lineNumber: 180
}
},
children
)
);
case 'padding':
var paddingStyle = { paddingBottom: this.state.bottom };
return React.createElement(
View,
babelHelpers.extends({ ref: viewRef, style: [style, paddingStyle], onLayout: this.onLayout }, props, {
__source: {
fileName: _jsxFileName,
lineNumber: 189
}
}),
children
);
default:
return React.createElement(
View,
babelHelpers.extends({ ref: viewRef, onLayout: this.onLayout, style: style }, props, {
__source: {
fileName: _jsxFileName,
lineNumber: 196
}
}),
children
);
}
}
});
module.exports = KeyboardAvoidingView;
}, 301, null, "KeyboardAvoidingView");
__d(/* LayoutAnimation */function(global, require, module, exports) {
'use strict';
var _require = require(126 ), // 126 = React
PropTypes = _require.PropTypes;
var UIManager = require(123 ); // 123 = UIManager
var createStrictShapeTypeChecker = require(148 ); // 148 = createStrictShapeTypeChecker
var keyMirror = require(133 ); // 133 = fbjs/lib/keyMirror
var TypesEnum = {
spring: true,
linear: true,
easeInEaseOut: true,
easeIn: true,
easeOut: true,
keyboard: true
};
var Types = keyMirror(TypesEnum);
var PropertiesEnum = {
opacity: true,
scaleXY: true
};
var Properties = keyMirror(PropertiesEnum);
var animChecker = createStrictShapeTypeChecker({
duration: PropTypes.number,
delay: PropTypes.number,
springDamping: PropTypes.number,
initialVelocity: PropTypes.number,
type: PropTypes.oneOf(Object.keys(Types)).isRequired,
property: PropTypes.oneOf(Object.keys(Properties))
});
var configChecker = createStrictShapeTypeChecker({
duration: PropTypes.number.isRequired,
create: animChecker,
update: animChecker,
delete: animChecker
});
function configureNext(config, onAnimationDidEnd) {
configChecker({ config: config }, 'config', 'LayoutAnimation.configureNext');
UIManager.configureNextLayoutAnimation(config, onAnimationDidEnd || function () {}, function () {});
}
function create(duration, type, creationProp) {
return {
duration: duration,
create: {
type: type,
property: creationProp
},
update: {
type: type
},
delete: {
type: type,
property: creationProp
}
};
}
var Presets = {
easeInEaseOut: create(300, Types.easeInEaseOut, Properties.opacity),
linear: create(500, Types.linear, Properties.opacity),
spring: {
duration: 700,
create: {
type: Types.linear,
property: Properties.opacity
},
update: {
type: Types.spring,
springDamping: 0.4
},
delete: {
type: Types.linear,
property: Properties.opacity
}
}
};
var LayoutAnimation = {
configureNext: configureNext,
create: create,
Types: Types,
Properties: Properties,
configChecker: configChecker,
Presets: Presets,
easeInEaseOut: configureNext.bind(null, Presets.easeInEaseOut),
linear: configureNext.bind(null, Presets.linear),
spring: configureNext.bind(null, Presets.spring)
};
module.exports = LayoutAnimation;
}, 302, null, "LayoutAnimation");
__d(/* ListView */function(global, require, module, exports) {
'use strict';
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/node_modules/react-native/Libraries/CustomComponents/ListView/ListView.js';
var ListViewDataSource = require(304 ); // 304 = ListViewDataSource
var React = require(126 ); // 126 = React
var ReactNative = require(241 ); // 241 = ReactNative
var RCTScrollViewManager = require(80 ).ScrollViewManager; // 80 = NativeModules
var ScrollView = require(239 ); // 239 = ScrollView
var ScrollResponder = require(291 ); // 291 = ScrollResponder
var StaticRenderer = require(306 ); // 306 = StaticRenderer
var TimerMixin = require(294 ); // 294 = react-timer-mixin
var cloneReferencedElement = require(307 ); // 307 = react-clone-referenced-element
var isEmpty = require(305 ); // 305 = isEmpty
var merge = require(149 ); // 149 = merge
var PropTypes = React.PropTypes;
var DEFAULT_PAGE_SIZE = 1;
var DEFAULT_INITIAL_ROWS = 10;
var DEFAULT_SCROLL_RENDER_AHEAD = 1000;
var DEFAULT_END_REACHED_THRESHOLD = 1000;
var DEFAULT_SCROLL_CALLBACK_THROTTLE = 50;
var ListView = React.createClass({
displayName: 'ListView',
_childFrames: [],
_sentEndForContentLength: null,
_scrollComponent: null,
_prevRenderedRowsCount: 0,
_visibleRows: {},
scrollProperties: {},
mixins: [ScrollResponder.Mixin, TimerMixin],
statics: {
DataSource: ListViewDataSource
},
propTypes: babelHelpers.extends({}, ScrollView.propTypes, {
dataSource: PropTypes.instanceOf(ListViewDataSource).isRequired,
renderSeparator: PropTypes.func,
renderRow: PropTypes.func.isRequired,
initialListSize: PropTypes.number.isRequired,
onEndReached: PropTypes.func,
onEndReachedThreshold: PropTypes.number.isRequired,
pageSize: PropTypes.number.isRequired,
renderFooter: PropTypes.func,
renderHeader: PropTypes.func,
renderSectionHeader: PropTypes.func,
renderScrollComponent: React.PropTypes.func.isRequired,
scrollRenderAheadDistance: React.PropTypes.number.isRequired,
onChangeVisibleRows: React.PropTypes.func,
removeClippedSubviews: React.PropTypes.bool,
stickySectionHeadersEnabled: React.PropTypes.bool,
stickyHeaderIndices: PropTypes.arrayOf(PropTypes.number).isRequired,
enableEmptySections: PropTypes.bool
}),
getMetrics: function getMetrics() {
return {
contentLength: this.scrollProperties.contentLength,
totalRows: this.props.enableEmptySections ? this.props.dataSource.getRowAndSectionCount() : this.props.dataSource.getRowCount(),
renderedRows: this.state.curRenderedRowsCount,
visibleRows: Object.keys(this._visibleRows).length
};
},
getScrollResponder: function getScrollResponder() {
if (this._scrollComponent && this._scrollComponent.getScrollResponder) {
return this._scrollComponent.getScrollResponder();
}
},
getScrollableNode: function getScrollableNode() {
if (this._scrollComponent && this._scrollComponent.getScrollableNode) {
return this._scrollComponent.getScrollableNode();
} else {
return ReactNative.findNodeHandle(this._scrollComponent);
}
},
scrollTo: function scrollTo() {
if (this._scrollComponent && this._scrollComponent.scrollTo) {
var _scrollComponent;
(_scrollComponent = this._scrollComponent).scrollTo.apply(_scrollComponent, arguments);
}
},
scrollToEnd: function scrollToEnd(options) {
if (this._scrollComponent) {
if (this._scrollComponent.scrollToEnd) {
this._scrollComponent.scrollToEnd(options);
} else {
console.warn('The scroll component used by the ListView does not support ' + 'scrollToEnd. Check the renderScrollComponent prop of your ListView.');
}
}
},
setNativeProps: function setNativeProps(props) {
if (this._scrollComponent) {
this._scrollComponent.setNativeProps(props);
}
},
getDefaultProps: function getDefaultProps() {
return {
initialListSize: DEFAULT_INITIAL_ROWS,
pageSize: DEFAULT_PAGE_SIZE,
renderScrollComponent: function renderScrollComponent(props) {
return React.createElement(ScrollView, babelHelpers.extends({}, props, {
__source: {
fileName: _jsxFileName,
lineNumber: 329
}
}));
},
scrollRenderAheadDistance: DEFAULT_SCROLL_RENDER_AHEAD,
onEndReachedThreshold: DEFAULT_END_REACHED_THRESHOLD,
stickySectionHeadersEnabled: true,
stickyHeaderIndices: []
};
},
getInitialState: function getInitialState() {
return {
curRenderedRowsCount: this.props.initialListSize,
highlightedRow: {}
};
},
getInnerViewNode: function getInnerViewNode() {
return this._scrollComponent.getInnerViewNode();
},
componentWillMount: function componentWillMount() {
this.scrollProperties = {
visibleLength: null,
contentLength: null,
offset: 0
};
this._childFrames = [];
this._visibleRows = {};
this._prevRenderedRowsCount = 0;
this._sentEndForContentLength = null;
},
componentDidMount: function componentDidMount() {
var _this = this;
this.requestAnimationFrame(function () {
_this._measureAndUpdateScrollProps();
});
},
componentWillReceiveProps: function componentWillReceiveProps(nextProps) {
var _this2 = this;
if (this.props.dataSource !== nextProps.dataSource || this.props.initialListSize !== nextProps.initialListSize) {
this.setState(function (state, props) {
_this2._prevRenderedRowsCount = 0;
return {
curRenderedRowsCount: Math.min(Math.max(state.curRenderedRowsCount, props.initialListSize), props.enableEmptySections ? props.dataSource.getRowAndSectionCount() : props.dataSource.getRowCount())
};
}, function () {
return _this2._renderMoreRowsIfNeeded();
});
}
},
componentDidUpdate: function componentDidUpdate() {
var _this3 = this;
this.requestAnimationFrame(function () {
_this3._measureAndUpdateScrollProps();
});
},
_onRowHighlighted: function _onRowHighlighted(sectionID, rowID) {
this.setState({ highlightedRow: { sectionID: sectionID, rowID: rowID } });
},
render: function render() {
var bodyComponents = [];
var dataSource = this.props.dataSource;
var allRowIDs = dataSource.rowIdentities;
var rowCount = 0;
var stickySectionHeaderIndices = [];
var header = this.props.renderHeader && this.props.renderHeader();
var footer = this.props.renderFooter && this.props.renderFooter();
var totalIndex = header ? 1 : 0;
for (var sectionIdx = 0; sectionIdx < allRowIDs.length; sectionIdx++) {
var sectionID = dataSource.sectionIdentities[sectionIdx];
var rowIDs = allRowIDs[sectionIdx];
if (rowIDs.length === 0) {
if (this.props.enableEmptySections === undefined) {
var warning = require(40 ); // 40 = fbjs/lib/warning
warning(false, 'In next release empty section headers will be rendered.' + ' In this release you can use \'enableEmptySections\' flag to render empty section headers.');
continue;
} else {
var invariant = require(44 ); // 44 = fbjs/lib/invariant
invariant(this.props.enableEmptySections, 'In next release \'enableEmptySections\' flag will be deprecated, empty section headers will always be rendered.' + ' If empty section headers are not desirable their indices should be excluded from sectionIDs object.' + ' In this release \'enableEmptySections\' may only have value \'true\' to allow empty section headers rendering.');
}
}
if (this.props.renderSectionHeader) {
var shouldUpdateHeader = rowCount >= this._prevRenderedRowsCount && dataSource.sectionHeaderShouldUpdate(sectionIdx);
bodyComponents.push(React.createElement(StaticRenderer, {
key: 's_' + sectionID,
shouldUpdate: !!shouldUpdateHeader,
render: this.props.renderSectionHeader.bind(null, dataSource.getSectionHeaderData(sectionIdx), sectionID),
__source: {
fileName: _jsxFileName,
lineNumber: 432
}
}));
if (this.props.stickySectionHeadersEnabled) {
stickySectionHeaderIndices.push(totalIndex++);
}
}
for (var rowIdx = 0; rowIdx < rowIDs.length; rowIdx++) {
var rowID = rowIDs[rowIdx];
var comboID = sectionID + '_' + rowID;
var shouldUpdateRow = rowCount >= this._prevRenderedRowsCount && dataSource.rowShouldUpdate(sectionIdx, rowIdx);
var row = React.createElement(StaticRenderer, {
key: 'r_' + comboID,
shouldUpdate: !!shouldUpdateRow,
render: this.props.renderRow.bind(null, dataSource.getRowData(sectionIdx, rowIdx), sectionID, rowID, this._onRowHighlighted),
__source: {
fileName: _jsxFileName,
lineNumber: 453
}
});
bodyComponents.push(row);
totalIndex++;
if (this.props.renderSeparator && (rowIdx !== rowIDs.length - 1 || sectionIdx === allRowIDs.length - 1)) {
var adjacentRowHighlighted = this.state.highlightedRow.sectionID === sectionID && (this.state.highlightedRow.rowID === rowID || this.state.highlightedRow.rowID === rowIDs[rowIdx + 1]);
var separator = this.props.renderSeparator(sectionID, rowID, adjacentRowHighlighted);
if (separator) {
bodyComponents.push(separator);
totalIndex++;
}
}
if (++rowCount === this.state.curRenderedRowsCount) {
break;
}
}
if (rowCount >= this.state.curRenderedRowsCount) {
break;
}
}
var _props = this.props,
renderScrollComponent = _props.renderScrollComponent,
props = babelHelpers.objectWithoutProperties(_props, ['renderScrollComponent']);
if (!props.scrollEventThrottle) {
props.scrollEventThrottle = DEFAULT_SCROLL_CALLBACK_THROTTLE;
}
if (props.removeClippedSubviews === undefined) {
props.removeClippedSubviews = true;
}
babelHelpers.extends(props, {
onScroll: this._onScroll,
stickyHeaderIndices: this.props.stickyHeaderIndices.concat(stickySectionHeaderIndices),
onKeyboardWillShow: undefined,
onKeyboardWillHide: undefined,
onKeyboardDidShow: undefined,
onKeyboardDidHide: undefined
});
return cloneReferencedElement(renderScrollComponent(props), {
ref: this._setScrollComponentRef,
onContentSizeChange: this._onContentSizeChange,
onLayout: this._onLayout
}, header, bodyComponents, footer);
},
_measureAndUpdateScrollProps: function _measureAndUpdateScrollProps() {
var scrollComponent = this.getScrollResponder();
if (!scrollComponent || !scrollComponent.getInnerViewNode) {
return;
}
RCTScrollViewManager && RCTScrollViewManager.calculateChildFrames && RCTScrollViewManager.calculateChildFrames(ReactNative.findNodeHandle(scrollComponent), this._updateVisibleRows);
},
_setScrollComponentRef: function _setScrollComponentRef(scrollComponent) {
this._scrollComponent = scrollComponent;
},
_onContentSizeChange: function _onContentSizeChange(width, height) {
var contentLength = !this.props.horizontal ? height : width;
if (contentLength !== this.scrollProperties.contentLength) {
this.scrollProperties.contentLength = contentLength;
this._updateVisibleRows();
this._renderMoreRowsIfNeeded();
}
this.props.onContentSizeChange && this.props.onContentSizeChange(width, height);
},
_onLayout: function _onLayout(event) {
var _event$nativeEvent$la = event.nativeEvent.layout,
width = _event$nativeEvent$la.width,
height = _event$nativeEvent$la.height;
var visibleLength = !this.props.horizontal ? height : width;
if (visibleLength !== this.scrollProperties.visibleLength) {
this.scrollProperties.visibleLength = visibleLength;
this._updateVisibleRows();
this._renderMoreRowsIfNeeded();
}
this.props.onLayout && this.props.onLayout(event);
},
_maybeCallOnEndReached: function _maybeCallOnEndReached(event) {
if (this.props.onEndReached && this.scrollProperties.contentLength !== this._sentEndForContentLength && this._getDistanceFromEnd(this.scrollProperties) < this.props.onEndReachedThreshold && this.state.curRenderedRowsCount === (this.props.enableEmptySections ? this.props.dataSource.getRowAndSectionCount() : this.props.dataSource.getRowCount())) {
this._sentEndForContentLength = this.scrollProperties.contentLength;
this.props.onEndReached(event);
return true;
}
return false;
},
_renderMoreRowsIfNeeded: function _renderMoreRowsIfNeeded() {
if (this.scrollProperties.contentLength === null || this.scrollProperties.visibleLength === null || this.state.curRenderedRowsCount === (this.props.enableEmptySections ? this.props.dataSource.getRowAndSectionCount() : this.props.dataSource.getRowCount())) {
this._maybeCallOnEndReached();
return;
}
var distanceFromEnd = this._getDistanceFromEnd(this.scrollProperties);
if (distanceFromEnd < this.props.scrollRenderAheadDistance) {
this._pageInNewRows();
}
},
_pageInNewRows: function _pageInNewRows() {
var _this4 = this;
this.setState(function (state, props) {
var rowsToRender = Math.min(state.curRenderedRowsCount + props.pageSize, props.enableEmptySections ? props.dataSource.getRowAndSectionCount() : props.dataSource.getRowCount());
_this4._prevRenderedRowsCount = state.curRenderedRowsCount;
return {
curRenderedRowsCount: rowsToRender
};
}, function () {
_this4._measureAndUpdateScrollProps();
_this4._prevRenderedRowsCount = _this4.state.curRenderedRowsCount;
});
},
_getDistanceFromEnd: function _getDistanceFromEnd(scrollProperties) {
return scrollProperties.contentLength - scrollProperties.visibleLength - scrollProperties.offset;
},
_updateVisibleRows: function _updateVisibleRows(updatedFrames) {
var _this5 = this;
if (!this.props.onChangeVisibleRows) {
return;
}
if (updatedFrames) {
updatedFrames.forEach(function (newFrame) {
_this5._childFrames[newFrame.index] = merge(newFrame);
});
}
var isVertical = !this.props.horizontal;
var dataSource = this.props.dataSource;
var visibleMin = this.scrollProperties.offset;
var visibleMax = visibleMin + this.scrollProperties.visibleLength;
var allRowIDs = dataSource.rowIdentities;
var header = this.props.renderHeader && this.props.renderHeader();
var totalIndex = header ? 1 : 0;
var visibilityChanged = false;
var changedRows = {};
for (var sectionIdx = 0; sectionIdx < allRowIDs.length; sectionIdx++) {
var rowIDs = allRowIDs[sectionIdx];
if (rowIDs.length === 0) {
continue;
}
var sectionID = dataSource.sectionIdentities[sectionIdx];
if (this.props.renderSectionHeader) {
totalIndex++;
}
var visibleSection = this._visibleRows[sectionID];
if (!visibleSection) {
visibleSection = {};
}
for (var rowIdx = 0; rowIdx < rowIDs.length; rowIdx++) {
var rowID = rowIDs[rowIdx];
var frame = this._childFrames[totalIndex];
totalIndex++;
if (this.props.renderSeparator && (rowIdx !== rowIDs.length - 1 || sectionIdx === allRowIDs.length - 1)) {
totalIndex++;
}
if (!frame) {
break;
}
var rowVisible = visibleSection[rowID];
var min = isVertical ? frame.y : frame.x;
var max = min + (isVertical ? frame.height : frame.width);
if (!min && !max || min === max) {
break;
}
if (min > visibleMax || max < visibleMin) {
if (rowVisible) {
visibilityChanged = true;
delete visibleSection[rowID];
if (!changedRows[sectionID]) {
changedRows[sectionID] = {};
}
changedRows[sectionID][rowID] = false;
}
} else if (!rowVisible) {
visibilityChanged = true;
visibleSection[rowID] = true;
if (!changedRows[sectionID]) {
changedRows[sectionID] = {};
}
changedRows[sectionID][rowID] = true;
}
}
if (!isEmpty(visibleSection)) {
this._visibleRows[sectionID] = visibleSection;
} else if (this._visibleRows[sectionID]) {
delete this._visibleRows[sectionID];
}
}
visibilityChanged && this.props.onChangeVisibleRows(this._visibleRows, changedRows);
},
_onScroll: function _onScroll(e) {
var isVertical = !this.props.horizontal;
this.scrollProperties.visibleLength = e.nativeEvent.layoutMeasurement[isVertical ? 'height' : 'width'];
this.scrollProperties.contentLength = e.nativeEvent.contentSize[isVertical ? 'height' : 'width'];
this.scrollProperties.offset = e.nativeEvent.contentOffset[isVertical ? 'y' : 'x'];
this._updateVisibleRows(e.nativeEvent.updatedChildFrames);
if (!this._maybeCallOnEndReached(e)) {
this._renderMoreRowsIfNeeded();
}
if (this.props.onEndReached && this._getDistanceFromEnd(this.scrollProperties) > this.props.onEndReachedThreshold) {
this._sentEndForContentLength = null;
}
this.props.onScroll && this.props.onScroll(e);
}
});
module.exports = ListView;
}, 303, null, "ListView");
__d(/* ListViewDataSource */function(global, require, module, exports) {
'use strict';
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var isEmpty = require(305 ); // 305 = isEmpty
var warning = require(40 ); // 40 = fbjs/lib/warning
function defaultGetRowData(dataBlob, sectionID, rowID) {
return dataBlob[sectionID][rowID];
}
function defaultGetSectionHeaderData(dataBlob, sectionID) {
return dataBlob[sectionID];
}
var ListViewDataSource = function () {
function ListViewDataSource(params) {
babelHelpers.classCallCheck(this, ListViewDataSource);
invariant(params && typeof params.rowHasChanged === 'function', 'Must provide a rowHasChanged function.');
this._rowHasChanged = params.rowHasChanged;
this._getRowData = params.getRowData || defaultGetRowData;
this._sectionHeaderHasChanged = params.sectionHeaderHasChanged;
this._getSectionHeaderData = params.getSectionHeaderData || defaultGetSectionHeaderData;
this._dataBlob = null;
this._dirtyRows = [];
this._dirtySections = [];
this._cachedRowCount = 0;
this.rowIdentities = [];
this.sectionIdentities = [];
}
babelHelpers.createClass(ListViewDataSource, [{
key: 'cloneWithRows',
value: function cloneWithRows(dataBlob, rowIdentities) {
var rowIds = rowIdentities ? [rowIdentities] : null;
if (!this._sectionHeaderHasChanged) {
this._sectionHeaderHasChanged = function () {
return false;
};
}
return this.cloneWithRowsAndSections({ s1: dataBlob }, ['s1'], rowIds);
}
}, {
key: 'cloneWithRowsAndSections',
value: function cloneWithRowsAndSections(dataBlob, sectionIdentities, rowIdentities) {
invariant(typeof this._sectionHeaderHasChanged === 'function', 'Must provide a sectionHeaderHasChanged function with section data.');
invariant(!sectionIdentities || !rowIdentities || sectionIdentities.length === rowIdentities.length, 'row and section ids lengths must be the same');
var newSource = new ListViewDataSource({
getRowData: this._getRowData,
getSectionHeaderData: this._getSectionHeaderData,
rowHasChanged: this._rowHasChanged,
sectionHeaderHasChanged: this._sectionHeaderHasChanged
});
newSource._dataBlob = dataBlob;
if (sectionIdentities) {
newSource.sectionIdentities = sectionIdentities;
} else {
newSource.sectionIdentities = Object.keys(dataBlob);
}
if (rowIdentities) {
newSource.rowIdentities = rowIdentities;
} else {
newSource.rowIdentities = [];
newSource.sectionIdentities.forEach(function (sectionID) {
newSource.rowIdentities.push(Object.keys(dataBlob[sectionID]));
});
}
newSource._cachedRowCount = countRows(newSource.rowIdentities);
newSource._calculateDirtyArrays(this._dataBlob, this.sectionIdentities, this.rowIdentities);
return newSource;
}
}, {
key: 'getRowCount',
value: function getRowCount() {
return this._cachedRowCount;
}
}, {
key: 'getRowAndSectionCount',
value: function getRowAndSectionCount() {
return this._cachedRowCount + this.sectionIdentities.length;
}
}, {
key: 'rowShouldUpdate',
value: function rowShouldUpdate(sectionIndex, rowIndex) {
var needsUpdate = this._dirtyRows[sectionIndex][rowIndex];
warning(needsUpdate !== undefined, 'missing dirtyBit for section, row: ' + sectionIndex + ', ' + rowIndex);
return needsUpdate;
}
}, {
key: 'getRowData',
value: function getRowData(sectionIndex, rowIndex) {
var sectionID = this.sectionIdentities[sectionIndex];
var rowID = this.rowIdentities[sectionIndex][rowIndex];
warning(sectionID !== undefined && rowID !== undefined, 'rendering invalid section, row: ' + sectionIndex + ', ' + rowIndex);
return this._getRowData(this._dataBlob, sectionID, rowID);
}
}, {
key: 'getRowIDForFlatIndex',
value: function getRowIDForFlatIndex(index) {
var accessIndex = index;
for (var ii = 0; ii < this.sectionIdentities.length; ii++) {
if (accessIndex >= this.rowIdentities[ii].length) {
accessIndex -= this.rowIdentities[ii].length;
} else {
return this.rowIdentities[ii][accessIndex];
}
}
return null;
}
}, {
key: 'getSectionIDForFlatIndex',
value: function getSectionIDForFlatIndex(index) {
var accessIndex = index;
for (var ii = 0; ii < this.sectionIdentities.length; ii++) {
if (accessIndex >= this.rowIdentities[ii].length) {
accessIndex -= this.rowIdentities[ii].length;
} else {
return this.sectionIdentities[ii];
}
}
return null;
}
}, {
key: 'getSectionLengths',
value: function getSectionLengths() {
var results = [];
for (var ii = 0; ii < this.sectionIdentities.length; ii++) {
results.push(this.rowIdentities[ii].length);
}
return results;
}
}, {
key: 'sectionHeaderShouldUpdate',
value: function sectionHeaderShouldUpdate(sectionIndex) {
var needsUpdate = this._dirtySections[sectionIndex];
warning(needsUpdate !== undefined, 'missing dirtyBit for section: ' + sectionIndex);
return needsUpdate;
}
}, {
key: 'getSectionHeaderData',
value: function getSectionHeaderData(sectionIndex) {
if (!this._getSectionHeaderData) {
return null;
}
var sectionID = this.sectionIdentities[sectionIndex];
warning(sectionID !== undefined, 'renderSection called on invalid section: ' + sectionIndex);
return this._getSectionHeaderData(this._dataBlob, sectionID);
}
}, {
key: '_calculateDirtyArrays',
value: function _calculateDirtyArrays(prevDataBlob, prevSectionIDs, prevRowIDs) {
var prevSectionsHash = keyedDictionaryFromArray(prevSectionIDs);
var prevRowsHash = {};
for (var ii = 0; ii < prevRowIDs.length; ii++) {
var sectionID = prevSectionIDs[ii];
warning(!prevRowsHash[sectionID], 'SectionID appears more than once: ' + sectionID);
prevRowsHash[sectionID] = keyedDictionaryFromArray(prevRowIDs[ii]);
}
this._dirtySections = [];
this._dirtyRows = [];
var dirty;
for (var sIndex = 0; sIndex < this.sectionIdentities.length; sIndex++) {
var sectionID = this.sectionIdentities[sIndex];
dirty = !prevSectionsHash[sectionID];
var sectionHeaderHasChanged = this._sectionHeaderHasChanged;
if (!dirty && sectionHeaderHasChanged) {
dirty = sectionHeaderHasChanged(this._getSectionHeaderData(prevDataBlob, sectionID), this._getSectionHeaderData(this._dataBlob, sectionID));
}
this._dirtySections.push(!!dirty);
this._dirtyRows[sIndex] = [];
for (var rIndex = 0; rIndex < this.rowIdentities[sIndex].length; rIndex++) {
var rowID = this.rowIdentities[sIndex][rIndex];
dirty = !prevSectionsHash[sectionID] || !prevRowsHash[sectionID][rowID] || this._rowHasChanged(this._getRowData(prevDataBlob, sectionID, rowID), this._getRowData(this._dataBlob, sectionID, rowID));
this._dirtyRows[sIndex].push(!!dirty);
}
}
}
}]);
return ListViewDataSource;
}();
function countRows(allRowIDs) {
var totalRows = 0;
for (var sectionIdx = 0; sectionIdx < allRowIDs.length; sectionIdx++) {
var rowIDs = allRowIDs[sectionIdx];
totalRows += rowIDs.length;
}
return totalRows;
}
function keyedDictionaryFromArray(arr) {
if (isEmpty(arr)) {
return {};
}
var result = {};
for (var ii = 0; ii < arr.length; ii++) {
var key = arr[ii];
warning(!result[key], 'Value appears more than once in array: ' + key);
result[key] = true;
}
return result;
}
module.exports = ListViewDataSource;
}, 304, null, "ListViewDataSource");
__d(/* isEmpty */function(global, require, module, exports) {
'use strict';
function isEmpty(obj) {
if (Array.isArray(obj)) {
return obj.length === 0;
} else if (typeof obj === 'object') {
for (var i in obj) {
return false;
}
return true;
} else {
return !obj;
}
}
module.exports = isEmpty;
}, 305, null, "isEmpty");
__d(/* StaticRenderer */function(global, require, module, exports) {
'use strict';
var React = require(126 ); // 126 = React
var StaticRenderer = function (_React$Component) {
babelHelpers.inherits(StaticRenderer, _React$Component);
function StaticRenderer() {
babelHelpers.classCallCheck(this, StaticRenderer);
return babelHelpers.possibleConstructorReturn(this, (StaticRenderer.__proto__ || Object.getPrototypeOf(StaticRenderer)).apply(this, arguments));
}
babelHelpers.createClass(StaticRenderer, [{
key: 'shouldComponentUpdate',
value: function shouldComponentUpdate(nextProps) {
return nextProps.shouldUpdate;
}
}, {
key: 'render',
value: function render() {
return this.props.render();
}
}]);
return StaticRenderer;
}(React.Component);
StaticRenderer.propTypes = {
shouldUpdate: React.PropTypes.bool.isRequired,
render: React.PropTypes.func.isRequired
};
module.exports = StaticRenderer;
}, 306, null, "StaticRenderer");
__d(/* react-clone-referenced-element/cloneReferencedElement.js */function(global, require, module, exports) {'use strict';
var React = require(34 ); // 34 = react
function cloneReferencedElement(element, config) {
var cloneRef = config.ref;
var originalRef = element.ref;
for (var _len = arguments.length, children = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
children[_key - 2] = arguments[_key];
}
if (originalRef == null || cloneRef == null) {
return React.cloneElement.apply(React, [element, config].concat(children));
}
if (typeof originalRef !== 'function') {
if (__DEV__) {
console.warn('Cloning an element with a ref that will be overwritten because it ' + 'is not a function. Use a composable callback-style ref instead. ' + 'Ignoring ref: ' + originalRef);
}
return React.cloneElement.apply(React, [element, config].concat(children));
}
return React.cloneElement.apply(React, [element, babelHelpers.extends({}, config, {
ref: function ref(component) {
cloneRef(component);
originalRef(component);
}
})].concat(children));
}
module.exports = cloneReferencedElement;
}, 307, null, "react-clone-referenced-element/cloneReferencedElement.js");
__d(/* MapView */function(global, require, module, exports) {
'use strict';
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/node_modules/react-native/Libraries/Components/MapView/MapView.js';
var ColorPropType = require(71 ); // 71 = ColorPropType
var EdgeInsetsPropType = require(147 ); // 147 = EdgeInsetsPropType
var Image = require(237 ); // 237 = Image
var NativeMethodsMixin = require(73 ); // 73 = NativeMethodsMixin
var React = require(126 ); // 126 = React
var StyleSheet = require(127 ); // 127 = StyleSheet
var View = require(146 ); // 146 = View
var deprecatedPropType = require(137 ); // 137 = deprecatedPropType
var processColor = require(121 ); // 121 = processColor
var resolveAssetSource = require(198 ); // 198 = resolveAssetSource
var requireNativeComponent = require(155 ); // 155 = requireNativeComponent
var MapView = React.createClass({
displayName: 'MapView',
mixins: [NativeMethodsMixin],
propTypes: babelHelpers.extends({}, View.propTypes, {
style: View.propTypes.style,
showsUserLocation: React.PropTypes.bool,
followUserLocation: React.PropTypes.bool,
showsPointsOfInterest: React.PropTypes.bool,
showsCompass: React.PropTypes.bool,
showsAnnotationCallouts: React.PropTypes.bool,
zoomEnabled: React.PropTypes.bool,
rotateEnabled: React.PropTypes.bool,
pitchEnabled: React.PropTypes.bool,
scrollEnabled: React.PropTypes.bool,
mapType: React.PropTypes.oneOf(['standard', 'satellite', 'hybrid']),
region: React.PropTypes.shape({
latitude: React.PropTypes.number.isRequired,
longitude: React.PropTypes.number.isRequired,
latitudeDelta: React.PropTypes.number,
longitudeDelta: React.PropTypes.number
}),
annotations: React.PropTypes.arrayOf(React.PropTypes.shape({
latitude: React.PropTypes.number.isRequired,
longitude: React.PropTypes.number.isRequired,
animateDrop: React.PropTypes.bool,
draggable: React.PropTypes.bool,
onDragStateChange: React.PropTypes.func,
onFocus: React.PropTypes.func,
onBlur: React.PropTypes.func,
title: React.PropTypes.string,
subtitle: React.PropTypes.string,
leftCalloutView: React.PropTypes.element,
rightCalloutView: React.PropTypes.element,
detailCalloutView: React.PropTypes.element,
tintColor: ColorPropType,
image: Image.propTypes.source,
view: React.PropTypes.element,
id: React.PropTypes.string,
hasLeftCallout: deprecatedPropType(React.PropTypes.bool, 'Use `leftCalloutView` instead.'),
hasRightCallout: deprecatedPropType(React.PropTypes.bool, 'Use `rightCalloutView` instead.'),
onLeftCalloutPress: deprecatedPropType(React.PropTypes.func, 'Use `leftCalloutView` instead.'),
onRightCalloutPress: deprecatedPropType(React.PropTypes.func, 'Use `rightCalloutView` instead.')
})),
overlays: React.PropTypes.arrayOf(React.PropTypes.shape({
coordinates: React.PropTypes.arrayOf(React.PropTypes.shape({
latitude: React.PropTypes.number.isRequired,
longitude: React.PropTypes.number.isRequired
})),
lineWidth: React.PropTypes.number,
strokeColor: ColorPropType,
fillColor: ColorPropType,
id: React.PropTypes.string
})),
maxDelta: React.PropTypes.number,
minDelta: React.PropTypes.number,
legalLabelInsets: EdgeInsetsPropType,
onRegionChange: React.PropTypes.func,
onRegionChangeComplete: React.PropTypes.func,
onAnnotationPress: React.PropTypes.func,
active: React.PropTypes.bool
}),
statics: {
PinColors: {
RED: '#ff3b30',
GREEN: '#4cd964',
PURPLE: '#c969e0'
}
},
render: function render() {
var _this = this;
var children = [],
_props = this.props,
annotations = _props.annotations,
overlays = _props.overlays,
followUserLocation = _props.followUserLocation;
annotations = annotations && annotations.map(function (annotation) {
var id = annotation.id,
image = annotation.image,
tintColor = annotation.tintColor,
view = annotation.view,
leftCalloutView = annotation.leftCalloutView,
rightCalloutView = annotation.rightCalloutView,
detailCalloutView = annotation.detailCalloutView;
if (!view && image && tintColor) {
view = React.createElement(Image, {
style: {
tintColor: processColor(tintColor)
},
source: image,
__source: {
fileName: _jsxFileName,
lineNumber: 388
}
});
image = undefined;
}
if (view) {
if (image) {
console.warn('`image` and `view` both set on annotation. Image will be ignored.');
}
var viewIndex = children.length;
children.push(React.cloneElement(view, {
style: [styles.annotationView, view.props.style || {}]
}));
}
if (leftCalloutView) {
var leftCalloutViewIndex = children.length;
children.push(React.cloneElement(leftCalloutView, {
style: [styles.calloutView, leftCalloutView.props.style || {}]
}));
}
if (rightCalloutView) {
var rightCalloutViewIndex = children.length;
children.push(React.cloneElement(rightCalloutView, {
style: [styles.calloutView, rightCalloutView.props.style || {}]
}));
}
if (detailCalloutView) {
var detailCalloutViewIndex = children.length;
children.push(React.cloneElement(detailCalloutView, {
style: [styles.calloutView, detailCalloutView.props.style || {}]
}));
}
var result = babelHelpers.extends({}, annotation, {
tintColor: tintColor && processColor(tintColor),
image: image,
viewIndex: viewIndex,
leftCalloutViewIndex: leftCalloutViewIndex,
rightCalloutViewIndex: rightCalloutViewIndex,
detailCalloutViewIndex: detailCalloutViewIndex,
view: undefined,
leftCalloutView: undefined,
rightCalloutView: undefined,
detailCalloutView: undefined
});
result.id = id || encodeURIComponent(JSON.stringify(result));
result.image = image && resolveAssetSource(image);
return result;
});
overlays = overlays && overlays.map(function (overlay) {
var id = overlay.id,
fillColor = overlay.fillColor,
strokeColor = overlay.strokeColor;
var result = babelHelpers.extends({}, overlay, {
strokeColor: strokeColor && processColor(strokeColor),
fillColor: fillColor && processColor(fillColor)
});
result.id = id || encodeURIComponent(JSON.stringify(result));
return result;
});
var findByAnnotationId = function findByAnnotationId(annotationId) {
if (!annotations) {
return null;
}
for (var i = 0, l = annotations.length; i < l; i++) {
if (annotations[i].id === annotationId) {
return annotations[i];
}
}
return null;
};
var onPress = void 0,
onAnnotationDragStateChange = void 0,
onAnnotationFocus = void 0,
onAnnotationBlur = void 0;
if (annotations) {
onPress = function onPress(event) {
if (event.nativeEvent.action === 'annotation-click') {
_this.props.onAnnotationPress && _this.props.onAnnotationPress(event.nativeEvent.annotation);
} else if (event.nativeEvent.action === 'callout-click') {
var annotation = findByAnnotationId(event.nativeEvent.annotationId);
if (annotation) {
if (event.nativeEvent.side === 'left' && annotation.onLeftCalloutPress) {
annotation.onLeftCalloutPress(event.nativeEvent);
} else if (event.nativeEvent.side === 'right' && annotation.onRightCalloutPress) {
annotation.onRightCalloutPress(event.nativeEvent);
}
}
}
};
onAnnotationDragStateChange = function onAnnotationDragStateChange(event) {
var annotation = findByAnnotationId(event.nativeEvent.annotationId);
if (annotation) {
annotation.onDragStateChange && annotation.onDragStateChange(event.nativeEvent);
}
};
onAnnotationFocus = function onAnnotationFocus(event) {
var annotation = findByAnnotationId(event.nativeEvent.annotationId);
if (annotation && annotation.onFocus) {
annotation.onFocus(event.nativeEvent);
}
};
onAnnotationBlur = function onAnnotationBlur(event) {
var annotation = findByAnnotationId(event.nativeEvent.annotationId);
if (annotation && annotation.onBlur) {
annotation.onBlur(event.nativeEvent);
}
};
}
if (this.props.onRegionChange || this.props.onRegionChangeComplete) {
var onChange = function onChange(event) {
if (event.nativeEvent.continuous) {
_this.props.onRegionChange && _this.props.onRegionChange(event.nativeEvent.region);
} else {
_this.props.onRegionChangeComplete && _this.props.onRegionChangeComplete(event.nativeEvent.region);
}
};
}
if (followUserLocation === undefined) {
followUserLocation = this.props.showUserLocation;
}
return React.createElement(RCTMap, babelHelpers.extends({}, this.props, {
annotations: annotations,
children: children,
followUserLocation: followUserLocation,
overlays: overlays,
onPress: onPress,
onChange: onChange,
onAnnotationDragStateChange: onAnnotationDragStateChange,
onAnnotationFocus: onAnnotationFocus,
onAnnotationBlur: onAnnotationBlur,
__source: {
fileName: _jsxFileName,
lineNumber: 526
}
}));
}
});
var styles = StyleSheet.create({
annotationView: {
position: 'absolute',
backgroundColor: 'transparent'
},
calloutView: {
position: 'absolute',
backgroundColor: 'white'
}
});
var RCTMap = requireNativeComponent('RCTMap', MapView, {
nativeOnly: {
onAnnotationDragStateChange: true,
onAnnotationFocus: true,
onAnnotationBlur: true,
onChange: true,
onPress: true
}
});
module.exports = MapView;
}, 308, null, "MapView");
__d(/* Modal */function(global, require, module, exports) {
'use strict';
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/node_modules/react-native/Libraries/Modal/Modal.js',
_container;
var AppContainer = require(310 ); // 310 = AppContainer
var I18nManager = require(331 ); // 331 = I18nManager
var Platform = require(79 ); // 79 = Platform
var React = require(126 ); // 126 = React
var StyleSheet = require(127 ); // 127 = StyleSheet
var View = require(146 ); // 146 = View
var deprecatedPropType = require(137 ); // 137 = deprecatedPropType
var requireNativeComponent = require(155 ); // 155 = requireNativeComponent
var RCTModalHostView = requireNativeComponent('RCTModalHostView', null);
var PropTypes = React.PropTypes;
var Modal = function (_React$Component) {
babelHelpers.inherits(Modal, _React$Component);
function Modal() {
babelHelpers.classCallCheck(this, Modal);
return babelHelpers.possibleConstructorReturn(this, (Modal.__proto__ || Object.getPrototypeOf(Modal)).apply(this, arguments));
}
babelHelpers.createClass(Modal, [{
key: 'render',
value: function render() {
if (this.props.visible === false) {
return null;
}
var containerStyles = {
backgroundColor: this.props.transparent ? 'transparent' : 'white'
};
var animationType = this.props.animationType;
if (!animationType) {
animationType = 'none';
if (this.props.animated) {
animationType = 'slide';
}
}
var innerChildren = __DEV__ ? React.createElement(
AppContainer,
{ rootTag: this.context.rootTag, __source: {
fileName: _jsxFileName,
lineNumber: 160
}
},
this.props.children
) : this.props.children;
return React.createElement(
RCTModalHostView,
{
animationType: animationType,
transparent: this.props.transparent,
hardwareAccelerated: this.props.hardwareAccelerated,
onRequestClose: this.props.onRequestClose,
onShow: this.props.onShow,
style: styles.modal,
onStartShouldSetResponder: this._shouldSetResponder,
supportedOrientations: this.props.supportedOrientations,
onOrientationChange: this.props.onOrientationChange,
__source: {
fileName: _jsxFileName,
lineNumber: 166
}
},
React.createElement(
View,
{ style: [styles.container, containerStyles], __source: {
fileName: _jsxFileName,
lineNumber: 177
}
},
innerChildren
)
);
}
}, {
key: '_shouldSetResponder',
value: function _shouldSetResponder() {
return true;
}
}]);
return Modal;
}(React.Component);
Modal.propTypes = {
animationType: PropTypes.oneOf(['none', 'slide', 'fade']),
transparent: PropTypes.bool,
hardwareAccelerated: PropTypes.bool,
visible: PropTypes.bool,
onRequestClose: Platform.OS === 'android' ? PropTypes.func.isRequired : PropTypes.func,
onShow: PropTypes.func,
animated: deprecatedPropType(PropTypes.bool, 'Use the `animationType` prop instead.'),
supportedOrientations: PropTypes.arrayOf(PropTypes.oneOf(['portrait', 'portrait-upside-down', 'landscape', 'landscape-left', 'landscape-right'])),
onOrientationChange: PropTypes.func
};
Modal.defaultProps = {
visible: true,
hardwareAccelerated: false
};
Modal.contextTypes = {
rootTag: React.PropTypes.number
};
var side = I18nManager.isRTL ? 'right' : 'left';
var styles = StyleSheet.create({
modal: {
position: 'absolute'
},
container: (_container = {
position: 'absolute'
}, babelHelpers.defineProperty(_container, side, 0), babelHelpers.defineProperty(_container, 'top', 0), _container)
});
module.exports = Modal;
}, 309, null, "Modal");
__d(/* AppContainer */function(global, require, module, exports) {
'use strict';
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/node_modules/react-native/Libraries/ReactNative/AppContainer.js';
var EmitterSubscription = require(104 ); // 104 = EmitterSubscription
var RCTDeviceEventEmitter = require(107 ); // 107 = RCTDeviceEventEmitter
var React = require(126 ); // 126 = React
var ReactNative = require(241 ); // 241 = ReactNative
var StyleSheet = require(127 ); // 127 = StyleSheet
var View = require(146 ); // 146 = View
var AppContainer = function (_React$Component) {
babelHelpers.inherits(AppContainer, _React$Component);
function AppContainer() {
var _ref;
var _temp, _this, _ret;
babelHelpers.classCallCheck(this, AppContainer);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = babelHelpers.possibleConstructorReturn(this, (_ref = AppContainer.__proto__ || Object.getPrototypeOf(AppContainer)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
inspector: null,
mainKey: 1
}, _this._subscription = null, _temp), babelHelpers.possibleConstructorReturn(_this, _ret);
}
babelHelpers.createClass(AppContainer, [{
key: 'getChildContext',
value: function getChildContext() {
return {
rootTag: this.props.rootTag
};
}
}, {
key: 'componentDidMount',
value: function componentDidMount() {
var _this2 = this;
if (__DEV__) {
this._subscription = RCTDeviceEventEmitter.addListener('toggleElementInspector', function () {
var Inspector = require(311 ); // 311 = Inspector
var inspector = _this2.state.inspector ? null : React.createElement(Inspector, {
inspectedViewTag: ReactNative.findNodeHandle(_this2._mainRef),
onRequestRerenderApp: function onRequestRerenderApp(updateInspectedViewTag) {
_this2.setState(function (s) {
return { mainKey: s.mainKey + 1 };
}, function () {
return updateInspectedViewTag(ReactNative.findNodeHandle(_this2._mainRef));
});
},
__source: {
fileName: _jsxFileName,
lineNumber: 61
}
});
_this2.setState({ inspector: inspector });
});
}
}
}, {
key: 'componentWillUnmount',
value: function componentWillUnmount() {
if (this._subscription) {
this._subscription.remove();
}
}
}, {
key: 'render',
value: function render() {
var _this3 = this;
var yellowBox = null;
if (__DEV__) {
var YellowBox = require(330 ); // 330 = YellowBox
yellowBox = React.createElement(YellowBox, {
__source: {
fileName: _jsxFileName,
lineNumber: 88
}
});
}
return React.createElement(
View,
{ style: styles.appContainer, pointerEvents: 'box-none', __source: {
fileName: _jsxFileName,
lineNumber: 92
}
},
React.createElement(
View,
{
collapsable: !this.state.inspector,
key: this.state.mainKey,
pointerEvents: 'box-none',
style: styles.appContainer, ref: function ref(_ref2) {
_this3._mainRef = _ref2;
}, __source: {
fileName: _jsxFileName,
lineNumber: 93
}
},
this.props.children
),
yellowBox,
this.state.inspector
);
}
}]);
return AppContainer;
}(React.Component);
AppContainer.childContextTypes = {
rootTag: React.PropTypes.number
};
var styles = StyleSheet.create({
appContainer: {
flex: 1
}
});
module.exports = AppContainer;
}, 310, null, "AppContainer");
__d(/* Inspector */function(global, require, module, exports) {
'use strict';
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/node_modules/react-native/Libraries/Inspector/Inspector.js';
var Dimensions = require(129 ); // 129 = Dimensions
var InspectorOverlay = require(312 ); // 312 = InspectorOverlay
var InspectorPanel = require(317 ); // 317 = InspectorPanel
var InspectorUtils = require(313 ); // 313 = InspectorUtils
var Platform = require(79 ); // 79 = Platform
var React = require(126 ); // 126 = React
var StyleSheet = require(127 ); // 127 = StyleSheet
var Touchable = require(211 ); // 211 = Touchable
var UIManager = require(123 ); // 123 = UIManager
var View = require(146 ); // 146 = View
if (window.__REACT_DEVTOOLS_GLOBAL_HOOK__) {
window.__REACT_DEVTOOLS_GLOBAL_HOOK__.resolveRNStyle = require(77 ); // 77 = flattenStyle
}
var Inspector = function (_React$Component) {
babelHelpers.inherits(Inspector, _React$Component);
function Inspector(props) {
babelHelpers.classCallCheck(this, Inspector);
var _this = babelHelpers.possibleConstructorReturn(this, (Inspector.__proto__ || Object.getPrototypeOf(Inspector)).call(this, props));
_initialiseProps.call(_this);
_this.state = {
devtoolsAgent: null,
hierarchy: null,
panelPos: 'bottom',
inspecting: true,
perfing: false,
inspected: null,
selection: null,
inspectedViewTag: _this.props.inspectedViewTag,
networking: false
};
return _this;
}
babelHelpers.createClass(Inspector, [{
key: 'componentDidMount',
value: function componentDidMount() {
if (window.__REACT_DEVTOOLS_GLOBAL_HOOK__) {
this.attachToDevtools = this.attachToDevtools.bind(this);
window.__REACT_DEVTOOLS_GLOBAL_HOOK__.on('react-devtools', this.attachToDevtools);
if (window.__REACT_DEVTOOLS_GLOBAL_HOOK__.reactDevtoolsAgent) {
this.attachToDevtools(window.__REACT_DEVTOOLS_GLOBAL_HOOK__.reactDevtoolsAgent);
}
}
}
}, {
key: 'componentWillUnmount',
value: function componentWillUnmount() {
if (this._subs) {
this._subs.map(function (fn) {
return fn();
});
}
if (window.__REACT_DEVTOOLS_GLOBAL_HOOK__) {
window.__REACT_DEVTOOLS_GLOBAL_HOOK__.off('react-devtools', this.attachToDevtools);
}
}
}, {
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(newProps) {
this.setState({ inspectedViewTag: newProps.inspectedViewTag });
}
}, {
key: 'setSelection',
value: function setSelection(i) {
var _this2 = this;
var instance = this.state.hierarchy[i];
var publicInstance = instance['_instance'] || {};
var source = instance['_currentElement'] && instance['_currentElement']['_source'];
UIManager.measure(instance.getHostNode(), function (x, y, width, height, left, top) {
_this2.setState({
inspected: {
frame: { left: left, top: top, width: width, height: height },
style: publicInstance.props ? publicInstance.props.style : {},
source: source
},
selection: i
});
});
}
}, {
key: 'onTouchInstance',
value: function onTouchInstance(touched, frame, pointerY) {
var hierarchy = InspectorUtils.getOwnerHierarchy(touched);
var instance = InspectorUtils.lastNotNativeInstance(hierarchy);
if (this.state.devtoolsAgent) {
this.state.devtoolsAgent.selectFromReactInstance(instance, true);
}
var publicInstance = instance['_instance'] || {};
var props = publicInstance.props || {};
var source = instance['_currentElement'] && instance['_currentElement']['_source'];
this.setState({
panelPos: pointerY > Dimensions.get('window').height / 2 ? 'top' : 'bottom',
selection: hierarchy.indexOf(instance),
hierarchy: hierarchy,
inspected: {
style: props.style || {},
frame: frame,
source: source
}
});
}
}, {
key: 'setPerfing',
value: function setPerfing(val) {
this.setState({
perfing: val,
inspecting: false,
inspected: null,
networking: false
});
}
}, {
key: 'setInspecting',
value: function setInspecting(val) {
this.setState({
inspecting: val,
inspected: null
});
}
}, {
key: 'setTouchTargetting',
value: function setTouchTargetting(val) {
var _this3 = this;
Touchable.TOUCH_TARGET_DEBUG = val;
this.props.onRequestRerenderApp(function (inspectedViewTag) {
_this3.setState({ inspectedViewTag: inspectedViewTag });
});
}
}, {
key: 'setNetworking',
value: function setNetworking(val) {
this.setState({
networking: val,
perfing: false,
inspecting: false,
inspected: null
});
}
}, {
key: 'render',
value: function render() {
var panelContainerStyle = this.state.panelPos === 'bottom' ? { bottom: 0 } : { top: Platform.OS === 'ios' ? 20 : 0 };
return React.createElement(
View,
{ style: styles.container, pointerEvents: 'box-none', __source: {
fileName: _jsxFileName,
lineNumber: 212
}
},
this.state.inspecting && React.createElement(InspectorOverlay, {
inspected: this.state.inspected,
inspectedViewTag: this.state.inspectedViewTag,
onTouchInstance: this.onTouchInstance.bind(this),
__source: {
fileName: _jsxFileName,
lineNumber: 214
}
}),
React.createElement(
View,
{ style: [styles.panelContainer, panelContainerStyle], __source: {
fileName: _jsxFileName,
lineNumber: 219
}
},
React.createElement(InspectorPanel, {
devtoolsIsOpen: !!this.state.devtoolsAgent,
inspecting: this.state.inspecting,
perfing: this.state.perfing,
setPerfing: this.setPerfing.bind(this),
setInspecting: this.setInspecting.bind(this),
inspected: this.state.inspected,
hierarchy: this.state.hierarchy,
selection: this.state.selection,
setSelection: this.setSelection.bind(this),
touchTargetting: Touchable.TOUCH_TARGET_DEBUG,
setTouchTargetting: this.setTouchTargetting.bind(this),
networking: this.state.networking,
setNetworking: this.setNetworking.bind(this),
__source: {
fileName: _jsxFileName,
lineNumber: 220
}
})
)
);
}
}]);
return Inspector;
}(React.Component);
var _initialiseProps = function _initialiseProps() {
var _this4 = this;
this.attachToDevtools = function (agent) {
var _hideWait = null;
var hlSub = agent.sub('highlight', function (_ref) {
var node = _ref.node,
name = _ref.name,
props = _ref.props;
clearTimeout(_hideWait);
UIManager.measure(node, function (x, y, width, height, left, top) {
_this4.setState({
hierarchy: [],
inspected: {
frame: { left: left, top: top, width: width, height: height },
style: props ? props.style : {}
}
});
});
});
var hideSub = agent.sub('hideHighlight', function () {
if (_this4.state.inspected === null) {
return;
}
_hideWait = setTimeout(function () {
_this4.setState({
inspected: null
});
}, 100);
});
_this4._subs = [hlSub, hideSub];
agent.on('shutdown', function () {
_this4.setState({ devtoolsAgent: null });
_this4._subs = null;
});
_this4.setState({
devtoolsAgent: agent
});
};
};
var styles = StyleSheet.create({
container: {
position: 'absolute',
backgroundColor: 'transparent',
top: 0,
left: 0,
right: 0,
bottom: 0
},
panelContainer: {
position: 'absolute',
left: 0,
right: 0
}
});
module.exports = Inspector;
}, 311, null, "Inspector");
__d(/* InspectorOverlay */function(global, require, module, exports) {
'use strict';
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/node_modules/react-native/Libraries/Inspector/InspectorOverlay.js';
var Dimensions = require(129 ); // 129 = Dimensions
var InspectorUtils = require(313 ); // 313 = InspectorUtils
var React = require(126 ); // 126 = React
var StyleSheet = require(127 ); // 127 = StyleSheet
var UIManager = require(123 ); // 123 = UIManager
var View = require(146 ); // 146 = View
var ElementBox = require(314 ); // 314 = ElementBox
var PropTypes = React.PropTypes;
var InspectorOverlay = function (_React$Component) {
babelHelpers.inherits(InspectorOverlay, _React$Component);
function InspectorOverlay() {
var _ref;
var _temp, _this, _ret;
babelHelpers.classCallCheck(this, InspectorOverlay);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = babelHelpers.possibleConstructorReturn(this, (_ref = InspectorOverlay.__proto__ || Object.getPrototypeOf(InspectorOverlay)).call.apply(_ref, [this].concat(args))), _this), _this.findViewForTouchEvent = function (e) {
var _e$nativeEvent$touche = e.nativeEvent.touches[0],
locationX = _e$nativeEvent$touche.locationX,
locationY = _e$nativeEvent$touche.locationY;
UIManager.findSubviewIn(_this.props.inspectedViewTag, [locationX, locationY], function (nativeViewTag, left, top, width, height) {
var instance = InspectorUtils.findInstanceByNativeTag(nativeViewTag);
if (!instance) {
return;
}
_this.props.onTouchInstance(instance, { left: left, top: top, width: width, height: height }, locationY);
});
}, _this.shouldSetResponser = function (e) {
_this.findViewForTouchEvent(e);
return true;
}, _temp), babelHelpers.possibleConstructorReturn(_this, _ret);
}
babelHelpers.createClass(InspectorOverlay, [{
key: 'render',
value: function render() {
var content = null;
if (this.props.inspected) {
content = React.createElement(ElementBox, { frame: this.props.inspected.frame, style: this.props.inspected.style, __source: {
fileName: _jsxFileName,
lineNumber: 70
}
});
}
return React.createElement(
View,
{
onStartShouldSetResponder: this.shouldSetResponser,
onResponderMove: this.findViewForTouchEvent,
style: [styles.inspector, { height: Dimensions.get('window').height }], __source: {
fileName: _jsxFileName,
lineNumber: 74
}
},
content
);
}
}]);
return InspectorOverlay;
}(React.Component);
InspectorOverlay.propTypes = {
inspected: PropTypes.shape({
frame: PropTypes.object,
style: PropTypes.any
}),
inspectedViewTag: PropTypes.number,
onTouchInstance: PropTypes.func.isRequired
};
var styles = StyleSheet.create({
inspector: {
backgroundColor: 'transparent',
position: 'absolute',
left: 0,
top: 0,
right: 0
}
});
module.exports = InspectorOverlay;
}, 312, null, "InspectorOverlay");
__d(/* InspectorUtils */function(global, require, module, exports) {
'use strict';
var ReactNativeComponentTree = require(159 ); // 159 = ReactNativeComponentTree
function traverseOwnerTreeUp(hierarchy, instance) {
if (instance) {
hierarchy.unshift(instance);
traverseOwnerTreeUp(hierarchy, instance._currentElement._owner);
}
}
function findInstanceByNativeTag(nativeTag) {
return ReactNativeComponentTree.getInstanceFromNode(nativeTag);
}
function getOwnerHierarchy(instance) {
var hierarchy = [];
traverseOwnerTreeUp(hierarchy, instance);
return hierarchy;
}
function lastNotNativeInstance(hierarchy) {
for (var i = hierarchy.length - 1; i > 1; i--) {
var instance = hierarchy[i];
if (!instance.viewConfig) {
return instance;
}
}
return hierarchy[0];
}
module.exports = { findInstanceByNativeTag: findInstanceByNativeTag, getOwnerHierarchy: getOwnerHierarchy, lastNotNativeInstance: lastNotNativeInstance };
}, 313, null, "InspectorUtils");
__d(/* ElementBox */function(global, require, module, exports) {
'use strict';
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/node_modules/react-native/Libraries/Inspector/ElementBox.js';
var React = require(126 ); // 126 = React
var View = require(146 ); // 146 = View
var StyleSheet = require(127 ); // 127 = StyleSheet
var BorderBox = require(315 ); // 315 = BorderBox
var resolveBoxStyle = require(316 ); // 316 = resolveBoxStyle
var flattenStyle = require(77 ); // 77 = flattenStyle
var ElementBox = function (_React$Component) {
babelHelpers.inherits(ElementBox, _React$Component);
function ElementBox() {
babelHelpers.classCallCheck(this, ElementBox);
return babelHelpers.possibleConstructorReturn(this, (ElementBox.__proto__ || Object.getPrototypeOf(ElementBox)).apply(this, arguments));
}
babelHelpers.createClass(ElementBox, [{
key: 'render',
value: function render() {
var style = flattenStyle(this.props.style) || {};
var margin = resolveBoxStyle('margin', style);
var padding = resolveBoxStyle('padding', style);
var frameStyle = this.props.frame;
if (margin) {
frameStyle = {
top: frameStyle.top - margin.top,
left: frameStyle.left - margin.left,
height: frameStyle.height + margin.top + margin.bottom,
width: frameStyle.width + margin.left + margin.right
};
}
var contentStyle = {
width: this.props.frame.width,
height: this.props.frame.height
};
if (padding) {
contentStyle = {
width: contentStyle.width - padding.left - padding.right,
height: contentStyle.height - padding.top - padding.bottom
};
}
return React.createElement(
View,
{ style: [styles.frame, frameStyle], pointerEvents: 'none', __source: {
fileName: _jsxFileName,
lineNumber: 47
}
},
React.createElement(
BorderBox,
{ box: margin, style: styles.margin, __source: {
fileName: _jsxFileName,
lineNumber: 48
}
},
React.createElement(
BorderBox,
{ box: padding, style: styles.padding, __source: {
fileName: _jsxFileName,
lineNumber: 49
}
},
React.createElement(View, { style: [styles.content, contentStyle], __source: {
fileName: _jsxFileName,
lineNumber: 50
}
})
)
)
);
}
}]);
return ElementBox;
}(React.Component);
var styles = StyleSheet.create({
frame: {
position: 'absolute'
},
content: {
backgroundColor: 'rgba(200, 230, 255, 0.8)'
},
padding: {
borderColor: 'rgba(77, 255, 0, 0.3)'
},
margin: {
borderColor: 'rgba(255, 132, 0, 0.3)'
}
});
module.exports = ElementBox;
}, 314, null, "ElementBox");
__d(/* BorderBox */function(global, require, module, exports) {
'use strict';
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/node_modules/react-native/Libraries/Inspector/BorderBox.js';
var React = require(126 ); // 126 = React
var View = require(146 ); // 146 = View
var BorderBox = function (_React$Component) {
babelHelpers.inherits(BorderBox, _React$Component);
function BorderBox() {
babelHelpers.classCallCheck(this, BorderBox);
return babelHelpers.possibleConstructorReturn(this, (BorderBox.__proto__ || Object.getPrototypeOf(BorderBox)).apply(this, arguments));
}
babelHelpers.createClass(BorderBox, [{
key: 'render',
value: function render() {
var box = this.props.box;
if (!box) {
return this.props.children;
}
var style = {
borderTopWidth: box.top,
borderBottomWidth: box.bottom,
borderLeftWidth: box.left,
borderRightWidth: box.right
};
return React.createElement(
View,
{ style: [style, this.props.style], __source: {
fileName: _jsxFileName,
lineNumber: 30
}
},
this.props.children
);
}
}]);
return BorderBox;
}(React.Component);
module.exports = BorderBox;
}, 315, null, "BorderBox");
__d(/* resolveBoxStyle */function(global, require, module, exports) {
'use strict';
function resolveBoxStyle(prefix, style) {
var res = {};
var subs = ['top', 'left', 'bottom', 'right'];
var set = false;
subs.forEach(function (sub) {
res[sub] = style[prefix] || 0;
});
if (style[prefix]) {
set = true;
}
if (style[prefix + 'Vertical']) {
res.top = res.bottom = style[prefix + 'Vertical'];
set = true;
}
if (style[prefix + 'Horizontal']) {
res.left = res.right = style[prefix + 'Horizontal'];
set = true;
}
subs.forEach(function (sub) {
var val = style[prefix + capFirst(sub)];
if (val) {
res[sub] = val;
set = true;
}
});
if (!set) {
return;
}
return res;
}
function capFirst(text) {
return text[0].toUpperCase() + text.slice(1);
}
module.exports = resolveBoxStyle;
}, 316, null, "resolveBoxStyle");
__d(/* InspectorPanel */function(global, require, module, exports) {
'use strict';
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/node_modules/react-native/Libraries/Inspector/InspectorPanel.js';
var ElementProperties = require(318 ); // 318 = ElementProperties
var NetworkOverlay = require(326 ); // 326 = NetworkOverlay
var PerformanceOverlay = require(329 ); // 329 = PerformanceOverlay
var React = require(126 ); // 126 = React
var ScrollView = require(239 ); // 239 = ScrollView
var StyleSheet = require(127 ); // 127 = StyleSheet
var Text = require(210 ); // 210 = Text
var TouchableHighlight = require(321 ); // 321 = TouchableHighlight
var View = require(146 ); // 146 = View
var PropTypes = React.PropTypes;
var InspectorPanel = function (_React$Component) {
babelHelpers.inherits(InspectorPanel, _React$Component);
function InspectorPanel() {
babelHelpers.classCallCheck(this, InspectorPanel);
return babelHelpers.possibleConstructorReturn(this, (InspectorPanel.__proto__ || Object.getPrototypeOf(InspectorPanel)).apply(this, arguments));
}
babelHelpers.createClass(InspectorPanel, [{
key: 'renderWaiting',
value: function renderWaiting() {
if (this.props.inspecting) {
return React.createElement(
Text,
{ style: styles.waitingText, __source: {
fileName: _jsxFileName,
lineNumber: 30
}
},
'Tap something to inspect it'
);
}
return React.createElement(
Text,
{ style: styles.waitingText, __source: {
fileName: _jsxFileName,
lineNumber: 35
}
},
'Nothing is inspected'
);
}
}, {
key: 'render',
value: function render() {
var contents = void 0;
if (this.props.inspected) {
contents = React.createElement(
ScrollView,
{ style: styles.properties, __source: {
fileName: _jsxFileName,
lineNumber: 42
}
},
React.createElement(ElementProperties, {
style: this.props.inspected.style,
frame: this.props.inspected.frame,
source: this.props.inspected.source,
hierarchy: this.props.hierarchy,
selection: this.props.selection,
setSelection: this.props.setSelection,
__source: {
fileName: _jsxFileName,
lineNumber: 43
}
})
);
} else if (this.props.perfing) {
contents = React.createElement(PerformanceOverlay, {
__source: {
fileName: _jsxFileName,
lineNumber: 55
}
});
} else if (this.props.networking) {
contents = React.createElement(NetworkOverlay, {
__source: {
fileName: _jsxFileName,
lineNumber: 59
}
});
} else {
contents = React.createElement(
View,
{ style: styles.waiting, __source: {
fileName: _jsxFileName,
lineNumber: 63
}
},
this.renderWaiting()
);
}
return React.createElement(
View,
{ style: styles.container, __source: {
fileName: _jsxFileName,
lineNumber: 69
}
},
!this.props.devtoolsIsOpen && contents,
React.createElement(
View,
{ style: styles.buttonRow, __source: {
fileName: _jsxFileName,
lineNumber: 71
}
},
React.createElement(Button, {
title: 'Inspect',
pressed: this.props.inspecting,
onClick: this.props.setInspecting,
__source: {
fileName: _jsxFileName,
lineNumber: 72
}
}),
React.createElement(Button, { title: 'Perf',
pressed: this.props.perfing,
onClick: this.props.setPerfing,
__source: {
fileName: _jsxFileName,
lineNumber: 77
}
}),
React.createElement(Button, { title: 'Network',
pressed: this.props.networking,
onClick: this.props.setNetworking,
__source: {
fileName: _jsxFileName,
lineNumber: 81
}
}),
React.createElement(Button, { title: 'Touchables',
pressed: this.props.touchTargetting,
onClick: this.props.setTouchTargetting,
__source: {
fileName: _jsxFileName,
lineNumber: 85
}
})
)
);
}
}]);
return InspectorPanel;
}(React.Component);
InspectorPanel.propTypes = {
devtoolsIsOpen: PropTypes.bool,
inspecting: PropTypes.bool,
setInspecting: PropTypes.func,
inspected: PropTypes.object,
perfing: PropTypes.bool,
setPerfing: PropTypes.func,
touchTargetting: PropTypes.bool,
setTouchTargetting: PropTypes.func,
networking: PropTypes.bool,
setNetworking: PropTypes.func
};
var Button = function (_React$Component2) {
babelHelpers.inherits(Button, _React$Component2);
function Button() {
babelHelpers.classCallCheck(this, Button);
return babelHelpers.possibleConstructorReturn(this, (Button.__proto__ || Object.getPrototypeOf(Button)).apply(this, arguments));
}
babelHelpers.createClass(Button, [{
key: 'render',
value: function render() {
var _this3 = this;
return React.createElement(
TouchableHighlight,
{ onPress: function onPress() {
return _this3.props.onClick(!_this3.props.pressed);
}, style: [styles.button, this.props.pressed && styles.buttonPressed], __source: {
fileName: _jsxFileName,
lineNumber: 111
}
},
React.createElement(
Text,
{ style: styles.buttonText, __source: {
fileName: _jsxFileName,
lineNumber: 115
}
},
this.props.title
)
);
}
}]);
return Button;
}(React.Component);
var styles = StyleSheet.create({
buttonRow: {
flexDirection: 'row'
},
button: {
backgroundColor: 'rgba(0, 0, 0, 0.3)',
margin: 2,
height: 30,
justifyContent: 'center',
alignItems: 'center'
},
buttonPressed: {
backgroundColor: 'rgba(255, 255, 255, 0.3)'
},
buttonText: {
textAlign: 'center',
color: 'white',
margin: 5
},
container: {
backgroundColor: 'rgba(0, 0, 0, 0.7)'
},
properties: {
height: 200
},
waiting: {
height: 100
},
waitingText: {
fontSize: 20,
textAlign: 'center',
marginVertical: 20,
color: 'white'
}
});
module.exports = InspectorPanel;
}, 317, null, "InspectorPanel");
__d(/* ElementProperties */function(global, require, module, exports) {
'use strict';
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/node_modules/react-native/Libraries/Inspector/ElementProperties.js';
var BoxInspector = require(319 ); // 319 = BoxInspector
var React = require(126 ); // 126 = React
var StyleInspector = require(320 ); // 320 = StyleInspector
var StyleSheet = require(127 ); // 127 = StyleSheet
var Text = require(210 ); // 210 = Text
var TouchableHighlight = require(321 ); // 321 = TouchableHighlight
var TouchableWithoutFeedback = require(295 ); // 295 = TouchableWithoutFeedback
var View = require(146 ); // 146 = View
var flattenStyle = require(77 ); // 77 = flattenStyle
var mapWithSeparator = require(324 ); // 324 = mapWithSeparator
var openFileInEditor = require(325 ); // 325 = openFileInEditor
var PropTypes = React.PropTypes;
var ElementProperties = function (_React$Component) {
babelHelpers.inherits(ElementProperties, _React$Component);
function ElementProperties() {
babelHelpers.classCallCheck(this, ElementProperties);
return babelHelpers.possibleConstructorReturn(this, (ElementProperties.__proto__ || Object.getPrototypeOf(ElementProperties)).apply(this, arguments));
}
babelHelpers.createClass(ElementProperties, [{
key: 'render',
value: function render() {
var _this2 = this;
var style = flattenStyle(this.props.style);
var selection = this.props.selection;
var openFileButton = void 0;
var source = this.props.source;
var _ref = source || {},
fileName = _ref.fileName,
lineNumber = _ref.lineNumber;
if (fileName && lineNumber) {
var parts = fileName.split('/');
var fileNameShort = parts[parts.length - 1];
openFileButton = React.createElement(
TouchableHighlight,
{
style: styles.openButton,
onPress: openFileInEditor.bind(null, fileName, lineNumber), __source: {
fileName: _jsxFileName,
lineNumber: 63
}
},
React.createElement(
Text,
{ style: styles.openButtonTitle, numberOfLines: 1, __source: {
fileName: _jsxFileName,
lineNumber: 66
}
},
fileNameShort,
':',
lineNumber
)
);
}
return React.createElement(
TouchableWithoutFeedback,
{
__source: {
fileName: _jsxFileName,
lineNumber: 75
}
},
React.createElement(
View,
{ style: styles.info, __source: {
fileName: _jsxFileName,
lineNumber: 76
}
},
React.createElement(
View,
{ style: styles.breadcrumb, __source: {
fileName: _jsxFileName,
lineNumber: 77
}
},
mapWithSeparator(this.props.hierarchy, function (item, i) {
return React.createElement(
TouchableHighlight,
{
key: 'item-' + i,
style: [styles.breadItem, i === selection && styles.selected],
onPress: function onPress() {
return _this2.props.setSelection(i);
}, __source: {
fileName: _jsxFileName,
lineNumber: 81
}
},
React.createElement(
Text,
{ style: styles.breadItemText, __source: {
fileName: _jsxFileName,
lineNumber: 86
}
},
getInstanceName(item)
)
);
}, function (i) {
return React.createElement(
Text,
{ key: 'sep-' + i, style: styles.breadSep, __source: {
fileName: _jsxFileName,
lineNumber: 92
}
},
'\u25B8'
);
})
),
React.createElement(
View,
{ style: styles.row, __source: {
fileName: _jsxFileName,
lineNumber: 98
}
},
React.createElement(
View,
{ style: styles.col, __source: {
fileName: _jsxFileName,
lineNumber: 99
}
},
React.createElement(StyleInspector, { style: style, __source: {
fileName: _jsxFileName,
lineNumber: 100
}
}),
openFileButton
),
React.createElement(BoxInspector, { style: style, frame: this.props.frame, __source: {
fileName: _jsxFileName,
lineNumber: 105
}
})
)
)
);
}
}]);
return ElementProperties;
}(React.Component);
ElementProperties.propTypes = {
hierarchy: PropTypes.array.isRequired,
style: PropTypes.oneOfType([PropTypes.object, PropTypes.array, PropTypes.number]),
source: PropTypes.shape({
fileName: PropTypes.string,
lineNumber: PropTypes.number
})
};
function getInstanceName(instance) {
if (instance.getName) {
return instance.getName();
}
if (instance.constructor && instance.constructor.displayName) {
return instance.constructor.displayName;
}
return 'Unknown';
}
var styles = StyleSheet.create({
breadSep: {
fontSize: 8,
color: 'white'
},
breadcrumb: {
flexDirection: 'row',
flexWrap: 'wrap',
alignItems: 'flex-start',
marginBottom: 5
},
selected: {
borderColor: 'white',
borderRadius: 5
},
breadItem: {
borderWidth: 1,
borderColor: 'transparent',
marginHorizontal: 2
},
breadItemText: {
fontSize: 10,
color: 'white',
marginHorizontal: 5
},
row: {
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'space-between'
},
col: {
flex: 1
},
info: {
padding: 10
},
openButton: {
padding: 10,
backgroundColor: '#000',
marginVertical: 5,
marginRight: 5,
borderRadius: 2
},
openButtonTitle: {
color: 'white',
fontSize: 8
}
});
module.exports = ElementProperties;
}, 318, null, "ElementProperties");
__d(/* BoxInspector */function(global, require, module, exports) {
'use strict';
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/node_modules/react-native/Libraries/Inspector/BoxInspector.js';
var React = require(126 ); // 126 = React
var StyleSheet = require(127 ); // 127 = StyleSheet
var Text = require(210 ); // 210 = Text
var View = require(146 ); // 146 = View
var resolveBoxStyle = require(316 ); // 316 = resolveBoxStyle
var blank = {
top: 0,
left: 0,
right: 0,
bottom: 0
};
var BoxInspector = function (_React$Component) {
babelHelpers.inherits(BoxInspector, _React$Component);
function BoxInspector() {
babelHelpers.classCallCheck(this, BoxInspector);
return babelHelpers.possibleConstructorReturn(this, (BoxInspector.__proto__ || Object.getPrototypeOf(BoxInspector)).apply(this, arguments));
}
babelHelpers.createClass(BoxInspector, [{
key: 'render',
value: function render() {
var frame = this.props.frame;
var style = this.props.style;
var margin = style && resolveBoxStyle('margin', style) || blank;
var padding = style && resolveBoxStyle('padding', style) || blank;
return React.createElement(
BoxContainer,
{ title: 'margin', titleStyle: styles.marginLabel, box: margin, __source: {
fileName: _jsxFileName,
lineNumber: 34
}
},
React.createElement(
BoxContainer,
{ title: 'padding', box: padding, __source: {
fileName: _jsxFileName,
lineNumber: 35
}
},
React.createElement(
View,
{
__source: {
fileName: _jsxFileName,
lineNumber: 36
}
},
React.createElement(
Text,
{ style: styles.innerText, __source: {
fileName: _jsxFileName,
lineNumber: 37
}
},
'(',
frame.left,
', ',
frame.top,
')'
),
React.createElement(
Text,
{ style: styles.innerText, __source: {
fileName: _jsxFileName,
lineNumber: 40
}
},
frame.width,
' \xD7 ',
frame.height
)
)
)
);
}
}]);
return BoxInspector;
}(React.Component);
var BoxContainer = function (_React$Component2) {
babelHelpers.inherits(BoxContainer, _React$Component2);
function BoxContainer() {
babelHelpers.classCallCheck(this, BoxContainer);
return babelHelpers.possibleConstructorReturn(this, (BoxContainer.__proto__ || Object.getPrototypeOf(BoxContainer)).apply(this, arguments));
}
babelHelpers.createClass(BoxContainer, [{
key: 'render',
value: function render() {
var box = this.props.box;
return React.createElement(
View,
{ style: styles.box, __source: {
fileName: _jsxFileName,
lineNumber: 54
}
},
React.createElement(
View,
{ style: styles.row, __source: {
fileName: _jsxFileName,
lineNumber: 55
}
},
React.createElement(
Text,
{ style: [this.props.titleStyle, styles.label], __source: {
fileName: _jsxFileName,
lineNumber: 56
}
},
this.props.title
),
React.createElement(
Text,
{ style: styles.boxText, __source: {
fileName: _jsxFileName,
lineNumber: 57
}
},
box.top
)
),
React.createElement(
View,
{ style: styles.row, __source: {
fileName: _jsxFileName,
lineNumber: 59
}
},
React.createElement(
Text,
{ style: styles.boxText, __source: {
fileName: _jsxFileName,
lineNumber: 60
}
},
box.left
),
this.props.children,
React.createElement(
Text,
{ style: styles.boxText, __source: {
fileName: _jsxFileName,
lineNumber: 62
}
},
box.right
)
),
React.createElement(
Text,
{ style: styles.boxText, __source: {
fileName: _jsxFileName,
lineNumber: 64
}
},
box.bottom
)
);
}
}]);
return BoxContainer;
}(React.Component);
var styles = StyleSheet.create({
row: {
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'space-around'
},
marginLabel: {
width: 60
},
label: {
fontSize: 10,
color: 'rgb(255,100,0)',
marginLeft: 5,
flex: 1,
textAlign: 'left',
top: -3
},
buffer: {
fontSize: 10,
color: 'yellow',
flex: 1,
textAlign: 'center'
},
innerText: {
color: 'yellow',
fontSize: 12,
textAlign: 'center',
width: 70
},
box: {
borderWidth: 1,
borderColor: 'grey'
},
boxText: {
color: 'white',
fontSize: 12,
marginHorizontal: 3,
marginVertical: 2,
textAlign: 'center'
}
});
module.exports = BoxInspector;
}, 319, null, "BoxInspector");
__d(/* StyleInspector */function(global, require, module, exports) {
'use strict';
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/node_modules/react-native/Libraries/Inspector/StyleInspector.js';
var React = require(126 ); // 126 = React
var StyleSheet = require(127 ); // 127 = StyleSheet
var Text = require(210 ); // 210 = Text
var View = require(146 ); // 146 = View
var StyleInspector = function (_React$Component) {
babelHelpers.inherits(StyleInspector, _React$Component);
function StyleInspector() {
babelHelpers.classCallCheck(this, StyleInspector);
return babelHelpers.possibleConstructorReturn(this, (StyleInspector.__proto__ || Object.getPrototypeOf(StyleInspector)).apply(this, arguments));
}
babelHelpers.createClass(StyleInspector, [{
key: 'render',
value: function render() {
var _this2 = this;
if (!this.props.style) {
return React.createElement(
Text,
{ style: styles.noStyle, __source: {
fileName: _jsxFileName,
lineNumber: 22
}
},
'No style'
);
}
var names = Object.keys(this.props.style);
return React.createElement(
View,
{ style: styles.container, __source: {
fileName: _jsxFileName,
lineNumber: 26
}
},
React.createElement(
View,
{
__source: {
fileName: _jsxFileName,
lineNumber: 27
}
},
names.map(function (name) {
return React.createElement(
Text,
{ key: name, style: styles.attr, __source: {
fileName: _jsxFileName,
lineNumber: 28
}
},
name,
':'
);
})
),
React.createElement(
View,
{
__source: {
fileName: _jsxFileName,
lineNumber: 31
}
},
names.map(function (name) {
var value = typeof _this2.props.style[name] === 'object' ? JSON.stringify(_this2.props.style[name]) : _this2.props.style[name];
return React.createElement(
Text,
{ key: name, style: styles.value, __source: {
fileName: _jsxFileName,
lineNumber: 34
}
},
value
);
})
)
);
}
}]);
return StyleInspector;
}(React.Component);
var styles = StyleSheet.create({
container: {
flexDirection: 'row'
},
row: {
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'space-around'
},
attr: {
fontSize: 10,
color: '#ccc'
},
value: {
fontSize: 10,
color: 'white',
marginLeft: 10
},
noStyle: {
color: 'white',
fontSize: 10
}
});
module.exports = StyleInspector;
}, 320, null, "StyleInspector");
__d(/* TouchableHighlight */function(global, require, module, exports) {
'use strict';
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/node_modules/react-native/Libraries/Components/Touchable/TouchableHighlight.js';
var ColorPropType = require(71 ); // 71 = ColorPropType
var NativeMethodsMixin = require(73 ); // 73 = NativeMethodsMixin
var React = require(126 ); // 126 = React
var ReactNativeViewAttributes = require(152 ); // 152 = ReactNativeViewAttributes
var StyleSheet = require(127 ); // 127 = StyleSheet
var TimerMixin = require(294 ); // 294 = react-timer-mixin
var Touchable = require(211 ); // 211 = Touchable
var TouchableWithoutFeedback = require(295 ); // 295 = TouchableWithoutFeedback
var View = require(146 ); // 146 = View
var ensureComponentIsNative = require(322 ); // 322 = ensureComponentIsNative
var ensurePositiveDelayProps = require(296 ); // 296 = ensurePositiveDelayProps
var keyOf = require(323 ); // 323 = fbjs/lib/keyOf
var merge = require(149 ); // 149 = merge
var DEFAULT_PROPS = {
activeOpacity: 0.85,
underlayColor: 'black'
};
var PRESS_RETENTION_OFFSET = { top: 20, left: 20, right: 20, bottom: 30 };
var TouchableHighlight = React.createClass({
displayName: 'TouchableHighlight',
propTypes: babelHelpers.extends({}, TouchableWithoutFeedback.propTypes, {
activeOpacity: React.PropTypes.number,
underlayColor: ColorPropType,
style: View.propTypes.style,
onShowUnderlay: React.PropTypes.func,
onHideUnderlay: React.PropTypes.func,
hasTVPreferredFocus: React.PropTypes.bool,
tvParallaxProperties: React.PropTypes.object
}),
mixins: [NativeMethodsMixin, TimerMixin, Touchable.Mixin],
getDefaultProps: function getDefaultProps() {
return DEFAULT_PROPS;
},
_computeSyntheticState: function _computeSyntheticState(props) {
return {
activeProps: {
style: {
opacity: props.activeOpacity
}
},
activeUnderlayProps: {
style: {
backgroundColor: props.underlayColor
}
},
underlayStyle: [INACTIVE_UNDERLAY_PROPS.style, props.style],
hasTVPreferredFocus: props.hasTVPreferredFocus
};
},
getInitialState: function getInitialState() {
return merge(this.touchableGetInitialState(), this._computeSyntheticState(this.props));
},
componentDidMount: function componentDidMount() {
ensurePositiveDelayProps(this.props);
ensureComponentIsNative(this.refs[CHILD_REF]);
},
componentDidUpdate: function componentDidUpdate() {
ensureComponentIsNative(this.refs[CHILD_REF]);
},
componentWillReceiveProps: function componentWillReceiveProps(nextProps) {
ensurePositiveDelayProps(nextProps);
if (nextProps.activeOpacity !== this.props.activeOpacity || nextProps.underlayColor !== this.props.underlayColor || nextProps.style !== this.props.style) {
this.setState(this._computeSyntheticState(nextProps));
}
},
viewConfig: {
uiViewClassName: 'RCTView',
validAttributes: ReactNativeViewAttributes.RCTView
},
touchableHandleActivePressIn: function touchableHandleActivePressIn(e) {
this.clearTimeout(this._hideTimeout);
this._hideTimeout = null;
this._showUnderlay();
this.props.onPressIn && this.props.onPressIn(e);
},
touchableHandleActivePressOut: function touchableHandleActivePressOut(e) {
if (!this._hideTimeout) {
this._hideUnderlay();
}
this.props.onPressOut && this.props.onPressOut(e);
},
touchableHandlePress: function touchableHandlePress(e) {
this.clearTimeout(this._hideTimeout);
this._showUnderlay();
this._hideTimeout = this.setTimeout(this._hideUnderlay, this.props.delayPressOut || 100);
this.props.onPress && this.props.onPress(e);
},
touchableHandleLongPress: function touchableHandleLongPress(e) {
this.props.onLongPress && this.props.onLongPress(e);
},
touchableGetPressRectOffset: function touchableGetPressRectOffset() {
return this.props.pressRetentionOffset || PRESS_RETENTION_OFFSET;
},
touchableGetHitSlop: function touchableGetHitSlop() {
return this.props.hitSlop;
},
touchableGetHighlightDelayMS: function touchableGetHighlightDelayMS() {
return this.props.delayPressIn;
},
touchableGetLongPressDelayMS: function touchableGetLongPressDelayMS() {
return this.props.delayLongPress;
},
touchableGetPressOutDelayMS: function touchableGetPressOutDelayMS() {
return this.props.delayPressOut;
},
_showUnderlay: function _showUnderlay() {
if (!this.isMounted() || !this._hasPressHandler()) {
return;
}
this.refs[UNDERLAY_REF].setNativeProps(this.state.activeUnderlayProps);
this.refs[CHILD_REF].setNativeProps(this.state.activeProps);
this.props.onShowUnderlay && this.props.onShowUnderlay();
},
_hideUnderlay: function _hideUnderlay() {
this.clearTimeout(this._hideTimeout);
this._hideTimeout = null;
if (this._hasPressHandler() && this.refs[UNDERLAY_REF]) {
this.refs[CHILD_REF].setNativeProps(INACTIVE_CHILD_PROPS);
this.refs[UNDERLAY_REF].setNativeProps(babelHelpers.extends({}, INACTIVE_UNDERLAY_PROPS, {
style: this.state.underlayStyle
}));
this.props.onHideUnderlay && this.props.onHideUnderlay();
}
},
_hasPressHandler: function _hasPressHandler() {
return !!(this.props.onPress || this.props.onPressIn || this.props.onPressOut || this.props.onLongPress);
},
render: function render() {
return React.createElement(
View,
{
accessible: this.props.accessible !== false,
accessibilityLabel: this.props.accessibilityLabel,
accessibilityComponentType: this.props.accessibilityComponentType,
accessibilityTraits: this.props.accessibilityTraits,
ref: UNDERLAY_REF,
style: this.state.underlayStyle,
onLayout: this.props.onLayout,
hitSlop: this.props.hitSlop,
isTVSelectable: true,
tvParallaxProperties: this.props.tvParallaxProperties,
hasTVPreferredFocus: this.state.hasTVPreferredFocus,
onStartShouldSetResponder: this.touchableHandleStartShouldSetResponder,
onResponderTerminationRequest: this.touchableHandleResponderTerminationRequest,
onResponderGrant: this.touchableHandleResponderGrant,
onResponderMove: this.touchableHandleResponderMove,
onResponderRelease: this.touchableHandleResponderRelease,
onResponderTerminate: this.touchableHandleResponderTerminate,
testID: this.props.testID, __source: {
fileName: _jsxFileName,
lineNumber: 248
}
},
React.cloneElement(React.Children.only(this.props.children), {
ref: CHILD_REF
}),
Touchable.renderDebugView({ color: 'green', hitSlop: this.props.hitSlop })
);
}
});
var CHILD_REF = keyOf({ childRef: null });
var UNDERLAY_REF = keyOf({ underlayRef: null });
var INACTIVE_CHILD_PROPS = {
style: StyleSheet.create({ x: { opacity: 1.0 } }).x
};
var INACTIVE_UNDERLAY_PROPS = {
style: StyleSheet.create({ x: { backgroundColor: 'transparent' } }).x
};
module.exports = TouchableHighlight;
}, 321, null, "TouchableHighlight");
__d(/* ensureComponentIsNative */function(global, require, module, exports) {
'use strict';
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var ensureComponentIsNative = function ensureComponentIsNative(component) {
invariant(component && typeof component.setNativeProps === 'function', 'Touchable child must either be native or forward setNativeProps to a ' + 'native component');
};
module.exports = ensureComponentIsNative;
}, 322, null, "ensureComponentIsNative");
__d(/* fbjs/lib/keyOf.js */function(global, require, module, exports) {"use strict";
var keyOf = function keyOf(oneKeyObj) {
var key;
for (key in oneKeyObj) {
if (!oneKeyObj.hasOwnProperty(key)) {
continue;
}
return key;
}
return null;
};
module.exports = keyOf;
}, 323, null, "fbjs/lib/keyOf.js");
__d(/* mapWithSeparator */function(global, require, module, exports) {
'use strict';
function mapWithSeparator(items, itemRenderer, spacerRenderer) {
var mapped = [];
if (items.length > 0) {
mapped.push(itemRenderer(items[0], 0, items));
for (var ii = 1; ii < items.length; ii++) {
mapped.push(spacerRenderer(ii - 1), itemRenderer(items[ii], ii, items));
}
}
return mapped;
}
module.exports = mapWithSeparator;
}, 324, null, "mapWithSeparator");
__d(/* openFileInEditor */function(global, require, module, exports) {
'use strict';
var getDevServer = require(246 ); // 246 = getDevServer
function openFileInEditor(file, lineNumber) {
fetch(getDevServer().url + 'open-stack-frame', {
method: 'POST',
body: JSON.stringify({ file: file, lineNumber: lineNumber })
});
}
module.exports = openFileInEditor;
}, 325, null, "openFileInEditor");
__d(/* NetworkOverlay */function(global, require, module, exports) {
'use strict';
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/node_modules/react-native/Libraries/Inspector/NetworkOverlay.js';
var ListView = require(303 ); // 303 = ListView
var React = require(126 ); // 126 = React
var ScrollView = require(239 ); // 239 = ScrollView
var StyleSheet = require(127 ); // 127 = StyleSheet
var Text = require(210 ); // 210 = Text
var TouchableHighlight = require(321 ); // 321 = TouchableHighlight
var View = require(146 ); // 146 = View
var WebSocketInterceptor = require(327 ); // 327 = WebSocketInterceptor
var XHRInterceptor = require(328 ); // 328 = XHRInterceptor
var LISTVIEW_CELL_HEIGHT = 15;
var SEPARATOR_THICKNESS = 2;
var nextXHRId = 0;
var NetworkOverlay = function (_React$Component) {
babelHelpers.inherits(NetworkOverlay, _React$Component);
function NetworkOverlay(props) {
babelHelpers.classCallCheck(this, NetworkOverlay);
var _this = babelHelpers.possibleConstructorReturn(this, (NetworkOverlay.__proto__ || Object.getPrototypeOf(NetworkOverlay)).call(this, props));
_this._requests = [];
_this._detailViewItems = [];
_this._listViewDataSource = new ListView.DataSource({ rowHasChanged: function rowHasChanged(r1, r2) {
return r1 !== r2;
} });
_this.state = {
dataSource: _this._listViewDataSource.cloneWithRows([]),
newDetailInfo: false,
detailRowID: null
};
_this._listViewHighlighted = false;
_this._listViewHeight = 0;
_this._captureRequestListView = _this._captureRequestListView.bind(_this);
_this._captureDetailScrollView = _this._captureDetailScrollView.bind(_this);
_this._listViewOnLayout = _this._listViewOnLayout.bind(_this);
_this._renderRow = _this._renderRow.bind(_this);
_this._renderScrollComponent = _this._renderScrollComponent.bind(_this);
_this._closeButtonClicked = _this._closeButtonClicked.bind(_this);
_this._socketIdMap = {};
_this._xhrIdMap = {};
return _this;
}
babelHelpers.createClass(NetworkOverlay, [{
key: '_enableXHRInterception',
value: function _enableXHRInterception() {
var _this2 = this;
if (XHRInterceptor.isInterceptorEnabled()) {
return;
}
XHRInterceptor.setOpenCallback(function (method, url, xhr) {
xhr._index = nextXHRId++;
var xhrIndex = _this2._requests.length;
_this2._xhrIdMap[xhr._index] = xhrIndex;
var _xhr = {
'type': 'XMLHttpRequest',
'method': method,
'url': url
};
_this2._requests.push(_xhr);
_this2._detailViewItems.push([]);
_this2._genDetailViewItem(xhrIndex);
_this2.setState({ dataSource: _this2._listViewDataSource.cloneWithRows(_this2._requests) }, _this2._scrollToBottom());
});
XHRInterceptor.setRequestHeaderCallback(function (header, value, xhr) {
var xhrIndex = _this2._getRequestIndexByXHRID(xhr._index);
if (xhrIndex === -1) {
return;
}
var networkInfo = _this2._requests[xhrIndex];
if (!networkInfo.requestHeaders) {
networkInfo.requestHeaders = {};
}
networkInfo.requestHeaders[header] = value;
_this2._genDetailViewItem(xhrIndex);
});
XHRInterceptor.setSendCallback(function (data, xhr) {
var xhrIndex = _this2._getRequestIndexByXHRID(xhr._index);
if (xhrIndex === -1) {
return;
}
_this2._requests[xhrIndex].dataSent = data;
_this2._genDetailViewItem(xhrIndex);
});
XHRInterceptor.setHeaderReceivedCallback(function (type, size, responseHeaders, xhr) {
var xhrIndex = _this2._getRequestIndexByXHRID(xhr._index);
if (xhrIndex === -1) {
return;
}
var networkInfo = _this2._requests[xhrIndex];
networkInfo.responseContentType = type;
networkInfo.responseSize = size;
networkInfo.responseHeaders = responseHeaders;
_this2._genDetailViewItem(xhrIndex);
});
XHRInterceptor.setResponseCallback(function (status, timeout, response, responseURL, responseType, xhr) {
var xhrIndex = _this2._getRequestIndexByXHRID(xhr._index);
if (xhrIndex === -1) {
return;
}
var networkInfo = _this2._requests[xhrIndex];
networkInfo.status = status;
networkInfo.timeout = timeout;
networkInfo.response = response;
networkInfo.responseURL = responseURL;
networkInfo.responseType = responseType;
_this2._genDetailViewItem(xhrIndex);
});
XHRInterceptor.enableInterception();
}
}, {
key: '_enableWebSocketInterception',
value: function _enableWebSocketInterception() {
var _this3 = this;
if (WebSocketInterceptor.isInterceptorEnabled()) {
return;
}
WebSocketInterceptor.setConnectCallback(function (url, protocols, options, socketId) {
var socketIndex = _this3._requests.length;
_this3._socketIdMap[socketId] = socketIndex;
var _webSocket = {
'type': 'WebSocket',
'url': url,
'protocols': protocols
};
_this3._requests.push(_webSocket);
_this3._detailViewItems.push([]);
_this3._genDetailViewItem(socketIndex);
_this3.setState({ dataSource: _this3._listViewDataSource.cloneWithRows(_this3._requests) }, _this3._scrollToBottom());
});
WebSocketInterceptor.setCloseCallback(function (statusCode, closeReason, socketId) {
var socketIndex = _this3._socketIdMap[socketId];
if (socketIndex === undefined) {
return;
}
if (statusCode !== null && closeReason !== null) {
_this3._requests[socketIndex].status = statusCode;
_this3._requests[socketIndex].closeReason = closeReason;
}
_this3._genDetailViewItem(socketIndex);
});
WebSocketInterceptor.setSendCallback(function (data, socketId) {
var socketIndex = _this3._socketIdMap[socketId];
if (socketIndex === undefined) {
return;
}
if (!_this3._requests[socketIndex].messages) {
_this3._requests[socketIndex].messages = '';
}
_this3._requests[socketIndex].messages += 'Sent: ' + JSON.stringify(data) + '\n';
_this3._genDetailViewItem(socketIndex);
});
WebSocketInterceptor.setOnMessageCallback(function (socketId, message) {
var socketIndex = _this3._socketIdMap[socketId];
if (socketIndex === undefined) {
return;
}
if (!_this3._requests[socketIndex].messages) {
_this3._requests[socketIndex].messages = '';
}
_this3._requests[socketIndex].messages += 'Received: ' + JSON.stringify(message) + '\n';
_this3._genDetailViewItem(socketIndex);
});
WebSocketInterceptor.setOnCloseCallback(function (socketId, message) {
var socketIndex = _this3._socketIdMap[socketId];
if (socketIndex === undefined) {
return;
}
_this3._requests[socketIndex].serverClose = message;
_this3._genDetailViewItem(socketIndex);
});
WebSocketInterceptor.setOnErrorCallback(function (socketId, message) {
var socketIndex = _this3._socketIdMap[socketId];
if (socketIndex === undefined) {
return;
}
_this3._requests[socketIndex].serverError = message;
_this3._genDetailViewItem(socketIndex);
});
WebSocketInterceptor.enableInterception();
}
}, {
key: 'componentDidMount',
value: function componentDidMount() {
this._enableXHRInterception();
this._enableWebSocketInterception();
}
}, {
key: 'componentWillUnmount',
value: function componentWillUnmount() {
XHRInterceptor.disableInterception();
WebSocketInterceptor.disableInterception();
}
}, {
key: '_renderRow',
value: function _renderRow(rowData, sectionID, rowID, highlightRow) {
var _this4 = this;
var urlCellViewStyle = styles.urlEvenCellView;
var methodCellViewStyle = styles.methodEvenCellView;
if (rowID % 2 === 1) {
urlCellViewStyle = styles.urlOddCellView;
methodCellViewStyle = styles.methodOddCellView;
}
return React.createElement(
TouchableHighlight,
{ onPress: function onPress() {
_this4._pressRow(rowID);
highlightRow(sectionID, rowID);
}, __source: {
fileName: _jsxFileName,
lineNumber: 304
}
},
React.createElement(
View,
{
__source: {
fileName: _jsxFileName,
lineNumber: 308
}
},
React.createElement(
View,
{ style: styles.tableRow, __source: {
fileName: _jsxFileName,
lineNumber: 309
}
},
React.createElement(
View,
{ style: urlCellViewStyle, __source: {
fileName: _jsxFileName,
lineNumber: 310
}
},
React.createElement(
Text,
{ style: styles.cellText, numberOfLines: 1, __source: {
fileName: _jsxFileName,
lineNumber: 311
}
},
rowData.url
)
),
React.createElement(
View,
{ style: methodCellViewStyle, __source: {
fileName: _jsxFileName,
lineNumber: 315
}
},
React.createElement(
Text,
{ style: styles.cellText, numberOfLines: 1, __source: {
fileName: _jsxFileName,
lineNumber: 316
}
},
this._getTypeShortName(rowData.type)
)
)
)
)
);
}
}, {
key: '_renderSeperator',
value: function _renderSeperator(sectionID, rowID, adjacentRowHighlighted) {
return React.createElement(View, {
key: sectionID + '-' + rowID,
style: {
height: adjacentRowHighlighted ? SEPARATOR_THICKNESS : 0,
backgroundColor: adjacentRowHighlighted ? '#3B5998' : '#CCCCCC'
},
__source: {
fileName: _jsxFileName,
lineNumber: 331
}
});
}
}, {
key: '_scrollToBottom',
value: function _scrollToBottom() {
if (this._listView) {
var scrollResponder = this._listView.getScrollResponder();
if (scrollResponder) {
var scrollY = Math.max(this._requests.length * LISTVIEW_CELL_HEIGHT + (this._listViewHighlighted ? 2 * SEPARATOR_THICKNESS : 0) - this._listViewHeight, 0);
scrollResponder.scrollResponderScrollTo({
x: 0,
y: scrollY,
animated: true
});
}
}
}
}, {
key: '_captureRequestListView',
value: function _captureRequestListView(listRef) {
this._listView = listRef;
}
}, {
key: '_listViewOnLayout',
value: function _listViewOnLayout(event) {
var height = event.nativeEvent.layout.height;
this._listViewHeight = height;
}
}, {
key: '_pressRow',
value: function _pressRow(rowID) {
this._listViewHighlighted = true;
this.setState({ detailRowID: rowID }, this._scrollToTop());
}
}, {
key: '_scrollToTop',
value: function _scrollToTop() {
if (this._scrollView) {
this._scrollView.scrollTo({
y: 0,
animated: false
});
}
}
}, {
key: '_captureDetailScrollView',
value: function _captureDetailScrollView(scrollRef) {
this._scrollView = scrollRef;
}
}, {
key: '_closeButtonClicked',
value: function _closeButtonClicked() {
this.setState({ detailRowID: null });
}
}, {
key: '_getStringByValue',
value: function _getStringByValue(value) {
if (value === undefined) {
return 'undefined';
}
if (typeof value === 'object') {
return JSON.stringify(value);
}
if (typeof value === 'string' && value.length > 500) {
return String(value).substr(0, 500).concat('\n***TRUNCATED TO 500 CHARACTERS***');
}
return value;
}
}, {
key: '_getRequestIndexByXHRID',
value: function _getRequestIndexByXHRID(index) {
if (index === undefined) {
return -1;
}
var xhrIndex = this._xhrIdMap[index];
if (xhrIndex === undefined) {
return -1;
} else {
return xhrIndex;
}
}
}, {
key: '_getTypeShortName',
value: function _getTypeShortName(type) {
if (type === 'XMLHttpRequest') {
return 'XHR';
} else if (type === 'WebSocket') {
return 'WS';
}
return '';
}
}, {
key: '_genDetailViewItem',
value: function _genDetailViewItem(index) {
this._detailViewItems[index] = [];
var detailViewItem = this._detailViewItems[index];
var requestItem = this._requests[index];
for (var _key in requestItem) {
detailViewItem.push(React.createElement(
View,
{ style: styles.detailViewRow, key: _key, __source: {
fileName: _jsxFileName,
lineNumber: 446
}
},
React.createElement(
Text,
{ style: [styles.detailViewText, styles.detailKeyCellView], __source: {
fileName: _jsxFileName,
lineNumber: 447
}
},
_key
),
React.createElement(
Text,
{ style: [styles.detailViewText, styles.detailValueCellView], __source: {
fileName: _jsxFileName,
lineNumber: 450
}
},
this._getStringByValue(requestItem[_key])
)
));
}
if (this.state.detailRowID != null && Number(this.state.detailRowID) === index) {
this.setState({ newDetailInfo: true });
}
}
}, {
key: 'render',
value: function render() {
return React.createElement(
View,
{ style: styles.container, __source: {
fileName: _jsxFileName,
lineNumber: 465
}
},
this.state.detailRowID != null && React.createElement(
TouchableHighlight,
{
style: styles.closeButton,
onPress: this._closeButtonClicked, __source: {
fileName: _jsxFileName,
lineNumber: 467
}
},
React.createElement(
View,
{
__source: {
fileName: _jsxFileName,
lineNumber: 470
}
},
React.createElement(
Text,
{ style: styles.clostButtonText, __source: {
fileName: _jsxFileName,
lineNumber: 471
}
},
'v'
)
)
),
this.state.detailRowID != null && React.createElement(
ScrollView,
{
style: styles.detailScrollView,
ref: this._captureDetailScrollView, __source: {
fileName: _jsxFileName,
lineNumber: 475
}
},
this._detailViewItems[this.state.detailRowID]
),
React.createElement(
View,
{ style: styles.listViewTitle, __source: {
fileName: _jsxFileName,
lineNumber: 480
}
},
this._requests.length > 0 && React.createElement(
View,
{ style: styles.tableRow, __source: {
fileName: _jsxFileName,
lineNumber: 482
}
},
React.createElement(
View,
{ style: styles.urlTitleCellView, __source: {
fileName: _jsxFileName,
lineNumber: 483
}
},
React.createElement(
Text,
{ style: styles.cellText, numberOfLines: 1, __source: {
fileName: _jsxFileName,
lineNumber: 484
}
},
'URL'
)
),
React.createElement(
View,
{ style: styles.methodTitleCellView, __source: {
fileName: _jsxFileName,
lineNumber: 486
}
},
React.createElement(
Text,
{ style: styles.cellText, numberOfLines: 1, __source: {
fileName: _jsxFileName,
lineNumber: 487
}
},
'Type'
)
)
)
),
React.createElement(ListView, {
style: styles.listView,
ref: this._captureRequestListView,
dataSource: this.state.dataSource,
renderRow: this._renderRow,
enableEmptySections: true,
renderSeparator: this._renderSeperator,
onLayout: this._listViewOnLayout,
__source: {
fileName: _jsxFileName,
lineNumber: 491
}
})
);
}
}]);
return NetworkOverlay;
}(React.Component);
var styles = StyleSheet.create({
container: {
paddingTop: 10,
paddingBottom: 10,
paddingLeft: 5,
paddingRight: 5
},
listViewTitle: {
height: 20
},
listView: {
flex: 1,
height: 60
},
tableRow: {
flexDirection: 'row',
flex: 1
},
cellText: {
color: 'white',
fontSize: 12
},
methodTitleCellView: {
height: 18,
borderColor: '#DCD7CD',
borderTopWidth: 1,
borderBottomWidth: 1,
borderRightWidth: 1,
alignItems: 'center',
justifyContent: 'center',
backgroundColor: '#444',
flex: 1
},
urlTitleCellView: {
height: 18,
borderColor: '#DCD7CD',
borderTopWidth: 1,
borderBottomWidth: 1,
borderLeftWidth: 1,
borderRightWidth: 1,
justifyContent: 'center',
backgroundColor: '#444',
flex: 5,
paddingLeft: 3
},
methodOddCellView: {
height: 15,
borderColor: '#DCD7CD',
borderRightWidth: 1,
alignItems: 'center',
justifyContent: 'center',
backgroundColor: '#000',
flex: 1
},
urlOddCellView: {
height: 15,
borderColor: '#DCD7CD',
borderLeftWidth: 1,
borderRightWidth: 1,
justifyContent: 'center',
backgroundColor: '#000',
flex: 5,
paddingLeft: 3
},
methodEvenCellView: {
height: 15,
borderColor: '#DCD7CD',
borderRightWidth: 1,
alignItems: 'center',
justifyContent: 'center',
backgroundColor: '#888',
flex: 1
},
urlEvenCellView: {
height: 15,
borderColor: '#DCD7CD',
borderLeftWidth: 1,
borderRightWidth: 1,
justifyContent: 'center',
backgroundColor: '#888',
flex: 5,
paddingLeft: 3
},
detailScrollView: {
flex: 1,
height: 180,
marginTop: 5,
marginBottom: 5
},
detailKeyCellView: {
flex: 1.3
},
detailValueCellView: {
flex: 2
},
detailViewRow: {
flexDirection: 'row',
paddingHorizontal: 3
},
detailViewText: {
color: 'white',
fontSize: 11
},
clostButtonText: {
color: 'white',
fontSize: 10
},
closeButton: {
marginTop: 5,
backgroundColor: '#888',
justifyContent: 'center',
alignItems: 'center'
}
});
module.exports = NetworkOverlay;
}, 326, null, "NetworkOverlay");
__d(/* WebSocketInterceptor */function(global, require, module, exports) {
'use strict';
var RCTWebSocketModule = require(80 ).WebSocketModule; // 80 = NativeModules
var NativeEventEmitter = require(102 ); // 102 = NativeEventEmitter
var base64 = require(115 ); // 115 = base64-js
var originalRCTWebSocketConnect = RCTWebSocketModule.connect;
var originalRCTWebSocketSend = RCTWebSocketModule.send;
var originalRCTWebSocketSendBinary = RCTWebSocketModule.sendBinary;
var originalRCTWebSocketClose = RCTWebSocketModule.close;
var eventEmitter = void 0;
var subscriptions = void 0;
var closeCallback = void 0;
var sendCallback = void 0;
var connectCallback = void 0;
var onOpenCallback = void 0;
var onMessageCallback = void 0;
var onErrorCallback = void 0;
var onCloseCallback = void 0;
var _isInterceptorEnabled = false;
var WebSocketInterceptor = {
setCloseCallback: function setCloseCallback(callback) {
closeCallback = callback;
},
setSendCallback: function setSendCallback(callback) {
sendCallback = callback;
},
setConnectCallback: function setConnectCallback(callback) {
connectCallback = callback;
},
setOnOpenCallback: function setOnOpenCallback(callback) {
onOpenCallback = callback;
},
setOnMessageCallback: function setOnMessageCallback(callback) {
onMessageCallback = callback;
},
setOnErrorCallback: function setOnErrorCallback(callback) {
onErrorCallback = callback;
},
setOnCloseCallback: function setOnCloseCallback(callback) {
onCloseCallback = callback;
},
isInterceptorEnabled: function isInterceptorEnabled() {
return _isInterceptorEnabled;
},
_unregisterEvents: function _unregisterEvents() {
subscriptions.forEach(function (e) {
return e.remove();
});
subscriptions = [];
},
_registerEvents: function _registerEvents() {
subscriptions = [eventEmitter.addListener('websocketMessage', function (ev) {
if (onMessageCallback) {
onMessageCallback(ev.id, ev.type === 'binary' ? WebSocketInterceptor._arrayBufferToString(ev.data) : ev.data);
}
}), eventEmitter.addListener('websocketOpen', function (ev) {
if (onOpenCallback) {
onOpenCallback(ev.id);
}
}), eventEmitter.addListener('websocketClosed', function (ev) {
if (onCloseCallback) {
onCloseCallback(ev.id, { code: ev.code, reason: ev.reason });
}
}), eventEmitter.addListener('websocketFailed', function (ev) {
if (onErrorCallback) {
onErrorCallback(ev.id, { message: ev.message });
}
})];
},
enableInterception: function enableInterception() {
if (_isInterceptorEnabled) {
return;
}
eventEmitter = new NativeEventEmitter(RCTWebSocketModule);
WebSocketInterceptor._registerEvents();
RCTWebSocketModule.connect = function (url, protocols, options, socketId) {
if (connectCallback) {
connectCallback(url, protocols, options, socketId);
}
originalRCTWebSocketConnect.apply(this, arguments);
};
RCTWebSocketModule.send = function (data, socketId) {
if (sendCallback) {
sendCallback(data, socketId);
}
originalRCTWebSocketSend.apply(this, arguments);
};
RCTWebSocketModule.sendBinary = function (data, socketId) {
if (sendCallback) {
sendCallback(WebSocketInterceptor._arrayBufferToString(data), socketId);
}
originalRCTWebSocketSendBinary.apply(this, arguments);
};
RCTWebSocketModule.close = function () {
if (closeCallback) {
if (arguments.length === 3) {
closeCallback(arguments[0], arguments[1], arguments[2]);
} else {
closeCallback(null, null, arguments[0]);
}
}
originalRCTWebSocketClose.apply(this, arguments);
};
_isInterceptorEnabled = true;
},
_arrayBufferToString: function _arrayBufferToString(data) {
var value = base64.toByteArray(data).buffer;
if (value === undefined || value === null) {
return '(no value)';
}
if (typeof ArrayBuffer !== 'undefined' && typeof Uint8Array !== 'undefined' && value instanceof ArrayBuffer) {
return 'ArrayBuffer {' + String(Array.from(new Uint8Array(value))) + '}';
}
return value;
},
disableInterception: function disableInterception() {
if (!_isInterceptorEnabled) {
return;
}
_isInterceptorEnabled = false;
RCTWebSocketModule.send = originalRCTWebSocketSend;
RCTWebSocketModule.sendBinary = originalRCTWebSocketSendBinary;
RCTWebSocketModule.close = originalRCTWebSocketClose;
RCTWebSocketModule.connect = originalRCTWebSocketConnect;
connectCallback = null;
closeCallback = null;
sendCallback = null;
onOpenCallback = null;
onMessageCallback = null;
onCloseCallback = null;
onErrorCallback = null;
WebSocketInterceptor._unregisterEvents();
}
};
module.exports = WebSocketInterceptor;
}, 327, null, "WebSocketInterceptor");
__d(/* XHRInterceptor */function(global, require, module, exports) {
'use strict';
var XMLHttpRequest = require(259 ); // 259 = XMLHttpRequest
var originalXHROpen = XMLHttpRequest.prototype.open;
var originalXHRSend = XMLHttpRequest.prototype.send;
var originalXHRSetRequestHeader = XMLHttpRequest.prototype.setRequestHeader;
var openCallback;
var sendCallback;
var requestHeaderCallback;
var headerReceivedCallback;
var responseCallback;
var _isInterceptorEnabled = false;
var XHRInterceptor = {
setOpenCallback: function setOpenCallback(callback) {
openCallback = callback;
},
setSendCallback: function setSendCallback(callback) {
sendCallback = callback;
},
setHeaderReceivedCallback: function setHeaderReceivedCallback(callback) {
headerReceivedCallback = callback;
},
setResponseCallback: function setResponseCallback(callback) {
responseCallback = callback;
},
setRequestHeaderCallback: function setRequestHeaderCallback(callback) {
requestHeaderCallback = callback;
},
isInterceptorEnabled: function isInterceptorEnabled() {
return _isInterceptorEnabled;
},
enableInterception: function enableInterception() {
if (_isInterceptorEnabled) {
return;
}
XMLHttpRequest.prototype.open = function (method, url) {
if (openCallback) {
openCallback(method, url, this);
}
originalXHROpen.apply(this, arguments);
};
XMLHttpRequest.prototype.setRequestHeader = function (header, value) {
if (requestHeaderCallback) {
requestHeaderCallback(header, value, this);
}
originalXHRSetRequestHeader.apply(this, arguments);
};
XMLHttpRequest.prototype.send = function (data) {
var _this = this;
if (sendCallback) {
sendCallback(data, this);
}
if (this.addEventListener) {
this.addEventListener('readystatechange', function () {
if (!_isInterceptorEnabled) {
return;
}
if (_this.readyState === _this.HEADERS_RECEIVED) {
var contentTypeString = _this.getResponseHeader('Content-Type');
var contentLengthString = _this.getResponseHeader('Content-Length');
var responseContentType = void 0,
responseSize = void 0;
if (contentTypeString) {
responseContentType = contentTypeString.split(';')[0];
}
if (contentLengthString) {
responseSize = parseInt(contentLengthString, 10);
}
if (headerReceivedCallback) {
headerReceivedCallback(responseContentType, responseSize, _this.getAllResponseHeaders(), _this);
}
}
if (_this.readyState === _this.DONE) {
if (responseCallback) {
responseCallback(_this.status, _this.timeout, _this.response, _this.responseURL, _this.responseType, _this);
}
}
}, false);
}
originalXHRSend.apply(this, arguments);
};
_isInterceptorEnabled = true;
},
disableInterception: function disableInterception() {
if (!_isInterceptorEnabled) {
return;
}
_isInterceptorEnabled = false;
XMLHttpRequest.prototype.send = originalXHRSend;
XMLHttpRequest.prototype.open = originalXHROpen;
XMLHttpRequest.prototype.setRequestHeader = originalXHRSetRequestHeader;
responseCallback = null;
openCallback = null;
sendCallback = null;
headerReceivedCallback = null;
requestHeaderCallback = null;
}
};
module.exports = XHRInterceptor;
}, 328, null, "XHRInterceptor");
__d(/* PerformanceOverlay */function(global, require, module, exports) {
'use strict';
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/node_modules/react-native/Libraries/Inspector/PerformanceOverlay.js';
var PerformanceLogger = require(273 ); // 273 = PerformanceLogger
var React = require(126 ); // 126 = React
var StyleSheet = require(127 ); // 127 = StyleSheet
var Text = require(210 ); // 210 = Text
var View = require(146 ); // 146 = View
var PerformanceOverlay = function (_React$Component) {
babelHelpers.inherits(PerformanceOverlay, _React$Component);
function PerformanceOverlay() {
babelHelpers.classCallCheck(this, PerformanceOverlay);
return babelHelpers.possibleConstructorReturn(this, (PerformanceOverlay.__proto__ || Object.getPrototypeOf(PerformanceOverlay)).apply(this, arguments));
}
babelHelpers.createClass(PerformanceOverlay, [{
key: 'render',
value: function render() {
var perfLogs = PerformanceLogger.getTimespans();
var items = [];
for (var key in perfLogs) {
if (perfLogs[key].totalTime) {
var unit = key === 'BundleSize' ? 'b' : 'ms';
items.push(React.createElement(
View,
{ style: styles.row, key: key, __source: {
fileName: _jsxFileName,
lineNumber: 29
}
},
React.createElement(
Text,
{ style: [styles.text, styles.label], __source: {
fileName: _jsxFileName,
lineNumber: 30
}
},
key
),
React.createElement(
Text,
{ style: [styles.text, styles.totalTime], __source: {
fileName: _jsxFileName,
lineNumber: 31
}
},
perfLogs[key].totalTime + unit
)
));
}
}
return React.createElement(
View,
{ style: styles.container, __source: {
fileName: _jsxFileName,
lineNumber: 40
}
},
items
);
}
}]);
return PerformanceOverlay;
}(React.Component);
var styles = StyleSheet.create({
container: {
height: 100,
paddingTop: 10
},
label: {
flex: 1
},
row: {
flexDirection: 'row',
paddingHorizontal: 10
},
text: {
color: 'white',
fontSize: 12
},
totalTime: {
paddingRight: 100
}
});
module.exports = PerformanceOverlay;
}, 329, null, "PerformanceOverlay");
__d(/* YellowBox */function(global, require, module, exports) {
'use strict';
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/node_modules/react-native/Libraries/ReactNative/YellowBox.js';
var EventEmitter = require(103 ); // 103 = EventEmitter
var Platform = require(79 ); // 79 = Platform
var React = require(126 ); // 126 = React
var StyleSheet = require(127 ); // 127 = StyleSheet
var infoLog = require(229 ); // 229 = infoLog
var openFileInEditor = require(325 ); // 325 = openFileInEditor
var parseErrorStack = require(93 ); // 93 = parseErrorStack
var symbolicateStackTrace = require(245 ); // 245 = symbolicateStackTrace
var _warningEmitter = new EventEmitter();
var _warningMap = new Map();
if (__DEV__) {
var _console = console,
error = _console.error,
warn = _console.warn;
console.error = function () {
error.apply(console, arguments);
if (typeof arguments[0] === 'string' && arguments[0].startsWith('Warning: ')) {
updateWarningMap.apply(null, arguments);
}
};
console.warn = function () {
warn.apply(console, arguments);
if (typeof arguments[0] === 'string' && arguments[0].startsWith('(ADVICE)')) {
return;
}
updateWarningMap.apply(null, arguments);
};
if (Platform.isTesting) {
console.disableYellowBox = true;
}
}
function sprintf(format) {
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
args[_key - 1] = arguments[_key];
}
var index = 0;
return format.replace(/%s/g, function (match) {
return args[index++];
});
}
function updateWarningMap(format) {
if (console.disableYellowBox) {
return;
}
var stringifySafe = require(97 ); // 97 = stringifySafe
format = String(format);
var argCount = (format.match(/%s/g) || []).length;
for (var _len2 = arguments.length, args = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
args[_key2 - 1] = arguments[_key2];
}
var warning = [sprintf.apply(undefined, [format].concat(babelHelpers.toConsumableArray(args.slice(0, argCount))))].concat(babelHelpers.toConsumableArray(args.slice(argCount).map(stringifySafe))).join(' ');
var warningInfo = _warningMap.get(warning);
if (warningInfo) {
warningInfo.count += 1;
} else {
var _error = new Error();
_error.framesToPop = 2;
_warningMap.set(warning, {
count: 1,
stacktrace: parseErrorStack(_error),
symbolicated: false
});
}
_warningEmitter.emit('warning', _warningMap);
}
function ensureSymbolicatedWarning(warning) {
var prevWarningInfo = _warningMap.get(warning);
if (!prevWarningInfo || prevWarningInfo.symbolicated) {
return;
}
prevWarningInfo.symbolicated = true;
symbolicateStackTrace(prevWarningInfo.stacktrace).then(function (stack) {
var nextWarningInfo = _warningMap.get(warning);
if (nextWarningInfo) {
nextWarningInfo.stacktrace = stack;
_warningEmitter.emit('warning', _warningMap);
}
}, function (error) {
var nextWarningInfo = _warningMap.get(warning);
if (nextWarningInfo) {
infoLog('Failed to symbolicate warning, "%s":', warning, error);
_warningEmitter.emit('warning', _warningMap);
}
});
}
function isWarningIgnored(warning) {
return Array.isArray(console.ignoredYellowBox) && console.ignoredYellowBox.some(function (ignorePrefix) {
return warning.startsWith(String(ignorePrefix));
});
}
var WarningRow = function WarningRow(_ref) {
var count = _ref.count,
warning = _ref.warning,
onPress = _ref.onPress;
var Text = require(210 ); // 210 = Text
var TouchableHighlight = require(321 ); // 321 = TouchableHighlight
var View = require(146 ); // 146 = View
var countText = count > 1 ? React.createElement(
Text,
{ style: styles.listRowCount, __source: {
fileName: _jsxFileName,
lineNumber: 170
}
},
'(' + count + ') '
) : null;
return React.createElement(
View,
{ style: styles.listRow, __source: {
fileName: _jsxFileName,
lineNumber: 174
}
},
React.createElement(
TouchableHighlight,
{
activeOpacity: 0.5,
onPress: onPress,
style: styles.listRowContent,
underlayColor: 'transparent', __source: {
fileName: _jsxFileName,
lineNumber: 175
}
},
React.createElement(
Text,
{ style: styles.listRowText, numberOfLines: 2, __source: {
fileName: _jsxFileName,
lineNumber: 180
}
},
countText,
warning
)
)
);
};
var StackRow = function StackRow(_ref2) {
var frame = _ref2.frame;
var Text = require(210 ); // 210 = Text
var TouchableHighlight = require(321 ); // 321 = TouchableHighlight
var file = frame.file,
lineNumber = frame.lineNumber;
var fileParts = file.split('/');
var fileName = fileParts[fileParts.length - 1];
return React.createElement(
TouchableHighlight,
{
activeOpacity: 0.5,
style: styles.openInEditorButton,
underlayColor: 'transparent',
onPress: openFileInEditor.bind(null, file, lineNumber), __source: {
fileName: _jsxFileName,
lineNumber: 198
}
},
React.createElement(
Text,
{ style: styles.inspectorCountText, __source: {
fileName: _jsxFileName,
lineNumber: 203
}
},
fileName,
':',
lineNumber
)
);
};
var WarningInspector = function WarningInspector(_ref3) {
var warningInfo = _ref3.warningInfo,
warning = _ref3.warning,
stacktraceVisible = _ref3.stacktraceVisible,
onDismiss = _ref3.onDismiss,
onDismissAll = _ref3.onDismissAll,
onMinimize = _ref3.onMinimize,
toggleStacktrace = _ref3.toggleStacktrace;
var ScrollView = require(239 ); // 239 = ScrollView
var Text = require(210 ); // 210 = Text
var TouchableHighlight = require(321 ); // 321 = TouchableHighlight
var View = require(146 ); // 146 = View
var _ref4 = warningInfo || {},
count = _ref4.count,
stacktrace = _ref4.stacktrace;
var countSentence = 'Warning encountered ' + count + ' time' + (count - 1 ? 's' : '') + '.';
var stacktraceList = void 0;
if (stacktraceVisible && stacktrace) {
stacktraceList = React.createElement(
View,
{ style: styles.stacktraceList, __source: {
fileName: _jsxFileName,
lineNumber: 231
}
},
stacktrace.map(function (frame, ii) {
return React.createElement(StackRow, { frame: frame, key: ii, __source: {
fileName: _jsxFileName,
lineNumber: 232
}
});
})
);
}
return React.createElement(
View,
{ style: styles.inspector, __source: {
fileName: _jsxFileName,
lineNumber: 238
}
},
React.createElement(
View,
{ style: styles.inspectorCount, __source: {
fileName: _jsxFileName,
lineNumber: 239
}
},
React.createElement(
Text,
{ style: styles.inspectorCountText, __source: {
fileName: _jsxFileName,
lineNumber: 240
}
},
countSentence
),
React.createElement(
TouchableHighlight,
{ onPress: toggleStacktrace, underlayColor: 'transparent', __source: {
fileName: _jsxFileName,
lineNumber: 241
}
},
React.createElement(
Text,
{ style: styles.inspectorButtonText, __source: {
fileName: _jsxFileName,
lineNumber: 242
}
},
stacktraceVisible ? '▼' : '▶',
' Stacktrace'
)
)
),
React.createElement(
ScrollView,
{ style: styles.inspectorWarning, __source: {
fileName: _jsxFileName,
lineNumber: 247
}
},
stacktraceList,
React.createElement(
Text,
{ style: styles.inspectorWarningText, __source: {
fileName: _jsxFileName,
lineNumber: 249
}
},
warning
)
),
React.createElement(
View,
{ style: styles.inspectorButtons, __source: {
fileName: _jsxFileName,
lineNumber: 251
}
},
React.createElement(
TouchableHighlight,
{
activeOpacity: 0.5,
onPress: onMinimize,
style: styles.inspectorButton,
underlayColor: 'transparent', __source: {
fileName: _jsxFileName,
lineNumber: 252
}
},
React.createElement(
Text,
{ style: styles.inspectorButtonText, __source: {
fileName: _jsxFileName,
lineNumber: 257
}
},
'Minimize'
)
),
React.createElement(
TouchableHighlight,
{
activeOpacity: 0.5,
onPress: onDismiss,
style: styles.inspectorButton,
underlayColor: 'transparent', __source: {
fileName: _jsxFileName,
lineNumber: 261
}
},
React.createElement(
Text,
{ style: styles.inspectorButtonText, __source: {
fileName: _jsxFileName,
lineNumber: 266
}
},
'Dismiss'
)
),
React.createElement(
TouchableHighlight,
{
activeOpacity: 0.5,
onPress: onDismissAll,
style: styles.inspectorButton,
underlayColor: 'transparent', __source: {
fileName: _jsxFileName,
lineNumber: 270
}
},
React.createElement(
Text,
{ style: styles.inspectorButtonText, __source: {
fileName: _jsxFileName,
lineNumber: 275
}
},
'Dismiss All'
)
)
)
);
};
var YellowBox = function (_React$Component) {
babelHelpers.inherits(YellowBox, _React$Component);
function YellowBox(props, context) {
babelHelpers.classCallCheck(this, YellowBox);
var _this = babelHelpers.possibleConstructorReturn(this, (YellowBox.__proto__ || Object.getPrototypeOf(YellowBox)).call(this, props, context));
_this.state = {
inspecting: null,
stacktraceVisible: false,
warningMap: _warningMap
};
_this.dismissWarning = function (warning) {
var _this$state = _this.state,
inspecting = _this$state.inspecting,
warningMap = _this$state.warningMap;
if (warning) {
warningMap.delete(warning);
} else {
warningMap.clear();
}
_this.setState({
inspecting: warning && inspecting !== warning ? inspecting : null,
warningMap: warningMap
});
};
return _this;
}
babelHelpers.createClass(YellowBox, [{
key: 'componentDidMount',
value: function componentDidMount() {
var _this2 = this;
var scheduled = null;
this._listener = _warningEmitter.addListener('warning', function (warningMap) {
scheduled = scheduled || setImmediate(function () {
scheduled = null;
_this2.setState({
warningMap: warningMap
});
});
});
}
}, {
key: 'componentDidUpdate',
value: function componentDidUpdate() {
var inspecting = this.state.inspecting;
if (inspecting != null) {
ensureSymbolicatedWarning(inspecting);
}
}
}, {
key: 'componentWillUnmount',
value: function componentWillUnmount() {
if (this._listener) {
this._listener.remove();
}
}
}, {
key: 'render',
value: function render() {
var _this3 = this;
if (console.disableYellowBox || this.state.warningMap.size === 0) {
return null;
}
var ScrollView = require(239 ); // 239 = ScrollView
var View = require(146 ); // 146 = View
var _state = this.state,
inspecting = _state.inspecting,
stacktraceVisible = _state.stacktraceVisible;
var inspector = inspecting !== null ? React.createElement(WarningInspector, {
warningInfo: this.state.warningMap.get(inspecting),
warning: inspecting,
stacktraceVisible: stacktraceVisible,
onDismiss: function onDismiss() {
return _this3.dismissWarning(inspecting);
},
onDismissAll: function onDismissAll() {
return _this3.dismissWarning(null);
},
onMinimize: function onMinimize() {
return _this3.setState({ inspecting: null });
},
toggleStacktrace: function toggleStacktrace() {
return _this3.setState({ stacktraceVisible: !stacktraceVisible });
},
__source: {
fileName: _jsxFileName,
lineNumber: 350
}
}) : null;
var rows = [];
this.state.warningMap.forEach(function (warningInfo, warning) {
if (!isWarningIgnored(warning)) {
rows.push(React.createElement(WarningRow, {
key: warning,
count: warningInfo.count,
warning: warning,
onPress: function onPress() {
return _this3.setState({ inspecting: warning });
},
onDismiss: function onDismiss() {
return _this3.dismissWarning(warning);
},
__source: {
fileName: _jsxFileName,
lineNumber: 365
}
}));
}
});
var listStyle = [styles.list, { height: Math.min(rows.length, 4.4) * (rowGutter + rowHeight) }];
return React.createElement(
View,
{ style: inspector ? styles.fullScreen : listStyle, __source: {
fileName: _jsxFileName,
lineNumber: 382
}
},
React.createElement(
ScrollView,
{ style: listStyle, scrollsToTop: false, __source: {
fileName: _jsxFileName,
lineNumber: 383
}
},
rows
),
inspector
);
}
}]);
return YellowBox;
}(React.Component);
var backgroundColor = function backgroundColor(opacity) {
return 'rgba(250, 186, 48, ' + opacity + ')';
};
var textColor = 'white';
var rowGutter = 1;
var rowHeight = 46;
var elevation = Platform.OS === 'android' ? Number.MAX_SAFE_INTEGER : undefined;
var styles = StyleSheet.create({
fullScreen: {
backgroundColor: 'transparent',
position: 'absolute',
left: 0,
right: 0,
top: 0,
bottom: 0,
elevation: elevation
},
inspector: {
backgroundColor: backgroundColor(0.95),
flex: 1,
paddingTop: 5,
elevation: elevation
},
inspectorButtons: {
flexDirection: 'row'
},
inspectorButton: {
flex: 1,
paddingVertical: 22,
backgroundColor: backgroundColor(1)
},
stacktraceList: {
paddingBottom: 5
},
inspectorButtonText: {
color: textColor,
fontSize: 14,
opacity: 0.8,
textAlign: 'center'
},
openInEditorButton: {
paddingTop: 5,
paddingBottom: 5
},
inspectorCount: {
padding: 15,
paddingBottom: 0,
flexDirection: 'row',
justifyContent: 'space-between'
},
inspectorCountText: {
color: textColor,
fontSize: 14
},
inspectorWarning: {
flex: 1,
paddingHorizontal: 15
},
inspectorWarningText: {
color: textColor,
fontSize: 16,
fontWeight: '600'
},
list: {
backgroundColor: 'transparent',
position: 'absolute',
left: 0,
right: 0,
bottom: 0,
elevation: elevation
},
listRow: {
position: 'relative',
backgroundColor: backgroundColor(0.95),
flex: 1,
height: rowHeight,
marginTop: rowGutter
},
listRowContent: {
flex: 1
},
listRowCount: {
color: 'rgba(255, 255, 255, 0.5)'
},
listRowText: {
color: textColor,
position: 'absolute',
left: 0,
top: Platform.OS === 'android' ? 5 : 7,
marginLeft: 15,
marginRight: 15
}
});
module.exports = YellowBox;
}, 330, null, "YellowBox");
__d(/* I18nManager */function(global, require, module, exports) {
'use strict';
var I18nManager = require(80 ).I18nManager || { // 80 = NativeModules
isRTL: false,
allowRTL: function allowRTL() {},
forceRTL: function forceRTL() {}
};
module.exports = I18nManager;
}, 331, null, "I18nManager");
__d(/* Navigator */function(global, require, module, exports) {
'use strict';
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/node_modules/react-native/Libraries/CustomComponents/Navigator/Navigator.js';
var AnimationsDebugModule = require(80 ).AnimationsDebugModule; // 80 = NativeModules
var Dimensions = require(129 ); // 129 = Dimensions
var InteractionMixin = require(333 ); // 333 = InteractionMixin
var NavigationContext = require(334 ); // 334 = NavigationContext
var NavigatorBreadcrumbNavigationBar = require(339 ); // 339 = NavigatorBreadcrumbNavigationBar
var NavigatorNavigationBar = require(344 ); // 344 = NavigatorNavigationBar
var NavigatorSceneConfigs = require(345 ); // 345 = NavigatorSceneConfigs
var PanResponder = require(346 ); // 346 = PanResponder
var React = require(126 ); // 126 = React
var StyleSheet = require(127 ); // 127 = StyleSheet
var Subscribable = require(292 ); // 292 = Subscribable
var TVEventHandler = require(214 ); // 214 = TVEventHandler
var TimerMixin = require(294 ); // 294 = react-timer-mixin
var View = require(146 ); // 146 = View
var clamp = require(348 ); // 348 = clamp
var flattenStyle = require(77 ); // 77 = flattenStyle
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var rebound = require(349 ); // 349 = rebound
var PropTypes = React.PropTypes;
var SCREEN_WIDTH = Dimensions.get('window').width;
var SCREEN_HEIGHT = Dimensions.get('window').height;
var SCENE_DISABLED_NATIVE_PROPS = {
pointerEvents: 'none',
style: {
top: SCREEN_HEIGHT,
bottom: -SCREEN_HEIGHT,
opacity: 0
}
};
var __uid = 0;
function getuid() {
return __uid++;
}
function getRouteID(route) {
if (route === null || typeof route !== 'object') {
return String(route);
}
var key = '__navigatorRouteID';
if (!route.hasOwnProperty(key)) {
Object.defineProperty(route, key, {
enumerable: false,
configurable: false,
writable: false,
value: getuid()
});
}
return route[key];
}
var styles = StyleSheet.create({
container: {
flex: 1,
overflow: 'hidden'
},
defaultSceneStyle: {
position: 'absolute',
left: 0,
right: 0,
bottom: 0,
top: 0,
transform: [{ translateX: 0 }, { translateY: 0 }, { scaleX: 1 }, { scaleY: 1 }, { rotate: '0deg' }, { skewX: '0deg' }, { skewY: '0deg' }]
},
baseScene: {
position: 'absolute',
overflow: 'hidden',
left: 0,
right: 0,
bottom: 0,
top: 0
},
disabledScene: {
top: SCREEN_HEIGHT,
bottom: -SCREEN_HEIGHT
},
transitioner: {
flex: 1,
backgroundColor: 'transparent',
overflow: 'hidden'
}
});
var GESTURE_ACTIONS = ['pop', 'jumpBack', 'jumpForward'];
var Navigator = React.createClass({
displayName: 'Navigator',
propTypes: {
configureScene: PropTypes.func,
renderScene: PropTypes.func.isRequired,
initialRoute: PropTypes.object,
initialRouteStack: PropTypes.arrayOf(PropTypes.object),
onWillFocus: PropTypes.func,
onDidFocus: PropTypes.func,
navigationBar: PropTypes.node,
navigator: PropTypes.object,
sceneStyle: View.propTypes.style
},
statics: {
BreadcrumbNavigationBar: NavigatorBreadcrumbNavigationBar,
NavigationBar: NavigatorNavigationBar,
SceneConfigs: NavigatorSceneConfigs
},
mixins: [TimerMixin, InteractionMixin, Subscribable.Mixin],
getDefaultProps: function getDefaultProps() {
return {
configureScene: function configureScene() {
return NavigatorSceneConfigs.PushFromRight;
},
sceneStyle: styles.defaultSceneStyle
};
},
getInitialState: function getInitialState() {
var _this = this;
this._navigationBarNavigator = this.props.navigationBarNavigator || this;
this._renderedSceneMap = new Map();
this._sceneRefs = [];
var routeStack = this.props.initialRouteStack || [this.props.initialRoute];
invariant(routeStack.length >= 1, 'Navigator requires props.initialRoute or props.initialRouteStack.');
var initialRouteIndex = routeStack.length - 1;
if (this.props.initialRoute) {
initialRouteIndex = routeStack.indexOf(this.props.initialRoute);
invariant(initialRouteIndex !== -1, 'initialRoute is not in initialRouteStack.');
}
return {
sceneConfigStack: routeStack.map(function (route) {
return _this.props.configureScene(route, routeStack);
}),
routeStack: routeStack,
presentedIndex: initialRouteIndex,
transitionFromIndex: null,
activeGesture: null,
pendingGestureProgress: null,
transitionQueue: []
};
},
componentWillMount: function componentWillMount() {
var _this2 = this;
this.__defineGetter__('navigationContext', this._getNavigationContext);
this._subRouteFocus = [];
this.parentNavigator = this.props.navigator;
this._handlers = {};
this.springSystem = new rebound.SpringSystem();
this.spring = this.springSystem.createSpring();
this.spring.setRestSpeedThreshold(0.05);
this.spring.setCurrentValue(0).setAtRest();
this.spring.addListener({
onSpringEndStateChange: function onSpringEndStateChange() {
if (!_this2._interactionHandle) {
_this2._interactionHandle = _this2.createInteractionHandle();
}
},
onSpringUpdate: function onSpringUpdate() {
_this2._handleSpringUpdate();
},
onSpringAtRest: function onSpringAtRest() {
_this2._completeTransition();
}
});
this.panGesture = PanResponder.create({
onMoveShouldSetPanResponder: this._handleMoveShouldSetPanResponder,
onPanResponderRelease: this._handlePanResponderRelease,
onPanResponderMove: this._handlePanResponderMove,
onPanResponderTerminate: this._handlePanResponderTerminate
});
this._interactionHandle = null;
this._emitWillFocus(this.state.routeStack[this.state.presentedIndex]);
},
componentDidMount: function componentDidMount() {
this._handleSpringUpdate();
this._emitDidFocus(this.state.routeStack[this.state.presentedIndex]);
this._enableTVEventHandler();
},
componentWillUnmount: function componentWillUnmount() {
if (this._navigationContext) {
this._navigationContext.dispose();
this._navigationContext = null;
}
this.spring.destroy();
if (this._interactionHandle) {
this.clearInteractionHandle(this._interactionHandle);
}
this._disableTVEventHandler();
},
immediatelyResetRouteStack: function immediatelyResetRouteStack(nextRouteStack) {
var _this3 = this;
var destIndex = nextRouteStack.length - 1;
this._emitWillFocus(nextRouteStack[destIndex]);
this.setState({
routeStack: nextRouteStack,
sceneConfigStack: nextRouteStack.map(function (route) {
return _this3.props.configureScene(route, nextRouteStack);
}),
presentedIndex: destIndex,
activeGesture: null,
transitionFromIndex: null,
transitionQueue: []
}, function () {
_this3._handleSpringUpdate();
var navBar = _this3._navBar;
if (navBar && navBar.immediatelyRefresh) {
navBar.immediatelyRefresh();
}
_this3._emitDidFocus(_this3.state.routeStack[_this3.state.presentedIndex]);
});
},
_transitionTo: function _transitionTo(destIndex, velocity, jumpSpringTo, cb) {
if (this.state.presentedIndex === destIndex) {
cb && cb();
return;
}
if (this.state.transitionFromIndex !== null) {
this.state.transitionQueue.push({
destIndex: destIndex,
velocity: velocity,
cb: cb
});
return;
}
this.state.transitionFromIndex = this.state.presentedIndex;
this.state.presentedIndex = destIndex;
this.state.transitionCb = cb;
this._onAnimationStart();
if (AnimationsDebugModule) {
AnimationsDebugModule.startRecordingFps();
}
var sceneConfig = this.state.sceneConfigStack[this.state.transitionFromIndex] || this.state.sceneConfigStack[this.state.presentedIndex];
invariant(sceneConfig, 'Cannot configure scene at index ' + this.state.transitionFromIndex);
if (jumpSpringTo != null) {
this.spring.setCurrentValue(jumpSpringTo);
}
this.spring.setOvershootClampingEnabled(true);
this.spring.getSpringConfig().friction = sceneConfig.springFriction;
this.spring.getSpringConfig().tension = sceneConfig.springTension;
this.spring.setVelocity(velocity || sceneConfig.defaultTransitionVelocity);
this.spring.setEndValue(1);
},
_handleSpringUpdate: function _handleSpringUpdate() {
if (!this.isMounted()) {
return;
}
if (this.state.transitionFromIndex != null) {
this._transitionBetween(this.state.transitionFromIndex, this.state.presentedIndex, this.spring.getCurrentValue());
} else if (this.state.activeGesture != null) {
var presentedToIndex = this.state.presentedIndex + this._deltaForGestureAction(this.state.activeGesture);
this._transitionBetween(this.state.presentedIndex, presentedToIndex, this.spring.getCurrentValue());
}
},
_completeTransition: function _completeTransition() {
if (!this.isMounted()) {
return;
}
if (this.spring.getCurrentValue() !== 1 && this.spring.getCurrentValue() !== 0) {
if (this.state.pendingGestureProgress) {
this.state.pendingGestureProgress = null;
}
return;
}
this._onAnimationEnd();
var presentedIndex = this.state.presentedIndex;
var didFocusRoute = this._subRouteFocus[presentedIndex] || this.state.routeStack[presentedIndex];
if (AnimationsDebugModule) {
AnimationsDebugModule.stopRecordingFps(Date.now());
}
this.state.transitionFromIndex = null;
this.spring.setCurrentValue(0).setAtRest();
this._hideScenes();
if (this.state.transitionCb) {
this.state.transitionCb();
this.state.transitionCb = null;
}
this._emitDidFocus(didFocusRoute);
if (this._interactionHandle) {
this.clearInteractionHandle(this._interactionHandle);
this._interactionHandle = null;
}
if (this.state.pendingGestureProgress) {
var gestureToIndex = this.state.presentedIndex + this._deltaForGestureAction(this.state.activeGesture);
this._enableScene(gestureToIndex);
this.spring.setEndValue(this.state.pendingGestureProgress);
return;
}
if (this.state.transitionQueue.length) {
var queuedTransition = this.state.transitionQueue.shift();
this._enableScene(queuedTransition.destIndex);
this._emitWillFocus(this.state.routeStack[queuedTransition.destIndex]);
this._transitionTo(queuedTransition.destIndex, queuedTransition.velocity, null, queuedTransition.cb);
}
},
_emitDidFocus: function _emitDidFocus(route) {
this.navigationContext.emit('didfocus', { route: route });
if (this.props.onDidFocus) {
this.props.onDidFocus(route);
}
},
_emitWillFocus: function _emitWillFocus(route) {
this.navigationContext.emit('willfocus', { route: route });
var navBar = this._navBar;
if (navBar && navBar.handleWillFocus) {
navBar.handleWillFocus(route);
}
if (this.props.onWillFocus) {
this.props.onWillFocus(route);
}
},
_hideScenes: function _hideScenes() {
var gesturingToIndex = null;
if (this.state.activeGesture) {
gesturingToIndex = this.state.presentedIndex + this._deltaForGestureAction(this.state.activeGesture);
}
for (var i = 0; i < this.state.routeStack.length; i++) {
if (i === this.state.presentedIndex || i === this.state.transitionFromIndex || i === gesturingToIndex) {
continue;
}
this._disableScene(i);
}
},
_disableScene: function _disableScene(sceneIndex) {
this._sceneRefs[sceneIndex] && this._sceneRefs[sceneIndex].setNativeProps(SCENE_DISABLED_NATIVE_PROPS);
},
_enableScene: function _enableScene(sceneIndex) {
var sceneStyle = flattenStyle([styles.baseScene, this.props.sceneStyle]);
var enabledSceneNativeProps = {
pointerEvents: 'auto',
style: {
top: sceneStyle.top,
bottom: sceneStyle.bottom
}
};
if (sceneIndex !== this.state.transitionFromIndex && sceneIndex !== this.state.presentedIndex) {
enabledSceneNativeProps.style.opacity = 0;
}
this._sceneRefs[sceneIndex] && this._sceneRefs[sceneIndex].setNativeProps(enabledSceneNativeProps);
},
_clearTransformations: function _clearTransformations(sceneIndex) {
var defaultStyle = flattenStyle([styles.defaultSceneStyle]);
this._sceneRefs[sceneIndex].setNativeProps({ style: defaultStyle });
},
_onAnimationStart: function _onAnimationStart() {
var fromIndex = this.state.presentedIndex;
var toIndex = this.state.presentedIndex;
if (this.state.transitionFromIndex != null) {
fromIndex = this.state.transitionFromIndex;
} else if (this.state.activeGesture) {
toIndex = this.state.presentedIndex + this._deltaForGestureAction(this.state.activeGesture);
}
this._setRenderSceneToHardwareTextureAndroid(fromIndex, true);
this._setRenderSceneToHardwareTextureAndroid(toIndex, true);
var navBar = this._navBar;
if (navBar && navBar.onAnimationStart) {
navBar.onAnimationStart(fromIndex, toIndex);
}
},
_onAnimationEnd: function _onAnimationEnd() {
var max = this.state.routeStack.length - 1;
for (var index = 0; index <= max; index++) {
this._setRenderSceneToHardwareTextureAndroid(index, false);
}
var navBar = this._navBar;
if (navBar && navBar.onAnimationEnd) {
navBar.onAnimationEnd();
}
},
_setRenderSceneToHardwareTextureAndroid: function _setRenderSceneToHardwareTextureAndroid(sceneIndex, shouldRenderToHardwareTexture) {
var viewAtIndex = this._sceneRefs[sceneIndex];
if (viewAtIndex === null || viewAtIndex === undefined) {
return;
}
viewAtIndex.setNativeProps({ renderToHardwareTextureAndroid: shouldRenderToHardwareTexture });
},
_handleTouchStart: function _handleTouchStart() {
this._eligibleGestures = GESTURE_ACTIONS;
},
_handleMoveShouldSetPanResponder: function _handleMoveShouldSetPanResponder(e, gestureState) {
var sceneConfig = this.state.sceneConfigStack[this.state.presentedIndex];
if (!sceneConfig) {
return false;
}
this._expectingGestureGrant = this._matchGestureAction(this._eligibleGestures, sceneConfig.gestures, gestureState);
return !!this._expectingGestureGrant;
},
_doesGestureOverswipe: function _doesGestureOverswipe(gestureName) {
var wouldOverswipeBack = this.state.presentedIndex <= 0 && (gestureName === 'pop' || gestureName === 'jumpBack');
var wouldOverswipeForward = this.state.presentedIndex >= this.state.routeStack.length - 1 && gestureName === 'jumpForward';
return wouldOverswipeForward || wouldOverswipeBack;
},
_deltaForGestureAction: function _deltaForGestureAction(gestureAction) {
switch (gestureAction) {
case 'pop':
case 'jumpBack':
return -1;
case 'jumpForward':
return 1;
default:
invariant(false, 'Unsupported gesture action ' + gestureAction);
return;
}
},
_handlePanResponderRelease: function _handlePanResponderRelease(e, gestureState) {
var _this4 = this;
var sceneConfig = this.state.sceneConfigStack[this.state.presentedIndex];
var releaseGestureAction = this.state.activeGesture;
if (!releaseGestureAction) {
return;
}
var releaseGesture = sceneConfig.gestures[releaseGestureAction];
var destIndex = this.state.presentedIndex + this._deltaForGestureAction(this.state.activeGesture);
if (this.spring.getCurrentValue() === 0) {
this.spring.setCurrentValue(0).setAtRest();
this._completeTransition();
return;
}
var isTravelVertical = releaseGesture.direction === 'top-to-bottom' || releaseGesture.direction === 'bottom-to-top';
var isTravelInverted = releaseGesture.direction === 'right-to-left' || releaseGesture.direction === 'bottom-to-top';
var velocity, gestureDistance;
if (isTravelVertical) {
velocity = isTravelInverted ? -gestureState.vy : gestureState.vy;
gestureDistance = isTravelInverted ? -gestureState.dy : gestureState.dy;
} else {
velocity = isTravelInverted ? -gestureState.vx : gestureState.vx;
gestureDistance = isTravelInverted ? -gestureState.dx : gestureState.dx;
}
var transitionVelocity = clamp(-10, velocity, 10);
if (Math.abs(velocity) < releaseGesture.notMoving) {
var hasGesturedEnoughToComplete = gestureDistance > releaseGesture.fullDistance * releaseGesture.stillCompletionRatio;
transitionVelocity = hasGesturedEnoughToComplete ? releaseGesture.snapVelocity : -releaseGesture.snapVelocity;
}
if (transitionVelocity < 0 || this._doesGestureOverswipe(releaseGestureAction)) {
if (this.state.transitionFromIndex == null) {
var transitionBackToPresentedIndex = this.state.presentedIndex;
this.state.presentedIndex = destIndex;
this._transitionTo(transitionBackToPresentedIndex, -transitionVelocity, 1 - this.spring.getCurrentValue());
}
} else {
this._emitWillFocus(this.state.routeStack[destIndex]);
this._transitionTo(destIndex, transitionVelocity, null, function () {
if (releaseGestureAction === 'pop') {
_this4._cleanScenesPastIndex(destIndex);
}
});
}
this._detachGesture();
},
_handlePanResponderTerminate: function _handlePanResponderTerminate(e, gestureState) {
if (this.state.activeGesture == null) {
return;
}
var destIndex = this.state.presentedIndex + this._deltaForGestureAction(this.state.activeGesture);
this._detachGesture();
var transitionBackToPresentedIndex = this.state.presentedIndex;
this.state.presentedIndex = destIndex;
this._transitionTo(transitionBackToPresentedIndex, null, 1 - this.spring.getCurrentValue());
},
_attachGesture: function _attachGesture(gestureId) {
this.state.activeGesture = gestureId;
var gesturingToIndex = this.state.presentedIndex + this._deltaForGestureAction(this.state.activeGesture);
this._enableScene(gesturingToIndex);
},
_detachGesture: function _detachGesture() {
this.state.activeGesture = null;
this.state.pendingGestureProgress = null;
this._hideScenes();
},
_handlePanResponderMove: function _handlePanResponderMove(e, gestureState) {
if (this._isMoveGestureAttached !== undefined) {
invariant(this._expectingGestureGrant, 'Responder granted unexpectedly.');
this._attachGesture(this._expectingGestureGrant);
this._onAnimationStart();
this._expectingGestureGrant = undefined;
}
var sceneConfig = this.state.sceneConfigStack[this.state.presentedIndex];
if (this.state.activeGesture) {
var gesture = sceneConfig.gestures[this.state.activeGesture];
return this._moveAttachedGesture(gesture, gestureState);
}
var matchedGesture = this._matchGestureAction(GESTURE_ACTIONS, sceneConfig.gestures, gestureState);
if (matchedGesture) {
this._attachGesture(matchedGesture);
}
},
_moveAttachedGesture: function _moveAttachedGesture(gesture, gestureState) {
var isTravelVertical = gesture.direction === 'top-to-bottom' || gesture.direction === 'bottom-to-top';
var isTravelInverted = gesture.direction === 'right-to-left' || gesture.direction === 'bottom-to-top';
var distance = isTravelVertical ? gestureState.dy : gestureState.dx;
distance = isTravelInverted ? -distance : distance;
var gestureDetectMovement = gesture.gestureDetectMovement;
var nextProgress = (distance - gestureDetectMovement) / (gesture.fullDistance - gestureDetectMovement);
if (nextProgress < 0 && gesture.isDetachable) {
var gesturingToIndex = this.state.presentedIndex + this._deltaForGestureAction(this.state.activeGesture);
this._transitionBetween(this.state.presentedIndex, gesturingToIndex, 0);
this._detachGesture();
if (this.state.pendingGestureProgress != null) {
this.spring.setCurrentValue(0);
}
return;
}
if (gesture.overswipe && this._doesGestureOverswipe(this.state.activeGesture)) {
var frictionConstant = gesture.overswipe.frictionConstant;
var frictionByDistance = gesture.overswipe.frictionByDistance;
var frictionRatio = 1 / (frictionConstant + Math.abs(nextProgress) * frictionByDistance);
nextProgress *= frictionRatio;
}
nextProgress = clamp(0, nextProgress, 1);
if (this.state.transitionFromIndex != null) {
this.state.pendingGestureProgress = nextProgress;
} else if (this.state.pendingGestureProgress) {
this.spring.setEndValue(nextProgress);
} else {
this.spring.setCurrentValue(nextProgress);
}
},
_matchGestureAction: function _matchGestureAction(eligibleGestures, gestures, gestureState) {
var _this5 = this;
if (!gestures || !eligibleGestures || !eligibleGestures.some) {
return null;
}
var matchedGesture = null;
eligibleGestures.some(function (gestureName, gestureIndex) {
var gesture = gestures[gestureName];
if (!gesture) {
return;
}
if (gesture.overswipe == null && _this5._doesGestureOverswipe(gestureName)) {
return false;
}
var isTravelVertical = gesture.direction === 'top-to-bottom' || gesture.direction === 'bottom-to-top';
var isTravelInverted = gesture.direction === 'right-to-left' || gesture.direction === 'bottom-to-top';
var startedLoc = isTravelVertical ? gestureState.y0 : gestureState.x0;
var currentLoc = isTravelVertical ? gestureState.moveY : gestureState.moveX;
var travelDist = isTravelVertical ? gestureState.dy : gestureState.dx;
var oppositeAxisTravelDist = isTravelVertical ? gestureState.dx : gestureState.dy;
var edgeHitWidth = gesture.edgeHitWidth;
if (isTravelInverted) {
startedLoc = -startedLoc;
currentLoc = -currentLoc;
travelDist = -travelDist;
oppositeAxisTravelDist = -oppositeAxisTravelDist;
edgeHitWidth = isTravelVertical ? -(SCREEN_HEIGHT - edgeHitWidth) : -(SCREEN_WIDTH - edgeHitWidth);
}
if (startedLoc === 0) {
startedLoc = currentLoc;
}
var moveStartedInRegion = gesture.edgeHitWidth == null || startedLoc < edgeHitWidth;
if (!moveStartedInRegion) {
return false;
}
var moveTravelledFarEnough = travelDist >= gesture.gestureDetectMovement;
if (!moveTravelledFarEnough) {
return false;
}
var directionIsCorrect = Math.abs(travelDist) > Math.abs(oppositeAxisTravelDist) * gesture.directionRatio;
if (directionIsCorrect) {
matchedGesture = gestureName;
return true;
} else {
_this5._eligibleGestures = _this5._eligibleGestures.slice().splice(gestureIndex, 1);
}
});
return matchedGesture || null;
},
_transitionSceneStyle: function _transitionSceneStyle(fromIndex, toIndex, progress, index) {
var viewAtIndex = this._sceneRefs[index];
if (viewAtIndex === null || viewAtIndex === undefined) {
return;
}
var sceneConfigIndex = fromIndex < toIndex ? toIndex : fromIndex;
var sceneConfig = this.state.sceneConfigStack[sceneConfigIndex];
if (!sceneConfig) {
sceneConfig = this.state.sceneConfigStack[sceneConfigIndex - 1];
}
var styleToUse = {};
var useFn = index < fromIndex || index < toIndex ? sceneConfig.animationInterpolators.out : sceneConfig.animationInterpolators.into;
var directionAdjustedProgress = fromIndex < toIndex ? progress : 1 - progress;
var didChange = useFn(styleToUse, directionAdjustedProgress);
if (didChange) {
viewAtIndex.setNativeProps({ style: styleToUse });
}
},
_transitionBetween: function _transitionBetween(fromIndex, toIndex, progress) {
this._transitionSceneStyle(fromIndex, toIndex, progress, fromIndex);
this._transitionSceneStyle(fromIndex, toIndex, progress, toIndex);
var navBar = this._navBar;
if (navBar && navBar.updateProgress && toIndex >= 0 && fromIndex >= 0) {
navBar.updateProgress(progress, fromIndex, toIndex);
}
},
_handleResponderTerminationRequest: function _handleResponderTerminationRequest() {
return false;
},
_getDestIndexWithinBounds: function _getDestIndexWithinBounds(n) {
var currentIndex = this.state.presentedIndex;
var destIndex = currentIndex + n;
invariant(destIndex >= 0, 'Cannot jump before the first route.');
var maxIndex = this.state.routeStack.length - 1;
invariant(maxIndex >= destIndex, 'Cannot jump past the last route.');
return destIndex;
},
_jumpN: function _jumpN(n) {
var destIndex = this._getDestIndexWithinBounds(n);
this._enableScene(destIndex);
this._emitWillFocus(this.state.routeStack[destIndex]);
this._transitionTo(destIndex);
},
jumpTo: function jumpTo(route) {
var destIndex = this.state.routeStack.indexOf(route);
invariant(destIndex !== -1, 'Cannot jump to route that is not in the route stack');
this._jumpN(destIndex - this.state.presentedIndex);
},
jumpForward: function jumpForward() {
this._jumpN(1);
},
jumpBack: function jumpBack() {
this._jumpN(-1);
},
push: function push(route) {
var _this6 = this;
invariant(!!route, 'Must supply route to push');
var activeLength = this.state.presentedIndex + 1;
var activeStack = this.state.routeStack.slice(0, activeLength);
var activeAnimationConfigStack = this.state.sceneConfigStack.slice(0, activeLength);
var nextStack = activeStack.concat([route]);
var destIndex = nextStack.length - 1;
var nextSceneConfig = this.props.configureScene(route, nextStack);
var nextAnimationConfigStack = activeAnimationConfigStack.concat([nextSceneConfig]);
this._emitWillFocus(nextStack[destIndex]);
this.setState({
routeStack: nextStack,
sceneConfigStack: nextAnimationConfigStack
}, function () {
_this6._enableScene(destIndex);
_this6._transitionTo(destIndex, nextSceneConfig.defaultTransitionVelocity);
});
},
popN: function popN(n) {
var _this7 = this;
invariant(typeof n === 'number', 'Must supply a number to popN');
n = parseInt(n, 10);
if (n <= 0 || this.state.presentedIndex - n < 0) {
return;
}
var popIndex = this.state.presentedIndex - n;
var presentedRoute = this.state.routeStack[this.state.presentedIndex];
var popSceneConfig = this.props.configureScene(presentedRoute);
this._enableScene(popIndex);
this._clearTransformations(popIndex);
this._emitWillFocus(this.state.routeStack[popIndex]);
this._transitionTo(popIndex, popSceneConfig.defaultTransitionVelocity, null, function () {
_this7._cleanScenesPastIndex(popIndex);
});
},
pop: function pop() {
if (this.state.transitionQueue.length) {
return;
}
this.popN(1);
},
replaceAtIndex: function replaceAtIndex(route, index, cb) {
var _this8 = this;
invariant(!!route, 'Must supply route to replace');
if (index < 0) {
index += this.state.routeStack.length;
}
if (this.state.routeStack.length <= index) {
return;
}
var nextRouteStack = this.state.routeStack.slice();
var nextAnimationModeStack = this.state.sceneConfigStack.slice();
nextRouteStack[index] = route;
nextAnimationModeStack[index] = this.props.configureScene(route, nextRouteStack);
if (index === this.state.presentedIndex) {
this._emitWillFocus(route);
}
this.setState({
routeStack: nextRouteStack,
sceneConfigStack: nextAnimationModeStack
}, function () {
if (index === _this8.state.presentedIndex) {
_this8._emitDidFocus(route);
}
cb && cb();
});
},
replace: function replace(route) {
this.replaceAtIndex(route, this.state.presentedIndex);
},
replacePrevious: function replacePrevious(route) {
this.replaceAtIndex(route, this.state.presentedIndex - 1);
},
popToTop: function popToTop() {
this.popToRoute(this.state.routeStack[0]);
},
popToRoute: function popToRoute(route) {
var indexOfRoute = this.state.routeStack.indexOf(route);
invariant(indexOfRoute !== -1, 'Calling popToRoute for a route that doesn\'t exist!');
var numToPop = this.state.presentedIndex - indexOfRoute;
this.popN(numToPop);
},
replacePreviousAndPop: function replacePreviousAndPop(route) {
if (this.state.routeStack.length < 2) {
return;
}
this.replacePrevious(route);
this.pop();
},
resetTo: function resetTo(route) {
var _this9 = this;
invariant(!!route, 'Must supply route to push');
this.replaceAtIndex(route, 0, function () {
_this9.popN(_this9.state.presentedIndex);
});
},
getCurrentRoutes: function getCurrentRoutes() {
return this.state.routeStack.slice();
},
_cleanScenesPastIndex: function _cleanScenesPastIndex(index) {
var newStackLength = index + 1;
if (newStackLength < this.state.routeStack.length) {
this.setState({
sceneConfigStack: this.state.sceneConfigStack.slice(0, newStackLength),
routeStack: this.state.routeStack.slice(0, newStackLength)
});
}
},
_renderScene: function _renderScene(route, i) {
var _this10 = this;
var disabledSceneStyle = null;
var disabledScenePointerEvents = 'auto';
if (i !== this.state.presentedIndex) {
disabledSceneStyle = styles.disabledScene;
disabledScenePointerEvents = 'none';
}
return React.createElement(
View,
{
collapsable: false,
key: 'scene_' + getRouteID(route),
ref: function ref(scene) {
_this10._sceneRefs[i] = scene;
},
onStartShouldSetResponderCapture: function onStartShouldSetResponderCapture() {
return _this10.state.transitionFromIndex != null;
},
pointerEvents: disabledScenePointerEvents,
style: [styles.baseScene, this.props.sceneStyle, disabledSceneStyle], __source: {
fileName: _jsxFileName,
lineNumber: 1274
}
},
this.props.renderScene(route, this)
);
},
_renderNavigationBar: function _renderNavigationBar() {
var _this11 = this;
var navigationBar = this.props.navigationBar;
if (!navigationBar) {
return null;
}
return React.cloneElement(navigationBar, {
ref: function ref(navBar) {
_this11._navBar = navBar;
if (navigationBar && typeof navigationBar.ref === 'function') {
navigationBar.ref(navBar);
}
},
navigator: this._navigationBarNavigator,
navState: this.state
});
},
_tvEventHandler: TVEventHandler,
_enableTVEventHandler: function _enableTVEventHandler() {
this._tvEventHandler = new TVEventHandler();
this._tvEventHandler.enable(this, function (cmp, evt) {
if (evt && evt.eventType === 'menu') {
cmp.pop();
}
});
},
_disableTVEventHandler: function _disableTVEventHandler() {
if (this._tvEventHandler) {
this._tvEventHandler.disable();
delete this._tvEventHandler;
}
},
render: function render() {
var _this12 = this;
var newRenderedSceneMap = new Map();
var scenes = this.state.routeStack.map(function (route, index) {
var renderedScene;
if (_this12._renderedSceneMap.has(route) && index !== _this12.state.presentedIndex) {
renderedScene = _this12._renderedSceneMap.get(route);
} else {
renderedScene = _this12._renderScene(route, index);
}
newRenderedSceneMap.set(route, renderedScene);
return renderedScene;
});
this._renderedSceneMap = newRenderedSceneMap;
return React.createElement(
View,
{ style: [styles.container, this.props.style], __source: {
fileName: _jsxFileName,
lineNumber: 1343
}
},
React.createElement(
View,
babelHelpers.extends({
style: styles.transitioner
}, this.panGesture.panHandlers, {
onTouchStart: this._handleTouchStart,
onResponderTerminationRequest: this._handleResponderTerminationRequest, __source: {
fileName: _jsxFileName,
lineNumber: 1344
}
}),
scenes
),
this._renderNavigationBar()
);
},
_getNavigationContext: function _getNavigationContext() {
if (!this._navigationContext) {
this._navigationContext = new NavigationContext();
}
return this._navigationContext;
}
});
module.exports = Navigator;
}, 332, null, "Navigator");
__d(/* InteractionMixin */function(global, require, module, exports) {
'use strict';
var InteractionManager = require(221 ); // 221 = InteractionManager
var InteractionMixin = {
componentWillUnmount: function componentWillUnmount() {
while (this._interactionMixinHandles.length) {
InteractionManager.clearInteractionHandle(this._interactionMixinHandles.pop());
}
},
_interactionMixinHandles: [],
createInteractionHandle: function createInteractionHandle() {
var handle = InteractionManager.createInteractionHandle();
this._interactionMixinHandles.push(handle);
return handle;
},
clearInteractionHandle: function clearInteractionHandle(clearHandle) {
InteractionManager.clearInteractionHandle(clearHandle);
this._interactionMixinHandles = this._interactionMixinHandles.filter(function (handle) {
return handle !== clearHandle;
});
},
runAfterInteractions: function runAfterInteractions(callback) {
InteractionManager.runAfterInteractions(callback);
}
};
module.exports = InteractionMixin;
}, 333, null, "InteractionMixin");
__d(/* NavigationContext */function(global, require, module, exports) {
'use strict';
var NavigationEvent = require(335 ); // 335 = NavigationEvent
var NavigationEventEmitter = require(336 ); // 336 = NavigationEventEmitter
var NavigationTreeNode = require(337 ); // 337 = NavigationTreeNode
var Set = require(222 ); // 222 = Set
var emptyFunction = require(41 ); // 41 = fbjs/lib/emptyFunction
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var AT_TARGET = NavigationEvent.AT_TARGET,
BUBBLING_PHASE = NavigationEvent.BUBBLING_PHASE,
CAPTURING_PHASE = NavigationEvent.CAPTURING_PHASE;
var LegacyEventTypes = new Set(['willfocus', 'didfocus']);
var NavigationContext = function () {
function NavigationContext() {
babelHelpers.classCallCheck(this, NavigationContext);
this._bubbleEventEmitter = new NavigationEventEmitter(this);
this._captureEventEmitter = new NavigationEventEmitter(this);
this._currentRoute = null;
this.__node = new NavigationTreeNode(this);
this._emitCounter = 0;
this._emitQueue = [];
this.addListener('willfocus', this._onFocus);
this.addListener('didfocus', this._onFocus);
}
babelHelpers.createClass(NavigationContext, [{
key: 'appendChild',
value: function appendChild(childContext) {
this.__node.appendChild(childContext.__node);
}
}, {
key: 'addListener',
value: function addListener(eventType, listener, useCapture) {
if (LegacyEventTypes.has(eventType)) {
useCapture = false;
}
var emitter = useCapture ? this._captureEventEmitter : this._bubbleEventEmitter;
if (emitter) {
return emitter.addListener(eventType, listener, this);
} else {
return { remove: emptyFunction };
}
}
}, {
key: 'emit',
value: function emit(eventType, data, didEmitCallback) {
var _this = this;
if (this._emitCounter > 0) {
var args = Array.prototype.slice.call(arguments);
this._emitQueue.push(args);
return;
}
this._emitCounter++;
if (LegacyEventTypes.has(eventType)) {
this.__emit(eventType, data, null, {
defaultPrevented: false,
eventPhase: AT_TARGET,
propagationStopped: true,
target: this
});
} else {
var targets = [this];
var parentTarget = this.parent;
while (parentTarget) {
targets.unshift(parentTarget);
parentTarget = parentTarget.parent;
}
var propagationStopped = false;
var defaultPrevented = false;
var callback = function callback(event) {
propagationStopped = propagationStopped || event.isPropagationStopped();
defaultPrevented = defaultPrevented || event.defaultPrevented;
};
targets.some(function (currentTarget) {
if (propagationStopped) {
return true;
}
var extraInfo = {
defaultPrevented: defaultPrevented,
eventPhase: CAPTURING_PHASE,
propagationStopped: propagationStopped,
target: _this
};
currentTarget.__emit(eventType, data, callback, extraInfo);
}, this);
targets.reverse().some(function (currentTarget) {
if (propagationStopped) {
return true;
}
var extraInfo = {
defaultPrevented: defaultPrevented,
eventPhase: BUBBLING_PHASE,
propagationStopped: propagationStopped,
target: _this
};
currentTarget.__emit(eventType, data, callback, extraInfo);
}, this);
}
if (didEmitCallback) {
var event = NavigationEvent.pool(eventType, this, data);
propagationStopped && event.stopPropagation();
defaultPrevented && event.preventDefault();
didEmitCallback.call(this, event);
event.dispose();
}
this._emitCounter--;
while (this._emitQueue.length) {
var args = this._emitQueue.shift();
this.emit.apply(this, args);
}
}
}, {
key: 'dispose',
value: function dispose() {
this._bubbleEventEmitter && this._bubbleEventEmitter.removeAllListeners();
this._captureEventEmitter && this._captureEventEmitter.removeAllListeners();
this._bubbleEventEmitter = null;
this._captureEventEmitter = null;
this._currentRoute = null;
}
}, {
key: '__emit',
value: function __emit(eventType, data, didEmitCallback, extraInfo) {
var emitter;
switch (extraInfo.eventPhase) {
case CAPTURING_PHASE:
emitter = this._captureEventEmitter;
break;
case AT_TARGET:
emitter = this._bubbleEventEmitter;
break;
case BUBBLING_PHASE:
emitter = this._bubbleEventEmitter;
break;
default:
invariant(false, 'invalid event phase %s', extraInfo.eventPhase);
}
if (extraInfo.target === this) {
extraInfo.eventPhase = AT_TARGET;
}
if (emitter) {
emitter.emit(eventType, data, didEmitCallback, extraInfo);
}
}
}, {
key: '_onFocus',
value: function _onFocus(event) {
invariant(event.data && event.data.hasOwnProperty('route'), 'event type "%s" should provide route', event.type);
this._currentRoute = event.data.route;
}
}, {
key: 'parent',
get: function get() {
var parent = this.__node.getParent();
return parent ? parent.getValue() : null;
}
}, {
key: 'top',
get: function get() {
var result = null;
var parentNode = this.__node.getParent();
while (parentNode) {
result = parentNode.getValue();
parentNode = parentNode.getParent();
}
return result;
}
}, {
key: 'currentRoute',
get: function get() {
return this._currentRoute;
}
}]);
return NavigationContext;
}();
module.exports = NavigationContext;
}, 334, null, "NavigationContext");
__d(/* NavigationEvent */function(global, require, module, exports) {
'use strict';
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var NavigationEventPool = function () {
function NavigationEventPool() {
babelHelpers.classCallCheck(this, NavigationEventPool);
this._list = [];
}
babelHelpers.createClass(NavigationEventPool, [{
key: 'get',
value: function get(type, currentTarget, data) {
var event = void 0;
if (this._list.length > 0) {
event = this._list.pop();
event.constructor.call(event, type, currentTarget, data);
} else {
event = new NavigationEvent(type, currentTarget, data);
}
return event;
}
}, {
key: 'put',
value: function put(event) {
this._list.push(event);
}
}]);
return NavigationEventPool;
}();
var _navigationEventPool = new NavigationEventPool();
var NavigationEvent = function () {
babelHelpers.createClass(NavigationEvent, null, [{
key: 'pool',
value: function pool(type, currentTarget, data) {
return _navigationEventPool.get(type, currentTarget, data);
}
}]);
function NavigationEvent(type, currentTarget, data) {
babelHelpers.classCallCheck(this, NavigationEvent);
this.target = currentTarget;
this.eventPhase = NavigationEvent.NONE;
this._type = type;
this._currentTarget = currentTarget;
this._data = data;
this._defaultPrevented = false;
this._disposed = false;
this._propagationStopped = false;
}
babelHelpers.createClass(NavigationEvent, [{
key: 'preventDefault',
value: function preventDefault() {
this._defaultPrevented = true;
}
}, {
key: 'stopPropagation',
value: function stopPropagation() {
this._propagationStopped = true;
}
}, {
key: 'stop',
value: function stop() {
this.preventDefault();
this.stopPropagation();
}
}, {
key: 'isPropagationStopped',
value: function isPropagationStopped() {
return this._propagationStopped;
}
}, {
key: 'dispose',
value: function dispose() {
invariant(!this._disposed, 'NavigationEvent is already disposed');
this._disposed = true;
this.target = null;
this.eventPhase = NavigationEvent.NONE;
this._type = '';
this._currentTarget = null;
this._data = null;
this._defaultPrevented = false;
_navigationEventPool.put(this);
}
}, {
key: 'type',
get: function get() {
return this._type;
}
}, {
key: 'currentTarget',
get: function get() {
return this._currentTarget;
}
}, {
key: 'data',
get: function get() {
return this._data;
}
}, {
key: 'defaultPrevented',
get: function get() {
return this._defaultPrevented;
}
}]);
return NavigationEvent;
}();
NavigationEvent.NONE = 0;
NavigationEvent.CAPTURING_PHASE = 1;
NavigationEvent.AT_TARGET = 2;
NavigationEvent.BUBBLING_PHASE = 3;
module.exports = NavigationEvent;
}, 335, null, "NavigationEvent");
__d(/* NavigationEventEmitter */function(global, require, module, exports) {
'use strict';
var EventEmitter = require(103 ); // 103 = EventEmitter
var NavigationEvent = require(335 ); // 335 = NavigationEvent
var NavigationEventEmitter = function (_EventEmitter) {
babelHelpers.inherits(NavigationEventEmitter, _EventEmitter);
function NavigationEventEmitter(target) {
babelHelpers.classCallCheck(this, NavigationEventEmitter);
var _this = babelHelpers.possibleConstructorReturn(this, (NavigationEventEmitter.__proto__ || Object.getPrototypeOf(NavigationEventEmitter)).call(this));
_this._emitting = false;
_this._emitQueue = [];
_this._target = target;
return _this;
}
babelHelpers.createClass(NavigationEventEmitter, [{
key: 'emit',
value: function emit(eventType, data, didEmitCallback, extraInfo) {
if (this._emitting) {
var args = Array.prototype.slice.call(arguments);
this._emitQueue.push(args);
return;
}
this._emitting = true;
var event = NavigationEvent.pool(eventType, this._target, data);
if (extraInfo) {
if (extraInfo.target) {
event.target = extraInfo.target;
}
if (extraInfo.eventPhase) {
event.eventPhase = extraInfo.eventPhase;
}
if (extraInfo.defaultPrevented) {
event.preventDefault();
}
if (extraInfo.propagationStopped) {
event.stopPropagation();
}
}
babelHelpers.get(NavigationEventEmitter.prototype.__proto__ || Object.getPrototypeOf(NavigationEventEmitter.prototype), 'emit', this).call(this, String(eventType), event);
if (typeof didEmitCallback === 'function') {
didEmitCallback.call(this._target, event);
}
event.dispose();
this._emitting = false;
while (this._emitQueue.length) {
var args = this._emitQueue.shift();
this.emit.apply(this, args);
}
}
}]);
return NavigationEventEmitter;
}(EventEmitter);
module.exports = NavigationEventEmitter;
}, 336, null, "NavigationEventEmitter");
__d(/* NavigationTreeNode */function(global, require, module, exports) {
'use strict';
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var immutable = require(338 ); // 338 = immutable
var List = immutable.List;
var NavigationTreeNode = function () {
function NavigationTreeNode(value) {
babelHelpers.classCallCheck(this, NavigationTreeNode);
this.__parent = null;
this._children = new List();
this._value = value;
}
babelHelpers.createClass(NavigationTreeNode, [{
key: 'getValue',
value: function getValue() {
return this._value;
}
}, {
key: 'getParent',
value: function getParent() {
return this.__parent;
}
}, {
key: 'getChildrenCount',
value: function getChildrenCount() {
return this._children.size;
}
}, {
key: 'getChildAt',
value: function getChildAt(index) {
return index > -1 && index < this._children.size ? this._children.get(index) : null;
}
}, {
key: 'appendChild',
value: function appendChild(child) {
if (child.__parent) {
child.__parent.removeChild(child);
}
child.__parent = this;
this._children = this._children.push(child);
}
}, {
key: 'removeChild',
value: function removeChild(child) {
var index = this._children.indexOf(child);
invariant(index > -1, 'The node to be removed is not a child of this node.');
child.__parent = null;
this._children = this._children.splice(index, 1);
}
}, {
key: 'indexOf',
value: function indexOf(child) {
return this._children.indexOf(child);
}
}, {
key: 'forEach',
value: function forEach(callback, context) {
this._children.forEach(callback, context);
}
}, {
key: 'map',
value: function map(callback, context) {
return this._children.map(callback, context).toJS();
}
}, {
key: 'some',
value: function some(callback, context) {
return this._children.some(callback, context);
}
}]);
return NavigationTreeNode;
}();
module.exports = NavigationTreeNode;
}, 337, null, "NavigationTreeNode");
__d(/* immutable/dist/immutable.js */function(global, require, module, exports) {
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : global.Immutable = factory();
})(this, function () {
'use strict';
var SLICE$0 = Array.prototype.slice;
function createClass(ctor, superClass) {
if (superClass) {
ctor.prototype = Object.create(superClass.prototype);
}
ctor.prototype.constructor = ctor;
}
function Iterable(value) {
return isIterable(value) ? value : Seq(value);
}
createClass(KeyedIterable, Iterable);
function KeyedIterable(value) {
return isKeyed(value) ? value : KeyedSeq(value);
}
createClass(IndexedIterable, Iterable);
function IndexedIterable(value) {
return isIndexed(value) ? value : IndexedSeq(value);
}
createClass(SetIterable, Iterable);
function SetIterable(value) {
return isIterable(value) && !isAssociative(value) ? value : SetSeq(value);
}
function isIterable(maybeIterable) {
return !!(maybeIterable && maybeIterable[IS_ITERABLE_SENTINEL]);
}
function isKeyed(maybeKeyed) {
return !!(maybeKeyed && maybeKeyed[IS_KEYED_SENTINEL]);
}
function isIndexed(maybeIndexed) {
return !!(maybeIndexed && maybeIndexed[IS_INDEXED_SENTINEL]);
}
function isAssociative(maybeAssociative) {
return isKeyed(maybeAssociative) || isIndexed(maybeAssociative);
}
function isOrdered(maybeOrdered) {
return !!(maybeOrdered && maybeOrdered[IS_ORDERED_SENTINEL]);
}
Iterable.isIterable = isIterable;
Iterable.isKeyed = isKeyed;
Iterable.isIndexed = isIndexed;
Iterable.isAssociative = isAssociative;
Iterable.isOrdered = isOrdered;
Iterable.Keyed = KeyedIterable;
Iterable.Indexed = IndexedIterable;
Iterable.Set = SetIterable;
var IS_ITERABLE_SENTINEL = '@@__IMMUTABLE_ITERABLE__@@';
var IS_KEYED_SENTINEL = '@@__IMMUTABLE_KEYED__@@';
var IS_INDEXED_SENTINEL = '@@__IMMUTABLE_INDEXED__@@';
var IS_ORDERED_SENTINEL = '@@__IMMUTABLE_ORDERED__@@';
var DELETE = 'delete';
var SHIFT = 5;
var SIZE = 1 << SHIFT;
var MASK = SIZE - 1;
var NOT_SET = {};
var CHANGE_LENGTH = { value: false };
var DID_ALTER = { value: false };
function MakeRef(ref) {
ref.value = false;
return ref;
}
function SetRef(ref) {
ref && (ref.value = true);
}
function OwnerID() {}
function arrCopy(arr, offset) {
offset = offset || 0;
var len = Math.max(0, arr.length - offset);
var newArr = new Array(len);
for (var ii = 0; ii < len; ii++) {
newArr[ii] = arr[ii + offset];
}
return newArr;
}
function ensureSize(iter) {
if (iter.size === undefined) {
iter.size = iter.__iterate(returnTrue);
}
return iter.size;
}
function wrapIndex(iter, index) {
if (typeof index !== 'number') {
var uint32Index = index >>> 0;
if ('' + uint32Index !== index || uint32Index === 4294967295) {
return NaN;
}
index = uint32Index;
}
return index < 0 ? ensureSize(iter) + index : index;
}
function returnTrue() {
return true;
}
function wholeSlice(begin, end, size) {
return (begin === 0 || size !== undefined && begin <= -size) && (end === undefined || size !== undefined && end >= size);
}
function resolveBegin(begin, size) {
return resolveIndex(begin, size, 0);
}
function resolveEnd(end, size) {
return resolveIndex(end, size, size);
}
function resolveIndex(index, size, defaultIndex) {
return index === undefined ? defaultIndex : index < 0 ? Math.max(0, size + index) : size === undefined ? index : Math.min(size, index);
}
var ITERATE_KEYS = 0;
var ITERATE_VALUES = 1;
var ITERATE_ENTRIES = 2;
var REAL_ITERATOR_SYMBOL = typeof Symbol === 'function' && (typeof Symbol === 'function' ? Symbol.iterator : '@@iterator');
var FAUX_ITERATOR_SYMBOL = '@@iterator';
var ITERATOR_SYMBOL = REAL_ITERATOR_SYMBOL || FAUX_ITERATOR_SYMBOL;
function Iterator(next) {
this.next = next;
}
Iterator.prototype.toString = function () {
return '[Iterator]';
};
Iterator.KEYS = ITERATE_KEYS;
Iterator.VALUES = ITERATE_VALUES;
Iterator.ENTRIES = ITERATE_ENTRIES;
Iterator.prototype.inspect = Iterator.prototype.toSource = function () {
return this.toString();
};
Iterator.prototype[ITERATOR_SYMBOL] = function () {
return this;
};
function iteratorValue(type, k, v, iteratorResult) {
var value = type === 0 ? k : type === 1 ? v : [k, v];
iteratorResult ? iteratorResult.value = value : iteratorResult = {
value: value, done: false
};
return iteratorResult;
}
function iteratorDone() {
return { value: undefined, done: true };
}
function hasIterator(maybeIterable) {
return !!getIteratorFn(maybeIterable);
}
function isIterator(maybeIterator) {
return maybeIterator && typeof maybeIterator.next === 'function';
}
function getIterator(iterable) {
var iteratorFn = getIteratorFn(iterable);
return iteratorFn && iteratorFn.call(iterable);
}
function getIteratorFn(iterable) {
var iteratorFn = iterable && (REAL_ITERATOR_SYMBOL && iterable[REAL_ITERATOR_SYMBOL] || iterable[FAUX_ITERATOR_SYMBOL]);
if (typeof iteratorFn === 'function') {
return iteratorFn;
}
}
function isArrayLike(value) {
return value && typeof value.length === 'number';
}
createClass(Seq, Iterable);
function Seq(value) {
return value === null || value === undefined ? emptySequence() : isIterable(value) ? value.toSeq() : seqFromValue(value);
}
Seq.of = function () {
return Seq(arguments);
};
Seq.prototype.toSeq = function () {
return this;
};
Seq.prototype.toString = function () {
return this.__toString('Seq {', '}');
};
Seq.prototype.cacheResult = function () {
if (!this._cache && this.__iterateUncached) {
this._cache = this.entrySeq().toArray();
this.size = this._cache.length;
}
return this;
};
Seq.prototype.__iterate = function (fn, reverse) {
return seqIterate(this, fn, reverse, true);
};
Seq.prototype.__iterator = function (type, reverse) {
return seqIterator(this, type, reverse, true);
};
createClass(KeyedSeq, Seq);
function KeyedSeq(value) {
return value === null || value === undefined ? emptySequence().toKeyedSeq() : isIterable(value) ? isKeyed(value) ? value.toSeq() : value.fromEntrySeq() : keyedSeqFromValue(value);
}
KeyedSeq.prototype.toKeyedSeq = function () {
return this;
};
createClass(IndexedSeq, Seq);
function IndexedSeq(value) {
return value === null || value === undefined ? emptySequence() : !isIterable(value) ? indexedSeqFromValue(value) : isKeyed(value) ? value.entrySeq() : value.toIndexedSeq();
}
IndexedSeq.of = function () {
return IndexedSeq(arguments);
};
IndexedSeq.prototype.toIndexedSeq = function () {
return this;
};
IndexedSeq.prototype.toString = function () {
return this.__toString('Seq [', ']');
};
IndexedSeq.prototype.__iterate = function (fn, reverse) {
return seqIterate(this, fn, reverse, false);
};
IndexedSeq.prototype.__iterator = function (type, reverse) {
return seqIterator(this, type, reverse, false);
};
createClass(SetSeq, Seq);
function SetSeq(value) {
return (value === null || value === undefined ? emptySequence() : !isIterable(value) ? indexedSeqFromValue(value) : isKeyed(value) ? value.entrySeq() : value).toSetSeq();
}
SetSeq.of = function () {
return SetSeq(arguments);
};
SetSeq.prototype.toSetSeq = function () {
return this;
};
Seq.isSeq = isSeq;
Seq.Keyed = KeyedSeq;
Seq.Set = SetSeq;
Seq.Indexed = IndexedSeq;
var IS_SEQ_SENTINEL = '@@__IMMUTABLE_SEQ__@@';
Seq.prototype[IS_SEQ_SENTINEL] = true;
createClass(ArraySeq, IndexedSeq);
function ArraySeq(array) {
this._array = array;
this.size = array.length;
}
ArraySeq.prototype.get = function (index, notSetValue) {
return this.has(index) ? this._array[wrapIndex(this, index)] : notSetValue;
};
ArraySeq.prototype.__iterate = function (fn, reverse) {
var array = this._array;
var maxIndex = array.length - 1;
for (var ii = 0; ii <= maxIndex; ii++) {
if (fn(array[reverse ? maxIndex - ii : ii], ii, this) === false) {
return ii + 1;
}
}
return ii;
};
ArraySeq.prototype.__iterator = function (type, reverse) {
var array = this._array;
var maxIndex = array.length - 1;
var ii = 0;
return new Iterator(function () {
return ii > maxIndex ? iteratorDone() : iteratorValue(type, ii, array[reverse ? maxIndex - ii++ : ii++]);
});
};
createClass(ObjectSeq, KeyedSeq);
function ObjectSeq(object) {
var keys = Object.keys(object);
this._object = object;
this._keys = keys;
this.size = keys.length;
}
ObjectSeq.prototype.get = function (key, notSetValue) {
if (notSetValue !== undefined && !this.has(key)) {
return notSetValue;
}
return this._object[key];
};
ObjectSeq.prototype.has = function (key) {
return this._object.hasOwnProperty(key);
};
ObjectSeq.prototype.__iterate = function (fn, reverse) {
var object = this._object;
var keys = this._keys;
var maxIndex = keys.length - 1;
for (var ii = 0; ii <= maxIndex; ii++) {
var key = keys[reverse ? maxIndex - ii : ii];
if (fn(object[key], key, this) === false) {
return ii + 1;
}
}
return ii;
};
ObjectSeq.prototype.__iterator = function (type, reverse) {
var object = this._object;
var keys = this._keys;
var maxIndex = keys.length - 1;
var ii = 0;
return new Iterator(function () {
var key = keys[reverse ? maxIndex - ii : ii];
return ii++ > maxIndex ? iteratorDone() : iteratorValue(type, key, object[key]);
});
};
ObjectSeq.prototype[IS_ORDERED_SENTINEL] = true;
createClass(IterableSeq, IndexedSeq);
function IterableSeq(iterable) {
this._iterable = iterable;
this.size = iterable.length || iterable.size;
}
IterableSeq.prototype.__iterateUncached = function (fn, reverse) {
if (reverse) {
return this.cacheResult().__iterate(fn, reverse);
}
var iterable = this._iterable;
var iterator = getIterator(iterable);
var iterations = 0;
if (isIterator(iterator)) {
var step;
while (!(step = iterator.next()).done) {
if (fn(step.value, iterations++, this) === false) {
break;
}
}
}
return iterations;
};
IterableSeq.prototype.__iteratorUncached = function (type, reverse) {
if (reverse) {
return this.cacheResult().__iterator(type, reverse);
}
var iterable = this._iterable;
var iterator = getIterator(iterable);
if (!isIterator(iterator)) {
return new Iterator(iteratorDone);
}
var iterations = 0;
return new Iterator(function () {
var step = iterator.next();
return step.done ? step : iteratorValue(type, iterations++, step.value);
});
};
createClass(IteratorSeq, IndexedSeq);
function IteratorSeq(iterator) {
this._iterator = iterator;
this._iteratorCache = [];
}
IteratorSeq.prototype.__iterateUncached = function (fn, reverse) {
if (reverse) {
return this.cacheResult().__iterate(fn, reverse);
}
var iterator = this._iterator;
var cache = this._iteratorCache;
var iterations = 0;
while (iterations < cache.length) {
if (fn(cache[iterations], iterations++, this) === false) {
return iterations;
}
}
var step;
while (!(step = iterator.next()).done) {
var val = step.value;
cache[iterations] = val;
if (fn(val, iterations++, this) === false) {
break;
}
}
return iterations;
};
IteratorSeq.prototype.__iteratorUncached = function (type, reverse) {
if (reverse) {
return this.cacheResult().__iterator(type, reverse);
}
var iterator = this._iterator;
var cache = this._iteratorCache;
var iterations = 0;
return new Iterator(function () {
if (iterations >= cache.length) {
var step = iterator.next();
if (step.done) {
return step;
}
cache[iterations] = step.value;
}
return iteratorValue(type, iterations, cache[iterations++]);
});
};
function isSeq(maybeSeq) {
return !!(maybeSeq && maybeSeq[IS_SEQ_SENTINEL]);
}
var EMPTY_SEQ;
function emptySequence() {
return EMPTY_SEQ || (EMPTY_SEQ = new ArraySeq([]));
}
function keyedSeqFromValue(value) {
var seq = Array.isArray(value) ? new ArraySeq(value).fromEntrySeq() : isIterator(value) ? new IteratorSeq(value).fromEntrySeq() : hasIterator(value) ? new IterableSeq(value).fromEntrySeq() : typeof value === 'object' ? new ObjectSeq(value) : undefined;
if (!seq) {
throw new TypeError('Expected Array or iterable object of [k, v] entries, ' + 'or keyed object: ' + value);
}
return seq;
}
function indexedSeqFromValue(value) {
var seq = maybeIndexedSeqFromValue(value);
if (!seq) {
throw new TypeError('Expected Array or iterable object of values: ' + value);
}
return seq;
}
function seqFromValue(value) {
var seq = maybeIndexedSeqFromValue(value) || typeof value === 'object' && new ObjectSeq(value);
if (!seq) {
throw new TypeError('Expected Array or iterable object of values, or keyed object: ' + value);
}
return seq;
}
function maybeIndexedSeqFromValue(value) {
return isArrayLike(value) ? new ArraySeq(value) : isIterator(value) ? new IteratorSeq(value) : hasIterator(value) ? new IterableSeq(value) : undefined;
}
function seqIterate(seq, fn, reverse, useKeys) {
var cache = seq._cache;
if (cache) {
var maxIndex = cache.length - 1;
for (var ii = 0; ii <= maxIndex; ii++) {
var entry = cache[reverse ? maxIndex - ii : ii];
if (fn(entry[1], useKeys ? entry[0] : ii, seq) === false) {
return ii + 1;
}
}
return ii;
}
return seq.__iterateUncached(fn, reverse);
}
function seqIterator(seq, type, reverse, useKeys) {
var cache = seq._cache;
if (cache) {
var maxIndex = cache.length - 1;
var ii = 0;
return new Iterator(function () {
var entry = cache[reverse ? maxIndex - ii : ii];
return ii++ > maxIndex ? iteratorDone() : iteratorValue(type, useKeys ? entry[0] : ii - 1, entry[1]);
});
}
return seq.__iteratorUncached(type, reverse);
}
function fromJS(json, converter) {
return converter ? fromJSWith(converter, json, '', { '': json }) : fromJSDefault(json);
}
function fromJSWith(converter, json, key, parentJSON) {
if (Array.isArray(json)) {
return converter.call(parentJSON, key, IndexedSeq(json).map(function (v, k) {
return fromJSWith(converter, v, k, json);
}));
}
if (isPlainObj(json)) {
return converter.call(parentJSON, key, KeyedSeq(json).map(function (v, k) {
return fromJSWith(converter, v, k, json);
}));
}
return json;
}
function fromJSDefault(json) {
if (Array.isArray(json)) {
return IndexedSeq(json).map(fromJSDefault).toList();
}
if (isPlainObj(json)) {
return KeyedSeq(json).map(fromJSDefault).toMap();
}
return json;
}
function isPlainObj(value) {
return value && (value.constructor === Object || value.constructor === undefined);
}
function is(valueA, valueB) {
if (valueA === valueB || valueA !== valueA && valueB !== valueB) {
return true;
}
if (!valueA || !valueB) {
return false;
}
if (typeof valueA.valueOf === 'function' && typeof valueB.valueOf === 'function') {
valueA = valueA.valueOf();
valueB = valueB.valueOf();
if (valueA === valueB || valueA !== valueA && valueB !== valueB) {
return true;
}
if (!valueA || !valueB) {
return false;
}
}
if (typeof valueA.equals === 'function' && typeof valueB.equals === 'function' && valueA.equals(valueB)) {
return true;
}
return false;
}
function deepEqual(a, b) {
if (a === b) {
return true;
}
if (!isIterable(b) || a.size !== undefined && b.size !== undefined && a.size !== b.size || a.__hash !== undefined && b.__hash !== undefined && a.__hash !== b.__hash || isKeyed(a) !== isKeyed(b) || isIndexed(a) !== isIndexed(b) || isOrdered(a) !== isOrdered(b)) {
return false;
}
if (a.size === 0 && b.size === 0) {
return true;
}
var notAssociative = !isAssociative(a);
if (isOrdered(a)) {
var entries = a.entries();
return b.every(function (v, k) {
var entry = entries.next().value;
return entry && is(entry[1], v) && (notAssociative || is(entry[0], k));
}) && entries.next().done;
}
var flipped = false;
if (a.size === undefined) {
if (b.size === undefined) {
if (typeof a.cacheResult === 'function') {
a.cacheResult();
}
} else {
flipped = true;
var _ = a;
a = b;
b = _;
}
}
var allEqual = true;
var bSize = b.__iterate(function (v, k) {
if (notAssociative ? !a.has(v) : flipped ? !is(v, a.get(k, NOT_SET)) : !is(a.get(k, NOT_SET), v)) {
allEqual = false;
return false;
}
});
return allEqual && a.size === bSize;
}
createClass(Repeat, IndexedSeq);
function Repeat(value, times) {
if (!(this instanceof Repeat)) {
return new Repeat(value, times);
}
this._value = value;
this.size = times === undefined ? Infinity : Math.max(0, times);
if (this.size === 0) {
if (EMPTY_REPEAT) {
return EMPTY_REPEAT;
}
EMPTY_REPEAT = this;
}
}
Repeat.prototype.toString = function () {
if (this.size === 0) {
return 'Repeat []';
}
return 'Repeat [ ' + this._value + ' ' + this.size + ' times ]';
};
Repeat.prototype.get = function (index, notSetValue) {
return this.has(index) ? this._value : notSetValue;
};
Repeat.prototype.includes = function (searchValue) {
return is(this._value, searchValue);
};
Repeat.prototype.slice = function (begin, end) {
var size = this.size;
return wholeSlice(begin, end, size) ? this : new Repeat(this._value, resolveEnd(end, size) - resolveBegin(begin, size));
};
Repeat.prototype.reverse = function () {
return this;
};
Repeat.prototype.indexOf = function (searchValue) {
if (is(this._value, searchValue)) {
return 0;
}
return -1;
};
Repeat.prototype.lastIndexOf = function (searchValue) {
if (is(this._value, searchValue)) {
return this.size;
}
return -1;
};
Repeat.prototype.__iterate = function (fn, reverse) {
for (var ii = 0; ii < this.size; ii++) {
if (fn(this._value, ii, this) === false) {
return ii + 1;
}
}
return ii;
};
Repeat.prototype.__iterator = function (type, reverse) {
var this$0 = this;
var ii = 0;
return new Iterator(function () {
return ii < this$0.size ? iteratorValue(type, ii++, this$0._value) : iteratorDone();
});
};
Repeat.prototype.equals = function (other) {
return other instanceof Repeat ? is(this._value, other._value) : deepEqual(other);
};
var EMPTY_REPEAT;
function invariant(condition, error) {
if (!condition) throw new Error(error);
}
createClass(Range, IndexedSeq);
function Range(start, end, step) {
if (!(this instanceof Range)) {
return new Range(start, end, step);
}
invariant(step !== 0, 'Cannot step a Range by 0');
start = start || 0;
if (end === undefined) {
end = Infinity;
}
step = step === undefined ? 1 : Math.abs(step);
if (end < start) {
step = -step;
}
this._start = start;
this._end = end;
this._step = step;
this.size = Math.max(0, Math.ceil((end - start) / step - 1) + 1);
if (this.size === 0) {
if (EMPTY_RANGE) {
return EMPTY_RANGE;
}
EMPTY_RANGE = this;
}
}
Range.prototype.toString = function () {
if (this.size === 0) {
return 'Range []';
}
return 'Range [ ' + this._start + '...' + this._end + (this._step > 1 ? ' by ' + this._step : '') + ' ]';
};
Range.prototype.get = function (index, notSetValue) {
return this.has(index) ? this._start + wrapIndex(this, index) * this._step : notSetValue;
};
Range.prototype.includes = function (searchValue) {
var possibleIndex = (searchValue - this._start) / this._step;
return possibleIndex >= 0 && possibleIndex < this.size && possibleIndex === Math.floor(possibleIndex);
};
Range.prototype.slice = function (begin, end) {
if (wholeSlice(begin, end, this.size)) {
return this;
}
begin = resolveBegin(begin, this.size);
end = resolveEnd(end, this.size);
if (end <= begin) {
return new Range(0, 0);
}
return new Range(this.get(begin, this._end), this.get(end, this._end), this._step);
};
Range.prototype.indexOf = function (searchValue) {
var offsetValue = searchValue - this._start;
if (offsetValue % this._step === 0) {
var index = offsetValue / this._step;
if (index >= 0 && index < this.size) {
return index;
}
}
return -1;
};
Range.prototype.lastIndexOf = function (searchValue) {
return this.indexOf(searchValue);
};
Range.prototype.__iterate = function (fn, reverse) {
var maxIndex = this.size - 1;
var step = this._step;
var value = reverse ? this._start + maxIndex * step : this._start;
for (var ii = 0; ii <= maxIndex; ii++) {
if (fn(value, ii, this) === false) {
return ii + 1;
}
value += reverse ? -step : step;
}
return ii;
};
Range.prototype.__iterator = function (type, reverse) {
var maxIndex = this.size - 1;
var step = this._step;
var value = reverse ? this._start + maxIndex * step : this._start;
var ii = 0;
return new Iterator(function () {
var v = value;
value += reverse ? -step : step;
return ii > maxIndex ? iteratorDone() : iteratorValue(type, ii++, v);
});
};
Range.prototype.equals = function (other) {
return other instanceof Range ? this._start === other._start && this._end === other._end && this._step === other._step : deepEqual(this, other);
};
var EMPTY_RANGE;
createClass(Collection, Iterable);
function Collection() {
throw TypeError('Abstract');
}
createClass(KeyedCollection, Collection);function KeyedCollection() {}
createClass(IndexedCollection, Collection);function IndexedCollection() {}
createClass(SetCollection, Collection);function SetCollection() {}
Collection.Keyed = KeyedCollection;
Collection.Indexed = IndexedCollection;
Collection.Set = SetCollection;
var imul = typeof Math.imul === 'function' && Math.imul(0xffffffff, 2) === -2 ? Math.imul : function imul(a, b) {
a = a | 0;
b = b | 0;
var c = a & 0xffff;
var d = b & 0xffff;
return c * d + ((a >>> 16) * d + c * (b >>> 16) << 16 >>> 0) | 0;
};
function smi(i32) {
return i32 >>> 1 & 0x40000000 | i32 & 0xBFFFFFFF;
}
function hash(o) {
if (o === false || o === null || o === undefined) {
return 0;
}
if (typeof o.valueOf === 'function') {
o = o.valueOf();
if (o === false || o === null || o === undefined) {
return 0;
}
}
if (o === true) {
return 1;
}
var type = typeof o;
if (type === 'number') {
var h = o | 0;
if (h !== o) {
h ^= o * 0xFFFFFFFF;
}
while (o > 0xFFFFFFFF) {
o /= 0xFFFFFFFF;
h ^= o;
}
return smi(h);
}
if (type === 'string') {
return o.length > STRING_HASH_CACHE_MIN_STRLEN ? cachedHashString(o) : hashString(o);
}
if (typeof o.hashCode === 'function') {
return o.hashCode();
}
if (type === 'object') {
return hashJSObj(o);
}
if (typeof o.toString === 'function') {
return hashString(o.toString());
}
throw new Error('Value type ' + type + ' cannot be hashed.');
}
function cachedHashString(string) {
var hash = stringHashCache[string];
if (hash === undefined) {
hash = hashString(string);
if (STRING_HASH_CACHE_SIZE === STRING_HASH_CACHE_MAX_SIZE) {
STRING_HASH_CACHE_SIZE = 0;
stringHashCache = {};
}
STRING_HASH_CACHE_SIZE++;
stringHashCache[string] = hash;
}
return hash;
}
function hashString(string) {
var hash = 0;
for (var ii = 0; ii < string.length; ii++) {
hash = 31 * hash + string.charCodeAt(ii) | 0;
}
return smi(hash);
}
function hashJSObj(obj) {
var hash;
if (usingWeakMap) {
hash = weakMap.get(obj);
if (hash !== undefined) {
return hash;
}
}
hash = obj[UID_HASH_KEY];
if (hash !== undefined) {
return hash;
}
if (!canDefineProperty) {
hash = obj.propertyIsEnumerable && obj.propertyIsEnumerable[UID_HASH_KEY];
if (hash !== undefined) {
return hash;
}
hash = getIENodeHash(obj);
if (hash !== undefined) {
return hash;
}
}
hash = ++objHashUID;
if (objHashUID & 0x40000000) {
objHashUID = 0;
}
if (usingWeakMap) {
weakMap.set(obj, hash);
} else if (isExtensible !== undefined && isExtensible(obj) === false) {
throw new Error('Non-extensible objects are not allowed as keys.');
} else if (canDefineProperty) {
Object.defineProperty(obj, UID_HASH_KEY, {
'enumerable': false,
'configurable': false,
'writable': false,
'value': hash
});
} else if (obj.propertyIsEnumerable !== undefined && obj.propertyIsEnumerable === obj.constructor.prototype.propertyIsEnumerable) {
obj.propertyIsEnumerable = function () {
return this.constructor.prototype.propertyIsEnumerable.apply(this, arguments);
};
obj.propertyIsEnumerable[UID_HASH_KEY] = hash;
} else if (obj.nodeType !== undefined) {
obj[UID_HASH_KEY] = hash;
} else {
throw new Error('Unable to set a non-enumerable property on object.');
}
return hash;
}
var isExtensible = Object.isExtensible;
var canDefineProperty = function () {
try {
Object.defineProperty({}, '@', {});
return true;
} catch (e) {
return false;
}
}();
function getIENodeHash(node) {
if (node && node.nodeType > 0) {
switch (node.nodeType) {
case 1:
return node.uniqueID;
case 9:
return node.documentElement && node.documentElement.uniqueID;
}
}
}
var usingWeakMap = typeof WeakMap === 'function';
var weakMap;
if (usingWeakMap) {
weakMap = new WeakMap();
}
var objHashUID = 0;
var UID_HASH_KEY = '__immutablehash__';
if (typeof Symbol === 'function') {
UID_HASH_KEY = Symbol(UID_HASH_KEY);
}
var STRING_HASH_CACHE_MIN_STRLEN = 16;
var STRING_HASH_CACHE_MAX_SIZE = 255;
var STRING_HASH_CACHE_SIZE = 0;
var stringHashCache = {};
function assertNotInfinite(size) {
invariant(size !== Infinity, 'Cannot perform this action with an infinite size.');
}
createClass(Map, KeyedCollection);
function Map(value) {
return value === null || value === undefined ? emptyMap() : isMap(value) && !isOrdered(value) ? value : emptyMap().withMutations(function (map) {
var iter = KeyedIterable(value);
assertNotInfinite(iter.size);
iter.forEach(function (v, k) {
return map.set(k, v);
});
});
}
Map.prototype.toString = function () {
return this.__toString('Map {', '}');
};
Map.prototype.get = function (k, notSetValue) {
return this._root ? this._root.get(0, undefined, k, notSetValue) : notSetValue;
};
Map.prototype.set = function (k, v) {
return updateMap(this, k, v);
};
Map.prototype.setIn = function (keyPath, v) {
return this.updateIn(keyPath, NOT_SET, function () {
return v;
});
};
Map.prototype.remove = function (k) {
return updateMap(this, k, NOT_SET);
};
Map.prototype.deleteIn = function (keyPath) {
return this.updateIn(keyPath, function () {
return NOT_SET;
});
};
Map.prototype.update = function (k, notSetValue, updater) {
return arguments.length === 1 ? k(this) : this.updateIn([k], notSetValue, updater);
};
Map.prototype.updateIn = function (keyPath, notSetValue, updater) {
if (!updater) {
updater = notSetValue;
notSetValue = undefined;
}
var updatedValue = updateInDeepMap(this, forceIterator(keyPath), notSetValue, updater);
return updatedValue === NOT_SET ? undefined : updatedValue;
};
Map.prototype.clear = function () {
if (this.size === 0) {
return this;
}
if (this.__ownerID) {
this.size = 0;
this._root = null;
this.__hash = undefined;
this.__altered = true;
return this;
}
return emptyMap();
};
Map.prototype.merge = function () {
return mergeIntoMapWith(this, undefined, arguments);
};
Map.prototype.mergeWith = function (merger) {
var iters = SLICE$0.call(arguments, 1);
return mergeIntoMapWith(this, merger, iters);
};
Map.prototype.mergeIn = function (keyPath) {
var iters = SLICE$0.call(arguments, 1);
return this.updateIn(keyPath, emptyMap(), function (m) {
return typeof m.merge === 'function' ? m.merge.apply(m, iters) : iters[iters.length - 1];
});
};
Map.prototype.mergeDeep = function () {
return mergeIntoMapWith(this, deepMerger, arguments);
};
Map.prototype.mergeDeepWith = function (merger) {
var iters = SLICE$0.call(arguments, 1);
return mergeIntoMapWith(this, deepMergerWith(merger), iters);
};
Map.prototype.mergeDeepIn = function (keyPath) {
var iters = SLICE$0.call(arguments, 1);
return this.updateIn(keyPath, emptyMap(), function (m) {
return typeof m.mergeDeep === 'function' ? m.mergeDeep.apply(m, iters) : iters[iters.length - 1];
});
};
Map.prototype.sort = function (comparator) {
return OrderedMap(sortFactory(this, comparator));
};
Map.prototype.sortBy = function (mapper, comparator) {
return OrderedMap(sortFactory(this, comparator, mapper));
};
Map.prototype.withMutations = function (fn) {
var mutable = this.asMutable();
fn(mutable);
return mutable.wasAltered() ? mutable.__ensureOwner(this.__ownerID) : this;
};
Map.prototype.asMutable = function () {
return this.__ownerID ? this : this.__ensureOwner(new OwnerID());
};
Map.prototype.asImmutable = function () {
return this.__ensureOwner();
};
Map.prototype.wasAltered = function () {
return this.__altered;
};
Map.prototype.__iterator = function (type, reverse) {
return new MapIterator(this, type, reverse);
};
Map.prototype.__iterate = function (fn, reverse) {
var this$0 = this;
var iterations = 0;
this._root && this._root.iterate(function (entry) {
iterations++;
return fn(entry[1], entry[0], this$0);
}, reverse);
return iterations;
};
Map.prototype.__ensureOwner = function (ownerID) {
if (ownerID === this.__ownerID) {
return this;
}
if (!ownerID) {
this.__ownerID = ownerID;
this.__altered = false;
return this;
}
return makeMap(this.size, this._root, ownerID, this.__hash);
};
function isMap(maybeMap) {
return !!(maybeMap && maybeMap[IS_MAP_SENTINEL]);
}
Map.isMap = isMap;
var IS_MAP_SENTINEL = '@@__IMMUTABLE_MAP__@@';
var MapPrototype = Map.prototype;
MapPrototype[IS_MAP_SENTINEL] = true;
MapPrototype[DELETE] = MapPrototype.remove;
MapPrototype.removeIn = MapPrototype.deleteIn;
function ArrayMapNode(ownerID, entries) {
this.ownerID = ownerID;
this.entries = entries;
}
ArrayMapNode.prototype.get = function (shift, keyHash, key, notSetValue) {
var entries = this.entries;
for (var ii = 0, len = entries.length; ii < len; ii++) {
if (is(key, entries[ii][0])) {
return entries[ii][1];
}
}
return notSetValue;
};
ArrayMapNode.prototype.update = function (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {
var removed = value === NOT_SET;
var entries = this.entries;
var idx = 0;
for (var len = entries.length; idx < len; idx++) {
if (is(key, entries[idx][0])) {
break;
}
}
var exists = idx < len;
if (exists ? entries[idx][1] === value : removed) {
return this;
}
SetRef(didAlter);
(removed || !exists) && SetRef(didChangeSize);
if (removed && entries.length === 1) {
return;
}
if (!exists && !removed && entries.length >= MAX_ARRAY_MAP_SIZE) {
return createNodes(ownerID, entries, key, value);
}
var isEditable = ownerID && ownerID === this.ownerID;
var newEntries = isEditable ? entries : arrCopy(entries);
if (exists) {
if (removed) {
idx === len - 1 ? newEntries.pop() : newEntries[idx] = newEntries.pop();
} else {
newEntries[idx] = [key, value];
}
} else {
newEntries.push([key, value]);
}
if (isEditable) {
this.entries = newEntries;
return this;
}
return new ArrayMapNode(ownerID, newEntries);
};
function BitmapIndexedNode(ownerID, bitmap, nodes) {
this.ownerID = ownerID;
this.bitmap = bitmap;
this.nodes = nodes;
}
BitmapIndexedNode.prototype.get = function (shift, keyHash, key, notSetValue) {
if (keyHash === undefined) {
keyHash = hash(key);
}
var bit = 1 << ((shift === 0 ? keyHash : keyHash >>> shift) & MASK);
var bitmap = this.bitmap;
return (bitmap & bit) === 0 ? notSetValue : this.nodes[popCount(bitmap & bit - 1)].get(shift + SHIFT, keyHash, key, notSetValue);
};
BitmapIndexedNode.prototype.update = function (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {
if (keyHash === undefined) {
keyHash = hash(key);
}
var keyHashFrag = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;
var bit = 1 << keyHashFrag;
var bitmap = this.bitmap;
var exists = (bitmap & bit) !== 0;
if (!exists && value === NOT_SET) {
return this;
}
var idx = popCount(bitmap & bit - 1);
var nodes = this.nodes;
var node = exists ? nodes[idx] : undefined;
var newNode = updateNode(node, ownerID, shift + SHIFT, keyHash, key, value, didChangeSize, didAlter);
if (newNode === node) {
return this;
}
if (!exists && newNode && nodes.length >= MAX_BITMAP_INDEXED_SIZE) {
return expandNodes(ownerID, nodes, bitmap, keyHashFrag, newNode);
}
if (exists && !newNode && nodes.length === 2 && isLeafNode(nodes[idx ^ 1])) {
return nodes[idx ^ 1];
}
if (exists && newNode && nodes.length === 1 && isLeafNode(newNode)) {
return newNode;
}
var isEditable = ownerID && ownerID === this.ownerID;
var newBitmap = exists ? newNode ? bitmap : bitmap ^ bit : bitmap | bit;
var newNodes = exists ? newNode ? setIn(nodes, idx, newNode, isEditable) : spliceOut(nodes, idx, isEditable) : spliceIn(nodes, idx, newNode, isEditable);
if (isEditable) {
this.bitmap = newBitmap;
this.nodes = newNodes;
return this;
}
return new BitmapIndexedNode(ownerID, newBitmap, newNodes);
};
function HashArrayMapNode(ownerID, count, nodes) {
this.ownerID = ownerID;
this.count = count;
this.nodes = nodes;
}
HashArrayMapNode.prototype.get = function (shift, keyHash, key, notSetValue) {
if (keyHash === undefined) {
keyHash = hash(key);
}
var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;
var node = this.nodes[idx];
return node ? node.get(shift + SHIFT, keyHash, key, notSetValue) : notSetValue;
};
HashArrayMapNode.prototype.update = function (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {
if (keyHash === undefined) {
keyHash = hash(key);
}
var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;
var removed = value === NOT_SET;
var nodes = this.nodes;
var node = nodes[idx];
if (removed && !node) {
return this;
}
var newNode = updateNode(node, ownerID, shift + SHIFT, keyHash, key, value, didChangeSize, didAlter);
if (newNode === node) {
return this;
}
var newCount = this.count;
if (!node) {
newCount++;
} else if (!newNode) {
newCount--;
if (newCount < MIN_HASH_ARRAY_MAP_SIZE) {
return packNodes(ownerID, nodes, newCount, idx);
}
}
var isEditable = ownerID && ownerID === this.ownerID;
var newNodes = setIn(nodes, idx, newNode, isEditable);
if (isEditable) {
this.count = newCount;
this.nodes = newNodes;
return this;
}
return new HashArrayMapNode(ownerID, newCount, newNodes);
};
function HashCollisionNode(ownerID, keyHash, entries) {
this.ownerID = ownerID;
this.keyHash = keyHash;
this.entries = entries;
}
HashCollisionNode.prototype.get = function (shift, keyHash, key, notSetValue) {
var entries = this.entries;
for (var ii = 0, len = entries.length; ii < len; ii++) {
if (is(key, entries[ii][0])) {
return entries[ii][1];
}
}
return notSetValue;
};
HashCollisionNode.prototype.update = function (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {
if (keyHash === undefined) {
keyHash = hash(key);
}
var removed = value === NOT_SET;
if (keyHash !== this.keyHash) {
if (removed) {
return this;
}
SetRef(didAlter);
SetRef(didChangeSize);
return mergeIntoNode(this, ownerID, shift, keyHash, [key, value]);
}
var entries = this.entries;
var idx = 0;
for (var len = entries.length; idx < len; idx++) {
if (is(key, entries[idx][0])) {
break;
}
}
var exists = idx < len;
if (exists ? entries[idx][1] === value : removed) {
return this;
}
SetRef(didAlter);
(removed || !exists) && SetRef(didChangeSize);
if (removed && len === 2) {
return new ValueNode(ownerID, this.keyHash, entries[idx ^ 1]);
}
var isEditable = ownerID && ownerID === this.ownerID;
var newEntries = isEditable ? entries : arrCopy(entries);
if (exists) {
if (removed) {
idx === len - 1 ? newEntries.pop() : newEntries[idx] = newEntries.pop();
} else {
newEntries[idx] = [key, value];
}
} else {
newEntries.push([key, value]);
}
if (isEditable) {
this.entries = newEntries;
return this;
}
return new HashCollisionNode(ownerID, this.keyHash, newEntries);
};
function ValueNode(ownerID, keyHash, entry) {
this.ownerID = ownerID;
this.keyHash = keyHash;
this.entry = entry;
}
ValueNode.prototype.get = function (shift, keyHash, key, notSetValue) {
return is(key, this.entry[0]) ? this.entry[1] : notSetValue;
};
ValueNode.prototype.update = function (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {
var removed = value === NOT_SET;
var keyMatch = is(key, this.entry[0]);
if (keyMatch ? value === this.entry[1] : removed) {
return this;
}
SetRef(didAlter);
if (removed) {
SetRef(didChangeSize);
return;
}
if (keyMatch) {
if (ownerID && ownerID === this.ownerID) {
this.entry[1] = value;
return this;
}
return new ValueNode(ownerID, this.keyHash, [key, value]);
}
SetRef(didChangeSize);
return mergeIntoNode(this, ownerID, shift, hash(key), [key, value]);
};
ArrayMapNode.prototype.iterate = HashCollisionNode.prototype.iterate = function (fn, reverse) {
var entries = this.entries;
for (var ii = 0, maxIndex = entries.length - 1; ii <= maxIndex; ii++) {
if (fn(entries[reverse ? maxIndex - ii : ii]) === false) {
return false;
}
}
};
BitmapIndexedNode.prototype.iterate = HashArrayMapNode.prototype.iterate = function (fn, reverse) {
var nodes = this.nodes;
for (var ii = 0, maxIndex = nodes.length - 1; ii <= maxIndex; ii++) {
var node = nodes[reverse ? maxIndex - ii : ii];
if (node && node.iterate(fn, reverse) === false) {
return false;
}
}
};
ValueNode.prototype.iterate = function (fn, reverse) {
return fn(this.entry);
};
createClass(MapIterator, Iterator);
function MapIterator(map, type, reverse) {
this._type = type;
this._reverse = reverse;
this._stack = map._root && mapIteratorFrame(map._root);
}
MapIterator.prototype.next = function () {
var type = this._type;
var stack = this._stack;
while (stack) {
var node = stack.node;
var index = stack.index++;
var maxIndex;
if (node.entry) {
if (index === 0) {
return mapIteratorValue(type, node.entry);
}
} else if (node.entries) {
maxIndex = node.entries.length - 1;
if (index <= maxIndex) {
return mapIteratorValue(type, node.entries[this._reverse ? maxIndex - index : index]);
}
} else {
maxIndex = node.nodes.length - 1;
if (index <= maxIndex) {
var subNode = node.nodes[this._reverse ? maxIndex - index : index];
if (subNode) {
if (subNode.entry) {
return mapIteratorValue(type, subNode.entry);
}
stack = this._stack = mapIteratorFrame(subNode, stack);
}
continue;
}
}
stack = this._stack = this._stack.__prev;
}
return iteratorDone();
};
function mapIteratorValue(type, entry) {
return iteratorValue(type, entry[0], entry[1]);
}
function mapIteratorFrame(node, prev) {
return {
node: node,
index: 0,
__prev: prev
};
}
function makeMap(size, root, ownerID, hash) {
var map = Object.create(MapPrototype);
map.size = size;
map._root = root;
map.__ownerID = ownerID;
map.__hash = hash;
map.__altered = false;
return map;
}
var EMPTY_MAP;
function emptyMap() {
return EMPTY_MAP || (EMPTY_MAP = makeMap(0));
}
function updateMap(map, k, v) {
var newRoot;
var newSize;
if (!map._root) {
if (v === NOT_SET) {
return map;
}
newSize = 1;
newRoot = new ArrayMapNode(map.__ownerID, [[k, v]]);
} else {
var didChangeSize = MakeRef(CHANGE_LENGTH);
var didAlter = MakeRef(DID_ALTER);
newRoot = updateNode(map._root, map.__ownerID, 0, undefined, k, v, didChangeSize, didAlter);
if (!didAlter.value) {
return map;
}
newSize = map.size + (didChangeSize.value ? v === NOT_SET ? -1 : 1 : 0);
}
if (map.__ownerID) {
map.size = newSize;
map._root = newRoot;
map.__hash = undefined;
map.__altered = true;
return map;
}
return newRoot ? makeMap(newSize, newRoot) : emptyMap();
}
function updateNode(node, ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {
if (!node) {
if (value === NOT_SET) {
return node;
}
SetRef(didAlter);
SetRef(didChangeSize);
return new ValueNode(ownerID, keyHash, [key, value]);
}
return node.update(ownerID, shift, keyHash, key, value, didChangeSize, didAlter);
}
function isLeafNode(node) {
return node.constructor === ValueNode || node.constructor === HashCollisionNode;
}
function mergeIntoNode(node, ownerID, shift, keyHash, entry) {
if (node.keyHash === keyHash) {
return new HashCollisionNode(ownerID, keyHash, [node.entry, entry]);
}
var idx1 = (shift === 0 ? node.keyHash : node.keyHash >>> shift) & MASK;
var idx2 = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;
var newNode;
var nodes = idx1 === idx2 ? [mergeIntoNode(node, ownerID, shift + SHIFT, keyHash, entry)] : (newNode = new ValueNode(ownerID, keyHash, entry), idx1 < idx2 ? [node, newNode] : [newNode, node]);
return new BitmapIndexedNode(ownerID, 1 << idx1 | 1 << idx2, nodes);
}
function createNodes(ownerID, entries, key, value) {
if (!ownerID) {
ownerID = new OwnerID();
}
var node = new ValueNode(ownerID, hash(key), [key, value]);
for (var ii = 0; ii < entries.length; ii++) {
var entry = entries[ii];
node = node.update(ownerID, 0, undefined, entry[0], entry[1]);
}
return node;
}
function packNodes(ownerID, nodes, count, excluding) {
var bitmap = 0;
var packedII = 0;
var packedNodes = new Array(count);
for (var ii = 0, bit = 1, len = nodes.length; ii < len; ii++, bit <<= 1) {
var node = nodes[ii];
if (node !== undefined && ii !== excluding) {
bitmap |= bit;
packedNodes[packedII++] = node;
}
}
return new BitmapIndexedNode(ownerID, bitmap, packedNodes);
}
function expandNodes(ownerID, nodes, bitmap, including, node) {
var count = 0;
var expandedNodes = new Array(SIZE);
for (var ii = 0; bitmap !== 0; ii++, bitmap >>>= 1) {
expandedNodes[ii] = bitmap & 1 ? nodes[count++] : undefined;
}
expandedNodes[including] = node;
return new HashArrayMapNode(ownerID, count + 1, expandedNodes);
}
function mergeIntoMapWith(map, merger, iterables) {
var iters = [];
for (var ii = 0; ii < iterables.length; ii++) {
var value = iterables[ii];
var iter = KeyedIterable(value);
if (!isIterable(value)) {
iter = iter.map(function (v) {
return fromJS(v);
});
}
iters.push(iter);
}
return mergeIntoCollectionWith(map, merger, iters);
}
function deepMerger(existing, value, key) {
return existing && existing.mergeDeep && isIterable(value) ? existing.mergeDeep(value) : is(existing, value) ? existing : value;
}
function deepMergerWith(merger) {
return function (existing, value, key) {
if (existing && existing.mergeDeepWith && isIterable(value)) {
return existing.mergeDeepWith(merger, value);
}
var nextValue = merger(existing, value, key);
return is(existing, nextValue) ? existing : nextValue;
};
}
function mergeIntoCollectionWith(collection, merger, iters) {
iters = iters.filter(function (x) {
return x.size !== 0;
});
if (iters.length === 0) {
return collection;
}
if (collection.size === 0 && !collection.__ownerID && iters.length === 1) {
return collection.constructor(iters[0]);
}
return collection.withMutations(function (collection) {
var mergeIntoMap = merger ? function (value, key) {
collection.update(key, NOT_SET, function (existing) {
return existing === NOT_SET ? value : merger(existing, value, key);
});
} : function (value, key) {
collection.set(key, value);
};
for (var ii = 0; ii < iters.length; ii++) {
iters[ii].forEach(mergeIntoMap);
}
});
}
function updateInDeepMap(existing, keyPathIter, notSetValue, updater) {
var isNotSet = existing === NOT_SET;
var step = keyPathIter.next();
if (step.done) {
var existingValue = isNotSet ? notSetValue : existing;
var newValue = updater(existingValue);
return newValue === existingValue ? existing : newValue;
}
invariant(isNotSet || existing && existing.set, 'invalid keyPath');
var key = step.value;
var nextExisting = isNotSet ? NOT_SET : existing.get(key, NOT_SET);
var nextUpdated = updateInDeepMap(nextExisting, keyPathIter, notSetValue, updater);
return nextUpdated === nextExisting ? existing : nextUpdated === NOT_SET ? existing.remove(key) : (isNotSet ? emptyMap() : existing).set(key, nextUpdated);
}
function popCount(x) {
x = x - (x >> 1 & 0x55555555);
x = (x & 0x33333333) + (x >> 2 & 0x33333333);
x = x + (x >> 4) & 0x0f0f0f0f;
x = x + (x >> 8);
x = x + (x >> 16);
return x & 0x7f;
}
function setIn(array, idx, val, canEdit) {
var newArray = canEdit ? array : arrCopy(array);
newArray[idx] = val;
return newArray;
}
function spliceIn(array, idx, val, canEdit) {
var newLen = array.length + 1;
if (canEdit && idx + 1 === newLen) {
array[idx] = val;
return array;
}
var newArray = new Array(newLen);
var after = 0;
for (var ii = 0; ii < newLen; ii++) {
if (ii === idx) {
newArray[ii] = val;
after = -1;
} else {
newArray[ii] = array[ii + after];
}
}
return newArray;
}
function spliceOut(array, idx, canEdit) {
var newLen = array.length - 1;
if (canEdit && idx === newLen) {
array.pop();
return array;
}
var newArray = new Array(newLen);
var after = 0;
for (var ii = 0; ii < newLen; ii++) {
if (ii === idx) {
after = 1;
}
newArray[ii] = array[ii + after];
}
return newArray;
}
var MAX_ARRAY_MAP_SIZE = SIZE / 4;
var MAX_BITMAP_INDEXED_SIZE = SIZE / 2;
var MIN_HASH_ARRAY_MAP_SIZE = SIZE / 4;
createClass(List, IndexedCollection);
function List(value) {
var empty = emptyList();
if (value === null || value === undefined) {
return empty;
}
if (isList(value)) {
return value;
}
var iter = IndexedIterable(value);
var size = iter.size;
if (size === 0) {
return empty;
}
assertNotInfinite(size);
if (size > 0 && size < SIZE) {
return makeList(0, size, SHIFT, null, new VNode(iter.toArray()));
}
return empty.withMutations(function (list) {
list.setSize(size);
iter.forEach(function (v, i) {
return list.set(i, v);
});
});
}
List.of = function () {
return this(arguments);
};
List.prototype.toString = function () {
return this.__toString('List [', ']');
};
List.prototype.get = function (index, notSetValue) {
index = wrapIndex(this, index);
if (index >= 0 && index < this.size) {
index += this._origin;
var node = listNodeFor(this, index);
return node && node.array[index & MASK];
}
return notSetValue;
};
List.prototype.set = function (index, value) {
return updateList(this, index, value);
};
List.prototype.remove = function (index) {
return !this.has(index) ? this : index === 0 ? this.shift() : index === this.size - 1 ? this.pop() : this.splice(index, 1);
};
List.prototype.insert = function (index, value) {
return this.splice(index, 0, value);
};
List.prototype.clear = function () {
if (this.size === 0) {
return this;
}
if (this.__ownerID) {
this.size = this._origin = this._capacity = 0;
this._level = SHIFT;
this._root = this._tail = null;
this.__hash = undefined;
this.__altered = true;
return this;
}
return emptyList();
};
List.prototype.push = function () {
var values = arguments;
var oldSize = this.size;
return this.withMutations(function (list) {
setListBounds(list, 0, oldSize + values.length);
for (var ii = 0; ii < values.length; ii++) {
list.set(oldSize + ii, values[ii]);
}
});
};
List.prototype.pop = function () {
return setListBounds(this, 0, -1);
};
List.prototype.unshift = function () {
var values = arguments;
return this.withMutations(function (list) {
setListBounds(list, -values.length);
for (var ii = 0; ii < values.length; ii++) {
list.set(ii, values[ii]);
}
});
};
List.prototype.shift = function () {
return setListBounds(this, 1);
};
List.prototype.merge = function () {
return mergeIntoListWith(this, undefined, arguments);
};
List.prototype.mergeWith = function (merger) {
var iters = SLICE$0.call(arguments, 1);
return mergeIntoListWith(this, merger, iters);
};
List.prototype.mergeDeep = function () {
return mergeIntoListWith(this, deepMerger, arguments);
};
List.prototype.mergeDeepWith = function (merger) {
var iters = SLICE$0.call(arguments, 1);
return mergeIntoListWith(this, deepMergerWith(merger), iters);
};
List.prototype.setSize = function (size) {
return setListBounds(this, 0, size);
};
List.prototype.slice = function (begin, end) {
var size = this.size;
if (wholeSlice(begin, end, size)) {
return this;
}
return setListBounds(this, resolveBegin(begin, size), resolveEnd(end, size));
};
List.prototype.__iterator = function (type, reverse) {
var index = 0;
var values = iterateList(this, reverse);
return new Iterator(function () {
var value = values();
return value === DONE ? iteratorDone() : iteratorValue(type, index++, value);
});
};
List.prototype.__iterate = function (fn, reverse) {
var index = 0;
var values = iterateList(this, reverse);
var value;
while ((value = values()) !== DONE) {
if (fn(value, index++, this) === false) {
break;
}
}
return index;
};
List.prototype.__ensureOwner = function (ownerID) {
if (ownerID === this.__ownerID) {
return this;
}
if (!ownerID) {
this.__ownerID = ownerID;
return this;
}
return makeList(this._origin, this._capacity, this._level, this._root, this._tail, ownerID, this.__hash);
};
function isList(maybeList) {
return !!(maybeList && maybeList[IS_LIST_SENTINEL]);
}
List.isList = isList;
var IS_LIST_SENTINEL = '@@__IMMUTABLE_LIST__@@';
var ListPrototype = List.prototype;
ListPrototype[IS_LIST_SENTINEL] = true;
ListPrototype[DELETE] = ListPrototype.remove;
ListPrototype.setIn = MapPrototype.setIn;
ListPrototype.deleteIn = ListPrototype.removeIn = MapPrototype.removeIn;
ListPrototype.update = MapPrototype.update;
ListPrototype.updateIn = MapPrototype.updateIn;
ListPrototype.mergeIn = MapPrototype.mergeIn;
ListPrototype.mergeDeepIn = MapPrototype.mergeDeepIn;
ListPrototype.withMutations = MapPrototype.withMutations;
ListPrototype.asMutable = MapPrototype.asMutable;
ListPrototype.asImmutable = MapPrototype.asImmutable;
ListPrototype.wasAltered = MapPrototype.wasAltered;
function VNode(array, ownerID) {
this.array = array;
this.ownerID = ownerID;
}
VNode.prototype.removeBefore = function (ownerID, level, index) {
if (index === level ? 1 << level : 0 || this.array.length === 0) {
return this;
}
var originIndex = index >>> level & MASK;
if (originIndex >= this.array.length) {
return new VNode([], ownerID);
}
var removingFirst = originIndex === 0;
var newChild;
if (level > 0) {
var oldChild = this.array[originIndex];
newChild = oldChild && oldChild.removeBefore(ownerID, level - SHIFT, index);
if (newChild === oldChild && removingFirst) {
return this;
}
}
if (removingFirst && !newChild) {
return this;
}
var editable = editableVNode(this, ownerID);
if (!removingFirst) {
for (var ii = 0; ii < originIndex; ii++) {
editable.array[ii] = undefined;
}
}
if (newChild) {
editable.array[originIndex] = newChild;
}
return editable;
};
VNode.prototype.removeAfter = function (ownerID, level, index) {
if (index === (level ? 1 << level : 0) || this.array.length === 0) {
return this;
}
var sizeIndex = index - 1 >>> level & MASK;
if (sizeIndex >= this.array.length) {
return this;
}
var newChild;
if (level > 0) {
var oldChild = this.array[sizeIndex];
newChild = oldChild && oldChild.removeAfter(ownerID, level - SHIFT, index);
if (newChild === oldChild && sizeIndex === this.array.length - 1) {
return this;
}
}
var editable = editableVNode(this, ownerID);
editable.array.splice(sizeIndex + 1);
if (newChild) {
editable.array[sizeIndex] = newChild;
}
return editable;
};
var DONE = {};
function iterateList(list, reverse) {
var left = list._origin;
var right = list._capacity;
var tailPos = getTailOffset(right);
var tail = list._tail;
return iterateNodeOrLeaf(list._root, list._level, 0);
function iterateNodeOrLeaf(node, level, offset) {
return level === 0 ? iterateLeaf(node, offset) : iterateNode(node, level, offset);
}
function iterateLeaf(node, offset) {
var array = offset === tailPos ? tail && tail.array : node && node.array;
var from = offset > left ? 0 : left - offset;
var to = right - offset;
if (to > SIZE) {
to = SIZE;
}
return function () {
if (from === to) {
return DONE;
}
var idx = reverse ? --to : from++;
return array && array[idx];
};
}
function iterateNode(node, level, offset) {
var values;
var array = node && node.array;
var from = offset > left ? 0 : left - offset >> level;
var to = (right - offset >> level) + 1;
if (to > SIZE) {
to = SIZE;
}
return function () {
do {
if (values) {
var value = values();
if (value !== DONE) {
return value;
}
values = null;
}
if (from === to) {
return DONE;
}
var idx = reverse ? --to : from++;
values = iterateNodeOrLeaf(array && array[idx], level - SHIFT, offset + (idx << level));
} while (true);
};
}
}
function makeList(origin, capacity, level, root, tail, ownerID, hash) {
var list = Object.create(ListPrototype);
list.size = capacity - origin;
list._origin = origin;
list._capacity = capacity;
list._level = level;
list._root = root;
list._tail = tail;
list.__ownerID = ownerID;
list.__hash = hash;
list.__altered = false;
return list;
}
var EMPTY_LIST;
function emptyList() {
return EMPTY_LIST || (EMPTY_LIST = makeList(0, 0, SHIFT));
}
function updateList(list, index, value) {
index = wrapIndex(list, index);
if (index !== index) {
return list;
}
if (index >= list.size || index < 0) {
return list.withMutations(function (list) {
index < 0 ? setListBounds(list, index).set(0, value) : setListBounds(list, 0, index + 1).set(index, value);
});
}
index += list._origin;
var newTail = list._tail;
var newRoot = list._root;
var didAlter = MakeRef(DID_ALTER);
if (index >= getTailOffset(list._capacity)) {
newTail = updateVNode(newTail, list.__ownerID, 0, index, value, didAlter);
} else {
newRoot = updateVNode(newRoot, list.__ownerID, list._level, index, value, didAlter);
}
if (!didAlter.value) {
return list;
}
if (list.__ownerID) {
list._root = newRoot;
list._tail = newTail;
list.__hash = undefined;
list.__altered = true;
return list;
}
return makeList(list._origin, list._capacity, list._level, newRoot, newTail);
}
function updateVNode(node, ownerID, level, index, value, didAlter) {
var idx = index >>> level & MASK;
var nodeHas = node && idx < node.array.length;
if (!nodeHas && value === undefined) {
return node;
}
var newNode;
if (level > 0) {
var lowerNode = node && node.array[idx];
var newLowerNode = updateVNode(lowerNode, ownerID, level - SHIFT, index, value, didAlter);
if (newLowerNode === lowerNode) {
return node;
}
newNode = editableVNode(node, ownerID);
newNode.array[idx] = newLowerNode;
return newNode;
}
if (nodeHas && node.array[idx] === value) {
return node;
}
SetRef(didAlter);
newNode = editableVNode(node, ownerID);
if (value === undefined && idx === newNode.array.length - 1) {
newNode.array.pop();
} else {
newNode.array[idx] = value;
}
return newNode;
}
function editableVNode(node, ownerID) {
if (ownerID && node && ownerID === node.ownerID) {
return node;
}
return new VNode(node ? node.array.slice() : [], ownerID);
}
function listNodeFor(list, rawIndex) {
if (rawIndex >= getTailOffset(list._capacity)) {
return list._tail;
}
if (rawIndex < 1 << list._level + SHIFT) {
var node = list._root;
var level = list._level;
while (node && level > 0) {
node = node.array[rawIndex >>> level & MASK];
level -= SHIFT;
}
return node;
}
}
function setListBounds(list, begin, end) {
if (begin !== undefined) {
begin = begin | 0;
}
if (end !== undefined) {
end = end | 0;
}
var owner = list.__ownerID || new OwnerID();
var oldOrigin = list._origin;
var oldCapacity = list._capacity;
var newOrigin = oldOrigin + begin;
var newCapacity = end === undefined ? oldCapacity : end < 0 ? oldCapacity + end : oldOrigin + end;
if (newOrigin === oldOrigin && newCapacity === oldCapacity) {
return list;
}
if (newOrigin >= newCapacity) {
return list.clear();
}
var newLevel = list._level;
var newRoot = list._root;
var offsetShift = 0;
while (newOrigin + offsetShift < 0) {
newRoot = new VNode(newRoot && newRoot.array.length ? [undefined, newRoot] : [], owner);
newLevel += SHIFT;
offsetShift += 1 << newLevel;
}
if (offsetShift) {
newOrigin += offsetShift;
oldOrigin += offsetShift;
newCapacity += offsetShift;
oldCapacity += offsetShift;
}
var oldTailOffset = getTailOffset(oldCapacity);
var newTailOffset = getTailOffset(newCapacity);
while (newTailOffset >= 1 << newLevel + SHIFT) {
newRoot = new VNode(newRoot && newRoot.array.length ? [newRoot] : [], owner);
newLevel += SHIFT;
}
var oldTail = list._tail;
var newTail = newTailOffset < oldTailOffset ? listNodeFor(list, newCapacity - 1) : newTailOffset > oldTailOffset ? new VNode([], owner) : oldTail;
if (oldTail && newTailOffset > oldTailOffset && newOrigin < oldCapacity && oldTail.array.length) {
newRoot = editableVNode(newRoot, owner);
var node = newRoot;
for (var level = newLevel; level > SHIFT; level -= SHIFT) {
var idx = oldTailOffset >>> level & MASK;
node = node.array[idx] = editableVNode(node.array[idx], owner);
}
node.array[oldTailOffset >>> SHIFT & MASK] = oldTail;
}
if (newCapacity < oldCapacity) {
newTail = newTail && newTail.removeAfter(owner, 0, newCapacity);
}
if (newOrigin >= newTailOffset) {
newOrigin -= newTailOffset;
newCapacity -= newTailOffset;
newLevel = SHIFT;
newRoot = null;
newTail = newTail && newTail.removeBefore(owner, 0, newOrigin);
} else if (newOrigin > oldOrigin || newTailOffset < oldTailOffset) {
offsetShift = 0;
while (newRoot) {
var beginIndex = newOrigin >>> newLevel & MASK;
if (beginIndex !== newTailOffset >>> newLevel & MASK) {
break;
}
if (beginIndex) {
offsetShift += (1 << newLevel) * beginIndex;
}
newLevel -= SHIFT;
newRoot = newRoot.array[beginIndex];
}
if (newRoot && newOrigin > oldOrigin) {
newRoot = newRoot.removeBefore(owner, newLevel, newOrigin - offsetShift);
}
if (newRoot && newTailOffset < oldTailOffset) {
newRoot = newRoot.removeAfter(owner, newLevel, newTailOffset - offsetShift);
}
if (offsetShift) {
newOrigin -= offsetShift;
newCapacity -= offsetShift;
}
}
if (list.__ownerID) {
list.size = newCapacity - newOrigin;
list._origin = newOrigin;
list._capacity = newCapacity;
list._level = newLevel;
list._root = newRoot;
list._tail = newTail;
list.__hash = undefined;
list.__altered = true;
return list;
}
return makeList(newOrigin, newCapacity, newLevel, newRoot, newTail);
}
function mergeIntoListWith(list, merger, iterables) {
var iters = [];
var maxSize = 0;
for (var ii = 0; ii < iterables.length; ii++) {
var value = iterables[ii];
var iter = IndexedIterable(value);
if (iter.size > maxSize) {
maxSize = iter.size;
}
if (!isIterable(value)) {
iter = iter.map(function (v) {
return fromJS(v);
});
}
iters.push(iter);
}
if (maxSize > list.size) {
list = list.setSize(maxSize);
}
return mergeIntoCollectionWith(list, merger, iters);
}
function getTailOffset(size) {
return size < SIZE ? 0 : size - 1 >>> SHIFT << SHIFT;
}
createClass(OrderedMap, Map);
function OrderedMap(value) {
return value === null || value === undefined ? emptyOrderedMap() : isOrderedMap(value) ? value : emptyOrderedMap().withMutations(function (map) {
var iter = KeyedIterable(value);
assertNotInfinite(iter.size);
iter.forEach(function (v, k) {
return map.set(k, v);
});
});
}
OrderedMap.of = function () {
return this(arguments);
};
OrderedMap.prototype.toString = function () {
return this.__toString('OrderedMap {', '}');
};
OrderedMap.prototype.get = function (k, notSetValue) {
var index = this._map.get(k);
return index !== undefined ? this._list.get(index)[1] : notSetValue;
};
OrderedMap.prototype.clear = function () {
if (this.size === 0) {
return this;
}
if (this.__ownerID) {
this.size = 0;
this._map.clear();
this._list.clear();
return this;
}
return emptyOrderedMap();
};
OrderedMap.prototype.set = function (k, v) {
return updateOrderedMap(this, k, v);
};
OrderedMap.prototype.remove = function (k) {
return updateOrderedMap(this, k, NOT_SET);
};
OrderedMap.prototype.wasAltered = function () {
return this._map.wasAltered() || this._list.wasAltered();
};
OrderedMap.prototype.__iterate = function (fn, reverse) {
var this$0 = this;
return this._list.__iterate(function (entry) {
return entry && fn(entry[1], entry[0], this$0);
}, reverse);
};
OrderedMap.prototype.__iterator = function (type, reverse) {
return this._list.fromEntrySeq().__iterator(type, reverse);
};
OrderedMap.prototype.__ensureOwner = function (ownerID) {
if (ownerID === this.__ownerID) {
return this;
}
var newMap = this._map.__ensureOwner(ownerID);
var newList = this._list.__ensureOwner(ownerID);
if (!ownerID) {
this.__ownerID = ownerID;
this._map = newMap;
this._list = newList;
return this;
}
return makeOrderedMap(newMap, newList, ownerID, this.__hash);
};
function isOrderedMap(maybeOrderedMap) {
return isMap(maybeOrderedMap) && isOrdered(maybeOrderedMap);
}
OrderedMap.isOrderedMap = isOrderedMap;
OrderedMap.prototype[IS_ORDERED_SENTINEL] = true;
OrderedMap.prototype[DELETE] = OrderedMap.prototype.remove;
function makeOrderedMap(map, list, ownerID, hash) {
var omap = Object.create(OrderedMap.prototype);
omap.size = map ? map.size : 0;
omap._map = map;
omap._list = list;
omap.__ownerID = ownerID;
omap.__hash = hash;
return omap;
}
var EMPTY_ORDERED_MAP;
function emptyOrderedMap() {
return EMPTY_ORDERED_MAP || (EMPTY_ORDERED_MAP = makeOrderedMap(emptyMap(), emptyList()));
}
function updateOrderedMap(omap, k, v) {
var map = omap._map;
var list = omap._list;
var i = map.get(k);
var has = i !== undefined;
var newMap;
var newList;
if (v === NOT_SET) {
if (!has) {
return omap;
}
if (list.size >= SIZE && list.size >= map.size * 2) {
newList = list.filter(function (entry, idx) {
return entry !== undefined && i !== idx;
});
newMap = newList.toKeyedSeq().map(function (entry) {
return entry[0];
}).flip().toMap();
if (omap.__ownerID) {
newMap.__ownerID = newList.__ownerID = omap.__ownerID;
}
} else {
newMap = map.remove(k);
newList = i === list.size - 1 ? list.pop() : list.set(i, undefined);
}
} else {
if (has) {
if (v === list.get(i)[1]) {
return omap;
}
newMap = map;
newList = list.set(i, [k, v]);
} else {
newMap = map.set(k, list.size);
newList = list.set(list.size, [k, v]);
}
}
if (omap.__ownerID) {
omap.size = newMap.size;
omap._map = newMap;
omap._list = newList;
omap.__hash = undefined;
return omap;
}
return makeOrderedMap(newMap, newList);
}
createClass(ToKeyedSequence, KeyedSeq);
function ToKeyedSequence(indexed, useKeys) {
this._iter = indexed;
this._useKeys = useKeys;
this.size = indexed.size;
}
ToKeyedSequence.prototype.get = function (key, notSetValue) {
return this._iter.get(key, notSetValue);
};
ToKeyedSequence.prototype.has = function (key) {
return this._iter.has(key);
};
ToKeyedSequence.prototype.valueSeq = function () {
return this._iter.valueSeq();
};
ToKeyedSequence.prototype.reverse = function () {
var this$0 = this;
var reversedSequence = reverseFactory(this, true);
if (!this._useKeys) {
reversedSequence.valueSeq = function () {
return this$0._iter.toSeq().reverse();
};
}
return reversedSequence;
};
ToKeyedSequence.prototype.map = function (mapper, context) {
var this$0 = this;
var mappedSequence = mapFactory(this, mapper, context);
if (!this._useKeys) {
mappedSequence.valueSeq = function () {
return this$0._iter.toSeq().map(mapper, context);
};
}
return mappedSequence;
};
ToKeyedSequence.prototype.__iterate = function (fn, reverse) {
var this$0 = this;
var ii;
return this._iter.__iterate(this._useKeys ? function (v, k) {
return fn(v, k, this$0);
} : (ii = reverse ? resolveSize(this) : 0, function (v) {
return fn(v, reverse ? --ii : ii++, this$0);
}), reverse);
};
ToKeyedSequence.prototype.__iterator = function (type, reverse) {
if (this._useKeys) {
return this._iter.__iterator(type, reverse);
}
var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);
var ii = reverse ? resolveSize(this) : 0;
return new Iterator(function () {
var step = iterator.next();
return step.done ? step : iteratorValue(type, reverse ? --ii : ii++, step.value, step);
});
};
ToKeyedSequence.prototype[IS_ORDERED_SENTINEL] = true;
createClass(ToIndexedSequence, IndexedSeq);
function ToIndexedSequence(iter) {
this._iter = iter;
this.size = iter.size;
}
ToIndexedSequence.prototype.includes = function (value) {
return this._iter.includes(value);
};
ToIndexedSequence.prototype.__iterate = function (fn, reverse) {
var this$0 = this;
var iterations = 0;
return this._iter.__iterate(function (v) {
return fn(v, iterations++, this$0);
}, reverse);
};
ToIndexedSequence.prototype.__iterator = function (type, reverse) {
var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);
var iterations = 0;
return new Iterator(function () {
var step = iterator.next();
return step.done ? step : iteratorValue(type, iterations++, step.value, step);
});
};
createClass(ToSetSequence, SetSeq);
function ToSetSequence(iter) {
this._iter = iter;
this.size = iter.size;
}
ToSetSequence.prototype.has = function (key) {
return this._iter.includes(key);
};
ToSetSequence.prototype.__iterate = function (fn, reverse) {
var this$0 = this;
return this._iter.__iterate(function (v) {
return fn(v, v, this$0);
}, reverse);
};
ToSetSequence.prototype.__iterator = function (type, reverse) {
var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);
return new Iterator(function () {
var step = iterator.next();
return step.done ? step : iteratorValue(type, step.value, step.value, step);
});
};
createClass(FromEntriesSequence, KeyedSeq);
function FromEntriesSequence(entries) {
this._iter = entries;
this.size = entries.size;
}
FromEntriesSequence.prototype.entrySeq = function () {
return this._iter.toSeq();
};
FromEntriesSequence.prototype.__iterate = function (fn, reverse) {
var this$0 = this;
return this._iter.__iterate(function (entry) {
if (entry) {
validateEntry(entry);
var indexedIterable = isIterable(entry);
return fn(indexedIterable ? entry.get(1) : entry[1], indexedIterable ? entry.get(0) : entry[0], this$0);
}
}, reverse);
};
FromEntriesSequence.prototype.__iterator = function (type, reverse) {
var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);
return new Iterator(function () {
while (true) {
var step = iterator.next();
if (step.done) {
return step;
}
var entry = step.value;
if (entry) {
validateEntry(entry);
var indexedIterable = isIterable(entry);
return iteratorValue(type, indexedIterable ? entry.get(0) : entry[0], indexedIterable ? entry.get(1) : entry[1], step);
}
}
});
};
ToIndexedSequence.prototype.cacheResult = ToKeyedSequence.prototype.cacheResult = ToSetSequence.prototype.cacheResult = FromEntriesSequence.prototype.cacheResult = cacheResultThrough;
function flipFactory(iterable) {
var flipSequence = makeSequence(iterable);
flipSequence._iter = iterable;
flipSequence.size = iterable.size;
flipSequence.flip = function () {
return iterable;
};
flipSequence.reverse = function () {
var reversedSequence = iterable.reverse.apply(this);
reversedSequence.flip = function () {
return iterable.reverse();
};
return reversedSequence;
};
flipSequence.has = function (key) {
return iterable.includes(key);
};
flipSequence.includes = function (key) {
return iterable.has(key);
};
flipSequence.cacheResult = cacheResultThrough;
flipSequence.__iterateUncached = function (fn, reverse) {
var this$0 = this;
return iterable.__iterate(function (v, k) {
return fn(k, v, this$0) !== false;
}, reverse);
};
flipSequence.__iteratorUncached = function (type, reverse) {
if (type === ITERATE_ENTRIES) {
var iterator = iterable.__iterator(type, reverse);
return new Iterator(function () {
var step = iterator.next();
if (!step.done) {
var k = step.value[0];
step.value[0] = step.value[1];
step.value[1] = k;
}
return step;
});
}
return iterable.__iterator(type === ITERATE_VALUES ? ITERATE_KEYS : ITERATE_VALUES, reverse);
};
return flipSequence;
}
function mapFactory(iterable, mapper, context) {
var mappedSequence = makeSequence(iterable);
mappedSequence.size = iterable.size;
mappedSequence.has = function (key) {
return iterable.has(key);
};
mappedSequence.get = function (key, notSetValue) {
var v = iterable.get(key, NOT_SET);
return v === NOT_SET ? notSetValue : mapper.call(context, v, key, iterable);
};
mappedSequence.__iterateUncached = function (fn, reverse) {
var this$0 = this;
return iterable.__iterate(function (v, k, c) {
return fn(mapper.call(context, v, k, c), k, this$0) !== false;
}, reverse);
};
mappedSequence.__iteratorUncached = function (type, reverse) {
var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);
return new Iterator(function () {
var step = iterator.next();
if (step.done) {
return step;
}
var entry = step.value;
var key = entry[0];
return iteratorValue(type, key, mapper.call(context, entry[1], key, iterable), step);
});
};
return mappedSequence;
}
function reverseFactory(iterable, useKeys) {
var reversedSequence = makeSequence(iterable);
reversedSequence._iter = iterable;
reversedSequence.size = iterable.size;
reversedSequence.reverse = function () {
return iterable;
};
if (iterable.flip) {
reversedSequence.flip = function () {
var flipSequence = flipFactory(iterable);
flipSequence.reverse = function () {
return iterable.flip();
};
return flipSequence;
};
}
reversedSequence.get = function (key, notSetValue) {
return iterable.get(useKeys ? key : -1 - key, notSetValue);
};
reversedSequence.has = function (key) {
return iterable.has(useKeys ? key : -1 - key);
};
reversedSequence.includes = function (value) {
return iterable.includes(value);
};
reversedSequence.cacheResult = cacheResultThrough;
reversedSequence.__iterate = function (fn, reverse) {
var this$0 = this;
return iterable.__iterate(function (v, k) {
return fn(v, k, this$0);
}, !reverse);
};
reversedSequence.__iterator = function (type, reverse) {
return iterable.__iterator(type, !reverse);
};
return reversedSequence;
}
function filterFactory(iterable, predicate, context, useKeys) {
var filterSequence = makeSequence(iterable);
if (useKeys) {
filterSequence.has = function (key) {
var v = iterable.get(key, NOT_SET);
return v !== NOT_SET && !!predicate.call(context, v, key, iterable);
};
filterSequence.get = function (key, notSetValue) {
var v = iterable.get(key, NOT_SET);
return v !== NOT_SET && predicate.call(context, v, key, iterable) ? v : notSetValue;
};
}
filterSequence.__iterateUncached = function (fn, reverse) {
var this$0 = this;
var iterations = 0;
iterable.__iterate(function (v, k, c) {
if (predicate.call(context, v, k, c)) {
iterations++;
return fn(v, useKeys ? k : iterations - 1, this$0);
}
}, reverse);
return iterations;
};
filterSequence.__iteratorUncached = function (type, reverse) {
var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);
var iterations = 0;
return new Iterator(function () {
while (true) {
var step = iterator.next();
if (step.done) {
return step;
}
var entry = step.value;
var key = entry[0];
var value = entry[1];
if (predicate.call(context, value, key, iterable)) {
return iteratorValue(type, useKeys ? key : iterations++, value, step);
}
}
});
};
return filterSequence;
}
function countByFactory(iterable, grouper, context) {
var groups = Map().asMutable();
iterable.__iterate(function (v, k) {
groups.update(grouper.call(context, v, k, iterable), 0, function (a) {
return a + 1;
});
});
return groups.asImmutable();
}
function groupByFactory(iterable, grouper, context) {
var isKeyedIter = isKeyed(iterable);
var groups = (isOrdered(iterable) ? OrderedMap() : Map()).asMutable();
iterable.__iterate(function (v, k) {
groups.update(grouper.call(context, v, k, iterable), function (a) {
return a = a || [], a.push(isKeyedIter ? [k, v] : v), a;
});
});
var coerce = iterableClass(iterable);
return groups.map(function (arr) {
return reify(iterable, coerce(arr));
});
}
function sliceFactory(iterable, begin, end, useKeys) {
var originalSize = iterable.size;
if (begin !== undefined) {
begin = begin | 0;
}
if (end !== undefined) {
end = end | 0;
}
if (wholeSlice(begin, end, originalSize)) {
return iterable;
}
var resolvedBegin = resolveBegin(begin, originalSize);
var resolvedEnd = resolveEnd(end, originalSize);
if (resolvedBegin !== resolvedBegin || resolvedEnd !== resolvedEnd) {
return sliceFactory(iterable.toSeq().cacheResult(), begin, end, useKeys);
}
var resolvedSize = resolvedEnd - resolvedBegin;
var sliceSize;
if (resolvedSize === resolvedSize) {
sliceSize = resolvedSize < 0 ? 0 : resolvedSize;
}
var sliceSeq = makeSequence(iterable);
sliceSeq.size = sliceSize === 0 ? sliceSize : iterable.size && sliceSize || undefined;
if (!useKeys && isSeq(iterable) && sliceSize >= 0) {
sliceSeq.get = function (index, notSetValue) {
index = wrapIndex(this, index);
return index >= 0 && index < sliceSize ? iterable.get(index + resolvedBegin, notSetValue) : notSetValue;
};
}
sliceSeq.__iterateUncached = function (fn, reverse) {
var this$0 = this;
if (sliceSize === 0) {
return 0;
}
if (reverse) {
return this.cacheResult().__iterate(fn, reverse);
}
var skipped = 0;
var isSkipping = true;
var iterations = 0;
iterable.__iterate(function (v, k) {
if (!(isSkipping && (isSkipping = skipped++ < resolvedBegin))) {
iterations++;
return fn(v, useKeys ? k : iterations - 1, this$0) !== false && iterations !== sliceSize;
}
});
return iterations;
};
sliceSeq.__iteratorUncached = function (type, reverse) {
if (sliceSize !== 0 && reverse) {
return this.cacheResult().__iterator(type, reverse);
}
var iterator = sliceSize !== 0 && iterable.__iterator(type, reverse);
var skipped = 0;
var iterations = 0;
return new Iterator(function () {
while (skipped++ < resolvedBegin) {
iterator.next();
}
if (++iterations > sliceSize) {
return iteratorDone();
}
var step = iterator.next();
if (useKeys || type === ITERATE_VALUES) {
return step;
} else if (type === ITERATE_KEYS) {
return iteratorValue(type, iterations - 1, undefined, step);
} else {
return iteratorValue(type, iterations - 1, step.value[1], step);
}
});
};
return sliceSeq;
}
function takeWhileFactory(iterable, predicate, context) {
var takeSequence = makeSequence(iterable);
takeSequence.__iterateUncached = function (fn, reverse) {
var this$0 = this;
if (reverse) {
return this.cacheResult().__iterate(fn, reverse);
}
var iterations = 0;
iterable.__iterate(function (v, k, c) {
return predicate.call(context, v, k, c) && ++iterations && fn(v, k, this$0);
});
return iterations;
};
takeSequence.__iteratorUncached = function (type, reverse) {
var this$0 = this;
if (reverse) {
return this.cacheResult().__iterator(type, reverse);
}
var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);
var iterating = true;
return new Iterator(function () {
if (!iterating) {
return iteratorDone();
}
var step = iterator.next();
if (step.done) {
return step;
}
var entry = step.value;
var k = entry[0];
var v = entry[1];
if (!predicate.call(context, v, k, this$0)) {
iterating = false;
return iteratorDone();
}
return type === ITERATE_ENTRIES ? step : iteratorValue(type, k, v, step);
});
};
return takeSequence;
}
function skipWhileFactory(iterable, predicate, context, useKeys) {
var skipSequence = makeSequence(iterable);
skipSequence.__iterateUncached = function (fn, reverse) {
var this$0 = this;
if (reverse) {
return this.cacheResult().__iterate(fn, reverse);
}
var isSkipping = true;
var iterations = 0;
iterable.__iterate(function (v, k, c) {
if (!(isSkipping && (isSkipping = predicate.call(context, v, k, c)))) {
iterations++;
return fn(v, useKeys ? k : iterations - 1, this$0);
}
});
return iterations;
};
skipSequence.__iteratorUncached = function (type, reverse) {
var this$0 = this;
if (reverse) {
return this.cacheResult().__iterator(type, reverse);
}
var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);
var skipping = true;
var iterations = 0;
return new Iterator(function () {
var step, k, v;
do {
step = iterator.next();
if (step.done) {
if (useKeys || type === ITERATE_VALUES) {
return step;
} else if (type === ITERATE_KEYS) {
return iteratorValue(type, iterations++, undefined, step);
} else {
return iteratorValue(type, iterations++, step.value[1], step);
}
}
var entry = step.value;
k = entry[0];
v = entry[1];
skipping && (skipping = predicate.call(context, v, k, this$0));
} while (skipping);
return type === ITERATE_ENTRIES ? step : iteratorValue(type, k, v, step);
});
};
return skipSequence;
}
function concatFactory(iterable, values) {
var isKeyedIterable = isKeyed(iterable);
var iters = [iterable].concat(values).map(function (v) {
if (!isIterable(v)) {
v = isKeyedIterable ? keyedSeqFromValue(v) : indexedSeqFromValue(Array.isArray(v) ? v : [v]);
} else if (isKeyedIterable) {
v = KeyedIterable(v);
}
return v;
}).filter(function (v) {
return v.size !== 0;
});
if (iters.length === 0) {
return iterable;
}
if (iters.length === 1) {
var singleton = iters[0];
if (singleton === iterable || isKeyedIterable && isKeyed(singleton) || isIndexed(iterable) && isIndexed(singleton)) {
return singleton;
}
}
var concatSeq = new ArraySeq(iters);
if (isKeyedIterable) {
concatSeq = concatSeq.toKeyedSeq();
} else if (!isIndexed(iterable)) {
concatSeq = concatSeq.toSetSeq();
}
concatSeq = concatSeq.flatten(true);
concatSeq.size = iters.reduce(function (sum, seq) {
if (sum !== undefined) {
var size = seq.size;
if (size !== undefined) {
return sum + size;
}
}
}, 0);
return concatSeq;
}
function flattenFactory(iterable, depth, useKeys) {
var flatSequence = makeSequence(iterable);
flatSequence.__iterateUncached = function (fn, reverse) {
var iterations = 0;
var stopped = false;
function flatDeep(iter, currentDepth) {
var this$0 = this;
iter.__iterate(function (v, k) {
if ((!depth || currentDepth < depth) && isIterable(v)) {
flatDeep(v, currentDepth + 1);
} else if (fn(v, useKeys ? k : iterations++, this$0) === false) {
stopped = true;
}
return !stopped;
}, reverse);
}
flatDeep(iterable, 0);
return iterations;
};
flatSequence.__iteratorUncached = function (type, reverse) {
var iterator = iterable.__iterator(type, reverse);
var stack = [];
var iterations = 0;
return new Iterator(function () {
while (iterator) {
var step = iterator.next();
if (step.done !== false) {
iterator = stack.pop();
continue;
}
var v = step.value;
if (type === ITERATE_ENTRIES) {
v = v[1];
}
if ((!depth || stack.length < depth) && isIterable(v)) {
stack.push(iterator);
iterator = v.__iterator(type, reverse);
} else {
return useKeys ? step : iteratorValue(type, iterations++, v, step);
}
}
return iteratorDone();
});
};
return flatSequence;
}
function flatMapFactory(iterable, mapper, context) {
var coerce = iterableClass(iterable);
return iterable.toSeq().map(function (v, k) {
return coerce(mapper.call(context, v, k, iterable));
}).flatten(true);
}
function interposeFactory(iterable, separator) {
var interposedSequence = makeSequence(iterable);
interposedSequence.size = iterable.size && iterable.size * 2 - 1;
interposedSequence.__iterateUncached = function (fn, reverse) {
var this$0 = this;
var iterations = 0;
iterable.__iterate(function (v, k) {
return (!iterations || fn(separator, iterations++, this$0) !== false) && fn(v, iterations++, this$0) !== false;
}, reverse);
return iterations;
};
interposedSequence.__iteratorUncached = function (type, reverse) {
var iterator = iterable.__iterator(ITERATE_VALUES, reverse);
var iterations = 0;
var step;
return new Iterator(function () {
if (!step || iterations % 2) {
step = iterator.next();
if (step.done) {
return step;
}
}
return iterations % 2 ? iteratorValue(type, iterations++, separator) : iteratorValue(type, iterations++, step.value, step);
});
};
return interposedSequence;
}
function sortFactory(iterable, comparator, mapper) {
if (!comparator) {
comparator = defaultComparator;
}
var isKeyedIterable = isKeyed(iterable);
var index = 0;
var entries = iterable.toSeq().map(function (v, k) {
return [k, v, index++, mapper ? mapper(v, k, iterable) : v];
}).toArray();
entries.sort(function (a, b) {
return comparator(a[3], b[3]) || a[2] - b[2];
}).forEach(isKeyedIterable ? function (v, i) {
entries[i].length = 2;
} : function (v, i) {
entries[i] = v[1];
});
return isKeyedIterable ? KeyedSeq(entries) : isIndexed(iterable) ? IndexedSeq(entries) : SetSeq(entries);
}
function maxFactory(iterable, comparator, mapper) {
if (!comparator) {
comparator = defaultComparator;
}
if (mapper) {
var entry = iterable.toSeq().map(function (v, k) {
return [v, mapper(v, k, iterable)];
}).reduce(function (a, b) {
return maxCompare(comparator, a[1], b[1]) ? b : a;
});
return entry && entry[0];
} else {
return iterable.reduce(function (a, b) {
return maxCompare(comparator, a, b) ? b : a;
});
}
}
function maxCompare(comparator, a, b) {
var comp = comparator(b, a);
return comp === 0 && b !== a && (b === undefined || b === null || b !== b) || comp > 0;
}
function zipWithFactory(keyIter, zipper, iters) {
var zipSequence = makeSequence(keyIter);
zipSequence.size = new ArraySeq(iters).map(function (i) {
return i.size;
}).min();
zipSequence.__iterate = function (fn, reverse) {
var iterator = this.__iterator(ITERATE_VALUES, reverse);
var step;
var iterations = 0;
while (!(step = iterator.next()).done) {
if (fn(step.value, iterations++, this) === false) {
break;
}
}
return iterations;
};
zipSequence.__iteratorUncached = function (type, reverse) {
var iterators = iters.map(function (i) {
return i = Iterable(i), getIterator(reverse ? i.reverse() : i);
});
var iterations = 0;
var isDone = false;
return new Iterator(function () {
var steps;
if (!isDone) {
steps = iterators.map(function (i) {
return i.next();
});
isDone = steps.some(function (s) {
return s.done;
});
}
if (isDone) {
return iteratorDone();
}
return iteratorValue(type, iterations++, zipper.apply(null, steps.map(function (s) {
return s.value;
})));
});
};
return zipSequence;
}
function reify(iter, seq) {
return isSeq(iter) ? seq : iter.constructor(seq);
}
function validateEntry(entry) {
if (entry !== Object(entry)) {
throw new TypeError('Expected [K, V] tuple: ' + entry);
}
}
function resolveSize(iter) {
assertNotInfinite(iter.size);
return ensureSize(iter);
}
function iterableClass(iterable) {
return isKeyed(iterable) ? KeyedIterable : isIndexed(iterable) ? IndexedIterable : SetIterable;
}
function makeSequence(iterable) {
return Object.create((isKeyed(iterable) ? KeyedSeq : isIndexed(iterable) ? IndexedSeq : SetSeq).prototype);
}
function cacheResultThrough() {
if (this._iter.cacheResult) {
this._iter.cacheResult();
this.size = this._iter.size;
return this;
} else {
return Seq.prototype.cacheResult.call(this);
}
}
function defaultComparator(a, b) {
return a > b ? 1 : a < b ? -1 : 0;
}
function forceIterator(keyPath) {
var iter = getIterator(keyPath);
if (!iter) {
if (!isArrayLike(keyPath)) {
throw new TypeError('Expected iterable or array-like: ' + keyPath);
}
iter = getIterator(Iterable(keyPath));
}
return iter;
}
createClass(Record, KeyedCollection);
function Record(defaultValues, name) {
var hasInitialized;
var RecordType = function Record(values) {
if (values instanceof RecordType) {
return values;
}
if (!(this instanceof RecordType)) {
return new RecordType(values);
}
if (!hasInitialized) {
hasInitialized = true;
var keys = Object.keys(defaultValues);
setProps(RecordTypePrototype, keys);
RecordTypePrototype.size = keys.length;
RecordTypePrototype._name = name;
RecordTypePrototype._keys = keys;
RecordTypePrototype._defaultValues = defaultValues;
}
this._map = Map(values);
};
var RecordTypePrototype = RecordType.prototype = Object.create(RecordPrototype);
RecordTypePrototype.constructor = RecordType;
return RecordType;
}
Record.prototype.toString = function () {
return this.__toString(recordName(this) + ' {', '}');
};
Record.prototype.has = function (k) {
return this._defaultValues.hasOwnProperty(k);
};
Record.prototype.get = function (k, notSetValue) {
if (!this.has(k)) {
return notSetValue;
}
var defaultVal = this._defaultValues[k];
return this._map ? this._map.get(k, defaultVal) : defaultVal;
};
Record.prototype.clear = function () {
if (this.__ownerID) {
this._map && this._map.clear();
return this;
}
var RecordType = this.constructor;
return RecordType._empty || (RecordType._empty = makeRecord(this, emptyMap()));
};
Record.prototype.set = function (k, v) {
if (!this.has(k)) {
throw new Error('Cannot set unknown key "' + k + '" on ' + recordName(this));
}
var newMap = this._map && this._map.set(k, v);
if (this.__ownerID || newMap === this._map) {
return this;
}
return makeRecord(this, newMap);
};
Record.prototype.remove = function (k) {
if (!this.has(k)) {
return this;
}
var newMap = this._map && this._map.remove(k);
if (this.__ownerID || newMap === this._map) {
return this;
}
return makeRecord(this, newMap);
};
Record.prototype.wasAltered = function () {
return this._map.wasAltered();
};
Record.prototype.__iterator = function (type, reverse) {
var this$0 = this;
return KeyedIterable(this._defaultValues).map(function (_, k) {
return this$0.get(k);
}).__iterator(type, reverse);
};
Record.prototype.__iterate = function (fn, reverse) {
var this$0 = this;
return KeyedIterable(this._defaultValues).map(function (_, k) {
return this$0.get(k);
}).__iterate(fn, reverse);
};
Record.prototype.__ensureOwner = function (ownerID) {
if (ownerID === this.__ownerID) {
return this;
}
var newMap = this._map && this._map.__ensureOwner(ownerID);
if (!ownerID) {
this.__ownerID = ownerID;
this._map = newMap;
return this;
}
return makeRecord(this, newMap, ownerID);
};
var RecordPrototype = Record.prototype;
RecordPrototype[DELETE] = RecordPrototype.remove;
RecordPrototype.deleteIn = RecordPrototype.removeIn = MapPrototype.removeIn;
RecordPrototype.merge = MapPrototype.merge;
RecordPrototype.mergeWith = MapPrototype.mergeWith;
RecordPrototype.mergeIn = MapPrototype.mergeIn;
RecordPrototype.mergeDeep = MapPrototype.mergeDeep;
RecordPrototype.mergeDeepWith = MapPrototype.mergeDeepWith;
RecordPrototype.mergeDeepIn = MapPrototype.mergeDeepIn;
RecordPrototype.setIn = MapPrototype.setIn;
RecordPrototype.update = MapPrototype.update;
RecordPrototype.updateIn = MapPrototype.updateIn;
RecordPrototype.withMutations = MapPrototype.withMutations;
RecordPrototype.asMutable = MapPrototype.asMutable;
RecordPrototype.asImmutable = MapPrototype.asImmutable;
function makeRecord(likeRecord, map, ownerID) {
var record = Object.create(Object.getPrototypeOf(likeRecord));
record._map = map;
record.__ownerID = ownerID;
return record;
}
function recordName(record) {
return record._name || record.constructor.name || 'Record';
}
function setProps(prototype, names) {
try {
names.forEach(setProp.bind(undefined, prototype));
} catch (error) {}
}
function setProp(prototype, name) {
Object.defineProperty(prototype, name, {
get: function get() {
return this.get(name);
},
set: function set(value) {
invariant(this.__ownerID, 'Cannot set on an immutable record.');
this.set(name, value);
}
});
}
createClass(Set, SetCollection);
function Set(value) {
return value === null || value === undefined ? emptySet() : isSet(value) && !isOrdered(value) ? value : emptySet().withMutations(function (set) {
var iter = SetIterable(value);
assertNotInfinite(iter.size);
iter.forEach(function (v) {
return set.add(v);
});
});
}
Set.of = function () {
return this(arguments);
};
Set.fromKeys = function (value) {
return this(KeyedIterable(value).keySeq());
};
Set.prototype.toString = function () {
return this.__toString('Set {', '}');
};
Set.prototype.has = function (value) {
return this._map.has(value);
};
Set.prototype.add = function (value) {
return updateSet(this, this._map.set(value, true));
};
Set.prototype.remove = function (value) {
return updateSet(this, this._map.remove(value));
};
Set.prototype.clear = function () {
return updateSet(this, this._map.clear());
};
Set.prototype.union = function () {
var iters = SLICE$0.call(arguments, 0);
iters = iters.filter(function (x) {
return x.size !== 0;
});
if (iters.length === 0) {
return this;
}
if (this.size === 0 && !this.__ownerID && iters.length === 1) {
return this.constructor(iters[0]);
}
return this.withMutations(function (set) {
for (var ii = 0; ii < iters.length; ii++) {
SetIterable(iters[ii]).forEach(function (value) {
return set.add(value);
});
}
});
};
Set.prototype.intersect = function () {
var iters = SLICE$0.call(arguments, 0);
if (iters.length === 0) {
return this;
}
iters = iters.map(function (iter) {
return SetIterable(iter);
});
var originalSet = this;
return this.withMutations(function (set) {
originalSet.forEach(function (value) {
if (!iters.every(function (iter) {
return iter.includes(value);
})) {
set.remove(value);
}
});
});
};
Set.prototype.subtract = function () {
var iters = SLICE$0.call(arguments, 0);
if (iters.length === 0) {
return this;
}
iters = iters.map(function (iter) {
return SetIterable(iter);
});
var originalSet = this;
return this.withMutations(function (set) {
originalSet.forEach(function (value) {
if (iters.some(function (iter) {
return iter.includes(value);
})) {
set.remove(value);
}
});
});
};
Set.prototype.merge = function () {
return this.union.apply(this, arguments);
};
Set.prototype.mergeWith = function (merger) {
var iters = SLICE$0.call(arguments, 1);
return this.union.apply(this, iters);
};
Set.prototype.sort = function (comparator) {
return OrderedSet(sortFactory(this, comparator));
};
Set.prototype.sortBy = function (mapper, comparator) {
return OrderedSet(sortFactory(this, comparator, mapper));
};
Set.prototype.wasAltered = function () {
return this._map.wasAltered();
};
Set.prototype.__iterate = function (fn, reverse) {
var this$0 = this;
return this._map.__iterate(function (_, k) {
return fn(k, k, this$0);
}, reverse);
};
Set.prototype.__iterator = function (type, reverse) {
return this._map.map(function (_, k) {
return k;
}).__iterator(type, reverse);
};
Set.prototype.__ensureOwner = function (ownerID) {
if (ownerID === this.__ownerID) {
return this;
}
var newMap = this._map.__ensureOwner(ownerID);
if (!ownerID) {
this.__ownerID = ownerID;
this._map = newMap;
return this;
}
return this.__make(newMap, ownerID);
};
function isSet(maybeSet) {
return !!(maybeSet && maybeSet[IS_SET_SENTINEL]);
}
Set.isSet = isSet;
var IS_SET_SENTINEL = '@@__IMMUTABLE_SET__@@';
var SetPrototype = Set.prototype;
SetPrototype[IS_SET_SENTINEL] = true;
SetPrototype[DELETE] = SetPrototype.remove;
SetPrototype.mergeDeep = SetPrototype.merge;
SetPrototype.mergeDeepWith = SetPrototype.mergeWith;
SetPrototype.withMutations = MapPrototype.withMutations;
SetPrototype.asMutable = MapPrototype.asMutable;
SetPrototype.asImmutable = MapPrototype.asImmutable;
SetPrototype.__empty = emptySet;
SetPrototype.__make = makeSet;
function updateSet(set, newMap) {
if (set.__ownerID) {
set.size = newMap.size;
set._map = newMap;
return set;
}
return newMap === set._map ? set : newMap.size === 0 ? set.__empty() : set.__make(newMap);
}
function makeSet(map, ownerID) {
var set = Object.create(SetPrototype);
set.size = map ? map.size : 0;
set._map = map;
set.__ownerID = ownerID;
return set;
}
var EMPTY_SET;
function emptySet() {
return EMPTY_SET || (EMPTY_SET = makeSet(emptyMap()));
}
createClass(OrderedSet, Set);
function OrderedSet(value) {
return value === null || value === undefined ? emptyOrderedSet() : isOrderedSet(value) ? value : emptyOrderedSet().withMutations(function (set) {
var iter = SetIterable(value);
assertNotInfinite(iter.size);
iter.forEach(function (v) {
return set.add(v);
});
});
}
OrderedSet.of = function () {
return this(arguments);
};
OrderedSet.fromKeys = function (value) {
return this(KeyedIterable(value).keySeq());
};
OrderedSet.prototype.toString = function () {
return this.__toString('OrderedSet {', '}');
};
function isOrderedSet(maybeOrderedSet) {
return isSet(maybeOrderedSet) && isOrdered(maybeOrderedSet);
}
OrderedSet.isOrderedSet = isOrderedSet;
var OrderedSetPrototype = OrderedSet.prototype;
OrderedSetPrototype[IS_ORDERED_SENTINEL] = true;
OrderedSetPrototype.__empty = emptyOrderedSet;
OrderedSetPrototype.__make = makeOrderedSet;
function makeOrderedSet(map, ownerID) {
var set = Object.create(OrderedSetPrototype);
set.size = map ? map.size : 0;
set._map = map;
set.__ownerID = ownerID;
return set;
}
var EMPTY_ORDERED_SET;
function emptyOrderedSet() {
return EMPTY_ORDERED_SET || (EMPTY_ORDERED_SET = makeOrderedSet(emptyOrderedMap()));
}
createClass(Stack, IndexedCollection);
function Stack(value) {
return value === null || value === undefined ? emptyStack() : isStack(value) ? value : emptyStack().unshiftAll(value);
}
Stack.of = function () {
return this(arguments);
};
Stack.prototype.toString = function () {
return this.__toString('Stack [', ']');
};
Stack.prototype.get = function (index, notSetValue) {
var head = this._head;
index = wrapIndex(this, index);
while (head && index--) {
head = head.next;
}
return head ? head.value : notSetValue;
};
Stack.prototype.peek = function () {
return this._head && this._head.value;
};
Stack.prototype.push = function () {
if (arguments.length === 0) {
return this;
}
var newSize = this.size + arguments.length;
var head = this._head;
for (var ii = arguments.length - 1; ii >= 0; ii--) {
head = {
value: arguments[ii],
next: head
};
}
if (this.__ownerID) {
this.size = newSize;
this._head = head;
this.__hash = undefined;
this.__altered = true;
return this;
}
return makeStack(newSize, head);
};
Stack.prototype.pushAll = function (iter) {
iter = IndexedIterable(iter);
if (iter.size === 0) {
return this;
}
assertNotInfinite(iter.size);
var newSize = this.size;
var head = this._head;
iter.reverse().forEach(function (value) {
newSize++;
head = {
value: value,
next: head
};
});
if (this.__ownerID) {
this.size = newSize;
this._head = head;
this.__hash = undefined;
this.__altered = true;
return this;
}
return makeStack(newSize, head);
};
Stack.prototype.pop = function () {
return this.slice(1);
};
Stack.prototype.unshift = function () {
return this.push.apply(this, arguments);
};
Stack.prototype.unshiftAll = function (iter) {
return this.pushAll(iter);
};
Stack.prototype.shift = function () {
return this.pop.apply(this, arguments);
};
Stack.prototype.clear = function () {
if (this.size === 0) {
return this;
}
if (this.__ownerID) {
this.size = 0;
this._head = undefined;
this.__hash = undefined;
this.__altered = true;
return this;
}
return emptyStack();
};
Stack.prototype.slice = function (begin, end) {
if (wholeSlice(begin, end, this.size)) {
return this;
}
var resolvedBegin = resolveBegin(begin, this.size);
var resolvedEnd = resolveEnd(end, this.size);
if (resolvedEnd !== this.size) {
return IndexedCollection.prototype.slice.call(this, begin, end);
}
var newSize = this.size - resolvedBegin;
var head = this._head;
while (resolvedBegin--) {
head = head.next;
}
if (this.__ownerID) {
this.size = newSize;
this._head = head;
this.__hash = undefined;
this.__altered = true;
return this;
}
return makeStack(newSize, head);
};
Stack.prototype.__ensureOwner = function (ownerID) {
if (ownerID === this.__ownerID) {
return this;
}
if (!ownerID) {
this.__ownerID = ownerID;
this.__altered = false;
return this;
}
return makeStack(this.size, this._head, ownerID, this.__hash);
};
Stack.prototype.__iterate = function (fn, reverse) {
if (reverse) {
return this.reverse().__iterate(fn);
}
var iterations = 0;
var node = this._head;
while (node) {
if (fn(node.value, iterations++, this) === false) {
break;
}
node = node.next;
}
return iterations;
};
Stack.prototype.__iterator = function (type, reverse) {
if (reverse) {
return this.reverse().__iterator(type);
}
var iterations = 0;
var node = this._head;
return new Iterator(function () {
if (node) {
var value = node.value;
node = node.next;
return iteratorValue(type, iterations++, value);
}
return iteratorDone();
});
};
function isStack(maybeStack) {
return !!(maybeStack && maybeStack[IS_STACK_SENTINEL]);
}
Stack.isStack = isStack;
var IS_STACK_SENTINEL = '@@__IMMUTABLE_STACK__@@';
var StackPrototype = Stack.prototype;
StackPrototype[IS_STACK_SENTINEL] = true;
StackPrototype.withMutations = MapPrototype.withMutations;
StackPrototype.asMutable = MapPrototype.asMutable;
StackPrototype.asImmutable = MapPrototype.asImmutable;
StackPrototype.wasAltered = MapPrototype.wasAltered;
function makeStack(size, head, ownerID, hash) {
var map = Object.create(StackPrototype);
map.size = size;
map._head = head;
map.__ownerID = ownerID;
map.__hash = hash;
map.__altered = false;
return map;
}
var EMPTY_STACK;
function emptyStack() {
return EMPTY_STACK || (EMPTY_STACK = makeStack(0));
}
function mixin(ctor, methods) {
var keyCopier = function keyCopier(key) {
ctor.prototype[key] = methods[key];
};
Object.keys(methods).forEach(keyCopier);
Object.getOwnPropertySymbols && Object.getOwnPropertySymbols(methods).forEach(keyCopier);
return ctor;
}
Iterable.Iterator = Iterator;
mixin(Iterable, {
toArray: function toArray() {
assertNotInfinite(this.size);
var array = new Array(this.size || 0);
this.valueSeq().__iterate(function (v, i) {
array[i] = v;
});
return array;
},
toIndexedSeq: function toIndexedSeq() {
return new ToIndexedSequence(this);
},
toJS: function toJS() {
return this.toSeq().map(function (value) {
return value && typeof value.toJS === 'function' ? value.toJS() : value;
}).__toJS();
},
toJSON: function toJSON() {
return this.toSeq().map(function (value) {
return value && typeof value.toJSON === 'function' ? value.toJSON() : value;
}).__toJS();
},
toKeyedSeq: function toKeyedSeq() {
return new ToKeyedSequence(this, true);
},
toMap: function toMap() {
return Map(this.toKeyedSeq());
},
toObject: function toObject() {
assertNotInfinite(this.size);
var object = {};
this.__iterate(function (v, k) {
object[k] = v;
});
return object;
},
toOrderedMap: function toOrderedMap() {
return OrderedMap(this.toKeyedSeq());
},
toOrderedSet: function toOrderedSet() {
return OrderedSet(isKeyed(this) ? this.valueSeq() : this);
},
toSet: function toSet() {
return Set(isKeyed(this) ? this.valueSeq() : this);
},
toSetSeq: function toSetSeq() {
return new ToSetSequence(this);
},
toSeq: function toSeq() {
return isIndexed(this) ? this.toIndexedSeq() : isKeyed(this) ? this.toKeyedSeq() : this.toSetSeq();
},
toStack: function toStack() {
return Stack(isKeyed(this) ? this.valueSeq() : this);
},
toList: function toList() {
return List(isKeyed(this) ? this.valueSeq() : this);
},
toString: function toString() {
return '[Iterable]';
},
__toString: function __toString(head, tail) {
if (this.size === 0) {
return head + tail;
}
return head + ' ' + this.toSeq().map(this.__toStringMapper).join(', ') + ' ' + tail;
},
concat: function concat() {
var values = SLICE$0.call(arguments, 0);
return reify(this, concatFactory(this, values));
},
includes: function includes(searchValue) {
return this.some(function (value) {
return is(value, searchValue);
});
},
entries: function entries() {
return this.__iterator(ITERATE_ENTRIES);
},
every: function every(predicate, context) {
assertNotInfinite(this.size);
var returnValue = true;
this.__iterate(function (v, k, c) {
if (!predicate.call(context, v, k, c)) {
returnValue = false;
return false;
}
});
return returnValue;
},
filter: function filter(predicate, context) {
return reify(this, filterFactory(this, predicate, context, true));
},
find: function find(predicate, context, notSetValue) {
var entry = this.findEntry(predicate, context);
return entry ? entry[1] : notSetValue;
},
findEntry: function findEntry(predicate, context) {
var found;
this.__iterate(function (v, k, c) {
if (predicate.call(context, v, k, c)) {
found = [k, v];
return false;
}
});
return found;
},
findLastEntry: function findLastEntry(predicate, context) {
return this.toSeq().reverse().findEntry(predicate, context);
},
forEach: function forEach(sideEffect, context) {
assertNotInfinite(this.size);
return this.__iterate(context ? sideEffect.bind(context) : sideEffect);
},
join: function join(separator) {
assertNotInfinite(this.size);
separator = separator !== undefined ? '' + separator : ',';
var joined = '';
var isFirst = true;
this.__iterate(function (v) {
isFirst ? isFirst = false : joined += separator;
joined += v !== null && v !== undefined ? v.toString() : '';
});
return joined;
},
keys: function keys() {
return this.__iterator(ITERATE_KEYS);
},
map: function map(mapper, context) {
return reify(this, mapFactory(this, mapper, context));
},
reduce: function reduce(reducer, initialReduction, context) {
assertNotInfinite(this.size);
var reduction;
var useFirst;
if (arguments.length < 2) {
useFirst = true;
} else {
reduction = initialReduction;
}
this.__iterate(function (v, k, c) {
if (useFirst) {
useFirst = false;
reduction = v;
} else {
reduction = reducer.call(context, reduction, v, k, c);
}
});
return reduction;
},
reduceRight: function reduceRight(reducer, initialReduction, context) {
var reversed = this.toKeyedSeq().reverse();
return reversed.reduce.apply(reversed, arguments);
},
reverse: function reverse() {
return reify(this, reverseFactory(this, true));
},
slice: function slice(begin, end) {
return reify(this, sliceFactory(this, begin, end, true));
},
some: function some(predicate, context) {
return !this.every(not(predicate), context);
},
sort: function sort(comparator) {
return reify(this, sortFactory(this, comparator));
},
values: function values() {
return this.__iterator(ITERATE_VALUES);
},
butLast: function butLast() {
return this.slice(0, -1);
},
isEmpty: function isEmpty() {
return this.size !== undefined ? this.size === 0 : !this.some(function () {
return true;
});
},
count: function count(predicate, context) {
return ensureSize(predicate ? this.toSeq().filter(predicate, context) : this);
},
countBy: function countBy(grouper, context) {
return countByFactory(this, grouper, context);
},
equals: function equals(other) {
return deepEqual(this, other);
},
entrySeq: function entrySeq() {
var iterable = this;
if (iterable._cache) {
return new ArraySeq(iterable._cache);
}
var entriesSequence = iterable.toSeq().map(entryMapper).toIndexedSeq();
entriesSequence.fromEntrySeq = function () {
return iterable.toSeq();
};
return entriesSequence;
},
filterNot: function filterNot(predicate, context) {
return this.filter(not(predicate), context);
},
findLast: function findLast(predicate, context, notSetValue) {
return this.toKeyedSeq().reverse().find(predicate, context, notSetValue);
},
first: function first() {
return this.find(returnTrue);
},
flatMap: function flatMap(mapper, context) {
return reify(this, flatMapFactory(this, mapper, context));
},
flatten: function flatten(depth) {
return reify(this, flattenFactory(this, depth, true));
},
fromEntrySeq: function fromEntrySeq() {
return new FromEntriesSequence(this);
},
get: function get(searchKey, notSetValue) {
return this.find(function (_, key) {
return is(key, searchKey);
}, undefined, notSetValue);
},
getIn: function getIn(searchKeyPath, notSetValue) {
var nested = this;
var iter = forceIterator(searchKeyPath);
var step;
while (!(step = iter.next()).done) {
var key = step.value;
nested = nested && nested.get ? nested.get(key, NOT_SET) : NOT_SET;
if (nested === NOT_SET) {
return notSetValue;
}
}
return nested;
},
groupBy: function groupBy(grouper, context) {
return groupByFactory(this, grouper, context);
},
has: function has(searchKey) {
return this.get(searchKey, NOT_SET) !== NOT_SET;
},
hasIn: function hasIn(searchKeyPath) {
return this.getIn(searchKeyPath, NOT_SET) !== NOT_SET;
},
isSubset: function isSubset(iter) {
iter = typeof iter.includes === 'function' ? iter : Iterable(iter);
return this.every(function (value) {
return iter.includes(value);
});
},
isSuperset: function isSuperset(iter) {
iter = typeof iter.isSubset === 'function' ? iter : Iterable(iter);
return iter.isSubset(this);
},
keySeq: function keySeq() {
return this.toSeq().map(keyMapper).toIndexedSeq();
},
last: function last() {
return this.toSeq().reverse().first();
},
max: function max(comparator) {
return maxFactory(this, comparator);
},
maxBy: function maxBy(mapper, comparator) {
return maxFactory(this, comparator, mapper);
},
min: function min(comparator) {
return maxFactory(this, comparator ? neg(comparator) : defaultNegComparator);
},
minBy: function minBy(mapper, comparator) {
return maxFactory(this, comparator ? neg(comparator) : defaultNegComparator, mapper);
},
rest: function rest() {
return this.slice(1);
},
skip: function skip(amount) {
return this.slice(Math.max(0, amount));
},
skipLast: function skipLast(amount) {
return reify(this, this.toSeq().reverse().skip(amount).reverse());
},
skipWhile: function skipWhile(predicate, context) {
return reify(this, skipWhileFactory(this, predicate, context, true));
},
skipUntil: function skipUntil(predicate, context) {
return this.skipWhile(not(predicate), context);
},
sortBy: function sortBy(mapper, comparator) {
return reify(this, sortFactory(this, comparator, mapper));
},
take: function take(amount) {
return this.slice(0, Math.max(0, amount));
},
takeLast: function takeLast(amount) {
return reify(this, this.toSeq().reverse().take(amount).reverse());
},
takeWhile: function takeWhile(predicate, context) {
return reify(this, takeWhileFactory(this, predicate, context));
},
takeUntil: function takeUntil(predicate, context) {
return this.takeWhile(not(predicate), context);
},
valueSeq: function valueSeq() {
return this.toIndexedSeq();
},
hashCode: function hashCode() {
return this.__hash || (this.__hash = hashIterable(this));
}
});
var IterablePrototype = Iterable.prototype;
IterablePrototype[IS_ITERABLE_SENTINEL] = true;
IterablePrototype[ITERATOR_SYMBOL] = IterablePrototype.values;
IterablePrototype.__toJS = IterablePrototype.toArray;
IterablePrototype.__toStringMapper = quoteString;
IterablePrototype.inspect = IterablePrototype.toSource = function () {
return this.toString();
};
IterablePrototype.chain = IterablePrototype.flatMap;
IterablePrototype.contains = IterablePrototype.includes;
(function () {
try {
Object.defineProperty(IterablePrototype, 'length', {
get: function get() {
if (!Iterable.noLengthWarning) {
var stack;
try {
throw new Error();
} catch (error) {
stack = error.stack;
}
if (stack.indexOf('_wrapObject') === -1) {
console && console.warn && console.warn('iterable.length has been deprecated, ' + 'use iterable.size or iterable.count(). ' + 'This warning will become a silent error in a future version. ' + stack);
return this.size;
}
}
}
});
} catch (e) {}
})();
mixin(KeyedIterable, {
flip: function flip() {
return reify(this, flipFactory(this));
},
findKey: function findKey(predicate, context) {
var entry = this.findEntry(predicate, context);
return entry && entry[0];
},
findLastKey: function findLastKey(predicate, context) {
return this.toSeq().reverse().findKey(predicate, context);
},
keyOf: function keyOf(searchValue) {
return this.findKey(function (value) {
return is(value, searchValue);
});
},
lastKeyOf: function lastKeyOf(searchValue) {
return this.findLastKey(function (value) {
return is(value, searchValue);
});
},
mapEntries: function mapEntries(mapper, context) {
var this$0 = this;
var iterations = 0;
return reify(this, this.toSeq().map(function (v, k) {
return mapper.call(context, [k, v], iterations++, this$0);
}).fromEntrySeq());
},
mapKeys: function mapKeys(mapper, context) {
var this$0 = this;
return reify(this, this.toSeq().flip().map(function (k, v) {
return mapper.call(context, k, v, this$0);
}).flip());
}
});
var KeyedIterablePrototype = KeyedIterable.prototype;
KeyedIterablePrototype[IS_KEYED_SENTINEL] = true;
KeyedIterablePrototype[ITERATOR_SYMBOL] = IterablePrototype.entries;
KeyedIterablePrototype.__toJS = IterablePrototype.toObject;
KeyedIterablePrototype.__toStringMapper = function (v, k) {
return JSON.stringify(k) + ': ' + quoteString(v);
};
mixin(IndexedIterable, {
toKeyedSeq: function toKeyedSeq() {
return new ToKeyedSequence(this, false);
},
filter: function filter(predicate, context) {
return reify(this, filterFactory(this, predicate, context, false));
},
findIndex: function findIndex(predicate, context) {
var entry = this.findEntry(predicate, context);
return entry ? entry[0] : -1;
},
indexOf: function indexOf(searchValue) {
var key = this.toKeyedSeq().keyOf(searchValue);
return key === undefined ? -1 : key;
},
lastIndexOf: function lastIndexOf(searchValue) {
var key = this.toKeyedSeq().reverse().keyOf(searchValue);
return key === undefined ? -1 : key;
},
reverse: function reverse() {
return reify(this, reverseFactory(this, false));
},
slice: function slice(begin, end) {
return reify(this, sliceFactory(this, begin, end, false));
},
splice: function splice(index, removeNum) {
var numArgs = arguments.length;
removeNum = Math.max(removeNum | 0, 0);
if (numArgs === 0 || numArgs === 2 && !removeNum) {
return this;
}
index = resolveBegin(index, index < 0 ? this.count() : this.size);
var spliced = this.slice(0, index);
return reify(this, numArgs === 1 ? spliced : spliced.concat(arrCopy(arguments, 2), this.slice(index + removeNum)));
},
findLastIndex: function findLastIndex(predicate, context) {
var key = this.toKeyedSeq().findLastKey(predicate, context);
return key === undefined ? -1 : key;
},
first: function first() {
return this.get(0);
},
flatten: function flatten(depth) {
return reify(this, flattenFactory(this, depth, false));
},
get: function get(index, notSetValue) {
index = wrapIndex(this, index);
return index < 0 || this.size === Infinity || this.size !== undefined && index > this.size ? notSetValue : this.find(function (_, key) {
return key === index;
}, undefined, notSetValue);
},
has: function has(index) {
index = wrapIndex(this, index);
return index >= 0 && (this.size !== undefined ? this.size === Infinity || index < this.size : this.indexOf(index) !== -1);
},
interpose: function interpose(separator) {
return reify(this, interposeFactory(this, separator));
},
interleave: function interleave() {
var iterables = [this].concat(arrCopy(arguments));
var zipped = zipWithFactory(this.toSeq(), IndexedSeq.of, iterables);
var interleaved = zipped.flatten(true);
if (zipped.size) {
interleaved.size = zipped.size * iterables.length;
}
return reify(this, interleaved);
},
last: function last() {
return this.get(-1);
},
skipWhile: function skipWhile(predicate, context) {
return reify(this, skipWhileFactory(this, predicate, context, false));
},
zip: function zip() {
var iterables = [this].concat(arrCopy(arguments));
return reify(this, zipWithFactory(this, defaultZipper, iterables));
},
zipWith: function zipWith(zipper) {
var iterables = arrCopy(arguments);
iterables[0] = this;
return reify(this, zipWithFactory(this, zipper, iterables));
}
});
IndexedIterable.prototype[IS_INDEXED_SENTINEL] = true;
IndexedIterable.prototype[IS_ORDERED_SENTINEL] = true;
mixin(SetIterable, {
get: function get(value, notSetValue) {
return this.has(value) ? value : notSetValue;
},
includes: function includes(value) {
return this.has(value);
},
keySeq: function keySeq() {
return this.valueSeq();
}
});
SetIterable.prototype.has = IterablePrototype.includes;
mixin(KeyedSeq, KeyedIterable.prototype);
mixin(IndexedSeq, IndexedIterable.prototype);
mixin(SetSeq, SetIterable.prototype);
mixin(KeyedCollection, KeyedIterable.prototype);
mixin(IndexedCollection, IndexedIterable.prototype);
mixin(SetCollection, SetIterable.prototype);
function keyMapper(v, k) {
return k;
}
function entryMapper(v, k) {
return [k, v];
}
function not(predicate) {
return function () {
return !predicate.apply(this, arguments);
};
}
function neg(predicate) {
return function () {
return -predicate.apply(this, arguments);
};
}
function quoteString(value) {
return typeof value === 'string' ? JSON.stringify(value) : value;
}
function defaultZipper() {
return arrCopy(arguments);
}
function defaultNegComparator(a, b) {
return a < b ? 1 : a > b ? -1 : 0;
}
function hashIterable(iterable) {
if (iterable.size === Infinity) {
return 0;
}
var ordered = isOrdered(iterable);
var keyed = isKeyed(iterable);
var h = ordered ? 1 : 0;
var size = iterable.__iterate(keyed ? ordered ? function (v, k) {
h = 31 * h + hashMerge(hash(v), hash(k)) | 0;
} : function (v, k) {
h = h + hashMerge(hash(v), hash(k)) | 0;
} : ordered ? function (v) {
h = 31 * h + hash(v) | 0;
} : function (v) {
h = h + hash(v) | 0;
});
return murmurHashOfSize(size, h);
}
function murmurHashOfSize(size, h) {
h = imul(h, 0xCC9E2D51);
h = imul(h << 15 | h >>> -15, 0x1B873593);
h = imul(h << 13 | h >>> -13, 5);
h = (h + 0xE6546B64 | 0) ^ size;
h = imul(h ^ h >>> 16, 0x85EBCA6B);
h = imul(h ^ h >>> 13, 0xC2B2AE35);
h = smi(h ^ h >>> 16);
return h;
}
function hashMerge(a, b) {
return a ^ b + 0x9E3779B9 + (a << 6) + (a >> 2) | 0;
}
var Immutable = {
Iterable: Iterable,
Seq: Seq,
Collection: Collection,
Map: Map,
OrderedMap: OrderedMap,
List: List,
Stack: Stack,
Set: Set,
OrderedSet: OrderedSet,
Record: Record,
Range: Range,
Repeat: Repeat,
is: is,
fromJS: fromJS
};
return Immutable;
});
}, 338, null, "immutable/dist/immutable.js");
__d(/* NavigatorBreadcrumbNavigationBar */function(global, require, module, exports) {
'use strict';
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/node_modules/react-native/Libraries/CustomComponents/Navigator/NavigatorBreadcrumbNavigationBar.js';
var NavigatorBreadcrumbNavigationBarStyles = require(340 ); // 340 = NavigatorBreadcrumbNavigationBarStyles
var NavigatorNavigationBarStylesAndroid = require(343 ); // 343 = NavigatorNavigationBarStylesAndroid
var NavigatorNavigationBarStylesIOS = require(341 ); // 341 = NavigatorNavigationBarStylesIOS
var Platform = require(79 ); // 79 = Platform
var React = require(126 ); // 126 = React
var StyleSheet = require(127 ); // 127 = StyleSheet
var View = require(146 ); // 146 = View
var guid = require(225 ); // 225 = guid
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var _require = require(338 ), // 338 = immutable
Map = _require.Map;
var Interpolators = NavigatorBreadcrumbNavigationBarStyles.Interpolators;
var NavigatorNavigationBarStyles = Platform.OS === 'android' ? NavigatorNavigationBarStylesAndroid : NavigatorNavigationBarStylesIOS;
var PropTypes = React.PropTypes;
var CRUMB_PROPS = Interpolators.map(function () {
return { style: {} };
});
var ICON_PROPS = Interpolators.map(function () {
return { style: {} };
});
var SEPARATOR_PROPS = Interpolators.map(function () {
return { style: {} };
});
var TITLE_PROPS = Interpolators.map(function () {
return { style: {} };
});
var RIGHT_BUTTON_PROPS = Interpolators.map(function () {
return { style: {} };
});
function navStatePresentedIndex(navState) {
if (navState.presentedIndex !== undefined) {
return navState.presentedIndex;
}
return navState.observedTopOfStack;
}
function initStyle(index, presentedIndex) {
return index === presentedIndex ? NavigatorBreadcrumbNavigationBarStyles.Center[index] : index < presentedIndex ? NavigatorBreadcrumbNavigationBarStyles.Left[index] : NavigatorBreadcrumbNavigationBarStyles.Right[index];
}
var NavigatorBreadcrumbNavigationBar = function (_React$Component) {
babelHelpers.inherits(NavigatorBreadcrumbNavigationBar, _React$Component);
function NavigatorBreadcrumbNavigationBar() {
var _ref;
var _temp, _this, _ret;
babelHelpers.classCallCheck(this, NavigatorBreadcrumbNavigationBar);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = babelHelpers.possibleConstructorReturn(this, (_ref = NavigatorBreadcrumbNavigationBar.__proto__ || Object.getPrototypeOf(NavigatorBreadcrumbNavigationBar)).call.apply(_ref, [this].concat(args))), _this), _this._getBreadcrumb = function (route, index) {
var pointerEvents = _this.props.navState.routeStack.length <= 1 && index === 0 ? 'none' : 'auto';
var navBarRouteMapper = _this.props.routeMapper;
var firstStyles = initStyle(index, navStatePresentedIndex(_this.props.navState));
var breadcrumbDescriptor = React.createElement(
View,
{
key: 'crumb_' + index,
pointerEvents: pointerEvents,
ref: 'crumb_' + index,
style: firstStyles.Crumb, __source: {
fileName: _jsxFileName,
lineNumber: 234
}
},
React.createElement(
View,
{ ref: 'icon_' + index, style: firstStyles.Icon, __source: {
fileName: _jsxFileName,
lineNumber: 239
}
},
navBarRouteMapper.iconForRoute(route, _this.props.navigator)
),
React.createElement(
View,
{ ref: 'separator_' + index, style: firstStyles.Separator, __source: {
fileName: _jsxFileName,
lineNumber: 242
}
},
navBarRouteMapper.separatorForRoute(route, _this.props.navigator)
)
);
return breadcrumbDescriptor;
}, _this._getTitle = function (route, index) {
if (_this._descriptors.title.has(route)) {
return _this._descriptors.title.get(route);
}
var titleContent = _this.props.routeMapper.titleContentForRoute(_this.props.navState.routeStack[index], _this.props.navigator);
var firstStyles = initStyle(index, navStatePresentedIndex(_this.props.navState));
var titleDescriptor = React.createElement(
View,
{
key: 'title_' + index,
ref: 'title_' + index,
style: firstStyles.Title, __source: {
fileName: _jsxFileName,
lineNumber: 263
}
},
titleContent
);
_this._descriptors.title = _this._descriptors.title.set(route, titleDescriptor);
return titleDescriptor;
}, _this._getRightButton = function (route, index) {
if (_this._descriptors.right.has(route)) {
return _this._descriptors.right.get(route);
}
var rightContent = _this.props.routeMapper.rightContentForRoute(_this.props.navState.routeStack[index], _this.props.navigator);
if (!rightContent) {
_this._descriptors.right = _this._descriptors.right.set(route, null);
return null;
}
var firstStyles = initStyle(index, navStatePresentedIndex(_this.props.navState));
var rightButtonDescriptor = React.createElement(
View,
{
key: 'right_' + index,
ref: 'right_' + index,
style: firstStyles.RightItem, __source: {
fileName: _jsxFileName,
lineNumber: 288
}
},
rightContent
);
_this._descriptors.right = _this._descriptors.right.set(route, rightButtonDescriptor);
return rightButtonDescriptor;
}, _temp), babelHelpers.possibleConstructorReturn(_this, _ret);
}
babelHelpers.createClass(NavigatorBreadcrumbNavigationBar, [{
key: '_updateIndexProgress',
value: function _updateIndexProgress(progress, index, fromIndex, toIndex) {
var amount = toIndex > fromIndex ? progress : 1 - progress;
var oldDistToCenter = index - fromIndex;
var newDistToCenter = index - toIndex;
var interpolate;
invariant(Interpolators[index], 'Cannot find breadcrumb interpolators for ' + index);
if (oldDistToCenter > 0 && newDistToCenter === 0 || newDistToCenter > 0 && oldDistToCenter === 0) {
interpolate = Interpolators[index].RightToCenter;
} else if (oldDistToCenter < 0 && newDistToCenter === 0 || newDistToCenter < 0 && oldDistToCenter === 0) {
interpolate = Interpolators[index].CenterToLeft;
} else if (oldDistToCenter === newDistToCenter) {
interpolate = Interpolators[index].RightToCenter;
} else {
interpolate = Interpolators[index].RightToLeft;
}
if (interpolate.Crumb(CRUMB_PROPS[index].style, amount)) {
this._setPropsIfExists('crumb_' + index, CRUMB_PROPS[index]);
}
if (interpolate.Icon(ICON_PROPS[index].style, amount)) {
this._setPropsIfExists('icon_' + index, ICON_PROPS[index]);
}
if (interpolate.Separator(SEPARATOR_PROPS[index].style, amount)) {
this._setPropsIfExists('separator_' + index, SEPARATOR_PROPS[index]);
}
if (interpolate.Title(TITLE_PROPS[index].style, amount)) {
this._setPropsIfExists('title_' + index, TITLE_PROPS[index]);
}
var right = this.refs['right_' + index];
var rightButtonStyle = RIGHT_BUTTON_PROPS[index].style;
if (right && interpolate.RightItem(rightButtonStyle, amount)) {
right.setNativeProps({
style: rightButtonStyle,
pointerEvents: rightButtonStyle.opacity === 0 ? 'none' : 'auto'
});
}
}
}, {
key: 'updateProgress',
value: function updateProgress(progress, fromIndex, toIndex) {
var max = Math.max(fromIndex, toIndex);
var min = Math.min(fromIndex, toIndex);
for (var index = min; index <= max; index++) {
this._updateIndexProgress(progress, index, fromIndex, toIndex);
}
}
}, {
key: 'onAnimationStart',
value: function onAnimationStart(fromIndex, toIndex) {
var max = Math.max(fromIndex, toIndex);
var min = Math.min(fromIndex, toIndex);
for (var index = min; index <= max; index++) {
this._setRenderViewsToHardwareTextureAndroid(index, true);
}
}
}, {
key: 'onAnimationEnd',
value: function onAnimationEnd() {
var max = this.props.navState.routeStack.length - 1;
for (var index = 0; index <= max; index++) {
this._setRenderViewsToHardwareTextureAndroid(index, false);
}
}
}, {
key: '_setRenderViewsToHardwareTextureAndroid',
value: function _setRenderViewsToHardwareTextureAndroid(index, renderToHardwareTexture) {
var props = {
renderToHardwareTextureAndroid: renderToHardwareTexture
};
this._setPropsIfExists('icon_' + index, props);
this._setPropsIfExists('separator_' + index, props);
this._setPropsIfExists('title_' + index, props);
this._setPropsIfExists('right_' + index, props);
}
}, {
key: 'componentWillMount',
value: function componentWillMount() {
this._reset();
}
}, {
key: 'render',
value: function render() {
var navState = this.props.navState;
var icons = navState && navState.routeStack.map(this._getBreadcrumb);
var titles = navState.routeStack.map(this._getTitle);
var buttons = navState.routeStack.map(this._getRightButton);
return React.createElement(
View,
{
key: this._key,
style: [styles.breadCrumbContainer, this.props.style], __source: {
fileName: _jsxFileName,
lineNumber: 196
}
},
titles,
icons,
buttons
);
}
}, {
key: 'immediatelyRefresh',
value: function immediatelyRefresh() {
this._reset();
this.forceUpdate();
}
}, {
key: '_reset',
value: function _reset() {
this._key = guid();
this._descriptors = {
title: new Map(),
right: new Map()
};
}
}, {
key: '_setPropsIfExists',
value: function _setPropsIfExists(ref, props) {
var ref = this.refs[ref];
ref && ref.setNativeProps(props);
}
}]);
return NavigatorBreadcrumbNavigationBar;
}(React.Component);
NavigatorBreadcrumbNavigationBar.propTypes = {
navigator: PropTypes.shape({
push: PropTypes.func,
pop: PropTypes.func,
replace: PropTypes.func,
popToRoute: PropTypes.func,
popToTop: PropTypes.func
}),
routeMapper: PropTypes.shape({
rightContentForRoute: PropTypes.func,
titleContentForRoute: PropTypes.func,
iconForRoute: PropTypes.func
}),
navState: React.PropTypes.shape({
routeStack: React.PropTypes.arrayOf(React.PropTypes.object),
presentedIndex: React.PropTypes.number
}),
style: View.propTypes.style
};
NavigatorBreadcrumbNavigationBar.Styles = NavigatorBreadcrumbNavigationBarStyles;
var styles = StyleSheet.create({
breadCrumbContainer: {
overflow: 'hidden',
position: 'absolute',
height: NavigatorNavigationBarStyles.General.TotalNavHeight,
top: 0,
left: 0,
right: 0
}
});
module.exports = NavigatorBreadcrumbNavigationBar;
}, 339, null, "NavigatorBreadcrumbNavigationBar");
__d(/* NavigatorBreadcrumbNavigationBarStyles */function(global, require, module, exports) {
'use strict';
var Dimensions = require(129 ); // 129 = Dimensions
var NavigatorNavigationBarStylesIOS = require(341 ); // 341 = NavigatorNavigationBarStylesIOS
var buildStyleInterpolator = require(342 ); // 342 = buildStyleInterpolator
var merge = require(149 ); // 149 = merge
var SCREEN_WIDTH = Dimensions.get('window').width;
var STATUS_BAR_HEIGHT = NavigatorNavigationBarStylesIOS.General.StatusBarHeight;
var NAV_BAR_HEIGHT = NavigatorNavigationBarStylesIOS.General.NavBarHeight;
var SPACING = 4;
var ICON_WIDTH = 40;
var SEPARATOR_WIDTH = 9;
var CRUMB_WIDTH = ICON_WIDTH + SEPARATOR_WIDTH;
var OPACITY_RATIO = 100;
var ICON_INACTIVE_OPACITY = 0.6;
var MAX_BREADCRUMBS = 10;
var CRUMB_BASE = {
position: 'absolute',
flexDirection: 'row',
top: STATUS_BAR_HEIGHT,
width: CRUMB_WIDTH,
height: NAV_BAR_HEIGHT,
backgroundColor: 'transparent'
};
var ICON_BASE = {
width: ICON_WIDTH,
height: NAV_BAR_HEIGHT
};
var SEPARATOR_BASE = {
width: SEPARATOR_WIDTH,
height: NAV_BAR_HEIGHT
};
var TITLE_BASE = {
position: 'absolute',
top: STATUS_BAR_HEIGHT,
height: NAV_BAR_HEIGHT,
backgroundColor: 'transparent'
};
var FIRST_TITLE_BASE = merge(TITLE_BASE, {
left: 0,
right: 0,
alignItems: 'center',
height: NAV_BAR_HEIGHT
});
var RIGHT_BUTTON_BASE = {
position: 'absolute',
top: STATUS_BAR_HEIGHT,
right: SPACING,
overflow: 'hidden',
opacity: 1,
height: NAV_BAR_HEIGHT,
backgroundColor: 'transparent'
};
var LEFT = [];
var CENTER = [];
var RIGHT = [];
for (var i = 0; i < MAX_BREADCRUMBS; i++) {
var crumbLeft = CRUMB_WIDTH * i + SPACING;
LEFT[i] = {
Crumb: merge(CRUMB_BASE, { left: crumbLeft }),
Icon: merge(ICON_BASE, { opacity: ICON_INACTIVE_OPACITY }),
Separator: merge(SEPARATOR_BASE, { opacity: 1 }),
Title: merge(TITLE_BASE, { left: crumbLeft, opacity: 0 }),
RightItem: merge(RIGHT_BUTTON_BASE, { opacity: 0 })
};
CENTER[i] = {
Crumb: merge(CRUMB_BASE, { left: crumbLeft }),
Icon: merge(ICON_BASE, { opacity: 1 }),
Separator: merge(SEPARATOR_BASE, { opacity: 0 }),
Title: merge(TITLE_BASE, {
left: crumbLeft + ICON_WIDTH,
opacity: 1
}),
RightItem: merge(RIGHT_BUTTON_BASE, { opacity: 1 })
};
var crumbRight = SCREEN_WIDTH - 100;
RIGHT[i] = {
Crumb: merge(CRUMB_BASE, { left: crumbRight }),
Icon: merge(ICON_BASE, { opacity: 0 }),
Separator: merge(SEPARATOR_BASE, { opacity: 0 }),
Title: merge(TITLE_BASE, {
left: crumbRight + ICON_WIDTH,
opacity: 0
}),
RightItem: merge(RIGHT_BUTTON_BASE, { opacity: 0 })
};
}
CENTER[0] = {
Crumb: merge(CRUMB_BASE, { left: SCREEN_WIDTH / 4 }),
Icon: merge(ICON_BASE, { opacity: 0 }),
Separator: merge(SEPARATOR_BASE, { opacity: 0 }),
Title: merge(FIRST_TITLE_BASE, { opacity: 1 }),
RightItem: CENTER[0].RightItem
};
LEFT[0].Title = merge(FIRST_TITLE_BASE, { left: -SCREEN_WIDTH / 4, opacity: 0 });
RIGHT[0].Title = merge(FIRST_TITLE_BASE, { opacity: 0 });
var buildIndexSceneInterpolator = function buildIndexSceneInterpolator(startStyles, endStyles) {
return {
Crumb: buildStyleInterpolator({
left: {
type: 'linear',
from: startStyles.Crumb.left,
to: endStyles.Crumb.left,
min: 0,
max: 1,
extrapolate: true
}
}),
Icon: buildStyleInterpolator({
opacity: {
type: 'linear',
from: startStyles.Icon.opacity,
to: endStyles.Icon.opacity,
min: 0,
max: 1
}
}),
Separator: buildStyleInterpolator({
opacity: {
type: 'linear',
from: startStyles.Separator.opacity,
to: endStyles.Separator.opacity,
min: 0,
max: 1
}
}),
Title: buildStyleInterpolator({
opacity: {
type: 'linear',
from: startStyles.Title.opacity,
to: endStyles.Title.opacity,
min: 0,
max: 1
},
left: {
type: 'linear',
from: startStyles.Title.left,
to: endStyles.Title.left,
min: 0,
max: 1,
extrapolate: true
}
}),
RightItem: buildStyleInterpolator({
opacity: {
type: 'linear',
from: startStyles.RightItem.opacity,
to: endStyles.RightItem.opacity,
min: 0,
max: 1,
round: OPACITY_RATIO
}
})
};
};
var Interpolators = CENTER.map(function (_, ii) {
return {
RightToCenter: buildIndexSceneInterpolator(RIGHT[ii], CENTER[ii]),
CenterToLeft: buildIndexSceneInterpolator(CENTER[ii], LEFT[ii]),
RightToLeft: buildIndexSceneInterpolator(RIGHT[ii], LEFT[ii])
};
});
module.exports = {
Interpolators: Interpolators,
Left: LEFT,
Center: CENTER,
Right: RIGHT,
IconWidth: ICON_WIDTH,
IconHeight: NAV_BAR_HEIGHT,
SeparatorWidth: SEPARATOR_WIDTH,
SeparatorHeight: NAV_BAR_HEIGHT
};
}, 340, null, "NavigatorBreadcrumbNavigationBarStyles");
__d(/* NavigatorNavigationBarStylesIOS */function(global, require, module, exports) {
'use strict';
var Dimensions = require(129 ); // 129 = Dimensions
var buildStyleInterpolator = require(342 ); // 342 = buildStyleInterpolator
var merge = require(149 ); // 149 = merge
var SCREEN_WIDTH = Dimensions.get('window').width;
var NAV_BAR_HEIGHT = 44;
var STATUS_BAR_HEIGHT = 20;
var NAV_HEIGHT = NAV_BAR_HEIGHT + STATUS_BAR_HEIGHT;
var BASE_STYLES = {
Title: {
position: 'absolute',
top: STATUS_BAR_HEIGHT,
left: 0,
right: 0,
alignItems: 'center',
height: NAV_BAR_HEIGHT,
backgroundColor: 'transparent'
},
LeftButton: {
position: 'absolute',
top: STATUS_BAR_HEIGHT,
left: 0,
overflow: 'hidden',
opacity: 1,
height: NAV_BAR_HEIGHT,
backgroundColor: 'transparent'
},
RightButton: {
position: 'absolute',
top: STATUS_BAR_HEIGHT,
right: 0,
overflow: 'hidden',
opacity: 1,
alignItems: 'flex-end',
height: NAV_BAR_HEIGHT,
backgroundColor: 'transparent'
}
};
var Stages = {
Left: {
Title: merge(BASE_STYLES.Title, { left: -SCREEN_WIDTH / 2, opacity: 0 }),
LeftButton: merge(BASE_STYLES.LeftButton, { left: 0, opacity: 0 }),
RightButton: merge(BASE_STYLES.RightButton, { opacity: 0 })
},
Center: {
Title: merge(BASE_STYLES.Title, { left: 0, opacity: 1 }),
LeftButton: merge(BASE_STYLES.LeftButton, { left: 0, opacity: 1 }),
RightButton: merge(BASE_STYLES.RightButton, { opacity: 1 })
},
Right: {
Title: merge(BASE_STYLES.Title, { left: SCREEN_WIDTH / 2, opacity: 0 }),
LeftButton: merge(BASE_STYLES.LeftButton, { left: 0, opacity: 0 }),
RightButton: merge(BASE_STYLES.RightButton, { opacity: 0 })
}
};
var opacityRatio = 100;
function buildSceneInterpolators(startStyles, endStyles) {
return {
Title: buildStyleInterpolator({
opacity: {
type: 'linear',
from: startStyles.Title.opacity,
to: endStyles.Title.opacity,
min: 0,
max: 1
},
left: {
type: 'linear',
from: startStyles.Title.left,
to: endStyles.Title.left,
min: 0,
max: 1,
extrapolate: true
}
}),
LeftButton: buildStyleInterpolator({
opacity: {
type: 'linear',
from: startStyles.LeftButton.opacity,
to: endStyles.LeftButton.opacity,
min: 0,
max: 1,
round: opacityRatio
},
left: {
type: 'linear',
from: startStyles.LeftButton.left,
to: endStyles.LeftButton.left,
min: 0,
max: 1
}
}),
RightButton: buildStyleInterpolator({
opacity: {
type: 'linear',
from: startStyles.RightButton.opacity,
to: endStyles.RightButton.opacity,
min: 0,
max: 1,
round: opacityRatio
},
left: {
type: 'linear',
from: startStyles.RightButton.left,
to: endStyles.RightButton.left,
min: 0,
max: 1,
extrapolate: true
}
})
};
}
var Interpolators = {
RightToCenter: buildSceneInterpolators(Stages.Right, Stages.Center),
CenterToLeft: buildSceneInterpolators(Stages.Center, Stages.Left),
RightToLeft: buildSceneInterpolators(Stages.Right, Stages.Left)
};
module.exports = {
General: {
NavBarHeight: NAV_BAR_HEIGHT,
StatusBarHeight: STATUS_BAR_HEIGHT,
TotalNavHeight: NAV_HEIGHT
},
Interpolators: Interpolators,
Stages: Stages
};
}, 341, null, "NavigatorNavigationBarStylesIOS");
__d(/* buildStyleInterpolator */function(global, require, module, exports) {
var keyOf = require(323 ); // 323 = fbjs/lib/keyOf
var X_DIM = keyOf({ x: null });
var Y_DIM = keyOf({ y: null });
var Z_DIM = keyOf({ z: null });
var W_DIM = keyOf({ w: null });
var TRANSFORM_ROTATE_NAME = keyOf({ transformRotateRadians: null });
var ShouldAllocateReusableOperationVars = {
transformRotateRadians: true,
transformScale: true,
transformTranslate: true
};
var InitialOperationField = {
transformRotateRadians: [0, 0, 0, 1],
transformTranslate: [0, 0, 0],
transformScale: [1, 1, 1]
};
var ARGUMENT_NAMES_RE = /([^\s,]+)/g;
var inline = function inline(fnStr, replaceWithArgs) {
var parameterNames = fnStr.slice(fnStr.indexOf('(') + 1, fnStr.indexOf(')')).match(ARGUMENT_NAMES_RE) || [];
var replaceRegexStr = parameterNames.map(function (paramName) {
return '\\b' + paramName + '\\b';
}).join('|');
var replaceRegex = new RegExp(replaceRegexStr, 'g');
var fnBody = fnStr.substring(fnStr.indexOf('{') + 1, fnStr.lastIndexOf('}'));
var newFnBody = fnBody.replace(replaceRegex, function (parameterName) {
var indexInParameterNames = parameterNames.indexOf(parameterName);
var replacementName = replaceWithArgs[indexInParameterNames];
return replacementName;
});
return newFnBody.split('\n');
};
var MatrixOps = {
unroll: 'function(matVar, m0, m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13, m14, m15) {\n m0 = matVar[0];\n m1 = matVar[1];\n m2 = matVar[2];\n m3 = matVar[3];\n m4 = matVar[4];\n m5 = matVar[5];\n m6 = matVar[6];\n m7 = matVar[7];\n m8 = matVar[8];\n m9 = matVar[9];\n m10 = matVar[10];\n m11 = matVar[11];\n m12 = matVar[12];\n m13 = matVar[13];\n m14 = matVar[14];\n m15 = matVar[15];\n }',
matrixDiffers: 'function(retVar, matVar, m0, m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13, m14, m15) {\n retVar = retVar ||\n m0 !== matVar[0] ||\n m1 !== matVar[1] ||\n m2 !== matVar[2] ||\n m3 !== matVar[3] ||\n m4 !== matVar[4] ||\n m5 !== matVar[5] ||\n m6 !== matVar[6] ||\n m7 !== matVar[7] ||\n m8 !== matVar[8] ||\n m9 !== matVar[9] ||\n m10 !== matVar[10] ||\n m11 !== matVar[11] ||\n m12 !== matVar[12] ||\n m13 !== matVar[13] ||\n m14 !== matVar[14] ||\n m15 !== matVar[15];\n }',
transformScale: 'function(matVar, opVar) {\n // Scaling matVar by opVar\n var x = opVar[0];\n var y = opVar[1];\n var z = opVar[2];\n matVar[0] = matVar[0] * x;\n matVar[1] = matVar[1] * x;\n matVar[2] = matVar[2] * x;\n matVar[3] = matVar[3] * x;\n matVar[4] = matVar[4] * y;\n matVar[5] = matVar[5] * y;\n matVar[6] = matVar[6] * y;\n matVar[7] = matVar[7] * y;\n matVar[8] = matVar[8] * z;\n matVar[9] = matVar[9] * z;\n matVar[10] = matVar[10] * z;\n matVar[11] = matVar[11] * z;\n matVar[12] = matVar[12];\n matVar[13] = matVar[13];\n matVar[14] = matVar[14];\n matVar[15] = matVar[15];\n }',
transformTranslate: 'function(matVar, opVar) {\n // Translating matVar by opVar\n var x = opVar[0];\n var y = opVar[1];\n var z = opVar[2];\n matVar[12] = matVar[0] * x + matVar[4] * y + matVar[8] * z + matVar[12];\n matVar[13] = matVar[1] * x + matVar[5] * y + matVar[9] * z + matVar[13];\n matVar[14] = matVar[2] * x + matVar[6] * y + matVar[10] * z + matVar[14];\n matVar[15] = matVar[3] * x + matVar[7] * y + matVar[11] * z + matVar[15];\n }',
transformRotateRadians: 'function(matVar, q) {\n // Rotating matVar by q\n var xQuat = q[0], yQuat = q[1], zQuat = q[2], wQuat = q[3];\n var x2Quat = xQuat + xQuat;\n var y2Quat = yQuat + yQuat;\n var z2Quat = zQuat + zQuat;\n var xxQuat = xQuat * x2Quat;\n var xyQuat = xQuat * y2Quat;\n var xzQuat = xQuat * z2Quat;\n var yyQuat = yQuat * y2Quat;\n var yzQuat = yQuat * z2Quat;\n var zzQuat = zQuat * z2Quat;\n var wxQuat = wQuat * x2Quat;\n var wyQuat = wQuat * y2Quat;\n var wzQuat = wQuat * z2Quat;\n // Step 1: Inlines the construction of a quaternion matrix (\'quatMat\')\n var quatMat0 = 1 - (yyQuat + zzQuat);\n var quatMat1 = xyQuat + wzQuat;\n var quatMat2 = xzQuat - wyQuat;\n var quatMat4 = xyQuat - wzQuat;\n var quatMat5 = 1 - (xxQuat + zzQuat);\n var quatMat6 = yzQuat + wxQuat;\n var quatMat8 = xzQuat + wyQuat;\n var quatMat9 = yzQuat - wxQuat;\n var quatMat10 = 1 - (xxQuat + yyQuat);\n // quatMat3/7/11/12/13/14 = 0, quatMat15 = 1\n\n // Step 2: Inlines multiplication, takes advantage of constant quatMat cells\n var a00 = matVar[0];\n var a01 = matVar[1];\n var a02 = matVar[2];\n var a03 = matVar[3];\n var a10 = matVar[4];\n var a11 = matVar[5];\n var a12 = matVar[6];\n var a13 = matVar[7];\n var a20 = matVar[8];\n var a21 = matVar[9];\n var a22 = matVar[10];\n var a23 = matVar[11];\n\n var b0 = quatMat0, b1 = quatMat1, b2 = quatMat2;\n matVar[0] = b0 * a00 + b1 * a10 + b2 * a20;\n matVar[1] = b0 * a01 + b1 * a11 + b2 * a21;\n matVar[2] = b0 * a02 + b1 * a12 + b2 * a22;\n matVar[3] = b0 * a03 + b1 * a13 + b2 * a23;\n b0 = quatMat4; b1 = quatMat5; b2 = quatMat6;\n matVar[4] = b0 * a00 + b1 * a10 + b2 * a20;\n matVar[5] = b0 * a01 + b1 * a11 + b2 * a21;\n matVar[6] = b0 * a02 + b1 * a12 + b2 * a22;\n matVar[7] = b0 * a03 + b1 * a13 + b2 * a23;\n b0 = quatMat8; b1 = quatMat9; b2 = quatMat10;\n matVar[8] = b0 * a00 + b1 * a10 + b2 * a20;\n matVar[9] = b0 * a01 + b1 * a11 + b2 * a21;\n matVar[10] = b0 * a02 + b1 * a12 + b2 * a22;\n matVar[11] = b0 * a03 + b1 * a13 + b2 * a23;\n }'
};
var MatrixOpsInitial = {
transformScale: 'function(matVar, opVar) {\n // Scaling matVar known to be identity by opVar\n matVar[0] = opVar[0];\n matVar[1] = 0;\n matVar[2] = 0;\n matVar[3] = 0;\n matVar[4] = 0;\n matVar[5] = opVar[1];\n matVar[6] = 0;\n matVar[7] = 0;\n matVar[8] = 0;\n matVar[9] = 0;\n matVar[10] = opVar[2];\n matVar[11] = 0;\n matVar[12] = 0;\n matVar[13] = 0;\n matVar[14] = 0;\n matVar[15] = 1;\n }',
transformTranslate: 'function(matVar, opVar) {\n // Translating matVar known to be identity by opVar;\n matVar[0] = 1;\n matVar[1] = 0;\n matVar[2] = 0;\n matVar[3] = 0;\n matVar[4] = 0;\n matVar[5] = 1;\n matVar[6] = 0;\n matVar[7] = 0;\n matVar[8] = 0;\n matVar[9] = 0;\n matVar[10] = 1;\n matVar[11] = 0;\n matVar[12] = opVar[0];\n matVar[13] = opVar[1];\n matVar[14] = opVar[2];\n matVar[15] = 1;\n }',
transformRotateRadians: 'function(matVar, q) {\n\n // Rotating matVar which is known to be identity by q\n var xQuat = q[0], yQuat = q[1], zQuat = q[2], wQuat = q[3];\n var x2Quat = xQuat + xQuat;\n var y2Quat = yQuat + yQuat;\n var z2Quat = zQuat + zQuat;\n var xxQuat = xQuat * x2Quat;\n var xyQuat = xQuat * y2Quat;\n var xzQuat = xQuat * z2Quat;\n var yyQuat = yQuat * y2Quat;\n var yzQuat = yQuat * z2Quat;\n var zzQuat = zQuat * z2Quat;\n var wxQuat = wQuat * x2Quat;\n var wyQuat = wQuat * y2Quat;\n var wzQuat = wQuat * z2Quat;\n // Step 1: Inlines the construction of a quaternion matrix (\'quatMat\')\n var quatMat0 = 1 - (yyQuat + zzQuat);\n var quatMat1 = xyQuat + wzQuat;\n var quatMat2 = xzQuat - wyQuat;\n var quatMat4 = xyQuat - wzQuat;\n var quatMat5 = 1 - (xxQuat + zzQuat);\n var quatMat6 = yzQuat + wxQuat;\n var quatMat8 = xzQuat + wyQuat;\n var quatMat9 = yzQuat - wxQuat;\n var quatMat10 = 1 - (xxQuat + yyQuat);\n // quatMat3/7/11/12/13/14 = 0, quatMat15 = 1\n\n // Step 2: Inlines the multiplication with identity matrix.\n var b0 = quatMat0, b1 = quatMat1, b2 = quatMat2;\n matVar[0] = b0;\n matVar[1] = b1;\n matVar[2] = b2;\n matVar[3] = 0;\n b0 = quatMat4; b1 = quatMat5; b2 = quatMat6;\n matVar[4] = b0;\n matVar[5] = b1;\n matVar[6] = b2;\n matVar[7] = 0;\n b0 = quatMat8; b1 = quatMat9; b2 = quatMat10;\n matVar[8] = b0;\n matVar[9] = b1;\n matVar[10] = b2;\n matVar[11] = 0;\n matVar[12] = 0;\n matVar[13] = 0;\n matVar[14] = 0;\n matVar[15] = 1;\n }'
};
var setNextValAndDetectChange = function setNextValAndDetectChange(name, tmpVarName) {
return ' if (!didChange) {\n' + ' var prevVal = result.' + name + ';\n' + ' result.' + name + ' = ' + tmpVarName + ';\n' + ' didChange = didChange || (' + tmpVarName + ' !== prevVal);\n' + ' } else {\n' + ' result.' + name + ' = ' + tmpVarName + ';\n' + ' }\n';
};
var computeNextValLinear = function computeNextValLinear(anim, from, to, tmpVarName) {
var hasRoundRatio = 'round' in anim;
var roundRatio = anim.round;
var fn = ' ratio = (value - ' + anim.min + ') / ' + (anim.max - anim.min) + ';\n';
if (!anim.extrapolate) {
fn += ' ratio = ratio > 1 ? 1 : (ratio < 0 ? 0 : ratio);\n';
}
var roundOpen = hasRoundRatio ? 'Math.round(' + roundRatio + ' * ' : '';
var roundClose = hasRoundRatio ? ') / ' + roundRatio : '';
fn += ' ' + tmpVarName + ' = ' + roundOpen + '(' + from + ' * (1 - ratio) + ' + to + ' * ratio)' + roundClose + ';\n';
return fn;
};
var computeNextValLinearScalar = function computeNextValLinearScalar(anim) {
return computeNextValLinear(anim, anim.from, anim.to, 'nextScalarVal');
};
var computeNextValConstant = function computeNextValConstant(anim) {
var constantExpression = JSON.stringify(anim.value);
return ' nextScalarVal = ' + constantExpression + ';\n';
};
var computeNextValStep = function computeNextValStep(anim) {
return ' nextScalarVal = value >= ' + (anim.threshold + ' ? ' + anim.to + ' : ' + anim.from) + ';\n';
};
var computeNextValIdentity = function computeNextValIdentity(anim) {
return ' nextScalarVal = value;\n';
};
var operationVar = function operationVar(name) {
return name + 'ReuseOp';
};
var createReusableOperationVars = function createReusableOperationVars(anims) {
var ret = '';
for (var name in anims) {
if (ShouldAllocateReusableOperationVars[name]) {
ret += 'var ' + operationVar(name) + ' = [];\n';
}
}
return ret;
};
var newlines = function newlines(statements) {
return '\n' + statements.join('\n') + '\n';
};
var computeNextMatrixOperationField = function computeNextMatrixOperationField(anim, name, dimension, index) {
var fieldAccess = operationVar(name) + '[' + index + ']';
if (anim.from[dimension] !== undefined && anim.to[dimension] !== undefined) {
return ' ' + anim.from[dimension] !== anim.to[dimension] ? computeNextValLinear(anim, anim.from[dimension], anim.to[dimension], fieldAccess) : fieldAccess + ' = ' + anim.from[dimension] + ';';
} else {
return ' ' + fieldAccess + ' = ' + InitialOperationField[name][index] + ';';
}
};
var unrolledVars = [];
for (var varIndex = 0; varIndex < 16; varIndex++) {
unrolledVars.push('m' + varIndex);
}
var setNextMatrixAndDetectChange = function setNextMatrixAndDetectChange(orderedMatrixOperations) {
var fn = [' var transform = result.transform !== undefined ? ' + 'result.transform : (result.transform = [{ matrix: [] }]);' + ' var transformMatrix = transform[0].matrix;'];
fn.push.apply(fn, inline(MatrixOps.unroll, ['transformMatrix'].concat(unrolledVars)));
for (var i = 0; i < orderedMatrixOperations.length; i++) {
var opName = orderedMatrixOperations[i];
if (i === 0) {
fn.push.apply(fn, inline(MatrixOpsInitial[opName], ['transformMatrix', operationVar(opName)]));
} else {
fn.push.apply(fn, inline(MatrixOps[opName], ['transformMatrix', operationVar(opName)]));
}
}
fn.push.apply(fn, inline(MatrixOps.matrixDiffers, ['didChange', 'transformMatrix'].concat(unrolledVars)));
return fn;
};
var InterpolateMatrix = {
transformTranslate: true,
transformRotateRadians: true,
transformScale: true
};
var createFunctionString = function createFunctionString(anims) {
var orderedMatrixOperations = [];
var fn = 'return (function() {\n';
fn += createReusableOperationVars(anims);
fn += 'return function(result, value) {\n';
fn += ' var didChange = false;\n';
fn += ' var nextScalarVal;\n';
fn += ' var ratio;\n';
for (var name in anims) {
var anim = anims[name];
if (anim.type === 'linear') {
if (InterpolateMatrix[name]) {
orderedMatrixOperations.push(name);
var setOperations = [computeNextMatrixOperationField(anim, name, X_DIM, 0), computeNextMatrixOperationField(anim, name, Y_DIM, 1), computeNextMatrixOperationField(anim, name, Z_DIM, 2)];
if (name === TRANSFORM_ROTATE_NAME) {
setOperations.push(computeNextMatrixOperationField(anim, name, W_DIM, 3));
}
fn += newlines(setOperations);
} else {
fn += computeNextValLinearScalar(anim, 'nextScalarVal');
fn += setNextValAndDetectChange(name, 'nextScalarVal');
}
} else if (anim.type === 'constant') {
fn += computeNextValConstant(anim);
fn += setNextValAndDetectChange(name, 'nextScalarVal');
} else if (anim.type === 'step') {
fn += computeNextValStep(anim);
fn += setNextValAndDetectChange(name, 'nextScalarVal');
} else if (anim.type === 'identity') {
fn += computeNextValIdentity(anim);
fn += setNextValAndDetectChange(name, 'nextScalarVal');
}
}
if (orderedMatrixOperations.length) {
fn += newlines(setNextMatrixAndDetectChange(orderedMatrixOperations));
}
fn += ' return didChange;\n';
fn += '};\n';
fn += '})()';
return fn;
};
var buildStyleInterpolator = function buildStyleInterpolator(anims) {
var interpolator = null;
function lazyStyleInterpolator(result, value) {
if (interpolator === null) {
interpolator = Function(createFunctionString(anims))();
}
return interpolator(result, value);
}
return lazyStyleInterpolator;
};
module.exports = buildStyleInterpolator;
}, 342, null, "buildStyleInterpolator");
__d(/* NavigatorNavigationBarStylesAndroid */function(global, require, module, exports) {
'use strict';
var buildStyleInterpolator = require(342 ); // 342 = buildStyleInterpolator
var merge = require(149 ); // 149 = merge
var NAV_BAR_HEIGHT = 56;
var TITLE_LEFT = 72;
var BUTTON_SIZE = 24;
var TOUCH_TARGT_SIZE = 48;
var BUTTON_HORIZONTAL_MARGIN = 16;
var BUTTON_EFFECTIVE_MARGIN = BUTTON_HORIZONTAL_MARGIN - (TOUCH_TARGT_SIZE - BUTTON_SIZE) / 2;
var NAV_ELEMENT_HEIGHT = NAV_BAR_HEIGHT;
var BASE_STYLES = {
Title: {
position: 'absolute',
bottom: 0,
left: 0,
right: 0,
alignItems: 'flex-start',
height: NAV_ELEMENT_HEIGHT,
backgroundColor: 'transparent',
marginLeft: TITLE_LEFT
},
LeftButton: {
position: 'absolute',
top: 0,
left: BUTTON_EFFECTIVE_MARGIN,
overflow: 'hidden',
height: NAV_ELEMENT_HEIGHT,
backgroundColor: 'transparent'
},
RightButton: {
position: 'absolute',
top: 0,
right: BUTTON_EFFECTIVE_MARGIN,
overflow: 'hidden',
alignItems: 'flex-end',
height: NAV_ELEMENT_HEIGHT,
backgroundColor: 'transparent'
}
};
var Stages = {
Left: {
Title: merge(BASE_STYLES.Title, { opacity: 0 }),
LeftButton: merge(BASE_STYLES.LeftButton, { opacity: 0 }),
RightButton: merge(BASE_STYLES.RightButton, { opacity: 0 })
},
Center: {
Title: merge(BASE_STYLES.Title, { opacity: 1 }),
LeftButton: merge(BASE_STYLES.LeftButton, { opacity: 1 }),
RightButton: merge(BASE_STYLES.RightButton, { opacity: 1 })
},
Right: {
Title: merge(BASE_STYLES.Title, { opacity: 0 }),
LeftButton: merge(BASE_STYLES.LeftButton, { opacity: 0 }),
RightButton: merge(BASE_STYLES.RightButton, { opacity: 0 })
}
};
var opacityRatio = 100;
function buildSceneInterpolators(startStyles, endStyles) {
return {
Title: buildStyleInterpolator({
opacity: {
type: 'linear',
from: startStyles.Title.opacity,
to: endStyles.Title.opacity,
min: 0,
max: 1
},
left: {
type: 'linear',
from: startStyles.Title.left,
to: endStyles.Title.left,
min: 0,
max: 1,
extrapolate: true
}
}),
LeftButton: buildStyleInterpolator({
opacity: {
type: 'linear',
from: startStyles.LeftButton.opacity,
to: endStyles.LeftButton.opacity,
min: 0,
max: 1,
round: opacityRatio
},
left: {
type: 'linear',
from: startStyles.LeftButton.left,
to: endStyles.LeftButton.left,
min: 0,
max: 1
}
}),
RightButton: buildStyleInterpolator({
opacity: {
type: 'linear',
from: startStyles.RightButton.opacity,
to: endStyles.RightButton.opacity,
min: 0,
max: 1,
round: opacityRatio
},
left: {
type: 'linear',
from: startStyles.RightButton.left,
to: endStyles.RightButton.left,
min: 0,
max: 1,
extrapolate: true
}
})
};
}
var Interpolators = {
RightToCenter: buildSceneInterpolators(Stages.Right, Stages.Center),
CenterToLeft: buildSceneInterpolators(Stages.Center, Stages.Left),
RightToLeft: buildSceneInterpolators(Stages.Right, Stages.Left)
};
module.exports = {
General: {
NavBarHeight: NAV_BAR_HEIGHT,
StatusBarHeight: 0,
TotalNavHeight: NAV_BAR_HEIGHT
},
Interpolators: Interpolators,
Stages: Stages
};
}, 343, null, "NavigatorNavigationBarStylesAndroid");
__d(/* NavigatorNavigationBar */function(global, require, module, exports) {
'use strict';
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/node_modules/react-native/Libraries/CustomComponents/Navigator/NavigatorNavigationBar.js';
var React = require(126 ); // 126 = React
var NavigatorNavigationBarStylesAndroid = require(343 ); // 343 = NavigatorNavigationBarStylesAndroid
var NavigatorNavigationBarStylesIOS = require(341 ); // 341 = NavigatorNavigationBarStylesIOS
var Platform = require(79 ); // 79 = Platform
var StyleSheet = require(127 ); // 127 = StyleSheet
var View = require(146 ); // 146 = View
var guid = require(225 ); // 225 = guid
var _require = require(338 ), // 338 = immutable
Map = _require.Map;
var COMPONENT_NAMES = ['Title', 'LeftButton', 'RightButton'];
var NavigatorNavigationBarStyles = Platform.OS === 'android' ? NavigatorNavigationBarStylesAndroid : NavigatorNavigationBarStylesIOS;
var navStatePresentedIndex = function navStatePresentedIndex(navState) {
if (navState.presentedIndex !== undefined) {
return navState.presentedIndex;
}
return navState.observedTopOfStack;
};
var NavigatorNavigationBar = function (_React$Component) {
babelHelpers.inherits(NavigatorNavigationBar, _React$Component);
function NavigatorNavigationBar() {
var _ref;
var _temp, _this, _ret;
babelHelpers.classCallCheck(this, NavigatorNavigationBar);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = babelHelpers.possibleConstructorReturn(this, (_ref = NavigatorNavigationBar.__proto__ || Object.getPrototypeOf(NavigatorNavigationBar)).call.apply(_ref, [this].concat(args))), _this), _this.immediatelyRefresh = function () {
_this._reset();
_this.forceUpdate();
}, _this._reset = function () {
_this._key = guid();
_this._reusableProps = {};
_this._components = {};
_this._descriptors = {};
COMPONENT_NAMES.forEach(function (componentName) {
_this._components[componentName] = new Map();
_this._descriptors[componentName] = new Map();
});
}, _this._getReusableProps = function (componentName, index) {
var propStack = _this._reusableProps[componentName];
if (!propStack) {
propStack = _this._reusableProps[componentName] = [];
}
var props = propStack[index];
if (!props) {
props = propStack[index] = { style: {} };
}
return props;
}, _this._updateIndexProgress = function (progress, index, fromIndex, toIndex) {
var amount = toIndex > fromIndex ? progress : 1 - progress;
var oldDistToCenter = index - fromIndex;
var newDistToCenter = index - toIndex;
var interpolate;
if (oldDistToCenter > 0 && newDistToCenter === 0 || newDistToCenter > 0 && oldDistToCenter === 0) {
interpolate = _this.props.navigationStyles.Interpolators.RightToCenter;
} else if (oldDistToCenter < 0 && newDistToCenter === 0 || newDistToCenter < 0 && oldDistToCenter === 0) {
interpolate = _this.props.navigationStyles.Interpolators.CenterToLeft;
} else if (oldDistToCenter === newDistToCenter) {
interpolate = _this.props.navigationStyles.Interpolators.RightToCenter;
} else {
interpolate = _this.props.navigationStyles.Interpolators.RightToLeft;
}
COMPONENT_NAMES.forEach(function (componentName) {
var component = this._components[componentName].get(this.props.navState.routeStack[index]);
var props = this._getReusableProps(componentName, index);
if (component && interpolate[componentName](props.style, amount)) {
props.pointerEvents = props.style.opacity === 0 ? 'none' : 'box-none';
component.setNativeProps(props);
}
}, _this);
}, _this.updateProgress = function (progress, fromIndex, toIndex) {
var max = Math.max(fromIndex, toIndex);
var min = Math.min(fromIndex, toIndex);
for (var index = min; index <= max; index++) {
_this._updateIndexProgress(progress, index, fromIndex, toIndex);
}
}, _this._getComponent = function (componentName, route, index) {
if (_this._descriptors[componentName].includes(route)) {
return _this._descriptors[componentName].get(route);
}
var rendered = null;
var content = _this.props.routeMapper[componentName](_this.props.navState.routeStack[index], _this.props.navigator, index, _this.props.navState);
if (!content) {
return null;
}
var componentIsActive = index === navStatePresentedIndex(_this.props.navState);
var initialStage = componentIsActive ? _this.props.navigationStyles.Stages.Center : _this.props.navigationStyles.Stages.Left;
rendered = React.createElement(
View,
{
ref: function ref(_ref2) {
_this._components[componentName] = _this._components[componentName].set(route, _ref2);
},
pointerEvents: componentIsActive ? 'box-none' : 'none',
style: initialStage[componentName], __source: {
fileName: _jsxFileName,
lineNumber: 196
}
},
content
);
_this._descriptors[componentName] = _this._descriptors[componentName].set(route, rendered);
return rendered;
}, _temp), babelHelpers.possibleConstructorReturn(_this, _ret);
}
babelHelpers.createClass(NavigatorNavigationBar, [{
key: 'componentWillMount',
value: function componentWillMount() {
this._reset();
}
}, {
key: 'render',
value: function render() {
var _this2 = this;
var navBarStyle = {
height: this.props.navigationStyles.General.TotalNavHeight
};
var navState = this.props.navState;
var components = navState.routeStack.map(function (route, index) {
return COMPONENT_NAMES.map(function (componentName) {
return _this2._getComponent(componentName, route, index);
});
});
return React.createElement(
View,
{
key: this._key,
style: [styles.navBarContainer, navBarStyle, this.props.style], __source: {
fileName: _jsxFileName,
lineNumber: 166
}
},
components
);
}
}]);
return NavigatorNavigationBar;
}(React.Component);
NavigatorNavigationBar.propTypes = {
navigator: React.PropTypes.object,
routeMapper: React.PropTypes.shape({
Title: React.PropTypes.func.isRequired,
LeftButton: React.PropTypes.func.isRequired,
RightButton: React.PropTypes.func.isRequired
}).isRequired,
navState: React.PropTypes.shape({
routeStack: React.PropTypes.arrayOf(React.PropTypes.object),
presentedIndex: React.PropTypes.number
}),
navigationStyles: React.PropTypes.object,
style: View.propTypes.style
};
NavigatorNavigationBar.Styles = NavigatorNavigationBarStyles;
NavigatorNavigationBar.StylesAndroid = NavigatorNavigationBarStylesAndroid;
NavigatorNavigationBar.StylesIOS = NavigatorNavigationBarStylesIOS;
NavigatorNavigationBar.defaultProps = {
navigationStyles: NavigatorNavigationBarStyles
};
var styles = StyleSheet.create({
navBarContainer: {
position: 'absolute',
top: 0,
left: 0,
right: 0,
backgroundColor: 'transparent'
}
});
module.exports = NavigatorNavigationBar;
}, 344, null, "NavigatorNavigationBar");
__d(/* NavigatorSceneConfigs */function(global, require, module, exports) {
'use strict';
var Dimensions = require(129 ); // 129 = Dimensions
var I18nManager = require(331 ); // 331 = I18nManager
var PixelRatio = require(128 ); // 128 = PixelRatio
var buildStyleInterpolator = require(342 ); // 342 = buildStyleInterpolator
var IS_RTL = I18nManager.isRTL;
var SCREEN_WIDTH = Dimensions.get('window').width;
var SCREEN_HEIGHT = Dimensions.get('window').height;
var PIXEL_RATIO = PixelRatio.get();
var ToTheLeftIOS = {
transformTranslate: {
from: { x: 0, y: 0, z: 0 },
to: { x: -SCREEN_WIDTH * 0.3, y: 0, z: 0 },
min: 0,
max: 1,
type: 'linear',
extrapolate: true,
round: PIXEL_RATIO
},
opacity: {
value: 1.0,
type: 'constant'
}
};
var ToTheRightIOS = babelHelpers.extends({}, ToTheLeftIOS, {
transformTranslate: {
from: { x: 0, y: 0, z: 0 },
to: { x: SCREEN_WIDTH * 0.3, y: 0, z: 0 }
}
});
var FadeToTheLeft = {
transformTranslate: {
from: { x: 0, y: 0, z: 0 },
to: { x: -Math.round(SCREEN_WIDTH * 0.3), y: 0, z: 0 },
min: 0,
max: 1,
type: 'linear',
extrapolate: true,
round: PIXEL_RATIO
},
transformScale: {
from: { x: 1, y: 1, z: 1 },
to: { x: 0.95, y: 0.95, z: 1 },
min: 0,
max: 1,
type: 'linear',
extrapolate: true
},
opacity: {
from: 1,
to: 0.3,
min: 0,
max: 1,
type: 'linear',
extrapolate: false,
round: 100
},
translateX: {
from: 0,
to: -Math.round(SCREEN_WIDTH * 0.3),
min: 0,
max: 1,
type: 'linear',
extrapolate: true,
round: PIXEL_RATIO
},
scaleX: {
from: 1,
to: 0.95,
min: 0,
max: 1,
type: 'linear',
extrapolate: true
},
scaleY: {
from: 1,
to: 0.95,
min: 0,
max: 1,
type: 'linear',
extrapolate: true
}
};
var FadeToTheRight = babelHelpers.extends({}, FadeToTheLeft, {
transformTranslate: {
from: { x: 0, y: 0, z: 0 },
to: { x: Math.round(SCREEN_WIDTH * 0.3), y: 0, z: 0 }
},
translateX: {
from: 0,
to: Math.round(SCREEN_WIDTH * 0.3)
}
});
var FadeIn = {
opacity: {
from: 0,
to: 1,
min: 0.5,
max: 1,
type: 'linear',
extrapolate: false,
round: 100
}
};
var FadeOut = {
opacity: {
from: 1,
to: 0,
min: 0,
max: 0.5,
type: 'linear',
extrapolate: false,
round: 100
}
};
var ToTheLeft = {
transformTranslate: {
from: { x: 0, y: 0, z: 0 },
to: { x: -SCREEN_WIDTH, y: 0, z: 0 },
min: 0,
max: 1,
type: 'linear',
extrapolate: true,
round: PIXEL_RATIO
},
opacity: {
value: 1.0,
type: 'constant'
},
translateX: {
from: 0,
to: -SCREEN_WIDTH,
min: 0,
max: 1,
type: 'linear',
extrapolate: true,
round: PIXEL_RATIO
}
};
var ToTheRight = {
transformTranslate: {
from: { x: 0, y: 0, z: 0 },
to: { x: SCREEN_WIDTH, y: 0, z: 0 },
min: 0,
max: 1,
type: 'linear',
extrapolate: true,
round: PIXEL_RATIO
},
opacity: {
value: 1.0,
type: 'constant'
},
translateX: {
from: 0,
to: SCREEN_WIDTH,
min: 0,
max: 1,
type: 'linear',
extrapolate: true,
round: PIXEL_RATIO
}
};
var ToTheUp = {
transformTranslate: {
from: { x: 0, y: 0, z: 0 },
to: { x: 0, y: -SCREEN_HEIGHT, z: 0 },
min: 0,
max: 1,
type: 'linear',
extrapolate: true,
round: PIXEL_RATIO
},
opacity: {
value: 1.0,
type: 'constant'
},
translateY: {
from: 0,
to: -SCREEN_HEIGHT,
min: 0,
max: 1,
type: 'linear',
extrapolate: true,
round: PIXEL_RATIO
}
};
var ToTheDown = {
transformTranslate: {
from: { x: 0, y: 0, z: 0 },
to: { x: 0, y: SCREEN_HEIGHT, z: 0 },
min: 0,
max: 1,
type: 'linear',
extrapolate: true,
round: PIXEL_RATIO
},
opacity: {
value: 1.0,
type: 'constant'
},
translateY: {
from: 0,
to: SCREEN_HEIGHT,
min: 0,
max: 1,
type: 'linear',
extrapolate: true,
round: PIXEL_RATIO
}
};
var FromTheRight = {
opacity: {
value: 1.0,
type: 'constant'
},
transformTranslate: {
from: { x: SCREEN_WIDTH, y: 0, z: 0 },
to: { x: 0, y: 0, z: 0 },
min: 0,
max: 1,
type: 'linear',
extrapolate: true,
round: PIXEL_RATIO
},
translateX: {
from: SCREEN_WIDTH,
to: 0,
min: 0,
max: 1,
type: 'linear',
extrapolate: true,
round: PIXEL_RATIO
},
scaleX: {
value: 1,
type: 'constant'
},
scaleY: {
value: 1,
type: 'constant'
}
};
var FromTheLeft = babelHelpers.extends({}, FromTheRight, {
transformTranslate: {
from: { x: -SCREEN_WIDTH, y: 0, z: 0 },
to: { x: 0, y: 0, z: 0 },
min: 0,
max: 1,
type: 'linear',
extrapolate: true,
round: PIXEL_RATIO
},
translateX: {
from: -SCREEN_WIDTH,
to: 0,
min: 0,
max: 1,
type: 'linear',
extrapolate: true,
round: PIXEL_RATIO
}
});
var FromTheDown = babelHelpers.extends({}, FromTheRight, {
transformTranslate: {
from: { y: SCREEN_HEIGHT, x: 0, z: 0 },
to: { x: 0, y: 0, z: 0 },
min: 0,
max: 1,
type: 'linear',
extrapolate: true,
round: PIXEL_RATIO
},
translateY: {
from: SCREEN_HEIGHT,
to: 0,
min: 0,
max: 1,
type: 'linear',
extrapolate: true,
round: PIXEL_RATIO
}
});
var FromTheTop = babelHelpers.extends({}, FromTheRight, {
transformTranslate: {
from: { y: -SCREEN_HEIGHT, x: 0, z: 0 },
to: { x: 0, y: 0, z: 0 },
min: 0,
max: 1,
type: 'linear',
extrapolate: true,
round: PIXEL_RATIO
},
translateY: {
from: -SCREEN_HEIGHT,
to: 0,
min: 0,
max: 1,
type: 'linear',
extrapolate: true,
round: PIXEL_RATIO
}
});
var ToTheBack = {
transformTranslate: {
from: { x: 0, y: 0, z: 0 },
to: { x: 0, y: 0, z: 0 },
min: 0,
max: 1,
type: 'linear',
extrapolate: true,
round: PIXEL_RATIO
},
transformScale: {
from: { x: 1, y: 1, z: 1 },
to: { x: 0.95, y: 0.95, z: 1 },
min: 0,
max: 1,
type: 'linear',
extrapolate: true
},
opacity: {
from: 1,
to: 0.3,
min: 0,
max: 1,
type: 'linear',
extrapolate: false,
round: 100
},
scaleX: {
from: 1,
to: 0.95,
min: 0,
max: 1,
type: 'linear',
extrapolate: true
},
scaleY: {
from: 1,
to: 0.95,
min: 0,
max: 1,
type: 'linear',
extrapolate: true
}
};
var FromTheFront = {
opacity: {
value: 1.0,
type: 'constant'
},
transformTranslate: {
from: { x: 0, y: SCREEN_HEIGHT, z: 0 },
to: { x: 0, y: 0, z: 0 },
min: 0,
max: 1,
type: 'linear',
extrapolate: true,
round: PIXEL_RATIO
},
translateY: {
from: SCREEN_HEIGHT,
to: 0,
min: 0,
max: 1,
type: 'linear',
extrapolate: true,
round: PIXEL_RATIO
},
scaleX: {
value: 1,
type: 'constant'
},
scaleY: {
value: 1,
type: 'constant'
}
};
var ToTheBackAndroid = {
opacity: {
value: 1,
type: 'constant'
}
};
var FromTheFrontAndroid = {
opacity: {
from: 0,
to: 1,
min: 0.5,
max: 1,
type: 'linear',
extrapolate: false,
round: 100
},
transformTranslate: {
from: { x: 0, y: 100, z: 0 },
to: { x: 0, y: 0, z: 0 },
min: 0,
max: 1,
type: 'linear',
extrapolate: true,
round: PIXEL_RATIO
},
translateY: {
from: 100,
to: 0,
min: 0,
max: 1,
type: 'linear',
extrapolate: true,
round: PIXEL_RATIO
}
};
var BaseOverswipeConfig = {
frictionConstant: 1,
frictionByDistance: 1.5
};
var BaseLeftToRightGesture = {
isDetachable: false,
gestureDetectMovement: 2,
notMoving: 0.3,
directionRatio: 0.66,
snapVelocity: 2,
edgeHitWidth: 30,
stillCompletionRatio: 3 / 5,
fullDistance: SCREEN_WIDTH,
direction: 'left-to-right'
};
var BaseRightToLeftGesture = babelHelpers.extends({}, BaseLeftToRightGesture, {
direction: 'right-to-left'
});
var BaseDownUpGesture = babelHelpers.extends({}, BaseLeftToRightGesture, {
fullDistance: SCREEN_HEIGHT,
direction: 'bottom-to-top'
});
var BaseUpDownGesture = babelHelpers.extends({}, BaseLeftToRightGesture, {
fullDistance: SCREEN_HEIGHT,
direction: 'top-to-bottom'
});
var directionMapping = {
ToTheStartIOS: ToTheLeftIOS,
ToTheEndIOS: ToTheRightIOS,
FadeToTheStart: FadeToTheLeft,
FadeToTheEnd: FadeToTheRight,
ToTheStart: ToTheLeft,
ToTheEnd: ToTheRight,
FromTheStart: FromTheLeft,
FromTheEnd: FromTheRight,
BaseStartToEndGesture: BaseLeftToRightGesture,
BaseEndToStartGesture: BaseRightToLeftGesture
};
if (IS_RTL) {
directionMapping = {
ToTheStartIOS: ToTheRightIOS,
ToTheEndIOS: ToTheLeftIOS,
FadeToTheStart: FadeToTheRight,
FadeToTheEnd: FadeToTheLeft,
ToTheStart: ToTheRight,
ToTheEnd: ToTheLeft,
FromTheStart: FromTheRight,
FromTheEnd: FromTheLeft,
BaseStartToEndGesture: BaseRightToLeftGesture,
BaseEndToStartGesture: BaseLeftToRightGesture
};
}
var BaseConfig = {
gestures: {
pop: directionMapping.BaseStartToEndGesture
},
springFriction: 26,
springTension: 200,
defaultTransitionVelocity: 1.5,
animationInterpolators: {
into: buildStyleInterpolator(directionMapping.FromTheEnd),
out: buildStyleInterpolator(directionMapping.FadeToTheStart)
}
};
var NavigatorSceneConfigs = {
PushFromRight: babelHelpers.extends({}, BaseConfig, {
animationInterpolators: {
into: buildStyleInterpolator(directionMapping.FromTheEnd),
out: buildStyleInterpolator(directionMapping.ToTheStartIOS)
}
}),
PushFromLeft: babelHelpers.extends({}, BaseConfig, {
animationInterpolators: {
into: buildStyleInterpolator(directionMapping.FromTheStart),
out: buildStyleInterpolator(directionMapping.ToTheEndIOS)
}
}),
FloatFromRight: babelHelpers.extends({}, BaseConfig),
FloatFromLeft: babelHelpers.extends({}, BaseConfig, {
gestures: {
pop: directionMapping.BaseEndToStartGesture
},
animationInterpolators: {
into: buildStyleInterpolator(directionMapping.FromTheStart),
out: buildStyleInterpolator(directionMapping.FadeToTheEnd)
}
}),
FloatFromBottom: babelHelpers.extends({}, BaseConfig, {
gestures: {
pop: babelHelpers.extends({}, directionMapping.BaseStartToEndGesture, {
edgeHitWidth: 150,
direction: 'top-to-bottom',
fullDistance: SCREEN_HEIGHT
})
},
animationInterpolators: {
into: buildStyleInterpolator(FromTheFront),
out: buildStyleInterpolator(ToTheBack)
}
}),
FloatFromBottomAndroid: babelHelpers.extends({}, BaseConfig, {
gestures: null,
defaultTransitionVelocity: 3,
springFriction: 20,
animationInterpolators: {
into: buildStyleInterpolator(FromTheFrontAndroid),
out: buildStyleInterpolator(ToTheBackAndroid)
}
}),
FadeAndroid: babelHelpers.extends({}, BaseConfig, {
gestures: null,
animationInterpolators: {
into: buildStyleInterpolator(FadeIn),
out: buildStyleInterpolator(FadeOut)
}
}),
SwipeFromLeft: babelHelpers.extends({}, BaseConfig, {
gestures: {
jumpBack: babelHelpers.extends({}, directionMapping.BaseEndToStartGesture, {
overswipe: BaseOverswipeConfig,
edgeHitWidth: null,
isDetachable: true
}),
jumpForward: babelHelpers.extends({}, directionMapping.BaseStartToEndGesture, {
overswipe: BaseOverswipeConfig,
edgeHitWidth: null,
isDetachable: true
})
},
animationInterpolators: {
into: buildStyleInterpolator(directionMapping.FromTheStart),
out: buildStyleInterpolator(directionMapping.ToTheEnd)
}
}),
HorizontalSwipeJump: babelHelpers.extends({}, BaseConfig, {
gestures: {
jumpBack: babelHelpers.extends({}, directionMapping.BaseStartToEndGesture, {
overswipe: BaseOverswipeConfig,
edgeHitWidth: null,
isDetachable: true
}),
jumpForward: babelHelpers.extends({}, directionMapping.BaseEndToStartGesture, {
overswipe: BaseOverswipeConfig,
edgeHitWidth: null,
isDetachable: true
})
},
animationInterpolators: {
into: buildStyleInterpolator(directionMapping.FromTheEnd),
out: buildStyleInterpolator(directionMapping.ToTheStart)
}
}),
HorizontalSwipeJumpFromRight: babelHelpers.extends({}, BaseConfig, {
gestures: {
jumpBack: babelHelpers.extends({}, directionMapping.BaseEndToStartGesture, {
overswipe: BaseOverswipeConfig,
edgeHitWidth: null,
isDetachable: true
}),
jumpForward: babelHelpers.extends({}, directionMapping.BaseStartToEndGesture, {
overswipe: BaseOverswipeConfig,
edgeHitWidth: null,
isDetachable: true
}),
pop: directionMapping.BaseEndToStartGesture
},
animationInterpolators: {
into: buildStyleInterpolator(directionMapping.FromTheStart),
out: buildStyleInterpolator(directionMapping.FadeToTheEnd)
}
}),
HorizontalSwipeJumpFromLeft: babelHelpers.extends({}, BaseConfig, {
gestures: {
jumpBack: babelHelpers.extends({}, directionMapping.BaseEndToStartGesture, {
overswipe: BaseOverswipeConfig,
edgeHitWidth: null,
isDetachable: true
}),
jumpForward: babelHelpers.extends({}, directionMapping.BaseStartToEndGesture, {
overswipe: BaseOverswipeConfig,
edgeHitWidth: null,
isDetachable: true
}),
pop: directionMapping.BaseEndToStartGesture
},
animationInterpolators: {
into: buildStyleInterpolator(directionMapping.FromTheStart),
out: buildStyleInterpolator(directionMapping.ToTheEnd)
}
}),
VerticalUpSwipeJump: babelHelpers.extends({}, BaseConfig, {
gestures: {
jumpBack: babelHelpers.extends({}, BaseUpDownGesture, {
overswipe: BaseOverswipeConfig,
edgeHitWidth: null,
isDetachable: true
}),
jumpForward: babelHelpers.extends({}, BaseDownUpGesture, {
overswipe: BaseOverswipeConfig,
edgeHitWidth: null,
isDetachable: true
})
},
animationInterpolators: {
into: buildStyleInterpolator(FromTheDown),
out: buildStyleInterpolator(ToTheUp)
}
}),
VerticalDownSwipeJump: babelHelpers.extends({}, BaseConfig, {
gestures: {
jumpBack: babelHelpers.extends({}, BaseDownUpGesture, {
overswipe: BaseOverswipeConfig,
edgeHitWidth: null,
isDetachable: true
}),
jumpForward: babelHelpers.extends({}, BaseUpDownGesture, {
overswipe: BaseOverswipeConfig,
edgeHitWidth: null,
isDetachable: true
})
},
animationInterpolators: {
into: buildStyleInterpolator(FromTheTop),
out: buildStyleInterpolator(ToTheDown)
}
})
};
module.exports = NavigatorSceneConfigs;
}, 345, null, "NavigatorSceneConfigs");
__d(/* PanResponder */function(global, require, module, exports) {
'use strict';
var InteractionManager = require(221 ); // 221 = ./InteractionManager
var TouchHistoryMath = require(347 ); // 347 = TouchHistoryMath
var currentCentroidXOfTouchesChangedAfter = TouchHistoryMath.currentCentroidXOfTouchesChangedAfter;
var currentCentroidYOfTouchesChangedAfter = TouchHistoryMath.currentCentroidYOfTouchesChangedAfter;
var previousCentroidXOfTouchesChangedAfter = TouchHistoryMath.previousCentroidXOfTouchesChangedAfter;
var previousCentroidYOfTouchesChangedAfter = TouchHistoryMath.previousCentroidYOfTouchesChangedAfter;
var currentCentroidX = TouchHistoryMath.currentCentroidX;
var currentCentroidY = TouchHistoryMath.currentCentroidY;
var PanResponder = {
_initializeGestureState: function _initializeGestureState(gestureState) {
gestureState.moveX = 0;
gestureState.moveY = 0;
gestureState.x0 = 0;
gestureState.y0 = 0;
gestureState.dx = 0;
gestureState.dy = 0;
gestureState.vx = 0;
gestureState.vy = 0;
gestureState.numberActiveTouches = 0;
gestureState._accountsForMovesUpTo = 0;
},
_updateGestureStateOnMove: function _updateGestureStateOnMove(gestureState, touchHistory) {
gestureState.numberActiveTouches = touchHistory.numberActiveTouches;
gestureState.moveX = currentCentroidXOfTouchesChangedAfter(touchHistory, gestureState._accountsForMovesUpTo);
gestureState.moveY = currentCentroidYOfTouchesChangedAfter(touchHistory, gestureState._accountsForMovesUpTo);
var movedAfter = gestureState._accountsForMovesUpTo;
var prevX = previousCentroidXOfTouchesChangedAfter(touchHistory, movedAfter);
var x = currentCentroidXOfTouchesChangedAfter(touchHistory, movedAfter);
var prevY = previousCentroidYOfTouchesChangedAfter(touchHistory, movedAfter);
var y = currentCentroidYOfTouchesChangedAfter(touchHistory, movedAfter);
var nextDX = gestureState.dx + (x - prevX);
var nextDY = gestureState.dy + (y - prevY);
var dt = touchHistory.mostRecentTimeStamp - gestureState._accountsForMovesUpTo;
gestureState.vx = (nextDX - gestureState.dx) / dt;
gestureState.vy = (nextDY - gestureState.dy) / dt;
gestureState.dx = nextDX;
gestureState.dy = nextDY;
gestureState._accountsForMovesUpTo = touchHistory.mostRecentTimeStamp;
},
create: function create(config) {
var interactionState = {
handle: null
};
var gestureState = {
stateID: Math.random()
};
PanResponder._initializeGestureState(gestureState);
var panHandlers = {
onStartShouldSetResponder: function onStartShouldSetResponder(e) {
return config.onStartShouldSetPanResponder === undefined ? false : config.onStartShouldSetPanResponder(e, gestureState);
},
onMoveShouldSetResponder: function onMoveShouldSetResponder(e) {
return config.onMoveShouldSetPanResponder === undefined ? false : config.onMoveShouldSetPanResponder(e, gestureState);
},
onStartShouldSetResponderCapture: function onStartShouldSetResponderCapture(e) {
if (e.nativeEvent.touches.length === 1) {
PanResponder._initializeGestureState(gestureState);
}
gestureState.numberActiveTouches = e.touchHistory.numberActiveTouches;
return config.onStartShouldSetPanResponderCapture !== undefined ? config.onStartShouldSetPanResponderCapture(e, gestureState) : false;
},
onMoveShouldSetResponderCapture: function onMoveShouldSetResponderCapture(e) {
var touchHistory = e.touchHistory;
if (gestureState._accountsForMovesUpTo === touchHistory.mostRecentTimeStamp) {
return false;
}
PanResponder._updateGestureStateOnMove(gestureState, touchHistory);
return config.onMoveShouldSetPanResponderCapture ? config.onMoveShouldSetPanResponderCapture(e, gestureState) : false;
},
onResponderGrant: function onResponderGrant(e) {
if (!interactionState.handle) {
interactionState.handle = InteractionManager.createInteractionHandle();
}
gestureState.x0 = currentCentroidX(e.touchHistory);
gestureState.y0 = currentCentroidY(e.touchHistory);
gestureState.dx = 0;
gestureState.dy = 0;
if (config.onPanResponderGrant) {
config.onPanResponderGrant(e, gestureState);
}
return config.onShouldBlockNativeResponder === undefined ? true : config.onShouldBlockNativeResponder();
},
onResponderReject: function onResponderReject(e) {
clearInteractionHandle(interactionState, config.onPanResponderReject, e, gestureState);
},
onResponderRelease: function onResponderRelease(e) {
clearInteractionHandle(interactionState, config.onPanResponderRelease, e, gestureState);
PanResponder._initializeGestureState(gestureState);
},
onResponderStart: function onResponderStart(e) {
var touchHistory = e.touchHistory;
gestureState.numberActiveTouches = touchHistory.numberActiveTouches;
if (config.onPanResponderStart) {
config.onPanResponderStart(e, gestureState);
}
},
onResponderMove: function onResponderMove(e) {
var touchHistory = e.touchHistory;
if (gestureState._accountsForMovesUpTo === touchHistory.mostRecentTimeStamp) {
return;
}
PanResponder._updateGestureStateOnMove(gestureState, touchHistory);
if (config.onPanResponderMove) {
config.onPanResponderMove(e, gestureState);
}
},
onResponderEnd: function onResponderEnd(e) {
var touchHistory = e.touchHistory;
gestureState.numberActiveTouches = touchHistory.numberActiveTouches;
clearInteractionHandle(interactionState, config.onPanResponderEnd, e, gestureState);
},
onResponderTerminate: function onResponderTerminate(e) {
clearInteractionHandle(interactionState, config.onPanResponderTerminate, e, gestureState);
PanResponder._initializeGestureState(gestureState);
},
onResponderTerminationRequest: function onResponderTerminationRequest(e) {
return config.onPanResponderTerminationRequest === undefined ? true : config.onPanResponderTerminationRequest(e, gestureState);
}
};
return {
panHandlers: panHandlers,
getInteractionHandle: function getInteractionHandle() {
return interactionState.handle;
}
};
}
};
function clearInteractionHandle(interactionState, callback, event, gestureState) {
if (interactionState.handle) {
InteractionManager.clearInteractionHandle(interactionState.handle);
interactionState.handle = null;
}
if (callback) {
callback(event, gestureState);
}
}
module.exports = PanResponder;
}, 346, null, "PanResponder");
__d(/* TouchHistoryMath */function(global, require, module, exports) {
'use strict';
var TouchHistoryMath = {
centroidDimension: function centroidDimension(touchHistory, touchesChangedAfter, isXAxis, ofCurrent) {
var touchBank = touchHistory.touchBank;
var total = 0;
var count = 0;
var oneTouchData = touchHistory.numberActiveTouches === 1 ? touchHistory.touchBank[touchHistory.indexOfSingleActiveTouch] : null;
if (oneTouchData !== null) {
if (oneTouchData.touchActive && oneTouchData.currentTimeStamp > touchesChangedAfter) {
total += ofCurrent && isXAxis ? oneTouchData.currentPageX : ofCurrent && !isXAxis ? oneTouchData.currentPageY : !ofCurrent && isXAxis ? oneTouchData.previousPageX : oneTouchData.previousPageY;
count = 1;
}
} else {
for (var i = 0; i < touchBank.length; i++) {
var touchTrack = touchBank[i];
if (touchTrack !== null && touchTrack !== undefined && touchTrack.touchActive && touchTrack.currentTimeStamp >= touchesChangedAfter) {
var toAdd;
if (ofCurrent && isXAxis) {
toAdd = touchTrack.currentPageX;
} else if (ofCurrent && !isXAxis) {
toAdd = touchTrack.currentPageY;
} else if (!ofCurrent && isXAxis) {
toAdd = touchTrack.previousPageX;
} else {
toAdd = touchTrack.previousPageY;
}
total += toAdd;
count++;
}
}
}
return count > 0 ? total / count : TouchHistoryMath.noCentroid;
},
currentCentroidXOfTouchesChangedAfter: function currentCentroidXOfTouchesChangedAfter(touchHistory, touchesChangedAfter) {
return TouchHistoryMath.centroidDimension(touchHistory, touchesChangedAfter, true, true);
},
currentCentroidYOfTouchesChangedAfter: function currentCentroidYOfTouchesChangedAfter(touchHistory, touchesChangedAfter) {
return TouchHistoryMath.centroidDimension(touchHistory, touchesChangedAfter, false, true);
},
previousCentroidXOfTouchesChangedAfter: function previousCentroidXOfTouchesChangedAfter(touchHistory, touchesChangedAfter) {
return TouchHistoryMath.centroidDimension(touchHistory, touchesChangedAfter, true, false);
},
previousCentroidYOfTouchesChangedAfter: function previousCentroidYOfTouchesChangedAfter(touchHistory, touchesChangedAfter) {
return TouchHistoryMath.centroidDimension(touchHistory, touchesChangedAfter, false, false);
},
currentCentroidX: function currentCentroidX(touchHistory) {
return TouchHistoryMath.centroidDimension(touchHistory, 0, true, true);
},
currentCentroidY: function currentCentroidY(touchHistory) {
return TouchHistoryMath.centroidDimension(touchHistory, 0, false, true);
},
noCentroid: -1
};
module.exports = TouchHistoryMath;
}, 347, null, "TouchHistoryMath");
__d(/* clamp */function(global, require, module, exports) {
'use strict';
function clamp(min, value, max) {
if (value < min) {
return min;
}
if (value > max) {
return max;
}
return value;
}
module.exports = clamp;
}, 348, null, "clamp");
__d(/* rebound/rebound.js */function(global, require, module, exports) {
(function () {
var rebound = {};
var util = rebound.util = {};
var concat = Array.prototype.concat;
var slice = Array.prototype.slice;
util.bind = function bind(func, context) {
var args = slice.call(arguments, 2);
return function () {
func.apply(context, concat.call(args, slice.call(arguments)));
};
};
util.extend = function extend(target, source) {
for (var key in source) {
if (source.hasOwnProperty(key)) {
target[key] = source[key];
}
}
};
var SpringSystem = rebound.SpringSystem = function SpringSystem(looper) {
this._springRegistry = {};
this._activeSprings = [];
this.listeners = [];
this._idleSpringIndices = [];
this.looper = looper || new AnimationLooper();
this.looper.springSystem = this;
};
util.extend(SpringSystem.prototype, {
_springRegistry: null,
_isIdle: true,
_lastTimeMillis: -1,
_activeSprings: null,
listeners: null,
_idleSpringIndices: null,
setLooper: function setLooper(looper) {
this.looper = looper;
looper.springSystem = this;
},
createSpring: function createSpring(tension, friction) {
var springConfig;
if (tension === undefined || friction === undefined) {
springConfig = SpringConfig.DEFAULT_ORIGAMI_SPRING_CONFIG;
} else {
springConfig = SpringConfig.fromOrigamiTensionAndFriction(tension, friction);
}
return this.createSpringWithConfig(springConfig);
},
createSpringWithBouncinessAndSpeed: function createSpringWithBouncinessAndSpeed(bounciness, speed) {
var springConfig;
if (bounciness === undefined || speed === undefined) {
springConfig = SpringConfig.DEFAULT_ORIGAMI_SPRING_CONFIG;
} else {
springConfig = SpringConfig.fromBouncinessAndSpeed(bounciness, speed);
}
return this.createSpringWithConfig(springConfig);
},
createSpringWithConfig: function createSpringWithConfig(springConfig) {
var spring = new Spring(this);
this.registerSpring(spring);
spring.setSpringConfig(springConfig);
return spring;
},
getIsIdle: function getIsIdle() {
return this._isIdle;
},
getSpringById: function getSpringById(id) {
return this._springRegistry[id];
},
getAllSprings: function getAllSprings() {
var vals = [];
for (var id in this._springRegistry) {
if (this._springRegistry.hasOwnProperty(id)) {
vals.push(this._springRegistry[id]);
}
}
return vals;
},
registerSpring: function registerSpring(spring) {
this._springRegistry[spring.getId()] = spring;
},
deregisterSpring: function deregisterSpring(spring) {
removeFirst(this._activeSprings, spring);
delete this._springRegistry[spring.getId()];
},
advance: function advance(time, deltaTime) {
while (this._idleSpringIndices.length > 0) {
this._idleSpringIndices.pop();
}for (var i = 0, len = this._activeSprings.length; i < len; i++) {
var spring = this._activeSprings[i];
if (spring.systemShouldAdvance()) {
spring.advance(time / 1000.0, deltaTime / 1000.0);
} else {
this._idleSpringIndices.push(this._activeSprings.indexOf(spring));
}
}
while (this._idleSpringIndices.length > 0) {
var idx = this._idleSpringIndices.pop();
idx >= 0 && this._activeSprings.splice(idx, 1);
}
},
loop: function loop(currentTimeMillis) {
var listener;
if (this._lastTimeMillis === -1) {
this._lastTimeMillis = currentTimeMillis - 1;
}
var ellapsedMillis = currentTimeMillis - this._lastTimeMillis;
this._lastTimeMillis = currentTimeMillis;
var i = 0,
len = this.listeners.length;
for (i = 0; i < len; i++) {
listener = this.listeners[i];
listener.onBeforeIntegrate && listener.onBeforeIntegrate(this);
}
this.advance(currentTimeMillis, ellapsedMillis);
if (this._activeSprings.length === 0) {
this._isIdle = true;
this._lastTimeMillis = -1;
}
for (i = 0; i < len; i++) {
listener = this.listeners[i];
listener.onAfterIntegrate && listener.onAfterIntegrate(this);
}
if (!this._isIdle) {
this.looper.run();
}
},
activateSpring: function activateSpring(springId) {
var spring = this._springRegistry[springId];
if (this._activeSprings.indexOf(spring) == -1) {
this._activeSprings.push(spring);
}
if (this.getIsIdle()) {
this._isIdle = false;
this.looper.run();
}
},
addListener: function addListener(listener) {
this.listeners.push(listener);
},
removeListener: function removeListener(listener) {
removeFirst(this.listeners, listener);
},
removeAllListeners: function removeAllListeners() {
this.listeners = [];
}
});
var Spring = rebound.Spring = function Spring(springSystem) {
this._id = 's' + Spring._ID++;
this._springSystem = springSystem;
this.listeners = [];
this._currentState = new PhysicsState();
this._previousState = new PhysicsState();
this._tempState = new PhysicsState();
};
util.extend(Spring, {
_ID: 0,
MAX_DELTA_TIME_SEC: 0.064,
SOLVER_TIMESTEP_SEC: 0.001
});
util.extend(Spring.prototype, {
_id: 0,
_springConfig: null,
_overshootClampingEnabled: false,
_currentState: null,
_previousState: null,
_tempState: null,
_startValue: 0,
_endValue: 0,
_wasAtRest: true,
_restSpeedThreshold: 0.001,
_displacementFromRestThreshold: 0.001,
listeners: null,
_timeAccumulator: 0,
_springSystem: null,
destroy: function destroy() {
this.listeners = [];
this.frames = [];
this._springSystem.deregisterSpring(this);
},
getId: function getId() {
return this._id;
},
setSpringConfig: function setSpringConfig(springConfig) {
this._springConfig = springConfig;
return this;
},
getSpringConfig: function getSpringConfig() {
return this._springConfig;
},
setCurrentValue: function setCurrentValue(currentValue, skipSetAtRest) {
this._startValue = currentValue;
this._currentState.position = currentValue;
if (!skipSetAtRest) {
this.setAtRest();
}
this.notifyPositionUpdated(false, false);
return this;
},
getStartValue: function getStartValue() {
return this._startValue;
},
getCurrentValue: function getCurrentValue() {
return this._currentState.position;
},
getCurrentDisplacementDistance: function getCurrentDisplacementDistance() {
return this.getDisplacementDistanceForState(this._currentState);
},
getDisplacementDistanceForState: function getDisplacementDistanceForState(state) {
return Math.abs(this._endValue - state.position);
},
setEndValue: function setEndValue(endValue) {
if (this._endValue == endValue && this.isAtRest()) {
return this;
}
this._startValue = this.getCurrentValue();
this._endValue = endValue;
this._springSystem.activateSpring(this.getId());
for (var i = 0, len = this.listeners.length; i < len; i++) {
var listener = this.listeners[i];
var onChange = listener.onSpringEndStateChange;
onChange && onChange(this);
}
return this;
},
getEndValue: function getEndValue() {
return this._endValue;
},
setVelocity: function setVelocity(velocity) {
if (velocity === this._currentState.velocity) {
return this;
}
this._currentState.velocity = velocity;
this._springSystem.activateSpring(this.getId());
return this;
},
getVelocity: function getVelocity() {
return this._currentState.velocity;
},
setRestSpeedThreshold: function setRestSpeedThreshold(restSpeedThreshold) {
this._restSpeedThreshold = restSpeedThreshold;
return this;
},
getRestSpeedThreshold: function getRestSpeedThreshold() {
return this._restSpeedThreshold;
},
setRestDisplacementThreshold: function setRestDisplacementThreshold(displacementFromRestThreshold) {
this._displacementFromRestThreshold = displacementFromRestThreshold;
},
getRestDisplacementThreshold: function getRestDisplacementThreshold() {
return this._displacementFromRestThreshold;
},
setOvershootClampingEnabled: function setOvershootClampingEnabled(enabled) {
this._overshootClampingEnabled = enabled;
return this;
},
isOvershootClampingEnabled: function isOvershootClampingEnabled() {
return this._overshootClampingEnabled;
},
isOvershooting: function isOvershooting() {
var start = this._startValue;
var end = this._endValue;
return this._springConfig.tension > 0 && (start < end && this.getCurrentValue() > end || start > end && this.getCurrentValue() < end);
},
advance: function advance(time, realDeltaTime) {
var isAtRest = this.isAtRest();
if (isAtRest && this._wasAtRest) {
return;
}
var adjustedDeltaTime = realDeltaTime;
if (realDeltaTime > Spring.MAX_DELTA_TIME_SEC) {
adjustedDeltaTime = Spring.MAX_DELTA_TIME_SEC;
}
this._timeAccumulator += adjustedDeltaTime;
var tension = this._springConfig.tension,
friction = this._springConfig.friction,
position = this._currentState.position,
velocity = this._currentState.velocity,
tempPosition = this._tempState.position,
tempVelocity = this._tempState.velocity,
aVelocity,
aAcceleration,
bVelocity,
bAcceleration,
cVelocity,
cAcceleration,
dVelocity,
dAcceleration,
dxdt,
dvdt;
while (this._timeAccumulator >= Spring.SOLVER_TIMESTEP_SEC) {
this._timeAccumulator -= Spring.SOLVER_TIMESTEP_SEC;
if (this._timeAccumulator < Spring.SOLVER_TIMESTEP_SEC) {
this._previousState.position = position;
this._previousState.velocity = velocity;
}
aVelocity = velocity;
aAcceleration = tension * (this._endValue - tempPosition) - friction * velocity;
tempPosition = position + aVelocity * Spring.SOLVER_TIMESTEP_SEC * 0.5;
tempVelocity = velocity + aAcceleration * Spring.SOLVER_TIMESTEP_SEC * 0.5;
bVelocity = tempVelocity;
bAcceleration = tension * (this._endValue - tempPosition) - friction * tempVelocity;
tempPosition = position + bVelocity * Spring.SOLVER_TIMESTEP_SEC * 0.5;
tempVelocity = velocity + bAcceleration * Spring.SOLVER_TIMESTEP_SEC * 0.5;
cVelocity = tempVelocity;
cAcceleration = tension * (this._endValue - tempPosition) - friction * tempVelocity;
tempPosition = position + cVelocity * Spring.SOLVER_TIMESTEP_SEC * 0.5;
tempVelocity = velocity + cAcceleration * Spring.SOLVER_TIMESTEP_SEC * 0.5;
dVelocity = tempVelocity;
dAcceleration = tension * (this._endValue - tempPosition) - friction * tempVelocity;
dxdt = 1.0 / 6.0 * (aVelocity + 2.0 * (bVelocity + cVelocity) + dVelocity);
dvdt = 1.0 / 6.0 * (aAcceleration + 2.0 * (bAcceleration + cAcceleration) + dAcceleration);
position += dxdt * Spring.SOLVER_TIMESTEP_SEC;
velocity += dvdt * Spring.SOLVER_TIMESTEP_SEC;
}
this._tempState.position = tempPosition;
this._tempState.velocity = tempVelocity;
this._currentState.position = position;
this._currentState.velocity = velocity;
if (this._timeAccumulator > 0) {
this._interpolate(this._timeAccumulator / Spring.SOLVER_TIMESTEP_SEC);
}
if (this.isAtRest() || this._overshootClampingEnabled && this.isOvershooting()) {
if (this._springConfig.tension > 0) {
this._startValue = this._endValue;
this._currentState.position = this._endValue;
} else {
this._endValue = this._currentState.position;
this._startValue = this._endValue;
}
this.setVelocity(0);
isAtRest = true;
}
var notifyActivate = false;
if (this._wasAtRest) {
this._wasAtRest = false;
notifyActivate = true;
}
var notifyAtRest = false;
if (isAtRest) {
this._wasAtRest = true;
notifyAtRest = true;
}
this.notifyPositionUpdated(notifyActivate, notifyAtRest);
},
notifyPositionUpdated: function notifyPositionUpdated(notifyActivate, notifyAtRest) {
for (var i = 0, len = this.listeners.length; i < len; i++) {
var listener = this.listeners[i];
if (notifyActivate && listener.onSpringActivate) {
listener.onSpringActivate(this);
}
if (listener.onSpringUpdate) {
listener.onSpringUpdate(this);
}
if (notifyAtRest && listener.onSpringAtRest) {
listener.onSpringAtRest(this);
}
}
},
systemShouldAdvance: function systemShouldAdvance() {
return !this.isAtRest() || !this.wasAtRest();
},
wasAtRest: function wasAtRest() {
return this._wasAtRest;
},
isAtRest: function isAtRest() {
return Math.abs(this._currentState.velocity) < this._restSpeedThreshold && (this.getDisplacementDistanceForState(this._currentState) <= this._displacementFromRestThreshold || this._springConfig.tension === 0);
},
setAtRest: function setAtRest() {
this._endValue = this._currentState.position;
this._tempState.position = this._currentState.position;
this._currentState.velocity = 0;
return this;
},
_interpolate: function _interpolate(alpha) {
this._currentState.position = this._currentState.position * alpha + this._previousState.position * (1 - alpha);
this._currentState.velocity = this._currentState.velocity * alpha + this._previousState.velocity * (1 - alpha);
},
getListeners: function getListeners() {
return this.listeners;
},
addListener: function addListener(newListener) {
this.listeners.push(newListener);
return this;
},
removeListener: function removeListener(listenerToRemove) {
removeFirst(this.listeners, listenerToRemove);
return this;
},
removeAllListeners: function removeAllListeners() {
this.listeners = [];
return this;
},
currentValueIsApproximately: function currentValueIsApproximately(value) {
return Math.abs(this.getCurrentValue() - value) <= this.getRestDisplacementThreshold();
}
});
var PhysicsState = function PhysicsState() {};
util.extend(PhysicsState.prototype, {
position: 0,
velocity: 0
});
var SpringConfig = rebound.SpringConfig = function SpringConfig(tension, friction) {
this.tension = tension;
this.friction = friction;
};
var AnimationLooper = rebound.AnimationLooper = function AnimationLooper() {
this.springSystem = null;
var _this = this;
var _run = function _run() {
_this.springSystem.loop(Date.now());
};
this.run = function () {
util.onFrame(_run);
};
};
rebound.SimulationLooper = function SimulationLooper(timestep) {
this.springSystem = null;
var time = 0;
var running = false;
timestep = timestep || 16.667;
this.run = function () {
if (running) {
return;
}
running = true;
while (!this.springSystem.getIsIdle()) {
this.springSystem.loop(time += timestep);
}
running = false;
};
};
rebound.SteppingSimulationLooper = function (timestep) {
this.springSystem = null;
var time = 0;
this.run = function () {};
this.step = function (timestep) {
this.springSystem.loop(time += timestep);
};
};
var OrigamiValueConverter = rebound.OrigamiValueConverter = {
tensionFromOrigamiValue: function tensionFromOrigamiValue(oValue) {
return (oValue - 30.0) * 3.62 + 194.0;
},
origamiValueFromTension: function origamiValueFromTension(tension) {
return (tension - 194.0) / 3.62 + 30.0;
},
frictionFromOrigamiValue: function frictionFromOrigamiValue(oValue) {
return (oValue - 8.0) * 3.0 + 25.0;
},
origamiFromFriction: function origamiFromFriction(friction) {
return (friction - 25.0) / 3.0 + 8.0;
}
};
var BouncyConversion = rebound.BouncyConversion = function (bounciness, speed) {
this.bounciness = bounciness;
this.speed = speed;
var b = this.normalize(bounciness / 1.7, 0, 20.0);
b = this.projectNormal(b, 0.0, 0.8);
var s = this.normalize(speed / 1.7, 0, 20.0);
this.bouncyTension = this.projectNormal(s, 0.5, 200);
this.bouncyFriction = this.quadraticOutInterpolation(b, this.b3Nobounce(this.bouncyTension), 0.01);
};
util.extend(BouncyConversion.prototype, {
normalize: function normalize(value, startValue, endValue) {
return (value - startValue) / (endValue - startValue);
},
projectNormal: function projectNormal(n, start, end) {
return start + n * (end - start);
},
linearInterpolation: function linearInterpolation(t, start, end) {
return t * end + (1.0 - t) * start;
},
quadraticOutInterpolation: function quadraticOutInterpolation(t, start, end) {
return this.linearInterpolation(2 * t - t * t, start, end);
},
b3Friction1: function b3Friction1(x) {
return 0.0007 * Math.pow(x, 3) - 0.031 * Math.pow(x, 2) + 0.64 * x + 1.28;
},
b3Friction2: function b3Friction2(x) {
return 0.000044 * Math.pow(x, 3) - 0.006 * Math.pow(x, 2) + 0.36 * x + 2.;
},
b3Friction3: function b3Friction3(x) {
return 0.00000045 * Math.pow(x, 3) - 0.000332 * Math.pow(x, 2) + 0.1078 * x + 5.84;
},
b3Nobounce: function b3Nobounce(tension) {
var friction = 0;
if (tension <= 18) {
friction = this.b3Friction1(tension);
} else if (tension > 18 && tension <= 44) {
friction = this.b3Friction2(tension);
} else {
friction = this.b3Friction3(tension);
}
return friction;
}
});
util.extend(SpringConfig, {
fromOrigamiTensionAndFriction: function fromOrigamiTensionAndFriction(tension, friction) {
return new SpringConfig(OrigamiValueConverter.tensionFromOrigamiValue(tension), OrigamiValueConverter.frictionFromOrigamiValue(friction));
},
fromBouncinessAndSpeed: function fromBouncinessAndSpeed(bounciness, speed) {
var bouncyConversion = new rebound.BouncyConversion(bounciness, speed);
return this.fromOrigamiTensionAndFriction(bouncyConversion.bouncyTension, bouncyConversion.bouncyFriction);
},
coastingConfigWithOrigamiFriction: function coastingConfigWithOrigamiFriction(friction) {
return new SpringConfig(0, OrigamiValueConverter.frictionFromOrigamiValue(friction));
}
});
SpringConfig.DEFAULT_ORIGAMI_SPRING_CONFIG = SpringConfig.fromOrigamiTensionAndFriction(40, 7);
util.extend(SpringConfig.prototype, { friction: 0, tension: 0 });
var colorCache = {};
util.hexToRGB = function (color) {
if (colorCache[color]) {
return colorCache[color];
}
color = color.replace('#', '');
if (color.length === 3) {
color = color[0] + color[0] + color[1] + color[1] + color[2] + color[2];
}
var parts = color.match(/.{2}/g);
var ret = {
r: parseInt(parts[0], 16),
g: parseInt(parts[1], 16),
b: parseInt(parts[2], 16)
};
colorCache[color] = ret;
return ret;
};
util.rgbToHex = function (r, g, b) {
r = r.toString(16);
g = g.toString(16);
b = b.toString(16);
r = r.length < 2 ? '0' + r : r;
g = g.length < 2 ? '0' + g : g;
b = b.length < 2 ? '0' + b : b;
return '#' + r + g + b;
};
var MathUtil = rebound.MathUtil = {
mapValueInRange: function mapValueInRange(value, fromLow, fromHigh, toLow, toHigh) {
var fromRangeSize = fromHigh - fromLow;
var toRangeSize = toHigh - toLow;
var valueScale = (value - fromLow) / fromRangeSize;
return toLow + valueScale * toRangeSize;
},
interpolateColor: function interpolateColor(val, startColor, endColor, fromLow, fromHigh, asRGB) {
fromLow = fromLow === undefined ? 0 : fromLow;
fromHigh = fromHigh === undefined ? 1 : fromHigh;
startColor = util.hexToRGB(startColor);
endColor = util.hexToRGB(endColor);
var r = Math.floor(util.mapValueInRange(val, fromLow, fromHigh, startColor.r, endColor.r));
var g = Math.floor(util.mapValueInRange(val, fromLow, fromHigh, startColor.g, endColor.g));
var b = Math.floor(util.mapValueInRange(val, fromLow, fromHigh, startColor.b, endColor.b));
if (asRGB) {
return 'rgb(' + r + ',' + g + ',' + b + ')';
} else {
return util.rgbToHex(r, g, b);
}
},
degreesToRadians: function degreesToRadians(deg) {
return deg * Math.PI / 180;
},
radiansToDegrees: function radiansToDegrees(rad) {
return rad * 180 / Math.PI;
}
};
util.extend(util, MathUtil);
function removeFirst(array, item) {
var idx = array.indexOf(item);
idx != -1 && array.splice(idx, 1);
}
var _onFrame;
if (typeof window !== 'undefined') {
_onFrame = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.msRequestAnimationFrame || window.oRequestAnimationFrame || function (callback) {
window.setTimeout(callback, 1000 / 60);
};
}
if (!_onFrame && typeof process !== 'undefined' && process.title === 'node') {
_onFrame = setImmediate;
}
util.onFrame = function onFrame(func) {
return _onFrame(func);
};
if (typeof exports != 'undefined') {
util.extend(exports, rebound);
} else if (typeof window != 'undefined') {
window.rebound = rebound;
}
})();
}, 349, null, "rebound/rebound.js");
__d(/* NavigatorIOS */function(global, require, module, exports) {
'use strict';
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/node_modules/react-native/Libraries/Components/Navigation/NavigatorIOS.ios.js';
var EventEmitter = require(103 ); // 103 = EventEmitter
var Image = require(237 ); // 237 = Image
var NavigationContext = require(334 ); // 334 = NavigationContext
var RCTNavigatorManager = require(80 ).NavigatorManager; // 80 = NativeModules
var React = require(126 ); // 126 = React
var ReactNative = require(241 ); // 241 = ReactNative
var StaticContainer = require(351 ); // 351 = StaticContainer.react
var StyleSheet = require(127 ); // 127 = StyleSheet
var TVEventHandler = require(214 ); // 214 = TVEventHandler
var View = require(146 ); // 146 = View
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var logError = require(112 ); // 112 = logError
var requireNativeComponent = require(155 ); // 155 = requireNativeComponent
var keyMirror = require(133 ); // 133 = fbjs/lib/keyMirror
var TRANSITIONER_REF = 'transitionerRef';
var PropTypes = React.PropTypes;
var __uid = 0;
function getuid() {
return __uid++;
}
var NavigatorTransitionerIOS = function (_React$Component) {
babelHelpers.inherits(NavigatorTransitionerIOS, _React$Component);
function NavigatorTransitionerIOS() {
babelHelpers.classCallCheck(this, NavigatorTransitionerIOS);
return babelHelpers.possibleConstructorReturn(this, (NavigatorTransitionerIOS.__proto__ || Object.getPrototypeOf(NavigatorTransitionerIOS)).apply(this, arguments));
}
babelHelpers.createClass(NavigatorTransitionerIOS, [{
key: 'requestSchedulingNavigation',
value: function requestSchedulingNavigation(cb) {
RCTNavigatorManager.requestSchedulingJavaScriptNavigation(ReactNative.findNodeHandle(this), logError, cb);
}
}, {
key: 'render',
value: function render() {
return React.createElement(RCTNavigator, babelHelpers.extends({}, this.props, {
__source: {
fileName: _jsxFileName,
lineNumber: 51
}
}));
}
}]);
return NavigatorTransitionerIOS;
}(React.Component);
var SystemIconLabels = {
done: true,
cancel: true,
edit: true,
save: true,
add: true,
compose: true,
reply: true,
action: true,
organize: true,
bookmarks: true,
search: true,
refresh: true,
stop: true,
camera: true,
trash: true,
play: true,
pause: true,
rewind: true,
'fast-forward': true,
undo: true,
redo: true,
'page-curl': true
};
var SystemIcons = keyMirror(SystemIconLabels);
var NavigatorIOS = React.createClass({
displayName: 'NavigatorIOS',
propTypes: {
initialRoute: PropTypes.shape({
component: PropTypes.func.isRequired,
title: PropTypes.string.isRequired,
titleImage: Image.propTypes.source,
passProps: PropTypes.object,
backButtonIcon: Image.propTypes.source,
backButtonTitle: PropTypes.string,
leftButtonIcon: Image.propTypes.source,
leftButtonTitle: PropTypes.string,
leftButtonSystemIcon: PropTypes.oneOf(Object.keys(SystemIcons)),
onLeftButtonPress: PropTypes.func,
rightButtonIcon: Image.propTypes.source,
rightButtonTitle: PropTypes.string,
rightButtonSystemIcon: PropTypes.oneOf(Object.keys(SystemIcons)),
onRightButtonPress: PropTypes.func,
wrapperStyle: View.propTypes.style,
navigationBarHidden: PropTypes.bool,
shadowHidden: PropTypes.bool,
tintColor: PropTypes.string,
barTintColor: PropTypes.string,
titleTextColor: PropTypes.string,
translucent: PropTypes.bool
}).isRequired,
navigationBarHidden: PropTypes.bool,
shadowHidden: PropTypes.bool,
itemWrapperStyle: View.propTypes.style,
tintColor: PropTypes.string,
barTintColor: PropTypes.string,
titleTextColor: PropTypes.string,
translucent: PropTypes.bool,
interactivePopGestureEnabled: PropTypes.bool
},
navigator: undefined,
navigationContext: new NavigationContext(),
componentWillMount: function componentWillMount() {
this.navigator = {
push: this.push,
pop: this.pop,
popN: this.popN,
replace: this.replace,
replaceAtIndex: this.replaceAtIndex,
replacePrevious: this.replacePrevious,
replacePreviousAndPop: this.replacePreviousAndPop,
resetTo: this.resetTo,
popToRoute: this.popToRoute,
popToTop: this.popToTop,
navigationContext: this.navigationContext
};
this._emitWillFocus(this.state.routeStack[this.state.observedTopOfStack]);
},
componentDidMount: function componentDidMount() {
this._emitDidFocus(this.state.routeStack[this.state.observedTopOfStack]);
this._enableTVEventHandler();
},
componentWillUnmount: function componentWillUnmount() {
this.navigationContext.dispose();
this.navigationContext = new NavigationContext();
this._disableTVEventHandler();
},
getDefaultProps: function getDefaultProps() {
return {
translucent: true
};
},
getInitialState: function getInitialState() {
return {
idStack: [getuid()],
routeStack: [this.props.initialRoute],
requestedTopOfStack: 0,
observedTopOfStack: 0,
progress: 1,
fromIndex: 0,
toIndex: 0,
makingNavigatorRequest: false,
updatingAllIndicesAtOrBeyond: 0
};
},
_toFocusOnNavigationComplete: undefined,
_handleFocusRequest: function _handleFocusRequest(item) {
if (this.state.makingNavigatorRequest) {
this._toFocusOnNavigationComplete = item;
} else {
this._getFocusEmitter().emit('focus', item);
}
},
_focusEmitter: undefined,
_getFocusEmitter: function _getFocusEmitter() {
var focusEmitter = this._focusEmitter;
if (!focusEmitter) {
focusEmitter = new EventEmitter();
this._focusEmitter = focusEmitter;
}
return focusEmitter;
},
getChildContext: function getChildContext() {
return {
onFocusRequested: this._handleFocusRequest,
focusEmitter: this._getFocusEmitter()
};
},
childContextTypes: {
onFocusRequested: React.PropTypes.func,
focusEmitter: React.PropTypes.instanceOf(EventEmitter)
},
_tryLockNavigator: function _tryLockNavigator(cb) {
this.refs[TRANSITIONER_REF].requestSchedulingNavigation(function (acquiredLock) {
return acquiredLock && cb();
});
},
_handleNavigatorStackChanged: function _handleNavigatorStackChanged(e) {
var newObservedTopOfStack = e.nativeEvent.stackLength - 1;
this._emitDidFocus(this.state.routeStack[newObservedTopOfStack]);
invariant(newObservedTopOfStack <= this.state.requestedTopOfStack, 'No navigator item should be pushed without JS knowing about it %s %s', newObservedTopOfStack, this.state.requestedTopOfStack);
var wasWaitingForConfirmation = this.state.requestedTopOfStack !== this.state.observedTopOfStack;
if (wasWaitingForConfirmation) {
invariant(newObservedTopOfStack === this.state.requestedTopOfStack, 'If waiting for observedTopOfStack to reach requestedTopOfStack, ' + 'the only valid observedTopOfStack should be requestedTopOfStack.');
}
var nextState = {
observedTopOfStack: newObservedTopOfStack,
makingNavigatorRequest: false,
updatingAllIndicesAtOrBeyond: null,
progress: 1,
toIndex: newObservedTopOfStack,
fromIndex: newObservedTopOfStack
};
this.setState(nextState, this._eliminateUnneededChildren);
},
_eliminateUnneededChildren: function _eliminateUnneededChildren() {
var updatingAllIndicesAtOrBeyond = this.state.routeStack.length > this.state.observedTopOfStack + 1 ? this.state.observedTopOfStack + 1 : null;
this.setState({
idStack: this.state.idStack.slice(0, this.state.observedTopOfStack + 1),
routeStack: this.state.routeStack.slice(0, this.state.observedTopOfStack + 1),
requestedTopOfStack: this.state.observedTopOfStack,
makingNavigatorRequest: true,
updatingAllIndicesAtOrBeyond: updatingAllIndicesAtOrBeyond
});
},
_emitDidFocus: function _emitDidFocus(route) {
this.navigationContext.emit('didfocus', { route: route });
},
_emitWillFocus: function _emitWillFocus(route) {
this.navigationContext.emit('willfocus', { route: route });
},
push: function push(route) {
var _this2 = this;
invariant(!!route, 'Must supply route to push');
if (this.state.requestedTopOfStack === this.state.observedTopOfStack) {
this._tryLockNavigator(function () {
_this2._emitWillFocus(route);
var nextStack = _this2.state.routeStack.concat([route]);
var nextIDStack = _this2.state.idStack.concat([getuid()]);
_this2.setState({
idStack: nextIDStack,
routeStack: nextStack,
requestedTopOfStack: nextStack.length - 1,
makingNavigatorRequest: true,
updatingAllIndicesAtOrBeyond: nextStack.length - 1
});
});
}
},
popN: function popN(n) {
var _this3 = this;
if (n === 0) {
return;
}
if (this.state.requestedTopOfStack === this.state.observedTopOfStack) {
if (this.state.requestedTopOfStack > 0) {
this._tryLockNavigator(function () {
var newRequestedTopOfStack = _this3.state.requestedTopOfStack - n;
invariant(newRequestedTopOfStack >= 0, 'Cannot pop below 0');
_this3._emitWillFocus(_this3.state.routeStack[newRequestedTopOfStack]);
_this3.setState({
requestedTopOfStack: newRequestedTopOfStack,
makingNavigatorRequest: true,
updatingAllIndicesAtOrBeyond: _this3.state.requestedTopOfStack - n
});
});
}
}
},
pop: function pop() {
this.popN(1);
},
replaceAtIndex: function replaceAtIndex(route, index) {
invariant(!!route, 'Must supply route to replace');
if (index < 0) {
index += this.state.routeStack.length;
}
if (this.state.routeStack.length <= index) {
return;
}
var nextIDStack = this.state.idStack.slice();
var nextRouteStack = this.state.routeStack.slice();
nextIDStack[index] = getuid();
nextRouteStack[index] = route;
this.setState({
idStack: nextIDStack,
routeStack: nextRouteStack,
makingNavigatorRequest: false,
updatingAllIndicesAtOrBeyond: index
});
this._emitWillFocus(route);
this._emitDidFocus(route);
},
replace: function replace(route) {
this.replaceAtIndex(route, -1);
},
replacePrevious: function replacePrevious(route) {
this.replaceAtIndex(route, -2);
},
popToTop: function popToTop() {
this.popToRoute(this.state.routeStack[0]);
},
popToRoute: function popToRoute(route) {
var indexOfRoute = this.state.routeStack.indexOf(route);
invariant(indexOfRoute !== -1, 'Calling pop to route for a route that doesn\'t exist!');
var numToPop = this.state.routeStack.length - indexOfRoute - 1;
this.popN(numToPop);
},
replacePreviousAndPop: function replacePreviousAndPop(route) {
var _this4 = this;
if (this.state.requestedTopOfStack !== this.state.observedTopOfStack) {
return;
}
if (this.state.routeStack.length < 2) {
return;
}
this._tryLockNavigator(function () {
_this4.replacePrevious(route);
_this4.setState({
requestedTopOfStack: _this4.state.requestedTopOfStack - 1,
makingNavigatorRequest: true
});
});
},
resetTo: function resetTo(route) {
invariant(!!route, 'Must supply route to push');
if (this.state.requestedTopOfStack !== this.state.observedTopOfStack) {
return;
}
this.replaceAtIndex(route, 0);
this.popToRoute(route);
},
_handleNavigationComplete: function _handleNavigationComplete(e) {
e.stopPropagation();
if (this._toFocusOnNavigationComplete) {
this._getFocusEmitter().emit('focus', this._toFocusOnNavigationComplete);
this._toFocusOnNavigationComplete = null;
}
this._handleNavigatorStackChanged(e);
},
_routeToStackItem: function _routeToStackItem(routeArg, i) {
var component = routeArg.component,
wrapperStyle = routeArg.wrapperStyle,
passProps = routeArg.passProps,
route = babelHelpers.objectWithoutProperties(routeArg, ['component', 'wrapperStyle', 'passProps']);
var _props = this.props,
itemWrapperStyle = _props.itemWrapperStyle,
props = babelHelpers.objectWithoutProperties(_props, ['itemWrapperStyle']);
var shouldUpdateChild = this.state.updatingAllIndicesAtOrBeyond != null && this.state.updatingAllIndicesAtOrBeyond >= i;
var Component = component;
return React.createElement(
StaticContainer,
{ key: 'nav' + i, shouldUpdate: shouldUpdateChild, __source: {
fileName: _jsxFileName,
lineNumber: 855
}
},
React.createElement(
RCTNavigatorItem,
babelHelpers.extends({}, props, route, {
style: [styles.stackItem, itemWrapperStyle, wrapperStyle], __source: {
fileName: _jsxFileName,
lineNumber: 856
}
}),
React.createElement(Component, babelHelpers.extends({
navigator: this.navigator,
route: route
}, passProps, {
__source: {
fileName: _jsxFileName,
lineNumber: 864
}
}))
)
);
},
_renderNavigationStackItems: function _renderNavigationStackItems() {
var shouldRecurseToNavigator = this.state.makingNavigatorRequest || this.state.updatingAllIndicesAtOrBeyond !== null;
var items = shouldRecurseToNavigator ? this.state.routeStack.map(this._routeToStackItem) : null;
return React.createElement(
StaticContainer,
{ shouldUpdate: shouldRecurseToNavigator, __source: {
fileName: _jsxFileName,
lineNumber: 883
}
},
React.createElement(
NavigatorTransitionerIOS,
{
ref: TRANSITIONER_REF,
style: styles.transitioner,
vertical: this.props.vertical,
requestedTopOfStack: this.state.requestedTopOfStack,
onNavigationComplete: this._handleNavigationComplete,
interactivePopGestureEnabled: this.props.interactivePopGestureEnabled, __source: {
fileName: _jsxFileName,
lineNumber: 884
}
},
items
)
);
},
_tvEventHandler: undefined,
_enableTVEventHandler: function _enableTVEventHandler() {
this._tvEventHandler = new TVEventHandler();
this._tvEventHandler.enable(this, function (cmp, evt) {
if (evt && evt.eventType === 'menu') {
cmp.pop();
}
});
},
_disableTVEventHandler: function _disableTVEventHandler() {
if (this._tvEventHandler) {
this._tvEventHandler.disable();
delete this._tvEventHandler;
}
},
render: function render() {
return React.createElement(
View,
{ style: this.props.style, __source: {
fileName: _jsxFileName,
lineNumber: 917
}
},
this._renderNavigationStackItems()
);
}
});
var styles = StyleSheet.create({
stackItem: {
backgroundColor: 'white',
overflow: 'hidden',
position: 'absolute',
top: 0,
left: 0,
right: 0,
bottom: 0
},
transitioner: {
flex: 1
}
});
var RCTNavigator = requireNativeComponent('RCTNavigator');
var RCTNavigatorItem = requireNativeComponent('RCTNavItem');
module.exports = NavigatorIOS;
}, 350, null, "NavigatorIOS");
__d(/* StaticContainer.react */function(global, require, module, exports) {
'use strict';
var React = require(126 ); // 126 = React
var StaticContainer = function (_React$Component) {
babelHelpers.inherits(StaticContainer, _React$Component);
function StaticContainer() {
babelHelpers.classCallCheck(this, StaticContainer);
return babelHelpers.possibleConstructorReturn(this, (StaticContainer.__proto__ || Object.getPrototypeOf(StaticContainer)).apply(this, arguments));
}
babelHelpers.createClass(StaticContainer, [{
key: 'shouldComponentUpdate',
value: function shouldComponentUpdate(nextProps) {
return !!nextProps.shouldUpdate;
}
}, {
key: 'render',
value: function render() {
var child = this.props.children;
return child === null || child === false ? null : React.Children.only(child);
}
}]);
return StaticContainer;
}(React.Component);
module.exports = StaticContainer;
}, 351, null, "StaticContainer.react");
__d(/* Picker */function(global, require, module, exports) {
'use strict';
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/node_modules/react-native/Libraries/Components/Picker/Picker.js',
_class,
_temp;
var ColorPropType = require(71 ); // 71 = ColorPropType
var PickerIOS = require(353 ); // 353 = PickerIOS
var PickerAndroid = require(354 ); // 354 = PickerAndroid
var Platform = require(79 ); // 79 = Platform
var React = require(126 ); // 126 = React
var StyleSheetPropType = require(153 ); // 153 = StyleSheetPropType
var TextStylePropTypes = require(139 ); // 139 = TextStylePropTypes
var UnimplementedView = require(156 ); // 156 = UnimplementedView
var View = require(146 ); // 146 = View
var ViewStylePropTypes = require(140 ); // 140 = ViewStylePropTypes
var itemStylePropType = StyleSheetPropType(TextStylePropTypes);
var pickerStyleType = StyleSheetPropType(babelHelpers.extends({}, ViewStylePropTypes, {
color: ColorPropType
}));
var MODE_DIALOG = 'dialog';
var MODE_DROPDOWN = 'dropdown';
var Picker = function (_React$Component) {
babelHelpers.inherits(Picker, _React$Component);
function Picker() {
babelHelpers.classCallCheck(this, Picker);
return babelHelpers.possibleConstructorReturn(this, (Picker.__proto__ || Object.getPrototypeOf(Picker)).apply(this, arguments));
}
babelHelpers.createClass(Picker, [{
key: 'render',
value: function render() {
if (Platform.OS === 'ios') {
return React.createElement(
PickerIOS,
babelHelpers.extends({}, this.props, {
__source: {
fileName: _jsxFileName,
lineNumber: 119
}
}),
this.props.children
);
} else if (Platform.OS === 'android') {
return React.createElement(
PickerAndroid,
babelHelpers.extends({}, this.props, {
__source: {
fileName: _jsxFileName,
lineNumber: 122
}
}),
this.props.children
);
} else {
return React.createElement(UnimplementedView, {
__source: {
fileName: _jsxFileName,
lineNumber: 124
}
});
}
}
}]);
return Picker;
}(React.Component);
Picker.MODE_DIALOG = MODE_DIALOG;
Picker.MODE_DROPDOWN = MODE_DROPDOWN;
Picker.defaultProps = {
mode: MODE_DIALOG
};
Picker.propTypes = babelHelpers.extends({}, View.propTypes, {
style: pickerStyleType,
selectedValue: React.PropTypes.any,
onValueChange: React.PropTypes.func,
enabled: React.PropTypes.bool,
mode: React.PropTypes.oneOf(['dialog', 'dropdown']),
itemStyle: itemStylePropType,
prompt: React.PropTypes.string,
testID: React.PropTypes.string
});
Picker.Item = (_temp = _class = function (_React$Component2) {
babelHelpers.inherits(_class, _React$Component2);
function _class() {
babelHelpers.classCallCheck(this, _class);
return babelHelpers.possibleConstructorReturn(this, (_class.__proto__ || Object.getPrototypeOf(_class)).apply(this, arguments));
}
babelHelpers.createClass(_class, [{
key: 'render',
value: function render() {
throw null;
}
}]);
return _class;
}(React.Component), _class.propTypes = {
label: React.PropTypes.string.isRequired,
value: React.PropTypes.any,
color: ColorPropType,
testID: React.PropTypes.string
}, _temp);
module.exports = Picker;
}, 352, null, "Picker");
__d(/* PickerIOS */function(global, require, module, exports) {
'use strict';
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/node_modules/react-native/Libraries/Components/Picker/PickerIOS.ios.js',
_class,
_temp;
var NativeMethodsMixin = require(73 ); // 73 = NativeMethodsMixin
var React = require(126 ); // 126 = React
var StyleSheet = require(127 ); // 127 = StyleSheet
var StyleSheetPropType = require(153 ); // 153 = StyleSheetPropType
var TextStylePropTypes = require(139 ); // 139 = TextStylePropTypes
var View = require(146 ); // 146 = View
var processColor = require(121 ); // 121 = processColor
var itemStylePropType = StyleSheetPropType(TextStylePropTypes);
var requireNativeComponent = require(155 ); // 155 = requireNativeComponent
var PickerIOS = React.createClass({
displayName: 'PickerIOS',
mixins: [NativeMethodsMixin],
propTypes: babelHelpers.extends({}, View.propTypes, {
itemStyle: itemStylePropType,
onValueChange: React.PropTypes.func,
selectedValue: React.PropTypes.any }),
getInitialState: function getInitialState() {
return this._stateFromProps(this.props);
},
componentWillReceiveProps: function componentWillReceiveProps(nextProps) {
this.setState(this._stateFromProps(nextProps));
},
_stateFromProps: function _stateFromProps(props) {
var selectedIndex = 0;
var items = [];
React.Children.toArray(props.children).forEach(function (child, index) {
if (child.props.value === props.selectedValue) {
selectedIndex = index;
}
items.push({
value: child.props.value,
label: child.props.label,
textColor: processColor(child.props.color)
});
});
return { selectedIndex: selectedIndex, items: items };
},
render: function render() {
var _this = this;
return React.createElement(
View,
{ style: this.props.style, __source: {
fileName: _jsxFileName,
lineNumber: 63
}
},
React.createElement(RCTPickerIOS, {
ref: function ref(picker) {
return _this._picker = picker;
},
style: [styles.pickerIOS, this.props.itemStyle],
items: this.state.items,
selectedIndex: this.state.selectedIndex,
onChange: this._onChange,
onStartShouldSetResponder: function onStartShouldSetResponder() {
return true;
},
onResponderTerminationRequest: function onResponderTerminationRequest() {
return false;
},
__source: {
fileName: _jsxFileName,
lineNumber: 64
}
})
);
},
_onChange: function _onChange(event) {
if (this.props.onChange) {
this.props.onChange(event);
}
if (this.props.onValueChange) {
this.props.onValueChange(event.nativeEvent.newValue, event.nativeEvent.newIndex);
}
if (this._picker && this.state.selectedIndex !== event.nativeEvent.newIndex) {
this._picker.setNativeProps({
selectedIndex: this.state.selectedIndex
});
}
}
});
PickerIOS.Item = (_temp = _class = function (_React$Component) {
babelHelpers.inherits(_class, _React$Component);
function _class() {
babelHelpers.classCallCheck(this, _class);
return babelHelpers.possibleConstructorReturn(this, (_class.__proto__ || Object.getPrototypeOf(_class)).apply(this, arguments));
}
babelHelpers.createClass(_class, [{
key: 'render',
value: function render() {
return null;
}
}]);
return _class;
}(React.Component), _class.propTypes = {
value: React.PropTypes.any,
label: React.PropTypes.string,
color: React.PropTypes.string
}, _temp);
var styles = StyleSheet.create({
pickerIOS: {
height: 216
}
});
var RCTPickerIOS = requireNativeComponent('RCTPicker', {
propTypes: {
style: itemStylePropType
}
}, {
nativeOnly: {
items: true,
onChange: true,
selectedIndex: true
}
});
module.exports = PickerIOS;
}, 353, null, "PickerIOS");
__d(/* PickerAndroid */function(global, require, module, exports) {
'use strict';
module.exports = require(156 ); // 156 = UnimplementedView
}, 354, null, "PickerAndroid");
__d(/* ProgressBarAndroid */function(global, require, module, exports) {
'use strict';
module.exports = require(156 ); // 156 = UnimplementedView
}, 355, null, "ProgressBarAndroid");
__d(/* ProgressViewIOS */function(global, require, module, exports) {
'use strict';
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/node_modules/react-native/Libraries/Components/ProgressViewIOS/ProgressViewIOS.ios.js';
var Image = require(237 ); // 237 = Image
var NativeMethodsMixin = require(73 ); // 73 = NativeMethodsMixin
var React = require(126 ); // 126 = React
var StyleSheet = require(127 ); // 127 = StyleSheet
var View = require(146 ); // 146 = View
var requireNativeComponent = require(155 ); // 155 = requireNativeComponent
var PropTypes = React.PropTypes;
var ProgressViewIOS = React.createClass({
displayName: 'ProgressViewIOS',
mixins: [NativeMethodsMixin],
propTypes: babelHelpers.extends({}, View.propTypes, {
progressViewStyle: PropTypes.oneOf(['default', 'bar']),
progress: PropTypes.number,
progressTintColor: PropTypes.string,
trackTintColor: PropTypes.string,
progressImage: Image.propTypes.source,
trackImage: Image.propTypes.source
}),
render: function render() {
return React.createElement(RCTProgressView, babelHelpers.extends({}, this.props, {
style: [styles.progressView, this.props.style],
__source: {
fileName: _jsxFileName,
lineNumber: 65
}
}));
}
});
var styles = StyleSheet.create({
progressView: {
height: 2
}
});
var RCTProgressView = requireNativeComponent('RCTProgressView', ProgressViewIOS);
module.exports = ProgressViewIOS;
}, 356, null, "ProgressViewIOS");
__d(/* SegmentedControlIOS */function(global, require, module, exports) {
'use strict';
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/node_modules/react-native/Libraries/Components/SegmentedControlIOS/SegmentedControlIOS.ios.js';
var NativeMethodsMixin = require(73 ); // 73 = NativeMethodsMixin
var React = require(126 ); // 126 = React
var StyleSheet = require(127 ); // 127 = StyleSheet
var View = require(146 ); // 146 = View
var requireNativeComponent = require(155 ); // 155 = requireNativeComponent
var PropTypes = React.PropTypes;
var SEGMENTED_CONTROL_REFERENCE = 'segmentedcontrol';
var SegmentedControlIOS = React.createClass({
displayName: 'SegmentedControlIOS',
mixins: [NativeMethodsMixin],
propTypes: babelHelpers.extends({}, View.propTypes, {
values: PropTypes.arrayOf(PropTypes.string),
selectedIndex: PropTypes.number,
onValueChange: PropTypes.func,
onChange: PropTypes.func,
enabled: PropTypes.bool,
tintColor: PropTypes.string,
momentary: PropTypes.bool
}),
getDefaultProps: function getDefaultProps() {
return {
values: [],
enabled: true
};
},
_onChange: function _onChange(event) {
this.props.onChange && this.props.onChange(event);
this.props.onValueChange && this.props.onValueChange(event.nativeEvent.value);
},
render: function render() {
return React.createElement(RCTSegmentedControl, babelHelpers.extends({}, this.props, {
ref: SEGMENTED_CONTROL_REFERENCE,
style: [styles.segmentedControl, this.props.style],
onChange: this._onChange,
__source: {
fileName: _jsxFileName,
lineNumber: 111
}
}));
}
});
var styles = StyleSheet.create({
segmentedControl: {
height: 28
}
});
var RCTSegmentedControl = requireNativeComponent('RCTSegmentedControl', SegmentedControlIOS);
module.exports = SegmentedControlIOS;
}, 357, null, "SegmentedControlIOS");
__d(/* Slider */function(global, require, module, exports) {
'use strict';
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/node_modules/react-native/Libraries/Components/Slider/Slider.js';
var Image = require(237 ); // 237 = Image
var ColorPropType = require(71 ); // 71 = ColorPropType
var NativeMethodsMixin = require(73 ); // 73 = NativeMethodsMixin
var ReactNativeViewAttributes = require(152 ); // 152 = ReactNativeViewAttributes
var Platform = require(79 ); // 79 = Platform
var React = require(126 ); // 126 = React
var StyleSheet = require(127 ); // 127 = StyleSheet
var View = require(146 ); // 146 = View
var requireNativeComponent = require(155 ); // 155 = requireNativeComponent
var PropTypes = React.PropTypes;
var Slider = React.createClass({
displayName: 'Slider',
mixins: [NativeMethodsMixin],
propTypes: babelHelpers.extends({}, View.propTypes, {
style: View.propTypes.style,
value: PropTypes.number,
step: PropTypes.number,
minimumValue: PropTypes.number,
maximumValue: PropTypes.number,
minimumTrackTintColor: ColorPropType,
maximumTrackTintColor: ColorPropType,
disabled: PropTypes.bool,
trackImage: Image.propTypes.source,
minimumTrackImage: Image.propTypes.source,
maximumTrackImage: Image.propTypes.source,
thumbImage: Image.propTypes.source,
thumbTintColor: ColorPropType,
onValueChange: PropTypes.func,
onSlidingComplete: PropTypes.func,
testID: PropTypes.string
}),
getDefaultProps: function getDefaultProps() {
return {
disabled: false,
value: 0,
minimumValue: 0,
maximumValue: 1,
step: 0
};
},
viewConfig: {
uiViewClassName: 'RCTSlider',
validAttributes: babelHelpers.extends({}, ReactNativeViewAttributes.RCTView, {
value: true
})
},
render: function render() {
var _props = this.props,
style = _props.style,
onValueChange = _props.onValueChange,
onSlidingComplete = _props.onSlidingComplete,
props = babelHelpers.objectWithoutProperties(_props, ['style', 'onValueChange', 'onSlidingComplete']);
props.style = [styles.slider, style];
props.onValueChange = onValueChange && function (event) {
var userEvent = true;
if (Platform.OS === 'android') {
userEvent = event.nativeEvent.fromUser;
}
onValueChange && userEvent && onValueChange(event.nativeEvent.value);
};
props.onChange = props.onValueChange;
props.onSlidingComplete = onSlidingComplete && function (event) {
onSlidingComplete && onSlidingComplete(event.nativeEvent.value);
};
return React.createElement(RCTSlider, babelHelpers.extends({}, props, {
enabled: !this.props.disabled,
onStartShouldSetResponder: function onStartShouldSetResponder() {
return true;
},
onResponderTerminationRequest: function onResponderTerminationRequest() {
return false;
},
__source: {
fileName: _jsxFileName,
lineNumber: 177
}
}));
}
});
var styles = void 0;
if (Platform.OS === 'ios') {
styles = StyleSheet.create({
slider: {
height: 40
}
});
} else {
styles = StyleSheet.create({
slider: {}
});
}
var options = {};
if (Platform.OS === 'android') {
options = {
nativeOnly: {
enabled: true
}
};
}
var RCTSlider = requireNativeComponent('RCTSlider', Slider, options);
module.exports = Slider;
}, 358, null, "Slider");
__d(/* SnapshotViewIOS */function(global, require, module, exports) {
'use strict';
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/node_modules/react-native/Libraries/RCTTest/SnapshotViewIOS.ios.js';
var React = require(126 ); // 126 = React
var StyleSheet = require(127 ); // 127 = StyleSheet
var _require = require(80 ), // 80 = NativeModules
TestModule = _require.TestModule;
var UIManager = require(123 ); // 123 = UIManager
var View = require(146 ); // 146 = View
var requireNativeComponent = require(155 ); // 155 = requireNativeComponent
var SnapshotViewIOS = function (_React$Component) {
babelHelpers.inherits(SnapshotViewIOS, _React$Component);
function SnapshotViewIOS() {
var _ref;
var _temp, _this, _ret;
babelHelpers.classCallCheck(this, SnapshotViewIOS);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = babelHelpers.possibleConstructorReturn(this, (_ref = SnapshotViewIOS.__proto__ || Object.getPrototypeOf(SnapshotViewIOS)).call.apply(_ref, [this].concat(args))), _this), _this.onDefaultAction = function (event) {
TestModule.verifySnapshot(TestModule.markTestPassed);
}, _temp), babelHelpers.possibleConstructorReturn(_this, _ret);
}
babelHelpers.createClass(SnapshotViewIOS, [{
key: 'render',
value: function render() {
var testIdentifier = this.props.testIdentifier || 'test';
var onSnapshotReady = this.props.onSnapshotReady || this.onDefaultAction;
return React.createElement(RCTSnapshot, babelHelpers.extends({
style: style.snapshot
}, this.props, {
onSnapshotReady: onSnapshotReady,
testIdentifier: testIdentifier,
__source: {
fileName: _jsxFileName,
lineNumber: 44
}
}));
}
}]);
return SnapshotViewIOS;
}(React.Component);
SnapshotViewIOS.propTypes = babelHelpers.extends({}, View.propTypes, {
onSnapshotReady: React.PropTypes.func,
testIdentifier: React.PropTypes.string
});
var style = StyleSheet.create({
snapshot: {
flex: 1
}
});
var RCTSnapshot = UIManager.RCTSnapshot ? requireNativeComponent('RCTSnapshot', SnapshotViewIOS) : View;
module.exports = SnapshotViewIOS;
}, 359, null, "SnapshotViewIOS");
__d(/* Switch */function(global, require, module, exports) {
'use strict';
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/node_modules/react-native/Libraries/Components/Switch/Switch.js';
var ColorPropType = require(71 ); // 71 = ColorPropType
var NativeMethodsMixin = require(73 ); // 73 = NativeMethodsMixin
var Platform = require(79 ); // 79 = Platform
var React = require(126 ); // 126 = React
var StyleSheet = require(127 ); // 127 = StyleSheet
var View = require(146 ); // 146 = View
var requireNativeComponent = require(155 ); // 155 = requireNativeComponent
var PropTypes = React.PropTypes;
var Switch = React.createClass({
displayName: 'Switch',
propTypes: babelHelpers.extends({}, View.propTypes, {
value: PropTypes.bool,
disabled: PropTypes.bool,
onValueChange: PropTypes.func,
testID: PropTypes.string,
tintColor: ColorPropType,
onTintColor: ColorPropType,
thumbTintColor: ColorPropType
}),
getDefaultProps: function getDefaultProps() {
return {
value: false,
disabled: false
};
},
mixins: [NativeMethodsMixin],
_rctSwitch: {},
_onChange: function _onChange(event) {
if (Platform.OS === 'android') {
this._rctSwitch.setNativeProps({ on: this.props.value });
} else {
this._rctSwitch.setNativeProps({ value: this.props.value });
}
this.props.onChange && this.props.onChange(event);
this.props.onValueChange && this.props.onValueChange(event.nativeEvent.value);
},
render: function render() {
var _this = this;
var props = babelHelpers.extends({}, this.props);
props.onStartShouldSetResponder = function () {
return true;
};
props.onResponderTerminationRequest = function () {
return false;
};
if (Platform.OS === 'android') {
props.enabled = !this.props.disabled;
props.on = this.props.value;
props.style = this.props.style;
props.trackTintColor = this.props.value ? this.props.onTintColor : this.props.tintColor;
} else if (Platform.OS === 'ios') {
props.style = [styles.rctSwitchIOS, this.props.style];
}
return React.createElement(RCTSwitch, babelHelpers.extends({}, props, {
ref: function ref(_ref) {
_this._rctSwitch = _ref;
},
onChange: this._onChange,
__source: {
fileName: _jsxFileName,
lineNumber: 111
}
}));
}
});
var styles = StyleSheet.create({
rctSwitchIOS: {
height: 31,
width: 51
}
});
if (Platform.OS === 'android') {
var RCTSwitch = requireNativeComponent('AndroidSwitch', Switch, {
nativeOnly: {
onChange: true,
on: true,
enabled: true,
trackTintColor: true
}
});
} else {
var RCTSwitch = requireNativeComponent('RCTSwitch', Switch, {
nativeOnly: {
onChange: true
}
});
}
module.exports = Switch;
}, 360, null, "Switch");
__d(/* RefreshControl */function(global, require, module, exports) {
'use strict';
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/node_modules/react-native/Libraries/Components/RefreshControl/RefreshControl.js';
var ColorPropType = require(71 ); // 71 = ColorPropType
var NativeMethodsMixin = require(73 ); // 73 = NativeMethodsMixin
var Platform = require(79 ); // 79 = Platform
var React = require(126 ); // 126 = React
var View = require(146 ); // 146 = View
var requireNativeComponent = require(155 ); // 155 = requireNativeComponent
if (Platform.OS === 'android') {
var RefreshLayoutConsts = require(123 ).AndroidSwipeRefreshLayout.Constants; // 123 = UIManager
} else {
var RefreshLayoutConsts = { SIZE: {} };
}
var RefreshControl = React.createClass({
displayName: 'RefreshControl',
statics: {
SIZE: RefreshLayoutConsts.SIZE
},
mixins: [NativeMethodsMixin],
propTypes: babelHelpers.extends({}, View.propTypes, {
onRefresh: React.PropTypes.func,
refreshing: React.PropTypes.bool.isRequired,
tintColor: ColorPropType,
titleColor: ColorPropType,
title: React.PropTypes.string,
enabled: React.PropTypes.bool,
colors: React.PropTypes.arrayOf(ColorPropType),
progressBackgroundColor: ColorPropType,
size: React.PropTypes.oneOf([RefreshLayoutConsts.SIZE.DEFAULT, RefreshLayoutConsts.SIZE.LARGE]),
progressViewOffset: React.PropTypes.number
}),
_nativeRef: null,
_lastNativeRefreshing: false,
componentDidMount: function componentDidMount() {
this._lastNativeRefreshing = this.props.refreshing;
},
componentDidUpdate: function componentDidUpdate(prevProps) {
if (this.props.refreshing !== prevProps.refreshing) {
this._lastNativeRefreshing = this.props.refreshing;
} else if (this.props.refreshing !== this._lastNativeRefreshing) {
this._nativeRef.setNativeProps({ refreshing: this.props.refreshing });
this._lastNativeRefreshing = this.props.refreshing;
}
},
render: function render() {
var _this = this;
return React.createElement(NativeRefreshControl, babelHelpers.extends({}, this.props, {
ref: function ref(_ref) {
_this._nativeRef = _ref;
},
onRefresh: this._onRefresh,
__source: {
fileName: _jsxFileName,
lineNumber: 153
}
}));
},
_onRefresh: function _onRefresh() {
this._lastNativeRefreshing = true;
this.props.onRefresh && this.props.onRefresh();
this.forceUpdate();
}
});
if (Platform.OS === 'ios') {
var NativeRefreshControl = requireNativeComponent('RCTRefreshControl', RefreshControl);
} else if (Platform.OS === 'android') {
var NativeRefreshControl = requireNativeComponent('AndroidSwipeRefreshLayout', RefreshControl);
}
module.exports = RefreshControl;
}, 361, null, "RefreshControl");
__d(/* StatusBar */function(global, require, module, exports) {
'use strict';
var React = require(126 ); // 126 = React
var ColorPropType = require(71 ); // 71 = ColorPropType
var Platform = require(79 ); // 79 = Platform
var processColor = require(121 ); // 121 = processColor
var StatusBarManager = require(80 ).StatusBarManager; // 80 = NativeModules
function mergePropsStack(propsStack, defaultValues) {
return propsStack.reduce(function (prev, cur) {
for (var prop in cur) {
if (cur[prop] != null) {
prev[prop] = cur[prop];
}
}
return prev;
}, babelHelpers.extends({}, defaultValues));
}
function createStackEntry(props) {
return {
backgroundColor: props.backgroundColor != null ? {
value: props.backgroundColor,
animated: props.animated
} : null,
barStyle: props.barStyle != null ? {
value: props.barStyle,
animated: props.animated
} : null,
translucent: props.translucent,
hidden: props.hidden != null ? {
value: props.hidden,
animated: props.animated,
transition: props.showHideTransition
} : null,
networkActivityIndicatorVisible: props.networkActivityIndicatorVisible
};
}
var StatusBar = function (_React$Component) {
babelHelpers.inherits(StatusBar, _React$Component);
function StatusBar() {
var _ref;
var _temp, _this, _ret;
babelHelpers.classCallCheck(this, StatusBar);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = babelHelpers.possibleConstructorReturn(this, (_ref = StatusBar.__proto__ || Object.getPrototypeOf(StatusBar)).call.apply(_ref, [this].concat(args))), _this), _this._stackEntry = null, _this._updatePropsStack = function () {
clearImmediate(StatusBar._updateImmediate);
StatusBar._updateImmediate = setImmediate(function () {
var oldProps = StatusBar._currentValues;
var mergedProps = mergePropsStack(StatusBar._propsStack, StatusBar._defaultProps);
if (Platform.OS === 'ios') {
if (!oldProps || oldProps.barStyle.value !== mergedProps.barStyle.value) {
StatusBarManager.setStyle(mergedProps.barStyle.value, mergedProps.barStyle.animated);
}
if (!oldProps || oldProps.hidden.value !== mergedProps.hidden.value) {
StatusBarManager.setHidden(mergedProps.hidden.value, mergedProps.hidden.animated ? mergedProps.hidden.transition : 'none');
}
if (!oldProps || oldProps.networkActivityIndicatorVisible !== mergedProps.networkActivityIndicatorVisible) {
StatusBarManager.setNetworkActivityIndicatorVisible(mergedProps.networkActivityIndicatorVisible);
}
} else if (Platform.OS === 'android') {
if (!oldProps || oldProps.barStyle.value !== mergedProps.barStyle.value) {
StatusBarManager.setStyle(mergedProps.barStyle.value);
}
if (!oldProps || oldProps.backgroundColor.value !== mergedProps.backgroundColor.value) {
StatusBarManager.setColor(processColor(mergedProps.backgroundColor.value), mergedProps.backgroundColor.animated);
}
if (!oldProps || oldProps.hidden.value !== mergedProps.hidden.value) {
StatusBarManager.setHidden(mergedProps.hidden.value);
}
if (!oldProps || oldProps.translucent !== mergedProps.translucent) {
StatusBarManager.setTranslucent(mergedProps.translucent);
}
}
StatusBar._currentValues = mergedProps;
});
}, _temp), babelHelpers.possibleConstructorReturn(_this, _ret);
}
babelHelpers.createClass(StatusBar, [{
key: 'componentDidMount',
value: function componentDidMount() {
this._stackEntry = createStackEntry(this.props);
StatusBar._propsStack.push(this._stackEntry);
this._updatePropsStack();
}
}, {
key: 'componentWillUnmount',
value: function componentWillUnmount() {
var index = StatusBar._propsStack.indexOf(this._stackEntry);
StatusBar._propsStack.splice(index, 1);
this._updatePropsStack();
}
}, {
key: 'componentDidUpdate',
value: function componentDidUpdate() {
var index = StatusBar._propsStack.indexOf(this._stackEntry);
this._stackEntry = createStackEntry(this.props);
StatusBar._propsStack[index] = this._stackEntry;
this._updatePropsStack();
}
}, {
key: 'render',
value: function render() {
return null;
}
}], [{
key: 'setHidden',
value: function setHidden(hidden, animation) {
animation = animation || 'none';
StatusBar._defaultProps.hidden.value = hidden;
if (Platform.OS === 'ios') {
StatusBarManager.setHidden(hidden, animation);
} else if (Platform.OS === 'android') {
StatusBarManager.setHidden(hidden);
}
}
}, {
key: 'setBarStyle',
value: function setBarStyle(style, animated) {
animated = animated || false;
StatusBar._defaultProps.barStyle.value = style;
if (Platform.OS === 'ios') {
StatusBarManager.setStyle(style, animated);
} else if (Platform.OS === 'android') {
StatusBarManager.setStyle(style);
}
}
}, {
key: 'setNetworkActivityIndicatorVisible',
value: function setNetworkActivityIndicatorVisible(visible) {
if (Platform.OS !== 'ios') {
console.warn('`setNetworkActivityIndicatorVisible` is only available on iOS');
return;
}
StatusBar._defaultProps.networkActivityIndicatorVisible = visible;
StatusBarManager.setNetworkActivityIndicatorVisible(visible);
}
}, {
key: 'setBackgroundColor',
value: function setBackgroundColor(color, animated) {
if (Platform.OS !== 'android') {
console.warn('`setBackgroundColor` is only available on Android');
return;
}
animated = animated || false;
StatusBar._defaultProps.backgroundColor.value = color;
StatusBarManager.setColor(processColor(color), animated);
}
}, {
key: 'setTranslucent',
value: function setTranslucent(translucent) {
if (Platform.OS !== 'android') {
console.warn('`setTranslucent` is only available on Android');
return;
}
StatusBar._defaultProps.translucent = translucent;
StatusBarManager.setTranslucent(translucent);
}
}]);
return StatusBar;
}(React.Component);
StatusBar._propsStack = [];
StatusBar._defaultProps = createStackEntry({
animated: false,
showHideTransition: 'fade',
backgroundColor: 'black',
barStyle: 'default',
translucent: false,
hidden: false,
networkActivityIndicatorVisible: false
});
StatusBar._updateImmediate = null;
StatusBar._currentValues = null;
StatusBar.currentHeight = StatusBarManager.HEIGHT;
StatusBar.propTypes = {
hidden: React.PropTypes.bool,
animated: React.PropTypes.bool,
backgroundColor: ColorPropType,
translucent: React.PropTypes.bool,
barStyle: React.PropTypes.oneOf(['default', 'light-content', 'dark-content']),
networkActivityIndicatorVisible: React.PropTypes.bool,
showHideTransition: React.PropTypes.oneOf(['fade', 'slide'])
};
StatusBar.defaultProps = {
animated: false,
showHideTransition: 'fade'
};
module.exports = StatusBar;
}, 362, null, "StatusBar");
__d(/* SwipeableListView */function(global, require, module, exports) {
'use strict';
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/node_modules/react-native/Libraries/Experimental/SwipeableRow/SwipeableListView.js';
var ListView = require(303 ); // 303 = ListView
var React = require(126 ); // 126 = React
var SwipeableListViewDataSource = require(364 ); // 364 = SwipeableListViewDataSource
var SwipeableRow = require(365 ); // 365 = SwipeableRow
var PropTypes = React.PropTypes;
var SwipeableListView = function (_React$Component) {
babelHelpers.inherits(SwipeableListView, _React$Component);
babelHelpers.createClass(SwipeableListView, null, [{
key: 'getNewDataSource',
value: function getNewDataSource() {
return new SwipeableListViewDataSource({
getRowData: function getRowData(data, sectionID, rowID) {
return data[sectionID][rowID];
},
getSectionHeaderData: function getSectionHeaderData(data, sectionID) {
return data[sectionID];
},
rowHasChanged: function rowHasChanged(row1, row2) {
return row1 !== row2;
},
sectionHeaderHasChanged: function sectionHeaderHasChanged(s1, s2) {
return s1 !== s2;
}
});
}
}]);
function SwipeableListView(props, context) {
babelHelpers.classCallCheck(this, SwipeableListView);
var _this = babelHelpers.possibleConstructorReturn(this, (SwipeableListView.__proto__ || Object.getPrototypeOf(SwipeableListView)).call(this, props, context));
_this._listViewRef = null;
_this._shouldBounceFirstRowOnMount = false;
_this._onScroll = function (e) {
if (_this.props.dataSource.getOpenRowID()) {
_this.setState({
dataSource: _this.state.dataSource.setOpenRowID(null)
});
}
_this.props.onScroll && _this.props.onScroll(e);
};
_this._getMaxSwipeDistance = function (rowData, sectionID, rowID) {
if (typeof _this.props.maxSwipeDistance === 'function') {
return _this.props.maxSwipeDistance(rowData, sectionID, rowID);
}
return _this.props.maxSwipeDistance;
};
_this._renderRow = function (rowData, sectionID, rowID) {
var slideoutView = _this.props.renderQuickActions(rowData, sectionID, rowID);
if (!slideoutView) {
return _this.props.renderRow(rowData, sectionID, rowID);
}
var shouldBounceOnMount = false;
if (_this._shouldBounceFirstRowOnMount) {
_this._shouldBounceFirstRowOnMount = false;
shouldBounceOnMount = rowID === _this.props.dataSource.getFirstRowID();
}
return React.createElement(
SwipeableRow,
{
slideoutView: slideoutView,
isOpen: rowData.id === _this.props.dataSource.getOpenRowID(),
maxSwipeDistance: _this._getMaxSwipeDistance(rowData, sectionID, rowID),
key: rowID,
onOpen: function onOpen() {
return _this._onOpen(rowData.id);
},
onClose: function onClose() {
return _this._onClose(rowData.id);
},
onSwipeEnd: function onSwipeEnd() {
return _this._setListViewScrollable(true);
},
onSwipeStart: function onSwipeStart() {
return _this._setListViewScrollable(false);
},
shouldBounceOnMount: shouldBounceOnMount, __source: {
fileName: _jsxFileName,
lineNumber: 193
}
},
_this.props.renderRow(rowData, sectionID, rowID)
);
};
_this._shouldBounceFirstRowOnMount = _this.props.bounceFirstRowOnMount;
_this.state = {
dataSource: _this.props.dataSource
};
return _this;
}
babelHelpers.createClass(SwipeableListView, [{
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(nextProps) {
if (this.state.dataSource.getDataSource() !== nextProps.dataSource.getDataSource()) {
this.setState({
dataSource: nextProps.dataSource
});
}
}
}, {
key: 'render',
value: function render() {
var _this2 = this;
return React.createElement(ListView, babelHelpers.extends({}, this.props, {
ref: function ref(_ref) {
_this2._listViewRef = _ref;
},
dataSource: this.state.dataSource.getDataSource(),
onScroll: this._onScroll,
renderRow: this._renderRow,
__source: {
fileName: _jsxFileName,
lineNumber: 126
}
}));
}
}, {
key: '_setListViewScrollable',
value: function _setListViewScrollable(value) {
if (this._listViewRef && typeof this._listViewRef.setNativeProps === 'function') {
this._listViewRef.setNativeProps({
scrollEnabled: value
});
}
}
}, {
key: 'getScrollResponder',
value: function getScrollResponder() {
if (this._listViewRef && typeof this._listViewRef.getScrollResponder === 'function') {
return this._listViewRef.getScrollResponder();
}
}
}, {
key: '_onOpen',
value: function _onOpen(rowID) {
this.setState({
dataSource: this.state.dataSource.setOpenRowID(rowID)
});
}
}, {
key: '_onClose',
value: function _onClose(rowID) {
this.setState({
dataSource: this.state.dataSource.setOpenRowID(null)
});
}
}]);
return SwipeableListView;
}(React.Component);
SwipeableListView.propTypes = {
bounceFirstRowOnMount: PropTypes.bool.isRequired,
dataSource: PropTypes.instanceOf(SwipeableListViewDataSource).isRequired,
maxSwipeDistance: PropTypes.oneOfType([PropTypes.number, PropTypes.func]).isRequired,
renderRow: PropTypes.func.isRequired,
renderQuickActions: PropTypes.func.isRequired
};
SwipeableListView.defaultProps = {
bounceFirstRowOnMount: false,
renderQuickActions: function renderQuickActions() {
return null;
}
};
module.exports = SwipeableListView;
}, 363, null, "SwipeableListView");
__d(/* SwipeableListViewDataSource */function(global, require, module, exports) {
'use strict';
var ListViewDataSource = require(304 ); // 304 = ListViewDataSource
var SwipeableListViewDataSource = function () {
function SwipeableListViewDataSource(params) {
var _this = this;
babelHelpers.classCallCheck(this, SwipeableListViewDataSource);
this._dataSource = new ListViewDataSource({
getRowData: params.getRowData,
getSectionHeaderData: params.getSectionHeaderData,
rowHasChanged: function rowHasChanged(row1, row2) {
return row1.id !== _this._previousOpenRowID && row2.id === _this._openRowID || row1.id === _this._previousOpenRowID && row2.id !== _this._openRowID || params.rowHasChanged(row1, row2);
},
sectionHeaderHasChanged: params.sectionHeaderHasChanged
});
}
babelHelpers.createClass(SwipeableListViewDataSource, [{
key: 'cloneWithRowsAndSections',
value: function cloneWithRowsAndSections(dataBlob, sectionIdentities, rowIdentities) {
this._dataSource = this._dataSource.cloneWithRowsAndSections(dataBlob, sectionIdentities, rowIdentities);
this._dataBlob = dataBlob;
this.rowIdentities = this._dataSource.rowIdentities;
this.sectionIdentities = this._dataSource.sectionIdentities;
return this;
}
}, {
key: 'getDataSource',
value: function getDataSource() {
return this._dataSource;
}
}, {
key: 'getOpenRowID',
value: function getOpenRowID() {
return this._openRowID;
}
}, {
key: 'getFirstRowID',
value: function getFirstRowID() {
if (this.rowIdentities) {
return this.rowIdentities[0] && this.rowIdentities[0][0];
}
return Object.keys(this._dataBlob)[0];
}
}, {
key: 'setOpenRowID',
value: function setOpenRowID(rowID) {
this._previousOpenRowID = this._openRowID;
this._openRowID = rowID;
this._dataSource = this._dataSource.cloneWithRowsAndSections(this._dataBlob, this.sectionIdentities, this.rowIdentities);
return this;
}
}]);
return SwipeableListViewDataSource;
}();
module.exports = SwipeableListViewDataSource;
}, 364, null, "SwipeableListViewDataSource");
__d(/* SwipeableRow */function(global, require, module, exports) {
'use strict';
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/node_modules/react-native/Libraries/Experimental/SwipeableRow/SwipeableRow.js';
var Animated = require(219 ); // 219 = Animated
var PanResponder = require(346 ); // 346 = PanResponder
var I18nManager = require(331 ); // 331 = I18nManager
var React = require(126 ); // 126 = React
var StyleSheet = require(127 ); // 127 = StyleSheet
var TimerMixin = require(294 ); // 294 = react-timer-mixin
var View = require(146 ); // 146 = View
var PropTypes = React.PropTypes;
var emptyFunction = require(41 ); // 41 = fbjs/lib/emptyFunction
var IS_RTL = I18nManager.isRTL;
var CLOSED_LEFT_POSITION = 0;
var HORIZONTAL_SWIPE_DISTANCE_THRESHOLD = 10;
var HORIZONTAL_FULL_SWIPE_SPEED_THRESHOLD = 0.3;
var SLOW_SPEED_SWIPE_FACTOR = 4;
var SWIPE_DURATION = 300;
var ON_MOUNT_BOUNCE_DELAY = 700;
var ON_MOUNT_BOUNCE_DURATION = 400;
var RIGHT_SWIPE_BOUNCE_BACK_DISTANCE = 30;
var RIGHT_SWIPE_BOUNCE_BACK_DURATION = 300;
var RIGHT_SWIPE_THRESHOLD = 30 * SLOW_SPEED_SWIPE_FACTOR;
var SwipeableRow = React.createClass({
displayName: 'SwipeableRow',
_panResponder: {},
_previousLeft: CLOSED_LEFT_POSITION,
mixins: [TimerMixin],
propTypes: {
children: PropTypes.any,
isOpen: PropTypes.bool,
maxSwipeDistance: PropTypes.number.isRequired,
onOpen: PropTypes.func.isRequired,
onClose: PropTypes.func.isRequired,
onSwipeEnd: PropTypes.func.isRequired,
onSwipeStart: PropTypes.func.isRequired,
shouldBounceOnMount: PropTypes.bool,
slideoutView: PropTypes.node.isRequired,
swipeThreshold: PropTypes.number.isRequired
},
getInitialState: function getInitialState() {
return {
currentLeft: new Animated.Value(this._previousLeft),
isSwipeableViewRendered: false,
rowHeight: null
};
},
getDefaultProps: function getDefaultProps() {
return {
isOpen: false,
maxSwipeDistance: 0,
onOpen: emptyFunction,
onClose: emptyFunction,
onSwipeEnd: emptyFunction,
onSwipeStart: emptyFunction,
swipeThreshold: 30
};
},
componentWillMount: function componentWillMount() {
this._panResponder = PanResponder.create({
onMoveShouldSetPanResponderCapture: this._handleMoveShouldSetPanResponderCapture,
onPanResponderGrant: this._handlePanResponderGrant,
onPanResponderMove: this._handlePanResponderMove,
onPanResponderRelease: this._handlePanResponderEnd,
onPanResponderTerminationRequest: this._onPanResponderTerminationRequest,
onPanResponderTerminate: this._handlePanResponderEnd,
onShouldBlockNativeResponder: function onShouldBlockNativeResponder(event, gestureState) {
return false;
}
});
},
componentDidMount: function componentDidMount() {
var _this = this;
if (this.props.shouldBounceOnMount) {
this.setTimeout(function () {
_this._animateBounceBack(ON_MOUNT_BOUNCE_DURATION);
}, ON_MOUNT_BOUNCE_DELAY);
}
},
componentWillReceiveProps: function componentWillReceiveProps(nextProps) {
if (this.props.isOpen && !nextProps.isOpen) {
this._animateToClosedPosition();
}
},
shouldComponentUpdate: function shouldComponentUpdate(nextProps, nextState) {
if (this.props.shouldBounceOnMount && !nextProps.shouldBounceOnMount) {
return false;
}
return true;
},
render: function render() {
var slideOutView = void 0;
if (this.state.isSwipeableViewRendered) {
slideOutView = React.createElement(
View,
{ style: [styles.slideOutContainer, { height: this.state.rowHeight }], __source: {
fileName: _jsxFileName,
lineNumber: 179
}
},
this.props.slideoutView
);
}
var swipeableView = React.createElement(
Animated.View,
{
onLayout: this._onSwipeableViewLayout,
style: [styles.swipeableContainer, {
transform: [{ translateX: this.state.currentLeft }]
}], __source: {
fileName: _jsxFileName,
lineNumber: 190
}
},
this.props.children
);
return React.createElement(
View,
babelHelpers.extends({}, this._panResponder.panHandlers, {
__source: {
fileName: _jsxFileName,
lineNumber: 203
}
}),
slideOutView,
swipeableView
);
},
_onSwipeableViewLayout: function _onSwipeableViewLayout(event) {
this.setState({
isSwipeableViewRendered: true,
rowHeight: event.nativeEvent.layout.height
});
},
_handleMoveShouldSetPanResponderCapture: function _handleMoveShouldSetPanResponderCapture(event, gestureState) {
return gestureState.dy < 10 && this._isValidSwipe(gestureState);
},
_handlePanResponderGrant: function _handlePanResponderGrant(event, gestureState) {},
_handlePanResponderMove: function _handlePanResponderMove(event, gestureState) {
if (this._isSwipingExcessivelyRightFromClosedPosition(gestureState)) {
return;
}
this.props.onSwipeStart();
if (this._isSwipingRightFromClosed(gestureState)) {
this._swipeSlowSpeed(gestureState);
} else {
this._swipeFullSpeed(gestureState);
}
},
_isSwipingRightFromClosed: function _isSwipingRightFromClosed(gestureState) {
var gestureStateDx = IS_RTL ? -gestureState.dx : gestureState.dx;
return this._previousLeft === CLOSED_LEFT_POSITION && gestureStateDx > 0;
},
_swipeFullSpeed: function _swipeFullSpeed(gestureState) {
this.state.currentLeft.setValue(this._previousLeft + gestureState.dx);
},
_swipeSlowSpeed: function _swipeSlowSpeed(gestureState) {
this.state.currentLeft.setValue(this._previousLeft + gestureState.dx / SLOW_SPEED_SWIPE_FACTOR);
},
_isSwipingExcessivelyRightFromClosedPosition: function _isSwipingExcessivelyRightFromClosedPosition(gestureState) {
var gestureStateDx = IS_RTL ? -gestureState.dx : gestureState.dx;
return this._isSwipingRightFromClosed(gestureState) && gestureStateDx > RIGHT_SWIPE_THRESHOLD;
},
_onPanResponderTerminationRequest: function _onPanResponderTerminationRequest(event, gestureState) {
return false;
},
_animateTo: function _animateTo(toValue) {
var _this2 = this;
var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : SWIPE_DURATION;
var callback = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : emptyFunction;
Animated.timing(this.state.currentLeft, {
duration: duration,
toValue: toValue
}).start(function () {
_this2._previousLeft = toValue;
callback();
});
},
_animateToOpenPosition: function _animateToOpenPosition() {
var maxSwipeDistance = IS_RTL ? -this.props.maxSwipeDistance : this.props.maxSwipeDistance;
this._animateTo(-maxSwipeDistance);
},
_animateToOpenPositionWith: function _animateToOpenPositionWith(speed, distMoved) {
speed = speed > HORIZONTAL_FULL_SWIPE_SPEED_THRESHOLD ? speed : HORIZONTAL_FULL_SWIPE_SPEED_THRESHOLD;
var duration = Math.abs((this.props.maxSwipeDistance - Math.abs(distMoved)) / speed);
var maxSwipeDistance = IS_RTL ? -this.props.maxSwipeDistance : this.props.maxSwipeDistance;
this._animateTo(-maxSwipeDistance, duration);
},
_animateToClosedPosition: function _animateToClosedPosition() {
var duration = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : SWIPE_DURATION;
this._animateTo(CLOSED_LEFT_POSITION, duration);
},
_animateToClosedPositionDuringBounce: function _animateToClosedPositionDuringBounce() {
this._animateToClosedPosition(RIGHT_SWIPE_BOUNCE_BACK_DURATION);
},
_animateBounceBack: function _animateBounceBack(duration) {
var swipeBounceBackDistance = IS_RTL ? -RIGHT_SWIPE_BOUNCE_BACK_DISTANCE : RIGHT_SWIPE_BOUNCE_BACK_DISTANCE;
this._animateTo(-swipeBounceBackDistance, duration, this._animateToClosedPositionDuringBounce);
},
_isValidSwipe: function _isValidSwipe(gestureState) {
return Math.abs(gestureState.dx) > HORIZONTAL_SWIPE_DISTANCE_THRESHOLD;
},
_shouldAnimateRemainder: function _shouldAnimateRemainder(gestureState) {
return Math.abs(gestureState.dx) > this.props.swipeThreshold || gestureState.vx > HORIZONTAL_FULL_SWIPE_SPEED_THRESHOLD;
},
_handlePanResponderEnd: function _handlePanResponderEnd(event, gestureState) {
var horizontalDistance = IS_RTL ? -gestureState.dx : gestureState.dx;
if (this._isSwipingRightFromClosed(gestureState)) {
this.props.onOpen();
this._animateBounceBack(RIGHT_SWIPE_BOUNCE_BACK_DURATION);
} else if (this._shouldAnimateRemainder(gestureState)) {
if (horizontalDistance < 0) {
this.props.onOpen();
this._animateToOpenPositionWith(gestureState.vx, horizontalDistance);
} else {
this.props.onClose();
this._animateToClosedPosition();
}
} else {
if (this._previousLeft === CLOSED_LEFT_POSITION) {
this._animateToClosedPosition();
} else {
this._animateToOpenPosition();
}
}
this.props.onSwipeEnd();
}
});
var styles = StyleSheet.create({
slideOutContainer: {
bottom: 0,
left: 0,
position: 'absolute',
right: 0,
top: 0
},
swipeableContainer: {
flex: 1
}
});
module.exports = SwipeableRow;
}, 365, null, "SwipeableRow");
__d(/* TabBarIOS */function(global, require, module, exports) {
'use strict';
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/node_modules/react-native/Libraries/Components/TabBarIOS/TabBarIOS.ios.js';
var ColorPropType = require(71 ); // 71 = ColorPropType
var React = require(126 ); // 126 = React
var StyleSheet = require(127 ); // 127 = StyleSheet
var TabBarItemIOS = require(367 ); // 367 = TabBarItemIOS
var View = require(146 ); // 146 = View
var requireNativeComponent = require(155 ); // 155 = requireNativeComponent
var TabBarIOS = function (_React$Component) {
babelHelpers.inherits(TabBarIOS, _React$Component);
function TabBarIOS() {
babelHelpers.classCallCheck(this, TabBarIOS);
return babelHelpers.possibleConstructorReturn(this, (TabBarIOS.__proto__ || Object.getPrototypeOf(TabBarIOS)).apply(this, arguments));
}
babelHelpers.createClass(TabBarIOS, [{
key: 'render',
value: function render() {
return React.createElement(
RCTTabBar,
{
style: [styles.tabGroup, this.props.style],
unselectedTintColor: this.props.unselectedTintColor,
unselectedItemTintColor: this.props.unselectedItemTintColor,
tintColor: this.props.tintColor,
barTintColor: this.props.barTintColor,
itemPositioning: this.props.itemPositioning,
translucent: this.props.translucent !== false, __source: {
fileName: _jsxFileName,
lineNumber: 72
}
},
this.props.children
);
}
}]);
return TabBarIOS;
}(React.Component);
TabBarIOS.Item = TabBarItemIOS;
TabBarIOS.propTypes = babelHelpers.extends({}, View.propTypes, {
style: View.propTypes.style,
unselectedTintColor: ColorPropType,
tintColor: ColorPropType,
unselectedItemTintColor: ColorPropType,
barTintColor: ColorPropType,
translucent: React.PropTypes.bool,
itemPositioning: React.PropTypes.oneOf(['fill', 'center', 'auto'])
});
var styles = StyleSheet.create({
tabGroup: {
flex: 1
}
});
var RCTTabBar = requireNativeComponent('RCTTabBar', TabBarIOS);
module.exports = TabBarIOS;
}, 366, null, "TabBarIOS");
__d(/* TabBarItemIOS */function(global, require, module, exports) {
'use strict';
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/node_modules/react-native/Libraries/Components/TabBarIOS/TabBarItemIOS.ios.js';
var ColorPropType = require(71 ); // 71 = ColorPropType
var Image = require(237 ); // 237 = Image
var React = require(126 ); // 126 = React
var StaticContainer = require(351 ); // 351 = StaticContainer.react
var StyleSheet = require(127 ); // 127 = StyleSheet
var View = require(146 ); // 146 = View
var requireNativeComponent = require(155 ); // 155 = requireNativeComponent
var TabBarItemIOS = function (_React$Component) {
babelHelpers.inherits(TabBarItemIOS, _React$Component);
function TabBarItemIOS() {
var _ref;
var _temp, _this, _ret;
babelHelpers.classCallCheck(this, TabBarItemIOS);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = babelHelpers.possibleConstructorReturn(this, (_ref = TabBarItemIOS.__proto__ || Object.getPrototypeOf(TabBarItemIOS)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
hasBeenSelected: false
}, _temp), babelHelpers.possibleConstructorReturn(_this, _ret);
}
babelHelpers.createClass(TabBarItemIOS, [{
key: 'componentWillMount',
value: function componentWillMount() {
if (this.props.selected) {
this.setState({ hasBeenSelected: true });
}
}
}, {
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(nextProps) {
if (this.state.hasBeenSelected || nextProps.selected) {
this.setState({ hasBeenSelected: true });
}
}
}, {
key: 'render',
value: function render() {
var _props = this.props,
style = _props.style,
children = _props.children,
props = babelHelpers.objectWithoutProperties(_props, ['style', 'children']);
if (this.state.hasBeenSelected) {
var tabContents = React.createElement(
StaticContainer,
{ shouldUpdate: this.props.selected, __source: {
fileName: _jsxFileName,
lineNumber: 121
}
},
children
);
} else {
var tabContents = React.createElement(View, {
__source: {
fileName: _jsxFileName,
lineNumber: 125
}
});
}
return React.createElement(
RCTTabBarItem,
babelHelpers.extends({}, props, {
style: [styles.tab, style], __source: {
fileName: _jsxFileName,
lineNumber: 129
}
}),
tabContents
);
}
}]);
return TabBarItemIOS;
}(React.Component);
TabBarItemIOS.propTypes = babelHelpers.extends({}, View.propTypes, {
badge: React.PropTypes.oneOfType([React.PropTypes.string, React.PropTypes.number]),
badgeColor: ColorPropType,
systemIcon: React.PropTypes.oneOf(['bookmarks', 'contacts', 'downloads', 'favorites', 'featured', 'history', 'more', 'most-recent', 'most-viewed', 'recents', 'search', 'top-rated']),
icon: Image.propTypes.source,
selectedIcon: Image.propTypes.source,
onPress: React.PropTypes.func,
renderAsOriginal: React.PropTypes.bool,
selected: React.PropTypes.bool,
style: View.propTypes.style,
title: React.PropTypes.string,
isTVSelectable: React.PropTypes.bool
});
var styles = StyleSheet.create({
tab: {
position: 'absolute',
top: 0,
right: 0,
bottom: 0,
left: 0
}
});
var RCTTabBarItem = requireNativeComponent('RCTTabBarItem', TabBarItemIOS);
module.exports = TabBarItemIOS;
}, 367, null, "TabBarItemIOS");
__d(/* TextInput */function(global, require, module, exports) {
'use strict';
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/node_modules/react-native/Libraries/Components/TextInput/TextInput.js';
var ColorPropType = require(71 ); // 71 = ColorPropType
var DocumentSelectionState = require(369 ); // 369 = DocumentSelectionState
var EventEmitter = require(103 ); // 103 = EventEmitter
var NativeMethodsMixin = require(73 ); // 73 = NativeMethodsMixin
var Platform = require(79 ); // 79 = Platform
var React = require(126 ); // 126 = React
var ReactNative = require(241 ); // 241 = ReactNative
var StyleSheet = require(127 ); // 127 = StyleSheet
var Text = require(210 ); // 210 = Text
var TextInputState = require(78 ); // 78 = TextInputState
var TimerMixin = require(294 ); // 294 = react-timer-mixin
var TouchableWithoutFeedback = require(295 ); // 295 = TouchableWithoutFeedback
var UIManager = require(123 ); // 123 = UIManager
var View = require(146 ); // 146 = View
var warning = require(40 ); // 40 = fbjs/lib/warning
var emptyFunction = require(41 ); // 41 = fbjs/lib/emptyFunction
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var requireNativeComponent = require(155 ); // 155 = requireNativeComponent
var PropTypes = React.PropTypes;
var onlyMultiline = {
onTextInput: true,
children: true
};
if (Platform.OS === 'android') {
var AndroidTextInput = requireNativeComponent('AndroidTextInput', null);
} else if (Platform.OS === 'ios') {
var RCTTextView = requireNativeComponent('RCTTextView', null);
var RCTTextField = requireNativeComponent('RCTTextField', null);
}
var DataDetectorTypes = ['phoneNumber', 'link', 'address', 'calendarEvent', 'none', 'all'];
var TextInput = React.createClass({
displayName: 'TextInput',
statics: {
State: TextInputState
},
propTypes: babelHelpers.extends({}, View.propTypes, {
autoCapitalize: PropTypes.oneOf(['none', 'sentences', 'words', 'characters']),
autoCorrect: PropTypes.bool,
spellCheck: PropTypes.bool,
autoFocus: PropTypes.bool,
editable: PropTypes.bool,
keyboardType: PropTypes.oneOf(['default', 'email-address', 'numeric', 'phone-pad', 'ascii-capable', 'numbers-and-punctuation', 'url', 'number-pad', 'name-phone-pad', 'decimal-pad', 'twitter', 'web-search']),
keyboardAppearance: PropTypes.oneOf(['default', 'light', 'dark']),
returnKeyType: PropTypes.oneOf(['done', 'go', 'next', 'search', 'send', 'none', 'previous', 'default', 'emergency-call', 'google', 'join', 'route', 'yahoo']),
returnKeyLabel: PropTypes.string,
maxLength: PropTypes.number,
numberOfLines: PropTypes.number,
disableFullscreenUI: PropTypes.bool,
enablesReturnKeyAutomatically: PropTypes.bool,
multiline: PropTypes.bool,
textBreakStrategy: React.PropTypes.oneOf(['simple', 'highQuality', 'balanced']),
onBlur: PropTypes.func,
onFocus: PropTypes.func,
onChange: PropTypes.func,
onChangeText: PropTypes.func,
onContentSizeChange: PropTypes.func,
onEndEditing: PropTypes.func,
onSelectionChange: PropTypes.func,
onSubmitEditing: PropTypes.func,
onKeyPress: PropTypes.func,
onLayout: PropTypes.func,
onScroll: PropTypes.func,
placeholder: PropTypes.node,
placeholderTextColor: ColorPropType,
secureTextEntry: PropTypes.bool,
selectionColor: ColorPropType,
selectionState: PropTypes.instanceOf(DocumentSelectionState),
selection: PropTypes.shape({
start: PropTypes.number.isRequired,
end: PropTypes.number
}),
value: PropTypes.string,
defaultValue: PropTypes.node,
clearButtonMode: PropTypes.oneOf(['never', 'while-editing', 'unless-editing', 'always']),
clearTextOnFocus: PropTypes.bool,
selectTextOnFocus: PropTypes.bool,
blurOnSubmit: PropTypes.bool,
style: Text.propTypes.style,
underlineColorAndroid: ColorPropType,
inlineImageLeft: PropTypes.string,
inlineImagePadding: PropTypes.number,
dataDetectorTypes: PropTypes.oneOfType([PropTypes.oneOf(DataDetectorTypes), PropTypes.arrayOf(PropTypes.oneOf(DataDetectorTypes))])
}),
mixins: [NativeMethodsMixin, TimerMixin],
viewConfig: Platform.OS === 'ios' && RCTTextField ? RCTTextField.viewConfig : Platform.OS === 'android' && AndroidTextInput ? AndroidTextInput.viewConfig : {},
isFocused: function isFocused() {
return TextInputState.currentlyFocusedField() === ReactNative.findNodeHandle(this._inputRef);
},
contextTypes: {
onFocusRequested: React.PropTypes.func,
focusEmitter: React.PropTypes.instanceOf(EventEmitter)
},
_inputRef: undefined,
_focusSubscription: undefined,
_lastNativeText: undefined,
_lastNativeSelection: undefined,
componentDidMount: function componentDidMount() {
var _this = this;
this._lastNativeText = this.props.value;
if (!this.context.focusEmitter) {
if (this.props.autoFocus) {
this.requestAnimationFrame(this.focus);
}
return;
}
this._focusSubscription = this.context.focusEmitter.addListener('focus', function (el) {
if (_this === el) {
_this.requestAnimationFrame(_this.focus);
} else if (_this.isFocused()) {
_this.blur();
}
});
if (this.props.autoFocus) {
this.context.onFocusRequested(this);
}
},
componentWillUnmount: function componentWillUnmount() {
this._focusSubscription && this._focusSubscription.remove();
if (this.isFocused()) {
this.blur();
}
},
getChildContext: function getChildContext() {
return { isInAParentText: true };
},
childContextTypes: {
isInAParentText: React.PropTypes.bool
},
clear: function clear() {
this.setNativeProps({ text: '' });
},
render: function render() {
if (Platform.OS === 'ios') {
return this._renderIOS();
} else if (Platform.OS === 'android') {
return this._renderAndroid();
}
},
_getText: function _getText() {
return typeof this.props.value === 'string' ? this.props.value : typeof this.props.defaultValue === 'string' ? this.props.defaultValue : '';
},
_setNativeRef: function _setNativeRef(ref) {
this._inputRef = ref;
},
_renderIOS: function _renderIOS() {
var textContainer;
var props = babelHelpers.extends({}, this.props);
props.style = [styles.input, this.props.style];
if (props.selection && props.selection.end == null) {
props.selection = { start: props.selection.start, end: props.selection.start };
}
if (!props.multiline) {
if (__DEV__) {
for (var propKey in onlyMultiline) {
if (props[propKey]) {
var error = new Error('TextInput prop `' + propKey + '` is only supported with multiline.');
warning(false, '%s', error.stack);
}
}
}
textContainer = React.createElement(RCTTextField, babelHelpers.extends({
ref: this._setNativeRef
}, props, {
onFocus: this._onFocus,
onBlur: this._onBlur,
onChange: this._onChange,
onSelectionChange: this._onSelectionChange,
onSelectionChangeShouldSetResponder: emptyFunction.thatReturnsTrue,
text: this._getText(),
__source: {
fileName: _jsxFileName,
lineNumber: 652
}
}));
} else {
var children = props.children;
var childCount = 0;
React.Children.forEach(children, function () {
return ++childCount;
});
invariant(!(props.value && childCount), 'Cannot specify both value and children.');
if (childCount >= 1) {
children = React.createElement(
Text,
{ style: props.style, __source: {
fileName: _jsxFileName,
lineNumber: 671
}
},
children
);
}
if (props.inputView) {
children = [children, props.inputView];
}
textContainer = React.createElement(RCTTextView, babelHelpers.extends({
ref: this._setNativeRef
}, props, {
children: children,
onFocus: this._onFocus,
onBlur: this._onBlur,
onChange: this._onChange,
onContentSizeChange: this.props.onContentSizeChange,
onSelectionChange: this._onSelectionChange,
onTextInput: this._onTextInput,
onSelectionChangeShouldSetResponder: emptyFunction.thatReturnsTrue,
text: this._getText(),
dataDetectorTypes: this.props.dataDetectorTypes,
onScroll: this._onScroll,
__source: {
fileName: _jsxFileName,
lineNumber: 677
}
}));
}
return React.createElement(
TouchableWithoutFeedback,
{
onLayout: props.onLayout,
onPress: this._onPress,
rejectResponderTermination: true,
accessible: props.accessible,
accessibilityLabel: props.accessibilityLabel,
accessibilityTraits: props.accessibilityTraits,
testID: props.testID, __source: {
fileName: _jsxFileName,
lineNumber: 695
}
},
textContainer
);
},
_renderAndroid: function _renderAndroid() {
var props = babelHelpers.extends({}, this.props);
props.style = [this.props.style];
props.autoCapitalize = UIManager.AndroidTextInput.Constants.AutoCapitalizationType[this.props.autoCapitalize];
var children = this.props.children;
var childCount = 0;
React.Children.forEach(children, function () {
return ++childCount;
});
invariant(!(this.props.value && childCount), 'Cannot specify both value and children.');
if (childCount > 1) {
children = React.createElement(
Text,
{
__source: {
fileName: _jsxFileName,
lineNumber: 721
}
},
children
);
}
if (props.selection && props.selection.end == null) {
props.selection = { start: props.selection.start, end: props.selection.start };
}
var textContainer = React.createElement(AndroidTextInput, babelHelpers.extends({
ref: this._setNativeRef
}, props, {
mostRecentEventCount: 0,
onFocus: this._onFocus,
onBlur: this._onBlur,
onChange: this._onChange,
onSelectionChange: this._onSelectionChange,
onTextInput: this._onTextInput,
text: this._getText(),
children: children,
disableFullscreenUI: this.props.disableFullscreenUI,
textBreakStrategy: this.props.textBreakStrategy,
__source: {
fileName: _jsxFileName,
lineNumber: 729
}
}));
return React.createElement(
TouchableWithoutFeedback,
{
onLayout: this.props.onLayout,
onPress: this._onPress,
accessible: this.props.accessible,
accessibilityLabel: this.props.accessibilityLabel,
accessibilityComponentType: this.props.accessibilityComponentType,
testID: this.props.testID, __source: {
fileName: _jsxFileName,
lineNumber: 745
}
},
textContainer
);
},
_onFocus: function _onFocus(event) {
if (this.props.onFocus) {
this.props.onFocus(event);
}
if (this.props.selectionState) {
this.props.selectionState.focus();
}
},
_onPress: function _onPress(event) {
if (this.props.editable || this.props.editable === undefined) {
this.focus();
}
},
_onChange: function _onChange(event) {
if (this._inputRef) {
this._inputRef.setNativeProps({
mostRecentEventCount: event.nativeEvent.eventCount
});
}
var text = event.nativeEvent.text;
this.props.onChange && this.props.onChange(event);
this.props.onChangeText && this.props.onChangeText(text);
if (!this._inputRef) {
return;
}
this._lastNativeText = text;
this.forceUpdate();
},
_onSelectionChange: function _onSelectionChange(event) {
this.props.onSelectionChange && this.props.onSelectionChange(event);
if (!this._inputRef) {
return;
}
this._lastNativeSelection = event.nativeEvent.selection;
if (this.props.selection || this.props.selectionState) {
this.forceUpdate();
}
},
componentDidUpdate: function componentDidUpdate() {
var nativeProps = {};
if (this._lastNativeText !== this.props.value && typeof this.props.value === 'string') {
nativeProps.text = this.props.value;
}
var selection = this.props.selection;
if (this._lastNativeSelection && selection && (this._lastNativeSelection.start !== selection.start || this._lastNativeSelection.end !== selection.end)) {
nativeProps.selection = this.props.selection;
}
if (Object.keys(nativeProps).length > 0 && this._inputRef) {
this._inputRef.setNativeProps(nativeProps);
}
if (this.props.selectionState && selection) {
this.props.selectionState.update(selection.start, selection.end);
}
},
_onBlur: function _onBlur(event) {
this.blur();
if (this.props.onBlur) {
this.props.onBlur(event);
}
if (this.props.selectionState) {
this.props.selectionState.blur();
}
},
_onTextInput: function _onTextInput(event) {
this.props.onTextInput && this.props.onTextInput(event);
},
_onScroll: function _onScroll(event) {
this.props.onScroll && this.props.onScroll(event);
}
});
var styles = StyleSheet.create({
input: {
alignSelf: 'stretch'
}
});
module.exports = TextInput;
}, 368, null, "TextInput");
__d(/* DocumentSelectionState */function(global, require, module, exports) {
'use strict';
var mixInEventEmitter = require(370 ); // 370 = mixInEventEmitter
var DocumentSelectionState = function () {
function DocumentSelectionState(anchor, focus) {
babelHelpers.classCallCheck(this, DocumentSelectionState);
this._anchorOffset = anchor;
this._focusOffset = focus;
this._hasFocus = false;
}
babelHelpers.createClass(DocumentSelectionState, [{
key: 'update',
value: function update(anchor, focus) {
if (this._anchorOffset !== anchor || this._focusOffset !== focus) {
this._anchorOffset = anchor;
this._focusOffset = focus;
this.emit('update');
}
}
}, {
key: 'constrainLength',
value: function constrainLength(maxLength) {
this.update(Math.min(this._anchorOffset, maxLength), Math.min(this._focusOffset, maxLength));
}
}, {
key: 'focus',
value: function focus() {
if (!this._hasFocus) {
this._hasFocus = true;
this.emit('focus');
}
}
}, {
key: 'blur',
value: function blur() {
if (this._hasFocus) {
this._hasFocus = false;
this.emit('blur');
}
}
}, {
key: 'hasFocus',
value: function hasFocus() {
return this._hasFocus;
}
}, {
key: 'isCollapsed',
value: function isCollapsed() {
return this._anchorOffset === this._focusOffset;
}
}, {
key: 'isBackward',
value: function isBackward() {
return this._anchorOffset > this._focusOffset;
}
}, {
key: 'getAnchorOffset',
value: function getAnchorOffset() {
return this._hasFocus ? this._anchorOffset : null;
}
}, {
key: 'getFocusOffset',
value: function getFocusOffset() {
return this._hasFocus ? this._focusOffset : null;
}
}, {
key: 'getStartOffset',
value: function getStartOffset() {
return this._hasFocus ? Math.min(this._anchorOffset, this._focusOffset) : null;
}
}, {
key: 'getEndOffset',
value: function getEndOffset() {
return this._hasFocus ? Math.max(this._anchorOffset, this._focusOffset) : null;
}
}, {
key: 'overlaps',
value: function overlaps(start, end) {
return this.hasFocus() && this.getStartOffset() <= end && start <= this.getEndOffset();
}
}]);
return DocumentSelectionState;
}();
mixInEventEmitter(DocumentSelectionState, {
'blur': true,
'focus': true,
'update': true
});
module.exports = DocumentSelectionState;
}, 369, null, "DocumentSelectionState");
__d(/* mixInEventEmitter */function(global, require, module, exports) {
'use strict';
var EventEmitter = require(103 ); // 103 = EventEmitter
var EventEmitterWithHolding = require(371 ); // 371 = EventEmitterWithHolding
var EventHolder = require(372 ); // 372 = EventHolder
var EventValidator = require(373 ); // 373 = EventValidator
var copyProperties = require(374 ); // 374 = copyProperties
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var keyOf = require(323 ); // 323 = fbjs/lib/keyOf
var TYPES_KEY = keyOf({ __types: true });
function mixInEventEmitter(cls, types) {
invariant(types, 'Must supply set of valid event types');
var target = cls.prototype || cls;
invariant(!target.__eventEmitter, 'An active emitter is already mixed in');
var ctor = cls.constructor;
if (ctor) {
invariant(ctor === Object || ctor === Function, 'Mix EventEmitter into a class, not an instance');
}
if (target.hasOwnProperty(TYPES_KEY)) {
copyProperties(target.__types, types);
} else if (target.__types) {
target.__types = copyProperties({}, target.__types, types);
} else {
target.__types = types;
}
copyProperties(target, EventEmitterMixin);
}
var EventEmitterMixin = {
emit: function emit(eventType, a, b, c, d, e, _) {
return this.__getEventEmitter().emit(eventType, a, b, c, d, e, _);
},
emitAndHold: function emitAndHold(eventType, a, b, c, d, e, _) {
return this.__getEventEmitter().emitAndHold(eventType, a, b, c, d, e, _);
},
addListener: function addListener(eventType, listener, context) {
return this.__getEventEmitter().addListener(eventType, listener, context);
},
once: function once(eventType, listener, context) {
return this.__getEventEmitter().once(eventType, listener, context);
},
addRetroactiveListener: function addRetroactiveListener(eventType, listener, context) {
return this.__getEventEmitter().addRetroactiveListener(eventType, listener, context);
},
addListenerMap: function addListenerMap(listenerMap, context) {
return this.__getEventEmitter().addListenerMap(listenerMap, context);
},
addRetroactiveListenerMap: function addRetroactiveListenerMap(listenerMap, context) {
return this.__getEventEmitter().addListenerMap(listenerMap, context);
},
removeAllListeners: function removeAllListeners() {
this.__getEventEmitter().removeAllListeners();
},
removeCurrentListener: function removeCurrentListener() {
this.__getEventEmitter().removeCurrentListener();
},
releaseHeldEventType: function releaseHeldEventType(eventType) {
this.__getEventEmitter().releaseHeldEventType(eventType);
},
__getEventEmitter: function __getEventEmitter() {
if (!this.__eventEmitter) {
var emitter = new EventEmitter();
emitter = EventValidator.addValidation(emitter, this.__types);
var holder = new EventHolder();
this.__eventEmitter = new EventEmitterWithHolding(emitter, holder);
}
return this.__eventEmitter;
}
};
module.exports = mixInEventEmitter;
}, 370, null, "mixInEventEmitter");
__d(/* EventEmitterWithHolding */function(global, require, module, exports) {
'use strict';
var EventEmitterWithHolding = function () {
function EventEmitterWithHolding(emitter, holder) {
babelHelpers.classCallCheck(this, EventEmitterWithHolding);
this._emitter = emitter;
this._eventHolder = holder;
this._currentEventToken = null;
this._emittingHeldEvents = false;
}
babelHelpers.createClass(EventEmitterWithHolding, [{
key: 'addListener',
value: function addListener(eventType, listener, context) {
return this._emitter.addListener(eventType, listener, context);
}
}, {
key: 'once',
value: function once(eventType, listener, context) {
return this._emitter.once(eventType, listener, context);
}
}, {
key: 'addRetroactiveListener',
value: function addRetroactiveListener(eventType, listener, context) {
var subscription = this._emitter.addListener(eventType, listener, context);
this._emittingHeldEvents = true;
this._eventHolder.emitToListener(eventType, listener, context);
this._emittingHeldEvents = false;
return subscription;
}
}, {
key: 'removeAllListeners',
value: function removeAllListeners(eventType) {
this._emitter.removeAllListeners(eventType);
}
}, {
key: 'removeCurrentListener',
value: function removeCurrentListener() {
this._emitter.removeCurrentListener();
}
}, {
key: 'listeners',
value: function listeners(eventType) {
return this._emitter.listeners(eventType);
}
}, {
key: 'emit',
value: function emit(eventType) {
var _emitter;
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
args[_key - 1] = arguments[_key];
}
(_emitter = this._emitter).emit.apply(_emitter, [eventType].concat(babelHelpers.toConsumableArray(args)));
}
}, {
key: 'emitAndHold',
value: function emitAndHold(eventType) {
var _eventHolder, _emitter2;
for (var _len2 = arguments.length, args = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
args[_key2 - 1] = arguments[_key2];
}
this._currentEventToken = (_eventHolder = this._eventHolder).holdEvent.apply(_eventHolder, [eventType].concat(babelHelpers.toConsumableArray(args)));
(_emitter2 = this._emitter).emit.apply(_emitter2, [eventType].concat(babelHelpers.toConsumableArray(args)));
this._currentEventToken = null;
}
}, {
key: 'releaseCurrentEvent',
value: function releaseCurrentEvent() {
if (this._currentEventToken) {
this._eventHolder.releaseEvent(this._currentEventToken);
} else if (this._emittingHeldEvents) {
this._eventHolder.releaseCurrentEvent();
}
}
}, {
key: 'releaseHeldEventType',
value: function releaseHeldEventType(eventType) {
this._eventHolder.releaseEventType(eventType);
}
}]);
return EventEmitterWithHolding;
}();
module.exports = EventEmitterWithHolding;
}, 371, null, "EventEmitterWithHolding");
__d(/* EventHolder */function(global, require, module, exports) {
'use strict';
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var EventHolder = function () {
function EventHolder() {
babelHelpers.classCallCheck(this, EventHolder);
this._heldEvents = {};
this._currentEventKey = null;
}
babelHelpers.createClass(EventHolder, [{
key: 'holdEvent',
value: function holdEvent(eventType) {
this._heldEvents[eventType] = this._heldEvents[eventType] || [];
var eventsOfType = this._heldEvents[eventType];
var key = {
eventType: eventType,
index: eventsOfType.length
};
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
args[_key - 1] = arguments[_key];
}
eventsOfType.push(args);
return key;
}
}, {
key: 'emitToListener',
value: function emitToListener(eventType, listener, context) {
var _this = this;
var eventsOfType = this._heldEvents[eventType];
if (!eventsOfType) {
return;
}
var origEventKey = this._currentEventKey;
eventsOfType.forEach(function (eventHeld, index) {
if (!eventHeld) {
return;
}
_this._currentEventKey = {
eventType: eventType,
index: index
};
listener.apply(context, eventHeld);
});
this._currentEventKey = origEventKey;
}
}, {
key: 'releaseCurrentEvent',
value: function releaseCurrentEvent() {
invariant(this._currentEventKey !== null, 'Not in an emitting cycle; there is no current event');
this._currentEventKey && this.releaseEvent(this._currentEventKey);
}
}, {
key: 'releaseEvent',
value: function releaseEvent(token) {
delete this._heldEvents[token.eventType][token.index];
}
}, {
key: 'releaseEventType',
value: function releaseEventType(type) {
this._heldEvents[type] = [];
}
}]);
return EventHolder;
}();
module.exports = EventHolder;
}, 372, null, "EventHolder");
__d(/* EventValidator */function(global, require, module, exports) {
'use strict';
var copyProperties = require(374 ); // 374 = copyProperties
var EventValidator = {
addValidation: function addValidation(emitter, types) {
var eventTypes = Object.keys(types);
var emitterWithValidation = Object.create(emitter);
copyProperties(emitterWithValidation, {
emit: function emit(type, a, b, c, d, e, _) {
assertAllowsEventType(type, eventTypes);
return emitter.emit.call(this, type, a, b, c, d, e, _);
}
});
return emitterWithValidation;
}
};
function assertAllowsEventType(type, allowedTypes) {
if (allowedTypes.indexOf(type) === -1) {
throw new TypeError(errorMessageFor(type, allowedTypes));
}
}
function errorMessageFor(type, allowedTypes) {
var message = 'Unknown event type "' + type + '". ';
if (__DEV__) {
message += recommendationFor(type, allowedTypes);
}
message += 'Known event types: ' + allowedTypes.join(', ') + '.';
return message;
}
if (__DEV__) {
var recommendationFor = function recommendationFor(type, allowedTypes) {
var closestTypeRecommendation = closestTypeFor(type, allowedTypes);
if (isCloseEnough(closestTypeRecommendation, type)) {
return 'Did you mean "' + closestTypeRecommendation.type + '"? ';
} else {
return '';
}
};
var closestTypeFor = function closestTypeFor(type, allowedTypes) {
var typeRecommendations = allowedTypes.map(typeRecommendationFor.bind(this, type));
return typeRecommendations.sort(recommendationSort)[0];
};
var typeRecommendationFor = function typeRecommendationFor(type, recomendedType) {
return {
type: recomendedType,
distance: damerauLevenshteinDistance(type, recomendedType)
};
};
var recommendationSort = function recommendationSort(recommendationA, recommendationB) {
if (recommendationA.distance < recommendationB.distance) {
return -1;
} else if (recommendationA.distance > recommendationB.distance) {
return 1;
} else {
return 0;
}
};
var isCloseEnough = function isCloseEnough(closestType, actualType) {
return closestType.distance / actualType.length < 0.334;
};
var damerauLevenshteinDistance = function damerauLevenshteinDistance(a, b) {
var i = void 0,
j = void 0;
var d = [];
for (i = 0; i <= a.length; i++) {
d[i] = [i];
}
for (j = 1; j <= b.length; j++) {
d[0][j] = j;
}
for (i = 1; i <= a.length; i++) {
for (j = 1; j <= b.length; j++) {
var cost = a.charAt(i - 1) === b.charAt(j - 1) ? 0 : 1;
d[i][j] = Math.min(d[i - 1][j] + 1, d[i][j - 1] + 1, d[i - 1][j - 1] + cost);
if (i > 1 && j > 1 && a.charAt(i - 1) === b.charAt(j - 2) && a.charAt(i - 2) === b.charAt(j - 1)) {
d[i][j] = Math.min(d[i][j], d[i - 2][j - 2] + cost);
}
}
}
return d[a.length][b.length];
};
}
module.exports = EventValidator;
}, 373, null, "EventValidator");
__d(/* copyProperties */function(global, require, module, exports) {
'use strict';
function copyProperties(obj, a, b, c, d, e, f) {
obj = obj || {};
if (__DEV__) {
if (f) {
throw new Error('Too many arguments passed to copyProperties');
}
}
var args = [a, b, c, d, e];
var ii = 0,
v;
while (args[ii]) {
v = args[ii++];
for (var k in v) {
obj[k] = v[k];
}
if (v.hasOwnProperty && v.hasOwnProperty('toString') && typeof v.toString !== 'undefined' && obj.toString !== v.toString) {
obj.toString = v.toString;
}
}
return obj;
}
module.exports = copyProperties;
}, 374, null, "copyProperties");
__d(/* ToastAndroid */function(global, require, module, exports) {
'use strict';
var warning = require(40 ); // 40 = fbjs/lib/warning
var ToastAndroid = {
show: function show(message, duration) {
warning(false, 'ToastAndroid is not supported on this platform.');
}
};
module.exports = ToastAndroid;
}, 375, null, "ToastAndroid");
__d(/* ToolbarAndroid */function(global, require, module, exports) {
'use strict';
module.exports = require(156 ); // 156 = UnimplementedView
}, 376, null, "ToolbarAndroid");
__d(/* ViewPagerAndroid */function(global, require, module, exports) {
'use strict';
module.exports = require(156 ); // 156 = UnimplementedView
}, 377, null, "ViewPagerAndroid");
__d(/* WebView */function(global, require, module, exports) {
'use strict';
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/node_modules/react-native/Libraries/Components/WebView/WebView.ios.js';
var ActivityIndicator = require(70 ); // 70 = ActivityIndicator
var EdgeInsetsPropType = require(147 ); // 147 = EdgeInsetsPropType
var React = require(126 ); // 126 = React
var ReactNative = require(241 ); // 241 = ReactNative
var StyleSheet = require(127 ); // 127 = StyleSheet
var Text = require(210 ); // 210 = Text
var UIManager = require(123 ); // 123 = UIManager
var View = require(146 ); // 146 = View
var ScrollView = require(239 ); // 239 = ScrollView
var deprecatedPropType = require(137 ); // 137 = deprecatedPropType
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var keyMirror = require(133 ); // 133 = fbjs/lib/keyMirror
var processDecelerationRate = require(293 ); // 293 = processDecelerationRate
var requireNativeComponent = require(155 ); // 155 = requireNativeComponent
var resolveAssetSource = require(198 ); // 198 = resolveAssetSource
var PropTypes = React.PropTypes;
var RCTWebViewManager = require(80 ).WebViewManager; // 80 = NativeModules
var BGWASH = 'rgba(255,255,255,0.8)';
var RCT_WEBVIEW_REF = 'webview';
var WebViewState = keyMirror({
IDLE: null,
LOADING: null,
ERROR: null
});
var NavigationType = keyMirror({
click: true,
formsubmit: true,
backforward: true,
reload: true,
formresubmit: true,
other: true
});
var JSNavigationScheme = 'react-js-navigation';
var DataDetectorTypes = ['phoneNumber', 'link', 'address', 'calendarEvent', 'none', 'all'];
var defaultRenderLoading = function defaultRenderLoading() {
return React.createElement(
View,
{ style: styles.loadingView, __source: {
fileName: _jsxFileName,
lineNumber: 72
}
},
React.createElement(ActivityIndicator, {
__source: {
fileName: _jsxFileName,
lineNumber: 73
}
})
);
};
var defaultRenderError = function defaultRenderError(errorDomain, errorCode, errorDesc) {
return React.createElement(
View,
{ style: styles.errorContainer, __source: {
fileName: _jsxFileName,
lineNumber: 77
}
},
React.createElement(
Text,
{ style: styles.errorTextTitle, __source: {
fileName: _jsxFileName,
lineNumber: 78
}
},
'Error loading page'
),
React.createElement(
Text,
{ style: styles.errorText, __source: {
fileName: _jsxFileName,
lineNumber: 81
}
},
'Domain: ' + errorDomain
),
React.createElement(
Text,
{ style: styles.errorText, __source: {
fileName: _jsxFileName,
lineNumber: 84
}
},
'Error Code: ' + errorCode
),
React.createElement(
Text,
{ style: styles.errorText, __source: {
fileName: _jsxFileName,
lineNumber: 87
}
},
'Description: ' + errorDesc
)
);
};
var WebView = function (_React$Component) {
babelHelpers.inherits(WebView, _React$Component);
function WebView() {
var _ref;
var _temp, _this, _ret;
babelHelpers.classCallCheck(this, WebView);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = babelHelpers.possibleConstructorReturn(this, (_ref = WebView.__proto__ || Object.getPrototypeOf(WebView)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
viewState: WebViewState.IDLE,
lastErrorEvent: null,
startInLoadingState: true
}, _this.goForward = function () {
UIManager.dispatchViewManagerCommand(_this.getWebViewHandle(), UIManager.RCTWebView.Commands.goForward, null);
}, _this.goBack = function () {
UIManager.dispatchViewManagerCommand(_this.getWebViewHandle(), UIManager.RCTWebView.Commands.goBack, null);
}, _this.reload = function () {
_this.setState({ viewState: WebViewState.LOADING });
UIManager.dispatchViewManagerCommand(_this.getWebViewHandle(), UIManager.RCTWebView.Commands.reload, null);
}, _this.stopLoading = function () {
UIManager.dispatchViewManagerCommand(_this.getWebViewHandle(), UIManager.RCTWebView.Commands.stopLoading, null);
}, _this.postMessage = function (data) {
UIManager.dispatchViewManagerCommand(_this.getWebViewHandle(), UIManager.RCTWebView.Commands.postMessage, [String(data)]);
}, _this.injectJavaScript = function (data) {
UIManager.dispatchViewManagerCommand(_this.getWebViewHandle(), UIManager.RCTWebView.Commands.injectJavaScript, [data]);
}, _this._updateNavigationState = function (event) {
if (_this.props.onNavigationStateChange) {
_this.props.onNavigationStateChange(event.nativeEvent);
}
}, _this.getWebViewHandle = function () {
return ReactNative.findNodeHandle(_this.refs[RCT_WEBVIEW_REF]);
}, _this._onLoadingStart = function (event) {
var onLoadStart = _this.props.onLoadStart;
onLoadStart && onLoadStart(event);
_this._updateNavigationState(event);
}, _this._onLoadingError = function (event) {
event.persist();var _this$props = _this.props,
onError = _this$props.onError,
onLoadEnd = _this$props.onLoadEnd;
onError && onError(event);
onLoadEnd && onLoadEnd(event);
console.warn('Encountered an error loading page', event.nativeEvent);
_this.setState({
lastErrorEvent: event.nativeEvent,
viewState: WebViewState.ERROR
});
}, _this._onLoadingFinish = function (event) {
var _this$props2 = _this.props,
onLoad = _this$props2.onLoad,
onLoadEnd = _this$props2.onLoadEnd;
onLoad && onLoad(event);
onLoadEnd && onLoadEnd(event);
_this.setState({
viewState: WebViewState.IDLE
});
_this._updateNavigationState(event);
}, _this._onMessage = function (event) {
var onMessage = _this.props.onMessage;
onMessage && onMessage(event);
}, _temp), babelHelpers.possibleConstructorReturn(_this, _ret);
}
babelHelpers.createClass(WebView, [{
key: 'componentWillMount',
value: function componentWillMount() {
if (this.props.startInLoadingState) {
this.setState({ viewState: WebViewState.LOADING });
}
}
}, {
key: 'render',
value: function render() {
var _this2 = this;
var otherView = null;
if (this.state.viewState === WebViewState.LOADING) {
otherView = (this.props.renderLoading || defaultRenderLoading)();
} else if (this.state.viewState === WebViewState.ERROR) {
var errorEvent = this.state.lastErrorEvent;
invariant(errorEvent != null, 'lastErrorEvent expected to be non-null');
otherView = (this.props.renderError || defaultRenderError)(errorEvent.domain, errorEvent.code, errorEvent.description);
} else if (this.state.viewState !== WebViewState.IDLE) {
console.error('RCTWebView invalid state encountered: ' + this.state.loading);
}
var webViewStyles = [styles.container, styles.webView, this.props.style];
if (this.state.viewState === WebViewState.LOADING || this.state.viewState === WebViewState.ERROR) {
webViewStyles.push(styles.hidden);
}
var onShouldStartLoadWithRequest = this.props.onShouldStartLoadWithRequest && function (event) {
var shouldStart = _this2.props.onShouldStartLoadWithRequest && _this2.props.onShouldStartLoadWithRequest(event.nativeEvent);
RCTWebViewManager.startLoadWithResult(!!shouldStart, event.nativeEvent.lockIdentifier);
};
var decelerationRate = processDecelerationRate(this.props.decelerationRate);
var source = this.props.source || {};
if (this.props.html) {
source.html = this.props.html;
} else if (this.props.url) {
source.uri = this.props.url;
}
var messagingEnabled = typeof this.props.onMessage === 'function';
var webView = React.createElement(RCTWebView, {
ref: RCT_WEBVIEW_REF,
key: 'webViewKey',
style: webViewStyles,
source: resolveAssetSource(source),
injectedJavaScript: this.props.injectedJavaScript,
bounces: this.props.bounces,
scrollEnabled: this.props.scrollEnabled,
decelerationRate: decelerationRate,
contentInset: this.props.contentInset,
automaticallyAdjustContentInsets: this.props.automaticallyAdjustContentInsets,
onLoadingStart: this._onLoadingStart,
onLoadingFinish: this._onLoadingFinish,
onLoadingError: this._onLoadingError,
messagingEnabled: messagingEnabled,
onMessage: this._onMessage,
onShouldStartLoadWithRequest: onShouldStartLoadWithRequest,
scalesPageToFit: this.props.scalesPageToFit,
allowsInlineMediaPlayback: this.props.allowsInlineMediaPlayback,
mediaPlaybackRequiresUserAction: this.props.mediaPlaybackRequiresUserAction,
dataDetectorTypes: this.props.dataDetectorTypes,
__source: {
fileName: _jsxFileName,
lineNumber: 398
}
});
return React.createElement(
View,
{ style: styles.container, __source: {
fileName: _jsxFileName,
lineNumber: 422
}
},
webView,
otherView
);
}
}]);
return WebView;
}(React.Component);
WebView.JSNavigationScheme = JSNavigationScheme;
WebView.NavigationType = NavigationType;
WebView.propTypes = babelHelpers.extends({}, View.propTypes, {
html: deprecatedPropType(PropTypes.string, 'Use the `source` prop instead.'),
url: deprecatedPropType(PropTypes.string, 'Use the `source` prop instead.'),
source: PropTypes.oneOfType([PropTypes.shape({
uri: PropTypes.string,
method: PropTypes.string,
headers: PropTypes.object,
body: PropTypes.string
}), PropTypes.shape({
html: PropTypes.string,
baseUrl: PropTypes.string
}), PropTypes.number]),
renderError: PropTypes.func,
renderLoading: PropTypes.func,
onLoad: PropTypes.func,
onLoadEnd: PropTypes.func,
onLoadStart: PropTypes.func,
onError: PropTypes.func,
bounces: PropTypes.bool,
decelerationRate: ScrollView.propTypes.decelerationRate,
scrollEnabled: PropTypes.bool,
automaticallyAdjustContentInsets: PropTypes.bool,
contentInset: EdgeInsetsPropType,
onNavigationStateChange: PropTypes.func,
onMessage: PropTypes.func,
startInLoadingState: PropTypes.bool,
style: View.propTypes.style,
dataDetectorTypes: PropTypes.oneOfType([PropTypes.oneOf(DataDetectorTypes), PropTypes.arrayOf(PropTypes.oneOf(DataDetectorTypes))]),
javaScriptEnabled: PropTypes.bool,
domStorageEnabled: PropTypes.bool,
injectedJavaScript: PropTypes.string,
userAgent: PropTypes.string,
scalesPageToFit: PropTypes.bool,
onShouldStartLoadWithRequest: PropTypes.func,
allowsInlineMediaPlayback: PropTypes.bool,
mediaPlaybackRequiresUserAction: PropTypes.bool
});
var RCTWebView = requireNativeComponent('RCTWebView', WebView, {
nativeOnly: {
onLoadingStart: true,
onLoadingError: true,
onLoadingFinish: true,
onMessage: true,
messagingEnabled: PropTypes.bool
}
});
var styles = StyleSheet.create({
container: {
flex: 1
},
errorContainer: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: BGWASH
},
errorText: {
fontSize: 14,
textAlign: 'center',
marginBottom: 2
},
errorTextTitle: {
fontSize: 15,
fontWeight: '500',
marginBottom: 10
},
hidden: {
height: 0,
flex: 0 },
loadingView: {
backgroundColor: BGWASH,
flex: 1,
justifyContent: 'center',
alignItems: 'center',
height: 100
},
webView: {
backgroundColor: '#ffffff'
}
});
module.exports = WebView;
}, 378, null, "WebView");
__d(/* ActionSheetIOS */function(global, require, module, exports) {
'use strict';
var RCTActionSheetManager = require(80 ).ActionSheetManager; // 80 = NativeModules
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var processColor = require(121 ); // 121 = processColor
var ActionSheetIOS = {
showActionSheetWithOptions: function showActionSheetWithOptions(options, callback) {
invariant(typeof options === 'object' && options !== null, 'Options must be a valid object');
invariant(typeof callback === 'function', 'Must provide a valid callback');
RCTActionSheetManager.showActionSheetWithOptions(babelHelpers.extends({}, options, { tintColor: processColor(options.tintColor) }), callback);
},
showShareActionSheetWithOptions: function showShareActionSheetWithOptions(options, failureCallback, successCallback) {
invariant(typeof options === 'object' && options !== null, 'Options must be a valid object');
invariant(typeof failureCallback === 'function', 'Must provide a valid failureCallback');
invariant(typeof successCallback === 'function', 'Must provide a valid successCallback');
RCTActionSheetManager.showShareActionSheetWithOptions(babelHelpers.extends({}, options, { tintColor: processColor(options.tintColor) }), failureCallback, successCallback);
}
};
module.exports = ActionSheetIOS;
}, 379, null, "ActionSheetIOS");
__d(/* AdSupportIOS */function(global, require, module, exports) {
'use strict';
var AdSupport = require(80 ).AdSupport; // 80 = NativeModules
module.exports = {
getAdvertisingId: function getAdvertisingId(onSuccess, onFailure) {
AdSupport.getAdvertisingId(onSuccess, onFailure);
},
getAdvertisingTrackingEnabled: function getAdvertisingTrackingEnabled(onSuccess, onFailure) {
AdSupport.getAdvertisingTrackingEnabled(onSuccess, onFailure);
}
};
}, 380, null, "AdSupportIOS");
__d(/* AppRegistry */function(global, require, module, exports) {
'use strict';
var BatchedBridge = require(81 ); // 81 = BatchedBridge
var BugReporting = require(382 ); // 382 = BugReporting
var ReactNative = require(241 ); // 241 = ReactNative
var infoLog = require(229 ); // 229 = infoLog
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var renderApplication = require(385 ); // 385 = renderApplication
var _require = require(80 ), // 80 = NativeModules
HeadlessJsTaskSupport = _require.HeadlessJsTaskSupport;
if (__DEV__) {
require(387 ); // 387 = RCTRenderingPerf
}
var runnables = {};
var runCount = 1;
var tasks = new Map();
var AppRegistry = {
registerConfig: function registerConfig(config) {
for (var i = 0; i < config.length; ++i) {
var appConfig = config[i];
if (appConfig.run) {
AppRegistry.registerRunnable(appConfig.appKey, appConfig.run);
} else {
invariant(appConfig.component, 'No component provider passed in');
AppRegistry.registerComponent(appConfig.appKey, appConfig.component);
}
}
},
registerComponent: function registerComponent(appKey, getComponentFunc) {
runnables[appKey] = {
run: function run(appParameters) {
return renderApplication(getComponentFunc(), appParameters.initialProps, appParameters.rootTag);
}
};
return appKey;
},
registerRunnable: function registerRunnable(appKey, func) {
runnables[appKey] = { run: func };
return appKey;
},
getAppKeys: function getAppKeys() {
return Object.keys(runnables);
},
runApplication: function runApplication(appKey, appParameters) {
var msg = 'Running application "' + appKey + '" with appParams: ' + JSON.stringify(appParameters) + '. ' + '__DEV__ === ' + String(__DEV__) + ', development-level warning are ' + (__DEV__ ? 'ON' : 'OFF') + ', performance optimizations are ' + (__DEV__ ? 'OFF' : 'ON');
infoLog(msg);
BugReporting.addSource('AppRegistry.runApplication' + runCount++, function () {
return msg;
});
invariant(runnables[appKey] && runnables[appKey].run, 'Application ' + appKey + ' has not been registered. This ' + 'is either due to a require() error during initialization ' + 'or failure to call AppRegistry.registerComponent.');
runnables[appKey].run(appParameters);
},
unmountApplicationComponentAtRootTag: function unmountApplicationComponentAtRootTag(rootTag) {
ReactNative.unmountComponentAtNodeAndRemoveContainer(rootTag);
},
registerHeadlessTask: function registerHeadlessTask(taskKey, task) {
if (tasks.has(taskKey)) {
console.warn('registerHeadlessTask called multiple times for same key \'' + taskKey + '\'');
}
tasks.set(taskKey, task);
},
startHeadlessTask: function startHeadlessTask(taskId, taskKey, data) {
var taskProvider = tasks.get(taskKey);
if (!taskProvider) {
throw new Error('No task registered for key ' + taskKey);
}
taskProvider()(data).then(function () {
return HeadlessJsTaskSupport.notifyTaskFinished(taskId);
}).catch(function (reason) {
console.error(reason);
HeadlessJsTaskSupport.notifyTaskFinished(taskId);
});
}
};
BatchedBridge.registerCallableModule('AppRegistry', AppRegistry);
module.exports = AppRegistry;
}, 381, null, "AppRegistry");
__d(/* BugReporting */function(global, require, module, exports) {
'use strict';
var RCTDeviceEventEmitter = require(107 ); // 107 = RCTDeviceEventEmitter
var Map = require(223 ); // 223 = Map
var infoLog = require(229 ); // 229 = infoLog
function defaultExtras() {
BugReporting.addFileSource('react_hierarchy.txt', function () {
return require(383 )(); // 383 = dumpReactTree
});
}
var BugReporting = function () {
function BugReporting() {
babelHelpers.classCallCheck(this, BugReporting);
}
babelHelpers.createClass(BugReporting, null, [{
key: '_maybeInit',
value: function _maybeInit() {
if (!BugReporting._subscription) {
BugReporting._subscription = RCTDeviceEventEmitter.addListener('collectBugExtraData', BugReporting.collectExtraData, null);
defaultExtras();
}
}
}, {
key: 'addSource',
value: function addSource(key, callback) {
return this._addSource(key, callback, BugReporting._extraSources);
}
}, {
key: 'addFileSource',
value: function addFileSource(key, callback) {
return this._addSource(key, callback, BugReporting._fileSources);
}
}, {
key: '_addSource',
value: function _addSource(key, callback, source) {
BugReporting._maybeInit();
if (source.has(key)) {
console.warn('BugReporting.add* called multiple times for same key \'' + key + '\'');
}
source.set(key, callback);
return { remove: function remove() {
source.delete(key);
} };
}
}, {
key: 'collectExtraData',
value: function collectExtraData() {
var extraData = {};
for (var _iterator = BugReporting._extraSources, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[typeof Symbol === 'function' ? Symbol.iterator : '@@iterator']();;) {
var _ref3;
if (_isArray) {
if (_i >= _iterator.length) break;
_ref3 = _iterator[_i++];
} else {
_i = _iterator.next();
if (_i.done) break;
_ref3 = _i.value;
}
var _ref = _ref3;
var _ref2 = babelHelpers.slicedToArray(_ref, 2);
var _key = _ref2[0];
var callback = _ref2[1];
extraData[_key] = callback();
}
var fileData = {};
for (var _iterator2 = BugReporting._fileSources, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[typeof Symbol === 'function' ? Symbol.iterator : '@@iterator']();;) {
var _ref6;
if (_isArray2) {
if (_i2 >= _iterator2.length) break;
_ref6 = _iterator2[_i2++];
} else {
_i2 = _iterator2.next();
if (_i2.done) break;
_ref6 = _i2.value;
}
var _ref4 = _ref6;
var _ref5 = babelHelpers.slicedToArray(_ref4, 2);
var _key2 = _ref5[0];
var _callback = _ref5[1];
fileData[_key2] = _callback();
}
infoLog('BugReporting extraData:', extraData);
var BugReportingNativeModule = require(80 ).BugReporting; // 80 = NativeModules
BugReportingNativeModule && BugReportingNativeModule.setExtraData && BugReportingNativeModule.setExtraData(extraData, fileData);
return { extras: extraData, files: fileData };
}
}]);
return BugReporting;
}();
BugReporting._extraSources = new Map();
BugReporting._fileSources = new Map();
BugReporting._subscription = null;
module.exports = BugReporting;
}, 382, null, "BugReporting");
__d(/* dumpReactTree */function(global, require, module, exports) {
'use strict';
var ReactNativeMount = require(265 ); // 265 = ReactNativeMount
var getReactData = require(384 ); // 384 = getReactData
var INDENTATION_SIZE = 2;
var MAX_DEPTH = 2;
var MAX_STRING_LENGTH = 50;
function dumpReactTree() {
try {
return getReactTree();
} catch (e) {
return 'Failed to dump react tree: ' + e;
}
}
function getReactTree() {
var output = '';
var rootIds = Object.getOwnPropertyNames(ReactNativeMount._instancesByContainerID);
for (var _iterator = rootIds, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[typeof Symbol === 'function' ? Symbol.iterator : '@@iterator']();;) {
var _ref;
if (_isArray) {
if (_i >= _iterator.length) break;
_ref = _iterator[_i++];
} else {
_i = _iterator.next();
if (_i.done) break;
_ref = _i.value;
}
var rootId = _ref;
var instance = ReactNativeMount._instancesByContainerID[rootId];
output += '============ Root ID: ' + rootId + ' ============\n';
output += dumpNode(instance, 0);
output += '============ End root ID: ' + rootId + ' ============\n';
}
return output;
}
function dumpNode(node, identation) {
var data = getReactData(node);
if (data.nodeType === 'Text') {
return indent(identation) + data.text + '\n';
} else if (data.nodeType === 'Empty') {
return '';
}
var output = indent(identation) + ('<' + data.name);
if (data.nodeType === 'Composite') {
for (var _iterator2 = Object.getOwnPropertyNames(data.props || {}), _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[typeof Symbol === 'function' ? Symbol.iterator : '@@iterator']();;) {
var _ref2;
if (_isArray2) {
if (_i2 >= _iterator2.length) break;
_ref2 = _iterator2[_i2++];
} else {
_i2 = _iterator2.next();
if (_i2.done) break;
_ref2 = _i2.value;
}
var propName = _ref2;
if (isNormalProp(propName)) {
try {
var value = convertValue(data.props[propName]);
if (value) {
output += ' ' + propName + '=' + value;
}
} catch (e) {
var message = '[Failed to get property: ' + e + ']';
output += ' ' + propName + '=' + message;
}
}
}
}
var childOutput = '';
for (var _iterator3 = data.children || [], _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[typeof Symbol === 'function' ? Symbol.iterator : '@@iterator']();;) {
var _ref3;
if (_isArray3) {
if (_i3 >= _iterator3.length) break;
_ref3 = _iterator3[_i3++];
} else {
_i3 = _iterator3.next();
if (_i3.done) break;
_ref3 = _i3.value;
}
var child = _ref3;
childOutput += dumpNode(child, identation + 1);
}
if (childOutput) {
output += '>\n' + childOutput + indent(identation) + ('</' + data.name + '>\n');
} else {
output += ' />\n';
}
return output;
}
function isNormalProp(name) {
switch (name) {
case 'children':
case 'key':
case 'ref':
return false;
default:
return true;
}
}
function convertObject(object, depth) {
if (depth >= MAX_DEPTH) {
return '[...omitted]';
}
var output = '{';
var first = true;
for (var _iterator4 = Object.getOwnPropertyNames(object), _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _iterator4[typeof Symbol === 'function' ? Symbol.iterator : '@@iterator']();;) {
var _ref4;
if (_isArray4) {
if (_i4 >= _iterator4.length) break;
_ref4 = _iterator4[_i4++];
} else {
_i4 = _iterator4.next();
if (_i4.done) break;
_ref4 = _i4.value;
}
var key = _ref4;
if (!first) {
output += ', ';
}
output += key + ': ' + convertValue(object[key], depth + 1);
first = false;
}
return output + '}';
}
function convertValue(value) {
var depth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
if (!value) {
return null;
}
switch (typeof value) {
case 'string':
return JSON.stringify(possiblyEllipsis(value).replace('\n', '\\n'));
case 'boolean':
case 'number':
return JSON.stringify(value);
case 'function':
return '[function]';
case 'object':
return convertObject(value, depth);
default:
return null;
}
}
function possiblyEllipsis(value) {
if (value.length > MAX_STRING_LENGTH) {
return value.slice(0, MAX_STRING_LENGTH) + '...';
} else {
return value;
}
}
function indent(size) {
return ' '.repeat(size * INDENTATION_SIZE);
}
module.exports = dumpReactTree;
}, 383, null, "dumpReactTree");
__d(/* getReactData */function(global, require, module, exports) {
'use strict';
function getData(element) {
var children = null;
var props = null;
var state = null;
var context = null;
var updater = null;
var name = null;
var type = null;
var text = null;
var publicInstance = null;
var nodeType = 'Native';
if (typeof element !== 'object') {
nodeType = 'Text';
text = element + '';
} else if (element._currentElement === null || element._currentElement === false) {
nodeType = 'Empty';
} else if (element._renderedComponent) {
nodeType = 'NativeWrapper';
children = [element._renderedComponent];
props = element._instance.props;
state = element._instance.state;
context = element._instance.context;
if (context && Object.keys(context).length === 0) {
context = null;
}
} else if (element._renderedChildren) {
children = childrenList(element._renderedChildren);
} else if (element._currentElement && element._currentElement.props) {
children = element._currentElement.props.children;
}
if (!props && element._currentElement && element._currentElement.props) {
props = element._currentElement.props;
}
if (element._currentElement != null) {
type = element._currentElement.type;
if (typeof type === 'string') {
name = type;
} else if (element.getName) {
nodeType = 'Composite';
name = element.getName();
if (element._renderedComponent && element._currentElement.props === element._renderedComponent._currentElement) {
nodeType = 'Wrapper';
}
if (name === null) {
name = 'No display name';
}
} else if (element._stringText) {
nodeType = 'Text';
text = element._stringText;
} else {
name = type.displayName || type.name || 'Unknown';
}
}
if (element._instance) {
var inst = element._instance;
updater = {
setState: inst.setState && inst.setState.bind(inst),
forceUpdate: inst.forceUpdate && inst.forceUpdate.bind(inst),
setInProps: inst.forceUpdate && setInProps.bind(null, element),
setInState: inst.forceUpdate && setInState.bind(null, inst),
setInContext: inst.forceUpdate && setInContext.bind(null, inst)
};
publicInstance = inst;
if (inst._renderedChildren) {
children = childrenList(inst._renderedChildren);
}
}
return {
nodeType: nodeType,
type: type,
name: name,
props: props,
state: state,
context: context,
children: children,
text: text,
updater: updater,
publicInstance: publicInstance
};
}
function setInProps(internalInst, path, value) {
var element = internalInst._currentElement;
internalInst._currentElement = babelHelpers.extends({}, element, {
props: copyWithSet(element.props, path, value)
});
internalInst._instance.forceUpdate();
}
function setInState(inst, path, value) {
setIn(inst.state, path, value);
inst.forceUpdate();
}
function setInContext(inst, path, value) {
setIn(inst.context, path, value);
inst.forceUpdate();
}
function setIn(obj, path, value) {
var last = path.pop();
var parent = path.reduce(function (obj_, attr) {
return obj_ ? obj_[attr] : null;
}, obj);
if (parent) {
parent[last] = value;
}
}
function childrenList(children) {
var res = [];
for (var name in children) {
res.push(children[name]);
}
return res;
}
function copyWithSetImpl(obj, path, idx, value) {
if (idx >= path.length) {
return value;
}
var key = path[idx];
var updated = Array.isArray(obj) ? obj.slice() : babelHelpers.extends({}, obj);
updated[key] = copyWithSetImpl(obj[key], path, idx + 1, value);
return updated;
}
function copyWithSet(obj, path, value) {
return copyWithSetImpl(obj, path, 0, value);
}
module.exports = getData;
}, 384, null, "getReactData");
__d(/* renderApplication */function(global, require, module, exports) {
'use strict';
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/node_modules/react-native/Libraries/ReactNative/renderApplication.js';
var AppContainer = require(310 ); // 310 = AppContainer
var React = require(126 ); // 126 = React
var ReactNative = require(241 ); // 241 = ReactNative
var invariant = require(44 ); // 44 = fbjs/lib/invariant
require(386 ); // 386 = BackAndroid
function renderApplication(RootComponent, initialProps, rootTag) {
invariant(rootTag, 'Expect to have a valid rootTag, instead got ', rootTag);
ReactNative.render(React.createElement(
AppContainer,
{ rootTag: rootTag, __source: {
fileName: _jsxFileName,
lineNumber: 34
}
},
React.createElement(RootComponent, babelHelpers.extends({}, initialProps, {
rootTag: rootTag,
__source: {
fileName: _jsxFileName,
lineNumber: 35
}
}))
), rootTag);
}
module.exports = renderApplication;
}, 385, null, "renderApplication");
__d(/* BackAndroid */function(global, require, module, exports) {
'use strict';
function emptyFunction() {}
var BackAndroid = {
exitApp: emptyFunction,
addEventListener: function addEventListener() {
return {
remove: emptyFunction
};
},
removeEventListener: emptyFunction
};
module.exports = BackAndroid;
}, 386, null, "BackAndroid");
__d(/* RCTRenderingPerf */function(global, require, module, exports) {
'use strict';
var ReactDebugTool = require(86 ); // 86 = ReactDebugTool
var ReactPerf = require(388 ); // 388 = ReactPerf
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var performanceNow = require(90 ); // 90 = fbjs/lib/performanceNow
var perfModules = [];
var enabled = false;
var lastRenderStartTime = 0;
var totalRenderDuration = 0;
var RCTRenderingPerfDevtool = {
onBeginLifeCycleTimer: function onBeginLifeCycleTimer(debugID, timerType) {
if (timerType === 'render') {
lastRenderStartTime = performanceNow();
}
},
onEndLifeCycleTimer: function onEndLifeCycleTimer(debugID, timerType) {
if (timerType === 'render') {
var lastRenderDuration = performanceNow() - lastRenderStartTime;
totalRenderDuration += lastRenderDuration;
}
}
};
var RCTRenderingPerf = {
toggle: function toggle() {
console.log('Render perfomance measurements enabled');
enabled = true;
},
start: function start() {
if (!enabled) {
return;
}
ReactPerf.start();
ReactDebugTool.addHook(RCTRenderingPerfDevtool);
perfModules.forEach(function (module) {
return module.start();
});
},
stop: function stop() {
if (!enabled) {
return;
}
ReactPerf.stop();
ReactPerf.printInclusive();
ReactPerf.printWasted();
ReactDebugTool.removeHook(RCTRenderingPerfDevtool);
console.log('Total time spent in render(): ' + totalRenderDuration.toFixed(2) + ' ms');
lastRenderStartTime = 0;
totalRenderDuration = 0;
perfModules.forEach(function (module) {
return module.stop();
});
},
register: function register(module) {
invariant(typeof module.start === 'function', 'Perf module should have start() function');
invariant(typeof module.stop === 'function', 'Perf module should have stop() function');
perfModules.push(module);
}
};
module.exports = RCTRenderingPerf;
}, 387, null, "RCTRenderingPerf");
__d(/* ReactPerf */function(global, require, module, exports) {
'use strict';
var ReactDebugTool = require(86 ); // 86 = ReactDebugTool
var warning = require(40 ); // 40 = fbjs/lib/warning
var alreadyWarned = false;
function roundFloat(val) {
var base = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
var n = Math.pow(10, base);
return Math.floor(val * n) / n;
}
function consoleTable(table) {
console.table(table);
}
function warnInProduction() {
if (alreadyWarned) {
return;
}
alreadyWarned = true;
if (typeof console !== 'undefined') {
console.error('ReactPerf is not supported in the production builds of React. ' + 'To collect measurements, please use the development build of React instead.');
}
}
function getLastMeasurements() {
if (!__DEV__) {
warnInProduction();
return [];
}
return ReactDebugTool.getFlushHistory();
}
function getExclusive() {
var flushHistory = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getLastMeasurements();
if (!__DEV__) {
warnInProduction();
return [];
}
var aggregatedStats = {};
var affectedIDs = {};
function updateAggregatedStats(treeSnapshot, instanceID, timerType, applyUpdate) {
var displayName = treeSnapshot[instanceID].displayName;
var key = displayName;
var stats = aggregatedStats[key];
if (!stats) {
affectedIDs[key] = {};
stats = aggregatedStats[key] = {
key: key,
instanceCount: 0,
counts: {},
durations: {},
totalDuration: 0
};
}
if (!stats.durations[timerType]) {
stats.durations[timerType] = 0;
}
if (!stats.counts[timerType]) {
stats.counts[timerType] = 0;
}
affectedIDs[key][instanceID] = true;
applyUpdate(stats);
}
flushHistory.forEach(function (flush) {
var measurements = flush.measurements,
treeSnapshot = flush.treeSnapshot;
measurements.forEach(function (measurement) {
var duration = measurement.duration,
instanceID = measurement.instanceID,
timerType = measurement.timerType;
updateAggregatedStats(treeSnapshot, instanceID, timerType, function (stats) {
stats.totalDuration += duration;
stats.durations[timerType] += duration;
stats.counts[timerType]++;
});
});
});
return Object.keys(aggregatedStats).map(function (key) {
return babelHelpers.extends({}, aggregatedStats[key], {
instanceCount: Object.keys(affectedIDs[key]).length
});
}).sort(function (a, b) {
return b.totalDuration - a.totalDuration;
});
}
function getInclusive() {
var flushHistory = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getLastMeasurements();
if (!__DEV__) {
warnInProduction();
return [];
}
var aggregatedStats = {};
var affectedIDs = {};
function updateAggregatedStats(treeSnapshot, instanceID, applyUpdate) {
var _treeSnapshot$instanc = treeSnapshot[instanceID],
displayName = _treeSnapshot$instanc.displayName,
ownerID = _treeSnapshot$instanc.ownerID;
var owner = treeSnapshot[ownerID];
var key = (owner ? owner.displayName + ' > ' : '') + displayName;
var stats = aggregatedStats[key];
if (!stats) {
affectedIDs[key] = {};
stats = aggregatedStats[key] = {
key: key,
instanceCount: 0,
inclusiveRenderDuration: 0,
renderCount: 0
};
}
affectedIDs[key][instanceID] = true;
applyUpdate(stats);
}
var isCompositeByID = {};
flushHistory.forEach(function (flush) {
var measurements = flush.measurements;
measurements.forEach(function (measurement) {
var instanceID = measurement.instanceID,
timerType = measurement.timerType;
if (timerType !== 'render') {
return;
}
isCompositeByID[instanceID] = true;
});
});
flushHistory.forEach(function (flush) {
var measurements = flush.measurements,
treeSnapshot = flush.treeSnapshot;
measurements.forEach(function (measurement) {
var duration = measurement.duration,
instanceID = measurement.instanceID,
timerType = measurement.timerType;
if (timerType !== 'render') {
return;
}
updateAggregatedStats(treeSnapshot, instanceID, function (stats) {
stats.renderCount++;
});
var nextParentID = instanceID;
while (nextParentID) {
if (isCompositeByID[nextParentID]) {
updateAggregatedStats(treeSnapshot, nextParentID, function (stats) {
stats.inclusiveRenderDuration += duration;
});
}
nextParentID = treeSnapshot[nextParentID].parentID;
}
});
});
return Object.keys(aggregatedStats).map(function (key) {
return babelHelpers.extends({}, aggregatedStats[key], {
instanceCount: Object.keys(affectedIDs[key]).length
});
}).sort(function (a, b) {
return b.inclusiveRenderDuration - a.inclusiveRenderDuration;
});
}
function getWasted() {
var flushHistory = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getLastMeasurements();
if (!__DEV__) {
warnInProduction();
return [];
}
var aggregatedStats = {};
var affectedIDs = {};
function updateAggregatedStats(treeSnapshot, instanceID, applyUpdate) {
var _treeSnapshot$instanc2 = treeSnapshot[instanceID],
displayName = _treeSnapshot$instanc2.displayName,
ownerID = _treeSnapshot$instanc2.ownerID;
var owner = treeSnapshot[ownerID];
var key = (owner ? owner.displayName + ' > ' : '') + displayName;
var stats = aggregatedStats[key];
if (!stats) {
affectedIDs[key] = {};
stats = aggregatedStats[key] = {
key: key,
instanceCount: 0,
inclusiveRenderDuration: 0,
renderCount: 0
};
}
affectedIDs[key][instanceID] = true;
applyUpdate(stats);
}
flushHistory.forEach(function (flush) {
var measurements = flush.measurements,
treeSnapshot = flush.treeSnapshot,
operations = flush.operations;
var isDefinitelyNotWastedByID = {};
operations.forEach(function (operation) {
var instanceID = operation.instanceID;
var nextParentID = instanceID;
while (nextParentID) {
isDefinitelyNotWastedByID[nextParentID] = true;
nextParentID = treeSnapshot[nextParentID].parentID;
}
});
var renderedCompositeIDs = {};
measurements.forEach(function (measurement) {
var instanceID = measurement.instanceID,
timerType = measurement.timerType;
if (timerType !== 'render') {
return;
}
renderedCompositeIDs[instanceID] = true;
});
measurements.forEach(function (measurement) {
var duration = measurement.duration,
instanceID = measurement.instanceID,
timerType = measurement.timerType;
if (timerType !== 'render') {
return;
}
var updateCount = treeSnapshot[instanceID].updateCount;
if (isDefinitelyNotWastedByID[instanceID] || updateCount === 0) {
return;
}
updateAggregatedStats(treeSnapshot, instanceID, function (stats) {
stats.renderCount++;
});
var nextParentID = instanceID;
while (nextParentID) {
var isWasted = renderedCompositeIDs[nextParentID] && !isDefinitelyNotWastedByID[nextParentID];
if (isWasted) {
updateAggregatedStats(treeSnapshot, nextParentID, function (stats) {
stats.inclusiveRenderDuration += duration;
});
}
nextParentID = treeSnapshot[nextParentID].parentID;
}
});
});
return Object.keys(aggregatedStats).map(function (key) {
return babelHelpers.extends({}, aggregatedStats[key], {
instanceCount: Object.keys(affectedIDs[key]).length
});
}).sort(function (a, b) {
return b.inclusiveRenderDuration - a.inclusiveRenderDuration;
});
}
function getOperations() {
var flushHistory = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getLastMeasurements();
if (!__DEV__) {
warnInProduction();
return [];
}
var stats = [];
flushHistory.forEach(function (flush, flushIndex) {
var operations = flush.operations,
treeSnapshot = flush.treeSnapshot;
operations.forEach(function (operation) {
var instanceID = operation.instanceID,
type = operation.type,
payload = operation.payload;
var _treeSnapshot$instanc3 = treeSnapshot[instanceID],
displayName = _treeSnapshot$instanc3.displayName,
ownerID = _treeSnapshot$instanc3.ownerID;
var owner = treeSnapshot[ownerID];
var key = (owner ? owner.displayName + ' > ' : '') + displayName;
stats.push({
flushIndex: flushIndex,
instanceID: instanceID,
key: key,
type: type,
ownerID: ownerID,
payload: payload
});
});
});
return stats;
}
function printExclusive(flushHistory) {
if (!__DEV__) {
warnInProduction();
return;
}
var stats = getExclusive(flushHistory);
var table = stats.map(function (item) {
var key = item.key,
instanceCount = item.instanceCount,
totalDuration = item.totalDuration;
var renderCount = item.counts.render || 0;
var renderDuration = item.durations.render || 0;
return {
'Component': key,
'Total time (ms)': roundFloat(totalDuration),
'Instance count': instanceCount,
'Total render time (ms)': roundFloat(renderDuration),
'Average render time (ms)': renderCount ? roundFloat(renderDuration / renderCount) : undefined,
'Render count': renderCount,
'Total lifecycle time (ms)': roundFloat(totalDuration - renderDuration)
};
});
consoleTable(table);
}
function printInclusive(flushHistory) {
if (!__DEV__) {
warnInProduction();
return;
}
var stats = getInclusive(flushHistory);
var table = stats.map(function (item) {
var key = item.key,
instanceCount = item.instanceCount,
inclusiveRenderDuration = item.inclusiveRenderDuration,
renderCount = item.renderCount;
return {
'Owner > Component': key,
'Inclusive render time (ms)': roundFloat(inclusiveRenderDuration),
'Instance count': instanceCount,
'Render count': renderCount
};
});
consoleTable(table);
}
function printWasted(flushHistory) {
if (!__DEV__) {
warnInProduction();
return;
}
var stats = getWasted(flushHistory);
var table = stats.map(function (item) {
var key = item.key,
instanceCount = item.instanceCount,
inclusiveRenderDuration = item.inclusiveRenderDuration,
renderCount = item.renderCount;
return {
'Owner > Component': key,
'Inclusive wasted time (ms)': roundFloat(inclusiveRenderDuration),
'Instance count': instanceCount,
'Render count': renderCount
};
});
consoleTable(table);
}
function printOperations(flushHistory) {
if (!__DEV__) {
warnInProduction();
return;
}
var stats = getOperations(flushHistory);
var table = stats.map(function (stat) {
return {
'Owner > Node': stat.key,
'Operation': stat.type,
'Payload': typeof stat.payload === 'object' ? JSON.stringify(stat.payload) : stat.payload,
'Flush index': stat.flushIndex,
'Owner Component ID': stat.ownerID,
'DOM Component ID': stat.instanceID
};
});
consoleTable(table);
}
var warnedAboutPrintDOM = false;
function printDOM(measurements) {
warning(warnedAboutPrintDOM, '`ReactPerf.printDOM(...)` is deprecated. Use ' + '`ReactPerf.printOperations(...)` instead.');
warnedAboutPrintDOM = true;
return printOperations(measurements);
}
var warnedAboutGetMeasurementsSummaryMap = false;
function getMeasurementsSummaryMap(measurements) {
warning(warnedAboutGetMeasurementsSummaryMap, '`ReactPerf.getMeasurementsSummaryMap(...)` is deprecated. Use ' + '`ReactPerf.getWasted(...)` instead.');
warnedAboutGetMeasurementsSummaryMap = true;
return getWasted(measurements);
}
function start() {
if (!__DEV__) {
warnInProduction();
return;
}
ReactDebugTool.beginProfiling();
}
function stop() {
if (!__DEV__) {
warnInProduction();
return;
}
ReactDebugTool.endProfiling();
}
function isRunning() {
if (!__DEV__) {
warnInProduction();
return false;
}
return ReactDebugTool.isProfiling();
}
var ReactPerfAnalysis = {
getLastMeasurements: getLastMeasurements,
getExclusive: getExclusive,
getInclusive: getInclusive,
getWasted: getWasted,
getOperations: getOperations,
printExclusive: printExclusive,
printInclusive: printInclusive,
printWasted: printWasted,
printOperations: printOperations,
start: start,
stop: stop,
isRunning: isRunning,
printDOM: printDOM,
getMeasurementsSummaryMap: getMeasurementsSummaryMap
};
module.exports = ReactPerfAnalysis;
}, 388, null, "ReactPerf");
__d(/* AsyncStorage */function(global, require, module, exports) {
'use strict';
var NativeModules = require(80 ); // 80 = NativeModules
var RCTAsyncSQLiteStorage = NativeModules.AsyncSQLiteDBStorage;
var RCTAsyncRocksDBStorage = NativeModules.AsyncRocksDBStorage;
var RCTAsyncFileStorage = NativeModules.AsyncLocalStorage;
var RCTAsyncStorage = RCTAsyncRocksDBStorage || RCTAsyncSQLiteStorage || RCTAsyncFileStorage;
var AsyncStorage = {
_getRequests: [],
_getKeys: [],
_immediate: null,
getItem: function getItem(key, callback) {
return new Promise(function (resolve, reject) {
RCTAsyncStorage.multiGet([key], function (errors, result) {
var value = result && result[0] && result[0][1] ? result[0][1] : null;
var errs = convertErrors(errors);
callback && callback(errs && errs[0], value);
if (errs) {
reject(errs[0]);
} else {
resolve(value);
}
});
});
},
setItem: function setItem(key, value, callback) {
return new Promise(function (resolve, reject) {
RCTAsyncStorage.multiSet([[key, value]], function (errors) {
var errs = convertErrors(errors);
callback && callback(errs && errs[0]);
if (errs) {
reject(errs[0]);
} else {
resolve(null);
}
});
});
},
removeItem: function removeItem(key, callback) {
return new Promise(function (resolve, reject) {
RCTAsyncStorage.multiRemove([key], function (errors) {
var errs = convertErrors(errors);
callback && callback(errs && errs[0]);
if (errs) {
reject(errs[0]);
} else {
resolve(null);
}
});
});
},
mergeItem: function mergeItem(key, value, callback) {
return new Promise(function (resolve, reject) {
RCTAsyncStorage.multiMerge([[key, value]], function (errors) {
var errs = convertErrors(errors);
callback && callback(errs && errs[0]);
if (errs) {
reject(errs[0]);
} else {
resolve(null);
}
});
});
},
clear: function clear(callback) {
return new Promise(function (resolve, reject) {
RCTAsyncStorage.clear(function (error) {
callback && callback(convertError(error));
if (error && convertError(error)) {
reject(convertError(error));
} else {
resolve(null);
}
});
});
},
getAllKeys: function getAllKeys(callback) {
return new Promise(function (resolve, reject) {
RCTAsyncStorage.getAllKeys(function (error, keys) {
callback && callback(convertError(error), keys);
if (error) {
reject(convertError(error));
} else {
resolve(keys);
}
});
});
},
flushGetRequests: function flushGetRequests() {
var getRequests = this._getRequests;
var getKeys = this._getKeys;
this._getRequests = [];
this._getKeys = [];
RCTAsyncStorage.multiGet(getKeys, function (errors, result) {
var map = {};
result && result.forEach(function (_ref) {
var _ref2 = babelHelpers.slicedToArray(_ref, 2),
key = _ref2[0],
value = _ref2[1];
map[key] = value;return value;
});
var reqLength = getRequests.length;
for (var i = 0; i < reqLength; i++) {
var request = getRequests[i];
var requestKeys = request.keys;
var requestResult = requestKeys.map(function (key) {
return [key, map[key]];
});
request.callback && request.callback(null, requestResult);
request.resolve && request.resolve(requestResult);
}
});
},
multiGet: function multiGet(keys, callback) {
var _this = this;
if (!this._immediate) {
this._immediate = setImmediate(function () {
_this._immediate = null;
_this.flushGetRequests();
});
}
var getRequest = {
keys: keys,
callback: callback,
keyIndex: this._getKeys.length,
resolve: null,
reject: null
};
var promiseResult = new Promise(function (resolve, reject) {
getRequest.resolve = resolve;
getRequest.reject = reject;
});
this._getRequests.push(getRequest);
keys.forEach(function (key) {
if (_this._getKeys.indexOf(key) === -1) {
_this._getKeys.push(key);
}
});
return promiseResult;
},
multiSet: function multiSet(keyValuePairs, callback) {
return new Promise(function (resolve, reject) {
RCTAsyncStorage.multiSet(keyValuePairs, function (errors) {
var error = convertErrors(errors);
callback && callback(error);
if (error) {
reject(error);
} else {
resolve(null);
}
});
});
},
multiRemove: function multiRemove(keys, callback) {
return new Promise(function (resolve, reject) {
RCTAsyncStorage.multiRemove(keys, function (errors) {
var error = convertErrors(errors);
callback && callback(error);
if (error) {
reject(error);
} else {
resolve(null);
}
});
});
},
multiMerge: function multiMerge(keyValuePairs, callback) {
return new Promise(function (resolve, reject) {
RCTAsyncStorage.multiMerge(keyValuePairs, function (errors) {
var error = convertErrors(errors);
callback && callback(error);
if (error) {
reject(error);
} else {
resolve(null);
}
});
});
}
};
if (!RCTAsyncStorage.multiMerge) {
delete AsyncStorage.mergeItem;
delete AsyncStorage.multiMerge;
}
function convertErrors(errs) {
if (!errs) {
return null;
}
return (Array.isArray(errs) ? errs : [errs]).map(function (e) {
return convertError(e);
});
}
function convertError(error) {
if (!error) {
return null;
}
var out = new Error(error.message);
out.key = error.key;
return out;
}
module.exports = AsyncStorage;
}, 389, null, "AsyncStorage");
__d(/* CameraRoll */function(global, require, module, exports) {
'use strict';
var ReactPropTypes = require(126 ).PropTypes; // 126 = React
var RCTCameraRollManager = require(80 ).CameraRollManager; // 80 = NativeModules
var createStrictShapeTypeChecker = require(148 ); // 148 = createStrictShapeTypeChecker
var deepFreezeAndThrowOnMutationInDev = require(96 ); // 96 = deepFreezeAndThrowOnMutationInDev
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var GROUP_TYPES_OPTIONS = ['Album', 'All', 'Event', 'Faces', 'Library', 'PhotoStream', 'SavedPhotos'];
var ASSET_TYPE_OPTIONS = ['All', 'Videos', 'Photos'];
deepFreezeAndThrowOnMutationInDev(GROUP_TYPES_OPTIONS);
deepFreezeAndThrowOnMutationInDev(ASSET_TYPE_OPTIONS);
var getPhotosParamChecker = createStrictShapeTypeChecker({
first: ReactPropTypes.number.isRequired,
after: ReactPropTypes.string,
groupTypes: ReactPropTypes.oneOf(GROUP_TYPES_OPTIONS),
groupName: ReactPropTypes.string,
assetType: ReactPropTypes.oneOf(ASSET_TYPE_OPTIONS),
mimeTypes: ReactPropTypes.arrayOf(ReactPropTypes.string)
});
var getPhotosReturnChecker = createStrictShapeTypeChecker({
edges: ReactPropTypes.arrayOf(createStrictShapeTypeChecker({
node: createStrictShapeTypeChecker({
type: ReactPropTypes.string.isRequired,
group_name: ReactPropTypes.string.isRequired,
image: createStrictShapeTypeChecker({
uri: ReactPropTypes.string.isRequired,
height: ReactPropTypes.number.isRequired,
width: ReactPropTypes.number.isRequired,
isStored: ReactPropTypes.bool
}).isRequired,
timestamp: ReactPropTypes.number.isRequired,
location: createStrictShapeTypeChecker({
latitude: ReactPropTypes.number,
longitude: ReactPropTypes.number,
altitude: ReactPropTypes.number,
heading: ReactPropTypes.number,
speed: ReactPropTypes.number
})
}).isRequired
})).isRequired,
page_info: createStrictShapeTypeChecker({
has_next_page: ReactPropTypes.bool.isRequired,
start_cursor: ReactPropTypes.string,
end_cursor: ReactPropTypes.string
}).isRequired
});
var CameraRoll = function () {
function CameraRoll() {
babelHelpers.classCallCheck(this, CameraRoll);
}
babelHelpers.createClass(CameraRoll, null, [{
key: 'saveImageWithTag',
value: function saveImageWithTag(tag) {
console.warn('CameraRoll.saveImageWithTag is deprecated. Use CameraRoll.saveToCameraRoll instead');
return this.saveToCameraRoll(tag, 'photo');
}
}, {
key: 'saveToCameraRoll',
value: function saveToCameraRoll(tag, type) {
invariant(typeof tag === 'string', 'CameraRoll.saveToCameraRoll must be a valid string.');
invariant(type === 'photo' || type === 'video' || type === undefined, 'The second argument to saveToCameraRoll must be \'photo\' or \'video\'. You passed ' + type);
var mediaType = 'photo';
if (type) {
mediaType = type;
} else if (['mov', 'mp4'].indexOf(tag.split('.').slice(-1)[0]) >= 0) {
mediaType = 'video';
}
return RCTCameraRollManager.saveToCameraRoll(tag, mediaType);
}
}, {
key: 'getPhotos',
value: function getPhotos(params) {
if (__DEV__) {
getPhotosParamChecker({ params: params }, 'params', 'CameraRoll.getPhotos');
}
if (arguments.length > 1) {
console.warn('CameraRoll.getPhotos(tag, success, error) is deprecated. Use the returned Promise instead');
var successCallback = arguments[1];
if (__DEV__) {
var callback = arguments[1];
successCallback = function successCallback(response) {
getPhotosReturnChecker({ response: response }, 'response', 'CameraRoll.getPhotos callback');
callback(response);
};
}
var errorCallback = arguments[2] || function () {};
RCTCameraRollManager.getPhotos(params).then(successCallback, errorCallback);
}
return RCTCameraRollManager.getPhotos(params);
}
}]);
return CameraRoll;
}();
CameraRoll.GroupTypesOptions = GROUP_TYPES_OPTIONS;
CameraRoll.AssetTypeOptions = ASSET_TYPE_OPTIONS;
module.exports = CameraRoll;
}, 390, null, "CameraRoll");
__d(/* Clipboard */function(global, require, module, exports) {
'use strict';
var Clipboard = require(80 ).Clipboard; // 80 = NativeModules
module.exports = {
getString: function getString() {
return Clipboard.getString();
},
setString: function setString(content) {
Clipboard.setString(content);
}
};
}, 391, null, "Clipboard");
__d(/* DatePickerAndroid */function(global, require, module, exports) {
'use strict';
var DatePickerAndroid = {
open: function open(options) {
return regeneratorRuntime.async(function open$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
return _context.abrupt('return', Promise.reject({
message: 'DatePickerAndroid is not supported on this platform.'
}));
case 1:
case 'end':
return _context.stop();
}
}
}, null, this);
}
};
module.exports = DatePickerAndroid;
}, 392, null, "DatePickerAndroid");
__d(/* ImagePickerIOS */function(global, require, module, exports) {
'use strict';
var RCTImagePicker = require(80 ).ImagePickerIOS; // 80 = NativeModules
var ImagePickerIOS = {
canRecordVideos: function canRecordVideos(callback) {
return RCTImagePicker.canRecordVideos(callback);
},
canUseCamera: function canUseCamera(callback) {
return RCTImagePicker.canUseCamera(callback);
},
openCameraDialog: function openCameraDialog(config, successCallback, cancelCallback) {
config = babelHelpers.extends({
videoMode: false
}, config);
return RCTImagePicker.openCameraDialog(config, successCallback, cancelCallback);
},
openSelectDialog: function openSelectDialog(config, successCallback, cancelCallback) {
config = babelHelpers.extends({
showImages: true,
showVideos: false
}, config);
return RCTImagePicker.openSelectDialog(config, successCallback, cancelCallback);
}
};
module.exports = ImagePickerIOS;
}, 393, null, "ImagePickerIOS");
__d(/* Linking */function(global, require, module, exports) {
'use strict';
var NativeEventEmitter = require(102 ); // 102 = NativeEventEmitter
var NativeModules = require(80 ); // 80 = NativeModules
var Platform = require(79 ); // 79 = Platform
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var LinkingManager = Platform.OS === 'android' ? NativeModules.IntentAndroid : NativeModules.LinkingManager;
var Linking = function (_NativeEventEmitter) {
babelHelpers.inherits(Linking, _NativeEventEmitter);
function Linking() {
babelHelpers.classCallCheck(this, Linking);
return babelHelpers.possibleConstructorReturn(this, (Linking.__proto__ || Object.getPrototypeOf(Linking)).call(this, LinkingManager));
}
babelHelpers.createClass(Linking, [{
key: 'addEventListener',
value: function addEventListener(type, handler) {
this.addListener(type, handler);
}
}, {
key: 'removeEventListener',
value: function removeEventListener(type, handler) {
this.removeListener(type, handler);
}
}, {
key: 'openURL',
value: function openURL(url) {
this._validateURL(url);
return LinkingManager.openURL(url);
}
}, {
key: 'canOpenURL',
value: function canOpenURL(url) {
this._validateURL(url);
return LinkingManager.canOpenURL(url);
}
}, {
key: 'getInitialURL',
value: function getInitialURL() {
return LinkingManager.getInitialURL();
}
}, {
key: '_validateURL',
value: function _validateURL(url) {
invariant(typeof url === 'string', 'Invalid URL: should be a string. Was: ' + url);
invariant(url, 'Invalid URL: cannot be empty');
}
}]);
return Linking;
}(NativeEventEmitter);
module.exports = new Linking();
}, 394, null, "Linking");
__d(/* NavigationExperimental */function(global, require, module, exports) {
'use strict';
var NavigationCard = require(396 ); // 396 = NavigationCard
var NavigationCardStack = require(405 ); // 405 = NavigationCardStack
var NavigationHeader = require(408 ); // 408 = NavigationHeader
var NavigationPropTypes = require(404 ); // 404 = NavigationPropTypes
var NavigationStateUtils = require(415 ); // 415 = NavigationStateUtils
var NavigationTransitioner = require(406 ); // 406 = NavigationTransitioner
var NavigationExperimental = {
StateUtils: NavigationStateUtils,
Transitioner: NavigationTransitioner,
Card: NavigationCard,
CardStack: NavigationCardStack,
Header: NavigationHeader,
PropTypes: NavigationPropTypes
};
module.exports = NavigationExperimental;
}, 395, null, "NavigationExperimental");
__d(/* NavigationCard */function(global, require, module, exports) {
'use strict';
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/node_modules/react-native/Libraries/CustomComponents/NavigationExperimental/NavigationCard.js';
var Animated = require(219 ); // 219 = Animated
var NavigationCardStackPanResponder = require(397 ); // 397 = NavigationCardStackPanResponder
var NavigationCardStackStyleInterpolator = require(399 ); // 399 = NavigationCardStackStyleInterpolator
var NavigationPagerPanResponder = require(400 ); // 400 = NavigationPagerPanResponder
var NavigationPagerStyleInterpolator = require(401 ); // 401 = NavigationPagerStyleInterpolator
var NavigationPointerEventsContainer = require(402 ); // 402 = NavigationPointerEventsContainer
var NavigationPropTypes = require(404 ); // 404 = NavigationPropTypes
var React = require(126 ); // 126 = React
var StyleSheet = require(127 ); // 127 = StyleSheet
var PropTypes = React.PropTypes;
var NavigationCard = function (_React$Component) {
babelHelpers.inherits(NavigationCard, _React$Component);
function NavigationCard() {
babelHelpers.classCallCheck(this, NavigationCard);
return babelHelpers.possibleConstructorReturn(this, (NavigationCard.__proto__ || Object.getPrototypeOf(NavigationCard)).apply(this, arguments));
}
babelHelpers.createClass(NavigationCard, [{
key: 'render',
value: function render() {
var _props = this.props,
panHandlers = _props.panHandlers,
pointerEvents = _props.pointerEvents,
renderScene = _props.renderScene,
style = _props.style,
props = babelHelpers.objectWithoutProperties(_props, ['panHandlers', 'pointerEvents', 'renderScene', 'style']);
var viewStyle = style === undefined ? NavigationCardStackStyleInterpolator.forHorizontal(props) : style;
var viewPanHandlers = panHandlers === undefined ? NavigationCardStackPanResponder.forHorizontal(babelHelpers.extends({}, props, {
onNavigateBack: this.props.onNavigateBack
})) : panHandlers;
return React.createElement(
Animated.View,
babelHelpers.extends({}, viewPanHandlers, {
pointerEvents: pointerEvents,
ref: this.props.onComponentRef,
style: [styles.main, viewStyle], __source: {
fileName: _jsxFileName,
lineNumber: 99
}
}),
renderScene(props)
);
}
}]);
return NavigationCard;
}(React.Component);
NavigationCard.propTypes = babelHelpers.extends({}, NavigationPropTypes.SceneRendererProps, {
onComponentRef: PropTypes.func.isRequired,
onNavigateBack: PropTypes.func,
panHandlers: NavigationPropTypes.panHandlers,
pointerEvents: PropTypes.string.isRequired,
renderScene: PropTypes.func.isRequired,
style: PropTypes.any
});
var styles = StyleSheet.create({
main: {
backgroundColor: '#E9E9EF',
bottom: 0,
left: 0,
position: 'absolute',
right: 0,
shadowColor: 'black',
shadowOffset: { width: 0, height: 0 },
shadowOpacity: 0.4,
shadowRadius: 10,
top: 0
}
});
NavigationCard = NavigationPointerEventsContainer.create(NavigationCard);
NavigationCard.CardStackPanResponder = NavigationCardStackPanResponder;
NavigationCard.CardStackStyleInterpolator = NavigationCardStackStyleInterpolator;
NavigationCard.PagerPanResponder = NavigationPagerPanResponder;
NavigationCard.PagerStyleInterpolator = NavigationPagerStyleInterpolator;
module.exports = NavigationCard;
}, 396, null, "NavigationCard");
__d(/* NavigationCardStackPanResponder */function(global, require, module, exports) {
'use strict';
var Animated = require(219 ); // 219 = Animated
var I18nManager = require(331 ); // 331 = I18nManager
var NavigationAbstractPanResponder = require(398 ); // 398 = NavigationAbstractPanResponder
var clamp = require(348 ); // 348 = clamp
var emptyFunction = function emptyFunction() {};
var ANIMATION_DURATION = 250;
var POSITION_THRESHOLD = 1 / 3;
var RESPOND_THRESHOLD = 15;
var DISTANCE_THRESHOLD = 100;
var Directions = {
'HORIZONTAL': 'horizontal',
'VERTICAL': 'vertical'
};
var NavigationCardStackPanResponder = function (_NavigationAbstractPa) {
babelHelpers.inherits(NavigationCardStackPanResponder, _NavigationAbstractPa);
function NavigationCardStackPanResponder(direction, props) {
babelHelpers.classCallCheck(this, NavigationCardStackPanResponder);
var _this = babelHelpers.possibleConstructorReturn(this, (NavigationCardStackPanResponder.__proto__ || Object.getPrototypeOf(NavigationCardStackPanResponder)).call(this));
_this._isResponding = false;
_this._isVertical = direction === Directions.VERTICAL;
_this._props = props;
_this._startValue = 0;
_this._addNativeListener(_this._props.layout.width);
_this._addNativeListener(_this._props.layout.height);
_this._addNativeListener(_this._props.position);
return _this;
}
babelHelpers.createClass(NavigationCardStackPanResponder, [{
key: 'onMoveShouldSetPanResponder',
value: function onMoveShouldSetPanResponder(event, gesture) {
var props = this._props;
if (props.navigationState.index !== props.scene.index) {
return false;
}
var layout = props.layout;
var isVertical = this._isVertical;
var index = props.navigationState.index;
var currentDragDistance = gesture[isVertical ? 'dy' : 'dx'];
var currentDragPosition = gesture[isVertical ? 'moveY' : 'moveX'];
var maxDragDistance = isVertical ? layout.height.__getValue() : layout.width.__getValue();
var positionMax = isVertical ? props.gestureResponseDistance : props.gestureResponseDistance || 30;
if (positionMax != null && currentDragPosition > positionMax) {
return false;
}
return Math.abs(currentDragDistance) > RESPOND_THRESHOLD && maxDragDistance > 0 && index > 0;
}
}, {
key: 'onPanResponderGrant',
value: function onPanResponderGrant() {
var _this2 = this;
this._isResponding = false;
this._props.position.stopAnimation(function (value) {
_this2._isResponding = true;
_this2._startValue = value;
});
}
}, {
key: 'onPanResponderMove',
value: function onPanResponderMove(event, gesture) {
if (!this._isResponding) {
return;
}
var props = this._props;
var layout = props.layout;
var isVertical = this._isVertical;
var axis = isVertical ? 'dy' : 'dx';
var index = props.navigationState.index;
var distance = isVertical ? layout.height.__getValue() : layout.width.__getValue();
var currentValue = I18nManager.isRTL && axis === 'dx' ? this._startValue + gesture[axis] / distance : this._startValue - gesture[axis] / distance;
var value = clamp(index - 1, currentValue, index);
props.position.setValue(value);
}
}, {
key: 'onPanResponderRelease',
value: function onPanResponderRelease(event, gesture) {
var _this3 = this;
if (!this._isResponding) {
return;
}
this._isResponding = false;
var props = this._props;
var isVertical = this._isVertical;
var axis = isVertical ? 'dy' : 'dx';
var index = props.navigationState.index;
var distance = I18nManager.isRTL && axis === 'dx' ? -gesture[axis] : gesture[axis];
props.position.stopAnimation(function (value) {
_this3._reset();
if (!props.onNavigateBack) {
return;
}
if (distance > DISTANCE_THRESHOLD || value <= index - POSITION_THRESHOLD) {
props.onNavigateBack();
}
});
}
}, {
key: 'onPanResponderTerminate',
value: function onPanResponderTerminate() {
this._isResponding = false;
this._reset();
}
}, {
key: '_reset',
value: function _reset() {
var props = this._props;
Animated.timing(props.position, {
toValue: props.navigationState.index,
duration: ANIMATION_DURATION,
useNativeDriver: props.position.__isNative
}).start();
}
}, {
key: '_addNativeListener',
value: function _addNativeListener(animatedValue) {
if (!animatedValue.__isNative) {
return;
}
if (Object.keys(animatedValue._listeners).length === 0) {
animatedValue.addListener(emptyFunction);
}
}
}]);
return NavigationCardStackPanResponder;
}(NavigationAbstractPanResponder);
function createPanHandlers(direction, props) {
var responder = new NavigationCardStackPanResponder(direction, props);
return responder.panHandlers;
}
function forHorizontal(props) {
return createPanHandlers(Directions.HORIZONTAL, props);
}
function forVertical(props) {
return createPanHandlers(Directions.VERTICAL, props);
}
module.exports = {
ANIMATION_DURATION: ANIMATION_DURATION,
DISTANCE_THRESHOLD: DISTANCE_THRESHOLD,
POSITION_THRESHOLD: POSITION_THRESHOLD,
RESPOND_THRESHOLD: RESPOND_THRESHOLD,
Directions: Directions,
forHorizontal: forHorizontal,
forVertical: forVertical
};
}, 397, null, "NavigationCardStackPanResponder");
__d(/* NavigationAbstractPanResponder */function(global, require, module, exports) {
'use strict';
var PanResponder = require(346 ); // 346 = PanResponder
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var EmptyPanHandlers = {
onMoveShouldSetPanResponder: null,
onPanResponderGrant: null,
onPanResponderMove: null,
onPanResponderRelease: null,
onPanResponderTerminate: null
};
var NavigationAbstractPanResponder = function NavigationAbstractPanResponder() {
var _this = this;
babelHelpers.classCallCheck(this, NavigationAbstractPanResponder);
var config = {};
Object.keys(EmptyPanHandlers).forEach(function (name) {
var fn = _this[name];
invariant(typeof fn === 'function', 'subclass of `NavigationAbstractPanResponder` must implement method %s', name);
config[name] = fn.bind(_this);
}, this);
this.panHandlers = PanResponder.create(config).panHandlers;
};
module.exports = NavigationAbstractPanResponder;
}, 398, null, "NavigationAbstractPanResponder");
__d(/* NavigationCardStackStyleInterpolator */function(global, require, module, exports) {
'use strict';
var I18nManager = require(331 ); // 331 = I18nManager
function forInitial(props) {
var navigationState = props.navigationState,
scene = props.scene;
var focused = navigationState.index === scene.index;
var opacity = focused ? 1 : 0;
var translate = focused ? 0 : 1000000;
return {
opacity: opacity,
transform: [{ translateX: translate }, { translateY: translate }]
};
}
function forHorizontal(props) {
var layout = props.layout,
position = props.position,
scene = props.scene;
if (!layout.isMeasured) {
return forInitial(props);
}
var index = scene.index;
var inputRange = [index - 1, index, index + 0.99, index + 1];
var width = layout.initWidth;
var outputRange = I18nManager.isRTL ? [-width, 0, 10, 10] : [width, 0, -10, -10];
var opacity = position.interpolate({
inputRange: inputRange,
outputRange: [1, 1, 0.3, 0]
});
var scale = position.interpolate({
inputRange: inputRange,
outputRange: [1, 1, 0.95, 0.95]
});
var translateY = 0;
var translateX = position.interpolate({
inputRange: inputRange,
outputRange: outputRange
});
return {
opacity: opacity,
transform: [{ scale: scale }, { translateX: translateX }, { translateY: translateY }]
};
}
function forVertical(props) {
var layout = props.layout,
position = props.position,
scene = props.scene;
if (!layout.isMeasured) {
return forInitial(props);
}
var index = scene.index;
var inputRange = [index - 1, index, index + 0.99, index + 1];
var height = layout.initHeight;
var opacity = position.interpolate({
inputRange: inputRange,
outputRange: [1, 1, 0.3, 0]
});
var scale = position.interpolate({
inputRange: inputRange,
outputRange: [1, 1, 0.95, 0.95]
});
var translateX = 0;
var translateY = position.interpolate({
inputRange: inputRange,
outputRange: [height, 0, -10, -10]
});
return {
opacity: opacity,
transform: [{ scale: scale }, { translateX: translateX }, { translateY: translateY }]
};
}
function canUseNativeDriver(isVertical) {
return true;
}
module.exports = {
forHorizontal: forHorizontal,
forVertical: forVertical,
canUseNativeDriver: canUseNativeDriver
};
}, 399, null, "NavigationCardStackStyleInterpolator");
__d(/* NavigationPagerPanResponder */function(global, require, module, exports) {
'use strict';
var Animated = require(219 ); // 219 = Animated
var NavigationAbstractPanResponder = require(398 ); // 398 = NavigationAbstractPanResponder
var NavigationCardStackPanResponder = require(397 ); // 397 = NavigationCardStackPanResponder
var I18nManager = require(331 ); // 331 = I18nManager
var clamp = require(348 ); // 348 = clamp
var ANIMATION_DURATION = NavigationCardStackPanResponder.ANIMATION_DURATION,
POSITION_THRESHOLD = NavigationCardStackPanResponder.POSITION_THRESHOLD,
RESPOND_THRESHOLD = NavigationCardStackPanResponder.RESPOND_THRESHOLD,
Directions = NavigationCardStackPanResponder.Directions;
var DISTANCE_THRESHOLD = 50;
var VELOCITY_THRESHOLD = 1.5;
var NavigationPagerPanResponder = function (_NavigationAbstractPa) {
babelHelpers.inherits(NavigationPagerPanResponder, _NavigationAbstractPa);
function NavigationPagerPanResponder(direction, props) {
babelHelpers.classCallCheck(this, NavigationPagerPanResponder);
var _this = babelHelpers.possibleConstructorReturn(this, (NavigationPagerPanResponder.__proto__ || Object.getPrototypeOf(NavigationPagerPanResponder)).call(this));
_this._isResponding = false;
_this._isVertical = direction === Directions.VERTICAL;
_this._props = props;
_this._startValue = 0;
return _this;
}
babelHelpers.createClass(NavigationPagerPanResponder, [{
key: 'onMoveShouldSetPanResponder',
value: function onMoveShouldSetPanResponder(event, gesture) {
var props = this._props;
if (props.navigationState.index !== props.scene.index) {
return false;
}
var layout = props.layout;
var isVertical = this._isVertical;
var axis = isVertical ? 'dy' : 'dx';
var index = props.navigationState.index;
var distance = isVertical ? layout.height.__getValue() : layout.width.__getValue();
return Math.abs(gesture[axis]) > RESPOND_THRESHOLD && distance > 0 && index >= 0;
}
}, {
key: 'onPanResponderGrant',
value: function onPanResponderGrant() {
var _this2 = this;
this._isResponding = false;
this._props.position.stopAnimation(function (value) {
_this2._isResponding = true;
_this2._startValue = value;
});
}
}, {
key: 'onPanResponderMove',
value: function onPanResponderMove(event, gesture) {
if (!this._isResponding) {
return;
}
var _props = this._props,
layout = _props.layout,
navigationState = _props.navigationState,
position = _props.position,
scenes = _props.scenes;
var isVertical = this._isVertical;
var axis = isVertical ? 'dy' : 'dx';
var index = navigationState.index;
var distance = isVertical ? layout.height.__getValue() : layout.width.__getValue();
var currentValue = I18nManager.isRTL && axis === 'dx' ? this._startValue + gesture[axis] / distance : this._startValue - gesture[axis] / distance;
var prevIndex = Math.max(0, index - 1);
var nextIndex = Math.min(index + 1, scenes.length - 1);
var value = clamp(prevIndex, currentValue, nextIndex);
position.setValue(value);
}
}, {
key: 'onPanResponderRelease',
value: function onPanResponderRelease(event, gesture) {
var _this3 = this;
if (!this._isResponding) {
return;
}
this._isResponding = false;
var _props2 = this._props,
navigationState = _props2.navigationState,
onNavigateBack = _props2.onNavigateBack,
onNavigateForward = _props2.onNavigateForward,
position = _props2.position;
var isVertical = this._isVertical;
var axis = isVertical ? 'dy' : 'dx';
var velocityAxis = isVertical ? 'vy' : 'vx';
var index = navigationState.index;
var distance = I18nManager.isRTL && axis === 'dx' ? -gesture[axis] : gesture[axis];
var moveSpeed = I18nManager.isRTL && velocityAxis === 'vx' ? -gesture[velocityAxis] : gesture[velocityAxis];
position.stopAnimation(function (value) {
_this3._reset();
if (distance > DISTANCE_THRESHOLD || value <= index - POSITION_THRESHOLD || moveSpeed > VELOCITY_THRESHOLD) {
onNavigateBack && onNavigateBack();
return;
}
if (distance < -DISTANCE_THRESHOLD || value >= index + POSITION_THRESHOLD || moveSpeed < -VELOCITY_THRESHOLD) {
onNavigateForward && onNavigateForward();
}
});
}
}, {
key: 'onPanResponderTerminate',
value: function onPanResponderTerminate() {
this._isResponding = false;
this._reset();
}
}, {
key: '_reset',
value: function _reset() {
var props = this._props;
Animated.timing(props.position, {
toValue: props.navigationState.index,
duration: ANIMATION_DURATION
}).start();
}
}]);
return NavigationPagerPanResponder;
}(NavigationAbstractPanResponder);
function createPanHandlers(direction, props) {
var responder = new NavigationPagerPanResponder(direction, props);
return responder.panHandlers;
}
function forHorizontal(props) {
return createPanHandlers(Directions.HORIZONTAL, props);
}
module.exports = {
forHorizontal: forHorizontal
};
}, 400, null, "NavigationPagerPanResponder");
__d(/* NavigationPagerStyleInterpolator */function(global, require, module, exports) {
'use strict';
var I18nManager = require(331 ); // 331 = I18nManager
function forInitial(props) {
var navigationState = props.navigationState,
scene = props.scene;
var focused = navigationState.index === scene.index;
var opacity = focused ? 1 : 0;
var dir = scene.index > navigationState.index ? 1 : -1;
var translate = focused ? 0 : 1000000 * dir;
return {
opacity: opacity,
transform: [{ translateX: translate }, { translateY: translate }]
};
}
function forHorizontal(props) {
var layout = props.layout,
position = props.position,
scene = props.scene;
if (!layout.isMeasured) {
return forInitial(props);
}
var index = scene.index;
var inputRange = [index - 1, index, index + 1];
var width = layout.initWidth;
var outputRange = I18nManager.isRTL ? [-width, 0, width] : [width, 0, -width];
var translateX = position.interpolate({
inputRange: inputRange,
outputRange: outputRange
});
return {
opacity: 1,
shadowColor: 'transparent',
shadowRadius: 0,
transform: [{ scale: 1 }, { translateX: translateX }, { translateY: 0 }]
};
}
module.exports = {
forHorizontal: forHorizontal
};
}, 401, null, "NavigationPagerStyleInterpolator");
__d(/* NavigationPointerEventsContainer */function(global, require, module, exports) {
'use strict';
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/node_modules/react-native/Libraries/CustomComponents/NavigationExperimental/NavigationPointerEventsContainer.js';
var React = require(126 ); // 126 = React
var NavigationAnimatedValueSubscription = require(403 ); // 403 = NavigationAnimatedValueSubscription
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var MIN_POSITION_OFFSET = 0.01;
function create(Component) {
var Container = function (_React$Component) {
babelHelpers.inherits(Container, _React$Component);
function Container(props, context) {
babelHelpers.classCallCheck(this, Container);
var _this = babelHelpers.possibleConstructorReturn(this, (Container.__proto__ || Object.getPrototypeOf(Container)).call(this, props, context));
_this._pointerEvents = _this._computePointerEvents();
return _this;
}
babelHelpers.createClass(Container, [{
key: 'componentWillMount',
value: function componentWillMount() {
this._onPositionChange = this._onPositionChange.bind(this);
this._onComponentRef = this._onComponentRef.bind(this);
}
}, {
key: 'componentDidMount',
value: function componentDidMount() {
this._bindPosition(this.props);
}
}, {
key: 'componentWillUnmount',
value: function componentWillUnmount() {
this._positionListener && this._positionListener.remove();
}
}, {
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(nextProps) {
this._bindPosition(nextProps);
}
}, {
key: 'render',
value: function render() {
this._pointerEvents = this._computePointerEvents();
return React.createElement(Component, babelHelpers.extends({}, this.props, {
pointerEvents: this._pointerEvents,
onComponentRef: this._onComponentRef,
__source: {
fileName: _jsxFileName,
lineNumber: 92
}
}));
}
}, {
key: '_onComponentRef',
value: function _onComponentRef(component) {
this._component = component;
if (component) {
invariant(typeof component.setNativeProps === 'function', 'component must implement method `setNativeProps`');
}
}
}, {
key: '_bindPosition',
value: function _bindPosition(props) {
this._positionListener && this._positionListener.remove();
this._positionListener = new NavigationAnimatedValueSubscription(props.position, this._onPositionChange);
}
}, {
key: '_onPositionChange',
value: function _onPositionChange() {
if (this._component) {
var pointerEvents = this._computePointerEvents();
if (this._pointerEvents !== pointerEvents) {
this._pointerEvents = pointerEvents;
this._component.setNativeProps({ pointerEvents: pointerEvents });
}
}
}
}, {
key: '_computePointerEvents',
value: function _computePointerEvents() {
var _props = this.props,
navigationState = _props.navigationState,
position = _props.position,
scene = _props.scene;
if (scene.isStale || navigationState.index !== scene.index) {
return scene.index > navigationState.index ? 'box-only' : 'none';
}
var offset = position.__getAnimatedValue() - navigationState.index;
if (Math.abs(offset) > MIN_POSITION_OFFSET) {
return 'box-only';
}
return 'auto';
}
}]);
return Container;
}(React.Component);
return Container;
}
module.exports = {
create: create
};
}, 402, null, "NavigationPointerEventsContainer");
__d(/* NavigationAnimatedValueSubscription */function(global, require, module, exports) {
'use strict';
var NavigationAnimatedValueSubscription = function () {
function NavigationAnimatedValueSubscription(value, callback) {
babelHelpers.classCallCheck(this, NavigationAnimatedValueSubscription);
this._value = value;
this._token = value.addListener(callback);
}
babelHelpers.createClass(NavigationAnimatedValueSubscription, [{
key: 'remove',
value: function remove() {
this._value.removeListener(this._token);
}
}]);
return NavigationAnimatedValueSubscription;
}();
module.exports = NavigationAnimatedValueSubscription;
}, 403, null, "NavigationAnimatedValueSubscription");
__d(/* NavigationPropTypes */function(global, require, module, exports) {
'use strict';
var Animated = require(219 ); // 219 = Animated
var React = require(126 ); // 126 = React
var PropTypes = React.PropTypes;
var action = PropTypes.shape({
type: PropTypes.string.isRequired
});
var animatedValue = PropTypes.instanceOf(Animated.Value);
var navigationRoute = PropTypes.shape({
key: PropTypes.string.isRequired
});
var navigationState = PropTypes.shape({
index: PropTypes.number.isRequired,
routes: PropTypes.arrayOf(navigationRoute)
});
var layout = PropTypes.shape({
height: animatedValue,
initHeight: PropTypes.number.isRequired,
initWidth: PropTypes.number.isRequired,
isMeasured: PropTypes.bool.isRequired,
width: animatedValue
});
var scene = PropTypes.shape({
index: PropTypes.number.isRequired,
isActive: PropTypes.bool.isRequired,
isStale: PropTypes.bool.isRequired,
key: PropTypes.string.isRequired,
route: navigationRoute.isRequired
});
var SceneRendererProps = {
layout: layout.isRequired,
navigationState: navigationState.isRequired,
position: animatedValue.isRequired,
progress: animatedValue.isRequired,
scene: scene.isRequired,
scenes: PropTypes.arrayOf(scene).isRequired
};
var SceneRenderer = PropTypes.shape(SceneRendererProps);
var panHandlers = PropTypes.shape({
onMoveShouldSetResponder: PropTypes.func.isRequired,
onMoveShouldSetResponderCapture: PropTypes.func.isRequired,
onResponderEnd: PropTypes.func.isRequired,
onResponderGrant: PropTypes.func.isRequired,
onResponderMove: PropTypes.func.isRequired,
onResponderReject: PropTypes.func.isRequired,
onResponderRelease: PropTypes.func.isRequired,
onResponderStart: PropTypes.func.isRequired,
onResponderTerminate: PropTypes.func.isRequired,
onResponderTerminationRequest: PropTypes.func.isRequired,
onStartShouldSetResponder: PropTypes.func.isRequired,
onStartShouldSetResponderCapture: PropTypes.func.isRequired
});
function extractSceneRendererProps(props) {
return {
layout: props.layout,
navigationState: props.navigationState,
position: props.position,
progress: props.progress,
scene: props.scene,
scenes: props.scenes
};
}
module.exports = {
extractSceneRendererProps: extractSceneRendererProps,
SceneRendererProps: SceneRendererProps,
SceneRenderer: SceneRenderer,
action: action,
navigationState: navigationState,
navigationRoute: navigationRoute,
panHandlers: panHandlers
};
}, 404, null, "NavigationPropTypes");
__d(/* NavigationCardStack */function(global, require, module, exports) {
'use strict';
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/node_modules/react-native/Libraries/CustomComponents/NavigationExperimental/NavigationCardStack.js';
var NativeAnimatedModule = require(80 ).NativeAnimatedModule; // 80 = NativeModules
var NavigationCard = require(396 ); // 396 = NavigationCard
var NavigationCardStackPanResponder = require(397 ); // 397 = NavigationCardStackPanResponder
var NavigationCardStackStyleInterpolator = require(399 ); // 399 = NavigationCardStackStyleInterpolator
var NavigationPropTypes = require(404 ); // 404 = NavigationPropTypes
var NavigationTransitioner = require(406 ); // 406 = NavigationTransitioner
var React = require(126 ); // 126 = React
var StyleSheet = require(127 ); // 127 = StyleSheet
var View = require(146 ); // 146 = View
var PropTypes = React.PropTypes;
var Directions = NavigationCardStackPanResponder.Directions;
var NavigationCardStack = function (_React$Component) {
babelHelpers.inherits(NavigationCardStack, _React$Component);
function NavigationCardStack(props, context) {
babelHelpers.classCallCheck(this, NavigationCardStack);
var _this = babelHelpers.possibleConstructorReturn(this, (NavigationCardStack.__proto__ || Object.getPrototypeOf(NavigationCardStack)).call(this, props, context));
_this._configureTransition = function () {
var isVertical = _this.props.direction === 'vertical';
var animationConfig = {};
if (!!NativeAnimatedModule && !_this.props.enableGestures && NavigationCardStackStyleInterpolator.canUseNativeDriver(isVertical)) {
animationConfig.useNativeDriver = true;
}
return animationConfig;
};
return _this;
}
babelHelpers.createClass(NavigationCardStack, [{
key: 'componentWillMount',
value: function componentWillMount() {
this._render = this._render.bind(this);
this._renderScene = this._renderScene.bind(this);
}
}, {
key: 'render',
value: function render() {
return React.createElement(NavigationTransitioner, {
configureTransition: this._configureTransition,
navigationState: this.props.navigationState,
render: this._render,
style: this.props.style,
__source: {
fileName: _jsxFileName,
lineNumber: 229
}
});
}
}, {
key: '_render',
value: function _render(props) {
var _this2 = this;
var renderHeader = this.props.renderHeader;
var header = renderHeader ? React.createElement(
View,
{
__source: {
fileName: _jsxFileName,
lineNumber: 261
}
},
renderHeader(props)
) : null;
var scenes = props.scenes.map(function (scene) {
return _this2._renderScene(babelHelpers.extends({}, props, {
scene: scene
}));
});
return React.createElement(
View,
{ style: styles.container, __source: {
fileName: _jsxFileName,
lineNumber: 271
}
},
React.createElement(
View,
{
style: [styles.scenes, this.props.scenesStyle], __source: {
fileName: _jsxFileName,
lineNumber: 272
}
},
scenes
),
header
);
}
}, {
key: '_renderScene',
value: function _renderScene(props) {
var isVertical = this.props.direction === 'vertical';
var interpolator = this.props.cardStyleInterpolator || (isVertical ? NavigationCardStackStyleInterpolator.forVertical : NavigationCardStackStyleInterpolator.forHorizontal);
var style = interpolator(props);
var panHandlers = null;
if (this.props.enableGestures) {
var panHandlersProps = babelHelpers.extends({}, props, {
onNavigateBack: this.props.onNavigateBack,
gestureResponseDistance: this.props.gestureResponseDistance
});
panHandlers = isVertical ? NavigationCardStackPanResponder.forVertical(panHandlersProps) : NavigationCardStackPanResponder.forHorizontal(panHandlersProps);
}
return React.createElement(NavigationCard, babelHelpers.extends({}, props, {
key: 'card_' + props.scene.key,
panHandlers: panHandlers,
renderScene: this.props.renderScene,
style: [style, this.props.cardStyle],
__source: {
fileName: _jsxFileName,
lineNumber: 304
}
}));
}
}]);
return NavigationCardStack;
}(React.Component);
NavigationCardStack.propTypes = {
cardStyle: PropTypes.any,
direction: PropTypes.oneOf([Directions.HORIZONTAL, Directions.VERTICAL]),
gestureResponseDistance: PropTypes.number,
cardStyleInterpolator: PropTypes.func,
enableGestures: PropTypes.bool,
navigationState: NavigationPropTypes.navigationState.isRequired,
onNavigateBack: PropTypes.func,
renderHeader: PropTypes.func,
renderScene: PropTypes.func.isRequired,
style: View.propTypes.style,
scenesStyle: View.propTypes.style
};
NavigationCardStack.defaultProps = {
direction: Directions.HORIZONTAL,
enableGestures: true
};
var styles = StyleSheet.create({
container: {
flex: 1,
flexDirection: 'column-reverse'
},
scenes: {
flex: 1
}
});
module.exports = NavigationCardStack;
}, 405, null, "NavigationCardStack");
__d(/* NavigationTransitioner */function(global, require, module, exports) {
'use strict';
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/node_modules/react-native/Libraries/NavigationExperimental/NavigationTransitioner.js';
var Animated = require(219 ); // 219 = Animated
var Easing = require(235 ); // 235 = Easing
var NavigationPropTypes = require(404 ); // 404 = NavigationPropTypes
var NavigationScenesReducer = require(407 ); // 407 = NavigationScenesReducer
var React = require(126 ); // 126 = React
var StyleSheet = require(127 ); // 127 = StyleSheet
var View = require(146 ); // 146 = View
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var PropTypes = React.PropTypes;
var DefaultTransitionSpec = {
duration: 250,
easing: Easing.inOut(Easing.ease),
timing: Animated.timing
};
var NavigationTransitioner = function (_React$Component) {
babelHelpers.inherits(NavigationTransitioner, _React$Component);
function NavigationTransitioner(props, context) {
babelHelpers.classCallCheck(this, NavigationTransitioner);
var _this = babelHelpers.possibleConstructorReturn(this, (NavigationTransitioner.__proto__ || Object.getPrototypeOf(NavigationTransitioner)).call(this, props, context));
var layout = {
height: new Animated.Value(0),
initHeight: 0,
initWidth: 0,
isMeasured: false,
width: new Animated.Value(0)
};
_this.state = {
layout: layout,
position: new Animated.Value(_this.props.navigationState.index),
progress: new Animated.Value(1),
scenes: NavigationScenesReducer([], _this.props.navigationState)
};
_this._prevTransitionProps = null;
_this._transitionProps = buildTransitionProps(props, _this.state);
_this._isMounted = false;
return _this;
}
babelHelpers.createClass(NavigationTransitioner, [{
key: 'componentWillMount',
value: function componentWillMount() {
this._onLayout = this._onLayout.bind(this);
this._onTransitionEnd = this._onTransitionEnd.bind(this);
}
}, {
key: 'componentDidMount',
value: function componentDidMount() {
this._isMounted = true;
}
}, {
key: 'componentWillUnmount',
value: function componentWillUnmount() {
this._isMounted = false;
}
}, {
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(nextProps) {
var _this2 = this;
var nextScenes = NavigationScenesReducer(this.state.scenes, nextProps.navigationState, this.props.navigationState);
if (nextScenes === this.state.scenes) {
return;
}
var nextState = babelHelpers.extends({}, this.state, {
scenes: nextScenes
});
var position = nextState.position,
progress = nextState.progress;
progress.setValue(0);
this._prevTransitionProps = this._transitionProps;
this._transitionProps = buildTransitionProps(nextProps, nextState);
var transitionUserSpec = nextProps.configureTransition ? nextProps.configureTransition(this._transitionProps, this._prevTransitionProps) : null;
var transitionSpec = babelHelpers.extends({}, DefaultTransitionSpec, transitionUserSpec);
var timing = transitionSpec.timing;
delete transitionSpec.timing;
var animations = [timing(progress, babelHelpers.extends({}, transitionSpec, {
toValue: 1
}))];
if (nextProps.navigationState.index !== this.props.navigationState.index) {
animations.push(timing(position, babelHelpers.extends({}, transitionSpec, {
toValue: nextProps.navigationState.index
})));
}
this.setState(nextState, function () {
nextProps.onTransitionStart && nextProps.onTransitionStart(_this2._transitionProps, _this2._prevTransitionProps);
Animated.parallel(animations).start(_this2._onTransitionEnd);
});
}
}, {
key: 'render',
value: function render() {
return React.createElement(
View,
{
onLayout: this._onLayout,
style: [styles.main, this.props.style], __source: {
fileName: _jsxFileName,
lineNumber: 192
}
},
this.props.render(this._transitionProps, this._prevTransitionProps)
);
}
}, {
key: '_onLayout',
value: function _onLayout(event) {
var _event$nativeEvent$la = event.nativeEvent.layout,
height = _event$nativeEvent$la.height,
width = _event$nativeEvent$la.width;
if (this.state.layout.initWidth === width && this.state.layout.initHeight === height) {
return;
}
var layout = babelHelpers.extends({}, this.state.layout, {
initHeight: height,
initWidth: width,
isMeasured: true
});
layout.height.setValue(height);
layout.width.setValue(width);
var nextState = babelHelpers.extends({}, this.state, {
layout: layout
});
this._transitionProps = buildTransitionProps(this.props, nextState);
this.setState(nextState);
}
}, {
key: '_onTransitionEnd',
value: function _onTransitionEnd() {
var _this3 = this;
if (!this._isMounted) {
return;
}
var prevTransitionProps = this._prevTransitionProps;
this._prevTransitionProps = null;
var nextState = babelHelpers.extends({}, this.state, {
scenes: this.state.scenes.filter(isSceneNotStale)
});
this._transitionProps = buildTransitionProps(this.props, nextState);
this.setState(nextState, function () {
_this3.props.onTransitionEnd && _this3.props.onTransitionEnd(_this3._transitionProps, prevTransitionProps);
});
}
}]);
return NavigationTransitioner;
}(React.Component);
NavigationTransitioner.propTypes = {
configureTransition: PropTypes.func,
navigationState: NavigationPropTypes.navigationState.isRequired,
onTransitionEnd: PropTypes.func,
onTransitionStart: PropTypes.func,
render: PropTypes.func.isRequired
};
function buildTransitionProps(props, state) {
var navigationState = props.navigationState;
var layout = state.layout,
position = state.position,
progress = state.progress,
scenes = state.scenes;
var scene = scenes.find(isSceneActive);
invariant(scene, 'No active scene when building navigation transition props.');
return {
layout: layout,
navigationState: navigationState,
position: position,
progress: progress,
scenes: scenes,
scene: scene
};
}
function isSceneNotStale(scene) {
return !scene.isStale;
}
function isSceneActive(scene) {
return scene.isActive;
}
var styles = StyleSheet.create({
main: {
flex: 1
}
});
module.exports = NavigationTransitioner;
}, 406, null, "NavigationTransitioner");
__d(/* NavigationScenesReducer */function(global, require, module, exports) {
'use strict';
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var shallowEqual = require(187 ); // 187 = fbjs/lib/shallowEqual
var SCENE_KEY_PREFIX = 'scene_';
function compareKey(one, two) {
var delta = one.length - two.length;
if (delta > 0) {
return 1;
}
if (delta < 0) {
return -1;
}
return one > two ? 1 : -1;
}
function compareScenes(one, two) {
if (one.index > two.index) {
return 1;
}
if (one.index < two.index) {
return -1;
}
return compareKey(one.key, two.key);
}
function areScenesShallowEqual(one, two) {
return one.key === two.key && one.index === two.index && one.isStale === two.isStale && one.isActive === two.isActive && areRoutesShallowEqual(one.route, two.route);
}
function areRoutesShallowEqual(one, two) {
if (!one || !two) {
return one === two;
}
if (one.key !== two.key) {
return false;
}
return shallowEqual(one, two);
}
function NavigationScenesReducer(scenes, nextState, prevState) {
if (prevState === nextState) {
return scenes;
}
var prevScenes = new Map();
var freshScenes = new Map();
var staleScenes = new Map();
scenes.forEach(function (scene) {
var key = scene.key;
if (scene.isStale) {
staleScenes.set(key, scene);
}
prevScenes.set(key, scene);
});
var nextKeys = new Set();
nextState.routes.forEach(function (route, index) {
var key = SCENE_KEY_PREFIX + route.key;
var scene = {
index: index,
isActive: false,
isStale: false,
key: key,
route: route
};
invariant(!nextKeys.has(key), 'navigationState.routes[' + index + '].key "' + key + '" conflicts with ' + 'another route!');
nextKeys.add(key);
if (staleScenes.has(key)) {
staleScenes.delete(key);
}
freshScenes.set(key, scene);
});
if (prevState) {
prevState.routes.forEach(function (route, index) {
var key = SCENE_KEY_PREFIX + route.key;
if (freshScenes.has(key)) {
return;
}
staleScenes.set(key, {
index: index,
isActive: false,
isStale: true,
key: key,
route: route
});
});
}
var nextScenes = [];
var mergeScene = function mergeScene(nextScene) {
var key = nextScene.key;
var prevScene = prevScenes.has(key) ? prevScenes.get(key) : null;
if (prevScene && areScenesShallowEqual(prevScene, nextScene)) {
nextScenes.push(prevScene);
} else {
nextScenes.push(nextScene);
}
};
staleScenes.forEach(mergeScene);
freshScenes.forEach(mergeScene);
nextScenes.sort(compareScenes);
var activeScenesCount = 0;
nextScenes.forEach(function (scene, ii) {
var isActive = !scene.isStale && scene.index === nextState.index;
if (isActive !== scene.isActive) {
nextScenes[ii] = babelHelpers.extends({}, scene, {
isActive: isActive
});
}
if (isActive) {
activeScenesCount++;
}
});
invariant(activeScenesCount === 1, 'there should always be only one scene active, not %s.', activeScenesCount);
if (nextScenes.length !== scenes.length) {
return nextScenes;
}
if (nextScenes.some(function (scene, index) {
return !areScenesShallowEqual(scenes[index], scene);
})) {
return nextScenes;
}
return scenes;
}
module.exports = NavigationScenesReducer;
}, 407, null, "NavigationScenesReducer");
__d(/* NavigationHeader */function(global, require, module, exports) {
'use strict';
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/node_modules/react-native/Libraries/CustomComponents/NavigationExperimental/NavigationHeader.js';
var NavigationHeaderBackButton = require(409 ); // 409 = NavigationHeaderBackButton
var NavigationHeaderStyleInterpolator = require(411 ); // 411 = NavigationHeaderStyleInterpolator
var NavigationHeaderTitle = require(412 ); // 412 = NavigationHeaderTitle
var NavigationPropTypes = require(404 ); // 404 = NavigationPropTypes
var React = require(126 ); // 126 = React
var ReactComponentWithPureRenderMixin = require(413 ); // 413 = react/lib/ReactComponentWithPureRenderMixin
var ReactNative = require(69 ); // 69 = react-native
var TVEventHandler = require(214 ); // 214 = TVEventHandler
var Animated = ReactNative.Animated,
Platform = ReactNative.Platform,
StyleSheet = ReactNative.StyleSheet,
View = ReactNative.View;
var APPBAR_HEIGHT = Platform.OS === 'ios' ? 44 : 56;
var STATUSBAR_HEIGHT = Platform.OS === 'ios' ? 20 : 0;
var PropTypes = React.PropTypes;
var NavigationHeader = function (_React$Component) {
babelHelpers.inherits(NavigationHeader, _React$Component);
function NavigationHeader() {
var _ref;
var _temp, _this, _ret;
babelHelpers.classCallCheck(this, NavigationHeader);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = babelHelpers.possibleConstructorReturn(this, (_ref = NavigationHeader.__proto__ || Object.getPrototypeOf(NavigationHeader)).call.apply(_ref, [this].concat(args))), _this), _this._renderLeft = function (props) {
return _this._renderSubView(props, 'left', _this.props.renderLeftComponent, NavigationHeaderStyleInterpolator.forLeft);
}, _this._renderTitle = function (props) {
return _this._renderSubView(props, 'title', _this.props.renderTitleComponent, NavigationHeaderStyleInterpolator.forCenter);
}, _this._renderRight = function (props) {
return _this._renderSubView(props, 'right', _this.props.renderRightComponent, NavigationHeaderStyleInterpolator.forRight);
}, _temp), babelHelpers.possibleConstructorReturn(_this, _ret);
}
babelHelpers.createClass(NavigationHeader, [{
key: 'shouldComponentUpdate',
value: function shouldComponentUpdate(nextProps, nextState) {
return ReactComponentWithPureRenderMixin.shouldComponentUpdate.call(this, nextProps, nextState);
}
}, {
key: 'componentDidMount',
value: function componentDidMount() {
this._tvEventHandler = new TVEventHandler();
this._tvEventHandler.enable(this, function (cmp, evt) {
if (evt && evt.eventType === 'menu') {
cmp.props.onNavigateBack && cmp.props.onNavigateBack();
}
});
}
}, {
key: 'componentWillUnmount',
value: function componentWillUnmount() {
if (this._tvEventHandler) {
this._tvEventHandler.disable();
delete this._tvEventHandler;
}
}
}, {
key: 'render',
value: function render() {
var _this2 = this;
var _props = this.props,
scenes = _props.scenes,
style = _props.style,
viewProps = _props.viewProps;
var scenesProps = scenes.map(function (scene) {
var props = NavigationPropTypes.extractSceneRendererProps(_this2.props);
props.scene = scene;
return props;
});
var barHeight = this.props.statusBarHeight instanceof Animated.Value ? Animated.add(this.props.statusBarHeight, new Animated.Value(APPBAR_HEIGHT)) : APPBAR_HEIGHT + this.props.statusBarHeight;
return React.createElement(
Animated.View,
babelHelpers.extends({ style: [styles.appbar, { height: barHeight }, style]
}, viewProps, {
__source: {
fileName: _jsxFileName,
lineNumber: 164
}
}),
scenesProps.map(this._renderLeft, this),
scenesProps.map(this._renderTitle, this),
scenesProps.map(this._renderRight, this)
);
}
}, {
key: '_renderSubView',
value: function _renderSubView(props, name, renderer, styleInterpolator) {
var scene = props.scene,
navigationState = props.navigationState;
var index = scene.index,
isStale = scene.isStale,
key = scene.key;
var offset = navigationState.index - index;
if (Math.abs(offset) > 2) {
return null;
}
var subViewProps = babelHelpers.extends({}, props, { onNavigateBack: this.props.onNavigateBack });
var subView = renderer(subViewProps);
if (subView === null) {
return null;
}
var pointerEvents = offset !== 0 || isStale ? 'none' : 'box-none';
return React.createElement(
Animated.View,
{
pointerEvents: pointerEvents,
key: name + '_' + key,
style: [styles[name], { marginTop: this.props.statusBarHeight }, styleInterpolator(props)], __source: {
fileName: _jsxFileName,
lineNumber: 238
}
},
subView
);
}
}]);
return NavigationHeader;
}(React.Component);
NavigationHeader.defaultProps = {
renderTitleComponent: function renderTitleComponent(props) {
var title = String(props.scene.route.title || '');
return React.createElement(
NavigationHeaderTitle,
{
__source: {
fileName: _jsxFileName,
lineNumber: 92
}
},
title
);
},
renderLeftComponent: function renderLeftComponent(props) {
if (props.scene.index === 0 || !props.onNavigateBack) {
return null;
}
return React.createElement(NavigationHeaderBackButton, {
onPress: props.onNavigateBack,
__source: {
fileName: _jsxFileName,
lineNumber: 100
}
});
},
renderRightComponent: function renderRightComponent(props) {
return null;
},
statusBarHeight: STATUSBAR_HEIGHT
};
NavigationHeader.propTypes = babelHelpers.extends({}, NavigationPropTypes.SceneRendererProps, {
onNavigateBack: PropTypes.func,
renderLeftComponent: PropTypes.func,
renderRightComponent: PropTypes.func,
renderTitleComponent: PropTypes.func,
style: View.propTypes.style,
statusBarHeight: PropTypes.number,
viewProps: PropTypes.shape(View.propTypes)
});
NavigationHeader.HEIGHT = APPBAR_HEIGHT + STATUSBAR_HEIGHT;
NavigationHeader.Title = NavigationHeaderTitle;
NavigationHeader.BackButton = NavigationHeaderBackButton;
var styles = StyleSheet.create({
appbar: {
alignItems: 'center',
backgroundColor: Platform.OS === 'ios' ? '#EFEFF2' : '#FFF',
borderBottomColor: 'rgba(0, 0, 0, .15)',
borderBottomWidth: Platform.OS === 'ios' ? StyleSheet.hairlineWidth : 0,
elevation: 4,
flexDirection: 'row',
justifyContent: 'flex-start'
},
title: {
bottom: 0,
left: APPBAR_HEIGHT,
position: 'absolute',
right: APPBAR_HEIGHT,
top: 0
},
left: {
bottom: 0,
left: 0,
position: 'absolute',
top: 0
},
right: {
bottom: 0,
position: 'absolute',
right: 0,
top: 0
}
});
module.exports = NavigationHeader;
}, 408, null, "NavigationHeader");
__d(/* NavigationHeaderBackButton */function(global, require, module, exports) {
'use strict';
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/node_modules/react-native/Libraries/CustomComponents/NavigationExperimental/NavigationHeaderBackButton.js';
var React = require(34 ); // 34 = react
var ReactNative = require(69 ); // 69 = react-native
var I18nManager = ReactNative.I18nManager,
Image = ReactNative.Image,
Platform = ReactNative.Platform,
StyleSheet = ReactNative.StyleSheet,
TouchableOpacity = ReactNative.TouchableOpacity;
var NavigationHeaderBackButton = function NavigationHeaderBackButton(props) {
return React.createElement(
TouchableOpacity,
{ style: [styles.buttonContainer, props.style], onPress: props.onPress, __source: {
fileName: _jsxFileName,
lineNumber: 44
}
},
React.createElement(Image, { style: [styles.button, props.imageStyle], source: require(410 ), __source: { // 410 = ./assets/back-icon.png
fileName: _jsxFileName,
lineNumber: 45
}
})
);
};
NavigationHeaderBackButton.propTypes = {
onPress: React.PropTypes.func.isRequired
};
var styles = StyleSheet.create({
buttonContainer: {
flex: 1,
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'center'
},
button: {
height: 24,
width: 24,
margin: Platform.OS === 'ios' ? 10 : 16,
resizeMode: 'contain',
transform: [{ scaleX: I18nManager.isRTL ? -1 : 1 }]
}
});
module.exports = NavigationHeaderBackButton;
}, 409, null, "NavigationHeaderBackButton");
__d(/* react-native/Libraries/CustomComponents/NavigationExperimental/assets/back-icon.png */function(global, require, module, exports) {module.exports = require(199 ).registerAsset({"__packager_asset":true,"httpServerLocation":"/assets/node_modules/react-native/Libraries/CustomComponents/NavigationExperimental/assets","width":24,"height":24,"scales":[1,1.5,2,3,4],"hash":"40cb2e3978cf9a18d3566dab9deded67","name":"back-icon","type":"png"}); // 199 = react-native/Libraries/Image/AssetRegistry
}, 410, null, "react-native/Libraries/CustomComponents/NavigationExperimental/assets/back-icon.png");
__d(/* NavigationHeaderStyleInterpolator */function(global, require, module, exports) {
'use strict';
var I18nManager = require(331 ); // 331 = I18nManager
function forLeft(props) {
var position = props.position,
scene = props.scene;
var index = scene.index;
return {
opacity: position.interpolate({
inputRange: [index - 1, index, index + 1],
outputRange: [0, 1, 0]
})
};
}
function forCenter(props) {
var position = props.position,
scene = props.scene;
var index = scene.index;
return {
opacity: position.interpolate({
inputRange: [index - 1, index, index + 1],
outputRange: [0, 1, 0]
}),
transform: [{
translateX: position.interpolate({
inputRange: [index - 1, index + 1],
outputRange: I18nManager.isRTL ? [-200, 200] : [200, -200]
})
}]
};
}
function forRight(props) {
var position = props.position,
scene = props.scene;
var index = scene.index;
return {
opacity: position.interpolate({
inputRange: [index - 1, index, index + 1],
outputRange: [0, 1, 0]
})
};
}
module.exports = {
forCenter: forCenter,
forLeft: forLeft,
forRight: forRight
};
}, 411, null, "NavigationHeaderStyleInterpolator");
__d(/* NavigationHeaderTitle */function(global, require, module, exports) {
'use strict';
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/node_modules/react-native/Libraries/CustomComponents/NavigationExperimental/NavigationHeaderTitle.js';
var React = require(34 ); // 34 = react
var ReactNative = require(69 ); // 69 = react-native
var Platform = ReactNative.Platform,
StyleSheet = ReactNative.StyleSheet,
View = ReactNative.View,
Text = ReactNative.Text;
var NavigationHeaderTitle = function NavigationHeaderTitle(_ref) {
var children = _ref.children,
style = _ref.style,
textStyle = _ref.textStyle,
viewProps = _ref.viewProps;
return React.createElement(
View,
babelHelpers.extends({ style: [styles.title, style] }, viewProps, {
__source: {
fileName: _jsxFileName,
lineNumber: 53
}
}),
React.createElement(
Text,
{ style: [styles.titleText, textStyle], __source: {
fileName: _jsxFileName,
lineNumber: 54
}
},
children
)
);
};
var styles = StyleSheet.create({
title: {
flex: 1,
flexDirection: 'row',
alignItems: 'center',
marginHorizontal: 16
},
titleText: {
flex: 1,
fontSize: 18,
fontWeight: '500',
color: 'rgba(0, 0, 0, .9)',
textAlign: Platform.OS === 'ios' ? 'center' : 'left'
}
});
NavigationHeaderTitle.propTypes = {
children: React.PropTypes.node.isRequired,
style: View.propTypes.style,
textStyle: Text.propTypes.style
};
module.exports = NavigationHeaderTitle;
}, 412, null, "NavigationHeaderTitle");
__d(/* react/lib/ReactComponentWithPureRenderMixin.js */function(global, require, module, exports) {
'use strict';
var shallowCompare = require(414 ); // 414 = ./shallowCompare
var ReactComponentWithPureRenderMixin = {
shouldComponentUpdate: function shouldComponentUpdate(nextProps, nextState) {
return shallowCompare(this, nextProps, nextState);
}
};
module.exports = ReactComponentWithPureRenderMixin;
}, 413, null, "react/lib/ReactComponentWithPureRenderMixin.js");
__d(/* react/lib/shallowCompare.js */function(global, require, module, exports) {
'use strict';
var shallowEqual = require(187 ); // 187 = fbjs/lib/shallowEqual
function shallowCompare(instance, nextProps, nextState) {
return !shallowEqual(instance.props, nextProps) || !shallowEqual(instance.state, nextState);
}
module.exports = shallowCompare;
}, 414, null, "react/lib/shallowCompare.js");
__d(/* NavigationStateUtils */function(global, require, module, exports) {
'use strict';
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var NavigationStateUtils = {
get: function get(state, key) {
return state.routes.find(function (route) {
return route.key === key;
}) || null;
},
indexOf: function indexOf(state, key) {
return state.routes.map(function (route) {
return route.key;
}).indexOf(key);
},
has: function has(state, key) {
return !!state.routes.some(function (route) {
return route.key === key;
});
},
push: function push(state, route) {
invariant(NavigationStateUtils.indexOf(state, route.key) === -1, 'should not push route with duplicated key %s', route.key);
var routes = state.routes.slice();
routes.push(route);
return babelHelpers.extends({}, state, {
index: routes.length - 1,
routes: routes
});
},
pop: function pop(state) {
if (state.index <= 0) {
return state;
}
var routes = state.routes.slice(0, -1);
return babelHelpers.extends({}, state, {
index: routes.length - 1,
routes: routes
});
},
jumpToIndex: function jumpToIndex(state, index) {
if (index === state.index) {
return state;
}
invariant(!!state.routes[index], 'invalid index %s to jump to', index);
return babelHelpers.extends({}, state, {
index: index
});
},
jumpTo: function jumpTo(state, key) {
var index = NavigationStateUtils.indexOf(state, key);
return NavigationStateUtils.jumpToIndex(state, index);
},
back: function back(state) {
var index = state.index - 1;
var route = state.routes[index];
return route ? NavigationStateUtils.jumpToIndex(state, index) : state;
},
forward: function forward(state) {
var index = state.index + 1;
var route = state.routes[index];
return route ? NavigationStateUtils.jumpToIndex(state, index) : state;
},
replaceAt: function replaceAt(state, key, route) {
var index = NavigationStateUtils.indexOf(state, key);
return NavigationStateUtils.replaceAtIndex(state, index, route);
},
replaceAtIndex: function replaceAtIndex(state, index, route) {
invariant(!!state.routes[index], 'invalid index %s for replacing route %s', index, route.key);
if (state.routes[index] === route) {
return state;
}
var routes = state.routes.slice();
routes[index] = route;
return babelHelpers.extends({}, state, {
index: index,
routes: routes
});
},
reset: function reset(state, routes, index) {
invariant(routes.length && Array.isArray(routes), 'invalid routes to replace');
var nextIndex = index === undefined ? routes.length - 1 : index;
if (state.routes.length === routes.length && state.index === nextIndex) {
var compare = function compare(route, ii) {
return routes[ii] === route;
};
if (state.routes.every(compare)) {
return state;
}
}
invariant(!!routes[nextIndex], 'invalid index %s to reset', nextIndex);
return babelHelpers.extends({}, state, {
index: nextIndex,
routes: routes
});
}
};
module.exports = NavigationStateUtils;
}, 415, null, "NavigationStateUtils");
__d(/* NetInfo */function(global, require, module, exports) {
'use strict';
var Map = require(223 ); // 223 = Map
var NativeEventEmitter = require(102 ); // 102 = NativeEventEmitter
var NativeModules = require(80 ); // 80 = NativeModules
var Platform = require(79 ); // 79 = Platform
var RCTNetInfo = NativeModules.NetInfo;
var NetInfoEventEmitter = new NativeEventEmitter(RCTNetInfo);
var DEVICE_CONNECTIVITY_EVENT = 'networkStatusDidChange';
var _subscriptions = new Map();
var _isConnected = void 0;
if (Platform.OS === 'ios') {
_isConnected = function _isConnected(reachability) {
return reachability !== 'none' && reachability !== 'unknown';
};
} else if (Platform.OS === 'android') {
_isConnected = function _isConnected(connectionType) {
return connectionType !== 'NONE' && connectionType !== 'UNKNOWN';
};
}
var _isConnectedSubscriptions = new Map();
var NetInfo = {
addEventListener: function addEventListener(eventName, handler) {
var listener = NetInfoEventEmitter.addListener(DEVICE_CONNECTIVITY_EVENT, function (appStateData) {
handler(appStateData.network_info);
});
_subscriptions.set(handler, listener);
return {
remove: function remove() {
return NetInfo.removeEventListener(eventName, handler);
}
};
},
removeEventListener: function removeEventListener(eventName, handler) {
var listener = _subscriptions.get(handler);
if (!listener) {
return;
}
listener.remove();
_subscriptions.delete(handler);
},
fetch: function fetch() {
return RCTNetInfo.getCurrentConnectivity().then(function (resp) {
return resp.network_info;
});
},
isConnected: {
addEventListener: function addEventListener(eventName, handler) {
var listener = function listener(connection) {
handler(_isConnected(connection));
};
_isConnectedSubscriptions.set(handler, listener);
NetInfo.addEventListener(eventName, listener);
return {
remove: function remove() {
return NetInfo.isConnected.removeEventListener(eventName, handler);
}
};
},
removeEventListener: function removeEventListener(eventName, handler) {
var listener = _isConnectedSubscriptions.get(handler);
NetInfo.removeEventListener(eventName, listener);
_isConnectedSubscriptions.delete(handler);
},
fetch: function fetch() {
return NetInfo.fetch().then(function (connection) {
return _isConnected(connection);
});
}
},
isConnectionExpensive: function isConnectionExpensive() {
return Platform.OS === 'android' ? RCTNetInfo.isConnectionMetered() : Promise.reject(new Error('Currently not supported on iOS'));
}
};
module.exports = NetInfo;
}, 416, null, "NetInfo");
__d(/* PermissionsAndroid */function(global, require, module, exports) {
'use strict';
var DialogManagerAndroid = require(80 ).DialogManagerAndroid; // 80 = NativeModules
var Permissions = require(80 ).PermissionsAndroid; // 80 = NativeModules
var PermissionsAndroid = function () {
function PermissionsAndroid() {
babelHelpers.classCallCheck(this, PermissionsAndroid);
this.PERMISSIONS = {
READ_CALENDAR: 'android.permission.READ_CALENDAR',
WRITE_CALENDAR: 'android.permission.WRITE_CALENDAR',
CAMERA: 'android.permission.CAMERA',
READ_CONTACTS: 'android.permission.READ_CONTACTS',
WRITE_CONTACTS: 'android.permission.WRITE_CONTACTS',
GET_ACCOUNTS: 'android.permission.GET_ACCOUNTS',
ACCESS_FINE_LOCATION: 'android.permission.ACCESS_FINE_LOCATION',
ACCESS_COARSE_LOCATION: 'android.permission.ACCESS_COARSE_LOCATION',
RECORD_AUDIO: 'android.permission.RECORD_AUDIO',
READ_PHONE_STATE: 'android.permission.READ_PHONE_STATE',
CALL_PHONE: 'android.permission.CALL_PHONE',
READ_CALL_LOG: 'android.permission.READ_CALL_LOG',
WRITE_CALL_LOG: 'android.permission.WRITE_CALL_LOG',
ADD_VOICEMAIL: 'com.android.voicemail.permission.ADD_VOICEMAIL',
USE_SIP: 'android.permission.USE_SIP',
PROCESS_OUTGOING_CALLS: 'android.permission.PROCESS_OUTGOING_CALLS',
BODY_SENSORS: 'android.permission.BODY_SENSORS',
SEND_SMS: 'android.permission.SEND_SMS',
RECEIVE_SMS: 'android.permission.RECEIVE_SMS',
READ_SMS: 'android.permission.READ_SMS',
RECEIVE_WAP_PUSH: 'android.permission.RECEIVE_WAP_PUSH',
RECEIVE_MMS: 'android.permission.RECEIVE_MMS',
READ_EXTERNAL_STORAGE: 'android.permission.READ_EXTERNAL_STORAGE',
WRITE_EXTERNAL_STORAGE: 'android.permission.WRITE_EXTERNAL_STORAGE'
};
this.RESULTS = {
GRANTED: 'granted',
DENIED: 'denied',
NEVER_ASK_AGAIN: 'never_ask_again'
};
}
babelHelpers.createClass(PermissionsAndroid, [{
key: 'checkPermission',
value: function checkPermission(permission) {
console.warn('"PermissionsAndroid.checkPermission" is deprecated. Use "PermissionsAndroid.check" instead');
return Permissions.checkPermission(permission);
}
}, {
key: 'check',
value: function check(permission) {
return Permissions.checkPermission(permission);
}
}, {
key: 'requestPermission',
value: function requestPermission(permission, rationale) {
var response;
return regeneratorRuntime.async(function requestPermission$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
console.warn('"PermissionsAndroid.requestPermission" is deprecated. Use "PermissionsAndroid.request" instead');
_context.next = 3;
return regeneratorRuntime.awrap(this.request(permission, rationale));
case 3:
response = _context.sent;
return _context.abrupt('return', response === this.RESULTS.GRANTED);
case 5:
case 'end':
return _context.stop();
}
}
}, null, this);
}
}, {
key: 'request',
value: function request(permission, rationale) {
var shouldShowRationale;
return regeneratorRuntime.async(function request$(_context2) {
while (1) {
switch (_context2.prev = _context2.next) {
case 0:
if (!rationale) {
_context2.next = 6;
break;
}
_context2.next = 3;
return regeneratorRuntime.awrap(Permissions.shouldShowRequestPermissionRationale(permission));
case 3:
shouldShowRationale = _context2.sent;
if (!shouldShowRationale) {
_context2.next = 6;
break;
}
return _context2.abrupt('return', new Promise(function (resolve, reject) {
DialogManagerAndroid.showAlert(rationale, function () {
return reject(new Error('Error showing rationale'));
}, function () {
return resolve(Permissions.requestPermission(permission));
});
}));
case 6:
return _context2.abrupt('return', Permissions.requestPermission(permission));
case 7:
case 'end':
return _context2.stop();
}
}
}, null, this);
}
}, {
key: 'requestMultiple',
value: function requestMultiple(permissions) {
return Permissions.requestMultiplePermissions(permissions);
}
}]);
return PermissionsAndroid;
}();
PermissionsAndroid = new PermissionsAndroid();
module.exports = PermissionsAndroid;
}, 417, null, "PermissionsAndroid");
__d(/* PushNotificationIOS */function(global, require, module, exports) {
'use strict';
var NativeEventEmitter = require(102 ); // 102 = NativeEventEmitter
var RCTPushNotificationManager = require(80 ).PushNotificationManager; // 80 = NativeModules
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var PushNotificationEmitter = new NativeEventEmitter(RCTPushNotificationManager);
var _notifHandlers = new Map();
var DEVICE_NOTIF_EVENT = 'remoteNotificationReceived';
var NOTIF_REGISTER_EVENT = 'remoteNotificationsRegistered';
var NOTIF_REGISTRATION_ERROR_EVENT = 'remoteNotificationRegistrationError';
var DEVICE_LOCAL_NOTIF_EVENT = 'localNotificationReceived';
var PushNotificationIOS = function () {
babelHelpers.createClass(PushNotificationIOS, null, [{
key: 'presentLocalNotification',
value: function presentLocalNotification(details) {
RCTPushNotificationManager.presentLocalNotification(details);
}
}, {
key: 'scheduleLocalNotification',
value: function scheduleLocalNotification(details) {
RCTPushNotificationManager.scheduleLocalNotification(details);
}
}, {
key: 'cancelAllLocalNotifications',
value: function cancelAllLocalNotifications() {
RCTPushNotificationManager.cancelAllLocalNotifications();
}
}, {
key: 'setApplicationIconBadgeNumber',
value: function setApplicationIconBadgeNumber(number) {
RCTPushNotificationManager.setApplicationIconBadgeNumber(number);
}
}, {
key: 'getApplicationIconBadgeNumber',
value: function getApplicationIconBadgeNumber(callback) {
RCTPushNotificationManager.getApplicationIconBadgeNumber(callback);
}
}, {
key: 'cancelLocalNotifications',
value: function cancelLocalNotifications(userInfo) {
RCTPushNotificationManager.cancelLocalNotifications(userInfo);
}
}, {
key: 'getScheduledLocalNotifications',
value: function getScheduledLocalNotifications(callback) {
RCTPushNotificationManager.getScheduledLocalNotifications(callback);
}
}, {
key: 'addEventListener',
value: function addEventListener(type, handler) {
invariant(type === 'notification' || type === 'register' || type === 'registrationError' || type === 'localNotification', 'PushNotificationIOS only supports `notification`, `register`, `registrationError`, and `localNotification` events');
var listener;
if (type === 'notification') {
listener = PushNotificationEmitter.addListener(DEVICE_NOTIF_EVENT, function (notifData) {
handler(new PushNotificationIOS(notifData));
});
} else if (type === 'localNotification') {
listener = PushNotificationEmitter.addListener(DEVICE_LOCAL_NOTIF_EVENT, function (notifData) {
handler(new PushNotificationIOS(notifData));
});
} else if (type === 'register') {
listener = PushNotificationEmitter.addListener(NOTIF_REGISTER_EVENT, function (registrationInfo) {
handler(registrationInfo.deviceToken);
});
} else if (type === 'registrationError') {
listener = PushNotificationEmitter.addListener(NOTIF_REGISTRATION_ERROR_EVENT, function (errorInfo) {
handler(errorInfo);
});
}
_notifHandlers.set(type, listener);
}
}, {
key: 'removeEventListener',
value: function removeEventListener(type, handler) {
invariant(type === 'notification' || type === 'register' || type === 'registrationError' || type === 'localNotification', 'PushNotificationIOS only supports `notification`, `register`, `registrationError`, and `localNotification` events');
var listener = _notifHandlers.get(type);
if (!listener) {
return;
}
listener.remove();
_notifHandlers.delete(type);
}
}, {
key: 'requestPermissions',
value: function requestPermissions(permissions) {
var requestedPermissions = {};
if (permissions) {
requestedPermissions = {
alert: !!permissions.alert,
badge: !!permissions.badge,
sound: !!permissions.sound
};
} else {
requestedPermissions = {
alert: true,
badge: true,
sound: true
};
}
return RCTPushNotificationManager.requestPermissions(requestedPermissions);
}
}, {
key: 'abandonPermissions',
value: function abandonPermissions() {
RCTPushNotificationManager.abandonPermissions();
}
}, {
key: 'checkPermissions',
value: function checkPermissions(callback) {
invariant(typeof callback === 'function', 'Must provide a valid callback');
RCTPushNotificationManager.checkPermissions(callback);
}
}, {
key: 'getInitialNotification',
value: function getInitialNotification() {
return RCTPushNotificationManager.getInitialNotification().then(function (notification) {
return notification && new PushNotificationIOS(notification);
});
}
}]);
function PushNotificationIOS(nativeNotif) {
var _this = this;
babelHelpers.classCallCheck(this, PushNotificationIOS);
this._data = {};
this._remoteNotificationCompleteCalllbackCalled = false;
this._isRemote = nativeNotif.remote;
if (this._isRemote) {
this._notificationId = nativeNotif.notificationId;
}
if (nativeNotif.remote) {
Object.keys(nativeNotif).forEach(function (notifKey) {
var notifVal = nativeNotif[notifKey];
if (notifKey === 'aps') {
_this._alert = notifVal.alert;
_this._sound = notifVal.sound;
_this._badgeCount = notifVal.badge;
} else {
_this._data[notifKey] = notifVal;
}
});
} else {
this._badgeCount = nativeNotif.applicationIconBadgeNumber;
this._sound = nativeNotif.soundName;
this._alert = nativeNotif.alertBody;
this._data = nativeNotif.userInfo;
}
}
babelHelpers.createClass(PushNotificationIOS, [{
key: 'finish',
value: function finish(fetchResult) {
if (!this._isRemote || !this._notificationId || this._remoteNotificationCompleteCalllbackCalled) {
return;
}
this._remoteNotificationCompleteCalllbackCalled = true;
RCTPushNotificationManager.onFinishRemoteNotification(this._notificationId, fetchResult);
}
}, {
key: 'getMessage',
value: function getMessage() {
return this._alert;
}
}, {
key: 'getSound',
value: function getSound() {
return this._sound;
}
}, {
key: 'getAlert',
value: function getAlert() {
return this._alert;
}
}, {
key: 'getBadgeCount',
value: function getBadgeCount() {
return this._badgeCount;
}
}, {
key: 'getData',
value: function getData() {
return this._data;
}
}]);
return PushNotificationIOS;
}();
PushNotificationIOS.FetchResult = {
NewData: 'UIBackgroundFetchResultNewData',
NoData: 'UIBackgroundFetchResultNoData',
ResultFailed: 'UIBackgroundFetchResultFailed'
};
module.exports = PushNotificationIOS;
}, 418, null, "PushNotificationIOS");
__d(/* Settings */function(global, require, module, exports) {
'use strict';
var RCTDeviceEventEmitter = require(107 ); // 107 = RCTDeviceEventEmitter
var RCTSettingsManager = require(80 ).SettingsManager; // 80 = NativeModules
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var subscriptions = [];
var Settings = {
_settings: RCTSettingsManager && RCTSettingsManager.settings,
get: function get(key) {
return this._settings[key];
},
set: function set(settings) {
this._settings = babelHelpers.extends(this._settings, settings);
RCTSettingsManager.setValues(settings);
},
watchKeys: function watchKeys(keys, callback) {
if (typeof keys === 'string') {
keys = [keys];
}
invariant(Array.isArray(keys), 'keys should be a string or array of strings');
var sid = subscriptions.length;
subscriptions.push({ keys: keys, callback: callback });
return sid;
},
clearWatch: function clearWatch(watchId) {
if (watchId < subscriptions.length) {
subscriptions[watchId] = { keys: [], callback: null };
}
},
_sendObservations: function _sendObservations(body) {
var _this = this;
Object.keys(body).forEach(function (key) {
var newValue = body[key];
var didChange = _this._settings[key] !== newValue;
_this._settings[key] = newValue;
if (didChange) {
subscriptions.forEach(function (sub) {
if (sub.keys.indexOf(key) !== -1 && sub.callback) {
sub.callback();
}
});
}
});
}
};
RCTDeviceEventEmitter.addListener('settingsUpdated', Settings._sendObservations.bind(Settings));
module.exports = Settings;
}, 419, null, "Settings");
__d(/* Share */function(global, require, module, exports) {
'use strict';
var Platform = require(79 ); // 79 = Platform
var _require = require(80 ), // 80 = NativeModules
ActionSheetManager = _require.ActionSheetManager,
ShareModule = _require.ShareModule;
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var processColor = require(121 ); // 121 = processColor
var Share = function () {
function Share() {
babelHelpers.classCallCheck(this, Share);
}
babelHelpers.createClass(Share, null, [{
key: 'share',
value: function share(content) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
invariant(typeof content === 'object' && content !== null, 'Content to share must be a valid object');
invariant(typeof content.url === 'string' || typeof content.message === 'string', 'At least one of URL and message is required');
invariant(typeof options === 'object' && options !== null, 'Options must be a valid object');
if (Platform.OS === 'android') {
invariant(!content.title || typeof content.title === 'string', 'Invalid title: title should be a string.');
return ShareModule.share(content, options.dialogTitle);
} else if (Platform.OS === 'ios') {
return new Promise(function (resolve, reject) {
ActionSheetManager.showShareActionSheetWithOptions(babelHelpers.extends({}, content, options, { tintColor: processColor(options.tintColor) }), function (error) {
return reject(error);
}, function (success, activityType) {
if (success) {
resolve({
'action': 'sharedAction',
'activityType': activityType
});
} else {
resolve({
'action': 'dismissedAction'
});
}
});
});
} else {
return Promise.reject(new Error('Unsupported platform'));
}
}
}, {
key: 'sharedAction',
get: function get() {
return 'sharedAction';
}
}, {
key: 'dismissedAction',
get: function get() {
return 'dismissedAction';
}
}]);
return Share;
}();
module.exports = Share;
}, 420, null, "Share");
__d(/* TimePickerAndroid */function(global, require, module, exports) {
'use strict';
var TimePickerAndroid = {
open: function open(options) {
return regeneratorRuntime.async(function open$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
return _context.abrupt('return', Promise.reject({
message: 'TimePickerAndroid is not supported on this platform.'
}));
case 1:
case 'end':
return _context.stop();
}
}
}, null, this);
}
};
module.exports = TimePickerAndroid;
}, 421, null, "TimePickerAndroid");
__d(/* Vibration */function(global, require, module, exports) {
'use strict';
var RCTVibration = require(80 ).Vibration; // 80 = NativeModules
var Platform = require(79 ); // 79 = Platform
var _vibrating = false;
var _id = 0;
function vibrateByPattern(pattern) {
var repeat = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
if (_vibrating) {
return;
}
_vibrating = true;
if (pattern[0] === 0) {
RCTVibration.vibrate();
pattern = pattern.slice(1);
}
if (pattern.length === 0) {
_vibrating = false;
return;
}
setTimeout(function () {
return vibrateScheduler(++_id, pattern, repeat, 1);
}, pattern[0]);
}
function vibrateScheduler(id, pattern, repeat, nextIndex) {
if (!_vibrating || id !== _id) {
return;
}
RCTVibration.vibrate();
if (nextIndex >= pattern.length) {
if (repeat) {
nextIndex = 0;
} else {
_vibrating = false;
return;
}
}
setTimeout(function () {
return vibrateScheduler(id, pattern, repeat, nextIndex + 1);
}, pattern[nextIndex]);
}
var Vibration = {
vibrate: function vibrate() {
var pattern = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 400;
var repeat = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
if (Platform.OS === 'android') {
if (typeof pattern === 'number') {
RCTVibration.vibrate(pattern);
} else if (Array.isArray(pattern)) {
RCTVibration.vibrateByPattern(pattern, repeat ? 0 : -1);
} else {
throw new Error('Vibration pattern should be a number or array');
}
} else {
if (_vibrating) {
return;
}
if (typeof pattern === 'number') {
RCTVibration.vibrate();
} else if (Array.isArray(pattern)) {
vibrateByPattern(pattern, repeat);
} else {
throw new Error('Vibration pattern should be a number or array');
}
}
},
cancel: function cancel() {
if (Platform.OS === 'ios') {
_vibrating = false;
} else {
RCTVibration.cancel();
}
}
};
module.exports = Vibration;
}, 422, null, "Vibration");
__d(/* VibrationIOS */function(global, require, module, exports) {
'use strict';
var RCTVibration = require(80 ).Vibration; // 80 = NativeModules
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var VibrationIOS = {
vibrate: function vibrate() {
invariant(arguments[0] === undefined, 'Vibration patterns not supported.');
RCTVibration.vibrate();
}
};
module.exports = VibrationIOS;
}, 423, null, "VibrationIOS");
__d(/* react/lib/LinkedStateMixin.js */function(global, require, module, exports) {
'use strict';
var ReactLink = require(425 ); // 425 = ./ReactLink
var ReactStateSetters = require(426 ); // 426 = ./ReactStateSetters
var LinkedStateMixin = {
linkState: function linkState(key) {
return new ReactLink(this.state[key], ReactStateSetters.createStateKeySetter(this, key));
}
};
module.exports = LinkedStateMixin;
}, 424, null, "react/lib/LinkedStateMixin.js");
__d(/* react/lib/ReactLink.js */function(global, require, module, exports) {
'use strict';
function ReactLink(value, requestChange) {
this.value = value;
this.requestChange = requestChange;
}
module.exports = ReactLink;
}, 425, null, "react/lib/ReactLink.js");
__d(/* react/lib/ReactStateSetters.js */function(global, require, module, exports) {
'use strict';
var ReactStateSetters = {
createStateSetter: function createStateSetter(component, funcReturningState) {
return function (a, b, c, d, e, f) {
var partialState = funcReturningState.call(component, a, b, c, d, e, f);
if (partialState) {
component.setState(partialState);
}
};
},
createStateKeySetter: function createStateKeySetter(component, key) {
var cache = component.__keySetters || (component.__keySetters = {});
return cache[key] || (cache[key] = _createStateKeySetter(component, key));
}
};
function _createStateKeySetter(component, key) {
var partialState = {};
return function stateKeySetter(value) {
partialState[key] = value;
component.setState(partialState);
};
}
ReactStateSetters.Mixin = {
createStateSetter: function createStateSetter(funcReturningState) {
return ReactStateSetters.createStateSetter(this, funcReturningState);
},
createStateKeySetter: function createStateKeySetter(key) {
return ReactStateSetters.createStateKeySetter(this, key);
}
};
module.exports = ReactStateSetters;
}, 426, null, "react/lib/ReactStateSetters.js");
__d(/* react/lib/ReactFragment.js */function(global, require, module, exports) {
'use strict';
var _prodInvariant = require(38 ); // 38 = ./reactProdInvariant
var ReactChildren = require(46 ); // 46 = ./ReactChildren
var ReactElement = require(48 ); // 48 = ./ReactElement
var emptyFunction = require(41 ); // 41 = fbjs/lib/emptyFunction
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var warning = require(40 ); // 40 = fbjs/lib/warning
var numericPropertyRegex = /^\d+$/;
var warnedAboutNumeric = false;
var ReactFragment = {
create: function create(object) {
if (typeof object !== 'object' || !object || Array.isArray(object)) {
process.env.NODE_ENV !== 'production' ? warning(false, 'React.addons.createFragment only accepts a single object. Got: %s', object) : void 0;
return object;
}
if (ReactElement.isValidElement(object)) {
process.env.NODE_ENV !== 'production' ? warning(false, 'React.addons.createFragment does not accept a ReactElement ' + 'without a wrapper object.') : void 0;
return object;
}
!(object.nodeType !== 1) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'React.addons.createFragment(...): Encountered an invalid child; DOM elements are not valid children of React components.') : _prodInvariant('0') : void 0;
var result = [];
for (var key in object) {
if (process.env.NODE_ENV !== 'production') {
if (!warnedAboutNumeric && numericPropertyRegex.test(key)) {
process.env.NODE_ENV !== 'production' ? warning(false, 'React.addons.createFragment(...): Child objects should have ' + 'non-numeric keys so ordering is preserved.') : void 0;
warnedAboutNumeric = true;
}
}
ReactChildren.mapIntoWithKeyPrefixInternal(object[key], result, key, emptyFunction.thatReturnsArgument);
}
return result;
}
};
module.exports = ReactFragment;
}, 427, null, "react/lib/ReactFragment.js");
__d(/* react/lib/update.js */function(global, require, module, exports) {
'use strict';
var _prodInvariant = require(38 ), // 38 = ./reactProdInvariant
_assign = require(36 ); // 36 = object-assign
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var hasOwnProperty = {}.hasOwnProperty;
function shallowCopy(x) {
if (Array.isArray(x)) {
return x.concat();
} else if (x && typeof x === 'object') {
return _assign(new x.constructor(), x);
} else {
return x;
}
}
var COMMAND_PUSH = '$push';
var COMMAND_UNSHIFT = '$unshift';
var COMMAND_SPLICE = '$splice';
var COMMAND_SET = '$set';
var COMMAND_MERGE = '$merge';
var COMMAND_APPLY = '$apply';
var ALL_COMMANDS_LIST = [COMMAND_PUSH, COMMAND_UNSHIFT, COMMAND_SPLICE, COMMAND_SET, COMMAND_MERGE, COMMAND_APPLY];
var ALL_COMMANDS_SET = {};
ALL_COMMANDS_LIST.forEach(function (command) {
ALL_COMMANDS_SET[command] = true;
});
function invariantArrayCase(value, spec, command) {
!Array.isArray(value) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'update(): expected target of %s to be an array; got %s.', command, value) : _prodInvariant('1', command, value) : void 0;
var specValue = spec[command];
!Array.isArray(specValue) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'update(): expected spec of %s to be an array; got %s. Did you forget to wrap your parameter in an array?', command, specValue) : _prodInvariant('2', command, specValue) : void 0;
}
function update(value, spec) {
!(typeof spec === 'object') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'update(): You provided a key path to update() that did not contain one of %s. Did you forget to include {%s: ...}?', ALL_COMMANDS_LIST.join(', '), COMMAND_SET) : _prodInvariant('3', ALL_COMMANDS_LIST.join(', '), COMMAND_SET) : void 0;
if (hasOwnProperty.call(spec, COMMAND_SET)) {
!(Object.keys(spec).length === 1) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Cannot have more than one key in an object with %s', COMMAND_SET) : _prodInvariant('4', COMMAND_SET) : void 0;
return spec[COMMAND_SET];
}
var nextValue = shallowCopy(value);
if (hasOwnProperty.call(spec, COMMAND_MERGE)) {
var mergeObj = spec[COMMAND_MERGE];
!(mergeObj && typeof mergeObj === 'object') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'update(): %s expects a spec of type \'object\'; got %s', COMMAND_MERGE, mergeObj) : _prodInvariant('5', COMMAND_MERGE, mergeObj) : void 0;
!(nextValue && typeof nextValue === 'object') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'update(): %s expects a target of type \'object\'; got %s', COMMAND_MERGE, nextValue) : _prodInvariant('6', COMMAND_MERGE, nextValue) : void 0;
_assign(nextValue, spec[COMMAND_MERGE]);
}
if (hasOwnProperty.call(spec, COMMAND_PUSH)) {
invariantArrayCase(value, spec, COMMAND_PUSH);
spec[COMMAND_PUSH].forEach(function (item) {
nextValue.push(item);
});
}
if (hasOwnProperty.call(spec, COMMAND_UNSHIFT)) {
invariantArrayCase(value, spec, COMMAND_UNSHIFT);
spec[COMMAND_UNSHIFT].forEach(function (item) {
nextValue.unshift(item);
});
}
if (hasOwnProperty.call(spec, COMMAND_SPLICE)) {
!Array.isArray(value) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected %s target to be an array; got %s', COMMAND_SPLICE, value) : _prodInvariant('7', COMMAND_SPLICE, value) : void 0;
!Array.isArray(spec[COMMAND_SPLICE]) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'update(): expected spec of %s to be an array of arrays; got %s. Did you forget to wrap your parameters in an array?', COMMAND_SPLICE, spec[COMMAND_SPLICE]) : _prodInvariant('8', COMMAND_SPLICE, spec[COMMAND_SPLICE]) : void 0;
spec[COMMAND_SPLICE].forEach(function (args) {
!Array.isArray(args) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'update(): expected spec of %s to be an array of arrays; got %s. Did you forget to wrap your parameters in an array?', COMMAND_SPLICE, spec[COMMAND_SPLICE]) : _prodInvariant('8', COMMAND_SPLICE, spec[COMMAND_SPLICE]) : void 0;
nextValue.splice.apply(nextValue, args);
});
}
if (hasOwnProperty.call(spec, COMMAND_APPLY)) {
!(typeof spec[COMMAND_APPLY] === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'update(): expected spec of %s to be a function; got %s.', COMMAND_APPLY, spec[COMMAND_APPLY]) : _prodInvariant('9', COMMAND_APPLY, spec[COMMAND_APPLY]) : void 0;
nextValue = spec[COMMAND_APPLY](nextValue);
}
for (var k in spec) {
if (!(ALL_COMMANDS_SET.hasOwnProperty(k) && ALL_COMMANDS_SET[k])) {
nextValue[k] = update(value[k], spec[k]);
}
}
return nextValue;
}
module.exports = update;
}, 428, null, "react/lib/update.js");
__d(/* throwOnWrongReactAPI */function(global, require, module, exports) {
'use strict';
function throwOnWrongReactAPI(key) {
throw new Error('Seems you\'re trying to access \'ReactNative.' + key + '\' from the \'react-native\' package. Perhaps you meant to access \'React.' + key + '\' from the \'react\' package instead?\n\nFor example, instead of:\n\n import React, { Component, View } from \'react-native\';\n\nYou should now do:\n\n import React, { Component } from \'react\';\n import { View } from \'react-native\';\n\nCheck the release notes on how to upgrade your code - https://github.com/facebook/react-native/releases/tag/v0.25.1\n');
}
module.exports = throwOnWrongReactAPI;
}, 429, null, "throwOnWrongReactAPI");
__d(/* jitsi-meet/react/features/app/index.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _actions = require(431 ); // 431 = ./actions
Object.keys(_actions).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _actions[key];
}
});
});
var _actionTypes = require(675 ); // 675 = ./actionTypes
Object.keys(_actionTypes).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _actionTypes[key];
}
});
});
var _components = require(676 ); // 676 = ./components
Object.keys(_components).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _components[key];
}
});
});
var _functions = require(697 ); // 697 = ./functions
Object.keys(_functions).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _functions[key];
}
});
});
require(987 ); // 987 = ./middleware
require(988 ); // 988 = ./reducer
}, 430, null, "jitsi-meet/react/features/app/index.js");
__d(/* jitsi-meet/react/features/app/actions.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
exports.appNavigate = appNavigate;
exports.appWillMount = appWillMount;
exports.appWillUnmount = appWillUnmount;
var _conference = require(432 ); // 432 = ../base/conference
var _connection = require(615 ); // 615 = ../base/connection
var _config = require(496 ); // 496 = ../base/config
var _libJitsiMeet = require(434 ); // 434 = ../base/lib-jitsi-meet
var _util = require(529 ); // 529 = ../base/util
var _actionTypes = require(675 ); // 675 = ./actionTypes
function appNavigate(uri) {
return function (dispatch, getState) {
return _appNavigateToOptionalLocation(dispatch, getState, (0, _util.parseURIString)(uri));
};
}
function _appNavigateToMandatoryLocation(dispatch, getState, newLocation) {
var oldLocationURL = getState()['features/base/connection'].locationURL;
var oldHost = oldLocationURL ? oldLocationURL.host : undefined;
var newHost = newLocation.host;
if (oldHost === newHost) {
dispatchSetLocationURL().then(dispatchSetRoom);
} else {
_loadConfig(newLocation).then(function (config) {
return configLoaded(undefined, config);
}, function (err) {
return configLoaded(err, undefined);
}).then(dispatchSetRoom);
}
function configLoaded(err, config) {
if (err) {
return;
}
return dispatchSetLocationURL().then(function () {
return dispatch((0, _config.setConfig)(config));
});
}
function dispatchSetLocationURL() {
return dispatch((0, _connection.setLocationURL)(new URL(newLocation.toString())));
}
function dispatchSetRoom() {
return dispatch((0, _conference.setRoom)(newLocation.room));
}
}
function _appNavigateToOptionalLocation(dispatch, getState, location) {
if (!location || !location.host) {
var defaultLocation = (0, _util.parseURIString)(getState()['features/app'].app._getDefaultURL());
if (location) {
location.host = defaultLocation.host;
location.hostname = defaultLocation.hostname;
location.port = defaultLocation.port;
location.protocol = defaultLocation.protocol;
} else {
location = defaultLocation;
}
}
location.protocol || (location.protocol = 'https:');
_appNavigateToMandatoryLocation(dispatch, getState, location);
}
function appWillMount(app) {
return function (dispatch) {
dispatch({
type: _actionTypes.APP_WILL_MOUNT,
app: app
});
typeof APP === 'object' && APP.API.init();
};
}
function appWillUnmount(app) {
return {
type: _actionTypes.APP_WILL_UNMOUNT,
app: app
};
}
function _loadConfig(location) {
var protocol = location.protocol.toLowerCase();
protocol !== 'http:' && protocol !== 'https:' && (protocol = 'https:');
return (0, _libJitsiMeet.loadConfig)(protocol + '//' + location.host + (location.contextRoot || '/'));
}
}, 431, null, "jitsi-meet/react/features/app/actions.js");
__d(/* jitsi-meet/react/features/base/conference/index.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _actions = require(433 ); // 433 = ./actions
Object.keys(_actions).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _actions[key];
}
});
});
var _actionTypes = require(611 ); // 611 = ./actionTypes
Object.keys(_actionTypes).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _actionTypes[key];
}
});
});
var _constants = require(612 ); // 612 = ./constants
Object.keys(_constants).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _constants[key];
}
});
});
var _functions = require(613 ); // 613 = ./functions
Object.keys(_functions).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _functions[key];
}
});
});
require(614 ); // 614 = ./middleware
require(620 ); // 620 = ./reducer
}, 432, null, "jitsi-meet/react/features/base/conference/index.js");
__d(/* jitsi-meet/react/features/base/conference/actions.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
exports.conferenceFailed = conferenceFailed;
exports.conferenceJoined = conferenceJoined;
exports.conferenceLeft = conferenceLeft;
exports.conferenceWillLeave = conferenceWillLeave;
exports.createConference = createConference;
exports.lockStateChanged = lockStateChanged;
exports._setAudioOnlyVideoMuted = _setAudioOnlyVideoMuted;
exports.setLargeVideoHDStatus = setLargeVideoHDStatus;
exports.setLastN = setLastN;
exports.setPassword = setPassword;
exports.setRoom = setRoom;
exports.toggleAudioOnly = toggleAudioOnly;
var _libJitsiMeet = require(434 ); // 434 = ../lib-jitsi-meet
var _media = require(567 ); // 567 = ../media
var _participants = require(540 ); // 540 = ../participants
var _tracks = require(580 ); // 580 = ../tracks
var _actionTypes = require(611 ); // 611 = ./actionTypes
var _constants = require(612 ); // 612 = ./constants
var _functions = require(613 ); // 613 = ./functions
function _addConferenceListeners(conference, dispatch) {
conference.on(_libJitsiMeet.JitsiConferenceEvents.CONFERENCE_FAILED, function () {
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return dispatch(conferenceFailed.apply(undefined, [conference].concat(args)));
});
conference.on(_libJitsiMeet.JitsiConferenceEvents.CONFERENCE_JOINED, function () {
for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
args[_key2] = arguments[_key2];
}
return dispatch(conferenceJoined.apply(undefined, [conference].concat(args)));
});
conference.on(_libJitsiMeet.JitsiConferenceEvents.CONFERENCE_LEFT, function () {
for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
args[_key3] = arguments[_key3];
}
return dispatch(conferenceLeft.apply(undefined, [conference].concat(args)));
});
conference.on(_libJitsiMeet.JitsiConferenceEvents.LOCK_STATE_CHANGED, function () {
for (var _len4 = arguments.length, args = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
args[_key4] = arguments[_key4];
}
return dispatch(lockStateChanged.apply(undefined, [conference].concat(args)));
});
conference.on(_libJitsiMeet.JitsiConferenceEvents.TRACK_ADDED, function (t) {
return t && !t.isLocal() && dispatch((0, _tracks.trackAdded)(t));
});
conference.on(_libJitsiMeet.JitsiConferenceEvents.TRACK_REMOVED, function (t) {
return t && !t.isLocal() && dispatch((0, _tracks.trackRemoved)(t));
});
conference.on(_libJitsiMeet.JitsiConferenceEvents.DOMINANT_SPEAKER_CHANGED, function () {
return dispatch(_participants.dominantSpeakerChanged.apply(undefined, arguments));
});
conference.on(_libJitsiMeet.JitsiConferenceEvents.PARTICIPANT_CONN_STATUS_CHANGED, function () {
return dispatch(_participants.participantConnectionStatusChanged.apply(undefined, arguments));
});
conference.on(_libJitsiMeet.JitsiConferenceEvents.USER_JOINED, function (id, user) {
return dispatch((0, _participants.participantJoined)({
id: id,
name: user.getDisplayName(),
role: user.getRole()
}));
});
conference.on(_libJitsiMeet.JitsiConferenceEvents.USER_LEFT, function () {
return dispatch(_participants.participantLeft.apply(undefined, arguments));
});
conference.on(_libJitsiMeet.JitsiConferenceEvents.USER_ROLE_CHANGED, function () {
return dispatch(_participants.participantRoleChanged.apply(undefined, arguments));
});
conference.addCommandListener(_constants.AVATAR_ID_COMMAND, function (data, id) {
return dispatch((0, _participants.participantUpdated)({
id: id,
avatarID: data.value
}));
});
conference.addCommandListener(_constants.AVATAR_URL_COMMAND, function (data, id) {
return dispatch((0, _participants.participantUpdated)({
id: id,
avatarURL: data.value
}));
});
conference.addCommandListener(_constants.EMAIL_COMMAND, function (data, id) {
return dispatch((0, _participants.participantUpdated)({
id: id,
email: data.value
}));
});
}
function _setLocalParticipantData(conference, state) {
var _getLocalParticipant = (0, _participants.getLocalParticipant)(state),
avatarID = _getLocalParticipant.avatarID;
conference.removeCommand(_constants.AVATAR_ID_COMMAND);
conference.sendCommand(_constants.AVATAR_ID_COMMAND, {
value: avatarID
});
}
function conferenceFailed(conference, error) {
return {
type: _actionTypes.CONFERENCE_FAILED,
conference: conference,
error: error
};
}
function conferenceJoined(conference) {
return function (dispatch, getState) {
var localTracks = getState()['features/base/tracks'].filter(function (t) {
return t.local;
}).map(function (t) {
return t.jitsiTrack;
});
if (localTracks.length) {
(0, _functions._addLocalTracksToConference)(conference, localTracks);
}
dispatch({
type: _actionTypes.CONFERENCE_JOINED,
conference: conference
});
};
}
function conferenceLeft(conference) {
return {
type: _actionTypes.CONFERENCE_LEFT,
conference: conference
};
}
function _conferenceWillJoin(conference) {
return {
type: _actionTypes.CONFERENCE_WILL_JOIN,
conference: conference
};
}
function conferenceWillLeave(conference) {
return {
type: _actionTypes.CONFERENCE_WILL_LEAVE,
conference: conference
};
}
function createConference() {
return function (dispatch, getState) {
var state = getState();
var _state$featuresBase = state['features/base/connection'],
connection = _state$featuresBase.connection,
locationURL = _state$featuresBase.locationURL;
if (!connection) {
throw new Error('Cannot create a conference without a connection!');
}
var _state$featuresBase2 = state['features/base/conference'],
password = _state$featuresBase2.password,
room = _state$featuresBase2.room;
if (!room) {
throw new Error('Cannot join a conference without a room name!');
}
var conference = connection.initJitsiConference(room.toLowerCase(), state['features/base/config']);
conference[_constants.JITSI_CONFERENCE_URL_KEY] = locationURL;
dispatch(_conferenceWillJoin(conference));
_addConferenceListeners(conference, dispatch);
_setLocalParticipantData(conference, state);
conference.join(password);
};
}
function lockStateChanged(conference, locked) {
return {
type: _actionTypes.LOCK_STATE_CHANGED,
conference: conference,
locked: locked
};
}
function _setAudioOnly(audioOnly) {
return {
type: _actionTypes.SET_AUDIO_ONLY,
audioOnly: audioOnly
};
}
function _setAudioOnlyVideoMuted(muted) {
return function (dispatch, getState) {
if (muted) {
var video = getState()['features/base/media'].video;
if (video.muted) {
return;
}
} else {
var audioOnlyVideoMuted = getState()['features/base/conference'].audioOnlyVideoMuted;
if (!audioOnlyVideoMuted) {
return;
}
}
dispatch({
type: _actionTypes._SET_AUDIO_ONLY_VIDEO_MUTED,
muted: muted
});
dispatch((0, _media.setVideoMuted)(muted));
};
}
function setLargeVideoHDStatus(isLargeVideoHD) {
return {
type: _actionTypes.SET_LARGE_VIDEO_HD_STATUS,
isLargeVideoHD: isLargeVideoHD
};
}
function setLastN(lastN) {
return function (dispatch, getState) {
if (typeof lastN === 'undefined') {
var config = getState()['features/base/config'];
lastN = config.channelLastN;
if (typeof lastN === 'undefined') {
lastN = -1;
}
}
dispatch({
type: _actionTypes.SET_LASTN,
lastN: lastN
});
};
}
function setPassword(conference, method, password) {
return function (dispatch, getState) {
switch (method) {
case conference.join:
{
var state = getState()['features/base/conference'];
if (state.passwordRequired === conference) {
dispatch({
type: _actionTypes.SET_PASSWORD,
conference: conference,
method: method,
password: password
});
state = getState()['features/base/conference'];
if (state.password === password && !state.passwordRequired && !state.conference) {
method.call(conference, password);
}
}
break;
}
case conference.lock:
{
var _state = getState()['features/base/conference'];
if (_state.conference === conference) {
return method.call(conference, password).then(function () {
return dispatch({
type: _actionTypes.SET_PASSWORD,
conference: conference,
method: method,
password: password
});
}).catch(function (error) {
return dispatch({
type: _actionTypes.SET_PASSWORD_FAILED,
error: error
});
});
}
return Promise.reject();
}
}
};
}
function setRoom(room) {
return {
type: _actionTypes.SET_ROOM,
room: room
};
}
function toggleAudioOnly() {
return function (dispatch, getState) {
var audioOnly = getState()['features/base/conference'].audioOnly;
return dispatch(_setAudioOnly(!audioOnly));
};
}
}, 433, null, "jitsi-meet/react/features/base/conference/actions.js");
__d(/* jitsi-meet/react/features/base/lib-jitsi-meet/index.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
exports.JitsiTrackEvents = exports.JitsiTrackErrors = exports.JitsiParticipantConnectionStatus = exports.JitsiConnectionEvents = exports.JitsiConnectionErrors = exports.JitsiConferenceEvents = exports.JitsiConferenceErrors = exports.default = undefined;
var _actions = require(435 ); // 435 = ./actions
Object.keys(_actions).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _actions[key];
}
});
});
var _actionTypes = require(493 ); // 493 = ./actionTypes
Object.keys(_actionTypes).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _actionTypes[key];
}
});
});
var _constants = require(494 ); // 494 = ./constants
Object.keys(_constants).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _constants[key];
}
});
});
var _functions = require(495 ); // 495 = ./functions
Object.keys(_functions).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _functions[key];
}
});
});
var _ = require(436 ); // 436 = ./_
var _2 = babelHelpers.interopRequireDefault(_);
require(533 ); // 533 = ./middleware
require(610 ); // 610 = ./reducer
exports.default = _2.default;
var JitsiConferenceErrors = exports.JitsiConferenceErrors = _2.default.errors.conference;
var JitsiConferenceEvents = exports.JitsiConferenceEvents = _2.default.events.conference;
var JitsiConnectionErrors = exports.JitsiConnectionErrors = _2.default.errors.connection;
var JitsiConnectionEvents = exports.JitsiConnectionEvents = _2.default.events.connection;
var JitsiParticipantConnectionStatus = exports.JitsiParticipantConnectionStatus = _2.default.constants.participantConnectionStatus;
var JitsiTrackErrors = exports.JitsiTrackErrors = _2.default.errors.track;
var JitsiTrackEvents = exports.JitsiTrackEvents = _2.default.events.track;
}, 434, null, "jitsi-meet/react/features/base/lib-jitsi-meet/index.js");
__d(/* jitsi-meet/react/features/base/lib-jitsi-meet/actions.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
exports.disposeLib = disposeLib;
exports.initLib = initLib;
exports.libInitError = libInitError;
exports.setWebRTCReady = setWebRTCReady;
var _ = require(436 ); // 436 = ./_
var _2 = babelHelpers.interopRequireDefault(_);
var _actionTypes = require(493 ); // 493 = ./actionTypes
function disposeLib() {
return function (dispatch) {
dispatch({ type: _actionTypes.LIB_WILL_DISPOSE });
dispatch({ type: _actionTypes.LIB_DID_DISPOSE });
};
}
function initLib() {
return function (dispatch, getState) {
var config = getState()['features/base/config'];
if (!config) {
throw new Error('Cannot init lib-jitsi-meet without config');
}
if (typeof APP !== 'undefined') {
return Promise.resolve();
}
dispatch({ type: _actionTypes.LIB_WILL_INIT });
return _2.default.init(config).then(function () {
return dispatch({ type: _actionTypes.LIB_DID_INIT });
}).catch(function (error) {
dispatch(libInitError(error));
console.error('lib-jitsi-meet failed to init:', error);
throw error;
});
};
}
function libInitError(error) {
return {
type: _actionTypes.LIB_INIT_ERROR,
error: error
};
}
function setWebRTCReady(webRTCReady) {
return function (dispatch, getState) {
if (getState()['features/base/lib-jitsi-meet'].webRTCReady !== webRTCReady) {
dispatch({
type: _actionTypes.SET_WEBRTC_READY,
webRTCReady: webRTCReady
});
switch (typeof webRTCReady) {
case 'function':
case 'object':
{
var then = webRTCReady.then;
if (typeof then === 'function') {
var onFulfilled = function onFulfilled(value) {
if (getState()['features/base/lib-jitsi-meet'].webRTCReady === webRTCReady) {
dispatch(setWebRTCReady(value));
}
};
then.call(webRTCReady, function () {
return onFulfilled(true);
}, function () {
return onFulfilled(false);
});
}
break;
}
}
}
};
}
}, 435, null, "jitsi-meet/react/features/base/lib-jitsi-meet/actions.js");
__d(/* jitsi-meet/react/features/base/lib-jitsi-meet/_.native.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
require(437 ); // 437 = ./native
var _libJitsiMeet = require(488 ); // 488 = lib-jitsi-meet/lib-jitsi-meet.min
var _libJitsiMeet2 = babelHelpers.interopRequireDefault(_libJitsiMeet);
(function (global) {
if (typeof global.$ === 'undefined') {
var jQuery = require(489 ); // 489 = jquery
jQuery(global);
global.$ = jQuery;
}
if (typeof global.Strophe === 'undefined') {
require(490 ); // 490 = strophe
require(491 ); // 491 = strophejs-plugins/disco/strophe.disco
require(492 ); // 492 = strophejs-plugins/caps/strophe.caps.jsonly
}
})(global || window || this);exports.default = _libJitsiMeet2.default;
}, 436, null, "jitsi-meet/react/features/base/lib-jitsi-meet/_.native.js");
__d(/* jitsi-meet/react/features/base/lib-jitsi-meet/native/index.js */function(global, require, module, exports) {require(438 ); // 438 = ./polyfills-browser
require(487 ); // 487 = ./polyfills-browserify
}, 437, null, "jitsi-meet/react/features/base/lib-jitsi-meet/native/index.js");
__d(/* jitsi-meet/react/features/base/lib-jitsi-meet/native/polyfills-browser.js */function(global, require, module, exports) {var _es6Iterator = require(439 ); // 439 = es6-iterator
var _es6Iterator2 = babelHelpers.interopRequireDefault(_es6Iterator);
var _reactNativeBackgroundTimer = require(459 ); // 459 = react-native-background-timer
var _reactNativeBackgroundTimer2 = babelHelpers.interopRequireDefault(_reactNativeBackgroundTimer);
require(460 ); // 460 = url-polyfill
function _getCommonPrototype(a, b) {
if (a === b) {
return a;
}
var p = void 0;
if ((p = Object.getPrototypeOf(a)) && (p = _getCommonPrototype(b, p))) {
return p;
}
if ((p = Object.getPrototypeOf(b)) && (p = _getCommonPrototype(a, p))) {
return p;
}
return undefined;
}
function _querySelector(node, selectors) {
var element = null;
node && _visitNode(node, function (n) {
if (n.nodeType === 1 && n.nodeName === selectors) {
element = n;
return true;
}
return false;
});
return element;
}
function _visitNode(node, callback) {
if (callback(node)) {
return true;
}
if (node = node.firstChild) {
do {
if (_visitNode(node, callback)) {
return true;
}
} while (node = node.nextSibling);
}
return false;
}
(function (global) {
var DOMParser = require(461 ).DOMParser; // 461 = xmldom
if (typeof global.addEventListener === 'undefined') {
global.addEventListener = function () {};
}
var arrayPrototype = Array.prototype;
if (typeof arrayPrototype['@@iterator'] === 'undefined') {
arrayPrototype['@@iterator'] = function () {
return new _es6Iterator2.default(this);
};
}
if (typeof global.document === 'undefined') {
var document = new DOMParser().parseFromString('<html><head></head><body></body></html>', 'text/xml');
if (typeof document.addEventListener === 'undefined') {
document.addEventListener = function () {};
}
var documentPrototype = Object.getPrototypeOf(document);
if (documentPrototype) {
if (typeof documentPrototype.querySelector === 'undefined') {
documentPrototype.querySelector = function (selectors) {
return _querySelector(this.elementNode, selectors);
};
}
}
var elementPrototype = Object.getPrototypeOf(document.documentElement);
if (elementPrototype) {
if (typeof elementPrototype.querySelector === 'undefined') {
elementPrototype.querySelector = function (selectors) {
return _querySelector(this, selectors);
};
}
if (!elementPrototype.hasOwnProperty('innerHTML')) {
Object.defineProperty(elementPrototype, 'innerHTML', {
get: function get() {
return this.childNodes.toString();
},
set: function set(innerHTML) {
this.textContent = '';
var d = new DOMParser().parseFromString('<div>' + innerHTML + '</div>', 'text/xml');
var documentElement = d.documentElement;
var child = void 0;
while (child = documentElement.firstChild) {
this.appendChild(child);
}
}
});
}
}
var nodePrototype = _getCommonPrototype(documentPrototype, elementPrototype);
if (nodePrototype && nodePrototype !== Object.getPrototypeOf({})) {
var console = global.console;
if (console) {
var loggerLevels = require(464 ).levels; // 464 = jitsi-meet-logger
Object.keys(loggerLevels).forEach(function (key) {
var level = loggerLevels[key];
var consoleLog = console[level];
if (typeof consoleLog === 'function') {
console[level] = function () {
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
var length = args.length;
for (var i = 0; i < length; ++i) {
var arg = args[i];
if (arg && typeof arg !== 'string' && nodePrototype.isPrototypeOf(arg)) {
var _toString = arg.toString;
if (_toString) {
arg = _toString.call(arg);
}
}
args[i] = arg;
}
consoleLog.apply(this, args);
};
}
});
}
}
global.document = document;
}
if (typeof global.location === 'undefined') {
global.location = {
href: ''
};
}
var navigator = global.navigator;
if (navigator) {
if (typeof navigator.platform === 'undefined') {
navigator.platform = '';
}
if (typeof navigator.plugins === 'undefined') {
navigator.plugins = [];
}
(function () {
var reactNativePackageJSON = require(467 ); // 467 = react-native/package.json
var userAgent = reactNativePackageJSON.name || 'react-native';
var version = reactNativePackageJSON.version;
if (version) {
userAgent += '/' + version;
}
if (typeof navigator.userAgent !== 'undefined') {
var s = navigator.userAgent.toString();
if (s.length > 0 && s.indexOf(userAgent) === -1) {
userAgent = s + ' ' + userAgent;
}
}
navigator.userAgent = userAgent;
})();
}
if (typeof global.performance === 'undefined') {
global.performance = {
now: function now() {
return 0;
}
};
}
if (typeof global.sessionStorage === 'undefined') {
global.sessionStorage = {
getItem: function getItem() {},
removeItem: function removeItem() {},
setItem: function setItem() {}
};
}
require(468 ); // 468 = ./polyfills-webrtc
if (global.XMLHttpRequest) {
var prototype = global.XMLHttpRequest.prototype;
if (prototype && !prototype.hasOwnProperty('responseXML')) {
Object.defineProperty(prototype, 'responseXML', {
get: function get() {
var responseText = this.responseText;
var responseXML = void 0;
if (responseText) {
responseXML = new DOMParser().parseFromString(responseText, 'text/xml');
}
return responseXML;
}
});
}
}
global.clearTimeout = window.clearTimeout = _reactNativeBackgroundTimer2.default.clearTimeout.bind(_reactNativeBackgroundTimer2.default);
global.clearInterval = window.clearInterval = _reactNativeBackgroundTimer2.default.clearInterval.bind(_reactNativeBackgroundTimer2.default);
global.setInterval = window.setInterval = _reactNativeBackgroundTimer2.default.setInterval.bind(_reactNativeBackgroundTimer2.default);
global.setTimeout = window.setTimeout = _reactNativeBackgroundTimer2.default.setTimeout.bind(_reactNativeBackgroundTimer2.default);
})(global || window || this);
}, 438, null, "jitsi-meet/react/features/base/lib-jitsi-meet/native/polyfills-browser.js");
__d(/* es6-iterator/index.js */function(global, require, module, exports) {'use strict';
var clear = require(440 ), // 440 = es5-ext/array/#/clear
assign = require(18 ), // 18 = es5-ext/object/assign
callable = require(441 ), // 441 = es5-ext/object/valid-callable
value = require(26 ), // 26 = es5-ext/object/valid-value
d = require(17 ), // 17 = d
autoBind = require(442 ), // 442 = d/auto-bind
Symbol = require(447 ), // 447 = es6-symbol
defineProperty = Object.defineProperty,
defineProperties = Object.defineProperties,
_Iterator;
module.exports = _Iterator = function Iterator(list, context) {
if (!(this instanceof _Iterator)) return new _Iterator(list, context);
defineProperties(this, {
__list__: d('w', value(list)),
__context__: d('w', context),
__nextIndex__: d('w', 0)
});
if (!context) return;
callable(context.on);
context.on('_add', this._onAdd);
context.on('_delete', this._onDelete);
context.on('_clear', this._onClear);
};
defineProperties(_Iterator.prototype, assign({
constructor: d(_Iterator),
_next: d(function () {
var i;
if (!this.__list__) return;
if (this.__redo__) {
i = this.__redo__.shift();
if (i !== undefined) return i;
}
if (this.__nextIndex__ < this.__list__.length) return this.__nextIndex__++;
this._unBind();
}),
next: d(function () {
return this._createResult(this._next());
}),
_createResult: d(function (i) {
if (i === undefined) return { done: true, value: undefined };
return { done: false, value: this._resolve(i) };
}),
_resolve: d(function (i) {
return this.__list__[i];
}),
_unBind: d(function () {
this.__list__ = null;
delete this.__redo__;
if (!this.__context__) return;
this.__context__.off('_add', this._onAdd);
this.__context__.off('_delete', this._onDelete);
this.__context__.off('_clear', this._onClear);
this.__context__ = null;
}),
toString: d(function () {
return '[object Iterator]';
})
}, autoBind({
_onAdd: d(function (index) {
if (index >= this.__nextIndex__) return;
++this.__nextIndex__;
if (!this.__redo__) {
defineProperty(this, '__redo__', d('c', [index]));
return;
}
this.__redo__.forEach(function (redo, i) {
if (redo >= index) this.__redo__[i] = ++redo;
}, this);
this.__redo__.push(index);
}),
_onDelete: d(function (index) {
var i;
if (index >= this.__nextIndex__) return;
--this.__nextIndex__;
if (!this.__redo__) return;
i = this.__redo__.indexOf(index);
if (i !== -1) this.__redo__.splice(i, 1);
this.__redo__.forEach(function (redo, i) {
if (redo > index) this.__redo__[i] = --redo;
}, this);
}),
_onClear: d(function () {
if (this.__redo__) clear.call(this.__redo__);
this.__nextIndex__ = 0;
})
})));
defineProperty(_Iterator.prototype, typeof Symbol === 'function' ? Symbol.iterator : '@@iterator', d(function () {
return this;
}));
defineProperty(_Iterator.prototype, typeof Symbol === 'function' ? Symbol.toStringTag : '@@toStringTag', d('', 'Iterator'));
}, 439, null, "es6-iterator/index.js");
__d(/* es5-ext/array/#/clear.js */function(global, require, module, exports) {
"use strict";
var value = require(26 ); // 26 = ../../object/valid-value
module.exports = function () {
value(this).length = 0;
return this;
};
}, 440, null, "es5-ext/array/#/clear.js");
__d(/* es5-ext/object/valid-callable.js */function(global, require, module, exports) {"use strict";
module.exports = function (fn) {
if (typeof fn !== "function") throw new TypeError(fn + " is not a function");
return fn;
};
}, 441, null, "es5-ext/object/valid-callable.js");
__d(/* d/auto-bind.js */function(global, require, module, exports) {'use strict';
var copy = require(443 ), // 443 = es5-ext/object/copy
normalizeOptions = require(27 ), // 27 = es5-ext/object/normalize-options
ensureCallable = require(441 ), // 441 = es5-ext/object/valid-callable
map = require(456 ), // 456 = es5-ext/object/map
callable = require(441 ), // 441 = es5-ext/object/valid-callable
validValue = require(26 ), // 26 = es5-ext/object/valid-value
bind = Function.prototype.bind,
defineProperty = Object.defineProperty,
hasOwnProperty = Object.prototype.hasOwnProperty,
define;
define = function define(name, desc, options) {
var value = validValue(desc) && callable(desc.value),
dgs;
dgs = copy(desc);
delete dgs.writable;
delete dgs.value;
dgs.get = function () {
if (!options.overwriteDefinition && hasOwnProperty.call(this, name)) return value;
desc.value = bind.call(value, options.resolveContext ? options.resolveContext(this) : this);
defineProperty(this, name, desc);
return this[name];
};
return dgs;
};
module.exports = function (props) {
var options = normalizeOptions(arguments[1]);
if (options.resolveContext != null) ensureCallable(options.resolveContext);
return map(props, function (desc, name) {
return define(name, desc, options);
});
};
}, 442, null, "d/auto-bind.js");
__d(/* es5-ext/object/copy.js */function(global, require, module, exports) {"use strict";
var aFrom = require(444 ), // 444 = ../array/from
assign = require(18 ), // 18 = ./assign
value = require(26 ); // 26 = ./valid-value
module.exports = function (obj) {
var copy = Object(value(obj)),
propertyNames = arguments[1],
options = Object(arguments[2]);
if (copy !== obj && !propertyNames) return copy;
var result = {};
if (propertyNames) {
aFrom(propertyNames, function (propertyName) {
if (options.ensure || propertyName in obj) result[propertyName] = obj[propertyName];
});
} else {
assign(result, obj);
}
return result;
};
}, 443, null, "es5-ext/object/copy.js");
__d(/* es5-ext/array/from/index.js */function(global, require, module, exports) {"use strict";
module.exports = require(445 )() ? Array.from : require(446 ); // 446 = ./shim // 445 = ./is-implemented
}, 444, null, "es5-ext/array/from/index.js");
__d(/* es5-ext/array/from/is-implemented.js */function(global, require, module, exports) {"use strict";
module.exports = function () {
var from = Array.from,
arr,
result;
if (typeof from !== "function") return false;
arr = ["raz", "dwa"];
result = from(arr);
return Boolean(result && result !== arr && result[1] === "dwa");
};
}, 445, null, "es5-ext/array/from/is-implemented.js");
__d(/* es5-ext/array/from/shim.js */function(global, require, module, exports) {"use strict";
var iteratorSymbol = require(447 ).iterator, // 447 = es6-symbol
isArguments = require(448 ), // 448 = ../../function/is-arguments
isFunction = require(449 ), // 449 = ../../function/is-function
toPosInt = require(450 ), // 450 = ../../number/to-pos-integer
callable = require(441 ), // 441 = ../../object/valid-callable
validValue = require(26 ), // 26 = ../../object/valid-value
isValue = require(24 ), // 24 = ../../object/is-value
isString = require(455 ), // 455 = ../../string/is-string
isArray = Array.isArray,
call = Function.prototype.call,
desc = { configurable: true, enumerable: true, writable: true, value: null },
defineProperty = Object.defineProperty;
module.exports = function (arrayLike) {
var mapFn = arguments[1],
thisArg = arguments[2],
Context,
i,
j,
arr,
length,
code,
iterator,
result,
getIterator,
value;
arrayLike = Object(validValue(arrayLike));
if (isValue(mapFn)) callable(mapFn);
if (!this || this === Array || !isFunction(this)) {
if (!mapFn) {
if (isArguments(arrayLike)) {
length = arrayLike.length;
if (length !== 1) return Array.apply(null, arrayLike);
arr = new Array(1);
arr[0] = arrayLike[0];
return arr;
}
if (isArray(arrayLike)) {
arr = new Array(length = arrayLike.length);
for (i = 0; i < length; ++i) {
arr[i] = arrayLike[i];
}return arr;
}
}
arr = [];
} else {
Context = this;
}
if (!isArray(arrayLike)) {
if ((getIterator = arrayLike[iteratorSymbol]) !== undefined) {
iterator = callable(getIterator).call(arrayLike);
if (Context) arr = new Context();
result = iterator.next();
i = 0;
while (!result.done) {
value = mapFn ? call.call(mapFn, thisArg, result.value, i) : result.value;
if (Context) {
desc.value = value;
defineProperty(arr, i, desc);
} else {
arr[i] = value;
}
result = iterator.next();
++i;
}
length = i;
} else if (isString(arrayLike)) {
length = arrayLike.length;
if (Context) arr = new Context();
for (i = 0, j = 0; i < length; ++i) {
value = arrayLike[i];
if (i + 1 < length) {
code = value.charCodeAt(0);
if (code >= 0xd800 && code <= 0xdbff) value += arrayLike[++i];
}
value = mapFn ? call.call(mapFn, thisArg, value, j) : value;
if (Context) {
desc.value = value;
defineProperty(arr, j, desc);
} else {
arr[j] = value;
}
++j;
}
length = j;
}
}
if (length === undefined) {
length = toPosInt(arrayLike.length);
if (Context) arr = new Context(length);
for (i = 0; i < length; ++i) {
value = mapFn ? call.call(mapFn, thisArg, arrayLike[i], i) : arrayLike[i];
if (Context) {
desc.value = value;
defineProperty(arr, i, desc);
} else {
arr[i] = value;
}
}
}
if (Context) {
desc.value = null;
arr.length = length;
}
return arr;
};
}, 446, null, "es5-ext/array/from/shim.js");
__d(/* es6-symbol/index.js */function(global, require, module, exports) {'use strict';
module.exports = require(14 )() ? Symbol : require(16 ); // 16 = ./polyfill // 14 = ./is-implemented
}, 447, null, "es6-symbol/index.js");
__d(/* es5-ext/function/is-arguments.js */function(global, require, module, exports) {"use strict";
var objToString = Object.prototype.toString,
id = objToString.call(function () {
return arguments;
}());
module.exports = function (value) {
return objToString.call(value) === id;
};
}, 448, null, "es5-ext/function/is-arguments.js");
__d(/* es5-ext/function/is-function.js */function(global, require, module, exports) {"use strict";
var objToString = Object.prototype.toString,
id = objToString.call(require(25 )); // 25 = ./noop
module.exports = function (value) {
return typeof value === "function" && objToString.call(value) === id;
};
}, 449, null, "es5-ext/function/is-function.js");
__d(/* es5-ext/number/to-pos-integer.js */function(global, require, module, exports) {"use strict";
var toInteger = require(451 ), // 451 = ./to-integer
max = Math.max;
module.exports = function (value) {
return max(0, toInteger(value));
};
}, 450, null, "es5-ext/number/to-pos-integer.js");
__d(/* es5-ext/number/to-integer.js */function(global, require, module, exports) {"use strict";
var sign = require(452 ), // 452 = ../math/sign
abs = Math.abs,
floor = Math.floor;
module.exports = function (value) {
if (isNaN(value)) return 0;
value = Number(value);
if (value === 0 || !isFinite(value)) return value;
return sign(value) * floor(abs(value));
};
}, 451, null, "es5-ext/number/to-integer.js");
__d(/* es5-ext/math/sign/index.js */function(global, require, module, exports) {"use strict";
module.exports = require(453 )() ? Math.sign : require(454 ); // 454 = ./shim // 453 = ./is-implemented
}, 452, null, "es5-ext/math/sign/index.js");
__d(/* es5-ext/math/sign/is-implemented.js */function(global, require, module, exports) {"use strict";
module.exports = function () {
var sign = Math.sign;
if (typeof sign !== "function") return false;
return sign(10) === 1 && sign(-20) === -1;
};
}, 453, null, "es5-ext/math/sign/is-implemented.js");
__d(/* es5-ext/math/sign/shim.js */function(global, require, module, exports) {"use strict";
module.exports = function (value) {
value = Number(value);
if (isNaN(value) || value === 0) return value;
return value > 0 ? 1 : -1;
};
}, 454, null, "es5-ext/math/sign/shim.js");
__d(/* es5-ext/string/is-string.js */function(global, require, module, exports) {"use strict";
var objToString = Object.prototype.toString,
id = objToString.call("");
module.exports = function (value) {
return typeof value === "string" || value && typeof value === "object" && (value instanceof String || objToString.call(value) === id) || false;
};
}, 455, null, "es5-ext/string/is-string.js");
__d(/* es5-ext/object/map.js */function(global, require, module, exports) {"use strict";
var callable = require(441 ), // 441 = ./valid-callable
forEach = require(457 ), // 457 = ./for-each
call = Function.prototype.call;
module.exports = function (obj, cb) {
var result = {},
thisArg = arguments[2];
callable(cb);
forEach(obj, function (value, key, targetObj, index) {
result[key] = call.call(cb, thisArg, value, key, targetObj, index);
});
return result;
};
}, 456, null, "es5-ext/object/map.js");
__d(/* es5-ext/object/for-each.js */function(global, require, module, exports) {"use strict";
module.exports = require(458 )("forEach"); // 458 = ./_iterate
}, 457, null, "es5-ext/object/for-each.js");
__d(/* es5-ext/object/_iterate.js */function(global, require, module, exports) {
"use strict";
var callable = require(441 ), // 441 = ./valid-callable
value = require(26 ), // 26 = ./valid-value
bind = Function.prototype.bind,
call = Function.prototype.call,
keys = Object.keys,
objPropertyIsEnumerable = Object.prototype.propertyIsEnumerable;
module.exports = function (method, defVal) {
return function (obj, cb) {
var list,
thisArg = arguments[2],
compareFn = arguments[3];
obj = Object(value(obj));
callable(cb);
list = keys(obj);
if (compareFn) {
list.sort(typeof compareFn === "function" ? bind.call(compareFn, obj) : undefined);
}
if (typeof method !== "function") method = list[method];
return call.call(method, list, function (key, index) {
if (!objPropertyIsEnumerable.call(obj, key)) return defVal;
return call.call(cb, thisArg, obj[key], key, obj, index);
});
};
};
}, 458, null, "es5-ext/object/_iterate.js");
__d(/* react-native-background-timer/index.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _reactNative = require(69 ); // 69 = react-native
var RNBackgroundTimer = _reactNative.NativeModules.RNBackgroundTimer;
var Emitter = new _reactNative.NativeEventEmitter(RNBackgroundTimer);
var BackgroundTimer = function () {
function BackgroundTimer() {
var _this = this;
babelHelpers.classCallCheck(this, BackgroundTimer);
this.uniqueId = 0;
this.callbacks = {};
Emitter.addListener('backgroundTimer.timeout', function (id) {
if (_this.callbacks[id]) {
var callback = _this.callbacks[id].callback;
if (!_this.callbacks[id].interval) {
delete _this.callbacks[id];
} else {
RNBackgroundTimer.setTimeout(id, _this.callbacks[id].timeout);
}
callback();
}
});
}
babelHelpers.createClass(BackgroundTimer, [{
key: 'start',
value: function start(delay) {
return RNBackgroundTimer.start(delay);
}
}, {
key: 'stop',
value: function stop() {
return RNBackgroundTimer.stop();
}
}, {
key: 'setTimeout',
value: function setTimeout(callback, timeout) {
var timeoutId = ++this.uniqueId;
this.callbacks[timeoutId] = {
callback: callback,
interval: false,
timeout: timeout
};
RNBackgroundTimer.setTimeout(timeoutId, timeout);
return timeoutId;
}
}, {
key: 'clearTimeout',
value: function clearTimeout(timeoutId) {
if (this.callbacks[timeoutId]) {
delete this.callbacks[timeoutId];
}
}
}, {
key: 'setInterval',
value: function setInterval(callback, timeout) {
var intervalId = ++this.uniqueId;
this.callbacks[intervalId] = {
callback: callback,
interval: true,
timeout: timeout
};
RNBackgroundTimer.setTimeout(intervalId, timeout);
return intervalId;
}
}, {
key: 'clearInterval',
value: function clearInterval(intervalId) {
if (this.callbacks[intervalId]) {
delete this.callbacks[intervalId];
}
}
}]);
return BackgroundTimer;
}();
;
exports.default = new BackgroundTimer();
}, 459, null, "react-native-background-timer/index.js");
__d(/* url-polyfill/url.js */function(global, require, module, exports) {
(function (scope) {
'use strict';
var hasWorkingUrl = false;
if (!scope.forceJURL) {
try {
var u = new URL('b', 'http://a');
u.pathname = 'c%20d';
hasWorkingUrl = u.href === 'http://a/c%20d';
} catch (e) {}
}
if (hasWorkingUrl) return;
var relative = Object.create(null);
relative['ftp'] = 21;
relative['file'] = 0;
relative['gopher'] = 70;
relative['http'] = 80;
relative['https'] = 443;
relative['ws'] = 80;
relative['wss'] = 443;
var relativePathDotMapping = Object.create(null);
relativePathDotMapping['%2e'] = '.';
relativePathDotMapping['.%2e'] = '..';
relativePathDotMapping['%2e.'] = '..';
relativePathDotMapping['%2e%2e'] = '..';
function isRelativeScheme(scheme) {
return relative[scheme] !== undefined;
}
function invalid() {
clear.call(this);
this._isInvalid = true;
}
function IDNAToASCII(h) {
if ('' == h) {
invalid.call(this);
}
return h.toLowerCase();
}
function percentEscape(c) {
var unicode = c.charCodeAt(0);
if (unicode > 0x20 && unicode < 0x7F && [0x22, 0x23, 0x3C, 0x3E, 0x3F, 0x60].indexOf(unicode) == -1) {
return c;
}
return encodeURIComponent(c);
}
function percentEscapeQuery(c) {
var unicode = c.charCodeAt(0);
if (unicode > 0x20 && unicode < 0x7F && [0x22, 0x23, 0x3C, 0x3E, 0x60].indexOf(unicode) == -1) {
return c;
}
return encodeURIComponent(c);
}
var EOF = undefined,
ALPHA = /[a-zA-Z]/,
ALPHANUMERIC = /[a-zA-Z0-9\+\-\.]/;
function parse(input, stateOverride, base) {
function err(message) {
errors.push(message);
}
var state = stateOverride || 'scheme start',
cursor = 0,
buffer = '',
seenAt = false,
seenBracket = false,
errors = [];
loop: while ((input[cursor - 1] != EOF || cursor == 0) && !this._isInvalid) {
var c = input[cursor];
switch (state) {
case 'scheme start':
if (c && ALPHA.test(c)) {
buffer += c.toLowerCase();
state = 'scheme';
} else if (!stateOverride) {
buffer = '';
state = 'no scheme';
continue;
} else {
err('Invalid scheme.');
break loop;
}
break;
case 'scheme':
if (c && ALPHANUMERIC.test(c)) {
buffer += c.toLowerCase();
} else if (':' == c) {
this._scheme = buffer;
buffer = '';
if (stateOverride) {
break loop;
}
if (isRelativeScheme(this._scheme)) {
this._isRelative = true;
}
if ('file' == this._scheme) {
state = 'relative';
} else if (this._isRelative && base && base._scheme == this._scheme) {
state = 'relative or authority';
} else if (this._isRelative) {
state = 'authority first slash';
} else {
state = 'scheme data';
}
} else if (!stateOverride) {
buffer = '';
cursor = 0;
state = 'no scheme';
continue;
} else if (EOF == c) {
break loop;
} else {
err('Code point not allowed in scheme: ' + c);
break loop;
}
break;
case 'scheme data':
if ('?' == c) {
query = '?';
state = 'query';
} else if ('#' == c) {
this._fragment = '#';
state = 'fragment';
} else {
if (EOF != c && '\t' != c && '\n' != c && '\r' != c) {
this._schemeData += percentEscape(c);
}
}
break;
case 'no scheme':
if (!base || !isRelativeScheme(base._scheme)) {
err('Missing scheme.');
invalid.call(this);
} else {
state = 'relative';
continue;
}
break;
case 'relative or authority':
if ('/' == c && '/' == input[cursor + 1]) {
state = 'authority ignore slashes';
} else {
err('Expected /, got: ' + c);
state = 'relative';
continue;
}
break;
case 'relative':
this._isRelative = true;
if ('file' != this._scheme) this._scheme = base._scheme;
if (EOF == c) {
this._host = base._host;
this._port = base._port;
this._path = base._path.slice();
this._query = base._query;
this._username = base._username;
this._password = base._password;
break loop;
} else if ('/' == c || '\\' == c) {
if ('\\' == c) err('\\ is an invalid code point.');
state = 'relative slash';
} else if ('?' == c) {
this._host = base._host;
this._port = base._port;
this._path = base._path.slice();
this._query = '?';
this._username = base._username;
this._password = base._password;
state = 'query';
} else if ('#' == c) {
this._host = base._host;
this._port = base._port;
this._path = base._path.slice();
this._query = base._query;
this._fragment = '#';
this._username = base._username;
this._password = base._password;
state = 'fragment';
} else {
var nextC = input[cursor + 1];
var nextNextC = input[cursor + 2];
if ('file' != this._scheme || !ALPHA.test(c) || nextC != ':' && nextC != '|' || EOF != nextNextC && '/' != nextNextC && '\\' != nextNextC && '?' != nextNextC && '#' != nextNextC) {
this._host = base._host;
this._port = base._port;
this._username = base._username;
this._password = base._password;
this._path = base._path.slice();
this._path.pop();
}
state = 'relative path';
continue;
}
break;
case 'relative slash':
if ('/' == c || '\\' == c) {
if ('\\' == c) {
err('\\ is an invalid code point.');
}
if ('file' == this._scheme) {
state = 'file host';
} else {
state = 'authority ignore slashes';
}
} else {
if ('file' != this._scheme) {
this._host = base._host;
this._port = base._port;
this._username = base._username;
this._password = base._password;
}
state = 'relative path';
continue;
}
break;
case 'authority first slash':
if ('/' == c) {
state = 'authority second slash';
} else {
err("Expected '/', got: " + c);
state = 'authority ignore slashes';
continue;
}
break;
case 'authority second slash':
state = 'authority ignore slashes';
if ('/' != c) {
err("Expected '/', got: " + c);
continue;
}
break;
case 'authority ignore slashes':
if ('/' != c && '\\' != c) {
state = 'authority';
continue;
} else {
err('Expected authority, got: ' + c);
}
break;
case 'authority':
if ('@' == c) {
if (seenAt) {
err('@ already seen.');
buffer += '%40';
}
seenAt = true;
for (var i = 0; i < buffer.length; i++) {
var cp = buffer[i];
if ('\t' == cp || '\n' == cp || '\r' == cp) {
err('Invalid whitespace in authority.');
continue;
}
if (':' == cp && null === this._password) {
this._password = '';
continue;
}
var tempC = percentEscape(cp);
null !== this._password ? this._password += tempC : this._username += tempC;
}
buffer = '';
} else if (EOF == c || '/' == c || '\\' == c || '?' == c || '#' == c) {
cursor -= buffer.length;
buffer = '';
state = 'host';
continue;
} else {
buffer += c;
}
break;
case 'file host':
if (EOF == c || '/' == c || '\\' == c || '?' == c || '#' == c) {
if (buffer.length == 2 && ALPHA.test(buffer[0]) && (buffer[1] == ':' || buffer[1] == '|')) {
state = 'relative path';
} else if (buffer.length == 0) {
state = 'relative path start';
} else {
this._host = IDNAToASCII.call(this, buffer);
buffer = '';
state = 'relative path start';
}
continue;
} else if ('\t' == c || '\n' == c || '\r' == c) {
err('Invalid whitespace in file host.');
} else {
buffer += c;
}
break;
case 'host':
case 'hostname':
if (':' == c && !seenBracket) {
this._host = IDNAToASCII.call(this, buffer);
buffer = '';
state = 'port';
if ('hostname' == stateOverride) {
break loop;
}
} else if (EOF == c || '/' == c || '\\' == c || '?' == c || '#' == c) {
this._host = IDNAToASCII.call(this, buffer);
buffer = '';
state = 'relative path start';
if (stateOverride) {
break loop;
}
continue;
} else if ('\t' != c && '\n' != c && '\r' != c) {
if ('[' == c) {
seenBracket = true;
} else if (']' == c) {
seenBracket = false;
}
buffer += c;
} else {
err('Invalid code point in host/hostname: ' + c);
}
break;
case 'port':
if (/[0-9]/.test(c)) {
buffer += c;
} else if (EOF == c || '/' == c || '\\' == c || '?' == c || '#' == c || stateOverride) {
if ('' != buffer) {
var temp = parseInt(buffer, 10);
if (temp != relative[this._scheme]) {
this._port = temp + '';
}
buffer = '';
}
if (stateOverride) {
break loop;
}
state = 'relative path start';
continue;
} else if ('\t' == c || '\n' == c || '\r' == c) {
err('Invalid code point in port: ' + c);
} else {
invalid.call(this);
}
break;
case 'relative path start':
if ('\\' == c) err("'\\' not allowed in path.");
state = 'relative path';
if ('/' != c && '\\' != c) {
continue;
}
break;
case 'relative path':
if (EOF == c || '/' == c || '\\' == c || !stateOverride && ('?' == c || '#' == c)) {
if ('\\' == c) {
err('\\ not allowed in relative path.');
}
var tmp;
if (tmp = relativePathDotMapping[buffer.toLowerCase()]) {
buffer = tmp;
}
if ('..' == buffer) {
this._path.pop();
if ('/' != c && '\\' != c) {
this._path.push('');
}
} else if ('.' == buffer && '/' != c && '\\' != c) {
this._path.push('');
} else if ('.' != buffer) {
if ('file' == this._scheme && this._path.length == 0 && buffer.length == 2 && ALPHA.test(buffer[0]) && buffer[1] == '|') {
buffer = buffer[0] + ':';
}
this._path.push(buffer);
}
buffer = '';
if ('?' == c) {
this._query = '?';
state = 'query';
} else if ('#' == c) {
this._fragment = '#';
state = 'fragment';
}
} else if ('\t' != c && '\n' != c && '\r' != c) {
buffer += percentEscape(c);
}
break;
case 'query':
if (!stateOverride && '#' == c) {
this._fragment = '#';
state = 'fragment';
} else if (EOF != c && '\t' != c && '\n' != c && '\r' != c) {
this._query += percentEscapeQuery(c);
}
break;
case 'fragment':
if (EOF != c && '\t' != c && '\n' != c && '\r' != c) {
this._fragment += c;
}
break;
}
cursor++;
}
}
function clear() {
this._scheme = '';
this._schemeData = '';
this._username = '';
this._password = null;
this._host = '';
this._port = '';
this._path = [];
this._query = '';
this._fragment = '';
this._isInvalid = false;
this._isRelative = false;
}
function jURL(url, base) {
if (base !== undefined && !(base instanceof jURL)) base = new jURL(String(base));
url = String(url);
this._url = url;
clear.call(this);
var input = url.replace(/^[ \t\r\n\f]+|[ \t\r\n\f]+$/g, '');
parse.call(this, input, null, base);
}
jURL.prototype = {
toString: function toString() {
return this.href;
},
get href() {
if (this._isInvalid) return this._url;
var authority = '';
if ('' != this._username || null != this._password) {
authority = this._username + (null != this._password ? ':' + this._password : '') + '@';
}
return this.protocol + (this._isRelative ? '//' + authority + this.host : '') + this.pathname + this._query + this._fragment;
},
set href(href) {
clear.call(this);
parse.call(this, href);
},
get protocol() {
return this._scheme + ':';
},
set protocol(protocol) {
if (this._isInvalid) return;
parse.call(this, protocol + ':', 'scheme start');
},
get host() {
return this._isInvalid ? '' : this._port ? this._host + ':' + this._port : this._host;
},
set host(host) {
if (this._isInvalid || !this._isRelative) return;
parse.call(this, host, 'host');
},
get hostname() {
return this._host;
},
set hostname(hostname) {
if (this._isInvalid || !this._isRelative) return;
parse.call(this, hostname, 'hostname');
},
get port() {
return this._port;
},
set port(port) {
if (this._isInvalid || !this._isRelative) return;
parse.call(this, port, 'port');
},
get pathname() {
return this._isInvalid ? '' : this._isRelative ? '/' + this._path.join('/') : this._schemeData;
},
set pathname(pathname) {
if (this._isInvalid || !this._isRelative) return;
this._path = [];
parse.call(this, pathname, 'relative path start');
},
get search() {
return this._isInvalid || !this._query || '?' == this._query ? '' : this._query;
},
set search(search) {
if (this._isInvalid || !this._isRelative) return;
this._query = '?';
if ('?' == search[0]) search = search.slice(1);
parse.call(this, search, 'query');
},
get hash() {
return this._isInvalid || !this._fragment || '#' == this._fragment ? '' : this._fragment;
},
set hash(hash) {
if (this._isInvalid) return;
this._fragment = '#';
if ('#' == hash[0]) hash = hash.slice(1);
parse.call(this, hash, 'fragment');
},
get origin() {
var host;
if (this._isInvalid || !this._scheme) {
return '';
}
switch (this._scheme) {
case 'data':
case 'file':
case 'javascript':
case 'mailto':
return 'null';
}
host = this.host;
if (!host) {
return '';
}
return this._scheme + '://' + host;
}
};
var OriginalURL = scope.URL;
if (OriginalURL) {
jURL.createObjectURL = function (blob) {
return OriginalURL.createObjectURL.apply(OriginalURL, arguments);
};
jURL.revokeObjectURL = function (url) {
OriginalURL.revokeObjectURL(url);
};
}
scope.URL = jURL;
})(this);
}, 460, null, "url-polyfill/url.js");
__d(/* xmldom/dom-parser.js */function(global, require, module, exports) {function DOMParser(options) {
this.options = options || { locator: {} };
}
DOMParser.prototype.parseFromString = function (source, mimeType) {
var options = this.options;
var sax = new XMLReader();
var domBuilder = options.domBuilder || new DOMHandler();
var errorHandler = options.errorHandler;
var locator = options.locator;
var defaultNSMap = options.xmlns || {};
var entityMap = { 'lt': '<', 'gt': '>', 'amp': '&', 'quot': '"', 'apos': "'" };
if (locator) {
domBuilder.setDocumentLocator(locator);
}
sax.errorHandler = buildErrorHandler(errorHandler, domBuilder, locator);
sax.domBuilder = options.domBuilder || domBuilder;
if (/\/x?html?$/.test(mimeType)) {
entityMap.nbsp = '\xa0';
entityMap.copy = '\xa9';
defaultNSMap[''] = 'http://www.w3.org/1999/xhtml';
}
defaultNSMap.xml = defaultNSMap.xml || 'http://www.w3.org/XML/1998/namespace';
if (source) {
sax.parse(source, defaultNSMap, entityMap);
} else {
sax.errorHandler.error("invalid doc source");
}
return domBuilder.doc;
};
function buildErrorHandler(errorImpl, domBuilder, locator) {
if (!errorImpl) {
if (domBuilder instanceof DOMHandler) {
return domBuilder;
}
errorImpl = domBuilder;
}
var errorHandler = {};
var isCallback = errorImpl instanceof Function;
locator = locator || {};
function build(key) {
var fn = errorImpl[key];
if (!fn && isCallback) {
fn = errorImpl.length == 2 ? function (msg) {
errorImpl(key, msg);
} : errorImpl;
}
errorHandler[key] = fn && function (msg) {
fn('[xmldom ' + key + ']\t' + msg + _locator(locator));
} || function () {};
}
build('warning');
build('error');
build('fatalError');
return errorHandler;
}
function DOMHandler() {
this.cdata = false;
}
function position(locator, node) {
node.lineNumber = locator.lineNumber;
node.columnNumber = locator.columnNumber;
}
DOMHandler.prototype = {
startDocument: function startDocument() {
this.doc = new DOMImplementation().createDocument(null, null, null);
if (this.locator) {
this.doc.documentURI = this.locator.systemId;
}
},
startElement: function startElement(namespaceURI, localName, qName, attrs) {
var doc = this.doc;
var el = doc.createElementNS(namespaceURI, qName || localName);
var len = attrs.length;
appendElement(this, el);
this.currentElement = el;
this.locator && position(this.locator, el);
for (var i = 0; i < len; i++) {
var namespaceURI = attrs.getURI(i);
var value = attrs.getValue(i);
var qName = attrs.getQName(i);
var attr = doc.createAttributeNS(namespaceURI, qName);
this.locator && position(attrs.getLocator(i), attr);
attr.value = attr.nodeValue = value;
el.setAttributeNode(attr);
}
},
endElement: function endElement(namespaceURI, localName, qName) {
var current = this.currentElement;
var tagName = current.tagName;
this.currentElement = current.parentNode;
},
startPrefixMapping: function startPrefixMapping(prefix, uri) {},
endPrefixMapping: function endPrefixMapping(prefix) {},
processingInstruction: function processingInstruction(target, data) {
var ins = this.doc.createProcessingInstruction(target, data);
this.locator && position(this.locator, ins);
appendElement(this, ins);
},
ignorableWhitespace: function ignorableWhitespace(ch, start, length) {},
characters: function characters(chars, start, length) {
chars = _toString.apply(this, arguments);
if (chars) {
if (this.cdata) {
var charNode = this.doc.createCDATASection(chars);
} else {
var charNode = this.doc.createTextNode(chars);
}
if (this.currentElement) {
this.currentElement.appendChild(charNode);
} else if (/^\s*$/.test(chars)) {
this.doc.appendChild(charNode);
}
this.locator && position(this.locator, charNode);
}
},
skippedEntity: function skippedEntity(name) {},
endDocument: function endDocument() {
this.doc.normalize();
},
setDocumentLocator: function setDocumentLocator(locator) {
if (this.locator = locator) {
locator.lineNumber = 0;
}
},
comment: function comment(chars, start, length) {
chars = _toString.apply(this, arguments);
var comm = this.doc.createComment(chars);
this.locator && position(this.locator, comm);
appendElement(this, comm);
},
startCDATA: function startCDATA() {
this.cdata = true;
},
endCDATA: function endCDATA() {
this.cdata = false;
},
startDTD: function startDTD(name, publicId, systemId) {
var impl = this.doc.implementation;
if (impl && impl.createDocumentType) {
var dt = impl.createDocumentType(name, publicId, systemId);
this.locator && position(this.locator, dt);
appendElement(this, dt);
}
},
warning: function warning(error) {
console.warn('[xmldom warning]\t' + error, _locator(this.locator));
},
error: function error(_error) {
console.error('[xmldom error]\t' + _error, _locator(this.locator));
},
fatalError: function fatalError(error) {
console.error('[xmldom fatalError]\t' + error, _locator(this.locator));
throw error;
}
};
function _locator(l) {
if (l) {
return '\n@' + (l.systemId || '') + '#[line:' + l.lineNumber + ',col:' + l.columnNumber + ']';
}
}
function _toString(chars, start, length) {
if (typeof chars == 'string') {
return chars.substr(start, length);
} else {
if (chars.length >= start + length || start) {
return new java.lang.String(chars, start, length) + '';
}
return chars;
}
}
"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g, function (key) {
DOMHandler.prototype[key] = function () {
return null;
};
});
function appendElement(hander, node) {
if (!hander.currentElement) {
hander.doc.appendChild(node);
} else {
hander.currentElement.appendChild(node);
}
}
var XMLReader = require(462 ).XMLReader; // 462 = ./sax
var DOMImplementation = exports.DOMImplementation = require(463 ).DOMImplementation; // 463 = ./dom
exports.XMLSerializer = require(463 ).XMLSerializer; // 463 = ./dom
exports.DOMParser = DOMParser;
}, 461, null, "xmldom/dom-parser.js");
__d(/* xmldom/sax.js */function(global, require, module, exports) {
var nameStartChar = /[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;
var nameChar = new RegExp("[\\-\\.0-9" + nameStartChar.source.slice(1, -1) + "\\u00B7\\u0300-\\u036F\\u203F-\\u2040]");
var tagNamePattern = new RegExp('^' + nameStartChar.source + nameChar.source + '*(?:\:' + nameStartChar.source + nameChar.source + '*)?$');
var S_TAG = 0;
var S_ATTR = 1;
var S_ATTR_SPACE = 2;
var S_EQ = 3;
var S_ATTR_NOQUOT_VALUE = 4;
var S_ATTR_END = 5;
var S_TAG_SPACE = 6;
var S_TAG_CLOSE = 7;
function XMLReader() {}
XMLReader.prototype = {
parse: function parse(source, defaultNSMap, entityMap) {
var domBuilder = this.domBuilder;
domBuilder.startDocument();
_copy(defaultNSMap, defaultNSMap = {});
_parse(source, defaultNSMap, entityMap, domBuilder, this.errorHandler);
domBuilder.endDocument();
}
};
function _parse(source, defaultNSMapCopy, entityMap, domBuilder, errorHandler) {
function fixedFromCharCode(code) {
if (code > 0xffff) {
code -= 0x10000;
var surrogate1 = 0xd800 + (code >> 10),
surrogate2 = 0xdc00 + (code & 0x3ff);
return String.fromCharCode(surrogate1, surrogate2);
} else {
return String.fromCharCode(code);
}
}
function entityReplacer(a) {
var k = a.slice(1, -1);
if (k in entityMap) {
return entityMap[k];
} else if (k.charAt(0) === '#') {
return fixedFromCharCode(parseInt(k.substr(1).replace('x', '0x')));
} else {
errorHandler.error('entity not found:' + a);
return a;
}
}
function appendText(end) {
if (end > start) {
var xt = source.substring(start, end).replace(/&#?\w+;/g, entityReplacer);
locator && position(start);
domBuilder.characters(xt, 0, end - start);
start = end;
}
}
function position(p, m) {
while (p >= lineEnd && (m = linePattern.exec(source))) {
lineStart = m.index;
lineEnd = lineStart + m[0].length;
locator.lineNumber++;
}
locator.columnNumber = p - lineStart + 1;
}
var lineStart = 0;
var lineEnd = 0;
var linePattern = /.*(?:\r\n?|\n)|.*$/g;
var locator = domBuilder.locator;
var parseStack = [{ currentNSMap: defaultNSMapCopy }];
var closeMap = {};
var start = 0;
while (true) {
try {
var tagStart = source.indexOf('<', start);
if (tagStart < 0) {
if (!source.substr(start).match(/^\s*$/)) {
var doc = domBuilder.doc;
var text = doc.createTextNode(source.substr(start));
doc.appendChild(text);
domBuilder.currentElement = text;
}
return;
}
if (tagStart > start) {
appendText(tagStart);
}
switch (source.charAt(tagStart + 1)) {
case '/':
var end = source.indexOf('>', tagStart + 3);
var tagName = source.substring(tagStart + 2, end);
var config = parseStack.pop();
if (end < 0) {
tagName = source.substring(tagStart + 2).replace(/[\s<].*/, '');
errorHandler.error("end tag name: " + tagName + ' is not complete:' + config.tagName);
end = tagStart + 1 + tagName.length;
} else if (tagName.match(/\s</)) {
tagName = tagName.replace(/[\s<].*/, '');
errorHandler.error("end tag name: " + tagName + ' maybe not complete');
end = tagStart + 1 + tagName.length;
}
var localNSMap = config.localNSMap;
var endMatch = config.tagName == tagName;
var endIgnoreCaseMach = endMatch || config.tagName && config.tagName.toLowerCase() == tagName.toLowerCase();
if (endIgnoreCaseMach) {
domBuilder.endElement(config.uri, config.localName, tagName);
if (localNSMap) {
for (var prefix in localNSMap) {
domBuilder.endPrefixMapping(prefix);
}
}
if (!endMatch) {
errorHandler.fatalError("end tag name: " + tagName + ' is not match the current start tagName:' + config.tagName);
}
} else {
parseStack.push(config);
}
end++;
break;
case '?':
locator && position(tagStart);
end = parseInstruction(source, tagStart, domBuilder);
break;
case '!':
locator && position(tagStart);
end = parseDCC(source, tagStart, domBuilder, errorHandler);
break;
default:
locator && position(tagStart);
var el = new ElementAttributes();
var currentNSMap = parseStack[parseStack.length - 1].currentNSMap;
var end = parseElementStartPart(source, tagStart, el, currentNSMap, entityReplacer, errorHandler);
var len = el.length;
if (!el.closed && fixSelfClosed(source, end, el.tagName, closeMap)) {
el.closed = true;
if (!entityMap.nbsp) {
errorHandler.warning('unclosed xml attribute');
}
}
if (locator && len) {
var locator2 = copyLocator(locator, {});
for (var i = 0; i < len; i++) {
var a = el[i];
position(a.offset);
a.locator = copyLocator(locator, {});
}
domBuilder.locator = locator2;
if (appendElement(el, domBuilder, currentNSMap)) {
parseStack.push(el);
}
domBuilder.locator = locator;
} else {
if (appendElement(el, domBuilder, currentNSMap)) {
parseStack.push(el);
}
}
if (el.uri === 'http://www.w3.org/1999/xhtml' && !el.closed) {
end = parseHtmlSpecialContent(source, end, el.tagName, entityReplacer, domBuilder);
} else {
end++;
}
}
} catch (e) {
errorHandler.error('element parse error: ' + e);
end = -1;
}
if (end > start) {
start = end;
} else {
appendText(Math.max(tagStart, start) + 1);
}
}
}
function copyLocator(f, t) {
t.lineNumber = f.lineNumber;
t.columnNumber = f.columnNumber;
return t;
}
function parseElementStartPart(source, start, el, currentNSMap, entityReplacer, errorHandler) {
var attrName;
var value;
var p = ++start;
var s = S_TAG;
while (true) {
var c = source.charAt(p);
switch (c) {
case '=':
if (s === S_ATTR) {
attrName = source.slice(start, p);
s = S_EQ;
} else if (s === S_ATTR_SPACE) {
s = S_EQ;
} else {
throw new Error('attribute equal must after attrName');
}
break;
case '\'':
case '"':
if (s === S_EQ || s === S_ATTR) {
if (s === S_ATTR) {
errorHandler.warning('attribute value must after "="');
attrName = source.slice(start, p);
}
start = p + 1;
p = source.indexOf(c, start);
if (p > 0) {
value = source.slice(start, p).replace(/&#?\w+;/g, entityReplacer);
el.add(attrName, value, start - 1);
s = S_ATTR_END;
} else {
throw new Error('attribute value no end \'' + c + '\' match');
}
} else if (s == S_ATTR_NOQUOT_VALUE) {
value = source.slice(start, p).replace(/&#?\w+;/g, entityReplacer);
el.add(attrName, value, start);
errorHandler.warning('attribute "' + attrName + '" missed start quot(' + c + ')!!');
start = p + 1;
s = S_ATTR_END;
} else {
throw new Error('attribute value must after "="');
}
break;
case '/':
switch (s) {
case S_TAG:
el.setTagName(source.slice(start, p));
case S_ATTR_END:
case S_TAG_SPACE:
case S_TAG_CLOSE:
s = S_TAG_CLOSE;
el.closed = true;
case S_ATTR_NOQUOT_VALUE:
case S_ATTR:
case S_ATTR_SPACE:
break;
default:
throw new Error("attribute invalid close char('/')");
}
break;
case '':
errorHandler.error('unexpected end of input');
if (s == S_TAG) {
el.setTagName(source.slice(start, p));
}
return p;
case '>':
switch (s) {
case S_TAG:
el.setTagName(source.slice(start, p));
case S_ATTR_END:
case S_TAG_SPACE:
case S_TAG_CLOSE:
break;
case S_ATTR_NOQUOT_VALUE:
case S_ATTR:
value = source.slice(start, p);
if (value.slice(-1) === '/') {
el.closed = true;
value = value.slice(0, -1);
}
case S_ATTR_SPACE:
if (s === S_ATTR_SPACE) {
value = attrName;
}
if (s == S_ATTR_NOQUOT_VALUE) {
errorHandler.warning('attribute "' + value + '" missed quot(")!!');
el.add(attrName, value.replace(/&#?\w+;/g, entityReplacer), start);
} else {
if (currentNSMap[''] !== 'http://www.w3.org/1999/xhtml' || !value.match(/^(?:disabled|checked|selected)$/i)) {
errorHandler.warning('attribute "' + value + '" missed value!! "' + value + '" instead!!');
}
el.add(value, value, start);
}
break;
case S_EQ:
throw new Error('attribute value missed!!');
}
return p;
case "\x80":
c = ' ';
default:
if (c <= ' ') {
switch (s) {
case S_TAG:
el.setTagName(source.slice(start, p));
s = S_TAG_SPACE;
break;
case S_ATTR:
attrName = source.slice(start, p);
s = S_ATTR_SPACE;
break;
case S_ATTR_NOQUOT_VALUE:
var value = source.slice(start, p).replace(/&#?\w+;/g, entityReplacer);
errorHandler.warning('attribute "' + value + '" missed quot(")!!');
el.add(attrName, value, start);
case S_ATTR_END:
s = S_TAG_SPACE;
break;
}
} else {
switch (s) {
case S_ATTR_SPACE:
var tagName = el.tagName;
if (currentNSMap[''] !== 'http://www.w3.org/1999/xhtml' || !attrName.match(/^(?:disabled|checked|selected)$/i)) {
errorHandler.warning('attribute "' + attrName + '" missed value!! "' + attrName + '" instead2!!');
}
el.add(attrName, attrName, start);
start = p;
s = S_ATTR;
break;
case S_ATTR_END:
errorHandler.warning('attribute space is required"' + attrName + '"!!');
case S_TAG_SPACE:
s = S_ATTR;
start = p;
break;
case S_EQ:
s = S_ATTR_NOQUOT_VALUE;
start = p;
break;
case S_TAG_CLOSE:
throw new Error("elements closed character '/' and '>' must be connected to");
}
}
}
p++;
}
}
function appendElement(el, domBuilder, currentNSMap) {
var tagName = el.tagName;
var localNSMap = null;
var i = el.length;
while (i--) {
var a = el[i];
var qName = a.qName;
var value = a.value;
var nsp = qName.indexOf(':');
if (nsp > 0) {
var prefix = a.prefix = qName.slice(0, nsp);
var localName = qName.slice(nsp + 1);
var nsPrefix = prefix === 'xmlns' && localName;
} else {
localName = qName;
prefix = null;
nsPrefix = qName === 'xmlns' && '';
}
a.localName = localName;
if (nsPrefix !== false) {
if (localNSMap == null) {
localNSMap = {};
_copy(currentNSMap, currentNSMap = {});
}
currentNSMap[nsPrefix] = localNSMap[nsPrefix] = value;
a.uri = 'http://www.w3.org/2000/xmlns/';
domBuilder.startPrefixMapping(nsPrefix, value);
}
}
var i = el.length;
while (i--) {
a = el[i];
var prefix = a.prefix;
if (prefix) {
if (prefix === 'xml') {
a.uri = 'http://www.w3.org/XML/1998/namespace';
}if (prefix !== 'xmlns') {
a.uri = currentNSMap[prefix || ''];
}
}
}
var nsp = tagName.indexOf(':');
if (nsp > 0) {
prefix = el.prefix = tagName.slice(0, nsp);
localName = el.localName = tagName.slice(nsp + 1);
} else {
prefix = null;
localName = el.localName = tagName;
}
var ns = el.uri = currentNSMap[prefix || ''];
domBuilder.startElement(ns, localName, tagName, el);
if (el.closed) {
domBuilder.endElement(ns, localName, tagName);
if (localNSMap) {
for (prefix in localNSMap) {
domBuilder.endPrefixMapping(prefix);
}
}
} else {
el.currentNSMap = currentNSMap;
el.localNSMap = localNSMap;
return true;
}
}
function parseHtmlSpecialContent(source, elStartEnd, tagName, entityReplacer, domBuilder) {
if (/^(?:script|textarea)$/i.test(tagName)) {
var elEndStart = source.indexOf('</' + tagName + '>', elStartEnd);
var text = source.substring(elStartEnd + 1, elEndStart);
if (/[&<]/.test(text)) {
if (/^script$/i.test(tagName)) {
domBuilder.characters(text, 0, text.length);
return elEndStart;
}
text = text.replace(/&#?\w+;/g, entityReplacer);
domBuilder.characters(text, 0, text.length);
return elEndStart;
}
}
return elStartEnd + 1;
}
function fixSelfClosed(source, elStartEnd, tagName, closeMap) {
var pos = closeMap[tagName];
if (pos == null) {
pos = source.lastIndexOf('</' + tagName + '>');
if (pos < elStartEnd) {
pos = source.lastIndexOf('</' + tagName);
}
closeMap[tagName] = pos;
}
return pos < elStartEnd;
}
function _copy(source, target) {
for (var n in source) {
target[n] = source[n];
}
}
function parseDCC(source, start, domBuilder, errorHandler) {
var next = source.charAt(start + 2);
switch (next) {
case '-':
if (source.charAt(start + 3) === '-') {
var end = source.indexOf('-->', start + 4);
if (end > start) {
domBuilder.comment(source, start + 4, end - start - 4);
return end + 3;
} else {
errorHandler.error("Unclosed comment");
return -1;
}
} else {
return -1;
}
default:
if (source.substr(start + 3, 6) == 'CDATA[') {
var end = source.indexOf(']]>', start + 9);
domBuilder.startCDATA();
domBuilder.characters(source, start + 9, end - start - 9);
domBuilder.endCDATA();
return end + 3;
}
var matchs = split(source, start);
var len = matchs.length;
if (len > 1 && /!doctype/i.test(matchs[0][0])) {
var name = matchs[1][0];
var pubid = len > 3 && /^public$/i.test(matchs[2][0]) && matchs[3][0];
var sysid = len > 4 && matchs[4][0];
var lastMatch = matchs[len - 1];
domBuilder.startDTD(name, pubid && pubid.replace(/^(['"])(.*?)\1$/, '$2'), sysid && sysid.replace(/^(['"])(.*?)\1$/, '$2'));
domBuilder.endDTD();
return lastMatch.index + lastMatch[0].length;
}
}
return -1;
}
function parseInstruction(source, start, domBuilder) {
var end = source.indexOf('?>', start);
if (end) {
var match = source.substring(start, end).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);
if (match) {
var len = match[0].length;
domBuilder.processingInstruction(match[1], match[2]);
return end + 2;
} else {
return -1;
}
}
return -1;
}
function ElementAttributes(source) {}
ElementAttributes.prototype = {
setTagName: function setTagName(tagName) {
if (!tagNamePattern.test(tagName)) {
throw new Error('invalid tagName:' + tagName);
}
this.tagName = tagName;
},
add: function add(qName, value, offset) {
if (!tagNamePattern.test(qName)) {
throw new Error('invalid attribute:' + qName);
}
this[this.length++] = { qName: qName, value: value, offset: offset };
},
length: 0,
getLocalName: function getLocalName(i) {
return this[i].localName;
},
getLocator: function getLocator(i) {
return this[i].locator;
},
getQName: function getQName(i) {
return this[i].qName;
},
getURI: function getURI(i) {
return this[i].uri;
},
getValue: function getValue(i) {
return this[i].value;
}
};
function _set_proto_(thiz, parent) {
thiz.__proto__ = parent;
return thiz;
}
if (!(_set_proto_({}, _set_proto_.prototype) instanceof _set_proto_)) {
_set_proto_ = function _set_proto_(thiz, parent) {
function p() {};
p.prototype = parent;
p = new p();
for (parent in thiz) {
p[parent] = thiz[parent];
}
return p;
};
}
function split(source, start) {
var match;
var buf = [];
var reg = /'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;
reg.lastIndex = start;
reg.exec(source);
while (match = reg.exec(source)) {
buf.push(match);
if (match[1]) return buf;
}
}
exports.XMLReader = XMLReader;
}, 462, null, "xmldom/sax.js");
__d(/* xmldom/dom.js */function(global, require, module, exports) {
function copy(src, dest) {
for (var p in src) {
dest[p] = src[p];
}
}
function _extends(Class, Super) {
var pt = Class.prototype;
if (Object.create) {
var ppt = Object.create(Super.prototype);
pt.__proto__ = ppt;
}
if (!(pt instanceof Super)) {
function t() {};
t.prototype = Super.prototype;
t = new t();
copy(pt, t);
Class.prototype = pt = t;
}
if (pt.constructor != Class) {
if (typeof Class != 'function') {
console.error("unknow Class:" + Class);
}
pt.constructor = Class;
}
}
var htmlns = 'http://www.w3.org/1999/xhtml';
var NodeType = {};
var ELEMENT_NODE = NodeType.ELEMENT_NODE = 1;
var ATTRIBUTE_NODE = NodeType.ATTRIBUTE_NODE = 2;
var TEXT_NODE = NodeType.TEXT_NODE = 3;
var CDATA_SECTION_NODE = NodeType.CDATA_SECTION_NODE = 4;
var ENTITY_REFERENCE_NODE = NodeType.ENTITY_REFERENCE_NODE = 5;
var ENTITY_NODE = NodeType.ENTITY_NODE = 6;
var PROCESSING_INSTRUCTION_NODE = NodeType.PROCESSING_INSTRUCTION_NODE = 7;
var COMMENT_NODE = NodeType.COMMENT_NODE = 8;
var DOCUMENT_NODE = NodeType.DOCUMENT_NODE = 9;
var DOCUMENT_TYPE_NODE = NodeType.DOCUMENT_TYPE_NODE = 10;
var DOCUMENT_FRAGMENT_NODE = NodeType.DOCUMENT_FRAGMENT_NODE = 11;
var NOTATION_NODE = NodeType.NOTATION_NODE = 12;
var ExceptionCode = {};
var ExceptionMessage = {};
var INDEX_SIZE_ERR = ExceptionCode.INDEX_SIZE_ERR = (ExceptionMessage[1] = "Index size error", 1);
var DOMSTRING_SIZE_ERR = ExceptionCode.DOMSTRING_SIZE_ERR = (ExceptionMessage[2] = "DOMString size error", 2);
var HIERARCHY_REQUEST_ERR = ExceptionCode.HIERARCHY_REQUEST_ERR = (ExceptionMessage[3] = "Hierarchy request error", 3);
var WRONG_DOCUMENT_ERR = ExceptionCode.WRONG_DOCUMENT_ERR = (ExceptionMessage[4] = "Wrong document", 4);
var INVALID_CHARACTER_ERR = ExceptionCode.INVALID_CHARACTER_ERR = (ExceptionMessage[5] = "Invalid character", 5);
var NO_DATA_ALLOWED_ERR = ExceptionCode.NO_DATA_ALLOWED_ERR = (ExceptionMessage[6] = "No data allowed", 6);
var NO_MODIFICATION_ALLOWED_ERR = ExceptionCode.NO_MODIFICATION_ALLOWED_ERR = (ExceptionMessage[7] = "No modification allowed", 7);
var NOT_FOUND_ERR = ExceptionCode.NOT_FOUND_ERR = (ExceptionMessage[8] = "Not found", 8);
var NOT_SUPPORTED_ERR = ExceptionCode.NOT_SUPPORTED_ERR = (ExceptionMessage[9] = "Not supported", 9);
var INUSE_ATTRIBUTE_ERR = ExceptionCode.INUSE_ATTRIBUTE_ERR = (ExceptionMessage[10] = "Attribute in use", 10);
var INVALID_STATE_ERR = ExceptionCode.INVALID_STATE_ERR = (ExceptionMessage[11] = "Invalid state", 11);
var SYNTAX_ERR = ExceptionCode.SYNTAX_ERR = (ExceptionMessage[12] = "Syntax error", 12);
var INVALID_MODIFICATION_ERR = ExceptionCode.INVALID_MODIFICATION_ERR = (ExceptionMessage[13] = "Invalid modification", 13);
var NAMESPACE_ERR = ExceptionCode.NAMESPACE_ERR = (ExceptionMessage[14] = "Invalid namespace", 14);
var INVALID_ACCESS_ERR = ExceptionCode.INVALID_ACCESS_ERR = (ExceptionMessage[15] = "Invalid access", 15);
function DOMException(code, message) {
if (message instanceof Error) {
var error = message;
} else {
error = this;
Error.call(this, ExceptionMessage[code]);
this.message = ExceptionMessage[code];
if (Error.captureStackTrace) Error.captureStackTrace(this, DOMException);
}
error.code = code;
if (message) this.message = this.message + ": " + message;
return error;
};
DOMException.prototype = Error.prototype;
copy(ExceptionCode, DOMException);
function NodeList() {};
NodeList.prototype = {
length: 0,
item: function item(index) {
return this[index] || null;
},
toString: function toString(isHTML, nodeFilter) {
for (var buf = [], i = 0; i < this.length; i++) {
serializeToString(this[i], buf, isHTML, nodeFilter);
}
return buf.join('');
}
};
function LiveNodeList(node, refresh) {
this._node = node;
this._refresh = refresh;
_updateLiveList(this);
}
function _updateLiveList(list) {
var inc = list._node._inc || list._node.ownerDocument._inc;
if (list._inc != inc) {
var ls = list._refresh(list._node);
__set__(list, 'length', ls.length);
copy(ls, list);
list._inc = inc;
}
}
LiveNodeList.prototype.item = function (i) {
_updateLiveList(this);
return this[i];
};
_extends(LiveNodeList, NodeList);
function NamedNodeMap() {};
function _findNodeIndex(list, node) {
var i = list.length;
while (i--) {
if (list[i] === node) {
return i;
}
}
}
function _addNamedNode(el, list, newAttr, oldAttr) {
if (oldAttr) {
list[_findNodeIndex(list, oldAttr)] = newAttr;
} else {
list[list.length++] = newAttr;
}
if (el) {
newAttr.ownerElement = el;
var doc = el.ownerDocument;
if (doc) {
oldAttr && _onRemoveAttribute(doc, el, oldAttr);
_onAddAttribute(doc, el, newAttr);
}
}
}
function _removeNamedNode(el, list, attr) {
var i = _findNodeIndex(list, attr);
if (i >= 0) {
var lastIndex = list.length - 1;
while (i < lastIndex) {
list[i] = list[++i];
}
list.length = lastIndex;
if (el) {
var doc = el.ownerDocument;
if (doc) {
_onRemoveAttribute(doc, el, attr);
attr.ownerElement = null;
}
}
} else {
throw DOMException(NOT_FOUND_ERR, new Error(el.tagName + '@' + attr));
}
}
NamedNodeMap.prototype = {
length: 0,
item: NodeList.prototype.item,
getNamedItem: function getNamedItem(key) {
var i = this.length;
while (i--) {
var attr = this[i];
if (attr.nodeName == key) {
return attr;
}
}
},
setNamedItem: function setNamedItem(attr) {
var el = attr.ownerElement;
if (el && el != this._ownerElement) {
throw new DOMException(INUSE_ATTRIBUTE_ERR);
}
var oldAttr = this.getNamedItem(attr.nodeName);
_addNamedNode(this._ownerElement, this, attr, oldAttr);
return oldAttr;
},
setNamedItemNS: function setNamedItemNS(attr) {
var el = attr.ownerElement,
oldAttr;
if (el && el != this._ownerElement) {
throw new DOMException(INUSE_ATTRIBUTE_ERR);
}
oldAttr = this.getNamedItemNS(attr.namespaceURI, attr.localName);
_addNamedNode(this._ownerElement, this, attr, oldAttr);
return oldAttr;
},
removeNamedItem: function removeNamedItem(key) {
var attr = this.getNamedItem(key);
_removeNamedNode(this._ownerElement, this, attr);
return attr;
},
removeNamedItemNS: function removeNamedItemNS(namespaceURI, localName) {
var attr = this.getNamedItemNS(namespaceURI, localName);
_removeNamedNode(this._ownerElement, this, attr);
return attr;
},
getNamedItemNS: function getNamedItemNS(namespaceURI, localName) {
var i = this.length;
while (i--) {
var node = this[i];
if (node.localName == localName && node.namespaceURI == namespaceURI) {
return node;
}
}
return null;
}
};
function DOMImplementation(features) {
this._features = {};
if (features) {
for (var feature in features) {
this._features = features[feature];
}
}
};
DOMImplementation.prototype = {
hasFeature: function hasFeature(feature, version) {
var versions = this._features[feature.toLowerCase()];
if (versions && (!version || version in versions)) {
return true;
} else {
return false;
}
},
createDocument: function createDocument(namespaceURI, qualifiedName, doctype) {
var doc = new Document();
doc.implementation = this;
doc.childNodes = new NodeList();
doc.doctype = doctype;
if (doctype) {
doc.appendChild(doctype);
}
if (qualifiedName) {
var root = doc.createElementNS(namespaceURI, qualifiedName);
doc.appendChild(root);
}
return doc;
},
createDocumentType: function createDocumentType(qualifiedName, publicId, systemId) {
var node = new DocumentType();
node.name = qualifiedName;
node.nodeName = qualifiedName;
node.publicId = publicId;
node.systemId = systemId;
return node;
}
};
function Node() {};
Node.prototype = {
firstChild: null,
lastChild: null,
previousSibling: null,
nextSibling: null,
attributes: null,
parentNode: null,
childNodes: null,
ownerDocument: null,
nodeValue: null,
namespaceURI: null,
prefix: null,
localName: null,
insertBefore: function insertBefore(newChild, refChild) {
return _insertBefore(this, newChild, refChild);
},
replaceChild: function replaceChild(newChild, oldChild) {
this.insertBefore(newChild, oldChild);
if (oldChild) {
this.removeChild(oldChild);
}
},
removeChild: function removeChild(oldChild) {
return _removeChild(this, oldChild);
},
appendChild: function appendChild(newChild) {
return this.insertBefore(newChild, null);
},
hasChildNodes: function hasChildNodes() {
return this.firstChild != null;
},
cloneNode: function cloneNode(deep) {
return _cloneNode(this.ownerDocument || this, this, deep);
},
normalize: function normalize() {
var child = this.firstChild;
while (child) {
var next = child.nextSibling;
if (next && next.nodeType == TEXT_NODE && child.nodeType == TEXT_NODE) {
this.removeChild(next);
child.appendData(next.data);
} else {
child.normalize();
child = next;
}
}
},
isSupported: function isSupported(feature, version) {
return this.ownerDocument.implementation.hasFeature(feature, version);
},
hasAttributes: function hasAttributes() {
return this.attributes.length > 0;
},
lookupPrefix: function lookupPrefix(namespaceURI) {
var el = this;
while (el) {
var map = el._nsMap;
if (map) {
for (var n in map) {
if (map[n] == namespaceURI) {
return n;
}
}
}
el = el.nodeType == ATTRIBUTE_NODE ? el.ownerDocument : el.parentNode;
}
return null;
},
lookupNamespaceURI: function lookupNamespaceURI(prefix) {
var el = this;
while (el) {
var map = el._nsMap;
if (map) {
if (prefix in map) {
return map[prefix];
}
}
el = el.nodeType == ATTRIBUTE_NODE ? el.ownerDocument : el.parentNode;
}
return null;
},
isDefaultNamespace: function isDefaultNamespace(namespaceURI) {
var prefix = this.lookupPrefix(namespaceURI);
return prefix == null;
}
};
function _xmlEncoder(c) {
return c == '<' && '&lt;' || c == '>' && '&gt;' || c == '&' && '&amp;' || c == '"' && '&quot;' || '&#' + c.charCodeAt() + ';';
}
copy(NodeType, Node);
copy(NodeType, Node.prototype);
function _visitNode(node, callback) {
if (callback(node)) {
return true;
}
if (node = node.firstChild) {
do {
if (_visitNode(node, callback)) {
return true;
}
} while (node = node.nextSibling);
}
}
function Document() {}
function _onAddAttribute(doc, el, newAttr) {
doc && doc._inc++;
var ns = newAttr.namespaceURI;
if (ns == 'http://www.w3.org/2000/xmlns/') {
el._nsMap[newAttr.prefix ? newAttr.localName : ''] = newAttr.value;
}
}
function _onRemoveAttribute(doc, el, newAttr, remove) {
doc && doc._inc++;
var ns = newAttr.namespaceURI;
if (ns == 'http://www.w3.org/2000/xmlns/') {
delete el._nsMap[newAttr.prefix ? newAttr.localName : ''];
}
}
function _onUpdateChild(doc, el, newChild) {
if (doc && doc._inc) {
doc._inc++;
var cs = el.childNodes;
if (newChild) {
cs[cs.length++] = newChild;
} else {
var child = el.firstChild;
var i = 0;
while (child) {
cs[i++] = child;
child = child.nextSibling;
}
cs.length = i;
}
}
}
function _removeChild(parentNode, child) {
var previous = child.previousSibling;
var next = child.nextSibling;
if (previous) {
previous.nextSibling = next;
} else {
parentNode.firstChild = next;
}
if (next) {
next.previousSibling = previous;
} else {
parentNode.lastChild = previous;
}
_onUpdateChild(parentNode.ownerDocument, parentNode);
return child;
}
function _insertBefore(parentNode, newChild, nextChild) {
var cp = newChild.parentNode;
if (cp) {
cp.removeChild(newChild);
}
if (newChild.nodeType === DOCUMENT_FRAGMENT_NODE) {
var newFirst = newChild.firstChild;
if (newFirst == null) {
return newChild;
}
var newLast = newChild.lastChild;
} else {
newFirst = newLast = newChild;
}
var pre = nextChild ? nextChild.previousSibling : parentNode.lastChild;
newFirst.previousSibling = pre;
newLast.nextSibling = nextChild;
if (pre) {
pre.nextSibling = newFirst;
} else {
parentNode.firstChild = newFirst;
}
if (nextChild == null) {
parentNode.lastChild = newLast;
} else {
nextChild.previousSibling = newLast;
}
do {
newFirst.parentNode = parentNode;
} while (newFirst !== newLast && (newFirst = newFirst.nextSibling));
_onUpdateChild(parentNode.ownerDocument || parentNode, parentNode);
if (newChild.nodeType == DOCUMENT_FRAGMENT_NODE) {
newChild.firstChild = newChild.lastChild = null;
}
return newChild;
}
function _appendSingleChild(parentNode, newChild) {
var cp = newChild.parentNode;
if (cp) {
var pre = parentNode.lastChild;
cp.removeChild(newChild);
var pre = parentNode.lastChild;
}
var pre = parentNode.lastChild;
newChild.parentNode = parentNode;
newChild.previousSibling = pre;
newChild.nextSibling = null;
if (pre) {
pre.nextSibling = newChild;
} else {
parentNode.firstChild = newChild;
}
parentNode.lastChild = newChild;
_onUpdateChild(parentNode.ownerDocument, parentNode, newChild);
return newChild;
}
Document.prototype = {
nodeName: '#document',
nodeType: DOCUMENT_NODE,
doctype: null,
documentElement: null,
_inc: 1,
insertBefore: function insertBefore(newChild, refChild) {
if (newChild.nodeType == DOCUMENT_FRAGMENT_NODE) {
var child = newChild.firstChild;
while (child) {
var next = child.nextSibling;
this.insertBefore(child, refChild);
child = next;
}
return newChild;
}
if (this.documentElement == null && newChild.nodeType == ELEMENT_NODE) {
this.documentElement = newChild;
}
return _insertBefore(this, newChild, refChild), newChild.ownerDocument = this, newChild;
},
removeChild: function removeChild(oldChild) {
if (this.documentElement == oldChild) {
this.documentElement = null;
}
return _removeChild(this, oldChild);
},
importNode: function importNode(importedNode, deep) {
return _importNode(this, importedNode, deep);
},
getElementById: function getElementById(id) {
var rtv = null;
_visitNode(this.documentElement, function (node) {
if (node.nodeType == ELEMENT_NODE) {
if (node.getAttribute('id') == id) {
rtv = node;
return true;
}
}
});
return rtv;
},
createElement: function createElement(tagName) {
var node = new Element();
node.ownerDocument = this;
node.nodeName = tagName;
node.tagName = tagName;
node.childNodes = new NodeList();
var attrs = node.attributes = new NamedNodeMap();
attrs._ownerElement = node;
return node;
},
createDocumentFragment: function createDocumentFragment() {
var node = new DocumentFragment();
node.ownerDocument = this;
node.childNodes = new NodeList();
return node;
},
createTextNode: function createTextNode(data) {
var node = new Text();
node.ownerDocument = this;
node.appendData(data);
return node;
},
createComment: function createComment(data) {
var node = new Comment();
node.ownerDocument = this;
node.appendData(data);
return node;
},
createCDATASection: function createCDATASection(data) {
var node = new CDATASection();
node.ownerDocument = this;
node.appendData(data);
return node;
},
createProcessingInstruction: function createProcessingInstruction(target, data) {
var node = new ProcessingInstruction();
node.ownerDocument = this;
node.tagName = node.target = target;
node.nodeValue = node.data = data;
return node;
},
createAttribute: function createAttribute(name) {
var node = new Attr();
node.ownerDocument = this;
node.name = name;
node.nodeName = name;
node.localName = name;
node.specified = true;
return node;
},
createEntityReference: function createEntityReference(name) {
var node = new EntityReference();
node.ownerDocument = this;
node.nodeName = name;
return node;
},
createElementNS: function createElementNS(namespaceURI, qualifiedName) {
var node = new Element();
var pl = qualifiedName.split(':');
var attrs = node.attributes = new NamedNodeMap();
node.childNodes = new NodeList();
node.ownerDocument = this;
node.nodeName = qualifiedName;
node.tagName = qualifiedName;
node.namespaceURI = namespaceURI;
if (pl.length == 2) {
node.prefix = pl[0];
node.localName = pl[1];
} else {
node.localName = qualifiedName;
}
attrs._ownerElement = node;
return node;
},
createAttributeNS: function createAttributeNS(namespaceURI, qualifiedName) {
var node = new Attr();
var pl = qualifiedName.split(':');
node.ownerDocument = this;
node.nodeName = qualifiedName;
node.name = qualifiedName;
node.namespaceURI = namespaceURI;
node.specified = true;
if (pl.length == 2) {
node.prefix = pl[0];
node.localName = pl[1];
} else {
node.localName = qualifiedName;
}
return node;
}
};
_extends(Document, Node);
function Element() {
this._nsMap = {};
};
Element.prototype = {
nodeType: ELEMENT_NODE,
hasAttribute: function hasAttribute(name) {
return this.getAttributeNode(name) != null;
},
getAttribute: function getAttribute(name) {
var attr = this.getAttributeNode(name);
return attr && attr.value || '';
},
getAttributeNode: function getAttributeNode(name) {
return this.attributes.getNamedItem(name);
},
setAttribute: function setAttribute(name, value) {
var attr = this.ownerDocument.createAttribute(name);
attr.value = attr.nodeValue = "" + value;
this.setAttributeNode(attr);
},
removeAttribute: function removeAttribute(name) {
var attr = this.getAttributeNode(name);
attr && this.removeAttributeNode(attr);
},
appendChild: function appendChild(newChild) {
if (newChild.nodeType === DOCUMENT_FRAGMENT_NODE) {
return this.insertBefore(newChild, null);
} else {
return _appendSingleChild(this, newChild);
}
},
setAttributeNode: function setAttributeNode(newAttr) {
return this.attributes.setNamedItem(newAttr);
},
setAttributeNodeNS: function setAttributeNodeNS(newAttr) {
return this.attributes.setNamedItemNS(newAttr);
},
removeAttributeNode: function removeAttributeNode(oldAttr) {
return this.attributes.removeNamedItem(oldAttr.nodeName);
},
removeAttributeNS: function removeAttributeNS(namespaceURI, localName) {
var old = this.getAttributeNodeNS(namespaceURI, localName);
old && this.removeAttributeNode(old);
},
hasAttributeNS: function hasAttributeNS(namespaceURI, localName) {
return this.getAttributeNodeNS(namespaceURI, localName) != null;
},
getAttributeNS: function getAttributeNS(namespaceURI, localName) {
var attr = this.getAttributeNodeNS(namespaceURI, localName);
return attr && attr.value || '';
},
setAttributeNS: function setAttributeNS(namespaceURI, qualifiedName, value) {
var attr = this.ownerDocument.createAttributeNS(namespaceURI, qualifiedName);
attr.value = attr.nodeValue = "" + value;
this.setAttributeNode(attr);
},
getAttributeNodeNS: function getAttributeNodeNS(namespaceURI, localName) {
return this.attributes.getNamedItemNS(namespaceURI, localName);
},
getElementsByTagName: function getElementsByTagName(tagName) {
return new LiveNodeList(this, function (base) {
var ls = [];
_visitNode(base, function (node) {
if (node !== base && node.nodeType == ELEMENT_NODE && (tagName === '*' || node.tagName == tagName)) {
ls.push(node);
}
});
return ls;
});
},
getElementsByTagNameNS: function getElementsByTagNameNS(namespaceURI, localName) {
return new LiveNodeList(this, function (base) {
var ls = [];
_visitNode(base, function (node) {
if (node !== base && node.nodeType === ELEMENT_NODE && (namespaceURI === '*' || node.namespaceURI === namespaceURI) && (localName === '*' || node.localName == localName)) {
ls.push(node);
}
});
return ls;
});
}
};
Document.prototype.getElementsByTagName = Element.prototype.getElementsByTagName;
Document.prototype.getElementsByTagNameNS = Element.prototype.getElementsByTagNameNS;
_extends(Element, Node);
function Attr() {};
Attr.prototype.nodeType = ATTRIBUTE_NODE;
_extends(Attr, Node);
function CharacterData() {};
CharacterData.prototype = {
data: '',
substringData: function substringData(offset, count) {
return this.data.substring(offset, offset + count);
},
appendData: function appendData(text) {
text = this.data + text;
this.nodeValue = this.data = text;
this.length = text.length;
},
insertData: function insertData(offset, text) {
this.replaceData(offset, 0, text);
},
appendChild: function appendChild(newChild) {
throw new Error(ExceptionMessage[HIERARCHY_REQUEST_ERR]);
},
deleteData: function deleteData(offset, count) {
this.replaceData(offset, count, "");
},
replaceData: function replaceData(offset, count, text) {
var start = this.data.substring(0, offset);
var end = this.data.substring(offset + count);
text = start + text + end;
this.nodeValue = this.data = text;
this.length = text.length;
}
};
_extends(CharacterData, Node);
function Text() {};
Text.prototype = {
nodeName: "#text",
nodeType: TEXT_NODE,
splitText: function splitText(offset) {
var text = this.data;
var newText = text.substring(offset);
text = text.substring(0, offset);
this.data = this.nodeValue = text;
this.length = text.length;
var newNode = this.ownerDocument.createTextNode(newText);
if (this.parentNode) {
this.parentNode.insertBefore(newNode, this.nextSibling);
}
return newNode;
}
};
_extends(Text, CharacterData);
function Comment() {};
Comment.prototype = {
nodeName: "#comment",
nodeType: COMMENT_NODE
};
_extends(Comment, CharacterData);
function CDATASection() {};
CDATASection.prototype = {
nodeName: "#cdata-section",
nodeType: CDATA_SECTION_NODE
};
_extends(CDATASection, CharacterData);
function DocumentType() {};
DocumentType.prototype.nodeType = DOCUMENT_TYPE_NODE;
_extends(DocumentType, Node);
function Notation() {};
Notation.prototype.nodeType = NOTATION_NODE;
_extends(Notation, Node);
function Entity() {};
Entity.prototype.nodeType = ENTITY_NODE;
_extends(Entity, Node);
function EntityReference() {};
EntityReference.prototype.nodeType = ENTITY_REFERENCE_NODE;
_extends(EntityReference, Node);
function DocumentFragment() {};
DocumentFragment.prototype.nodeName = "#document-fragment";
DocumentFragment.prototype.nodeType = DOCUMENT_FRAGMENT_NODE;
_extends(DocumentFragment, Node);
function ProcessingInstruction() {}
ProcessingInstruction.prototype.nodeType = PROCESSING_INSTRUCTION_NODE;
_extends(ProcessingInstruction, Node);
function XMLSerializer() {}
XMLSerializer.prototype.serializeToString = function (node, isHtml, nodeFilter) {
return nodeSerializeToString.call(node, isHtml, nodeFilter);
};
Node.prototype.toString = nodeSerializeToString;
function nodeSerializeToString(isHtml, nodeFilter) {
var buf = [];
var refNode = this.nodeType == 9 ? this.documentElement : this;
var prefix = refNode.prefix;
var uri = refNode.namespaceURI;
if (uri && prefix == null) {
var prefix = refNode.lookupPrefix(uri);
if (prefix == null) {
var visibleNamespaces = [{ namespace: uri, prefix: null }];
}
}
serializeToString(this, buf, isHtml, nodeFilter, visibleNamespaces);
return buf.join('');
}
function needNamespaceDefine(node, isHTML, visibleNamespaces) {
var prefix = node.prefix || '';
var uri = node.namespaceURI;
if (!prefix && !uri) {
return false;
}
if (prefix === "xml" && uri === "http://www.w3.org/XML/1998/namespace" || uri == 'http://www.w3.org/2000/xmlns/') {
return false;
}
var i = visibleNamespaces.length;
while (i--) {
var ns = visibleNamespaces[i];
if (ns.prefix == prefix) {
return ns.namespace != uri;
}
}
return true;
}
function serializeToString(node, buf, isHTML, nodeFilter, visibleNamespaces) {
if (nodeFilter) {
node = nodeFilter(node);
if (node) {
if (typeof node == 'string') {
buf.push(node);
return;
}
} else {
return;
}
}
switch (node.nodeType) {
case ELEMENT_NODE:
if (!visibleNamespaces) visibleNamespaces = [];
var startVisibleNamespaces = visibleNamespaces.length;
var attrs = node.attributes;
var len = attrs.length;
var child = node.firstChild;
var nodeName = node.tagName;
isHTML = htmlns === node.namespaceURI || isHTML;
buf.push('<', nodeName);
for (var i = 0; i < len; i++) {
var attr = attrs.item(i);
if (attr.prefix == 'xmlns') {
visibleNamespaces.push({ prefix: attr.localName, namespace: attr.value });
} else if (attr.nodeName == 'xmlns') {
visibleNamespaces.push({ prefix: '', namespace: attr.value });
}
}
for (var i = 0; i < len; i++) {
var attr = attrs.item(i);
if (needNamespaceDefine(attr, isHTML, visibleNamespaces)) {
var prefix = attr.prefix || '';
var uri = attr.namespaceURI;
var ns = prefix ? ' xmlns:' + prefix : " xmlns";
buf.push(ns, '="', uri, '"');
visibleNamespaces.push({ prefix: prefix, namespace: uri });
}
serializeToString(attr, buf, isHTML, nodeFilter, visibleNamespaces);
}
if (needNamespaceDefine(node, isHTML, visibleNamespaces)) {
var prefix = node.prefix || '';
var uri = node.namespaceURI;
var ns = prefix ? ' xmlns:' + prefix : " xmlns";
buf.push(ns, '="', uri, '"');
visibleNamespaces.push({ prefix: prefix, namespace: uri });
}
if (child || isHTML && !/^(?:meta|link|img|br|hr|input)$/i.test(nodeName)) {
buf.push('>');
if (isHTML && /^script$/i.test(nodeName)) {
while (child) {
if (child.data) {
buf.push(child.data);
} else {
serializeToString(child, buf, isHTML, nodeFilter, visibleNamespaces);
}
child = child.nextSibling;
}
} else {
while (child) {
serializeToString(child, buf, isHTML, nodeFilter, visibleNamespaces);
child = child.nextSibling;
}
}
buf.push('</', nodeName, '>');
} else {
buf.push('/>');
}
return;
case DOCUMENT_NODE:
case DOCUMENT_FRAGMENT_NODE:
var child = node.firstChild;
while (child) {
serializeToString(child, buf, isHTML, nodeFilter, visibleNamespaces);
child = child.nextSibling;
}
return;
case ATTRIBUTE_NODE:
return buf.push(' ', node.name, '="', node.value.replace(/[<&"]/g, _xmlEncoder), '"');
case TEXT_NODE:
return buf.push(node.data.replace(/[<&]/g, _xmlEncoder));
case CDATA_SECTION_NODE:
return buf.push('<![CDATA[', node.data, ']]>');
case COMMENT_NODE:
return buf.push("<!--", node.data, "-->");
case DOCUMENT_TYPE_NODE:
var pubid = node.publicId;
var sysid = node.systemId;
buf.push('<!DOCTYPE ', node.name);
if (pubid) {
buf.push(' PUBLIC "', pubid);
if (sysid && sysid != '.') {
buf.push('" "', sysid);
}
buf.push('">');
} else if (sysid && sysid != '.') {
buf.push(' SYSTEM "', sysid, '">');
} else {
var sub = node.internalSubset;
if (sub) {
buf.push(" [", sub, "]");
}
buf.push(">");
}
return;
case PROCESSING_INSTRUCTION_NODE:
return buf.push("<?", node.target, " ", node.data, "?>");
case ENTITY_REFERENCE_NODE:
return buf.push('&', node.nodeName, ';');
default:
buf.push('??', node.nodeName);
}
}
function _importNode(doc, node, deep) {
var node2;
switch (node.nodeType) {
case ELEMENT_NODE:
node2 = node.cloneNode(false);
node2.ownerDocument = doc;
case DOCUMENT_FRAGMENT_NODE:
break;
case ATTRIBUTE_NODE:
deep = true;
break;
}
if (!node2) {
node2 = node.cloneNode(false);
}
node2.ownerDocument = doc;
node2.parentNode = null;
if (deep) {
var child = node.firstChild;
while (child) {
node2.appendChild(_importNode(doc, child, deep));
child = child.nextSibling;
}
}
return node2;
}
function _cloneNode(doc, node, deep) {
var node2 = new node.constructor();
for (var n in node) {
var v = node[n];
if (typeof v != 'object') {
if (v != node2[n]) {
node2[n] = v;
}
}
}
if (node.childNodes) {
node2.childNodes = new NodeList();
}
node2.ownerDocument = doc;
switch (node2.nodeType) {
case ELEMENT_NODE:
var attrs = node.attributes;
var attrs2 = node2.attributes = new NamedNodeMap();
var len = attrs.length;
attrs2._ownerElement = node2;
for (var i = 0; i < len; i++) {
node2.setAttributeNode(_cloneNode(doc, attrs.item(i), true));
}
break;;
case ATTRIBUTE_NODE:
deep = true;
}
if (deep) {
var child = node.firstChild;
while (child) {
node2.appendChild(_cloneNode(doc, child, deep));
child = child.nextSibling;
}
}
return node2;
}
function __set__(object, key, value) {
object[key] = value;
}
try {
if (Object.defineProperty) {
Object.defineProperty(LiveNodeList.prototype, 'length', {
get: function get() {
_updateLiveList(this);
return this.$$length;
}
});
Object.defineProperty(Node.prototype, 'textContent', {
get: function get() {
return getTextContent(this);
},
set: function set(data) {
switch (this.nodeType) {
case ELEMENT_NODE:
case DOCUMENT_FRAGMENT_NODE:
while (this.firstChild) {
this.removeChild(this.firstChild);
}
if (data || String(data)) {
this.appendChild(this.ownerDocument.createTextNode(data));
}
break;
default:
this.data = data;
this.value = data;
this.nodeValue = data;
}
}
});
function getTextContent(node) {
switch (node.nodeType) {
case ELEMENT_NODE:
case DOCUMENT_FRAGMENT_NODE:
var buf = [];
node = node.firstChild;
while (node) {
if (node.nodeType !== 7 && node.nodeType !== 8) {
buf.push(getTextContent(node));
}
node = node.nextSibling;
}
return buf.join('');
default:
return node.nodeValue;
}
}
__set__ = function __set__(object, key, value) {
object['$$' + key] = value;
};
}
} catch (e) {}
exports.DOMImplementation = DOMImplementation;
exports.XMLSerializer = XMLSerializer;
}, 463, null, "xmldom/dom.js");
__d(/* jitsi-meet-logger/lib/index.js */function(global, require, module, exports) {
var Logger = require(465 ); // 465 = ./Logger
var LogCollector = require(466 ); // 466 = ./LogCollector
var idLoggers = {};
var loggers = [];
var curLevel = Logger.levels.TRACE;
module.exports = {
addGlobalTransport: function addGlobalTransport(transport) {
Logger.addGlobalTransport(transport);
},
removeGlobalTransport: function removeGlobalTransport(transport) {
Logger.removeGlobalTransport(transport);
},
getLogger: function getLogger(id, transports, format) {
var logger = new Logger(curLevel, id, transports, format);
if (id) {
idLoggers[id] = idLoggers[id] || [];
idLoggers[id].push(logger);
} else {
loggers.push(logger);
}
return logger;
},
setLogLevelById: function setLogLevelById(level, id) {
var l = id ? idLoggers[id] || [] : loggers;
for (var i = 0; i < l.length; i++) {
l[i].setLevel(level);
}
},
setLogLevel: function setLogLevel(level) {
curLevel = level;
var i = 0;
for (; i < loggers.length; i++) {
loggers[i].setLevel(level);
}
for (var id in idLoggers) {
var l = idLoggers[id] || [];
for (i = 0; i < l.length; i++) {
l[i].setLevel(level);
}
}
},
levels: Logger.levels,
LogCollector: LogCollector
};
}, 464, null, "jitsi-meet-logger/lib/index.js");
__d(/* jitsi-meet-logger/lib/Logger.js */function(global, require, module, exports) {
var levels = {
"trace": 0,
"debug": 1,
"info": 2,
"log": 3,
"warn": 4,
"error": 5
};
Logger.consoleTransport = console;
var globalTransports = [Logger.consoleTransport];
Logger.addGlobalTransport = function (transport) {
if (globalTransports.indexOf(transport) === -1) {
globalTransports.push(transport);
}
};
Logger.removeGlobalTransport = function (transport) {
var transportIdx = globalTransports.indexOf(transport);
if (transportIdx !== -1) {
globalTransports.splice(transportIdx, 1);
}
};
function getCallerInfo() {
var callerInfo = {
methodName: "",
fileLocation: "",
line: null,
column: null
};
var error = new Error();
var stack = error.stack ? error.stack.split("\n") : [];
if (!stack || stack.length < 1) {
return callerInfo;
}
var m = null;
if (stack[3]) {
m = stack[3].match(/\s*at\s*(.+?)\s*\((\S*)\s*:(\d*)\s*:(\d*)\)/);
}
if (!m || m.length <= 4) {
if (stack[2].indexOf("log@") === 0) {
callerInfo.methodName = stack[3].substr(0, stack[3].indexOf("@"));
} else {
callerInfo.methodName = stack[2].substr(0, stack[2].indexOf("@"));
}
return callerInfo;
}
callerInfo.methodName = m[1];
callerInfo.fileLocation = m[2];
callerInfo.line = m[3];
callerInfo.column = m[4];
return callerInfo;
}
function log() {
var logger = arguments[0],
level = arguments[1],
args = Array.prototype.slice.call(arguments, 2);
if (levels[level] < logger.level) {
return;
}
var callerInfo = getCallerInfo();
var transports = globalTransports.concat(logger.transports);
for (var i = 0; i < transports.length; i++) {
var t = transports[i];
var l = t[level];
if (l && typeof l === "function") {
l.bind(t, logger.id ? "[" + logger.id + "]" : "", "<" + callerInfo.methodName + ">: ").apply(t, args);
}
}
}
function Logger(level, id, transports, format) {
this.id = id;
this.format = format;
this.transports = transports;
if (!this.transports) {
this.transports = [];
}
this.level = levels[level];
var methods = Object.keys(levels);
for (var i = 0; i < methods.length; i++) {
this[methods[i]] = log.bind(null, this, methods[i]);
}
}
Logger.prototype.setLevel = function (level) {
this.level = levels[level];
};
module.exports = Logger;
Logger.levels = {
TRACE: "trace",
DEBUG: "debug",
INFO: "info",
LOG: "log",
WARN: "warn",
ERROR: "error"
};
}, 465, null, "jitsi-meet-logger/lib/Logger.js");
__d(/* jitsi-meet-logger/lib/LogCollector.js */function(global, require, module, exports) {
var Logger = require(465 ); // 465 = ./Logger.js
function LogCollector(logStorage, options) {
this.logStorage = logStorage;
this.stringifyObjects = options && options.stringifyObjects ? options.stringifyObjects : false;
this.storeInterval = options && options.storeInterval ? options.storeInterval : 30000;
this.maxEntryLength = options && options.maxEntryLength ? options.maxEntryLength : 10000;
Object.keys(Logger.levels).forEach(function (logLevel) {
var methodName = Logger.levels[logLevel];
this[methodName] = function (logLevel) {
this._log.apply(this, arguments);
}.bind(this, logLevel);
}.bind(this));
this.storeLogsIntervalID = null;
this.queue = [];
this.totalLen = 0;
this.outputCache = [];
}
LogCollector.prototype.stringify = function (someObject) {
try {
return JSON.stringify(someObject);
} catch (error) {
return "[object with circular refs?]";
}
};
LogCollector.prototype.formatLogMessage = function (logLevel) {
var msg = '';
for (var i = 1, len = arguments.length; i < len; i++) {
var arg = arguments[i];
if ((this.stringifyObjects || logLevel === Logger.levels.ERROR) && typeof arg === 'object') {
arg = this.stringify(arg);
}
msg += arg;
if (i != len - 1) {
msg += ' ';
}
}
return msg.length ? msg : null;
};
LogCollector.prototype._log = function () {
var msg = this.formatLogMessage.apply(this, arguments);
if (msg) {
var prevMessage = this.queue.length ? this.queue[this.queue.length - 1] : undefined;
var prevMessageText = typeof prevMessage === 'object' ? prevMessage.text : prevMessage;
if (prevMessageText == msg) {
if (typeof prevMessage === 'object') {
prevMessage.count += 1;
} else {
this.queue[this.queue.length - 1] = {
text: msg,
count: 2
};
}
} else {
this.queue.push(msg);
this.totalLen += msg.length;
}
}
if (this.totalLen >= this.maxEntryLength) {
this._flush(true, true);
}
};
LogCollector.prototype.start = function () {
this._reschedulePublishInterval();
};
LogCollector.prototype._reschedulePublishInterval = function () {
if (this.storeLogsIntervalID) {
window.clearTimeout(this.storeLogsIntervalID);
this.storeLogsIntervalID = null;
}
this.storeLogsIntervalID = window.setTimeout(this._flush.bind(this, false, true), this.storeInterval);
};
LogCollector.prototype.flush = function () {
this._flush(false, true);
};
LogCollector.prototype._flush = function (force, reschedule) {
if (this.totalLen > 0 && (this.logStorage.isReady() || force)) {
if (this.logStorage.isReady()) {
if (this.outputCache.length) {
this.outputCache.forEach(function (cachedQueue) {
this.logStorage.storeLogs(cachedQueue);
}.bind(this));
this.outputCache = [];
}
this.logStorage.storeLogs(this.queue);
} else {
this.outputCache.push(this.queue);
}
this.queue = [];
this.totalLen = 0;
}
if (reschedule) {
this._reschedulePublishInterval();
}
};
LogCollector.prototype.stop = function () {
this._flush(false, false);
};
module.exports = LogCollector;
}, 466, null, "jitsi-meet-logger/lib/LogCollector.js");
__d(/* react-native/package.json */function(global, require, module, exports) {module.exports = module.exports = {
"_from": "react-native@0.42.3",
"_id": "react-native@0.42.3",
"_inBundle": false,
"_integrity": "sha1-RQyKA6Xj6ZGgikJvIndt2P64CyY=",
"_location": "/react-native",
"_phantomChildren": {
"ansi": "0.3.1",
"ansi-regex": "2.1.1",
"are-we-there-yet": "1.1.4",
"basic-auth-connect": "1.0.0",
"chalk": "1.1.3",
"cli-width": "2.1.0",
"cliui": "3.2.0",
"code-point-at": "1.1.0",
"compression": "1.5.2",
"connect-timeout": "1.6.2",
"content-type": "1.0.2",
"cookie-parser": "1.3.5",
"cookie-signature": "1.0.6",
"csurf": "1.8.3",
"decamelize": "1.2.0",
"destroy": "1.0.4",
"errorhandler": "1.4.3",
"escape-string-regexp": "1.0.5",
"exit-hook": "1.1.1",
"express-session": "1.11.3",
"get-caller-file": "1.0.2",
"has-unicode": "2.0.1",
"inflight": "1.0.6",
"inherits": "2.0.3",
"lodash": "4.17.4",
"lodash.pad": "4.5.1",
"lodash.padend": "4.6.1",
"lodash.padstart": "4.6.1",
"media-typer": "0.3.0",
"method-override": "2.3.9",
"mime-db": "1.29.0",
"minimatch": "3.0.0",
"morgan": "1.6.1",
"multiparty": "3.3.2",
"number-is-nan": "1.0.1",
"object-assign": "4.1.1",
"on-finished": "2.3.0",
"on-headers": "1.0.1",
"once": "1.4.0",
"os-locale": "1.4.0",
"parseurl": "1.3.1",
"path-is-absolute": "1.0.1",
"pause": "0.1.0",
"read-pkg-up": "1.0.1",
"readline2": "1.0.1",
"require-directory": "2.1.1",
"require-main-filename": "1.0.1",
"response-time": "2.3.2",
"serve-favicon": "2.3.2",
"set-blocking": "2.0.0",
"statuses": "1.3.1",
"strip-ansi": "3.0.1",
"through": "2.3.8",
"unpipe": "1.0.0",
"utils-merge": "1.0.0",
"vhost": "3.0.2",
"which-module": "1.0.0",
"y18n": "3.2.1",
"yargs-parser": "4.2.1"
},
"_requested": {
"type": "version",
"registry": true,
"raw": "react-native@0.42.3",
"name": "react-native",
"escapedName": "react-native",
"rawSpec": "0.42.3",
"saveSpec": null,
"fetchSpec": "0.42.3"
},
"_requiredBy": ["/"],
"_resolved": "https://registry.npmjs.org/react-native/-/react-native-0.42.3.tgz",
"_shasum": "450c8a03a5e3e991a08a426f22776dd8feb80b26",
"_spec": "react-native@0.42.3",
"_where": "/Users/manu/UC/matrix/github/others/jitsi-meet",
"bin": {
"react-native": "local-cli/wrong-react-native.js"
},
"bugs": {
"url": "https://github.com/facebook/react-native/issues"
},
"bundleDependencies": false,
"dependencies": {
"absolute-path": "^0.0.0",
"art": "^0.10.0",
"async": "^2.0.1",
"babel-core": "^6.21.0",
"babel-generator": "^6.21.0",
"babel-plugin-external-helpers": "^6.18.0",
"babel-plugin-syntax-trailing-function-commas": "^6.20.0",
"babel-plugin-transform-flow-strip-types": "^6.21.0",
"babel-plugin-transform-object-rest-spread": "^6.20.2",
"babel-polyfill": "^6.20.0",
"babel-preset-es2015-node": "^6.1.1",
"babel-preset-fbjs": "^2.1.0",
"babel-preset-react-native": "^1.9.1",
"babel-register": "^6.18.0",
"babel-runtime": "^6.20.0",
"babel-traverse": "^6.21.0",
"babel-types": "^6.21.0",
"babylon": "^6.14.1",
"base64-js": "^1.1.2",
"bser": "^1.0.2",
"chalk": "^1.1.1",
"commander": "^2.9.0",
"connect": "^2.8.3",
"core-js": "^2.2.2",
"debug": "^2.2.0",
"denodeify": "^1.2.1",
"event-target-shim": "^1.0.5",
"fbjs": "^0.8.5",
"fbjs-scripts": "^0.7.0",
"fs-extra": "^0.26.2",
"glob": "^5.0.15",
"graceful-fs": "^4.1.3",
"image-size": "^0.3.5",
"immutable": "~3.7.6",
"imurmurhash": "^0.1.4",
"inquirer": "^0.12.0",
"jest-haste-map": "18.0.0",
"joi": "^6.6.1",
"json-stable-stringify": "^1.0.1",
"json5": "^0.4.0",
"left-pad": "^1.1.3",
"lodash": "^4.16.6",
"mime": "^1.3.4",
"mime-types": "2.1.11",
"minimist": "^1.2.0",
"mkdirp": "^0.5.1",
"node-fetch": "^1.3.3",
"npmlog": "^2.0.4",
"opn": "^3.0.2",
"optimist": "^0.6.1",
"plist": "^1.2.0",
"promise": "^7.1.1",
"react-clone-referenced-element": "^1.0.1",
"react-timer-mixin": "^0.13.2",
"react-transform-hmr": "^1.0.4",
"rebound": "^0.0.13",
"regenerator-runtime": "^0.9.5",
"request": "^2.79.0",
"rimraf": "^2.5.4",
"sane": "~1.4.1",
"semver": "^5.0.3",
"shell-quote": "1.6.1",
"source-map": "^0.5.6",
"stacktrace-parser": "^0.1.3",
"temp": "0.8.3",
"throat": "^3.0.0",
"uglify-js": "^2.6.2",
"whatwg-fetch": "^1.0.0",
"wordwrap": "^1.0.0",
"worker-farm": "^1.3.1",
"write-file-atomic": "^1.2.0",
"ws": "^1.1.0",
"xcode": "^0.8.9",
"xmldoc": "^0.4.0",
"yargs": "^6.4.0"
},
"deprecated": false,
"description": "A framework for building native apps using React",
"devDependencies": {
"babel-eslint": "^7.1.1",
"eslint": "^3.8.1",
"eslint-plugin-babel": "^3.3.0",
"eslint-plugin-flowtype": "^2.20.0",
"eslint-plugin-react": "^6.4.1",
"flow-bin": "^0.38.0",
"jest": "18.0.0",
"jest-repl": "18.0.0",
"jest-runtime": "18.0.0",
"mock-fs": "^3.11.0",
"react": "~15.4.1",
"react-dom": "~15.4.1",
"react-test-renderer": "~15.4.1",
"shelljs": "0.6.0",
"sinon": "^2.0.0-pre.2"
},
"engines": {
"node": ">=4"
},
"files": [".flowconfig", "android", "cli.js", "flow", "init.sh", "ios-install-third-party.sh", "jest-preset.json", "jest", "lib", "setupBabel.js", "Libraries", "LICENSE", "local-cli", "packager", "PATENTS", "react.gradle", "React.podspec", "React", "ReactAndroid", "ReactCommon", "README.md"],
"homepage": "https://github.com/facebook/react-native#readme",
"jest": {
"automock": true,
"transform": {
".*": "./jest/preprocessor.js"
},
"setupFiles": ["./jest/setup.js"],
"timers": "fake",
"moduleNameMapper": {
"^React$": "<rootDir>/Libraries/react-native/React.js",
"^[./a-zA-Z0-9$_-]+\\.png$": "RelativeImageStub"
},
"testPathIgnorePatterns": ["/node_modules/", "/website/", "local-cli/templates/"],
"haste": {
"defaultPlatform": "ios",
"providesModuleNodeModules": ["react-native"],
"platforms": ["ios", "android"]
},
"modulePathIgnorePatterns": ["Libraries/react-native/", "/node_modules/(?!react|fbjs|react-native|react-transform-hmr|core-js|promise)/", "node_modules/react/node_modules/fbjs/", "node_modules/react/lib/ReactDOM.js", "node_modules/fbjs/lib/Map.js", "node_modules/fbjs/lib/Promise.js", "node_modules/fbjs/lib/fetch.js", "node_modules/fbjs/lib/ErrorUtils.js", "node_modules/fbjs/lib/URI.js", "node_modules/fbjs/lib/Deferred.js", "node_modules/fbjs/lib/PromiseMap.js", "node_modules/fbjs/lib/UserAgent.js", "node_modules/fbjs/lib/areEqual.js", "node_modules/fbjs/lib/base62.js", "node_modules/fbjs/lib/crc32.js", "node_modules/fbjs/lib/everyObject.js", "node_modules/fbjs/lib/fetchWithRetries.js", "node_modules/fbjs/lib/filterObject.js", "node_modules/fbjs/lib/flattenArray.js", "node_modules/fbjs/lib/forEachObject.js", "node_modules/fbjs/lib/isEmpty.js", "node_modules/fbjs/lib/nullthrows.js", "node_modules/fbjs/lib/removeFromArray.js", "node_modules/fbjs/lib/resolveImmediate.js", "node_modules/fbjs/lib/someObject.js", "node_modules/fbjs/lib/sprintf.js", "node_modules/fbjs/lib/xhrSimpleDataSerializer.js", "node_modules/jest-cli", "node_modules/react/dist", "node_modules/fbjs/.*/__mocks__/", "node_modules/fbjs/node_modules/", "<rootDir>/website/"],
"unmockedModulePathPatterns": ["promise", "source-map", "fastpath", "denodeify", "fbjs", "sinon"]
},
"license": "BSD-3-Clause",
"main": "Libraries/react-native/react-native.js",
"name": "react-native",
"peerDependencies": {
"react": "~15.4.1"
},
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/facebook/react-native.git"
},
"scripts": {
"flow": "flow",
"lint": "eslint Examples/ Libraries/",
"start": "/usr/bin/env bash -c './packager/packager.sh \"$@\" || true' --",
"test": "jest"
},
"version": "0.42.3"
};
}, 467, null, "react-native/package.json");
__d(/* jitsi-meet/react/features/base/lib-jitsi-meet/native/polyfills-webrtc.js */function(global, require, module, exports) {var _reactNativeWebrtc = require(469 ); // 469 = react-native-webrtc
var _RTCPeerConnection = require(486 ); // 486 = ./RTCPeerConnection
var _RTCPeerConnection2 = babelHelpers.interopRequireDefault(_RTCPeerConnection);
(function (global) {
if (typeof global.webkitMediaStream === 'undefined') {
global.webkitMediaStream = _reactNativeWebrtc.MediaStream;
}
if (typeof global.MediaStreamTrack === 'undefined') {
global.MediaStreamTrack = _reactNativeWebrtc.MediaStreamTrack;
}
if (typeof global.webkitRTCPeerConnection === 'undefined') {
global.webkitRTCPeerConnection = _RTCPeerConnection2.default;
}
if (typeof global.RTCSessionDescription === 'undefined') {
global.RTCSessionDescription = _reactNativeWebrtc.RTCSessionDescription;
}
if (typeof global.RTCIceCandidate === 'undefined') {
global.RTCIceCandidate = _reactNativeWebrtc.RTCIceCandidate;
}
var navigator = global.navigator;
if (navigator) {
if (typeof navigator.webkitGetUserMedia === 'undefined') {
navigator.webkitGetUserMedia = _reactNativeWebrtc.getUserMedia;
}
}
})(global || window || this);
}, 468, null, "jitsi-meet/react/features/base/lib-jitsi-meet/native/polyfills-webrtc.js");
__d(/* react-native-webrtc/index.js */function(global, require, module, exports) {'use strict';
var _RTCPeerConnection = require(470 ); // 470 = ./RTCPeerConnection
var _RTCPeerConnection2 = babelHelpers.interopRequireDefault(_RTCPeerConnection);
var _RTCIceCandidate = require(480 ); // 480 = ./RTCIceCandidate
var _RTCIceCandidate2 = babelHelpers.interopRequireDefault(_RTCIceCandidate);
var _RTCSessionDescription = require(479 ); // 479 = ./RTCSessionDescription
var _RTCSessionDescription2 = babelHelpers.interopRequireDefault(_RTCSessionDescription);
var _RTCView = require(483 ); // 483 = ./RTCView
var _RTCView2 = babelHelpers.interopRequireDefault(_RTCView);
var _MediaStream = require(471 ); // 471 = ./MediaStream
var _MediaStream2 = babelHelpers.interopRequireDefault(_MediaStream);
var _MediaStreamTrack = require(474 ); // 474 = ./MediaStreamTrack
var _MediaStreamTrack2 = babelHelpers.interopRequireDefault(_MediaStreamTrack);
var _getUserMedia = require(484 ); // 484 = ./getUserMedia
var _getUserMedia2 = babelHelpers.interopRequireDefault(_getUserMedia);
module.exports = {
RTCPeerConnection: _RTCPeerConnection2.default,
RTCIceCandidate: _RTCIceCandidate2.default,
RTCSessionDescription: _RTCSessionDescription2.default,
RTCView: _RTCView2.default,
MediaStream: _MediaStream2.default,
MediaStreamTrack: _MediaStreamTrack2.default,
getUserMedia: _getUserMedia2.default
};
}, 469, null, "react-native-webrtc/index.js");
__d(/* react-native-webrtc/RTCPeerConnection.js */function(global, require, module, exports) {'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _eventTargetShim = require(116 ); // 116 = event-target-shim
var _eventTargetShim2 = babelHelpers.interopRequireDefault(_eventTargetShim);
var _reactNative = require(69 ); // 69 = react-native
var _MediaStream = require(471 ); // 471 = ./MediaStream
var _MediaStream2 = babelHelpers.interopRequireDefault(_MediaStream);
var _MediaStreamEvent = require(473 ); // 473 = ./MediaStreamEvent
var _MediaStreamEvent2 = babelHelpers.interopRequireDefault(_MediaStreamEvent);
var _MediaStreamTrack = require(474 ); // 474 = ./MediaStreamTrack
var _MediaStreamTrack2 = babelHelpers.interopRequireDefault(_MediaStreamTrack);
var _RTCDataChannel = require(476 ); // 476 = ./RTCDataChannel
var _RTCDataChannel2 = babelHelpers.interopRequireDefault(_RTCDataChannel);
var _RTCDataChannelEvent = require(478 ); // 478 = ./RTCDataChannelEvent
var _RTCDataChannelEvent2 = babelHelpers.interopRequireDefault(_RTCDataChannelEvent);
var _RTCSessionDescription = require(479 ); // 479 = ./RTCSessionDescription
var _RTCSessionDescription2 = babelHelpers.interopRequireDefault(_RTCSessionDescription);
var _RTCIceCandidate = require(480 ); // 480 = ./RTCIceCandidate
var _RTCIceCandidate2 = babelHelpers.interopRequireDefault(_RTCIceCandidate);
var _RTCIceCandidateEvent = require(481 ); // 481 = ./RTCIceCandidateEvent
var _RTCIceCandidateEvent2 = babelHelpers.interopRequireDefault(_RTCIceCandidateEvent);
var _RTCEvent = require(482 ); // 482 = ./RTCEvent
var _RTCEvent2 = babelHelpers.interopRequireDefault(_RTCEvent);
var WebRTCModule = _reactNative.NativeModules.WebRTCModule;
var DEFAULT_SDP_CONSTRAINTS = {
mandatory: {
OfferToReceiveAudio: true,
OfferToReceiveVideo: true
},
optional: []
};
var DEFAULT_PC_CONSTRAINTS = {
mandatory: {},
optional: [{ DtlsSrtpKeyAgreement: true }]
};
var PEER_CONNECTION_EVENTS = ['connectionstatechange', 'icecandidate', 'icecandidateerror', 'iceconnectionstatechange', 'icegatheringstatechange', 'negotiationneeded', 'signalingstatechange', 'datachannel', 'addstream', 'removestream'];
var nextPeerConnectionId = 0;
var RTCPeerConnection = function (_EventTarget) {
babelHelpers.inherits(RTCPeerConnection, _EventTarget);
function RTCPeerConnection(configuration) {
babelHelpers.classCallCheck(this, RTCPeerConnection);
var _this = babelHelpers.possibleConstructorReturn(this, (RTCPeerConnection.__proto__ || Object.getPrototypeOf(RTCPeerConnection)).call(this));
_this.signalingState = 'stable';
_this.iceGatheringState = 'new';
_this.iceConnectionState = 'new';
_this._remoteStreams = [];
_this._dataChannelIds = new Set();
_this._peerConnectionId = nextPeerConnectionId++;
WebRTCModule.peerConnectionInit(configuration, DEFAULT_PC_CONSTRAINTS, _this._peerConnectionId);
_this._registerEvents();
return _this;
}
babelHelpers.createClass(RTCPeerConnection, [{
key: 'addStream',
value: function addStream(stream) {
WebRTCModule.peerConnectionAddStream(stream.reactTag, this._peerConnectionId);
}
}, {
key: 'removeStream',
value: function removeStream(stream) {
WebRTCModule.peerConnectionRemoveStream(stream.reactTag, this._peerConnectionId);
}
}, {
key: '_mergeMediaConstraints',
value: function _mergeMediaConstraints(options) {
var constraints = babelHelpers.extends({}, DEFAULT_SDP_CONSTRAINTS);
if (options) {
if (options.mandatory) {
constraints.mandatory = babelHelpers.extends({}, constraints.mandatory, options.mandatory);
}
if (options.optional && Array.isArray(options.optional)) {
constraints.optional = options.optional.concat(constraints.optional);
}
}
return constraints;
}
}, {
key: 'createOffer',
value: function createOffer(successCallback, failureCallback, options) {
WebRTCModule.peerConnectionCreateOffer(this._peerConnectionId, this._mergeMediaConstraints(options), function (successful, data) {
if (successful) {
successCallback(new _RTCSessionDescription2.default(data));
} else {
failureCallback(data);
}
});
}
}, {
key: 'createAnswer',
value: function createAnswer(successCallback, failureCallback, options) {
WebRTCModule.peerConnectionCreateAnswer(this._peerConnectionId, this._mergeMediaConstraints(options), function (successful, data) {
if (successful) {
successCallback(new _RTCSessionDescription2.default(data));
} else {
failureCallback(data);
}
});
}
}, {
key: 'setConfiguration',
value: function setConfiguration(configuration) {
WebRTCModule.peerConnectionSetConfiguration(configuration, this._peerConnectionId);
}
}, {
key: 'setLocalDescription',
value: function setLocalDescription(sessionDescription, success, failure, constraints) {
var _this2 = this;
WebRTCModule.peerConnectionSetLocalDescription(sessionDescription.toJSON(), this._peerConnectionId, function (successful, data) {
if (successful) {
_this2.localDescription = sessionDescription;
success();
} else {
failure(data);
}
});
}
}, {
key: 'setRemoteDescription',
value: function setRemoteDescription(sessionDescription, success, failure) {
var _this3 = this;
WebRTCModule.peerConnectionSetRemoteDescription(sessionDescription.toJSON(), this._peerConnectionId, function (successful, data) {
if (successful) {
_this3.remoteDescription = sessionDescription;
success();
} else {
failure(data);
}
});
}
}, {
key: 'addIceCandidate',
value: function addIceCandidate(candidate, success, failure) {
WebRTCModule.peerConnectionAddICECandidate(candidate.toJSON(), this._peerConnectionId, function (successful) {
if (successful) {
success && success();
} else {
failure && failure();
}
});
}
}, {
key: 'getStats',
value: function getStats(track, success, failure) {
if (WebRTCModule.peerConnectionGetStats) {
WebRTCModule.peerConnectionGetStats(track && track.id || '', this._peerConnectionId, function (stats) {
if (success) {
if (typeof stats === 'string') {
try {
stats = JSON.parse(stats);
} catch (e) {
failure(e);
return;
}
}
success(stats);
}
});
} else {
console.warn('RTCPeerConnection getStats not supported');
}
}
}, {
key: 'getRemoteStreams',
value: function getRemoteStreams() {
return this._remoteStreams.slice();
}
}, {
key: 'close',
value: function close() {
WebRTCModule.peerConnectionClose(this._peerConnectionId);
}
}, {
key: '_unregisterEvents',
value: function _unregisterEvents() {
this._subscriptions.forEach(function (e) {
return e.remove();
});
this._subscriptions = [];
}
}, {
key: '_registerEvents',
value: function _registerEvents() {
var _this4 = this;
this._subscriptions = [_reactNative.DeviceEventEmitter.addListener('peerConnectionOnRenegotiationNeeded', function (ev) {
if (ev.id !== _this4._peerConnectionId) {
return;
}
_this4.dispatchEvent(new _RTCEvent2.default('negotiationneeded'));
}), _reactNative.DeviceEventEmitter.addListener('peerConnectionIceConnectionChanged', function (ev) {
if (ev.id !== _this4._peerConnectionId) {
return;
}
_this4.iceConnectionState = ev.iceConnectionState;
_this4.dispatchEvent(new _RTCEvent2.default('iceconnectionstatechange'));
if (ev.iceConnectionState === 'closed') {
_this4._unregisterEvents();
}
}), _reactNative.DeviceEventEmitter.addListener('peerConnectionSignalingStateChanged', function (ev) {
if (ev.id !== _this4._peerConnectionId) {
return;
}
_this4.signalingState = ev.signalingState;
_this4.dispatchEvent(new _RTCEvent2.default('signalingstatechange'));
}), _reactNative.DeviceEventEmitter.addListener('peerConnectionAddedStream', function (ev) {
if (ev.id !== _this4._peerConnectionId) {
return;
}
var stream = new _MediaStream2.default(ev.streamId, ev.streamReactTag);
var tracks = ev.tracks;
for (var i = 0; i < tracks.length; i++) {
stream.addTrack(new _MediaStreamTrack2.default(tracks[i]));
}
_this4._remoteStreams.push(stream);
_this4.dispatchEvent(new _MediaStreamEvent2.default('addstream', { stream: stream }));
}), _reactNative.DeviceEventEmitter.addListener('peerConnectionRemovedStream', function (ev) {
if (ev.id !== _this4._peerConnectionId) {
return;
}
var stream = _this4._remoteStreams.find(function (s) {
return s.reactTag === ev.streamId;
});
if (stream) {
var index = _this4._remoteStreams.indexOf(stream);
if (index > -1) {
_this4._remoteStreams.splice(index, 1);
}
}
_this4.dispatchEvent(new _MediaStreamEvent2.default('removestream', { stream: stream }));
}), _reactNative.DeviceEventEmitter.addListener('peerConnectionGotICECandidate', function (ev) {
if (ev.id !== _this4._peerConnectionId) {
return;
}
var candidate = new _RTCIceCandidate2.default(ev.candidate);
var event = new _RTCIceCandidateEvent2.default('icecandidate', { candidate: candidate });
_this4.dispatchEvent(event);
}), _reactNative.DeviceEventEmitter.addListener('peerConnectionIceGatheringChanged', function (ev) {
if (ev.id !== _this4._peerConnectionId) {
return;
}
_this4.iceGatheringState = ev.iceGatheringState;
if (_this4.iceGatheringState === 'complete') {
_this4.dispatchEvent(new _RTCIceCandidateEvent2.default('icecandidate', null));
}
_this4.dispatchEvent(new _RTCEvent2.default('icegatheringstatechange'));
}), _reactNative.DeviceEventEmitter.addListener('peerConnectionDidOpenDataChannel', function (ev) {
if (ev.id !== _this4._peerConnectionId) {
return;
}
var evDataChannel = ev.dataChannel;
var id = evDataChannel.id;
if (typeof id !== 'number' || id === -1) {
return;
}
var channel = new _RTCDataChannel2.default(_this4._peerConnectionId, evDataChannel.label, evDataChannel);
_this4._dataChannelIds.add(id);
_this4.dispatchEvent(new _RTCDataChannelEvent2.default('datachannel', { channel: channel }));
})];
}
}, {
key: 'createDataChannel',
value: function createDataChannel(label, dataChannelDict) {
var id = void 0;
var dataChannelIds = this._dataChannelIds;
if (dataChannelDict && 'id' in dataChannelDict) {
id = dataChannelDict.id;
if (typeof id !== 'number') {
throw new TypeError('DataChannel id must be a number: ' + id);
}
if (dataChannelIds.has(id)) {
throw new ResourceInUse('DataChannel id already in use: ' + id);
}
} else {
for (id = 0; id < 65535 && dataChannelIds.has(id); ++id) {}
dataChannelDict = babelHelpers.extends({ id: id }, dataChannelDict);
}
WebRTCModule.createDataChannel(this._peerConnectionId, label, dataChannelDict);
dataChannelIds.add(id);
return new _RTCDataChannel2.default(this._peerConnectionId, label, dataChannelDict);
}
}]);
return RTCPeerConnection;
}((0, _eventTargetShim2.default)(PEER_CONNECTION_EVENTS));
exports.default = RTCPeerConnection;
}, 470, null, "react-native-webrtc/RTCPeerConnection.js");
__d(/* react-native-webrtc/MediaStream.js */function(global, require, module, exports) {'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _reactNative = require(69 ); // 69 = react-native
var _eventTargetShim = require(116 ); // 116 = event-target-shim
var _eventTargetShim2 = babelHelpers.interopRequireDefault(_eventTargetShim);
var _MediaStreamTrackEvent = require(472 ); // 472 = ./MediaStreamTrackEvent
var _MediaStreamTrackEvent2 = babelHelpers.interopRequireDefault(_MediaStreamTrackEvent);
var WebRTCModule = _reactNative.NativeModules.WebRTCModule;
var MEDIA_STREAM_EVENTS = ['active', 'inactive', 'addtrack', 'removetrack'];
var MediaStream = function (_EventTarget) {
babelHelpers.inherits(MediaStream, _EventTarget);
function MediaStream(id, reactTag) {
babelHelpers.classCallCheck(this, MediaStream);
var _this = babelHelpers.possibleConstructorReturn(this, (MediaStream.__proto__ || Object.getPrototypeOf(MediaStream)).call(this));
_this.active = true;
_this._tracks = [];
_this.id = id;
_this.reactTag = typeof reactTag === 'undefined' ? id : reactTag;
return _this;
}
babelHelpers.createClass(MediaStream, [{
key: 'addTrack',
value: function addTrack(track) {
this._tracks.push(track);
this.dispatchEvent(new _MediaStreamTrackEvent2.default('addtrack', { track: track }));
}
}, {
key: 'removeTrack',
value: function removeTrack(track) {
var index = this._tracks.indexOf(track);
if (index === -1) {
return;
}
WebRTCModule.mediaStreamTrackRelease(this.reactTag, track.id);
this._tracks.splice(index, 1);
this.dispatchEvent(new _MediaStreamTrackEvent2.default('removetrack', { track: track }));
}
}, {
key: 'getTracks',
value: function getTracks() {
return this._tracks.slice();
}
}, {
key: 'getTrackById',
value: function getTrackById(trackId) {
return this._tracks.find(function (track) {
return track.id === trackId;
});
}
}, {
key: 'getAudioTracks',
value: function getAudioTracks() {
return this._tracks.filter(function (track) {
return track.kind === 'audio';
});
}
}, {
key: 'getVideoTracks',
value: function getVideoTracks() {
return this._tracks.filter(function (track) {
return track.kind === 'video';
});
}
}, {
key: 'clone',
value: function clone() {
throw new Error('Not implemented.');
}
}, {
key: 'toURL',
value: function toURL() {
return this.reactTag;
}
}, {
key: 'release',
value: function release() {
WebRTCModule.mediaStreamRelease(this.reactTag);
}
}]);
return MediaStream;
}((0, _eventTargetShim2.default)(MEDIA_STREAM_EVENTS));
exports.default = MediaStream;
}, 471, null, "react-native-webrtc/MediaStream.js");
__d(/* react-native-webrtc/MediaStreamTrackEvent.js */function(global, require, module, exports) {'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var MediaStreamTrackEvent = function MediaStreamTrackEvent(type, eventInitDict) {
babelHelpers.classCallCheck(this, MediaStreamTrackEvent);
this.type = type.toString();
babelHelpers.extends(this, eventInitDict);
};
exports.default = MediaStreamTrackEvent;
}, 472, null, "react-native-webrtc/MediaStreamTrackEvent.js");
__d(/* react-native-webrtc/MediaStreamEvent.js */function(global, require, module, exports) {'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var MediaStreamEvent = function MediaStreamEvent(type, eventInitDict) {
babelHelpers.classCallCheck(this, MediaStreamEvent);
this.type = type.toString();
babelHelpers.extends(this, eventInitDict);
};
exports.default = MediaStreamEvent;
}, 473, null, "react-native-webrtc/MediaStreamEvent.js");
__d(/* react-native-webrtc/MediaStreamTrack.js */function(global, require, module, exports) {'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _reactNative = require(69 ); // 69 = react-native
var _eventTargetShim = require(116 ); // 116 = event-target-shim
var _eventTargetShim2 = babelHelpers.interopRequireDefault(_eventTargetShim);
var _MediaStreamErrorEvent = require(475 ); // 475 = ./MediaStreamErrorEvent
var _MediaStreamErrorEvent2 = babelHelpers.interopRequireDefault(_MediaStreamErrorEvent);
var WebRTCModule = _reactNative.NativeModules.WebRTCModule;
var MEDIA_STREAM_TRACK_EVENTS = ['ended', 'mute', 'unmute', 'overconstrained'];
var MediaStreamTrack = function (_EventTarget) {
babelHelpers.inherits(MediaStreamTrack, _EventTarget);
babelHelpers.createClass(MediaStreamTrack, null, [{
key: 'getSources',
value: function getSources(success) {
WebRTCModule.mediaStreamTrackGetSources(success);
}
}]);
function MediaStreamTrack(info) {
babelHelpers.classCallCheck(this, MediaStreamTrack);
var _this = babelHelpers.possibleConstructorReturn(this, (MediaStreamTrack.__proto__ || Object.getPrototypeOf(MediaStreamTrack)).call(this));
var _readyState = info.readyState.toLowerCase();
_this._enabled = info.enabled;
_this.id = info.id;
_this.kind = info.kind;
_this.label = info.label;
_this.muted = false;
_this.readonly = true;
_this.remote = info.remote;
_this.readyState = _readyState === "initializing" || _readyState === "live" ? "live" : "ended";
return _this;
}
babelHelpers.createClass(MediaStreamTrack, [{
key: 'stop',
value: function stop() {
if (this.remote) {
return;
}
WebRTCModule.mediaStreamTrackStop(this.id);
this._enabled = false;
this.readyState = 'ended';
this.muted = !this._enabled;
}
}, {
key: '_switchCamera',
value: function _switchCamera() {
if (this.remote) {
throw new Error('Not implemented for remote tracks');
}
if (this.kind !== 'video') {
throw new Error('Only implemented for video tracks');
}
WebRTCModule.mediaStreamTrackSwitchCamera(this.id);
}
}, {
key: 'applyConstraints',
value: function applyConstraints() {
throw new Error('Not implemented.');
}
}, {
key: 'clone',
value: function clone() {
throw new Error('Not implemented.');
}
}, {
key: 'getCapabilities',
value: function getCapabilities() {
throw new Error('Not implemented.');
}
}, {
key: 'getConstraints',
value: function getConstraints() {
throw new Error('Not implemented.');
}
}, {
key: 'getSettings',
value: function getSettings() {
throw new Error('Not implemented.');
}
}, {
key: 'enabled',
get: function get() {
return this._enabled;
},
set: function set(enabled) {
if (enabled === this._enabled) {
return;
}
WebRTCModule.mediaStreamTrackSetEnabled(this.id, !this._enabled);
this._enabled = !this._enabled;
this.muted = !this._enabled;
}
}]);
return MediaStreamTrack;
}((0, _eventTargetShim2.default)(MEDIA_STREAM_TRACK_EVENTS));
exports.default = MediaStreamTrack;
}, 474, null, "react-native-webrtc/MediaStreamTrack.js");
__d(/* react-native-webrtc/MediaStreamErrorEvent.js */function(global, require, module, exports) {'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var MediaStreamErrorEvent = function MediaStreamErrorEvent(type, eventInitDict) {
babelHelpers.classCallCheck(this, MediaStreamErrorEvent);
this.type = type.toString();
babelHelpers.extends(this, eventInitDict);
};
exports.default = MediaStreamErrorEvent;
}, 475, null, "react-native-webrtc/MediaStreamErrorEvent.js");
__d(/* react-native-webrtc/RTCDataChannel.js */function(global, require, module, exports) {'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _reactNative = require(69 ); // 69 = react-native
var _base64Js = require(115 ); // 115 = base64-js
var _base64Js2 = babelHelpers.interopRequireDefault(_base64Js);
var _eventTargetShim = require(116 ); // 116 = event-target-shim
var _eventTargetShim2 = babelHelpers.interopRequireDefault(_eventTargetShim);
var _MessageEvent = require(477 ); // 477 = ./MessageEvent
var _MessageEvent2 = babelHelpers.interopRequireDefault(_MessageEvent);
var _RTCDataChannelEvent = require(478 ); // 478 = ./RTCDataChannelEvent
var _RTCDataChannelEvent2 = babelHelpers.interopRequireDefault(_RTCDataChannelEvent);
var WebRTCModule = _reactNative.NativeModules.WebRTCModule;
var DATA_CHANNEL_EVENTS = ['open', 'message', 'bufferedamountlow', 'close', 'error'];
var ResourceInUse = function (_Error) {
babelHelpers.inherits(ResourceInUse, _Error);
function ResourceInUse() {
babelHelpers.classCallCheck(this, ResourceInUse);
return babelHelpers.possibleConstructorReturn(this, (ResourceInUse.__proto__ || Object.getPrototypeOf(ResourceInUse)).apply(this, arguments));
}
return ResourceInUse;
}(Error);
var RTCDataChannel = function (_EventTarget) {
babelHelpers.inherits(RTCDataChannel, _EventTarget);
function RTCDataChannel(peerConnectionId, label, dataChannelDict) {
babelHelpers.classCallCheck(this, RTCDataChannel);
var _this2 = babelHelpers.possibleConstructorReturn(this, (RTCDataChannel.__proto__ || Object.getPrototypeOf(RTCDataChannel)).call(this));
_this2.binaryType = 'arraybuffer';
_this2.bufferedAmount = 0;
_this2.bufferedAmountLowThreshold = 0;
_this2.maxPacketLifeTime = null;
_this2.maxRetransmits = null;
_this2.negotiated = false;
_this2.ordered = true;
_this2.protocol = '';
_this2.readyState = 'connecting';
_this2._peerConnectionId = peerConnectionId;
_this2.label = label;
_this2.id = 'id' in dataChannelDict ? dataChannelDict.id : -1;
_this2.ordered = !!dataChannelDict.ordered;
_this2.maxPacketLifeTime = dataChannelDict.maxPacketLifeTime;
_this2.maxRetransmits = dataChannelDict.maxRetransmits;
_this2.protocol = dataChannelDict.protocol || '';
_this2.negotiated = !!dataChannelDict.negotiated;
_this2._registerEvents();
return _this2;
}
babelHelpers.createClass(RTCDataChannel, [{
key: 'send',
value: function send(data) {
if (typeof data === 'string') {
WebRTCModule.dataChannelSend(this._peerConnectionId, this.id, data, 'text');
return;
}
if (ArrayBuffer.isView(data)) {
data = data.buffer;
}
if (!(data instanceof ArrayBuffer)) {
throw new TypeError('Data must be either string, ArrayBuffer, or ArrayBufferView');
}
WebRTCModule.dataChannelSend(this._peerConnectionId, this.id, _base64Js2.default.fromByteArray(new Uint8Array(data)), 'binary');
}
}, {
key: 'close',
value: function close() {
if (this.readyState === 'closing' || this.readyState === 'closed') {
return;
}
this.readyState = 'closing';
WebRTCModule.dataChannelClose(this._peerConnectionId, this.id);
}
}, {
key: '_unregisterEvents',
value: function _unregisterEvents() {
this._subscriptions.forEach(function (e) {
return e.remove();
});
this._subscriptions = [];
}
}, {
key: '_registerEvents',
value: function _registerEvents() {
var _this3 = this;
this._subscriptions = [_reactNative.DeviceEventEmitter.addListener('dataChannelStateChanged', function (ev) {
if (ev.peerConnectionId !== _this3._peerConnectionId || ev.id !== _this3.id) {
return;
}
_this3.readyState = ev.state;
if (_this3.readyState === 'open') {
_this3.dispatchEvent(new _RTCDataChannelEvent2.default('open', { channel: _this3 }));
} else if (_this3.readyState === 'close') {
_this3.dispatchEvent(new _RTCDataChannelEvent2.default('close', { channel: _this3 }));
_this3._unregisterEvents();
}
}), _reactNative.DeviceEventEmitter.addListener('dataChannelReceiveMessage', function (ev) {
if (ev.peerConnectionId !== _this3._peerConnectionId || ev.id !== _this3.id) {
return;
}
var data = ev.data;
if (ev.type === 'binary') {
data = _base64Js2.default.toByteArray(ev.data).buffer;
}
_this3.dispatchEvent(new _MessageEvent2.default('message', { data: data }));
})];
}
}]);
return RTCDataChannel;
}((0, _eventTargetShim2.default)(DATA_CHANNEL_EVENTS));
exports.default = RTCDataChannel;
}, 476, null, "react-native-webrtc/RTCDataChannel.js");
__d(/* react-native-webrtc/MessageEvent.js */function(global, require, module, exports) {'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var MessageEvent = function MessageEvent(type, eventInitDict) {
babelHelpers.classCallCheck(this, MessageEvent);
this.type = type.toString();
babelHelpers.extends(this, eventInitDict);
};
exports.default = MessageEvent;
}, 477, null, "react-native-webrtc/MessageEvent.js");
__d(/* react-native-webrtc/RTCDataChannelEvent.js */function(global, require, module, exports) {'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var RTCDataChannelEvent = function RTCDataChannelEvent(type, eventInitDict) {
babelHelpers.classCallCheck(this, RTCDataChannelEvent);
this.type = type.toString();
babelHelpers.extends(this, eventInitDict);
};
exports.default = RTCDataChannelEvent;
}, 478, null, "react-native-webrtc/RTCDataChannelEvent.js");
__d(/* react-native-webrtc/RTCSessionDescription.js */function(global, require, module, exports) {'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var RTCSessionDescription = function () {
function RTCSessionDescription(info) {
babelHelpers.classCallCheck(this, RTCSessionDescription);
this.sdp = info.sdp;
this.type = info.type;
}
babelHelpers.createClass(RTCSessionDescription, [{
key: 'toJSON',
value: function toJSON() {
return { sdp: this.sdp, type: this.type };
}
}]);
return RTCSessionDescription;
}();
exports.default = RTCSessionDescription;
}, 479, null, "react-native-webrtc/RTCSessionDescription.js");
__d(/* react-native-webrtc/RTCIceCandidate.js */function(global, require, module, exports) {'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var RTCIceCandidate = function () {
function RTCIceCandidate(info) {
babelHelpers.classCallCheck(this, RTCIceCandidate);
this.candidate = info.candidate;
this.sdpMLineIndex = info.sdpMLineIndex;
this.sdpMid = info.sdpMid;
}
babelHelpers.createClass(RTCIceCandidate, [{
key: 'toJSON',
value: function toJSON() {
return {
candidate: this.candidate,
sdpMLineIndex: this.sdpMLineIndex,
sdpMid: this.sdpMid
};
}
}]);
return RTCIceCandidate;
}();
exports.default = RTCIceCandidate;
}, 480, null, "react-native-webrtc/RTCIceCandidate.js");
__d(/* react-native-webrtc/RTCIceCandidateEvent.js */function(global, require, module, exports) {'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var RTCIceCandidateEvent = function RTCIceCandidateEvent(type, eventInitDict) {
babelHelpers.classCallCheck(this, RTCIceCandidateEvent);
this.type = type.toString();
this.candidate = null;
if (eventInitDict && eventInitDict.candidate) {
this.candidate = eventInitDict.candidate;
}
};
exports.default = RTCIceCandidateEvent;
}, 481, null, "react-native-webrtc/RTCIceCandidateEvent.js");
__d(/* react-native-webrtc/RTCEvent.js */function(global, require, module, exports) {'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var RTCEvent = function RTCEvent(type, eventInitDict) {
babelHelpers.classCallCheck(this, RTCEvent);
this.type = type.toString();
babelHelpers.extends(this, eventInitDict);
};
exports.default = RTCEvent;
}, 482, null, "react-native-webrtc/RTCEvent.js");
__d(/* react-native-webrtc/RTCView.js */function(global, require, module, exports) {'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _reactNative = require(69 ); // 69 = react-native
var _react = require(34 ); // 34 = react
var WebRTCModule = _reactNative.NativeModules.WebRTCModule;
var RTCView = {
name: 'RTCVideoView',
propTypes: {
mirror: _react.PropTypes.bool,
objectFit: _react.PropTypes.oneOf(['contain', 'cover']),
streamURL: _react.PropTypes.string,
zOrder: _react.PropTypes.number
}
};
var View = (0, _reactNative.requireNativeComponent)('RTCVideoView', RTCView, { nativeOnly: {
testID: true,
accessibilityComponentType: true,
renderToHardwareTextureAndroid: true,
accessibilityLabel: true,
accessibilityLiveRegion: true,
importantForAccessibility: true,
onLayout: true,
nativeID: true
} });
exports.default = View;
}, 483, null, "react-native-webrtc/RTCView.js");
__d(/* react-native-webrtc/getUserMedia.js */function(global, require, module, exports) {'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = getUserMedia;
var _reactNative = require(69 ); // 69 = react-native
var _MediaStream = require(471 ); // 471 = ./MediaStream
var _MediaStream2 = babelHelpers.interopRequireDefault(_MediaStream);
var _MediaStreamError = require(485 ); // 485 = ./MediaStreamError
var _MediaStreamError2 = babelHelpers.interopRequireDefault(_MediaStreamError);
var _MediaStreamTrack = require(474 ); // 474 = ./MediaStreamTrack
var _MediaStreamTrack2 = babelHelpers.interopRequireDefault(_MediaStreamTrack);
var WebRTCModule = _reactNative.NativeModules.WebRTCModule;
function getUserMedia(constraints, successCallback, errorCallback) {
if (typeof successCallback !== 'function') {
throw new TypeError('successCallback is non-nullable and required');
}
if (typeof errorCallback !== 'function') {
throw new TypeError('errorCallback is non-nullable and required');
}
if (typeof constraints === 'object') {
var requestedMediaTypes = 0;
var _arr = ['audio', 'video'];
for (var _i = 0; _i < _arr.length; _i++) {
var mediaType = _arr[_i];
var mediaTypeConstraints = constraints[mediaType];
var typeofMediaTypeConstraints = typeof mediaTypeConstraints;
if (typeofMediaTypeConstraints !== 'undefined') {
if (typeofMediaTypeConstraints === 'boolean') {
mediaTypeConstraints && ++requestedMediaTypes;
} else if (typeofMediaTypeConstraints == 'object') {
++requestedMediaTypes;
} else {
errorCallback(new TypeError('constraints.' + mediaType + ' is neither a boolean nor a dictionary'));
return;
}
}
}
if (requestedMediaTypes === 0) {
errorCallback(new TypeError('constraints requests no media types'));
return;
}
} else {
errorCallback(new TypeError('constraints is not a dictionary'));
return;
}
WebRTCModule.getUserMedia(constraints, function (id, tracks) {
var stream = new _MediaStream2.default(id);
for (var _iterator = tracks, _isArray = Array.isArray(_iterator), _i2 = 0, _iterator = _isArray ? _iterator : _iterator[typeof Symbol === 'function' ? Symbol.iterator : '@@iterator']();;) {
var _ref;
if (_isArray) {
if (_i2 >= _iterator.length) break;
_ref = _iterator[_i2++];
} else {
_i2 = _iterator.next();
if (_i2.done) break;
_ref = _i2.value;
}
var track = _ref;
stream.addTrack(new _MediaStreamTrack2.default(track));
}
successCallback(stream);
}, function (type, message) {
var error = void 0;
switch (type) {
case 'DOMException':
if (typeof DOMException === 'function') {
error = new DOMException(undefined, message);
}
break;
case 'OverconstrainedError':
if (typeof OverconstrainedError === 'function') {
error = new OverconstrainedError(undefined, message);
}
break;
case 'TypeError':
error = new TypeError(message);
break;
}
if (!error) {
error = new _MediaStreamError2.default({ message: message, name: type });
}
errorCallback(error);
});
}
}, 484, null, "react-native-webrtc/getUserMedia.js");
__d(/* react-native-webrtc/MediaStreamError.js */function(global, require, module, exports) {'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var MediaStreamError = function MediaStreamError(error) {
babelHelpers.classCallCheck(this, MediaStreamError);
this.name = error.name;
this.message = error.message;
this.constraintName = error.constraintName;
};
exports.default = MediaStreamError;
}, 485, null, "react-native-webrtc/MediaStreamError.js");
__d(/* jitsi-meet/react/features/base/lib-jitsi-meet/native/RTCPeerConnection.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _RTCPeerConnection;
var _reactNative = require(69 ); // 69 = react-native
var _reactNativeWebrtc = require(469 ); // 469 = react-native-webrtc
function _RTCPeerConnection() {
var _this = this;
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
_reactNativeWebrtc.RTCPeerConnection.apply(this, args);
this.onaddstream = function () {
for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
args[_key2] = arguments[_key2];
}
return (_this._onaddstreamQueue ? _this._queueOnaddstream : _this._invokeOnaddstream).apply(_this, args);
};
Object.defineProperty(this, 'onaddstream', {
configurable: true,
enumerable: true,
get: function get() {
return this._onaddstream;
},
set: function set(value) {
this._onaddstream = value;
}
});
}
_RTCPeerConnection.prototype = Object.create(_reactNativeWebrtc.RTCPeerConnection.prototype);
_RTCPeerConnection.prototype.constructor = _RTCPeerConnection;
_RTCPeerConnection.prototype._invokeOnaddstream = function () {
var onaddstream = this._onaddstream;
for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
args[_key3] = arguments[_key3];
}
return onaddstream && onaddstream.apply(this, args);
};
_RTCPeerConnection.prototype._invokeQueuedOnaddstream = function (q) {
var _this2 = this;
q && q.forEach(function (args) {
try {
_this2._invokeOnaddstream.apply(_this2, babelHelpers.toConsumableArray(args));
} catch (e) {
_LOGE(e);
}
});
};
_RTCPeerConnection.prototype._queueOnaddstream = function () {
for (var _len4 = arguments.length, args = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
args[_key4] = arguments[_key4];
}
this._onaddstreamQueue.push(Array.from(args));
};
_RTCPeerConnection.prototype.setRemoteDescription = function (sessionDescription, successCallback, errorCallback) {
var _this3 = this;
if (typeof successCallback !== 'undefined' || typeof errorCallback !== 'undefined') {
return _RTCPeerConnection.prototype.setRemoteDescription.call(this, sessionDescription).then(successCallback, errorCallback);
}
return _synthesizeIPv6Addresses(sessionDescription).catch(function (reason) {
reason && _LOGE(reason);
return sessionDescription;
}).then(function (value) {
return _setRemoteDescription.bind(_this3)(value);
});
};
function _LOGE() {
var _console;
console && console.error && (_console = console).error.apply(_console, arguments);
}
function _setRemoteDescription(sessionDescription) {
var _this4 = this;
return new Promise(function (resolve, reject) {
_this4._onaddstreamQueue = [];
_reactNativeWebrtc.RTCPeerConnection.prototype.setRemoteDescription.call(_this4, sessionDescription, function () {
var q = void 0;
try {
resolve.apply(undefined, arguments);
} finally {
q = _this4._onaddstreamQueue;
_this4._onaddstreamQueue = undefined;
}
_this4._invokeQueuedOnaddstream(q);
}, function () {
_this4._onaddstreamQueue = undefined;
reject.apply(undefined, arguments);
});
});
}
function _synthesizeIPv6Addresses(sdp) {
if (!_reactNative.NativeModules.POSIX) {
return Promise.resolve(sdp);
}
return new Promise(function (resolve) {
return resolve(_synthesizeIPv6Addresses0(sdp));
}).then(function (_ref) {
var ips = _ref.ips,
lines = _ref.lines;
return Promise.all(Array.from(ips.values())).then(function () {
return _synthesizeIPv6Addresses1(sdp, ips, lines);
});
});
}
function _synthesizeIPv6Addresses0(sessionDescription) {
var sdp = sessionDescription.sdp;
var start = 0;
var lines = [];
var ips = new Map();
var getaddrinfo = _reactNative.NativeModules.POSIX.getaddrinfo;
do {
var end = sdp.indexOf('\r\n', start);
var line = void 0;
if (end === -1) {
line = sdp.substring(start);
start = undefined;
} else {
line = sdp.substring(start, end);
start = end + 2;
}
if (line.startsWith('a=candidate:')) {
var candidate = line.split(' ');
if (candidate.length >= 10 && candidate[6] === 'typ') {
var ip4s = [candidate[4]];
var abort = false;
for (var i = 8; i < candidate.length; ++i) {
if (candidate[i] === 'raddr') {
ip4s.push(candidate[++i]);
break;
}
}
var _loop = function _loop(ip) {
if (ip.indexOf(':') === -1) {
ips.has(ip) || ips.set(ip, new Promise(function (resolve, reject) {
var v = ips.get(ip);
if (v && typeof v === 'string') {
resolve(v);
} else {
getaddrinfo(ip).then(function (value) {
if (value.indexOf(':') === -1 || value === ips.get(ip)) {
ips.delete(ip);
} else {
ips.set(ip, value);
}
resolve(value);
}, reject);
}
}));
} else {
abort = true;
return 'break';
}
};
for (var _iterator = ip4s, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[typeof Symbol === 'function' ? Symbol.iterator : '@@iterator']();;) {
var _ref2;
if (_isArray) {
if (_i >= _iterator.length) break;
_ref2 = _iterator[_i++];
} else {
_i = _iterator.next();
if (_i.done) break;
_ref2 = _i.value;
}
var ip = _ref2;
var _ret = _loop(ip);
if (_ret === 'break') break;
}
if (abort) {
ips.clear();
break;
}
line = candidate;
}
}
lines.push(line);
} while (start);
return {
ips: ips,
lines: lines
};
}
function _synthesizeIPv6Addresses1(sessionDescription, ips, lines) {
if (ips.size === 0) {
return sessionDescription;
}
for (var l = 0; l < lines.length; ++l) {
var candidate = lines[l];
if (typeof candidate !== 'string') {
var ip4 = candidate[4];
var ip6 = ips.get(ip4);
ip6 && (candidate[4] = ip6);
for (var i = 8; i < candidate.length; ++i) {
if (candidate[i] === 'raddr') {
ip4 = candidate[++i];
(ip6 = ips.get(ip4)) && (candidate[i] = ip6);
break;
}
}
lines[l] = candidate.join(' ');
}
}
return new _reactNativeWebrtc.RTCSessionDescription({
sdp: lines.join('\r\n'),
type: sessionDescription.type
});
}
}, 486, null, "jitsi-meet/react/features/base/lib-jitsi-meet/native/RTCPeerConnection.js");
__d(/* jitsi-meet/react/features/base/lib-jitsi-meet/native/polyfills-browserify.js */function(global, require, module, exports) {(function (global) {
if (typeof global.__filename === 'undefined') {
global.__filename = '__filename';
}
})(global || window || this);
}, 487, null, "jitsi-meet/react/features/base/lib-jitsi-meet/native/polyfills-browserify.js");
__d(/* lib-jitsi-meet/lib-jitsi-meet.min.js */function(global, require, module, exports) {
!function (e, t) {
"object" == typeof exports && "object" == typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define([], t) : "object" == typeof exports ? exports.JitsiMeetJS = t() : e.JitsiMeetJS = t();
}(this, function () {
return function (e) {
function t(r) {
if (n[r]) return n[r].exports;var i = n[r] = { i: r, l: !1, exports: {} };return e[r].call(i.exports, i, i.exports, t), i.l = !0, i.exports;
}var n = {};return t.m = e, t.c = n, t.i = function (e) {
return e;
}, t.d = function (e, n, r) {
t.o(e, n) || Object.defineProperty(e, n, { configurable: !1, enumerable: !0, get: r });
}, t.n = function (e) {
var n = e && e.__esModule ? function () {
return e.default;
} : function () {
return e;
};return t.d(n, "a", n), n;
}, t.o = function (e, t) {
return Object.prototype.hasOwnProperty.call(e, t);
}, t.p = "", t(t.s = 86);
}([function (e, t, n) {
var r = n(42),
i = n(78),
o = {},
a = [],
s = r.levels.TRACE;e.exports = { addGlobalTransport: function addGlobalTransport(e) {
r.addGlobalTransport(e);
}, removeGlobalTransport: function removeGlobalTransport(e) {
r.removeGlobalTransport(e);
}, getLogger: function getLogger(e, t, n) {
var i = new r(s, e, t, n);return e ? (o[e] = o[e] || [], o[e].push(i)) : a.push(i), i;
}, setLogLevelById: function setLogLevelById(e, t) {
for (var n = t ? o[t] || [] : a, r = 0; r < n.length; r++) {
n[r].setLevel(e);
}
}, setLogLevel: function setLogLevel(e) {
s = e;for (var t = 0; t < a.length; t++) {
a[t].setLevel(e);
}for (var n in o) {
var r = o[n] || [];for (t = 0; t < r.length; t++) {
r[t].setLevel(e);
}
}
}, levels: r.levels, LogCollector: i };
}, function (e, t) {
var n,
r = "function" == typeof Symbol && "symbol" == typeof (typeof Symbol === "function" ? Symbol.iterator : "@@iterator") ? function (e) {
return typeof e;
} : function (e) {
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== (typeof Symbol === "function" ? Symbol.prototype : "@@prototype") ? "symbol" : typeof e;
};n = function () {
return this;
}();try {
n = n || Function("return this")() || (0, eval)("this");
} catch (e) {
"object" === ("undefined" == typeof window ? "undefined" : r(window)) && (n = window);
}e.exports = n;
}, function (e, t, n) {
"use strict";
(function (e) {
function r() {
if (navigator.webkitGetUserMedia) {
h = v.RTC_BROWSER_CHROME;var e = navigator.userAgent.toLowerCase(),
t = parseInt(e.match(/chrome\/(\d+)\./)[1], 10);return m.log("This appears to be Chrome, ver: " + t), t;
}return null;
}function i() {
var e = navigator.userAgent;if (e.match(/Opera|OPR/)) {
h = v.RTC_BROWSER_OPERA;var t = e.match(/(Opera|OPR) ?\/?(\d+)\.?/)[2];return m.info("This appears to be Opera, ver: " + t), t;
}return null;
}function o() {
if (navigator.mozGetUserMedia) {
h = v.RTC_BROWSER_FIREFOX;var e = parseInt(navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1], 10);return m.log("This appears to be Firefox, ver: " + e), e;
}return null;
}function a() {
return (/^((?!chrome).)*safari/i.test(navigator.userAgent) ? (h = v.RTC_BROWSER_SAFARI, m.info("This appears to be Safari"), 1) : null
);
}function s() {
var e = void 0,
t = window.navigator.userAgent,
n = t.indexOf("MSIE ");n > 0 && (e = parseInt(t.substring(n + 5, t.indexOf(".", n)), 10));var r = t.indexOf("Trident/");if (!e && r > 0) {
var i = t.indexOf("rv:");e = parseInt(t.substring(i + 3, t.indexOf(".", i)), 10);
}return e && (h = v.RTC_BROWSER_IEXPLORER, m.info("This appears to be IExplorer, ver: " + e)), e;
}function c() {
var e = void 0,
t = window.navigator.userAgent,
n = t.indexOf("Edge/");return !e && n > 0 && (e = parseInt(t.substring(n + 5, t.indexOf(".", n)), 10)), e && (h = v.RTC_BROWSER_EDGE, m.info("This appears to be Edge, ver: " + e)), e;
}function u() {
var e = navigator.userAgent;if (e.match(/Electron/)) {
h = v.RTC_BROWSER_ELECTRON;var t = e.match(/Electron\/([\d.]+)/)[1];return m.info("This appears to be Electron, ver: " + t), t;
}return null;
}function l() {
var e = navigator.userAgent;if (e.match(/JitsiMeetNW/)) {
h = v.RTC_BROWSER_NWJS;var t = e.match(/JitsiMeetNW\/([\d.]+)/)[1];return m.info("This appears to be JitsiMeetNW, ver: " + t), t;
}return null;
}function d() {
var e = navigator.userAgent.match(/\b(react[ \t_-]*native)(?:\/(\S+))?/i),
t = void 0;if (e || "ReactNative" === navigator.product) {
h = v.RTC_BROWSER_REACT_NATIVE;var n = void 0;e && e.length > 2 && (n = e[1], t = e[2]), n || (n = "react-native"), t || (t = "unknown"), console.info("This appears to be " + n + ", ver: " + t);
} else t = null;return t;
}var p = n(0),
f = void n.n(p),
h = void 0,
m = n.i(p.getLogger)(e),
v = { RTC_BROWSER_CHROME: "rtc_browser.chrome", RTC_BROWSER_OPERA: "rtc_browser.opera", RTC_BROWSER_FIREFOX: "rtc_browser.firefox", RTC_BROWSER_IEXPLORER: "rtc_browser.iexplorer", RTC_BROWSER_EDGE: "rtc_browser.edge", RTC_BROWSER_SAFARI: "rtc_browser.safari", RTC_BROWSER_NWJS: "rtc_browser.nwjs", RTC_BROWSER_ELECTRON: "rtc_browser.electron", RTC_BROWSER_REACT_NATIVE: "rtc_browser.react-native", doesVideoMuteByStreamRemove: function doesVideoMuteByStreamRemove() {
return !(v.isFirefox() || v.isEdge());
}, getBrowserType: function getBrowserType() {
return h;
}, getBrowserName: function getBrowserName() {
return -1 !== navigator.userAgent.indexOf("Android") ? "android" : h.split("rtc_browser.")[1];
}, isChrome: function isChrome() {
return h === v.RTC_BROWSER_CHROME;
}, isOpera: function isOpera() {
return h === v.RTC_BROWSER_OPERA;
}, isFirefox: function isFirefox() {
return h === v.RTC_BROWSER_FIREFOX;
}, isIExplorer: function isIExplorer() {
return h === v.RTC_BROWSER_IEXPLORER;
}, isEdge: function isEdge() {
return h === v.RTC_BROWSER_EDGE;
}, isSafari: function isSafari() {
return h === v.RTC_BROWSER_SAFARI;
}, isNWJS: function isNWJS() {
return h === v.RTC_BROWSER_NWJS;
}, isElectron: function isElectron() {
return h === v.RTC_BROWSER_ELECTRON;
}, isP2PSupported: function isP2PSupported() {
return !v.isEdge();
}, isReactNative: function isReactNative() {
return h === v.RTC_BROWSER_REACT_NATIVE;
}, isTemasysPluginUsed: function isTemasysPluginUsed() {
return v.isSafari() || v.isIExplorer() && v.getIExplorerVersion() < 12;
}, isVideoMuteOnConnInterruptedSupported: function isVideoMuteOnConnInterruptedSupported() {
return v.isChrome();
}, getFirefoxVersion: function getFirefoxVersion() {
return v.isFirefox() ? f : null;
}, getChromeVersion: function getChromeVersion() {
return v.isChrome() ? f : null;
}, getIExplorerVersion: function getIExplorerVersion() {
return v.isIExplorer() ? f : null;
}, getEdgeVersion: function getEdgeVersion() {
return v.isEdge() ? f : null;
}, usesPlanB: function usesPlanB() {
return !v.usesUnifiedPlan();
}, usesUnifiedPlan: function usesUnifiedPlan() {
return v.isFirefox();
}, supportsBandwidthStatistics: function supportsBandwidthStatistics() {
return !v.isFirefox() && !v.isEdge();
}, supportsDataChannels: function supportsDataChannels() {
return !v.isEdge();
}, supportsRTTStatistics: function supportsRTTStatistics() {
return !v.isFirefox() && !v.isEdge();
}, supportsSimulcast: function supportsSimulcast() {
return v.isChrome() || v.isFirefox() || v.isElectron() || v.isNWJS();
}, supportsRtx: function supportsRtx() {
return !v.isFirefox();
}, supportsRtpSender: function supportsRtpSender() {
return v.isFirefox();
} };f = function () {
for (var e = void 0, t = [d, u, l, i, r, o, c, s, a], n = 0; n < t.length; n++) {
if (e = t[n]()) return e;
}return m.warn("Browser type defaults to Safari ver 1"), h = v.RTC_BROWSER_SAFARI, 1;
}(), t.a = v;
}).call(t, "modules/RTC/RTCBrowserType.js");
}, function (e, t) {
function n() {
for (var e = arguments.length, t = Array(e), n = 0; n < e; n++) {
t[n] = arguments[n];
}i.forEach(function (e) {
return e.apply(void 0, t);
}), o && o.apply(void 0, t);
}function r(e) {
i.forEach(function (t) {
return t(null, null, null, null, e.reason);
}), a && a(e);
}var i = [],
o = window.onerror,
a = window.onunhandledrejection;window.onerror = n, window.onunhandledrejection = r;var s = { addHandler: function addHandler(e) {
i.push(e);
}, callErrorHandler: function callErrorHandler(e) {
var t = window.onerror;t && t(null, null, null, null, e);
}, callUnhandledRejectionHandler: function callUnhandledRejectionHandler(e) {
var t = window.onunhandledrejection;t && t(e);
} };e.exports = s;
}, function (e, t, n) {
"use strict";
n.d(t, "a", function () {
return r;
}), n.d(t, "b", function () {
return i;
});var r = "audio",
i = "video";
}, function (e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", { value: !0 }), n.d(t, "AUTH_STATUS_CHANGED", function () {
return r;
}), n.d(t, "AVAILABLE_DEVICES_CHANGED", function () {
return i;
}), n.d(t, "AVATAR_CHANGED", function () {
return o;
}), n.d(t, "BEFORE_STATISTICS_DISPOSED", function () {
return a;
}), n.d(t, "CONFERENCE_ERROR", function () {
return s;
}), n.d(t, "CONFERENCE_FAILED", function () {
return c;
}), n.d(t, "CONFERENCE_JOINED", function () {
return u;
}), n.d(t, "CONFERENCE_LEFT", function () {
return l;
}), n.d(t, "CONNECTION_INTERRUPTED", function () {
return d;
}), n.d(t, "CONNECTION_RESTORED", function () {
return p;
}), n.d(t, "DISPLAY_NAME_CHANGED", function () {
return f;
}), n.d(t, "DOMINANT_SPEAKER_CHANGED", function () {
return h;
}), n.d(t, "DTMF_SUPPORT_CHANGED", function () {
return m;
}), n.d(t, "ENDPOINT_MESSAGE_RECEIVED", function () {
return v;
}), n.d(t, "JVB121_STATUS", function () {
return g;
}), n.d(t, "KICKED", function () {
return y;
}), n.d(t, "LAST_N_ENDPOINTS_CHANGED", function () {
return b;
}), n.d(t, "LOCK_STATE_CHANGED", function () {
return S;
}), n.d(t, "MESSAGE_RECEIVED", function () {
return E;
}), n.d(t, "PARTICIPANT_CONN_STATUS_CHANGED", function () {
return T;
}), n.d(t, "PARTCIPANT_FEATURES_CHANGED", function () {
return _;
}), n.d(t, "PARTICIPANT_PROPERTY_CHANGED", function () {
return C;
}), n.d(t, "P2P_STATUS", function () {
return w;
}), n.d(t, "PHONE_NUMBER_CHANGED", function () {
return R;
}), n.d(t, "RECORDER_STATE_CHANGED", function () {
return k;
}), n.d(t, "VIDEO_SIP_GW_AVAILABILITY_CHANGED", function () {
return A;
}), n.d(t, "START_MUTED_POLICY_CHANGED", function () {
return I;
}), n.d(t, "STARTED_MUTED", function () {
return P;
}), n.d(t, "SUBJECT_CHANGED", function () {
return O;
}), n.d(t, "SUSPEND_DETECTED", function () {
return D;
}), n.d(t, "TALK_WHILE_MUTED", function () {
return L;
}), n.d(t, "TRACK_ADDED", function () {
return N;
}), n.d(t, "TRACK_AUDIO_LEVEL_CHANGED", function () {
return M;
}), n.d(t, "TRACK_MUTE_CHANGED", function () {
return x;
}), n.d(t, "TRACK_REMOVED", function () {
return j;
}), n.d(t, "USER_JOINED", function () {
return F;
}), n.d(t, "USER_LEFT", function () {
return U;
}), n.d(t, "USER_ROLE_CHANGED", function () {
return B;
}), n.d(t, "USER_STATUS_CHANGED", function () {
return J;
});var r = "conference.auth_status_changed",
i = "conference.availableDevicesChanged",
o = "conference.avatarChanged",
a = "conference.beforeStatisticsDisposed",
s = "conference.error",
c = "conference.failed",
u = "conference.joined",
l = "conference.left",
d = "conference.connectionInterrupted",
p = "conference.connectionRestored",
f = "conference.displayNameChanged",
h = "conference.dominantSpeaker",
m = "conference.dtmfSupportChanged",
v = "conference.endpoint_message_received",
g = "conference.jvb121Status",
y = "conferenece.kicked",
b = "conference.lastNEndpointsChanged",
S = "conference.lock_state_changed",
E = "conference.messageReceived",
T = "conference.participant_conn_status_changed",
_ = "conference.partcipant_features_changed",
C = "conference.participant_property_changed",
w = "conference.p2pStatus",
R = "conference.phoneNumberChanged",
k = "conference.recorderStateChanged",
A = "conference.videoSIPGWAvailabilityChanged",
I = "conference.start_muted_policy_changed",
P = "conference.started_muted",
O = "conference.subjectChanged",
D = "conference.suspendDetected",
L = "conference.talk_while_muted",
N = "conference.trackAdded",
M = "conference.audioLevelsChanged",
x = "conference.trackMuteChanged",
j = "conference.trackRemoved",
F = "conference.userJoined",
U = "conference.userLeft",
B = "conference.roleChanged",
J = "conference.statusChanged";
}, function (e, t, n) {
"use strict";
(function (e) {
function r(e) {
g || (m.loadScript(e || "https://api.callstats.io/static/callstats-ws.min.js", !0, !0), g = !0);
}function i(e) {
var t = new Error();return t.stack = e.stack, t.name = (e.name || "Unknown error") + (e.gum && e.gum.error && e.gum.error.name ? " - " + e.gum.error.name : ""), t.constraintName = e.gum && e.gum.constraints ? JSON.stringify(e.gum.constraints) : "", t.message = e.message, t;
}function o(e, t) {
this.rtpStatsMap = new Map(), this.eventEmitter = new f(), this.xmpp = e, this.options = t || {}, this.callStatsIntegrationEnabled = this.options.callStatsID && this.options.callStatsSecret && !0 !== o.disableThirdPartyRequests, this.callStatsIntegrationEnabled && (r(this.options.callStatsCustomScriptUrl), this.options.callStatsConfIDNamespace || h.warn('"callStatsConfIDNamespace" is not defined')), this.callsStatsInstances = new Map(), o.instances.add(this);
}t.a = o;var a = n(103),
s = n(105),
c = n(11),
u = n(47),
l = n(106),
d = n(55),
p = n(29),
f = n(14),
h = n(0).getLogger(e),
m = n(49),
v = void 0,
g = !1;o.init = function (e) {
o.audioLevelsEnabled = !e.disableAudioLevels, "number" == typeof e.audioLevelsInterval && (o.audioLevelsInterval = e.audioLevelsInterval), o.disableThirdPartyRequests = e.disableThirdPartyRequests;
}, o.audioLevelsEnabled = !1, o.audioLevelsInterval = 200, o.disableThirdPartyRequests = !1, o.analytics = a.a, Object.defineProperty(o, "instances", { get: function get() {
return v || (v = new Set()), v;
} }), o.prototype.startRemoteStats = function (e) {
this.stopRemoteStats(e);try {
var t = new l.a(e, o.audioLevelsInterval, 2e3, this.eventEmitter);t.start(o.audioLevelsEnabled), this.rtpStatsMap.set(e.id, t);
} catch (e) {
h.error("Failed to start collecting remote statistics: " + e);
}
}, o.localStats = [], o.startLocalStats = function (e, t) {
if (o.audioLevelsEnabled) {
var n = new u.a(e, o.audioLevelsInterval, t);this.localStats.push(n), n.start();
}
}, o.prototype.addAudioLevelListener = function (e) {
o.audioLevelsEnabled && this.eventEmitter.on(d.a, e);
}, o.prototype.removeAudioLevelListener = function (e) {
o.audioLevelsEnabled && this.eventEmitter.removeListener(d.a, e);
}, o.prototype.addBeforeDisposedListener = function (e) {
this.eventEmitter.on(d.b, e);
}, o.prototype.removeBeforeDisposedListener = function (e) {
this.eventEmitter.removeListener(d.b, e);
}, o.prototype.addConnectionStatsListener = function (e) {
this.eventEmitter.on(d.c, e);
}, o.prototype.removeConnectionStatsListener = function (e) {
this.eventEmitter.removeListener(d.c, e);
}, o.prototype.addByteSentStatsListener = function (e) {
this.eventEmitter.on(d.d, e);
}, o.prototype.removeByteSentStatsListener = function (e) {
this.eventEmitter.removeListener(d.d, e);
}, o.prototype.dispose = function () {
try {
this.callsStatsInstances.size || this.eventEmitter.emit(d.b);var e = !0,
t = !1,
n = void 0;try {
for (var r, i = this.callsStatsInstances.values()[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(e = (r = i.next()).done); e = !0) {
var a = r.value;this.stopCallStats(a.tpc);
}
} catch (e) {
t = !0, n = e;
} finally {
try {
!e && i.return && i.return();
} finally {
if (t) throw n;
}
}var s = !0,
c = !1,
u = void 0;try {
for (var l, p = this.rtpStatsMap.keys()[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(s = (l = p.next()).done); s = !0) {
var f = l.value;this._stopRemoteStats(f);
}
} catch (e) {
c = !0, u = e;
} finally {
try {
!s && p.return && p.return();
} finally {
if (c) throw u;
}
}this.eventEmitter && this.eventEmitter.removeAllListeners();
} finally {
o.instances.delete(this);
}
}, o.stopLocalStats = function (e) {
if (o.audioLevelsEnabled) for (var t = 0; t < o.localStats.length; t++) {
if (o.localStats[t].stream === e) {
var n = o.localStats.splice(t, 1);n[0].stop();break;
}
}
}, o.prototype._stopRemoteStats = function (e) {
var t = this.rtpStatsMap.get(e);t && (t.stop(), this.rtpStatsMap.delete(e));
}, o.prototype.stopRemoteStats = function (e) {
this._stopRemoteStats(e.id);
}, o.prototype.startCallStats = function (e, t) {
if (this.callStatsIntegrationEnabled) {
if (this.callsStatsInstances.has(e.id)) return void h.error("CallStats instance for ${tpc} exists already");if (!s.a.isBackendInitialized()) {
var n = p.a.getCallStatsUserName();if (!s.a.initBackend({ callStatsID: this.options.callStatsID, callStatsSecret: this.options.callStatsSecret, userName: n, aliasName: this.options.callStatsAliasName })) return;
}h.info("Starting CallStats for " + e + "...");var r = new s.a(e, { confID: this._getCallStatsConfID(), remoteUserID: t });this.callsStatsInstances.set(e.id, r);
}
}, o._getAllCallStatsInstances = function () {
var e = new Set(),
t = !0,
n = !1,
r = void 0;try {
for (var i, a = o.instances[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(t = (i = a.next()).done); t = !0) {
var s = i.value,
c = !0,
u = !1,
l = void 0;try {
for (var d, p = s.callsStatsInstances.values()[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(c = (d = p.next()).done); c = !0) {
var f = d.value;e.add(f);
}
} catch (e) {
u = !0, l = e;
} finally {
try {
!c && p.return && p.return();
} finally {
if (u) throw l;
}
}
}
} catch (e) {
n = !0, r = e;
} finally {
try {
!t && a.return && a.return();
} finally {
if (n) throw r;
}
}return e;
}, o.prototype._getCallStatsConfID = function () {
return this.options.callStatsConfIDNamespace ? this.options.callStatsConfIDNamespace + "/" + this.options.roomName : this.options.roomName;
}, o.prototype.stopCallStats = function (e) {
var t = this.callsStatsInstances.get(e.id);t && (1 === this.callsStatsInstances.size && this.eventEmitter.emit(d.b), this.callsStatsInstances.delete(e.id), t.sendTerminateEvent());
}, o.prototype.isCallstatsEnabled = function () {
return this.callStatsIntegrationEnabled;
}, o.prototype.sendConnectionResumeOrHoldEvent = function (e, t) {
var n = this.callsStatsInstances.get(e.id);n && n.sendResumeOrHoldEvent(t);
}, o.prototype.sendIceConnectionFailedEvent = function (e) {
var t = this.callsStatsInstances.get(e.id);t && t.sendIceConnectionFailedEvent(), o.analytics.sendEvent("connection.ice_failed");
}, o.prototype.sendMuteEvent = function (e, t, n) {
var r = e && this.callsStatsInstances.get(e.id);s.a.sendMuteEvent(t, n, r);
}, o.prototype.sendScreenSharingEvent = function (e) {
var t = !0,
n = !1,
r = void 0;try {
for (var i, o = this.callsStatsInstances.values()[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(t = (i = o.next()).done); t = !0) {
i.value.sendScreenSharingEvent(e);
}
} catch (e) {
n = !0, r = e;
} finally {
try {
!t && o.return && o.return();
} finally {
if (n) throw r;
}
}
}, o.prototype.sendDominantSpeakerEvent = function () {
var e = !0,
t = !1,
n = void 0;try {
for (var r, i = this.callsStatsInstances.values()[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(e = (r = i.next()).done); e = !0) {
r.value.sendDominantSpeakerEvent();
}
} catch (e) {
t = !0, n = e;
} finally {
try {
!e && i.return && i.return();
} finally {
if (t) throw n;
}
}
}, o.sendActiveDeviceListEvent = function (e) {
var t = o._getAllCallStatsInstances();if (t.size) {
var n = !0,
r = !1,
i = void 0;try {
for (var a, c = t[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(n = (a = c.next()).done); n = !0) {
var u = a.value;s.a.sendActiveDeviceListEvent(e, u);
}
} catch (e) {
r = !0, i = e;
} finally {
try {
!n && c.return && c.return();
} finally {
if (r) throw i;
}
}
} else s.a.sendActiveDeviceListEvent(e, null);
}, o.prototype.associateStreamWithVideoTag = function (e, t, n, r, i, o) {
var a = this.callsStatsInstances.get(e.id);a && a.associateStreamWithVideoTag(t, n, r, i, o);
}, o.sendGetUserMediaFailed = function (e) {
var t = e instanceof c.a ? i(e) : e,
n = o._getAllCallStatsInstances();if (n.size) {
var r = !0,
a = !1,
u = void 0;try {
for (var l, d = n[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(r = (l = d.next()).done); r = !0) {
var p = l.value;s.a.sendGetUserMediaFailed(t, p);
}
} catch (e) {
a = !0, u = e;
} finally {
try {
!r && d.return && d.return();
} finally {
if (a) throw u;
}
}
} else s.a.sendGetUserMediaFailed(t, null);
}, o.prototype.sendCreateOfferFailed = function (e, t) {
var n = this.callsStatsInstances.get(t.id);n && n.sendCreateOfferFailed(e);
}, o.prototype.sendCreateAnswerFailed = function (e, t) {
var n = this.callsStatsInstances.get(t.id);n && n.sendCreateAnswerFailed(e);
}, o.prototype.sendSetLocalDescFailed = function (e, t) {
var n = this.callsStatsInstances.get(t.id);n && n.sendSetLocalDescFailed(e);
}, o.prototype.sendSetRemoteDescFailed = function (e, t) {
var n = this.callsStatsInstances.get(t.id);n && n.sendSetRemoteDescFailed(e);
}, o.prototype.sendAddIceCandidateFailed = function (e, t) {
var n = this.callsStatsInstances.get(t.id);n && n.sendAddIceCandidateFailed(e);
}, o.sendLog = function (e) {
var t = new Set(),
n = !0,
r = !1,
i = void 0;try {
for (var a, c = o.instances[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(n = (a = c.next()).done); n = !0) {
var u = a.value;u.callsStatsInstances.size && t.add(u.callsStatsInstances.values().next().value);
}
} catch (e) {
r = !0, i = e;
} finally {
try {
!n && c.return && c.return();
} finally {
if (r) throw i;
}
}if (t.size) {
var l = !0,
d = !1,
p = void 0;try {
for (var f, h = t[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(l = (f = h.next()).done); l = !0) {
var m = f.value;s.a.sendApplicationLog(e, m);
}
} catch (e) {
d = !0, p = e;
} finally {
try {
!l && h.return && h.return();
} finally {
if (d) throw p;
}
}
} else s.a.sendApplicationLog(e, null);
}, o.prototype.sendFeedback = function (e, t) {
s.a.sendFeedback(this._getCallStatsConfID(), e, t), o.analytics.sendEvent("feedback.rating", { value: e, detailed: t });
}, o.LOCAL_JID = n(138).LOCAL_JID, o.reportGlobalError = function (e) {
e instanceof c.a && e.gum ? o.sendGetUserMediaFailed(e) : o.sendLog(e);
}, o.sendEventToAll = function (e, t) {
this.analytics.sendEvent(e, t), o.sendLog(JSON.stringify({ name: e, data: t }));
};
}).call(t, "modules/statistics/statistics.js");
}, function (e, t) {
var n = { ADD_ICE_CANDIDATE_FAILED: "xmpp.add_ice_candidate_failed", AUDIO_MUTED_BY_FOCUS: "xmpp.audio_muted_by_focus", AUTHENTICATION_REQUIRED: "xmpp.authentication_required", BRIDGE_DOWN: "xmpp.bridge_down", CALL_ACCEPTED: "xmpp.callaccepted.jingle", CALL_INCOMING: "xmpp.callincoming.jingle", CALL_ENDED: "xmpp.callended.jingle", CHAT_ERROR_RECEIVED: "xmpp.chat_error_received", CONFERENCE_SETUP_FAILED: "xmpp.conference_setup_failed", CONNECTION_ESTABLISHED: "xmpp.connection.connected", CONNECTION_FAILED: "xmpp.connection.failed", CONNECTION_INTERRUPTED: "xmpp.connection.interrupted", CONNECTION_RESTORED: "xmpp.connection.restored", CONNECTION_ICE_FAILED: "xmpp.connection.ice.failed", DISPLAY_NAME_CHANGED: "xmpp.display_name_changed", EMUC_ROOM_ADDED: "xmpp.emuc_room_added", EMUC_ROOM_REMOVED: "xmpp.emuc_room_removed", ETHERPAD: "xmpp.etherpad", FOCUS_DISCONNECTED: "xmpp.focus_disconnected", FOCUS_LEFT: "xmpp.focus_left", GRACEFUL_SHUTDOWN: "xmpp.graceful_shutdown", ICE_RESTARTING: "rtc.ice_restarting", JINGLE_ERROR: "xmpp.jingle_error", JINGLE_FATAL_ERROR: "xmpp.jingle_fatal_error", KICKED: "xmpp.kicked", LOCAL_ROLE_CHANGED: "xmpp.localrole_changed", MESSAGE_RECEIVED: "xmpp.message_received", MUC_DESTROYED: "xmpp.muc_destroyed", MUC_JOINED: "xmpp.muc_joined", MUC_MEMBER_JOINED: "xmpp.muc_member_joined", MUC_MEMBER_LEFT: "xmpp.muc_member_left", MUC_LEFT: "xmpp.muc_left", MUC_ROLE_CHANGED: "xmpp.muc_role_changed", MUC_LOCK_CHANGED: "xmpp.muc_lock_changed", PARTICIPANT_AUDIO_MUTED: "xmpp.audio_muted", PARTICIPANT_VIDEO_MUTED: "xmpp.video_muted", PARTICIPANT_VIDEO_TYPE_CHANGED: "xmpp.video_type", PARTCIPANT_FEATURES_CHANGED: "xmpp.partcipant_features_changed", PASSWORD_REQUIRED: "xmpp.password_required", PEERCONNECTION_READY: "xmpp.peerconnection_ready", PHONE_NUMBER_CHANGED: "conference.phoneNumberChanged", PRESENCE_STATUS: "xmpp.presence_status", PROMPT_FOR_LOGIN: "xmpp.prompt_for_login", READY_TO_JOIN: "xmpp.ready_to_join", RECORDER_STATE_CHANGED: "xmpp.recorderStateChanged", REMOTE_STATS: "xmpp.remote_stats", RESERVATION_ERROR: "xmpp.room_reservation_error", ROOM_CONNECT_ERROR: "xmpp.room_connect_error", ROOM_CONNECT_NOT_ALLOWED_ERROR: "xmpp.room_connect_error.not_allowed", ROOM_JOIN_ERROR: "xmpp.room_join_error", ROOM_MAX_USERS_ERROR: "xmpp.room_max_users_error", SENDING_CHAT_MESSAGE: "xmpp.sending_chat_message", SESSION_ACCEPT_TIMEOUT: "xmpp.session_accept_timeout", START_MUTED_FROM_FOCUS: "xmpp.start_muted_from_focus", SUBJECT_CHANGED: "xmpp.subject_changed", SUSPEND_DETECTED: "xmpp.suspend_detected", TRANSPORT_INFO: "xmpp.transportinfo.jingle", VIDEO_SIP_GW_AVAILABILITY_CHANGED: "xmpp.videoSIPGWAvailabilityChanged", ICE_CONNECTION_STATE_CHANGED: "xmpp.ice_connection_state_changed" };e.exports = n;
}, function (e, t) {
var n = { CREATE_ANSWER_FAILED: "rtc.create_answer_failed", CREATE_OFFER_FAILED: "rtc.create_offer_failed", RTC_READY: "rtc.ready", DATA_CHANNEL_OPEN: "rtc.data_channel_open", ENDPOINT_CONN_STATUS_CHANGED: "rtc.endpoint_conn_status_changed", DOMINANT_SPEAKER_CHANGED: "rtc.dominant_speaker_changed", LASTN_ENDPOINT_CHANGED: "rtc.lastn_endpoint_changed", LASTN_VALUE_CHANGED: "rtc.lastn_value_changed", AVAILABLE_DEVICES_CHANGED: "rtc.available_devices_changed", TRACK_ATTACHED: "rtc.track_attached", REMOTE_TRACK_ADDED: "rtc.remote_track_added", REMOTE_TRACK_MUTE: "rtc.remote_track_mute", REMOTE_TRACK_REMOVED: "rtc.remote_track_removed", REMOTE_TRACK_UNMUTE: "rtc.remote_track_unmute", SET_LOCAL_DESCRIPTION_FAILED: "rtc.set_local_description_failed", SET_REMOTE_DESCRIPTION_FAILED: "rtc.set_remote_description_failed", AUDIO_OUTPUT_DEVICE_CHANGED: "rtc.audio_output_device_changed", DEVICE_LIST_CHANGED: "rtc.device_list_changed", DEVICE_LIST_AVAILABLE: "rtc.device_list_available", ENDPOINT_MESSAGE_RECEIVED: "rtc.endpoint_message_received", LOCAL_UFRAG_CHANGED: "rtc.local_ufrag_changed", REMOTE_UFRAG_CHANGED: "rtc.remote_ufrag_changed" };e.exports = n;
}, function (e, t, n) {
function r() {
return "WebkitAppearance" in document.documentElement.style || window.console && (console.firebug || console.exception && console.table) || navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31;
}function i() {
var e = arguments,
n = this.useColors;if (e[0] = (n ? "%c" : "") + this.namespace + (n ? " %c" : " ") + e[0] + (n ? "%c " : " ") + "+" + t.humanize(this.diff), !n) return e;var r = "color: " + this.color;e = [e[0], r, "color: inherit"].concat(Array.prototype.slice.call(e, 1));var i = 0,
o = 0;return e[0].replace(/%[a-z%]/g, function (e) {
"%%" !== e && (i++, "%c" === e && (o = i));
}), e.splice(o, 0, r), e;
}function o() {
return "object" == typeof console && console.log && Function.prototype.apply.call(console.log, console, arguments);
}function a(e) {
try {
null == e ? t.storage.removeItem("debug") : t.storage.debug = e;
} catch (e) {}
}function s() {
var e;try {
e = t.storage.debug;
} catch (e) {}return e;
}t = e.exports = n(156), t.log = o, t.formatArgs = i, t.save = a, t.load = s, t.useColors = r, t.storage = "undefined" != typeof chrome && void 0 !== chrome.storage ? chrome.storage.local : function () {
try {
return window.localStorage;
} catch (e) {}
}(), t.colors = ["lightseagreen", "forestgreen", "goldenrod", "dodgerblue", "darkorchid", "crimson"], t.formatters.j = function (e) {
return JSON.stringify(e);
}, t.enable(s());
}, function (e, t, n) {
"use strict";
function r(e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
}var i = n(14),
o = n.n(i),
a = function () {
function e(e, t) {
for (var n = 0; n < t.length; n++) {
var r = t[n];r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
}
}return function (t, n, r) {
return n && e(t.prototype, n), r && e(t, r), t;
};
}(),
s = function () {
function e() {
var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : new o.a();r(this, e), this.eventEmitter = t, this.addEventListener = this.on = this.addListener, this.removeEventListener = this.off = this.removeListener;
}return a(e, [{ key: "addListener", value: function value(e, t) {
this.eventEmitter.addListener(e, t);
} }, { key: "removeListener", value: function value(e, t) {
this.eventEmitter.removeListener(e, t);
} }]), e;
}();t.a = s;
}, function (e, t, n) {
"use strict";
function r(e, t, n) {
if ("object" === (void 0 === e ? "undefined" : a(e)) && void 0 !== e.name) switch (this.gum = { error: e, constraints: t, devices: n && Array.isArray(n) ? n.slice(0) : void 0 }, e.name) {case "PermissionDeniedError":case "SecurityError":
this.name = o.PERMISSION_DENIED, this.message = s[this.name] + (this.gum.devices || []).join(", ");break;case "DevicesNotFoundError":case "NotFoundError":
this.name = o.NOT_FOUND, this.message = s[this.name] + (this.gum.devices || []).join(", ");break;case "ConstraintNotSatisfiedError":case "OverconstrainedError":
var r = e.constraintName || e.constraint;t && t.video && (!n || n.indexOf("video") > -1) && ("minWidth" === r || "maxWidth" === r || "minHeight" === r || "maxHeight" === r || "width" === r || "height" === r) ? (this.name = o.UNSUPPORTED_RESOLUTION, this.message = s[this.name] + i(r, t)) : (this.name = o.CONSTRAINT_FAILED, this.message = s[this.name] + e.constraintName);break;default:
this.name = o.GENERAL, this.message = e.message || s[this.name];} else {
if ("string" != typeof e) throw new Error("Invalid arguments");s[e] ? (this.name = e, this.message = t || s[e]) : this.message = e;
}this.stack = e.stack || new Error().stack;
}function i(e, t) {
if (t && t.video && t.video.mandatory) switch (e) {case "width":
return t.video.mandatory.minWidth;case "height":
return t.video.mandatory.minHeight;default:
return t.video.mandatory[e] || "";}return "";
}var o = n(15),
a = "function" == typeof Symbol && "symbol" == typeof (typeof Symbol === "function" ? Symbol.iterator : "@@iterator") ? function (e) {
return typeof e;
} : function (e) {
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== (typeof Symbol === "function" ? Symbol.prototype : "@@prototype") ? "symbol" : typeof e;
},
s = {};s[o.UNSUPPORTED_RESOLUTION] = "Video resolution is not supported: ", s[o.FIREFOX_EXTENSION_NEEDED] = "Firefox extension is not installed", s[o.CHROME_EXTENSION_INSTALLATION_ERROR] = "Failed to install Chrome extension", s[o.CHROME_EXTENSION_USER_GESTURE_REQUIRED] = "Failed to install Chrome extension - installations can only be initiated by a user gesture.", s[o.CHROME_EXTENSION_USER_CANCELED] = "User canceled Chrome's screen sharing prompt", s[o.CHROME_EXTENSION_GENERIC_ERROR] = "Unknown error from Chrome extension", s[o.ELECTRON_DESKTOP_PICKER_ERROR] = "Unkown error from desktop picker", s[o.ELECTRON_DESKTOP_PICKER_NOT_FOUND] = "Failed to detect desktop picker", s[o.GENERAL] = "Generic getUserMedia error", s[o.PERMISSION_DENIED] = "User denied permission to use device(s): ", s[o.NOT_FOUND] = "Requested device(s) was/were not found: ", s[o.CONSTRAINT_FAILED] = "Constraint could not be satisfied: ", s[o.TRACK_IS_DISPOSED] = "Track has been already disposed", s[o.TRACK_NO_STREAM_FOUND] = "Track does not have an associated Media Stream", s[o.TRACK_MUTE_UNMUTE_IN_PROGRESS] = "Track mute/unmute process is currently in progress", s[o.NO_DATA_FROM_SOURCE] = "The track has stopped receiving data from it's source", r.prototype = Object.create(Error.prototype), r.prototype.constructor = r, t.a = r;
}, function (e, t, n) {
"use strict";
(function (e) {
var r = n(0),
i = (n.n(r), n(19)),
o = n.n(i),
a = n(2),
s = n.i(r.getLogger)(e),
c = { filterSpecialChars: function filterSpecialChars(e) {
return e ? e.replace(/[\\\/\{,\}\+]/g, "") : e;
}, iceparams: function iceparams(e, t) {
var n = null,
r = void 0,
i = void 0;return (i = c.findLine(e, "a=ice-ufrag:", t)) && (r = c.findLine(e, "a=ice-pwd:", t)) && (n = { ufrag: c.parseICEUfrag(i), pwd: c.parseICEPwd(r) }), n;
}, parseICEUfrag: function parseICEUfrag(e) {
return e.substring(12);
}, buildICEUfrag: function buildICEUfrag(e) {
return "a=ice-ufrag:" + e;
}, parseICEPwd: function parseICEPwd(e) {
return e.substring(10);
}, buildICEPwd: function buildICEPwd(e) {
return "a=ice-pwd:" + e;
}, parseMID: function parseMID(e) {
return e.substring(6);
}, parseMLine: function parseMLine(e) {
var t = {},
n = e.substring(2).split(" ");return t.media = n.shift(), t.port = n.shift(), t.proto = n.shift(), "" === n[n.length - 1] && n.pop(), t.fmt = n, t;
}, buildMLine: function buildMLine(e) {
return "m=" + e.media + " " + e.port + " " + e.proto + " " + e.fmt.join(" ");
}, parseRTPMap: function parseRTPMap(e) {
var t = {},
n = e.substring(9).split(" ");return t.id = n.shift(), n = n[0].split("/"), t.name = n.shift(), t.clockrate = n.shift(), t.channels = n.length ? n.shift() : "1", t;
}, parseSCTPMap: function parseSCTPMap(e) {
var t = e.substring(10).split(" ");return [t[0], t[1], t.length > 2 ? t[2] : null];
}, buildRTPMap: function buildRTPMap(e) {
var t = "a=rtpmap:" + e.getAttribute("id") + " " + e.getAttribute("name") + "/" + e.getAttribute("clockrate");return e.getAttribute("channels") && "1" !== e.getAttribute("channels") && (t += "/" + e.getAttribute("channels")), t;
}, parseCrypto: function parseCrypto(e) {
var t = {},
n = e.substring(9).split(" ");return t.tag = n.shift(), t["crypto-suite"] = n.shift(), t["key-params"] = n.shift(), n.length && (t["session-params"] = n.join(" ")), t;
}, parseFingerprint: function parseFingerprint(e) {
var t = {},
n = e.substring(14).split(" ");return t.hash = n.shift(), t.fingerprint = n.shift(), t;
}, parseFmtp: function parseFmtp(e) {
var t = [],
n = e.split(" ");n.shift(), n = n.join(" ").split(";");for (var r = 0; r < n.length; r++) {
for (var i = n[r].split("=")[0]; i.length && " " === i[0];) {
i = i.substring(1);
}var o = n[r].split("=")[1];i && o ? t.push({ name: i, value: o }) : i && t.push({ name: "", value: i });
}return t;
}, parseICECandidate: function parseICECandidate(e) {
var t = {},
n = e.split(" ");t.foundation = n[0].substring(12), t.component = n[1], t.protocol = n[2].toLowerCase(), t.priority = n[3], t.ip = n[4], t.port = n[5], t.type = n[7], t.generation = 0;for (var r = 8; r < n.length; r += 2) {
switch (n[r]) {case "raddr":
t["rel-addr"] = n[r + 1];break;case "rport":
t["rel-port"] = n[r + 1];break;case "generation":
t.generation = n[r + 1];break;case "tcptype":
t.tcptype = n[r + 1];break;default:
s.log('parseICECandidate not translating "' + n[r] + '" = "' + n[r + 1] + '"');}
}return t.network = "1", t.id = Math.random().toString(36).substr(2, 10), t;
}, buildICECandidate: function buildICECandidate(e) {
var t = ["a=candidate:" + e.foundation, e.component, e.protocol, e.priority, e.ip, e.port, "typ", e.type].join(" ");switch (t += " ", e.type) {case "srflx":case "prflx":case "relay":
e.hasOwnAttribute("rel-addr") && e.hasOwnAttribute("rel-port") && (t += "raddr", t += " ", t += e["rel-addr"], t += " ", t += "rport", t += " ", t += e["rel-port"], t += " ");}return e.hasOwnAttribute("tcptype") && (t += "tcptype", t += " ", t += e.tcptype, t += " "), t += "generation", t += " ", t += e.hasOwnAttribute("generation") ? e.generation : "0";
}, parseSSRC: function parseSSRC(e) {
for (var t = {}, n = e.split("\r\n"), r = 0; r < n.length; r++) {
if ("a=ssrc:" === n[r].substring(0, 7)) {
var i = n[r].indexOf(" ");t[n[r].substr(i + 1).split(":", 2)[0]] = n[r].substr(i + 1).split(":", 2)[1];
}
}return t;
}, parseRTCPFB: function parseRTCPFB(e) {
var t = e.substr(10).split(" "),
n = {};return n.pt = t.shift(), n.type = t.shift(), n.params = t, n;
}, parseExtmap: function parseExtmap(e) {
var t = e.substr(9).split(" "),
n = {};return n.value = t.shift(), -1 === n.value.indexOf("/") ? n.direction = "both" : (n.direction = n.value.substr(n.value.indexOf("/") + 1), n.value = n.value.substr(0, n.value.indexOf("/"))), n.uri = t.shift(), n.params = t, n;
}, findLine: function findLine(e, t, n) {
for (var r = e.split("\r\n"), i = 0; i < r.length; i++) {
if (r[i].substring(0, t.length) === t) return r[i];
}if (!n) return !1;r = n.split("\r\n");for (var o = 0; o < r.length; o++) {
if (r[o].substring(0, t.length) === t) return r[o];
}return !1;
}, findLines: function findLines(e, t, n) {
for (var r = e.split("\r\n"), i = [], o = 0; o < r.length; o++) {
r[o].substring(0, t.length) === t && i.push(r[o]);
}if (i.length || !n) return i;r = n.split("\r\n");for (var a = 0; a < r.length; a++) {
r[a].substring(0, t.length) === t && i.push(r[a]);
}return i;
}, candidateToJingle: function candidateToJingle(e) {
if (0 === e.indexOf("candidate:")) e = "a=" + e;else if ("a=candidate:" !== e.substring(0, 12)) return s.log("parseCandidate called with a line that is not a candidate line"), s.log(e), null;"\r\n" === e.substring(e.length - 2) && (e = e.substring(0, e.length - 2));var t = {},
n = e.split(" ");if ("typ" !== n[6]) return s.log("did not find typ in the right place"), s.log(e), null;t.foundation = n[0].substring(12), t.component = n[1], t.protocol = n[2].toLowerCase(), t.priority = n[3], t.ip = n[4], t.port = n[5], t.type = n[7], t.generation = "0";for (var r = 8; r < n.length; r += 2) {
switch (n[r]) {case "raddr":
t["rel-addr"] = n[r + 1];break;case "rport":
t["rel-port"] = n[r + 1];break;case "generation":
t.generation = n[r + 1];break;case "tcptype":
t.tcptype = n[r + 1];break;default:
s.log('not translating "' + n[r] + '" = "' + n[r + 1] + '"');}
}return t.network = "1", t.id = Math.random().toString(36).substr(2, 10), t;
}, candidateFromJingle: function candidateFromJingle(e) {
var t = "a=candidate:";t += e.getAttribute("foundation"), t += " ", t += e.getAttribute("component"), t += " ";var n = e.getAttribute("protocol");switch (a.a.isFirefox() && "ssltcp" === n.toLowerCase() && (n = "tcp"), t += n, t += " ", t += e.getAttribute("priority"), t += " ", t += e.getAttribute("ip"), t += " ", t += e.getAttribute("port"), t += " ", t += "typ", t += " " + e.getAttribute("type"), t += " ", e.getAttribute("type")) {case "srflx":case "prflx":case "relay":
e.getAttribute("rel-addr") && e.getAttribute("rel-port") && (t += "raddr", t += " ", t += e.getAttribute("rel-addr"), t += " ", t += "rport", t += " ", t += e.getAttribute("rel-port"), t += " ");}return "tcp" === n.toLowerCase() && (t += "tcptype", t += " ", t += e.getAttribute("tcptype"), t += " "), t += "generation", t += " ", (t += e.getAttribute("generation") || "0") + "\r\n";
}, parsePrimaryVideoSsrc: function parsePrimaryVideoSsrc(e) {
var t = e.ssrcs.map(function (e) {
return e.id;
}).filter(function (e, t, n) {
return n.indexOf(e) === t;
}).length,
n = e.ssrcGroups && e.ssrcGroups.length || 0;if (!(t > 1 && 0 === n)) {
var r = null;if (1 === t) r = e.ssrcs[0].id;else if (2 === t) {
var i = e.ssrcGroups.find(function (e) {
return "FID" === e.semantics;
});i && (r = i.ssrcs.split(" ")[0]);
} else if (t >= 3) {
var o = e.ssrcGroups.find(function (e) {
return "SIM" === e.semantics;
});o && (r = o.ssrcs.split(" ")[0]);
}return r;
}
}, generateSsrc: function generateSsrc() {
return o.a.randomInt(1, 4294967295);
}, getSsrcAttribute: function getSsrcAttribute(e, t, n) {
for (var r = 0; r < e.ssrcs.length; ++r) {
var i = e.ssrcs[r];if (i.id === t && i.attribute === n) return i.value;
}
}, parseGroupSsrcs: function parseGroupSsrcs(e) {
return e.ssrcs.split(" ").map(function (e) {
return parseInt(e, 10);
});
}, getMedia: function getMedia(e, t) {
return e.media.find(function (e) {
return e.type === t;
});
}, getUfrag: function getUfrag(e) {
var t = e.split("\n").filter(function (e) {
return e.startsWith("a=ice-ufrag:");
});if (t.length > 0) return t[0].substr("a=ice-ufrag:".length);
}, preferVideoCodec: function preferVideoCodec(e, t) {
var n = null;if (t) {
for (var r = 0; r < e.rtp.length; ++r) {
var i = e.rtp[r];if (i.codec && i.codec.toLowerCase() === t.toLowerCase()) {
n = i.payload;break;
}
}if (n) {
var o = e.payloads.split(" ").map(function (e) {
return parseInt(e, 10);
}),
a = o.indexOf(n);o.splice(a, 1), o.unshift(n), e.payloads = o.join(" ");
}
}
} };t.a = c;
}).call(t, "modules/xmpp/SDPUtil.js");
}, function (e, t, n) {
var r = n(145),
i = n(146);t.write = i, t.parse = r.parse, t.parseFmtpConfig = r.parseFmtpConfig, t.parseParams = r.parseParams, t.parsePayloads = r.parsePayloads, t.parseRemoteCandidates = r.parseRemoteCandidates, t.parseImageAttributes = r.parseImageAttributes, t.parseSimulcastStreamList = r.parseSimulcastStreamList;
}, function (e, t) {
function n() {
this._events = this._events || {}, this._maxListeners = this._maxListeners || void 0;
}function r(e) {
return "function" == typeof e;
}function i(e) {
return "number" == typeof e;
}function o(e) {
return "object" === (void 0 === e ? "undefined" : s(e)) && null !== e;
}function a(e) {
return void 0 === e;
}var s = "function" == typeof Symbol && "symbol" == typeof (typeof Symbol === "function" ? Symbol.iterator : "@@iterator") ? function (e) {
return typeof e;
} : function (e) {
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== (typeof Symbol === "function" ? Symbol.prototype : "@@prototype") ? "symbol" : typeof e;
};e.exports = n, n.EventEmitter = n, n.prototype._events = void 0, n.prototype._maxListeners = void 0, n.defaultMaxListeners = 10, n.prototype.setMaxListeners = function (e) {
if (!i(e) || e < 0 || isNaN(e)) throw TypeError("n must be a positive number");return this._maxListeners = e, this;
}, n.prototype.emit = function (e) {
var t, n, i, s, c, u;if (this._events || (this._events = {}), "error" === e && (!this._events.error || o(this._events.error) && !this._events.error.length)) {
if ((t = arguments[1]) instanceof Error) throw t;var l = new Error('Uncaught, unspecified "error" event. (' + t + ")");throw l.context = t, l;
}if (n = this._events[e], a(n)) return !1;if (r(n)) switch (arguments.length) {case 1:
n.call(this);break;case 2:
n.call(this, arguments[1]);break;case 3:
n.call(this, arguments[1], arguments[2]);break;default:
s = Array.prototype.slice.call(arguments, 1), n.apply(this, s);} else if (o(n)) for (s = Array.prototype.slice.call(arguments, 1), u = n.slice(), i = u.length, c = 0; c < i; c++) {
u[c].apply(this, s);
}return !0;
}, n.prototype.addListener = function (e, t) {
var i;if (!r(t)) throw TypeError("listener must be a function");return this._events || (this._events = {}), this._events.newListener && this.emit("newListener", e, r(t.listener) ? t.listener : t), this._events[e] ? o(this._events[e]) ? this._events[e].push(t) : this._events[e] = [this._events[e], t] : this._events[e] = t, o(this._events[e]) && !this._events[e].warned && (i = a(this._maxListeners) ? n.defaultMaxListeners : this._maxListeners) && i > 0 && this._events[e].length > i && (this._events[e].warned = !0, console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.", this._events[e].length), "function" == typeof console.trace && console.trace()), this;
}, n.prototype.on = n.prototype.addListener, n.prototype.once = function (e, t) {
function n() {
this.removeListener(e, n), i || (i = !0, t.apply(this, arguments));
}if (!r(t)) throw TypeError("listener must be a function");var i = !1;return n.listener = t, this.on(e, n), this;
}, n.prototype.removeListener = function (e, t) {
var n, i, a, s;if (!r(t)) throw TypeError("listener must be a function");if (!this._events || !this._events[e]) return this;if (n = this._events[e], a = n.length, i = -1, n === t || r(n.listener) && n.listener === t) delete this._events[e], this._events.removeListener && this.emit("removeListener", e, t);else if (o(n)) {
for (s = a; s-- > 0;) {
if (n[s] === t || n[s].listener && n[s].listener === t) {
i = s;break;
}
}if (i < 0) return this;1 === n.length ? (n.length = 0, delete this._events[e]) : n.splice(i, 1), this._events.removeListener && this.emit("removeListener", e, t);
}return this;
}, n.prototype.removeAllListeners = function (e) {
var t, n;if (!this._events) return this;if (!this._events.removeListener) return 0 === arguments.length ? this._events = {} : this._events[e] && delete this._events[e], this;if (0 === arguments.length) {
for (t in this._events) {
"removeListener" !== t && this.removeAllListeners(t);
}return this.removeAllListeners("removeListener"), this._events = {}, this;
}if (n = this._events[e], r(n)) this.removeListener(e, n);else if (n) for (; n.length;) {
this.removeListener(e, n[n.length - 1]);
}return delete this._events[e], this;
}, n.prototype.listeners = function (e) {
return this._events && this._events[e] ? r(this._events[e]) ? [this._events[e]] : this._events[e].slice() : [];
}, n.prototype.listenerCount = function (e) {
if (this._events) {
var t = this._events[e];if (r(t)) return 1;if (t) return t.length;
}return 0;
}, n.listenerCount = function (e, t) {
return e.listenerCount(t);
};
}, function (e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", { value: !0 }), n.d(t, "CHROME_EXTENSION_GENERIC_ERROR", function () {
return r;
}), n.d(t, "CHROME_EXTENSION_INSTALLATION_ERROR", function () {
return i;
}), n.d(t, "CHROME_EXTENSION_USER_GESTURE_REQUIRED", function () {
return o;
}), n.d(t, "CHROME_EXTENSION_USER_CANCELED", function () {
return a;
}), n.d(t, "CONSTRAINT_FAILED", function () {
return s;
}), n.d(t, "ELECTRON_DESKTOP_PICKER_ERROR", function () {
return c;
}), n.d(t, "ELECTRON_DESKTOP_PICKER_NOT_FOUND", function () {
return u;
}), n.d(t, "FIREFOX_EXTENSION_NEEDED", function () {
return l;
}), n.d(t, "GENERAL", function () {
return d;
}), n.d(t, "NOT_FOUND", function () {
return p;
}), n.d(t, "PERMISSION_DENIED", function () {
return f;
}), n.d(t, "TRACK_IS_DISPOSED", function () {
return h;
}), n.d(t, "TRACK_MUTE_UNMUTE_IN_PROGRESS", function () {
return m;
}), n.d(t, "TRACK_NO_STREAM_FOUND", function () {
return v;
}), n.d(t, "UNSUPPORTED_RESOLUTION", function () {
return g;
}), n.d(t, "NO_DATA_FROM_SOURCE", function () {
return y;
});var r = "gum.chrome_extension_generic_error",
i = "gum.chrome_extension_installation_error",
o = "gum.chrome_extension_user_gesture_required",
a = "gum.chrome_extension_user_canceled",
s = "gum.constraint_failed",
c = "gum.electron_desktop_picker_error",
u = "gum.electron_desktop_picker_not_found",
l = "gum.firefox_extension_needed",
d = "gum.general",
p = "gum.not_found",
f = "gum.permission_denied",
h = "track.track_is_disposed",
m = "track.mute_unmute_inprogress",
v = "track.no_stream_found",
g = "gum.unsupported_resolution",
y = "track.no_data_from_source";
}, function (e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", { value: !0 }), n.d(t, "LOCAL_TRACK_STOPPED", function () {
return r;
}), n.d(t, "TRACK_AUDIO_LEVEL_CHANGED", function () {
return i;
}), n.d(t, "TRACK_AUDIO_OUTPUT_CHANGED", function () {
return o;
}), n.d(t, "TRACK_MUTE_CHANGED", function () {
return a;
}), n.d(t, "TRACK_VIDEOTYPE_CHANGED", function () {
return s;
}), n.d(t, "NO_DATA_FROM_SOURCE", function () {
return c;
});var r = "track.stopped",
i = "track.audioLevelsChanged",
o = "track.audioOutputChanged",
a = "track.trackMuteChanged",
s = "track.videoTypeChanged",
c = "track.no_data_from_source";
}, function (e, t) {
var n = { CAMERA: "camera", DESKTOP: "desktop" };e.exports = n;
}, function (e, t, n) {
(function (e) {
function r(e, n) {
return n("b" + t.packets[e.type] + e.data.data);
}function i(e, n, r) {
if (!n) return t.encodeBase64Packet(e, r);var i = e.data,
o = new Uint8Array(i),
a = new Uint8Array(1 + i.byteLength);a[0] = g[e.type];for (var s = 0; s < o.length; s++) {
a[s + 1] = o[s];
}return r(a.buffer);
}function o(e, n, r) {
if (!n) return t.encodeBase64Packet(e, r);var i = new FileReader();return i.onload = function () {
e.data = i.result, t.encodePacket(e, n, !0, r);
}, i.readAsArrayBuffer(e.data);
}function a(e, n, r) {
if (!n) return t.encodeBase64Packet(e, r);if (v) return o(e, n, r);var i = new Uint8Array(1);return i[0] = g[e.type], r(new S([i.buffer, e.data]));
}function s(e, t, n) {
for (var r = new Array(e.length), i = p(e.length, n), o = 0; o < e.length; o++) {
!function (e, n, i) {
t(n, function (t, n) {
r[e] = n, i(t, r);
});
}(o, e[o], i);
}
}var c = n(163),
u = n(164),
l = n(69),
d = n(155),
p = n(154),
f = n(150),
h = navigator.userAgent.match(/Android/i),
m = /PhantomJS/i.test(navigator.userAgent),
v = h || m;t.protocol = 3;var g = t.packets = { open: 0, close: 1, ping: 2, pong: 3, message: 4, upgrade: 5, noop: 6 },
y = c(g),
b = { type: "error", data: "parser error" },
S = n(72);t.encodePacket = function (t, n, o, s) {
"function" == typeof n && (s = n, n = !1), "function" == typeof o && (s = o, o = null);var c = void 0 === t.data ? void 0 : t.data.buffer || t.data;if (e.ArrayBuffer && c instanceof ArrayBuffer) return i(t, n, s);if (S && c instanceof e.Blob) return a(t, n, s);if (c && c.base64) return r(t, s);var u = g[t.type];return void 0 !== t.data && (u += o ? f.encode(String(t.data)) : String(t.data)), s("" + u);
}, t.encodeBase64Packet = function (n, r) {
var i = "b" + t.packets[n.type];if (S && n.data instanceof e.Blob) {
var o = new FileReader();return o.onload = function () {
var e = o.result.split(",")[1];r(i + e);
}, o.readAsDataURL(n.data);
}var a;try {
a = String.fromCharCode.apply(null, new Uint8Array(n.data));
} catch (e) {
for (var s = new Uint8Array(n.data), c = new Array(s.length), u = 0; u < s.length; u++) {
c[u] = s[u];
}a = String.fromCharCode.apply(null, c);
}return i += e.btoa(a), r(i);
}, t.decodePacket = function (e, n, r) {
if ("string" == typeof e || void 0 === e) {
if ("b" == e.charAt(0)) return t.decodeBase64Packet(e.substr(1), n);if (r) try {
e = f.decode(e);
} catch (e) {
return b;
}var i = e.charAt(0);return Number(i) == i && y[i] ? e.length > 1 ? { type: y[i], data: e.substring(1) } : { type: y[i] } : b;
}var o = new Uint8Array(e),
i = o[0],
a = l(e, 1);return S && "blob" === n && (a = new S([a])), { type: y[i], data: a };
}, t.decodeBase64Packet = function (t, n) {
var r = y[t.charAt(0)];if (!e.ArrayBuffer) return { type: r, data: { base64: !0, data: t.substr(1) } };var i = d.decode(t.substr(1));return "blob" === n && S && (i = new S([i])), { type: r, data: i };
}, t.encodePayload = function (e, n, r) {
function i(e) {
return e.length + ":" + e;
}function o(e, r) {
t.encodePacket(e, !!a && n, !0, function (e) {
r(null, i(e));
});
}"function" == typeof n && (r = n, n = null);var a = u(e);return n && a ? S && !v ? t.encodePayloadAsBlob(e, r) : t.encodePayloadAsArrayBuffer(e, r) : e.length ? void s(e, o, function (e, t) {
return r(t.join(""));
}) : r("0:");
}, t.decodePayload = function (e, n, r) {
if ("string" != typeof e) return t.decodePayloadAsBinary(e, n, r);"function" == typeof n && (r = n, n = null);var i;if ("" == e) return r(b, 0, 1);for (var o, a, s = "", c = 0, u = e.length; c < u; c++) {
var l = e.charAt(c);if (":" != l) s += l;else {
if ("" == s || s != (o = Number(s))) return r(b, 0, 1);if (a = e.substr(c + 1, o), s != a.length) return r(b, 0, 1);if (a.length) {
if (i = t.decodePacket(a, n, !0), b.type == i.type && b.data == i.data) return r(b, 0, 1);if (!1 === r(i, c + o, u)) return;
}c += o, s = "";
}
}return "" != s ? r(b, 0, 1) : void 0;
}, t.encodePayloadAsArrayBuffer = function (e, n) {
function r(e, n) {
t.encodePacket(e, !0, !0, function (e) {
return n(null, e);
});
}if (!e.length) return n(new ArrayBuffer(0));s(e, r, function (e, t) {
var r = t.reduce(function (e, t) {
var n;return n = "string" == typeof t ? t.length : t.byteLength, e + n.toString().length + n + 2;
}, 0),
i = new Uint8Array(r),
o = 0;return t.forEach(function (e) {
var t = "string" == typeof e,
n = e;if (t) {
for (var r = new Uint8Array(e.length), a = 0; a < e.length; a++) {
r[a] = e.charCodeAt(a);
}n = r.buffer;
}i[o++] = t ? 0 : 1;for (var s = n.byteLength.toString(), a = 0; a < s.length; a++) {
i[o++] = parseInt(s[a]);
}i[o++] = 255;for (var r = new Uint8Array(n), a = 0; a < r.length; a++) {
i[o++] = r[a];
}
}), n(i.buffer);
});
}, t.encodePayloadAsBlob = function (e, n) {
function r(e, n) {
t.encodePacket(e, !0, !0, function (e) {
var t = new Uint8Array(1);if (t[0] = 1, "string" == typeof e) {
for (var r = new Uint8Array(e.length), i = 0; i < e.length; i++) {
r[i] = e.charCodeAt(i);
}e = r.buffer, t[0] = 0;
}for (var o = e instanceof ArrayBuffer ? e.byteLength : e.size, a = o.toString(), s = new Uint8Array(a.length + 1), i = 0; i < a.length; i++) {
s[i] = parseInt(a[i]);
}if (s[a.length] = 255, S) {
var c = new S([t.buffer, s.buffer, e]);n(null, c);
}
});
}s(e, r, function (e, t) {
return n(new S(t));
});
}, t.decodePayloadAsBinary = function (e, n, r) {
"function" == typeof n && (r = n, n = null);for (var i = e, o = [], a = !1; i.byteLength > 0;) {
for (var s = new Uint8Array(i), c = 0 === s[0], u = "", d = 1; 255 != s[d]; d++) {
if (u.length > 310) {
a = !0;break;
}u += s[d];
}if (a) return r(b, 0, 1);i = l(i, 2 + u.length), u = parseInt(u);var p = l(i, 0, u);if (c) try {
p = String.fromCharCode.apply(null, new Uint8Array(p));
} catch (e) {
var f = new Uint8Array(p);p = "";for (var d = 0; d < f.length; d++) {
p += String.fromCharCode(f[d]);
}
}o.push(p), i = l(i, u);
}var h = o.length;o.forEach(function (e, i) {
r(t.decodePacket(e, n, !0), i, h);
});
};
}).call(t, n(1));
}, function (e, t) {
function n(e, t) {
return Math.floor(Math.random() * (t - e + 1)) + e;
}function r(e) {
return e[n(0, e.length - 1)];
}function i(e) {
for (var t = "", n = 0; n < e; n += 1) {
t += r(o);
}return t;
}var o = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
a = { randomHexDigit: function randomHexDigit() {
return r("0123456789abcdef");
}, randomHexString: function randomHexString(e) {
for (var t = ""; e--;) {
t += this.randomHexDigit();
}return t;
}, randomElement: r, randomAlphanumStr: i, randomInt: n };e.exports = a;
}, function (e, t, n) {
"use strict";
function r(e, t) {
if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return !t || "object" != typeof t && "function" != typeof t ? e : t;
}function i(e, t) {
if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);
}function o(e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
}function a() {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : function () {
function e() {
o(this, e);
}return e;
}();return function (e) {
function t() {
var e;o(this, t);for (var n = arguments.length, i = Array(n), a = 0; a < n; a++) {
i[a] = arguments[a];
}var s = r(this, (e = t.__proto__ || Object.getPrototypeOf(t)).call.apply(e, [this].concat(i)));return s.connection = null, s;
}return i(t, e), c(t, [{ key: "init", value: function value(e) {
this.connection = e;
} }]), t;
}(e);
}n.d(t, "b", function () {
return u;
});var s = n(10),
c = function () {
function e(e, t) {
for (var n = 0; n < t.length; n++) {
var r = t[n];r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
}
}return function (t, n, r) {
return n && e(t.prototype, n), r && e(t, r), t;
};
}();t.a = a();var u = a(s.a);
}, function (e, t) {
e.exports = function (e, t) {
var n = function n() {};n.prototype = t.prototype, e.prototype = new n(), e.prototype.constructor = e;
};
}, function (e, t, n) {
"use strict";
(function (e) {
function r(e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
}function i(e, t) {
if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return !t || "object" != typeof t && "function" != typeof t ? e : t;
}function o(e, t) {
if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);
}function a(e, t) {
var n = [],
r = null;return e.forEach(function (e) {
e.mediaType === v.a ? r = t.micDeviceId : e.videoType === T.a.CAMERA && (r = t.cameraDeviceId), R += 1;var i = new p.a(C({}, e, { deviceId: r, facingMode: t.facingMode, rtcId: R }));n.push(i);
}), n;
}var s = n(0),
c = (n.n(s), n(89)),
u = n(3),
l = n.n(u),
d = n(5),
p = n(90),
f = n(11),
h = n(15),
m = n(10),
v = n(4),
g = n(8),
y = n.n(g),
b = n(23),
S = n(95),
E = n(17),
T = n.n(E),
_ = function () {
function e(e, t) {
for (var n = 0; n < t.length; n++) {
var r = t[n];r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
}
}return function (t, n, r) {
return n && e(t.prototype, n), r && e(t, r), t;
};
}(),
C = Object.assign || function (e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t];for (var r in n) {
Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
}
}return e;
},
w = n.i(s.getLogger)(e),
R = 0,
k = function (e) {
function t(e) {
var n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};r(this, t);var o = i(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this));return o.conference = e, o.peerConnections = new Map(), o.peerConnectionIdCounter = 1, o.localTracks = [], o.options = n, o._channel = null, o._channelOpen = !1, o._lastN = -1, o._lastNEndpoints = null, o._pinnedEndpoint = null, o._selectedEndpoint = null, o._lastNChangeListener = o._onLastNChanged.bind(o), b.a.isDeviceChangeAvailable("output") && b.a.addListener(y.a.AUDIO_OUTPUT_DEVICE_CHANGED, function (e) {
var t = o.getRemoteTracks(v.a),
n = !0,
r = !1,
i = void 0;try {
for (var a, s = t[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(n = (a = s.next()).done); n = !0) {
a.value.setAudioOutput(e);
}
} catch (e) {
r = !0, i = e;
} finally {
try {
!n && s.return && s.return();
} finally {
if (r) throw i;
}
}
}), o;
}return o(t, e), _(t, [{ key: "initializeBridgeChannel", value: function value(e, t) {
var n = this;this._channel = new c.a(e, t, this.eventEmitter), this._channelOpenListener = function () {
n._channelOpen = !0;try {
n._channel.sendPinnedEndpointMessage(n._pinnedEndpoint), n._channel.sendSelectedEndpointMessage(n._selectedEndpoint);
} catch (e) {
l.a.callErrorHandler(e), w.error("Cannot send selected(" + n._selectedEndpoint + ")pinned(" + n._pinnedEndpoint + ") endpoint message.", e);
}n.removeListener(y.a.DATA_CHANNEL_OPEN, n._channelOpenListener), n._channelOpenListener = null, -1 !== n._lastN && n._channel.sendSetLastNMessage(n._lastN);
}, this.addListener(y.a.DATA_CHANNEL_OPEN, this._channelOpenListener), this.addListener(y.a.LASTN_ENDPOINT_CHANGED, this._lastNChangeListener);
} }, { key: "_onLastNChanged", value: function value() {
var e = this,
t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [],
n = this._lastNEndpoints || [],
r = [],
i = [];this._lastNEndpoints = t, r = n.filter(function (t) {
return !e.isInLastN(t);
}), i = t.filter(function (e) {
return -1 === n.indexOf(e);
}), this.conference.eventEmitter.emit(d.LAST_N_ENDPOINTS_CHANGED, r, i);
} }, { key: "onCallEnded", value: function value() {
this._channel && (this._channel && "websocket" === this._channel.mode && this._channel.close(), this._channel = null, this._channelOpen = !1);
} }, { key: "selectEndpoint", value: function value(e) {
this._selectedEndpoint = e, this._channel && this._channelOpen && this._channel.sendSelectedEndpointMessage(e);
} }, { key: "pinEndpoint", value: function value(e) {
this._pinnedEndpoint = e, this._channel && this._channelOpen && this._channel.sendPinnedEndpointMessage(e);
} }, { key: "createPeerConnection", value: function value(e, n, r, i) {
var o = new S.a(this, this.peerConnectionIdCounter, e, n, t.getPCConstraints(r), r, i);return this.peerConnections.set(o.id, o), this.peerConnectionIdCounter += 1, o;
} }, { key: "_removePeerConnection", value: function value(e) {
var t = e.id;return !!this.peerConnections.has(t) && (this.peerConnections.delete(t), !0);
} }, { key: "addLocalTrack", value: function value(e) {
if (!e) throw new Error("track must not be null nor undefined");this.localTracks.push(e), e.conference = this.conference;
} }, { key: "getLastN", value: function value() {
return this._lastN;
} }, { key: "getLocalVideoTrack", value: function value() {
var e = this.getLocalTracks(v.b);return e.length ? e[0] : void 0;
} }, { key: "getLocalAudioTrack", value: function value() {
var e = this.getLocalTracks(v.a);return e.length ? e[0] : void 0;
} }, { key: "getLocalTracks", value: function value(e) {
var t = this.localTracks.slice();return void 0 !== e && (t = t.filter(function (t) {
return t.getType() === e;
})), t;
} }, { key: "getRemoteTracks", value: function value(e) {
var t = [],
n = !0,
r = !1,
i = void 0;try {
for (var o, a = this.peerConnections.values()[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(n = (o = a.next()).done); n = !0) {
var s = o.value,
c = s.getRemoteTracks(void 0, e);c && (t = t.concat(c));
}
} catch (e) {
r = !0, i = e;
} finally {
try {
!n && a.return && a.return();
} finally {
if (r) throw i;
}
}return t;
} }, { key: "setAudioMute", value: function value(e) {
var t = [];return this.getLocalTracks(v.a).forEach(function (n) {
t.push(e ? n.mute() : n.unmute());
}), Promise.all(t);
} }, { key: "removeLocalTrack", value: function value(e) {
var t = this.localTracks.indexOf(e);-1 !== t && this.localTracks.splice(t, 1);
} }, { key: "removeRemoteTracks", value: function value(e) {
var t = [],
n = !0,
r = !1,
i = void 0;try {
for (var o, a = this.peerConnections.values()[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(n = (o = a.next()).done); n = !0) {
var s = o.value,
c = s.removeRemoteTracks(e);t = t.concat(c);
}
} catch (e) {
r = !0, i = e;
} finally {
try {
!n && a.return && a.return();
} finally {
if (r) throw i;
}
}return w.debug("Removed remote tracks for " + e + " count: " + t.length), t;
} }, { key: "closeBridgeChannel", value: function value() {
this._channel && (this._channel.close(), this._channelOpen = !1, this.removeListener(y.a.LASTN_ENDPOINT_CHANGED, this._lastNChangeListener));
} }, { key: "setAudioLevel", value: function value(e, t, n, r) {
var i = e.getTrackBySSRC(t);if (i) {
if (!i.isAudioTrack()) return void w.warn("Received audio level for non-audio track: " + t);i.isLocal() !== r && w.error(i + " was expected to " + (r ? "be" : "not be") + " local"), i.setAudioLevel(n, e);
}
} }, { key: "sendChannelMessage", value: function value(e, t) {
if (!this._channel) throw new Error("Channel support is disabled!");this._channel.sendMessage(e, t);
} }, { key: "setLastN", value: function value(e) {
this._lastN !== e && (this._lastN = e, this._channel && this._channelOpen && this._channel.sendSetLastNMessage(e), this.eventEmitter.emit(y.a.LASTN_VALUE_CHANGED, e));
} }, { key: "isInLastN", value: function value(e) {
return !this._lastNEndpoints || this._lastNEndpoints.indexOf(e) > -1;
} }], [{ key: "obtainAudioAndVideoPermissions", value: function value(e) {
return b.a.obtainAudioAndVideoPermissions(e).then(function (t) {
var n = a(t, e);return n.some(function (e) {
return !e._isReceivingData();
}) ? Promise.reject(new f.a(h.NO_DATA_FROM_SOURCE)) : n;
});
} }, { key: "addListener", value: function value(e, t) {
b.a.addListener(e, t);
} }, { key: "removeListener", value: function value(e, t) {
b.a.removeListener(e, t);
} }, { key: "isRTCReady", value: function value() {
return b.a.isRTCReady();
} }, { key: "init", value: function value() {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};return this.options = e, b.a.init(this.options);
} }, { key: "getDeviceAvailability", value: function value() {
return b.a.getDeviceAvailability();
} }, { key: "getPCConstraints", value: function value(e) {
return e ? b.a.p2pPcConstraints : b.a.pcConstraints;
} }, { key: "attachMediaStream", value: function value(e, t) {
return b.a.attachMediaStream(e, t);
} }, { key: "getStreamID", value: function value(e) {
return b.a.getStreamID(e);
} }, { key: "getTrackID", value: function value(e) {
return b.a.getTrackID(e);
} }, { key: "isDeviceListAvailable", value: function value() {
return b.a.isDeviceListAvailable();
} }, { key: "isDeviceChangeAvailable", value: function value(e) {
return b.a.isDeviceChangeAvailable(e);
} }, { key: "getAudioOutputDevice", value: function value() {
return b.a.getAudioOutputDevice();
} }, { key: "getCurrentlyAvailableMediaDevices", value: function value() {
return b.a.getCurrentlyAvailableMediaDevices();
} }, { key: "getEventDataForActiveDevice", value: function value(e) {
return b.a.getEventDataForActiveDevice(e);
} }, { key: "setAudioOutputDevice", value: function value(e) {
return b.a.setAudioOutputDevice(e);
} }, { key: "isUserStream", value: function value(e) {
return t.isUserStreamById(b.a.getStreamID(e));
} }, { key: "isUserStreamById", value: function value(e) {
return e && "mixedmslabel" !== e && "default" !== e;
} }, { key: "enumerateDevices", value: function value(e) {
b.a.enumerateDevices(e);
} }, { key: "stopMediaStream", value: function value(e) {
b.a.stopMediaStream(e);
} }, { key: "isDesktopSharingEnabled", value: function value() {
return b.a.isDesktopSharingEnabled();
} }]), t;
}(m.a);t.a = k;
}).call(t, "modules/RTC/RTC.js");
}, function (e, t, n) {
"use strict";
(function (e) {
function r(e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
}function i(e, t) {
if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return !t || "object" != typeof t && "function" != typeof t ? e : t;
}function o(e, t) {
if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);
}function a(e) {
if (Array.isArray(e)) {
for (var t = 0, n = Array(e.length); t < e.length; t++) {
n[t] = e[t];
}return n;
}return Array.from(e);
}function s() {
ce = navigator.mediaDevices && navigator.mediaDevices.enumerateDevices ? function (e) {
navigator.mediaDevices.enumerateDevices().then(e, function () {
return e([]);
});
} : MediaStreamTrack && MediaStreamTrack.getSources ? function (e) {
MediaStreamTrack.getSources(function (t) {
return e(t.map(g));
});
} : void 0;
}function c(e, t, n) {
M.a[n] && (t && (e.video.width = { ideal: M.a[n].width }, e.video.height = { ideal: M.a[n].height }), e.video.mandatory.minWidth = M.a[n].width, e.video.mandatory.minHeight = M.a[n].height), e.video.mandatory.minWidth && (e.video.mandatory.maxWidth = e.video.mandatory.minWidth), e.video.mandatory.minHeight && (e.video.mandatory.maxHeight = e.video.mandatory.minHeight);
}function u(e, t) {
var n = { audio: !1, video: !1 },
r = x.a.isFirefox() || x.a.isEdge() || x.a.isReactNative() || x.a.isTemasysPluginUsed();if (e.indexOf("video") >= 0) {
if (n.video = { mandatory: {}, optional: [] }, t.cameraDeviceId) r && (n.video.deviceId = t.cameraDeviceId), n.video.optional.push({ sourceId: t.cameraDeviceId });else {
var i = t.facingMode || w.a.USER;r && (n.video.facingMode = i), n.video.optional.push({ facingMode: i });
}(t.minFps || t.maxFps || t.fps) && ((t.minFps || t.fps) && (t.minFps = t.minFps || t.fps, n.video.mandatory.minFrameRate = t.minFps), t.maxFps && (n.video.mandatory.maxFrameRate = t.maxFps)), c(n, r, t.resolution);
}if (e.indexOf("audio") >= 0 && (x.a.isReactNative() ? n.audio = !0 : x.a.isFirefox() ? t.micDeviceId ? n.audio = { mandatory: {}, deviceId: t.micDeviceId, optional: [{ sourceId: t.micDeviceId }] } : n.audio = !0 : (n.audio = { mandatory: {}, optional: [] }, t.micDeviceId && (r && (n.audio.deviceId = t.micDeviceId), n.audio.optional.push({ sourceId: t.micDeviceId })), n.audio.optional.push({ echoCancellation: !ee }, { googEchoCancellation: !te }, { googAutoGainControl: !re }, { googNoiseSupression: !ne }, { googHighpassFilter: !ie }, { googNoiseSuppression2: !ne }, { googEchoCancellation2: !te }, { googAutoGainControl2: !re }))), e.indexOf("screen") >= 0) if (x.a.isChrome()) n.video = { mandatory: { chromeMediaSource: "screen", maxWidth: window.screen.width, maxHeight: window.screen.height, maxFrameRate: 3 }, optional: [] };else if (x.a.isTemasysPluginUsed()) n.video = { optional: [{ sourceId: q.WebRTCPlugin.plugin.screensharingKey }] };else if (x.a.isFirefox()) n.video = { mozMediaSource: "window", mediaSource: "window" };else {
var o = "'screen' WebRTC media source is supported only in Chrome and with Temasys plugin";P.a.callErrorHandler(new Error(o)), K.error(o);
}return e.indexOf("desktop") >= 0 && (n.video = { mandatory: { chromeMediaSource: "desktop", chromeMediaSourceId: t.desktopStream, maxWidth: window.screen.width, maxHeight: window.screen.height, maxFrameRate: 3 }, optional: [] }), t.bandwidth && (n.video || (n.video = { mandatory: {}, optional: [] }), n.video.optional.push({ bandwidth: t.bandwidth })), x.a.isFirefox() && t.firefox_fake_device && (n.fake = !0), n;
}function l(e, t) {
var n = t && t.getAudioTracks().length > 0,
r = t && t.getVideoTracks().length > 0;-1 !== e.indexOf("video") && (Q.video = r), -1 !== e.indexOf("audio") && (Q.audio = n), z.emit(F.a.AVAILABLE_DEVICES_CHANGED, Q);
}function d(e) {
function t(e) {
return JSON.stringify({ kind: e.kind, deviceId: e.deviceId, groupId: e.groupId, label: e.label, facing: e.facing });
}return e.length !== se.length || e.map(t).sort().join("") !== se.map(t).sort().join("");
}function p() {
ce && ce(function (e) {
void 0 === se ? se = e.slice(0) : d(e) && f(e), window.setTimeout(p, X);
});
}function f(e) {
se = e.slice(0), K.info("list of media devices has changed:", se);var t = se.filter(function (e) {
return "videoinput" === e.kind;
}),
n = se.filter(function (e) {
return "audioinput" === e.kind;
}),
r = t.filter(function (e) {
return "" === e.label;
}),
i = n.filter(function (e) {
return "" === e.label;
});t.length && t.length === r.length && (Q.video = !1), n.length && n.length === i.length && (Q.audio = !1), z.emit(F.a.DEVICE_LIST_CHANGED, e);
}function h(e, t) {
e && e.apply(void 0, a(t));
}function m(e) {
return arguments.length > 1 && void 0 !== arguments[1] && arguments[1] ? function (t, n, r) {
return e(t).then(function (e) {
return h(n, [e]), e;
}).catch(function (e) {
throw h(r, [e]), e;
});
} : function (t, n, r) {
e(t, function (e) {
h(n, [e]);
}, function (e) {
h(r, [e]);
});
};
}function v(e) {
MediaStreamTrack.getSources(function (t) {
return e(t.map(g));
});
}function g(e) {
var t = (e.kind || "").toLowerCase();return { facing: e.facing || null, label: e.label, kind: t ? "audiooutput" === t ? t : t + "input" : null, deviceId: e.id, groupId: e.groupId || null };
}function y(e, t) {
var n = void 0,
r = void 0,
i = void 0,
o = [];if (e) {
var a = e.audioVideo;if (a) {
var s = window.webkitMediaStream || window.MediaStream,
c = a.getAudioTracks();if (c.length) {
n = new s();for (var u = 0; u < c.length; u++) {
n.addTrack(c[u]);
}
}var l = a.getVideoTracks();if (l.length) {
i = new s();for (var d = 0; d < l.length; d++) {
i.addTrack(l[d]);
}
}
} else n = e.audio, i = e.video;r = e.desktop;
}if (r) {
var p = r,
f = p.stream,
h = p.sourceId,
m = p.sourceType;o.push({ stream: f, sourceId: h, sourceType: m, track: f.getVideoTracks()[0], mediaType: L.b, videoType: H.a.DESKTOP });
}return n && o.push({ stream: n, track: n.getAudioTracks()[0], mediaType: L.a, videoType: null }), i && o.push({ stream: i, track: i.getVideoTracks()[0], mediaType: L.b, videoType: H.a.CAMERA, resolution: t }), o;
}function b(e, t) {
var n = "srcObject";if (n in e || (n = "mozSrcObject") in e || (n = null), n) return void (e[n] = t);var r = void 0;t && ((r = t.jitsiObjectURL) || (t.jitsiObjectURL = r = (URL || webkitURL).createObjectURL(t))), e.src = r || "";
}function S(e, t) {
var n = new Error(e);n.name = "WEBRTC_NOT_SUPPORTED", K.error(e), t(n);
}function E(e) {
if (!e.devices || 0 === e.devices.length) return e.successCallback(e.streams || {});var t = e.devices.splice(0, 1);e.deviceGUM[t](function (n) {
e.streams = e.streams || {}, e.streams[t] = n, E(e);
}, function (n) {
Object.keys(e.streams).forEach(function (t) {
return pe.stopMediaStream(e.streams[t]);
}), K.error("failed to obtain " + t + " stream - stop", n), e.errorCallback(n);
});
}function T(e, t) {
le = !0, z.emit(F.a.RTC_READY, !0), B.a.init(e, t), pe.isDeviceListAvailable() && ce && ce(function (e) {
se = e.splice(0), z.emit(F.a.DEVICE_LIST_AVAILABLE, se), ue ? navigator.mediaDevices.addEventListener("devicechange", function () {
return pe.enumerateDevices(f);
}) : p();
});
}function _(e) {
return function (t, n) {
var r = e.apply(pe, arguments);return n && pe.isDeviceChangeAvailable("output") && n.getAudioTracks && n.getAudioTracks().length && Z && t.setSinkId(pe.getAudioOutputDevice()).catch(function (e) {
var n = new O.a(e, null, ["audiooutput"]);P.a.callUnhandledRejectionHandler({ promise: this, reason: n }), K.warn("Failed to set audio output device for the element. Default audio output device will be used instead", t, n);
}), r;
};
}var C = n(52),
w = n.n(C),
R = n(14),
k = n.n(R),
A = n(0),
I = (n.n(A), n(3)),
P = n.n(I),
O = n(11),
D = n(10),
L = n(4),
N = n(31),
M = n.n(N),
x = n(2),
j = n(8),
F = n.n(j),
U = n(96),
B = n(94),
J = n(12),
G = n(17),
H = n.n(G),
V = Object.assign || function (e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t];for (var r in n) {
Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
}
}return e;
},
W = function () {
function e(e, t) {
for (var n = 0; n < t.length; n++) {
var r = t[n];r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
}
}return function (t, n, r) {
return n && e(t.prototype, n), r && e(t, r), t;
};
}(),
K = n.i(A.getLogger)(e),
q = x.a.isTemasysPluginUsed() ? n(33) : void 0,
z = new k.a(),
X = 3e3,
Q = { audio: !1, video: !1 },
Y = "default",
Z = !1,
ee = !1,
te = !1,
ne = !1,
re = !1,
ie = !1,
oe = document.createElement("audio"),
ae = void 0 !== oe.setSinkId,
se = void 0,
ce = void 0,
ue = !1,
le = !1,
de = function (e) {
function t() {
return r(this, t), i(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, z));
}return o(t, e), W(t, [{ key: "init", value: function value(e) {
var t = this;return "boolean" == typeof e.disableAEC && (te = e.disableAEC, K.info("Disable AEC: " + te)), "boolean" == typeof e.disableNS && (ne = e.disableNS, K.info("Disable NS: " + ne)), "boolean" == typeof e.disableAP && (ee = e.disableAP, K.info("Disable AP: " + ee)), "boolean" == typeof e.disableAGC && (re = e.disableAGC, K.info("Disable AGC: " + re)), "boolean" == typeof e.disableHPF && (ie = e.disableHPF, K.info("Disable HPF: " + ie)), s(), new Promise(function (n, r) {
if (x.a.isFirefox()) {
var i = x.a.getFirefoxVersion();if (i < 40) return void S("Firefox version too old: " + i + ". Required >= 40.", r);t.RTCPeerConnectionType = mozRTCPeerConnection, t.getUserMedia = m(navigator.mozGetUserMedia.bind(navigator)), t.enumerateDevices = ce, t.pcConstraints = {}, t.attachMediaStream = _(function (e, t) {
return e && (b(e, t), t && e.play()), e;
}), t.getStreamID = function (e) {
var t = e.id;if (!t) {
var n = e.getVideoTracks();n && 0 !== n.length || (n = e.getAudioTracks()), t = n[0].id;
}return J.a.filterSpecialChars(t);
}, t.getTrackID = function (e) {
return e.id;
}, RTCSessionDescription = mozRTCSessionDescription, RTCIceCandidate = mozRTCIceCandidate;
} else if (x.a.isChrome() || x.a.isOpera() || x.a.isNWJS() || x.a.isElectron() || x.a.isReactNative()) {
t.RTCPeerConnectionType = webkitRTCPeerConnection;var o = navigator.webkitGetUserMedia.bind(navigator);t.getUserMedia = m(o), t.enumerateDevices = ce, t.attachMediaStream = _(function (e, t) {
return b(e, t), e;
}), t.getStreamID = function (e) {
var t = e.id;return "number" == typeof t ? t : J.a.filterSpecialChars(t);
}, t.getTrackID = function (e) {
return e.id;
}, t.pcConstraints = { optional: [] }, e.useIPv6 && t.pcConstraints.optional.push({ googIPv6: !0 }), webkitMediaStream.prototype.getVideoTracks || (webkitMediaStream.prototype.getVideoTracks = function () {
return this.videoTracks;
}), webkitMediaStream.prototype.getAudioTracks || (webkitMediaStream.prototype.getAudioTracks = function () {
return this.audioTracks;
}), t.p2pPcConstraints = JSON.parse(JSON.stringify(t.pcConstraints)), e.disableSuspendVideo || t.pcConstraints.optional.push({ googSuspendBelowMinBitrate: !0 }), t.p2pPcConstraints.optional.push({ googSuspendBelowMinBitrate: !0 });
} else if (x.a.isEdge()) t.RTCPeerConnectionType = U.a, t.getUserMedia = m(navigator.mediaDevices.getUserMedia.bind(navigator.mediaDevices), !0), t.enumerateDevices = ce, t.attachMediaStream = _(function (e, t) {
return b(e, t), e;
}), t.getStreamID = function (e) {
var t = e.jitsiRemoteId || e.id;return J.a.filterSpecialChars(t);
}, t.getTrackID = function (e) {
return e.jitsiRemoteId || e.id;
};else {
if (!x.a.isTemasysPluginUsed()) return void S("Browser does not appear to be WebRTC-capable", r);var a = function a() {
t.RTCPeerConnectionType = RTCPeerConnection, t.getUserMedia = window.getUserMedia, t.enumerateDevices = v, t.attachMediaStream = _(function (e, t) {
if (t) {
if ("dummyAudio" === t.id || "dummyVideo" === t.id) return;var n = $(e);if (x.a.isTemasysPluginUsed() && !n.is(":visible") && n.show(), t.getVideoTracks().length > 0 && !$(e).is(":visible")) throw new Error("video element must be visible to attach video stream");
}return attachMediaStream(e, t);
}), t.getStreamID = function (e) {
return J.a.filterSpecialChars(e.label);
}, t.getTrackID = function (e) {
return e.id;
}, T(e, t.getUserMediaWithConstraints.bind(t));
},
s = new Promise(function (e) {
return q.webRTCReady(e);
});q.WebRTCPlugin.isPluginInstalled(q.WebRTCPlugin.pluginInfo.prefix, q.WebRTCPlugin.pluginInfo.plugName, q.WebRTCPlugin.pluginInfo.type, function () {
s.then(function () {
a(), n();
});
}, function () {
var e = new Error("Temasys plugin is not installed");e.name = "WEBRTC_NOT_READY", e.webRTCReadyPromise = s, r(e);
});
}t.p2pPcConstraints = t.p2pPcConstraints || t.pcConstraints, x.a.isTemasysPluginUsed() || (T(e, t.getUserMediaWithConstraints.bind(t)), n());
});
} }, { key: "getUserMediaWithConstraints", value: function value(e, t, n) {
var r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : {},
i = u(e, r);K.info("Get media constraints", i);try {
this.getUserMedia(i, function (n) {
K.log("onUserMediaSuccess"), l(e, n), t(n);
}, function (t) {
l(e, void 0), K.warn("Failed to get access to local media. Error ", t, i), n && n(new O.a(t, i, e));
});
} catch (t) {
K.error("GUM failed: ", t), n && n(new O.a(t, i, e));
}
} }, { key: "obtainAudioAndVideoPermissions", value: function value() {
var e = this,
t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
n = this,
r = V({}, t.desktopSharingExtensionExternalInstallation, { desktopSharingSources: t.desktopSharingSources });return new Promise(function (i, o) {
var a = function a(e) {
i(y(e, t.resolution));
};if (t.devices = t.devices || ["audio", "video"], B.a.isSupported() || -1 === t.devices.indexOf("desktop") || o(new Error("Desktop sharing is not supported!")), x.a.isFirefox() || x.a.isReactNative() || x.a.isTemasysPluginUsed()) {
var s = function s(e, n, r) {
this.getUserMediaWithConstraints(e, n, r, t);
},
c = { audio: s.bind(n, ["audio"]), video: s.bind(n, ["video"]) };B.a.isSupported() && (c.desktop = B.a.obtainStream.bind(B.a, r)), E({ devices: t.devices, streams: [], successCallback: a, errorCallback: o, deviceGUM: c });
} else {
var l = t.devices.indexOf("desktop") > -1;l && t.devices.splice(t.devices.indexOf("desktop"), 1), t.resolution = t.resolution || "360", t.devices.length ? e.getUserMediaWithConstraints(t.devices, function (e) {
var i = -1 !== t.devices.indexOf("audio"),
s = -1 !== t.devices.indexOf("video"),
c = e.getAudioTracks().length > 0,
d = e.getVideoTracks().length > 0;if (i && !c || s && !d) {
n.stopMediaStream(e);var p = [];return i && !c && p.push("audio"), s && !d && p.push("video"), void n.getUserMediaWithConstraints(p, function () {
o(new O.a({ name: "UnknownError" }, u(t.devices, t), p));
}, function (e) {
o(e);
}, t);
}l ? B.a.obtainStream(r, function (t) {
a({ audioVideo: e, desktop: t });
}, function (t) {
n.stopMediaStream(e), o(t);
}) : a({ audioVideo: e });
}, function (e) {
return o(e);
}, t) : l && B.a.obtainStream(r, function (e) {
return a({ desktop: e });
}, function (e) {
return o(e);
});
}
});
} }, { key: "getDeviceAvailability", value: function value() {
return Q;
} }, { key: "isRTCReady", value: function value() {
return le;
} }, { key: "_isDeviceListAvailable", value: function value() {
if (!le) throw new Error("WebRTC not ready yet");return Boolean(navigator.mediaDevices && navigator.mediaDevices.enumerateDevices || "undefined" != typeof MediaStreamTrack && MediaStreamTrack.getSources);
} }, { key: "onRTCReady", value: function value() {
return le ? Promise.resolve() : new Promise(function (e) {
var t = function t() {
z.removeListener(F.a.RTC_READY, t), e();
};z.addListener(F.a.RTC_READY, t);
});
} }, { key: "isDeviceListAvailable", value: function value() {
return this.onRTCReady().then(this._isDeviceListAvailable.bind(this));
} }, { key: "isDeviceChangeAvailable", value: function value(e) {
return "output" === e || "audiooutput" === e ? ae : x.a.isChrome() || x.a.isFirefox() || x.a.isOpera() || x.a.isTemasysPluginUsed() || x.a.isNWJS() || x.a.isElectron() || x.a.isEdge();
} }, { key: "stopMediaStream", value: function value(e) {
e.getTracks().forEach(function (e) {
!x.a.isTemasysPluginUsed() && e.stop && e.stop();
}), e.stop && e.stop(), e.release && e.release();var t = e.jitsiObjectURL;t && (delete e.jitsiObjectURL, (URL || webkitURL).revokeObjectURL(t));
} }, { key: "isDesktopSharingEnabled", value: function value() {
return B.a.isSupported();
} }, { key: "setAudioOutputDevice", value: function value(e) {
return this.isDeviceChangeAvailable("output") || Promise.reject(new Error("Audio output device change is not supported")), oe.setSinkId(e).then(function () {
Y = e, Z = !0, K.log("Audio output device set to " + e), z.emit(F.a.AUDIO_OUTPUT_DEVICE_CHANGED, e);
});
} }, { key: "getAudioOutputDevice", value: function value() {
return Y;
} }, { key: "getCurrentlyAvailableMediaDevices", value: function value() {
return se;
} }, { key: "getEventDataForActiveDevice", value: function value(e) {
var t = [],
n = { deviceId: e.deviceId, kind: e.kind, label: e.label, groupId: e.groupId };return t.push(n), { deviceList: t };
} }]), t;
}(D.a),
pe = new de();t.a = pe;
}).call(t, "modules/RTC/RTCUtils.js");
}, function (e, t, n) {
"use strict";
function r(e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
}function i(e) {
return parseInt(e.ssrcs.split(" ")[0], 10);
}function o(e) {
return parseInt(e.ssrcs.split(" ")[1], 10);
}function a(e) {
return e.ssrcs ? e.ssrcs.map(function (e) {
return e.id;
}).filter(function (e, t, n) {
return n.indexOf(e) === t;
}).length : 0;
}t.c = i, t.b = o, n.d(t, "a", function () {
return l;
});var s = n(13),
c = (n.n(s), function () {
function e(e, t) {
for (var n = 0; n < t.length; n++) {
var r = t[n];r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
}
}return function (t, n, r) {
return n && e(t.prototype, n), r && e(t, r), t;
};
}()),
u = function () {
function e(t) {
if (r(this, e), !t) throw new Error("mLine is undefined");this.mLine = t;
}return c(e, [{ key: "getSSRCAttrValue", value: function value(e, t) {
var n = this.ssrcs.find(function (n) {
return n.id === e && n.attribute === t;
});return n && n.value;
} }, { key: "removeSSRC", value: function value(e) {
this.mLine.ssrcs && this.mLine.ssrcs.length && (this.mLine.ssrcs = this.mLine.ssrcs.filter(function (t) {
return t.id !== e;
}));
} }, { key: "addSSRCAttribute", value: function value(e) {
this.ssrcs.push(e);
} }, { key: "findGroup", value: function value(e, t) {
return this.ssrcGroups.find(function (n) {
return n.semantics === e && (!t || t === n.ssrcs);
});
} }, { key: "findGroups", value: function value(e) {
return this.ssrcGroups.filter(function (t) {
return t.semantics === e;
});
} }, { key: "findGroupByPrimarySSRC", value: function value(e, t) {
return this.ssrcGroups.find(function (n) {
return n.semantics === e && i(n) === t;
});
} }, { key: "findSSRCByMSID", value: function value(e) {
return this.ssrcs.find(function (t) {
return "msid" === t.attribute && (null === e || t.value === e);
});
} }, { key: "getSSRCCount", value: function value() {
return a(this.mLine);
} }, { key: "containsAnySSRCGroups", value: function value() {
return void 0 !== this.mLine.ssrcGroups;
} }, { key: "getPrimaryVideoSsrc", value: function value() {
var e = this.mLine.type;if ("video" !== e) throw new Error("getPrimarySsrc doesn't work with '" + e + "'");if (1 === a(this.mLine)) return this.mLine.ssrcs[0].id;if (this.mLine.ssrcGroups) {
var t = this.findGroup("SIM");if (t) return i(t);var n = this.findGroup("FID");if (n) return i(n);
}
} }, { key: "getRtxSSRC", value: function value(e) {
var t = this.findGroupByPrimarySSRC("FID", e);return t && o(t);
} }, { key: "getSSRCs", value: function value() {
return this.ssrcs.map(function (e) {
return e.id;
}).filter(function (e, t, n) {
return n.indexOf(e) === t;
});
} }, { key: "getPrimaryVideoSSRCs", value: function value() {
var e = this.mLine.type;if ("video" !== e) throw new Error("getPrimaryVideoSSRCs doesn't work with " + e);var t = this.getSSRCs(),
n = !0,
r = !1,
i = void 0;try {
for (var a, s = this.ssrcGroups[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(n = (a = s.next()).done); n = !0) {
var c = a.value;if ("FID" === c.semantics) {
var u = o(c);t.splice(t.indexOf(u), 1);
}
}
} catch (e) {
r = !0, i = e;
} finally {
try {
!n && s.return && s.return();
} finally {
if (r) throw i;
}
}return t;
} }, { key: "dumpSSRCGroups", value: function value() {
return JSON.stringify(this.mLine.ssrcGroups);
} }, { key: "removeGroupsWithSSRC", value: function value(e) {
this.mLine.ssrcGroups && (this.mLine.ssrcGroups = this.mLine.ssrcGroups.filter(function (t) {
return -1 === t.ssrcs.indexOf("" + e);
}));
} }, { key: "removeGroupsBySemantics", value: function value(e) {
this.mLine.ssrcGroups && (this.mLine.ssrcGroups = this.mLine.ssrcGroups.filter(function (t) {
return t.semantics !== e;
}));
} }, { key: "replaceSSRC", value: function value(e, t) {
this.mLine.ssrcs && this.mLine.ssrcs.forEach(function (n) {
n.id === e && (n.id = t);
});
} }, { key: "addSSRCGroup", value: function value(e) {
this.ssrcGroups.push(e);
} }, { key: "ssrcs", get: function get() {
return this.mLine.ssrcs || (this.mLine.ssrcs = []), this.mLine.ssrcs;
}, set: function set(e) {
this.mLine.ssrcs = e;
} }, { key: "direction", get: function get() {
return this.mLine.direction;
}, set: function set(e) {
this.mLine.direction = e;
} }, { key: "ssrcGroups", get: function get() {
return this.mLine.ssrcGroups || (this.mLine.ssrcGroups = []), this.mLine.ssrcGroups;
}, set: function set(e) {
this.mLine.ssrcGroups = e;
} }]), e;
}(),
l = function () {
function e(t) {
r(this, e), this.parsedSDP = s.parse(t);
}return c(e, [{ key: "selectMedia", value: function value(e) {
var t = this.parsedSDP.media.find(function (t) {
return t.type === e;
});return t ? new u(t) : null;
} }, { key: "toRawSDP", value: function value() {
return s.write(this.parsedSDP);
} }]), e;
}();
}, function (e, t) {
(function (t) {
e.exports = t;
}).call(t, {});
}, function (e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", { value: !0 }), n.d(t, "AUTHENTICATION_REQUIRED", function () {
return r;
}), n.d(t, "CHAT_ERROR", function () {
return i;
}), n.d(t, "CONFERENCE_DESTROYED", function () {
return o;
}), n.d(t, "CONFERENCE_MAX_USERS", function () {
return a;
}), n.d(t, "CONNECTION_ERROR", function () {
return s;
}), n.d(t, "NOT_ALLOWED_ERROR", function () {
return c;
}), n.d(t, "FOCUS_DISCONNECTED", function () {
return u;
}), n.d(t, "FOCUS_LEFT", function () {
return l;
}), n.d(t, "GRACEFUL_SHUTDOWN", function () {
return d;
}), n.d(t, "INCOMPATIBLE_SERVER_VERSIONS", function () {
return p;
}), n.d(t, "JINGLE_FATAL_ERROR", function () {
return f;
}), n.d(t, "PASSWORD_NOT_SUPPORTED", function () {
return h;
}), n.d(t, "PASSWORD_REQUIRED", function () {
return m;
}), n.d(t, "RESERVATION_ERROR", function () {
return v;
}), n.d(t, "SETUP_FAILED", function () {
return g;
}), n.d(t, "VIDEOBRIDGE_NOT_AVAILABLE", function () {
return y;
});var r = "conference.authenticationRequired",
i = "conference.chatError",
o = "conference.destroyed",
a = "conference.max_users",
s = "conference.connectionError",
c = "conference.connectionError.notAllowed",
u = "conference.focusDisconnected",
l = "conference.focusLeft",
d = "conference.gracefulShutdown",
p = "conference.incompatible_server_versions",
f = "conference.jingleFatalError",
h = "conference.passwordNotSupported",
m = "conference.passwordRequired",
v = "conference.reservationError",
g = "conference.setup_failed",
y = "conference.videobridgeNotAvailable";
}, function (e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", { value: !0 }), n.d(t, "CONNECTION_DISCONNECTED", function () {
return r;
}), n.d(t, "CONNECTION_ESTABLISHED", function () {
return i;
}), n.d(t, "CONNECTION_FAILED", function () {
return o;
}), n.d(t, "WRONG_STATE", function () {
return a;
});var r = "connection.connectionDisconnected",
i = "connection.connectionEstablished",
o = "connection.connectionFailed",
a = "connection.wrongState";
}, function (e, t, n) {
"use strict";
(function (e) {
function r(e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
}n.d(t, "a", function () {
return v;
});var i = n(0),
o = (n.n(i), n(5)),
a = n(16),
s = n(4),
c = n(2),
u = n(8),
l = n.n(u),
d = n(6),
p = function () {
function e(e, t) {
for (var n = 0; n < t.length; n++) {
var r = t[n];r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
}
}return function (t, n, r) {
return n && e(t.prototype, n), r && e(t, r), t;
};
}(),
f = n.i(i.getLogger)(e),
h = 500,
m = 2e3,
v = { ACTIVE: "active", INACTIVE: "inactive", INTERRUPTED: "interrupted", RESTORING: "restoring" },
g = function () {
function e(t, n, i) {
r(this, e), this.rtc = t, this.conference = n, this.trackTimers = {}, this.connStatusFromJvb = {}, this.outOfLastNTimeout = "number" == typeof i.outOfLastNTimeout ? i.outOfLastNTimeout : h, this.rtcMuteTimeout = "number" == typeof i.rtcMuteTimeout ? i.rtcMuteTimeout : m, this.rtcMutedTimestamp = {}, f.info("RtcMuteTimeout set to: " + this.rtcMuteTimeout), this.enteredLastNTimestamp = new Map(), this.restoringTimers = new Map();
}return p(e, null, [{ key: "_getNewStateForJvbMode", value: function value(e, t, n, r, i) {
return e ? r ? v.ACTIVE : c.a.isVideoMuteOnConnInterruptedSupported() ? i ? t ? n ? v.INTERRUPTED : v.RESTORING : v.INACTIVE : v.ACTIVE : t ? v.ACTIVE : v.INACTIVE : v.INTERRUPTED;
} }, { key: "_getNewStateForP2PMode", value: function value(e, t) {
return c.a.isVideoMuteOnConnInterruptedSupported() ? e || !t ? v.ACTIVE : v.INTERRUPTED : v.ACTIVE;
} }]), p(e, [{ key: "_getVideoFrozenTimeout", value: function value(e) {
return this.rtc.isInLastN(e) ? this.rtcMuteTimeout : this.outOfLastNTimeout;
} }, { key: "init", value: function value() {
this._onEndpointConnStatusChanged = this.onEndpointConnStatusChanged.bind(this), this.rtc.addListener(l.a.ENDPOINT_CONN_STATUS_CHANGED, this._onEndpointConnStatusChanged), this._onP2PStatus = this.refreshConnectionStatusForAll.bind(this), this.conference.on(o.P2P_STATUS, this._onP2PStatus), c.a.isVideoMuteOnConnInterruptedSupported() && (this._onTrackRtcMuted = this.onTrackRtcMuted.bind(this), this.rtc.addListener(l.a.REMOTE_TRACK_MUTE, this._onTrackRtcMuted), this._onTrackRtcUnmuted = this.onTrackRtcUnmuted.bind(this), this.rtc.addListener(l.a.REMOTE_TRACK_UNMUTE, this._onTrackRtcUnmuted), this._onRemoteTrackAdded = this.onRemoteTrackAdded.bind(this), this.conference.on(o.TRACK_ADDED, this._onRemoteTrackAdded), this._onRemoteTrackRemoved = this.onRemoteTrackRemoved.bind(this), this.conference.on(o.TRACK_REMOVED, this._onRemoteTrackRemoved), this._onSignallingMuteChanged = this.onSignallingMuteChanged.bind(this)), this._onLastNChanged = this._onLastNChanged.bind(this), this.conference.on(o.LAST_N_ENDPOINTS_CHANGED, this._onLastNChanged), this._onLastNValueChanged = this.refreshConnectionStatusForAll.bind(this), this.rtc.on(l.a.LASTN_VALUE_CHANGED, this._onLastNValueChanged);
} }, { key: "dispose", value: function value() {
this.rtc.removeListener(l.a.ENDPOINT_CONN_STATUS_CHANGED, this._onEndpointConnStatusChanged), c.a.isVideoMuteOnConnInterruptedSupported() && (this.rtc.removeListener(l.a.REMOTE_TRACK_MUTE, this._onTrackRtcMuted), this.rtc.removeListener(l.a.REMOTE_TRACK_UNMUTE, this._onTrackRtcUnmuted), this.conference.off(o.TRACK_ADDED, this._onRemoteTrackAdded), this.conference.off(o.TRACK_REMOVED, this._onRemoteTrackRemoved)), this.conference.off(o.LAST_N_ENDPOINTS_CHANGED, this._onLastNChanged), this.rtc.removeListener(l.a.LASTN_VALUE_CHANGED, this._onLastNValueChanged), this.conference.off(o.P2P_STATUS, this._onP2PStatus);var e = Object.keys(this.trackTimers),
t = !0,
n = !1,
r = void 0;try {
for (var i, a = e[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(t = (i = a.next()).done); t = !0) {
var s = i.value;this.clearTimeout(s), this.clearRtcMutedTimestamp(s);
}
} catch (e) {
n = !0, r = e;
} finally {
try {
!t && a.return && a.return();
} finally {
if (n) throw r;
}
}this.connStatusFromJvb = {};
} }, { key: "onEndpointConnStatusChanged", value: function value(e, t) {
f.debug("Detector RTCEvents.ENDPOINT_CONN_STATUS_CHANGED(" + Date.now() + "): " + e + ": " + t), e !== this.conference.myUserId() && (this.connStatusFromJvb[e] = t, this.figureOutConnectionStatus(e));
} }, { key: "_changeConnectionStatus", value: function value(e, t) {
if (e.getConnectionStatus() !== t) {
var n = e.getId();e._setConnectionStatus(t), f.debug("Emit endpoint conn status(" + Date.now() + ") " + n + ": " + t), d.a.sendLog(JSON.stringify({ id: "peer.conn.status", participant: n, status: t })), this.conference.eventEmitter.emit(o.PARTICIPANT_CONN_STATUS_CHANGED, n, t);
}
} }, { key: "clearTimeout", value: function value(e) {
this.trackTimers[e] && (window.clearTimeout(this.trackTimers[e]), this.trackTimers[e] = null);
} }, { key: "clearRtcMutedTimestamp", value: function value(e) {
this.rtcMutedTimestamp[e] = null;
} }, { key: "onRemoteTrackAdded", value: function value(e) {
e.isLocal() || e.getType() !== s.b || (f.debug("Detector on remote track added for: " + e.getParticipantId()), e.on(a.TRACK_MUTE_CHANGED, this._onSignallingMuteChanged));
} }, { key: "onRemoteTrackRemoved", value: function value(e) {
if (!e.isLocal() && e.getType() === s.b) {
var t = e.getParticipantId();f.debug("Detector on remote track removed: " + t), e.off(a.TRACK_MUTE_CHANGED, this._onSignallingMuteChanged), this.clearTimeout(t), this.clearRtcMutedTimestamp(t), this.figureOutConnectionStatus(t);
}
} }, { key: "isVideoTrackFrozen", value: function value(e) {
if (!c.a.isVideoMuteOnConnInterruptedSupported()) return !1;var t = e.getId(),
n = e.hasAnyVideoTrackWebRTCMuted(),
r = this.rtcMutedTimestamp[t],
i = this._getVideoFrozenTimeout(t);return n && "number" == typeof r && Date.now() - r >= i;
} }, { key: "refreshConnectionStatusForAll", value: function value() {
var e = this.conference.getParticipants(),
t = !0,
n = !1,
r = void 0;try {
for (var i, o = e[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(t = (i = o.next()).done); t = !0) {
var a = i.value;this.figureOutConnectionStatus(a.getId());
}
} catch (e) {
n = !0, r = e;
} finally {
try {
!t && o.return && o.return();
} finally {
if (n) throw r;
}
}
} }, { key: "figureOutConnectionStatus", value: function value(t) {
var n = this.conference.getParticipantById(t);if (!n) return void f.warn("figure out conn status - no participant for: " + t);var r = this.conference.isP2PActive(),
i = this._isRestoringTimedout(t),
o = 0 === this.rtc.getLastN(),
a = n.isVideoMuted() || o,
s = this.isVideoTrackFrozen(n),
c = this.rtc.isInLastN(t),
u = this.connStatusFromJvb[t];"boolean" != typeof u && (f.debug("Assuming connection active by JVB - no notification"), u = !0);var l = r ? e._getNewStateForP2PMode(a, s) : e._getNewStateForJvbMode(u, c, i, a, s);l !== v.RESTORING && this._clearRestoringTimer(t), f.debug("Figure out conn status for " + t + ", is video muted: " + a + " is active(jvb): " + u + " video track frozen: " + s + " p2p mode: " + r + " is in last N: " + c + " currentStatus => newStatus: \n " + n.getConnectionStatus() + " => " + l), this._changeConnectionStatus(n, l);
} }, { key: "_onLastNChanged", value: function value() {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [],
t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : [],
n = Date.now();f.debug("leaving/entering lastN", e, t, n);var r = !0,
i = !1,
o = void 0;try {
for (var a, s = e[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(r = (a = s.next()).done); r = !0) {
var c = a.value;this.enteredLastNTimestamp.delete(c), this._clearRestoringTimer(c), this.figureOutConnectionStatus(c);
}
} catch (e) {
i = !0, o = e;
} finally {
try {
!r && s.return && s.return();
} finally {
if (i) throw o;
}
}var u = !0,
l = !1,
d = void 0;try {
for (var p, h = t[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(u = (p = h.next()).done); u = !0) {
var m = p.value;this.enteredLastNTimestamp.set(m, n), this.figureOutConnectionStatus(m);
}
} catch (e) {
l = !0, d = e;
} finally {
try {
!u && h.return && h.return();
} finally {
if (l) throw d;
}
}
} }, { key: "_clearRestoringTimer", value: function value(e) {
var t = this.restoringTimers.get(e);t && (clearTimeout(t), this.restoringTimers.delete(e));
} }, { key: "_isRestoringTimedout", value: function value(e) {
var t = this,
n = this.enteredLastNTimestamp.get(e);return !!(n && Date.now() - n >= 5e3) || (this.restoringTimers.get(e) || this.restoringTimers.set(e, setTimeout(function () {
return t.figureOutConnectionStatus(e);
}, 5e3)), !1);
} }, { key: "onTrackRtcMuted", value: function value(e) {
var t = this,
n = e.getParticipantId(),
r = this.conference.getParticipantById(n);if (f.debug("Detector track RTC muted: " + n, Date.now()), !r) return void f.error("No participant for id: " + n);if (this.rtcMutedTimestamp[n] = Date.now(), !r.isVideoMuted()) {
this.clearTimeout(n);var i = this._getVideoFrozenTimeout(n);this.trackTimers[n] = window.setTimeout(function () {
f.debug("Set RTC mute timeout for: " + n + " of " + i + " ms"), t.clearTimeout(n), t.figureOutConnectionStatus(n);
}, i);
}
} }, { key: "onTrackRtcUnmuted", value: function value(e) {
var t = e.getParticipantId();f.debug("Detector track RTC unmuted: " + t, Date.now()), this.clearTimeout(t), this.clearRtcMutedTimestamp(t), this.figureOutConnectionStatus(t);
} }, { key: "onSignallingMuteChanged", value: function value(e) {
var t = e.getParticipantId();f.debug("Detector on track signalling mute changed: " + t, e.isMuted()), this.figureOutConnectionStatus(t);
} }]), e;
}();t.b = g;
}).call(t, "modules/connectivity/ParticipantConnectionStatus.js");
}, function (e, t, n) {
"use strict";
(function (e) {
function r(e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
}function i() {
var e = "undefined" == typeof window ? this : window,
t = void 0;try {
t = e.localStorage;
} catch (e) {
f.error(e);
}return t;
}function o() {
return (Math.random().toString(16) + "000000000").substr(2, 8);
}function a() {
return o() + o() + o() + o();
}function s() {
var e = a();return f.log("generated id", e), e;
}function c() {
var e = d.a.generateUsername();return f.log("generated callstats uid", e), e;
}var u = n(0),
l = (n.n(u), n(116)),
d = n.n(l),
p = function () {
function e(e, t) {
for (var n = 0; n < t.length; n++) {
var r = t[n];r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
}
}return function (t, n, r) {
return n && e(t.prototype, n), r && e(t, r), t;
};
}(),
f = n.i(u.getLogger)(e),
h = function () {
function e() {
r(this, e);var t = i();t ? (this.userId = t.getItem("jitsiMeetId") || s(), this.callStatsUserName = t.getItem("callStatsUserName") || c(), this.save()) : (f.log("localStorage is not supported"), this.userId = s(), this.callStatsUserName = c());
}return p(e, [{ key: "save", value: function value() {
var e = i();e && (e.setItem("jitsiMeetId", this.userId), e.setItem("callStatsUserName", this.callStatsUserName));
} }, { key: "getMachineId", value: function value() {
return this.userId;
} }, { key: "getCallStatsUserName", value: function value() {
return this.callStatsUserName;
} }, { key: "setSessionId", value: function value(e) {
var t = i();t && (e ? t.setItem("sessionId", e) : t.removeItem("sessionId"));
} }, { key: "clearSessionId", value: function value() {
this.setSessionId(void 0);
} }, { key: "getSessionId", value: function value() {
var e = i();return e ? e.getItem("sessionId") : void 0;
} }]), e;
}();t.a = new h();
}).call(t, "modules/settings/Settings.js");
}, function (e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", { value: !0 }), n.d(t, "STATUS_AVAILABLE", function () {
return r;
}), n.d(t, "STATUS_UNDEFINED", function () {
return i;
}), n.d(t, "STATUS_BUSY", function () {
return o;
}), n.d(t, "STATE_ON", function () {
return a;
}), n.d(t, "STATE_OFF", function () {
return s;
}), n.d(t, "STATE_PENDING", function () {
return c;
}), n.d(t, "STATE_RETRYING", function () {
return u;
}), n.d(t, "STATE_FAILED", function () {
return l;
});var r = "available",
i = "undefined",
o = "busy",
a = "on",
s = "off",
c = "pending",
u = "retrying",
l = "failed";
}, function (e, t) {
var n = { 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 }, 360: { width: 640, height: 360, order: 4 }, 640: { width: 640, height: 480, order: 3 }, vga: { width: 640, height: 480, order: 3 }, 180: { width: 320, height: 180, order: 2 }, 320: { width: 320, height: 240, order: 1 } };e.exports = n;
}, function (e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", { value: !0 }), n.d(t, "LOCAL_STATS_UPDATED", function () {
return r;
}), n.d(t, "REMOTE_STATS_UPDATED", function () {
return i;
});var r = "cq.local_stats_updated",
i = "cq.remote_stats_updated";
}, function (e, t, n) {
(function (t) {
var r,
r,
o = n(0).getLogger(t),
a = a || {};e.exports = a, a.options = a.options || {}, a.VERSION = "0.14.0", a.onwebrtcready = a.onwebrtcready || function (e) {}, a._onwebrtcreadies = [], a.webRTCReady = function (e) {
if ("function" != typeof e) throw new Error("Callback provided is not a function");!0 === a.onwebrtcreadyDone ? e(null !== a.WebRTCPlugin.plugin) : a._onwebrtcreadies.push(e);
}, a.WebRTCPlugin = a.WebRTCPlugin || {}, a.WebRTCPlugin.pluginInfo = a.WebRTCPlugin.pluginInfo || { prefix: "Tem", plugName: "TemWebRTCPlugin", pluginId: "plugin0", type: "application/x-temwebrtcplugin", onload: "__TemWebRTCReady0", portalLink: "http://skylink.io/plugin/", downloadLink: null, companyName: "Temasys", downloadLinks: { mac: "http://bit.ly/webrtcpluginpkg", win: "http://bit.ly/webrtcpluginmsi" } }, void 0 !== a.WebRTCPlugin.pluginInfo.downloadLinks && null !== a.WebRTCPlugin.pluginInfo.downloadLinks && (navigator.platform.match(/^Mac/i) ? a.WebRTCPlugin.pluginInfo.downloadLink = a.WebRTCPlugin.pluginInfo.downloadLinks.mac : navigator.platform.match(/^Win/i) && (a.WebRTCPlugin.pluginInfo.downloadLink = a.WebRTCPlugin.pluginInfo.downloadLinks.win)), a.WebRTCPlugin.TAGS = { NONE: "none", AUDIO: "audio", VIDEO: "video" }, a.WebRTCPlugin.pageId = Math.random().toString(36).slice(2), a.WebRTCPlugin.plugin = null, a.WebRTCPlugin.setLogLevel = null, a.WebRTCPlugin.defineWebRTCInterface = null, a.WebRTCPlugin.isPluginInstalled = null, a.WebRTCPlugin.pluginInjectionInterval = null, a.WebRTCPlugin.injectPlugin = null, a.WebRTCPlugin.PLUGIN_STATES = { NONE: 0, INITIALIZING: 1, INJECTING: 2, INJECTED: 3, READY: 4 }, a.WebRTCPlugin.pluginState = a.WebRTCPlugin.PLUGIN_STATES.NONE, a.onwebrtcreadyDone = !1, a.WebRTCPlugin.PLUGIN_LOG_LEVELS = { NONE: "NONE", ERROR: "ERROR", WARNING: "WARNING", INFO: "INFO", VERBOSE: "VERBOSE", SENSITIVE: "SENSITIVE" }, a.WebRTCPlugin.WaitForPluginReady = null, a.WebRTCPlugin.callWhenPluginReady = null, __TemWebRTCReady0 = function __TemWebRTCReady0() {
if ("complete" === document.readyState) a.WebRTCPlugin.pluginState = a.WebRTCPlugin.PLUGIN_STATES.READY, a.maybeThroughWebRTCReady();else var e = setInterval(function () {
"complete" === document.readyState && (clearInterval(e), a.WebRTCPlugin.pluginState = a.WebRTCPlugin.PLUGIN_STATES.READY, a.maybeThroughWebRTCReady());
}, 100);
}, a.maybeThroughWebRTCReady = function () {
a.onwebrtcreadyDone || (a.onwebrtcreadyDone = !0, a._onwebrtcreadies.length ? a._onwebrtcreadies.forEach(function (e) {
"function" == typeof e && e(null !== a.WebRTCPlugin.plugin);
}) : "function" == typeof a.onwebrtcready && a.onwebrtcready(null !== a.WebRTCPlugin.plugin));
}, a.TEXT = { PLUGIN: { REQUIRE_INSTALLATION: "This website requires you to install a WebRTC-enabling plugin to work on this browser.", NOT_SUPPORTED: "Your browser does not support WebRTC.", BUTTON: "Install Now" }, REFRESH: { REQUIRE_REFRESH: "Please refresh page", BUTTON: "Refresh Page" } }, a._iceConnectionStates = { starting: "starting", checking: "checking", connected: "connected", completed: "connected", done: "completed", disconnected: "disconnected", failed: "failed", closed: "closed" }, a._iceConnectionFiredStates = [], a.isDefined = null, a.parseWebrtcDetectedBrowser = function () {
var e = null;if (window.opr && opr.addons || window.opera || navigator.userAgent.indexOf(" OPR/") >= 0) e = navigator.userAgent.match(/OPR\/(\d+)/i) || [], webrtcDetectedBrowser = "opera", webrtcDetectedVersion = parseInt(e[1] || "0", 10), webrtcMinimumVersion = 26, webrtcDetectedType = "webkit", webrtcDetectedDCSupport = "SCTP";else if (navigator.userAgent.match(/Bowser\/[0-9.]*/g)) {
e = navigator.userAgent.match(/Bowser\/[0-9.]*/g) || [];var t = parseInt((navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./i) || [])[2] || "0", 10);webrtcDetectedBrowser = "bowser", webrtcDetectedVersion = parseFloat((e[0] || "0/0").split("/")[1], 10), webrtcMinimumVersion = 0, webrtcDetectedType = "webkit", webrtcDetectedDCSupport = t > 30 ? "SCTP" : "RTP";
} else if (navigator.userAgent.indexOf("OPiOS") > 0) e = navigator.userAgent.match(/OPiOS\/([0-9]+)\./), webrtcDetectedBrowser = "opera", webrtcDetectedVersion = parseInt(e[1] || "0", 10), webrtcMinimumVersion = 0, webrtcDetectedType = null, webrtcDetectedDCSupport = null;else if (navigator.userAgent.indexOf("CriOS") > 0) e = navigator.userAgent.match(/CriOS\/([0-9]+)\./) || [], webrtcDetectedBrowser = "chrome", webrtcDetectedVersion = parseInt(e[1] || "0", 10), webrtcMinimumVersion = 0, webrtcDetectedType = null, webrtcDetectedDCSupport = null;else if (navigator.userAgent.indexOf("FxiOS") > 0) e = navigator.userAgent.match(/FxiOS\/([0-9]+)\./) || [], webrtcDetectedBrowser = "firefox", webrtcDetectedVersion = parseInt(e[1] || "0", 10), webrtcMinimumVersion = 0, webrtcDetectedType = null, webrtcDetectedDCSupport = null;else if (document.documentMode) e = /\brv[ :]+(\d+)/g.exec(navigator.userAgent) || [], webrtcDetectedBrowser = "IE", webrtcDetectedVersion = parseInt(e[1], 10), webrtcMinimumVersion = 9, webrtcDetectedType = "plugin", webrtcDetectedDCSupport = "SCTP", webrtcDetectedVersion || (e = /\bMSIE[ :]+(\d+)/g.exec(navigator.userAgent) || [], webrtcDetectedVersion = parseInt(e[1] || "0", 10));else if (window.StyleMedia || navigator.userAgent.match(/Edge\/(\d+).(\d+)$/)) e = navigator.userAgent.match(/Edge\/(\d+).(\d+)$/) || [], webrtcDetectedBrowser = "edge", webrtcDetectedVersion = parseFloat((e[0] || "0/0").split("/")[1], 10), webrtcMinimumVersion = 13.10547, webrtcDetectedType = "ms", webrtcDetectedDCSupport = null;else if ("undefined" != typeof InstallTrigger || navigator.userAgent.indexOf("irefox") > 0) e = navigator.userAgent.match(/Firefox\/([0-9]+)\./) || [], webrtcDetectedBrowser = "firefox", webrtcDetectedVersion = parseInt(e[1] || "0", 10), webrtcMinimumVersion = 31, webrtcDetectedType = "moz", webrtcDetectedDCSupport = "SCTP";else if (window.chrome && window.chrome.webstore || navigator.userAgent.indexOf("Chrom") > 0) e = navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./i) || [], webrtcDetectedBrowser = "chrome", webrtcDetectedVersion = parseInt(e[2] || "0", 10), webrtcMinimumVersion = 38, webrtcDetectedType = "webkit", webrtcDetectedDCSupport = webrtcDetectedVersion > 30 ? "SCTP" : "RTP";else if (/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) {
e = navigator.userAgent.match(/version\/(\d+)/i) || [];var n = navigator.userAgent.match(/(iPhone|iPad)/gi) || [];webrtcDetectedBrowser = "safari", webrtcDetectedVersion = parseInt(e[1] || "0", 10), webrtcMinimumVersion = 7, webrtcDetectedType = 0 === n.length ? "plugin" : null, webrtcDetectedDCSupport = 0 === n.length ? "SCTP" : null;
}window.webrtcDetectedBrowser = webrtcDetectedBrowser, window.webrtcDetectedVersion = webrtcDetectedVersion, window.webrtcMinimumVersion = webrtcMinimumVersion, window.webrtcDetectedType = webrtcDetectedType, window.webrtcDetectedDCSupport = webrtcDetectedDCSupport;
}, a.addEvent = function (e, t, n) {
e.addEventListener ? e.addEventListener(t, n, !1) : e.attachEvent ? e.attachEvent("on" + t, n) : e[t] = n;
}, a.renderNotificationBar = function (e, t, n, r, i) {
if ("complete" === document.readyState) {
var o = window,
s = document.createElement("iframe");s.name = "adapterjs-alert", s.style.position = "fixed", s.style.top = "-41px", s.style.left = 0, s.style.right = 0, s.style.width = "100%", s.style.height = "40px", s.style.backgroundColor = "#ffffe1", s.style.border = "none", s.style.borderBottom = "1px solid #888888", s.style.zIndex = "9999999", "string" == typeof s.style.webkitTransition ? s.style.webkitTransition = "all .5s ease-out" : "string" == typeof s.style.transition && (s.style.transition = "all .5s ease-out"), document.body.appendChild(s);var c = s.contentWindow ? s.contentWindow : s.contentDocument.document ? s.contentDocument.document : s.contentDocument;c.document.open(), c.document.write('<span style="display: inline-block; font-family: Helvetica, Arial,sans-serif; font-size: .9rem; padding: 4px; vertical-align: middle; cursor: default;">' + e + "</span>"), t && n ? (c.document.write('<button id="okay">' + t + '</button><button id="cancel">Cancel</button>'), c.document.close(), a.addEvent(c.document.getElementById("okay"), "click", function (e) {
i && a.renderNotificationBar(a.TEXT.EXTENSION ? a.TEXT.EXTENSION.REQUIRE_REFRESH : a.TEXT.REFRESH.REQUIRE_REFRESH, a.TEXT.REFRESH.BUTTON, "javascript:location.reload()"), window.open(n, r ? "_blank" : "_top"), e.preventDefault();try {
e.cancelBubble = !0;
} catch (e) {}var t = setInterval(function () {
isIE || navigator.plugins.refresh(!1), a.WebRTCPlugin.isPluginInstalled(a.WebRTCPlugin.pluginInfo.prefix, a.WebRTCPlugin.pluginInfo.plugName, a.WebRTCPlugin.pluginInfo.type, function () {
clearInterval(t), a.WebRTCPlugin.defineWebRTCInterface();
}, function () {});
}, 500);
}), a.addEvent(c.document.getElementById("cancel"), "click", function (e) {
o.document.body.removeChild(s);
})) : c.document.close(), setTimeout(function () {
"string" == typeof s.style.webkitTransform ? s.style.webkitTransform = "translateY(40px)" : "string" == typeof s.style.transform ? s.style.transform = "translateY(40px)" : s.style.top = "0px";
}, 300);
}
}, webrtcDetectedType = null, checkMediaDataChannelSettings = function checkMediaDataChannelSettings(e, t, n, r) {
if ("function" == typeof n) {
var i = !0,
a = "firefox" === webrtcDetectedBrowser,
s = "moz" === webrtcDetectedType && webrtcDetectedVersion > 30,
c = "firefox" === e;if (a && c || s) try {
delete r.mandatory.MozDontOfferDataChannel;
} catch (e) {
o.error("Failed deleting MozDontOfferDataChannel"), o.error(e);
} else a && !c && (r.mandatory.MozDontOfferDataChannel = !0);if (!a) for (var u in r.mandatory) {
r.mandatory.hasOwnProperty(u) && -1 !== u.indexOf("Moz") && delete r.mandatory[u];
}!a || c || s || (i = !1), n(i, r);
}
}, checkIceConnectionState = function checkIceConnectionState(e, t, n) {
if ("function" != typeof n) return void o.warn("No callback specified in checkIceConnectionState. Aborted.");e = e || "peer", a._iceConnectionFiredStates[e] && t !== a._iceConnectionStates.disconnected && t !== a._iceConnectionStates.failed && t !== a._iceConnectionStates.closed || (a._iceConnectionFiredStates[e] = []), t = a._iceConnectionStates[t], a._iceConnectionFiredStates[e].indexOf(t) < 0 && (a._iceConnectionFiredStates[e].push(t), t === a._iceConnectionStates.connected && setTimeout(function () {
a._iceConnectionFiredStates[e].push(a._iceConnectionStates.done), n(a._iceConnectionStates.done);
}, 1e3), n(t));
}, createIceServer = null, createIceServers = null, RTCPeerConnection = null, RTCSessionDescription = "function" == typeof RTCSessionDescription ? RTCSessionDescription : null, RTCIceCandidate = "function" == typeof RTCIceCandidate ? RTCIceCandidate : null, getUserMedia = null, attachMediaStream = null, reattachMediaStream = null, webrtcDetectedBrowser = null, webrtcDetectedVersion = null, webrtcMinimumVersion = null, !(navigator.mozGetUserMedia || navigator.webkitGetUserMedia || navigator.mediaDevices && navigator.userAgent.match(/Edge\/(\d+).(\d+)$/)) || 0 === (navigator.userAgent.match(/android/gi) || []).length && 0 === (navigator.userAgent.match(/chrome/gi) || []).length && navigator.userAgent.indexOf("Safari/") > 0 ? ("object" == typeof o && "function" == typeof o.log || (o = {} || o, o.log = function (e) {}, o.info = function (e) {}, o.error = function (e) {}, o.dir = function (e) {}, o.exception = function (e) {}, o.trace = function (e) {}, o.warn = function (e) {}, o.count = function (e) {}, o.debug = function (e) {}, o.count = function (e) {}, o.time = function (e) {}, o.timeEnd = function (e) {}, o.group = function (e) {}, o.groupCollapsed = function (e) {}, o.groupEnd = function (e) {}), a.parseWebrtcDetectedBrowser(), isIE = "IE" === webrtcDetectedBrowser, a.WebRTCPlugin.WaitForPluginReady = function () {
for (; a.WebRTCPlugin.pluginState !== a.WebRTCPlugin.PLUGIN_STATES.READY;) {}
}, a.WebRTCPlugin.callWhenPluginReady = function (e) {
if (a.WebRTCPlugin.pluginState === a.WebRTCPlugin.PLUGIN_STATES.READY) e();else var t = setInterval(function () {
a.WebRTCPlugin.pluginState === a.WebRTCPlugin.PLUGIN_STATES.READY && (clearInterval(t), e());
}, 100);
}, a.WebRTCPlugin.setLogLevel = function (e) {
a.WebRTCPlugin.callWhenPluginReady(function () {
a.WebRTCPlugin.plugin.setLogLevel(e);
});
}, a.WebRTCPlugin.injectPlugin = function () {
if ("complete" === document.readyState && a.WebRTCPlugin.pluginState === a.WebRTCPlugin.PLUGIN_STATES.INITIALIZING) {
if (a.WebRTCPlugin.pluginState = a.WebRTCPlugin.PLUGIN_STATES.INJECTING, "IE" === webrtcDetectedBrowser && webrtcDetectedVersion <= 10) {
var e = document.createDocumentFragment();for (a.WebRTCPlugin.plugin = document.createElement("div"), a.WebRTCPlugin.plugin.innerHTML = '<object id="' + a.WebRTCPlugin.pluginInfo.pluginId + '" type="' + a.WebRTCPlugin.pluginInfo.type + '" width="1" height="1"><param name="pluginId" value="' + a.WebRTCPlugin.pluginInfo.pluginId + '" /> <param name="windowless" value="false" /> <param name="pageId" value="' + a.WebRTCPlugin.pageId + '" /> <param name="onload" value="' + a.WebRTCPlugin.pluginInfo.onload + '" /><param name="tag" value="' + a.WebRTCPlugin.TAGS.NONE + '" />' + (a.options.getAllCams ? '<param name="forceGetAllCams" value="True" />' : "") + "</object>"; a.WebRTCPlugin.plugin.firstChild;) {
e.appendChild(a.WebRTCPlugin.plugin.firstChild);
}document.body.appendChild(e), a.WebRTCPlugin.plugin = document.getElementById(a.WebRTCPlugin.pluginInfo.pluginId);
} else a.WebRTCPlugin.plugin = document.createElement("object"), a.WebRTCPlugin.plugin.id = a.WebRTCPlugin.pluginInfo.pluginId, isIE ? (a.WebRTCPlugin.plugin.width = "1px", a.WebRTCPlugin.plugin.height = "1px") : (a.WebRTCPlugin.plugin.width = "0px", a.WebRTCPlugin.plugin.height = "0px"), a.WebRTCPlugin.plugin.type = a.WebRTCPlugin.pluginInfo.type, a.WebRTCPlugin.plugin.innerHTML = '<param name="onload" value="' + a.WebRTCPlugin.pluginInfo.onload + '"><param name="pluginId" value="' + a.WebRTCPlugin.pluginInfo.pluginId + '"><param name="windowless" value="false" /> ' + (a.options.getAllCams ? '<param name="forceGetAllCams" value="True" />' : "") + '<param name="pageId" value="' + a.WebRTCPlugin.pageId + '"><param name="tag" value="' + a.WebRTCPlugin.TAGS.NONE + '" />', document.body.appendChild(a.WebRTCPlugin.plugin);a.WebRTCPlugin.pluginState = a.WebRTCPlugin.PLUGIN_STATES.INJECTED;
}
}, a.WebRTCPlugin.isPluginInstalled = function (e, t, n, r, i) {
if (isIE) {
try {
new ActiveXObject(e + "." + t);
} catch (e) {
return void i();
}r();
} else {
for (var o = navigator.mimeTypes, a = 0; a < o.length; a++) {
if (o[a].type.indexOf(n) >= 0) return void r();
}i();
}
}, a.WebRTCPlugin.defineWebRTCInterface = function () {
if (a.WebRTCPlugin.pluginState === a.WebRTCPlugin.PLUGIN_STATES.READY) return void o.error("AdapterJS - WebRTC interface has already been defined");a.WebRTCPlugin.pluginState = a.WebRTCPlugin.PLUGIN_STATES.INITIALIZING, a.isDefined = function (e) {
return null !== e && void 0 !== e;
}, createIceServer = function createIceServer(e, t, n) {
var r = null,
i = e.split(":");return 0 === i[0].indexOf("stun") ? r = { url: e, hasCredentials: !1 } : 0 === i[0].indexOf("turn") && (r = { url: e, hasCredentials: !0, credential: n, username: t }), r;
}, createIceServers = function createIceServers(e, t, n) {
for (var r = [], i = 0; i < e.length; ++i) {
r.push(createIceServer(e[i], t, n));
}return r;
}, RTCSessionDescription = function RTCSessionDescription(e) {
return a.WebRTCPlugin.WaitForPluginReady(), a.WebRTCPlugin.plugin.ConstructSessionDescription(e.type, e.sdp);
}, RTCPeerConnection = function RTCPeerConnection(e, t) {
if (void 0 !== e && null !== e && !Array.isArray(e.iceServers)) throw new Error("Failed to construct 'RTCPeerConnection': Malformed RTCConfiguration");if (void 0 !== t && null !== t) {
var n = !1;if (n |= "object" != typeof t, n |= t.hasOwnProperty("mandatory") && void 0 !== t.mandatory && null !== t.mandatory && t.mandatory.constructor !== Object, n |= t.hasOwnProperty("optional") && void 0 !== t.optional && null !== t.optional && !Array.isArray(t.optional)) throw new Error("Failed to construct 'RTCPeerConnection': Malformed constraints object");
}a.WebRTCPlugin.WaitForPluginReady();var r = null;if (e && Array.isArray(e.iceServers)) {
r = e.iceServers;for (var i = 0; i < r.length; i++) {
r[i].urls && !r[i].url && (r[i].url = r[i].urls), r[i].hasCredentials = a.isDefined(r[i].username) && a.isDefined(r[i].credential);
}
}if (a.WebRTCPlugin.plugin.PEER_CONNECTION_VERSION && a.WebRTCPlugin.plugin.PEER_CONNECTION_VERSION > 1) return r && (e.iceServers = r), a.WebRTCPlugin.plugin.PeerConnection(e);var o = t && t.mandatory ? t.mandatory : null,
s = t && t.optional ? t.optional : null;return a.WebRTCPlugin.plugin.PeerConnection(a.WebRTCPlugin.pageId, r, o, s);
}, MediaStreamTrack = function MediaStreamTrack() {}, MediaStreamTrack.getSources = function (e) {
a.WebRTCPlugin.callWhenPluginReady(function () {
a.WebRTCPlugin.plugin.GetSources(e);
});
};var e = function e(_e) {
if ("object" != typeof _e || _e.mandatory || _e.optional) return _e;var t = {};return Object.keys(_e).forEach(function (n) {
if ("require" !== n && "advanced" !== n && "mediaSource" !== n) {
var r = "object" == typeof _e[n] ? _e[n] : { ideal: _e[n] };void 0 !== r.exact && "number" == typeof r.exact && (r.min = r.max = r.exact);var i = function i(e, t) {
return e ? e + t.charAt(0).toUpperCase() + t.slice(1) : "deviceId" === t ? "sourceId" : t;
};if (void 0 !== r.ideal) {
t.optional = t.optional || [];var o = {};"number" == typeof r.ideal ? (o[i("min", n)] = r.ideal, t.optional.push(o), o = {}, o[i("max", n)] = r.ideal, t.optional.push(o)) : (o[i("", n)] = r.ideal, t.optional.push(o));
}void 0 !== r.exact && "number" != typeof r.exact ? (t.mandatory = t.mandatory || {}, t.mandatory[i("", n)] = r.exact) : ["min", "max"].forEach(function (e) {
void 0 !== r[e] && (t.mandatory = t.mandatory || {}, t.mandatory[i(e, n)] = r[e]);
});
}
}), _e.advanced && (t.optional = (t.optional || []).concat(_e.advanced)), t;
};getUserMedia = function getUserMedia(t, n, r) {
var i = {};i.audio = !!t.audio && e(t.audio), i.video = !!t.video && e(t.video), a.WebRTCPlugin.callWhenPluginReady(function () {
a.WebRTCPlugin.plugin.getUserMedia(i, n, r);
});
}, window.navigator.getUserMedia = getUserMedia, navigator.mediaDevices || "undefined" == typeof Promise || (requestUserMedia = function requestUserMedia(e) {
return new Promise(function (t, n) {
getUserMedia(e, t, n);
});
}, navigator.mediaDevices = { getUserMedia: requestUserMedia, enumerateDevices: function enumerateDevices() {
return new Promise(function (e) {
var t = { audio: "audioinput", video: "videoinput" };return MediaStreamTrack.getSources(function (n) {
e(n.map(function (e) {
return { label: e.label, kind: t[e.kind], id: e.id, deviceId: e.id, groupId: "" };
}));
});
});
} }), attachMediaStream = function attachMediaStream(e, t) {
if (e && e.parentNode) {
var n;null === t ? n = "" : (void 0 !== t.enableSoundTracks && t.enableSoundTracks(!0), n = t.id);var r = 0 === e.id.length ? Math.random().toString(36).slice(2) : e.id,
i = e.nodeName.toLowerCase();if ("object" !== i) {
var o;switch (i) {case "audio":
o = a.WebRTCPlugin.TAGS.AUDIO;break;case "video":
o = a.WebRTCPlugin.TAGS.VIDEO;break;default:
o = a.WebRTCPlugin.TAGS.NONE;}var s = document.createDocumentFragment(),
c = document.createElement("div"),
u = "";for (e.className ? u = 'class="' + e.className + '" ' : e.attributes && e.attributes.class && (u = 'class="' + e.attributes.class.value + '" '), c.innerHTML = '<object id="' + r + '" ' + u + 'type="' + a.WebRTCPlugin.pluginInfo.type + '"><param name="pluginId" value="' + r + '" /> <param name="pageId" value="' + a.WebRTCPlugin.pageId + '" /> <param name="windowless" value="true" /> <param name="streamId" value="' + n + '" /> <param name="tag" value="' + o + '" /> </object>'; c.firstChild;) {
s.appendChild(c.firstChild);
}var l = "",
d = "";e.clientWidth || e.clientHeight ? (d = e.clientWidth, l = e.clientHeight) : (e.width || e.height) && (d = e.width, l = e.height), e.parentNode.insertBefore(s, e), s = document.getElementById(r), s.width = d, s.height = l, e.parentNode.removeChild(e);
} else {
for (var p = e.children, f = 0; f !== p.length; ++f) {
if ("streamId" === p[f].name) {
p[f].value = n;break;
}
}e.setStreamId(n);
}var h = document.getElementById(r);return a.forwardEventHandlers(h, e, Object.getPrototypeOf(e)), h;
}
}, reattachMediaStream = function reattachMediaStream(e, t) {
for (var n = null, r = t.children, i = 0; i !== r.length; ++i) {
if ("streamId" === r[i].name) {
a.WebRTCPlugin.WaitForPluginReady(), n = a.WebRTCPlugin.plugin.getStreamWithId(a.WebRTCPlugin.pageId, r[i].value);break;
}
}if (null !== n) return attachMediaStream(e, n);o.log("Could not find the stream associated with this element");
}, window.attachMediaStream = attachMediaStream, window.reattachMediaStream = reattachMediaStream, window.getUserMedia = getUserMedia, a.attachMediaStream = attachMediaStream, a.reattachMediaStream = reattachMediaStream, a.getUserMedia = getUserMedia, a.forwardEventHandlers = function (e, t, n) {
properties = Object.getOwnPropertyNames(n);for (var r in properties) {
r && (propName = properties[r], "function" == typeof propName.slice && "on" === propName.slice(0, 2) && "function" == typeof t[propName] && a.addEvent(e, propName.slice(2), t[propName]));
}var i = Object.getPrototypeOf(n);i && a.forwardEventHandlers(e, t, i);
}, RTCIceCandidate = function RTCIceCandidate(e) {
return e.sdpMid || (e.sdpMid = ""), a.WebRTCPlugin.WaitForPluginReady(), a.WebRTCPlugin.plugin.ConstructIceCandidate(e.sdpMid, e.sdpMLineIndex, e.candidate);
}, a.addEvent(document, "readystatechange", a.WebRTCPlugin.injectPlugin), a.WebRTCPlugin.injectPlugin();
}, a.WebRTCPlugin.pluginNeededButNotInstalledCb = a.WebRTCPlugin.pluginNeededButNotInstalledCb || function () {
a.addEvent(document, "readystatechange", a.WebRTCPlugin.pluginNeededButNotInstalledCbPriv), a.WebRTCPlugin.pluginNeededButNotInstalledCbPriv();
}, a.WebRTCPlugin.pluginNeededButNotInstalledCbPriv = function () {
if (!a.options.hidePluginInstallPrompt) {
var e = a.WebRTCPlugin.pluginInfo.downloadLink;if (e) {
var t;t = a.WebRTCPlugin.pluginInfo.portalLink ? 'This website requires you to install the <a href="' + a.WebRTCPlugin.pluginInfo.portalLink + '" target="_blank">' + a.WebRTCPlugin.pluginInfo.companyName + " WebRTC Plugin</a> to work on this browser." : a.TEXT.PLUGIN.REQUIRE_INSTALLATION, a.renderNotificationBar(t, a.TEXT.PLUGIN.BUTTON, e);
} else a.renderNotificationBar(a.TEXT.PLUGIN.NOT_SUPPORTED);
}
}, a.WebRTCPlugin.isPluginInstalled(a.WebRTCPlugin.pluginInfo.prefix, a.WebRTCPlugin.pluginInfo.plugName, a.WebRTCPlugin.pluginInfo.type, a.WebRTCPlugin.defineWebRTCInterface, a.WebRTCPlugin.pluginNeededButNotInstalledCb)) : (function (t) {
e.exports = function () {
return function e(t, n, i) {
function o(s, c) {
if (!n[s]) {
if (!t[s]) {
var u = "function" == typeof r && r;if (!c && u) return r(s, !0);if (a) return a(s, !0);var l = new Error("Cannot find module '" + s + "'");throw l.code = "MODULE_NOT_FOUND", l;
}var d = n[s] = { exports: {} };t[s][0].call(d.exports, function (e) {
return o(t[s][1][e] || e);
}, d, d.exports, e, t, n, i);
}return n[s].exports;
}for (var a = "function" == typeof r && r, s = 0; s < i.length; s++) {
o(i[s]);
}return o;
}({ 1: [function (e, t, n) {
"use strict";
var r = {};r.generateIdentifier = function () {
return Math.random().toString(36).substr(2, 10);
}, r.localCName = r.generateIdentifier(), r.splitLines = function (e) {
return e.trim().split("\n").map(function (e) {
return e.trim();
});
}, r.splitSections = function (e) {
return e.split("\nm=").map(function (e, t) {
return (t > 0 ? "m=" + e : e).trim() + "\r\n";
});
}, r.matchPrefix = function (e, t) {
return r.splitLines(e).filter(function (e) {
return 0 === e.indexOf(t);
});
}, r.parseCandidate = function (e) {
var t;t = 0 === e.indexOf("a=candidate:") ? e.substring(12).split(" ") : e.substring(10).split(" ");for (var n = { foundation: t[0], component: t[1], protocol: t[2].toLowerCase(), priority: parseInt(t[3], 10), ip: t[4], port: parseInt(t[5], 10), type: t[7] }, r = 8; r < t.length; r += 2) {
switch (t[r]) {case "raddr":
n.relatedAddress = t[r + 1];break;case "rport":
n.relatedPort = parseInt(t[r + 1], 10);break;case "tcptype":
n.tcpType = t[r + 1];}
}return n;
}, r.writeCandidate = function (e) {
var t = [];t.push(e.foundation), t.push(e.component), t.push(e.protocol.toUpperCase()), t.push(e.priority), t.push(e.ip), t.push(e.port);var n = e.type;return t.push("typ"), t.push(n), "host" !== n && e.relatedAddress && e.relatedPort && (t.push("raddr"), t.push(e.relatedAddress), t.push("rport"), t.push(e.relatedPort)), e.tcpType && "tcp" === e.protocol.toLowerCase() && (t.push("tcptype"), t.push(e.tcpType)), "candidate:" + t.join(" ");
}, r.parseRtpMap = function (e) {
var t = e.substr(9).split(" "),
n = { payloadType: parseInt(t.shift(), 10) };return t = t[0].split("/"), n.name = t[0], n.clockRate = parseInt(t[1], 10), n.numChannels = 3 === t.length ? parseInt(t[2], 10) : 1, n;
}, r.writeRtpMap = function (e) {
var t = e.payloadType;return void 0 !== e.preferredPayloadType && (t = e.preferredPayloadType), "a=rtpmap:" + t + " " + e.name + "/" + e.clockRate + (1 !== e.numChannels ? "/" + e.numChannels : "") + "\r\n";
}, r.parseExtmap = function (e) {
var t = e.substr(9).split(" ");return { id: parseInt(t[0], 10), uri: t[1] };
}, r.writeExtmap = function (e) {
return "a=extmap:" + (e.id || e.preferredId) + " " + e.uri + "\r\n";
}, r.parseFmtp = function (e) {
for (var t, n = {}, r = e.substr(e.indexOf(" ") + 1).split(";"), i = 0; i < r.length; i++) {
t = r[i].trim().split("="), n[t[0].trim()] = t[1];
}return n;
}, r.writeFmtp = function (e) {
var t = "",
n = e.payloadType;if (void 0 !== e.preferredPayloadType && (n = e.preferredPayloadType), e.parameters && Object.keys(e.parameters).length) {
var r = [];Object.keys(e.parameters).forEach(function (t) {
r.push(t + "=" + e.parameters[t]);
}), t += "a=fmtp:" + n + " " + r.join(";") + "\r\n";
}return t;
}, r.parseRtcpFb = function (e) {
var t = e.substr(e.indexOf(" ") + 1).split(" ");return { type: t.shift(), parameter: t.join(" ") };
}, r.writeRtcpFb = function (e) {
var t = "",
n = e.payloadType;return void 0 !== e.preferredPayloadType && (n = e.preferredPayloadType), e.rtcpFeedback && e.rtcpFeedback.length && e.rtcpFeedback.forEach(function (e) {
t += "a=rtcp-fb:" + n + " " + e.type + (e.parameter && e.parameter.length ? " " + e.parameter : "") + "\r\n";
}), t;
}, r.parseSsrcMedia = function (e) {
var t = e.indexOf(" "),
n = { ssrc: parseInt(e.substr(7, t - 7), 10) },
r = e.indexOf(":", t);return r > -1 ? (n.attribute = e.substr(t + 1, r - t - 1), n.value = e.substr(r + 1)) : n.attribute = e.substr(t + 1), n;
}, r.getDtlsParameters = function (e, t) {
var n = r.splitLines(e);n = n.concat(r.splitLines(t));var i = n.filter(function (e) {
return 0 === e.indexOf("a=fingerprint:");
})[0].substr(14);return { role: "auto", fingerprints: [{ algorithm: i.split(" ")[0], value: i.split(" ")[1] }] };
}, r.writeDtlsParameters = function (e, t) {
var n = "a=setup:" + t + "\r\n";return e.fingerprints.forEach(function (e) {
n += "a=fingerprint:" + e.algorithm + " " + e.value + "\r\n";
}), n;
}, r.getIceParameters = function (e, t) {
var n = r.splitLines(e);return n = n.concat(r.splitLines(t)), { usernameFragment: n.filter(function (e) {
return 0 === e.indexOf("a=ice-ufrag:");
})[0].substr(12), password: n.filter(function (e) {
return 0 === e.indexOf("a=ice-pwd:");
})[0].substr(10) };
}, r.writeIceParameters = function (e) {
return "a=ice-ufrag:" + e.usernameFragment + "\r\na=ice-pwd:" + e.password + "\r\n";
}, r.parseRtpParameters = function (e) {
for (var t = { codecs: [], headerExtensions: [], fecMechanisms: [], rtcp: [] }, n = r.splitLines(e), i = n[0].split(" "), o = 3; o < i.length; o++) {
var a = i[o],
s = r.matchPrefix(e, "a=rtpmap:" + a + " ")[0];if (s) {
var c = r.parseRtpMap(s),
u = r.matchPrefix(e, "a=fmtp:" + a + " ");switch (c.parameters = u.length ? r.parseFmtp(u[0]) : {}, c.rtcpFeedback = r.matchPrefix(e, "a=rtcp-fb:" + a + " ").map(r.parseRtcpFb), t.codecs.push(c), c.name.toUpperCase()) {case "RED":case "ULPFEC":
t.fecMechanisms.push(c.name.toUpperCase());}
}
}return r.matchPrefix(e, "a=extmap:").forEach(function (e) {
t.headerExtensions.push(r.parseExtmap(e));
}), t;
}, r.writeRtpDescription = function (e, t) {
var n = "";return n += "m=" + e + " ", n += t.codecs.length > 0 ? "9" : "0", n += " UDP/TLS/RTP/SAVPF ", n += t.codecs.map(function (e) {
return void 0 !== e.preferredPayloadType ? e.preferredPayloadType : e.payloadType;
}).join(" ") + "\r\n", n += "c=IN IP4 0.0.0.0\r\n", n += "a=rtcp:9 IN IP4 0.0.0.0\r\n", t.codecs.forEach(function (e) {
n += r.writeRtpMap(e), n += r.writeFmtp(e), n += r.writeRtcpFb(e);
}), n += "a=rtcp-mux\r\n";
}, r.parseRtpEncodingParameters = function (e) {
var t,
n = [],
i = r.parseRtpParameters(e),
o = -1 !== i.fecMechanisms.indexOf("RED"),
a = -1 !== i.fecMechanisms.indexOf("ULPFEC"),
s = r.matchPrefix(e, "a=ssrc:").map(function (e) {
return r.parseSsrcMedia(e);
}).filter(function (e) {
return "cname" === e.attribute;
}),
c = s.length > 0 && s[0].ssrc,
u = r.matchPrefix(e, "a=ssrc-group:FID").map(function (e) {
var t = e.split(" ");return t.shift(), t.map(function (e) {
return parseInt(e, 10);
});
});u.length > 0 && u[0].length > 1 && u[0][0] === c && (t = u[0][1]), i.codecs.forEach(function (e) {
if ("RTX" === e.name.toUpperCase() && e.parameters.apt) {
var r = { ssrc: c, codecPayloadType: parseInt(e.parameters.apt, 10), rtx: { payloadType: e.payloadType, ssrc: t } };n.push(r), o && (r = JSON.parse(JSON.stringify(r)), r.fec = { ssrc: t, mechanism: a ? "red+ulpfec" : "red" }, n.push(r));
}
}), 0 === n.length && c && n.push({ ssrc: c });var l = r.matchPrefix(e, "b=");return l.length && (0 === l[0].indexOf("b=TIAS:") ? l = parseInt(l[0].substr(7), 10) : 0 === l[0].indexOf("b=AS:") && (l = parseInt(l[0].substr(5), 10)), n.forEach(function (e) {
e.maxBitrate = l;
})), n;
}, r.writeSessionBoilerplate = function () {
return "v=0\r\no=thisisadapterortc 8169639915646943137 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\n";
}, r.writeMediaSection = function (e, t, n, i) {
var o = r.writeRtpDescription(e.kind, t);if (o += r.writeIceParameters(e.iceGatherer.getLocalParameters()), o += r.writeDtlsParameters(e.dtlsTransport.getLocalParameters(), "offer" === n ? "actpass" : "active"), o += "a=mid:" + e.mid + "\r\n", e.rtpSender && e.rtpReceiver ? o += "a=sendrecv\r\n" : e.rtpSender ? o += "a=sendonly\r\n" : e.rtpReceiver ? o += "a=recvonly\r\n" : o += "a=inactive\r\n", e.rtpSender) {
var a = "msid:" + i.id + " " + e.rtpSender.track.id + "\r\n";o += "a=" + a, o += "a=ssrc:" + e.sendEncodingParameters[0].ssrc + " " + a;
}return o += "a=ssrc:" + e.sendEncodingParameters[0].ssrc + " cname:" + r.localCName + "\r\n";
}, r.getDirection = function (e, t) {
for (var n = r.splitLines(e), i = 0; i < n.length; i++) {
switch (n[i]) {case "a=sendrecv":case "a=sendonly":case "a=recvonly":case "a=inactive":
return n[i].substr(2);}
}return t ? r.getDirection(t) : "sendrecv";
}, t.exports = r;
}, {}], 2: [function (e, t, n) {
"use strict";
!function () {
var n = e("./utils").log,
r = e("./utils").browserDetails;t.exports.browserDetails = r, t.exports.extractVersion = e("./utils").extractVersion, t.exports.disableLog = e("./utils").disableLog;var i = e("./chrome/chrome_shim") || null,
o = e("./edge/edge_shim") || null,
a = e("./firefox/firefox_shim") || null,
s = e("./safari/safari_shim") || null;switch (r.browser) {case "opera":case "chrome":
if (!i || !i.shimPeerConnection) return void n("Chrome shim is not included in this adapter release.");n("adapter.js shimming chrome."), t.exports.browserShim = i, i.shimGetUserMedia(), i.shimMediaStream(), i.shimSourceObject(), i.shimPeerConnection(), i.shimOnTrack();break;case "firefox":
if (!a || !a.shimPeerConnection) return void n("Firefox shim is not included in this adapter release.");n("adapter.js shimming firefox."), t.exports.browserShim = a, a.shimGetUserMedia(), a.shimSourceObject(), a.shimPeerConnection(), a.shimOnTrack();break;case "edge":
if (!o || !o.shimPeerConnection) return void n("MS edge shim is not included in this adapter release.");n("adapter.js shimming edge."), t.exports.browserShim = o, o.shimGetUserMedia(), o.shimPeerConnection();break;case "safari":
if (!s) return void n("Safari shim is not included in this adapter release.");n("adapter.js shimming safari."), t.exports.browserShim = s, s.shimGetUserMedia();break;default:
n("Unsupported browser!");}
}();
}, { "./chrome/chrome_shim": 3, "./edge/edge_shim": 5, "./firefox/firefox_shim": 7, "./safari/safari_shim": 9, "./utils": 10 }], 3: [function (e, t, n) {
"use strict";
var r = e("../utils.js").log,
i = e("../utils.js").browserDetails,
o = { shimMediaStream: function shimMediaStream() {
window.MediaStream = window.MediaStream || window.webkitMediaStream;
}, shimOnTrack: function shimOnTrack() {
"object" != typeof window || !window.RTCPeerConnection || "ontrack" in window.RTCPeerConnection.prototype || Object.defineProperty(window.RTCPeerConnection.prototype, "ontrack", { get: function get() {
return this._ontrack;
}, set: function set(e) {
var t = this;this._ontrack && (this.removeEventListener("track", this._ontrack), this.removeEventListener("addstream", this._ontrackpoly)), this.addEventListener("track", this._ontrack = e), this.addEventListener("addstream", this._ontrackpoly = function (e) {
e.stream.addEventListener("addtrack", function (n) {
var r = new Event("track");r.track = n.track, r.receiver = { track: n.track }, r.streams = [e.stream], t.dispatchEvent(r);
}), e.stream.getTracks().forEach(function (t) {
var n = new Event("track");n.track = t, n.receiver = { track: t }, n.streams = [e.stream], this.dispatchEvent(n);
}.bind(this));
}.bind(this));
} });
}, shimSourceObject: function shimSourceObject() {
"object" == typeof window && (!window.HTMLMediaElement || "srcObject" in window.HTMLMediaElement.prototype || Object.defineProperty(window.HTMLMediaElement.prototype, "srcObject", { get: function get() {
return this._srcObject;
}, set: function set(e) {
var t = this;if (this._srcObject = e, this.src && URL.revokeObjectURL(this.src), !e) return void (this.src = "");this.src = URL.createObjectURL(e), e.addEventListener("addtrack", function () {
t.src && URL.revokeObjectURL(t.src), t.src = URL.createObjectURL(e);
}), e.addEventListener("removetrack", function () {
t.src && URL.revokeObjectURL(t.src), t.src = URL.createObjectURL(e);
});
} }));
}, shimPeerConnection: function shimPeerConnection() {
window.RTCPeerConnection = function (e, t) {
r("PeerConnection"), e && e.iceTransportPolicy && (e.iceTransports = e.iceTransportPolicy);var n = new webkitRTCPeerConnection(e, t),
i = n.getStats.bind(n);return n.getStats = function (e, t, n) {
var r = this,
o = arguments;if (arguments.length > 0 && "function" == typeof e) return i(e, t);var a = function a(e) {
var t = {};return e.result().forEach(function (e) {
var n = { id: e.id, timestamp: e.timestamp, type: e.type };e.names().forEach(function (t) {
n[t] = e.stat(t);
}), t[n.id] = n;
}), t;
},
s = function s(e, t) {
var n = new Map(Object.keys(e).map(function (t) {
return [t, e[t]];
}));return t = t || e, Object.keys(t).forEach(function (e) {
n[e] = t[e];
}), n;
};if (arguments.length >= 2) {
var c = function c(e) {
o[1](s(a(e)));
};return i.apply(this, [c, arguments[0]]);
}return new Promise(function (t, n) {
1 === o.length && "object" == typeof e ? i.apply(r, [function (e) {
t(s(a(e)));
}, n]) : i.apply(r, [function (e) {
t(s(a(e), e.result()));
}, n]);
}).then(t, n);
}, n;
}, window.RTCPeerConnection.prototype = webkitRTCPeerConnection.prototype, webkitRTCPeerConnection.generateCertificate && Object.defineProperty(window.RTCPeerConnection, "generateCertificate", { get: function get() {
return webkitRTCPeerConnection.generateCertificate;
} }), ["createOffer", "createAnswer"].forEach(function (e) {
var t = webkitRTCPeerConnection.prototype[e];webkitRTCPeerConnection.prototype[e] = function () {
var e = this;if (arguments.length < 1 || 1 === arguments.length && "object" == typeof arguments[0]) {
var n = 1 === arguments.length ? arguments[0] : void 0;return new Promise(function (r, i) {
t.apply(e, [r, i, n]);
});
}return t.apply(this, arguments);
};
}), i.version < 51 && ["setLocalDescription", "setRemoteDescription", "addIceCandidate"].forEach(function (e) {
var t = webkitRTCPeerConnection.prototype[e];webkitRTCPeerConnection.prototype[e] = function () {
var e = arguments,
n = this,
r = new Promise(function (r, i) {
t.apply(n, [e[0], r, i]);
});return e.length < 2 ? r : r.then(function () {
e[1].apply(null, []);
}, function (t) {
e.length >= 3 && e[2].apply(null, [t]);
});
};
}), ["setLocalDescription", "setRemoteDescription", "addIceCandidate"].forEach(function (e) {
var t = webkitRTCPeerConnection.prototype[e];webkitRTCPeerConnection.prototype[e] = function () {
return arguments[0] = new ("addIceCandidate" === e ? RTCIceCandidate : RTCSessionDescription)(arguments[0]), t.apply(this, arguments);
};
});var e = RTCPeerConnection.prototype.addIceCandidate;RTCPeerConnection.prototype.addIceCandidate = function () {
return null === arguments[0] ? Promise.resolve() : e.apply(this, arguments);
};
} };t.exports = { shimMediaStream: o.shimMediaStream, shimOnTrack: o.shimOnTrack, shimSourceObject: o.shimSourceObject, shimPeerConnection: o.shimPeerConnection, shimGetUserMedia: e("./getusermedia") };
}, { "../utils.js": 10, "./getusermedia": 4 }], 4: [function (e, t, n) {
"use strict";
var r = e("../utils.js").log;t.exports = function () {
var e = function e(_e2) {
if ("object" != typeof _e2 || _e2.mandatory || _e2.optional) return _e2;var t = {};return Object.keys(_e2).forEach(function (n) {
if ("require" !== n && "advanced" !== n && "mediaSource" !== n) {
var r = "object" == typeof _e2[n] ? _e2[n] : { ideal: _e2[n] };void 0 !== r.exact && "number" == typeof r.exact && (r.min = r.max = r.exact);var i = function i(e, t) {
return e ? e + t.charAt(0).toUpperCase() + t.slice(1) : "deviceId" === t ? "sourceId" : t;
};if (void 0 !== r.ideal) {
t.optional = t.optional || [];var o = {};"number" == typeof r.ideal ? (o[i("min", n)] = r.ideal, t.optional.push(o), o = {}, o[i("max", n)] = r.ideal, t.optional.push(o)) : (o[i("", n)] = r.ideal, t.optional.push(o));
}void 0 !== r.exact && "number" != typeof r.exact ? (t.mandatory = t.mandatory || {}, t.mandatory[i("", n)] = r.exact) : ["min", "max"].forEach(function (e) {
void 0 !== r[e] && (t.mandatory = t.mandatory || {}, t.mandatory[i(e, n)] = r[e]);
});
}
}), _e2.advanced && (t.optional = (t.optional || []).concat(_e2.advanced)), t;
},
t = function t(_t, n) {
if (_t = JSON.parse(JSON.stringify(_t)), _t && _t.audio && (_t.audio = e(_t.audio)), _t && "object" == typeof _t.video) {
var i = _t.video.facingMode;if ((i = i && ("object" == typeof i ? i : { ideal: i })) && ("user" === i.exact || "environment" === i.exact || "user" === i.ideal || "environment" === i.ideal) && (!navigator.mediaDevices.getSupportedConstraints || !navigator.mediaDevices.getSupportedConstraints().facingMode) && (delete _t.video.facingMode, "environment" === i.exact || "environment" === i.ideal)) return navigator.mediaDevices.enumerateDevices().then(function (o) {
o = o.filter(function (e) {
return "videoinput" === e.kind;
});var a = o.find(function (e) {
return -1 !== e.label.toLowerCase().indexOf("back");
}) || o.length && o[o.length - 1];return a && (_t.video.deviceId = i.exact ? { exact: a.deviceId } : { ideal: a.deviceId }), _t.video = e(_t.video), r("chrome: " + JSON.stringify(_t)), n(_t);
});_t.video = e(_t.video);
}return r("chrome: " + JSON.stringify(_t)), n(_t);
},
n = function n(e) {
return { name: { PermissionDeniedError: "NotAllowedError", ConstraintNotSatisfiedError: "OverconstrainedError" }[e.name] || e.name, message: e.message, constraint: e.constraintName, toString: function toString() {
return this.name + (this.message && ": ") + this.message;
} };
},
i = function (_i) {
function i(_x, _x2, _x3) {
return _i.apply(this, arguments);
}
i.toString = function () {
return _i.toString();
};
return i;
}(function (e, r, i) {
t(e, function (e) {
navigator.webkitGetUserMedia(e, r, function (e) {
i(n(e));
});
});
});navigator.getUserMedia = i;var o = function o(e) {
return new Promise(function (t, n) {
navigator.getUserMedia(e, t, n);
});
};if (navigator.mediaDevices || (navigator.mediaDevices = { getUserMedia: o, enumerateDevices: function enumerateDevices() {
return new Promise(function (e) {
var t = { audio: "audioinput", video: "videoinput" };return MediaStreamTrack.getSources(function (n) {
e(n.map(function (e) {
return { label: e.label, kind: t[e.kind], deviceId: e.id, groupId: "" };
}));
});
});
} }), navigator.mediaDevices.getUserMedia) {
var a = navigator.mediaDevices.getUserMedia.bind(navigator.mediaDevices);navigator.mediaDevices.getUserMedia = function (e) {
return t(e, function (e) {
return a(e).catch(function (e) {
return Promise.reject(n(e));
});
});
};
} else navigator.mediaDevices.getUserMedia = function (e) {
return o(e);
};void 0 === navigator.mediaDevices.addEventListener && (navigator.mediaDevices.addEventListener = function () {
r("Dummy mediaDevices.addEventListener called.");
}), void 0 === navigator.mediaDevices.removeEventListener && (navigator.mediaDevices.removeEventListener = function () {
r("Dummy mediaDevices.removeEventListener called.");
});
};
}, { "../utils.js": 10 }], 5: [function (e, t, n) {
"use strict";
var r = e("sdp"),
i = e("../utils").browserDetails,
o = { shimPeerConnection: function shimPeerConnection() {
window.RTCIceGatherer && (window.RTCIceCandidate || (window.RTCIceCandidate = function (e) {
return e;
}), window.RTCSessionDescription || (window.RTCSessionDescription = function (e) {
return e;
})), window.RTCPeerConnection = function (e) {
var t = this,
n = document.createDocumentFragment();if (["addEventListener", "removeEventListener", "dispatchEvent"].forEach(function (e) {
t[e] = n[e].bind(n);
}), this.onicecandidate = null, this.onaddstream = null, this.ontrack = null, this.onremovestream = null, this.onsignalingstatechange = null, this.oniceconnectionstatechange = null, this.onnegotiationneeded = null, this.ondatachannel = null, this.localStreams = [], this.remoteStreams = [], this.getLocalStreams = function () {
return t.localStreams;
}, this.getRemoteStreams = function () {
return t.remoteStreams;
}, this.localDescription = new RTCSessionDescription({ type: "", sdp: "" }), this.remoteDescription = new RTCSessionDescription({ type: "", sdp: "" }), this.signalingState = "stable", this.iceConnectionState = "new", this.iceGatheringState = "new", this.iceOptions = { gatherPolicy: "all", iceServers: [] }, e && e.iceTransportPolicy) switch (e.iceTransportPolicy) {case "all":case "relay":
this.iceOptions.gatherPolicy = e.iceTransportPolicy;break;case "none":
throw new TypeError('iceTransportPolicy "none" not supported');}if (this.usingBundle = e && "max-bundle" === e.bundlePolicy, e && e.iceServers) {
var r = JSON.parse(JSON.stringify(e.iceServers));this.iceOptions.iceServers = r.filter(function (e) {
if (e && e.urls) {
var t = e.urls;return "string" == typeof t && (t = [t]), !!(t = t.filter(function (e) {
return 0 === e.indexOf("turn:") && -1 !== e.indexOf("transport=udp") && -1 === e.indexOf("turn:[") || 0 === e.indexOf("stun:") && i.version >= 14393;
})[0]);
}return !1;
});
}this.transceivers = [], this._localIceCandidatesBuffer = [];
}, window.RTCPeerConnection.prototype._emitBufferedCandidates = function () {
var e = this,
t = r.splitSections(e.localDescription.sdp);this._localIceCandidatesBuffer.forEach(function (n) {
if (n.candidate && 0 !== Object.keys(n.candidate).length) -1 === n.candidate.candidate.indexOf("typ endOfCandidates") && (t[n.candidate.sdpMLineIndex + 1] += "a=" + n.candidate.candidate + "\r\n");else for (var r = 1; r < t.length; r++) {
-1 === t[r].indexOf("\r\na=end-of-candidates\r\n") && (t[r] += "a=end-of-candidates\r\n");
}e.localDescription.sdp = t.join(""), e.dispatchEvent(n), null !== e.onicecandidate && e.onicecandidate(n), n.candidate || "complete" === e.iceGatheringState || e.transceivers.every(function (e) {
return e.iceGatherer && "completed" === e.iceGatherer.state;
}) && (e.iceGatheringState = "complete");
}), this._localIceCandidatesBuffer = [];
}, window.RTCPeerConnection.prototype.addStream = function (e) {
this.localStreams.push(e.clone()), this._maybeFireNegotiationNeeded();
}, window.RTCPeerConnection.prototype.removeStream = function (e) {
var t = this.localStreams.indexOf(e);t > -1 && (this.localStreams.splice(t, 1), this._maybeFireNegotiationNeeded());
}, window.RTCPeerConnection.prototype.getSenders = function () {
return this.transceivers.filter(function (e) {
return !!e.rtpSender;
}).map(function (e) {
return e.rtpSender;
});
}, window.RTCPeerConnection.prototype.getReceivers = function () {
return this.transceivers.filter(function (e) {
return !!e.rtpReceiver;
}).map(function (e) {
return e.rtpReceiver;
});
}, window.RTCPeerConnection.prototype._getCommonCapabilities = function (e, t) {
var n = { codecs: [], headerExtensions: [], fecMechanisms: [] };return e.codecs.forEach(function (e) {
for (var r = 0; r < t.codecs.length; r++) {
var i = t.codecs[r];if (e.name.toLowerCase() === i.name.toLowerCase() && e.clockRate === i.clockRate && e.numChannels === i.numChannels) {
n.codecs.push(i), i.rtcpFeedback = i.rtcpFeedback.filter(function (t) {
for (var n = 0; n < e.rtcpFeedback.length; n++) {
if (e.rtcpFeedback[n].type === t.type && e.rtcpFeedback[n].parameter === t.parameter) return !0;
}return !1;
});break;
}
}
}), e.headerExtensions.forEach(function (e) {
for (var r = 0; r < t.headerExtensions.length; r++) {
var i = t.headerExtensions[r];if (e.uri === i.uri) {
n.headerExtensions.push(i);break;
}
}
}), n;
}, window.RTCPeerConnection.prototype._createIceAndDtlsTransports = function (e, t) {
var n = this,
i = new RTCIceGatherer(n.iceOptions),
o = new RTCIceTransport(i);i.onlocalcandidate = function (a) {
var s = new Event("icecandidate");s.candidate = { sdpMid: e, sdpMLineIndex: t };var c = a.candidate,
u = !c || 0 === Object.keys(c).length;u ? (void 0 === i.state && (i.state = "completed"), s.candidate.candidate = "candidate:1 1 udp 1 0.0.0.0 9 typ endOfCandidates") : (c.component = "RTCP" === o.component ? 2 : 1, s.candidate.candidate = r.writeCandidate(c));var l = r.splitSections(n.localDescription.sdp);-1 === s.candidate.candidate.indexOf("typ endOfCandidates") ? l[s.candidate.sdpMLineIndex + 1] += "a=" + s.candidate.candidate + "\r\n" : l[s.candidate.sdpMLineIndex + 1] += "a=end-of-candidates\r\n", n.localDescription.sdp = l.join("");var d = n.transceivers.every(function (e) {
return e.iceGatherer && "completed" === e.iceGatherer.state;
});switch (n.iceGatheringState) {case "new":
n._localIceCandidatesBuffer.push(s), u && d && n._localIceCandidatesBuffer.push(new Event("icecandidate"));break;case "gathering":
n._emitBufferedCandidates(), n.dispatchEvent(s), null !== n.onicecandidate && n.onicecandidate(s), d && (n.dispatchEvent(new Event("icecandidate")), null !== n.onicecandidate && n.onicecandidate(new Event("icecandidate")), n.iceGatheringState = "complete");}
}, o.onicestatechange = function () {
n._updateConnectionState();
};var a = new RTCDtlsTransport(o);return a.ondtlsstatechange = function () {
n._updateConnectionState();
}, a.onerror = function () {
a.state = "failed", n._updateConnectionState();
}, { iceGatherer: i, iceTransport: o, dtlsTransport: a };
}, window.RTCPeerConnection.prototype._transceive = function (e, t, n) {
var i = this._getCommonCapabilities(e.localCapabilities, e.remoteCapabilities);t && e.rtpSender && (i.encodings = e.sendEncodingParameters, i.rtcp = { cname: r.localCName }, e.recvEncodingParameters.length && (i.rtcp.ssrc = e.recvEncodingParameters[0].ssrc), e.rtpSender.send(i)), n && e.rtpReceiver && (i.encodings = e.recvEncodingParameters, i.rtcp = { cname: e.cname }, e.sendEncodingParameters.length && (i.rtcp.ssrc = e.sendEncodingParameters[0].ssrc), e.rtpReceiver.receive(i));
}, window.RTCPeerConnection.prototype.setLocalDescription = function (e) {
var t,
n,
i = this;if ("offer" === e.type) this._pendingOffer && (t = r.splitSections(e.sdp), n = t.shift(), t.forEach(function (e, t) {
var n = r.parseRtpParameters(e);i._pendingOffer[t].localCapabilities = n;
}), this.transceivers = this._pendingOffer, delete this._pendingOffer);else if ("answer" === e.type) {
t = r.splitSections(i.remoteDescription.sdp), n = t.shift();var o = r.matchPrefix(n, "a=ice-lite").length > 0;t.forEach(function (e, t) {
var a = i.transceivers[t],
s = a.iceGatherer,
c = a.iceTransport,
u = a.dtlsTransport,
l = a.localCapabilities,
d = a.remoteCapabilities;if ("0" !== e.split("\n", 1)[0].split(" ", 2)[1] && !a.isDatachannel) {
var p = r.getIceParameters(e, n);if (o) {
var f = r.matchPrefix(e, "a=candidate:").map(function (e) {
return r.parseCandidate(e);
}).filter(function (e) {
return "1" === e.component;
});f.length && c.setRemoteCandidates(f);
}var h = r.getDtlsParameters(e, n);o && (h.role = "server"), i.usingBundle && 0 !== t || (c.start(s, p, o ? "controlling" : "controlled"), u.start(h));var m = i._getCommonCapabilities(l, d);i._transceive(a, m.codecs.length > 0, !1);
}
});
}switch (this.localDescription = { type: e.type, sdp: e.sdp }, e.type) {case "offer":
this._updateSignalingState("have-local-offer");break;case "answer":
this._updateSignalingState("stable");break;default:
throw new TypeError('unsupported type "' + e.type + '"');}var a = arguments.length > 1 && "function" == typeof arguments[1];if (a) {
var s = arguments[1];window.setTimeout(function () {
s(), "new" === i.iceGatheringState && (i.iceGatheringState = "gathering"), i._emitBufferedCandidates();
}, 0);
}var c = Promise.resolve();return c.then(function () {
a || ("new" === i.iceGatheringState && (i.iceGatheringState = "gathering"), window.setTimeout(i._emitBufferedCandidates.bind(i), 500));
}), c;
}, window.RTCPeerConnection.prototype.setRemoteDescription = function (e) {
var t = this,
n = new MediaStream(),
i = [],
o = r.splitSections(e.sdp),
a = o.shift(),
s = r.matchPrefix(a, "a=ice-lite").length > 0;switch (this.usingBundle = r.matchPrefix(a, "a=group:BUNDLE ").length > 0, o.forEach(function (o, c) {
var u = r.splitLines(o),
l = u[0].substr(2).split(" "),
d = l[0],
p = "0" === l[1],
f = r.getDirection(o, a),
h = r.matchPrefix(o, "a=mid:");if (h = h.length ? h[0].substr(6) : r.generateIdentifier(), "application" === d && "DTLS/SCTP" === l[2]) return void (t.transceivers[c] = { mid: h, isDatachannel: !0 });var m,
v,
g,
y,
b,
S,
E,
T,
_,
C,
w,
R,
k = r.parseRtpParameters(o);p || (w = r.getIceParameters(o, a), R = r.getDtlsParameters(o, a), R.role = "client"), T = r.parseRtpEncodingParameters(o);var A,
I = r.matchPrefix(o, "a=ssrc:").map(function (e) {
return r.parseSsrcMedia(e);
}).filter(function (e) {
return "cname" === e.attribute;
})[0];I && (A = I.value);var P = r.matchPrefix(o, "a=end-of-candidates", a).length > 0,
O = r.matchPrefix(o, "a=candidate:").map(function (e) {
return r.parseCandidate(e);
}).filter(function (e) {
return "1" === e.component;
});if ("offer" !== e.type || p) "answer" !== e.type || p || (m = t.transceivers[c], v = m.iceGatherer, g = m.iceTransport, y = m.dtlsTransport, b = m.rtpSender, S = m.rtpReceiver, E = m.sendEncodingParameters, _ = m.localCapabilities, t.transceivers[c].recvEncodingParameters = T, t.transceivers[c].remoteCapabilities = k, t.transceivers[c].cname = A, (s || P) && O.length && g.setRemoteCandidates(O), t.usingBundle && 0 !== c || (g.start(v, w, "controlling"), y.start(R)), t._transceive(m, "sendrecv" === f || "recvonly" === f, "sendrecv" === f || "sendonly" === f), !S || "sendrecv" !== f && "sendonly" !== f ? delete m.rtpReceiver : (C = S.track, i.push([C, S]), n.addTrack(C)));else {
var D = t.usingBundle && c > 0 ? { iceGatherer: t.transceivers[0].iceGatherer, iceTransport: t.transceivers[0].iceTransport, dtlsTransport: t.transceivers[0].dtlsTransport } : t._createIceAndDtlsTransports(h, c);if (P && D.iceTransport.setRemoteCandidates(O), _ = RTCRtpReceiver.getCapabilities(d), E = [{ ssrc: 1001 * (2 * c + 2) }], S = new RTCRtpReceiver(D.dtlsTransport, d), C = S.track, i.push([C, S]), n.addTrack(C), t.localStreams.length > 0 && t.localStreams[0].getTracks().length >= c) {
var L;"audio" === d ? L = t.localStreams[0].getAudioTracks()[0] : "video" === d && (L = t.localStreams[0].getVideoTracks()[0]), L && (b = new RTCRtpSender(L, D.dtlsTransport));
}t.transceivers[c] = { iceGatherer: D.iceGatherer, iceTransport: D.iceTransport, dtlsTransport: D.dtlsTransport, localCapabilities: _, remoteCapabilities: k, rtpSender: b, rtpReceiver: S, kind: d, mid: h, cname: A, sendEncodingParameters: E, recvEncodingParameters: T }, t._transceive(t.transceivers[c], !1, "sendrecv" === f || "sendonly" === f);
}
}), this.remoteDescription = { type: e.type, sdp: e.sdp }, e.type) {case "offer":
this._updateSignalingState("have-remote-offer");break;case "answer":
this._updateSignalingState("stable");break;default:
throw new TypeError('unsupported type "' + e.type + '"');}return n.getTracks().length && (t.remoteStreams.push(n), window.setTimeout(function () {
var e = new Event("addstream");e.stream = n, t.dispatchEvent(e), null !== t.onaddstream && window.setTimeout(function () {
t.onaddstream(e);
}, 0), i.forEach(function (r) {
var i = r[0],
o = r[1],
a = new Event("track");a.track = i, a.receiver = o, a.streams = [n], t.dispatchEvent(e), null !== t.ontrack && window.setTimeout(function () {
t.ontrack(a);
}, 0);
});
}, 0)), arguments.length > 1 && "function" == typeof arguments[1] && window.setTimeout(arguments[1], 0), Promise.resolve();
}, window.RTCPeerConnection.prototype.close = function () {
this.transceivers.forEach(function (e) {
e.iceTransport && e.iceTransport.stop(), e.dtlsTransport && e.dtlsTransport.stop(), e.rtpSender && e.rtpSender.stop(), e.rtpReceiver && e.rtpReceiver.stop();
}), this._updateSignalingState("closed");
}, window.RTCPeerConnection.prototype._updateSignalingState = function (e) {
this.signalingState = e;var t = new Event("signalingstatechange");this.dispatchEvent(t), null !== this.onsignalingstatechange && this.onsignalingstatechange(t);
}, window.RTCPeerConnection.prototype._maybeFireNegotiationNeeded = function () {
var e = new Event("negotiationneeded");this.dispatchEvent(e), null !== this.onnegotiationneeded && this.onnegotiationneeded(e);
}, window.RTCPeerConnection.prototype._updateConnectionState = function () {
var e,
t = this,
n = { new: 0, closed: 0, connecting: 0, checking: 0, connected: 0, completed: 0, failed: 0 };if (this.transceivers.forEach(function (e) {
n[e.iceTransport.state]++, n[e.dtlsTransport.state]++;
}), n.connected += n.completed, e = "new", n.failed > 0 ? e = "failed" : n.connecting > 0 || n.checking > 0 ? e = "connecting" : n.disconnected > 0 ? e = "disconnected" : n.new > 0 ? e = "new" : (n.connected > 0 || n.completed > 0) && (e = "connected"), e !== t.iceConnectionState) {
t.iceConnectionState = e;var r = new Event("iceconnectionstatechange");this.dispatchEvent(r), null !== this.oniceconnectionstatechange && this.oniceconnectionstatechange(r);
}
}, window.RTCPeerConnection.prototype.createOffer = function () {
var e = this;if (this._pendingOffer) throw new Error("createOffer called while there is a pending offer.");var t;1 === arguments.length && "function" != typeof arguments[0] ? t = arguments[0] : 3 === arguments.length && (t = arguments[2]);var n = [],
i = 0,
o = 0;if (this.localStreams.length && (i = this.localStreams[0].getAudioTracks().length, o = this.localStreams[0].getVideoTracks().length), t) {
if (t.mandatory || t.optional) throw new TypeError("Legacy mandatory/optional constraints not supported.");void 0 !== t.offerToReceiveAudio && (i = t.offerToReceiveAudio), void 0 !== t.offerToReceiveVideo && (o = t.offerToReceiveVideo);
}for (this.localStreams.length && this.localStreams[0].getTracks().forEach(function (e) {
n.push({ kind: e.kind, track: e, wantReceive: "audio" === e.kind ? i > 0 : o > 0 }), "audio" === e.kind ? i-- : "video" === e.kind && o--;
}); i > 0 || o > 0;) {
i > 0 && (n.push({ kind: "audio", wantReceive: !0 }), i--), o > 0 && (n.push({ kind: "video", wantReceive: !0 }), o--);
}var a = r.writeSessionBoilerplate(),
s = [];n.forEach(function (t, n) {
var i,
o,
a = t.track,
c = t.kind,
u = r.generateIdentifier(),
l = e.usingBundle && n > 0 ? { iceGatherer: s[0].iceGatherer, iceTransport: s[0].iceTransport, dtlsTransport: s[0].dtlsTransport } : e._createIceAndDtlsTransports(u, n),
d = RTCRtpSender.getCapabilities(c),
p = [{ ssrc: 1001 * (2 * n + 1) }];a && (i = new RTCRtpSender(a, l.dtlsTransport)), t.wantReceive && (o = new RTCRtpReceiver(l.dtlsTransport, c)), s[n] = { iceGatherer: l.iceGatherer, iceTransport: l.iceTransport, dtlsTransport: l.dtlsTransport, localCapabilities: d, remoteCapabilities: null, rtpSender: i, rtpReceiver: o, kind: c, mid: u, sendEncodingParameters: p, recvEncodingParameters: null };
}), this.usingBundle && (a += "a=group:BUNDLE " + s.map(function (e) {
return e.mid;
}).join(" ") + "\r\n"), n.forEach(function (t, n) {
var i = s[n];a += r.writeMediaSection(i, i.localCapabilities, "offer", e.localStreams[0]);
}), this._pendingOffer = s;var c = new RTCSessionDescription({ type: "offer", sdp: a });return arguments.length && "function" == typeof arguments[0] && window.setTimeout(arguments[0], 0, c), Promise.resolve(c);
}, window.RTCPeerConnection.prototype.createAnswer = function () {
var e = this,
t = r.writeSessionBoilerplate();this.usingBundle && (t += "a=group:BUNDLE " + this.transceivers.map(function (e) {
return e.mid;
}).join(" ") + "\r\n"), this.transceivers.forEach(function (n) {
if (n.isDatachannel) return void (t += "m=application 0 DTLS/SCTP 5000\r\nc=IN IP4 0.0.0.0\r\na=mid:" + n.mid + "\r\n");var i = e._getCommonCapabilities(n.localCapabilities, n.remoteCapabilities);t += r.writeMediaSection(n, i, "answer", e.localStreams[0]);
});var n = new RTCSessionDescription({ type: "answer", sdp: t });return arguments.length && "function" == typeof arguments[0] && window.setTimeout(arguments[0], 0, n), Promise.resolve(n);
}, window.RTCPeerConnection.prototype.addIceCandidate = function (e) {
if (null === e) this.transceivers.forEach(function (e) {
e.iceTransport.addRemoteCandidate({});
});else {
var t = e.sdpMLineIndex;if (e.sdpMid) for (var n = 0; n < this.transceivers.length; n++) {
if (this.transceivers[n].mid === e.sdpMid) {
t = n;break;
}
}var i = this.transceivers[t];if (i) {
var o = Object.keys(e.candidate).length > 0 ? r.parseCandidate(e.candidate) : {};if ("tcp" === o.protocol && (0 === o.port || 9 === o.port)) return;if ("1" !== o.component) return;"endOfCandidates" === o.type && (o = {}), i.iceTransport.addRemoteCandidate(o);var a = r.splitSections(this.remoteDescription.sdp);a[t + 1] += (o.type ? e.candidate.trim() : "a=end-of-candidates") + "\r\n", this.remoteDescription.sdp = a.join("");
}
}return arguments.length > 1 && "function" == typeof arguments[1] && window.setTimeout(arguments[1], 0), Promise.resolve();
}, window.RTCPeerConnection.prototype.getStats = function () {
var e = [];this.transceivers.forEach(function (t) {
["rtpSender", "rtpReceiver", "iceGatherer", "iceTransport", "dtlsTransport"].forEach(function (n) {
t[n] && e.push(t[n].getStats());
});
});var t = arguments.length > 1 && "function" == typeof arguments[1] && arguments[1];return new Promise(function (n) {
var r = new Map();Promise.all(e).then(function (e) {
e.forEach(function (e) {
Object.keys(e).forEach(function (t) {
r.set(t, e[t]), r[t] = e[t];
});
}), t && window.setTimeout(t, 0, r), n(r);
});
});
};
} };t.exports = { shimPeerConnection: o.shimPeerConnection, shimGetUserMedia: e("./getusermedia") };
}, { "../utils": 10, "./getusermedia": 6, sdp: 1 }], 6: [function (e, t, n) {
"use strict";
t.exports = function () {
var e = function e(_e3) {
return { name: { PermissionDeniedError: "NotAllowedError" }[_e3.name] || _e3.name, message: _e3.message, constraint: _e3.constraint, toString: function toString() {
return this.name;
} };
},
t = navigator.mediaDevices.getUserMedia.bind(navigator.mediaDevices);navigator.mediaDevices.getUserMedia = function (n) {
return t(n).catch(function (t) {
return Promise.reject(e(t));
});
};
};
}, {}], 7: [function (e, t, n) {
"use strict";
var r = e("../utils").browserDetails,
i = { shimOnTrack: function shimOnTrack() {
"object" != typeof window || !window.RTCPeerConnection || "ontrack" in window.RTCPeerConnection.prototype || Object.defineProperty(window.RTCPeerConnection.prototype, "ontrack", { get: function get() {
return this._ontrack;
}, set: function set(e) {
this._ontrack && (this.removeEventListener("track", this._ontrack), this.removeEventListener("addstream", this._ontrackpoly)), this.addEventListener("track", this._ontrack = e), this.addEventListener("addstream", this._ontrackpoly = function (e) {
e.stream.getTracks().forEach(function (t) {
var n = new Event("track");n.track = t, n.receiver = { track: t }, n.streams = [e.stream], this.dispatchEvent(n);
}.bind(this));
}.bind(this));
} });
}, shimSourceObject: function shimSourceObject() {
"object" == typeof window && (!window.HTMLMediaElement || "srcObject" in window.HTMLMediaElement.prototype || Object.defineProperty(window.HTMLMediaElement.prototype, "srcObject", { get: function get() {
return this.mozSrcObject;
}, set: function set(e) {
this.mozSrcObject = e;
} }));
}, shimPeerConnection: function shimPeerConnection() {
if ("object" == typeof window && (window.RTCPeerConnection || window.mozRTCPeerConnection)) {
window.RTCPeerConnection || (window.RTCPeerConnection = function (e, t) {
if (r.version < 38 && e && e.iceServers) {
for (var n = [], i = 0; i < e.iceServers.length; i++) {
var o = e.iceServers[i];if (o.hasOwnProperty("urls")) for (var a = 0; a < o.urls.length; a++) {
var s = { url: o.urls[a] };0 === o.urls[a].indexOf("turn") && (s.username = o.username, s.credential = o.credential), n.push(s);
} else n.push(e.iceServers[i]);
}e.iceServers = n;
}return new mozRTCPeerConnection(e, t);
}, window.RTCPeerConnection.prototype = mozRTCPeerConnection.prototype, mozRTCPeerConnection.generateCertificate && Object.defineProperty(window.RTCPeerConnection, "generateCertificate", { get: function get() {
return mozRTCPeerConnection.generateCertificate;
} }), window.RTCSessionDescription = mozRTCSessionDescription, window.RTCIceCandidate = mozRTCIceCandidate), ["setLocalDescription", "setRemoteDescription", "addIceCandidate"].forEach(function (e) {
var t = RTCPeerConnection.prototype[e];RTCPeerConnection.prototype[e] = function () {
return arguments[0] = new ("addIceCandidate" === e ? RTCIceCandidate : RTCSessionDescription)(arguments[0]), t.apply(this, arguments);
};
});var e = RTCPeerConnection.prototype.addIceCandidate;RTCPeerConnection.prototype.addIceCandidate = function () {
return null === arguments[0] ? Promise.resolve() : e.apply(this, arguments);
};var t = function t(e) {
var t = new Map();return Object.keys(e).forEach(function (n) {
t.set(n, e[n]), t[n] = e[n];
}), t;
},
n = RTCPeerConnection.prototype.getStats;RTCPeerConnection.prototype.getStats = function (e, r, i) {
return n.apply(this, [e || null]).then(function (e) {
return t(e);
}).then(r, i);
};
}
} };t.exports = { shimOnTrack: i.shimOnTrack, shimSourceObject: i.shimSourceObject, shimPeerConnection: i.shimPeerConnection, shimGetUserMedia: e("./getusermedia") };
}, { "../utils": 10, "./getusermedia": 8 }], 8: [function (e, t, n) {
"use strict";
var r = e("../utils").log,
i = e("../utils").browserDetails;t.exports = function () {
var e = function e(_e4) {
return { name: { SecurityError: "NotAllowedError", PermissionDeniedError: "NotAllowedError" }[_e4.name] || _e4.name, message: { "The operation is insecure.": "The request is not allowed by the user agent or the platform in the current context." }[_e4.message] || _e4.message, constraint: _e4.constraint, toString: function toString() {
return this.name + (this.message && ": ") + this.message;
} };
},
t = function t(_t2, n, o) {
var a = function a(e) {
if ("object" != typeof e || e.require) return e;var t = [];return Object.keys(e).forEach(function (n) {
if ("require" !== n && "advanced" !== n && "mediaSource" !== n) {
var r = e[n] = "object" == typeof e[n] ? e[n] : { ideal: e[n] };if (void 0 === r.min && void 0 === r.max && void 0 === r.exact || t.push(n), void 0 !== r.exact && ("number" == typeof r.exact ? r.min = r.max = r.exact : e[n] = r.exact, delete r.exact), void 0 !== r.ideal) {
e.advanced = e.advanced || [];var i = {};"number" == typeof r.ideal ? i[n] = { min: r.ideal, max: r.ideal } : i[n] = r.ideal, e.advanced.push(i), delete r.ideal, Object.keys(r).length || delete e[n];
}
}
}), t.length && (e.require = t), e;
};return _t2 = JSON.parse(JSON.stringify(_t2)), i.version < 38 && (r("spec: " + JSON.stringify(_t2)), _t2.audio && (_t2.audio = a(_t2.audio)), _t2.video && (_t2.video = a(_t2.video)), r("ff37: " + JSON.stringify(_t2))), navigator.mozGetUserMedia(_t2, n, function (t) {
o(e(t));
});
},
n = function n(e) {
return new Promise(function (n, r) {
t(e, n, r);
});
};if (navigator.mediaDevices || (navigator.mediaDevices = { getUserMedia: n, addEventListener: function addEventListener() {}, removeEventListener: function removeEventListener() {} }), navigator.mediaDevices.enumerateDevices = navigator.mediaDevices.enumerateDevices || function () {
return new Promise(function (e) {
e([{ kind: "audioinput", deviceId: "default", label: "", groupId: "" }, { kind: "videoinput", deviceId: "default", label: "", groupId: "" }]);
});
}, i.version < 41) {
var a = navigator.mediaDevices.enumerateDevices.bind(navigator.mediaDevices);navigator.mediaDevices.enumerateDevices = function () {
return a().then(void 0, function (e) {
if ("NotFoundError" === e.name) return [];throw e;
});
};
}if (i.version < 49) {
var s = navigator.mediaDevices.getUserMedia.bind(navigator.mediaDevices);navigator.mediaDevices.getUserMedia = function (t) {
return s(t).catch(function (t) {
return Promise.reject(e(t));
});
};
}navigator.getUserMedia = function (e, n, r) {
if (i.version < 44) return t(e, n, r);o.warn("navigator.getUserMedia has been replaced by navigator.mediaDevices.getUserMedia"), navigator.mediaDevices.getUserMedia(e).then(n, r);
};
};
}, { "../utils": 10 }], 9: [function (e, t, n) {
"use strict";
var r = { shimGetUserMedia: function shimGetUserMedia() {
navigator.getUserMedia = navigator.webkitGetUserMedia;
} };t.exports = { shimGetUserMedia: r.shimGetUserMedia };
}, {}], 10: [function (e, t, n) {
"use strict";
var r = !0,
i = { disableLog: function disableLog(e) {
return "boolean" != typeof e ? new Error("Argument type: " + typeof e + ". Please use a boolean.") : (r = e, e ? "adapter.js logging disabled" : "adapter.js logging enabled");
}, log: function log() {
if ("object" == typeof window) {
if (r) return;void 0 !== o && "function" == typeof o.log && o.log.apply(o, arguments);
}
}, extractVersion: function extractVersion(e, t, n) {
var r = e.match(t);return r && r.length >= n && parseInt(r[n], 10);
}, detectBrowser: function detectBrowser() {
var e = {};if (e.browser = null, e.version = null, "undefined" == typeof window || !window.navigator) return e.browser = "Not a browser.", e;if (navigator.mozGetUserMedia) e.browser = "firefox", e.version = this.extractVersion(navigator.userAgent, /Firefox\/([0-9]+)\./, 1);else if (navigator.webkitGetUserMedia) {
if (window.webkitRTCPeerConnection) e.browser = "chrome", e.version = this.extractVersion(navigator.userAgent, /Chrom(e|ium)\/([0-9]+)\./, 2);else {
if (!navigator.userAgent.match(/Version\/(\d+).(\d+)/)) return e.browser = "Unsupported webkit-based browser with GUM support but no WebRTC support.", e;e.browser = "safari", e.version = this.extractVersion(navigator.userAgent, /AppleWebKit\/([0-9]+)\./, 1);
}
} else {
if (!navigator.mediaDevices || !navigator.userAgent.match(/Edge\/(\d+).(\d+)$/)) return e.browser = "Not a supported browser.", e;e.browser = "edge", e.version = this.extractVersion(navigator.userAgent, /Edge\/(\d+).(\d+)$/, 2);
}return e;
} };t.exports = { log: i.log, disableLog: i.disableLog, browserDetails: i.detectBrowser(), extractVersion: i.extractVersion };
}, {}] }, {}, [2])(2);
}();
}(), a.parseWebrtcDetectedBrowser(), navigator.mozGetUserMedia ? (MediaStreamTrack.getSources = function (e) {
setTimeout(function () {
e([{ kind: "audio", id: "default", label: "", facing: "" }, { kind: "video", id: "default", label: "", facing: "" }]);
}, 0);
}, attachMediaStream = function attachMediaStream(e, t) {
return e.srcObject = t, e;
}, reattachMediaStream = function reattachMediaStream(e, t) {
return e.srcObject = t.srcObject, e;
}, createIceServer = function createIceServer(e, t, n) {
o.warn("createIceServer is deprecated. It should be replaced with an application level implementation.");var r = null,
i = e.split(":");if (0 === i[0].indexOf("stun")) r = { urls: [e] };else if (0 === i[0].indexOf("turn")) if (webrtcDetectedVersion < 27) {
var a = e.split("?");1 !== a.length && 0 !== a[1].indexOf("transport=udp") || (r = { urls: [a[0]], credential: n, username: t });
} else r = { urls: [e], credential: n, username: t };return r;
}, createIceServers = function createIceServers(e, t, n) {
o.warn("createIceServers is deprecated. It should be replaced with an application level implementation.");var r = [];for (i = 0; i < e.length; i++) {
var a = createIceServer(e[i], t, n);null !== a && r.push(a);
}return r;
}) : navigator.webkitGetUserMedia ? (attachMediaStream = function attachMediaStream(e, t) {
return webrtcDetectedVersion >= 43 ? e.srcObject = t : void 0 !== e.src ? e.src = URL.createObjectURL(t) : o.error("Error attaching stream to element."), e;
}, reattachMediaStream = function reattachMediaStream(e, t) {
return webrtcDetectedVersion >= 43 ? e.srcObject = t.srcObject : e.src = t.src, e;
}, createIceServer = function createIceServer(e, t, n) {
o.warn("createIceServer is deprecated. It should be replaced with an application level implementation.");var r = null,
i = e.split(":");return 0 === i[0].indexOf("stun") ? r = { url: e } : 0 === i[0].indexOf("turn") && (r = { url: e, credential: n, username: t }), r;
}, createIceServers = function createIceServers(e, t, n) {
o.warn("createIceServers is deprecated. It should be replaced with an application level implementation.");var r = [];if (webrtcDetectedVersion >= 34) r = { urls: e, credential: n, username: t };else for (i = 0; i < e.length; i++) {
var a = createIceServer(e[i], t, n);null !== a && r.push(a);
}return r;
}) : navigator.mediaDevices && navigator.userAgent.match(/Edge\/(\d+).(\d+)$/) && (attachMediaStream = function attachMediaStream(e, t) {
return e.srcObject = t, e;
}, reattachMediaStream = function reattachMediaStream(e, t) {
return e.srcObject = t.srcObject, e;
}), attachMediaStream_base = attachMediaStream, "opera" === webrtcDetectedBrowser && (attachMediaStream_base = function attachMediaStream_base(e, t) {
webrtcDetectedVersion > 38 ? e.srcObject = t : void 0 !== e.src && (e.src = URL.createObjectURL(t));
}), attachMediaStream = function attachMediaStream(e, t) {
return "chrome" !== webrtcDetectedBrowser && "opera" !== webrtcDetectedBrowser || t ? attachMediaStream_base(e, t) : e.src = "", e;
}, reattachMediaStream_base = reattachMediaStream, reattachMediaStream = function reattachMediaStream(e, t) {
return reattachMediaStream_base(e, t), e;
}, window.attachMediaStream = attachMediaStream, window.reattachMediaStream = reattachMediaStream, window.getUserMedia = function (e, t, n) {
navigator.getUserMedia(e, t, n);
}, a.attachMediaStream = attachMediaStream, a.reattachMediaStream = reattachMediaStream, a.getUserMedia = getUserMedia, "undefined" == typeof Promise && (requestUserMedia = null), a.maybeThroughWebRTCReady()), function () {
"use strict";
var e = null;a.TEXT.EXTENSION = { REQUIRE_INSTALLATION_FF: "To enable screensharing you need to install the Skylink WebRTC tools Firefox Add-on.", REQUIRE_INSTALLATION_CHROME: "To enable screensharing you need to install the Skylink WebRTC tools Chrome Extension.", REQUIRE_REFRESH: "Please refresh this page after the Skylink WebRTC tools extension has been installed.", BUTTON_FF: "Install Now", BUTTON_CHROME: "Go to Chrome Web Store" };var t = function t(e) {
if (null === e || "object" != typeof e) return e;var t = e.constructor();for (var n in e) {
e.hasOwnProperty(n) && (t[n] = e[n]);
}return t;
};if (window.navigator.mozGetUserMedia ? (e = window.navigator.getUserMedia, navigator.getUserMedia = function (n, r, i) {
if (n && n.video && n.video.mediaSource) {
if ("screen" !== n.video.mediaSource && "window" !== n.video.mediaSource) return void i(new Error('GetUserMedia: Only "screen" and "window" are supported as mediaSource constraints'));var o = t(n);o.video.mozMediaSource = o.video.mediaSource;var s = setInterval(function () {
"complete" === document.readyState && (clearInterval(s), e(o, r, function (e) {
["PermissionDeniedError", "SecurityError"].indexOf(e.name) > -1 && "https:" === window.parent.location.protocol ? a.renderNotificationBar(a.TEXT.EXTENSION.REQUIRE_INSTALLATION_FF, a.TEXT.EXTENSION.BUTTON_FF, "https://addons.mozilla.org/en-US/firefox/addon/skylink-webrtc-tools/", !0, !0) : i(e);
}));
}, 1);
} else e(n, r, i);
}, a.getUserMedia = window.getUserMedia = navigator.getUserMedia) : window.navigator.webkitGetUserMedia && "safari" !== window.webrtcDetectedBrowser ? (e = window.navigator.getUserMedia, navigator.getUserMedia = function (n, i, o) {
if (n && n.video && n.video.mediaSource) {
if ("chrome" !== window.webrtcDetectedBrowser) return void o(new Error("Current browser does not support screensharing"));var s = t(n),
c = function c(t, n) {
t ? o("permission-denied" === t ? new Error("Permission denied for screen retrieval") : new Error("Failed retrieving selected screen")) : (s.video.mandatory = s.video.mandatory || {}, s.video.mandatory.chromeMediaSource = "desktop", s.video.mandatory.maxWidth = window.screen.width > 1920 ? window.screen.width : 1920, s.video.mandatory.maxHeight = window.screen.height > 1080 ? window.screen.height : 1080, n && (s.video.mandatory.chromeMediaSourceId = n), delete s.video.mediaSource, e(s, i, o));
},
u = function u(e) {
e.data && (e.data.chromeMediaSourceId && ("PermissionDeniedError" === e.data.chromeMediaSourceId ? c("permission-denied") : c(null, e.data.chromeMediaSourceId)), e.data.chromeExtensionStatus && ("not-installed" === e.data.chromeExtensionStatus ? a.renderNotificationBar(a.TEXT.EXTENSION.REQUIRE_INSTALLATION_CHROME, a.TEXT.EXTENSION.BUTTON_CHROME, e.data.data, !0, !0) : c(e.data.chromeExtensionStatus, null)), window.removeEventListener("message", u));
};window.addEventListener("message", u), r({ captureSourceId: !0 });
} else e(n, i, o);
}, a.getUserMedia = window.getUserMedia = navigator.getUserMedia, navigator.mediaDevices.getUserMedia = function (e) {
return new Promise(function (t, n) {
window.getUserMedia(e, t, n);
});
}) : navigator.mediaDevices && navigator.userAgent.match(/Edge\/(\d+).(\d+)$/) ? o.warn("Edge does not support screensharing feature in getUserMedia") : (e = window.navigator.getUserMedia, navigator.getUserMedia = function (n, r, i) {
if (n && n.video && n.video.mediaSource) {
var o = t(n);a.WebRTCPlugin.callWhenPluginReady(function () {
if (!a.WebRTCPlugin.plugin.HasScreensharingFeature || !a.WebRTCPlugin.plugin.isScreensharingAvailable) return void i(new Error("Your version of the WebRTC plugin does not support screensharing"));o.video.optional = o.video.optional || [], o.video.optional.push({ sourceId: a.WebRTCPlugin.plugin.screensharingKey || "Screensharing" }), delete o.video.mediaSource, e(o, r, i);
});
} else e(n, r, i);
}, a.getUserMedia = getUserMedia = window.getUserMedia = navigator.getUserMedia, navigator.mediaDevices && "undefined" != typeof Promise && (navigator.mediaDevices.getUserMedia = requestUserMedia)), "chrome" === window.webrtcDetectedBrowser) {
var n = document.createElement("iframe");n.onload = function () {
n.isLoaded = !0;
}, n.src = "https://cdn.temasys.com.sg/skylink/extensions/detectRTC.html", n.style.display = "none", (document.body || document.documentElement).appendChild(n);var r = function r(e) {
if (e = e || {}, !n.isLoaded) return void setTimeout(function () {
n.contentWindow.postMessage(e, "*");
}, 100);n.contentWindow.postMessage(e, "*");
};
} else "opera" === window.webrtcDetectedBrowser && o.warn("Opera does not support screensharing feature in getUserMedia");
}();
}).call(t, "modules/RTC/adapter.screenshare.js");
}, function (e, t, n) {
function r(e) {
this.path = e.path, this.hostname = e.hostname, this.port = e.port, this.secure = e.secure, this.query = e.query, this.timestampParam = e.timestampParam, this.timestampRequests = e.timestampRequests, this.readyState = "", this.agent = e.agent || !1, this.socket = e.socket, this.enablesXDR = e.enablesXDR, this.pfx = e.pfx, this.key = e.key, this.passphrase = e.passphrase, this.cert = e.cert, this.ca = e.ca, this.ciphers = e.ciphers, this.rejectUnauthorized = e.rejectUnauthorized, this.extraHeaders = e.extraHeaders;
}var i = n(18),
o = n(36);e.exports = r, o(r.prototype), r.prototype.onError = function (e, t) {
var n = new Error(e);return n.type = "TransportError", n.description = t, this.emit("error", n), this;
}, r.prototype.open = function () {
return "closed" != this.readyState && "" != this.readyState || (this.readyState = "opening", this.doOpen()), this;
}, r.prototype.close = function () {
return "opening" != this.readyState && "open" != this.readyState || (this.doClose(), this.onClose()), this;
}, r.prototype.send = function (e) {
if ("open" != this.readyState) throw new Error("Transport not open");this.write(e);
}, r.prototype.onOpen = function () {
this.readyState = "open", this.writable = !0, this.emit("open");
}, r.prototype.onData = function (e) {
var t = i.decodePacket(e, this.socket.binaryType);this.onPacket(t);
}, r.prototype.onPacket = function (e) {
this.emit("packet", e);
}, r.prototype.onClose = function () {
this.readyState = "closed", this.emit("close");
};
}, function (e, t, n) {
var r = n(77);e.exports = function (e) {
var t = e.xdomain,
n = e.xscheme,
i = e.enablesXDR;try {
if ("undefined" != typeof XMLHttpRequest && (!t || r)) return new XMLHttpRequest();
} catch (e) {}try {
if ("undefined" != typeof XDomainRequest && !n && i) return new XDomainRequest();
} catch (e) {}if (!t) try {
return new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {}
};
}, function (e, t) {
function n(e) {
if (e) return r(e);
}function r(e) {
for (var t in n.prototype) {
e[t] = n.prototype[t];
}return e;
}e.exports = n, n.prototype.on = n.prototype.addEventListener = function (e, t) {
return this._callbacks = this._callbacks || {}, (this._callbacks[e] = this._callbacks[e] || []).push(t), this;
}, n.prototype.once = function (e, t) {
function n() {
r.off(e, n), t.apply(this, arguments);
}var r = this;return this._callbacks = this._callbacks || {}, n.fn = t, this.on(e, n), this;
}, n.prototype.off = n.prototype.removeListener = n.prototype.removeAllListeners = n.prototype.removeEventListener = function (e, t) {
if (this._callbacks = this._callbacks || {}, 0 == arguments.length) return this._callbacks = {}, this;var n = this._callbacks[e];if (!n) return this;if (1 == arguments.length) return delete this._callbacks[e], this;for (var r, i = 0; i < n.length; i++) {
if ((r = n[i]) === t || r.fn === t) {
n.splice(i, 1);break;
}
}return this;
}, n.prototype.emit = function (e) {
this._callbacks = this._callbacks || {};var t = [].slice.call(arguments, 1),
n = this._callbacks[e];if (n) {
n = n.slice(0);for (var r = 0, i = n.length; r < i; ++r) {
n[r].apply(this, t);
}
}return this;
}, n.prototype.listeners = function (e) {
return this._callbacks = this._callbacks || {}, this._callbacks[e] || [];
}, n.prototype.hasListeners = function (e) {
return !!this.listeners(e).length;
};
}, function (e, t) {
e.exports = Array.isArray || function (e) {
return "[object Array]" == Object.prototype.toString.call(e);
};
}, function (e, t) {
t.encode = function (e) {
var t = "";for (var n in e) {
e.hasOwnProperty(n) && (t.length && (t += "&"), t += encodeURIComponent(n) + "=" + encodeURIComponent(e[n]));
}return t;
}, t.decode = function (e) {
for (var t = {}, n = e.split("&"), r = 0, i = n.length; r < i; r++) {
var o = n[r].split("=");t[decodeURIComponent(o[0])] = decodeURIComponent(o[1]);
}return t;
};
}, function (e, t, n) {
function r() {}function i(e) {
var n = "",
r = !1;return n += e.type, t.BINARY_EVENT != e.type && t.BINARY_ACK != e.type || (n += e.attachments, n += "-"), e.nsp && "/" != e.nsp && (r = !0, n += e.nsp), null != e.id && (r && (n += ",", r = !1), n += e.id), null != e.data && (r && (n += ","), n += d.stringify(e.data)), l("encoded %j as %s", e, n), n;
}function o(e, t) {
function n(e) {
var n = f.deconstructPacket(e),
r = i(n.packet),
o = n.buffers;o.unshift(r), t(o);
}f.removeBlobs(e, n);
}function a() {
this.reconstructor = null;
}function s(e) {
var n = {},
r = 0;if (n.type = Number(e.charAt(0)), null == t.types[n.type]) return u();if (t.BINARY_EVENT == n.type || t.BINARY_ACK == n.type) {
for (var i = ""; "-" != e.charAt(++r) && (i += e.charAt(r), r != e.length);) {}if (i != Number(i) || "-" != e.charAt(r)) throw new Error("Illegal attachments");n.attachments = Number(i);
}if ("/" == e.charAt(r + 1)) for (n.nsp = ""; ++r;) {
var o = e.charAt(r);if ("," == o) break;if (n.nsp += o, r == e.length) break;
} else n.nsp = "/";var a = e.charAt(r + 1);if ("" !== a && Number(a) == a) {
for (n.id = ""; ++r;) {
var o = e.charAt(r);if (null == o || Number(o) != o) {
--r;break;
}if (n.id += e.charAt(r), r == e.length) break;
}n.id = Number(n.id);
}if (e.charAt(++r)) try {
n.data = d.parse(e.substr(r));
} catch (e) {
return u();
}return l("decoded %s as %j", e, n), n;
}function c(e) {
this.reconPack = e, this.buffers = [];
}function u(e) {
return { type: t.ERROR, data: "parser error" };
}var l = n(9)("socket.io-parser"),
d = n(79),
p = (n(37), n(170)),
f = n(169),
h = n(67);t.protocol = 4, t.types = ["CONNECT", "DISCONNECT", "EVENT", "ACK", "ERROR", "BINARY_EVENT", "BINARY_ACK"], t.CONNECT = 0, t.DISCONNECT = 1, t.EVENT = 2, t.ACK = 3, t.ERROR = 4, t.BINARY_EVENT = 5, t.BINARY_ACK = 6, t.Encoder = r, t.Decoder = a, r.prototype.encode = function (e, n) {
l("encoding packet %j", e), t.BINARY_EVENT == e.type || t.BINARY_ACK == e.type ? o(e, n) : n([i(e)]);
}, p(a.prototype), a.prototype.add = function (e) {
var n;if ("string" == typeof e) n = s(e), t.BINARY_EVENT == n.type || t.BINARY_ACK == n.type ? (this.reconstructor = new c(n), 0 === this.reconstructor.reconPack.attachments && this.emit("decoded", n)) : this.emit("decoded", n);else {
if (!h(e) && !e.base64) throw new Error("Unknown type: " + e);if (!this.reconstructor) throw new Error("got binary data when not reconstructing a packet");(n = this.reconstructor.takeBinaryData(e)) && (this.reconstructor = null, this.emit("decoded", n));
}
}, a.prototype.destroy = function () {
this.reconstructor && this.reconstructor.finishedReconstruction();
}, c.prototype.takeBinaryData = function (e) {
if (this.buffers.push(e), this.buffers.length == this.reconPack.attachments) {
var t = f.reconstructPacket(this.reconPack, this.buffers);return this.finishedReconstruction(), t;
}return null;
}, c.prototype.finishedReconstruction = function () {
this.reconPack = null, this.buffers = [];
};
}, function (e, t) {
var n = [].slice;e.exports = function (e, t) {
if ("string" == typeof t && (t = e[t]), "function" != typeof t) throw new Error("bind() requires a function");var r = n.call(arguments, 2);return function () {
return t.apply(e, r.concat(n.call(arguments)));
};
};
}, function (e, t) {
var n = [].indexOf;e.exports = function (e, t) {
if (n) return e.indexOf(t);for (var r = 0; r < e.length; ++r) {
if (e[r] === t) return r;
}return -1;
};
}, function (e, t) {
function n() {
var e = { methodName: "", fileLocation: "", line: null, column: null },
t = new Error(),
n = t.stack ? t.stack.split("\n") : [];if (!n || n.length < 1) return e;var r = null;return n[3] && (r = n[3].match(/\s*at\s*(.+?)\s*\((\S*)\s*:(\d*)\s*:(\d*)\)/)), !r || r.length <= 4 ? (0 === n[2].indexOf("log@") ? e.methodName = n[3].substr(0, n[3].indexOf("@")) : e.methodName = n[2].substr(0, n[2].indexOf("@")), e) : (e.methodName = r[1], e.fileLocation = r[2], e.line = r[3], e.column = r[4], e);
}function r() {
var e = arguments[0],
t = arguments[1],
r = Array.prototype.slice.call(arguments, 2);if (!(o[t] < e.level)) for (var i = n(), s = a.concat(e.transports), c = 0; c < s.length; c++) {
var u = s[c],
l = u[t];l && "function" == typeof l && l.bind(u, e.id ? "[" + e.id + "]" : "", "<" + i.methodName + ">: ").apply(u, r);
}
}function i(e, t, n, i) {
this.id = t, this.format = i, this.transports = n, this.transports || (this.transports = []), this.level = o[e];for (var a = Object.keys(o), s = 0; s < a.length; s++) {
this[a[s]] = r.bind(null, this, a[s]);
}
}var o = { trace: 0, debug: 1, info: 2, log: 3, warn: 4, error: 5 };i.consoleTransport = console;var a = [i.consoleTransport];i.addGlobalTransport = function (e) {
-1 === a.indexOf(e) && a.push(e);
}, i.removeGlobalTransport = function (e) {
var t = a.indexOf(e);-1 !== t && a.splice(t, 1);
}, i.prototype.setLevel = function (e) {
this.level = o[e];
}, e.exports = i, i.levels = { TRACE: "trace", DEBUG: "debug", INFO: "info", LOG: "log", WARN: "warn", ERROR: "error" };
}, function (e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", { value: !0 }), n.d(t, "CONNECTION_DROPPED_ERROR", function () {
return r;
}), n.d(t, "CONNECTION_ERROR", function () {
return i;
}), n.d(t, "OTHER_ERROR", function () {
return o;
}), n.d(t, "PASSWORD_REQUIRED", function () {
return a;
}), n.d(t, "SERVER_ERROR", function () {
return s;
});var r = "connection.droppedError",
i = "connection.connectionError",
o = "connection.otherError",
a = "connection.passwordRequired",
s = "connection.serverError";
}, function (e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", { value: !0 }), n.d(t, "DEVICE_LIST_CHANGED", function () {
return r;
}), n.d(t, "PERMISSION_PROMPT_IS_SHOWN", function () {
return i;
});var r = "mediaDevices.devicechange",
i = "mediaDevices.permissionPromptIsShown";
}, function (e, t) {
var n = { RECORDER_UNAVAILABLE: "recorder.unavailable", RECORDER_BUSY: "recorder.busy", NO_TOKEN: "recorder.noToken", STATE_CHANGE_FAILED: "recorder.stateChangeFailed", INVALID_STATE: "recorder.invalidState" };e.exports = n;
}, function (e, t, n) {
"use strict";
(function (e) {
function r(e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
}function i(e, t) {
if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return !t || "object" != typeof t && "function" != typeof t ? e : t;
}function o(e, t) {
if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);
}function a(e) {
var t = e.getOriginalStream();if (t) {
var n = t.stop;t.stop = function () {
n.apply(t), e.isActive() && t.onended();
};
}
}function s(e, t) {
void 0 === e.active ? e.onended = t : e.oninactive = t;
}var c = n(14),
u = n.n(c),
l = n(0),
d = (n.n(l), n(16)),
p = n(4),
f = n(2),
h = n(23),
m = function () {
function e(e, t) {
for (var n = 0; n < t.length; n++) {
var r = t[n];r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
}
}return function (t, n, r) {
return n && e(t.prototype, n), r && e(t, r), t;
};
}(),
v = n.i(l.getLogger)(e),
g = { track_mute: "onmute", track_unmute: "onunmute", track_ended: "onended" },
y = function (e) {
function t(e, n, o, a, s, c) {
r(this, t);var u = i(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this));return u.addEventListener = u.addListener, u.removeEventListener = u.off = u.removeListener, u.containers = [], u.conference = e, u.stream = n, u.audioLevel = -1, u.type = s, u.track = o, u.videoType = c, u.handlers = {}, u.disposed = !1, u._setHandler("inactive", a), u;
}return o(t, e), m(t, [{ key: "_setHandler", value: function value(e, t) {
this.handlers[e] = t, this.stream && ("inactive" === e ? (f.a.isFirefox() && a(this), s(this.stream, t)) : g.hasOwnProperty(e) && this.stream.getVideoTracks().forEach(function (n) {
n[g[e]] = t;
}, this));
} }, { key: "_setStream", value: function value(e) {
var t = this;this.stream = e, Object.keys(this.handlers).forEach(function (e) {
"function" == typeof t.handlers[e] && t._setHandler(e, t.handlers[e]);
}, this);
} }, { key: "getType", value: function value() {
return this.type;
} }, { key: "isAudioTrack", value: function value() {
return this.getType() === p.a;
} }, { key: "isWebRTCTrackMuted", value: function value() {
return this.track && this.track.muted;
} }, { key: "isVideoTrack", value: function value() {
return this.getType() === p.b;
} }, { key: "isLocal", value: function value() {
throw new Error("Not implemented by subclass");
} }, { key: "getOriginalStream", value: function value() {
return this.stream;
} }, { key: "getStreamId", value: function value() {
return this.stream ? this.stream.id : null;
} }, { key: "getTrack", value: function value() {
return this.track;
} }, { key: "getTrackId", value: function value() {
return this.track ? this.track.id : null;
} }, { key: "getUsageLabel", value: function value() {
return this.isAudioTrack() ? "mic" : this.videoType ? this.videoType : "default";
} }, { key: "_maybeFireTrackAttached", value: function value(e) {
this.conference && e && this.conference._onTrackAttach(this, e);
} }, { key: "attach", value: function value(e) {
var t = e;return this.stream && (t = h.a.attachMediaStream(e, this.stream)), this.containers.push(t), this._maybeFireTrackAttached(t), this._attachTTFMTracker(t), t;
} }, { key: "detach", value: function value(e) {
for (var t = this.containers, n = t.length - 1; n >= 0; --n) {
var r = t[n];e || h.a.attachMediaStream(r, null), e && r !== e || t.splice(n, 1);
}e && h.a.attachMediaStream(e, null);
} }, { key: "_attachTTFMTracker", value: function value(e) {} }, { key: "dispose", value: function value() {
return this.removeAllListeners(), this.disposed = !0, Promise.resolve();
} }, { key: "isScreenSharing", value: function value() {} }, { key: "getId", value: function value() {
return this.stream ? h.a.getStreamID(this.stream) : null;
} }, { key: "isActive", value: function value() {
return void 0 === this.stream.active || this.stream.active;
} }, { key: "setAudioLevel", value: function value(e, t) {
this.audioLevel !== e && (this.audioLevel = e, this.emit(d.TRACK_AUDIO_LEVEL_CHANGED, e, t));
} }, { key: "getMSID", value: function value() {
var e = this.getStreamId(),
t = this.getTrackId();return e && t ? e + " " + t : null;
} }, { key: "setAudioOutput", value: function value(e) {
var t = this;return h.a.isDeviceChangeAvailable("output") ? this.isVideoTrack() ? Promise.resolve() : Promise.all(this.containers.map(function (t) {
return t.setSinkId(e).catch(function (e) {
throw v.warn("Failed to change audio output device on element. Default or previously set audio output device will be used.", t, e), e;
});
})).then(function () {
t.emit(d.TRACK_AUDIO_OUTPUT_CHANGED, e);
}) : Promise.reject(new Error("Audio output device change is not supported"));
} }]), t;
}(u.a);t.a = y;
}).call(t, "modules/RTC/JitsiTrack.js");
}, function (e, t, n) {
"use strict";
function r(e) {
for (var t = 0, n = e.length, r = 0; r < n; r++) {
t < e[r] && (t = e[r]);
}return parseFloat(((t - 127) / 128).toFixed(3));
}function i(e, t) {
var n = 0,
r = t - e;return n = r > .2 ? t - .2 : r < -.4 ? t + .4 : e, parseFloat(n.toFixed(3));
}function o(e, t, n) {
this.stream = e, this.intervalId = null, this.intervalMilis = t, this.audioLevel = 0, this.callback = n;
}t.a = o;var a = n(2);window.AudioContext = window.AudioContext || window.webkitAudioContext;var s = null;window.AudioContext && (s = new AudioContext(), s.suspend && s.suspend()), o.prototype.start = function () {
if (o.isLocalStatsSupported()) {
s.resume();var e = s.createAnalyser();e.smoothingTimeConstant = .8, e.fftSize = 2048, s.createMediaStreamSource(this.stream).connect(e);var t = this;this.intervalId = setInterval(function () {
var n = new Uint8Array(e.frequencyBinCount);e.getByteTimeDomainData(n);var o = r(n);o !== t.audioLevel && (t.audioLevel = i(o, t.audioLevel), t.callback(t.audioLevel));
}, this.intervalMilis);
}
}, o.prototype.stop = function () {
this.intervalId && (clearInterval(this.intervalId), this.intervalId = null);
}, o.isLocalStatsSupported = function () {
return Boolean(s && !a.a.isTemasysPluginUsed());
};
}, function (e, t, n) {
function r(e) {
if (void 0 === e.recorder) throw new Error("Passed an object to startRecorder which is not a TrackRecorder object");e.recorder.start(), e.startTime = new Date();
}function i(e) {
if (void 0 === e.recorder) throw new Error("Passed an object to stopRecorder which is not a TrackRecorder object");e.recorder.stop();
}function o() {
if (MediaRecorder.isTypeSupported(u)) return u;if (MediaRecorder.isTypeSupported(l)) return l;throw new Error("unable to create a MediaRecorder with the right mimetype!");
}function a(e) {
this.recorders = [], this.fileType = o(), this.isRecording = !1, this.jitsiConference = e;
}function s() {
if ("undefined" != typeof MediaStream) return new MediaStream();if ("undefined" != typeof webkitMediaStream) return new webkitMediaStream();throw new Error("cannot create a clean mediaStream");
}var c = n(109),
u = "audio/webm",
l = "audio/ogg",
d = function d(e) {
this.track = e, this.recorder = null, this.data = null, this.name = null, this.startTime = null;
};a.determineCorrectFileType = o, a.prototype.addTrack = function (e) {
if (e.isAudioTrack()) {
var t = this.instantiateTrackRecorder(e);this.recorders.push(t), this.updateNames(), this.isRecording && r(t);
}
}, a.prototype.instantiateTrackRecorder = function (e) {
var t = new d(e),
n = t.track.getOriginalStream(),
r = s();return n.getAudioTracks().forEach(function (e) {
return r.addTrack(e);
}), t.recorder = new MediaRecorder(r, { mimeType: this.fileType }), t.data = [], t.recorder.ondataavailable = function (e) {
e.data.size > 0 && t.data.push(e.data);
}, t;
}, a.prototype.removeTrack = function (e) {
if (!e.isVideoTrack()) {
var t = this.recorders,
n = void 0;for (n = 0; n < t.length; n++) {
if (t[n].track.getParticipantId() === e.getParticipantId()) {
var r = t[n];this.isRecording ? i(r) : t.splice(n, 1);
}
}this.updateNames();
}
}, a.prototype.updateNames = function () {
var e = this.jitsiConference;this.recorders.forEach(function (t) {
if (t.track.isLocal()) t.name = "the transcriber";else {
var n = t.track.getParticipantId(),
r = e.getParticipantById(n),
i = r.getDisplayName();"undefined" !== i && (t.name = i);
}
});
}, a.prototype.start = function () {
if (this.isRecording) throw new Error("audiorecorder is already recording");this.isRecording = !0, this.recorders.forEach(function (e) {
return r(e);
}), console.log("Started the recording of the audio. There are currently " + this.recorders.length + " recorders active.");
}, a.prototype.stop = function () {
this.isRecording = !1, this.recorders.forEach(function (e) {
return i(e);
}), console.log("stopped recording");
}, a.prototype.download = function () {
var e = this;this.recorders.forEach(function (t) {
var n = new Blob(t.data, { type: e.fileType }),
r = URL.createObjectURL(n),
i = document.createElement("a");document.body.appendChild(i), i.style = "display: none", i.href = r, i.download = "test." + e.fileType.split("/")[1], i.click(), window.URL.revokeObjectURL(r);
});
}, a.prototype.getRecordingResults = function () {
var e = this;if (this.isRecording) throw new Error("cannot get blobs because the AudioRecorder is still recording!");this.updateNames();var t = [];return this.recorders.forEach(function (n) {
return t.push(new c(new Blob(n.data, { type: e.fileType }), n.name, n.startTime));
}), t;
}, a.prototype.getFileType = function () {
return this.fileType;
}, e.exports = a;
}, function (e, t, n) {
var r = n(73),
i = { loadScript: function loadScript(e, t, n, i, o, a) {
var s = document,
c = s.createElement("script"),
u = s.getElementsByTagName("script")[0];if (c.async = t, i) {
var l = r();if (l) {
var d = l.src,
p = d.substring(0, d.lastIndexOf("/") + 1);d && p && (e = p + e);
}
}o && (c.onload = o), a && (c.onerror = a), c.src = e, n ? u.parentNode.insertBefore(c, u) : u.parentNode.appendChild(c);
} };e.exports = i;
}, function (e, t, n) {
"use strict";
n.d(t, "b", function () {
return r;
}), n.d(t, "c", function () {
return i;
}), n.d(t, "a", function () {
return o;
});var r = "pending",
i = "active",
o = "ended";
}, function (e, t, n) {
"use strict";
function r(e) {
for (var t = e.split("\r\nm="), n = 1, r = t.length; n < r; n++) {
var i = "m=" + t[n];n !== r - 1 && (i += "\r\n"), t[n] = i;
}var o = t.shift() + "\r\n";this.media = t, this.raw = o + t.join(""), this.session = o;
}t.a = r;var i = n(12);r.prototype.failICE = !1, r.prototype.removeTcpCandidates = !1, r.prototype.removeUdpCandidates = !1, r.prototype.getMediaSsrcMap = function () {
for (var e = this, t = {}, n = void 0, r = 0; r < e.media.length; r++) {
!function (r) {
n = i.a.findLines(e.media[r], "a=ssrc:");var o = i.a.parseMID(i.a.findLine(e.media[r], "a=mid:")),
a = { mediaindex: r, mid: o, ssrcs: {}, ssrcGroups: [] };t[r] = a, n.forEach(function (e) {
var t = e.substring(7).split(" ")[0];a.ssrcs[t] || (a.ssrcs[t] = { ssrc: t, lines: [] }), a.ssrcs[t].lines.push(e);
}), n = i.a.findLines(e.media[r], "a=ssrc-group:"), n.forEach(function (e) {
var t = e.indexOf(" "),
n = e.substr(0, t).substr(13),
r = e.substr(14 + n.length).split(" ");r.length && a.ssrcGroups.push({ semantics: n, ssrcs: r });
});
}(r);
}return t;
}, r.prototype.containsSSRC = function (e) {
var t = this.getMediaSsrcMap(),
n = !1;return Object.keys(t).forEach(function (r) {
n || t[r].ssrcs[e] && (n = !0);
}), n;
}, r.prototype.mangle = function () {
var e = void 0,
t = void 0,
n = void 0,
r = void 0,
o = void 0,
a = void 0;for (e = 0; e < this.media.length; e++) {
if (n = this.media[e].split("\r\n"), n.pop(), r = i.a.parseMLine(n.shift()), "audio" === r.media) {
for (o = "", r.fmt.length = 0, t = 0; t < n.length; t++) {
if ("a=rtpmap:" === n[t].substr(0, 9)) {
if (a = i.a.parseRTPMap(n[t]), "CN" === a.name || "ISAC" === a.name) continue;r.fmt.push(a.id);
}o += n[t] + "\r\n";
}this.media[e] = i.a.buildMLine(r) + "\r\n" + o;
}
}this.raw = this.session + this.media.join("");
}, r.prototype.removeSessionLines = function (e) {
var t = this,
n = i.a.findLines(this.session, e);return n.forEach(function (e) {
t.session = t.session.replace(e + "\r\n", "");
}), this.raw = this.session + this.media.join(""), n;
}, r.prototype.removeMediaLines = function (e, t) {
var n = this,
r = i.a.findLines(this.media[e], t);return r.forEach(function (t) {
n.media[e] = n.media[e].replace(t + "\r\n", "");
}), this.raw = this.session + this.media.join(""), r;
}, r.prototype.toJingle = function (e, t) {
var n = void 0,
r = void 0,
o = void 0,
a = void 0,
s = void 0,
c = void 0,
u = void 0,
l = void 0;if (a = i.a.findLines(this.session, "a=group:"), a.length) for (n = 0; n < a.length; n++) {
l = a[n].split(" ");var d = l.shift().substr(8);for (e.c("group", { xmlns: "urn:xmpp:jingle:apps:grouping:0", semantics: d }), r = 0; r < l.length; r++) {
e.c("content", { name: l[r] }).up();
}e.up();
}for (n = 0; n < this.media.length; n++) {
if (s = i.a.parseMLine(this.media[n].split("\r\n")[0]), "audio" === s.media || "video" === s.media || "application" === s.media) {
var p = i.a.findLine(this.media[n], "a=ssrc:");u = !!p && p.substring(7).split(" ")[0], e.c("content", { creator: t, name: s.media });var f = i.a.findLine(this.media[n], "a=mid:");if (f) {
var h = i.a.parseMID(f);e.attrs({ name: h });
}if (i.a.findLine(this.media[n], "a=rtpmap:").length) {
for (e.c("description", { xmlns: "urn:xmpp:jingle:apps:rtp:1", media: s.media }), u && e.attrs({ ssrc: u }), r = 0; r < s.fmt.length; r++) {
c = i.a.findLine(this.media[n], "a=rtpmap:" + s.fmt[r]), e.c("payload-type", i.a.parseRTPMap(c));var m = i.a.findLine(this.media[n], "a=fmtp:" + s.fmt[r]);if (m) for (l = i.a.parseFmtp(m), o = 0; o < l.length; o++) {
e.c("parameter", l[o]).up();
}this.rtcpFbToJingle(n, e, s.fmt[r]), e.up();
}var v = i.a.findLines(this.media[n], "a=crypto:", this.session);if (v.length && (e.c("encryption", { required: 1 }), v.forEach(function (t) {
return e.c("crypto", i.a.parseCrypto(t)).up();
}), e.up()), u) {
e.c("source", { ssrc: u, xmlns: "urn:xmpp:jingle:apps:rtp:ssma:0" });var g = i.a.findLines(this.media[n], "a=ssrc:");if (g.length > 0) g.forEach(function (t) {
var n = t.indexOf(" "),
r = t.substr(0, n).substr(7);r !== u && (e.up(), u = r, e.c("source", { ssrc: u, xmlns: "urn:xmpp:jingle:apps:rtp:ssma:0" }));var o = t.substr(n + 1);if (e.c("parameter"), -1 === o.indexOf(":")) e.attrs({ name: o });else {
var a = o.split(":", 2)[0];e.attrs({ name: a });var s = o.split(":", 2)[1];s = i.a.filterSpecialChars(s), e.attrs({ value: s });
}e.up();
});else {
e.up(), e.c("source", { ssrc: u, xmlns: "urn:xmpp:jingle:apps:rtp:ssma:0" }), e.c("parameter"), e.attrs({ name: "cname", value: Math.random().toString(36).substring(7) }), e.up();var y = null,
b = APP.RTC.getLocalTracks(s.media);b && (y = b.getTrackId()), null !== y && (y = i.a.filterSpecialChars(y), e.c("parameter"), e.attrs({ name: "msid", value: y }), e.up(), e.c("parameter"), e.attrs({ name: "mslabel", value: y }), e.up(), e.c("parameter"), e.attrs({ name: "label", value: y }), e.up());
}e.up();var S = i.a.findLines(this.media[n], "a=ssrc-group:");S.forEach(function (t) {
var n = t.indexOf(" "),
r = t.substr(0, n).substr(13),
i = t.substr(14 + r.length).split(" ");i.length && (e.c("ssrc-group", { semantics: r, xmlns: "urn:xmpp:jingle:apps:rtp:ssma:0" }), i.forEach(function (t) {
return e.c("source", { ssrc: t }).up();
}), e.up());
});
}var E = i.a.findLines(this.media[n], "a=rid");if (E.length) {
var T = E.map(function (e) {
return e.split(":")[1];
}).map(function (e) {
return e.split(" ")[0];
});T.forEach(function (t) {
e.c("source", { rid: t, xmlns: "urn:xmpp:jingle:apps:rtp:ssma:0" }), e.up();
});var _ = i.a.findLine(this.media[n], "a=simulcast");_ && (e.c("rid-group", { semantics: "SIM", xmlns: "urn:xmpp:jingle:apps:rtp:ssma:0" }), T.forEach(function (t) {
e.c("source", { rid: t }).up();
}), e.up());
}if (i.a.findLine(this.media[n], "a=rtcp-mux") && e.c("rtcp-mux").up(), this.rtcpFbToJingle(n, e, "*"), a = i.a.findLines(this.media[n], "a=extmap:"), a.length) for (r = 0; r < a.length; r++) {
if (l = i.a.parseExtmap(a[r]), e.c("rtp-hdrext", { xmlns: "urn:xmpp:jingle:apps:rtp:rtp-hdrext:0", uri: l.uri, id: l.value }), l.hasOwnProperty("direction")) switch (l.direction) {case "sendonly":
e.attrs({ senders: "responder" });break;case "recvonly":
e.attrs({ senders: "initiator" });break;case "sendrecv":
e.attrs({ senders: "both" });break;case "inactive":
e.attrs({ senders: "none" });}e.up();
}e.up();
}this.transportToJingle(n, e);var C = this.media[n];i.a.findLine(C, "a=sendrecv", this.session) ? e.attrs({ senders: "both" }) : i.a.findLine(C, "a=sendonly", this.session) ? e.attrs({ senders: "initiator" }) : i.a.findLine(C, "a=recvonly", this.session) ? e.attrs({ senders: "responder" }) : i.a.findLine(C, "a=inactive", this.session) && e.attrs({ senders: "none" }), "0" === s.port && e.attrs({ senders: "rejected" }), e.up();
}
}return e.up(), e;
}, r.prototype.transportToJingle = function (e, t) {
var n = void 0,
r = this;t.c("transport");var o = i.a.findLine(this.media[e], "a=sctpmap:", r.session);if (o) {
var a = i.a.parseSCTPMap(o);t.c("sctpmap", { xmlns: "urn:xmpp:jingle:transports:dtls-sctp:1", number: a[0], protocol: a[1] }), a.length > 2 && t.attrs({ streams: a[2] }), t.up();
}if (i.a.findLines(this.media[e], "a=fingerprint:", this.session).forEach(function (o) {
n = i.a.parseFingerprint(o), n.xmlns = "urn:xmpp:jingle:apps:dtls:0", t.c("fingerprint").t(n.fingerprint), delete n.fingerprint, o = i.a.findLine(r.media[e], "a=setup:", r.session), o && (n.setup = o.substr(8)), t.attrs(n), t.up();
}), n = i.a.iceparams(this.media[e], this.session)) {
n.xmlns = "urn:xmpp:jingle:transports:ice-udp:1", t.attrs(n);var s = i.a.findLines(this.media[e], "a=candidate:", this.session);s.length && s.forEach(function (e) {
var n = i.a.candidateToJingle(e);r.failICE && (n.ip = "1.1.1.1");var o = n && "string" == typeof n.protocol ? n.protocol.toLowerCase() : "";r.removeTcpCandidates && ("tcp" === o || "ssltcp" === o) || r.removeUdpCandidates && "udp" === o || t.c("candidate", n).up();
});
}t.up();
}, r.prototype.rtcpFbToJingle = function (e, t, n) {
i.a.findLines(this.media[e], "a=rtcp-fb:" + n).forEach(function (e) {
var n = i.a.parseRTCPFB(e);"trr-int" === n.type ? (t.c("rtcp-fb-trr-int", { xmlns: "urn:xmpp:jingle:apps:rtp:rtcp-fb:0", value: n.params[0] }), t.up()) : (t.c("rtcp-fb", { xmlns: "urn:xmpp:jingle:apps:rtp:rtcp-fb:0", type: n.type }), n.params.length > 0 && t.attrs({ subtype: n.params[0] }), t.up());
});
}, r.prototype.rtcpFbFromJingle = function (e, t) {
var n = "",
r = e.find('>rtcp-fb-trr-int[xmlns="urn:xmpp:jingle:apps:rtp:rtcp-fb:0"]');return r.length && (n += "a=rtcp-fb:* trr-int ", r.attr("value") ? n += r.attr("value") : n += "0", n += "\r\n"), r = e.find('>rtcp-fb[xmlns="urn:xmpp:jingle:apps:rtp:rtcp-fb:0"]'), r.each(function () {
n += "a=rtcp-fb:" + t + " " + $(this).attr("type"), $(this).attr("subtype") && (n += " " + $(this).attr("subtype")), n += "\r\n";
}), n;
}, r.prototype.fromJingle = function (e) {
var t = this;this.raw = "v=0\r\no=- 1923518516 2 IN IP4 0.0.0.0\r\ns=-\r\nt=0 0\r\n";var n = $(e).find('>group[xmlns="urn:xmpp:jingle:apps:grouping:0"]');n.length && n.each(function (e, n) {
var r = $(n).find(">content").map(function (e, t) {
return t.getAttribute("name");
}).get();r.length > 0 && (t.raw += "a=group:" + (n.getAttribute("semantics") || n.getAttribute("type")) + " " + r.join(" ") + "\r\n");
}), this.session = this.raw, e.find(">content").each(function () {
var e = t.jingle2media($(this));t.media.push(e);
}), this.raw = this.session + this.media.join("");
}, r.prototype.jingle2media = function (e) {
var t = e.find("description"),
n = "",
r = this,
o = e.find('>transport>sctpmap[xmlns="urn:xmpp:jingle:transports:dtls-sctp:1"]'),
a = { media: t.attr("media") };if (a.port = "1", "rejected" === e.attr("senders") && (a.port = "0"), e.find(">transport>fingerprint").length || t.find("encryption").length ? a.proto = o.length ? "DTLS/SCTP" : "RTP/SAVPF" : a.proto = "RTP/AVPF", o.length) {
n += "m=application 1 DTLS/SCTP " + o.attr("number") + "\r\n", n += "a=sctpmap:" + o.attr("number") + " " + o.attr("protocol");var s = o.attr("streams");n += s ? " " + s + "\r\n" : "\r\n";
} else a.fmt = t.find("payload-type").map(function () {
return this.getAttribute("id");
}).get(), n += i.a.buildMLine(a) + "\r\n";switch (n += "c=IN IP4 0.0.0.0\r\n", o.length || (n += "a=rtcp:1 IN IP4 0.0.0.0\r\n"), a = e.find('>transport[xmlns="urn:xmpp:jingle:transports:ice-udp:1"]'), a.length && (a.attr("ufrag") && (n += i.a.buildICEUfrag(a.attr("ufrag")) + "\r\n"), a.attr("pwd") && (n += i.a.buildICEPwd(a.attr("pwd")) + "\r\n"), a.find(">fingerprint").each(function () {
n += "a=fingerprint:" + this.getAttribute("hash"), n += " " + $(this).text(), n += "\r\n", this.getAttribute("setup") && (n += "a=setup:" + this.getAttribute("setup") + "\r\n");
})), e.attr("senders")) {case "initiator":
n += "a=sendonly\r\n";break;case "responder":
n += "a=recvonly\r\n";break;case "none":
n += "a=inactive\r\n";break;case "both":
n += "a=sendrecv\r\n";}return n += "a=mid:" + e.attr("name") + "\r\n", t.find("rtcp-mux").length && (n += "a=rtcp-mux\r\n"), t.find("encryption").length && t.find("encryption>crypto").each(function () {
n += "a=crypto:" + this.getAttribute("tag"), n += " " + this.getAttribute("crypto-suite"), n += " " + this.getAttribute("key-params"), this.getAttribute("session-params") && (n += " " + this.getAttribute("session-params")), n += "\r\n";
}), t.find("payload-type").each(function () {
n += i.a.buildRTPMap(this) + "\r\n", $(this).find(">parameter").length && (n += "a=fmtp:" + this.getAttribute("id") + " ", n += $(this).find("parameter").map(function () {
return (this.getAttribute("name") ? this.getAttribute("name") + "=" : "") + this.getAttribute("value");
}).get().join("; "), n += "\r\n"), n += r.rtcpFbFromJingle($(this), this.getAttribute("id"));
}), n += r.rtcpFbFromJingle(t, "*"), a = t.find('>rtp-hdrext[xmlns="urn:xmpp:jingle:apps:rtp:rtp-hdrext:0"]'), a.each(function () {
n += "a=extmap:" + this.getAttribute("id") + " " + this.getAttribute("uri") + "\r\n";
}), e.find('>transport[xmlns="urn:xmpp:jingle:transports:ice-udp:1"]>candidate').each(function () {
var e = this.getAttribute("protocol");e = "string" == typeof e ? e.toLowerCase() : "", r.removeTcpCandidates && ("tcp" === e || "ssltcp" === e) || r.removeUdpCandidates && "udp" === e || (r.failICE && this.setAttribute("ip", "1.1.1.1"), n += i.a.candidateFromJingle(this));
}), e.find('description>ssrc-group[xmlns="urn:xmpp:jingle:apps:rtp:ssma:0"]').each(function () {
var e = this.getAttribute("semantics"),
t = $(this).find(">source").map(function () {
return this.getAttribute("ssrc");
}).get();t.length && (n += "a=ssrc-group:" + e + " " + t.join(" ") + "\r\n");
}), a = e.find('description>source[xmlns="urn:xmpp:jingle:apps:rtp:ssma:0"]'), a.each(function () {
var e = this.getAttribute("ssrc");$(this).find(">parameter").each(function () {
var t = this.getAttribute("name"),
r = this.getAttribute("value");r = i.a.filterSpecialChars(r), n += "a=ssrc:" + e + " " + t, r && r.length && (n += ":" + r), n += "\r\n";
});
}), n;
};
}, function (e, t) {
var n = { ENVIRONMENT: "environment", USER: "user" };e.exports = n;
}, function (e, t, n) {
"use strict";
n.d(t, "b", function () {
return r;
}), n.d(t, "a", function () {
return i;
});var r = "signaling.peerMuted",
i = "signaling.peerVideoType";
}, function (e, t) {
var n = { IDENTITY_UPDATED: "authentication.identity_updated" };e.exports = n;
}, function (e, t, n) {
"use strict";
n.d(t, "a", function () {
return r;
}), n.d(t, "b", function () {
return i;
}), n.d(t, "d", function () {
return o;
}), n.d(t, "c", function () {
return a;
});var r = "statistics.audioLevel",
i = "statistics.before_disposed",
o = "statistics.byte_sent_stats",
a = "statistics.connectionstats";
}, function (e, t) {
function n() {
throw new Error("setTimeout has not been defined");
}function r() {
throw new Error("clearTimeout has not been defined");
}function i(e) {
if (l === setTimeout) return setTimeout(e, 0);if ((l === n || !l) && setTimeout) return l = setTimeout, setTimeout(e, 0);try {
return l(e, 0);
} catch (t) {
try {
return l.call(null, e, 0);
} catch (t) {
return l.call(this, e, 0);
}
}
}function o(e) {
if (d === clearTimeout) return clearTimeout(e);if ((d === r || !d) && clearTimeout) return d = clearTimeout, clearTimeout(e);try {
return d(e);
} catch (t) {
try {
return d.call(null, e);
} catch (t) {
return d.call(this, e);
}
}
}function a() {
m && f && (m = !1, f.length ? h = f.concat(h) : v = -1, h.length && s());
}function s() {
if (!m) {
var e = i(a);m = !0;for (var t = h.length; t;) {
for (f = h, h = []; ++v < t;) {
f && f[v].run();
}v = -1, t = h.length;
}f = null, m = !1, o(e);
}
}function c(e, t) {
this.fun = e, this.array = t;
}function u() {}var l,
d,
p = e.exports = {};!function () {
try {
l = "function" == typeof setTimeout ? setTimeout : n;
} catch (e) {
l = n;
}try {
d = "function" == typeof clearTimeout ? clearTimeout : r;
} catch (e) {
d = r;
}
}();var f,
h = [],
m = !1,
v = -1;p.nextTick = function (e) {
var t = new Array(arguments.length - 1);if (arguments.length > 1) for (var n = 1; n < arguments.length; n++) {
t[n - 1] = arguments[n];
}h.push(new c(e, t)), 1 !== h.length || m || i(s);
}, c.prototype.run = function () {
this.fun.apply(null, this.array);
}, p.title = "browser", p.browser = !0, p.env = {}, p.argv = [], p.version = "", p.versions = {}, p.on = u, p.addListener = u, p.once = u, p.off = u, p.removeListener = u, p.removeAllListeners = u, p.emit = u, p.prependListener = u, p.prependOnceListener = u, p.listeners = function (e) {
return [];
}, p.binding = function (e) {
throw new Error("process.binding is not supported");
}, p.cwd = function () {
return "/";
}, p.chdir = function (e) {
throw new Error("process.chdir is not supported");
}, p.umask = function () {
return 0;
};
}, function (e, t) {
var n = e.exports = { v: [{ name: "version", reg: /^(\d*)$/ }], o: [{ name: "origin", reg: /^(\S*) (\d*) (\d*) (\S*) IP(\d) (\S*)/, names: ["username", "sessionId", "sessionVersion", "netType", "ipVer", "address"], format: "%s %s %d %s IP%d %s" }], s: [{ name: "name" }], i: [{ name: "description" }], u: [{ name: "uri" }], e: [{ name: "email" }], p: [{ name: "phone" }], z: [{ name: "timezones" }], r: [{ name: "repeats" }], t: [{ name: "timing", reg: /^(\d*) (\d*)/, names: ["start", "stop"], format: "%d %d" }], c: [{ name: "connection", reg: /^IN IP(\d) (\S*)/, names: ["version", "ip"], format: "IN IP%d %s" }], b: [{ push: "bandwidth", reg: /^(TIAS|AS|CT|RR|RS):(\d*)/, names: ["type", "limit"], format: "%s:%s" }], m: [{ reg: /^(\w*) (\d*) ([\w\/]*)(?: (.*))?/, names: ["type", "port", "protocol", "payloads"], format: "%s %d %s %s" }], a: [{ push: "rtp", reg: /^rtpmap:(\d*) ([\w\-\.]*)(?:\s*\/(\d*)(?:\s*\/(\S*))?)?/, names: ["payload", "codec", "rate", "encoding"], format: function format(e) {
return e.encoding ? "rtpmap:%d %s/%s/%s" : e.rate ? "rtpmap:%d %s/%s" : "rtpmap:%d %s";
} }, { push: "fmtp", reg: /^fmtp:(\d*) ([\S| ]*)/, names: ["payload", "config"], format: "fmtp:%d %s" }, { name: "control", reg: /^control:(.*)/, format: "control:%s" }, { name: "rtcp", reg: /^rtcp:(\d*)(?: (\S*) IP(\d) (\S*))?/, names: ["port", "netType", "ipVer", "address"], format: function format(e) {
return null != e.address ? "rtcp:%d %s IP%d %s" : "rtcp:%d";
} }, { push: "rtcpFbTrrInt", reg: /^rtcp-fb:(\*|\d*) trr-int (\d*)/, names: ["payload", "value"], format: "rtcp-fb:%d trr-int %d" }, { push: "rtcpFb", reg: /^rtcp-fb:(\*|\d*) ([\w-_]*)(?: ([\w-_]*))?/, names: ["payload", "type", "subtype"], format: function format(e) {
return null != e.subtype ? "rtcp-fb:%s %s %s" : "rtcp-fb:%s %s";
} }, { push: "ext", reg: /^extmap:(\d+)(?:\/(\w+))? (\S*)(?: (\S*))?/, names: ["value", "direction", "uri", "config"], format: function format(e) {
return "extmap:%d" + (e.direction ? "/%s" : "%v") + " %s" + (e.config ? " %s" : "");
} }, { push: "crypto", reg: /^crypto:(\d*) ([\w_]*) (\S*)(?: (\S*))?/, names: ["id", "suite", "config", "sessionConfig"], format: function format(e) {
return null != e.sessionConfig ? "crypto:%d %s %s %s" : "crypto:%d %s %s";
} }, { name: "setup", reg: /^setup:(\w*)/, format: "setup:%s" }, { name: "mid", reg: /^mid:([^\s]*)/, format: "mid:%s" }, { name: "msid", reg: /^msid:(.*)/, format: "msid:%s" }, { name: "ptime", reg: /^ptime:(\d*)/, format: "ptime:%d" }, { name: "maxptime", reg: /^maxptime:(\d*)/, format: "maxptime:%d" }, { name: "direction", reg: /^(sendrecv|recvonly|sendonly|inactive)/ }, { name: "icelite", reg: /^(ice-lite)/ }, { name: "iceUfrag", reg: /^ice-ufrag:(\S*)/, format: "ice-ufrag:%s" }, { name: "icePwd", reg: /^ice-pwd:(\S*)/, format: "ice-pwd:%s" }, { name: "fingerprint", reg: /^fingerprint:(\S*) (\S*)/, names: ["type", "hash"], format: "fingerprint:%s %s" }, { push: "candidates", reg: /^candidate:(\S*) (\d*) (\S*) (\d*) (\S*) (\d*) typ (\S*)(?: raddr (\S*) rport (\d*))?(?: tcptype (\S*))?(?: generation (\d*))?(?: network-id (\d*))?(?: network-cost (\d*))?/, names: ["foundation", "component", "transport", "priority", "ip", "port", "type", "raddr", "rport", "tcptype", "generation", "network-id", "network-cost"], format: function format(e) {
var t = "candidate:%s %d %s %d %s %d typ %s";return t += null != e.raddr ? " raddr %s rport %d" : "%v%v", t += null != e.tcptype ? " tcptype %s" : "%v", null != e.generation && (t += " generation %d"), t += null != e["network-id"] ? " network-id %d" : "%v", t += null != e["network-cost"] ? " network-cost %d" : "%v";
} }, { name: "endOfCandidates", reg: /^(end-of-candidates)/ }, { name: "remoteCandidates", reg: /^remote-candidates:(.*)/, format: "remote-candidates:%s" }, { name: "iceOptions", reg: /^ice-options:(\S*)/, format: "ice-options:%s" }, { push: "ssrcs", reg: /^ssrc:(\d*) ([\w_]*)(?::(.*))?/, names: ["id", "attribute", "value"], format: function format(e) {
var t = "ssrc:%d";return null != e.attribute && (t += " %s", null != e.value && (t += ":%s")), t;
} }, { push: "ssrcGroups", reg: /^ssrc-group:([\x21\x23\x24\x25\x26\x27\x2A\x2B\x2D\x2E\w]*) (.*)/, names: ["semantics", "ssrcs"], format: "ssrc-group:%s %s" }, { name: "msidSemantic", reg: /^msid-semantic:\s?(\w*) (\S*)/, names: ["semantic", "token"], format: "msid-semantic: %s %s" }, { push: "groups", reg: /^group:(\w*) (.*)/, names: ["type", "mids"], format: "group:%s %s" }, { name: "rtcpMux", reg: /^(rtcp-mux)/ }, { name: "rtcpRsize", reg: /^(rtcp-rsize)/ }, { name: "sctpmap", reg: /^sctpmap:([\w_\/]*) (\S*)(?: (\S*))?/, names: ["sctpmapNumber", "app", "maxMessageSize"], format: function format(e) {
return null != e.maxMessageSize ? "sctpmap:%s %s %s" : "sctpmap:%s %s";
} }, { name: "xGoogleFlag", reg: /^x-google-flag:([^\s]*)/, format: "x-google-flag:%s" }, { push: "rids", reg: /^rid:([\d\w]+) (\w+)(?: ([\S| ]*))?/, names: ["id", "direction", "params"], format: function format(e) {
return e.params ? "rid:%s %s %s" : "rid:%s %s";
} }, { push: "imageattrs", reg: new RegExp("^imageattr:(\\d+|\\*)[\\s\\t]+(send|recv)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*)(?:[\\s\\t]+(recv|send)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*))?"), names: ["pt", "dir1", "attrs1", "dir2", "attrs2"], format: function format(e) {
return "imageattr:%s %s %s" + (e.dir2 ? " %s %s" : "");
} }, { name: "simulcast", reg: new RegExp("^simulcast:(send|recv) ([a-zA-Z0-9\\-_~;,]+)(?:\\s?(send|recv) ([a-zA-Z0-9\\-_~;,]+))?$"), names: ["dir1", "list1", "dir2", "list2"], format: function format(e) {
return "simulcast:%s %s" + (e.dir2 ? " %s %s" : "");
} }, { name: "simulcast_03", reg: /^simulcast:[\s\t]+([\S+\s\t]+)$/, names: ["value"], format: "simulcast: %s" }, { name: "framerate", reg: /^framerate:(\d+(?:$|\.\d+))/, format: "framerate:%s" }, { push: "invalid", names: ["value"] }] };Object.keys(n).forEach(function (e) {
n[e].forEach(function (e) {
e.reg || (e.reg = /(.*)/), e.format || (e.format = "%s");
});
});
}, function (e, t) {
e.exports = function (e) {
return e.webpackPolyfill || (e.deprecate = function () {}, e.paths = [], e.children || (e.children = []), Object.defineProperty(e, "loaded", { enumerable: !0, get: function get() {
return e.l;
} }), Object.defineProperty(e, "id", { enumerable: !0, get: function get() {
return e.i;
} }), e.webpackPolyfill = 1), e;
};
}, function (e, t, n) {
"use strict";
function r(e) {
var t = "";do {
t = s[e % c] + t, e = Math.floor(e / c);
} while (e > 0);return t;
}function i(e) {
var t = 0;for (d = 0; d < e.length; d++) {
t = t * c + u[e.charAt(d)];
}return t;
}function o() {
var e = r(+new Date());return e !== a ? (l = 0, a = e) : e + "." + r(l++);
}for (var a, s = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""), c = 64, u = {}, l = 0, d = 0; d < c; d++) {
u[s[d]] = d;
}o.encode = r, o.decode = i, e.exports = o;
}, function (e, t) {
function n(e) {
if (e) return r(e);
}function r(e) {
for (var t in n.prototype) {
e[t] = n.prototype[t];
}return e;
}e.exports = n, n.prototype.on = n.prototype.addEventListener = function (e, t) {
return this._callbacks = this._callbacks || {}, (this._callbacks["$" + e] = this._callbacks["$" + e] || []).push(t), this;
}, n.prototype.once = function (e, t) {
function n() {
this.off(e, n), t.apply(this, arguments);
}return n.fn = t, this.on(e, n), this;
}, n.prototype.off = n.prototype.removeListener = n.prototype.removeAllListeners = n.prototype.removeEventListener = function (e, t) {
if (this._callbacks = this._callbacks || {}, 0 == arguments.length) return this._callbacks = {}, this;var n = this._callbacks["$" + e];if (!n) return this;if (1 == arguments.length) return delete this._callbacks["$" + e], this;for (var r, i = 0; i < n.length; i++) {
if ((r = n[i]) === t || r.fn === t) {
n.splice(i, 1);break;
}
}return this;
}, n.prototype.emit = function (e) {
this._callbacks = this._callbacks || {};var t = [].slice.call(arguments, 1),
n = this._callbacks["$" + e];if (n) {
n = n.slice(0);for (var r = 0, i = n.length; r < i; ++r) {
n[r].apply(this, t);
}
}return this;
}, n.prototype.listeners = function (e) {
return this._callbacks = this._callbacks || {}, this._callbacks["$" + e] || [];
}, n.prototype.hasListeners = function (e) {
return !!this.listeners(e).length;
};
}, function (e, t, n) {
(function (e) {
function r(t) {
var n = !1,
r = !1,
s = !1 !== t.jsonp;if (e.location) {
var c = "https:" == location.protocol,
u = location.port;u || (u = c ? 443 : 80), n = t.hostname != location.hostname || u != t.port, r = t.secure != c;
}if (t.xdomain = n, t.xscheme = r, "open" in new i(t) && !t.forceJSONP) return new o(t);if (!s) throw new Error("JSONP disabled");return new a(t);
}var i = n(35),
o = n(161),
a = n(160),
s = n(162);t.polling = r, t.websocket = s;
}).call(t, n(1));
}, function (e, t, n) {
function r(e) {
var t = e && e.forceBase64;l && !t || (this.supportsBinary = !1), i.call(this, e);
}var i = n(34),
o = n(38),
a = n(18),
s = n(21),
c = n(59),
u = n(9)("engine.io-client:polling");e.exports = r;var l = function () {
return null != new (n(35))({ xdomain: !1 }).responseType;
}();s(r, i), r.prototype.name = "polling", r.prototype.doOpen = function () {
this.poll();
}, r.prototype.pause = function (e) {
function t() {
u("paused"), n.readyState = "paused", e();
}var n = this;if (this.readyState = "pausing", this.polling || !this.writable) {
var r = 0;this.polling && (u("we are currently polling - waiting to pause"), r++, this.once("pollComplete", function () {
u("pre-pause polling complete"), --r || t();
})), this.writable || (u("we are currently writing - waiting to pause"), r++, this.once("drain", function () {
u("pre-pause writing complete"), --r || t();
}));
} else t();
}, r.prototype.poll = function () {
u("polling"), this.polling = !0, this.doPoll(), this.emit("poll");
}, r.prototype.onData = function (e) {
var t = this;u("polling got data %s", e);var n = function n(e, _n, r) {
if ("opening" == t.readyState && t.onOpen(), "close" == e.type) return t.onClose(), !1;t.onPacket(e);
};a.decodePayload(e, this.socket.binaryType, n), "closed" != this.readyState && (this.polling = !1, this.emit("pollComplete"), "open" == this.readyState ? this.poll() : u('ignoring poll - transport state "%s"', this.readyState));
}, r.prototype.doClose = function () {
function e() {
u("writing close packet"), t.write([{ type: "close" }]);
}var t = this;"open" == this.readyState ? (u("transport open - closing"), e()) : (u("transport not open - deferring close"), this.once("open", e));
}, r.prototype.write = function (e) {
var t = this;this.writable = !1;var n = function n() {
t.writable = !0, t.emit("drain");
},
t = this;a.encodePayload(e, this.supportsBinary, function (e) {
t.doWrite(e, n);
});
}, r.prototype.uri = function () {
var e = this.query || {},
t = this.secure ? "https" : "http",
n = "";return !1 !== this.timestampRequests && (e[this.timestampParam] = c()), this.supportsBinary || e.sid || (e.b64 = 1), e = o.encode(e), this.port && ("https" == t && 443 != this.port || "http" == t && 80 != this.port) && (n = ":" + this.port), e.length && (e = "?" + e), t + "://" + (-1 !== this.hostname.indexOf(":") ? "[" + this.hostname + "]" : this.hostname) + n + this.path + e;
};
}, function (e, t) {
var n = /^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,
r = ["source", "protocol", "authority", "userInfo", "user", "password", "host", "port", "relative", "path", "directory", "file", "query", "anchor"];e.exports = function (e) {
var t = e,
i = e.indexOf("["),
o = e.indexOf("]");-1 != i && -1 != o && (e = e.substring(0, i) + e.substring(i, o).replace(/:/g, ";") + e.substring(o, e.length));for (var a = n.exec(e || ""), s = {}, c = 14; c--;) {
s[r[c]] = a[c] || "";
}return -1 != i && -1 != o && (s.source = t, s.host = s.host.substring(1, s.host.length - 1).replace(/;/g, ":"), s.authority = s.authority.replace("[", "").replace("]", "").replace(/;/g, ":"), s.ipv6uri = !0), s;
};
}, function (e, t, n) {
function r(e, t) {
if (!(this instanceof r)) return new r(e, t);e && "object" == typeof e && (t = e, e = void 0), t = t || {}, t.path = t.path || "/socket.io", this.nsps = {}, this.subs = [], this.opts = t, this.reconnection(!1 !== t.reconnection), this.reconnectionAttempts(t.reconnectionAttempts || 1 / 0), this.reconnectionDelay(t.reconnectionDelay || 1e3), this.reconnectionDelayMax(t.reconnectionDelayMax || 5e3), this.randomizationFactor(t.randomizationFactor || .5), this.backoff = new p({ min: this.reconnectionDelay(), max: this.reconnectionDelayMax(), jitter: this.randomizationFactor() }), this.timeout(null == t.timeout ? 2e4 : t.timeout), this.readyState = "closed", this.uri = e, this.connecting = [], this.lastPing = null, this.encoding = !1, this.packetBuffer = [], this.encoder = new s.Encoder(), this.decoder = new s.Decoder(), this.autoConnect = !1 !== t.autoConnect, this.autoConnect && this.open();
}var i = n(157),
o = n(66),
a = n(60),
s = n(39),
c = n(65),
u = n(40),
l = n(9)("socket.io-client:manager"),
d = n(41),
p = n(71),
f = Object.prototype.hasOwnProperty;e.exports = r, r.prototype.emitAll = function () {
this.emit.apply(this, arguments);for (var e in this.nsps) {
f.call(this.nsps, e) && this.nsps[e].emit.apply(this.nsps[e], arguments);
}
}, r.prototype.updateSocketIds = function () {
for (var e in this.nsps) {
f.call(this.nsps, e) && (this.nsps[e].id = this.engine.id);
}
}, a(r.prototype), r.prototype.reconnection = function (e) {
return arguments.length ? (this._reconnection = !!e, this) : this._reconnection;
}, r.prototype.reconnectionAttempts = function (e) {
return arguments.length ? (this._reconnectionAttempts = e, this) : this._reconnectionAttempts;
}, r.prototype.reconnectionDelay = function (e) {
return arguments.length ? (this._reconnectionDelay = e, this.backoff && this.backoff.setMin(e), this) : this._reconnectionDelay;
}, r.prototype.randomizationFactor = function (e) {
return arguments.length ? (this._randomizationFactor = e, this.backoff && this.backoff.setJitter(e), this) : this._randomizationFactor;
}, r.prototype.reconnectionDelayMax = function (e) {
return arguments.length ? (this._reconnectionDelayMax = e, this.backoff && this.backoff.setMax(e), this) : this._reconnectionDelayMax;
}, r.prototype.timeout = function (e) {
return arguments.length ? (this._timeout = e, this) : this._timeout;
}, r.prototype.maybeReconnectOnOpen = function () {
!this.reconnecting && this._reconnection && 0 === this.backoff.attempts && this.reconnect();
}, r.prototype.open = r.prototype.connect = function (e) {
if (l("readyState %s", this.readyState), ~this.readyState.indexOf("open")) return this;l("opening %s", this.uri), this.engine = i(this.uri, this.opts);var t = this.engine,
n = this;this.readyState = "opening", this.skipReconnect = !1;var r = c(t, "open", function () {
n.onopen(), e && e();
}),
o = c(t, "error", function (t) {
if (l("connect_error"), n.cleanup(), n.readyState = "closed", n.emitAll("connect_error", t), e) {
var r = new Error("Connection error");r.data = t, e(r);
} else n.maybeReconnectOnOpen();
});if (!1 !== this._timeout) {
var a = this._timeout;l("connect attempt will timeout after %d", a);var s = setTimeout(function () {
l("connect attempt timed out after %d", a), r.destroy(), t.close(), t.emit("error", "timeout"), n.emitAll("connect_timeout", a);
}, a);this.subs.push({ destroy: function destroy() {
clearTimeout(s);
} });
}return this.subs.push(r), this.subs.push(o), this;
}, r.prototype.onopen = function () {
l("open"), this.cleanup(), this.readyState = "open", this.emit("open");var e = this.engine;this.subs.push(c(e, "data", u(this, "ondata"))), this.subs.push(c(e, "ping", u(this, "onping"))), this.subs.push(c(e, "pong", u(this, "onpong"))), this.subs.push(c(e, "error", u(this, "onerror"))), this.subs.push(c(e, "close", u(this, "onclose"))), this.subs.push(c(this.decoder, "decoded", u(this, "ondecoded")));
}, r.prototype.onping = function () {
this.lastPing = new Date(), this.emitAll("ping");
}, r.prototype.onpong = function () {
this.emitAll("pong", new Date() - this.lastPing);
}, r.prototype.ondata = function (e) {
this.decoder.add(e);
}, r.prototype.ondecoded = function (e) {
this.emit("packet", e);
}, r.prototype.onerror = function (e) {
l("error", e), this.emitAll("error", e);
}, r.prototype.socket = function (e) {
function t() {
~d(r.connecting, n) || r.connecting.push(n);
}var n = this.nsps[e];if (!n) {
n = new o(this, e), this.nsps[e] = n;var r = this;n.on("connecting", t), n.on("connect", function () {
n.id = r.engine.id;
}), this.autoConnect && t();
}return n;
}, r.prototype.destroy = function (e) {
var t = d(this.connecting, e);~t && this.connecting.splice(t, 1), this.connecting.length || this.close();
}, r.prototype.packet = function (e) {
l("writing packet %j", e);var t = this;t.encoding ? t.packetBuffer.push(e) : (t.encoding = !0, this.encoder.encode(e, function (n) {
for (var r = 0; r < n.length; r++) {
t.engine.write(n[r], e.options);
}t.encoding = !1, t.processPacketQueue();
}));
}, r.prototype.processPacketQueue = function () {
if (this.packetBuffer.length > 0 && !this.encoding) {
var e = this.packetBuffer.shift();this.packet(e);
}
}, r.prototype.cleanup = function () {
l("cleanup");for (var e; e = this.subs.shift();) {
e.destroy();
}this.packetBuffer = [], this.encoding = !1, this.lastPing = null, this.decoder.destroy();
}, r.prototype.close = r.prototype.disconnect = function () {
l("disconnect"), this.skipReconnect = !0, this.reconnecting = !1, "opening" == this.readyState && this.cleanup(), this.backoff.reset(), this.readyState = "closed", this.engine && this.engine.close();
}, r.prototype.onclose = function (e) {
l("onclose"), this.cleanup(), this.backoff.reset(), this.readyState = "closed", this.emit("close", e), this._reconnection && !this.skipReconnect && this.reconnect();
}, r.prototype.reconnect = function () {
if (this.reconnecting || this.skipReconnect) return this;var e = this;if (this.backoff.attempts >= this._reconnectionAttempts) l("reconnect failed"), this.backoff.reset(), this.emitAll("reconnect_failed"), this.reconnecting = !1;else {
var t = this.backoff.duration();l("will wait %dms before reconnect attempt", t), this.reconnecting = !0;var n = setTimeout(function () {
e.skipReconnect || (l("attempting reconnect"), e.emitAll("reconnect_attempt", e.backoff.attempts), e.emitAll("reconnecting", e.backoff.attempts), e.skipReconnect || e.open(function (t) {
t ? (l("reconnect attempt error"), e.reconnecting = !1, e.reconnect(), e.emitAll("reconnect_error", t.data)) : (l("reconnect success"), e.onreconnect());
}));
}, t);this.subs.push({ destroy: function destroy() {
clearTimeout(n);
} });
}
}, r.prototype.onreconnect = function () {
var e = this.backoff.attempts;this.reconnecting = !1, this.backoff.reset(), this.updateSocketIds(), this.emitAll("reconnect", e);
};
}, function (e, t) {
function n(e, t, n) {
return e.on(t, n), { destroy: function destroy() {
e.removeListener(t, n);
} };
}e.exports = n;
}, function (e, t, n) {
function r(e, t) {
this.io = e, this.nsp = t, this.json = this, this.ids = 0, this.acks = {}, this.receiveBuffer = [], this.sendBuffer = [], this.connected = !1, this.disconnected = !0, this.io.autoConnect && this.open();
}var i = n(39),
o = n(60),
a = n(149),
s = n(65),
c = n(40),
u = n(9)("socket.io-client:socket"),
l = n(75);e.exports = r;var d = { connect: 1, connect_error: 1, connect_timeout: 1, connecting: 1, disconnect: 1, error: 1, reconnect: 1, reconnect_attempt: 1, reconnect_failed: 1, reconnect_error: 1, reconnecting: 1, ping: 1, pong: 1 },
p = o.prototype.emit;o(r.prototype), r.prototype.subEvents = function () {
if (!this.subs) {
var e = this.io;this.subs = [s(e, "open", c(this, "onopen")), s(e, "packet", c(this, "onpacket")), s(e, "close", c(this, "onclose"))];
}
}, r.prototype.open = r.prototype.connect = function () {
return this.connected ? this : (this.subEvents(), this.io.open(), "open" == this.io.readyState && this.onopen(), this.emit("connecting"), this);
}, r.prototype.send = function () {
var e = a(arguments);return e.unshift("message"), this.emit.apply(this, e), this;
}, r.prototype.emit = function (e) {
if (d.hasOwnProperty(e)) return p.apply(this, arguments), this;var t = a(arguments),
n = i.EVENT;l(t) && (n = i.BINARY_EVENT);var r = { type: n, data: t };return r.options = {}, r.options.compress = !this.flags || !1 !== this.flags.compress, "function" == typeof t[t.length - 1] && (u("emitting packet with ack id %d", this.ids), this.acks[this.ids] = t.pop(), r.id = this.ids++), this.connected ? this.packet(r) : this.sendBuffer.push(r), delete this.flags, this;
}, r.prototype.packet = function (e) {
e.nsp = this.nsp, this.io.packet(e);
}, r.prototype.onopen = function () {
u("transport is open - connecting"), "/" != this.nsp && this.packet({ type: i.CONNECT });
}, r.prototype.onclose = function (e) {
u("close (%s)", e), this.connected = !1, this.disconnected = !0, delete this.id, this.emit("disconnect", e);
}, r.prototype.onpacket = function (e) {
if (e.nsp == this.nsp) switch (e.type) {case i.CONNECT:
this.onconnect();break;case i.EVENT:case i.BINARY_EVENT:
this.onevent(e);break;case i.ACK:case i.BINARY_ACK:
this.onack(e);break;case i.DISCONNECT:
this.ondisconnect();break;case i.ERROR:
this.emit("error", e.data);}
}, r.prototype.onevent = function (e) {
var t = e.data || [];u("emitting event %j", t), null != e.id && (u("attaching ack callback to event"), t.push(this.ack(e.id))), this.connected ? p.apply(this, t) : this.receiveBuffer.push(t);
}, r.prototype.ack = function (e) {
var t = this,
n = !1;return function () {
if (!n) {
n = !0;var r = a(arguments);u("sending ack %j", r);var o = l(r) ? i.BINARY_ACK : i.ACK;t.packet({ type: o, id: e, data: r });
}
};
}, r.prototype.onack = function (e) {
var t = this.acks[e.id];"function" == typeof t ? (u("calling ack %s with %j", e.id, e.data), t.apply(this, e.data), delete this.acks[e.id]) : u("bad ack %s", e.id);
}, r.prototype.onconnect = function () {
this.connected = !0, this.disconnected = !1, this.emit("connect"), this.emitBuffered();
}, r.prototype.emitBuffered = function () {
var e;for (e = 0; e < this.receiveBuffer.length; e++) {
p.apply(this, this.receiveBuffer[e]);
}for (this.receiveBuffer = [], e = 0; e < this.sendBuffer.length; e++) {
this.packet(this.sendBuffer[e]);
}this.sendBuffer = [];
}, r.prototype.ondisconnect = function () {
u("server disconnect (%s)", this.nsp), this.destroy(), this.onclose("io server disconnect");
}, r.prototype.destroy = function () {
if (this.subs) {
for (var e = 0; e < this.subs.length; e++) {
this.subs[e].destroy();
}this.subs = null;
}this.io.destroy(this);
}, r.prototype.close = r.prototype.disconnect = function () {
return this.connected && (u("performing disconnect (%s)", this.nsp), this.packet({ type: i.DISCONNECT })), this.destroy(), this.connected && this.onclose("io client disconnect"), this;
}, r.prototype.compress = function (e) {
return this.flags = this.flags || {}, this.flags.compress = e, this;
};
}, function (e, t, n) {
(function (t) {
function n(e) {
return t.Buffer && t.Buffer.isBuffer(e) || t.ArrayBuffer && e instanceof ArrayBuffer;
}e.exports = n;
}).call(t, n(1));
}, function (e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", { value: !0 }), function (e) {
function r(e) {
if (!k.a[e]) return null;var t = k.a[e].order,
n = null,
r = null;return Object.keys(k.a).forEach(function (e) {
var i = k.a[e];(!n || n.order < i.order && i.order < t) && (r = e, n = i);
}), r;
}function i(e, t) {
var n = e;return -1 !== t.devices.indexOf("audio") && (n += ".audio"), -1 !== t.devices.indexOf("desktop") && (n += ".desktop"), -1 !== t.devices.indexOf("video") && (n += ".video." + t.resolution), n;
}var o = n(114),
a = n.n(o),
s = n(32),
c = n(3),
u = n.n(c),
l = n(26),
d = n(5),
p = n(83),
f = n(43),
h = n(27),
m = n(84),
v = n(44),
g = n(45),
y = n.n(g),
b = n(11),
S = n(15),
E = n(16),
T = n(47),
_ = n(0),
C = n.n(_),
w = n(4),
R = n(31),
k = n.n(R),
A = n(28),
I = n(22),
P = n(2),
O = n(93),
D = n(49),
L = n.n(D),
N = n(29),
M = n(6),
x = n(30),
j = C.a.getLogger(e);t.default = { version: "development", JitsiConnection: p.a, constants: { participantConnectionStatus: A.a, sipVideoGW: x }, events: { conference: d, connection: h, track: E, mediaDevices: v, connectionQuality: s }, errors: { conference: l, connection: f, recorder: y.a, track: S }, errorTypes: { JitsiTrackError: b.a }, logLevels: C.a.levels, mediaDevices: m.a, analytics: null, init: function init(e) {
M.a.init(e), window.connectionTimes || (window.connectionTimes = {}), this.analytics = M.a.analytics, !0 === e.enableAnalyticsLogging && this.analytics.init(P.a.getBrowserName()), e.enableWindowOnErrorHandler && u.a.addHandler(this.getGlobalOnErrorHandler.bind(this));var t = e.deploymentInfo;if (t && Object.keys(t).length > 0) {
var n = {};for (var r in t) {
t.hasOwnProperty(r) && (n[r] = t[r]);
}n.id = "deployment_info", M.a.sendLog(JSON.stringify(n));
}if (this.version) {
var i = { id: "component_version", component: "lib-jitsi-meet", version: this.version };M.a.sendLog(JSON.stringify(i));
}return I.a.init(e || {});
}, isDesktopSharingEnabled: function isDesktopSharingEnabled() {
return I.a.isDesktopSharingEnabled();
}, setLogLevel: function setLogLevel(e) {
C.a.setLogLevel(e);
}, setLogLevelById: function setLogLevelById(e, t) {
C.a.setLogLevelById(e, t);
}, addGlobalLogTransport: function addGlobalLogTransport(e) {
C.a.addGlobalTransport(e);
}, removeGlobalLogTransport: function removeGlobalLogTransport(e) {
C.a.removeGlobalTransport(e);
}, createLocalTracks: function createLocalTracks(e, t) {
var n = this,
o = !1;return !0 === t && window.setTimeout(function () {
o || m.a.emitEvent(v.PERMISSION_PROMPT_IS_SHOWN, P.a.getBrowserName());
}, 1e3), window.connectionTimes || (window.connectionTimes = {}), window.connectionTimes["obtainPermissions.start"] = window.performance.now(), I.a.obtainAudioAndVideoPermissions(e || {}).then(function (t) {
if (o = !0, window.connectionTimes["obtainPermissions.end"] = window.performance.now(), M.a.analytics.sendEvent(i("getUserMedia.success", e), { value: e }), !I.a.options.disableAudioLevels) for (var n = 0; n < t.length; n++) {
!function (e) {
var n = t[e],
r = n.getOriginalStream();n.getType() === w.a && (M.a.startLocalStats(r, n.setAudioLevel.bind(n)), n.addEventListener(E.LOCAL_TRACK_STOPPED, function () {
M.a.stopLocalStats(r);
}));
}(n);
}var r = I.a.getCurrentlyAvailableMediaDevices();if (r) for (var n = 0; n < t.length; n++) {
var a = t[n];a._setRealDeviceIdFromDeviceList(r);
}return t;
}).catch(function (t) {
if (o = !0, t.name === S.UNSUPPORTED_RESOLUTION) {
var a = e.resolution || "720",
s = r(a);if (null !== s) return e.resolution = s, j.debug("Retry createLocalTracks with resolution", s), M.a.analytics.sendEvent("getUserMedia.fail.resolution." + a), n.createLocalTracks(e);
}if (S.CHROME_EXTENSION_USER_CANCELED === t.name) {
var c = { id: "chrome_extension_user_canceled", message: t.message };M.a.sendLog(JSON.stringify(c)), M.a.analytics.sendEvent("getUserMedia.userCancel.extensionInstall");
} else if (S.NOT_FOUND === t.name) {
var u = { id: "usermedia_missing_device", status: t.gum.devices };M.a.sendLog(JSON.stringify(u)), M.a.analytics.sendEvent("getUserMedia.deviceNotFound." + t.gum.devices.join("."));
} else {
M.a.sendGetUserMediaFailed(t);var l = i("getUserMedia.failed", e);M.a.analytics.sendEvent(l + "." + t.name, { value: e });
}return window.connectionTimes["obtainPermissions.end"] = window.performance.now(), Promise.reject(t);
});
}, isDeviceListAvailable: function isDeviceListAvailable() {
return j.warn("This method is deprecated, use JitsiMeetJS.mediaDevices.isDeviceListAvailable instead"), this.mediaDevices.isDeviceListAvailable();
}, isDeviceChangeAvailable: function isDeviceChangeAvailable(e) {
return j.warn("This method is deprecated, use JitsiMeetJS.mediaDevices.isDeviceChangeAvailable instead"), this.mediaDevices.isDeviceChangeAvailable(e);
}, isMultipleAudioInputSupported: function isMultipleAudioInputSupported() {
return this.mediaDevices.isMultipleAudioInputSupported();
}, isCollectingLocalStats: function isCollectingLocalStats() {
return M.a.audioLevelsEnabled && T.a.isLocalStatsSupported();
}, enumerateDevices: function enumerateDevices(e) {
j.warn("This method is deprecated, use JitsiMeetJS.mediaDevices.enumerateDevices instead"), this.mediaDevices.enumerateDevices(e);
}, getGlobalOnErrorHandler: function getGlobalOnErrorHandler(e, t, n, r, i) {
j.error("UnhandledError: " + e, "Script: " + t, "Line: " + n, "Column: " + r, "StackTrace: ", i), M.a.reportGlobalError(i);
}, getMachineId: function getMachineId() {
return N.a.getMachineId();
}, util: { AuthUtil: a.a, RTCUIHelper: O.a, ScriptUtil: L.a } };
}.call(t, "JitsiMeetJS.js");
}, function (e, t) {
e.exports = function (e, t, n) {
var r = e.byteLength;if (t = t || 0, n = n || r, e.slice) return e.slice(t, n);if (t < 0 && (t += r), n < 0 && (n += r), n > r && (n = r), t >= r || t >= n || 0 === r) return new ArrayBuffer(0);for (var i = new Uint8Array(e), o = new Uint8Array(n - t), a = t, s = 0; a < n; a++, s++) {
o[s] = i[a];
}return o.buffer;
};
}, function (e, t, n) {
(function (n, r) {
var i, o;!function () {
function a(e) {
var t = !1;return function () {
if (t) throw new Error("Callback was already called.");t = !0, e.apply(s, arguments);
};
}var s,
c,
u = {};s = this, null != s && (c = s.async), u.noConflict = function () {
return s.async = c, u;
};var l = Object.prototype.toString,
d = Array.isArray || function (e) {
return "[object Array]" === l.call(e);
},
p = function p(e, t) {
if (e.forEach) return e.forEach(t);for (var n = 0; n < e.length; n += 1) {
t(e[n], n, e);
}
},
f = function f(e, t) {
if (e.map) return e.map(t);var n = [];return p(e, function (e, r, i) {
n.push(t(e, r, i));
}), n;
},
h = function h(e, t, n) {
return e.reduce ? e.reduce(t, n) : (p(e, function (e, r, i) {
n = t(n, e, r, i);
}), n);
},
m = function m(e) {
if (Object.keys) return Object.keys(e);var t = [];for (var n in e) {
e.hasOwnProperty(n) && t.push(n);
}return t;
};void 0 !== n && n.nextTick ? (u.nextTick = n.nextTick, u.setImmediate = void 0 !== r ? function (e) {
r(e);
} : u.nextTick) : "function" == typeof r ? (u.nextTick = function (e) {
r(e);
}, u.setImmediate = u.nextTick) : (u.nextTick = function (e) {
setTimeout(e, 0);
}, u.setImmediate = u.nextTick), u.each = function (e, t, n) {
function r(t) {
t ? (n(t), n = function n() {}) : (i += 1) >= e.length && n();
}if (n = n || function () {}, !e.length) return n();var i = 0;p(e, function (e) {
t(e, a(r));
});
}, u.forEach = u.each, u.eachSeries = function (e, t, n) {
if (n = n || function () {}, !e.length) return n();var r = 0;!function i() {
t(e[r], function (t) {
t ? (n(t), n = function n() {}) : (r += 1, r >= e.length ? n() : i());
});
}();
}, u.forEachSeries = u.eachSeries, u.eachLimit = function (e, t, n, r) {
v(t).apply(null, [e, n, r]);
}, u.forEachLimit = u.eachLimit;var v = function v(e) {
return function (t, n, r) {
if (r = r || function () {}, !t.length || e <= 0) return r();var i = 0,
o = 0,
a = 0;!function s() {
if (i >= t.length) return r();for (; a < e && o < t.length;) {
o += 1, a += 1, n(t[o - 1], function (e) {
e ? (r(e), r = function r() {}) : (i += 1, a -= 1, i >= t.length ? r() : s());
});
}
}();
};
},
g = function g(e) {
return function () {
var t = Array.prototype.slice.call(arguments);return e.apply(null, [u.each].concat(t));
};
},
y = function y(e, t) {
return function () {
var n = Array.prototype.slice.call(arguments);return t.apply(null, [v(e)].concat(n));
};
},
b = function b(e) {
return function () {
var t = Array.prototype.slice.call(arguments);return e.apply(null, [u.eachSeries].concat(t));
};
},
S = function S(e, t, n, r) {
if (t = f(t, function (e, t) {
return { index: t, value: e };
}), r) {
var i = [];e(t, function (e, t) {
n(e.value, function (n, r) {
i[e.index] = r, t(n);
});
}, function (e) {
r(e, i);
});
} else e(t, function (e, t) {
n(e.value, function (e) {
t(e);
});
});
};u.map = g(S), u.mapSeries = b(S), u.mapLimit = function (e, t, n, r) {
return E(t)(e, n, r);
};var E = function E(e) {
return y(e, S);
};u.reduce = function (e, t, n, r) {
u.eachSeries(e, function (e, r) {
n(t, e, function (e, n) {
t = n, r(e);
});
}, function (e) {
r(e, t);
});
}, u.inject = u.reduce, u.foldl = u.reduce, u.reduceRight = function (e, t, n, r) {
var i = f(e, function (e) {
return e;
}).reverse();u.reduce(i, t, n, r);
}, u.foldr = u.reduceRight;var T = function T(e, t, n, r) {
var i = [];t = f(t, function (e, t) {
return { index: t, value: e };
}), e(t, function (e, t) {
n(e.value, function (n) {
n && i.push(e), t();
});
}, function (e) {
r(f(i.sort(function (e, t) {
return e.index - t.index;
}), function (e) {
return e.value;
}));
});
};u.filter = g(T), u.filterSeries = b(T), u.select = u.filter, u.selectSeries = u.filterSeries;var _ = function _(e, t, n, r) {
var i = [];t = f(t, function (e, t) {
return { index: t, value: e };
}), e(t, function (e, t) {
n(e.value, function (n) {
n || i.push(e), t();
});
}, function (e) {
r(f(i.sort(function (e, t) {
return e.index - t.index;
}), function (e) {
return e.value;
}));
});
};u.reject = g(_), u.rejectSeries = b(_);var C = function C(e, t, n, r) {
e(t, function (e, t) {
n(e, function (n) {
n ? (r(e), r = function r() {}) : t();
});
}, function (e) {
r();
});
};u.detect = g(C), u.detectSeries = b(C), u.some = function (e, t, n) {
u.each(e, function (e, r) {
t(e, function (e) {
e && (n(!0), n = function n() {}), r();
});
}, function (e) {
n(!1);
});
}, u.any = u.some, u.every = function (e, t, n) {
u.each(e, function (e, r) {
t(e, function (e) {
e || (n(!1), n = function n() {}), r();
});
}, function (e) {
n(!0);
});
}, u.all = u.every, u.sortBy = function (e, t, n) {
u.map(e, function (e, n) {
t(e, function (t, r) {
t ? n(t) : n(null, { value: e, criteria: r });
});
}, function (e, t) {
if (e) return n(e);var r = function r(e, t) {
var n = e.criteria,
r = t.criteria;return n < r ? -1 : n > r ? 1 : 0;
};n(null, f(t.sort(r), function (e) {
return e.value;
}));
});
}, u.auto = function (e, t) {
t = t || function () {};var n = m(e),
r = n.length;if (!r) return t();var i = {},
o = [],
a = function a(e) {
o.unshift(e);
},
s = function s(e) {
for (var t = 0; t < o.length; t += 1) {
if (o[t] === e) return void o.splice(t, 1);
}
},
c = function c() {
r--, p(o.slice(0), function (e) {
e();
});
};a(function () {
if (!r) {
var e = t;t = function t() {}, e(null, i);
}
}), p(n, function (n) {
var r = d(e[n]) ? e[n] : [e[n]],
o = function o(e) {
var r = Array.prototype.slice.call(arguments, 1);if (r.length <= 1 && (r = r[0]), e) {
var o = {};p(m(i), function (e) {
o[e] = i[e];
}), o[n] = r, t(e, o), t = function t() {};
} else i[n] = r, u.setImmediate(c);
},
l = r.slice(0, Math.abs(r.length - 1)) || [],
f = function f() {
return h(l, function (e, t) {
return e && i.hasOwnProperty(t);
}, !0) && !i.hasOwnProperty(n);
};f() ? r[r.length - 1](o, i) : a(function e() {
f() && (s(e), r[r.length - 1](o, i));
});
});
}, u.retry = function (e, t, n) {
var r = [];"function" == typeof e && (n = t, t = e, e = 5), e = parseInt(e, 10) || 5;var i = function (_i2) {
function i(_x4, _x5) {
return _i2.apply(this, arguments);
}
i.toString = function () {
return _i2.toString();
};
return i;
}(function (i, o) {
for (; e;) {
r.push(function (e, t) {
return function (n) {
e(function (e, r) {
n(!e || t, { err: e, result: r });
}, o);
};
}(t, !(e -= 1)));
}u.series(r, function (e, t) {
t = t[t.length - 1], (i || n)(t.err, t.result);
});
});return n ? i() : i;
}, u.waterfall = function (e, t) {
if (t = t || function () {}, !d(e)) {
var n = new Error("First argument to waterfall must be an array of functions");return t(n);
}if (!e.length) return t();!function e(n) {
return function (r) {
if (r) t.apply(null, arguments), t = function t() {};else {
var i = Array.prototype.slice.call(arguments, 1),
o = n.next();o ? i.push(e(o)) : i.push(t), u.setImmediate(function () {
n.apply(null, i);
});
}
};
}(u.iterator(e))();
};var w = function w(e, t, n) {
if (n = n || function () {}, d(t)) e.map(t, function (e, t) {
e && e(function (e) {
var n = Array.prototype.slice.call(arguments, 1);n.length <= 1 && (n = n[0]), t.call(null, e, n);
});
}, n);else {
var r = {};e.each(m(t), function (e, n) {
t[e](function (t) {
var i = Array.prototype.slice.call(arguments, 1);i.length <= 1 && (i = i[0]), r[e] = i, n(t);
});
}, function (e) {
n(e, r);
});
}
};u.parallel = function (e, t) {
w({ map: u.map, each: u.each }, e, t);
}, u.parallelLimit = function (e, t, n) {
w({ map: E(t), each: v(t) }, e, n);
}, u.series = function (e, t) {
if (t = t || function () {}, d(e)) u.mapSeries(e, function (e, t) {
e && e(function (e) {
var n = Array.prototype.slice.call(arguments, 1);n.length <= 1 && (n = n[0]), t.call(null, e, n);
});
}, t);else {
var n = {};u.eachSeries(m(e), function (t, r) {
e[t](function (e) {
var i = Array.prototype.slice.call(arguments, 1);i.length <= 1 && (i = i[0]), n[t] = i, r(e);
});
}, function (e) {
t(e, n);
});
}
}, u.iterator = function (e) {
return function t(n) {
var r = function t() {
return e.length && e[n].apply(null, arguments), t.next();
};return r.next = function () {
return n < e.length - 1 ? t(n + 1) : null;
}, r;
}(0);
}, u.apply = function (e) {
var t = Array.prototype.slice.call(arguments, 1);return function () {
return e.apply(null, t.concat(Array.prototype.slice.call(arguments)));
};
};var R = function R(e, t, n, r) {
var i = [];e(t, function (e, t) {
n(e, function (e, n) {
i = i.concat(n || []), t(e);
});
}, function (e) {
r(e, i);
});
};u.concat = g(R), u.concatSeries = b(R), u.whilst = function (e, t, n) {
e() ? t(function (r) {
if (r) return n(r);u.whilst(e, t, n);
}) : n();
}, u.doWhilst = function (e, t, n) {
e(function (r) {
if (r) return n(r);var i = Array.prototype.slice.call(arguments, 1);t.apply(null, i) ? u.doWhilst(e, t, n) : n();
});
}, u.until = function (e, t, n) {
e() ? n() : t(function (r) {
if (r) return n(r);u.until(e, t, n);
});
}, u.doUntil = function (e, t, n) {
e(function (r) {
if (r) return n(r);var i = Array.prototype.slice.call(arguments, 1);t.apply(null, i) ? n() : u.doUntil(e, t, n);
});
}, u.queue = function (e, t) {
function n(e, t, n, r) {
if (e.started || (e.started = !0), d(t) || (t = [t]), 0 == t.length) return u.setImmediate(function () {
e.drain && e.drain();
});p(t, function (t) {
var i = { data: t, callback: "function" == typeof r ? r : null };n ? e.tasks.unshift(i) : e.tasks.push(i), e.saturated && e.tasks.length === e.concurrency && e.saturated(), u.setImmediate(e.process);
});
}void 0 === t && (t = 1);var r = 0,
i = { tasks: [], concurrency: t, saturated: null, empty: null, drain: null, started: !1, paused: !1, push: function push(e, t) {
n(i, e, !1, t);
}, kill: function kill() {
i.drain = null, i.tasks = [];
}, unshift: function unshift(e, t) {
n(i, e, !0, t);
}, process: function process() {
if (!i.paused && r < i.concurrency && i.tasks.length) {
var t = i.tasks.shift();i.empty && 0 === i.tasks.length && i.empty(), r += 1;var n = function n() {
r -= 1, t.callback && t.callback.apply(t, arguments), i.drain && i.tasks.length + r === 0 && i.drain(), i.process();
},
o = a(n);e(t.data, o);
}
}, length: function length() {
return i.tasks.length;
}, running: function running() {
return r;
}, idle: function idle() {
return i.tasks.length + r === 0;
}, pause: function pause() {
!0 !== i.paused && (i.paused = !0, i.process());
}, resume: function resume() {
!1 !== i.paused && (i.paused = !1, i.process());
} };return i;
}, u.priorityQueue = function (e, t) {
function n(e, t) {
return e.priority - t.priority;
}function r(e, t, n) {
for (var r = -1, i = e.length - 1; r < i;) {
var o = r + (i - r + 1 >>> 1);n(t, e[o]) >= 0 ? r = o : i = o - 1;
}return r;
}function i(e, t, i, o) {
if (e.started || (e.started = !0), d(t) || (t = [t]), 0 == t.length) return u.setImmediate(function () {
e.drain && e.drain();
});p(t, function (t) {
var a = { data: t, priority: i, callback: "function" == typeof o ? o : null };e.tasks.splice(r(e.tasks, a, n) + 1, 0, a), e.saturated && e.tasks.length === e.concurrency && e.saturated(), u.setImmediate(e.process);
});
}var o = u.queue(e, t);return o.push = function (e, t, n) {
i(o, e, t, n);
}, delete o.unshift, o;
}, u.cargo = function (e, t) {
var n = !1,
r = [],
i = { tasks: r, payload: t, saturated: null, empty: null, drain: null, drained: !0, push: function push(e, n) {
d(e) || (e = [e]), p(e, function (e) {
r.push({ data: e, callback: "function" == typeof n ? n : null }), i.drained = !1, i.saturated && r.length === t && i.saturated();
}), u.setImmediate(i.process);
}, process: function o() {
if (!n) {
if (0 === r.length) return i.drain && !i.drained && i.drain(), void (i.drained = !0);var a = "number" == typeof t ? r.splice(0, t) : r.splice(0, r.length),
s = f(a, function (e) {
return e.data;
});i.empty && i.empty(), n = !0, e(s, function () {
n = !1;var e = arguments;p(a, function (t) {
t.callback && t.callback.apply(null, e);
}), o();
});
}
}, length: function length() {
return r.length;
}, running: function running() {
return n;
} };return i;
};var k = function k(e) {
return function (t) {
var n = Array.prototype.slice.call(arguments, 1);t.apply(null, n.concat([function (t) {
var n = Array.prototype.slice.call(arguments, 1);"undefined" != typeof console && (t ? console.error && console.error(t) : console[e] && p(n, function (t) {
console[e](t);
}));
}]));
};
};u.log = k("log"), u.dir = k("dir"), u.memoize = function (e, t) {
var n = {},
r = {};t = t || function (e) {
return e;
};var i = function i() {
var i = Array.prototype.slice.call(arguments),
o = i.pop(),
a = t.apply(null, i);a in n ? u.nextTick(function () {
o.apply(null, n[a]);
}) : a in r ? r[a].push(o) : (r[a] = [o], e.apply(null, i.concat([function () {
n[a] = arguments;var e = r[a];delete r[a];for (var t = 0, i = e.length; t < i; t++) {
e[t].apply(null, arguments);
}
}])));
};return i.memo = n, i.unmemoized = e, i;
}, u.unmemoize = function (e) {
return function () {
return (e.unmemoized || e).apply(null, arguments);
};
}, u.times = function (e, t, n) {
for (var r = [], i = 0; i < e; i++) {
r.push(i);
}return u.map(r, t, n);
}, u.timesSeries = function (e, t, n) {
for (var r = [], i = 0; i < e; i++) {
r.push(i);
}return u.mapSeries(r, t, n);
}, u.seq = function () {
var e = arguments;return function () {
var t = this,
n = Array.prototype.slice.call(arguments),
r = n.pop();u.reduce(e, n, function (e, n, r) {
n.apply(t, e.concat([function () {
var e = arguments[0],
t = Array.prototype.slice.call(arguments, 1);r(e, t);
}]));
}, function (e, n) {
r.apply(t, [e].concat(n));
});
};
}, u.compose = function () {
return u.seq.apply(null, Array.prototype.reverse.call(arguments));
};var A = function A(e, t) {
var n = function n() {
var n = this,
r = Array.prototype.slice.call(arguments),
i = r.pop();return e(t, function (e, t) {
e.apply(n, r.concat([t]));
}, i);
};return arguments.length > 2 ? n.apply(this, Array.prototype.slice.call(arguments, 2)) : n;
};u.applyEach = g(A), u.applyEachSeries = b(A), u.forever = function (e, t) {
function n(r) {
if (r) {
if (t) return t(r);throw r;
}e(n);
}n();
}, void 0 !== e && e.exports ? e.exports = u : (i = [], void 0 !== (o = function () {
return u;
}.apply(t, i)) && (e.exports = o));
}();
}).call(t, n(56), n(148).setImmediate);
}, function (e, t) {
function n(e) {
e = e || {}, this.ms = e.min || 100, this.max = e.max || 1e4, this.factor = e.factor || 2, this.jitter = e.jitter > 0 && e.jitter <= 1 ? e.jitter : 0, this.attempts = 0;
}e.exports = n, n.prototype.duration = function () {
var e = this.ms * Math.pow(this.factor, this.attempts++);if (this.jitter) {
var t = Math.random(),
n = Math.floor(t * this.jitter * e);e = 0 == (1 & Math.floor(10 * t)) ? e - n : e + n;
}return 0 | Math.min(e, this.max);
}, n.prototype.reset = function () {
this.attempts = 0;
}, n.prototype.setMin = function (e) {
this.ms = e;
}, n.prototype.setMax = function (e) {
this.max = e;
}, n.prototype.setJitter = function (e) {
this.jitter = e;
};
}, function (e, t, n) {
(function (t) {
function n(e) {
for (var t = 0; t < e.length; t++) {
var n = e[t];if (n.buffer instanceof ArrayBuffer) {
var r = n.buffer;if (n.byteLength !== r.byteLength) {
var i = new Uint8Array(n.byteLength);i.set(new Uint8Array(r, n.byteOffset, n.byteLength)), r = i.buffer;
}e[t] = r;
}
}
}function r(e, t) {
t = t || {};var r = new o();n(e);for (var i = 0; i < e.length; i++) {
r.append(e[i]);
}return t.type ? r.getBlob(t.type) : r.getBlob();
}function i(e, t) {
return n(e), new Blob(e, t || {});
}var o = t.BlobBuilder || t.WebKitBlobBuilder || t.MSBlobBuilder || t.MozBlobBuilder,
a = function () {
try {
return 2 === new Blob(["hi"]).size;
} catch (e) {
return !1;
}
}(),
s = a && function () {
try {
return 2 === new Blob([new Uint8Array([1, 2])]).size;
} catch (e) {
return !1;
}
}(),
c = o && o.prototype.append && o.prototype.getBlob;e.exports = function () {
return a ? s ? t.Blob : i : c ? r : void 0;
}();
}).call(t, n(1));
}, function (e, t, n) {
var r, i, o;"function" == typeof Symbol && (typeof Symbol === "function" ? Symbol.iterator : "@@iterator"), function (n, a) {
i = [], r = a, void 0 !== (o = "function" == typeof r ? r.apply(t, i) : r) && (e.exports = o);
}(this || window, function () {
function e(e, t) {
var n,
r = null;if (t = t || u, "string" == typeof e && e) for (n = t.length; n--;) {
if (t[n].src === e) {
r = t[n];break;
}
}return r;
}function t(e) {
var t,
n,
r = null;for (e = e || u, t = 0, n = e.length; t < n; t++) {
if (!e[t].hasAttribute("src")) {
if (r) {
r = null;break;
}r = e[t];
}
}return r;
}function n(e, t) {
var r,
i,
o = null,
a = "number" == typeof t;return t = a ? Math.round(t) : 0, "string" == typeof e && e && (a ? r = e.match(/(data:text\/javascript(?:;[^,]+)?,.+?|(?:|blob:)(?:http[s]?|file):\/\/[\/]?.+?\/[^:\)]*?)(?::\d+)(?::\d+)?/) : (r = e.match(/^(?:|[^:@]*@|.+\)@(?=data:text\/javascript|blob|http[s]?|file)|.+?\s+(?: at |@)(?:[^:\(]+ )*[\(]?)(data:text\/javascript(?:;[^,]+)?,.+?|(?:|blob:)(?:http[s]?|file):\/\/[\/]?.+?\/[^:\)]*?)(?::\d+)(?::\d+)?/)) && r[1] || (r = e.match(/\)@(data:text\/javascript(?:;[^,]+)?,.+?|(?:|blob:)(?:http[s]?|file):\/\/[\/]?.+?\/[^:\)]*?)(?::\d+)(?::\d+)?/)), r && r[1] && (t > 0 ? (i = e.slice(e.indexOf(r[0]) + r[0].length), o = n(i, t - 1)) : o = r[1])), o;
}function r() {
return null;
}function i() {
return null;
}function o() {
if (0 === u.length) return null;var r,
i,
s,
m,
v,
g = [],
y = o.skipStackDepth || 1;for (r = 0; r < u.length; r++) {
d && l ? a.test(u[r].readyState) && g.push(u[r]) : g.push(u[r]);
}if (i = new Error(), f && (s = i.stack), !s && h) try {
throw i;
} catch (e) {
s = e.stack;
}if (s && (m = n(s, y), !(v = e(m, g)) && c && m === c && (v = t(g))), v || 1 === g.length && (v = g[0]), v || p && (v = document.currentScript), !v && d && l) for (r = g.length; r--;) {
if ("interactive" === g[r].readyState) {
v = g[r];break;
}
}return v || (v = g[g.length - 1] || null), v;
}var a = /^(interactive|loaded|complete)$/,
s = window.location ? window.location.href : null,
c = s ? s.replace(/#.*$/, "").replace(/\?.*$/, "") || null : null,
u = document.getElementsByTagName("script"),
l = "readyState" in (u[0] || document.createElement("script")),
d = !window.opera || "[object Opera]" !== window.opera.toString(),
p = "currentScript" in document;"stackTraceLimit" in Error && Error.stackTraceLimit !== 1 / 0 && (Error.stackTraceLimit, Error.stackTraceLimit = 1 / 0);var f = !1,
h = !1;!function () {
try {
var e = new Error();throw f = "string" == typeof e.stack && !!e.stack, e;
} catch (e) {
h = "string" == typeof e.stack && !!e.stack;
}
}(), o.skipStackDepth = 1;var m = o;return m.near = o, m.far = r, m.origin = i, m;
});
}, function (e, t, n) {
(function (t) {
var n;n = "undefined" != typeof window ? window : void 0 !== t ? t : "undefined" != typeof self ? self : {}, e.exports = n;
}).call(t, n(1));
}, function (e, t, n) {
(function (t) {
function r(e) {
function n(e) {
if (!e) return !1;if (t.Buffer && t.Buffer.isBuffer && t.Buffer.isBuffer(e) || t.ArrayBuffer && e instanceof ArrayBuffer || t.Blob && e instanceof Blob || t.File && e instanceof File) return !0;if (o(e)) {
for (var r = 0; r < e.length; r++) {
if (n(e[r])) return !0;
}
} else if (e && "object" == (void 0 === e ? "undefined" : i(e))) {
e.toJSON && "function" == typeof e.toJSON && (e = e.toJSON());for (var a in e) {
if (Object.prototype.hasOwnProperty.call(e, a) && n(e[a])) return !0;
}
}return !1;
}return n(e);
}var i = "function" == typeof Symbol && "symbol" == typeof (typeof Symbol === "function" ? Symbol.iterator : "@@iterator") ? function (e) {
return typeof e;
} : function (e) {
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== (typeof Symbol === "function" ? Symbol.prototype : "@@prototype") ? "symbol" : typeof e;
},
o = n(76);e.exports = r;
}).call(t, n(1));
}, function (e, t) {
e.exports = Array.isArray || function (e) {
return "[object Array]" == Object.prototype.toString.call(e);
};
}, function (e, t) {
try {
e.exports = "undefined" != typeof XMLHttpRequest && "withCredentials" in new XMLHttpRequest();
} catch (t) {
e.exports = !1;
}
}, function (e, t, n) {
function r(e, t) {
this.logStorage = e, this.stringifyObjects = !(!t || !t.stringifyObjects) && t.stringifyObjects, this.storeInterval = t && t.storeInterval ? t.storeInterval : 3e4, this.maxEntryLength = t && t.maxEntryLength ? t.maxEntryLength : 1e4, Object.keys(o.levels).forEach(function (e) {
this[o.levels[e]] = function (e) {
this._log.apply(this, arguments);
}.bind(this, e);
}.bind(this)), this.storeLogsIntervalID = null, this.queue = [], this.totalLen = 0, this.outputCache = [];
}var i = "function" == typeof Symbol && "symbol" == typeof (typeof Symbol === "function" ? Symbol.iterator : "@@iterator") ? function (e) {
return typeof e;
} : function (e) {
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== (typeof Symbol === "function" ? Symbol.prototype : "@@prototype") ? "symbol" : typeof e;
},
o = n(42);r.prototype.stringify = function (e) {
try {
return JSON.stringify(e);
} catch (e) {
return "[object with circular refs?]";
}
}, r.prototype.formatLogMessage = function (e) {
for (var t = "", n = 1, r = arguments.length; n < r; n++) {
var a = arguments[n];!this.stringifyObjects && e !== o.levels.ERROR || "object" !== (void 0 === a ? "undefined" : i(a)) || (a = this.stringify(a)), t += a, n != r - 1 && (t += " ");
}return t.length ? t : null;
}, r.prototype._log = function () {
var e = this.formatLogMessage.apply(this, arguments);if (e) {
var t = this.queue.length ? this.queue[this.queue.length - 1] : void 0;("object" === (void 0 === t ? "undefined" : i(t)) ? t.text : t) == e ? "object" === (void 0 === t ? "undefined" : i(t)) ? t.count += 1 : this.queue[this.queue.length - 1] = { text: e, count: 2 } : (this.queue.push(e), this.totalLen += e.length);
}this.totalLen >= this.maxEntryLength && this._flush(!0, !0);
}, r.prototype.start = function () {
this._reschedulePublishInterval();
}, r.prototype._reschedulePublishInterval = function () {
this.storeLogsIntervalID && (window.clearTimeout(this.storeLogsIntervalID), this.storeLogsIntervalID = null), this.storeLogsIntervalID = window.setTimeout(this._flush.bind(this, !1, !0), this.storeInterval);
}, r.prototype.flush = function () {
this._flush(!1, !0);
}, r.prototype._flush = function (e, t) {
this.totalLen > 0 && (this.logStorage.isReady() || e) && (this.logStorage.isReady() ? (this.outputCache.length && (this.outputCache.forEach(function (e) {
this.logStorage.storeLogs(e);
}.bind(this)), this.outputCache = []), this.logStorage.storeLogs(this.queue)) : this.outputCache.push(this.queue), this.queue = [], this.totalLen = 0), t && this._reschedulePublishInterval();
}, r.prototype.stop = function () {
this._flush(!1, !1);
}, e.exports = r;
}, function (e, t, n) {
(function (e, r) {
var i,
o = "function" == typeof Symbol && "symbol" == typeof (typeof Symbol === "function" ? Symbol.iterator : "@@iterator") ? function (e) {
return typeof e;
} : function (e) {
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== (typeof Symbol === "function" ? Symbol.prototype : "@@prototype") ? "symbol" : typeof e;
};(function () {
function a(e, t) {
function n(e) {
if (n[e] !== g) return n[e];var o;if ("bug-string-char-index" == e) o = "a" != "a"[0];else if ("json" == e) o = n("json-stringify") && n("json-parse");else {
var a,
s = "{\"a\":[1,true,false,null,\"\\u0000\\b\\n\\f\\r\\t\"]}";if ("json-stringify" == e) {
var c = t.stringify,
l = "function" == typeof c && S;if (l) {
(a = function a() {
return 1;
}).toJSON = a;try {
l = "0" === c(0) && "0" === c(new r()) && '""' == c(new i()) && c(b) === g && c(g) === g && c() === g && "1" === c(a) && "[1]" == c([a]) && "[null]" == c([g]) && "null" == c(null) && "[null,null,null]" == c([g, b, null]) && c({ a: [a, !0, !1, null, "\0\b\n\f\r\t"] }) == s && "1" === c(null, a) && "[\n 1,\n 2\n]" == c([1, 2], null, 1) && '"-271821-04-20T00:00:00.000Z"' == c(new u(-864e13)) && '"+275760-09-13T00:00:00.000Z"' == c(new u(864e13)) && '"-000001-01-01T00:00:00.000Z"' == c(new u(-621987552e5)) && '"1969-12-31T23:59:59.999Z"' == c(new u(-1));
} catch (e) {
l = !1;
}
}o = l;
}if ("json-parse" == e) {
var d = t.parse;if ("function" == typeof d) try {
if (0 === d("0") && !d(!1)) {
a = d(s);var p = 5 == a.a.length && 1 === a.a[0];if (p) {
try {
p = !d('"\t"');
} catch (e) {}if (p) try {
p = 1 !== d("01");
} catch (e) {}if (p) try {
p = 1 !== d("1.");
} catch (e) {}
}
}
} catch (e) {
p = !1;
}o = p;
}
}return n[e] = !!o;
}e || (e = l.Object()), t || (t = l.Object());var r = e.Number || l.Number,
i = e.String || l.String,
s = e.Object || l.Object,
u = e.Date || l.Date,
d = e.SyntaxError || l.SyntaxError,
p = e.TypeError || l.TypeError,
f = e.Math || l.Math,
h = e.JSON || l.JSON;"object" == (void 0 === h ? "undefined" : o(h)) && h && (t.stringify = h.stringify, t.parse = h.parse);var _m,
_v,
g,
y = s.prototype,
b = y.toString,
S = new u(-0xc782b5b800cec);try {
S = -109252 == S.getUTCFullYear() && 0 === S.getUTCMonth() && 1 === S.getUTCDate() && 10 == S.getUTCHours() && 37 == S.getUTCMinutes() && 6 == S.getUTCSeconds() && 708 == S.getUTCMilliseconds();
} catch (e) {}if (!n("json")) {
var E = n("bug-string-char-index");if (!S) var T = f.floor,
_ = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334],
C = function C(e, t) {
return _[t] + 365 * (e - 1970) + T((e - 1969 + (t = +(t > 1))) / 4) - T((e - 1901 + t) / 100) + T((e - 1601 + t) / 400);
};if ((_m = y.hasOwnProperty) || (_m = function m(e) {
var t,
n = {};return (n.__proto__ = null, n.__proto__ = { toString: 1 }, n).toString != b ? _m = function m(e) {
var t = this.__proto__,
n = e in (this.__proto__ = null, this);return this.__proto__ = t, n;
} : (t = n.constructor, _m = function m(e) {
var n = (this.constructor || t).prototype;return e in this && !(e in n && this[e] === n[e]);
}), n = null, _m.call(this, e);
}), _v = function v(e, t) {
var n,
r,
i,
a = 0;(n = function n() {
this.valueOf = 0;
}).prototype.valueOf = 0, r = new n();for (i in r) {
_m.call(r, i) && a++;
}return n = r = null, a ? _v = 2 == a ? function (e, t) {
var n,
r = {},
i = "[object Function]" == b.call(e);for (n in e) {
i && "prototype" == n || _m.call(r, n) || !(r[n] = 1) || !_m.call(e, n) || t(n);
}
} : function (e, t) {
var n,
r,
i = "[object Function]" == b.call(e);for (n in e) {
i && "prototype" == n || !_m.call(e, n) || (r = "constructor" === n) || t(n);
}(r || _m.call(e, n = "constructor")) && t(n);
} : (r = ["valueOf", "toString", "toLocaleString", "propertyIsEnumerable", "isPrototypeOf", "hasOwnProperty", "constructor"], _v = function v(e, t) {
var n,
i,
a = "[object Function]" == b.call(e),
s = !a && "function" != typeof e.constructor && c[o(e.hasOwnProperty)] && e.hasOwnProperty || _m;for (n in e) {
a && "prototype" == n || !s.call(e, n) || t(n);
}for (i = r.length; n = r[--i]; s.call(e, n) && t(n)) {}
}), _v(e, t);
}, !n("json-stringify")) {
var w = { 92: "\\\\", 34: '\\"', 8: "\\b", 12: "\\f", 10: "\\n", 13: "\\r", 9: "\\t" },
R = function R(e, t) {
return ("000000" + (t || 0)).slice(-e);
},
k = function k(e) {
for (var t = '"', n = 0, r = e.length, i = !E || r > 10, o = i && (E ? e.split("") : e); n < r; n++) {
var a = e.charCodeAt(n);switch (a) {case 8:case 9:case 10:case 12:case 13:case 34:case 92:
t += w[a];break;default:
if (a < 32) {
t += "\\u00" + R(2, a.toString(16));break;
}t += i ? o[n] : e.charAt(n);}
}return t + '"';
},
A = function e(t, n, r, i, a, s, c) {
var u, l, d, f, h, y, S, E, _, w, A, I, P, O, D, L;try {
u = n[t];
} catch (e) {}if ("object" == (void 0 === u ? "undefined" : o(u)) && u) if ("[object Date]" != (l = b.call(u)) || _m.call(u, "toJSON")) "function" == typeof u.toJSON && ("[object Number]" != l && "[object String]" != l && "[object Array]" != l || _m.call(u, "toJSON")) && (u = u.toJSON(t));else if (u > -1 / 0 && u < 1 / 0) {
if (C) {
for (h = T(u / 864e5), d = T(h / 365.2425) + 1970 - 1; C(d + 1, 0) <= h; d++) {}for (f = T((h - C(d, 0)) / 30.42); C(d, f + 1) <= h; f++) {}h = 1 + h - C(d, f), y = (u % 864e5 + 864e5) % 864e5, S = T(y / 36e5) % 24, E = T(y / 6e4) % 60, _ = T(y / 1e3) % 60, w = y % 1e3;
} else d = u.getUTCFullYear(), f = u.getUTCMonth(), h = u.getUTCDate(), S = u.getUTCHours(), E = u.getUTCMinutes(), _ = u.getUTCSeconds(), w = u.getUTCMilliseconds();u = (d <= 0 || d >= 1e4 ? (d < 0 ? "-" : "+") + R(6, d < 0 ? -d : d) : R(4, d)) + "-" + R(2, f + 1) + "-" + R(2, h) + "T" + R(2, S) + ":" + R(2, E) + ":" + R(2, _) + "." + R(3, w) + "Z";
} else u = null;if (r && (u = r.call(n, t, u)), null === u) return "null";if ("[object Boolean]" == (l = b.call(u))) return "" + u;if ("[object Number]" == l) return u > -1 / 0 && u < 1 / 0 ? "" + u : "null";if ("[object String]" == l) return k("" + u);if ("object" == (void 0 === u ? "undefined" : o(u))) {
for (O = c.length; O--;) {
if (c[O] === u) throw p();
}if (c.push(u), A = [], D = s, s += a, "[object Array]" == l) {
for (P = 0, O = u.length; P < O; P++) {
I = e(P, u, r, i, a, s, c), A.push(I === g ? "null" : I);
}L = A.length ? a ? "[\n" + s + A.join(",\n" + s) + "\n" + D + "]" : "[" + A.join(",") + "]" : "[]";
} else _v(i || u, function (t) {
var n = e(t, u, r, i, a, s, c);n !== g && A.push(k(t) + ":" + (a ? " " : "") + n);
}), L = A.length ? a ? "{\n" + s + A.join(",\n" + s) + "\n" + D + "}" : "{" + A.join(",") + "}" : "{}";return c.pop(), L;
}
};t.stringify = function (e, t, n) {
var r, i, a, s;if (c[void 0 === t ? "undefined" : o(t)] && t) if ("[object Function]" == (s = b.call(t))) i = t;else if ("[object Array]" == s) {
a = {};for (var u, l = 0, d = t.length; l < d; u = t[l++], ("[object String]" == (s = b.call(u)) || "[object Number]" == s) && (a[u] = 1)) {}
}if (n) if ("[object Number]" == (s = b.call(n))) {
if ((n -= n % 1) > 0) for (r = "", n > 10 && (n = 10); r.length < n; r += " ") {}
} else "[object String]" == s && (r = n.length <= 10 ? n : n.slice(0, 10));return A("", (u = {}, u[""] = e, u), i, a, r, "", []);
};
}if (!n("json-parse")) {
var I,
P,
O = i.fromCharCode,
D = { 92: "\\", 34: '"', 47: "/", 98: "\b", 116: "\t", 110: "\n", 102: "\f", 114: "\r" },
L = function L() {
throw I = P = null, d();
},
N = function N() {
for (var e, t, n, r, i, o = P, a = o.length; I < a;) {
switch (i = o.charCodeAt(I)) {case 9:case 10:case 13:case 32:
I++;break;case 123:case 125:case 91:case 93:case 58:case 44:
return e = E ? o.charAt(I) : o[I], I++, e;case 34:
for (e = "@", I++; I < a;) {
if ((i = o.charCodeAt(I)) < 32) L();else if (92 == i) switch (i = o.charCodeAt(++I)) {case 92:case 34:case 47:case 98:case 116:case 110:case 102:case 114:
e += D[i], I++;break;case 117:
for (t = ++I, n = I + 4; I < n; I++) {
(i = o.charCodeAt(I)) >= 48 && i <= 57 || i >= 97 && i <= 102 || i >= 65 && i <= 70 || L();
}e += O("0x" + o.slice(t, I));break;default:
L();} else {
if (34 == i) break;for (i = o.charCodeAt(I), t = I; i >= 32 && 92 != i && 34 != i;) {
i = o.charCodeAt(++I);
}e += o.slice(t, I);
}
}if (34 == o.charCodeAt(I)) return I++, e;L();default:
if (t = I, 45 == i && (r = !0, i = o.charCodeAt(++I)), i >= 48 && i <= 57) {
for (48 == i && (i = o.charCodeAt(I + 1)) >= 48 && i <= 57 && L(), r = !1; I < a && (i = o.charCodeAt(I)) >= 48 && i <= 57; I++) {}if (46 == o.charCodeAt(I)) {
for (n = ++I; n < a && (i = o.charCodeAt(n)) >= 48 && i <= 57; n++) {}n == I && L(), I = n;
}if (101 == (i = o.charCodeAt(I)) || 69 == i) {
for (i = o.charCodeAt(++I), 43 != i && 45 != i || I++, n = I; n < a && (i = o.charCodeAt(n)) >= 48 && i <= 57; n++) {}n == I && L(), I = n;
}return +o.slice(t, I);
}if (r && L(), "true" == o.slice(I, I + 4)) return I += 4, !0;if ("false" == o.slice(I, I + 5)) return I += 5, !1;if ("null" == o.slice(I, I + 4)) return I += 4, null;L();}
}return "$";
},
M = function e(t) {
var n, r;if ("$" == t && L(), "string" == typeof t) {
if ("@" == (E ? t.charAt(0) : t[0])) return t.slice(1);if ("[" == t) {
for (n = []; "]" != (t = N()); r || (r = !0)) {
r && ("," == t ? "]" == (t = N()) && L() : L()), "," == t && L(), n.push(e(t));
}return n;
}if ("{" == t) {
for (n = {}; "}" != (t = N()); r || (r = !0)) {
r && ("," == t ? "}" == (t = N()) && L() : L()), "," != t && "string" == typeof t && "@" == (E ? t.charAt(0) : t[0]) && ":" == N() || L(), n[t.slice(1)] = e(N());
}return n;
}L();
}return t;
},
x = function x(e, t, n) {
var r = j(e, t, n);r === g ? delete e[t] : e[t] = r;
},
j = function j(e, t, n) {
var r,
i = e[t];if ("object" == (void 0 === i ? "undefined" : o(i)) && i) if ("[object Array]" == b.call(i)) for (r = i.length; r--;) {
x(i, r, n);
} else _v(i, function (e) {
x(i, e, n);
});return n.call(e, t, i);
};t.parse = function (e, t) {
var n, r;return I = 0, P = "" + e, n = M(N()), "$" != N() && L(), I = P = null, t && "[object Function]" == b.call(t) ? j((r = {}, r[""] = n, r), "", t) : n;
};
}
}return t.runInContext = a, t;
}var s = n(25),
c = { function: !0, object: !0 },
u = c[o(t)] && t && !t.nodeType && t,
l = c["undefined" == typeof window ? "undefined" : o(window)] && window || this,
d = u && c[o(e)] && e && !e.nodeType && "object" == (void 0 === r ? "undefined" : o(r)) && r;if (!d || d.global !== d && d.window !== d && d.self !== d || (l = d), u && !s) a(l, u);else {
var p = l.JSON,
f = l.JSON3,
h = !1,
m = a(l, l.JSON3 = { noConflict: function noConflict() {
return h || (h = !0, l.JSON = p, l.JSON3 = f, p = f = null), m;
} });l.JSON = { parse: m.parse, stringify: m.stringify };
}s && void 0 !== (i = function () {
return m;
}.call(t, n, t, e)) && (e.exports = i);
}).call(this);
}).call(t, n(58)(e), n(1));
}, function (e, t, n) {
var r,
i = "function" == typeof Symbol && "symbol" == typeof (typeof Symbol === "function" ? Symbol.iterator : "@@iterator") ? function (e) {
return typeof e;
} : function (e) {
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== (typeof Symbol === "function" ? Symbol.prototype : "@@prototype") ? "symbol" : typeof e;
};!function (o) {
function a(e, t, n) {
var r = 0,
i = [0],
o = "",
a = null,
o = n || "UTF8";if ("UTF8" !== o && "UTF16" !== o) throw "encoding must be UTF8 or UTF16";if ("HEX" === t) {
if (0 != e.length % 2) throw "srcString of HEX type must be in byte increments";a = u(e), r = a.binLen, i = a.value;
} else if ("ASCII" === t || "TEXT" === t) a = c(e, o), r = a.binLen, i = a.value;else {
if ("B64" !== t) throw "inputFormat must be HEX, TEXT, ASCII, or B64";a = l(e), r = a.binLen, i = a.value;
}this.getHash = function (e, t, n, o) {
var a,
s = null,
c = i.slice(),
u = r;if (3 === arguments.length ? "number" != typeof n && (o = n, n = 1) : 2 === arguments.length && (n = 1), n !== parseInt(n, 10) || 1 > n) throw "numRounds must a integer >= 1";switch (t) {case "HEX":
s = d;break;case "B64":
s = p;break;default:
throw "format must be HEX or B64";}if ("SHA-1" === e) for (a = 0; a < n; a++) {
c = j(c, u), u = 160;
} else if ("SHA-224" === e) for (a = 0; a < n; a++) {
c = F(c, u, e), u = 224;
} else if ("SHA-256" === e) for (a = 0; a < n; a++) {
c = F(c, u, e), u = 256;
} else if ("SHA-384" === e) for (a = 0; a < n; a++) {
c = F(c, u, e), u = 384;
} else {
if ("SHA-512" !== e) throw "Chosen SHA variant is not supported";for (a = 0; a < n; a++) {
c = F(c, u, e), u = 512;
}
}return s(c, f(o));
}, this.getHMAC = function (e, t, n, a, s) {
var h,
m,
v,
g,
y = [],
b = [];switch (h = null, a) {case "HEX":
a = d;break;case "B64":
a = p;break;default:
throw "outputFormat must be HEX or B64";}if ("SHA-1" === n) m = 64, g = 160;else if ("SHA-224" === n) m = 64, g = 224;else if ("SHA-256" === n) m = 64, g = 256;else if ("SHA-384" === n) m = 128, g = 384;else {
if ("SHA-512" !== n) throw "Chosen SHA variant is not supported";m = 128, g = 512;
}if ("HEX" === t) h = u(e), v = h.binLen, h = h.value;else if ("ASCII" === t || "TEXT" === t) h = c(e, o), v = h.binLen, h = h.value;else {
if ("B64" !== t) throw "inputFormat must be HEX, TEXT, ASCII, or B64";h = l(e), v = h.binLen, h = h.value;
}for (e = 8 * m, t = m / 4 - 1, m < v / 8 ? (h = "SHA-1" === n ? j(h, v) : F(h, v, n), h[t] &= 4294967040) : m > v / 8 && (h[t] &= 4294967040), m = 0; m <= t; m += 1) {
y[m] = 909522486 ^ h[m], b[m] = 1549556828 ^ h[m];
}return n = "SHA-1" === n ? j(b.concat(j(y.concat(i), e + r)), e + g) : F(b.concat(F(y.concat(i), e + r, n)), e + g, n), a(n, f(s));
};
}function s(e, t) {
this.a = e, this.b = t;
}function c(e, t) {
var n,
r,
i = [],
o = [],
a = 0;if ("UTF8" === t) for (r = 0; r < e.length; r += 1) {
for (n = e.charCodeAt(r), o = [], 2048 < n ? (o[0] = 224 | (61440 & n) >>> 12, o[1] = 128 | (4032 & n) >>> 6, o[2] = 128 | 63 & n) : 128 < n ? (o[0] = 192 | (1984 & n) >>> 6, o[1] = 128 | 63 & n) : o[0] = n, n = 0; n < o.length; n += 1) {
i[a >>> 2] |= o[n] << 24 - a % 4 * 8, a += 1;
}
} else if ("UTF16" === t) for (r = 0; r < e.length; r += 1) {
i[a >>> 2] |= e.charCodeAt(r) << 16 - a % 4 * 8, a += 2;
}return { value: i, binLen: 8 * a };
}function u(e) {
var t,
n,
r = [],
i = e.length;if (0 != i % 2) throw "String of HEX type must be in byte increments";for (t = 0; t < i; t += 2) {
if (n = parseInt(e.substr(t, 2), 16), isNaN(n)) throw "String of HEX type contains invalid characters";r[t >>> 3] |= n << 24 - t % 8 * 4;
}return { value: r, binLen: 4 * i };
}function l(e) {
var t,
n,
r,
i,
o,
a = [],
s = 0;if (-1 === e.search(/^[a-zA-Z0-9=+\/]+$/)) throw "Invalid character in base-64 string";if (t = e.indexOf("="), e = e.replace(/\=/g, ""), -1 !== t && t < e.length) throw "Invalid '=' found in base-64 string";for (n = 0; n < e.length; n += 4) {
for (o = e.substr(n, 4), r = i = 0; r < o.length; r += 1) {
t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(o[r]), i |= t << 18 - 6 * r;
}for (r = 0; r < o.length - 1; r += 1) {
a[s >> 2] |= (i >>> 16 - 8 * r & 255) << 24 - s % 4 * 8, s += 1;
}
}return { value: a, binLen: 8 * s };
}function d(e, t) {
var n,
r,
i = "",
o = 4 * e.length;for (n = 0; n < o; n += 1) {
r = e[n >>> 2] >>> 8 * (3 - n % 4), i += "0123456789abcdef".charAt(r >>> 4 & 15) + "0123456789abcdef".charAt(15 & r);
}return t.outputUpper ? i.toUpperCase() : i;
}function p(e, t) {
var n,
r,
i,
o = "",
a = 4 * e.length;for (n = 0; n < a; n += 3) {
for (i = (e[n >>> 2] >>> 8 * (3 - n % 4) & 255) << 16 | (e[n + 1 >>> 2] >>> 8 * (3 - (n + 1) % 4) & 255) << 8 | e[n + 2 >>> 2] >>> 8 * (3 - (n + 2) % 4) & 255, r = 0; 4 > r; r += 1) {
o = 8 * n + 6 * r <= 32 * e.length ? o + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(i >>> 6 * (3 - r) & 63) : o + t.b64Pad;
}
}return o;
}function f(e) {
var t = { outputUpper: !1, b64Pad: "=" };try {
e.hasOwnProperty("outputUpper") && (t.outputUpper = e.outputUpper), e.hasOwnProperty("b64Pad") && (t.b64Pad = e.b64Pad);
} catch (e) {}if ("boolean" != typeof t.outputUpper) throw "Invalid outputUpper formatting option";if ("string" != typeof t.b64Pad) throw "Invalid b64Pad formatting option";return t;
}function h(e, t) {
return e << t | e >>> 32 - t;
}function m(e, t) {
return e >>> t | e << 32 - t;
}function v(e, t) {
var n = null,
n = new s(e.a, e.b);return n = 32 >= t ? new s(n.a >>> t | n.b << 32 - t & 4294967295, n.b >>> t | n.a << 32 - t & 4294967295) : new s(n.b >>> t - 32 | n.a << 64 - t & 4294967295, n.a >>> t - 32 | n.b << 64 - t & 4294967295);
}function g(e, t) {
return 32 >= t ? new s(e.a >>> t, e.b >>> t | e.a << 32 - t & 4294967295) : new s(0, e.a >>> t - 32);
}function y(e, t, n) {
return e ^ t ^ n;
}function b(e, t, n) {
return e & t ^ ~e & n;
}function S(e, t, n) {
return new s(e.a & t.a ^ ~e.a & n.a, e.b & t.b ^ ~e.b & n.b);
}function E(e, t, n) {
return e & t ^ e & n ^ t & n;
}function T(e, t, n) {
return new s(e.a & t.a ^ e.a & n.a ^ t.a & n.a, e.b & t.b ^ e.b & n.b ^ t.b & n.b);
}function _(e) {
return m(e, 2) ^ m(e, 13) ^ m(e, 22);
}function C(e) {
var t = v(e, 28),
n = v(e, 34);return e = v(e, 39), new s(t.a ^ n.a ^ e.a, t.b ^ n.b ^ e.b);
}function w(e) {
return m(e, 6) ^ m(e, 11) ^ m(e, 25);
}function R(e) {
var t = v(e, 14),
n = v(e, 18);return e = v(e, 41), new s(t.a ^ n.a ^ e.a, t.b ^ n.b ^ e.b);
}function k(e) {
return m(e, 7) ^ m(e, 18) ^ e >>> 3;
}function A(e) {
var t = v(e, 1),
n = v(e, 8);return e = g(e, 7), new s(t.a ^ n.a ^ e.a, t.b ^ n.b ^ e.b);
}function I(e) {
return m(e, 17) ^ m(e, 19) ^ e >>> 10;
}function P(e) {
var t = v(e, 19),
n = v(e, 61);return e = g(e, 6), new s(t.a ^ n.a ^ e.a, t.b ^ n.b ^ e.b);
}function O(e, t) {
var n = (65535 & e) + (65535 & t);return ((e >>> 16) + (t >>> 16) + (n >>> 16) & 65535) << 16 | 65535 & n;
}function D(e, t, n, r) {
var i = (65535 & e) + (65535 & t) + (65535 & n) + (65535 & r);return ((e >>> 16) + (t >>> 16) + (n >>> 16) + (r >>> 16) + (i >>> 16) & 65535) << 16 | 65535 & i;
}function L(e, t, n, r, i) {
var o = (65535 & e) + (65535 & t) + (65535 & n) + (65535 & r) + (65535 & i);return ((e >>> 16) + (t >>> 16) + (n >>> 16) + (r >>> 16) + (i >>> 16) + (o >>> 16) & 65535) << 16 | 65535 & o;
}function N(e, t) {
var n, r, i;return n = (65535 & e.b) + (65535 & t.b), r = (e.b >>> 16) + (t.b >>> 16) + (n >>> 16), i = (65535 & r) << 16 | 65535 & n, n = (65535 & e.a) + (65535 & t.a) + (r >>> 16), r = (e.a >>> 16) + (t.a >>> 16) + (n >>> 16), new s((65535 & r) << 16 | 65535 & n, i);
}function M(e, t, n, r) {
var i, o, a;return i = (65535 & e.b) + (65535 & t.b) + (65535 & n.b) + (65535 & r.b), o = (e.b >>> 16) + (t.b >>> 16) + (n.b >>> 16) + (r.b >>> 16) + (i >>> 16), a = (65535 & o) << 16 | 65535 & i, i = (65535 & e.a) + (65535 & t.a) + (65535 & n.a) + (65535 & r.a) + (o >>> 16), o = (e.a >>> 16) + (t.a >>> 16) + (n.a >>> 16) + (r.a >>> 16) + (i >>> 16), new s((65535 & o) << 16 | 65535 & i, a);
}function x(e, t, n, r, i) {
var o, a, c;return o = (65535 & e.b) + (65535 & t.b) + (65535 & n.b) + (65535 & r.b) + (65535 & i.b), a = (e.b >>> 16) + (t.b >>> 16) + (n.b >>> 16) + (r.b >>> 16) + (i.b >>> 16) + (o >>> 16), c = (65535 & a) << 16 | 65535 & o, o = (65535 & e.a) + (65535 & t.a) + (65535 & n.a) + (65535 & r.a) + (65535 & i.a) + (a >>> 16), a = (e.a >>> 16) + (t.a >>> 16) + (n.a >>> 16) + (r.a >>> 16) + (i.a >>> 16) + (o >>> 16), new s((65535 & a) << 16 | 65535 & o, c);
}function j(e, t) {
var n,
r,
i,
o,
a,
s,
c,
u,
l,
d = [],
p = b,
f = y,
m = E,
v = h,
g = O,
S = L,
T = [1732584193, 4023233417, 2562383102, 271733878, 3285377520];for (e[t >>> 5] |= 128 << 24 - t % 32, e[15 + (t + 65 >>> 9 << 4)] = t, l = e.length, c = 0; c < l; c += 16) {
for (n = T[0], r = T[1], i = T[2], o = T[3], a = T[4], u = 0; 80 > u; u += 1) {
d[u] = 16 > u ? e[u + c] : v(d[u - 3] ^ d[u - 8] ^ d[u - 14] ^ d[u - 16], 1), s = 20 > u ? S(v(n, 5), p(r, i, o), a, 1518500249, d[u]) : 40 > u ? S(v(n, 5), f(r, i, o), a, 1859775393, d[u]) : 60 > u ? S(v(n, 5), m(r, i, o), a, 2400959708, d[u]) : S(v(n, 5), f(r, i, o), a, 3395469782, d[u]), a = o, o = i, i = v(r, 30), r = n, n = s;
}T[0] = g(n, T[0]), T[1] = g(r, T[1]), T[2] = g(i, T[2]), T[3] = g(o, T[3]), T[4] = g(a, T[4]);
}return T;
}function F(e, t, n) {
var r,
i,
o,
a,
c,
u,
l,
d,
p,
f,
h,
m,
v,
g,
y,
j,
F,
U,
B,
J,
G,
H,
V,
W,
K,
q,
z = [],
$ = [1116352408, 1899447441, 3049323471, 3921009573, 961987163, 1508970993, 2453635748, 2870763221, 3624381080, 310598401, 607225278, 1426881987, 1925078388, 2162078206, 2614888103, 3248222580, 3835390401, 4022224774, 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986, 2554220882, 2821834349, 2952996808, 3210313671, 3336571891, 3584528711, 113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291, 1695183700, 1986661051, 2177026350, 2456956037, 2730485921, 2820302411, 3259730800, 3345764771, 3516065817, 3600352804, 4094571909, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, 1537002063, 1747873779, 1955562222, 2024104815, 2227730452, 2361852424, 2428436474, 2756734187, 3204031479, 3329325298];if (f = [3238371032, 914150663, 812702999, 4144912697, 4290775857, 1750603025, 1694076839, 3204075428], i = [1779033703, 3144134277, 1013904242, 2773480762, 1359893119, 2600822924, 528734635, 1541459225], "SHA-224" === n || "SHA-256" === n) h = 64, r = 15 + (t + 65 >>> 9 << 4), g = 16, y = 1, K = Number, j = O, F = D, U = L, B = k, J = I, G = _, H = w, W = E, V = b, f = "SHA-224" === n ? f : i;else {
if ("SHA-384" !== n && "SHA-512" !== n) throw "Unexpected error in SHA-2 implementation";h = 80, r = 31 + (t + 128 >>> 10 << 5), g = 32, y = 2, K = s, j = N, F = M, U = x, B = A, J = P, G = C, H = R, W = T, V = S, $ = [new K($[0], 3609767458), new K($[1], 602891725), new K($[2], 3964484399), new K($[3], 2173295548), new K($[4], 4081628472), new K($[5], 3053834265), new K($[6], 2937671579), new K($[7], 3664609560), new K($[8], 2734883394), new K($[9], 1164996542), new K($[10], 1323610764), new K($[11], 3590304994), new K($[12], 4068182383), new K($[13], 991336113), new K($[14], 633803317), new K($[15], 3479774868), new K($[16], 2666613458), new K($[17], 944711139), new K($[18], 2341262773), new K($[19], 2007800933), new K($[20], 1495990901), new K($[21], 1856431235), new K($[22], 3175218132), new K($[23], 2198950837), new K($[24], 3999719339), new K($[25], 766784016), new K($[26], 2566594879), new K($[27], 3203337956), new K($[28], 1034457026), new K($[29], 2466948901), new K($[30], 3758326383), new K($[31], 168717936), new K($[32], 1188179964), new K($[33], 1546045734), new K($[34], 1522805485), new K($[35], 2643833823), new K($[36], 2343527390), new K($[37], 1014477480), new K($[38], 1206759142), new K($[39], 344077627), new K($[40], 1290863460), new K($[41], 3158454273), new K($[42], 3505952657), new K($[43], 106217008), new K($[44], 3606008344), new K($[45], 1432725776), new K($[46], 1467031594), new K($[47], 851169720), new K($[48], 3100823752), new K($[49], 1363258195), new K($[50], 3750685593), new K($[51], 3785050280), new K($[52], 3318307427), new K($[53], 3812723403), new K($[54], 2003034995), new K($[55], 3602036899), new K($[56], 1575990012), new K($[57], 1125592928), new K($[58], 2716904306), new K($[59], 442776044), new K($[60], 593698344), new K($[61], 3733110249), new K($[62], 2999351573), new K($[63], 3815920427), new K(3391569614, 3928383900), new K(3515267271, 566280711), new K(3940187606, 3454069534), new K(4118630271, 4000239992), new K(116418474, 1914138554), new K(174292421, 2731055270), new K(289380356, 3203993006), new K(460393269, 320620315), new K(685471733, 587496836), new K(852142971, 1086792851), new K(1017036298, 365543100), new K(1126000580, 2618297676), new K(1288033470, 3409855158), new K(1501505948, 4234509866), new K(1607167915, 987167468), new K(1816402316, 1246189591)], f = "SHA-384" === n ? [new K(3418070365, f[0]), new K(1654270250, f[1]), new K(2438529370, f[2]), new K(355462360, f[3]), new K(1731405415, f[4]), new K(41048885895, f[5]), new K(3675008525, f[6]), new K(1203062813, f[7])] : [new K(i[0], 4089235720), new K(i[1], 2227873595), new K(i[2], 4271175723), new K(i[3], 1595750129), new K(i[4], 2917565137), new K(i[5], 725511199), new K(i[6], 4215389547), new K(i[7], 327033209)];
}for (e[t >>> 5] |= 128 << 24 - t % 32, e[r] = t, q = e.length, m = 0; m < q; m += g) {
for (t = f[0], r = f[1], i = f[2], o = f[3], a = f[4], c = f[5], u = f[6], l = f[7], v = 0; v < h; v += 1) {
z[v] = 16 > v ? new K(e[v * y + m], e[v * y + m + 1]) : F(J(z[v - 2]), z[v - 7], B(z[v - 15]), z[v - 16]), d = U(l, H(a), V(a, c, u), $[v], z[v]), p = j(G(t), W(t, r, i)), l = u, u = c, c = a, a = j(o, d), o = i, i = r, r = t, t = j(d, p);
}f[0] = j(t, f[0]), f[1] = j(r, f[1]), f[2] = j(i, f[2]), f[3] = j(o, f[3]), f[4] = j(a, f[4]), f[5] = j(c, f[5]), f[6] = j(u, f[6]), f[7] = j(l, f[7]);
}if ("SHA-224" === n) e = [f[0], f[1], f[2], f[3], f[4], f[5], f[6]];else if ("SHA-256" === n) e = f;else if ("SHA-384" === n) e = [f[0].a, f[0].b, f[1].a, f[1].b, f[2].a, f[2].b, f[3].a, f[3].b, f[4].a, f[4].b, f[5].a, f[5].b];else {
if ("SHA-512" !== n) throw "Unexpected error in SHA-2 implementation";e = [f[0].a, f[0].b, f[1].a, f[1].b, f[2].a, f[2].b, f[3].a, f[3].b, f[4].a, f[4].b, f[5].a, f[5].b, f[6].a, f[6].b, f[7].a, f[7].b];
}return e;
}i(n(25)) ? void 0 !== (r = function () {
return a;
}.call(t, n, t, e)) && (e.exports = r) : void 0 !== e && e.exports ? e.exports = t = a : t = a;
}();
}, function (e, t, n) {
"use strict";
(function (e) {
function r(e) {
if (!e.name || e.name.toLowerCase() !== e.name) {
var t = "Invalid conference name (no conference name passed or it contains invalid characters like capital letters)!";throw j.error(t), new Error(t);
}this.eventEmitter = new d.a(), this.options = e, this.eventManager = new f.a(this), this.participants = {}, this._init(e), this.componentsVersions = new o.a(this), this.jvbJingleSession = null, this.lastDominantSpeaker = null, this.dtmfManager = null, this.somebodySupportsDTMF = !1, this.authEnabled = !1, this.startAudioMuted = !1, this.startVideoMuted = !1, this.startMutedPolicy = { audio: !1, video: !1 }, this.availableDevices = { audio: void 0, video: void 0 }, this.isMutedByFocus = !1, this.wasStopped = !1, this.connectionQuality = new a.a(this, this.eventEmitter, e), this.avgRtpStatsReporter = new i.a(this, e.config.avgRtpStatsN || 15), this.isJvbConnectionInterrupted = !1, this.speakerStatsCollector = new x.a(this), this.deferredStartP2PTask = null;var n = parseInt(e.config.p2p && e.config.p2p.backToP2PDelay, 10);this.backToP2PDelay = isNaN(n) ? 5 : n, j.info("backToP2PDelay: " + this.backToP2PDelay), this.isP2PConnectionInterrupted = !1, this.p2p = !1, this.p2pJingleSession = null;
}t.a = r;var i = n(104),
o = n(117),
a = n(101),
s = n(0),
c = (n.n(s), n(3)),
u = n.n(c),
l = n(14),
d = n.n(l),
p = n(26),
f = n(82),
h = n(5),
m = n(87),
v = n.n(m),
g = n(85),
y = n(11),
b = n(15),
S = n(16),
E = n(102),
T = n(4),
_ = n(28),
C = n(88),
w = n(22),
R = n(2),
k = n(8),
A = (n.n(k), n(6)),
I = n(100),
P = n(110),
O = n.n(P),
D = n(17),
L = n.n(D),
N = n(119),
M = n(7),
x = (n.n(M), n(108)),
j = n.i(s.getLogger)(e);r.prototype.constructor = r, r.prototype._init = function () {
var e = this,
t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};t.connection && (this.connection = t.connection, this.xmpp = this.connection.xmpp, this.eventManager.setupXMPPListeners()), this.room = this.xmpp.createRoom(this.options.name, this.options.config), this._onIceConnectionInterrupted = this._onIceConnectionInterrupted.bind(this), this.room.addListener(M.CONNECTION_INTERRUPTED, this._onIceConnectionInterrupted), this._onIceConnectionRestored = this._onIceConnectionRestored.bind(this), this.room.addListener(M.CONNECTION_RESTORED, this._onIceConnectionRestored), this._onIceConnectionEstablished = this._onIceConnectionEstablished.bind(this), this.room.addListener(M.CONNECTION_ESTABLISHED, this._onIceConnectionEstablished), this.room.updateDeviceAvailability(w.a.getDeviceAvailability()), this.rtc || (this.rtc = new w.a(this, t), this.eventManager.setupRTCListeners()), this.participantConnectionStatus = new _.b(this.rtc, this, { rtcMuteTimeout: this.options.config._peerConnStatusRtcMuteTimeout, outOfLastNTimeout: this.options.config._peerConnStatusOutOfLastNTimeout }), this.participantConnectionStatus.init(), this.statistics || (this.statistics = new A.a(this.xmpp, { callStatsID: this.options.config.callStatsID, callStatsSecret: this.options.config.callStatsSecret, callStatsConfIDNamespace: this.options.config.callStatsConfIDNamespace || window.location.hostname, callStatsCustomScriptUrl: this.options.config.callStatsCustomScriptUrl, callStatsAliasName: this.myUserId(), roomName: this.options.name })), this.eventManager.setupChatRoomListeners(), this.eventManager.setupStatisticsListeners(), this.options.config.enableTalkWhileMuted && new I.a(this, function () {
return e.eventEmitter.emit(h.TALK_WHILE_MUTED);
}), "channelLastN" in t.config && this.setLastN(t.config.channelLastN), this.jvb121Status = new E.a(this), this.p2pDominantSpeakerDetection = new C.a(this);
}, r.prototype.join = function (e) {
this.room && this.room.join(e);
}, r.prototype.isJoined = function () {
return this.room && this.room.joined;
}, r.prototype.isP2PEnabled = function () {
return Boolean(this.options.config.p2p && this.options.config.p2p.enabled) || void 0 === this.options.config.p2p;
}, r.prototype.isP2PTestModeEnabled = function () {
return Boolean(this.options.config.testing && this.options.config.testing.p2pTestMode);
}, r.prototype.leave = function () {
var e = this;if (this.participantConnectionStatus && (this.participantConnectionStatus.dispose(), this.participantConnectionStatus = null), this.avgRtpStatsReporter && (this.avgRtpStatsReporter.dispose(), this.avgRtpStatsReporter = null), this.getLocalTracks().forEach(function (t) {
return e.onLocalTrackRemoved(t);
}), this.rtc.closeBridgeChannel(), this.statistics && this.statistics.dispose(), this.jvbJingleSession && (this.jvbJingleSession.close(), this.jvbJingleSession = null), this.p2pJingleSession && (this.p2pJingleSession.close(), this.p2pJingleSession = null), this.room) {
var t = this.room;return t.removeListener(M.CONNECTION_INTERRUPTED, this._onIceConnectionInterrupted), t.removeListener(M.CONNECTION_RESTORED, this._onIceConnectionRestored), t.removeListener(M.CONNECTION_ESTABLISHED, this._onIceConnectionEstablished), this.room = null, t.leave().catch(function () {
e.getParticipants().forEach(function (t) {
return e.onMemberLeft(t.getJid());
});
});
}return Promise.reject(new Error("The conference is has been already left"));
}, r.prototype.getName = function () {
return this.options.name;
}, r.prototype.isAuthEnabled = function () {
return this.authEnabled;
}, r.prototype.isLoggedIn = function () {
return Boolean(this.authIdentity);
}, r.prototype.getAuthLogin = function () {
return this.authIdentity;
}, r.prototype.isExternalAuthEnabled = function () {
return this.room && this.room.moderator.isExternalAuthEnabled();
}, r.prototype.getExternalAuthUrl = function (e) {
var t = this;return new Promise(function (n, r) {
if (!t.isExternalAuthEnabled()) return void r();e ? t.room.moderator.getPopupLoginUrl(n, r) : t.room.moderator.getLoginUrl(n, r);
});
}, r.prototype.getLocalTracks = function (e) {
var t = [];return this.rtc && (t = this.rtc.getLocalTracks(e)), t;
}, r.prototype.getLocalAudioTrack = function () {
return this.rtc ? this.rtc.getLocalAudioTrack() : null;
}, r.prototype.getLocalVideoTrack = function () {
return this.rtc ? this.rtc.getLocalVideoTrack() : null;
}, r.prototype.on = function (e, t) {
this.eventEmitter && this.eventEmitter.on(e, t);
}, r.prototype.off = function (e, t) {
this.eventEmitter && this.eventEmitter.removeListener(e, t);
}, r.prototype.addEventListener = r.prototype.on, r.prototype.removeEventListener = r.prototype.off, r.prototype.addCommandListener = function (e, t) {
this.room && this.room.addPresenceListener(e, t);
}, r.prototype.removeCommandListener = function (e) {
this.room && this.room.removePresenceListener(e);
}, r.prototype.sendTextMessage = function (e) {
this.room && this.room.sendMessage(e);
}, r.prototype.sendCommand = function (e, t) {
this.room && (this.room.addToPresence(e, t), this.room.sendPresence());
}, r.prototype.sendCommandOnce = function (e, t) {
this.sendCommand(e, t), this.removeCommand(e);
}, r.prototype.removeCommand = function (e) {
this.room && this.room.removeFromPresence(e);
}, r.prototype.setDisplayName = function (e) {
this.room && (this.room.removeFromPresence("nick"), this.room.addToPresence("nick", { attributes: { xmlns: "http://jabber.org/protocol/nick" }, value: e }), this.room.sendPresence());
}, r.prototype.setSubject = function (e) {
this.room && this.isModerator() && this.room.setSubject(e);
}, r.prototype.getTranscriber = function () {
if (void 0 === this.transcriber) {
this.transcriber = new O.a();var e = this.getLocalTracks(T.a),
t = !0,
n = !1,
r = void 0;try {
for (var i, o = e[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(t = (i = o.next()).done); t = !0) {
var a = i.value;this.transcriber.addTrack(a);
}
} catch (e) {
n = !0, r = e;
} finally {
try {
!t && o.return && o.return();
} finally {
if (n) throw r;
}
}var s = this.rtc.getRemoteTracks(T.a),
c = !0,
u = !1,
l = void 0;try {
for (var d, p = s[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(c = (d = p.next()).done); c = !0) {
var f = d.value;this.transcriber.addTrack(f);
}
} catch (e) {
u = !0, l = e;
} finally {
try {
!c && p.return && p.return();
} finally {
if (u) throw l;
}
}
}return this.transcriber;
}, r.prototype.addTrack = function (e) {
if (e.isVideoTrack()) {
var t = this.rtc.getLocalVideoTrack();if (t) return e === t ? Promise.resolve(e) : Promise.reject(new Error("cannot add second video track to the conference"));
}return this.replaceTrack(null, e);
}, r.prototype._fireAudioLevelChangeEvent = function (e, t) {
var n = this.getActivePeerConnection();t && n !== t || this.eventEmitter.emit(h.TRACK_AUDIO_LEVEL_CHANGED, this.myUserId(), e);
}, r.prototype._fireMuteChangeEvent = function (e) {
this.isMutedByFocus && e.isAudioTrack() && !e.isMuted() && (this.isMutedByFocus = !1, this.room.muteParticipant(this.room.myroomjid, !1)), this.eventEmitter.emit(h.TRACK_MUTE_CHANGED, e);
}, r.prototype.onLocalTrackRemoved = function (e) {
e._setConference(null), this.rtc.removeLocalTrack(e), e.removeEventListener(S.TRACK_MUTE_CHANGED, e.muteHandler), e.removeEventListener(S.TRACK_AUDIO_LEVEL_CHANGED, e.audioLevelHandler), e.isVideoTrack() && e.videoType === L.a.DESKTOP && this.statistics.sendScreenSharingEvent(!1), this.eventEmitter.emit(h.TRACK_REMOVED, e);
}, r.prototype.removeTrack = function (e) {
return this.replaceTrack(e, null);
}, r.prototype.replaceTrack = function (e, t) {
var n = this;return e && e.disposed ? Promise.reject(new y.a(b.TRACK_IS_DISPOSED)) : t && t.disposed ? Promise.reject(new y.a(b.TRACK_IS_DISPOSED)) : this._doReplaceTrack(e, t).then(function () {
return e && n.onLocalTrackRemoved(e), t && n._setupNewTrack(t), Promise.resolve();
}, function (e) {
return Promise.reject(new Error(e));
});
}, r.prototype._doReplaceTrack = function (e, t) {
var n = [];return this.jvbJingleSession ? n.push(this.jvbJingleSession.replaceTrack(e, t)) : j.info("_doReplaceTrack - no JVB JingleSession"), this.p2pJingleSession ? n.push(this.p2pJingleSession.replaceTrack(e, t)) : j.info("_doReplaceTrack - no P2P JingleSession"), Promise.all(n);
}, r.prototype._setupNewTrack = function (e) {
if (e.isAudioTrack() || e.isVideoTrack() && e.videoType !== L.a.DESKTOP) {
var t = w.a.getCurrentlyAvailableMediaDevices(),
n = t.find(function (t) {
return t.kind === e.getTrack().kind + "input" && t.label === e.getTrack().label;
});n && A.a.sendActiveDeviceListEvent(w.a.getEventDataForActiveDevice(n));
}e.isVideoTrack() && (this.removeCommand("videoType"), this.sendCommand("videoType", { value: e.videoType, attributes: { xmlns: "http://jitsi.org/jitmeet/video" } })), this.rtc.addLocalTrack(e), e.isAudioTrack() ? this.room.setAudioMute(e.isMuted()) : this.room.setVideoMute(e.isMuted()), e.muteHandler = this._fireMuteChangeEvent.bind(this, e), e.audioLevelHandler = this._fireAudioLevelChangeEvent.bind(this), e.addEventListener(S.TRACK_MUTE_CHANGED, e.muteHandler), e.addEventListener(S.TRACK_AUDIO_LEVEL_CHANGED, e.audioLevelHandler), e._setConference(this), e.isVideoTrack() && e.videoType === L.a.DESKTOP && this.statistics.sendScreenSharingEvent(!0), this.eventEmitter.emit(h.TRACK_ADDED, e);
}, r.prototype._addLocalTrackAsUnmute = function (e) {
var t = [];return this.jvbJingleSession ? t.push(this.jvbJingleSession.addTrackAsUnmute(e)) : j.info("Add local MediaStream as unmute - no JVB Jingle session started yet"), this.p2pJingleSession ? t.push(this.p2pJingleSession.addTrackAsUnmute(e)) : j.info("Add local MediaStream as unmute - no P2P Jingle session started yet"), Promise.all(t);
}, r.prototype._removeLocalTrackAsMute = function (e) {
var t = [];return this.jvbJingleSession ? t.push(this.jvbJingleSession.removeTrackAsMute(e)) : j.info("Remove local MediaStream - no JVB JingleSession started yet"), this.p2pJingleSession ? t.push(this.p2pJingleSession.removeTrackAsMute(e)) : j.info("Remove local MediaStream - no P2P JingleSession started yet"), Promise.all(t);
}, r.prototype.getRole = function () {
return this.room.role;
}, r.prototype.isModerator = function () {
return this.room ? this.room.isModerator() : null;
}, r.prototype.lock = function (e) {
var t = this;return this.isModerator() ? new Promise(function (n, r) {
t.room.lockRoom(e || "", function () {
return n();
}, function (e) {
return r(e);
}, function () {
return r(p.PASSWORD_NOT_SUPPORTED);
});
}) : Promise.reject();
}, r.prototype.unlock = function () {
return this.lock();
}, r.prototype.selectParticipant = function (e) {
this.rtc.selectEndpoint(e);
}, r.prototype.pinParticipant = function (e) {
this.rtc.pinEndpoint(e);
}, r.prototype.getLastN = function () {
return this.rtc.getLastN();
}, r.prototype.setLastN = function (e) {
if (!Number.isInteger(e) && !Number.parseInt(e, 10)) throw new Error("Invalid value for lastN: " + e);var t = Number(e);if (t < -1) throw new RangeError("lastN cannot be smaller than -1");if (this.rtc.setLastN(t), this.p2pJingleSession) {
var n = 0 !== t;this.p2pJingleSession.setMediaTransferActive(!0, n).catch(function (e) {
j.error("Failed to adjust video transfer status (" + n + ")", e);
});
}
}, r.prototype.isInLastN = function (e) {
return this.rtc.isInLastN(e);
}, r.prototype.getParticipants = function () {
return Object.keys(this.participants).map(function (e) {
return this.participants[e];
}, this);
}, r.prototype.getParticipantCount = function () {
var e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0],
t = this.getParticipants();return e || (t = t.filter(function (e) {
return !e.isHidden();
})), t.length + 1;
}, r.prototype.getParticipantById = function (e) {
return this.participants[e];
}, r.prototype.kickParticipant = function (e) {
var t = this.getParticipantById(e);t && this.room.kick(t.getJid());
}, r.prototype.muteParticipant = function (e) {
var t = this.getParticipantById(e);t && this.room.muteParticipant(t.getJid(), !0);
}, r.prototype.onMemberJoined = function (e, t, n, r) {
var i = this,
o = Strophe.getResourceFromJid(e);if ("focus" !== o && this.myUserId() !== o) {
var a = new g.a(e, this, t, r);a._role = n, this.participants[o] = a, this.eventEmitter.emit(h.USER_JOINED, o, a), this.xmpp.caps.getFeatures(e).then(function (e) {
a._supportsDTMF = e.has("urn:xmpp:jingle:dtmf:0"), i.updateDTMFSupport();
}, function (t) {
return j.error("Failed to discover features of " + e, t);
}), this._maybeStartOrStopP2P();
}
}, r.prototype.onMemberLeft = function (e) {
var t = this,
n = Strophe.getResourceFromJid(e);if ("focus" !== n && this.myUserId() !== n) {
var r = this.participants[n];delete this.participants[n], this.rtc.removeRemoteTracks(n).forEach(function (e) {
return t.eventEmitter.emit(h.TRACK_REMOVED, e);
}), r && this.eventEmitter.emit(h.USER_LEFT, n, r), this._maybeStartOrStopP2P(!0);
}
}, r.prototype.onLocalRoleChanged = function (e) {
this.eventEmitter.emit(h.USER_ROLE_CHANGED, this.myUserId(), e), this._maybeStartOrStopP2P();
}, r.prototype.onUserRoleChanged = function (e, t) {
var n = Strophe.getResourceFromJid(e),
r = this.getParticipantById(n);r && (r._role = t, this.eventEmitter.emit(h.USER_ROLE_CHANGED, n, t));
}, r.prototype.onDisplayNameChanged = function (e, t) {
var n = Strophe.getResourceFromJid(e),
r = this.getParticipantById(n);r && r._displayName !== t && (r._displayName = t, this.eventEmitter.emit(h.DISPLAY_NAME_CHANGED, n, t));
}, r.prototype.onRemoteTrackAdded = function (e) {
var t = this;if (e.isP2P && !this.isP2PActive()) return void j.info("Trying to add remote P2P track, when not in P2P - IGNORED");if (!e.isP2P && this.isP2PActive()) return void j.info("Trying to add remote JVB track, when in P2P - IGNORED");var n = e.getParticipantId(),
r = this.getParticipantById(n);if (!r) return void j.error("No participant found for id: " + n);r._tracks.push(e), this.transcriber && this.transcriber.addTrack(e);var i = this.eventEmitter;e.addEventListener(S.TRACK_MUTE_CHANGED, function () {
return i.emit(h.TRACK_MUTE_CHANGED, e);
}), e.addEventListener(S.TRACK_AUDIO_LEVEL_CHANGED, function (e, r) {
t.getActivePeerConnection() === r && i.emit(h.TRACK_AUDIO_LEVEL_CHANGED, n, e);
}), i.emit(h.TRACK_ADDED, e);
}, r.prototype.onCallAccepted = function (e, t) {
this.p2pJingleSession === e && (j.info("P2P setAnswer"), this.p2pJingleSession.setAnswer(t));
}, r.prototype.onTransportInfo = function (e, t) {
this.p2pJingleSession === e && (j.info("P2P addIceCandidates"), this.p2pJingleSession.addIceCandidates(t));
}, r.prototype.onRemoteTrackRemoved = function (e) {
var t = this;this.getParticipants().forEach(function (n) {
for (var r = n.getTracks(), i = 0; i < r.length; i++) {
if (r[i] === e) {
n._tracks.splice(i, 1), t.eventEmitter.emit(h.TRACK_REMOVED, e), t.transcriber && t.transcriber.removeTrack(e);break;
}
}
}, this);
}, r.prototype.onIncomingCall = function (e, t, n) {
var r = this;if (e.isP2P) return void ("moderator" !== this.room.getMemberRole(e.peerjid) ? this._rejectIncomingCallNonModerator(e) : R.a.isP2PSupported() ? this.isP2PEnabled() || this.isP2PTestModeEnabled() ? this.p2pJingleSession ? this._rejectIncomingCall(e, { reasonTag: "busy", reasonMsg: "P2P already in progress", errorMsg: 'Duplicated P2P "session-initiate"' }) : this._acceptP2PIncomingCall(e, t) : this._rejectIncomingCall(e, { reasonTag: "decline", reasonMsg: "P2P disabled", errorMsg: "P2P mode disabled in the configuration" }) : this._rejectIncomingCall(e, { reasonTag: "unsupported-applications", reasonMsg: "P2P not supported", errorMsg: "This client does not support P2P connections" }));if (!this.room.isFocus(e.peerjid)) return void this._rejectIncomingCall(e);this.jvbJingleSession = e, this.room.connectionTimes["session.initiate"] = n, this.wasStopped && A.a.sendEventToAll("session.restart");var i = null;this.options.config && this.options.config.deploymentInfo && void 0 !== this.options.config.deploymentInfo.crossRegion && (i = this.options.config.deploymentInfo.crossRegion), A.a.analytics.sendEvent("session.initiate", { value: n - this.room.connectionTimes["muc.joined"], label: i });try {
e.initialize(!1, this.room, this.rtc);
} catch (e) {
u.a.callErrorHandler(e);
}try {
e.acceptOffer(t, function () {
r.isP2PActive() && r.jvbJingleSession && r._suspendMediaTransferForJvbConnection(), r._setBridgeChannel();
}, function (e) {
u.a.callErrorHandler(e), j.error("Failed to accept incoming Jingle session", e);
}, this.getLocalTracks()), j.info("Starting CallStats for JVB connection..."), this.statistics.startCallStats(this.jvbJingleSession.peerconnection, "jitsi"), this.statistics.startRemoteStats(this.jvbJingleSession.peerconnection);
} catch (e) {
u.a.callErrorHandler(e), j.error(e);
}
}, r.prototype._setBridgeChannel = function () {
var e = this.jvbJingleSession,
t = e.bridgeWebSocketUrl,
n = void 0;switch (this.options.config.openBridgeChannel) {case "datachannel":case !0:case void 0:
n = "datachannel";break;case "websocket":
n = "websocket";}"datachannel" !== n || R.a.supportsDataChannels() || (n = "websocket"), "datachannel" === n ? this.rtc.initializeBridgeChannel(e.peerconnection, null) : "websocket" === n && t && this.rtc.initializeBridgeChannel(null, t);
}, r.prototype._rejectIncomingCallNonModerator = function (e) {
this._rejectIncomingCall(e, { reasonTag: "security-error", reasonMsg: "Only focus can start new sessions", errorMsg: "Rejecting session-initiate from non-focus andnon-moderator user: " + e.peerjid });
}, r.prototype._rejectIncomingCall = function (e, t) {
t && t.errorMsg && u.a.callErrorHandler(new Error(t.errorMsg)), e.terminate(null, function (e) {
j.warn("An error occurred while trying to terminate invalid Jingle session", e);
}, { reason: t && t.reasonTag, reasonDescription: t && t.reasonMsg, sendSessionTerminate: !0 });
}, r.prototype.onCallEnded = function (e, t, n) {
j.info("Call ended: " + t + " - " + n + " P2P ?" + e.isP2P), e === this.jvbJingleSession ? (this.wasStopped = !0, A.a.sendEventToAll("session.terminate"), this.statistics && (this.statistics.stopRemoteStats(this.jvbJingleSession.peerconnection), j.info("Stopping JVB CallStats"), this.statistics.stopCallStats(this.jvbJingleSession.peerconnection)), this.jvbJingleSession = null, this.rtc.onCallEnded()) : e === this.p2pJingleSession ? ("decline" === t && "force JVB121" === n ? (j.info("In forced JVB 121 mode..."), A.a.analytics.addPermanentProperties({ forceJvb121: !0 })) : "connectivity-error" === t && "ICE FAILED" === n && A.a.analytics.addPermanentProperties({ p2pFailed: !0 }), this._stopP2PSession()) : j.error("Received onCallEnded for invalid session", e.sid, e.peerjid, t, n);
}, r.prototype.onSuspendDetected = function (e) {
e.isP2P || (this.leave(), this.eventEmitter.emit(h.SUSPEND_DETECTED));
}, r.prototype.updateDTMFSupport = function () {
for (var e = !1, t = this.getParticipants(), n = 0; n < t.length; n += 1) {
if (t[n].supportsDTMF()) {
e = !0;break;
}
}e !== this.somebodySupportsDTMF && (this.somebodySupportsDTMF = e, this.eventEmitter.emit(h.DTMF_SUPPORT_CHANGED, e));
}, r.prototype.isDTMFSupported = function () {
return this.somebodySupportsDTMF;
}, r.prototype.myUserId = function () {
return this.room && this.room.myroomjid ? Strophe.getResourceFromJid(this.room.myroomjid) : null;
}, r.prototype.sendTones = function (e, t, n) {
if (!this.dtmfManager) {
var r = this.getActivePeerConnection();if (!r) return void j.warn("cannot sendTones: no peer connection");var i = this.getLocalAudioTrack();if (!i) return void j.warn("cannot sendTones: no local audio stream");this.dtmfManager = new v.a(i, r);
}this.dtmfManager.sendTones(e, t, n);
}, r.prototype.isRecordingSupported = function () {
return !!this.room && this.room.isRecordingSupported();
}, r.prototype.getRecordingState = function () {
return this.room ? this.room.getRecordingState() : void 0;
}, r.prototype.getRecordingURL = function () {
return this.room ? this.room.getRecordingURL() : null;
}, r.prototype.toggleRecording = function (e) {
var t = this;if (this.room) return this.room.toggleRecording(e, function (e, n) {
t.eventEmitter.emit(h.RECORDER_STATE_CHANGED, e, n);
});this.eventEmitter.emit(h.RECORDER_STATE_CHANGED, "error", new Error("The conference is not created yet!"));
}, r.prototype.isSIPCallingSupported = function () {
return !!this.room && this.room.isSIPCallingSupported();
}, r.prototype.dial = function (e) {
return this.room ? this.room.dial(e) : new Promise(function (e, t) {
t(new Error("The conference is not created yet!"));
});
}, r.prototype.hangup = function () {
return this.room ? this.room.hangup() : new Promise(function (e, t) {
t(new Error("The conference is not created yet!"));
});
}, r.prototype.getPhoneNumber = function () {
return this.room ? this.room.getPhoneNumber() : null;
}, r.prototype.getPhonePin = function () {
return this.room ? this.room.getPhonePin() : null;
}, r.prototype.getActivePeerConnection = function () {
return this.isP2PActive() ? this.p2pJingleSession.peerconnection : this.jvbJingleSession ? this.jvbJingleSession.peerconnection : null;
}, r.prototype.getConnectionState = function () {
var e = this.getActivePeerConnection();return e ? e.getConnectionState() : null;
}, r.prototype.setStartMutedPolicy = function (e) {
this.isModerator() && (this.startMutedPolicy = e, this.room.removeFromPresence("startmuted"), this.room.addToPresence("startmuted", { attributes: { audio: e.audio, video: e.video, xmlns: "http://jitsi.org/jitmeet/start-muted" } }), this.room.sendPresence());
}, r.prototype.getStartMutedPolicy = function () {
return this.startMutedPolicy;
}, r.prototype.isStartAudioMuted = function () {
return this.startAudioMuted;
}, r.prototype.isStartVideoMuted = function () {
return this.startVideoMuted;
}, r.prototype.getLogs = function () {
var e = this.xmpp.getJingleLog(),
t = {};t.time = new Date(), t.url = window.location.href, t.ua = navigator.userAgent;var n = this.xmpp.getXmppLog();return n && (t.xmpp = n), e.metadata = t, e;
}, r.prototype.getConnectionTimes = function () {
return this.room.connectionTimes;
}, r.prototype.setLocalParticipantProperty = function (e, t) {
this.sendCommand("jitsi_participant_" + e, { value: t });
}, r.prototype.sendFeedback = function (e, t) {
this.statistics.sendFeedback(e, t);
}, r.prototype.isCallstatsEnabled = function () {
return this.statistics.isCallstatsEnabled();
}, r.prototype._onTrackAttach = function (e, t) {
var n = e.isLocal(),
r = null,
i = e.isP2P,
o = i ? e.getParticipantId() : "jitsi",
a = i ? this.p2pJingleSession && this.p2pJingleSession.peerconnection : this.jvbJingleSession && this.jvbJingleSession.peerconnection;n ? a && (r = a.getLocalSSRC(e)) : r = e.getSSRC(), t.id && r && a && this.statistics.associateStreamWithVideoTag(a, r, n, o, e.getUsageLabel(), t.id);
}, r.prototype.sendApplicationLog = function (e) {
A.a.sendLog(e);
}, r.prototype._isFocus = function (e) {
return this.room ? this.room.isFocus(e) : null;
}, r.prototype._fireIncompatibleVersionsEvent = function () {
this.eventEmitter.emit(h.CONFERENCE_FAILED, p.INCOMPATIBLE_SERVER_VERSIONS);
}, r.prototype.sendEndpointMessage = function (e, t) {
this.rtc.sendChannelMessage(e, t);
}, r.prototype.broadcastEndpointMessage = function (e) {
this.sendEndpointMessage("", e);
}, r.prototype.isConnectionInterrupted = function () {
return this.isP2PActive() ? this.isP2PConnectionInterrupted : this.isJvbConnectionInterrupted;
}, r.prototype._onIceConnectionInterrupted = function (e) {
e.isP2P ? this.isP2PConnectionInterrupted = !0 : this.isJvbConnectionInterrupted = !0, e.isP2P === this.isP2PActive() && this.eventEmitter.emit(h.CONNECTION_INTERRUPTED);
}, r.prototype._onIceConnectionFailed = function (e) {
e.isP2P && (A.a.analytics.addPermanentProperties({ p2pFailed: !0 }), this.p2pJingleSession && this.p2pJingleSession.isInitiator && A.a.sendEventToAll("p2p.failed"), this._stopP2PSession("connectivity-error", "ICE FAILED"));
}, r.prototype._onIceConnectionRestored = function (e) {
e.isP2P ? this.isP2PConnectionInterrupted = !1 : this.isJvbConnectionInterrupted = !1, e.isP2P === this.isP2PActive() && this.eventEmitter.emit(h.CONNECTION_RESTORED);
}, r.prototype._acceptP2PIncomingCall = function (e, t) {
this.isP2PConnectionInterrupted = !1, this.p2pJingleSession = e, this.p2pJingleSession.initialize(!1, this.room, this.rtc), j.info("Starting CallStats for P2P connection..."), this.statistics.startCallStats(this.p2pJingleSession.peerconnection, Strophe.getResourceFromJid(this.p2pJingleSession.peerjid));var n = this.getLocalTracks();this.p2pJingleSession.acceptOffer(t, function () {
j.debug('Got RESULT for P2P "session-accept"');
}, function (e) {
j.error("Failed to accept incoming P2P Jingle session", e);
}, n);
}, r.prototype._addRemoteJVBTracks = function () {
this._addRemoteTracks("JVB", this.jvbJingleSession.peerconnection.getRemoteTracks());
}, r.prototype._addRemoteP2PTracks = function () {
this._addRemoteTracks("P2P", this.p2pJingleSession.peerconnection.getRemoteTracks());
}, r.prototype._addRemoteTracks = function (e, t) {
var n = !0,
r = !1,
i = void 0;try {
for (var o, a = t[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(n = (o = a.next()).done); n = !0) {
var s = o.value;j.info("Adding remote " + e + " track: " + s), this.rtc.eventEmitter.emit(k.REMOTE_TRACK_ADDED, s);
}
} catch (e) {
r = !0, i = e;
} finally {
try {
!n && a.return && a.return();
} finally {
if (r) throw i;
}
}
}, r.prototype._onIceConnectionEstablished = function (e) {
null !== this.p2pJingleSession && (this.p2pEstablishmentDuration = this.p2pJingleSession.establishmentDuration), null !== this.jvbJingleSession && (this.jvbEstablishmentDuration = this.jvbJingleSession.establishmentDuration);var t = !1,
n = this.options.config.forceJVB121Ratio;if (e.isP2P ? this.p2pJingleSession !== e ? (j.error("CONNECTION_ESTABLISHED - wrong P2P session instance ?!"), t = !0) : !e.isInitiator && "number" == typeof n && Math.random() < n && (j.info("Forcing JVB 121 mode (ratio=" + n + ")..."), A.a.analytics.addPermanentProperties({ forceJvb121: !0 }), this._stopP2PSession("decline", "force JVB121"), t = !0) : t = !0, !isNaN(this.p2pEstablishmentDuration) && !isNaN(this.jvbEstablishmentDuration)) {
var r = this.p2pEstablishmentDuration - this.jvbEstablishmentDuration;A.a.analytics.sendEvent("ice.establishmentDurationDiff", { value: r });
}t || (this._setP2PStatus(!0), this.jvbJingleSession ? this._removeRemoteJVBTracks() : j.info("Not removing remote JVB tracks - no session yet"), this._addRemoteP2PTracks(), this.jvbJingleSession && this._suspendMediaTransferForJvbConnection(), j.info("Starting remote stats with p2p connection"), this.statistics.startRemoteStats(this.p2pJingleSession.peerconnection), this.p2pJingleSession.isInitiator && A.a.sendEventToAll("p2p.established"));
}, r.prototype._maybeClearDeferredStartP2P = function () {
this.deferredStartP2PTask && (j.info("Cleared deferred start P2P task"), clearTimeout(this.deferredStartP2PTask), this.deferredStartP2PTask = null);
}, r.prototype._removeRemoteJVBTracks = function () {
this._removeRemoteTracks("JVB", this.jvbJingleSession.peerconnection.getRemoteTracks());
}, r.prototype._removeRemoteP2PTracks = function () {
this._removeRemoteTracks("P2P", this.p2pJingleSession.peerconnection.getRemoteTracks());
}, r.prototype._removeRemoteTracks = function (e, t) {
var n = !0,
r = !1,
i = void 0;try {
for (var o, a = t[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(n = (o = a.next()).done); n = !0) {
var s = o.value;j.info("Removing remote " + e + " track: " + s), this.rtc.eventEmitter.emit(k.REMOTE_TRACK_REMOVED, s);
}
} catch (e) {
r = !0, i = e;
} finally {
try {
!n && a.return && a.return();
} finally {
if (r) throw i;
}
}
}, r.prototype._resumeMediaTransferForJvbConnection = function () {
j.info("Resuming media transfer over the JVB connection..."), this.jvbJingleSession.setMediaTransferActive(!0, !0).then(function () {
j.info("Resumed media transfer over the JVB connection!");
}, function (e) {
j.error("Failed to resume media transfer over the JVB connection:", e);
});
}, r.prototype._setP2PStatus = function (e) {
if (this.p2p === e) return void j.error("Called _setP2PStatus with the same status: " + e);if (this.p2p = e, e) {
j.info("Peer to peer connection established!"), A.a.analytics.addPermanentProperties({ p2pFailed: !1, forceJvb121: !1 });var t = 0 !== this.rtc.getLastN();this.p2pJingleSession.setMediaTransferActive(!0, t).catch(function (e) {
j.error("Failed to sync up P2P video transfer status(" + t + ")", e);
});
} else j.info("Peer to peer connection closed!");this.jvbJingleSession && this.statistics.sendConnectionResumeOrHoldEvent(this.jvbJingleSession.peerconnection, !e), this.dtmfManager = null, this.eventEmitter.emit(h.P2P_STATUS, this, this.p2p), this.eventEmitter.emit(this.isConnectionInterrupted() ? h.CONNECTION_INTERRUPTED : h.CONNECTION_RESTORED);
}, r.prototype._startP2PSession = function (e) {
if (this._maybeClearDeferredStartP2P(), this.p2pJingleSession) return void j.error("P2P session already started!");this.isP2PConnectionInterrupted = !1, this.p2pJingleSession = this.xmpp.connection.jingle.newP2PJingleSession(this.room.myroomjid, e), j.info("Created new P2P JingleSession", this.room.myroomjid, e), this.p2pJingleSession.initialize(!0, this.room, this.rtc), j.info("Starting CallStats for P2P connection..."), this.statistics.startCallStats(this.p2pJingleSession.peerconnection, Strophe.getResourceFromJid(this.p2pJingleSession.peerjid));var t = this.getLocalTracks();this.p2pJingleSession.invite(t);
}, r.prototype._suspendMediaTransferForJvbConnection = function () {
j.info("Suspending media transfer over the JVB connection..."), this.jvbJingleSession.setMediaTransferActive(!1, !1).then(function () {
j.info("Suspended media transfer over the JVB connection !");
}, function (e) {
j.error("Failed to suspend media transfer over the JVB connection:", e);
});
}, r.prototype._maybeStartOrStopP2P = function (e) {
if (!R.a.isP2PSupported() || !this.isP2PEnabled() || this.isP2PTestModeEnabled()) return void j.info("Auto P2P disabled");var t = this.getParticipants(),
n = t.length,
r = this.isModerator(),
i = 1 === n;if (j.debug("P2P? isModerator: " + r + ", peerCount: " + n + " => " + i), !i && this.deferredStartP2PTask && this._maybeClearDeferredStartP2P(), r && !this.p2pJingleSession && i) {
var o = n && t[0];if (r && "moderator" === o.getRole()) {
var a = this.myUserId(),
s = o.getId();if (a > s) return void j.debug("Everyone's a moderator - the other peer should start P2P", a, s);if (a === s) return void j.error("The same IDs ? ", a, s);
}var c = o.getJid();if (e) {
if (this.deferredStartP2PTask) return void j.error("Deferred start P2P task's been set already!");j.info("Will start P2P with: " + c + " after " + this.backToP2PDelay + " seconds..."), this.deferredStartP2PTask = setTimeout(this._startP2PSession.bind(this, c), 1e3 * this.backToP2PDelay);
} else j.info("Will start P2P with: " + c), this._startP2PSession(c);
} else this.p2pJingleSession && !i && (j.info("Will stop P2P with: " + this.p2pJingleSession.peerjid), this.p2pJingleSession.isInitiator && n > 1 && A.a.sendEventToAll("p2p.switch_to_jvb"), this._stopP2PSession());
}, r.prototype._stopP2PSession = function (e, t) {
if (!this.p2pJingleSession) return void j.error("No P2P session to be stopped!");var n = this.isP2PActive();n && (this.jvbJingleSession && this._resumeMediaTransferForJvbConnection(), this._removeRemoteP2PTracks()), j.info("Stopping remote stats for P2P connection"), this.statistics.stopRemoteStats(this.p2pJingleSession.peerconnection), j.info("Stopping CallStats for P2P connection"), this.statistics.stopCallStats(this.p2pJingleSession.peerconnection), this.p2pJingleSession.terminate(function () {
j.info("P2P session terminate RESULT");
}, function (t) {
e && j.error("An error occurred while trying to terminate P2P Jingle session", t);
}, { reason: e || "success", reasonDescription: t || "Turing off P2P session", sendSessionTerminate: this.room && this.getParticipantById(Strophe.getResourceFromJid(this.p2pJingleSession.peerjid)) }), this.p2pJingleSession = null, this._setP2PStatus(!1), n && (this.jvbJingleSession ? this._addRemoteJVBTracks() : j.info("Not adding remote JVB tracks - no session yet"));
}, r.prototype.isP2PActive = function () {
return this.p2p;
}, r.prototype.getP2PConnectionState = function () {
return this.isP2PActive() ? this.p2pJingleSession.peerconnection.getConnectionState() : null;
}, r.prototype.startP2PSession = function () {
var e = this.getParticipants();if (1 !== e.length) throw new Error("There must be exactly 1 participant to start the P2P session !");var t = e[0].getJid();this._startP2PSession(t);
}, r.prototype.stopP2PSession = function () {
this._stopP2PSession();
}, r.prototype.getSpeakerStats = function () {
return this.speakerStatsCollector.getStats();
}, r.prototype._getVideoSIPGWHandle = function () {
return this.videoSIPGWHandler || (this.videoSIPGWHandler = new N.a(this.room), j.info("Created VideoSIPGW")), this.videoSIPGWHandler;
}, r.prototype.isVideoSIPGWAvailable = function () {
return this._getVideoSIPGWHandle().isVideoSIPGWAvailable();
}, r.prototype.createVideoSIPGWSession = function (e, t) {
return this.room ? this._getVideoSIPGWHandle().createVideoSIPGWSession(e, t) : null;
};
}).call(t, "JitsiConference.js");
}, function (e, t, n) {
"use strict";
(function (e) {
function r(e) {
this.conference = e, e.on(l.TRACK_MUTE_CHANGED, function (t) {
if (t.isLocal() && e.statistics) {
var n = t.isP2P ? e.p2pJingleSession : e.jvbJingleSession,
r = n && n.peerconnection || null;e.statistics.sendMuteEvent(r, t.isMuted(), t.getType());
}
}), e.on(l.CONNECTION_INTERRUPTED, h.a.sendEventToAll.bind(h.a, "connection.interrupted")), e.on(l.CONNECTION_RESTORED, h.a.sendEventToAll.bind(h.a, "connection.restored"));
}t.a = r;var i = n(54),
o = n.n(i),
a = n(115),
s = n.n(a),
c = n(0),
u = (n.n(c), n(26)),
l = n(5),
d = n(4),
p = n(8),
f = n.n(p),
h = n(6),
m = n(7),
v = n.n(m),
g = n.i(c.getLogger)(e);r.prototype.setupChatRoomListeners = function () {
var e = this,
t = this.conference,
n = t.room;this.chatRoomForwarder = new s.a(n, this.conference.eventEmitter), n.addListener(v.a.ICE_RESTARTING, function (e) {
e.isP2P || t.rtc.closeBridgeChannel();
}), n.addListener(v.a.AUDIO_MUTED_BY_FOCUS, function (e) {
t.rtc.setAudioMute(e).then(function () {
t.isMutedByFocus = !0;
}, function () {
return g.warn("Error while audio muting due to focus request");
});
}), this.chatRoomForwarder.forward(v.a.SUBJECT_CHANGED, l.SUBJECT_CHANGED), this.chatRoomForwarder.forward(v.a.MUC_JOINED, l.CONFERENCE_JOINED), n.addListener(v.a.MUC_JOINED, function () {
e.conference.isJvbConnectionInterrupted = !1, Object.keys(n.connectionTimes).forEach(function (e) {
var t = n.connectionTimes[e];h.a.analytics.sendEvent("conference." + e, { value: t });
}), Object.keys(n.xmpp.connectionTimes).forEach(function (e) {
var t = n.xmpp.connectionTimes[e];h.a.analytics.sendEvent("xmpp." + e, { value: t });
});
}), this.chatRoomForwarder.forward(v.a.ROOM_JOIN_ERROR, l.CONFERENCE_FAILED, u.CONNECTION_ERROR), this.chatRoomForwarder.forward(v.a.ROOM_CONNECT_ERROR, l.CONFERENCE_FAILED, u.CONNECTION_ERROR), this.chatRoomForwarder.forward(v.a.ROOM_CONNECT_NOT_ALLOWED_ERROR, l.CONFERENCE_FAILED, u.NOT_ALLOWED_ERROR), this.chatRoomForwarder.forward(v.a.ROOM_MAX_USERS_ERROR, l.CONFERENCE_FAILED, u.CONFERENCE_MAX_USERS), this.chatRoomForwarder.forward(v.a.PASSWORD_REQUIRED, l.CONFERENCE_FAILED, u.PASSWORD_REQUIRED), this.chatRoomForwarder.forward(v.a.AUTHENTICATION_REQUIRED, l.CONFERENCE_FAILED, u.AUTHENTICATION_REQUIRED), this.chatRoomForwarder.forward(v.a.BRIDGE_DOWN, l.CONFERENCE_FAILED, u.VIDEOBRIDGE_NOT_AVAILABLE), n.addListener(v.a.BRIDGE_DOWN, function () {
return h.a.analytics.sendEvent("conference.bridgeDown");
}), this.chatRoomForwarder.forward(v.a.RESERVATION_ERROR, l.CONFERENCE_FAILED, u.RESERVATION_ERROR), this.chatRoomForwarder.forward(v.a.GRACEFUL_SHUTDOWN, l.CONFERENCE_FAILED, u.GRACEFUL_SHUTDOWN), n.addListener(v.a.JINGLE_FATAL_ERROR, function (e, n) {
e.isP2P || t.eventEmitter.emit(l.CONFERENCE_FAILED, u.JINGLE_FATAL_ERROR, n);
}), n.addListener(v.a.CONNECTION_ICE_FAILED, function (e) {
t._onIceConnectionFailed(e);
}), this.chatRoomForwarder.forward(v.a.MUC_DESTROYED, l.CONFERENCE_FAILED, u.CONFERENCE_DESTROYED), this.chatRoomForwarder.forward(v.a.CHAT_ERROR_RECEIVED, l.CONFERENCE_ERROR, u.CHAT_ERROR), this.chatRoomForwarder.forward(v.a.FOCUS_DISCONNECTED, l.CONFERENCE_FAILED, u.FOCUS_DISCONNECTED), n.addListener(v.a.FOCUS_LEFT, function () {
h.a.analytics.sendEvent("conference.focusLeft"), t.eventEmitter.emit(l.CONFERENCE_FAILED, u.FOCUS_LEFT);
});var r = function r(e) {
return h.a.sendEventToAll("conference.error." + e);
};n.addListener(v.a.SESSION_ACCEPT_TIMEOUT, function (e) {
r(e.isP2P ? "p2pSessionAcceptTimeout" : "sessionAcceptTimeout");
}), this.chatRoomForwarder.forward(v.a.RECORDER_STATE_CHANGED, l.RECORDER_STATE_CHANGED), this.chatRoomForwarder.forward(v.a.VIDEO_SIP_GW_AVAILABILITY_CHANGED, l.VIDEO_SIP_GW_AVAILABILITY_CHANGED), this.chatRoomForwarder.forward(v.a.PHONE_NUMBER_CHANGED, l.PHONE_NUMBER_CHANGED), n.addListener(v.a.CONFERENCE_SETUP_FAILED, function (e, n) {
e.isP2P || t.eventEmitter.emit(l.CONFERENCE_FAILED, u.SETUP_FAILED, n);
}), n.setParticipantPropertyListener(function (e, n) {
var r = t.getParticipantById(n);r && r.setProperty(e.tagName.substring("jitsi_participant_".length), e.value);
}), this.chatRoomForwarder.forward(v.a.KICKED, l.KICKED), n.addListener(v.a.KICKED, function () {
t.room = null, t.leave();
}), n.addListener(v.a.SUSPEND_DETECTED, t.onSuspendDetected.bind(t)), this.chatRoomForwarder.forward(v.a.MUC_LOCK_CHANGED, l.LOCK_STATE_CHANGED), n.addListener(v.a.MUC_MEMBER_JOINED, t.onMemberJoined.bind(t)), n.addListener(v.a.MUC_MEMBER_LEFT, t.onMemberLeft.bind(t)), this.chatRoomForwarder.forward(v.a.MUC_LEFT, l.CONFERENCE_LEFT), n.addListener(v.a.DISPLAY_NAME_CHANGED, t.onDisplayNameChanged.bind(t)), n.addListener(v.a.LOCAL_ROLE_CHANGED, function (e) {
t.onLocalRoleChanged(e), t.statistics && t.isModerator() && t.on(l.RECORDER_STATE_CHANGED, function (e, t) {
var n = { id: "recorder_status", status: e };t && (n.error = t), h.a.sendLog(JSON.stringify(n));
});
}), n.addListener(v.a.MUC_ROLE_CHANGED, t.onUserRoleChanged.bind(t)), n.addListener(o.a.IDENTITY_UPDATED, function (e, n) {
t.authEnabled = e, t.authIdentity = n, t.eventEmitter.emit(l.AUTH_STATUS_CHANGED, e, n);
}), n.addListener(v.a.MESSAGE_RECEIVED, function (e, n, r, i, o) {
var a = Strophe.getResourceFromJid(e);t.eventEmitter.emit(l.MESSAGE_RECEIVED, a, r, o);
}), n.addListener(v.a.PRESENCE_STATUS, function (e, n) {
var r = Strophe.getResourceFromJid(e),
i = t.getParticipantById(r);i && i._status !== n && (i._status = n, t.eventEmitter.emit(l.USER_STATUS_CHANGED, r, n));
}), n.addPresenceListener("startmuted", function (e, n) {
var r = !1;if (t.myUserId() === n && t.isModerator()) r = !0;else {
var i = t.getParticipantById(n);i && i.isModerator() && (r = !0);
}if (r) {
var o = "true" === e.attributes.audio,
a = "true" === e.attributes.video,
s = !1;o !== t.startMutedPolicy.audio && (t.startMutedPolicy.audio = o, s = !0), a !== t.startMutedPolicy.video && (t.startMutedPolicy.video = a, s = !0), s && t.eventEmitter.emit(l.START_MUTED_POLICY_CHANGED, t.startMutedPolicy);
}
}), n.addPresenceListener("devices", function (e, n) {
var r = !1,
i = !1;e.children.forEach(function (e) {
"audio" === e.tagName && (r = "true" === e.value), "video" === e.tagName && (i = "true" === e.value);
});var o = void 0;if (t.myUserId() === n) o = t.availableDevices;else {
var a = t.getParticipantById(n);if (!a) return;o = a._availableDevices;
}var s = !1;o.audio !== r && (s = !0, o.audio = r), o.video !== i && (s = !0, o.video = i), s && t.eventEmitter.emit(l.AVAILABLE_DEVICES_CHANGED, n, o);
}), t.statistics && (n.addListener(v.a.CONNECTION_ICE_FAILED, function (e) {
t.statistics.sendIceConnectionFailedEvent(e.peerconnection);
}), n.addListener(v.a.ADD_ICE_CANDIDATE_FAILED, function (e, n) {
t.statistics.sendAddIceCandidateFailed(e, n);
}));
}, r.prototype.setupRTCListeners = function () {
var e = this.conference,
t = e.rtc;t.addListener(f.a.REMOTE_TRACK_ADDED, e.onRemoteTrackAdded.bind(e)), t.addListener(f.a.REMOTE_TRACK_REMOVED, e.onRemoteTrackRemoved.bind(e)), t.addListener(f.a.DOMINANT_SPEAKER_CHANGED, function (t) {
e.lastDominantSpeaker !== t && e.room && (e.lastDominantSpeaker = t, e.eventEmitter.emit(l.DOMINANT_SPEAKER_CHANGED, t)), e.statistics && e.myUserId() === t && e.statistics.sendDominantSpeakerEvent();
}), t.addListener(f.a.DATA_CHANNEL_OPEN, function () {
var t = window.performance.now();g.log("(TIME) data channel opened ", t), e.room.connectionTimes["data.channel.opened"] = t, h.a.analytics.sendEvent("conference.dataChannel.open", { value: t });
}), t.addListener(f.a.AVAILABLE_DEVICES_CHANGED, function (t) {
return e.room.updateDeviceAvailability(t);
}), t.addListener(f.a.ENDPOINT_MESSAGE_RECEIVED, function (t, n) {
var r = e.getParticipantById(t);r ? e.eventEmitter.emit(l.ENDPOINT_MESSAGE_RECEIVED, r, n) : g.warn("Ignored ENDPOINT_MESSAGE_RECEIVED for not existing participant: " + t, n);
}), t.addListener(f.a.LOCAL_UFRAG_CHANGED, function (e, t) {
e.isP2P || h.a.sendLog(JSON.stringify({ id: "local_ufrag", value: t }));
}), t.addListener(f.a.REMOTE_UFRAG_CHANGED, function (e, t) {
e.isP2P || h.a.sendLog(JSON.stringify({ id: "remote_ufrag", value: t }));
}), e.statistics && (t.addListener(f.a.CREATE_ANSWER_FAILED, function (t, n) {
e.statistics.sendCreateAnswerFailed(t, n);
}), t.addListener(f.a.CREATE_OFFER_FAILED, function (t, n) {
e.statistics.sendCreateOfferFailed(t, n);
}), t.addListener(f.a.SET_LOCAL_DESCRIPTION_FAILED, function (t, n) {
e.statistics.sendSetLocalDescFailed(t, n);
}), t.addListener(f.a.SET_REMOTE_DESCRIPTION_FAILED, function (t, n) {
e.statistics.sendSetRemoteDescFailed(t, n);
}));
}, r.prototype.setupXMPPListeners = function () {
var e = this.conference;e.xmpp.caps.addListener(v.a.PARTCIPANT_FEATURES_CHANGED, function (t) {
var n = e.getParticipantId(Strophe.getResourceFromJid(t));n && e.eventEmitter.emit(l.PARTCIPANT_FEATURES_CHANGED, n);
}), e.xmpp.addListener(v.a.CALL_INCOMING, e.onIncomingCall.bind(e)), e.xmpp.addListener(v.a.CALL_ACCEPTED, e.onCallAccepted.bind(e)), e.xmpp.addListener(v.a.TRANSPORT_INFO, e.onTransportInfo.bind(e)), e.xmpp.addListener(v.a.CALL_ENDED, e.onCallEnded.bind(e)), e.xmpp.addListener(v.a.START_MUTED_FROM_FOCUS, function (t, n) {
e.options.config.ignoreStartMuted || (e.startAudioMuted = t, e.startVideoMuted = n, e.getLocalTracks().forEach(function (t) {
switch (t.getType()) {case d.a:
e.startAudioMuted && t.mute();break;case d.b:
e.startVideoMuted && t.mute();}
}), e.eventEmitter.emit(l.STARTED_MUTED));
});
}, r.prototype.setupStatisticsListeners = function () {
var e = this.conference;e.statistics && (e.statistics.addAudioLevelListener(function (t, n, r, i) {
e.rtc.setAudioLevel(t, n, r, i);
}), e.statistics.addBeforeDisposedListener(function () {
e.eventEmitter.emit(l.BEFORE_STATISTICS_DISPOSED);
}), e.statistics.addByteSentStatsListener(function (t, n) {
e.getLocalTracks(d.a).forEach(function (e) {
var r = t.getLocalSSRC(e);r && n.hasOwnProperty(r) && e._setByteSent(t, n[r]);
});
}));
};
}).call(t, "JitsiConferenceEventManager.js");
}, function (e, t, n) {
"use strict";
function r(e, t, n) {
this.appID = e, this.token = t, this.options = n, this.xmpp = new s.a(n, t), this.addEventListener(o.CONNECTION_FAILED, function (e, t) {
a.a.sendEventToAll("connection.failed." + e, { label: t });
}), this.addEventListener(o.CONNECTION_DISCONNECTED, function (e) {
e && a.a.analytics.sendEvent("connection.disconnected." + e), a.a.sendLog(JSON.stringify({ id: "connection.disconnected", msg: e }));
});
}t.a = r;var i = n(81),
o = n(27),
a = n(6),
s = n(136);r.prototype.connect = function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};this.xmpp.connect(e.id, e.password);
}, r.prototype.attach = function (e) {
this.xmpp.attach(e);
}, r.prototype.disconnect = function () {
var e;(e = this.xmpp).disconnect.apply(e, arguments);
}, r.prototype.setToken = function (e) {
this.token = e;
}, r.prototype.initJitsiConference = function (e, t) {
return new i.a({ name: e, config: t, connection: this });
}, r.prototype.addEventListener = function (e, t) {
this.xmpp.addListener(e, t);
}, r.prototype.removeEventListener = function (e, t) {
this.xmpp.removeListener(e, t);
}, r.prototype.getConnectionTimes = function () {
return this.xmpp.connectionTimes;
}, r.prototype.addFeature = function (e) {
var t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1];return this.xmpp.caps.addFeature(e, t);
}, r.prototype.removeFeature = function (e) {
var t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1];return this.xmpp.caps.removeFeature(e, t);
};
}, function (e, t, n) {
"use strict";
function r(e, t) {
var n = t.find(function (t) {
return "audiooutput" === t.kind && t.deviceId === e;
});n && p.a.sendActiveDeviceListEvent(c.a.getEventDataForActiveDevice(n));
}var i = n(14),
o = n.n(i),
a = n(44),
s = n(4),
c = n(22),
u = n(2),
l = n(8),
d = n.n(l),
p = n(6),
f = new o.a(),
h = { enumerateDevices: function enumerateDevices(e) {
c.a.enumerateDevices(e);
}, isDeviceListAvailable: function isDeviceListAvailable() {
return c.a.isDeviceListAvailable();
}, isDeviceChangeAvailable: function isDeviceChangeAvailable(e) {
return c.a.isDeviceChangeAvailable(e);
}, isDevicePermissionGranted: function isDevicePermissionGranted(e) {
var t = c.a.getDeviceAvailability();switch (e) {case s.b:
return !0 === t.video;case s.a:
return !0 === t.audio;default:
return !0 === t.video && !0 === t.audio;}
}, isMultipleAudioInputSupported: function isMultipleAudioInputSupported() {
return !u.a.isFirefox();
}, getAudioOutputDevice: function getAudioOutputDevice() {
return c.a.getAudioOutputDevice();
}, setAudioOutputDevice: function setAudioOutputDevice(e) {
var t = c.a.getCurrentlyAvailableMediaDevices();return t && t.length > 0 && r(e, c.a.getCurrentlyAvailableMediaDevices()), c.a.setAudioOutputDevice(e);
}, addEventListener: function addEventListener(e, t) {
f.addListener(e, t);
}, removeEventListener: function removeEventListener(e, t) {
f.removeListener(e, t);
}, emitEvent: function emitEvent(e) {
for (var t = arguments.length, n = Array(t > 1 ? t - 1 : 0), r = 1; r < t; r++) {
n[r - 1] = arguments[r];
}f.emit.apply(f, [e].concat(n));
} };c.a.addListener(d.a.DEVICE_LIST_CHANGED, function (e) {
return f.emit(a.DEVICE_LIST_CHANGED, e);
}), c.a.addListener(d.a.DEVICE_LIST_AVAILABLE, function (e) {
return r(h.getAudioOutputDevice(), e);
}), t.a = h;
}, function (e, t, n) {
"use strict";
function r(e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
}var i = n(5),
o = n(28),
a = n(4),
s = function () {
function e(e, t) {
for (var n = 0; n < t.length; n++) {
var r = t[n];r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
}
}return function (t, n, r) {
return n && e(t.prototype, n), r && e(t, r), t;
};
}(),
c = function () {
function e(t, n, i, a) {
r(this, e), this._jid = t, this._id = Strophe.getResourceFromJid(t), this._conference = n, this._displayName = i, this._supportsDTMF = !1, this._tracks = [], this._role = "none", this._status = null, this._availableDevices = { audio: void 0, video: void 0 }, this._hidden = a, this._connectionStatus = o.a.ACTIVE, this._properties = {};
}return s(e, [{ key: "getConference", value: function value() {
return this._conference;
} }, { key: "getProperty", value: function value(e) {
return this._properties[e];
} }, { key: "hasAnyVideoTrackWebRTCMuted", value: function value() {
return this.getTracks().some(function (e) {
return e.getType() === a.b && e.isWebRTCTrackMuted();
});
} }, { key: "_setConnectionStatus", value: function value(e) {
this._connectionStatus = e;
} }, { key: "getConnectionStatus", value: function value() {
return this._connectionStatus;
} }, { key: "setProperty", value: function value(e, t) {
var n = this._properties[e];t !== n && (this._properties[e] = t, this._conference.eventEmitter.emit(i.PARTICIPANT_PROPERTY_CHANGED, this, e, n, t));
} }, { key: "getTracks", value: function value() {
return this._tracks.slice();
} }, { key: "getTracksByMediaType", value: function value(e) {
return this.getTracks().filter(function (t) {
return t.getType() === e;
});
} }, { key: "getId", value: function value() {
return this._id;
} }, { key: "getJid", value: function value() {
return this._jid;
} }, { key: "getDisplayName", value: function value() {
return this._displayName;
} }, { key: "getStatus", value: function value() {
return this._status;
} }, { key: "isModerator", value: function value() {
return "moderator" === this._role;
} }, { key: "isHidden", value: function value() {
return this._hidden;
} }, { key: "isAudioMuted", value: function value() {
return this._isMediaTypeMuted(a.a);
} }, { key: "_isMediaTypeMuted", value: function value(e) {
return this.getTracks().reduce(function (t, n) {
return t && (n.getType() !== e || n.isMuted());
}, !0);
} }, { key: "isVideoMuted", value: function value() {
return this._isMediaTypeMuted(a.b);
} }, { key: "getRole", value: function value() {
return this._role;
} }, { key: "supportsDTMF", value: function value() {
return this._supportsDTMF;
} }, { key: "getFeatures", value: function value() {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 5e3;return this._conference.xmpp.caps.getFeatures(this._jid, e);
} }]), e;
}();t.a = c;
}, function (e, t, n) {
e.exports = n(68).default;
}, function (e, t, n) {
(function (e) {
function t(e, t) {
var n = e.getTrack();if (!n) throw new Error("Failed to initialize DTMFSender: no audio track.");this.dtmfSender = t.peerconnection.createDTMFSender(n), r.debug("Initialized DTMFSender");
}var r = n(0).getLogger(e);t.prototype.sendTones = function (e, t, n) {
this.dtmfSender.insertDTMF(e, t || 200, n || 200);
};
}).call(t, "modules/DTMF/JitsiDTMFManager.js");
}, function (e, t, n) {
"use strict";
function r(e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
}var i = n(5),
o = function () {
function e(e, t) {
for (var n = 0; n < t.length; n++) {
var r = t[n];r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
}
}return function (t, n, r) {
return n && e(t.prototype, n), r && e(t, r), t;
};
}(),
a = function () {
function e(t) {
r(this, e), this.conference = t, t.addEventListener(i.TRACK_AUDIO_LEVEL_CHANGED, this._audioLevel.bind(this)), this.myUserID = this.conference.myUserId();
}return o(e, [{ key: "_audioLevel", value: function value(e, t) {
!this.conference.isP2PActive() || t <= .6 || e === this.myUserID && this.conference.getLocalAudioTrack().isMuted() || this.conference.eventEmitter.emit(i.DOMINANT_SPEAKER_CHANGED, e);
} }]), e;
}();t.a = a;
}, function (e, t, n) {
"use strict";
(function (e) {
function r(e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
}var i = n(0),
o = (n.n(i), n(8)),
a = n.n(o),
s = n(3),
c = n.n(s),
u = function () {
function e(e, t) {
for (var n = 0; n < t.length; n++) {
var r = t[n];r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
}
}return function (t, n, r) {
return n && e(t.prototype, n), r && e(t, r), t;
};
}(),
l = n.i(i.getLogger)(e),
d = function () {
function e(t, n, i) {
var o = this;if (r(this, e), !t && !n) throw new TypeError("At least peerconnection or wsUrl must be given");if (t && n) throw new TypeError("Just one of peerconnection or wsUrl must be given");if (t ? l.debug("constructor() with peerconnection") : l.debug('constructor() with wsUrl:"' + n + '"'), this._channel = null, this._eventEmitter = i, this._mode = null, t) t.ondatachannel = function (e) {
var t = e.channel;o._handleChannel(t), o._mode = "datachannel";
};else if (n) {
var a = new WebSocket(n);this._handleChannel(a), this._mode = "websocket";
}
}return u(e, [{ key: "close", value: function value() {
if (this._channel) {
try {
this._channel.close();
} catch (e) {}this._channel = null;
}
} }, { key: "isOpen", value: function value() {
return this._channel && ("open" === this._channel.readyState || this._channel.readyState === WebSocket.OPEN);
} }, { key: "sendMessage", value: function value(e, t) {
this._send({ colibriClass: "EndpointMessage", msgPayload: t, to: e });
} }, { key: "sendSetLastNMessage", value: function value(e) {
var t = { colibriClass: "LastNChangedEvent", lastN: e };this._send(t), l.log("Channel lastN set to: " + e);
} }, { key: "sendPinnedEndpointMessage", value: function value(e) {
l.log("sending pinned changed notification to the bridge for endpoint ", e), this._send({ colibriClass: "PinnedEndpointChangedEvent", pinnedEndpoint: e || null });
} }, { key: "sendSelectedEndpointMessage", value: function value(e) {
l.log("sending selected changed notification to the bridge for endpoint ", e), this._send({ colibriClass: "SelectedEndpointChangedEvent", selectedEndpoint: e || null });
} }, { key: "sendReceiverVideoConstraintMessage", value: function value(e) {
l.log("sending a ReceiverVideoConstraint message with a maxFrameHeight of " + e + " pixels"), this._send({ colibriClass: "ReceiverVideoConstraint", maxFrameHeight: e });
} }, { key: "_handleChannel", value: function value(e) {
var t = this,
n = this._eventEmitter;e.onopen = function () {
l.info(t._mode + " channel opened"), n.emit(a.a.DATA_CHANNEL_OPEN);
}, e.onerror = function (e) {
l.error("Channel error:", e);
}, e.onmessage = function (e) {
var t = e.data,
r = void 0;try {
r = JSON.parse(t);
} catch (e) {
return c.a.callErrorHandler(e), void l.error("Failed to parse channel message as JSON: ", t, e);
}var i = r.colibriClass;switch (i) {case "DominantSpeakerEndpointChangeEvent":
var o = r.dominantSpeakerEndpoint;l.info("Channel new dominant speaker event: ", o), n.emit(a.a.DOMINANT_SPEAKER_CHANGED, o);break;case "EndpointConnectivityStatusChangeEvent":
var s = r.endpoint,
u = "true" === r.active;l.info("Endpoint connection status changed: " + s + " active ? " + u), n.emit(a.a.ENDPOINT_CONN_STATUS_CHANGED, s, u);break;case "EndpointMessage":
n.emit(a.a.ENDPOINT_MESSAGE_RECEIVED, r.from, r.msgPayload);break;case "LastNEndpointsChangeEvent":
var d = r.lastNEndpoints;l.info("Channel new last-n event: ", d, r), n.emit(a.a.LASTN_ENDPOINT_CHANGED, d, r);break;default:
l.debug("Channel JSON-formatted message: ", r), n.emit("rtc.datachannel." + i, r);}
}, e.onclose = function () {
l.info("Channel closed"), t._channel = null;
}, this._channel = e;
} }, { key: "_send", value: function value(e) {
var t = this._channel;if (!this.isOpen()) throw new Error("No opened channel");t.send(JSON.stringify(e));
} }, { key: "mode", get: function get() {
return this._mode;
} }]), e;
}();t.a = d;
}).call(t, "modules/RTC/BridgeChannel.js");
}, function (e, t, n) {
"use strict";
(function (e) {
function r(e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
}function i(e, t) {
if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return !t || "object" != typeof t && "function" != typeof t ? e : t;
}function o(e, t) {
if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);
}function a(e, t) {
return e.inMuteOrUnmuteProgress ? Promise.reject(new d.a(p.TRACK_MUTE_UNMUTE_IN_PROGRESS)) : (e.inMuteOrUnmuteProgress = !0, e._setMute(t).then(function () {
e.inMuteOrUnmuteProgress = !1;
}).catch(function (t) {
throw e.inMuteOrUnmuteProgress = !1, t;
}));
}var s = n(52),
c = n.n(s),
u = n(0),
l = (n.n(u), n(46)),
d = n(11),
p = n(15),
f = n(16),
h = n(4),
m = n(2),
v = n(8),
g = n.n(v),
y = n(23),
b = n(6),
S = n(17),
E = n.n(S),
T = function () {
function e(e, t) {
for (var n = 0; n < t.length; n++) {
var r = t[n];r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
}
}return function (t, n, r) {
return n && e(t.prototype, n), r && e(t, r), t;
};
}(),
_ = function e(t, n, r) {
null === t && (t = Function.prototype);var i = Object.getOwnPropertyDescriptor(t, n);if (void 0 === i) {
var o = Object.getPrototypeOf(t);return null === o ? void 0 : e(o, n, r);
}if ("value" in i) return i.value;var a = i.get;return void 0 !== a ? a.call(r) : void 0;
},
C = n.i(u.getLogger)(e),
w = function (e) {
function t(e) {
r(this, t);var n = e.rtcId,
o = e.stream,
a = e.track,
s = e.mediaType,
c = e.videoType,
u = e.resolution,
l = e.deviceId,
d = e.facingMode,
p = e.sourceId,
h = e.sourceType,
v = i(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, null, o, a, function () {
v.dontFireRemoveEvent || v.emit(f.LOCAL_TRACK_STOPPED), v.dontFireRemoveEvent = !1;
}, s, c));return v.rtcId = n, v.dontFireRemoveEvent = !1, v.resolution = u, v.sourceId = p, v.sourceType = h, m.a.isFirefox() && (v.resolution = null), v.deviceId = l, v.storedMSID = v.getMSID(), v.inMuteOrUnmuteProgress = !1, v._facingMode = d, v._trackEnded = !1, v._bytesSent = null, v._testByteSent = !0, v._realDeviceId = "" === v.deviceId ? void 0 : v.deviceId, v.stopStreamInProgress = !1, v._noDataFromSourceTimeout = null, v._onDeviceListChanged = function (e) {
v._setRealDeviceIdFromDeviceList(e), void 0 !== v.getTrack().readyState || void 0 === v._realDeviceId || e.find(function (e) {
return e.deviceId === v._realDeviceId;
}) || (v._trackEnded = !0);
}, v.isAudioTrack() && y.a.isDeviceChangeAvailable("output") && (v._onAudioOutputDeviceChanged = v.setAudioOutput.bind(v), y.a.addListener(g.a.AUDIO_OUTPUT_DEVICE_CHANGED, v._onAudioOutputDeviceChanged)), y.a.addListener(g.a.DEVICE_LIST_CHANGED, v._onDeviceListChanged), v._initNoDataFromSourceHandlers(), v;
}return o(t, e), T(t, [{ key: "isEnded", value: function value() {
return "ended" === this.getTrack().readyState || this._trackEnded;
} }, { key: "_initNoDataFromSourceHandlers", value: function value() {
var e = this;if (this.isVideoTrack() && this.videoType === E.a.CAMERA) {
var t = this._onNoDataFromSourceError.bind(this);this._setHandler("track_mute", function () {
if (e._checkForCameraIssues()) {
var n = window.performance.now();e._noDataFromSourceTimeout = setTimeout(t, 3e3), e._setHandler("track_unmute", function () {
e._clearNoDataFromSourceMuteResources(), b.a.sendEventToAll(e.getType() + ".track_unmute", { value: window.performance.now() - n });
});
}
}), this._setHandler("track_ended", t);
}
} }, { key: "_clearNoDataFromSourceMuteResources", value: function value() {
this._noDataFromSourceTimeout && (clearTimeout(this._noDataFromSourceTimeout), this._noDataFromSourceTimeout = null), this._setHandler("track_unmute", void 0);
} }, { key: "_onNoDataFromSourceError", value: function value() {
this._clearNoDataFromSourceMuteResources(), this._checkForCameraIssues() && this._fireNoDataFromSourceEvent();
} }, { key: "_fireNoDataFromSourceEvent", value: function value() {
this.emit(f.NO_DATA_FROM_SOURCE);var e = this.getType() + ".no_data_from_source";b.a.analytics.sendEvent(e);var t = { name: e };this.isAudioTrack() && (t.isReceivingData = this._isReceivingData()), b.a.sendLog(JSON.stringify(t));
} }, { key: "_setRealDeviceIdFromDeviceList", value: function value(e) {
var t = this.getTrack(),
n = e.find(function (e) {
return e.kind === t.kind + "input" && e.label === t.label;
});n && (this._realDeviceId = n.deviceId);
} }, { key: "_setStream", value: function value(e) {
_(t.prototype.__proto__ || Object.getPrototypeOf(t.prototype), "_setStream", this).call(this, e), e ? (this.storedMSID = this.getMSID(), C.debug("Setting new MSID: " + this.storedMSID + " on " + this)) : C.debug("Setting 'null' stream on " + this);
} }, { key: "mute", value: function value() {
return a(this, !0);
} }, { key: "unmute", value: function value() {
return a(this, !1);
} }, { key: "_setMute", value: function value(e) {
var t = this;if (this.isMuted() === e) return Promise.resolve();var n = Promise.resolve();this.dontFireRemoveEvent = !1;var r = function r() {
return C.info("Mute " + t + ": " + e);
};if (this.isAudioTrack() || this.videoType === E.a.DESKTOP || !m.a.doesVideoMuteByStreamRemove()) r(), this.track && (this.track.enabled = !e);else if (e) this.dontFireRemoveEvent = !0, n = new Promise(function (e, n) {
r(), t._removeStreamFromConferenceAsMute(function () {
t._stopMediaStream(), t._setStream(null), e();
}, function (e) {
n(e);
});
});else {
r();var i = { cameraDeviceId: this.getDeviceId(), devices: [h.b], facingMode: this.getCameraFacingMode() };this.resolution && (i.resolution = this.resolution), n = y.a.obtainAudioAndVideoPermissions(i).then(function (e) {
var n = t.getType(),
r = e.find(function (e) {
return e.mediaType === n;
});if (!r) throw new d.a(p.TRACK_NO_STREAM_FOUND);return t._setStream(r.stream), t.track = r.track, t.videoType !== r.videoType && (C.warn(t + ": video type has changed after unmute!", t.videoType, r.videoType), t.videoType = r.videoType), t.containers = t.containers.map(function (e) {
return y.a.attachMediaStream(e, t.stream);
}), t._addStreamToConferenceAsUnmute();
});
}return n.then(function () {
return t._sendMuteStatus(e);
}).then(function () {
t.emit(f.TRACK_MUTE_CHANGED, t);
});
} }, { key: "_addStreamToConferenceAsUnmute", value: function value() {
var e = this;return this.conference ? new Promise(function (t, n) {
e.conference._addLocalTrackAsUnmute(e).then(t, function (e) {
return n(new Error(e));
});
}) : Promise.resolve();
} }, { key: "_removeStreamFromConferenceAsMute", value: function value(e, t) {
if (!this.conference) return void e();this.conference._removeLocalTrackAsMute(this).then(e, function (e) {
return t(new Error(e));
});
} }, { key: "_sendMuteStatus", value: function value(e) {
var t = this;return this.conference && this.conference.room ? new Promise(function (n) {
t.conference.room[t.isAudioTrack() ? "setAudioMute" : "setVideoMute"](e, n);
}) : Promise.resolve();
} }, { key: "dispose", value: function value() {
var e = this,
n = Promise.resolve();return this.conference && (n = this.conference.removeTrack(this)), this.stream && (this._stopMediaStream(), this.detach()), y.a.removeListener(g.a.DEVICE_LIST_CHANGED, this._onDeviceListChanged), this._onAudioOutputDeviceChanged && y.a.removeListener(g.a.AUDIO_OUTPUT_DEVICE_CHANGED, this._onAudioOutputDeviceChanged), n.then(function () {
return _(t.prototype.__proto__ || Object.getPrototypeOf(t.prototype), "dispose", e).call(e);
});
} }, { key: "isMuted", value: function value() {
return !(this.stream && (!this.isVideoTrack() || this.isActive()) && this.track && this.track.enabled);
} }, { key: "_setConference", value: function value(e) {
this.conference = e;for (var t = 0; t < this.containers.length; t++) {
this._maybeFireTrackAttached(this.containers[t]);
}
} }, { key: "isLocal", value: function value() {
return !0;
} }, { key: "getDeviceId", value: function value() {
return this._realDeviceId || this.deviceId;
} }, { key: "getParticipantId", value: function value() {
return this.conference && this.conference.myUserId();
} }, { key: "_setByteSent", value: function value(e, t) {
var n = this;this._bytesSent = t;var r = e.getConnectionState();this._testByteSent && "connected" === r && (setTimeout(function () {
n._bytesSent <= 0 && (C.warn(n + " 'bytes sent' <= 0: " + n._bytesSent), n._fireNoDataFromSourceEvent());
}, 3e3), this._testByteSent = !1);
} }, { key: "getCameraFacingMode", value: function value() {
if (this.isVideoTrack() && this.videoType === E.a.CAMERA) {
var e = void 0;try {
e = this.track.getSettings();
} catch (e) {}return e && "facingMode" in e ? e.facingMode : void 0 !== this._facingMode ? this._facingMode : c.a.USER;
}
} }, { key: "_stopMediaStream", value: function value() {
this.stopStreamInProgress = !0, y.a.stopMediaStream(this.stream), this.stopStreamInProgress = !1;
} }, { key: "_switchCamera", value: function value() {
this.isVideoTrack() && this.videoType === E.a.CAMERA && "function" == typeof this.track._switchCamera && (this.track._switchCamera(), this._facingMode = this._facingMode === c.a.ENVIRONMENT ? c.a.USER : c.a.ENVIRONMENT);
} }, { key: "_checkForCameraIssues", value: function value() {
return !(!this.isVideoTrack() || this.stopStreamInProgress || this.videoType === E.a.DESKTOP || this._isReceivingData());
} }, { key: "_isReceivingData", value: function value() {
return !!this.stream && this.stream.getTracks().some(function (e) {
return !("readyState" in e && "live" !== e.readyState || "muted" in e && !0 === e.muted);
});
} }, { key: "toString", value: function value() {
return "LocalTrack[" + this.rtcId + "," + this.getType() + "]";
} }]), t;
}(l.a);t.a = w;
}).call(t, "modules/RTC/JitsiLocalTrack.js");
}, function (e, t, n) {
"use strict";
(function (e) {
function r(e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
}function i(e, t) {
if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return !t || "object" != typeof t && "function" != typeof t ? e : t;
}function o(e, t) {
if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);
}var a = n(46),
s = n(16),
c = n(2),
u = n(6),
l = function () {
function e(e, t) {
for (var n = 0; n < t.length; n++) {
var r = t[n];r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
}
}return function (t, n, r) {
return n && e(t.prototype, n), r && e(t, r), t;
};
}(),
d = n(0).getLogger(e),
p = n(8),
f = !1,
h = !1,
m = function (e) {
function t(e, n, o, a, s, c, u, l, d, p) {
r(this, t);var f = i(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, n, a, s, function () {}, c, u));if (f.rtc = e, "number" != typeof l) throw new TypeError("SSRC " + l + " is not a number");return f.ssrc = l, f.ownerEndpointId = o, f.muted = d, f.isP2P = p, f.hasBeenMuted = d, f.rtc && f.track && f._bindMuteHandlers(), f;
}return o(t, e), l(t, [{ key: "_bindMuteHandlers", value: function value() {
var e = this;this.track.addEventListener ? (this.track.addEventListener("mute", function () {
return e._onTrackMute();
}), this.track.addEventListener("unmute", function () {
return e._onTrackUnmute();
})) : this.track.attachEvent && (this.track.attachEvent("onmute", function () {
return e._onTrackMute();
}), this.track.attachEvent("onunmute", function () {
return e._onTrackUnmute();
}));
} }, { key: "_onTrackMute", value: function value() {
d.debug('"onmute" event(' + Date.now() + "): ", this.getParticipantId(), this.getType(), this.getSSRC()), this.rtc.eventEmitter.emit(p.REMOTE_TRACK_MUTE, this);
} }, { key: "_onTrackUnmute", value: function value() {
d.debug('"onunmute" event(' + Date.now() + "): ", this.getParticipantId(), this.getType(), this.getSSRC()), this.rtc.eventEmitter.emit(p.REMOTE_TRACK_UNMUTE, this);
} }, { key: "setMute", value: function value(e) {
this.muted !== e && (e && (this.hasBeenMuted = !0), this.stream && (this.stream.muted = e), this.muted = e, this.emit(s.TRACK_MUTE_CHANGED, this));
} }, { key: "isMuted", value: function value() {
return this.muted;
} }, { key: "getParticipantId", value: function value() {
return this.ownerEndpointId;
} }, { key: "isLocal", value: function value() {
return !1;
} }, { key: "getSSRC", value: function value() {
return this.ssrc;
} }, { key: "_setVideoType", value: function value(e) {
this.videoType !== e && (this.videoType = e, this.emit(s.TRACK_VIDEOTYPE_CHANGED, e));
} }, { key: "_playCallback", value: function value() {
var e = this.isVideoTrack() ? "video" : "audio",
t = window.performance.now();console.log("(TIME) Render " + e + ":\t", t), this.conference.getConnectionTimes()[e + ".render"] = t;var n = window.connectionTimes["obtainPermissions.start"],
r = window.connectionTimes["obtainPermissions.end"],
i = isNaN(r) || isNaN(n) ? 0 : r - n,
o = t - (this.conference.getConnectionTimes()["session.initiate"] - this.conference.getConnectionTimes()["muc.joined"]) - i;this.conference.getConnectionTimes()[e + ".ttfm"] = o, console.log("(TIME) TTFM " + e + ":\t", o);var a = e + ".ttfm";this.hasBeenMuted && (a += ".muted"), u.a.analytics.sendEvent(a, { value: o });
} }, { key: "_attachTTFMTracker", value: function value(e) {
if (!(f && this.isAudioTrack() || h && this.isVideoTrack())) if (this.isAudioTrack() && (f = !0), this.isVideoTrack() && (h = !0), c.a.isTemasysPluginUsed()) {
var t = n(33);t.addEvent(e, "play", this._playCallback.bind(this));
} else e.addEventListener("canplay", this._playCallback.bind(this));
} }, { key: "toString", value: function value() {
return "RemoteTrack[" + this.ownerEndpointId + ", " + this.getType() + ", p2p: " + this.isP2P + "]";
} }]), t;
}(a.a);t.a = m;
}).call(t, "modules/RTC/JitsiRemoteTrack.js");
}, function (e, t, n) {
"use strict";
(function (e) {
function r(e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
}var i = n(0),
o = (n.n(i), n(4)),
a = n(24),
s = function () {
function e(e, t) {
for (var n = 0; n < t.length; n++) {
var r = t[n];r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
}
}return function (t, n, r) {
return n && e(t.prototype, n), r && e(t, r), t;
};
}(),
c = n.i(i.getLogger)(e),
u = function () {
function e(t) {
r(this, e), this.tpc = t;
}return s(e, [{ key: "_addMutedLocalVideoTracksToSDP", value: function value(e) {
var t = this.tpc.getLocalTracks(o.b);if (!t.length) return !1;1 !== t.length && c.error(this.tpc + " there is more than 1 video track ! Strange things may happen !", t);var n = e.selectMedia("video");if (!n) return c.error(this.tpc + ' unable to hack local video track SDP- no "video" media'), !1;var r = !1,
i = !0,
a = !1,
s = void 0;try {
for (var u, l = t[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(i = (u = l.next()).done); i = !0) {
var d = u.value,
p = d.isMuted(),
f = d.inMuteOrUnmuteProgress,
h = p || f;if (c.debug(this.tpc + " " + d + " isMuted: " + p + ", is mute in progress: " + f + " => should fake sdp ? : " + h), h) {
var m = this.tpc.isSimulcastOn() ? this.tpc.simulcast.ssrcCache : [this.tpc.sdpConsistency.cachedPrimarySsrc];if (m.length) {
r = !0, n.direction = "sendrecv";var v = m[0],
g = "injected-" + v,
y = !0,
b = !1,
S = void 0;try {
for (var E, T = m[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(y = (E = T.next()).done); y = !0) {
var _ = E.value;n.removeSSRC(_), c.debug(this.tpc + " injecting video SSRC: " + _ + " for " + d), n.addSSRCAttribute({ id: _, attribute: "cname", value: g }), n.addSSRCAttribute({ id: _, attribute: "msid", value: d.storedMSID });
}
} catch (e) {
b = !0, S = e;
} finally {
try {
!y && T.return && T.return();
} finally {
if (b) throw S;
}
}if (m.length > 1) {
var C = { ssrcs: m.join(" "), semantics: "SIM" };n.findGroup(C.semantics, C.ssrcs) || (c.debug(this.tpc + " injecting SIM group for " + d, C), n.addSSRCGroup(C));
}this.tpc.options.disableRtx || this.tpc.rtxModifier.modifyRtxSsrcs2(n);
} else c.error("No SSRCs stored for: " + d + " in " + this.tpc);
}
}
} catch (e) {
a = !0, s = e;
} finally {
try {
!i && l.return && l.return();
} finally {
if (a) throw s;
}
}return r;
} }, { key: "maybeMungeLocalSdp", value: function value(e) {
if (e && e.sdp) {
var t = new a.a(e.sdp);this._addMutedLocalVideoTracksToSDP(t) && (e.sdp = t.toRawSDP());
}
} }]), e;
}();t.a = u;
}).call(t, "modules/RTC/LocalSdpMunger.js");
}, function (e, t, n) {
"use strict";
(function (e) {
var r = n(2),
i = n(0).getLogger(e),
o = { getVideoElementName: function getVideoElementName() {
return r.a.isTemasysPluginUsed() ? "object" : "video";
}, findVideoElement: function findVideoElement(e) {
var t = o.getVideoElementName();if (!r.a.isTemasysPluginUsed()) return $(e).find(t)[0];var n = $(e).find(" " + t + '>param[value="video"]');return n.length ? (n.length > 1 && i.warn("Container with more than one video elements: ", e), n.parent()[0]) : void 0;
}, isResizeEventSupported: function isResizeEventSupported() {
return !r.a.isTemasysPluginUsed();
}, setVolume: function setVolume(e, t) {
r.a.isIExplorer() || (e.volume = t);
}, setAutoPlay: function setAutoPlay(e, t) {
r.a.isIExplorer() || (e.autoplay = t);
} };t.a = o;
}).call(t, "modules/RTC/RTCUIHelper.js");
}, function (e, t, n) {
"use strict";
(function (e) {
function r(e, t, n) {
T(["screen"], function (e) {
return t({ stream: e });
}, n);
}function i(e) {
return "https://chrome.google.com/webstore/detail/" + e.desktopSharingChromeExtId;
}function o(e, t) {
try {
for (var n = e.split("."), r = t.split("."), i = Math.max(n.length, r.length), o = 0; o < i; o++) {
var a = 0,
s = 0;if (o < n.length && (a = parseInt(n[o], 10)), o < r.length && (s = parseInt(r[o], 10)), isNaN(a) || isNaN(s)) return !0;if (a !== s) return a > s;
}return !1;
} catch (e) {
return g.callErrorHandler(e), v.error("Failed to parse extension version", e), !0;
}
}function a(e, t) {
if ("undefined" == typeof chrome || !chrome || !chrome.runtime) return void e(!1, !1);chrome.runtime.sendMessage(t.desktopSharingChromeExtId, { getVersion: !0 }, function (n) {
if (!n || !n.version) return v.warn("Extension not installed?: ", chrome.runtime.lastError), void e(!1, !1);var r = n.version;v.log("Extension version is: " + r);var i = o(t.desktopSharingChromeMinExtVersion, r);e(!i, i);
});
}function s(e, t, n) {
chrome.runtime.sendMessage(e.desktopSharingChromeExtId, { getStream: !0, sources: e.desktopSharingChromeSources }, function (e) {
if (!e) {
var r = chrome.runtime.lastError;return void n(r instanceof Error ? r : new f.a(h.CHROME_EXTENSION_GENERIC_ERROR, r));
}v.log("Response from extension: ", e), d(e, t, n);
});
}function c(e) {
0 === $("link[rel=chrome-webstore-item]").length && $("head").append('<link rel="chrome-webstore-item">'), $("link[rel=chrome-webstore-item]").attr("href", i(e));
}function u(e) {
return c(e), new Promise(function (t) {
a(function (e, n) {
y = e, b = n, v.info("Chrome extension installed: " + y + " updateRequired: " + b), t();
}, e);
});
}function l(e, t, n) {
return 0 === n ? Promise.reject() : new Promise(function (r, i) {
var o = n,
s = window.setInterval(function () {
a(function (e) {
e ? (window.clearInterval(s), r()) : 0 == --o && (i(), window.clearInterval(s));
}, e);
}, t);
});
}function d(e, t, n) {
var r = e.streamId,
i = e.streamType,
o = e.error;if (r) T(["desktop"], function (e) {
return t({ stream: e, sourceId: r, sourceType: i });
}, n, { desktopStream: r });else {
if ("" === r) return void n(new f.a(h.CHROME_EXTENSION_USER_CANCELED));n(new f.a(h.CHROME_EXTENSION_GENERIC_ERROR, o));
}
}function p(e) {
if (!e.desktopSharingFirefoxDisabled && !1 !== S && !0 !== S) {
if (!e.desktopSharingFirefoxExtId) return void (S = !1);var t = document.createElement("img");t.onload = function () {
v.log("Detected firefox screen sharing extension."), S = !0;
}, t.onerror = function () {
v.log("Detected lack of firefox screen sharing extension."), S = !1;
};var n = "chrome://" + e.desktopSharingFirefoxExtId.replace("@", ".") + "/content/" + document.location.hostname + ".png";t.setAttribute("src", n);
}
}var f = n(11),
h = n(15),
m = n(2),
v = n(0).getLogger(e),
g = n(3),
y = !1,
b = !1,
S = null,
E = !1,
T = null,
_ = { intChromeExtPromise: null, obtainStream: null, init: function init() {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : { disableDesktopSharing: !1, desktopSharingChromeDisabled: !1, desktopSharingChromeExtId: null, desktopSharingFirefoxDisabled: !1, desktopSharingFirefoxExtId: null },
t = arguments[1];this.options = e = e || {}, T = t, this.obtainStream = this.options.disableDesktopSharing ? null : this._createObtainStreamMethod(e), this.obtainStream || v.info("Desktop sharing disabled");
}, _createObtainStreamMethod: function _createObtainStreamMethod(e) {
var t = this;if (m.a.isNWJS()) return function (e, t, n) {
window.JitsiMeetNW.obtainDesktopStream(t, function (e, t) {
var r = void 0;r = e && "InvalidStateError" === e.name ? new f.a(h.CHROME_EXTENSION_USER_CANCELED) : new f.a(e, t, ["desktop"]), "function" == typeof n && n(r);
});
};if (m.a.isElectron()) return this.obtainScreenOnElectron;if (m.a.isTemasysPluginUsed()) {
var i = n(33).WebRTCPlugin.plugin;return i.HasScreensharingFeature ? i.isScreensharingAvailable ? (v.info("Using Temasys plugin for desktop sharing"), r) : (v.warn("Screensharing not available with Temasys plugin on this site"), null) : (v.warn("Screensharing not supported by this plugin version"), null);
}return m.a.isChrome() ? m.a.getChromeVersion() < 34 ? (v.info("Chrome extension not supported until ver 34"), null) : e.desktopSharingChromeDisabled || !1 === e.desktopSharingChromeMethod || !e.desktopSharingChromeExtId ? null : (v.info("Using Chrome extension for desktop sharing"), this.intChromeExtPromise = u(e).then(function () {
t.intChromeExtPromise = null;
}), this.obtainScreenFromExtension) : m.a.isFirefox() ? e.desktopSharingFirefoxDisabled ? null : "http:" === window.location.protocol ? (v.log("Screen sharing is not supported over HTTP. Use of HTTPS is required."), null) : (p(e), this.obtainScreenOnFirefox) : (v.log("Screen sharing not supported by the current browser: ", m.a.getBrowserType(), m.a.getBrowserName()), null);
}, isSupported: function isSupported() {
return null !== this.obtainStream;
}, obtainScreenOnFirefox: function obtainScreenOnFirefox(e, t, n) {
var i = this,
o = !1,
a = this.options.desktopSharingFirefoxMaxVersionExtRequired;return (-1 === a || a >= 0 && m.a.getFirefoxVersion() <= a) && (o = !0, v.log("Jidesha extension required on firefox version " + m.a.getFirefoxVersion())), o && !0 !== S ? (E && (E = !1, p(this.options)), null === S ? (window.setTimeout(function () {
null === S && (S = !1), i.obtainScreenOnFirefox(t, n);
}, 300), void v.log("Waiting for detection of jidesha on firefox to finish.")) : (S = null, E = !0, void n(new f.a(h.FIREFOX_EXTENSION_NEEDED)))) : void r(e, t, n);
}, obtainScreenOnElectron: function obtainScreenOnElectron() {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
t = arguments[1],
n = arguments[2];window.JitsiMeetScreenObtainer && window.JitsiMeetScreenObtainer.openDesktopPicker ? window.JitsiMeetScreenObtainer.openDesktopPicker({ desktopSharingSources: e.desktopSharingSources || this.options.desktopSharingChromeSources }, function (e, r) {
return d({ streamId: e, streamType: r }, t, n);
}, function (e) {
return n(new f.a(h.ELECTRON_DESKTOP_PICKER_ERROR, e));
}) : n(new f.a(h.ELECTRON_DESKTOP_PICKER_NOT_FOUND));
}, obtainScreenFromExtension: function obtainScreenFromExtension(e, t, n) {
var r = this;if (null !== this.intChromeExtPromise) return void this.intChromeExtPromise.then(function () {
r.obtainScreenFromExtension(e, t, n);
});var o = this.options,
a = o.desktopSharingChromeExtId,
c = o.desktopSharingChromeSources,
u = { desktopSharingChromeExtId: a, desktopSharingChromeSources: e.desktopSharingSources || c };if (y) s(u, t, n);else {
b && alert("Jitsi Desktop Streamer requires update. Changes will take effect after next Chrome restart.");try {
chrome.webstore.install(i(this.options), function (i) {
v.log("Extension installed successfully", i), y = !0, l(r.options, 200, 10).then(function () {
s(u, t, n);
}).catch(function () {
r.handleExtensionInstallationError(e, t, n);
});
}, this.handleExtensionInstallationError.bind(this, e, t, n));
} catch (r) {
this.handleExtensionInstallationError(e, t, n, r);
}
}
}, handleExtensionInstallationError: function handleExtensionInstallationError(e, t, n, r) {
var o = i(this.options);if (("Inline installs can not be initiated from pop-up windows." === r || "Chrome Web Store installations can only be started by the top frame." === r || "Installs can only be initiated by one of the Chrome Web Store item's verified sites." === r) && e.interval > 0 && "function" == typeof e.checkAgain && "function" == typeof e.listener) return e.listener("waitingForExtension", o), void this.checkForChromeExtensionOnInterval(e, t, n, r);var a = "Failed to install the extension from " + o;v.log(a, r);var s = "Chrome Web Store installations can only be initated by a user gesture." === r ? h.CHROME_EXTENSION_USER_GESTURE_REQUIRED : h.CHROME_EXTENSION_INSTALLATION_ERROR;n(new f.a(s, a));
}, checkForChromeExtensionOnInterval: function checkForChromeExtensionOnInterval(e, t, n) {
var r = this;if (!1 === e.checkAgain()) return void n(new f.a(h.CHROME_EXTENSION_INSTALLATION_ERROR));l(this.options, e.interval, 1).then(function () {
y = !0, e.listener("extensionFound"), r.obtainScreenFromExtension(e, t, n);
}).catch(function () {
r.checkForChromeExtensionOnInterval(e, t, n);
});
} };t.a = _;
}).call(t, "modules/RTC/ScreenObtainer.js");
}, function (e, t, n) {
"use strict";
(function (e) {
function r(e, t, r, i, o, a, s) {
var c = this;this.audioTransferActive = !0, this.videoTransferActive = !0, this.rtc = e, this.id = t, this.isP2P = a, this.remoteTracks = new Map(), this.localTracks = new Map(), this.localSSRCs = new Map(), this.localUfrag = null, this.remoteUfrag = null, this.signalingLayer = r, this._peerVideoTypeChanged = this._peerVideoTypeChanged.bind(this), this.signalingLayer.on(_.a, this._peerVideoTypeChanged), this._peerMutedChanged = this._peerMutedChanged.bind(this), this.signalingLayer.on(_.b, this._peerMutedChanged), this.options = s, this.peerconnection = new h.a.RTCPeerConnectionType(i, o), this.updateLog = [], this.stats = {}, this.statsinterval = null, this.maxstats = 0;var u = n(140).Interop;this.interop = new u();var l = n(143);this.simulcast = new l({ numOfLayers: R, explodeRemoteSimulcast: !1 }), this.sdpConsistency = new S.a(this.toString()), this.localSdpMunger = new p.a(this), this.eventEmitter = e.eventEmitter, this.rtxModifier = new y.a(), this.trace = function (e, t) {
c.updateLog.push({ time: new Date(), type: e, value: t || "" });
}, this.onicecandidate = null, this.peerconnection.onicecandidate = function (e) {
m.a.isTemasysPluginUsed() || c.trace("onicecandidate", JSON.stringify(e.candidate, null, " ")), null !== c.onicecandidate && c.onicecandidate(e);
}, this.peerconnection.onaddstream = function (e) {
return c._remoteStreamAdded(e.stream);
}, this.peerconnection.onremovestream = function (e) {
return c._remoteStreamRemoved(e.stream);
}, this.onsignalingstatechange = null, this.peerconnection.onsignalingstatechange = function (e) {
c.trace("onsignalingstatechange", c.signalingState), null !== c.onsignalingstatechange && c.onsignalingstatechange(e);
}, this.oniceconnectionstatechange = null, this.peerconnection.oniceconnectionstatechange = function (e) {
c.trace("oniceconnectionstatechange", c.iceConnectionState), null !== c.oniceconnectionstatechange && c.oniceconnectionstatechange(e);
}, this.onnegotiationneeded = null, this.peerconnection.onnegotiationneeded = function (e) {
c.trace("onnegotiationneeded"), null !== c.onnegotiationneeded && c.onnegotiationneeded(e);
}, this.ondatachannel = null, this.peerconnection.ondatachannel = function (e) {
c.trace("ondatachannel", e), null !== c.ondatachannel && c.ondatachannel(e);
}, !m.a.isFirefox() && this.maxstats && (this.statsinterval = window.setInterval(function () {
c.peerconnection.getStats(function (e) {
for (var t = e.result(), n = new Date(), r = 0; r < t.length; ++r) {
!function (e) {
t[e].names().forEach(function (r) {
var i = t[e].id + "-" + r,
o = c.stats[i];o || (c.stats[i] = o = { startTime: n, endTime: n, values: [], times: [] }), o.values.push(t[e].stat(r)), o.times.push(n.getTime()), o.values.length > c.maxstats && (o.values.shift(), o.times.shift()), o.endTime = n;
});
}(r);
}
});
}, 1e3)), w.info("Create new " + this);
}function i(e) {
var t = new Map(),
n = new Map();if ("object" !== (void 0 === e ? "undefined" : C(e)) || null === e || "string" != typeof e.sdp) return w.warn("An empty description was passed as an argument."), t;var r = c.a.parse(e.sdp);if (!Array.isArray(r.media)) return t;var i = !0,
o = !1,
a = void 0;try {
for (var s, u = r.media[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(i = (s = u.next()).done); i = !0) {
var l = s.value;if (Array.isArray(l.ssrcs)) {
if (Array.isArray(l.ssrcGroups)) {
var d = !0,
p = !1,
f = void 0;try {
for (var h, m = l.ssrcGroups[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(d = (h = m.next()).done); d = !0) {
var v = h.value;if (void 0 !== v.semantics && void 0 !== v.ssrcs) {
var g = v.ssrcs.split(" ").map(function (e) {
return parseInt(e, 10);
}),
y = g[0];v.ssrcs = g, n.has(y) || n.set(y, []), n.get(y).push(v);
}
}
} catch (e) {
p = !0, f = e;
} finally {
try {
!d && m.return && m.return();
} finally {
if (p) throw f;
}
}
}var b = !0,
S = !1,
E = void 0;try {
for (var T, _ = l.ssrcs[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(b = (T = _.next()).done); b = !0) {
var R = T.value;if ("msid" === R.attribute) {
var k = R.value,
A = t.get(k);A || (A = { ssrcs: [], groups: [], msid: k }, t.set(k, A));var I = R.id;if (A.ssrcs.push(I), n.has(I)) {
var P = n.get(I),
O = !0,
D = !1,
L = void 0;try {
for (var N, M = P[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(O = (N = M.next()).done); O = !0) {
var x = N.value;A.groups.push(x);
}
} catch (e) {
D = !0, L = e;
} finally {
try {
!O && M.return && M.return();
} finally {
if (D) throw L;
}
}
}
}
}
} catch (e) {
S = !0, E = e;
} finally {
try {
!b && _.return && _.return();
} finally {
if (S) throw E;
}
}
}
}
} catch (e) {
o = !0, a = e;
} finally {
try {
!i && u.return && u.return();
} finally {
if (o) throw a;
}
}return t;
}function o(e) {
return e && e.groups && e.groups.length ? e.groups[0].ssrcs[0] : e && e.ssrcs && e.ssrcs.length ? e.ssrcs[0] : null;
}t.a = r;var a = n(0),
s = (n.n(a), n(13)),
c = n.n(s),
u = n(3),
l = (n.n(u), n(91)),
d = n(4),
p = n(92),
f = n(22),
h = n(23),
m = n(2),
v = n(8),
g = n.n(v),
y = n(124),
b = n(51),
S = n(126),
E = n(24),
T = n(12),
_ = n(53),
C = "function" == typeof Symbol && "symbol" == typeof (typeof Symbol === "function" ? Symbol.iterator : "@@iterator") ? function (e) {
return typeof e;
} : function (e) {
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== (typeof Symbol === "function" ? Symbol.prototype : "@@prototype") ? "symbol" : typeof e;
},
w = n.i(a.getLogger)(e),
R = 3,
k = ["1", "2", "3"],
A = function A(e) {
return void 0 === e || null === e ? "" : "type: " + e.type + "\r\n" + e.sdp;
};r.prototype.getConnectionState = function () {
var e = this.peerconnection.iceConnectionState;return "completed" === e ? "connected" : e;
}, r.prototype._getDesiredMediaDirection = function (e) {
var t = !0;return e === d.a ? t = this.audioTransferActive : e === d.b && (t = this.videoTransferActive), t ? this.hasAnyTracksOfType(e) ? "sendrecv" : "recvonly" : "inactive";
}, r.prototype.isSimulcastOn = function () {
return !this.options.disableSimulcast && m.a.supportsSimulcast() && (!m.a.isFirefox() || this.options.enableFirefoxSimulcast);
}, r.prototype._peerVideoTypeChanged = function (e, t) {
if (!e) return void w.error("No endpointID on peerVideoTypeChanged " + this);var n = this.getRemoteTracks(e, d.b);n.length && n[0]._setVideoType(t);
}, r.prototype._peerMutedChanged = function (e, t, n) {
if (!e) return void w.error("On peerMuteChanged - no endpoint ID");var r = this.getRemoteTracks(e, t);r.length && r[0].setMute(n);
}, r.prototype.getLocalTracks = function (e) {
var t = Array.from(this.localTracks.values());return void 0 !== e && (t = t.filter(function (t) {
return t.getType() === e;
})), t;
}, r.prototype.hasAnyTracksOfType = function (e) {
if (!e) throw new Error('"mediaType" is required');return this.getLocalTracks(e).length > 0;
}, r.prototype.getRemoteTracks = function (e, t) {
var n = [],
r = e ? [e] : this.remoteTracks.keys(),
i = !0,
o = !1,
a = void 0;try {
for (var s, c = r[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(i = (s = c.next()).done); i = !0) {
var u = s.value,
l = this.remoteTracks.get(u);if (l) {
var d = !0,
p = !1,
f = void 0;try {
for (var h, m = l.keys()[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(d = (h = m.next()).done); d = !0) {
var v = h.value;if (!t || t === v) {
var g = l.get(v);g && n.push(g);
}
}
} catch (e) {
p = !0, f = e;
} finally {
try {
!d && m.return && m.return();
} finally {
if (p) throw f;
}
}
}
}
} catch (e) {
o = !0, a = e;
} finally {
try {
!i && c.return && c.return();
} finally {
if (o) throw a;
}
}return n;
}, r.prototype.getTrackBySSRC = function (e) {
if ("number" != typeof e) throw new Error("SSRC " + e + " is not a number");var t = !0,
n = !1,
r = void 0;try {
for (var i, o = this.localTracks.values()[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(t = (i = o.next()).done); t = !0) {
var a = i.value;if (this.getLocalSSRC(a) === e) return a;
}
} catch (e) {
n = !0, r = e;
} finally {
try {
!t && o.return && o.return();
} finally {
if (n) throw r;
}
}var s = !0,
c = !1,
u = void 0;try {
for (var l, d = this.getRemoteTracks()[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(s = (l = d.next()).done); s = !0) {
var p = l.value;if (p.getSSRC() === e) return p;
}
} catch (e) {
c = !0, u = e;
} finally {
try {
!s && d.return && d.return();
} finally {
if (c) throw u;
}
}return null;
}, r.prototype._remoteStreamAdded = function (e) {
var t = this,
n = f.a.getStreamID(e);if (!f.a.isUserStreamById(n)) return void w.info(this + " ignored remote 'stream added' event for non-user streamid: " + n);(m.a.isChrome() || m.a.isNWJS() || m.a.isElectron() || m.a.isEdge()) && (e.onaddtrack = function (n) {
t._remoteTrackAdded(e, n.track);
}, e.onremovetrack = function (n) {
t._remoteTrackRemoved(e, n.track);
});var r = e.getAudioTracks(),
i = !0,
o = !1,
a = void 0;try {
for (var s, c = r[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(i = (s = c.next()).done); i = !0) {
var u = s.value;this._remoteTrackAdded(e, u);
}
} catch (e) {
o = !0, a = e;
} finally {
try {
!i && c.return && c.return();
} finally {
if (o) throw a;
}
}var l = e.getVideoTracks(),
d = !0,
p = !1,
h = void 0;try {
for (var v, g = l[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(d = (v = g.next()).done); d = !0) {
var y = v.value;this._remoteTrackAdded(e, y);
}
} catch (e) {
p = !0, h = e;
} finally {
try {
!d && g.return && g.return();
} finally {
if (p) throw h;
}
}
}, r.prototype._remoteTrackAdded = function (e, t) {
var n = f.a.getStreamID(e),
r = t.kind;if (w.info(this + " remote track added:", n, r), !r) return void u.callErrorHandler(new Error("MediaType undefined for remote track, stream id: " + n));var i = new b.a(this.remoteDescription.sdp),
o = i.media.filter(function (e) {
return e.startsWith("m=" + r);
});if (!o.length) return void u.callErrorHandler(new Error("No media lines for type " + r + " found in remote SDP for remote track: " + n));var a = T.a.findLines(o[0], "a=ssrc:");if (a = a.filter(function (e) {
var t = m.a.isTemasysPluginUsed() ? "mslabel" : "msid";return -1 !== e.indexOf(t + ":" + n);
}), !a.length) return void u.callErrorHandler(new Error("No SSRC lines for streamId " + n + " for remote track, media type: " + r));var s = a[0].substring(7).split(" ")[0],
c = Number(s),
l = this.signalingLayer.getSSRCOwner(c);if (isNaN(c) || c < 0) return void u.callErrorHandler(new Error("Invalid SSRC: " + s + " for remote track, msid: " + n + " media type: " + r));if (!l) return void u.callErrorHandler(new Error("No SSRC owner known for: " + c + " for remote track, msid: " + n + " media type: " + r));w.log(this + " associated ssrc", l, c);var d = this.signalingLayer.getPeerMediaInfo(l, r);if (!d) return void u.callErrorHandler(new Error(this + ": no peer media info available for " + l));var p = d.muted,
h = d.videoType;this._createRemoteTrack(l, e, t, r, h, c, p);
}, r.prototype._createRemoteTrack = function (e, t, n, r, i, o, a) {
var s = new l.a(this.rtc, this.rtc.conference, e, t, n, r, i, o, a, this.isP2P),
c = this.remoteTracks.get(e);c || (c = new Map(), this.remoteTracks.set(e, c)), c.has(r) && w.error(this + " overwriting remote track! " + s, e, r), c.set(r, s), this.eventEmitter.emit(g.a.REMOTE_TRACK_ADDED, s);
}, r.prototype._remoteStreamRemoved = function (e) {
if (!f.a.isUserStream(e)) {
var t = f.a.getStreamID(e);return void w.info("Ignored remote 'stream removed' event for non-user stream " + t);
}var n = e.getVideoTracks(),
r = !0,
i = !1,
o = void 0;try {
for (var a, s = n[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(r = (a = s.next()).done); r = !0) {
var c = a.value;this._remoteTrackRemoved(e, c);
}
} catch (e) {
i = !0, o = e;
} finally {
try {
!r && s.return && s.return();
} finally {
if (i) throw o;
}
}var u = e.getAudioTracks(),
l = !0,
d = !1,
p = void 0;try {
for (var h, m = u[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(l = (h = m.next()).done); l = !0) {
var v = h.value;this._remoteTrackRemoved(e, v);
}
} catch (e) {
d = !0, p = e;
} finally {
try {
!l && m.return && m.return();
} finally {
if (d) throw p;
}
}
}, r.prototype._remoteTrackRemoved = function (e, t) {
var n = f.a.getStreamID(e),
r = t && f.a.getTrackID(t);return w.info(this + " - remote track removed: " + n + ", " + r), n ? r ? void (this._removeRemoteTrackById(n, r) || w.warn(this + " Removed track not found for msid: " + n + ",\n track id: " + r)) : void u.callErrorHandler(new Error(this + " remote track removal failed - no track ID")) : void u.callErrorHandler(new Error(this + " remote track removal failed - no stream ID"));
}, r.prototype._getRemoteTrackById = function (e, t) {
var n = !0,
r = !1,
i = void 0;try {
for (var o, a = this.remoteTracks.values()[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(n = (o = a.next()).done); n = !0) {
var s = o.value,
c = !0,
u = !1,
l = void 0;try {
for (var d, p = s.values()[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(c = (d = p.next()).done); c = !0) {
var f = d.value;if (f.getStreamId() == e && f.getTrackId() == t) return f;
}
} catch (e) {
u = !0, l = e;
} finally {
try {
!c && p.return && p.return();
} finally {
if (u) throw l;
}
}
}
} catch (e) {
r = !0, i = e;
} finally {
try {
!n && a.return && a.return();
} finally {
if (r) throw i;
}
}
}, r.prototype.removeRemoteTracks = function (e) {
var t = [],
n = this.remoteTracks.get(e);if (n) {
var r = n.get(d.a),
i = n.get(d.b);r && t.push(r), i && t.push(i), this.remoteTracks.delete(e);
}return w.debug(this + " removed remote tracks for " + e + " count: " + t.length), t;
}, r.prototype._removeRemoteTrack = function (e) {
e.dispose();var t = e.getParticipantId(),
n = this.remoteTracks.get(t);n ? n.delete(e.getType()) || w.error("Failed to remove " + e + " - type mapping messed up ?") : w.error("removeRemoteTrack: no remote tracks map for " + t), this.eventEmitter.emit(g.a.REMOTE_TRACK_REMOVED, e);
}, r.prototype._removeRemoteTrackById = function (e, t) {
var n = this._getRemoteTrackById(e, t);return n && this._removeRemoteTrack(n), n;
};var I = function I(e) {
if ("object" !== (void 0 === e ? "undefined" : C(e)) || null === e || "string" != typeof e.sdp) return w.warn("An empty description was passed as an argument."), e;var t = n(13),
r = t.parse(e.sdp);void 0 !== r && void 0 !== r.media && Array.isArray(r.media) && r.media.forEach(function (e) {
var t = [],
n = [];if (void 0 !== e.ssrcGroups && Array.isArray(e.ssrcGroups) && e.ssrcGroups.forEach(function (e) {
void 0 !== e.semantics && "FID" === e.semantics && void 0 !== e.ssrcs && t.push(Number(e.ssrcs.split(" ")[0]));
}), Array.isArray(e.ssrcs)) {
var r = void 0;for (r = 0; r < e.ssrcs.length; r++) {
"object" === C(e.ssrcs[r]) && void 0 !== e.ssrcs[r].id && t.indexOf(e.ssrcs[r].id) >= 0 && (n.push(e.ssrcs[r]), delete e.ssrcs[r]);
}for (r = 0; r < e.ssrcs.length; r++) {
void 0 !== e.ssrcs[r] && n.push(e.ssrcs[r]);
}e.ssrcs = n;
}
});var i = t.write(r);return new RTCSessionDescription({ type: e.type, sdp: i });
},
P = function P(e) {
if (e && e.sdp) {
var t = new E.a(e.sdp),
n = t.selectMedia("audio"),
r = !1;n && "sendrecv" !== n.direction && (n.direction = "sendrecv", r = !0);var i = t.selectMedia("video");i && "sendrecv" !== i.direction && (i.direction = "sendrecv", r = !0), r && (e.sdp = t.toRawSDP());
}
};r.prototype.getLocalSSRC = function (e) {
var t = this._getSSRC(e.rtcId);return t && t.ssrcs[0];
}, r.prototype._injectSsrcGroupForUnifiedSimulcast = function (e) {
var t = c.a.parse(e.sdp),
n = t.media.find(function (e) {
return "video" === e.type;
});if (n.simulcast_03) {
var r = [];if (n.ssrcs.forEach(function (e) {
"msid" === e.attribute && r.push(e.id);
}), n.ssrcGroups = n.ssrcGroups || [], n.ssrcGroups.find(function (e) {
return "SIM" === e.semantics;
})) return e;n.ssrcGroups.push({ semantics: "SIM", ssrcs: r.join(" ") });
}return e.sdp = c.a.write(t), e;
};var O = { signalingState: function signalingState() {
return this.peerconnection.signalingState;
}, iceConnectionState: function iceConnectionState() {
return this.peerconnection.iceConnectionState;
}, localDescription: function localDescription() {
var e = this.peerconnection.localDescription;return this.trace("getLocalDescription::preTransform", A(e)), e && m.a.usesUnifiedPlan() && (e = this.interop.toPlanB(e), this.trace("getLocalDescription::postTransform (Plan B)", A(e)), e = this._injectSsrcGroupForUnifiedSimulcast(e), this.trace("getLocalDescription::postTransform (inject ssrc group)", A(e))), m.a.doesVideoMuteByStreamRemove() && (this.localSdpMunger.maybeMungeLocalSdp(e), w.debug("getLocalDescription::postTransform (munge local SDP)", e)), P(e), e || {};
}, remoteDescription: function remoteDescription() {
var e = this.peerconnection.remoteDescription;return this.trace("getRemoteDescription::preTransform", A(e)), m.a.usesUnifiedPlan() && (e = this.interop.toPlanB(e), this.trace("getRemoteDescription::postTransform (Plan B)", A(e))), e || {};
} };Object.keys(O).forEach(function (e) {
Object.defineProperty(r.prototype, e, { get: O[e] });
}), r.prototype._getSSRC = function (e) {
return this.localSSRCs.get(e);
}, r.prototype.addTrack = function (e) {
var t = e.rtcId;if (w.info("add " + e + " to: " + this), this.localTracks.has(t)) return void w.error(e + " is already in " + this);this.localTracks.set(t, e);var n = e.getOriginalStream();if (n ? this._addStream(n) : (!m.a.doesVideoMuteByStreamRemove() || e.isAudioTrack() || e.isVideoTrack() && !e.isMuted()) && w.error(this + " no WebRTC stream for: " + e), m.a.doesVideoMuteByStreamRemove() && e.isVideoTrack() && e.isMuted()) {
var r = this.generateNewStreamSSRCInfo(e);this.sdpConsistency.setPrimarySsrc(r.ssrcs[0]);var i = r.groups.find(function (e) {
return "SIM" === e.semantics;
});i && this.simulcast.setSsrcCache(i.ssrcs);var o = r.groups.filter(function (e) {
return "FID" === e.semantics;
});if (o) {
var a = new Map();o.forEach(function (e) {
var t = e.ssrcs[0],
n = e.ssrcs[1];a.set(t, n);
}), this.rtxModifier.setSsrcCache(a);
}
}
}, r.prototype.addTrackUnmute = function (e) {
if (!this._assertTrackBelongs("addTrackUnmute", e)) return !1;w.info("Adding " + e + " as unmute to " + this);var t = e.getOriginalStream();return t ? (this._addStream(t), !0) : (w.error("Unable to add " + e + " as unmute to " + this + " - no WebRTC stream"), !1);
}, r.prototype._addStream = function (e) {
this.peerconnection.addStream(e);
}, r.prototype._removeStream = function (e) {
m.a.isFirefox() ? this._handleFirefoxRemoveStream(e) : this.peerconnection.removeStream(e);
}, r.prototype._assertTrackBelongs = function (e, t) {
var n = this.localTracks.has(t.rtcId);return n || w.error(e + ": " + t + " does not belong to " + this), n;
}, r.prototype.removeTrack = function (e) {
var t = e.getOriginalStream();this.trace("removeStream", e.rtcId, t ? t.id : void 0), this._assertTrackBelongs("removeStream", e) && (this.localTracks.delete(e.rtcId), this.localSSRCs.delete(e.rtcId), t && (m.a.isFirefox() ? this._handleFirefoxRemoveStream(t) : this.peerconnection.removeStream(t)));
}, r.prototype.removeTrackMute = function (e) {
var t = e.getOriginalStream();return this.trace("removeStreamMute", e.rtcId, t ? t.id : null), !!this._assertTrackBelongs("removeStreamMute", e) && (t ? (w.info("Removing " + e + " as mute from " + this), this._removeStream(t), !0) : (w.error("removeStreamMute - no WebRTC stream for " + e), !1));
}, r.prototype._handleFirefoxRemoveStream = function (e) {
if (e) {
var t = null,
n = null;if (e.getAudioTracks() && e.getAudioTracks().length ? n = e.getAudioTracks()[0] : e.getVideoTracks() && e.getVideoTracks().length && (n = e.getVideoTracks()[0]), !n) return void w.error("Cannot remove tracks: no tracks.");this.peerconnection.getSenders().some(function (e) {
return e.track === n && (t = e, !0);
}), t ? this.peerconnection.removeTrack(t) : w.log("Cannot remove tracks: no RTPSender.");
}
}, r.prototype.createDataChannel = function (e, t) {
return this.trace("createDataChannel", e, t), this.peerconnection.createDataChannel(e, t);
}, r.prototype._ensureSimulcastGroupIsLast = function (e) {
var t = e.sdp,
n = t.indexOf("m=video"),
r = t.indexOf("a=ssrc-group:SIM", n),
i = t.lastIndexOf("a=ssrc-group");if (-1 !== r && -1 !== i && i !== r) {
var o = t.indexOf("\r\n", r),
a = t.substring(r, o + 2);t = t.replace(a, ""), i = t.lastIndexOf("a=ssrc-group");var s = t.indexOf("\r\n", i);t = t.slice(0, s) + "\r\n" + a.trim() + t.slice(s), e.sdp = t;
}
}, r.prototype._adjustLocalMediaDirection = function (e) {
var t = new E.a(e.sdp),
n = !1,
r = t.selectMedia("audio");if (r) {
var i = this._getDesiredMediaDirection(d.a);r.direction !== i && (r.direction = i, w.info("Adjusted local audio direction to " + i), n = !0);
} else w.warn('No "audio" media found int the local description');var o = t.selectMedia("video");if (o) {
var a = this._getDesiredMediaDirection(d.b);o.direction !== a && (o.direction = a, w.info("Adjusted local video direction to " + a), n = !0);
} else w.warn('No "video" media found in the local description');n && (e.sdp = t.toRawSDP());
}, r.prototype.setLocalDescription = function (e, t, n) {
var r = this,
i = e;this.trace("setLocalDescription::preTransform", A(i)), this._adjustLocalMediaDirection(i), this._ensureSimulcastGroupIsLast(i), m.a.usesUnifiedPlan() && (i = this.interop.toUnifiedPlan(i), this.trace("setLocalDescription::postTransform (Unified Plan)", A(i))), this.peerconnection.setLocalDescription(i, function () {
r.trace("setLocalDescriptionOnSuccess");var e = T.a.getUfrag(i.sdp);e !== r.localUfrag && (r.localUfrag = e, r.eventEmitter.emit(g.a.LOCAL_UFRAG_CHANGED, r, e)), t();
}, function (e) {
r.trace("setLocalDescriptionOnFailure", e), r.eventEmitter.emit(g.a.SET_LOCAL_DESCRIPTION_FAILED, e, r), n(e);
});
}, r.prototype.setAudioTransferActive = function (e) {
w.debug(this + " audio transfer active: " + e);var t = this.audioTransferActive !== e;return this.audioTransferActive = e, t;
}, r.prototype._insertUnifiedPlanSimulcastReceive = function (e) {
var t = c.a.parse(e.sdp),
n = t.media.find(function (e) {
return "video" === e.type;
});return n.rids = [{ id: "1", direction: "recv" }, { id: "2", direction: "recv" }, { id: "3", direction: "recv" }], n.simulcast_03 = { value: "recv rid=" + k.join(";") }, e.sdp = c.a.write(t), e;
}, r.prototype.setRemoteDescription = function (e, t, n) {
var r = this;if (this.trace("setRemoteDescription::preTransform", A(e)), e = this.simulcast.mungeRemoteDescription(e), this.trace("setRemoteDescription::postTransform (simulcast)", A(e)), this.options.preferH264) {
var i = c.a.parse(e.sdp),
o = i.media.find(function (e) {
return "video" === e.type;
});T.a.preferVideoCodec(o, "h264"), e.sdp = c.a.write(i);
}m.a.usesUnifiedPlan() ? (e.sdp = this.rtxModifier.stripRtx(e.sdp), this.trace("setRemoteDescription::postTransform (stripRtx)", A(e)), e = this.interop.toUnifiedPlan(e), this.trace("setRemoteDescription::postTransform (Plan A)", A(e)), this.isSimulcastOn() && (e = this._insertUnifiedPlanSimulcastReceive(e), this.trace("setRemoteDescription::postTransform (sim receive)", A(e)))) : e = I(e), this.peerconnection.setRemoteDescription(e, function () {
r.trace("setRemoteDescriptionOnSuccess");var n = T.a.getUfrag(e.sdp);n !== r.remoteUfrag && (r.remoteUfrag = n, r.eventEmitter.emit(g.a.REMOTE_UFRAG_CHANGED, r, n)), t();
}, function (e) {
r.trace("setRemoteDescriptionOnFailure", e), r.eventEmitter.emit(g.a.SET_REMOTE_DESCRIPTION_FAILED, e, r), n(e);
});
}, r.prototype.setVideoTransferActive = function (e) {
w.debug(this + " video transfer active: " + e);var t = this.videoTransferActive !== e;return this.videoTransferActive = e, t;
}, r.prototype.generateRecvonlySsrc = function () {
var e = T.a.generateSsrc();w.info(this + " generated new recvonly SSRC: " + e), this.sdpConsistency.setPrimarySsrc(e);
}, r.prototype.clearRecvonlySsrc = function () {
w.info("Clearing primary video SSRC!"), this.sdpConsistency.clearVideoSsrcCache();
}, r.prototype.close = function () {
this.trace("stop"), this.signalingLayer.off(_.b, this._peerMutedChanged), this.signalingLayer.off(_.a, this._peerVideoTypeChanged);var e = !0,
t = !1,
n = void 0;try {
for (var r, i = this.remoteTracks.values()[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(e = (r = i.next()).done); e = !0) {
var o = r.value,
a = !0,
s = !1,
c = void 0;try {
for (var u, l = o.values()[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(a = (u = l.next()).done); a = !0) {
var d = u.value;this._removeRemoteTrack(d);
}
} catch (e) {
s = !0, c = e;
} finally {
try {
!a && l.return && l.return();
} finally {
if (s) throw c;
}
}
}
} catch (e) {
t = !0, n = e;
} finally {
try {
!e && i.return && i.return();
} finally {
if (t) throw n;
}
}this.remoteTracks.clear(), this.rtc._removePeerConnection(this) || w.error("RTC._removePeerConnection returned false"), null !== this.statsinterval && (window.clearInterval(this.statsinterval), this.statsinterval = null), w.info("Closing " + this + "..."), this.peerconnection.close();
};var D = function D(e, t) {
m.a.isChrome() && e && t && e.media && t.media && e.media.length === t.media.length && (t.media.forEach(function (n, r) {
T.a.findLine(e.media[r], "a=setup:actpass", e.session) && (t.media[r] = n.replace(/a=setup:active/g, "a=setup:passive"));
}), t.raw = t.session + t.media.join(""));
};r.prototype.createAnswer = function (e, t, n) {
if (m.a.supportsRtpSender() && this.isSimulcastOn()) {
var r = this.peerconnection.getSenders().find(function (e) {
return "video" === e.track.kind;
}),
i = { encodings: [{ rid: "1", scaleResolutionDownBy: 4 }, { rid: "2", scaleResolutionDownBy: 2 }, { rid: "3" }] };r.setParameters(i);
}this._createOfferOrAnswer(!1, e, t, n);
}, r.prototype.createOffer = function (e, t, n) {
this._createOfferOrAnswer(!0, e, t, n);
}, r.prototype._createOfferOrAnswer = function (e, t, n, r) {
var o = this,
a = e ? "Offer" : "Answer";this.trace("create" + a, JSON.stringify(r, null, " "));var s = function s(r) {
try {
if (o.trace("create" + a + "OnSuccess::preTransform", A(r)), m.a.usesUnifiedPlan() && (r = o.interop.toPlanB(r), o.trace("create" + a + "OnSuccess::postTransform (Plan B)", A(r)), o.isSimulcastOn() && (r = o._injectSsrcGroupForUnifiedSimulcast(r), o.trace("create" + a + "OnSuccess::postTransform(inject ssrc group)", A(r)))), m.a.isFirefox() || (o.hasAnyTracksOfType(d.b) || o.sdpConsistency.hasPrimarySsrcCached() || o.generateRecvonlySsrc(), r.sdp = o.sdpConsistency.makeVideoPrimarySsrcsConsistent(r.sdp), o.trace("create" + a + "OnSuccess::postTransform (make primary audio/video ssrcs consistent)", A(r))), o.isSimulcastOn() && (r = o.simulcast.mungeLocalDescription(r), o.trace("create" + a + "OnSuccess::postTransform (simulcast)", A(r))), !o.options.disableRtx && m.a.supportsRtx() && (r.sdp = o.rtxModifier.modifyRtxSsrcs(r.sdp), o.trace("create" + a + "OnSuccess::postTransform (rtx modifier)", A(r))), !e) {
var s = new b.a(o.remoteDescription.sdp),
c = new b.a(r.sdp);D(s, c), r.sdp = c.raw;
}var u = i(r);w.debug("Got local SSRCs MAP: ", u), o._processLocalSSRCsMap(u), t(r);
} catch (e) {
o.trace("create" + a + "OnError", e), o.trace("create" + a + "OnError", A(r)), w.error("create" + a + "OnError", e, A(r)), n(e);
}
},
c = function c(t) {
o.trace("create" + a + "OnFailure", t);var r = e ? g.a.CREATE_OFFER_FAILED : g.a.CREATE_ANSWER_FAILED;o.eventEmitter.emit(r, t, o), n(t);
};e ? this.peerconnection.createOffer(s, c, r) : this.peerconnection.createAnswer(s, c, r);
}, r.prototype._processLocalSSRCsMap = function (e) {
var t = !0,
n = !1,
r = void 0;try {
for (var i, a = this.localTracks.values()[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(t = (i = a.next()).done); t = !0) {
var s = i.value,
c = s.getMSID();if (e.has(c)) {
var u = e.get(c);if (!u) return void w.error("No SSRC found for: " + c + " in " + this);var l = this.localSSRCs.get(s.rtcId),
d = o(u),
p = o(l);d !== p ? (null === p ? w.info("Storing new local SSRC for " + s + " in " + this, u) : w.error("Overwriting SSRC for " + s + " " + c + " in " + this + " with: ", u), this.localSSRCs.set(s.rtcId, u)) : w.debug("The local SSRC(" + d + ") for " + s + " " + c + "is still up to date in " + this);
} else w.warn("No local track matched with: " + c + " in " + this);
}
} catch (e) {
n = !0, r = e;
} finally {
try {
!t && a.return && a.return();
} finally {
if (n) throw r;
}
}
}, r.prototype.addIceCandidate = function (e, t, n) {
this.trace("addIceCandidate", JSON.stringify(e, null, " ")), this.peerconnection.addIceCandidate(e, t, n);
}, r.prototype.getStats = function (e, t) {
m.a.isFirefox() || m.a.isTemasysPluginUsed() || m.a.isReactNative() ? this.peerconnection.getStats(null, e, t || function () {}) : this.peerconnection.getStats(e);
}, r.prototype.generateNewStreamSSRCInfo = function (e) {
var t = e.rtcId,
n = this._getSSRC(t);if (n && w.error("Will overwrite local SSRCs for track ID: " + t), this.isSimulcastOn()) {
n = { ssrcs: [], groups: [] };for (var r = 0; r < R; r++) {
n.ssrcs.push(T.a.generateSsrc());
}n.groups.push({ ssrcs: n.ssrcs.slice(), semantics: "SIM" });
} else n = { ssrcs: [T.a.generateSsrc()], groups: [] };if (!this.options.disableRtx && m.a.supportsRtx()) for (var i = n.ssrcs.length, o = 0; o < i; ++o) {
var a = n.ssrcs[o],
s = T.a.generateSsrc();n.ssrcs.push(s), n.groups.push({ ssrcs: [a, s], semantics: "FID" });
}return n.msid = e.storedMSID, this.localSSRCs.set(t, n), n;
}, r.prototype.toString = function () {
return "TPC[" + this.id + ",p2p:" + this.isP2P + "]";
};
}).call(t, "modules/RTC/TraceablePeerConnection.js");
}, function (e, t, n) {
"use strict";
(function (e) {
function r(e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
}function i(e, t) {
if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return !t || "object" != typeof t && "function" != typeof t ? e : t;
}function o(e, t) {
if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);
}var a = n(0),
s = (n.n(a), n(151)),
c = n.n(s),
u = n(97),
l = n(99),
d = n(98),
p = n(19),
f = n.n(p),
h = n(12),
m = function () {
function e(e, t) {
var n = [],
r = !0,
i = !1,
o = void 0;try {
for (var a, s = e[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(r = (a = s.next()).done) && (n.push(a.value), !t || n.length !== t); r = !0) {}
} catch (e) {
i = !0, o = e;
} finally {
try {
!r && s.return && s.return();
} finally {
if (i) throw o;
}
}return n;
}return function (t, n) {
if (Array.isArray(t)) return t;if ((typeof Symbol === "function" ? Symbol.iterator : "@@iterator") in Object(t)) return e(t, n);throw new TypeError("Invalid attempt to destructure non-iterable instance");
};
}(),
v = function () {
function e(e, t) {
for (var n = 0; n < t.length; n++) {
var r = t[n];r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
}
}return function (t, n, r) {
return n && e(t.prototype, n), r && e(t, r), t;
};
}(),
g = n.i(a.getLogger)(e),
y = { stable: "stable", haveLocalOffer: "have-local-offer", haveRemoteOffer: "have-remote-offer", closed: "closed" },
b = { new: "new", gathering: "gathering", complete: "complete" },
S = "jitsi-ortc-cname-" + f.a.randomInt(1e4, 99999),
E = function (e) {
function t(e) {
r(this, t);var n = i(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this));return g.debug("constructor() pcConfig:", e), n._bufferedIceCandidates = [], n._closed = !1, n._dtlsTransport = null, n._iceGatherer = null, n._iceGatheringState = b.new, n._iceTransport = null, n._localCapabilities = null, n._localDescription = null, n._localTrackInfos = new Map(), n._mids = new Map(), n._remoteDescription = null, n._remoteStreams = new Map(), n._remoteTrackInfos = new Map(), n._sdpGlobalFields = { id: h.a.generateSsrc(), version: 0 }, n._signalingState = y.stable, n._setIceGatherer(e), n._setIceTransport(n._iceGatherer), n._setDtlsTransport(n._iceTransport), n;
}return o(t, e), v(t, [{ key: "addIceCandidate", value: function value(e) {
var t = void 0,
n = void 0,
r = void 0;if (!e) throw new TypeError("candidate missing");if (0 == (arguments.length <= 1 ? 0 : arguments.length - 1)) t = !0;else {
if (t = !1, n = arguments.length <= 1 ? void 0 : arguments[1], r = arguments.length <= 2 ? void 0 : arguments[2], "function" != typeof n) throw new TypeError("callback missing");if ("function" != typeof r) throw new TypeError("errback missing");
}if (g.debug("addIceCandidate() candidate:", e), t) return this._addIceCandidate(e);this._addIceCandidate(e).then(function () {
return n();
}).catch(function (e) {
return r(e);
});
} }, { key: "addStream", value: function value(e) {
g.debug("addStream()"), this._addStream(e);
} }, { key: "close", value: function value() {
if (!this._closed) {
this._closed = !0, g.debug("close()"), this._updateAndEmitSignalingStateChange(y.closed);try {
this._iceGatherer.close();
} catch (e) {
g.warn("iceGatherer.close() failed:" + e);
}try {
this._iceTransport.stop();
} catch (e) {
g.warn("iceTransport.stop() failed:" + e);
}try {
this._dtlsTransport.stop();
} catch (e) {
g.warn("dtlsTransport.stop() failed:" + e);
}var e = !0,
t = !1,
n = void 0;try {
for (var r, i = this._localTrackInfos.values()[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(e = (r = i.next()).done); e = !0) {
var o = r.value,
a = o.rtpSender;try {
a.stop();
} catch (e) {
g.warn("rtpSender.stop() failed:" + e);
}
}
} catch (e) {
t = !0, n = e;
} finally {
try {
!e && i.return && i.return();
} finally {
if (t) throw n;
}
}this._localTrackInfos.clear();var s = !0,
c = !1,
u = void 0;try {
for (var l, d = this._remoteTrackInfos.values()[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(s = (l = d.next()).done); s = !0) {
var p = l.value,
f = p.rtpReceiver;try {
f.stop();
} catch (e) {
g.warn("rtpReceiver.stop() failed:" + e);
}
}
} catch (e) {
c = !0, u = e;
} finally {
try {
!s && d.return && d.return();
} finally {
if (c) throw u;
}
}this._remoteTrackInfos.clear(), this._remoteStreams.clear();
}
} }, { key: "createAnswer", value: function value() {
var e = void 0,
t = void 0,
n = void 0,
r = void 0;if (arguments.length <= 1) e = !0, t = arguments.length <= 0 ? void 0 : arguments[0];else {
if (e = !1, n = arguments.length <= 0 ? void 0 : arguments[0], r = arguments.length <= 1 ? void 0 : arguments[1], t = arguments.length <= 2 ? void 0 : arguments[2], "function" != typeof n) throw new TypeError("callback missing");if ("function" != typeof r) throw new TypeError("errback missing");
}if (g.debug("createAnswer() options:", t), e) return this._createAnswer(t);this._createAnswer(t).then(function (e) {
return n(e);
}).catch(function (e) {
return r(e);
});
} }, { key: "createDataChannel", value: function value() {
throw g.debug("createDataChannel()"), new Error("createDataChannel() not supported in Edge");
} }, { key: "createOffer", value: function value() {
var e = void 0,
t = void 0,
n = void 0,
r = void 0;if (arguments.length <= 1) e = !0, t = arguments.length <= 0 ? void 0 : arguments[0];else {
if (e = !1, n = arguments.length <= 0 ? void 0 : arguments[0], r = arguments.length <= 1 ? void 0 : arguments[1], t = arguments.length <= 2 ? void 0 : arguments[2], "function" != typeof n) throw new TypeError("callback missing");if ("function" != typeof r) throw new TypeError("errback missing");
}if (g.debug("createOffer() options:", t), e) return this._createOffer(t);this._createOffer(t).then(function (e) {
return n(e);
}).catch(function (e) {
return r(e);
});
} }, { key: "getLocalStreams", value: function value() {
return Array.from(this._localTrackInfos.values()).map(function (e) {
return e.stream;
}).filter(function (e, t, n) {
return n.indexOf(e) === t;
});
} }, { key: "getRemoteStreams", value: function value() {
return Array.from(this._remoteStreams.values());
} }, { key: "getStats", value: function value() {
var e = void 0,
t = void 0,
n = void 0,
r = void 0;if ("function" == typeof (arguments.length <= 0 ? void 0 : arguments[0]) ? (e = !1, n = arguments.length <= 0 ? void 0 : arguments[0], r = arguments.length <= 1 ? void 0 : arguments[1]) : "function" == typeof (arguments.length <= 1 ? void 0 : arguments[1]) ? (e = !1, t = arguments.length <= 0 ? void 0 : arguments[0], n = arguments.length <= 1 ? void 0 : arguments[1], r = arguments.length <= 2 ? void 0 : arguments[2]) : (e = !0, t = arguments.length <= 0 ? void 0 : arguments[0]), e || r || (r = function r(e) {
g.error("getStats() failed: " + e), g.error(e.stack);
}), e) return this._getStats(t);this._getStats(t).then(function (e) {
return n(e);
}).catch(function (e) {
return r(e);
});
} }, { key: "removeStream", value: function value(e) {
g.debug("removeStream()"), this._removeStream(e);
} }, { key: "setLocalDescription", value: function value(e) {
var t = void 0,
n = void 0,
r = void 0;if (!e) throw new TypeError("description missing");if (0 == (arguments.length <= 1 ? 0 : arguments.length - 1)) t = !0;else {
if (t = !1, n = arguments.length <= 1 ? void 0 : arguments[1], r = arguments.length <= 2 ? void 0 : arguments[2], "function" != typeof n) throw new TypeError("callback missing");if ("function" != typeof r) throw new TypeError("errback missing");
}if (g.debug("setLocalDescription() desc:", e), t) return this._setLocalDescription(e);this._setLocalDescription(e).then(function () {
return n();
}).catch(function (e) {
return r(e);
});
} }, { key: "setRemoteDescription", value: function value(e) {
var t = void 0,
n = void 0,
r = void 0;if (!e) throw new TypeError("description missing");if (0 == (arguments.length <= 1 ? 0 : arguments.length - 1)) t = !0;else {
if (t = !1, n = arguments.length <= 1 ? void 0 : arguments[1], r = arguments.length <= 2 ? void 0 : arguments[2], "function" != typeof n) throw new TypeError("callback missing");if ("function" != typeof r) throw new TypeError("errback missing");
}if (g.debug("setRemoteDescription() desc:", e), t) return this._setRemoteDescription(e);this._setRemoteDescription(e).then(function () {
return n();
}).catch(function (e) {
return r(e);
});
} }, { key: "_addIceCandidate", value: function value(e) {
return this._closed ? Promise.reject(new d.a("RTCPeerConnection closed")) : Promise.reject(new Error("addIceCandidate() not supported"));
} }, { key: "_addStream", value: function value(e) {
if (this._closed) throw new d.a("RTCPeerConnection closed");var t = !0,
n = !1,
r = void 0;try {
for (var i, o = e.getTracks()[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(t = (i = o.next()).done); t = !0) {
var a = i.value;if ("ended" !== a.readyState) {
if (this._localTrackInfos.has(a.id)) g.warn("ignoring already handled MediaStreamTrack");else {
var s = new RTCRtpSender(a, this._dtlsTransport);this._localTrackInfos.set(a.id, { rtpSender: s, stream: e });
}
} else g.warn("ignoring ended MediaStreamTrack");
}
} catch (e) {
n = !0, r = e;
} finally {
try {
!t && o.return && o.return();
} finally {
if (n) throw r;
}
}var c = !0,
u = !1,
l = void 0;try {
for (var p, f = this._localTrackInfos[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(c = (p = f.next()).done); c = !0) {
var h = m(p.value, 2),
v = h[0],
y = h[1],
b = y.rtpSender.track;if ("ended" === b.readyState) {
g.warn("_addStream() an already handled track was stopped, track.id:" + b.id);try {
y.rtpSender.stop();
} catch (e) {
g.warn("rtpSender.stop() failed:" + e);
}this._localTrackInfos.delete(b.id);
} else if (y.stream === e && !e.getTrackById(v)) {
g.warn("_addStream() a track in this stream was removed, track.id:" + v);try {
y.rtpSender.stop();
} catch (e) {
g.warn("rtpSender.stop() failed:" + e);
}this._localTrackInfos.delete(b.id);
}
}
} catch (e) {
u = !0, l = e;
} finally {
try {
!c && f.return && f.return();
} finally {
if (u) throw l;
}
}this._emitNegotiationNeeded();
} }, { key: "_createAnswer", value: function value(e) {
if (this._closed) return Promise.reject(new d.a("RTCPeerConnection closed"));if (this.signalingState !== y.haveRemoteOffer) return Promise.reject(new d.a('invalid signalingState "' + this.signalingState + '"'));var t = this._createLocalDescription("answer");return Promise.resolve(t);
} }, { key: "_createLocalDescription", value: function value(e) {
function t(t, o) {
var u = {};switch (u.type = o, o) {case "audio":case "video":
u.protocol = "RTP/SAVPF", u.port = 9, u.direction = "sendrecv";break;case "application":
u.protocol = "DTLS/SCTP", u.port = 0, u.payloads = "0", u.direction = "inactive";}u.connection = { ip: "127.0.0.1", version: 4 }, u.mid = t, u.iceUfrag = r.usernameFragment, u.icePwd = r.password, u.candidates = [];var d = !0,
p = !1,
f = void 0;try {
for (var m, v = i[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(d = (m = v.next()).done); d = !0) {
var g = m.value,
y = {};y.component = 1, y.foundation = g.foundation, y.ip = g.ip, y.port = g.port, y.priority = g.priority, y.transport = g.protocol.toLowerCase(), y.type = g.type, "tcp" === y.transport && (y.tcptype = g.tcpType), u.candidates.push(y);
}
} catch (e) {
p = !0, f = e;
} finally {
try {
!d && v.return && v.return();
} finally {
if (p) throw f;
}
}if (u.endOfCandidates = "end-of-candidates", u.setup = "offer" === e ? "actpass" : "server" === a.role ? "active" : "passive", "audio" === o || "video" === o) {
u.rtp = [], u.rtcpFb = [], u.fmtp = [];var b = [],
E = !0,
T = !1,
_ = void 0;try {
for (var C, w = s.codecs[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(E = (C = w.next()).done); E = !0) {
var R = C.value;if (!R.kind || R.kind === o) {
b.push(R.preferredPayloadType);var k = { codec: R.name, payload: R.preferredPayloadType, rate: R.clockRate };if (R.numChannels > 1 && (k.encoding = R.numChannels), u.rtp.push(k), R.parameters) {
var A = { config: "", payload: R.preferredPayloadType },
I = !0,
P = !1,
O = void 0;try {
for (var D, L = Object.keys(R.parameters)[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(I = (D = L.next()).done); I = !0) {
var N = D.value;A.config && (A.config += ";"), A.config += N + "=" + R.parameters[N];
}
} catch (e) {
P = !0, O = e;
} finally {
try {
!I && L.return && L.return();
} finally {
if (P) throw O;
}
}A.config && u.fmtp.push(A);
}var M = !0,
x = !1,
j = void 0;try {
for (var F, U = (R.rtcpFeedback || [])[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(M = (F = U.next()).done); M = !0) {
var B = F.value;u.rtcpFb.push({ payload: R.preferredPayloadType, subtype: B.parameter || void 0, type: B.type });
}
} catch (e) {
x = !0, j = e;
} finally {
try {
!M && U.return && U.return();
} finally {
if (x) throw j;
}
}
}
}
} catch (e) {
T = !0, _ = e;
} finally {
try {
!E && w.return && w.return();
} finally {
if (T) throw _;
}
}0 === b.length ? (u.payloads = "9", u.port = 0, u.direction = "inactive") : u.payloads = b.join(" "), u.ssrcs = [], u.ssrcGroups = [];var J = !0,
G = !1,
H = void 0;try {
for (var V, W = c.values()[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(J = (V = W.next()).done); J = !0) {
var K = V.value,
q = K.rtpSender,
z = K.stream.id,
$ = q.track;if ("ended" !== $.readyState && $.kind === o) {
K.ssrc || (K.ssrc = h.a.generateSsrc());var X = l && "video" === $.kind;X && !K.rtxSsrc && (K.rtxSsrc = K.ssrc + 1), u.ssrcs.push({ attribute: "cname", id: K.ssrc, value: S }), u.ssrcs.push({ attribute: "msid", id: K.ssrc, value: z + " " + $.id }), u.ssrcs.push({ attribute: "mslabel", id: K.ssrc, value: z }), u.ssrcs.push({ attribute: "label", id: K.ssrc, value: $.id }), X && (u.ssrcs.push({ attribute: "cname", id: K.rtxSsrc, value: S }), u.ssrcs.push({ attribute: "msid", id: K.rtxSsrc, value: z + " " + $.id }), u.ssrcs.push({ attribute: "mslabel", id: K.rtxSsrc, value: z }), u.ssrcs.push({ attribute: "label", id: K.rtxSsrc, value: $.id }), u.ssrcGroups.push({ semantics: "FID", ssrcs: K.ssrc + " " + K.rtxSsrc }));
}
}
} catch (e) {
G = !0, H = e;
} finally {
try {
!J && W.return && W.return();
} finally {
if (G) throw H;
}
}u.ext = [];var Q = !0,
Y = !1,
Z = void 0;try {
for (var ee, te = s.headerExtensions[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(Q = (ee = te.next()).done); Q = !0) {
var ne = ee.value;ne.kind && ne.kind !== o || u.ext.push({ value: ne.preferredId, uri: ne.uri });
}
} catch (e) {
Y = !0, Z = e;
} finally {
try {
!Q && te.return && te.return();
} finally {
if (Y) throw Z;
}
}u.rtcpMux = "rtcp-mux", u.rtcpRsize = "rtcp-rsize";
}n.media.push(u);
}var n = {},
r = this._iceGatherer.getLocalParameters(),
i = this._iceGatherer.getLocalCandidates(),
o = this._dtlsTransport.getLocalParameters(),
a = this._dtlsTransport.getRemoteParameters(),
s = this._localCapabilities,
c = this._localTrackInfos;"offer" === e && this._sdpGlobalFields.version++, n.version = 0, n.origin = { address: "127.0.0.1", ipVer: 4, netType: "IN", sessionId: this._sdpGlobalFields.id, sessionVersion: this._sdpGlobalFields.version, username: "jitsi-ortc-webrtc-shim" }, n.name = "-", n.timing = { start: 0, stop: 0 }, n.msidSemantic = { semantic: "WMS", token: "*" }, n.groups = [{ mids: Array.from(this._mids.keys()).join(" "), type: "BUNDLE" }], n.media = [], n.fingerprint = { hash: o.fingerprints[0].value, type: o.fingerprints[0].algorithm };var l = !1,
d = !0,
p = !1,
f = void 0;try {
for (var v, y = s.codecs[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(d = (v = y.next()).done); d = !0) {
var b = v.value;if ("video" === b.kind && "rtx" === b.name) {
l = !0;break;
}
}
} catch (e) {
p = !0, f = e;
} finally {
try {
!d && y.return && y.return();
} finally {
if (p) throw f;
}
}var E = !0,
T = !1,
_ = void 0;try {
for (var C, w = this._mids[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(E = (C = w.next()).done); E = !0) {
var R = m(C.value, 2),
k = R[0],
A = R[1];t.call(this, k, A);
}
} catch (e) {
T = !0, _ = e;
} finally {
try {
!E && w.return && w.return();
} finally {
if (T) throw _;
}
}var I = new u.a({ type: e, _sdpObject: n });return g.debug("_createLocalDescription():", I), I;
} }, { key: "_createOffer", value: function value(e) {
return this._closed ? Promise.reject(new d.a("RTCPeerConnection closed")) : this.signalingState !== y.stable ? Promise.reject(new d.a('invalid signalingState "' + this.signalingState + '"')) : Promise.reject(new Error("createoOffer() not yet supported"));
} }, { key: "_emitAddStream", value: function value(e) {
if (!this._closed) {
g.debug('emitting "addstream"');var t = new c.a.Event("addstream");t.stream = e, this.dispatchEvent(t);
}
} }, { key: "_emitBufferedIceCandidates", value: function value() {
if (!this._closed) {
var e = !0,
t = !1,
n = void 0;try {
for (var r, i = this._bufferedIceCandidates[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(e = (r = i.next()).done); e = !0) {
var o = r.value;if (o) {
o.sdpMIndex = this._mids.keys().next().value, g.debug('emitting buffered "icecandidate", candidate:', o);var a = new c.a.Event("icecandidate");a.candidate = o, this.dispatchEvent(a);
}
}
} catch (e) {
t = !0, n = e;
} finally {
try {
!e && i.return && i.return();
} finally {
if (t) throw n;
}
}this._bufferedIceCandidates = [];
}
} }, { key: "_emitConnectionStateChange", value: function value() {
if (!this._closed || "closed" === this.connectionState) {
g.debug('emitting "connectionstatechange", connectionState:', this.connectionState);var e = new c.a.Event("connectionstatechange");this.dispatchEvent(e);
}
} }, { key: "_emitIceCandidate", value: function value(e) {
if (!this._closed) {
var t = null;if (e) {
var n = this._mids.keys().next().value,
r = "candidate:" + e.foundation + " 1 " + e.protocol + " " + e.priority + " " + e.ip + " " + e.port + " typ " + e.type;e.relatedAddress && (r += " raddr " + e.relatedAddress), e.relatedPort && (r += " rport " + e.relatedPort), "tcp" === e.protocol && (r += " tcptype " + e.tcpType), t = { candidate: r, component: 1, foundation: e.foundation, ip: e.ip, port: e.port, priority: e.priority, protocol: e.protocol, type: e.type, sdpMIndex: n, sdpMLineIndex: 0 }, "tcp" === e.protocol && (t.tcptype = e.tcpType), e.relatedAddress && (t.relatedAddress = e.relatedAddress), e.relatedPort && (t.relatedPort = e.relatedPort);
}if (this._localDescription) {
g.debug('emitting "icecandidate", candidate:', t);var i = new c.a.Event("icecandidate");i.candidate = t, this.dispatchEvent(i);
} else g.debug("buffering gathered ICE candidate:", t), this._bufferedIceCandidates.push(t);
}
} }, { key: "_emitIceConnectionStateChange", value: function value() {
if (!this._closed || "closed" === this.iceConnectionState) {
g.debug('emitting "iceconnectionstatechange", iceConnectionState:', this.iceConnectionState);var e = new c.a.Event("iceconnectionstatechange");this.dispatchEvent(e);
}
} }, { key: "_emitNegotiationNeeded", value: function value() {
if (this.signalingState === y.stable) {
g.debug('emitting "negotiationneeded"');var e = new c.a.Event("negotiationneeded");this.dispatchEvent(e);
}
} }, { key: "_emitRemoveStream", value: function value(e) {
if (!this._closed) {
g.debug('emitting "removestream"');var t = new c.a.Event("removestream");t.stream = e, this.dispatchEvent(t);
}
} }, { key: "_getParametersForRtpReceiver", value: function value(e, t) {
var n = t.ssrc,
r = t.rtxSsrc,
i = t.cname,
o = this._localCapabilities,
a = { codecs: [], degradationPreference: "balanced", encodings: [], headerExtensions: [], muxId: "", rtcp: { cname: i, compound: !0, mux: !0, reducedSize: !0 } },
s = [],
c = void 0,
u = !0,
l = !1,
d = void 0;try {
for (var p, f = o.codecs[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(u = (p = f.next()).done); u = !0) {
var h = p.value;if (h.kind === e && "rtx" !== h.name) {
c = h.preferredPayloadType, s.push({ clockRate: h.clockRate, maxptime: h.maxptime, mimeType: h.mimeType, name: h.name, numChannels: h.numChannels, parameters: h.parameters, payloadType: h.preferredPayloadType, ptime: h.ptime, rtcpFeedback: h.rtcpFeedback });break;
}
}
} catch (e) {
l = !0, d = e;
} finally {
try {
!u && f.return && f.return();
} finally {
if (l) throw d;
}
}if (r) {
var m = !0,
v = !1,
g = void 0;try {
for (var y, b = o.codecs[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(m = (y = b.next()).done); m = !0) {
var S = y.value;if (S.kind === e && "rtx" === S.name) {
s.push({ clockRate: S.clockRate, mimeType: S.mimeType, name: "rtx", parameters: S.parameters, payloadType: S.preferredPayloadType, rtcpFeedback: S.rtcpFeedback });break;
}
}
} catch (e) {
v = !0, g = e;
} finally {
try {
!m && b.return && b.return();
} finally {
if (v) throw g;
}
}
}a.codecs = s;var E = { active: !0, codecPayloadType: c, ssrc: n };r && (E.rtx = { ssrc: r }), a.encodings.push(E);var T = !0,
_ = !1,
C = void 0;try {
for (var w, R = o.headerExtensions[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(T = (w = R.next()).done); T = !0) {
var k = w.value;k.kind === e && a.headerExtensions.push({ encrypt: k.preferredEncrypt, id: k.preferredId, uri: k.uri });
}
} catch (e) {
_ = !0, C = e;
} finally {
try {
!T && R.return && R.return();
} finally {
if (_) throw C;
}
}return a;
} }, { key: "_getParametersForRtpSender", value: function value(e, t) {
var n = t.ssrc,
r = t.rtxSsrc,
i = S,
o = this._localCapabilities,
a = { codecs: [], degradationPreference: "balanced", encodings: [], headerExtensions: [], muxId: "", rtcp: { cname: i, compound: !0, mux: !0, reducedSize: !0 } },
s = [],
c = void 0,
u = !0,
l = !1,
d = void 0;try {
for (var p, f = o.codecs[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(u = (p = f.next()).done); u = !0) {
var h = p.value;if (h.kind === e && "rtx" !== h.name) {
c = h.preferredPayloadType, s.push({ clockRate: h.clockRate, maxptime: h.maxptime, mimeType: h.mimeType, name: h.name, numChannels: h.numChannels, parameters: h.parameters, payloadType: h.preferredPayloadType, ptime: h.ptime, rtcpFeedback: h.rtcpFeedback });break;
}
}
} catch (e) {
l = !0, d = e;
} finally {
try {
!u && f.return && f.return();
} finally {
if (l) throw d;
}
}if (r) {
var m = !0,
v = !1,
g = void 0;try {
for (var y, b = o.codecs[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(m = (y = b.next()).done); m = !0) {
var E = y.value;if (E.kind === e && "rtx" === E.name) {
s.push({ clockRate: E.clockRate, mimeType: E.mimeType, name: "rtx", parameters: E.parameters, payloadType: E.preferredPayloadType, rtcpFeedback: E.rtcpFeedback });break;
}
}
} catch (e) {
v = !0, g = e;
} finally {
try {
!m && b.return && b.return();
} finally {
if (v) throw g;
}
}
}a.codecs = s;var T = { active: !0, codecPayloadType: c, ssrc: n };r && (T.rtx = { ssrc: r }), a.encodings.push(T);var _ = !0,
C = !1,
w = void 0;try {
for (var R, k = o.headerExtensions[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(_ = (R = k.next()).done); _ = !0) {
var A = R.value;A.kind === e && a.headerExtensions.push({ encrypt: A.preferredEncrypt, id: A.preferredId, uri: A.uri });
}
} catch (e) {
C = !0, w = e;
} finally {
try {
!_ && k.return && k.return();
} finally {
if (C) throw w;
}
}return a;
} }, { key: "_getStats", value: function value(e) {
if (this._closed) return Promise.reject(new d.a("RTCPeerConnection closed"));var t = this._iceGatherer,
n = this._iceTransport,
r = [],
i = [],
o = [],
a = !0,
s = !1,
c = void 0;try {
for (var u, l = this._localTrackInfos.values()[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(a = (u = l.next()).done); a = !0) {
var p = u.value,
f = p.rtpSender;p.sending && r.push(f);
}
} catch (e) {
s = !0, c = e;
} finally {
try {
!a && l.return && l.return();
} finally {
if (s) throw c;
}
}var h = !0,
m = !1,
v = void 0;try {
for (var g, y = this._remoteTrackInfos.values()[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(h = (g = y.next()).done); h = !0) {
var b = g.value,
S = b.rtpReceiver;i.push(S);
}
} catch (e) {
m = !0, v = e;
} finally {
try {
!h && y.return && y.return();
} finally {
if (m) throw v;
}
}t && o.push(t.getStats().catch(function () {
return null;
})), n && (o.push(n.getStats().catch(function () {
return null;
})), "function" == typeof n.msGetStats && o.push(n.msGetStats().catch(function () {
return null;
})));var E = !0,
T = !1,
_ = void 0;try {
for (var C, w = r[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(E = (C = w.next()).done); E = !0) {
!function () {
var e = C.value,
t = "audio" === e.track.kind;o.push(e.getStats().then(function (e) {
if (!t) {
var n = !0,
r = !1,
i = void 0;try {
for (var o, a = Object.keys(e)[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(n = (o = a.next()).done); n = !0) {
var s = o.value,
c = e[s];"track" === c.type && delete c.audioLevel;
}
} catch (e) {
r = !0, i = e;
} finally {
try {
!n && a.return && a.return();
} finally {
if (r) throw i;
}
}
}return e;
}).catch(function () {
return null;
}));
}();
}
} catch (e) {
T = !0, _ = e;
} finally {
try {
!E && w.return && w.return();
} finally {
if (T) throw _;
}
}var R = !0,
k = !1,
A = void 0;try {
for (var I, P = i[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(R = (I = P.next()).done); R = !0) {
!function () {
var e = I.value,
t = "audio" === e.track.kind;o.push(e.getStats().then(function (e) {
if (!t) {
var n = !0,
r = !1,
i = void 0;try {
for (var o, a = Object.keys(e)[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(n = (o = a.next()).done); n = !0) {
var s = o.value,
c = e[s];"track" === c.type && delete c.audioLevel;
}
} catch (e) {
r = !0, i = e;
} finally {
try {
!n && a.return && a.return();
} finally {
if (r) throw i;
}
}
}return e;
}).catch(function () {
return null;
}));
}();
}
} catch (e) {
k = !0, A = e;
} finally {
try {
!R && P.return && P.return();
} finally {
if (k) throw A;
}
}return Promise.all(o).then(function (e) {
var t = {},
n = !0,
r = !1,
i = void 0;try {
for (var o, a = e[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(n = (o = a.next()).done); n = !0) {
var s = o.value;if (s) {
var c = !0,
u = !1,
l = void 0;try {
for (var d, p = Object.keys(s)[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(c = (d = p.next()).done); c = !0) {
var f = d.value;t[f] = s[f];
}
} catch (e) {
u = !0, l = e;
} finally {
try {
!c && p.return && p.return();
} finally {
if (u) throw l;
}
}
}
}
} catch (e) {
r = !0, i = e;
} finally {
try {
!n && a.return && a.return();
} finally {
if (r) throw i;
}
}return t;
});
} }, { key: "_handleLocalInitialAnswer", value: function value(e) {
g.debug("_handleLocalInitialAnswer(), desc:", e);var t = e.sdpObject;this._localCapabilities = l.a(t), g.debug("local capabilities:", this._localCapabilities);
} }, { key: "_handleLocalReAnswer", value: function value(e) {
g.debug("_handleLocalReAnswer(), desc:", e);var t = e.sdpObject;this._localCapabilities = l.a(t), g.debug("local capabilities:", this._localCapabilities);
} }, { key: "_handleRemoteInitialOffer", value: function value(e) {
g.debug("_handleRemoteInitialOffer(), desc:", e);var t = e.sdpObject;this._mids = l.b(t);var n = l.a(t);g.debug("remote capabilities:", n), this._localCapabilities = l.c(n), this._startIceAndDtls(e);
} }, { key: "_handleRemoteReOffer", value: function value(e) {
g.debug("_handleRemoteReOffer(), desc:", e);var t = e.sdpObject;this._mids = l.b(t);var n = l.a(t);g.debug("remote capabilities:", n), this._localCapabilities = l.c(n);
} }, { key: "_receiveMedia", value: function value() {
g.debug("_receiveMedia()");var e = new Set(this._remoteTrackInfos.keys()),
t = l.d(this._remoteDescription.sdpObject),
n = new Map(),
r = new Map(),
i = new Map();g.debug("_receiveMedia() remote track infos:", t);var o = !0,
a = !1,
s = void 0;try {
for (var c, u = t[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(o = (c = u.next()).done); o = !0) {
var d = m(c.value, 2),
p = d[0],
f = d[1];if (!e.has(p)) {
g.debug("_receiveMedia() new remote track, ssrc:" + p), this._remoteTrackInfos.set(p, f);var h = f.kind,
v = f.rtxSsrc,
y = f.streamId,
b = f.trackId,
S = f.cname,
E = !this._remoteStreams.has(y),
T = void 0;E ? (g.debug("_receiveMedia() new remote stream, id:" + y), T = new MediaStream(), T.jitsiRemoteId = y, n.set(y, T), this._remoteStreams.set(y, T)) : T = this._remoteStreams.get(y);var _ = new RTCRtpReceiver(this._dtlsTransport, h),
C = this._getParametersForRtpReceiver(h, { ssrc: p, rtxSsrc: v, cname: S });f.track = _.track, _.onerror = function (e) {
g.error('rtpReceiver "error" event, event:'), g.error(e);
}, f.stream = T, f.rtpReceiver = _, g.debug("calling rtpReceiver.receive(), parameters:", C);try {
_.receive(C);var w = f.track;w.jitsiRemoteId = b, T.addTrack(w), n.has(y) || r.set(w, T);
} catch (e) {
g.error("rtpReceiver.receive() failed:" + e.message), g.error(e);
}
}
}
} catch (e) {
a = !0, s = e;
} finally {
try {
!o && u.return && u.return();
} finally {
if (a) throw s;
}
}var R = !0,
k = !1,
A = void 0;try {
for (var I, P = e[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(R = (I = P.next()).done); R = !0) {
var p = I.value;if (!t.has(p)) {
g.debug("_receiveMedia() remote track removed, ssrc:" + p);var f = this._remoteTrackInfos.get(p),
O = f.stream,
D = f.track,
L = f.rtpReceiver;try {
L.stop();
} catch (e) {
g.warn("rtpReceiver.stop() failed:" + e);
}i.set(D, O), O.removeTrack(D), this._remoteTrackInfos.delete(p);
}
}
} catch (e) {
k = !0, A = e;
} finally {
try {
!R && P.return && P.return();
} finally {
if (k) throw A;
}
}var N = !0,
M = !1,
x = void 0;try {
for (var j, F = r[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(N = (j = F.next()).done); N = !0) {
var U = m(j.value, 2),
B = U[0],
J = U[1],
G = new Event("addtrack");G.track = B, J.dispatchEvent(G);
}
} catch (e) {
M = !0, x = e;
} finally {
try {
!N && F.return && F.return();
} finally {
if (M) throw x;
}
}var H = !0,
V = !1,
W = void 0;try {
for (var K, q = i[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(H = (K = q.next()).done); H = !0) {
var z = m(K.value, 2),
$ = z[0],
X = z[1],
Q = new Event("removetrack");Q.track = $, X.dispatchEvent(Q);
}
} catch (e) {
V = !0, W = e;
} finally {
try {
!H && q.return && q.return();
} finally {
if (V) throw W;
}
}var Y = !0,
Z = !1,
ee = void 0;try {
for (var te, ne = n.values()[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(Y = (te = ne.next()).done); Y = !0) {
var re = te.value;0 === re.getTracks().length ? (g.warn("ignoring new stream for which no track could be added"), n.delete(re.jitsiRemoteId), this._remoteStreams.delete(re.jitsiRemoteId)) : this._emitAddStream(re);
}
} catch (e) {
Z = !0, ee = e;
} finally {
try {
!Y && ne.return && ne.return();
} finally {
if (Z) throw ee;
}
}var ie = !0,
oe = !1,
ae = void 0;try {
for (var se, ce = this._remoteStreams[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(ie = (se = ce.next()).done); ie = !0) {
var ue = m(se.value, 2),
le = ue[0],
de = ue[1];de.getTracks().length > 0 || (this._remoteStreams.delete(le), this._emitRemoveStream(de));
}
} catch (e) {
oe = !0, ae = e;
} finally {
try {
!ie && ce.return && ce.return();
} finally {
if (oe) throw ae;
}
}
} }, { key: "_removeStream", value: function value(e) {
if (this._closed) throw new d.a("RTCPeerConnection closed");var t = !0,
n = !1,
r = void 0;try {
for (var i, o = e.getTracks()[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(t = (i = o.next()).done); t = !0) {
var a = i.value;if (this._localTrackInfos.has(a.id)) {
var s = this._localTrackInfos.get(a.id).rtpSender;try {
s.stop();
} catch (e) {
g.warn("rtpSender.stop() failed:" + e);
}this._localTrackInfos.delete(a.id);
}
}
} catch (e) {
n = !0, r = e;
} finally {
try {
!t && o.return && o.return();
} finally {
if (n) throw r;
}
}this._emitNegotiationNeeded();
} }, { key: "_sendMedia", value: function value() {
g.debug("_sendMedia()");var e = !0,
t = !1,
n = void 0;try {
for (var r, i = this._localTrackInfos.values()[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(e = (r = i.next()).done); e = !0) {
var o = r.value;if (!o.sending) {
var a = o.rtpSender,
s = o.ssrc,
c = o.rtxSsrc,
u = a.track,
l = u.kind,
d = this._getParametersForRtpSender(l, { ssrc: s, rtxSsrc: c });g.debug("calling rtpSender.send(), parameters:", d);try {
a.send(d), o.sending = !0;
} catch (e) {
g.error("rtpSender.send() failed:" + e.message), g.error(e);
}
}
}
} catch (e) {
t = !0, n = e;
} finally {
try {
!e && i.return && i.return();
} finally {
if (t) throw n;
}
}
} }, { key: "_setDtlsTransport", value: function value(e) {
var t = this,
n = new RTCDtlsTransport(e);n.onstatechange = function () {
g.debug('dtlsTransport "statechange" event, state:' + n.state), t._emitConnectionStateChange();
}, n.ondtlsstatechange = function () {
g.debug('dtlsTransport "dtlsstatechange" event, state:' + n.state), t._emitConnectionStateChange();
}, n.onerror = function (e) {
var n = void 0;e.message ? n = e.message : e.error && (n = e.error.message), g.error('dtlsTransport "error" event, message:' + n), t._emitConnectionStateChange();
}, this._dtlsTransport = n;
} }, { key: "_setIceGatherer", value: function value(e) {
var t = this,
n = { gatherPolicy: e.iceTransportPolicy || "all", iceServers: e.iceServers || [] },
r = new RTCIceGatherer(n);r.onstatechange = function () {
g.debug('iceGatherer "statechange" event, state:' + r.state), t._updateAndEmitIceGatheringStateChange(r.state);
}, r.onlocalcandidate = function (e) {
var n = e.candidate,
r = e.complete;g.debug('iceGatherer "localcandidate" event, candidate:', n), r || !n || 0 === Object.keys(n).length ? (n = null, t._updateAndEmitIceGatheringStateChange(b.complete), t._emitIceCandidate(null)) : t._emitIceCandidate(n);
}, r.onerror = function (e) {
var t = e.errorCode,
n = e.errorText;g.error('iceGatherer "error" event, errorCode:' + t + ", errorText:" + n);
};try {
r.gather();
} catch (e) {
g.warn("iceGatherer.gather() failed:" + e);
}this._iceGatherer = r;
} }, { key: "_setIceTransport", value: function value(e) {
var t = this,
n = new RTCIceTransport(e);n.onstatechange = function () {
g.debug('iceTransport "statechange" event, state:' + n.state), t._emitIceConnectionStateChange();
}, n.onicestatechange = function () {
g.debug('iceTransport "icestatechange" event, state:' + n.state), "completed" === n.state && g.debug("nominated candidate pair:", n.getNominatedCandidatePair()), t._emitIceConnectionStateChange();
}, n.oncandidatepairchange = function (e) {
g.debug('iceTransport "candidatepairchange" event, pair:' + e.pair);
}, this._iceTransport = n;
} }, { key: "_setLocalDescription", value: function value(e) {
var t = this;if (this._closed) return Promise.reject(new d.a("RTCPeerConnection closed"));var n = void 0;try {
n = new u.a(e);
} catch (e) {
return Promise.reject(new TypeError("invalid RTCSessionDescriptionInit: " + e));
}switch (e.type) {case "offer":
return this.signalingState !== y.stable ? Promise.reject(new d.a('invalid signalingState "' + this.signalingState + '"')) : Promise.reject(new TypeError('setLocalDescription() with type "offer" not supported'));case "answer":
if (this.signalingState !== y.haveRemoteOffer) return Promise.reject(new d.a('invalid signalingState "' + this.signalingState + '"'));var r = Boolean(!this._localDescription);return Promise.resolve().then(function () {
return r ? t._handleLocalInitialAnswer(n) : t._handleLocalReAnswer(n);
}).then(function () {
g.debug("setLocalDescription() succeed"), t._localDescription = n, t._updateAndEmitSignalingStateChange(y.stable), r && t._emitBufferedIceCandidates(), t._sendMedia(), t._receiveMedia();
}).catch(function (e) {
throw g.error("setLocalDescription() failed: " + e.message), g.error(e), e;
});default:
return Promise.reject(new TypeError('unsupported description.type "' + e.type + '"'));}
} }, { key: "_setRemoteDescription", value: function value(e) {
var t = this;if (this._closed) return Promise.reject(new d.a("RTCPeerConnection closed"));var n = void 0;try {
n = new u.a(e);
} catch (e) {
return Promise.reject(new TypeError("invalid RTCSessionDescriptionInit: " + e));
}switch (e.type) {case "offer":
if (this.signalingState !== y.stable) return Promise.reject(new d.a('invalid signalingState "' + this.signalingState + '"'));var r = Boolean(!this._remoteDescription);return Promise.resolve().then(function () {
return r ? t._handleRemoteInitialOffer(n) : t._handleRemoteReOffer(n);
}).then(function () {
g.debug("setRemoteDescription() succeed"), t._remoteDescription = n, t._updateAndEmitSignalingStateChange(y.haveRemoteOffer);
}).catch(function (e) {
throw g.error("setRemoteDescription() failed: " + e), e;
});case "answer":
return this.signalingState !== y.haveLocalOffer ? Promise.reject(new d.a('invalid signalingState "' + this.signalingState + '"')) : Promise.reject(new TypeError('setRemoteDescription() with type "answer" not supported'));default:
return Promise.reject(new TypeError('unsupported description.type "' + e.type + '"'));}
} }, { key: "_startIceAndDtls", value: function value(e) {
var t = e.sdpObject,
n = l.e(t),
r = l.f(t),
i = l.g(t);switch (e.type) {case "offer":
this._iceTransport.start(this._iceGatherer, n, "controlled");break;case "answer":
this._iceTransport.start(this._iceGatherer, n, "controlling");}var o = !0,
a = !1,
s = void 0;try {
for (var c, u = r[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(o = (c = u.next()).done); o = !0) {
var d = c.value;0 !== d.port && 9 !== d.port && this._iceTransport.addRemoteCandidate(d);
}
} catch (e) {
a = !0, s = e;
} finally {
try {
!o && u.return && u.return();
} finally {
if (a) throw s;
}
}switch (this._iceTransport.addRemoteCandidate({}), e.type) {case "offer":
i.role = "server";break;case "answer":
i.role = "client";}this._dtlsTransport.start(i);
} }, { key: "_updateAndEmitIceGatheringStateChange", value: function value(e) {
if (!this._closed && e !== this.iceGatheringState) {
this._iceGatheringState = e, g.debug('emitting "icegatheringstatechange", iceGatheringState:', this.iceGatheringState);var t = new c.a.Event("icegatheringstatechange");this.dispatchEvent(t);
}
} }, { key: "_updateAndEmitSignalingStateChange", value: function value(e) {
if (e !== this.signalingState) {
this._signalingState = e, g.debug('emitting "signalingstatechange", signalingState:', this.signalingState);var t = new c.a.Event("signalingstatechange");this.dispatchEvent(t);
}
} }, { key: "connectionState", get: function get() {
return this._dtlsTransport.state;
} }, { key: "iceConnectionState", get: function get() {
return this._iceTransport.state;
} }, { key: "iceGatheringState", get: function get() {
return this._iceGatheringState;
} }, { key: "localDescription", get: function get() {
return this._localDescription;
} }, { key: "remoteDescription", get: function get() {
return this._remoteDescription;
} }, { key: "signalingState", get: function get() {
return this._signalingState;
} }]), t;
}(c.a.EventTarget);t.a = E;
}).call(t, "modules/RTC/ortc/RTCPeerConnection.js");
}, function (e, t, n) {
"use strict";
function r(e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
}var i = n(13),
o = n.n(i),
a = "function" == typeof Symbol && "symbol" == typeof (typeof Symbol === "function" ? Symbol.iterator : "@@iterator") ? function (e) {
return typeof e;
} : function (e) {
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== (typeof Symbol === "function" ? Symbol.prototype : "@@prototype") ? "symbol" : typeof e;
},
s = function () {
function e(e, t) {
for (var n = 0; n < t.length; n++) {
var r = t[n];r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
}
}return function (t, n, r) {
return n && e(t.prototype, n), r && e(t, r), t;
};
}(),
c = function () {
function e(t) {
switch (r(this, e), this._sdp = null, this._sdpObject = null, this._type = null, t.type) {case "offer":case "answer":
break;default:
throw new TypeError('invalid type "' + t.type + '"');}if (this._type = t.type, "string" == typeof t.sdp) {
this._sdp = t.sdp;try {
this._sdpObject = o.a.parse(t.sdp);
} catch (e) {
throw new Error("invalid sdp: " + e);
}
} else {
if ("object" !== a(t._sdpObject)) throw new TypeError("invalid sdp or _sdpObject");this._sdpObject = t._sdpObject;try {
this._sdp = o.a.write(t._sdpObject);
} catch (e) {
throw new Error("invalid sdp object: " + e);
}
}
}return s(e, [{ key: "toJSON", value: function value() {
return { sdp: this._sdp, type: this._type };
} }, { key: "sdp", get: function get() {
return this._sdp;
}, set: function set(e) {
try {
this._sdpObject = o.a.parse(e);
} catch (e) {
throw new Error("invalid sdp: " + e);
}this._sdp = e;
} }, { key: "sdpObject", get: function get() {
return this._sdpObject;
} }, { key: "type", get: function get() {
return this._type;
} }]), e;
}();t.a = c;
}, function (e, t, n) {
"use strict";
function r(e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
}function i(e, t) {
if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return !t || "object" != typeof t && "function" != typeof t ? e : t;
}function o(e, t) {
if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);
}n.d(t, "a", function () {
return a;
});var a = function (e) {
return function (t) {
function n(t) {
r(this, n);var o = i(this, (n.__proto__ || Object.getPrototypeOf(n)).call(this, t));return Object.defineProperty(o, "name", { value: e }), o;
}return o(n, t), n;
}(Error);
}("InvalidStateError");
}, function (e, t, n) {
"use strict";
function r(e) {
var t = new Map(),
n = [],
r = !0,
i = !1,
o = void 0;try {
for (var a, s = e.media[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(r = (a = s.next()).done); r = !0) {
var c = a.value,
u = c.type;if ("audio" === u || "video" === u) {
var l = !0,
d = !1,
f = void 0;try {
for (var h, m = c.rtp[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(l = (h = m.next()).done); l = !0) {
var v = h.value,
g = { clockRate: v.rate, kind: u, mimeType: u + "/" + v.codec, name: v.codec, numChannels: v.encoding || 1, parameters: {}, preferredPayloadType: v.payload, rtcpFeedback: [] };t.set(g.preferredPayloadType, g);
}
} catch (e) {
d = !0, f = e;
} finally {
try {
!l && m.return && m.return();
} finally {
if (d) throw f;
}
}var y = !0,
b = !1,
S = void 0;try {
for (var E, T = (c.fmtp || [])[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(y = (E = T.next()).done); y = !0) {
var _ = E.value,
C = p.a.parseFmtpConfig(_.config),
w = t.get(_.payload);w && (w.parameters = C);
}
} catch (e) {
b = !0, S = e;
} finally {
try {
!y && T.return && T.return();
} finally {
if (b) throw S;
}
}var R = !0,
k = !1,
A = void 0;try {
for (var I, P = (c.rtcpFb || [])[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(R = (I = P.next()).done); R = !0) {
var O = I.value,
D = t.get(O.payload);D && D.rtcpFeedback.push({ parameter: O.subtype || "", type: O.type });
}
} catch (e) {
k = !0, A = e;
} finally {
try {
!R && P.return && P.return();
} finally {
if (k) throw A;
}
}var L = !0,
N = !1,
M = void 0;try {
for (var x, j = (c.ext || [])[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(L = (x = j.next()).done); L = !0) {
!function () {
var e = x.value,
t = e.value,
r = e.uri,
i = { kind: u, uri: r, preferredId: t };n.find(function (e) {
return i.kind === e.kind && i.uri === e.uri;
}) || n.push(i);
}();
}
} catch (e) {
N = !0, M = e;
} finally {
try {
!L && j.return && j.return();
} finally {
if (N) throw M;
}
}
}
}
} catch (e) {
i = !0, o = e;
} finally {
try {
!r && s.return && s.return();
} finally {
if (i) throw o;
}
}return { codecs: Array.from(t.values()), fecMechanisms: [], headerExtensions: n };
}function i(e) {
var t = l(e),
n = t.fingerprint || e.fingerprint,
r = void 0;switch (t.setup) {case "active":
r = "client";break;case "passive":
r = "server";break;case "actpass":
r = "auto";}return { role: r, fingerprints: [{ algorithm: n.type, value: n.hash }] };
}function o(e) {
var t = l(e),
n = [],
r = !0,
i = !1,
o = void 0;try {
for (var a, s = t.candidates[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(r = (a = s.next()).done); r = !0) {
var c = a.value;if (1 === c.component) {
var u = { foundation: c.foundation, ip: c.ip, port: c.port, priority: c.priority, protocol: c.transport.toLowerCase(), type: c.type };n.push(u);
}
}
} catch (e) {
i = !0, o = e;
} finally {
try {
!r && s.return && s.return();
} finally {
if (i) throw o;
}
}return n;
}function a(e) {
var t = l(e),
n = t.iceUfrag,
r = t.icePwd;return { icelite: "ice-lite" === e.icelite, password: r, usernameFragment: n };
}function s(e) {
var t = new Map(),
n = !0,
r = !1,
i = void 0;try {
for (var o, a = e.media[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(n = (o = a.next()).done); n = !0) {
var s = o.value;t.set(s.mid, s.type);
}
} catch (e) {
r = !0, i = e;
} finally {
try {
!n && a.return && a.return();
} finally {
if (r) throw i;
}
}return t;
}function c(e) {
var t = new Map(),
n = new Map(),
r = new Set(),
i = !0,
o = !1,
a = void 0;try {
for (var s, c = e.media[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(i = (s = c.next()).done); i = !0) {
var u = s.value,
l = u.type;if ("audio" === l || "video" === l) {
var d = !0,
p = !1,
f = void 0;try {
for (var h, m = (u.ssrcGroups || [])[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(d = (h = m.next()).done); d = !0) {
var v = h.value;if ("FID" === v.semantics) {
var g = v.ssrcs.split(" ").map(function (e) {
return Number(e);
}),
y = g[0],
b = g[1];n.set(y, b), r.add(b);
}
}
} catch (e) {
p = !0, f = e;
} finally {
try {
!d && m.return && m.return();
} finally {
if (p) throw f;
}
}var S = !0,
E = !1,
T = void 0;try {
for (var _, C = (u.ssrcs || [])[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(S = (_ = C.next()).done); S = !0) {
var w = _.value,
R = w.id;if (!r.has(R)) {
var k = t.get(R);switch (k || (k = { kind: l, rtxSsrc: n.get(R), ssrc: R }, t.set(R, k)), w.attribute) {case "cname":
k.cname = w.value;break;case "msid":
var A = w.value.split(" "),
I = A[0],
P = A[1];k.streamId = I, k.trackId = P;break;case "mslabel":
var O = w.value;k.streamId = O;break;case "label":
var D = w.value;k.trackId = D;}
}
}
} catch (e) {
E = !0, T = e;
} finally {
try {
!S && C.return && C.return();
} finally {
if (E) throw T;
}
}
}
}
} catch (e) {
o = !0, a = e;
} finally {
try {
!i && c.return && c.return();
} finally {
if (o) throw a;
}
}return t;
}function u(e) {
var t = RTCRtpReceiver.getCapabilities(),
n = { codecs: [], fecMechanisms: [], headerExtensions: [] },
r = new Map(),
i = !0,
o = !1,
a = void 0;try {
for (var s, c = e.codecs[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(i = (s = c.next()).done); i = !0) {
!function () {
var e = s.value,
i = e.name.toLowerCase();if ("rtx" === i) return r.set(e.parameters.apt, e.preferredPayloadType), "continue";var o = t.codecs.find(function (t) {
return t.name.toLowerCase() === i && t.kind === e.kind && t.clockRate === e.clockRate;
});if (!o) return "continue";var a = { clockRate: o.clockRate, kind: o.kind, mimeType: o.kind + "/" + o.name, name: o.name, numChannels: o.numChannels || 1, parameters: {}, preferredPayloadType: e.preferredPayloadType, rtcpFeedback: [] },
c = !0,
u = !1,
l = void 0;try {
for (var d, p = Object.keys(e.parameters)[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(c = (d = p.next()).done); c = !0) {
var f = d.value,
h = e.parameters[f],
m = !0,
v = !1,
g = void 0;try {
for (var y, b = Object.keys(o.parameters)[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(m = (y = b.next()).done); m = !0) {
var S = y.value,
E = o.parameters[S];if (S === f && E === h) {
a.parameters[S] = E;break;
}
}
} catch (e) {
v = !0, g = e;
} finally {
try {
!m && b.return && b.return();
} finally {
if (v) throw g;
}
}
}
} catch (e) {
u = !0, l = e;
} finally {
try {
!c && p.return && p.return();
} finally {
if (u) throw l;
}
}var T = !0,
_ = !1,
C = void 0;try {
for (var w, R = e.rtcpFeedback[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(T = (w = R.next()).done); T = !0) {
!function () {
var e = w.value,
t = o.rtcpFeedback.find(function (t) {
return t.type === e.type && t.parameter === e.parameter;
});t && a.rtcpFeedback.push(t);
}();
}
} catch (e) {
_ = !0, C = e;
} finally {
try {
!T && R.return && R.return();
} finally {
if (_) throw C;
}
}n.codecs.push(a);
}();
}
} catch (e) {
o = !0, a = e;
} finally {
try {
!i && c.return && c.return();
} finally {
if (o) throw a;
}
}var u = !0,
l = !1,
d = void 0;try {
for (var p, f = n.codecs[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(u = (p = f.next()).done); u = !0) {
var h = p.value,
m = h.preferredPayloadType;if (r.has(m)) {
var v = { clockRate: h.clockRate, kind: h.kind, mimeType: h.kind + "/rtx", name: "rtx", parameters: { apt: m }, preferredPayloadType: r.get(m), rtcpFeedback: [] };n.codecs.push(v);
}
}
} catch (e) {
l = !0, d = e;
} finally {
try {
!u && f.return && f.return();
} finally {
if (l) throw d;
}
}var g = !0,
y = !1,
b = void 0;try {
for (var S, E = e.headerExtensions[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(g = (S = E.next()).done); g = !0) {
!function () {
var e = S.value,
r = t.headerExtensions.find(function (t) {
return t.kind === e.kind && t.uri === e.uri;
});if (r) {
var i = { kind: r.kind, preferredEncrypt: Boolean(e.preferredEncrypt), preferredId: e.preferredId, uri: r.uri };n.headerExtensions.push(i);
}
}();
}
} catch (e) {
y = !0, b = e;
} finally {
try {
!g && E.return && E.return();
} finally {
if (y) throw b;
}
}var T = !0,
_ = !1,
C = void 0;try {
for (var w, R = e.fecMechanisms[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(T = (w = R.next()).done); T = !0) {
!function () {
var e = w.value,
r = t.fecMechanisms.find(function (t) {
return t === e;
});r && n.fecMechanisms.push(r);
}();
}
} catch (e) {
_ = !0, C = e;
} finally {
try {
!T && R.return && R.return();
} finally {
if (_) throw C;
}
}return n;
}function l(e) {
return e.media.find(function (e) {
return e.iceUfrag && 0 !== e.port;
});
}t.a = r, t.g = i, t.f = o, t.e = a, t.b = s, t.d = c, t.c = u;var d = n(13),
p = n.n(d);
}, function (e, t, n) {
"use strict";
function r(e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
}var i = n(5),
o = function () {
function e(e, t) {
for (var n = 0; n < t.length; n++) {
var r = t[n];r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
}
}return function (t, n, r) {
return n && e(t.prototype, n), r && e(t, r), t;
};
}(),
a = function () {
function e(t, n) {
r(this, e), this._callback = n, this._eventFired = !1, t.statistics.addAudioLevelListener(this._audioLevel.bind(this)), t.on(i.TRACK_MUTE_CHANGED, this._trackMuteChanged.bind(this)), t.on(i.TRACK_ADDED, this._trackAdded.bind(this));
}return o(e, [{ key: "_audioLevel", value: function value(e, t, n, r) {
r && this.audioTrack && !this._eventFired && this.audioTrack.isMuted() && n > .6 && (this._eventFired = !0, this._callback());
} }, { key: "_isLocalAudioTrack", value: function value(e) {
return e.isAudioTrack() && e.isLocal();
} }, { key: "_trackAdded", value: function value(e) {
this._isLocalAudioTrack(e) && (this.audioTrack = e);
} }, { key: "_trackMuteChanged", value: function value(e) {
this._isLocalAudioTrack(e) && e.isMuted() && (this._eventFired = !1);
} }]), e;
}();t.a = a;
}, function (e, t, n) {
"use strict";
(function (e) {
function r(e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
}function i(e, t, n) {
if (n < 5e3) return 1;var r = 0,
i = Math.min(t.height, t.width);if (e) {
var a = m.find(function (e) {
return e.height <= i;
});if (a) for (i = a.height; i >= 180 && "break" !== function () {
var e = i;if (!(a = m.find(function (t) {
return t.height === e;
}))) return "break";r += a.target;
}(); i /= 2) {}
} else {
var s = t.width * t.height;r = s <= 76800 ? 600 : s <= 307200 ? 1700 : s <= 518400 ? 2e3 : 2500;
}return Math.min(r, o(Math.max(0, n - 1e3)));
}function o(e) {
return e > 6e4 ? Number.MAX_SAFE_INTEGER : v * Math.pow(1.08, e / 1e3);
}var a = n(32),
s = n(5),
c = n(0),
u = (n.n(c), function () {
function e(e, t) {
for (var n = 0; n < t.length; n++) {
var r = t[n];r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
}
}return function (t, n, r) {
return n && e(t.prototype, n), r && e(t, r), t;
};
}()),
l = n(7),
d = n(17),
p = n(31),
f = n.i(c.getLogger)(e),
h = "stats",
m = [{ width: 1920, height: 1080, layers: 3, max: 5e3, target: 4e3, min: 800 }, { width: 1280, height: 720, layers: 3, max: 2500, target: 2500, min: 600 }, { width: 960, height: 540, layers: 3, max: 900, target: 900, min: 450 }, { width: 640, height: 360, layers: 2, max: 700, target: 500, min: 150 }, { width: 480, height: 270, layers: 2, max: 450, target: 350, min: 150 }, { width: 320, height: 180, layers: 1, max: 200, target: 150, min: 30 }],
v = 800,
g = function () {
function e(t, n, i) {
var o = this;r(this, e), this.eventEmitter = n, this._conference = t, this._localStats = { connectionQuality: 100, jvbRTT: void 0 }, this._lastConnectionQualityUpdate = -1, this._remoteStats = {}, this._timeIceConnected = -1, this._timeVideoUnmuted = -1, i.startBitrate && i.startBitrate > 0 && (v = i.startBitrate), t.on(s.CONNECTION_INTERRUPTED, function () {
o._updateLocalConnectionQuality(0), o.eventEmitter.emit(a.LOCAL_STATS_UPDATED, o._localStats), o._broadcastLocalStats();
}), t.room.addListener(l.ICE_CONNECTION_STATE_CHANGED, function (e, t) {
e.isP2P || "connected" !== t || (o._timeIceConnected = window.performance.now());
}), t.on(s.ENDPOINT_MESSAGE_RECEIVED, function (e, t) {
t.type === h && o._updateRemoteStats(e.getId(), t.values);
}), t.statistics.addConnectionStatsListener(this._updateLocalStats.bind(this)), t.on(s.TRACK_MUTE_CHANGED, function (e) {
e.isVideoTrack() && (e.isMuted() ? o._timeVideoUnmuted = -1 : o._maybeUpdateUnmuteTime());
}), t.on(s.TRACK_ADDED, function (e) {
e.isVideoTrack() && !e.isMuted() && o._maybeUpdateUnmuteTime();
});
}return u(e, [{ key: "_maybeUpdateUnmuteTime", value: function value() {
this._timeVideoUnmuted < 0 && (this._timeVideoUnmuted = window.performance.now());
} }, { key: "_calculateConnectionQuality", value: function value(e, t, n) {
var r = p[n],
o = 100,
a = void 0;if (this._localStats.packetLoss && (a = this._localStats.packetLoss.upload, t && (a *= .5)), t || !r || e === d.DESKTOP || this._timeIceConnected < 0 || this._timeVideoUnmuted < 0) void 0 === a ? (f.error("Cannot calculate connection quality, unknown packet loss."), o = 100) : o = a <= 2 ? 100 : a <= 4 ? 70 : a <= 6 ? 50 : a <= 8 ? 30 : a <= 12 ? 10 : 0;else {
var s = window.performance.now() - Math.max(this._timeVideoUnmuted, this._timeIceConnected),
c = this._conference.getActivePeerConnection(),
u = Boolean(c && c.isSimulcastOn()),
l = i(u, r, s);l *= .9, o = 100 * this._localStats.bitrate.upload / l, a && a >= 10 && (o = Math.min(o, 30));
}if (this._lastConnectionQualityUpdate > 0) {
var h = this._localStats.connectionQuality,
m = (window.performance.now() - this._lastConnectionQualityUpdate) / 1e3;o = Math.min(o, h + 2 * m);
}return Math.min(100, o);
} }, { key: "_updateLocalConnectionQuality", value: function value(e) {
this._localStats.connectionQuality = e, this._lastConnectionQualityUpdate = window.performance.now();
} }, { key: "_broadcastLocalStats", value: function value() {
var e = { bitrate: this._localStats.bitrate, packetLoss: this._localStats.packetLoss, connectionQuality: this._localStats.connectionQuality, jvbRTT: this._localStats.jvbRTT },
t = this._conference.getLocalVideoTrack();t && t.resolution && (e.resolution = t.resolution);try {
this._conference.broadcastEndpointMessage({ type: h, values: e });
} catch (e) {}
} }, { key: "_updateLocalStats", value: function value(e, t) {
if (!e.isP2P) {
var n = t.transport && t.transport.length && t.transport[0].rtt;this._localStats.jvbRTT = n || void 0;
}if (e === this._conference.getActivePeerConnection()) {
var r = void 0,
i = !this._conference.isConnectionInterrupted(),
o = this._conference.getLocalVideoTrack(),
s = o ? o.videoType : void 0,
c = !o || o.isMuted(),
u = o ? o.resolution : null;c || this._maybeUpdateUnmuteTime();for (r in t) {
t.hasOwnProperty(r) && (this._localStats[r] = t[r]);
}i && this._updateLocalConnectionQuality(this._calculateConnectionQuality(s, c, u)), this.eventEmitter.emit(a.LOCAL_STATS_UPDATED, this._localStats), this._broadcastLocalStats();
}
} }, { key: "_updateRemoteStats", value: function value(e, t) {
this._remoteStats[e] = { bitrate: t.bitrate, packetLoss: t.packetLoss, connectionQuality: t.connectionQuality, jvbRTT: t.jvbRTT }, this.eventEmitter.emit(a.REMOTE_STATS_UPDATED, e, this._remoteStats[e]);
} }, { key: "getStats", value: function value() {
return this._localStats;
} }]), e;
}();t.a = g;
}).call(t, "modules/connectivity/ConnectionQuality.js");
}, function (e, t, n) {
"use strict";
(function (e) {
function r(e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
}var i = n(0),
o = (n.n(i), n(5)),
a = function () {
function e(e, t) {
for (var n = 0; n < t.length; n++) {
var r = t[n];r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
}
}return function (t, n, r) {
return n && e(t.prototype, n), r && e(t, r), t;
};
}(),
s = n.i(i.getLogger)(e),
c = function () {
function e(t) {
var n = this;r(this, e), this._conference = t, this._jvb121 = !0, this._conference.addEventListener(o.USER_JOINED, function () {
return n.evaluateStatus();
}), this._conference.addEventListener(o.USER_LEFT, function () {
return n.evaluateStatus();
}), this._conference.addEventListener(o.P2P_STATUS, function () {
return n.evaluateStatus();
});
}return a(e, [{ key: "evaluateStatus", value: function value() {
var e = this._jvb121,
t = !this._conference.isP2PActive() && this._conference.getParticipantCount() <= 2;e !== t && (this._jvb121 = t, s.debug("JVB121 status " + e + " => " + t), this._conference.eventEmitter.emit(o.JVB121_STATUS, e, t));
} }]), e;
}();t.a = c;
}).call(t, "modules/event/Jvb121EventGenerator.js");
}, function (e, t, n) {
"use strict";
function r(e, t) {
if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return !t || "object" != typeof t && "function" != typeof t ? e : t;
}function i(e, t) {
if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);
}function o(e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
}var a = function () {
function e(e, t) {
for (var n = 0; n < t.length; n++) {
var r = t[n];r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
}
}return function (t, n, r) {
return n && e(t.prototype, n), r && e(t, r), t;
};
}(),
s = function () {
function e() {
o(this, e);
}return a(e, [{ key: "sendEvent", value: function value() {} }]), e;
}(),
c = function (e) {
function t() {
o(this, t);var e = r(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this));return e.eventCache = [], e;
}return i(t, e), a(t, [{ key: "sendEvent", value: function value(e) {
var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};this.eventCache.push({ action: e, data: t });
} }, { key: "drainCachedEvents", value: function value() {
var e = this.eventCache.slice();return this.eventCache = [], e;
} }]), t;
}(s),
u = new c(),
l = function () {
function e() {
o(this, e), this.analyticsHandlers = new Set(), this.permanentProperties = Object.create(null);
}return a(e, [{ key: "init", value: function value(e) {
this.browserName = e, this.analyticsHandlers.add(u);
} }, { key: "sendEvent", value: function value(e) {
var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {},
n = babelHelpers.extends({ browserName: this.browserName }, this.permanentProperties, t);this.analyticsHandlers.forEach(function (t) {
return t.sendEvent(e, n);
});
} }, { key: "dispose", value: function value() {
u.drainCachedEvents(), this.analyticsHandlers.clear();
} }, { key: "setAnalyticsHandlers", value: function value(e) {
var t = this;this.analyticsHandlers = new Set(e), u.drainCachedEvents().forEach(function (e) {
return t.sendEvent(e.action, e.data);
});
} }, { key: "addPermanentProperties", value: function value(e) {
this.permanentProperties = babelHelpers.extends(this.permanentProperties, e);
} }]), e;
}();t.a = new l();
}, function (e, t, n) {
"use strict";
(function (e) {
function r(e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
}var i = n(0),
o = (n.n(i), n(32)),
a = n(5),
s = n(4),
c = n(2),
u = n(6),
l = n(17),
d = (n.n(l), function () {
function e(e, t) {
for (var n = 0; n < t.length; n++) {
var r = t[n];r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
}
}return function (t, n, r) {
return n && e(t.prototype, n), r && e(t, r), t;
};
}()),
p = n.i(i.getLogger)(e),
f = function () {
function e(t) {
r(this, e), this.name = t, this.count = 0, this.sum = 0, this.samples = [];
}return d(e, [{ key: "addNext", value: function value(e) {
"number" != typeof e ? p.error(this.name + " - invalid value for idx: " + this.count, e) : isNaN(e) || (this.sum += e, this.samples.push(e), this.count += 1);
} }, { key: "calculate", value: function value() {
return this.sum / this.count;
} }, { key: "appendReport", value: function value(e) {
e[this.name] = { value: this.calculate(), samples: this.samples };
} }, { key: "reset", value: function value() {
this.samples = [], this.sum = 0, this.count = 0;
} }]), e;
}(),
h = function () {
function e(t, n, i) {
var s = this;r(this, e), this.isP2P = n, this._n = i, this._sampleIdx = 0, this._avgRTT = new f("stat_avg_rtt"), this._avgRemoteRTTMap = new Map(), this._avgRtpStatsReporter = t, this._avgEnd2EndRTT = void 0, this._onConnectionStats = function (e, t) {
s.isP2P === e.isP2P && s._calculateAvgStats(t);
};var c = t._conference;c.statistics.addConnectionStatsListener(this._onConnectionStats), this.isP2P || (this._onUserLeft = function (e) {
return s._avgRemoteRTTMap.delete(e);
}, c.on(a.USER_LEFT, this._onUserLeft), this._onRemoteStatsUpdated = function (e, t) {
return s._processRemoteStats(e, t);
}, c.on(o.REMOTE_STATS_UPDATED, this._onRemoteStatsUpdated));
}return d(e, [{ key: "_calculateAvgStats", value: function value(e) {
if (!e) return void p.error("No stats");if (c.a.supportsRTTStatistics() && e.transport && e.transport.length && this._avgRTT.addNext(e.transport[0].rtt), this._sampleIdx += 1, this._sampleIdx >= this._n) {
if (c.a.supportsRTTStatistics()) {
var t = this._avgRtpStatsReporter._conference,
n = { p2p: this.isP2P, size: t.getParticipantCount() };if (e.transport && e.transport.length && babelHelpers.extends(n, { localCandidateType: e.transport[0].localCandidateType, remoteCandidateType: e.transport[0].remoteCandidateType, transportType: e.transport[0].type }), this._avgRTT.appendReport(n), this.isP2P) {
var r = this._avgRtpStatsReporter.jvbStatsMonitor._avgEnd2EndRTT;if (!isNaN(r)) {
var i = this._avgRTT.calculate() - r;n.stat_avg_rtt_diff = { value: i };
}
} else {
var o = this._calculateAvgRemoteRTT(),
a = this._avgRTT.calculate();this._avgEnd2EndRTT = a + o, isNaN(a) || isNaN(o) || (n.stat_avg_end2endrtt = { value: this._avgEnd2EndRTT });
}u.a.analytics.sendEvent("avg.rtp.stats", n);
}this._resetAvgStats();
}
} }, { key: "_calculateAvgRemoteRTT", value: function value() {
var e = 0,
t = 0,
n = !0,
r = !1,
i = void 0;try {
for (var o, a = this._avgRemoteRTTMap.values()[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(n = (o = a.next()).done); n = !0) {
var s = o.value,
c = s.calculate();isNaN(c) || (t += c, e += 1, s.reset());
}
} catch (e) {
r = !0, i = e;
} finally {
try {
!n && a.return && a.return();
} finally {
if (r) throw i;
}
}return t / e;
} }, { key: "_processRemoteStats", value: function value(e, t) {
var n = "number" == typeof t.jvbRTT,
r = this._avgRemoteRTTMap.get(e);!r && n && (r = new f(e + "_stat_rtt"), this._avgRemoteRTTMap.set(e, r)), n ? r.addNext(t.jvbRTT) : r && this._avgRemoteRTTMap.delete(e);
} }, { key: "_resetAvgStats", value: function value() {
this._avgRTT.reset(), this._avgRemoteRTTMap && this._avgRemoteRTTMap.clear(), this._sampleIdx = 0;
} }, { key: "dispose", value: function value() {
var e = this._avgRtpStatsReporter._conference;e.statistics.removeConnectionStatsListener(this._onConnectionStats), this.isP2P || (e.off(o.REMOTE_STATS_UPDATED, this._onRemoteStatsUpdated), e.off(a.USER_LEFT, this._onUserLeft));
} }]), e;
}(),
m = function () {
function e(t, n) {
var i = this;if (r(this, e), this._n = n, !(n > 0)) return void p.info("Avg RTP stats reports are disabled.");p.info("Avg RTP stats will be calculated every " + n + " samples"), this._sampleIdx = 0, this._conference = t, this._avgAudioBitrateUp = new f("stat_avg_bitrate_audio_upload"), this._avgAudioBitrateDown = new f("stat_avg_bitrate_audio_download"), this._avgVideoBitrateUp = new f("stat_avg_bitrate_video_upload"), this._avgVideoBitrateDown = new f("stat_avg_bitrate_video_download"), this._avgBandwidthUp = new f("stat_avg_bandwidth_upload"), this._avgBandwidthDown = new f("stat_avg_bandwidth_download"), this._avgPacketLossTotal = new f("stat_avg_packetloss_total"), this._avgPacketLossUp = new f("stat_avg_packetloss_upload"), this._avgPacketLossDown = new f("stat_avg_packetloss_download"), this._avgRemoteFPS = new f("stat_avg_framerate_remote"), this._avgRemoteScreenFPS = new f("stat_avg_framerate_screen_remote"), this._avgLocalFPS = new f("stat_avg_framerate_local"), this._avgLocalScreenFPS = new f("stat_avg_framerate_screen_local"), this._avgCQ = new f("stat_avg_cq"), this._onLocalStatsUpdated = function (e) {
return i._calculateAvgStats(e);
}, t.on(o.LOCAL_STATS_UPDATED, this._onLocalStatsUpdated), this._onP2PStatusChanged = function () {
p.debug("Resetting average stats calculation"), i._resetAvgStats(), i.jvbStatsMonitor._resetAvgStats(), i.p2pStatsMonitor._resetAvgStats();
}, t.on(a.P2P_STATUS, this._onP2PStatusChanged), this._onJvb121StatusChanged = function (e, t) {
!0 === t && (p.info("Resetting JVB avg RTP stats"), i._resetAvgJvbStats());
}, t.on(a.JVB121_STATUS, this._onJvb121StatusChanged), this.jvbStatsMonitor = new h(this, !1, n), this.p2pStatsMonitor = new h(this, !0, n);
}return d(e, [{ key: "_calculateAvgStats", value: function value(e) {
if (!e) return void p.error("No stats");var t = this._conference.isP2PActive(),
n = this._conference.getParticipantCount();if (t || !(n < 2)) {
var r = e.bitrate,
i = e.bandwidth,
o = e.packetLoss,
a = e.framerate;if (!r) return void p.error('No "bitrate"');if (!i) return void p.error('No "bandwidth"');if (!o) return void p.error('No "packetloss"');if (!a) return void p.error('No "framerate"');if (this._avgAudioBitrateUp.addNext(r.audio.upload), this._avgAudioBitrateDown.addNext(r.audio.download), this._avgVideoBitrateUp.addNext(r.video.upload), this._avgVideoBitrateDown.addNext(r.video.download), c.a.supportsBandwidthStatistics() && (this._avgBandwidthUp.addNext(i.upload), this._avgBandwidthDown.addNext(i.download)), this._avgPacketLossUp.addNext(o.upload), this._avgPacketLossDown.addNext(o.download), this._avgPacketLossTotal.addNext(o.total), this._avgCQ.addNext(e.connectionQuality), a && (this._avgRemoteFPS.addNext(this._calculateAvgVideoFps(a, !1, l.CAMERA)), this._avgRemoteScreenFPS.addNext(this._calculateAvgVideoFps(a, !1, l.DESKTOP)), this._avgLocalFPS.addNext(this._calculateAvgVideoFps(a, !0, l.CAMERA)), this._avgLocalScreenFPS.addNext(this._calculateAvgVideoFps(a, !0, l.DESKTOP))), this._sampleIdx += 1, this._sampleIdx >= this._n) {
var s = { p2p: t, size: n };e.transport && e.transport.length && babelHelpers.extends(s, { localCandidateType: e.transport[0].localCandidateType, remoteCandidateType: e.transport[0].remoteCandidateType, transportType: e.transport[0].type }), this._avgAudioBitrateUp.appendReport(s), this._avgAudioBitrateDown.appendReport(s), this._avgVideoBitrateUp.appendReport(s), this._avgVideoBitrateDown.appendReport(s), c.a.supportsBandwidthStatistics() && (this._avgBandwidthUp.appendReport(s), this._avgBandwidthDown.appendReport(s)), this._avgPacketLossUp.appendReport(s), this._avgPacketLossDown.appendReport(s), this._avgPacketLossTotal.appendReport(s), this._avgRemoteFPS.appendReport(s), isNaN(this._avgRemoteScreenFPS.calculate()) || this._avgRemoteScreenFPS.appendReport(s), this._avgLocalFPS.appendReport(s), isNaN(this._avgLocalScreenFPS.calculate()) || this._avgLocalScreenFPS.appendReport(s), this._avgCQ.appendReport(s), u.a.analytics.sendEvent("avg.rtp.stats", s), this._resetAvgStats();
}
}
} }, { key: "_calculateAvgVideoFps", value: function value(e, t, n) {
var r = 0,
i = 0,
o = this._conference.myUserId(),
a = !0,
s = !1,
c = void 0;try {
for (var u, l = Object.keys(e)[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(a = (u = l.next()).done); a = !0) {
var d = u.value;if (t ? d === o : d !== o) {
var p = t ? null : this._conference.getParticipantById(d),
f = e[d];if ((t || p) && f) {
var h = this._calculatePeerAvgVideoFps(f, p, n);isNaN(h) || (r += h, i += 1);
}
}
}
} catch (e) {
s = !0, c = e;
} finally {
try {
!a && l.return && l.return();
} finally {
if (s) throw c;
}
}return r / i;
} }, { key: "_calculatePeerAvgVideoFps", value: function value(e, t, n) {
var r = Object.keys(e).map(function (e) {
return Number(e);
}),
i = null,
o = this._conference.getActivePeerConnection();t ? (i = t.getTracksByMediaType(s.b)) && (r = r.filter(function (e) {
return i.find(function (t) {
return !t.isMuted() && t.getSSRC() === e && t.videoType === n;
});
})) : (i = this._conference.getLocalTracks(s.b), r = r.filter(function (e) {
return i.find(function (t) {
return !t.isMuted() && o.getLocalSSRC(t) === e && t.videoType === n;
});
}));var a = 0,
c = 0,
u = !0,
l = !1,
d = void 0;try {
for (var p, f = r[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(u = (p = f.next()).done); u = !0) {
var h = p.value,
m = Number(e[h]);!isNaN(m) && m > 0 && (a += m, c += 1);
}
} catch (e) {
l = !0, d = e;
} finally {
try {
!u && f.return && f.return();
} finally {
if (l) throw d;
}
}return a / c;
} }, { key: "_resetAvgJvbStats", value: function value() {
this._resetAvgStats(), this.jvbStatsMonitor._resetAvgStats();
} }, { key: "_resetAvgStats", value: function value() {
this._avgAudioBitrateUp.reset(), this._avgAudioBitrateDown.reset(), this._avgVideoBitrateUp.reset(), this._avgVideoBitrateDown.reset(), this._avgBandwidthUp.reset(), this._avgBandwidthDown.reset(), this._avgPacketLossUp.reset(), this._avgPacketLossDown.reset(), this._avgPacketLossTotal.reset(), this._avgRemoteFPS.reset(), this._avgRemoteScreenFPS.reset(), this._avgLocalFPS.reset(), this._avgLocalScreenFPS.reset(), this._avgCQ.reset(), this._sampleIdx = 0;
} }, { key: "dispose", value: function value() {
this._conference.off(a.P2P_STATUS, this._onP2PStatusChanged), this._conference.off(o.LOCAL_STATS_UPDATED, this._onLocalStatsUpdated), this._conference.off(a.JVB121_STATUS, this._onJvb121StatusChanged), this.jvbStatsMonitor.dispose(), this.p2pStatsMonitor.dispose();
} }]), e;
}();t.a = m;
}).call(t, "modules/statistics/AvgRTPStatsReporter.js");
}, function (e, t, n) {
"use strict";
(function (e) {
function r(e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
}var i = function () {
function e(e, t) {
for (var n = 0; n < t.length; n++) {
var r = t[n];r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
}
}return function (t, n, r) {
return n && e(t.prototype, n), r && e(t, r), t;
};
}(),
o = n(0).getLogger(e),
a = n(3),
s = n(80),
c = n(167),
u = { createOffer: "createOffer", createAnswer: "createAnswer", setLocalDescription: "setLocalDescription", setRemoteDescription: "setRemoteDescription", addIceCandidate: "addIceCandidate", getUserMedia: "getUserMedia", iceConnectionFailure: "iceConnectionFailure", signalingError: "signalingError", applicationLog: "applicationLog" },
l = { fabricHold: "fabricHold", fabricResume: "fabricResume", audioMute: "audioMute", audioUnmute: "audioUnmute", videoPause: "videoPause", videoResume: "videoResume", fabricUsageEvent: "fabricUsageEvent", fabricStats: "fabricStats", fabricTerminated: "fabricTerminated", screenShareStart: "screenShareStart", screenShareStop: "screenShareStop", dominantSpeaker: "dominantSpeaker", activeDeviceList: "activeDeviceList" },
d = "jitsi",
p = { ERROR: "error", EVENT: "event", MST_WITH_USERID: "mstWithUserID" },
f = void 0,
h = function () {
function e(t, n) {
if (r(this, e), !e.backend) throw new Error("CallStats backend not intiialized!");this.confID = n.confID, this.tpc = t, this.peerconnection = t.peerconnection, this.remoteUserID = n.remoteUserID || d, this.hasFabric = !1, e.fabrics.add(this), e.initialized && this._addNewFabric();
}return i(e, null, [{ key: "_addNewFabricCallback", value: function value(t, n) {
e.backend && "success" !== t && o.error("Monitoring status: " + t + " msg: " + n);
} }, { key: "_initCallback", value: function value(t, n) {
if (o.log("CallStats Status: err=" + t + " msg=" + n), "success" === t) {
var r = !1,
i = null,
a = !0,
s = !1,
c = void 0;try {
for (var u, l = e.fabrics.values()[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(a = (u = l.next()).done); a = !0) {
var d = u.value;d.hasFabric || (o.debug("addNewFabric - initCallback"), d._addNewFabric() && (r = !0, i || (i = d)));
}
} catch (e) {
s = !0, c = e;
} finally {
try {
!a && l.return && l.return();
} finally {
if (s) throw c;
}
}if (r) {
e.initialized = !0;var f = i.confID,
h = i.peerconnection,
m = !0,
v = !1,
g = void 0;try {
for (var y, b = e.reportsQueue[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(m = (y = b.next()).done); m = !0) {
var S = y.value;if (S.type === p.ERROR) {
var E = S.data;e._reportError(i, E.type, E.error, E.pc || h);
} else if (S.type === p.EVENT) {
var T = S.data;e.backend.sendFabricEvent(S.pc || h, T.event, f, T.eventData);
} else if (S.type === p.MST_WITH_USERID) {
var _ = S.data;e.backend.associateMstWithUserID(S.pc || h, _.callStatsId, f, _.ssrc, _.usageLabel, _.containerId);
}
}
} catch (e) {
v = !0, g = e;
} finally {
try {
!m && b.return && b.return();
} finally {
if (v) throw g;
}
}e.reportsQueue.length = 0;
}
}
} }, { key: "_reportError", value: function value(t, n, r, i) {
var a = r;a || (o.warn("No error is passed!"), a = new Error("Unknown error")), e.initialized && t ? e.backend.reportError(i, t.confID, n, a) : e.reportsQueue.push({ type: p.ERROR, data: { error: a, pc: i, type: n } });
} }, { key: "_reportEvent", value: function value(t, n, r) {
var i = t && t.peerconnection,
o = t && t.confID;e.initialized && t ? e.backend.sendFabricEvent(i, n, o, r) : e.reportsQueue.push({ confID: o, pc: i, type: p.EVENT, data: { event: n, eventData: r } });
} }, { key: "_traceAndCatchBackendCalls", value: function value(e) {
var t = ["associateMstWithUserID", "sendFabricEvent", "sendUserFeedback"],
n = !0,
r = !1,
i = void 0;try {
for (var s, c = t[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(n = (s = c.next()).done); n = !0) {
!function () {
var t = s.value,
n = e[t];e[t] = function () {
try {
for (var t = arguments.length, r = Array(t), i = 0; i < t; i++) {
r[i] = arguments[i];
}return n.apply(e, r);
} catch (e) {
a.callErrorHandler(e);
}
};
}();
}
} catch (e) {
r = !0, i = e;
} finally {
try {
!n && c.return && c.return();
} finally {
if (r) throw i;
}
}var l = ["associateMstWithUserID", "sendFabricEvent", "sendUserFeedback"],
d = !0,
p = !1,
f = void 0;try {
for (var h, m = l[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(d = (h = m.next()).done); d = !0) {
!function () {
var t = h.value,
n = e[t];e[t] = function () {
for (var r = arguments.length, i = Array(r), a = 0; a < r; a++) {
i[a] = arguments[a];
}o.debug(t, i), n.apply(e, i);
};
}();
}
} catch (e) {
p = !0, f = e;
} finally {
try {
!d && m.return && m.return();
} finally {
if (p) throw f;
}
}var v = e.reportError;e.reportError = function (t, n, r) {
for (var i = arguments.length, s = Array(i > 3 ? i - 3 : 0), c = 3; c < i; c++) {
s[c - 3] = arguments[c];
}r === u.applicationLog ? console && console.debug("reportError", t, n, r) : o.debug.apply(o, ["reportError", t, n, r].concat(s));try {
v.call.apply(v, [e, t, n, r].concat(s));
} catch (e) {
r === u.applicationLog ? console && console.error("reportError", e) : a.callErrorHandler(e);
}
};
} }, { key: "initBackend", value: function value(t) {
if (e.backend) throw new Error("CallStats backend has been initialized already!");try {
return e.backend = new callstats($, c, s), e._traceAndCatchBackendCalls(e.backend), e.userID = { aliasName: t.aliasName, userName: t.userName }, e.callStatsID = t.callStatsID, e.callStatsSecret = t.callStatsSecret, e.backend.initialize(e.callStatsID, e.callStatsSecret, e.userID, e._initCallback), !0;
} catch (t) {
return a.callErrorHandler(t), e.backend = null, o.error(t), !1;
}
} }, { key: "isBackendInitialized", value: function value() {
return Boolean(e.backend);
} }, { key: "sendActiveDeviceListEvent", value: function value(t, n) {
e._reportEvent(n, l.activeDeviceList, t);
} }, { key: "sendApplicationLog", value: function value(t, n) {
try {
e._reportError(n, u.applicationLog, t, n && n.peerconnection);
} catch (e) {
console && "function" == typeof console.error && console.error("sendApplicationLog failed", e);
}
} }, { key: "sendFeedback", value: function value(t, n, r) {
e.backend ? e.backend.sendUserFeedback(t, { userID: e.userID, overall: n, comment: r }) : o.error("Failed to submit feedback to CallStats - no backend");
} }, { key: "sendGetUserMediaFailed", value: function value(t, n) {
e._reportError(n, u.getUserMedia, t, null);
} }, { key: "sendMuteEvent", value: function value(t, n, r) {
var i = void 0;i = "video" === n ? t ? l.videoPause : l.videoResume : t ? l.audioMute : l.audioUnmute, e._reportEvent(r, i);
} }, { key: "fabrics", get: function get() {
return f || (f = new Set()), f;
} }]), i(e, [{ key: "_addNewFabric", value: function value() {
o.info("addNewFabric", this.remoteUserID, this);try {
var t = e.backend.addNewFabric(this.peerconnection, this.remoteUserID, e.backend.fabricUsage.multiplex, this.confID, e._addNewFabricCallback);this.hasFabric = !0;var n = "success" === t.status;return n || o.error("callstats fabric not initilized", t.message), n;
} catch (e) {
return a.callErrorHandler(e), !1;
}
} }, { key: "associateStreamWithVideoTag", value: function value(t, n, r, i, o) {
if (e.backend) {
var a = n ? e.userID : r;e.initialized ? e.backend.associateMstWithUserID(this.peerconnection, a, this.confID, t, i, o) : e.reportsQueue.push({ type: p.MST_WITH_USERID, pc: this.peerconnection, data: { callStatsId: a, containerId: o, ssrc: t, usageLabel: i } });
}
} }, { key: "sendDominantSpeakerEvent", value: function value() {
e._reportEvent(this, l.dominantSpeaker);
} }, { key: "sendTerminateEvent", value: function value() {
e.initialized && e.backend.sendFabricEvent(this.peerconnection, e.backend.fabricEvent.fabricTerminated, this.confID), e.fabrics.delete(this);
} }, { key: "sendIceConnectionFailedEvent", value: function value() {
e._reportError(this, u.iceConnectionFailure, null, this.peerconnection);
} }, { key: "sendCreateOfferFailed", value: function value(t) {
e._reportError(this, u.createOffer, t, this.peerconnection);
} }, { key: "sendCreateAnswerFailed", value: function value(t) {
e._reportError(this, u.createAnswer, t, this.peerconnection);
} }, { key: "sendResumeOrHoldEvent", value: function value(t) {
e._reportEvent(this, t ? l.fabricResume : l.fabricHold);
} }, { key: "sendScreenSharingEvent", value: function value(t) {
e._reportEvent(this, t ? l.screenShareStart : l.screenShareStop);
} }, { key: "sendSetLocalDescFailed", value: function value(t) {
e._reportError(this, u.setLocalDescription, t, this.peerconnection);
} }, { key: "sendSetRemoteDescFailed", value: function value(t) {
e._reportError(this, u.setRemoteDescription, t, this.peerconnection);
} }, { key: "sendAddIceCandidateFailed", value: function value(t) {
e._reportError(this, u.addIceCandidate, t, this.peerconnection);
} }]), e;
}();t.a = h, h.backend = null, h.reportsQueue = [], h.initialized = !1, h.callStatsID = null, h.callStatsSecret = null, h.userID = null;
}).call(t, "modules/statistics/CallStats.js");
}, function (e, t, n) {
"use strict";
(function (e) {
function r(e, t) {
return !t || t <= 0 || !e || e <= 0 ? 0 : Math.round(e / t * 100);
}function i() {
this.loss = {}, this.bitrate = { download: 0, upload: 0 }, this.resolution = {}, this.framerate = 0;
}function o() {
this.bandwidth = {}, this.bitrate = {}, this.packetLoss = null, this.transport = [];
}function a(e, t, n, r) {
this._browserType = s.a.getBrowserType();var i = f[this._browserType];if (!i) throw "The browser type '" + this._browserType + "' isn't supported!";this._getStatValue = this._defineGetStatValueMethod(i), this.peerconnection = e, this.baselineAudioLevelsReport = null, this.currentAudioLevelsReport = null, this.currentStatsReport = null, this.previousStatsReport = null, this.audioLevelsIntervalId = null, this.eventEmitter = r, this.conferenceStats = new o(), this.audioLevelsIntervalMilis = t, this.statsIntervalId = null, this.statsIntervalMilis = n, this.ssrc2stats = new Map();
}t.a = a;var s = n(2),
c = n(55),
u = function () {
function e(e, t) {
var n = [],
r = !0,
i = !1,
o = void 0;try {
for (var a, s = e[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(r = (a = s.next()).done) && (n.push(a.value), !t || n.length !== t); r = !0) {}
} catch (e) {
i = !0, o = e;
} finally {
try {
!r && s.return && s.return();
} finally {
if (i) throw o;
}
}return n;
}return function (t, n) {
if (Array.isArray(t)) return t;if ((typeof Symbol === "function" ? Symbol.iterator : "@@iterator") in Object(t)) return e(t, n);throw new TypeError("Invalid attempt to destructure non-iterable instance");
};
}(),
l = n(3),
d = n(0).getLogger(e),
p = s.a.isChrome() || s.a.isOpera() || s.a.isFirefox() || s.a.isNWJS() || s.a.isElectron() || s.a.isTemasysPluginUsed() || s.a.isEdge(),
f = {};f[s.a.RTC_BROWSER_FIREFOX] = { ssrc: "ssrc", packetsReceived: "packetsReceived", packetsLost: "packetsLost", packetsSent: "packetsSent", bytesReceived: "bytesReceived", bytesSent: "bytesSent", framerateMean: "framerateMean" }, f[s.a.RTC_BROWSER_CHROME] = { receiveBandwidth: "googAvailableReceiveBandwidth", sendBandwidth: "googAvailableSendBandwidth", remoteAddress: "googRemoteAddress", transportType: "googTransportType", localAddress: "googLocalAddress", activeConnection: "googActiveConnection", ssrc: "ssrc", packetsReceived: "packetsReceived", packetsSent: "packetsSent", packetsLost: "packetsLost", bytesReceived: "bytesReceived", bytesSent: "bytesSent", googFrameHeightReceived: "googFrameHeightReceived", googFrameWidthReceived: "googFrameWidthReceived", googFrameHeightSent: "googFrameHeightSent", googFrameWidthSent: "googFrameWidthSent", googFrameRateReceived: "googFrameRateReceived", googFrameRateSent: "googFrameRateSent", audioInputLevel: "audioInputLevel", audioOutputLevel: "audioOutputLevel", currentRoundTripTime: "googRtt", remoteCandidateType: "googRemoteCandidateType", localCandidateType: "googLocalCandidateType" }, f[s.a.RTC_BROWSER_EDGE] = { sendBandwidth: "googAvailableSendBandwidth", remoteAddress: "remoteAddress", transportType: "protocol", localAddress: "localAddress", activeConnection: "activeConnection", ssrc: "ssrc", packetsReceived: "packetsReceived", packetsSent: "packetsSent", packetsLost: "packetsLost", bytesReceived: "bytesReceived", bytesSent: "bytesSent", googFrameHeightReceived: "frameHeight", googFrameWidthReceived: "frameWidth", googFrameHeightSent: "frameHeight", googFrameWidthSent: "frameWidth", googFrameRateReceived: "framesPerSecond", googFrameRateSent: "framesPerSecond", audioInputLevel: "audioLevel", audioOutputLevel: "audioLevel", currentRoundTripTime: "roundTripTime" }, f[s.a.RTC_BROWSER_OPERA] = f[s.a.RTC_BROWSER_CHROME], f[s.a.RTC_BROWSER_NWJS] = f[s.a.RTC_BROWSER_CHROME], f[s.a.RTC_BROWSER_ELECTRON] = f[s.a.RTC_BROWSER_CHROME], f[s.a.RTC_BROWSER_IEXPLORER] = f[s.a.RTC_BROWSER_CHROME], f[s.a.RTC_BROWSER_SAFARI] = f[s.a.RTC_BROWSER_CHROME], f[s.a.RTC_BROWSER_REACT_NATIVE] = f[s.a.RTC_BROWSER_CHROME], i.prototype.setLoss = function (e) {
this.loss = e || {};
}, i.prototype.setResolution = function (e) {
this.resolution = e || {};
}, i.prototype.addBitrate = function (e) {
this.bitrate.download += e.download, this.bitrate.upload += e.upload;
}, i.prototype.resetBitrate = function () {
this.bitrate.download = 0, this.bitrate.upload = 0;
}, i.prototype.setFramerate = function (e) {
this.framerate = e || 0;
}, a.prototype.stop = function () {
this.audioLevelsIntervalId && (clearInterval(this.audioLevelsIntervalId), this.audioLevelsIntervalId = null), this.statsIntervalId && (clearInterval(this.statsIntervalId), this.statsIntervalId = null);
}, a.prototype.errorCallback = function (e) {
l.callErrorHandler(e), d.error("Get stats error", e), this.stop();
}, a.prototype.start = function (e) {
var t = this;e && (this.audioLevelsIntervalId = setInterval(function () {
t.peerconnection.getStats(function (e) {
var n = null;n = e && e.result && "function" == typeof e.result ? e.result() : e, t.currentAudioLevelsReport = n, t.processAudioLevelReport(), t.baselineAudioLevelsReport = t.currentAudioLevelsReport;
}, t.errorCallback);
}, t.audioLevelsIntervalMilis)), p && (this.statsIntervalId = setInterval(function () {
t.peerconnection.getStats(function (e) {
var n = null;n = e && e.result && "function" == typeof e.result ? e.result() : e, t.currentStatsReport = n;try {
t.processStatsReport();
} catch (e) {
l.callErrorHandler(e), d.error("Unsupported key:" + e, e);
}t.previousStatsReport = t.currentStatsReport;
}, t.errorCallback);
}, t.statsIntervalMilis));
}, a.prototype._defineGetStatValueMethod = function (e) {
var t = function t(_t3) {
var n = e[_t3];if (n) return n;throw "The property '" + _t3 + "' isn't supported!";
},
n = void 0;switch (this._browserType) {case s.a.RTC_BROWSER_CHROME:case s.a.RTC_BROWSER_OPERA:case s.a.RTC_BROWSER_NWJS:case s.a.RTC_BROWSER_ELECTRON:
n = function n(e, t) {
return e.stat(t);
};break;case s.a.RTC_BROWSER_REACT_NATIVE:
n = function n(e, t) {
var n = void 0;return e.values.some(function (e) {
return !!e.hasOwnProperty(t) && (n = e[t], !0);
}), n;
};break;case s.a.RTC_BROWSER_EDGE:
n = function n(e, t) {
return e[t];
};break;default:
n = function n(e, t) {
return e[t];
};}return function (e, r) {
return n(e, t(r));
};
}, a.prototype.getNonNegativeStat = function (e, t) {
var n = this._getStatValue(e, t);return "number" != typeof n && (n = Number(n)), isNaN(n) ? 0 : Math.max(0, n);
}, a.prototype.processStatsReport = function () {
var e = this;if (this.previousStatsReport) {
var t = this._getStatValue,
n = {};for (var o in this.currentStatsReport) {
if (this.currentStatsReport.hasOwnProperty(o)) {
var a = this.currentStatsReport[o];if (a) {
try {
var l = t(a, "receiveBandwidth"),
p = t(a, "sendBandwidth");(l || p) && (this.conferenceStats.bandwidth = { download: Math.round(l / 1e3), upload: Math.round(p / 1e3) });
} catch (e) {}if ("googCandidatePair" === a.type) {
var f = function () {
var n = void 0,
r = void 0,
i = void 0,
o = void 0,
s = void 0,
c = void 0,
u = void 0;try {
if (!(n = t(a, "activeConnection"))) return "continue";r = t(a, "remoteAddress"), u = t(a, "transportType"), o = t(a, "localAddress"), i = t(a, "localCandidateType"), s = t(a, "remoteCandidateType"), c = e.getNonNegativeStat(a, "currentRoundTripTime");
} catch (e) {}if (!r || !u || !o || "true" !== n) return "continue";var l = e.conferenceStats.transport;return l.some(function (e) {
return e.ip === r && e.type === u && e.localip === o;
}) || l.push({ ip: r, type: u, localip: o, p2p: e.peerconnection.isP2P, localCandidateType: i, remoteCandidateType: s, rtt: c }), "continue";
}();if ("continue" === f) continue;
}if ("candidatepair" === a.type) {
if ("succeeded" !== a.state) continue;var h = this.currentStatsReport[a.localCandidateId],
m = this.currentStatsReport[a.remoteCandidateId];this.conferenceStats.transport.push({ ip: m.ipAddress + ":" + m.portNumber, type: h.transport, localip: h.ipAddress + ":" + h.portNumber, p2p: this.peerconnection.isP2P, localCandidateType: h.candidateType, remoteCandidateType: m.candidateType });
}if ("transportdiagnostics" === a.msType && this.conferenceStats.transport.push({ ip: a.remoteAddress, type: a.protocol, localip: a.localAddress, p2p: this.peerconnection.isP2P }), ("ssrc" === a.type || "outboundrtp" === a.type || "inboundrtp" === a.type || "track" === a.type) && (!s.a.isEdge() || "inboundrtp" !== a.type && "outboundrtp" !== a.type)) {
var v = this.previousStatsReport[o],
g = this.getNonNegativeStat(a, "ssrc");if ("track" === a.type && Array.isArray(a.ssrcIds) && (g = Number(a.ssrcIds[0])), v && g && (s.a.isEdge() || !0 !== a.isRemote && !0 !== a.remoteSource)) {
var y = this.ssrc2stats.get(g);y || (y = new i(), this.ssrc2stats.set(g, y));var b = !0,
S = "packetsReceived",
E = t(a, S);void 0 !== E && null !== E && "" !== E || (b = !1, S = "packetsSent", void 0 !== (E = t(a, S)) && null !== E || d.warn("No packetsReceived nor packetsSent stat found")), (!E || E < 0) && (E = 0);var T = this.getNonNegativeStat(v, S),
_ = Math.max(0, E - T),
C = this.getNonNegativeStat(a, "packetsLost"),
w = this.getNonNegativeStat(v, "packetsLost"),
R = Math.max(0, C - w);y.setLoss({ packetsTotal: _ + R, packetsLost: R, isDownloadStream: b });var k = this.getNonNegativeStat(a, "bytesReceived"),
A = this.getNonNegativeStat(v, "bytesReceived"),
I = Math.max(0, k - A),
P = 0,
O = t(a, "bytesSent");"number" != typeof O && "string" != typeof O || (O = Number(O), isNaN(O) || (n[g] = O, O > 0 && (P = O - t(v, "bytesSent")))), P = Math.max(0, P);var D = a.timestamp - v.timestamp,
L = 0,
N = 0;D > 0 && (L = Math.round(8 * I / D), N = Math.round(8 * P / D)), y.addBitrate({ download: L, upload: N });var M = { height: null, width: null };try {
var x = void 0,
j = void 0;(x = t(a, "googFrameHeightReceived")) && (j = t(a, "googFrameWidthReceived")) ? (M.height = x, M.width = j) : (x = t(a, "googFrameHeightSent")) && (j = t(a, "googFrameWidthSent")) && (M.height = x, M.width = j);
} catch (e) {}var F = void 0;try {
F = t(a, "googFrameRateReceived") || t(a, "googFrameRateSent") || 0;
} catch (e) {
try {
F = this.getNonNegativeStat(a, "framerateMean");
} catch (e) {}
}y.setFramerate(Math.round(F || 0)), M.height && M.width ? y.setResolution(M) : y.setResolution(null);
}
}
}
}
}var U = { download: 0, upload: 0 },
B = { download: 0, upload: 0 },
J = 0,
G = 0,
H = {},
V = {},
W = 0,
K = 0,
q = 0,
z = 0,
$ = !0,
X = !1,
Q = void 0;try {
for (var Y, Z = this.ssrc2stats[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !($ = (Y = Z.next()).done); $ = !0) {
var ee = u(Y.value, 2),
te = ee[0],
ne = ee[1],
re = ne.loss,
ie = re.isDownloadStream ? "download" : "upload";U[ie] += re.packetsTotal, B[ie] += re.packetsLost, J += ne.bitrate.download, G += ne.bitrate.upload;var oe = this.peerconnection.getTrackBySSRC(te);if (oe) {
oe.isAudioTrack() ? (W += ne.bitrate.download, K += ne.bitrate.upload) : (q += ne.bitrate.download, z += ne.bitrate.upload);var ae = oe.getParticipantId();if (ae) {
var se = ne.resolution;if (se.width && se.height && -1 !== se.width && -1 !== se.height) {
var ce = H[ae] || {};ce[te] = se, H[ae] = ce;
}if (0 !== ne.framerate) {
var ue = V[ae] || {};ue[te] = ne.framerate, V[ae] = ue;
}
} else d.error("No participant ID returned by " + oe);
} else this.peerconnection.isP2P && d.error("JitsiTrack not found for SSRC " + te + " in " + this.peerconnection);ne.resetBitrate();
}
} catch (e) {
X = !0, Q = e;
} finally {
try {
!$ && Z.return && Z.return();
} finally {
if (X) throw Q;
}
}this.eventEmitter.emit(c.d, this.peerconnection, n), this.conferenceStats.bitrate = { upload: G, download: J }, this.conferenceStats.bitrate.audio = { upload: K, download: W }, this.conferenceStats.bitrate.video = { upload: z, download: q }, this.conferenceStats.packetLoss = { total: r(B.download + B.upload, U.download + U.upload), download: r(B.download, U.download), upload: r(B.upload, U.upload) }, this.eventEmitter.emit(c.c, this.peerconnection, { bandwidth: this.conferenceStats.bandwidth, bitrate: this.conferenceStats.bitrate, packetLoss: this.conferenceStats.packetLoss, resolution: H, framerate: V, transport: this.conferenceStats.transport }), this.conferenceStats.transport = [];
}
}, a.prototype.processAudioLevelReport = function () {
if (this.baselineAudioLevelsReport) {
var e = this._getStatValue;for (var t in this.currentAudioLevelsReport) {
if (this.currentAudioLevelsReport.hasOwnProperty(t)) {
var n = this.currentAudioLevelsReport[t];if ("ssrc" === n.type || "track" === n.type) {
var r = this.baselineAudioLevelsReport[t],
i = this.getNonNegativeStat(n, "ssrc");if (!i && Array.isArray(n.ssrcIds) && (i = Number(n.ssrcIds[0])), r) {
if (i) {
var o = void 0;try {
o = e(n, "audioInputLevel") || e(n, "audioOutputLevel");
} catch (e) {
return d.warn("Audio Levels are not available in the statistics."), void clearInterval(this.audioLevelsIntervalId);
}if (o) {
var a = void 0;a = "ssrc" === n.type ? !e(n, "packetsReceived") : !n.remoteSource, s.a.isEdge() ? o = o < 0 ? Math.pow(10, o / 20) : 0 : o /= 32767, this.eventEmitter.emit(c.a, this.peerconnection, i, o, a);
}
} else Date.now() - n.timestamp < 3e3 && d.warn("No ssrc: ");
} else d.warn(i + " not enough data");
}
}
}
}
};
}).call(t, "modules/statistics/RTPStatsCollector.js");
}, function (e, t) {
function n(e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
}var r = function () {
function e(e, t) {
for (var n = 0; n < t.length; n++) {
var r = t[n];r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
}
}return function (t, n, r) {
return n && e(t.prototype, n), r && e(t, r), t;
};
}(),
i = function () {
function e(t, r, i) {
n(this, e), this._userId = t, this.setDisplayName(r), this._isLocalStats = i || !1, this.setIsDominantSpeaker(!1), this.totalDominantSpeakerTime = 0, this._dominantSpeakerStart = null, this._hasLeft = !1;
}return r(e, [{ key: "getUserId", value: function value() {
return this._userId;
} }, { key: "getDisplayName", value: function value() {
return this.displayName;
} }, { key: "setDisplayName", value: function value(e) {
this.displayName = e;
} }, { key: "isLocalStats", value: function value() {
return this._isLocalStats;
} }, { key: "isDominantSpeaker", value: function value() {
return this._isDominantSpeaker;
} }, { key: "setIsDominantSpeaker", value: function value(e) {
if (!this._isDominantSpeaker && e) this._dominantSpeakerStart = Date.now();else if (this._isDominantSpeaker && !e) {
var t = Date.now(),
n = t - (this._dominantSpeakerStart || 0);this.totalDominantSpeakerTime += n, this._dominantSpeakerStart = null;
}this._isDominantSpeaker = e;
} }, { key: "getTotalDominantSpeakerTime", value: function value() {
var e = this.totalDominantSpeakerTime;return this._isDominantSpeaker && (e += Date.now() - this._dominantSpeakerStart), e;
} }, { key: "hasLeft", value: function value() {
return this._hasLeft;
} }, { key: "markAsHasLeft", value: function value() {
this._hasLeft = !0, this.setIsDominantSpeaker(!1);
} }]), e;
}();e.exports = i;
}, function (e, t, n) {
"use strict";
function r(e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
}var i = n(5),
o = n(107),
a = n.n(o),
s = function () {
function e(e, t) {
for (var n = 0; n < t.length; n++) {
var r = t[n];r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
}
}return function (t, n, r) {
return n && e(t.prototype, n), r && e(t, r), t;
};
}(),
c = function () {
function e(t) {
r(this, e), this.stats = { users: {}, dominantSpeakerId: null };var n = t.myUserId();this.stats.users[n] = new a.a(n, null, !0), t.addEventListener(i.DOMINANT_SPEAKER_CHANGED, this._onDominantSpeaker.bind(this)), t.addEventListener(i.USER_JOINED, this._onUserJoin.bind(this)), t.addEventListener(i.USER_LEFT, this._onUserLeave.bind(this)), t.addEventListener(i.DISPLAY_NAME_CHANGED, this._onDisplayNameChange.bind(this));
}return s(e, [{ key: "_onDominantSpeaker", value: function value(e) {
var t = this.stats.users[this.stats.dominantSpeakerId],
n = this.stats.users[e];t && t.setIsDominantSpeaker(!1), n && n.setIsDominantSpeaker(!0), this.stats.dominantSpeakerId = e;
} }, { key: "_onUserJoin", value: function value(e, t) {
var n = this.stats.users[e];n || (n = this.stats.users[e] = new a.a(e, t.getDisplayName()));
} }, { key: "_onUserLeave", value: function value(e) {
var t = this.stats.users[e];t && t.markAsHasLeft();
} }, { key: "_onDisplayNameChange", value: function value(e, t) {
var n = this.stats.users[e];n && n.setDisplayName(t);
} }, { key: "getStats", value: function value() {
return this.stats.users;
} }]), e;
}();t.a = c;
}, function (e, t) {
var n = function n(e, t, _n2, r) {
this.blob = e, this.name = t, this.startTime = _n2, this.wordArray = r;
};e.exports = n;
}, function (e, t, n) {
function r() {
this.audioRecorder = new s(), this.transcriptionService = new c(), this.counter = null, this.startTime = null, this.transcription = null, this.callback = null, this.results = [], this.state = u, this.lineLength = 0;
}function i(e, t) {
if (console.log("retrieved an answer from the transcription service. The answer has an array of length: " + t.wordArray.length), t.wordArray.length > 0) {
var n = t.startTime.getUTCMilliseconds() - e.startTime.getUTCMilliseconds();n < 0 && (n = 0);var r = "[";t.wordArray.forEach(function (e) {
e.begin += n, e.end += n, r += e.word + ",";
}), r += "]", console.log(r), t.wordArray.name = t.name;
}e.results.push(t.wordArray), e.counter--, console.log("current counter: " + e.counter), e.maybeMerge();
}function o(e) {
for (var t = 0; t < e.length; t++) {
0 === e[t].length && e.splice(t, 1);
}return e.length > 0;
}function a(e, t) {
if (0 === e.length) e.push(t);else {
if (e[e.length - 1].begin <= t.begin) return void e.push(t);for (var n = 0; n < e.length; n++) {
if (t.begin < e[n].begin) return void e.splice(n, 0, t);
}e.push(t);
}
}var s = n(48),
c = n(112),
u = "before";r.prototype.start = function () {
if (this.state !== u) throw new Error("The transcription can only start when it's in the \"" + u + '" state. It\'s currently in the "' + this.state + '" state');this.state = "recording", this.audioRecorder.start(), this.startTime = new Date();
}, r.prototype.stop = function (e) {
var t = this;if ("recording" !== this.state) throw new Error('The transcription can only stop when it\'s in the "recording" state. It\'s currently in the "' + this.state + '" state');console.log("stopping recording and sending audio files"), this.audioRecorder.stop();var n = i.bind(null, this);this.audioRecorder.getRecordingResults().forEach(function (e) {
t.transcriptionService.send(e, n), t.counter++;
}), this.state = "transcribing", this.callback = e;
}, r.prototype.maybeMerge = function () {
"transcribing" === this.state && 0 === this.counter && this.merge();
}, r.prototype.merge = function () {
var e = this;console.log("starting merge process!\n The length of the array: " + this.results.length), this.transcription = "";var t = this.results,
n = [];for (o(t), t.forEach(function (e) {
return a(n, e);
}); o(t);) {
!function () {
var n = t[0];t.forEach(function (e) {
e[0].begin < n[0].begin && (n = e);
});var r = n.shift();for (e.updateTranscription(r, n.name); n.length > 0 && "break" !== function () {
var i = !1,
o = n[0].begin;if (t.forEach(function (e) {
e[0].begin < o && (i = !0);
}), i) return "break";r = n.shift(), e.updateTranscription(r, null);
}();) {}
}();
}this.state = "finished", this.callback && this.callback(this.transcription);
}, r.prototype.updateTranscription = function (e, t) {
void 0 !== t && null !== t && (this.transcription += "\n" + t + ":", this.lineLength = t.length + 1), this.lineLength + e.word.length > 80 && (this.transcription += "\n ", this.lineLength = 4), this.transcription += " " + e.word, this.lineLength += e.word.length + 1;
}, r.prototype.addTrack = function (e) {
this.audioRecorder.addTrack(e);
}, r.prototype.removeTrack = function (e) {
this.audioRecorder.removeTrack(e);
}, r.prototype.getTranscription = function () {
if ("finished" !== this.state) throw new Error('The transcription can only be retrieved when it\'s in the "finished" state. It\'s currently in the "' + this.state + '" state');return this.transcription;
}, r.prototype.getState = function () {
return this.state;
}, r.prototype.reset = function () {
this.state = u, this.counter = null, this.transcription = null, this.startTime = null, this.callback = null, this.results = [], this.lineLength = 0;
}, e.exports = r;
}, function (e, t) {
var n = function n() {
throw new Error("TranscriptionService is abstract and cannot becreated");
};n.prototype.send = function (e, t) {
var n = this;this.sendRequest(e.blob, function (r) {
n.verify(r) ? e.wordArray = n.formatResponse(r) : (console.log("the retrieved response from the server is not valid!"), e.wordArray = []), t(e);
});
}, n.prototype.sendRequest = function (e, t) {
throw new Error("TranscriptionService.sendRequest is abstract");
}, n.prototype.formatResponse = function (e) {
throw new Error("TranscriptionService.format is abstract");
}, n.prototype.verify = function (e) {
throw new Error("TranscriptionService.verify is abstract");
}, e.exports = n;
}, function (e, t, n) {
function r() {
var e = "config does not contain an url to a Sphinx4 https server";if (void 0 === config.sphinxURL) console.log(e);else {
var t = config.sphinxURL;if (void 0 !== t.includes && t.includes("https://")) return t;console.log(e);
}
}var i = n(111),
o = n(113),
a = n(48),
s = function s() {
this.url = r();
};s.prototype = Object.create(i.prototype), s.constructor = s, s.prototype.sendRequest = function (e, t) {
console.log("sending an audio file to " + this.url), console.log("the audio file being sent: " + e);var n = new XMLHttpRequest();n.onreadystatechange = function () {
if (n.readyState === XMLHttpRequest.DONE && 200 === n.status) t(n.responseText);else if (n.readyState === XMLHttpRequest.DONE) throw new Error("unable to accept response from sphinx server. status: " + n.status);
}, n.open("POST", this.url), n.setRequestHeader("Content-Type", a.determineCorrectFileType()), n.send(e), console.log("send " + e);
}, s.prototype.formatResponse = function (e) {
var t = JSON.parse(e).objects;t.shift();var n = [];return t.forEach(function (e) {
return e.filler || n.push(new o(e.word, e.start, e.end));
}), n;
}, s.prototype.verify = function (e) {
if (console.log("response from server:" + e.toString()), "string" != typeof e) return !1;var t = void 0;try {
t = JSON.parse(e);
} catch (e) {
return console.log(e), !1;
}if (void 0 === t.objects) return !1;var n = t.objects;return !(!n[0] || !n[0]["session-id"]);
}, e.exports = s;
}, function (e, t) {
var n = function n(e, t, _n3) {
this.word = e, this.begin = t, this.end = _n3;
};n.prototype.getWord = function () {
return this.word;
}, n.prototype.getBeginTime = function () {
return this.begin;
}, n.prototype.getEndTime = function () {
return this.end;
}, e.exports = n;
}, function (e, t) {
var n = { getTokenAuthUrl: function getTokenAuthUrl(e, t, n) {
var r = e;return "string" != typeof r ? null : r.replace("{room}", t).replace("{roleUpgrade}", !0 === n);
} };e.exports = n;
}, function (e, t) {
function n(e, t) {
if (!e || !t || "function" != typeof e.addListener || "function" != typeof t.emit) throw new Error("Invalid arguments passed to EventEmitterForwarder");this.src = e, this.dest = t;
}n.prototype.forward = function () {
for (var e = arguments.length, t = Array(e), n = 0; n < e; n++) {
t[n] = arguments[n];
}var r = t[0];t[0] = this.dest, this.src.addListener(r, Function.prototype.bind.apply(this.dest.emit, t));
}, e.exports = n;
}, function (e, t, n) {
function r() {
return i.randomElement(o) + "-" + i.randomAlphanumStr(3);
}var i = n(19),
o = ["Aaliyah", "Aaron", "Abagail", "Abbey", "Abbie", "Abbigail", "Abby", "Abdiel", "Abdul", "Abdullah", "Abe", "Abel", "Abelardo", "Abigail", "Abigale", "Abigayle", "Abner", "Abraham", "Ada", "Adah", "Adalberto", "Adaline", "Adam", "Adan", "Addie", "Addison", "Adela", "Adelbert", "Adele", "Adelia", "Adeline", "Adell", "Adella", "Adelle", "Aditya", "Adolf", "Adolfo", "Adolph", "Adolphus", "Adonis", "Adrain", "Adrian", "Adriana", "Adrianna", "Adriel", "Adrien", "Adrienne", "Afton", "Aglae", "Agnes", "Agustin", "Agustina", "Ahmad", "Ahmed", "Aida", "Aidan", "Aiden", "Aileen", "Aisha", "Aiyana", "Akeem", "Al", "Alaina", "Alan", "Alana", "Alanis", "Alanna", "Alayna", "Alba", "Albert", "Alberta", "Albertha", "Alberto", "Albin", "Albina", "Alda", "Alden", "Alec", "Aleen", "Alejandra", "Alejandrin", "Alek", "Alena", "Alene", "Alessandra", "Alessandro", "Alessia", "Aletha", "Alex", "Alexa", "Alexander", "Alexandra", "Alexandre", "Alexandrea", "Alexandria", "Alexandrine", "Alexandro", "Alexane", "Alexanne", "Alexie", "Alexis", "Alexys", "Alexzander", "Alf", "Alfonso", "Alfonzo", "Alford", "Alfred", "Alfreda", "Alfredo", "Ali", "Alia", "Alice", "Alicia", "Alisa", "Alisha", "Alison", "Alivia", "Aliya", "Aliyah", "Aliza", "Alize", "Allan", "Allen", "Allene", "Allie", "Allison", "Ally", "Alphonso", "Alta", "Althea", "Alva", "Alvah", "Alvena", "Alvera", "Alverta", "Alvina", "Alvis", "Alyce", "Alycia", "Alysa", "Alysha", "Alyson", "Alysson", "Amalia", "Amanda", "Amani", "Amara", "Amari", "Amaya", "Amber", "Ambrose", "Amelia", "Amelie", "Amely", "America", "Americo", "Amie", "Amina", "Amir", "Amira", "Amiya", "Amos", "Amparo", "Amy", "Amya", "Ana", "Anabel", "Anabelle", "Anahi", "Anais", "Anastacio", "Anastasia", "Anderson", "Andre", "Andreane", "Andreanne", "Andres", "Andrew", "Andy", "Angel", "Angela", "Angelica", "Angelina", "Angeline", "Angelita", "Angelo", "Angie", "Angus", "Anibal", "Anika", "Anissa", "Anita", "Aniya", "Aniyah", "Anjali", "Anna", "Annabel", "Annabell", "Annabelle", "Annalise", "Annamae", "Annamarie", "Anne", "Annetta", "Annette", "Annie", "Ansel", "Ansley", "Anthony", "Antoinette", "Antone", "Antonetta", "Antonette", "Antonia", "Antonietta", "Antonina", "Antonio", "Antwan", "Antwon", "Anya", "April", "Ara", "Araceli", "Aracely", "Arch", "Archibald", "Ardella", "Arden", "Ardith", "Arely", "Ari", "Ariane", "Arianna", "Aric", "Ariel", "Arielle", "Arjun", "Arlene", "Arlie", "Arlo", "Armand", "Armando", "Armani", "Arnaldo", "Arne", "Arno", "Arnold", "Arnoldo", "Arnulfo", "Aron", "Art", "Arthur", "Arturo", "Arvel", "Arvid", "Arvilla", "Aryanna", "Asa", "Asha", "Ashlee", "Ashleigh", "Ashley", "Ashly", "Ashlynn", "Ashton", "Ashtyn", "Asia", "Assunta", "Astrid", "Athena", "Aubree", "Aubrey", "Audie", "Audra", "Audreanne", "Audrey", "August", "Augusta", "Augustine", "Augustus", "Aurelia", "Aurelie", "Aurelio", "Aurore", "Austen", "Austin", "Austyn", "Autumn", "Ava", "Avery", "Avis", "Axel", "Ayana", "Ayden", "Ayla", "Aylin", "Baby", "Bailee", "Bailey", "Barbara", "Barney", "Baron", "Barrett", "Barry", "Bart", "Bartholome", "Barton", "Baylee", "Beatrice", "Beau", "Beaulah", "Bell", "Bella", "Belle", "Ben", "Benedict", "Benjamin", "Bennett", "Bennie", "Benny", "Benton", "Berenice", "Bernadette", "Bernadine", "Bernard", "Bernardo", "Berneice", "Bernhard", "Bernice", "Bernie", "Berniece", "Bernita", "Berry", "Bert", "Berta", "Bertha", "Bertram", "Bertrand", "Beryl", "Bessie", "Beth", "Bethany", "Bethel", "Betsy", "Bette", "Bettie", "Betty", "Bettye", "Beulah", "Beverly", "Bianka", "Bill", "Billie", "Billy", "Birdie", "Blair", "Blaise", "Blake", "Blanca", "Blanche", "Blaze", "Bo", "Bobbie", "Bobby", "Bonita", "Bonnie", "Boris", "Boyd", "Brad", "Braden", "Bradford", "Bradley", "Bradly", "Brady", "Braeden", "Brain", "Brandi", "Brando", "Brandon", "Brandt", "Brandy", "Brandyn", "Brannon", "Branson", "Brant", "Braulio", "Braxton", "Brayan", "Breana", "Breanna", "Breanne", "Brenda", "Brendan", "Brenden", "Brendon", "Brenna", "Brennan", "Brennon", "Brent", "Bret", "Brett", "Bria", "Brian", "Briana", "Brianne", "Brice", "Bridget", "Bridgette", "Bridie", "Brielle", "Brigitte", "Brionna", "Brisa", "Britney", "Brittany", "Brock", "Broderick", "Brody", "Brook", "Brooke", "Brooklyn", "Brooks", "Brown", "Bruce", "Bryana", "Bryce", "Brycen", "Bryon", "Buck", "Bud", "Buddy", "Buford", "Bulah", "Burdette", "Burley", "Burnice", "Buster", "Cade", "Caden", "Caesar", "Caitlyn", "Cale", "Caleb", "Caleigh", "Cali", "Calista", "Callie", "Camden", "Cameron", "Camila", "Camilla", "Camille", "Camren", "Camron", "Camryn", "Camylle", "Candace", "Candelario", "Candice", "Candida", "Candido", "Cara", "Carey", "Carissa", "Carlee", "Carleton", "Carley", "Carli", "Carlie", "Carlo", "Carlos", "Carlotta", "Carmel", "Carmela", "Carmella", "Carmelo", "Carmen", "Carmine", "Carol", "Carolanne", "Carole", "Carolina", "Caroline", "Carolyn", "Carolyne", "Carrie", "Carroll", "Carson", "Carter", "Cary", "Casandra", "Casey", "Casimer", "Casimir", "Casper", "Cassandra", "Cassandre", "Cassidy", "Cassie", "Catalina", "Caterina", "Catharine", "Catherine", "Cathrine", "Cathryn", "Cathy", "Cayla", "Ceasar", "Cecelia", "Cecil", "Cecile", "Cecilia", "Cedrick", "Celestine", "Celestino", "Celia", "Celine", "Cesar", "Chad", "Chadd", "Chadrick", "Chaim", "Chance", "Chandler", "Chanel", "Chanelle", "Charity", "Charlene", "Charles", "Charley", "Charlie", "Charlotte", "Chase", "Chasity", "Chauncey", "Chaya", "Chaz", "Chelsea", "Chelsey", "Chelsie", "Chesley", "Chester", "Chet", "Cheyanne", "Cheyenne", "Chloe", "Chris", "Christ", "Christa", "Christelle", "Christian", "Christiana", "Christina", "Christine", "Christop", "Christophe", "Christopher", "Christy", "Chyna", "Ciara", "Cicero", "Cielo", "Cierra", "Cindy", "Citlalli", "Clair", "Claire", "Clara", "Clarabelle", "Clare", "Clarissa", "Clark", "Claud", "Claude", "Claudia", "Claudie", "Claudine", "Clay", "Clemens", "Clement", "Clementina", "Clementine", "Clemmie", "Cleo", "Cleora", "Cleta", "Cletus", "Cleve", "Cleveland", "Clifford", "Clifton", "Clint", "Clinton", "Clotilde", "Clovis", "Cloyd", "Clyde", "Coby", "Cody", "Colby", "Cole", "Coleman", "Colin", "Colleen", "Collin", "Colt", "Colten", "Colton", "Columbus", "Concepcion", "Conner", "Connie", "Connor", "Conor", "Conrad", "Constance", "Constantin", "Consuelo", "Cooper", "Cora", "Coralie", "Corbin", "Cordelia", "Cordell", "Cordia", "Cordie", "Corene", "Corine", "Cornelius", "Cornell", "Corrine", "Cortez", "Cortney", "Cory", "Coty", "Courtney", "Coy", "Craig", "Crawford", "Creola", "Cristal", "Cristian", "Cristina", "Cristobal", "Cristopher", "Cruz", "Crystal", "Crystel", "Cullen", "Curt", "Curtis", "Cydney", "Cynthia", "Cyril", "Cyrus", "Dagmar", "Dahlia", "Daija", "Daisha", "Daisy", "Dakota", "Dale", "Dallas", "Dallin", "Dalton", "Damaris", "Dameon", "Damian", "Damien", "Damion", "Damon", "Dan", "Dana", "Dandre", "Dane", "D'angelo", "Dangelo", "Danial", "Daniela", "Daniella", "Danielle", "Danika", "Dannie", "Danny", "Dante", "Danyka", "Daphne", "Daphnee", "Daphney", "Darby", "Daren", "Darian", "Dariana", "Darien", "Dario", "Darion", "Darius", "Darlene", "Daron", "Darrel", "Darrell", "Darren", "Darrick", "Darrin", "Darrion", "Darron", "Darryl", "Darwin", "Daryl", "Dashawn", "Dasia", "Dave", "David", "Davin", "Davion", "Davon", "Davonte", "Dawn", "Dawson", "Dax", "Dayana", "Dayna", "Dayne", "Dayton", "Dean", "Deangelo", "Deanna", "Deborah", "Declan", "Dedric", "Dedrick", "Dee", "Deion", "Deja", "Dejah", "Dejon", "Dejuan", "Delaney", "Delbert", "Delfina", "Delia", "Delilah", "Dell", "Della", "Delmer", "Delores", "Delpha", "Delphia", "Delphine", "Delta", "Demarco", "Demarcus", "Demario", "Demetris", "Demetrius", "Demond", "Dena", "Denis", "Dennis", "Deon", "Deondre", "Deontae", "Deonte", "Dereck", "Derek", "Derick", "Deron", "Derrick", "Deshaun", "Deshawn", "Desiree", "Desmond", "Dessie", "Destany", "Destin", "Destinee", "Destiney", "Destini", "Destiny", "Devan", "Devante", "Deven", "Devin", "Devon", "Devonte", "Devyn", "Dewayne", "Dewitt", "Dexter", "Diamond", "Diana", "Dianna", "Diego", "Dillan", "Dillon", "Dimitri", "Dina", "Dino", "Dion", "Dixie", "Dock", "Dolly", "Dolores", "Domenic", "Domenica", "Domenick", "Domenico", "Domingo", "Dominic", "Dominique", "Don", "Donald", "Donato", "Donavon", "Donna", "Donnell", "Donnie", "Donny", "Dora", "Dorcas", "Dorian", "Doris", "Dorothea", "Dorothy", "Dorris", "Dortha", "Dorthy", "Doug", "Douglas", "Dovie", "Doyle", "Drake", "Drew", "Duane", "Dudley", "Dulce", "Duncan", "Durward", "Dustin", "Dusty", "Dwight", "Dylan", "Earl", "Earlene", "Earline", "Earnest", "Earnestine", "Easter", "Easton", "Ebba", "Ebony", "Ed", "Eda", "Edd", "Eddie", "Eden", "Edgar", "Edgardo", "Edison", "Edmond", "Edmund", "Edna", "Eduardo", "Edward", "Edwardo", "Edwin", "Edwina", "Edyth", "Edythe", "Effie", "Efrain", "Efren", "Eileen", "Einar", "Eino", "Eladio", "Elaina", "Elbert", "Elda", "Eldon", "Eldora", "Eldred", "Eldridge", "Eleanora", "Eleanore", "Eleazar", "Electa", "Elena", "Elenor", "Elenora", "Eleonore", "Elfrieda", "Eli", "Elian", "Eliane", "Elias", "Eliezer", "Elijah", "Elinor", "Elinore", "Elisa", "Elisabeth", "Elise", "Eliseo", "Elisha", "Elissa", "Eliza", "Elizabeth", "Ella", "Ellen", "Ellie", "Elliot", "Elliott", "Ellis", "Ellsworth", "Elmer", "Elmira", "Elmo", "Elmore", "Elna", "Elnora", "Elody", "Eloisa", "Eloise", "Elouise", "Eloy", "Elroy", "Elsa", "Else", "Elsie", "Elta", "Elton", "Elva", "Elvera", "Elvie", "Elvis", "Elwin", "Elwyn", "Elyse", "Elyssa", "Elza", "Emanuel", "Emelia", "Emelie", "Emely", "Emerald", "Emerson", "Emery", "Emie", "Emil", "Emile", "Emilia", "Emiliano", "Emilie", "Emilio", "Emily", "Emma", "Emmalee", "Emmanuel", "Emmanuelle", "Emmet", "Emmett", "Emmie", "Emmitt", "Emmy", "Emory", "Ena", "Enid", "Enoch", "Enola", "Enos", "Enrico", "Enrique", "Ephraim", "Era", "Eriberto", "Eric", "Erica", "Erich", "Erick", "Ericka", "Erik", "Erika", "Erin", "Erling", "Erna", "Ernest", "Ernestina", "Ernestine", "Ernesto", "Ernie", "Ervin", "Erwin", "Eryn", "Esmeralda", "Esperanza", "Esta", "Esteban", "Estefania", "Estel", "Estell", "Estella", "Estelle", "Estevan", "Esther", "Estrella", "Etha", "Ethan", "Ethel", "Ethelyn", "Ethyl", "Ettie", "Eudora", "Eugene", "Eugenia", "Eula", "Eulah", "Eulalia", "Euna", "Eunice", "Eusebio", "Eva", "Evalyn", "Evan", "Evangeline", "Evans", "Eve", "Eveline", "Evelyn", "Everardo", "Everett", "Everette", "Evert", "Evie", "Ewald", "Ewell", "Ezekiel", "Ezequiel", "Ezra", "Fabian", "Fabiola", "Fae", "Fannie", "Fanny", "Fatima", "Faustino", "Fausto", "Favian", "Fay", "Faye", "Federico", "Felicia", "Felicita", "Felicity", "Felipa", "Felipe", "Felix", "Felton", "Fermin", "Fern", "Fernando", "Ferne", "Fidel", "Filiberto", "Filomena", "Finn", "Fiona", "Flavie", "Flavio", "Fleta", "Fletcher", "Flo", "Florence", "Florencio", "Florian", "Florida", "Florine", "Flossie", "Floy", "Floyd", "Ford", "Forest", "Forrest", "Foster", "Frances", "Francesca", "Francesco", "Francis", "Francisca", "Francisco", "Franco", "Frank", "Frankie", "Franz", "Fred", "Freda", "Freddie", "Freddy", "Frederic", "Frederick", "Frederik", "Frederique", "Fredrick", "Fredy", "Freeda", "Freeman", "Freida", "Frida", "Frieda", "Friedrich", "Fritz", "Furman", "Gabe", "Gabriel", "Gabriella", "Gabrielle", "Gaetano", "Gage", "Gail", "Gardner", "Garett", "Garfield", "Garland", "Garnet", "Garnett", "Garret", "Garrett", "Garrick", "Garrison", "Garry", "Garth", "Gaston", "Gavin", "Gay", "Gayle", "Gaylord", "Gene", "General", "Genesis", "Genevieve", "Gennaro", "Genoveva", "Geo", "Geoffrey", "George", "Georgette", "Georgiana", "Georgianna", "Geovanni", "Geovanny", "Geovany", "Gerald", "Geraldine", "Gerard", "Gerardo", "Gerda", "Gerhard", "Germaine", "German", "Gerry", "Gerson", "Gertrude", "Gia", "Gianni", "Gideon", "Gilbert", "Gilberto", "Gilda", "Giles", "Gillian", "Gina", "Gino", "Giovani", "Giovanna", "Giovanni", "Giovanny", "Gisselle", "Giuseppe", "Gladyce", "Gladys", "Glen", "Glenda", "Glenna", "Glennie", "Gloria", "Godfrey", "Golda", "Golden", "Gonzalo", "Gordon", "Grace", "Gracie", "Graciela", "Grady", "Graham", "Grant", "Granville", "Grayce", "Grayson", "Green", "Greg", "Gregg", "Gregoria", "Gregorio", "Gregory", "Greta", "Gretchen", "Greyson", "Griffin", "Grover", "Guadalupe", "Gudrun", "Guido", "Guillermo", "Guiseppe", "Gunnar", "Gunner", "Gus", "Gussie", "Gust", "Gustave", "Guy", "Gwen", "Gwendolyn", "Hadley", "Hailee", "Hailey", "Hailie", "Hal", "Haleigh", "Haley", "Halie", "Halle", "Hallie", "Hank", "Hanna", "Hannah", "Hans", "Hardy", "Harley", "Harmon", "Harmony", "Harold", "Harrison", "Harry", "Harvey", "Haskell", "Hassan", "Hassie", "Hattie", "Haven", "Hayden", "Haylee", "Hayley", "Haylie", "Hazel", "Hazle", "Heath", "Heather", "Heaven", "Heber", "Hector", "Heidi", "Helen", "Helena", "Helene", "Helga", "Hellen", "Helmer", "Heloise", "Henderson", "Henri", "Henriette", "Henry", "Herbert", "Herman", "Hermann", "Hermina", "Herminia", "Herminio", "Hershel", "Herta", "Hertha", "Hester", "Hettie", "Hilario", "Hilbert", "Hilda", "Hildegard", "Hillard", "Hillary", "Hilma", "Hilton", "Hipolito", "Hiram", "Hobart", "Holden", "Hollie", "Hollis", "Holly", "Hope", "Horace", "Horacio", "Hortense", "Hosea", "Houston", "Howard", "Howell", "Hoyt", "Hubert", "Hudson", "Hugh", "Hulda", "Humberto", "Hunter", "Hyman", "Ian", "Ibrahim", "Icie", "Ida", "Idell", "Idella", "Ignacio", "Ignatius", "Ike", "Ila", "Ilene", "Iliana", "Ima", "Imani", "Imelda", "Immanuel", "Imogene", "Ines", "Irma", "Irving", "Irwin", "Isaac", "Isabel", "Isabell", "Isabella", "Isabelle", "Isac", "Isadore", "Isai", "Isaiah", "Isaias", "Isidro", "Ismael", "Isobel", "Isom", "Israel", "Issac", "Itzel", "Iva", "Ivah", "Ivory", "Ivy", "Izabella", "Izaiah", "Jabari", "Jace", "Jacey", "Jacinthe", "Jacinto", "Jack", "Jackeline", "Jackie", "Jacklyn", "Jackson", "Jacky", "Jaclyn", "Jacquelyn", "Jacques", "Jacynthe", "Jada", "Jade", "Jaden", "Jadon", "Jadyn", "Jaeden", "Jaida", "Jaiden", "Jailyn", "Jaime", "Jairo", "Jakayla", "Jake", "Jakob", "Jaleel", "Jalen", "Jalon", "Jalyn", "Jamaal", "Jamal", "Jamar", "Jamarcus", "Jamel", "Jameson", "Jamey", "Jamie", "Jamil", "Jamir", "Jamison", "Jammie", "Jan", "Jana", "Janae", "Jane", "Janelle", "Janessa", "Janet", "Janice", "Janick", "Janie", "Janis", "Janiya", "Jannie", "Jany", "Jaquan", "Jaquelin", "Jaqueline", "Jared", "Jaren", "Jarod", "Jaron", "Jarred", "Jarrell", "Jarret", "Jarrett", "Jarrod", "Jarvis", "Jasen", "Jasmin", "Jason", "Jasper", "Jaunita", "Javier", "Javon", "Javonte", "Jay", "Jayce", "Jaycee", "Jayda", "Jayde", "Jayden", "Jaydon", "Jaylan", "Jaylen", "Jaylin", "Jaylon", "Jayme", "Jayne", "Jayson", "Jazlyn", "Jazmin", "Jazmyn", "Jazmyne", "Jean", "Jeanette", "Jeanie", "Jeanne", "Jed", "Jedediah", "Jedidiah", "Jeff", "Jefferey", "Jeffery", "Jeffrey", "Jeffry", "Jena", "Jenifer", "Jennie", "Jennifer", "Jennings", "Jennyfer", "Jensen", "Jerad", "Jerald", "Jeramie", "Jeramy", "Jerel", "Jeremie", "Jeremy", "Jermain", "Jermaine", "Jermey", "Jerod", "Jerome", "Jeromy", "Jerrell", "Jerrod", "Jerrold", "Jerry", "Jess", "Jesse", "Jessica", "Jessie", "Jessika", "Jessy", "Jessyca", "Jesus", "Jett", "Jettie", "Jevon", "Jewel", "Jewell", "Jillian", "Jimmie", "Jimmy", "Jo", "Joan", "Joana", "Joanie", "Joanne", "Joannie", "Joanny", "Joany", "Joaquin", "Jocelyn", "Jodie", "Jody", "Joe", "Joel", "Joelle", "Joesph", "Joey", "Johan", "Johann", "Johanna", "Johathan", "John", "Johnathan", "Johnathon", "Johnnie", "Johnny", "Johnpaul", "Johnson", "Jolie", "Jon", "Jonas", "Jonatan", "Jonathan", "Jonathon", "Jordan", "Jordane", "Jordi", "Jordon", "Jordy", "Jordyn", "Jorge", "Jose", "Josefa", "Josefina", "Joseph", "Josephine", "Josh", "Joshua", "Joshuah", "Josiah", "Josiane", "Josianne", "Josie", "Josue", "Jovan", "Jovani", "Jovanny", "Jovany", "Joy", "Joyce", "Juana", "Juanita", "Judah", "Judd", "Jude", "Judge", "Judson", "Judy", "Jules", "Julia", "Julian", "Juliana", "Julianne", "Julie", "Julien", "Juliet", "Julio", "Julius", "June", "Junior", "Junius", "Justen", "Justice", "Justina", "Justine", "Juston", "Justus", "Justyn", "Juvenal", "Juwan", "Kacey", "Kaci", "Kacie", "Kade", "Kaden", "Kadin", "Kaela", "Kaelyn", "Kaia", "Kailee", "Kailey", "Kailyn", "Kaitlin", "Kaitlyn", "Kale", "Kaleb", "Kaleigh", "Kaley", "Kali", "Kallie", "Kameron", "Kamille", "Kamren", "Kamron", "Kamryn", "Kane", "Kara", "Kareem", "Karelle", "Karen", "Kari", "Kariane", "Karianne", "Karina", "Karine", "Karl", "Karlee", "Karley", "Karli", "Karlie", "Karolann", "Karson", "Kasandra", "Kasey", "Kassandra", "Katarina", "Katelin", "Katelyn", "Katelynn", "Katharina", "Katherine", "Katheryn", "Kathleen", "Kathlyn", "Kathryn", "Kathryne", "Katlyn", "Katlynn", "Katrina", "Katrine", "Kattie", "Kavon", "Kay", "Kaya", "Kaycee", "Kayden", "Kayla", "Kaylah", "Kaylee", "Kayleigh", "Kayley", "Kayli", "Kaylie", "Kaylin", "Keagan", "Keanu", "Keara", "Keaton", "Keegan", "Keeley", "Keely", "Keenan", "Keira", "Keith", "Kellen", "Kelley", "Kelli", "Kellie", "Kelly", "Kelsi", "Kelsie", "Kelton", "Kelvin", "Ken", "Kendall", "Kendra", "Kendrick", "Kenna", "Kennedi", "Kennedy", "Kenneth", "Kennith", "Kenny", "Kenton", "Kenya", "Kenyatta", "Kenyon", "Keon", "Keshaun", "Keshawn", "Keven", "Kevin", "Kevon", "Keyon", "Keyshawn", "Khalid", "Khalil", "Kian", "Kiana", "Kianna", "Kiara", "Kiarra", "Kiel", "Kiera", "Kieran", "Kiley", "Kim", "Kimberly", "King", "Kip", "Kira", "Kirk", "Kirsten", "Kirstin", "Kitty", "Kobe", "Koby", "Kody", "Kolby", "Kole", "Korbin", "Korey", "Kory", "Kraig", "Kris", "Krista", "Kristian", "Kristin", "Kristina", "Kristofer", "Kristoffer", "Kristopher", "Kristy", "Krystal", "Krystel", "Krystina", "Kurt", "Kurtis", "Kyla", "Kyle", "Kylee", "Kyleigh", "Kyler", "Kylie", "Kyra", "Lacey", "Lacy", "Ladarius", "Lafayette", "Laila", "Laisha", "Lamar", "Lambert", "Lamont", "Lance", "Landen", "Lane", "Laney", "Larissa", "Laron", "Larry", "Larue", "Laura", "Laurel", "Lauren", "Laurence", "Lauretta", "Lauriane", "Laurianne", "Laurie", "Laurine", "Laury", "Lauryn", "Lavada", "Lavern", "Laverna", "Laverne", "Lavina", "Lavinia", "Lavon", "Lavonne", "Lawrence", "Lawson", "Layla", "Layne", "Lazaro", "Lea", "Leann", "Leanna", "Leanne", "Leatha", "Leda", "Lee", "Leif", "Leila", "Leilani", "Lela", "Lelah", "Leland", "Lelia", "Lempi", "Lemuel", "Lenna", "Lennie", "Lenny", "Lenora", "Lenore", "Leo", "Leola", "Leon", "Leonard", "Leonardo", "Leone", "Leonel", "Leonie", "Leonor", "Leonora", "Leopold", "Leopoldo", "Leora", "Lera", "Lesley", "Leslie", "Lesly", "Lessie", "Lester", "Leta", "Letha", "Letitia", "Levi", "Lew", "Lewis", "Lexi", "Lexie", "Lexus", "Lia", "Liam", "Liana", "Libbie", "Libby", "Lila", "Lilian", "Liliana", "Liliane", "Lilla", "Lillian", "Lilliana", "Lillie", "Lilly", "Lily", "Lilyan", "Lina", "Lincoln", "Linda", "Lindsay", "Lindsey", "Linnea", "Linnie", "Linwood", "Lionel", "Lisa", "Lisandro", "Lisette", "Litzy", "Liza", "Lizeth", "Lizzie", "Llewellyn", "Lloyd", "Logan", "Lois", "Lola", "Lolita", "Loma", "Lon", "London", "Lonie", "Lonnie", "Lonny", "Lonzo", "Lora", "Loraine", "Loren", "Lorena", "Lorenz", "Lorenza", "Lorenzo", "Lori", "Lorine", "Lorna", "Lottie", "Lou", "Louie", "Louisa", "Lourdes", "Louvenia", "Lowell", "Loy", "Loyal", "Loyce", "Lucas", "Luciano", "Lucie", "Lucienne", "Lucile", "Lucinda", "Lucio", "Lucious", "Lucius", "Lucy", "Ludie", "Ludwig", "Lue", "Luella", "Luigi", "Luis", "Luisa", "Lukas", "Lula", "Lulu", "Luna", "Lupe", "Lura", "Lurline", "Luther", "Luz", "Lyda", "Lydia", "Lyla", "Lynn", "Lyric", "Lysanne", "Mabel", "Mabelle", "Mable", "Mac", "Macey", "Maci", "Macie", "Mack", "Mackenzie", "Macy", "Madaline", "Madalyn", "Maddison", "Madeline", "Madelyn", "Madelynn", "Madge", "Madie", "Madilyn", "Madisen", "Madison", "Madisyn", "Madonna", "Madyson", "Mae", "Maegan", "Maeve", "Mafalda", "Magali", "Magdalen", "Magdalena", "Maggie", "Magnolia", "Magnus", "Maia", "Maida", "Maiya", "Major", "Makayla", "Makenna", "Makenzie", "Malachi", "Malcolm", "Malika", "Malinda", "Mallie", "Mallory", "Malvina", "Mandy", "Manley", "Manuel", "Manuela", "Mara", "Marc", "Marcel", "Marcelina", "Marcelino", "Marcella", "Marcelle", "Marcellus", "Marcelo", "Marcia", "Marco", "Marcos", "Marcus", "Margaret", "Margarete", "Margarett", "Margaretta", "Margarette", "Margarita", "Marge", "Margie", "Margot", "Margret", "Marguerite", "Maria", "Mariah", "Mariam", "Marian", "Mariana", "Mariane", "Marianna", "Marianne", "Mariano", "Maribel", "Marie", "Mariela", "Marielle", "Marietta", "Marilie", "Marilou", "Marilyne", "Marina", "Mario", "Marion", "Marisa", "Marisol", "Maritza", "Marjolaine", "Marjorie", "Marjory", "Mark", "Markus", "Marlee", "Marlen", "Marlene", "Marley", "Marlin", "Marlon", "Marques", "Marquis", "Marquise", "Marshall", "Marta", "Martin", "Martina", "Martine", "Marty", "Marvin", "Mary", "Maryam", "Maryjane", "Maryse", "Mason", "Mateo", "Mathew", "Mathias", "Mathilde", "Matilda", "Matilde", "Matt", "Matteo", "Mattie", "Maud", "Maude", "Maudie", "Maureen", "Maurice", "Mauricio", "Maurine", "Maverick", "Mavis", "Max", "Maxie", "Maxime", "Maximilian", "Maximillia", "Maximillian", "Maximo", "Maximus", "Maxine", "Maxwell", "May", "Maya", "Maybell", "Maybelle", "Maye", "Maymie", "Maynard", "Mayra", "Mazie", "Mckayla", "Mckenna", "Mckenzie", "Meagan", "Meaghan", "Meda", "Megane", "Meggie", "Meghan", "Mekhi", "Melany", "Melba", "Melisa", "Melissa", "Mellie", "Melody", "Melvin", "Melvina", "Melyna", "Melyssa", "Mercedes", "Meredith", "Merl", "Merle", "Merlin", "Merritt", "Mertie", "Mervin", "Meta", "Mia", "Micaela", "Micah", "Michael", "Michaela", "Michale", "Micheal", "Michel", "Michele", "Michelle", "Miguel", "Mikayla", "Mike", "Mikel", "Milan", "Miles", "Milford", "Miller", "Millie", "Milo", "Milton", "Mina", "Minerva", "Minnie", "Miracle", "Mireille", "Mireya", "Misael", "Missouri", "Misty", "Mitchel", "Mitchell", "Mittie", "Modesta", "Modesto", "Mohamed", "Mohammad", "Mohammed", "Moises", "Mollie", "Molly", "Mona", "Monica", "Monique", "Monroe", "Monserrat", "Monserrate", "Montana", "Monte", "Monty", "Morgan", "Moriah", "Morris", "Mortimer", "Morton", "Mose", "Moses", "Moshe", "Mossie", "Mozell", "Mozelle", "Muhammad", "Muriel", "Murl", "Murphy", "Murray", "Mustafa", "Mya", "Myah", "Mylene", "Myles", "Myra", "Myriam", "Myrl", "Myrna", "Myron", "Myrtice", "Myrtie", "Myrtis", "Myrtle", "Nadia", "Nakia", "Name", "Nannie", "Naomi", "Naomie", "Napoleon", "Narciso", "Nash", "Nasir", "Nat", "Natalia", "Natalie", "Natasha", "Nathan", "Nathanael", "Nathanial", "Nathaniel", "Nathen", "Nayeli", "Neal", "Ned", "Nedra", "Neha", "Neil", "Nelda", "Nella", "Nelle", "Nellie", "Nels", "Nelson", "Neoma", "Nestor", "Nettie", "Neva", "Newell", "Newton", "Nia", "Nicholas", "Nicholaus", "Nichole", "Nick", "Nicklaus", "Nickolas", "Nico", "Nicola", "Nicolas", "Nicole", "Nicolette", "Nigel", "Nikita", "Nikki", "Nikko", "Niko", "Nikolas", "Nils", "Nina", "Noah", "Noble", "Noe", "Noel", "Noelia", "Noemi", "Noemie", "Noemy", "Nola", "Nolan", "Nona", "Nora", "Norbert", "Norberto", "Norene", "Norma", "Norris", "Norval", "Norwood", "Nova", "Novella", "Nya", "Nyah", "Nyasia", "Obie", "Oceane", "Ocie", "Octavia", "Oda", "Odell", "Odessa", "Odie", "Ofelia", "Okey", "Ola", "Olaf", "Ole", "Olen", "Oleta", "Olga", "Olin", "Oliver", "Ollie", "Oma", "Omari", "Omer", "Ona", "Onie", "Opal", "Ophelia", "Ora", "Oral", "Oran", "Oren", "Orie", "Orin", "Orion", "Orland", "Orlando", "Orlo", "Orpha", "Orrin", "Orval", "Orville", "Osbaldo", "Osborne", "Oscar", "Osvaldo", "Oswald", "Oswaldo", "Otha", "Otho", "Otilia", "Otis", "Ottilie", "Ottis", "Otto", "Ova", "Owen", "Ozella", "Pablo", "Paige", "Palma", "Pamela", "Pansy", "Paolo", "Paris", "Parker", "Pascale", "Pasquale", "Pat", "Patience", "Patricia", "Patrick", "Patsy", "Pattie", "Paul", "Paula", "Pauline", "Paxton", "Payton", "Pearl", "Pearlie", "Pearline", "Pedro", "Peggie", "Penelope", "Percival", "Percy", "Perry", "Pete", "Peter", "Petra", "Peyton", "Philip", "Phoebe", "Phyllis", "Pierce", "Pierre", "Pietro", "Pink", "Pinkie", "Piper", "Polly", "Porter", "Precious", "Presley", "Preston", "Price", "Prince", "Princess", "Priscilla", "Providenci", "Prudence", "Queen", "Queenie", "Quentin", "Quincy", "Quinn", "Quinten", "Quinton", "Rachael", "Rachel", "Rachelle", "Rae", "Raegan", "Rafael", "Rafaela", "Raheem", "Rahsaan", "Rahul", "Raina", "Raleigh", "Ralph", "Ramiro", "Ramon", "Ramona", "Randal", "Randall", "Randi", "Randy", "Ransom", "Raoul", "Raphael", "Raphaelle", "Raquel", "Rashad", "Rashawn", "Rasheed", "Raul", "Raven", "Ray", "Raymond", "Raymundo", "Reagan", "Reanna", "Reba", "Rebeca", "Rebecca", "Rebeka", "Rebekah", "Reece", "Reed", "Reese", "Regan", "Reggie", "Reginald", "Reid", "Reilly", "Reina", "Reinhold", "Remington", "Rene", "Renee", "Ressie", "Reta", "Retha", "Retta", "Reuben", "Reva", "Rex", "Rey", "Reyes", "Reymundo", "Reyna", "Reynold", "Rhea", "Rhett", "Rhianna", "Rhiannon", "Rhoda", "Ricardo", "Richard", "Richie", "Richmond", "Rick", "Rickey", "Rickie", "Ricky", "Rico", "Rigoberto", "Riley", "Rita", "River", "Robb", "Robbie", "Robert", "Roberta", "Roberto", "Robin", "Robyn", "Rocio", "Rocky", "Rod", "Roderick", "Rodger", "Rodolfo", "Rodrick", "Rodrigo", "Roel", "Rogelio", "Roger", "Rogers", "Rolando", "Rollin", "Roma", "Romaine", "Roman", "Ron", "Ronaldo", "Ronny", "Roosevelt", "Rory", "Rosa", "Rosalee", "Rosalia", "Rosalind", "Rosalinda", "Rosalyn", "Rosamond", "Rosanna", "Rosario", "Roscoe", "Rose", "Rosella", "Roselyn", "Rosemarie", "Rosemary", "Rosendo", "Rosetta", "Rosie", "Rosina", "Roslyn", "Ross", "Rossie", "Rowan", "Rowena", "Rowland", "Roxane", "Roxanne", "Roy", "Royal", "Royce", "Rozella", "Ruben", "Rubie", "Ruby", "Rubye", "Rudolph", "Rudy", "Rupert", "Russ", "Russel", "Russell", "Rusty", "Ruth", "Ruthe", "Ruthie", "Ryan", "Ryann", "Ryder", "Rylan", "Rylee", "Ryleigh", "Ryley", "Sabina", "Sabrina", "Sabryna", "Sadie", "Sadye", "Sage", "Saige", "Sallie", "Sally", "Salma", "Salvador", "Salvatore", "Sam", "Samanta", "Samantha", "Samara", "Samir", "Sammie", "Sammy", "Samson", "Sandra", "Sandrine", "Sandy", "Sanford", "Santa", "Santiago", "Santina", "Santino", "Santos", "Sarah", "Sarai", "Sarina", "Sasha", "Saul", "Savanah", "Savanna", "Savannah", "Savion", "Scarlett", "Schuyler", "Scot", "Scottie", "Scotty", "Seamus", "Sean", "Sebastian", "Sedrick", "Selena", "Selina", "Selmer", "Serena", "Serenity", "Seth", "Shad", "Shaina", "Shakira", "Shana", "Shane", "Shanel", "Shanelle", "Shania", "Shanie", "Shaniya", "Shanna", "Shannon", "Shanny", "Shanon", "Shany", "Sharon", "Shaun", "Shawn", "Shawna", "Shaylee", "Shayna", "Shayne", "Shea", "Sheila", "Sheldon", "Shemar", "Sheridan", "Sherman", "Sherwood", "Shirley", "Shyann", "Shyanne", "Sibyl", "Sid", "Sidney", "Sienna", "Sierra", "Sigmund", "Sigrid", "Sigurd", "Silas", "Sim", "Simeon", "Simone", "Sincere", "Sister", "Skye", "Skyla", "Skylar", "Sofia", "Soledad", "Solon", "Sonia", "Sonny", "Sonya", "Sophia", "Sophie", "Spencer", "Stacey", "Stacy", "Stan", "Stanford", "Stanley", "Stanton", "Stefan", "Stefanie", "Stella", "Stephan", "Stephania", "Stephanie", "Stephany", "Stephen", "Stephon", "Sterling", "Steve", "Stevie", "Stewart", "Stone", "Stuart", "Summer", "Sunny", "Susan", "Susana", "Susanna", "Susie", "Suzanne", "Sven", "Syble", "Sydnee", "Sydney", "Sydni", "Sydnie", "Sylvan", "Sylvester", "Sylvia", "Tabitha", "Tad", "Talia", "Talon", "Tamara", "Tamia", "Tania", "Tanner", "Tanya", "Tara", "Taryn", "Tate", "Tatum", "Tatyana", "Taurean", "Tavares", "Taya", "Taylor", "Teagan", "Ted", "Telly", "Terence", "Teresa", "Terrance", "Terrell", "Terrence", "Terrill", "Terry", "Tess", "Tessie", "Tevin", "Thad", "Thaddeus", "Thalia", "Thea", "Thelma", "Theo", "Theodora", "Theodore", "Theresa", "Therese", "Theresia", "Theron", "Thomas", "Thora", "Thurman", "Tia", "Tiana", "Tianna", "Tiara", "Tierra", "Tiffany", "Tillman", "Timmothy", "Timmy", "Timothy", "Tina", "Tito", "Titus", "Tobin", "Toby", "Tod", "Tom", "Tomas", "Tomasa", "Tommie", "Toney", "Toni", "Tony", "Torey", "Torrance", "Torrey", "Toy", "Trace", "Tracey", "Tracy", "Travis", "Travon", "Tre", "Tremaine", "Tremayne", "Trent", "Trenton", "Tressa", "Tressie", "Treva", "Trever", "Trevion", "Trevor", "Trey", "Trinity", "Trisha", "Tristian", "Tristin", "Triston", "Troy", "Trudie", "Trycia", "Trystan", "Turner", "Twila", "Tyler", "Tyra", "Tyree", "Tyreek", "Tyrel", "Tyrell", "Tyrese", "Tyrique", "Tyshawn", "Tyson", "Ubaldo", "Ulices", "Ulises", "Una", "Unique", "Urban", "Uriah", "Uriel", "Ursula", "Vada", "Valentin", "Valentina", "Valentine", "Valerie", "Vallie", "Van", "Vance", "Vanessa", "Vaughn", "Veda", "Velda", "Vella", "Velma", "Velva", "Vena", "Verda", "Verdie", "Vergie", "Verla", "Verlie", "Vern", "Verna", "Verner", "Vernice", "Vernie", "Vernon", "Verona", "Veronica", "Vesta", "Vicenta", "Vicente", "Vickie", "Vicky", "Victor", "Victoria", "Vida", "Vidal", "Vilma", "Vince", "Vincent", "Vincenza", "Vincenzo", "Vinnie", "Viola", "Violet", "Violette", "Virgie", "Virgil", "Virginia", "Virginie", "Vita", "Vito", "Viva", "Vivian", "Viviane", "Vivianne", "Vivien", "Vivienne", "Vladimir", "Wade", "Waino", "Waldo", "Walker", "Wallace", "Walter", "Walton", "Wanda", "Ward", "Warren", "Watson", "Wava", "Waylon", "Wayne", "Webster", "Weldon", "Wellington", "Wendell", "Wendy", "Werner", "Westley", "Weston", "Whitney", "Wilber", "Wilbert", "Wilburn", "Wiley", "Wilford", "Wilfred", "Wilfredo", "Wilfrid", "Wilhelm", "Wilhelmine", "Will", "Willa", "Willard", "William", "Willie", "Willis", "Willow", "Willy", "Wilma", "Wilmer", "Wilson", "Wilton", "Winfield", "Winifred", "Winnifred", "Winona", "Winston", "Woodrow", "Wyatt", "Wyman", "Xander", "Xavier", "Xzavier", "Yadira", "Yasmeen", "Yasmin", "Yasmine", "Yazmin", "Yesenia", "Yessenia", "Yolanda", "Yoshiko", "Yvette", "Yvonne", "Zachariah", "Zachary", "Zachery", "Zack", "Zackary", "Zackery", "Zakary", "Zander", "Zane", "Zaria", "Zechariah", "Zelda", "Zella", "Zelma", "Zena", "Zetta", "Zion", "Zita", "Zoe", "Zoey", "Zoie", "Zoila", "Zola", "Zora", "Zula"];e.exports = { generateUsername: r };
}, function (e, t, n) {
"use strict";
(function (e) {
function r(e) {
this.versions = {}, this.conference = e, this.conference.addCommandListener("versions", this.processPresence.bind(this));
}t.a = r;var i = n(6),
o = n(0).getLogger(e);r.FOCUS_COMPONENT = "focus", r.VIDEOBRIDGE_COMPONENT = "videobridge", r.XMPP_SERVER_COMPONENT = "xmpp", r.prototype.processPresence = function (e, t, n) {
var a = this;if ("http://jitsi.org/jitmeet" !== e.attributes.xmlns) return void o.warn("Ignored presence versions node - invalid xmlns", e);if (!this.conference._isFocus(n)) return void o.warn("Received versions not from the focus user: " + e, n);var s = [];e.children.forEach(function (e) {
var t = e.attributes.name;if (t !== r.FOCUS_COMPONENT && t !== r.XMPP_SERVER_COMPONENT && t !== r.VIDEOBRIDGE_COMPONENT) return void o.warn("Received version for not supported component name: " + t);var n = e.value;a.versions[t] !== n && (a.versions[t] = n, o.info("Got " + t + " version: " + n), s.push({ id: "component_version", component: t, version: n }));
}), s.length > 0 && i.a.sendLog(JSON.stringify(s));
}, r.prototype.getComponentVersion = function (e) {
return this.versions[e];
};
}).call(t, "modules/version/ComponentsVersions.js");
}, function (e, t, n) {
"use strict";
(function (e) {
function r(e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
}function i(e, t) {
if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return !t || "object" != typeof t && "function" != typeof t ? e : t;
}function o(e, t) {
if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);
}var a = n(0),
s = (n.n(a), n(10)),
c = n(30),
u = function () {
function e(e, t) {
for (var n = 0; n < t.length; n++) {
var r = t[n];r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
}
}return function (t, n, r) {
return n && e(t.prototype, n), r && e(t, r), t;
};
}(),
l = n.i(a.getLogger)(e),
d = function (e) {
function t(e, n, o) {
r(this, t);var a = i(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this));return a.sipAddress = e, a.displayName = n, a.chatRoom = o, a.state = void 0, a;
}return o(t, e), u(t, [{ key: "stop", value: function value() {
if (this.state === c.STATE_OFF || this.state === c.STATE_FAILED) return void l.warn("Video SIP GW session already stopped or failed!");this._sendJibriIQ("stop");
} }, { key: "start", value: function value() {
if (this.state === c.STATE_ON || this.state === c.STATE_OFF || this.state === c.STATE_PENDING || this.state === c.STATE_RETRYING) return void l.warn("Video SIP GW session already started!");this._sendJibriIQ("start");
} }, { key: "setState", value: function value(e) {
if (e !== this.state) {
var t = this.state;this.state = e, this.eventEmitter.emit(this.sipAddress, { name: "STATE_CHANGED", oldState: t, newState: this.state });
}
} }, { key: "addStateListener", value: function value(e) {
this.addListener("STATE_CHANGED", e);
} }, { key: "removeStateListener", value: function value(e) {
this.removeListener("STATE_CHANGED", e);
} }, { key: "_sendJibriIQ", value: function value(e) {
var t = this,
n = { xmlns: "http://jitsi.org/protocol/jibri", action: e, sipaddress: this.sipAddress };n.displayname = this.displayName;var r = $iq({ to: this.chatRoom.focusMucJid, type: "set" }).c("jibri", n).up();l.log("Stop video SIP GW session", r.nodeTree), this.chatRoom.connection.sendIQ(r, function (e) {
l.log("Result", e);var n = $(e).find("jibri").attr("state");t.setState(n);
}, function (e) {
l.log("Failed to start video SIP GW session, error: ", e), t.setState(c.STATE_FAILED);
});
} }]), t;
}(s.a);t.a = d;
}).call(t, "modules/videosipgw/JitsiVideoSIPGWSession.js");
}, function (e, t, n) {
"use strict";
(function (e) {
function r(e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
}var i = n(0),
o = (n.n(i), n(118)),
a = n(30),
s = n(7),
c = n.n(s),
u = function () {
function e(e, t) {
for (var n = 0; n < t.length; n++) {
var r = t[n];r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
}
}return function (t, n, r) {
return n && e(t.prototype, n), r && e(t, r), t;
};
}(),
l = n.i(i.getLogger)(e),
d = function () {
function e(t) {
r(this, e), this.chatRoom = t, this.eventEmitter = t.eventEmitter, l.info("creating VideoSIPGW"), this.sessions = {}, this.sessionStateChangeListener = this.sessionStateChanged.bind(this), t.addPresenceListener("jibri-sip-status", this.handleJibriSIPStatus.bind(this)), t.addPresenceListener("jibri-sip-call-state", this.handleJibriSIPState.bind(this));
}return u(e, [{ key: "handleJibriSIPStatus", value: function value(e) {
var t = e.attributes;if (t) {
l.log("Handle video sip gw status : ", t);var n = t.status;n === this.status || n !== a.STATUS_UNDEFINED && n !== a.STATUS_AVAILABLE && n !== a.STATUS_BUSY || (this.status = n, this.eventEmitter.emit(c.a.VIDEO_SIP_GW_AVAILABILITY_CHANGED, this.status));
}
} }, { key: "handleJibriSIPState", value: function value(e) {
var t = e.attributes;if (t) {
l.log("Handle video sip gw state : ", t);var n = t.state;if (n !== this.state) switch (n) {case a.STATE_ON:case a.STATE_OFF:case a.STATE_PENDING:case a.STATE_RETRYING:case a.STATE_FAILED:
var r = t.sipaddress;if (!r) return;var i = this.sessions[r];i ? i.setState(n) : l.warn("Video SIP GW session not found:", r);}
}
} }, { key: "createVideoSIPGWSession", value: function value(e, t) {
var n = new o.a(e, t, this.chatRoom);return n.addStateListener(this.sessionStateChangeListener), this.sessions[e] && l.warn("There was already a Video SIP GW session for address", e), this.sessions[e] = n, n;
} }, { key: "isVideoSIPGWAvailable", value: function value() {
return this.status === a.STATUS_AVAILABLE;
} }, { key: "sessionStateChanged", value: function value(e, t) {
if (t.newState === a.STATE_OFF || t.newState === a.STATE_FAILED) {
var n = this.sessions[e];if (!n) return void l.error("Missing Video SIP GW session with address:", e);n.removeStateListener(this.sessionStateChangeListener), delete this.sessions[e];
}
} }]), e;
}();t.a = d;
}).call(t, "modules/videosipgw/VideoSIPGW.js");
}, function (e, t, n) {
"use strict";
function r(e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
}function i(e, t) {
if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return !t || "object" != typeof t && "function" != typeof t ? e : t;
}function o(e, t) {
if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);
}function a(e, t) {
var n = 0;return p.some(function (r) {
return 0 !== (n = e[r] > t[r] && 1 || e[r] < t[r] && -1);
}), n;
}var s = n(7),
c = n.n(s),
u = n(10),
l = function () {
function e(e, t) {
for (var n = 0; n < t.length; n++) {
var r = t[n];r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
}
}return function (t, n, r) {
return n && e(t.prototype, n), r && e(t, r), t;
};
}(),
d = ["category", "type", "lang", "name"],
p = ["category", "type", "lang"],
f = function (e) {
function t() {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "http://jitsi.org/jitsimeet";r(this, t);var o = i(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this));if (o.node = n, o.disco = e.disco, !o.disco) throw new Error("Missing strophe-plugins (disco and caps plugins are required)!");o.versionToCapabilities = Object.create(null), o.jidToVersion = Object.create(null), o.version = "", o.rooms = new Set();var a = e.emuc;return a.addListener(c.a.EMUC_ROOM_ADDED, function (e) {
return o._addChatRoom(e);
}), a.addListener(c.a.EMUC_ROOM_REMOVED, function (e) {
return o._removeChatRoom(e);
}), Object.keys(a.rooms).forEach(function (e) {
o._addChatRoom(a.rooms[e]);
}), Strophe.addNamespace("CAPS", "http://jabber.org/protocol/caps"), o.disco.addFeature(Strophe.NS.CAPS), e.addHandler(o._handleCaps.bind(o), Strophe.NS.CAPS), o._onMucMemberLeft = o._removeJidToVersionEntry.bind(o), o;
}return o(t, e), l(t, [{ key: "addFeature", value: function value(e) {
var t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1];this.disco.addFeature(e), this._generateVersion(), t && this.submit();
} }, { key: "removeFeature", value: function value(e) {
var t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1];this.disco.removeFeature(e), this._generateVersion(), t && this.submit();
} }, { key: "submit", value: function value() {
this.rooms.forEach(function (e) {
return e.sendPresence();
});
} }, { key: "getFeatures", value: function value(e) {
var t = this,
n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 5e3,
r = e in this.jidToVersion ? this.jidToVersion[e] : null;if (!(r && r.version in this.versionToCapabilities)) {
var i = r ? r.node + "#" + r.version : null;return new Promise(function (o, a) {
return t.disco.info(e, i, function (e) {
var n = new Set();$(e).find(">query>feature").each(function (e, t) {
return n.add(t.getAttribute("var"));
}), r && (t.versionToCapabilities[r.version] = n), o(n);
}, a, n);
});
}return Promise.resolve(this.versionToCapabilities[r.version]);
} }, { key: "_addChatRoom", value: function value(e) {
this.rooms.add(e), e.addListener(c.a.MUC_MEMBER_LEFT, this._onMucMemberLeft), this._fixChatRoomPresenceMap(e);
} }, { key: "_removeChatRoom", value: function value(e) {
this.rooms.delete(e), e.removeListener(c.a.MUC_MEMBER_LEFT, this._onMucMemberLeft);
} }, { key: "_fixChatRoomPresenceMap", value: function value(e) {
e.addToPresence("c", { attributes: { xmlns: Strophe.NS.CAPS, hash: "sha-1", node: this.node, ver: this.version } });
} }, { key: "_notifyVersionChanged", value: function value() {
var e = this;this.rooms.forEach(function (t) {
return e._fixChatRoomPresenceMap(t);
}), this.submit();
} }, { key: "_generateVersion", value: function value() {
var e = this.disco._identities.sort(a),
t = this.disco._features.sort();this.version = b64_sha1(e.reduce(function (e, t) {
return d.reduce(function (e, n, r) {
return e + (0 === r ? "" : "/") + t[n];
}, "") + "<";
}, "") + t.reduce(function (e, t) {
return e + t + "<";
}, "")), this._notifyVersionChanged();
} }, { key: "_handleCaps", value: function value(e) {
var t = e.getAttribute("from"),
n = e.querySelector("c"),
r = n.getAttribute("ver"),
i = n.getAttribute("node"),
o = this.jidToVersion[t];return this.jidToVersion[t] = { version: r, node: i }, o && o.version !== r && this.eventEmitter.emit(c.a.PARTCIPANT_FEATURES_CHANGED, t), !0;
} }, { key: "_removeJidToVersionEntry", value: function value(e) {
e in this.jidToVersion && delete this.jidToVersion[e];
} }]), t;
}(u.a);t.a = f;
}, function (e, t, n) {
"use strict";
(function (e) {
function r(e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
}function i(e, t) {
if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return !t || "object" != typeof t && "function" != typeof t ? e : t;
}function o(e, t) {
if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);
}function a(e, t) {
for (var n = [], r = 0; r < e.length; r++) {
e[r].tagName === t && n.push(e[r]);
}return n;
}var s = n(0),
c = (n.n(s), n(3)),
u = n.n(c),
l = n(10),
d = n(4),
p = n(128),
f = n(129),
h = n(7),
m = n.n(h),
v = function () {
function e(e, t) {
for (var n = 0; n < t.length; n++) {
var r = t[n];r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
}
}return function (t, n, r) {
return n && e(t.prototype, n), r && e(t, r), t;
};
}(),
g = n.i(s.getLogger)(e),
y = { packet2JSON: function packet2JSON(e, t) {
var n = this;$(e).children().each(function () {
var e = $(this).prop("tagName"),
r = { tagName: e };r.attributes = {}, $($(this)[0].attributes).each(function (e, t) {
r.attributes[t.name] = t.value;
});var i = Strophe.getText($(this)[0]);i && (r.value = i), r.children = [], t.push(r), n.packet2JSON($(this), r.children);
});
}, json2packet: function json2packet(e, t) {
for (var n = 0; n < e.length; n++) {
var r = e[n];r && (t.c(r.tagName, r.attributes), r.value && t.t(r.value), r.children && this.json2packet(r.children, t), t.up());
}
} },
b = function (e) {
function t(e, n, o, a, s) {
r(this, t);var c = i(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this));return c.xmpp = a, c.connection = e, c.roomjid = Strophe.getBareJidFromJid(n), c.myroomjid = n, c.password = o, g.info("Joined MUC as " + c.myroomjid), c.members = {}, c.presMap = {}, c.presHandlers = {}, c.joined = !1, c.role = null, c.focusMucJid = null, c.noBridgeAvailable = !1, c.options = s || {}, c.moderator = new p.a(c.roomjid, c.xmpp, c.eventEmitter, { connection: c.xmpp.options, conference: c.options }), c.initPresenceMap(s), c.lastPresences = {}, c.phoneNumber = null, c.phonePin = null, c.connectionTimes = {}, c.participantPropertyListener = null, c.locked = !1, c;
}return o(t, e), v(t, [{ key: "initPresenceMap", value: function value() {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};this.presMap.to = this.myroomjid, this.presMap.xns = "http://jabber.org/protocol/muc", this.presMap.nodes = [], this.presMap.nodes.push({ tagName: "user-agent", value: navigator.userAgent, attributes: { xmlns: "http://jitsi.org/jitmeet/user-agent" } }), this.addVideoInfoToPresence(!1), e.deploymentInfo && e.deploymentInfo.userRegion && this.presMap.nodes.push({ tagName: "region", attributes: { id: e.deploymentInfo.userRegion, xmlns: "http://jitsi.org/jitsi-meet" } });
} }, { key: "updateDeviceAvailability", value: function value(e) {
this.presMap.nodes.push({ tagName: "devices", children: [{ tagName: "audio", value: e.audio }, { tagName: "video", value: e.video }] });
} }, { key: "join", value: function value(e) {
var t = this;this.password = e, this.moderator.allocateConferenceFocus(function () {
return t.sendPresence(!0);
});
} }, { key: "sendPresence", value: function value(e) {
var t = this.presMap.to;if (t && (this.joined || e)) {
var n = $pres({ to: t });e && (n.c("x", { xmlns: this.presMap.xns }), this.password && n.c("password").t(this.password).up(), n.up()), y.json2packet(this.presMap.nodes, n), this.connection.send(n), e && this.connection.flush();
}
} }, { key: "doLeave", value: function value() {
g.log("do leave", this.myroomjid);var e = $pres({ to: this.myroomjid, type: "unavailable" });this.presMap.length = 0, this.connection.flush(), this.connection.send(e), this.connection.flush();
} }, { key: "discoRoomInfo", value: function value() {
var e = this,
t = $iq({ type: "get", to: this.roomjid }).c("query", { xmlns: Strophe.NS.DISCO_INFO });this.connection.sendIQ(t, function (t) {
var n = 1 === $(t).find('>query>feature[var="muc_passwordprotected"]').length;n !== e.locked && (e.eventEmitter.emit(m.a.MUC_LOCK_CHANGED, n), e.locked = n);
}, function (e) {
u.a.callErrorHandler(e), g.error("Error getting room info: ", e);
});
} }, { key: "createNonAnonymousRoom", value: function value() {
var e = $iq({ type: "get", to: this.roomjid }).c("query", { xmlns: "http://jabber.org/protocol/muc#owner" }).c("x", { xmlns: "jabber:x:data", type: "submit" }),
t = this;this.connection.sendIQ(e, function (e) {
if (!$(e).find('>query>x[xmlns="jabber:x:data"]>field[var="muc#roomconfig_whois"]').length) {
var n = "non-anonymous rooms not supported";return u.a.callErrorHandler(new Error(n)), void g.error(n);
}var r = $iq({ to: t.roomjid, type: "set" }).c("query", { xmlns: "http://jabber.org/protocol/muc#owner" });r.c("x", { xmlns: "jabber:x:data", type: "submit" }), r.c("field", { var: "FORM_TYPE" }).c("value").t("http://jabber.org/protocol/muc#roomconfig").up().up(), r.c("field", { var: "muc#roomconfig_whois" }).c("value").t("anyone").up().up(), t.connection.sendIQ(r);
}, function (e) {
u.a.callErrorHandler(e), g.error("Error getting room configuration form: ", e);
});
} }, { key: "onPresence", value: function value(e) {
var t = e.getAttribute("from"),
n = {};n.show = $(e).find(">show").text(), n.status = $(e).find(">status").text();var r = $(e).find('>x[xmlns="http://jabber.org/protocol/muc#user"]>item');n.affiliation = r.attr("affiliation"), n.role = r.attr("role");var i = r.attr("jid");n.jid = i, n.isFocus = i && 0 === i.indexOf(this.moderator.getFocusUserJid() + "/"), n.isHiddenDomain = i && i.indexOf("@") > 0 && this.options.hiddenDomain === i.substring(i.indexOf("@") + 1, i.indexOf("/")), $(e).find(">x").remove();var o = [];y.packet2JSON(e, o), this.lastPresences[t] = o;for (var a = null, s = 0; s < o.length; s++) {
var c = o[s];switch (c.tagName) {case "nick":
n.nick = c.value;break;case "userId":
n.id = c.value;}
}if (t === this.myroomjid) {
var u = "owner" === n.affiliation ? n.role : "none";if (this.role !== u && (this.role = u, this.eventEmitter.emit(m.a.LOCAL_ROLE_CHANGED, this.role)), !this.joined) {
this.joined = !0;var l = this.connectionTimes["muc.joined"] = window.performance.now();g.log("(TIME) MUC joined:\t", l), this.password && (this.locked = !0), this.eventEmitter.emit(m.a.MUC_JOINED);
}
} else if (void 0 === this.members[t]) this.members[t] = n, g.log("entered", t, n), n.isFocus ? this._initFocus(t, i) : this.eventEmitter.emit(m.a.MUC_MEMBER_JOINED, t, n.nick, n.role, n.isHiddenDomain);else {
var d = this.members[t];d.role !== n.role && (d.role = n.role, this.eventEmitter.emit(m.a.MUC_ROLE_CHANGED, t, n.role)), n.isFocus && (d.isFocus = !0, this._initFocus(t, i)), n.displayName && (d.displayName = n.displayName);
}for (var p = 0; p < o.length; p++) {
var f = o[p];switch (f.tagName) {case "nick":
if (!n.isFocus) {
var h = this.xmpp.options.displayJids ? Strophe.getResourceFromJid(t) : n.nick;h && h.length > 0 && this.eventEmitter.emit(m.a.DISPLAY_NAME_CHANGED, t, h);
}break;case "bridgeNotAvailable":
n.isFocus && !this.noBridgeAvailable && (this.noBridgeAvailable = !0, this.eventEmitter.emit(m.a.BRIDGE_DOWN));break;case "jibri-recording-status":
a = f;break;case "call-control":
var v = f.attributes;if (!v) break;this.phoneNumber = v.phone || null, this.phonePin = v.pin || null, this.eventEmitter.emit(m.a.PHONE_NUMBER_CHANGED);break;default:
this.processNode(f, t);}
}n.status && this.eventEmitter.emit(m.a.PRESENCE_STATUS, t, n.status), a && (this.lastJibri = a, this.recording && this.recording.handleJibriPresence(a));
} }, { key: "_initFocus", value: function value(e, t) {
this.focusMucJid = e, this.recording || (this.recording = new f.a(this.options.recordingType, this.eventEmitter, this.connection, this.focusMucJid, this.options.jirecon, this.roomjid), this.lastJibri && this.recording.handleJibriPresence(this.lastJibri)), g.info("Ignore focus: " + e + ", real JID: " + t);
} }, { key: "setParticipantPropertyListener", value: function value(e) {
this.participantPropertyListener = e;
} }, { key: "processNode", value: function value(e, t) {
try {
var n = this.presHandlers[e.tagName];e.tagName.startsWith("jitsi_participant_") && (n = [this.participantPropertyListener]), n && n.forEach(function (n) {
n(e, Strophe.getResourceFromJid(t), t);
});
} catch (t) {
u.a.callErrorHandler(t), g.error("Error processing:" + e.tagName + " node.", t);
}
} }, { key: "sendMessage", value: function value(e, t) {
var n = $msg({ to: this.roomjid, type: "groupchat" });n.c("body", e).up(), t && n.c("nick", { xmlns: "http://jabber.org/protocol/nick" }).t(t).up().up(), this.connection.send(n), this.eventEmitter.emit(m.a.SENDING_CHAT_MESSAGE, e);
} }, { key: "setSubject", value: function value(e) {
var t = $msg({ to: this.roomjid, type: "groupchat" });t.c("subject", e), this.connection.send(t);
} }, { key: "onParticipantLeft", value: function value(e, t) {
delete this.lastPresences[e], t || (this.eventEmitter.emit(m.a.MUC_MEMBER_LEFT, e), this.moderator.onMucMemberLeft(e));
} }, { key: "onPresenceUnavailable", value: function value(e, t) {
var n = this;if ($(e).find('>ignore[xmlns="http://jitsi.org/jitmeet/"]').length) return !0;if ($(e).find('>x[xmlns="http://jabber.org/protocol/muc#user"]>destroy').length) {
var r = void 0,
i = $(e).find('>x[xmlns="http://jabber.org/protocol/muc#user"]>destroy>reason');return i.length && (r = i.text()), this.eventEmitter.emit(m.a.MUC_DESTROYED, r), this.connection.emuc.doLeave(this.roomjid), !0;
}var o = 0 !== $(e).find('>x[xmlns="http://jabber.org/protocol/muc#user"]>status[code="110"]').length,
a = 0 !== $(e).find('>x[xmlns="http://jabber.org/protocol/muc#user"]>status[code="307"]').length,
s = Object.keys(this.members);o ? s.length > 0 && (s.forEach(function (e) {
var t = n.members[e];delete n.members[e], n.onParticipantLeft(e, t.isFocus);
}), this.connection.emuc.doLeave(this.roomjid), a || this.eventEmitter.emit(m.a.MUC_LEFT)) : (delete this.members[t], this.onParticipantLeft(t, !1)), a && this.myroomjid === t && this.eventEmitter.emit(m.a.KICKED);
} }, { key: "onMessage", value: function value(e, t) {
var n = $(e).find('>nick[xmlns="http://jabber.org/protocol/nick"]').text() || Strophe.getResourceFromJid(t),
r = $(e).find(">body").text();if ("error" === e.getAttribute("type")) return this.eventEmitter.emit(m.a.CHAT_ERROR_RECEIVED, $(e).find(">text").text(), r), !0;var i = $(e).find(">subject");if (i.length) {
var o = i.text();(o || "" === o) && (this.eventEmitter.emit(m.a.SUBJECT_CHANGED, o), g.log("Subject is changed to " + o));
}var a = $(e).find(">delay").attr("stamp");if (!a && (a = $(e).find('>[xmlns="jabber:x:delay"]').attr("stamp"))) {
var s = a.match(/(\d{4})(\d{2})(\d{2}T\d{2}:\d{2}:\d{2})/);a = s[1] + "-" + s[2] + "-" + s[3] + "Z";
}t === this.roomjid && $(e).find('>x[xmlns="http://jabber.org/protocol/muc#user"]>status[code="104"]').length && this.discoRoomInfo(), r && (g.log("chat", n, r), this.eventEmitter.emit(m.a.MESSAGE_RECEIVED, t, n, r, this.myroomjid, a));
} }, { key: "onPresenceError", value: function value(e, t) {
if ($(e).find('>error[type="auth"]>not-authorized[xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"]').length) g.log("on password required", t), this.eventEmitter.emit(m.a.PASSWORD_REQUIRED);else if ($(e).find('>error[type="cancel"]>not-allowed[xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"]').length) {
var n = Strophe.getDomainFromJid(e.getAttribute("to"));n === this.xmpp.options.hosts.anonymousdomain ? this.eventEmitter.emit(m.a.ROOM_JOIN_ERROR) : (g.warn("onPresError ", e), this.eventEmitter.emit(m.a.ROOM_CONNECT_NOT_ALLOWED_ERROR));
} else $(e).find(">error>service-unavailable").length ? (g.warn("Maximum users limit for the room has been reached", e), this.eventEmitter.emit(m.a.ROOM_MAX_USERS_ERROR)) : (g.warn("onPresError ", e), this.eventEmitter.emit(m.a.ROOM_CONNECT_ERROR));
} }, { key: "kick", value: function value(e) {
var t = $iq({ to: this.roomjid, type: "set" }).c("query", { xmlns: "http://jabber.org/protocol/muc#admin" }).c("item", { nick: Strophe.getResourceFromJid(e), role: "none" }).c("reason").t("You have been kicked.").up().up().up();this.connection.sendIQ(t, function (t) {
return g.log("Kick participant with jid: ", e, t);
}, function (e) {
return g.log("Kick participant error: ", e);
});
} }, { key: "lockRoom", value: function value(e, t, n, r) {
var i = this;this.connection.sendIQ($iq({ to: this.roomjid, type: "get" }).c("query", { xmlns: "http://jabber.org/protocol/muc#owner" }), function (o) {
if ($(o).find('>query>x[xmlns="jabber:x:data"]>field[var="muc#roomconfig_roomsecret"]').length) {
var a = $iq({ to: i.roomjid, type: "set" }).c("query", { xmlns: "http://jabber.org/protocol/muc#owner" });a.c("x", { xmlns: "jabber:x:data", type: "submit" }), a.c("field", { var: "FORM_TYPE" }).c("value").t("http://jabber.org/protocol/muc#roomconfig").up().up(), a.c("field", { var: "muc#roomconfig_roomsecret" }).c("value").t(e).up().up(), a.c("field", { var: "muc#roomconfig_whois" }).c("value").t("anyone").up().up(), i.connection.sendIQ(a, t, n);
} else r();
}, n);
} }, { key: "addToPresence", value: function value(e, t) {
t.tagName = e, this.removeFromPresence(e), this.presMap.nodes.push(t);
} }, { key: "removeFromPresence", value: function value(e) {
var t = this.presMap.nodes.filter(function (t) {
return e !== t.tagName;
});this.presMap.nodes = t;
} }, { key: "addPresenceListener", value: function value(e, t) {
if ("function" != typeof t) throw new Error('"handler" is not a function');var n = this.presHandlers[e];n || (this.presHandlers[e] = n = []), -1 === n.indexOf(t) ? n.push(t) : g.warn("Trying to add the same handler more than once for: " + e);
} }, { key: "removePresenceListener", value: function value(e, t) {
var n = this.presHandlers[e],
r = n ? n.indexOf(t) : -1;-1 !== r ? n.splice(r, 1) : g.warn("Handler for: " + e + " was not registered");
} }, { key: "isFocus", value: function value(e) {
var t = this.members[e];return t ? t.isFocus : null;
} }, { key: "isModerator", value: function value() {
return "moderator" === this.role;
} }, { key: "getMemberRole", value: function value(e) {
return this.members[e] ? this.members[e].role : null;
} }, { key: "setVideoMute", value: function value(e, t) {
this.sendVideoInfoPresence(e), t && t(e);
} }, { key: "setAudioMute", value: function value(e, t) {
return this.sendAudioInfoPresence(e, t);
} }, { key: "addAudioInfoToPresence", value: function value(e) {
this.removeFromPresence("audiomuted"), this.addToPresence("audiomuted", { attributes: { xmlns: "http://jitsi.org/jitmeet/audio" }, value: e.toString() });
} }, { key: "sendAudioInfoPresence", value: function value(e, t) {
this.addAudioInfoToPresence(e), this.connection && this.sendPresence(), t && t();
} }, { key: "addVideoInfoToPresence", value: function value(e) {
this.removeFromPresence("videomuted"), this.addToPresence("videomuted", { attributes: { xmlns: "http://jitsi.org/jitmeet/video" }, value: e.toString() });
} }, { key: "sendVideoInfoPresence", value: function value(e) {
this.addVideoInfoToPresence(e), this.connection && this.sendPresence();
} }, { key: "getMediaPresenceInfo", value: function value(e, t) {
var n = this.lastPresences[this.roomjid + "/" + e];if (!n) return null;var r = { muted: !1, videoType: void 0 },
i = null;if (t === d.a) i = a(n, "audiomuted");else {
if (t !== d.b) return g.error("Unsupported media type: " + t), null;i = a(n, "videomuted");var o = a(n, "videoType");o.length > 0 && (r.videoType = o[0].value);
}return r.muted = i.length > 0 && "true" === i[0].value, r;
} }, { key: "isRecordingSupported", value: function value() {
return !!this.recording && this.recording.isSupported();
} }, { key: "getRecordingState", value: function value() {
return this.recording ? this.recording.getState() : void 0;
} }, { key: "getRecordingURL", value: function value() {
return this.recording ? this.recording.getURL() : null;
} }, { key: "toggleRecording", value: function value(e, t) {
return this.recording ? this.recording.toggleRecording(e, t) : t("error", new Error("The conference is not created yet!"));
} }, { key: "isSIPCallingSupported", value: function value() {
return !!this.moderator && this.moderator.isSipGatewayEnabled();
} }, { key: "dial", value: function value(e) {
return this.connection.rayo.dial(e, "fromnumber", Strophe.getBareJidFromJid(this.myroomjid), this.password, this.focusMucJid);
} }, { key: "hangup", value: function value() {
return this.connection.rayo.hangup();
} }, { key: "getPhoneNumber", value: function value() {
return this.phoneNumber;
} }, { key: "getPhonePin", value: function value() {
return this.phonePin;
} }, { key: "muteParticipant", value: function value(e, t) {
g.info("set mute", t);var n = $iq({ to: this.focusMucJid, type: "set" }).c("mute", { xmlns: "http://jitsi.org/jitmeet/audio", jid: e }).t(t.toString()).up();this.connection.sendIQ(n, function (e) {
return g.log("set mute", e);
}, function (e) {
return g.log("set mute error", e);
});
} }, { key: "onMute", value: function value(e) {
if (e.getAttribute("from") !== this.focusMucJid) return g.warn("Ignored mute from non focus peer"), !1;var t = $(e).find("mute");if (t.length) {
var n = "true" === t.text();this.eventEmitter.emit(m.a.AUDIO_MUTED_BY_FOCUS, n);
}return !0;
} }, { key: "leave", value: function value() {
var e = this;return new Promise(function (t, n) {
function r() {
var e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0];o.removeListener(m.a.MUC_LEFT, r), clearTimeout(i), e ? n(new Error("The timeout for the confirmation about leaving the room expired.")) : t();
}var i = setTimeout(function () {
return r(!0);
}, 5e3),
o = e.eventEmitter;o.on(m.a.MUC_LEFT, r), e.doLeave();
});
} }]), t;
}(l.a);t.a = b;
}).call(t, "modules/xmpp/ChatRoom.js");
}, function (e, t, n) {
"use strict";
(function (e) {
function r(e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
}var i = n(0),
o = (n.n(i), n(50)),
a = function () {
function e(e, t) {
for (var n = 0; n < t.length; n++) {
var r = t[n];r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
}
}return function (t, n, r) {
return n && e(t.prototype, n), r && e(t, r), t;
};
}(),
s = n.i(i.getLogger)(e),
c = function () {
function e(t, n, i, o, a, s) {
r(this, e), this.sid = t, this.localJid = n, this.peerjid = i, this.connection = o, this.mediaConstraints = a, this.iceConfig = s, this.usedrip = !0, this.dripContainer = [], this.room = null, this.state = null, this.rtc = null;
}return a(e, [{ key: "initialize", value: function value(e, t, n) {
if (null !== this.state) {
var r = "attempt to initiate on session " + this.sid + "\n in state " + this.state;throw s.error(r), new Error(r);
}this.room = t, this.rtc = n, this.state = o.b, this.initiator = e ? this.localJid : this.peerjid, this.responder = e ? this.peerjid : this.localJid, this.doInitialize();
} }, { key: "doInitialize", value: function value() {} }, { key: "addIceCandidates", value: function value(e) {} }, { key: "getState", value: function value() {
return this.state;
} }, { key: "addSources", value: function value(e) {} }, { key: "removeSources", value: function value(e) {} }, { key: "terminate", value: function value(e, t, n) {} }, { key: "acceptOffer", value: function value(e, t, n) {} }]), e;
}();t.a = c;
}).call(t, "modules/xmpp/JingleSession.js");
}, function (e, t, n) {
"use strict";
(function (e) {
function r(e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
}function i(e, t) {
if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return !t || "object" != typeof t && "function" != typeof t ? e : t;
}function o(e, t) {
if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);
}var a = n(70),
s = n.n(a),
c = n(0),
u = (n.n(c), n(3)),
l = n.n(u),
d = n(122),
p = n(51),
f = n(125),
h = n(12),
m = n(127),
v = n(6),
g = n(7),
y = n.n(g),
b = n(50),
S = function () {
function e(e, t) {
for (var n = 0; n < t.length; n++) {
var r = t[n];r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
}
}return function (t, n, r) {
return n && e(t.prototype, n), r && e(t, r), t;
};
}(),
E = n.i(c.getLogger)(e),
T = function (e) {
function t(e, n, o, a, c, u, l, d, p) {
r(this, t);var f = i(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e, n, o, a, c, u));return f._iceCheckingStartedTimestamp = null, f._gatheringStartedTimestamp = null, f._localVideoActive = !0, f._remoteVideoActive = !0, f._gatheringReported = !1, f.bridgeWebSocketUrl = null, f.lasticecandidate = !1, f.closed = !1, f.isInitiator = d, f.isP2P = l, f.signalingLayer = new m.a(), f.webrtcIceUdpDisable = Boolean(p.webrtcIceUdpDisable), f.webrtcIceTcpDisable = Boolean(p.webrtcIceTcpDisable), f.failICE = Boolean(p.failICE), f.modificationQueue = s.a.queue(f._processQueueTasks.bind(f), 1), f.wasConnected = !1, f.establishmentDuration = void 0, f;
}return o(t, e), S(t, null, [{ key: "parseVideoSenders", value: function value(e) {
var t = e.find('>content[name="video"]');if (t.length) {
var n = t[0].getAttribute("senders");if ("both" === n || "initiator" === n || "responder" === n || "none" === n) return n;
}return null;
} }]), S(t, [{ key: "_assertNotEnded", value: function value(e) {
return this.state !== b.a || (E.log("The session has ended - cancelling action: " + e), !1);
} }, { key: "doInitialize", value: function value() {
var e = this;this.lasticecandidate = !1, this.isreconnect = !1, this.wasstable = !1, this.isP2P ? this.peerconnection = this.rtc.createPeerConnection(this.signalingLayer, this.iceConfig, this.isP2P, { disableSimulcast: !0, disableRtx: this.room.options.disableRtx, preferH264: this.room.options.p2p && this.room.options.p2p.preferH264 }) : this.peerconnection = this.rtc.createPeerConnection(this.signalingLayer, this.iceConfig, this.isP2P, { disableSimulcast: this.room.options.disableSimulcast || this.room.options.preferH264, disableRtx: this.room.options.disableRtx, preferH264: this.room.options.preferH264, enableFirefoxSimulcast: this.room.options.testing && this.room.options.testing.enableFirefoxSimulcast }), this.peerconnection.onicecandidate = function (t) {
if (t) {
var n = t.candidate,
r = window.performance.now();if (n) {
null === e._gatheringStartedTimestamp && (e._gatheringStartedTimestamp = r);var i = n.protocol;if ("string" == typeof i) if ("tcp" === (i = i.toLowerCase()) || "ssltcp" === i) {
if (e.webrtcIceTcpDisable) return;
} else if ("udp" === i && e.webrtcIceUdpDisable) return;
} else if (!e._gatheringReported) {
var o = e.isP2P ? "p2p.ice." : "ice.";o += e.isInitiator ? "initiator" : "responder", o += ".gatheringDuration", v.a.analytics.sendEvent(o, { value: r - e._gatheringStartedTimestamp }), e._gatheringReported = !0;
}e.sendIceCandidate(n);
}
}, this.peerconnection.onsignalingstatechange = function () {
e.peerconnection && ("stable" === e.peerconnection.signalingState ? e.wasstable = !0 : "closed" !== e.peerconnection.signalingState && "closed" !== e.peerconnection.connectionState || e.closed || e.room.eventEmitter.emit(y.a.SUSPEND_DETECTED, e));
}, this.peerconnection.oniceconnectionstatechange = function () {
if (e.peerconnection && e._assertNotEnded("oniceconnectionstatechange")) {
var t = window.performance.now();switch (e.isP2P || (e.room.connectionTimes["ice.state." + e.peerconnection.iceConnectionState] = t), E.log("(TIME) ICE " + e.peerconnection.iceConnectionState + " P2P? " + e.isP2P + ":\t", t), v.a.analytics.sendEvent((e.isP2P ? "p2p.ice." : "ice.") + e.peerconnection.iceConnectionState, { value: t }), e.room.eventEmitter.emit(y.a.ICE_CONNECTION_STATE_CHANGED, e, e.peerconnection.iceConnectionState), e.peerconnection.iceConnectionState) {case "checking":
e._iceCheckingStartedTimestamp = t;break;case "connected":
if ("stable" === e.peerconnection.signalingState && e.isreconnect && e.room.eventEmitter.emit(y.a.CONNECTION_RESTORED, e), !e.wasConnected && e.wasstable) {
var n = e.isP2P ? "p2p.ice." : "ice.";n += e.isInitiator ? "initiator." : "responder.", v.a.analytics.sendEvent(n + "checksDuration", { value: t - e._iceCheckingStartedTimestamp });var r = Math.min(e._iceCheckingStartedTimestamp, e._gatheringStartedTimestamp);e.establishmentDuration = t - r, v.a.analytics.sendEvent(n + "establishmentDuration", { value: e.establishmentDuration }), e.wasConnected = !0, e.room.eventEmitter.emit(y.a.CONNECTION_ESTABLISHED, e);
}e.isreconnect = !1;break;case "disconnected":
if (e.closed) break;e.isreconnect = !0, e.wasstable && e.room.eventEmitter.emit(y.a.CONNECTION_INTERRUPTED, e);break;case "failed":
e.room.eventEmitter.emit(y.a.CONNECTION_ICE_FAILED, e), e.room.eventEmitter.emit(y.a.CONFERENCE_SETUP_FAILED, e, new Error("ICE fail"));}
}
}, this.peerconnection.onnegotiationneeded = function () {
e.room.eventEmitter.emit(y.a.PEERCONNECTION_READY, e);
}, this.signalingLayer.setChatRoom(this.room);
} }, { key: "sendIceCandidate", value: function value(e) {
var t = this,
n = new p.a(this.peerconnection.localDescription.sdp);if (e && !this.lasticecandidate) {
var r = h.a.iceparams(n.media[e.sdpMLineIndex], n.session),
i = h.a.candidateToJingle(e.candidate);if (!r || !i) return l.a.callErrorHandler(new Error("failed to get ice && jcand")), void E.error("failed to get ice && jcand");r.xmlns = "urn:xmpp:jingle:transports:ice-udp:1", this.usedrip ? (0 === this.dripContainer.length && setTimeout(function () {
0 !== t.dripContainer.length && (t.sendIceCandidates(t.dripContainer), t.dripContainer = []);
}, 20), this.dripContainer.push(e)) : this.sendIceCandidates([e]);
} else E.log("sendIceCandidate: last candidate."), this.lasticecandidate = !0;
} }, { key: "sendIceCandidates", value: function value(e) {
var t = this;if (this._assertNotEnded("sendIceCandidates")) {
E.log("sendIceCandidates", e);for (var n = $iq({ to: this.peerjid, type: "set" }).c("jingle", { xmlns: "urn:xmpp:jingle:1", action: "transport-info", initiator: this.initiator, sid: this.sid }), r = new p.a(this.peerconnection.localDescription.sdp), i = 0; i < r.media.length; i++) {
!function (i) {
var o = e.filter(function (e) {
return e.sdpMLineIndex === i;
}),
a = h.a.parseMLine(r.media[i].split("\r\n")[0]);if (o.length > 0) {
var s = h.a.iceparams(r.media[i], r.session);s.xmlns = "urn:xmpp:jingle:transports:ice-udp:1", n.c("content", { creator: t.initiator === t.localJid ? "initiator" : "responder", name: o[0].sdpMid ? o[0].sdpMid : a.media }).c("transport", s);for (var c = 0; c < o.length; c++) {
var u = h.a.candidateToJingle(o[c].candidate);t.failICE && (u.ip = "1.1.1.1"), n.c("candidate", u).up();
}var l = h.a.findLine(r.media[i], "a=fingerprint:", r.session);if (l) {
var d = h.a.parseFingerprint(l);d.required = !0, n.c("fingerprint", { xmlns: "urn:xmpp:jingle:apps:dtls:0" }).t(d.fingerprint), delete d.fingerprint, n.attrs(d), n.up();
}n.up(), n.up();
}
}(i);
}this.connection.sendIQ(n, null, this.newJingleErrorHandler(n), 1e4);
}
} }, { key: "addIceCandidates", value: function value(e) {
var t = this;if ("closed" === this.peerconnection.signalingState) return void E.warn("Ignored add ICE candidate when in closed state");var n = [];if (e.find(">content>transport>candidate").each(function (e, t) {
var r = h.a.candidateFromJingle(t);r = r.replace("\r\n", "").replace("a=", "");var i = new RTCIceCandidate({ sdpMLineIndex: 0, sdpMid: "", candidate: r });n.push(i);
}), !n.length) return void E.error("No ICE candidates to add ?", e[0] && e[0].outerHTML);var r = function r(e) {
var r = !0,
i = !1,
o = void 0;try {
for (var a, s = n[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(r = (a = s.next()).done); r = !0) {
var c = a.value;t.peerconnection.addIceCandidate(c, function () {
E.debug("addIceCandidate ok!");
}, function (e) {
E.error("addIceCandidate failed!", e);
});
}
} catch (e) {
i = !0, o = e;
} finally {
try {
!r && s.return && s.return();
} finally {
if (i) throw o;
}
}e();
};E.debug("Queued add (" + n.length + ") ICE candidates task..."), this.modificationQueue.push(r);
} }, { key: "readSsrcInfo", value: function value(e) {
var t = this;$(e).find('>description>source[xmlns="urn:xmpp:jingle:apps:rtp:ssma:0"]').each(function (e, n) {
var r = Number(n.getAttribute("ssrc"));t.isP2P ? t.signalingLayer.setSSRCOwner(r, Strophe.getResourceFromJid(t.peerjid)) : $(n).find('>ssrc-info[xmlns="http://jitsi.org/jitmeet"]').each(function (e, n) {
var i = n.getAttribute("owner");i && i.length && (isNaN(r) || r < 0 ? E.warn("Invalid SSRC " + r + " value received for " + i) : t.signalingLayer.setSSRCOwner(r, Strophe.getResourceFromJid(i)));
});
});
} }, { key: "readBridgeWebSocketUrl", value: function value(e) {
var t = $(e).find("transport>web-socket").first();1 === t.length && (this.bridgeWebSocketUrl = t[0].getAttribute("url"));
} }, { key: "generateRecvonlySsrc", value: function value() {
this.peerconnection ? this.peerconnection.generateRecvonlySsrc() : E.error("Unable to generate recvonly SSRC - no peerconnection");
} }, { key: "acceptOffer", value: function value(e, t, n, r) {
var i = this;this.setOfferAnswerCycle(e, function () {
i.sendSessionAccept(t, n);
}, n, r);
} }, { key: "invite", value: function value(e) {
var t = this;if (!this.isInitiator) throw new Error("Trying to invite from the responder session");var n = function n(_n4) {
var r = !0,
i = !1,
o = void 0;try {
for (var a, s = e[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(r = (a = s.next()).done); r = !0) {
var c = a.value;t.peerconnection.addTrack(c);
}
} catch (e) {
i = !0, o = e;
} finally {
try {
!r && s.return && s.return();
} finally {
if (i) throw o;
}
}t.peerconnection.createOffer(function (e) {
t.sendSessionInitiate(e, _n4, _n4);
}, function (e) {
E.error("Failed to create an offer", e, t.mediaConstraints), _n4(e);
}, t.mediaConstraints);
};this.modificationQueue.push(n, function (e) {
e ? E.error("invite error", e) : E.debug("invite executed - OK");
});
} }, { key: "sendSessionInitiate", value: function value(e, t, n) {
var r = this;E.log("createdOffer", e);var i = function i() {
var e = $iq({ to: r.peerjid, type: "set" }).c("jingle", { xmlns: "urn:xmpp:jingle:1", action: "session-initiate", initiator: r.initiator, sid: r.sid });new p.a(r.peerconnection.localDescription.sdp).toJingle(e, r.initiator === r.me ? "initiator" : "responder"), e = e.tree(), E.info("Session-initiate: ", e), r.connection.sendIQ(e, function () {
E.info('Got RESULT for "session-initiate"');
}, function (e) {
E.error('"session-initiate" error', e);
}, 1e4), t();
};this.peerconnection.setLocalDescription(e, i, function (e) {
E.error("session-init setLocalDescription failed", e), n(e);
});
} }, { key: "setAnswer", value: function value(e) {
if (!this.isInitiator) throw new Error("Trying to set an answer on the responder session");this.setOfferAnswerCycle(e, function () {
E.info("setAnswer - succeeded");
}, function (e) {
E.error("setAnswer failed: ", e);
});
} }, { key: "setOfferAnswerCycle", value: function value(e, n, r, i) {
var o = this,
a = function a(n) {
if (i) {
var r = !0,
a = !1,
s = void 0;try {
for (var c, u = i[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(r = (c = u.next()).done); r = !0) {
var l = c.value;o.peerconnection.addTrack(l);
}
} catch (e) {
a = !0, s = e;
} finally {
try {
!r && u.return && u.return();
} finally {
if (a) throw s;
}
}
}var d = o._processNewJingleOfferIq(e),
f = o.peerconnection.localDescription.sdp;o._renegotiate(d.raw).then(function () {
if (o.state === b.b && (o.state = b.c, o.isP2P && !o._localVideoActive && o.sendContentModify(o._localVideoActive)), f) {
var e = new p.a(o.peerconnection.localDescription.sdp);o.notifyMySSRCUpdate(new p.a(f), e);
}n();
}, function (e) {
E.error("Error renegotiating after setting new remote " + (o.isInitiator ? "answer: " : "offer: ") + e, d), t.onJingleFatalError(o, e), n(e);
});
};this.modificationQueue.push(a, function (e) {
e ? r(e) : n();
});
} }, { key: "replaceTransport", value: function value(e, t, n) {
var r = this;this.room.eventEmitter.emit(y.a.ICE_RESTARTING, this);var i = e.clone();e.find(">content[name='data']").remove(), this.setOfferAnswerCycle(e, function () {
r.setOfferAnswerCycle(i, function () {
var e = new p.a(r.peerconnection.localDescription.sdp);r.sendTransportAccept(e, t, n);
}, n);
}, n);
} }, { key: "sendSessionAccept", value: function value(e, t) {
var n = this,
r = new p.a(this.peerconnection.localDescription.sdp),
i = $iq({ to: this.peerjid, type: "set" }).c("jingle", { xmlns: "urn:xmpp:jingle:1", action: "session-accept", initiator: this.initiator, responder: this.responder, sid: this.sid });this.webrtcIceTcpDisable && (r.removeTcpCandidates = !0), this.webrtcIceUdpDisable && (r.removeUdpCandidates = !0), this.failICE && (r.failICE = !0), r.toJingle(i, this.initiator === this.localJid ? "initiator" : "responder", null), i = i.tree(), E.info("Sending session-accept", i), this.connection.sendIQ(i, e, this.newJingleErrorHandler(i, function (e) {
t(e), n.room.eventEmitter.emit(y.a.SESSION_ACCEPT_TIMEOUT, n);
}), 1e4);
} }, { key: "sendContentModify", value: function value(e) {
var t = e ? "both" : "none",
n = $iq({ to: this.peerjid, type: "set" }).c("jingle", { xmlns: "urn:xmpp:jingle:1", action: "content-modify", initiator: this.initiator, sid: this.sid }).c("content", { name: "video", senders: t });E.info("Sending content-modify, video senders: " + t), this.connection.sendIQ(n, null, this.newJingleErrorHandler(n), 1e4);
} }, { key: "sendTransportAccept", value: function value(e, t, n) {
var r = this,
i = $iq({ to: this.peerjid, type: "set" }).c("jingle", { xmlns: "urn:xmpp:jingle:1", action: "transport-accept", initiator: this.initiator, sid: this.sid });e.media.forEach(function (t, n) {
var o = h.a.parseMLine(t.split("\r\n")[0]);i.c("content", { creator: r.initiator === r.localJid ? "initiator" : "responder", name: o.media }), e.transportToJingle(n, i), i.up();
}), i = i.tree(), E.info("Sending transport-accept: ", i), this.connection.sendIQ(i, t, this.newJingleErrorHandler(i, n), 1e4);
} }, { key: "sendTransportReject", value: function value(e, t) {
var n = $iq({ to: this.peerjid, type: "set" }).c("jingle", { xmlns: "urn:xmpp:jingle:1", action: "transport-reject", initiator: this.initiator, sid: this.sid });n = n.tree(), E.info("Sending 'transport-reject", n), this.connection.sendIQ(n, e, this.newJingleErrorHandler(n, t), 1e4);
} }, { key: "terminate", value: function value(e, t, n) {
if (this.state !== b.a) {
if (!n || Boolean(n.sendSessionTerminate)) {
var r = $iq({ to: this.peerjid, type: "set" }).c("jingle", { xmlns: "urn:xmpp:jingle:1", action: "session-terminate", initiator: this.initiator, sid: this.sid }).c("reason").c(n && n.reason || "success");n && n.reasonDescription && r.up().c("text").t(n.reasonDescription), r = r.tree(), E.info("Sending session-terminate", r), this.connection.sendIQ(r, e, this.newJingleErrorHandler(r, t), 1e4);
} else E.info("Skipped sending session-terminate for " + this);this.connection.jingle.terminate(this.sid);
}
} }, { key: "onTerminated", value: function value(e, t) {
this.state = b.a, this.establishmentDuration = void 0, E.info("Session terminated " + this, e, t), this.close();
} }, { key: "_parseSsrcInfoFromSourceAdd", value: function value(e, t) {
var n = [];return $(e).each(function (e, r) {
var i = $(r).attr("name"),
o = "";$(r).find('ssrc-group[xmlns="urn:xmpp:jingle:apps:rtp:ssma:0"]').each(function () {
var e = this.getAttribute("semantics"),
t = $(this).find(">source").map(function () {
return this.getAttribute("ssrc");
}).get();t.length && (o += "a=ssrc-group:" + e + " " + t.join(" ") + "\r\n");
}), $(r).find('source[xmlns="urn:xmpp:jingle:apps:rtp:ssma:0"]').each(function () {
var e = $(this).attr("ssrc");if (t.containsSSRC(e)) return void E.warn("Source-add request for existing SSRC: " + e);$(this).find(">parameter").each(function () {
o += "a=ssrc:" + e + " " + $(this).attr("name"), $(this).attr("value") && $(this).attr("value").length && (o += ":" + $(this).attr("value")), o += "\r\n";
});
}), t.media.forEach(function (e, t) {
h.a.findLine(e, "a=mid:" + i) && (n[t] || (n[t] = ""), n[t] += o);
});
}), n;
} }, { key: "addRemoteStream", value: function value(e) {
this._addOrRemoveRemoteStream(!0, e);
} }, { key: "removeRemoteStream", value: function value(e) {
this._addOrRemoveRemoteStream(!1, e);
} }, { key: "_addOrRemoveRemoteStream", value: function value(e, t) {
var n = this,
r = e ? "addRemoteStream" : "removeRemoteStream";e && this.readSsrcInfo(t);var i = function (_i3) {
function i(_x6) {
return _i3.apply(this, arguments);
}
i.toString = function () {
return _i3.toString();
};
return i;
}(function (i) {
if (!n.peerconnection.localDescription || !n.peerconnection.localDescription.sdp) {
var o = r + " - localDescription not ready yet";return E.error(o), void i(o);
}E.log("Processing " + r), E.log("ICE connection state: ", n.peerconnection.iceConnectionState);var a = new p.a(n.peerconnection.localDescription.sdp),
s = new p.a(n.peerconnection.remoteDescription.sdp),
c = e ? n._parseSsrcInfoFromSourceAdd(t, s) : n._parseSsrcInfoFromSourceRemove(t, s),
u = e ? n._processRemoteAddSource(c) : n._processRemoteRemoveSource(c);n._renegotiate(u.raw).then(function () {
var e = new p.a(n.peerconnection.localDescription.sdp);E.log(r + " - OK, SDPs: ", a, e), n.notifyMySSRCUpdate(a, e), i();
}, function (e) {
E.error(r + " failed:", e), i(e);
});
});this.modificationQueue.push(i);
} }, { key: "_processQueueTasks", value: function value(e, t) {
e(t);
} }, { key: "_processNewJingleOfferIq", value: function value(e) {
var t = new p.a("");return this.webrtcIceTcpDisable && (t.removeTcpCandidates = !0), this.webrtcIceUdpDisable && (t.removeUdpCandidates = !0), this.failICE && (t.failICE = !0), t.fromJingle(e), this.readSsrcInfo($(e).find(">content")), this.readBridgeWebSocketUrl($(e).find(">content")), t;
} }, { key: "_processRemoteRemoveSource", value: function value(e) {
var t = new p.a(this.peerconnection.remoteDescription.sdp);return e.forEach(function (e, n) {
e = e.split("\r\n"), e.pop(), e.forEach(function (e) {
t.media[n] = t.media[n].replace(e + "\r\n", "");
});
}), t.raw = t.session + t.media.join(""), t;
} }, { key: "_processRemoteAddSource", value: function value(e) {
var t = new p.a(this.peerconnection.remoteDescription.sdp);return e.forEach(function (e, n) {
t.media[n] += e;
}), t.raw = t.session + t.media.join(""), t;
} }, { key: "_renegotiate", value: function value(e) {
var t = this,
n = e || this.peerconnection.remoteDescription.sdp;if (!n) return Promise.reject("Can not renegotiate without remote description,- current state: " + this.state);var r = new RTCSessionDescription({ type: this.isInitiator ? "answer" : "offer", sdp: n });return new Promise(function (e, n) {
if ("closed" === t.peerconnection.signalingState) return void n("Attempted to renegotiate in state closed");t.isInitiator ? t._initiatorRenegotiate(r, e, n) : t._responderRenegotiate(r, e, n);
});
} }, { key: "_responderRenegotiate", value: function value(e, t, n) {
var r = this;E.debug("Renegotiate: setting remote description"), this.peerconnection.setRemoteDescription(e, function () {
E.debug("Renegotiate: creating answer"), r.peerconnection.createAnswer(function (e) {
E.debug("Renegotiate: setting local description"), r.peerconnection.setLocalDescription(e, function () {
t();
}, function (e) {
n("setLocalDescription failed: " + e);
});
}, function (e) {
return n("createAnswer failed: " + e);
}, r.mediaConstraints);
}, function (e) {
return n("setRemoteDescription failed: " + e);
});
} }, { key: "_initiatorRenegotiate", value: function value(e, t, n) {
var r = this;"have-local-offer" === this.peerconnection.signalingState ? (E.debug("Renegotiate: setting remote description"), this.peerconnection.setRemoteDescription(e, function () {
t();
}, function (e) {
return n("setRemoteDescription failed: " + e);
})) : (E.debug("Renegotiate: creating offer"), this.peerconnection.createOffer(function (i) {
E.debug("Renegotiate: setting local description"), r.peerconnection.setLocalDescription(i, function () {
E.debug("Renegotiate: setting remote description"), r.peerconnection.setRemoteDescription(e, function () {
t();
}, function (e) {
return n("setRemoteDescription failed: " + e);
});
}, function (e) {
n("setLocalDescription failed: ", e);
});
}, function (e) {
return n("createOffer failed: " + e);
}, this.mediaConstraints));
} }, { key: "replaceTrack", value: function value(e, t) {
var n = this,
r = function r(_r) {
if ("closed" === n.peerconnection.signalingState || "closed" === n.peerconnection.connectionState || n.closed) return void _r();var i = n.peerconnection.localDescription.sdp;!e && t && t.isVideoTrack() ? n.peerconnection.clearRecvonlySsrc() : e && e.isVideoTrack() && !t && (n.peerconnection.clearRecvonlySsrc(), n.peerconnection.generateRecvonlySsrc()), e && n.peerconnection.removeTrack(e), t && n.peerconnection.addTrack(t), (e || t) && n.state === b.c ? n._renegotiate().then(function () {
var e = new p.a(n.peerconnection.localDescription.sdp);n.notifyMySSRCUpdate(new p.a(i), e), _r();
}, _r) : _r();
};this.modificationQueue.push(r, function (e) {
e ? E.error("Replace track error:", e) : E.info("Replace track done!");
});
} }, { key: "_parseSsrcInfoFromSourceRemove", value: function value(e, t) {
var n = [];return $(e).each(function (e, r) {
var i = $(r).attr("name"),
o = "";$(r).find('ssrc-group[xmlns="urn:xmpp:jingle:apps:rtp:ssma:0"]').each(function () {
var e = this.getAttribute("semantics"),
t = $(this).find(">source").map(function () {
return this.getAttribute("ssrc");
}).get();t.length && (o += "a=ssrc-group:" + e + " " + t.join(" ") + "\r\n");
});var a = [];$(r).find('source[xmlns="urn:xmpp:jingle:apps:rtp:ssma:0"]').each(function () {
var e = $(this).attr("ssrc");a.push(e);
}), t.media.forEach(function (e, t) {
h.a.findLine(e, "a=mid:" + i) && (n[t] || (n[t] = ""), a.forEach(function (r) {
var i = h.a.findLines(e, "a=ssrc:" + r);i.length && (n[t] += i.join("\r\n") + "\r\n");
}), n[t] += o);
});
}), n;
} }, { key: "_verifyNoSSRCChanged", value: function value(e, t) {
var n = new p.a(this.peerconnection.localDescription.sdp),
r = new f.a(t, n),
i = r.getNewMedia();if (Object.keys(i).length) return E.error("Some SSRC were added on " + e, i), !1;r = new f.a(n, t);var o = r.getNewMedia();return !Object.keys(o).length || (E.error("Some SSRCs were removed on " + e, o), !1);
} }, { key: "addTrackAsUnmute", value: function value(e) {
return this._addRemoveTrackAsMuteUnmute(!1, e);
} }, { key: "removeTrackAsMute", value: function value(e) {
return this._addRemoveTrackAsMuteUnmute(!0, e);
} }, { key: "_addRemoveTrackAsMuteUnmute", value: function value(e, t) {
var n = this;if (!t) return Promise.reject('invalid "track" argument value');var r = e ? "removeTrackMute" : "addTrackUnmute",
i = function (_i4) {
function i(_x7) {
return _i4.apply(this, arguments);
}
i.toString = function () {
return _i4.toString();
};
return i;
}(function (i) {
var o = n.peerconnection;if (!o) return void i("Error: tried " + r + " track with no active peerconnection");var a = o.localDescription.sdp;(e ? o.removeTrackMute.bind(o, t) : o.addTrackUnmute.bind(o, t))() ? a && o.remoteDescription.sdp ? n._renegotiate().then(function () {
n._verifyNoSSRCChanged(r, new p.a(a)), i();
}, i) : i() : i(r + " failed!");
});return new Promise(function (e, t) {
n.modificationQueue.push(i, function (n) {
n ? t(n) : e();
});
});
} }, { key: "setMediaTransferActive", value: function value(e, t) {
var n = this;if (!this.peerconnection) return Promise.reject('Can not modify transfer active state, before "initialize" is called');var r = e ? "audio active" : "audio inactive",
i = t ? "video active" : "video inactive";E.info("Queued make " + i + ", " + r + " task...");var o = function o(r) {
var i = n.state === b.c,
o = n.peerconnection.setAudioTransferActive(e);n._localVideoActive !== t && (n._localVideoActive = t, n.isP2P && i && n.sendContentModify(t));var a = n.peerconnection.setVideoTransferActive(n._localVideoActive && n._remoteVideoActive);i && (o || a) ? n._renegotiate().then(r, r) : r();
};return new Promise(function (e, t) {
n.modificationQueue.push(o, function (n) {
n ? t(n) : e();
});
});
} }, { key: "modifyContents", value: function value(e) {
var n = this,
r = t.parseVideoSenders(e);if (null === r) return void E.error(this + ' - failed to parse video "senders" attribute in"content-modify" action');var i = function i(e) {
n._assertNotEnded("content-modify") && n._modifyRemoteVideoActive(r) ? n._renegotiate().then(e, e) : e();
};E.debug(this + ' queued "content-modify" task(video senders="' + r + '")'), this.modificationQueue.push(i, function (e) {
e && E.error('"content-modify" failed', e);
});
} }, { key: "_modifyRemoteVideoActive", value: function value(e) {
var t = "both" === e || "initiator" === e && this.isInitiator || "responder" === e && !this.isInitiator;return t !== this._remoteVideoActive && (E.debug(this + " new remote video active: " + t), this._remoteVideoActive = t), this.peerconnection.setVideoTransferActive(this._localVideoActive && this._remoteVideoActive);
} }, { key: "notifyMySSRCUpdate", value: function value(e, t) {
if (this.state !== b.c) return void E.warn("Skipping SSRC update in '" + this.state + " ' state.");var n = new f.a(t, e),
r = $iq({ to: this.peerjid, type: "set" }).c("jingle", { xmlns: "urn:xmpp:jingle:1", action: "source-remove", initiator: this.initiator, sid: this.sid });n.toJingle(r) ? (E.info("Sending source-remove", r.tree()), this.connection.sendIQ(r, null, this.newJingleErrorHandler(r, function (e) {
l.a.callErrorHandler(new Error("Jingle error: " + JSON.stringify(e)));
}), 1e4)) : E.log("removal not necessary"), n = new f.a(e, t);var i = $iq({ to: this.peerjid, type: "set" }).c("jingle", { xmlns: "urn:xmpp:jingle:1", action: "source-add", initiator: this.initiator, sid: this.sid });n.toJingle(i) ? (E.info("Sending source-add", i.tree()), this.connection.sendIQ(i, null, this.newJingleErrorHandler(i, function (e) {
l.a.callErrorHandler(new Error("Jingle error: " + JSON.stringify(e)));
}), 1e4)) : E.log("addition not necessary");
} }, { key: "newJingleErrorHandler", value: function value(e, t) {
var n = this;return function (r) {
var i = {},
o = $(r).find("error");if (o.length) {
i.code = o.attr("code");var a = $(r).find("error :first");a.length && (i.reason = a[0].tagName);
}r || (i.reason = "timeout"), i.source = e, e && "function" == typeof e.tree && (i.source = e.tree()), i.source && i.source.outerHTML && (i.source = i.source.outerHTML), i.session = n.toString(), t ? t(i) : n.state === b.a && "item-not-found" === i.reason ? E.debug("Jingle error", i) : l.a.callErrorHandler(new Error("Jingle error: " + JSON.stringify(i)));
};
} }, { key: "getIceConnectionState", value: function value() {
return this.peerconnection.iceConnectionState;
} }, { key: "close", value: function value() {
this.closed = !0, this.signalingLayer.setChatRoom(null), this.peerconnection && (this.peerconnection.signalingState && "closed" !== this.peerconnection.signalingState || this.peerconnection.connectionState && "closed" !== this.peerconnection.connectionState) && this.peerconnection.close();
} }, { key: "toString", value: function value() {
return "JingleSessionPC[p2p=" + this.isP2P + ",initiator=" + this.isInitiator + ",sid=" + this.sid + "]";
} }], [{ key: "onJingleFatalError", value: function value(e, t) {
this.room && (this.room.eventEmitter.emit(y.a.CONFERENCE_SETUP_FAILED, e, t), this.room.eventEmitter.emit(y.a.JINGLE_FATAL_ERROR, e, t));
} }]), t;
}(d.a);t.a = T;
}).call(t, "modules/xmpp/JingleSessionPC.js");
}, function (e, t, n) {
"use strict";
(function (e) {
function r(e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
}function i(e, t, n) {
u.debug("Updating mline to associate " + n + "rtx ssrc with primary stream, " + t.id);var r = t.id,
i = t.msid,
o = t.cname,
a = e.getRtxSSRC(r);if (a === n) return void u.debug(n + " was already associated with " + r);a && (u.debug(r + " was previously associated with rtx" + a + ", removing all references to it"), e.removeSSRC(a), u.debug("groups before filtering for " + a), u.debug(e.dumpSSRCGroups()), e.removeGroupsWithSSRC(a)), e.addSSRCAttribute({ id: n, attribute: "cname", value: o }), e.addSSRCAttribute({ id: n, attribute: "msid", value: i }), e.addSSRCGroup({ semantics: "FID", ssrcs: r + " " + n });
}var o = n(0),
a = (n.n(o), n(24)),
s = n(12),
c = function () {
function e(e, t) {
for (var n = 0; n < t.length; n++) {
var r = t[n];r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
}
}return function (t, n, r) {
return n && e(t.prototype, n), r && e(t, r), t;
};
}(),
u = n.i(o.getLogger)(e),
l = function () {
function e() {
r(this, e), this.correspondingRtxSsrcs = new Map();
}return c(e, [{ key: "clearSsrcCache", value: function value() {
this.correspondingRtxSsrcs.clear();
} }, { key: "setSsrcCache", value: function value(e) {
u.debug("Setting ssrc cache to ", e), this.correspondingRtxSsrcs = e;
} }, { key: "modifyRtxSsrcs", value: function value(e) {
var t = new a.a(e),
n = t.selectMedia("video");return n ? this.modifyRtxSsrcs2(n) ? t.toRawSDP() : e : (u.error("No 'video' media found in the sdp: " + e), e);
} }, { key: "modifyRtxSsrcs2", value: function value(e) {
if ("recvonly" === e.direction) return u.debug("RtxModifier doing nothing, video m line is recvonly"), !1;if (e.getSSRCCount() < 1) return u.debug("RtxModifier doing nothing, no video ssrcs present"), !1;u.debug("Current ssrc mapping: ", this.correspondingRtxSsrcs);var t = e.getPrimaryVideoSSRCs();u.debug("Parsed primary video ssrcs ", t, " making sure all have rtx streams");var n = !0,
r = !1,
o = void 0;try {
for (var a, c = t[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(n = (a = c.next()).done); n = !0) {
var l = a.value,
d = e.getSSRCAttrValue(l, "msid"),
p = e.getSSRCAttrValue(l, "cname"),
f = this.correspondingRtxSsrcs.get(l);if (f) u.debug("Already have an associated rtx ssrc forvideo ssrc " + l + ": " + f);else {
u.debug("No previously associated rtx ssrc for video ssrc " + l);var h = e.getRtxSSRC(l);h ? (u.debug("Rtx stream " + h + " already existed in the sdp as an rtx stream for " + l), f = h) : (f = s.a.generateSsrc(), u.debug("Generated rtx ssrc " + f + " for ssrc " + l)), u.debug("Caching rtx ssrc " + f + " for video ssrc " + l), this.correspondingRtxSsrcs.set(l, f);
}i(e, { id: l, cname: p, msid: d }, f);
}
} catch (e) {
r = !0, o = e;
} finally {
try {
!n && c.return && c.return();
} finally {
if (r) throw o;
}
}return !0;
} }, { key: "stripRtx", value: function value(e) {
var t = new a.a(e),
r = t.selectMedia("video");if (!r) return u.error("No 'video' media found in the sdp: " + e), e;if ("recvonly" === r.direction) return u.debug("RtxModifier doing nothing, video m line is recvonly"), e;if (r.getSSRCCount() < 1) return u.debug("RtxModifier doing nothing, no video ssrcs present"), e;if (!r.containsAnySSRCGroups()) return u.debug("RtxModifier doing nothing, no video ssrcGroups present"), e;var i = r.findGroups("FID");r.removeGroupsBySemantics("FID");var o = !0,
s = !1,
c = void 0;try {
for (var l, d = i[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(o = (l = d.next()).done); o = !0) {
var p = l.value,
f = n.i(a.b)(p);r.removeSSRC(f);
}
} catch (e) {
s = !0, c = e;
} finally {
try {
!o && d.return && d.return();
} finally {
if (s) throw c;
}
}return t.toRawSDP();
} }]), e;
}();t.a = l;
}).call(t, "modules/xmpp/RtxModifier.js");
}, function (e, t, n) {
"use strict";
function r(e, t) {
if (!t) return !1;if (e.length !== t.length) return !1;for (var n = 0, r = e.length; n < r; n++) {
if (e[n] instanceof Array && t[n] instanceof Array) {
if (!e[n].equals(t[n])) return !1;
} else if (e[n] !== t[n]) return !1;
}return !0;
}function i(e, t) {
if (this.mySDP = e, this.otherSDP = t, !e) throw new Error('"mySDP" is undefined!');if (!t) throw new Error('"otherSDP" is undefined!');
}t.a = i;var o = n(12);i.prototype.getNewMedia = function () {
var e = this.mySDP.getMediaSsrcMap(),
t = this.otherSDP.getMediaSsrcMap(),
n = {};return Object.keys(t).forEach(function (i) {
var o = e[i],
a = t[i];if (!o && a) return void (n[i] = a);Object.keys(a.ssrcs).forEach(function (e) {
-1 === Object.keys(o.ssrcs).indexOf(e) && (n[i] || (n[i] = { mediaindex: a.mediaindex, mid: a.mid, ssrcs: {}, ssrcGroups: [] }), n[i].ssrcs[e] = a.ssrcs[e]);
}), a.ssrcGroups.forEach(function (e) {
for (var t = !1, s = 0; s < o.ssrcGroups.length; s++) {
var c = o.ssrcGroups[s];if (e.semantics === c.semantics && r(e.ssrcs, c.ssrcs)) {
t = !0;break;
}
}t || (n[i] || (n[i] = { mediaindex: a.mediaindex, mid: a.mid, ssrcs: {}, ssrcGroups: [] }), n[i].ssrcGroups.push(e));
});
}), n;
}, i.prototype.toJingle = function (e) {
var t = this.getNewMedia(),
n = !1;return Object.keys(t).forEach(function (r) {
n = !0;var i = t[r];e.c("content", { name: i.mid }), e.c("description", { xmlns: "urn:xmpp:jingle:apps:rtp:1", media: i.mid }), Object.keys(i.ssrcs).forEach(function (t) {
var n = i.ssrcs[t];e.c("source", { xmlns: "urn:xmpp:jingle:apps:rtp:ssma:0" }), e.attrs({ ssrc: n.ssrc }), n.lines.forEach(function (t) {
var n = t.indexOf(" "),
r = t.substr(n + 1);if (e.c("parameter"), -1 === r.indexOf(":")) e.attrs({ name: r });else {
var i = r.split(":", 2),
a = i[0],
s = o.a.filterSpecialChars(i[1]);e.attrs({ name: a }), e.attrs({ value: s });
}e.up();
}), e.up();
}), i.ssrcGroups.forEach(function (t) {
t.ssrcs.length && (e.c("ssrc-group", { semantics: t.semantics, xmlns: "urn:xmpp:jingle:apps:rtp:ssma:0" }), t.ssrcs.forEach(function (t) {
e.c("source", { ssrc: t }).up();
}), e.up());
}), e.up(), e.up();
}), n;
};
}, function (e, t, n) {
"use strict";
(function (e) {
function r(e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
}var i = n(0),
o = (n.n(i), n(24)),
a = function () {
function e(e, t) {
for (var n = 0; n < t.length; n++) {
var r = t[n];r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
}
}return function (t, n, r) {
return n && e(t.prototype, n), r && e(t, r), t;
};
}(),
s = n.i(i.getLogger)(e),
c = function () {
function e(t) {
r(this, e), this.clearVideoSsrcCache(), this.logPrefix = t;
}return a(e, [{ key: "clearVideoSsrcCache", value: function value() {
this.cachedPrimarySsrc = null, this.injectRecvOnly = !1;
} }, { key: "setPrimarySsrc", value: function value(e) {
if ("number" != typeof e) throw new Error("Primary SSRC must be a number!");this.cachedPrimarySsrc = e;
} }, { key: "hasPrimarySsrcCached", value: function value() {
return Boolean(this.cachedPrimarySsrc);
} }, { key: "makeVideoPrimarySsrcsConsistent", value: function value(e) {
var t = new o.a(e),
r = t.selectMedia("video");if (!r) return s.error(this.logPrefix + " no 'video' media found in the sdp: " + e), e;if ("recvonly" === r.direction) this.cachedPrimarySsrc && this.injectRecvOnly ? r.addSSRCAttribute({ id: this.cachedPrimarySsrc, attribute: "cname", value: "recvonly-" + this.cachedPrimarySsrc }) : s.info(this.logPrefix + " no SSRC found for the recvonly videostream!");else {
var i = r.getPrimaryVideoSsrc();if (!i) return s.info(this.logPrefix + " sdp-consistency couldn't parse new primary ssrc"), e;if (this.cachedPrimarySsrc) {
s.info(this.logPrefix + " sdp-consistency replacing new ssrc" + i + " with cached " + this.cachedPrimarySsrc), r.replaceSSRC(i, this.cachedPrimarySsrc);var a = !0,
c = !1,
u = void 0;try {
for (var l, d = r.ssrcGroups[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](); !(a = (l = d.next()).done); a = !0) {
var p = l.value;if ("FID" === p.semantics) {
var f = n.i(o.c)(p),
h = n.i(o.b)(p);f === i && (p.ssrcs = this.cachedPrimarySsrc + " " + h);
}
}
} catch (e) {
c = !0, u = e;
} finally {
try {
!a && d.return && d.return();
} finally {
if (c) throw u;
}
}
} else this.cachedPrimarySsrc = i, s.info(this.logPrefix + " sdp-consistency caching primary ssrc" + this.cachedPrimarySsrc);this.injectRecvOnly = !0;
}return t.toRawSDP();
} }]), e;
}();t.a = c;
}).call(t, "modules/xmpp/SdpConsistency.js");
}, function (e, t, n) {
"use strict";
(function (e) {
function r(e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
}function i(e, t) {
if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return !t || "object" != typeof t && "function" != typeof t ? e : t;
}function o(e, t) {
if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);
}var a = n(0),
s = (n.n(a), n(4)),
c = n(53),
u = n(137),
l = function () {
function e(e, t) {
for (var n = 0; n < t.length; n++) {
var r = t[n];r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
}
}return function (t, n, r) {
return n && e(t.prototype, n), r && e(t, r), t;
};
}(),
d = n.i(a.getLogger)(e),
p = function (e) {
function t() {
r(this, t);var e = i(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this));return e.ssrcOwners = new Map(), e.chatRoom = null, e;
}return o(t, e), l(t, [{ key: "setChatRoom", value: function value(e) {
var t = this,
n = this.chatRoom;this.chatRoom = e, n && (n.removePresenceListener("audiomuted", this._audioMuteHandler), n.removePresenceListener("videomuted", this._videoMuteHandler), n.removePresenceListener("videoType", this._videoTypeHandler)), e && (this._audioMuteHandler = function (e, n) {
t.eventEmitter.emit(c.b, n, s.a, "true" === e.value);
}, e.addPresenceListener("audiomuted", this._audioMuteHandler), this._videoMuteHandler = function (e, n) {
t.eventEmitter.emit(c.b, n, s.b, "true" === e.value);
}, e.addPresenceListener("videomuted", this._videoMuteHandler), this._videoTypeHandler = function (e, n) {
t.eventEmitter.emit(c.a, n, e.value);
}, e.addPresenceListener("videoType", this._videoTypeHandler));
} }, { key: "getPeerMediaInfo", value: function value(e, t) {
if (this.chatRoom) return this.chatRoom.getMediaPresenceInfo(e, t);d.error("Requested peer media info, before room was set");
} }, { key: "getSSRCOwner", value: function value(e) {
return this.ssrcOwners.get(e);
} }, { key: "setSSRCOwner", value: function value(e, t) {
if ("number" != typeof e) throw new TypeError("SSRC(" + e + ") must be a number");this.ssrcOwners.set(e, t);
} }]), t;
}(u.a);t.a = p;
}).call(t, "modules/xmpp/SignalingLayerImpl.js");
}, function (e, t, n) {
"use strict";
(function (e) {
function r(e) {
var t = 1;return function (n) {
if (n) return void (t = 1);var r = Math.pow(2, t - 1);return t += 1, r * e;
};
}function i(e, t, n, i) {
function o(e) {
if (e.data && e.data.sessionId) {
if (e.origin !== window.location.origin) return void s.warn("Ignoring sessionId from different origin: " + e.origin);a.a.setSessionId(e.data.sessionId);
}
}this.roomName = e, this.xmppService = t, this.getNextTimeout = r(1e3), this.getNextErrorTimeout = r(1e3), this.externalAuthEnabled = !1, this.options = i, this.sipGatewayEnabled = this.options.connection.hosts && void 0 !== this.options.connection.hosts.call_control, this.eventEmitter = n, this.connection = this.xmppService.connection, window.addEventListener ? window.addEventListener("message", o, !1) : window.attachEvent("onmessage", o);
}t.a = i;var o = n(2),
a = n(29),
s = n(0).getLogger(e),
c = n(7),
u = n(54),
l = n(3);i.prototype.isExternalAuthEnabled = function () {
return this.externalAuthEnabled;
}, i.prototype.isSipGatewayEnabled = function () {
return this.sipGatewayEnabled;
}, i.prototype.onMucMemberLeft = function (e) {
s.info("Someone left is it focus ? " + e), "focus" === Strophe.getResourceFromJid(e) && (s.info("Focus has left the room - leaving conference"), this.eventEmitter.emit(c.FOCUS_LEFT));
}, i.prototype.setFocusUserJid = function (e) {
this.focusUserJid || (this.focusUserJid = e, s.info("Focus jid set to: " + this.focusUserJid));
}, i.prototype.getFocusUserJid = function () {
return this.focusUserJid;
}, i.prototype.getFocusComponent = function () {
var e = this.options.connection.hosts.focus;return e || (e = "focus." + this.options.connection.hosts.domain), e;
}, i.prototype.createConferenceIq = function () {
var e = $iq({ to: this.getFocusComponent(), type: "set" }),
t = a.a.getSessionId(),
n = a.a.getMachineId();s.info("Session ID: " + t + " machine UID: " + n), e.c("conference", { xmlns: "http://jitsi.org/protocol/focus", room: this.roomName, "machine-uid": n }), t && e.attrs({ "session-id": t }), void 0 !== this.options.connection.enforcedBridge && e.c("property", { name: "enforcedBridge", value: this.options.connection.enforcedBridge }).up(), void 0 !== this.options.connection.hosts && void 0 !== this.options.connection.hosts.call_control && e.c("property", { name: "call_control", value: this.options.connection.hosts.call_control }).up(), void 0 !== this.options.conference.channelLastN && e.c("property", { name: "channelLastN", value: this.options.conference.channelLastN }).up(), e.c("property", { name: "disableRtx", value: Boolean(this.options.conference.disableRtx) }).up(), e.c("property", { name: "enableLipSync", value: !1 !== this.options.connection.enableLipSync }).up(), void 0 !== this.options.conference.audioPacketDelay && e.c("property", { name: "audioPacketDelay", value: this.options.conference.audioPacketDelay }).up(), this.options.conference.startBitrate && e.c("property", { name: "startBitrate", value: this.options.conference.startBitrate }).up(), this.options.conference.minBitrate && e.c("property", { name: "minBitrate", value: this.options.conference.minBitrate }).up();var r = void 0;switch (this.options.conference.openBridgeChannel) {case "datachannel":case !0:case void 0:
r = !0;break;case "websocket":
r = !1;}return r && !o.a.supportsDataChannels() && (r = !1), e.c("property", { name: "openSctp", value: r }).up(), void 0 !== this.options.conference.startAudioMuted && e.c("property", { name: "startAudioMuted", value: this.options.conference.startAudioMuted }).up(), void 0 !== this.options.conference.startVideoMuted && e.c("property", { name: "startVideoMuted", value: this.options.conference.startVideoMuted }).up(), void 0 !== this.options.conference.stereo && e.c("property", { name: "stereo", value: this.options.conference.stereo }).up(), void 0 !== this.options.conference.useRoomAsSharedDocumentName && e.c("property", { name: "useRoomAsSharedDocumentName", value: this.options.conference.useRoomAsSharedDocumentName }).up(), e.up(), e;
}, i.prototype.parseSessionId = function (e) {
var t = $(e).find("conference").attr("session-id");t && (s.info("Received sessionId: " + t), a.a.setSessionId(t));
}, i.prototype.parseConfigOptions = function (e) {
this.setFocusUserJid($(e).find("conference").attr("focusjid"));var t = $(e).find(">conference>property[name='authentication'][value='true']").length > 0;s.info("Authentication enabled: " + t), this.externalAuthEnabled = $(e).find(">conference>property[name='externalAuth'][value='true']").length > 0, s.info("External authentication enabled: " + this.externalAuthEnabled), this.externalAuthEnabled || this.parseSessionId(e);var n = $(e).find(">conference").attr("identity");this.eventEmitter.emit(u.IDENTITY_UPDATED, t, n), $(e).find(">conference>property[name='sipGatewayEnabled'][value='true']").length && (this.sipGatewayEnabled = !0), s.info("Sip gateway enabled: " + this.sipGatewayEnabled);
}, i.prototype.allocateConferenceFocus = function (e) {
var t = this;this.setFocusUserJid(this.options.connection.focusUserJid), this.connection.sendIQ(this.createConferenceIq(), function (n) {
return t._allocateConferenceFocusSuccess(n, e);
}, function (n) {
return t._allocateConferenceFocusError(n, e);
}), this.connection.flush();
}, i.prototype._allocateConferenceFocusError = function (e, t) {
var n = this,
r = $(e).find(">error>session-invalid").length;if (r && (s.info("Session expired! - removing"), a.a.clearSessionId()), $(e).find(">error>graceful-shutdown").length) return void this.eventEmitter.emit(c.GRACEFUL_SHUTDOWN);var i = $(e).find(">error>reservation-error");if (i.length) {
var o = i.attr("error-code"),
u = $(e).find(">error>text"),
d = void 0;return u && (d = u.text()), void this.eventEmitter.emit(c.RESERVATION_ERROR, o, d);
}if ($(e).find(">error>not-authorized").length) return s.warn("Unauthorized to start the conference", e), Strophe.getDomainFromJid(e.getAttribute("to")) !== this.options.connection.hosts.anonymousdomain && (this.externalAuthEnabled = !0), void this.eventEmitter.emit(c.AUTHENTICATION_REQUIRED);var p = this.getNextErrorTimeout(),
f = "Focus error, retry after " + p;l.callErrorHandler(new Error(f)), s.error(f, e);var h = this.getFocusComponent(),
m = p / 1e3;r || this.eventEmitter.emit(c.FOCUS_DISCONNECTED, h, m), this.getNextTimeout(!0), window.setTimeout(function () {
return n.allocateConferenceFocus(t);
}, p);
}, i.prototype._allocateConferenceFocusSuccess = function (e, t) {
var n = this;if (this.parseConfigOptions(e), this.getNextErrorTimeout(!0), "true" === $(e).find("conference").attr("ready")) this.getNextTimeout(!0), t();else {
var r = this.getNextTimeout();s.info("Waiting for the focus... " + r), window.setTimeout(function () {
return n.allocateConferenceFocus(t);
}, r);
}
}, i.prototype.authenticate = function () {
var e = this;return new Promise(function (t, n) {
e.connection.sendIQ(e.createConferenceIq(), function (n) {
e.parseSessionId(n), t();
}, function (e) {
var t = $(e).find(">error").attr("code");n(e, t);
});
});
}, i.prototype.getLoginUrl = function (e, t) {
this._getLoginUrl(!1, e, t);
}, i.prototype._getLoginUrl = function (e, t, n) {
function r(e, t) {
l.callErrorHandler(new Error(e)), s.error(e, t), n(t);
}var i = $iq({ to: this.getFocusComponent(), type: "get" }),
o = { xmlns: "http://jitsi.org/protocol/focus", room: this.roomName, "machine-uid": a.a.getMachineId() },
c = "auth url";e && (o.popup = !0, c = "POPUP " + c), i.c("login-url", o), this.connection.sendIQ(i, function (e) {
var n = $(e).find("login-url").attr("url");n = decodeURIComponent(n), n ? (s.info("Got " + c + ": " + n), t(n)) : r("Failed to get " + c + " from the focus", e);
}, r.bind(void 0, "Get " + c + " error"));
}, i.prototype.getPopupLoginUrl = function (e, t) {
this._getLoginUrl(!0, e, t);
}, i.prototype.logout = function (e) {
var t = $iq({ to: this.getFocusComponent(), type: "set" }),
n = a.a.getSessionId();if (!n) return void e();t.c("logout", { xmlns: "http://jitsi.org/protocol/focus", "session-id": n }), this.connection.sendIQ(t, function (t) {
var n = $(t).find("logout").attr("logout-url");n && (n = decodeURIComponent(n)), s.info("Log out OK, url: " + n, t), a.a.clearSessionId(), e(n);
}, function (e) {
l.callErrorHandler(new Error("Logout error")), s.error("Logout error", e);
});
};
}).call(t, "modules/xmpp/moderator.js");
}, function (e, t, n) {
"use strict";
(function (e) {
function r(e, t, n, i, o, a) {
this.eventEmitter = t, this.connection = n, this.state = null, this.focusMucJid = i, this.jirecon = o, this.url = null, this.type = e, this._isSupported = !(e === r.types.JIRECON && !this.jirecon || e !== r.types.JIBRI && e !== r.types.COLIBRI), this.jireconRid = null, this.roomjid = a;
}t.a = r;var i = n(0),
o = (n.n(i), n.i(i.getLogger)(e)),
a = n(7),
s = n(45),
c = n(3);r.types = { COLIBRI: "colibri", JIRECON: "jirecon", JIBRI: "jibri" }, r.status = { ON: "on", OFF: "off", AVAILABLE: "available", UNAVAILABLE: "unavailable", PENDING: "pending", RETRYING: "retrying", BUSY: "busy", FAILED: "failed" }, r.action = { START: "start", STOP: "stop" }, r.prototype.handleJibriPresence = function (e) {
var t = e.attributes;if (t) {
var n = t.status;o.log("Handle jibri presence : ", n), n !== this.state && ("undefined" === n ? this.state = r.status.UNAVAILABLE : n === r.status.OFF ? this.state && "undefined" !== this.state && this.state !== r.status.UNAVAILABLE ? this.state = r.status.OFF : this.state = r.status.AVAILABLE : this.state = n, this.eventEmitter.emit(a.RECORDER_STATE_CHANGED, this.state));
}
}, r.prototype.setRecordingJibri = function (e, t, n) {
var i = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : {};e === this.state && n(s.INVALID_STATE);var a = $iq({ to: this.focusMucJid, type: "set" }).c("jibri", { xmlns: "http://jitsi.org/protocol/jibri", action: e === r.status.ON ? r.action.START : r.action.STOP, streamid: i.streamId }).up();o.log("Set jibri recording: " + e, a.nodeTree), o.log(a.nodeTree), this.connection.sendIQ(a, function (e) {
o.log("Result", e);var n = $(e).find("jibri");t(n.attr("state"), n.attr("url"));
}, function (e) {
o.log("Failed to start recording, error: ", e), n(e);
});
}, r.prototype.setRecordingJirecon = function (e, t, n) {
e === this.state && n(new Error("Invalid state!"));var i = $iq({ to: this.jirecon, type: "set" }).c("recording", { xmlns: "http://jitsi.org/protocol/jirecon", action: e === r.status.ON ? r.action.START : r.action.STOP, mucjid: this.roomjid });e === r.status.OFF && i.attrs({ rid: this.jireconRid }), o.log("Start recording");var a = this;this.connection.sendIQ(i, function (n) {
a.jireconRid = $(n).find("recording").attr("rid"), o.log("Recording " + (e === r.status.ON ? "started" : "stopped") + "(jirecon)" + n), a.state = e, e === r.status.OFF && (a.jireconRid = null), t(e);
}, function (e) {
o.log("Failed to start recording, error: ", e), n(e);
});
}, r.prototype.setRecordingColibri = function (e, t, n, r) {
var i = $iq({ to: this.focusMucJid, type: "set" });i.c("conference", { xmlns: "http://jitsi.org/protocol/colibri" }), i.c("recording", { state: e, token: r.token });var a = this;this.connection.sendIQ(i, function (n) {
o.log('Set recording "', e, '". Result:', n);var r = $(n).find(">conference>recording"),
i = r.attr("state");a.state = i, t(i), "pending" === i && a.connection.addHandler(function (e) {
var n = $(e).find("recording").attr("state");n && (a.state = i, t(n));
}, "http://jitsi.org/protocol/colibri", "iq", null, null, null);
}, function (e) {
o.warn(e), n(e);
});
}, r.prototype.setRecording = function () {
switch (this.type) {case r.types.JIRECON:
this.setRecordingJirecon.apply(this, arguments);break;case r.types.COLIBRI:
this.setRecordingColibri.apply(this, arguments);break;case r.types.JIBRI:
this.setRecordingJibri.apply(this, arguments);break;default:
var e = "Unknown recording type!";c.callErrorHandler(new Error(e)), o.error(e);}
}, r.prototype.toggleRecording = function (e, t) {
var n = this.state;if (n === r.status.UNAVAILABLE || n === r.status.FAILED ? t(r.status.FAILED, s.RECORDER_UNAVAILABLE) : n === r.status.BUSY && t(r.status.BUSY, s.RECORDER_BUSY), (n === r.status.OFF || n === r.status.AVAILABLE) && (!e.token && this.type === r.types.COLIBRI || !e.streamId && this.type === r.types.JIBRI)) return t(r.status.FAILED, s.NO_TOKEN), void o.error("No token passed!");var i = n === r.status.AVAILABLE || n === r.status.OFF ? r.status.ON : r.status.OFF,
a = this;o.log("Toggle recording (old state, new state): ", n, i), this.setRecording(i, function (e, r) {
e && e !== n && (a.state = e, a.url = r, t(e));
}, function (e) {
return t(r.status.FAILED, e);
}, e);
}, r.prototype.isSupported = function () {
return this._isSupported;
}, r.prototype.getState = function () {
return this.state;
}, r.prototype.getURL = function () {
return this.url;
};
}).call(t, "modules/xmpp/recording.js");
}, function (e, t, n) {
"use strict";
(function (e) {
function r(e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
}function i(e, t) {
if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return !t || "object" != typeof t && "function" != typeof t ? e : t;
}function o(e, t) {
if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);
}var a = n(0),
s = (n.n(a), n(121)),
c = n(20),
u = n(7),
l = n.n(u),
d = function () {
function e(e, t) {
for (var n = 0; n < t.length; n++) {
var r = t[n];r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
}
}return function (t, n, r) {
return n && e(t.prototype, n), r && e(t, r), t;
};
}(),
p = function e(t, n, r) {
null === t && (t = Function.prototype);var i = Object.getOwnPropertyDescriptor(t, n);if (void 0 === i) {
var o = Object.getPrototypeOf(t);return null === o ? void 0 : e(o, n, r);
}if ("value" in i) return i.value;var a = i.get;return void 0 !== a ? a.call(r) : void 0;
},
f = n.i(a.getLogger)(e),
h = function (e) {
function t(e) {
r(this, t);var n = i(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this));return n.xmpp = e, n.rooms = {}, n;
}return o(t, e), d(t, [{ key: "init", value: function value(e) {
p(t.prototype.__proto__ || Object.getPrototypeOf(t.prototype), "init", this).call(this, e), this.connection.addHandler(this.onPresence.bind(this), null, "presence", null, null, null, null), this.connection.addHandler(this.onPresenceUnavailable.bind(this), null, "presence", "unavailable", null), this.connection.addHandler(this.onPresenceError.bind(this), null, "presence", "error", null), this.connection.addHandler(this.onMessage.bind(this), null, "message", null, null), this.connection.addHandler(this.onMute.bind(this), "http://jitsi.org/jitmeet/audio", "iq", "set", null, null);
} }, { key: "createRoom", value: function value(e, t, n) {
var r = Strophe.getBareJidFromJid(e);if (this.rooms[r]) {
var i = "You are already in the room!";throw f.error(i), new Error(i);
}return this.rooms[r] = new s.a(this.connection, e, t, this.xmpp, n), this.eventEmitter.emit(l.a.EMUC_ROOM_ADDED, this.rooms[r]), this.rooms[r];
} }, { key: "doLeave", value: function value(e) {
this.eventEmitter.emit(l.a.EMUC_ROOM_REMOVED, this.rooms[e]), delete this.rooms[e];
} }, { key: "onPresence", value: function value(e) {
var t = e.getAttribute("from");if (e.getAttribute("type")) return !0;var n = this.rooms[Strophe.getBareJidFromJid(t)];return n ? ($(e).find('>x[xmlns="http://jabber.org/protocol/muc#user"]>status[code="201"]').length && n.createNonAnonymousRoom(), n.onPresence(e), !0) : void 0;
} }, { key: "onPresenceUnavailable", value: function value(e) {
var t = e.getAttribute("from"),
n = this.rooms[Strophe.getBareJidFromJid(t)];if (n) return n.onPresenceUnavailable(e, t), !0;
} }, { key: "onPresenceError", value: function value(e) {
var t = e.getAttribute("from"),
n = this.rooms[Strophe.getBareJidFromJid(t)];if (n) return n.onPresenceError(e, t), !0;
} }, { key: "onMessage", value: function value(e) {
var t = e.getAttribute("from"),
n = this.rooms[Strophe.getBareJidFromJid(t)];if (n) return n.onMessage(e, t), !0;
} }, { key: "onMute", value: function value(e) {
var t = e.getAttribute("from"),
n = this.rooms[Strophe.getBareJidFromJid(t)];if (n) return n.onMute(e), !0;
} }]), t;
}(c.b);t.a = function (e) {
Strophe.addConnectionPlugin("emuc", new h(e));
};
}).call(t, "modules/xmpp/strophe.emuc.js");
}, function (e, t, n) {
"use strict";
(function (e) {
function r(e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
}function i(e, t) {
if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return !t || "object" != typeof t && "function" != typeof t ? e : t;
}function o(e, t) {
if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);
}function a(e, t, n) {
Strophe.addConnectionPlugin("jingle", new S(e, t, n));
}t.a = a;var s = n(0),
c = (n.n(s), n(123)),
u = n(7),
l = n.n(u),
d = n(3),
p = n.n(d),
f = n(19),
h = n.n(f),
m = n(6),
v = n(20),
g = function () {
function e(e, t) {
for (var n = 0; n < t.length; n++) {
var r = t[n];r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
}
}return function (t, n, r) {
return n && e(t.prototype, n), r && e(t, r), t;
};
}(),
y = function e(t, n, r) {
null === t && (t = Function.prototype);var i = Object.getOwnPropertyDescriptor(t, n);if (void 0 === i) {
var o = Object.getPrototypeOf(t);return null === o ? void 0 : e(o, n, r);
}if ("value" in i) return i.value;var a = i.get;return void 0 !== a ? a.call(r) : void 0;
},
b = n.i(s.getLogger)(e),
S = function (e) {
function t(e, n, o) {
r(this, t);var a = i(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this));return a.xmpp = e, a.eventEmitter = n, a.sessions = {}, a.jvbIceConfig = { iceServers: [] }, a.p2pIceConfig = { iceServers: [] }, Array.isArray(o) && (b.info("Configured STUN servers: ", o), a.p2pIceConfig.iceServers = o), a.mediaConstraints = { mandatory: { OfferToReceiveAudio: !0, OfferToReceiveVideo: !0 } }, a;
}return o(t, e), g(t, [{ key: "init", value: function value(e) {
y(t.prototype.__proto__ || Object.getPrototypeOf(t.prototype), "init", this).call(this, e), this.connection.addHandler(this.onJingle.bind(this), "urn:xmpp:jingle:1", "iq", "set", null, null);
} }, { key: "onJingle", value: function value(e) {
var t = $(e).find("jingle").attr("sid"),
n = $(e).find("jingle").attr("action"),
r = e.getAttribute("from"),
i = $iq({ type: "result", to: r, id: e.getAttribute("id") });b.log("on jingle " + n + " from " + r, e);var o = this.sessions[t];if ("session-initiate" !== n) {
if (!o) return i.attrs({ type: "error" }), i.c("error", { type: "cancel" }).c("item-not-found", { xmlns: "urn:ietf:params:xml:ns:xmpp-stanzas" }).up().c("unknown-session", { xmlns: "urn:xmpp:jingle:errors:1" }), b.warn("invalid session id", e), this.connection.send(i), !0;if (r !== o.peerjid) return b.warn("jid mismatch for session id", t, o.peerjid, e), i.attrs({ type: "error" }), i.c("error", { type: "cancel" }).c("item-not-found", { xmlns: "urn:ietf:params:xml:ns:xmpp-stanzas" }).up().c("unknown-session", { xmlns: "urn:xmpp:jingle:errors:1" }), this.connection.send(i), !0;
} else if (void 0 !== o) return i.attrs({ type: "error" }), i.c("error", { type: "cancel" }).c("service-unavailable", { xmlns: "urn:ietf:params:xml:ns:xmpp-stanzas" }).up(), b.warn("duplicate session id", t, e), this.connection.send(i), !0;var a = window.performance.now();switch (n) {case "session-initiate":
b.log("(TIME) received session-initiate:\t", a);var s = $(e).find("jingle>startmuted");if (s && s.length > 0) {
var u = s.attr("audio"),
d = s.attr("video");this.eventEmitter.emit(l.a.START_MUTED_FROM_FOCUS, "true" === u, "true" === d);
}var f = "focus" !== Strophe.getResourceFromJid(r);b.info("Marking session from " + r + " as " + (f ? "" : "*not*") + " P2P"), o = new c.a($(e).find("jingle").attr("sid"), $(e).attr("to"), r, this.connection, this.mediaConstraints, f ? this.p2pIceConfig : this.jvbIceConfig, f, !1, this.xmpp.options), this.sessions[o.sid] = o, this.eventEmitter.emit(l.a.CALL_INCOMING, o, $(e).find(">jingle"), a), m.a.analytics.sendEvent("xmpp.session-initiate", { value: a });break;case "session-accept":
this.eventEmitter.emit(l.a.CALL_ACCEPTED, o, $(e).find(">jingle"));break;case "content-modify":
o.modifyContents($(e).find(">jingle"));break;case "transport-info":
this.eventEmitter.emit(l.a.TRANSPORT_INFO, o, $(e).find(">jingle"));break;case "session-terminate":
b.log("terminating...", o.sid);var h = null,
v = null;$(e).find(">jingle>reason").length && (h = $(e).find(">jingle>reason>:first")[0].tagName, v = $(e).find(">jingle>reason>text").text()), this.terminate(o.sid, h, v), this.eventEmitter.emit(l.a.CALL_ENDED, o, h, v);break;case "transport-replace":
b.info("(TIME) Start transport replace", a), m.a.analytics.sendEvent("xmpp.transport-replace.start", { value: a }), o.replaceTransport($(e).find(">jingle"), function () {
var e = window.performance.now();b.info("(TIME) Transport replace success!", e), m.a.analytics.sendEvent("xmpp.transport-replace.success", { value: e });
}, function (e) {
p.a.callErrorHandler(e), b.error("Transport replace failed", e), o.sendTransportReject();
});break;case "addsource":case "source-add":
o.addRemoteStream($(e).find(">jingle>content"));break;case "removesource":case "source-remove":
o.removeRemoteStream($(e).find(">jingle>content"));break;default:
b.warn("jingle action not implemented", n), i.attrs({ type: "error" }), i.c("error", { type: "cancel" }).c("bad-request", { xmlns: "urn:ietf:params:xml:ns:xmpp-stanzas" }).up();}return this.connection.send(i), !0;
} }, { key: "newP2PJingleSession", value: function value(e, t) {
var n = new c.a(h.a.randomHexString(12), e, t, this.connection, this.mediaConstraints, this.p2pIceConfig, !0, !0, this.xmpp.options);return this.sessions[n.sid] = n, n;
} }, { key: "terminate", value: function value(e, t, n) {
this.sessions.hasOwnProperty(e) && ("ended" !== this.sessions[e].state && this.sessions[e].onTerminated(t, n), delete this.sessions[e]);
} }, { key: "getStunAndTurnCredentials", value: function value() {
var e = this;this.connection.sendIQ($iq({ type: "get", to: this.connection.domain }).c("services", { xmlns: "urn:xmpp:extdisco:1" }).c("service", { host: "turn." + this.connection.domain }), function (t) {
var n = [];$(t).find(">services>service").each(function (e, t) {
t = $(t);var r = {},
i = t.attr("type");switch (i) {case "stun":
r.url = "stun:" + t.attr("host"), t.attr("port") && (r.url += ":" + t.attr("port")), n.push(r);break;case "turn":case "turns":
r.url = i + ":";var o = t.attr("username");o && (navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./) && parseInt(navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./)[2], 10) < 28 ? r.url += o + "@" : r.username = o), r.url += t.attr("host");var a = t.attr("port");a && "3478" !== a && (r.url += ":" + t.attr("port"));var s = t.attr("transport");s && "udp" !== s && (r.url += "?transport=" + s), r.credential = t.attr("password") || r.credential, n.push(r);}
});var r = e.xmpp.options;r.useStunTurn && (e.jvbIceConfig.iceServers = n), r.p2p && r.p2p.useStunTurn && (e.p2pIceConfig.iceServers = n);
}, function (e) {
b.warn("getting turn credentials failed", e), b.warn("is mod_turncredentials or similar installed?");
});
} }, { key: "getLog", value: function value() {
var e = this,
t = {};return Object.keys(this.sessions).forEach(function (n) {
var r = e.sessions[n],
i = r.peerconnection;i && i.updateLog && (t["jingle_" + n] = { updateLog: i.updateLog, stats: i.stats, url: window.location.href });
}), t;
} }]), t;
}(v.a);
}).call(t, "modules/xmpp/strophe.jingle.js");
}, function (e, t, n) {
"use strict";
function r(e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
}function i(e, t) {
if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return !t || "object" != typeof t && "function" != typeof t ? e : t;
}function o(e, t) {
if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);
}var a = n(20),
s = function () {
function e(e, t) {
for (var n = 0; n < t.length; n++) {
var r = t[n];r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
}
}return function (t, n, r) {
return n && e(t.prototype, n), r && e(t, r), t;
};
}(),
c = function e(t, n, r) {
null === t && (t = Function.prototype);var i = Object.getOwnPropertyDescriptor(t, n);if (void 0 === i) {
var o = Object.getPrototypeOf(t);return null === o ? void 0 : e(o, n, r);
}if ("value" in i) return i.value;var a = i.get;return void 0 !== a ? a.call(r) : void 0;
},
u = function (e) {
function t() {
r(this, t);var e = i(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this));return e.log = [], e;
}return o(t, e), s(t, [{ key: "init", value: function value(e) {
c(t.prototype.__proto__ || Object.getPrototypeOf(t.prototype), "init", this).call(this, e), this.connection.rawInput = this.logIncoming.bind(this), this.connection.rawOutput = this.logOutgoing.bind(this);
} }, { key: "logIncoming", value: function value(e) {
this.log.push([new Date().getTime(), "incoming", e]);
} }, { key: "logOutgoing", value: function value(e) {
this.log.push([new Date().getTime(), "outgoing", e]);
} }]), t;
}(a.a);t.a = function () {
Strophe.addConnectionPlugin("logger", new u());
};
}, function (e, t, n) {
"use strict";
(function (e) {
function r(e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
}function i(e, t) {
if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return !t || "object" != typeof t && "function" != typeof t ? e : t;
}function o(e, t) {
if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);
}var a = n(0),
s = (n.n(a), n(20)),
c = n(3),
u = n.n(c),
l = function () {
function e(e, t) {
for (var n = 0; n < t.length; n++) {
var r = t[n];r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
}
}return function (t, n, r) {
return n && e(t.prototype, n), r && e(t, r), t;
};
}(),
d = function e(t, n, r) {
null === t && (t = Function.prototype);var i = Object.getOwnPropertyDescriptor(t, n);if (void 0 === i) {
var o = Object.getPrototypeOf(t);return null === o ? void 0 : e(o, n, r);
}if ("value" in i) return i.value;var a = i.get;return void 0 !== a ? a.call(r) : void 0;
},
p = n.i(a.getLogger)(e),
f = function (e) {
function t(e) {
r(this, t);var n = i(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this));return n.failedPings = 0, n.xmpp = e, n;
}return o(t, e), l(t, [{ key: "init", value: function value(e) {
d(t.prototype.__proto__ || Object.getPrototypeOf(t.prototype), "init", this).call(this, e), Strophe.addNamespace("PING", "urn:xmpp:ping");
} }, { key: "ping", value: function value(e, t, n, r) {
var i = $iq({ type: "get", to: e });i.c("ping", { xmlns: Strophe.NS.PING }), this.connection.sendIQ(i, t, n, r);
} }, { key: "hasPingSupport", value: function value(e, t) {
this.xmpp.caps.getFeatures(e).then(function (e) {
return t(e.has("urn:xmpp:ping"));
}, function (e) {
var n = "Ping feature discovery error";u.a.callErrorHandler(new Error(n + ": " + e)), p.error(n, e), t(!1);
});
} }, { key: "startInterval", value: function value(e) {
var t = this,
n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 1e4;if (this.intervalId) {
var r = "Ping task scheduled already";return u.a.callErrorHandler(new Error(r)), void p.error(r);
}this.intervalId = window.setInterval(function () {
t.ping(e, function () {
t.failedPings = 0;
}, function (e) {
t.failedPings += 1;var n = "Ping " + (e ? "error" : "timeout");t.failedPings >= 3 ? (u.a.callErrorHandler(new Error(n)), p.error(n, e)) : p.warn(n, e);
}, 15e3);
}, n), p.info("XMPP pings will be sent every " + n + " ms");
} }, { key: "stopInterval", value: function value() {
this.intervalId && (window.clearInterval(this.intervalId), this.intervalId = null, this.failedPings = 0, p.info("Ping interval cleared"));
} }]), t;
}(s.a);t.a = function (e) {
Strophe.addConnectionPlugin("ping", new f(e));
};
}).call(t, "modules/xmpp/strophe.ping.js");
}, function (e, t, n) {
"use strict";
(function (e) {
function r(e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
}function i(e, t) {
if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return !t || "object" != typeof t && "function" != typeof t ? e : t;
}function o(e, t) {
if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);
}var a = n(0),
s = (n.n(a), n(20)),
c = function () {
function e(e, t) {
for (var n = 0; n < t.length; n++) {
var r = t[n];r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
}
}return function (t, n, r) {
return n && e(t.prototype, n), r && e(t, r), t;
};
}(),
u = function e(t, n, r) {
null === t && (t = Function.prototype);var i = Object.getOwnPropertyDescriptor(t, n);if (void 0 === i) {
var o = Object.getPrototypeOf(t);return null === o ? void 0 : e(o, n, r);
}if ("value" in i) return i.value;var a = i.get;return void 0 !== a ? a.call(r) : void 0;
},
l = n.i(a.getLogger)(e),
d = function (e) {
function t() {
return r(this, t), i(this, (t.__proto__ || Object.getPrototypeOf(t)).apply(this, arguments));
}return o(t, e), c(t, [{ key: "init", value: function value(e) {
u(t.prototype.__proto__ || Object.getPrototypeOf(t.prototype), "init", this).call(this, e), this.connection.addHandler(this.onRayo.bind(this), "urn:xmpp:rayo:1", "iq", "set", null, null);
} }, { key: "onRayo", value: function value(e) {
l.info("Rayo IQ", e);
} }, { key: "dial", value: function value(e, t, n, r, i) {
var o = this;return new Promise(function (a, s) {
if (!i) return void s(new Error("Internal error!"));var c = $iq({ type: "set", to: i });c.c("dial", { xmlns: "urn:xmpp:rayo:1", to: e, from: t }), c.c("header", { name: "JvbRoomName", value: n }).up(), r && r.length && c.c("header", { name: "JvbRoomPassword", value: r }).up(), o.connection.sendIQ(c, function (e) {
l.info("Dial result ", e);var t = $(e).find("ref").attr("uri");o.callResource = t.substr("xmpp:".length), l.info("Received call resource: " + o.callResource), a();
}, function (e) {
l.info("Dial error ", e), s(e);
});
});
} }, { key: "hangup", value: function value() {
var e = this;return new Promise(function (t, n) {
if (!e.callResource) return n(new Error("No call in progress")), void l.warn("No call in progress");var r = $iq({ type: "set", to: e.callResource });r.c("hangup", { xmlns: "urn:xmpp:rayo:1" }), e.connection.sendIQ(r, function (n) {
l.info("Hangup result ", n), e.callResource = null, t();
}, function (t) {
l.info("Hangup error ", t), e.callResource = null, n(new Error("Hangup error "));
});
});
} }]), t;
}(s.a);t.a = function () {
Strophe.addConnectionPlugin("rayo", new d());
};
}).call(t, "modules/xmpp/strophe.rayo.js");
}, function (e, t, n) {
"use strict";
(function (e) {
var r = n(0),
i = (n.n(r), n(3)),
o = n.n(i),
a = n.i(r.getLogger)(e),
s = -1,
c = /request id \d+.\d+ got 200/,
u = /request errored, status: (\d+), number of errors: \d+/;t.a = function () {
Strophe.log = function (e, t) {
switch (a.trace("Strophe", e, t), "string" == typeof t && -1 !== t.indexOf("Request ") && -1 !== t.indexOf("timed out (secondary), restarting") && (e = Strophe.LogLevel.WARN), e) {case Strophe.LogLevel.DEBUG:
-1 !== s && c.test(t) && (a.debug("Reset lastErrorStatus"), s = -1);break;case Strophe.LogLevel.WARN:
a.warn("Strophe: " + t);var n = u.exec(t);n && 2 === n.length && (s = parseInt(n[1], 10), a.debug("lastErrorStatus set to: " + s));break;case Strophe.LogLevel.ERROR:case Strophe.LogLevel.FATAL:
t = "Strophe: " + t, o.a.callErrorHandler(new Error(t)), a.error(t);}
}, Strophe.getLastErrorStatus = function () {
return s;
}, Strophe.getStatusString = function (e) {
switch (e) {case Strophe.Status.ERROR:
return "ERROR";case Strophe.Status.CONNECTING:
return "CONNECTING";case Strophe.Status.CONNFAIL:
return "CONNFAIL";case Strophe.Status.AUTHENTICATING:
return "AUTHENTICATING";case Strophe.Status.AUTHFAIL:
return "AUTHFAIL";case Strophe.Status.CONNECTED:
return "CONNECTED";case Strophe.Status.DISCONNECTED:
return "DISCONNECTED";case Strophe.Status.DISCONNECTING:
return "DISCONNECTING";case Strophe.Status.ATTACHED:
return "ATTACHED";default:
return "unknown";}
};
};
}).call(t, "modules/xmpp/strophe.util.js");
}, function (e, t, n) {
"use strict";
(function (e) {
function r(e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
}function i(e, t) {
if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return !t || "object" != typeof t && "function" != typeof t ? e : t;
}function o(e, t) {
if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);
}function a(e) {
var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "/http-bind";return e && (t += (-1 === t.indexOf("?") ? "?" : "&") + "token=" + e), new Strophe.Connection(t);
}var s = n(0),
c = (n.n(s), n(19)),
u = n.n(c),
l = n(43),
d = n(27),
p = n(2),
f = n(130),
h = n(131),
m = n(135),
v = n(133),
g = n(134),
y = n(132),
b = n(10),
S = n(120),
E = function () {
function e(e, t) {
for (var n = 0; n < t.length; n++) {
var r = t[n];r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
}
}return function (t, n, r) {
return n && e(t.prototype, n), r && e(t, r), t;
};
}(),
T = n.i(s.getLogger)(e),
_ = function (e) {
function t(e, n) {
r(this, t);var o = i(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this));return o.connection = null, o.disconnectInProgress = !1, o.connectionTimes = {}, o.forceMuted = !1, o.options = e, o.connectParams = {}, o.token = n, o.authenticatedUser = !1, o._initStrophePlugins(o), o.connection = a(n, e.bosh), o.caps = new S.a(o.connection, o.options.clientNode), o.initFeaturesList(), $(window).on("beforeunload unload", o.disconnect.bind(o)), o;
}return o(t, e), E(t, [{ key: "initFeaturesList", value: function value() {
this.caps.addFeature("urn:xmpp:jingle:1"), this.caps.addFeature("urn:xmpp:jingle:apps:rtp:1"), this.caps.addFeature("urn:xmpp:jingle:transports:ice-udp:1"), this.caps.addFeature("urn:xmpp:jingle:apps:dtls:0"), this.caps.addFeature("urn:xmpp:jingle:transports:dtls-sctp:1"), this.caps.addFeature("urn:xmpp:jingle:apps:rtp:audio"), this.caps.addFeature("urn:xmpp:jingle:apps:rtp:video"), !this.options.disableRtx && p.a.supportsRtx() && this.caps.addFeature("urn:ietf:rfc:4588"), this.caps.addFeature("urn:ietf:rfc:5761"), this.caps.addFeature("urn:ietf:rfc:5888"), p.a.isChrome() && !1 !== this.options.enableLipSync && (T.info("Lip-sync enabled !"), this.caps.addFeature("http://jitsi.org/meet/lipsync")), this.connection.rayo && this.caps.addFeature("urn:xmpp:rayo:client:1");
} }, { key: "getConnection", value: function value() {
return this.connection;
} }, { key: "connectionHandler", value: function value(e, t, n) {
var r = this,
i = window.performance.now(),
o = Strophe.getStatusString(t).toLowerCase();if (this.connectionTimes[o] = i, T.log("(TIME) Strophe " + o + (n ? "[" + n + "]" : "") + ":\t", i), t === Strophe.Status.CONNECTED || t === Strophe.Status.ATTACHED) {
(this.options.useStunTurn || this.options.p2p && this.options.p2p.useStunTurn) && this.connection.jingle.getStunAndTurnCredentials(), T.info("My Jabber ID: " + this.connection.jid);var a = this.connection.domain;this.connection.ping.hasPingSupport(a, function (e) {
e ? r.connection.ping.startInterval(a) : T.warn("Ping NOT supported by " + a);
}), e && (this.authenticatedUser = !0), this.connection && this.connection.connected && Strophe.getResourceFromJid(this.connection.jid) && this.eventEmitter.emit(d.CONNECTION_ESTABLISHED, Strophe.getResourceFromJid(this.connection.jid));
} else if (t === Strophe.Status.CONNFAIL) "x-strophe-bad-non-anon-jid" === n ? this.anonymousConnectionFailed = !0 : this.connectionFailed = !0, this.lastErrorMsg = n;else if (t === Strophe.Status.DISCONNECTED) {
this.connection.ping.stopInterval();var s = this.disconnectInProgress,
c = n || this.lastErrorMsg;if (this.disconnectInProgress = !1, this.anonymousConnectionFailed) this.eventEmitter.emit(d.CONNECTION_FAILED, l.PASSWORD_REQUIRED);else if (this.connectionFailed) this.eventEmitter.emit(d.CONNECTION_FAILED, l.OTHER_ERROR, c);else if (s) this.eventEmitter.emit(d.CONNECTION_DISCONNECTED, c);else {
T.error("XMPP connection dropped!");var u = Strophe.getLastErrorStatus();u >= 500 && u < 600 ? this.eventEmitter.emit(d.CONNECTION_FAILED, l.SERVER_ERROR, c || "server-error") : this.eventEmitter.emit(d.CONNECTION_FAILED, l.CONNECTION_DROPPED_ERROR, c || "connection-dropped-error");
}
} else t === Strophe.Status.AUTHFAIL && this.eventEmitter.emit(d.CONNECTION_FAILED, l.PASSWORD_REQUIRED);
} }, { key: "_connect", value: function value(e, t) {
this.anonymousConnectionFailed = !1, this.connectionFailed = !1, this.lastErrorMsg = void 0, this.connection.connect(e, t, this.connectionHandler.bind(this, t));
} }, { key: "attach", value: function value(e) {
var t = this.connectionTimes.attaching = window.performance.now();T.log("(TIME) Strophe Attaching\t:" + t), this.connection.attach(e.jid, e.sid, parseInt(e.rid, 10) + 1, this.connectionHandler.bind(this, e.password));
} }, { key: "connect", value: function value(e, t) {
if (this.connectParams = { jid: e, password: t }, !e) {
var n = this.options.hosts.anonymousdomain || this.options.hosts.domain;this.options.hosts.anonymousdomain && (-1 !== window.location.search.indexOf("login=true") || this.token) && (n = this.options.hosts.domain), e = n || window.location.hostname;
}return this._connect(e, t);
} }, { key: "createRoom", value: function value(e, t) {
var n = Strophe.getNodeFromJid(this.connection.jid),
r = e + "@" + this.options.hosts.muc + "/",
i = t.useNicks && t.nick ? t.nick : null;return i ? n = t.nick : this.authenticatedUser || (n = n.substr(0, 8)), (this.authenticatedUser || null !== i) && (n += "-" + u.a.randomHexString(6)), r += n, this.connection.emuc.createRoom(r, null, t);
} }, { key: "getJingleLog", value: function value() {
var e = this.connection.jingle;return e ? e.getLog() : {};
} }, { key: "getXmppLog", value: function value() {
return (this.connection.logger || {}).log || null;
} }, { key: "dial", value: function value() {
var e;(e = this.connection.rayo).dial.apply(e, arguments);
} }, { key: "setMute", value: function value(e, t) {
this.connection.moderate.setMute(e, t);
} }, { key: "eject", value: function value(e) {
this.connection.moderate.eject(e);
} }, { key: "getSessions", value: function value() {
return this.connection.jingle.sessions;
} }, { key: "disconnect", value: function value(e) {
if (this.disconnectInProgress || !this.connection || !this.connection.connected) return void this.eventEmitter.emit(d.WRONG_STATE);if (this.disconnectInProgress = !0, this.connection.flush(), null !== e && void 0 !== e) {
var t = e.type;"beforeunload" !== t && "unload" !== t || (this.connection.options.sync = !0);
}this.connection.disconnect(), !0 !== this.connection.options.sync && this.connection.flush();
} }, { key: "_initStrophePlugins", value: function value() {
var e = [{ urls: "stun:stun.l.google.com:19302" }, { urls: "stun:stun1.l.google.com:19302" }, { urls: "stun:stun2.l.google.com:19302" }],
t = this.options.p2p && this.options.p2p.stunServers || e;n.i(f.a)(this), n.i(h.a)(this, this.eventEmitter, t), n.i(m.a)(), n.i(v.a)(this), n.i(g.a)(), n.i(y.a)();
} }]), t;
}(b.a);t.a = _;
}).call(t, "modules/xmpp/xmpp.js");
}, function (e, t, n) {
"use strict";
function r(e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
}function i(e, t) {
if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return !t || "object" != typeof t && "function" != typeof t ? e : t;
}function o(e, t) {
if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);
}var a = n(10),
s = function () {
function e(e, t) {
for (var n = 0; n < t.length; n++) {
var r = t[n];r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
}
}return function (t, n, r) {
return n && e(t.prototype, n), r && e(t, r), t;
};
}(),
c = function (e) {
function t() {
return r(this, t), i(this, (t.__proto__ || Object.getPrototypeOf(t)).apply(this, arguments));
}return o(t, e), s(t, [{ key: "getSSRCOwner", value: function value(e) {
throw new Error("not implemented");
} }, { key: "getPeerMediaInfo", value: function value(e, t) {
throw new Error("not implemented");
} }]), t;
}(a.a);t.a = c;
}, function (e, t) {
var n = { LOCAL_JID: "local" };e.exports = n;
}, function (e, t) {
e.exports = function e(t) {
if (!t) return !1;if (this.length != t.length) return !1;for (var n = 0, r = this.length; n < r; n++) {
if (this[n] instanceof Array && t[n] instanceof Array) {
if (!e.apply(this[n], [t[n]])) return !1;
} else if (this[n] != t[n]) return !1;
}return !0;
};
}, function (e, t, n) {
t.Interop = n(141);
}, function (e, t, n) {
"use strict";
function r() {
this.cache = { mlB2UMap: {}, mlU2BMap: {} };
}var i = "function" == typeof Symbol && "symbol" == typeof (typeof Symbol === "function" ? Symbol.iterator : "@@iterator") ? function (e) {
return typeof e;
} : function (e) {
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== (typeof Symbol === "function" ? Symbol.prototype : "@@prototype") ? "symbol" : typeof e;
},
o = n(142),
a = n(139);e.exports = r, r.prototype.candidateToUnifiedPlan = function (e) {
var t = new RTCIceCandidate(e);return t.sdpMLineIndex = this.cache.mlB2UMap[t.sdpMLineIndex], t;
}, r.prototype.candidateToPlanB = function (e) {
var t = new RTCIceCandidate(e);if (0 === t.sdpMid.indexOf("audio")) t.sdpMid = "audio";else {
if (0 !== t.sdpMid.indexOf("video")) throw new Error("candidate with " + t.sdpMid + " not allowed");t.sdpMid = "video";
}return t.sdpMLineIndex = this.cache.mlU2BMap[t.sdpMLineIndex], t;
}, r.prototype.getFirstSendingIndexFromAnswer = function (e) {
if (!this.cache.answer) return null;var t = o.parse(this.cache.answer);if (t && t.media && Array.isArray(t.media)) for (var n = 0; n < t.media.length; n++) {
if (t.media[n].type == e && (!t.media[n].direction || "sendrecv" === t.media[n].direction || "sendonly" === t.media[n].direction)) return n;
}return null;
}, r.prototype.toPlanB = function (e) {
var t = this;if ("object" !== (void 0 === e ? "undefined" : i(e)) || null === e || "string" != typeof e.sdp) return console.warn("An empty description was passed as an argument."), e;var n = o.parse(e.sdp);if (void 0 === n.media || !Array.isArray(n.media) || 0 === n.media.length) return console.warn("The description has no media."), e;if (n.media.length <= 3 && n.media.every(function (e) {
return -1 !== ["video", "audio", "data"].indexOf(e.mid);
})) return console.warn("This description does not look like Unified Plan."), e;for (var r = e.sdp, a = !1, s = 0; s < n.media.length; s++) {
n.media[s].rtp.forEach(function (e) {
if ("NULL" === e.codec) {
a = !0;var n = o.parse(t.cache.offer);e.codec = n.media[s].rtp[0].codec;
}
});
}a && (r = o.write(n)), this.cache[e.type] = r;var c = n.media;n.media = [];var u = {},
l = [];c.forEach(function (e) {
if (("string" != typeof e.rtcpMux || "rtcp-mux" !== e.rtcpMux) && "inactive" !== e.direction) throw new Error("Cannot convert to Plan B because m-lines without the rtcp-mux attribute were found.");void 0 !== u[e.type] && "inactive" !== u[e.type].direction || (u[e.type] = e);
}), c.forEach(function (e) {
if ("application" === e.type) return n.media.push(e), void l.push(e.mid);"object" === i(e.sources) && Object.keys(e.sources).forEach(function (t) {
"object" !== i(u[e.type].sources) && (u[e.type].sources = {}), u[e.type].sources[t] = e.sources[t], void 0 !== e.msid && (u[e.type].sources[t].msid = e.msid);
}), void 0 !== e.ssrcGroups && Array.isArray(e.ssrcGroups) && (void 0 !== u[e.type].ssrcGroups && Array.isArray(u[e.type].ssrcGroups) || (u[e.type].ssrcGroups = []), u[e.type].ssrcGroups = u[e.type].ssrcGroups.concat(e.ssrcGroups)), u[e.type] === e && (e.mid = e.type, delete e.bundleOnly, delete e.msid, "inactive" !== e.direction && l.push(e.type), n.media.push(e));
}), n.groups.some(function (e) {
if ("BUNDLE" === e.type) return e.mids = l.join(" "), !0;
}), n.msidSemantic = { semantic: "WMS", token: "*" };var d = o.write(n);return new RTCSessionDescription({ type: e.type, sdp: d });
}, r.prototype.toUnifiedPlan = function (e) {
var t = this;if ("object" !== (void 0 === e ? "undefined" : i(e)) || null === e || "string" != typeof e.sdp) return console.warn("An empty description was passed as an argument."), e;var n = o.parse(e.sdp);if (void 0 === n.media || !Array.isArray(n.media) || 0 === n.media.length) return console.warn("The description has no media."), e;if (n.media.length > 3 || !n.media.every(function (e) {
return -1 !== ["video", "audio", "data"].indexOf(e.mid);
})) return console.warn("This description does not look like Plan B."), e;var r = [];n.media.forEach(function (e) {
r.push(e.mid);
});var s = !1;if (void 0 !== n.groups && Array.isArray(n.groups) && (s = n.groups.every(function (e) {
return "BUNDLE" !== e.type || a.apply(e.mids.sort(), [r.sort()]);
})), !s) throw new Error("Cannot convert to Unified Plan because m-lines that are not bundled were found.");var c;void 0 !== this.cache[e.type] && (c = o.parse(this.cache[e.type]));var u = { audio: {}, video: {} },
l = {},
d = 0,
p = 0;if (n.media.forEach(function (n) {
if (("string" != typeof n.rtcpMux || "rtcp-mux" !== n.rtcpMux) && "inactive" !== n.direction) throw new Error("Cannot convert to Unified Plan because m-lines without the rtcp-mux attribute were found.");if ("application" === n.type) return void (l[n.mid] = n);var r = n.sources,
o = n.ssrcGroups,
a = n.candidates,
s = n.iceUfrag,
f = n.icePwd,
h = n.fingerprint,
m = n.port;delete n.sources, delete n.ssrcGroups, delete n.candidates, delete n.iceUfrag, delete n.icePwd, delete n.fingerprint, delete n.port, delete n.mid;var v = {};void 0 !== o && Array.isArray(o) && o.forEach(function (e) {
"SIM" !== e.semantics && void 0 !== e.ssrcs && Array.isArray(e.ssrcs) && e.ssrcs.forEach(function (t) {
void 0 === v[t] && (v[t] = []), v[t].push(e);
});
});var g = {};"object" === (void 0 === r ? "undefined" : i(r)) && Object.keys(r).forEach(function (o) {
var y;if ("offer" === e.type && !r[o].msid) return void (u[n.type][o] = r[o]);if (void 0 !== v[o] && Array.isArray(v[o]) && v[o].some(function (e) {
return e.ssrcs.some(function (e) {
if ("object" === i(g[e])) return y = g[e], !0;
});
}), "object" === (void 0 === y ? "undefined" : i(y))) y.sources[o] = r[o], delete r[o].msid;else {
if (y = Object.create(n), g[o] = y, void 0 !== r[o].msid && (y.msid = r[o].msid, delete r[o].msid), y.sources = {}, y.sources[o] = r[o], y.ssrcGroups = v[o], void 0 !== c && void 0 !== c.media && Array.isArray(c.media) && c.media.forEach(function (e) {
"object" === i(e.sources) && Object.keys(e.sources).forEach(function (t) {
t === o && (y.mid = e.mid);
});
}), void 0 === y.mid) {
if ("answer" === e.type) throw new Error("An unmapped SSRC was found.");y.mid = [n.type, "-", o].join("");
}y.candidates = a, y.iceUfrag = s, y.icePwd = f, y.fingerprint = h, y.port = m, l[y.mid] = y, t.cache.mlU2BMap[p] = d, void 0 === t.cache.mlB2UMap[d] && (t.cache.mlB2UMap[d] = p), p++;
}
}), d++;
}), n.media = [], r = [], "answer" === e.type) for (var f = 0; f < c.media.length; f++) {
var h = c.media[f];void 0 === l[h.mid] && (delete h.msid, delete h.sources, delete h.ssrcGroups, h.direction && "sendrecv" !== h.direction ? "sendonly" === h.direction && (h.direction = "inactive") : h.direction = "recvonly"), n.media.push(h), "string" == typeof h.mid && r.push(h.mid);
} else void 0 !== c && void 0 !== c.media && Array.isArray(c.media) && c.media.forEach(function (e) {
r.push(e.mid), void 0 !== l[e.mid] ? n.media.push(l[e.mid]) : (delete e.msid, delete e.sources, delete e.ssrcGroups, e.direction && "sendrecv" !== e.direction || (e.direction = "recvonly"), e.direction && "sendonly" !== e.direction || (e.direction = "inactive"), n.media.push(e));
}), Object.keys(l).forEach(function (e) {
-1 === r.indexOf(e) && (r.push(e), "recvonly" === l[e].direction ? n.media.some(function (t) {
if (("sendrecv" === t.direction || "sendonly" === t.direction) && t.type === l[e].type) return Object.keys(l[e].sources).forEach(function (n) {
t.sources[n] = l[e].sources[n];
}), !0;
}) : n.media.push(l[e]));
});["audio", "video"].forEach(function (e) {
if (n && n.media && Array.isArray(n.media)) {
var r = null;if (Object.keys(u[e]).length > 0 && null === (r = t.getFirstSendingIndexFromAnswer(e))) for (var i = 0; i < n.media.length; i++) {
if (n.media[i].type === e) {
r = i;break;
}
}if (r && n.media.length > r) {
var o = n.media[r];Object.keys(u[e]).forEach(function (t) {
o.sources && o.sources[t] && console.warn("Replacing an existing SSRC."), o.sources || (o.sources = {}), o.sources[t] = u[e][t];
});
}
}
}), n.groups.some(function (e) {
if ("BUNDLE" === e.type) return e.mids = r.join(" "), !0;
}), n.msidSemantic = { semantic: "WMS", token: "*" };var m = o.write(n);return this.cache[e.type] = m, new RTCSessionDescription({ type: e.type, sdp: m });
};
}, function (e, t, n) {
var r = n(13);t.write = function (e, t) {
return void 0 !== e && void 0 !== e.media && Array.isArray(e.media) && e.media.forEach(function (e) {
void 0 !== e.sources && 0 !== Object.keys(e.sources).length && (e.ssrcs = [], Object.keys(e.sources).forEach(function (t) {
var n = e.sources[t];Object.keys(n).forEach(function (r) {
e.ssrcs.push({ id: t, attribute: r, value: n[r] });
});
}), delete e.sources), void 0 !== e.ssrcGroups && Array.isArray(e.ssrcGroups) && e.ssrcGroups.forEach(function (e) {
void 0 !== e.ssrcs && Array.isArray(e.ssrcs) && (e.ssrcs = e.ssrcs.join(" "));
});
}), void 0 !== e && void 0 !== e.groups && Array.isArray(e.groups) && e.groups.forEach(function (e) {
void 0 !== e.mids && Array.isArray(e.mids) && (e.mids = e.mids.join(" "));
}), r.write(e, t);
}, t.parse = function (e) {
var t = r.parse(e);return void 0 !== t && void 0 !== t.media && Array.isArray(t.media) && t.media.forEach(function (e) {
void 0 !== e.ssrcs && Array.isArray(e.ssrcs) && (e.sources = {}, e.ssrcs.forEach(function (t) {
e.sources[t.id] || (e.sources[t.id] = {}), e.sources[t.id][t.attribute] = t.value;
}), delete e.ssrcs), void 0 !== e.ssrcGroups && Array.isArray(e.ssrcGroups) && e.ssrcGroups.forEach(function (e) {
"string" == typeof e.ssrcs && (e.ssrcs = e.ssrcs.split(" "));
});
}), void 0 !== t && void 0 !== t.groups && Array.isArray(t.groups) && t.groups.forEach(function (e) {
"string" == typeof e.mids && (e.mids = e.mids.split(" "));
}), t;
};
}, function (e, t, n) {
function r(e, t, n) {
return e.ssrcs.filter(function (e) {
return e.id === t;
}).filter(function (e) {
return e.attribute === n;
}).map(function (e) {
return e.value;
})[0];
}function i(e) {
this.options = e || {}, this.options.numOfLayers || (this.options.numOfLayers = v), console.log("SdpSimulcast: using " + this.options.numOfLayers + " layers"), this.ssrcCache = [];
}function o() {
return Math.floor(4294967295 * Math.random()) + 0;
}function a(e, t) {
null != e && Array.isArray(e.media) && e.media.forEach(function (e) {
"video" === e.type && t(e);
});
}function s(e) {
return e && null != e && e.type && "" != e.type && e.sdp && "" != e.sdp;
}function c(e) {
if (e && Array.isArray(e.ssrcGroups)) for (var t = h(e), n = [], r = e.ssrcGroups.length; r--;) {
if ("SIM" === e.ssrcGroups[r].semantics) {
for (var i = e.ssrcGroups[r].ssrcs.split(" "), o = 0; o < i.length; o++) {
var a = i[o];n.push(a);var s = t[a].msid.split(" ");t[a].msid = [s[0], "/", o, " ", s[1], "/", o].join(""), t[a].cname = [t[a].cname, "/", o].join(""), e.ssrcGroups.forEach(function (e) {
if ("SIM" !== e.semantics) {
var r = e.ssrcs.split(" ");-1 !== r.indexOf(a) && r.forEach(function (e) {
t[e].msid = t[a].msid, t[e].cname = t[a].cname, e !== a && n.push(e);
});
}
});
}e.ssrcs = m(t, n), e.ssrcGroups.splice(r, 1);
}
}
}function u(e) {
if (!e || !Array.isArray(e.ssrcGroups)) return void console.info("Halt: There are no SSRC groups in the remote description.");var t = h(e);e.ssrcGroups.forEach(function (n) {
if ("SIM" === n.semantics) {
console.info("Imploding SIM group: " + n.ssrcs), n.nuke = !0;for (var r = n.ssrcs.split(" "), i = 1; i < r.length; i++) {
var o = r[i];delete t[o], e.ssrcGroups.forEach(function (e) {
if ("SIM" !== e.semantics) {
var n = e.ssrcs.split(" ");-1 !== n.indexOf(o) && (n.forEach(function (e) {
delete t[e];
}), e.nuke = !0);
}
});
}
}
}), e.ssrcs = m(t);for (var n = e.ssrcGroups.length; n--;) {
e.ssrcGroups[n].nuke && e.ssrcGroups.splice(n, 1);
}
}function l(e) {
if (e && Array.isArray(e.invalid)) for (var t = e.invalid.length; t--;) {
"x-google-flag:conference" == e.invalid[t].value && e.invalid.splice(t, 1);
}
}function d(e) {
e && (Array.isArray(e.invalid) || (e.invalid = []), e.invalid.some(function (e) {
return "x-google-flag:conference" === e.value;
}) || e.invalid.push({ value: "x-google-flag:conference" }));
}var p = n(13),
f = n(144),
h = f.parseSsrcs,
m = f.writeSsrcs,
v = 3;i.prototype.clearSsrcCache = function () {
this.ssrcCache = [];
}, i.prototype.setSsrcCache = function (e) {
this.ssrcCache = e;
}, i.prototype._parseSimLayers = function (e) {
var t = e.ssrcGroups && e.ssrcGroups.find(function (e) {
return "SIM" === e.semantics;
});return t ? t.ssrcs.split(" ").map(function (e) {
return parseInt(e);
}) : [e.ssrcs[0].id];
}, i.prototype._buildNewToOldSsrcMap = function (e, t) {
for (var n = {}, r = 0; r < e.length; ++r) {
var i = e[r],
o = t[r] || null;n[i] = o;
}return n;
}, i.prototype._fillInSourceDataFromCache = function (e) {
console.log("SdpSimulcast restoring from cache: ", this.ssrcCache);var t = this._parseSimLayers(e);console.log("SdpSimulcast Parsed new sim ssrcs: ", t);var n = r(e, t[0], "msid"),
i = r(e, t[0], "cname"),
o = this._buildNewToOldSsrcMap(t, this.ssrcCache);console.log("SdpSimulcast built replacement map: ", o);var a = this.ssrcCache.filter(function (e) {
return -1 === Object.values(o).indexOf(e);
});return console.log("SdpSimulcast built ssrcs to add: ", a), e.ssrcs.forEach(function (e) {
o[e.id] && (e.id = o[e.id]);
}), a.forEach(function (t) {
e.ssrcs.push({ id: t, attribute: "msid", value: n }), e.ssrcs.push({ id: t, attribute: "cname", value: i });
}), e.ssrcGroups = e.ssrcGroups || [], e.ssrcGroups.push({ semantics: "SIM", ssrcs: this.ssrcCache.join(" ") }), e;
}, i.prototype._generateSourceData = function (e, t) {
for (var n = r(e, t, "msid"), i = r(e, t, "cname"), a = [], s = 0; s < this.options.numOfLayers - 1; ++s) {
var c = o();!function (e, t) {
e.ssrcs.push({ id: t, attribute: "cname", value: i }), e.ssrcs.push({ id: t, attribute: "msid", value: n });
}(e, c), a.push(c);
}return e.ssrcGroups = e.ssrcGroups || [], e.ssrcGroups.push({ semantics: "SIM", ssrcs: t + " " + a.join(" ") }), e;
}, i.prototype._restoreSimulcast = function (e) {
var t,
n = e.ssrcs && e.ssrcs.map(function (e) {
return e.id;
}).filter(function (e, t, n) {
return n.indexOf(e) === t;
}).length || 0,
r = e.ssrcGroups && e.ssrcGroups.length || 0;if (0 === n || n > 2) return e;if (2 == n && 0 === r) return e;if (1 === n) t = e.ssrcs[0].id;else {
var i = e.ssrcGroups.filter(function (e) {
return "FID" === e.semantics;
})[0];if (!i) return e;t = parseInt(i.ssrcs.split(" ")[0]);
}return console.log("SdpSimulcast: current ssrc cache: ", this.ssrcCache), console.log("SdpSimulcast: parsed primary ssrc " + t), -1 !== this.ssrcCache.indexOf(t) ? (console.log("SdpSimulcast: Have seen primary ssrc before, filling in data from cache"), e = this._fillInSourceDataFromCache(e)) : (console.log("SdpSimulcast: Have not seen primary ssrc before, generating source data"), e = this._generateSourceData(e, t)), this.ssrcCache = this._parseSimLayers(e), e;
}, i.prototype.mungeRemoteDescription = function (e) {
if (!s(e)) return e;var t = p.parse(e.sdp),
n = this;return a(t, function (e) {
n.options.explodeRemoteSimulcast ? c(e) : u(e), n.ssrcCache.length < 1 ? l(e) : d(e);
}), new RTCSessionDescription({ type: e.type, sdp: p.write(t) });
}, i.prototype.mungeLocalDescription = function (e) {
if (!s(e)) return e;var t = p.parse(e.sdp),
n = this;return a(t, function (e) {
"recvonly" != e.direction && "inactive" != e.direction && n._restoreSimulcast(e);
}), new RTCSessionDescription({ type: e.type, sdp: p.write(t) });
}, e.exports = i;
}, function (e, t) {
t.writeSsrcs = function (e, t) {
var n = [];if (void 0 !== e && 0 !== Object.keys(e).length) {
Array.isArray(t) || (t = []);for (var r = 0; r < t.length; r++) {
var i = t[r],
o = e[i];Object.keys(o).forEach(function (e) {
n.push({ id: i, attribute: e, value: o[e] });
});
}Object.keys(e).forEach(function (r) {
if (r = parseInt(r), !(t.indexOf(r) >= 0)) {
var i = e[r];Object.keys(i).forEach(function (e) {
n.push({ id: r, attribute: e, value: i[e] });
});
}
});
}return n;
}, t.parseSsrcs = function (e) {
var t = {};return void 0 !== e.ssrcs && Array.isArray(e.ssrcs) && e.ssrcs.forEach(function (e) {
t[e.id] || (t[e.id] = {}), t[e.id][e.attribute] = e.value;
}), t;
};
}, function (e, t, n) {
var r = function r(e) {
return String(Number(e)) === e ? Number(e) : e;
},
i = function (_i5) {
function i(_x8, _x9, _x10, _x11) {
return _i5.apply(this, arguments);
}
i.toString = function () {
return _i5.toString();
};
return i;
}(function (e, t, n, i) {
if (i && !n) t[i] = r(e[1]);else for (var o = 0; o < n.length; o += 1) {
null != e[o + 1] && (t[n[o]] = r(e[o + 1]));
}
}),
o = function o(e, t, n) {
var r = e.name && e.names;e.push && !t[e.push] ? t[e.push] = [] : r && !t[e.name] && (t[e.name] = {});var o = e.push ? {} : r ? t[e.name] : t;i(n.match(e.reg), o, e.names, e.name), e.push && t[e.push].push(o);
},
a = n(57),
s = RegExp.prototype.test.bind(/^([a-z])=(.*)/);t.parse = function (e) {
var t = {},
n = [],
r = t;return e.split(/(\r\n|\r|\n)/).filter(s).forEach(function (e) {
var t = e[0],
i = e.slice(2);"m" === t && (n.push({ rtp: [], fmtp: [] }), r = n[n.length - 1]);for (var s = 0; s < (a[t] || []).length; s += 1) {
var c = a[t][s];if (c.reg.test(i)) return o(c, r, i);
}
}), t.media = n, t;
};var c = function c(e, t) {
var n = t.split(/=(.+)/, 2);return 2 === n.length && (e[n[0]] = r(n[1])), e;
};t.parseParams = function (e) {
return e.split(/\;\s?/).reduce(c, {});
}, t.parseFmtpConfig = t.parseParams, t.parsePayloads = function (e) {
return e.split(" ").map(Number);
}, t.parseRemoteCandidates = function (e) {
for (var t = [], n = e.split(" ").map(r), i = 0; i < n.length; i += 3) {
t.push({ component: n[i], ip: n[i + 1], port: n[i + 2] });
}return t;
}, t.parseImageAttributes = function (e) {
return e.split(" ").map(function (e) {
return e.substring(1, e.length - 1).split(",").reduce(c, {});
});
}, t.parseSimulcastStreamList = function (e) {
return e.split(";").map(function (e) {
return e.split(",").map(function (e) {
var t,
n = !1;return "~" !== e[0] ? t = r(e) : (t = r(e.substring(1, e.length)), n = !0), { scid: t, paused: n };
});
});
};
}, function (e, t, n) {
var r = n(57),
i = /%[sdv%]/g,
o = function o(e) {
var t = 1,
n = arguments,
r = n.length;return e.replace(i, function (e) {
if (t >= r) return e;var i = n[t];switch (t += 1, e) {case "%%":
return "%";case "%s":
return String(i);case "%d":
return Number(i);case "%v":
return "";}
});
},
a = function a(e, t, n) {
var r = t.format instanceof Function ? t.format(t.push ? n : n[t.name]) : t.format,
i = [e + "=" + r];if (t.names) for (var a = 0; a < t.names.length; a += 1) {
var s = t.names[a];t.name ? i.push(n[t.name][s]) : i.push(n[t.names[a]]);
} else i.push(n[t.name]);return o.apply(null, i);
},
s = ["v", "o", "s", "i", "u", "e", "p", "c", "b", "t", "r", "z", "a"],
c = ["i", "c", "b", "a"];e.exports = function (e, t) {
t = t || {}, null == e.version && (e.version = 0), null == e.name && (e.name = " "), e.media.forEach(function (e) {
null == e.payloads && (e.payloads = "");
});var n = t.outerOrder || s,
i = t.innerOrder || c,
o = [];return n.forEach(function (t) {
r[t].forEach(function (n) {
n.name in e && null != e[n.name] ? o.push(a(t, n, e)) : n.push in e && null != e[n.push] && e[n.push].forEach(function (e) {
o.push(a(t, n, e));
});
});
}), e.media.forEach(function (e) {
o.push(a("m", r.m[0], e)), i.forEach(function (t) {
r[t].forEach(function (n) {
n.name in e && null != e[n.name] ? o.push(a(t, n, e)) : n.push in e && null != e[n.push] && e[n.push].forEach(function (e) {
o.push(a(t, n, e));
});
});
});
}), o.join("\r\n") + "\r\n";
};
}, function (e, t, n) {
(function (e, t) {
!function (e, n) {
"use strict";
function r(e) {
"function" != typeof e && (e = new Function("" + e));for (var t = new Array(arguments.length - 1), n = 0; n < t.length; n++) {
t[n] = arguments[n + 1];
}var r = { callback: e, args: t };return u[c] = r, s(c), c++;
}function i(e) {
delete u[e];
}function o(e) {
var t = e.callback,
r = e.args;switch (r.length) {case 0:
t();break;case 1:
t(r[0]);break;case 2:
t(r[0], r[1]);break;case 3:
t(r[0], r[1], r[2]);break;default:
t.apply(n, r);}
}function a(e) {
if (l) setTimeout(a, 0, e);else {
var t = u[e];if (t) {
l = !0;try {
o(t);
} finally {
i(e), l = !1;
}
}
}
}if (!e.setImmediate) {
var s,
c = 1,
u = {},
l = !1,
d = e.document,
p = Object.getPrototypeOf && Object.getPrototypeOf(e);p = p && p.setTimeout ? p : e, "[object process]" === {}.toString.call(e.process) ? function () {
s = function s(e) {
t.nextTick(function () {
a(e);
});
};
}() : function () {
if (e.postMessage && !e.importScripts) {
var t = !0,
n = e.onmessage;return e.onmessage = function () {
t = !1;
}, e.postMessage("", "*"), e.onmessage = n, t;
}
}() ? function () {
var t = "setImmediate$" + Math.random() + "$",
n = function n(_n5) {
_n5.source === e && "string" == typeof _n5.data && 0 === _n5.data.indexOf(t) && a(+_n5.data.slice(t.length));
};e.addEventListener ? e.addEventListener("message", n, !1) : e.attachEvent("onmessage", n), s = function s(n) {
e.postMessage(t + n, "*");
};
}() : e.MessageChannel ? function () {
var e = new MessageChannel();e.port1.onmessage = function (e) {
a(e.data);
}, s = function s(t) {
e.port2.postMessage(t);
};
}() : d && "onreadystatechange" in d.createElement("script") ? function () {
var e = d.documentElement;s = function s(t) {
var n = d.createElement("script");n.onreadystatechange = function () {
a(t), n.onreadystatechange = null, e.removeChild(n), n = null;
}, e.appendChild(n);
};
}() : function () {
s = function s(e) {
setTimeout(a, 0, e);
};
}(), p.setImmediate = r, p.clearImmediate = i;
}
}("undefined" == typeof self ? void 0 === e ? this : e : self);
}).call(t, n(1), n(56));
}, function (e, t, n) {
function r(e, t) {
this._id = e, this._clearFn = t;
}var i = Function.prototype.apply;t.setTimeout = function () {
return new r(i.call(setTimeout, window, arguments), clearTimeout);
}, t.setInterval = function () {
return new r(i.call(setInterval, window, arguments), clearInterval);
}, t.clearTimeout = t.clearInterval = function (e) {
e && e.close();
}, r.prototype.unref = r.prototype.ref = function () {}, r.prototype.close = function () {
this._clearFn.call(window, this._id);
}, t.enroll = function (e, t) {
clearTimeout(e._idleTimeoutId), e._idleTimeout = t;
}, t.unenroll = function (e) {
clearTimeout(e._idleTimeoutId), e._idleTimeout = -1;
}, t._unrefActive = t.active = function (e) {
clearTimeout(e._idleTimeoutId);var t = e._idleTimeout;t >= 0 && (e._idleTimeoutId = setTimeout(function () {
e._onTimeout && e._onTimeout();
}, t));
}, n(147);var o = n(74);t.setImmediate = o.setImmediate, t.clearImmediate = o.clearImmediate;
}, function (e, t) {
function n(e, t) {
var n = [];t = t || 0;for (var r = t || 0; r < e.length; r++) {
n[r - t] = e[r];
}return n;
}e.exports = n;
}, function (e, t, n) {
(function (e, r) {
var i,
o = "function" == typeof Symbol && "symbol" == typeof (typeof Symbol === "function" ? Symbol.iterator : "@@iterator") ? function (e) {
return typeof e;
} : function (e) {
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== (typeof Symbol === "function" ? Symbol.prototype : "@@prototype") ? "symbol" : typeof e;
};!function (a) {
function s(e) {
for (var t, n, r = [], i = 0, o = e.length; i < o;) {
t = e.charCodeAt(i++), t >= 55296 && t <= 56319 && i < o ? (n = e.charCodeAt(i++), 56320 == (64512 & n) ? r.push(((1023 & t) << 10) + (1023 & n) + 65536) : (r.push(t), i--)) : r.push(t);
}return r;
}function c(e) {
for (var t, n = e.length, r = -1, i = ""; ++r < n;) {
t = e[r], t > 65535 && (t -= 65536, i += T(t >>> 10 & 1023 | 55296), t = 56320 | 1023 & t), i += T(t);
}return i;
}function u(e) {
if (e >= 55296 && e <= 57343) throw Error("Lone surrogate U+" + e.toString(16).toUpperCase() + " is not a scalar value");
}function l(e, t) {
return T(e >> t & 63 | 128);
}function d(e) {
if (0 == (4294967168 & e)) return T(e);var t = "";return 0 == (4294965248 & e) ? t = T(e >> 6 & 31 | 192) : 0 == (4294901760 & e) ? (u(e), t = T(e >> 12 & 15 | 224), t += l(e, 6)) : 0 == (4292870144 & e) && (t = T(e >> 18 & 7 | 240), t += l(e, 12), t += l(e, 6)), t += T(63 & e | 128);
}function p(e) {
for (var t, n = s(e), r = n.length, i = -1, o = ""; ++i < r;) {
t = n[i], o += d(t);
}return o;
}function f() {
if (E >= S) throw Error("Invalid byte index");var e = 255 & b[E];if (E++, 128 == (192 & e)) return 63 & e;throw Error("Invalid continuation byte");
}function h() {
var e, t, n, r, i;if (E > S) throw Error("Invalid byte index");if (E == S) return !1;if (e = 255 & b[E], E++, 0 == (128 & e)) return e;if (192 == (224 & e)) {
var t = f();if ((i = (31 & e) << 6 | t) >= 128) return i;throw Error("Invalid continuation byte");
}if (224 == (240 & e)) {
if (t = f(), n = f(), (i = (15 & e) << 12 | t << 6 | n) >= 2048) return u(i), i;throw Error("Invalid continuation byte");
}if (240 == (248 & e) && (t = f(), n = f(), r = f(), (i = (15 & e) << 18 | t << 12 | n << 6 | r) >= 65536 && i <= 1114111)) return i;throw Error("Invalid UTF-8 detected");
}function m(e) {
b = s(e), S = b.length, E = 0;for (var t, n = []; !1 !== (t = h());) {
n.push(t);
}return c(n);
}var v = "object" == o(t) && t,
g = "object" == o(e) && e && e.exports == v && e,
y = "object" == (void 0 === r ? "undefined" : o(r)) && r;y.global !== y && y.window !== y || (a = y);var b,
S,
E,
T = String.fromCharCode,
_ = { version: "2.0.0", encode: p, decode: m };if ("object" == o(n(25)) && n(25)) void 0 !== (i = function () {
return _;
}.call(t, n, t, e)) && (e.exports = i);else if (v && !v.nodeType) {
if (g) g.exports = _;else {
var C = {},
w = C.hasOwnProperty;for (var R in _) {
w.call(_, R) && (v[R] = _[R]);
}
}
} else a.utf8 = _;
}(this);
}).call(t, n(58)(e), n(1));
}, function (e, t, n) {
e.exports = { EventTarget: n(153), Event: n(152) };
}, function (e, t, n) {
(function (t) {
e.exports = t.Event;
}).call(t, n(1));
}, function (e, t) {
function n() {
this._listeners = {};
}Object.defineProperties(n.prototype, { listeners: { get: function get() {
return this._listeners;
} } }), n.prototype.addEventListener = function (e, t) {
var n, r, i;if (e && t) {
for (n = this._listeners[e], void 0 === n && (this._listeners[e] = n = []), r = 0; i = n[r]; r++) {
if (i === t) return;
}n.push(t);
}
}, n.prototype.removeEventListener = function (e, t) {
var n, r, i;if (e && t && void 0 !== (n = this._listeners[e])) {
for (r = 0; i = n[r]; r++) {
if (i === t) {
n.splice(r, 1);break;
}
}0 === n.length && delete this._listeners[e];
}
}, n.prototype.dispatchEvent = function (e) {
var t,
n,
r,
i,
o,
a = !1;if (!e || "string" != typeof e.type) throw new Error("`event` must have a valid `type` property");e._yaeti && (e.target = this, e.cancelable = !0);try {
e.stopImmediatePropagation = function () {
a = !0;
};
} catch (e) {}if (t = e.type, n = this._listeners[t] || [], "function" == typeof (r = this["on" + t])) try {
r.call(this, e);
} catch (e) {
console.error(e);
}for (i = 0; (o = n[i]) && !a; i++) {
try {
o.call(this, e);
} catch (e) {
console.error(e);
}
}return !e.defaultPrevented;
}, e.exports = n;
}, function (e, t) {
function n(e, t, n) {
function i(e, r) {
if (i.count <= 0) throw new Error("after called too many times");--i.count, e ? (o = !0, t(e), t = n) : 0 !== i.count || o || t(null, r);
}var o = !1;return n = n || r, i.count = e, 0 === e ? t() : i;
}function r() {}e.exports = n;
}, function (e, t) {
!function (e) {
"use strict";
t.encode = function (t) {
var n,
r = new Uint8Array(t),
i = r.length,
o = "";for (n = 0; n < i; n += 3) {
o += e[r[n] >> 2], o += e[(3 & r[n]) << 4 | r[n + 1] >> 4], o += e[(15 & r[n + 1]) << 2 | r[n + 2] >> 6], o += e[63 & r[n + 2]];
}return i % 3 == 2 ? o = o.substring(0, o.length - 1) + "=" : i % 3 == 1 && (o = o.substring(0, o.length - 2) + "=="), o;
}, t.decode = function (t) {
var n,
r,
i,
o,
a,
s = .75 * t.length,
c = t.length,
u = 0;"=" === t[t.length - 1] && (s--, "=" === t[t.length - 2] && s--);var l = new ArrayBuffer(s),
d = new Uint8Array(l);for (n = 0; n < c; n += 4) {
r = e.indexOf(t[n]), i = e.indexOf(t[n + 1]), o = e.indexOf(t[n + 2]), a = e.indexOf(t[n + 3]), d[u++] = r << 2 | i >> 4, d[u++] = (15 & i) << 4 | o >> 2, d[u++] = (3 & o) << 6 | 63 & a;
}return l;
};
}("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/");
}, function (e, t, n) {
function r() {
return t.colors[l++ % t.colors.length];
}function i(e) {
function n() {}function i() {
var e = i,
n = +new Date(),
o = n - (u || n);e.diff = o, e.prev = u, e.curr = n, u = n, null == e.useColors && (e.useColors = t.useColors()), null == e.color && e.useColors && (e.color = r());var a = Array.prototype.slice.call(arguments);a[0] = t.coerce(a[0]), "string" != typeof a[0] && (a = ["%o"].concat(a));var s = 0;a[0] = a[0].replace(/%([a-z%])/g, function (n, r) {
if ("%%" === n) return n;s++;var i = t.formatters[r];if ("function" == typeof i) {
var o = a[s];n = i.call(e, o), a.splice(s, 1), s--;
}return n;
}), "function" == typeof t.formatArgs && (a = t.formatArgs.apply(e, a)), (i.log || t.log || console.log.bind(console)).apply(e, a);
}n.enabled = !1, i.enabled = !0;var o = t.enabled(e) ? i : n;return o.namespace = e, o;
}function o(e) {
t.save(e);for (var n = (e || "").split(/[\s,]+/), r = n.length, i = 0; i < r; i++) {
n[i] && (e = n[i].replace(/\*/g, ".*?"), "-" === e[0] ? t.skips.push(new RegExp("^" + e.substr(1) + "$")) : t.names.push(new RegExp("^" + e + "$")));
}
}function a() {
t.enable("");
}function s(e) {
var n, r;for (n = 0, r = t.skips.length; n < r; n++) {
if (t.skips[n].test(e)) return !1;
}for (n = 0, r = t.names.length; n < r; n++) {
if (t.names[n].test(e)) return !0;
}return !1;
}function c(e) {
return e instanceof Error ? e.stack || e.message : e;
}t = e.exports = i, t.coerce = c, t.disable = a, t.enable = o, t.enabled = s, t.humanize = n(165), t.names = [], t.skips = [], t.formatters = {};var u,
l = 0;
}, function (e, t, n) {
e.exports = n(158);
}, function (e, t, n) {
e.exports = n(159), e.exports.parser = n(18);
}, function (e, t, n) {
(function (t) {
function r(e, n) {
if (!(this instanceof r)) return new r(e, n);n = n || {}, e && "object" == typeof e && (n = e, e = null), e ? (e = l(e), n.hostname = e.host, n.secure = "https" == e.protocol || "wss" == e.protocol, n.port = e.port, e.query && (n.query = e.query)) : n.host && (n.hostname = l(n.host).host), this.secure = null != n.secure ? n.secure : t.location && "https:" == location.protocol, n.hostname && !n.port && (n.port = this.secure ? "443" : "80"), this.agent = n.agent || !1, this.hostname = n.hostname || (t.location ? location.hostname : "localhost"), this.port = n.port || (t.location && location.port ? location.port : this.secure ? 443 : 80), this.query = n.query || {}, "string" == typeof this.query && (this.query = p.decode(this.query)), this.upgrade = !1 !== n.upgrade, this.path = (n.path || "/engine.io").replace(/\/$/, "") + "/", this.forceJSONP = !!n.forceJSONP, this.jsonp = !1 !== n.jsonp, this.forceBase64 = !!n.forceBase64, this.enablesXDR = !!n.enablesXDR, this.timestampParam = n.timestampParam || "t", this.timestampRequests = n.timestampRequests, this.transports = n.transports || ["polling", "websocket"], this.readyState = "", this.writeBuffer = [], this.policyPort = n.policyPort || 843, this.rememberUpgrade = n.rememberUpgrade || !1, this.binaryType = null, this.onlyBinaryUpgrades = n.onlyBinaryUpgrades, this.perMessageDeflate = !1 !== n.perMessageDeflate && (n.perMessageDeflate || {}), !0 === this.perMessageDeflate && (this.perMessageDeflate = {}), this.perMessageDeflate && null == this.perMessageDeflate.threshold && (this.perMessageDeflate.threshold = 1024), this.pfx = n.pfx || null, this.key = n.key || null, this.passphrase = n.passphrase || null, this.cert = n.cert || null, this.ca = n.ca || null, this.ciphers = n.ciphers || null, this.rejectUnauthorized = void 0 === n.rejectUnauthorized ? null : n.rejectUnauthorized;var i = "object" == typeof t && t;i.global === i && n.extraHeaders && Object.keys(n.extraHeaders).length > 0 && (this.extraHeaders = n.extraHeaders), this.open();
}function i(e) {
var t = {};for (var n in e) {
e.hasOwnProperty(n) && (t[n] = e[n]);
}return t;
}var o = n(61),
a = n(36),
s = n(9)("engine.io-client:socket"),
c = n(41),
u = n(18),
l = n(63),
d = n(166),
p = n(38);e.exports = r, r.priorWebsocketSuccess = !1, a(r.prototype), r.protocol = u.protocol, r.Socket = r, r.Transport = n(34), r.transports = n(61), r.parser = n(18), r.prototype.createTransport = function (e) {
s('creating transport "%s"', e);var t = i(this.query);return t.EIO = u.protocol, t.transport = e, this.id && (t.sid = this.id), new o[e]({ agent: this.agent, hostname: this.hostname, port: this.port, secure: this.secure, path: this.path, query: t, forceJSONP: this.forceJSONP, jsonp: this.jsonp, forceBase64: this.forceBase64, enablesXDR: this.enablesXDR, timestampRequests: this.timestampRequests, timestampParam: this.timestampParam, policyPort: this.policyPort, socket: this, pfx: this.pfx, key: this.key, passphrase: this.passphrase, cert: this.cert, ca: this.ca, ciphers: this.ciphers, rejectUnauthorized: this.rejectUnauthorized, perMessageDeflate: this.perMessageDeflate, extraHeaders: this.extraHeaders });
}, r.prototype.open = function () {
var e;if (this.rememberUpgrade && r.priorWebsocketSuccess && -1 != this.transports.indexOf("websocket")) e = "websocket";else {
if (0 === this.transports.length) {
var t = this;return void setTimeout(function () {
t.emit("error", "No transports available");
}, 0);
}e = this.transports[0];
}this.readyState = "opening";try {
e = this.createTransport(e);
} catch (e) {
return this.transports.shift(), void this.open();
}e.open(), this.setTransport(e);
}, r.prototype.setTransport = function (e) {
s("setting transport %s", e.name);var t = this;this.transport && (s("clearing existing transport %s", this.transport.name), this.transport.removeAllListeners()), this.transport = e, e.on("drain", function () {
t.onDrain();
}).on("packet", function (e) {
t.onPacket(e);
}).on("error", function (e) {
t.onError(e);
}).on("close", function () {
t.onClose("transport close");
});
}, r.prototype.probe = function (e) {
function t() {
if (p.onlyBinaryUpgrades) {
var t = !this.supportsBinary && p.transport.supportsBinary;d = d || t;
}d || (s('probe transport "%s" opened', e), l.send([{ type: "ping", data: "probe" }]), l.once("packet", function (t) {
if (!d) if ("pong" == t.type && "probe" == t.data) {
if (s('probe transport "%s" pong', e), p.upgrading = !0, p.emit("upgrading", l), !l) return;r.priorWebsocketSuccess = "websocket" == l.name, s('pausing current transport "%s"', p.transport.name), p.transport.pause(function () {
d || "closed" != p.readyState && (s("changing transport and sending upgrade packet"), u(), p.setTransport(l), l.send([{ type: "upgrade" }]), p.emit("upgrade", l), l = null, p.upgrading = !1, p.flush());
});
} else {
s('probe transport "%s" failed', e);var n = new Error("probe error");n.transport = l.name, p.emit("upgradeError", n);
}
}));
}function n() {
d || (d = !0, u(), l.close(), l = null);
}function i(t) {
var r = new Error("probe error: " + t);r.transport = l.name, n(), s('probe transport "%s" failed because of error: %s', e, t), p.emit("upgradeError", r);
}function o() {
i("transport closed");
}function a() {
i("socket closed");
}function c(e) {
l && e.name != l.name && (s('"%s" works - aborting "%s"', e.name, l.name), n());
}function u() {
l.removeListener("open", t), l.removeListener("error", i), l.removeListener("close", o), p.removeListener("close", a), p.removeListener("upgrading", c);
}s('probing transport "%s"', e);var l = this.createTransport(e, { probe: 1 }),
d = !1,
p = this;r.priorWebsocketSuccess = !1, l.once("open", t), l.once("error", i), l.once("close", o), this.once("close", a), this.once("upgrading", c), l.open();
}, r.prototype.onOpen = function () {
if (s("socket open"), this.readyState = "open", r.priorWebsocketSuccess = "websocket" == this.transport.name, this.emit("open"), this.flush(), "open" == this.readyState && this.upgrade && this.transport.pause) {
s("starting upgrade probes");for (var e = 0, t = this.upgrades.length; e < t; e++) {
this.probe(this.upgrades[e]);
}
}
}, r.prototype.onPacket = function (e) {
if ("opening" == this.readyState || "open" == this.readyState) switch (s('socket receive: type "%s", data "%s"', e.type, e.data), this.emit("packet", e), this.emit("heartbeat"), e.type) {case "open":
this.onHandshake(d(e.data));break;case "pong":
this.setPing(), this.emit("pong");break;case "error":
var t = new Error("server error");t.code = e.data, this.onError(t);break;case "message":
this.emit("data", e.data), this.emit("message", e.data);} else s('packet received with socket readyState "%s"', this.readyState);
}, r.prototype.onHandshake = function (e) {
this.emit("handshake", e), this.id = e.sid, this.transport.query.sid = e.sid, this.upgrades = this.filterUpgrades(e.upgrades), this.pingInterval = e.pingInterval, this.pingTimeout = e.pingTimeout, this.onOpen(), "closed" != this.readyState && (this.setPing(), this.removeListener("heartbeat", this.onHeartbeat), this.on("heartbeat", this.onHeartbeat));
}, r.prototype.onHeartbeat = function (e) {
clearTimeout(this.pingTimeoutTimer);var t = this;t.pingTimeoutTimer = setTimeout(function () {
"closed" != t.readyState && t.onClose("ping timeout");
}, e || t.pingInterval + t.pingTimeout);
}, r.prototype.setPing = function () {
var e = this;clearTimeout(e.pingIntervalTimer), e.pingIntervalTimer = setTimeout(function () {
s("writing ping packet - expecting pong within %sms", e.pingTimeout), e.ping(), e.onHeartbeat(e.pingTimeout);
}, e.pingInterval);
}, r.prototype.ping = function () {
var e = this;this.sendPacket("ping", function () {
e.emit("ping");
});
}, r.prototype.onDrain = function () {
this.writeBuffer.splice(0, this.prevBufferLen), this.prevBufferLen = 0, 0 === this.writeBuffer.length ? this.emit("drain") : this.flush();
}, r.prototype.flush = function () {
"closed" != this.readyState && this.transport.writable && !this.upgrading && this.writeBuffer.length && (s("flushing %d packets in socket", this.writeBuffer.length), this.transport.send(this.writeBuffer), this.prevBufferLen = this.writeBuffer.length, this.emit("flush"));
}, r.prototype.write = r.prototype.send = function (e, t, n) {
return this.sendPacket("message", e, t, n), this;
}, r.prototype.sendPacket = function (e, t, n, r) {
if ("function" == typeof t && (r = t, t = void 0), "function" == typeof n && (r = n, n = null), "closing" != this.readyState && "closed" != this.readyState) {
n = n || {}, n.compress = !1 !== n.compress;var i = { type: e, data: t, options: n };this.emit("packetCreate", i), this.writeBuffer.push(i), r && this.once("flush", r), this.flush();
}
}, r.prototype.close = function () {
function e() {
r.onClose("forced close"), s("socket closing - telling transport to close"), r.transport.close();
}function t() {
r.removeListener("upgrade", t), r.removeListener("upgradeError", t), e();
}function n() {
r.once("upgrade", t), r.once("upgradeError", t);
}if ("opening" == this.readyState || "open" == this.readyState) {
this.readyState = "closing";var r = this;this.writeBuffer.length ? this.once("drain", function () {
this.upgrading ? n() : e();
}) : this.upgrading ? n() : e();
}return this;
}, r.prototype.onError = function (e) {
s("socket error %j", e), r.priorWebsocketSuccess = !1, this.emit("error", e), this.onClose("transport error", e);
}, r.prototype.onClose = function (e, t) {
if ("opening" == this.readyState || "open" == this.readyState || "closing" == this.readyState) {
s('socket close with reason: "%s"', e);var n = this;clearTimeout(this.pingIntervalTimer), clearTimeout(this.pingTimeoutTimer), this.transport.removeAllListeners("close"), this.transport.close(), this.transport.removeAllListeners(), this.readyState = "closed", this.id = null, this.emit("close", e, t), n.writeBuffer = [], n.prevBufferLen = 0;
}
}, r.prototype.filterUpgrades = function (e) {
for (var t = [], n = 0, r = e.length; n < r; n++) {
~c(this.transports, e[n]) && t.push(e[n]);
}return t;
};
}).call(t, n(1));
}, function (e, t, n) {
(function (t) {
function r() {}function i(e) {
o.call(this, e), this.query = this.query || {}, s || (t.___eio || (t.___eio = []), s = t.___eio), this.index = s.length;var n = this;s.push(function (e) {
n.onData(e);
}), this.query.j = this.index, t.document && t.addEventListener && t.addEventListener("beforeunload", function () {
n.script && (n.script.onerror = r);
}, !1);
}var o = n(62),
a = n(21);e.exports = i;var s,
c = /\n/g,
u = /\\n/g;a(i, o), i.prototype.supportsBinary = !1, i.prototype.doClose = function () {
this.script && (this.script.parentNode.removeChild(this.script), this.script = null), this.form && (this.form.parentNode.removeChild(this.form), this.form = null, this.iframe = null), o.prototype.doClose.call(this);
}, i.prototype.doPoll = function () {
var e = this,
t = document.createElement("script");this.script && (this.script.parentNode.removeChild(this.script), this.script = null), t.async = !0, t.src = this.uri(), t.onerror = function (t) {
e.onError("jsonp poll error", t);
};var n = document.getElementsByTagName("script")[0];n ? n.parentNode.insertBefore(t, n) : (document.head || document.body).appendChild(t), this.script = t, "undefined" != typeof navigator && /gecko/i.test(navigator.userAgent) && setTimeout(function () {
var e = document.createElement("iframe");document.body.appendChild(e), document.body.removeChild(e);
}, 100);
}, i.prototype.doWrite = function (e, t) {
function n() {
r(), t();
}function r() {
if (i.iframe) try {
i.form.removeChild(i.iframe);
} catch (e) {
i.onError("jsonp polling iframe removal error", e);
}try {
var e = '<iframe src="javascript:0" name="' + i.iframeId + '">';o = document.createElement(e);
} catch (e) {
o = document.createElement("iframe"), o.name = i.iframeId, o.src = "javascript:0";
}o.id = i.iframeId, i.form.appendChild(o), i.iframe = o;
}var i = this;if (!this.form) {
var o,
a = document.createElement("form"),
s = document.createElement("textarea"),
l = this.iframeId = "eio_iframe_" + this.index;a.className = "socketio", a.style.position = "absolute", a.style.top = "-1000px", a.style.left = "-1000px", a.target = l, a.method = "POST", a.setAttribute("accept-charset", "utf-8"), s.name = "d", a.appendChild(s), document.body.appendChild(a), this.form = a, this.area = s;
}this.form.action = this.uri(), r(), e = e.replace(u, "\\\n"), this.area.value = e.replace(c, "\\n");try {
this.form.submit();
} catch (e) {}this.iframe.attachEvent ? this.iframe.onreadystatechange = function () {
"complete" == i.iframe.readyState && n();
} : this.iframe.onload = n;
};
}).call(t, n(1));
}, function (e, t, n) {
(function (t) {
function r() {}function i(e) {
if (c.call(this, e), t.location) {
var n = "https:" == location.protocol,
r = location.port;r || (r = n ? 443 : 80), this.xd = e.hostname != t.location.hostname || r != e.port, this.xs = e.secure != n;
} else this.extraHeaders = e.extraHeaders;
}function o(e) {
this.method = e.method || "GET", this.uri = e.uri, this.xd = !!e.xd, this.xs = !!e.xs, this.async = !1 !== e.async, this.data = void 0 != e.data ? e.data : null, this.agent = e.agent, this.isBinary = e.isBinary, this.supportsBinary = e.supportsBinary, this.enablesXDR = e.enablesXDR, this.pfx = e.pfx, this.key = e.key, this.passphrase = e.passphrase, this.cert = e.cert, this.ca = e.ca, this.ciphers = e.ciphers, this.rejectUnauthorized = e.rejectUnauthorized, this.extraHeaders = e.extraHeaders, this.create();
}function a() {
for (var e in o.requests) {
o.requests.hasOwnProperty(e) && o.requests[e].abort();
}
}var s = n(35),
c = n(62),
u = n(36),
l = n(21),
d = n(9)("engine.io-client:polling-xhr");e.exports = i, e.exports.Request = o, l(i, c), i.prototype.supportsBinary = !0, i.prototype.request = function (e) {
return e = e || {}, e.uri = this.uri(), e.xd = this.xd, e.xs = this.xs, e.agent = this.agent || !1, e.supportsBinary = this.supportsBinary, e.enablesXDR = this.enablesXDR, e.pfx = this.pfx, e.key = this.key, e.passphrase = this.passphrase, e.cert = this.cert, e.ca = this.ca, e.ciphers = this.ciphers, e.rejectUnauthorized = this.rejectUnauthorized, e.extraHeaders = this.extraHeaders, new o(e);
}, i.prototype.doWrite = function (e, t) {
var n = "string" != typeof e && void 0 !== e,
r = this.request({ method: "POST", data: e, isBinary: n }),
i = this;r.on("success", t), r.on("error", function (e) {
i.onError("xhr post error", e);
}), this.sendXhr = r;
}, i.prototype.doPoll = function () {
d("xhr poll");var e = this.request(),
t = this;e.on("data", function (e) {
t.onData(e);
}), e.on("error", function (e) {
t.onError("xhr poll error", e);
}), this.pollXhr = e;
}, u(o.prototype), o.prototype.create = function () {
var e = { agent: this.agent, xdomain: this.xd, xscheme: this.xs, enablesXDR: this.enablesXDR };e.pfx = this.pfx, e.key = this.key, e.passphrase = this.passphrase, e.cert = this.cert, e.ca = this.ca, e.ciphers = this.ciphers, e.rejectUnauthorized = this.rejectUnauthorized;var n = this.xhr = new s(e),
r = this;try {
d("xhr open %s: %s", this.method, this.uri), n.open(this.method, this.uri, this.async);try {
if (this.extraHeaders) {
n.setDisableHeaderCheck(!0);for (var i in this.extraHeaders) {
this.extraHeaders.hasOwnProperty(i) && n.setRequestHeader(i, this.extraHeaders[i]);
}
}
} catch (e) {}if (this.supportsBinary && (n.responseType = "arraybuffer"), "POST" == this.method) try {
this.isBinary ? n.setRequestHeader("Content-type", "application/octet-stream") : n.setRequestHeader("Content-type", "text/plain;charset=UTF-8");
} catch (e) {}"withCredentials" in n && (n.withCredentials = !0), this.hasXDR() ? (n.onload = function () {
r.onLoad();
}, n.onerror = function () {
r.onError(n.responseText);
}) : n.onreadystatechange = function () {
4 == n.readyState && (200 == n.status || 1223 == n.status ? r.onLoad() : setTimeout(function () {
r.onError(n.status);
}, 0));
}, d("xhr data %s", this.data), n.send(this.data);
} catch (e) {
return void setTimeout(function () {
r.onError(e);
}, 0);
}t.document && (this.index = o.requestsCount++, o.requests[this.index] = this);
}, o.prototype.onSuccess = function () {
this.emit("success"), this.cleanup();
}, o.prototype.onData = function (e) {
this.emit("data", e), this.onSuccess();
}, o.prototype.onError = function (e) {
this.emit("error", e), this.cleanup(!0);
}, o.prototype.cleanup = function (e) {
if (void 0 !== this.xhr && null !== this.xhr) {
if (this.hasXDR() ? this.xhr.onload = this.xhr.onerror = r : this.xhr.onreadystatechange = r, e) try {
this.xhr.abort();
} catch (e) {}t.document && delete o.requests[this.index], this.xhr = null;
}
}, o.prototype.onLoad = function () {
var e;try {
var t;try {
t = this.xhr.getResponseHeader("Content-Type").split(";")[0];
} catch (e) {}if ("application/octet-stream" === t) e = this.xhr.response;else if (this.supportsBinary) try {
e = String.fromCharCode.apply(null, new Uint8Array(this.xhr.response));
} catch (t) {
for (var n = new Uint8Array(this.xhr.response), r = [], i = 0, o = n.length; i < o; i++) {
r.push(n[i]);
}e = String.fromCharCode.apply(null, r);
} else e = this.xhr.responseText;
} catch (e) {
this.onError(e);
}null != e && this.onData(e);
}, o.prototype.hasXDR = function () {
return void 0 !== t.XDomainRequest && !this.xs && this.enablesXDR;
}, o.prototype.abort = function () {
this.cleanup();
}, t.document && (o.requestsCount = 0, o.requests = {}, t.attachEvent ? t.attachEvent("onunload", a) : t.addEventListener && t.addEventListener("beforeunload", a, !1));
}).call(t, n(1));
}, function (e, t, n) {
(function (t) {
function r(e) {
e && e.forceBase64 && (this.supportsBinary = !1), this.perMessageDeflate = e.perMessageDeflate, i.call(this, e);
}var i = n(34),
o = n(18),
a = n(38),
s = n(21),
c = n(59),
u = n(9)("engine.io-client:websocket"),
l = t.WebSocket || t.MozWebSocket,
d = l;if (!d && "undefined" == typeof window) try {
d = n(171);
} catch (e) {}e.exports = r, s(r, i), r.prototype.name = "websocket", r.prototype.supportsBinary = !0, r.prototype.doOpen = function () {
if (this.check()) {
var e = this.uri(),
t = { agent: this.agent, perMessageDeflate: this.perMessageDeflate };t.pfx = this.pfx, t.key = this.key, t.passphrase = this.passphrase, t.cert = this.cert, t.ca = this.ca, t.ciphers = this.ciphers, t.rejectUnauthorized = this.rejectUnauthorized, this.extraHeaders && (t.headers = this.extraHeaders), this.ws = l ? new d(e) : new d(e, void 0, t), void 0 === this.ws.binaryType && (this.supportsBinary = !1), this.ws.supports && this.ws.supports.binary ? (this.supportsBinary = !0, this.ws.binaryType = "buffer") : this.ws.binaryType = "arraybuffer", this.addEventListeners();
}
}, r.prototype.addEventListeners = function () {
var e = this;this.ws.onopen = function () {
e.onOpen();
}, this.ws.onclose = function () {
e.onClose();
}, this.ws.onmessage = function (t) {
e.onData(t.data);
}, this.ws.onerror = function (t) {
e.onError("websocket error", t);
};
}, "undefined" != typeof navigator && /iPad|iPhone|iPod/i.test(navigator.userAgent) && (r.prototype.onData = function (e) {
var t = this;setTimeout(function () {
i.prototype.onData.call(t, e);
}, 0);
}), r.prototype.write = function (e) {
function n() {
r.emit("flush"), setTimeout(function () {
r.writable = !0, r.emit("drain");
}, 0);
}var r = this;this.writable = !1;for (var i = e.length, a = 0, s = i; a < s; a++) {
!function (e) {
o.encodePacket(e, r.supportsBinary, function (o) {
if (!l) {
var a = {};e.options && (a.compress = e.options.compress), r.perMessageDeflate && ("string" == typeof o ? t.Buffer.byteLength(o) : o.length) < r.perMessageDeflate.threshold && (a.compress = !1);
}try {
l ? r.ws.send(o) : r.ws.send(o, a);
} catch (e) {
u("websocket closed before onclose event");
}--i || n();
});
}(e[a]);
}
}, r.prototype.onClose = function () {
i.prototype.onClose.call(this);
}, r.prototype.doClose = function () {
void 0 !== this.ws && this.ws.close();
}, r.prototype.uri = function () {
var e = this.query || {},
t = this.secure ? "wss" : "ws",
n = "";return this.port && ("wss" == t && 443 != this.port || "ws" == t && 80 != this.port) && (n = ":" + this.port), this.timestampRequests && (e[this.timestampParam] = c()), this.supportsBinary || (e.b64 = 1), e = a.encode(e), e.length && (e = "?" + e), t + "://" + (-1 !== this.hostname.indexOf(":") ? "[" + this.hostname + "]" : this.hostname) + n + this.path + e;
}, r.prototype.check = function () {
return !(!d || "__initialize" in d && this.name === r.prototype.name);
};
}).call(t, n(1));
}, function (e, t) {
e.exports = Object.keys || function (e) {
var t = [],
n = Object.prototype.hasOwnProperty;for (var r in e) {
n.call(e, r) && t.push(r);
}return t;
};
}, function (e, t, n) {
(function (t) {
function r(e) {
function n(e) {
if (!e) return !1;if (t.Buffer && t.Buffer.isBuffer(e) || t.ArrayBuffer && e instanceof ArrayBuffer || t.Blob && e instanceof Blob || t.File && e instanceof File) return !0;if (i(e)) {
for (var r = 0; r < e.length; r++) {
if (n(e[r])) return !0;
}
} else if (e && "object" == typeof e) {
e.toJSON && (e = e.toJSON());for (var o in e) {
if (Object.prototype.hasOwnProperty.call(e, o) && n(e[o])) return !0;
}
}return !1;
}return n(e);
}var i = n(37);e.exports = r;
}).call(t, n(1));
}, function (e, t) {
function n(e) {
if (e = "" + e, !(e.length > 1e4)) {
var t = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if (t) {
var n = parseFloat(t[1]);switch ((t[2] || "ms").toLowerCase()) {case "years":case "year":case "yrs":case "yr":case "y":
return n * l;case "days":case "day":case "d":
return n * u;case "hours":case "hour":case "hrs":case "hr":case "h":
return n * c;case "minutes":case "minute":case "mins":case "min":case "m":
return n * s;case "seconds":case "second":case "secs":case "sec":case "s":
return n * a;case "milliseconds":case "millisecond":case "msecs":case "msec":case "ms":
return n;}
}
}
}function r(e) {
return e >= u ? Math.round(e / u) + "d" : e >= c ? Math.round(e / c) + "h" : e >= s ? Math.round(e / s) + "m" : e >= a ? Math.round(e / a) + "s" : e + "ms";
}function i(e) {
return o(e, u, "day") || o(e, c, "hour") || o(e, s, "minute") || o(e, a, "second") || e + " ms";
}function o(e, t, n) {
if (!(e < t)) return e < 1.5 * t ? Math.floor(e / t) + " " + n : Math.ceil(e / t) + " " + n + "s";
}var a = 1e3,
s = 60 * a,
c = 60 * s,
u = 24 * c,
l = 365.25 * u;e.exports = function (e, t) {
return t = t || {}, "string" == typeof e ? n(e) : t.long ? i(e) : r(e);
};
}, function (e, t, n) {
(function (t) {
var n = /^[\],:{}\s]*$/,
r = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,
i = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
o = /(?:^|:|,)(?:\s*\[)+/g,
a = /^\s+/,
s = /\s+$/;e.exports = function (e) {
return "string" == typeof e && e ? (e = e.replace(a, "").replace(s, ""), t.JSON && JSON.parse ? JSON.parse(e) : n.test(e.replace(r, "@").replace(i, "]").replace(o, "")) ? new Function("return " + e)() : void 0) : null;
};
}).call(t, n(1));
}, function (e, t, n) {
function r(e, t) {
"object" == typeof e && (t = e, e = void 0), t = t || {};var n,
r = i(e),
o = r.source,
u = r.id,
l = r.path,
d = c[u] && l in c[u].nsps;return t.forceNew || t["force new connection"] || !1 === t.multiplex || d ? (s("ignoring socket cache for %s", o), n = a(o, t)) : (c[u] || (s("new io instance for %s", o), c[u] = a(o, t)), n = c[u]), n.socket(r.path);
}var i = n(168),
o = n(39),
a = n(64),
s = n(9)("socket.io-client");e.exports = t = r;var c = t.managers = {};t.protocol = o.protocol, t.connect = r, t.Manager = n(64), t.Socket = n(66);
}, function (e, t, n) {
(function (t) {
function r(e, n) {
var r = e,
n = n || t.location;null == e && (e = n.protocol + "//" + n.host), "string" == typeof e && ("/" == e.charAt(0) && (e = "/" == e.charAt(1) ? n.protocol + e : n.host + e), /^(https?|wss?):\/\//.test(e) || (o("protocol-less url %s", e), e = void 0 !== n ? n.protocol + "//" + e : "https://" + e), o("parse %s", e), r = i(e)), r.port || (/^(http|ws)$/.test(r.protocol) ? r.port = "80" : /^(http|ws)s$/.test(r.protocol) && (r.port = "443")), r.path = r.path || "/";var a = -1 !== r.host.indexOf(":"),
s = a ? "[" + r.host + "]" : r.host;return r.id = r.protocol + "://" + s + ":" + r.port, r.href = r.protocol + "://" + s + (n && n.port == r.port ? "" : ":" + r.port), r;
}var i = n(63),
o = n(9)("socket.io-client:url");e.exports = r;
}).call(t, n(1));
}, function (e, t, n) {
(function (e) {
var r = n(37),
i = n(67);t.deconstructPacket = function (e) {
function t(e) {
if (!e) return e;if (i(e)) {
var o = { _placeholder: !0, num: n.length };return n.push(e), o;
}if (r(e)) {
for (var a = new Array(e.length), s = 0; s < e.length; s++) {
a[s] = t(e[s]);
}return a;
}if ("object" == typeof e && !(e instanceof Date)) {
var a = {};for (var c in e) {
a[c] = t(e[c]);
}return a;
}return e;
}var n = [],
o = e.data,
a = e;return a.data = t(o), a.attachments = n.length, { packet: a, buffers: n };
}, t.reconstructPacket = function (e, t) {
function n(e) {
if (e && e._placeholder) return t[e.num];if (r(e)) {
for (var i = 0; i < e.length; i++) {
e[i] = n(e[i]);
}return e;
}if (e && "object" == typeof e) {
for (var o in e) {
e[o] = n(e[o]);
}return e;
}return e;
}return e.data = n(e.data), e.attachments = void 0, e;
}, t.removeBlobs = function (t, n) {
function o(t, c, u) {
if (!t) return t;if (e.Blob && t instanceof Blob || e.File && t instanceof File) {
a++;var l = new FileReader();l.onload = function () {
u ? u[c] = this.result : s = this.result, --a || n(s);
}, l.readAsArrayBuffer(t);
} else if (r(t)) for (var d = 0; d < t.length; d++) {
o(t[d], d, t);
} else if (t && "object" == typeof t && !i(t)) for (var p in t) {
o(t[p], p, t);
}
}var a = 0,
s = t;o(s), a || n(s);
};
}).call(t, n(1));
}, function (e, t) {
function n(e) {
if (e) return r(e);
}function r(e) {
for (var t in n.prototype) {
e[t] = n.prototype[t];
}return e;
}e.exports = n, n.prototype.on = n.prototype.addEventListener = function (e, t) {
return this._callbacks = this._callbacks || {}, (this._callbacks[e] = this._callbacks[e] || []).push(t), this;
}, n.prototype.once = function (e, t) {
function n() {
r.off(e, n), t.apply(this, arguments);
}var r = this;return this._callbacks = this._callbacks || {}, n.fn = t, this.on(e, n), this;
}, n.prototype.off = n.prototype.removeListener = n.prototype.removeAllListeners = n.prototype.removeEventListener = function (e, t) {
if (this._callbacks = this._callbacks || {}, 0 == arguments.length) return this._callbacks = {}, this;var n = this._callbacks[e];if (!n) return this;if (1 == arguments.length) return delete this._callbacks[e], this;for (var r, i = 0; i < n.length; i++) {
if ((r = n[i]) === t || r.fn === t) {
n.splice(i, 1);break;
}
}return this;
}, n.prototype.emit = function (e) {
this._callbacks = this._callbacks || {};var t = [].slice.call(arguments, 1),
n = this._callbacks[e];if (n) {
n = n.slice(0);for (var r = 0, i = n.length; r < i; ++r) {
n[r].apply(this, t);
}
}return this;
}, n.prototype.listeners = function (e) {
return this._callbacks = this._callbacks || {}, this._callbacks[e] || [];
}, n.prototype.hasListeners = function (e) {
return !!this.listeners(e).length;
};
}, function (e, t) {}]);
});
}, 488, null, "lib-jitsi-meet/lib-jitsi-meet.min.js");
__d(/* jquery/dist/jquery.js */function(global, require, module, exports) {
(function (global, factory) {
if (typeof module === "object" && typeof module.exports === "object") {
module.exports = global.document ? factory(global, true) : function (w) {
if (!w.document) {
throw new Error("jQuery requires a window with a document");
}
return factory(w);
};
} else {
factory(global);
}
})(typeof window !== "undefined" ? window : this, function (window, noGlobal) {
var arr = [];
var _slice = arr.slice;
var concat = arr.concat;
var push = arr.push;
var indexOf = arr.indexOf;
var class2type = {};
var toString = class2type.toString;
var hasOwn = class2type.hasOwnProperty;
var support = {};
var document = window.document,
version = "2.1.4",
jQuery = function jQuery(selector, context) {
return new jQuery.fn.init(selector, context);
},
rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
rmsPrefix = /^-ms-/,
rdashAlpha = /-([\da-z])/gi,
fcamelCase = function fcamelCase(all, letter) {
return letter.toUpperCase();
};
jQuery.fn = jQuery.prototype = {
jquery: version,
constructor: jQuery,
selector: "",
length: 0,
toArray: function toArray() {
return _slice.call(this);
},
get: function get(num) {
return num != null ? num < 0 ? this[num + this.length] : this[num] : _slice.call(this);
},
pushStack: function pushStack(elems) {
var ret = jQuery.merge(this.constructor(), elems);
ret.prevObject = this;
ret.context = this.context;
return ret;
},
each: function each(callback, args) {
return jQuery.each(this, callback, args);
},
map: function map(callback) {
return this.pushStack(jQuery.map(this, function (elem, i) {
return callback.call(elem, i, elem);
}));
},
slice: function slice() {
return this.pushStack(_slice.apply(this, arguments));
},
first: function first() {
return this.eq(0);
},
last: function last() {
return this.eq(-1);
},
eq: function eq(i) {
var len = this.length,
j = +i + (i < 0 ? len : 0);
return this.pushStack(j >= 0 && j < len ? [this[j]] : []);
},
end: function end() {
return this.prevObject || this.constructor(null);
},
push: push,
sort: arr.sort,
splice: arr.splice
};
jQuery.extend = jQuery.fn.extend = function () {
var options,
name,
src,
copy,
copyIsArray,
clone,
target = arguments[0] || {},
i = 1,
length = arguments.length,
deep = false;
if (typeof target === "boolean") {
deep = target;
target = arguments[i] || {};
i++;
}
if (typeof target !== "object" && !jQuery.isFunction(target)) {
target = {};
}
if (i === length) {
target = this;
i--;
}
for (; i < length; i++) {
if ((options = arguments[i]) != null) {
for (name in options) {
src = target[name];
copy = options[name];
if (target === copy) {
continue;
}
if (deep && copy && (jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)))) {
if (copyIsArray) {
copyIsArray = false;
clone = src && jQuery.isArray(src) ? src : [];
} else {
clone = src && jQuery.isPlainObject(src) ? src : {};
}
target[name] = jQuery.extend(deep, clone, copy);
} else if (copy !== undefined) {
target[name] = copy;
}
}
}
}
return target;
};
jQuery.extend({
expando: "jQuery" + (version + Math.random()).replace(/\D/g, ""),
isReady: true,
error: function error(msg) {
throw new Error(msg);
},
noop: function noop() {},
isFunction: function isFunction(obj) {
return jQuery.type(obj) === "function";
},
isArray: Array.isArray,
isWindow: function isWindow(obj) {
return obj != null && obj === obj.window;
},
isNumeric: function isNumeric(obj) {
return !jQuery.isArray(obj) && obj - parseFloat(obj) + 1 >= 0;
},
isPlainObject: function isPlainObject(obj) {
if (jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow(obj)) {
return false;
}
if (obj.constructor && !hasOwn.call(obj.constructor.prototype, "isPrototypeOf")) {
return false;
}
return true;
},
isEmptyObject: function isEmptyObject(obj) {
var name;
for (name in obj) {
return false;
}
return true;
},
type: function type(obj) {
if (obj == null) {
return obj + "";
}
return typeof obj === "object" || typeof obj === "function" ? class2type[toString.call(obj)] || "object" : typeof obj;
},
globalEval: function globalEval(code) {
var script,
indirect = eval;
code = jQuery.trim(code);
if (code) {
if (code.indexOf("use strict") === 1) {
script = document.createElement("script");
script.text = code;
document.head.appendChild(script).parentNode.removeChild(script);
} else {
indirect(code);
}
}
},
camelCase: function camelCase(string) {
return string.replace(rmsPrefix, "ms-").replace(rdashAlpha, fcamelCase);
},
nodeName: function nodeName(elem, name) {
return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
},
each: function each(obj, callback, args) {
var value,
i = 0,
length = obj.length,
isArray = isArraylike(obj);
if (args) {
if (isArray) {
for (; i < length; i++) {
value = callback.apply(obj[i], args);
if (value === false) {
break;
}
}
} else {
for (i in obj) {
value = callback.apply(obj[i], args);
if (value === false) {
break;
}
}
}
} else {
if (isArray) {
for (; i < length; i++) {
value = callback.call(obj[i], i, obj[i]);
if (value === false) {
break;
}
}
} else {
for (i in obj) {
value = callback.call(obj[i], i, obj[i]);
if (value === false) {
break;
}
}
}
}
return obj;
},
trim: function trim(text) {
return text == null ? "" : (text + "").replace(rtrim, "");
},
makeArray: function makeArray(arr, results) {
var ret = results || [];
if (arr != null) {
if (isArraylike(Object(arr))) {
jQuery.merge(ret, typeof arr === "string" ? [arr] : arr);
} else {
push.call(ret, arr);
}
}
return ret;
},
inArray: function inArray(elem, arr, i) {
return arr == null ? -1 : indexOf.call(arr, elem, i);
},
merge: function merge(first, second) {
var len = +second.length,
j = 0,
i = first.length;
for (; j < len; j++) {
first[i++] = second[j];
}
first.length = i;
return first;
},
grep: function grep(elems, callback, invert) {
var callbackInverse,
matches = [],
i = 0,
length = elems.length,
callbackExpect = !invert;
for (; i < length; i++) {
callbackInverse = !callback(elems[i], i);
if (callbackInverse !== callbackExpect) {
matches.push(elems[i]);
}
}
return matches;
},
map: function map(elems, callback, arg) {
var value,
i = 0,
length = elems.length,
isArray = isArraylike(elems),
ret = [];
if (isArray) {
for (; i < length; i++) {
value = callback(elems[i], i, arg);
if (value != null) {
ret.push(value);
}
}
} else {
for (i in elems) {
value = callback(elems[i], i, arg);
if (value != null) {
ret.push(value);
}
}
}
return concat.apply([], ret);
},
guid: 1,
proxy: function proxy(fn, context) {
var tmp, args, proxy;
if (typeof context === "string") {
tmp = fn[context];
context = fn;
fn = tmp;
}
if (!jQuery.isFunction(fn)) {
return undefined;
}
args = _slice.call(arguments, 2);
proxy = function proxy() {
return fn.apply(context || this, args.concat(_slice.call(arguments)));
};
proxy.guid = fn.guid = fn.guid || jQuery.guid++;
return proxy;
},
now: Date.now,
support: support
});
jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function (i, name) {
class2type["[object " + name + "]"] = name.toLowerCase();
});
function isArraylike(obj) {
var length = "length" in obj && obj.length,
type = jQuery.type(obj);
if (type === "function" || jQuery.isWindow(obj)) {
return false;
}
if (obj.nodeType === 1 && length) {
return true;
}
return type === "array" || length === 0 || typeof length === "number" && length > 0 && length - 1 in obj;
}
var Sizzle = function (window) {
var i,
support,
Expr,
getText,
isXML,
tokenize,
compile,
select,
outermostContext,
sortInput,
hasDuplicate,
setDocument,
document,
docElem,
documentIsHTML,
rbuggyQSA,
rbuggyMatches,
matches,
contains,
expando = "sizzle" + 1 * new Date(),
preferredDoc = window.document,
dirruns = 0,
done = 0,
classCache = createCache(),
tokenCache = createCache(),
compilerCache = createCache(),
sortOrder = function sortOrder(a, b) {
if (a === b) {
hasDuplicate = true;
}
return 0;
},
MAX_NEGATIVE = 1 << 31,
hasOwn = {}.hasOwnProperty,
arr = [],
pop = arr.pop,
push_native = arr.push,
push = arr.push,
slice = arr.slice,
indexOf = function indexOf(list, elem) {
var i = 0,
len = list.length;
for (; i < len; i++) {
if (list[i] === elem) {
return i;
}
}
return -1;
},
booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
whitespace = "[\\x20\\t\\r\\n\\f]",
characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
identifier = characterEncoding.replace("w", "w#"),
attributes = "\\[" + whitespace + "*(" + characterEncoding + ")(?:" + whitespace + "*([*^$|!~]?=)" + whitespace + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace + "*\\]",
pseudos = ":(" + characterEncoding + ")(?:\\((" + "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + ".*" + ")\\)|)",
rwhitespace = new RegExp(whitespace + "+", "g"),
rtrim = new RegExp("^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g"),
rcomma = new RegExp("^" + whitespace + "*," + whitespace + "*"),
rcombinators = new RegExp("^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*"),
rattributeQuotes = new RegExp("=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g"),
rpseudo = new RegExp(pseudos),
ridentifier = new RegExp("^" + identifier + "$"),
matchExpr = {
"ID": new RegExp("^#(" + characterEncoding + ")"),
"CLASS": new RegExp("^\\.(" + characterEncoding + ")"),
"TAG": new RegExp("^(" + characterEncoding.replace("w", "w*") + ")"),
"ATTR": new RegExp("^" + attributes),
"PSEUDO": new RegExp("^" + pseudos),
"CHILD": new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i"),
"bool": new RegExp("^(?:" + booleans + ")$", "i"),
"needsContext": new RegExp("^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i")
},
rinputs = /^(?:input|select|textarea|button)$/i,
rheader = /^h\d$/i,
rnative = /^[^{]+\{\s*\[native \w/,
rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
rsibling = /[+~]/,
rescape = /'|\\/g,
runescape = new RegExp("\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig"),
funescape = function funescape(_, escaped, escapedWhitespace) {
var high = "0x" + escaped - 0x10000;
return high !== high || escapedWhitespace ? escaped : high < 0 ? String.fromCharCode(high + 0x10000) : String.fromCharCode(high >> 10 | 0xD800, high & 0x3FF | 0xDC00);
},
unloadHandler = function unloadHandler() {
setDocument();
};
try {
push.apply(arr = slice.call(preferredDoc.childNodes), preferredDoc.childNodes);
arr[preferredDoc.childNodes.length].nodeType;
} catch (e) {
push = { apply: arr.length ? function (target, els) {
push_native.apply(target, slice.call(els));
} : function (target, els) {
var j = target.length,
i = 0;
while (target[j++] = els[i++]) {}
target.length = j - 1;
}
};
}
function Sizzle(selector, context, results, seed) {
var match, elem, m, nodeType, i, groups, old, nid, newContext, newSelector;
if ((context ? context.ownerDocument || context : preferredDoc) !== document) {
setDocument(context);
}
context = context || document;
results = results || [];
nodeType = context.nodeType;
if (typeof selector !== "string" || !selector || nodeType !== 1 && nodeType !== 9 && nodeType !== 11) {
return results;
}
if (!seed && documentIsHTML) {
if (nodeType !== 11 && (match = rquickExpr.exec(selector))) {
if (m = match[1]) {
if (nodeType === 9) {
elem = context.getElementById(m);
if (elem && elem.parentNode) {
if (elem.id === m) {
results.push(elem);
return results;
}
} else {
return results;
}
} else {
if (context.ownerDocument && (elem = context.ownerDocument.getElementById(m)) && contains(context, elem) && elem.id === m) {
results.push(elem);
return results;
}
}
} else if (match[2]) {
push.apply(results, context.getElementsByTagName(selector));
return results;
} else if ((m = match[3]) && support.getElementsByClassName) {
push.apply(results, context.getElementsByClassName(m));
return results;
}
}
if (support.qsa && (!rbuggyQSA || !rbuggyQSA.test(selector))) {
nid = old = expando;
newContext = context;
newSelector = nodeType !== 1 && selector;
if (nodeType === 1 && context.nodeName.toLowerCase() !== "object") {
groups = tokenize(selector);
if (old = context.getAttribute("id")) {
nid = old.replace(rescape, "\\$&");
} else {
context.setAttribute("id", nid);
}
nid = "[id='" + nid + "'] ";
i = groups.length;
while (i--) {
groups[i] = nid + toSelector(groups[i]);
}
newContext = rsibling.test(selector) && testContext(context.parentNode) || context;
newSelector = groups.join(",");
}
if (newSelector) {
try {
push.apply(results, newContext.querySelectorAll(newSelector));
return results;
} catch (qsaError) {} finally {
if (!old) {
context.removeAttribute("id");
}
}
}
}
}
return select(selector.replace(rtrim, "$1"), context, results, seed);
}
function createCache() {
var keys = [];
function cache(key, value) {
if (keys.push(key + " ") > Expr.cacheLength) {
delete cache[keys.shift()];
}
return cache[key + " "] = value;
}
return cache;
}
function markFunction(fn) {
fn[expando] = true;
return fn;
}
function assert(fn) {
var div = document.createElement("div");
try {
return !!fn(div);
} catch (e) {
return false;
} finally {
if (div.parentNode) {
div.parentNode.removeChild(div);
}
div = null;
}
}
function addHandle(attrs, handler) {
var arr = attrs.split("|"),
i = attrs.length;
while (i--) {
Expr.attrHandle[arr[i]] = handler;
}
}
function siblingCheck(a, b) {
var cur = b && a,
diff = cur && a.nodeType === 1 && b.nodeType === 1 && (~b.sourceIndex || MAX_NEGATIVE) - (~a.sourceIndex || MAX_NEGATIVE);
if (diff) {
return diff;
}
if (cur) {
while (cur = cur.nextSibling) {
if (cur === b) {
return -1;
}
}
}
return a ? 1 : -1;
}
function createInputPseudo(type) {
return function (elem) {
var name = elem.nodeName.toLowerCase();
return name === "input" && elem.type === type;
};
}
function createButtonPseudo(type) {
return function (elem) {
var name = elem.nodeName.toLowerCase();
return (name === "input" || name === "button") && elem.type === type;
};
}
function createPositionalPseudo(fn) {
return markFunction(function (argument) {
argument = +argument;
return markFunction(function (seed, matches) {
var j,
matchIndexes = fn([], seed.length, argument),
i = matchIndexes.length;
while (i--) {
if (seed[j = matchIndexes[i]]) {
seed[j] = !(matches[j] = seed[j]);
}
}
});
});
}
function testContext(context) {
return context && typeof context.getElementsByTagName !== "undefined" && context;
}
support = Sizzle.support = {};
isXML = Sizzle.isXML = function (elem) {
var documentElement = elem && (elem.ownerDocument || elem).documentElement;
return documentElement ? documentElement.nodeName !== "HTML" : false;
};
setDocument = Sizzle.setDocument = function (node) {
var hasCompare,
parent,
doc = node ? node.ownerDocument || node : preferredDoc;
if (doc === document || doc.nodeType !== 9 || !doc.documentElement) {
return document;
}
document = doc;
docElem = doc.documentElement;
parent = doc.defaultView;
if (parent && parent !== parent.top) {
if (parent.addEventListener) {
parent.addEventListener("unload", unloadHandler, false);
} else if (parent.attachEvent) {
parent.attachEvent("onunload", unloadHandler);
}
}
documentIsHTML = !isXML(doc);
support.attributes = assert(function (div) {
div.className = "i";
return !div.getAttribute("className");
});
support.getElementsByTagName = assert(function (div) {
div.appendChild(doc.createComment(""));
return !div.getElementsByTagName("*").length;
});
support.getElementsByClassName = rnative.test(doc.getElementsByClassName);
support.getById = assert(function (div) {
docElem.appendChild(div).id = expando;
return !doc.getElementsByName || !doc.getElementsByName(expando).length;
});
if (support.getById) {
Expr.find["ID"] = function (id, context) {
if (typeof context.getElementById !== "undefined" && documentIsHTML) {
var m = context.getElementById(id);
return m && m.parentNode ? [m] : [];
}
};
Expr.filter["ID"] = function (id) {
var attrId = id.replace(runescape, funescape);
return function (elem) {
return elem.getAttribute("id") === attrId;
};
};
} else {
delete Expr.find["ID"];
Expr.filter["ID"] = function (id) {
var attrId = id.replace(runescape, funescape);
return function (elem) {
var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id");
return node && node.value === attrId;
};
};
}
Expr.find["TAG"] = support.getElementsByTagName ? function (tag, context) {
if (typeof context.getElementsByTagName !== "undefined") {
return context.getElementsByTagName(tag);
} else if (support.qsa) {
return context.querySelectorAll(tag);
}
} : function (tag, context) {
var elem,
tmp = [],
i = 0,
results = context.getElementsByTagName(tag);
if (tag === "*") {
while (elem = results[i++]) {
if (elem.nodeType === 1) {
tmp.push(elem);
}
}
return tmp;
}
return results;
};
Expr.find["CLASS"] = support.getElementsByClassName && function (className, context) {
if (documentIsHTML) {
return context.getElementsByClassName(className);
}
};
rbuggyMatches = [];
rbuggyQSA = [];
if (support.qsa = rnative.test(doc.querySelectorAll)) {
assert(function (div) {
docElem.appendChild(div).innerHTML = "<a id='" + expando + "'></a>" + "<select id='" + expando + "-\f]' msallowcapture=''>" + "<option selected=''></option></select>";
if (div.querySelectorAll("[msallowcapture^='']").length) {
rbuggyQSA.push("[*^$]=" + whitespace + "*(?:''|\"\")");
}
if (!div.querySelectorAll("[selected]").length) {
rbuggyQSA.push("\\[" + whitespace + "*(?:value|" + booleans + ")");
}
if (!div.querySelectorAll("[id~=" + expando + "-]").length) {
rbuggyQSA.push("~=");
}
if (!div.querySelectorAll(":checked").length) {
rbuggyQSA.push(":checked");
}
if (!div.querySelectorAll("a#" + expando + "+*").length) {
rbuggyQSA.push(".#.+[+~]");
}
});
assert(function (div) {
var input = doc.createElement("input");
input.setAttribute("type", "hidden");
div.appendChild(input).setAttribute("name", "D");
if (div.querySelectorAll("[name=d]").length) {
rbuggyQSA.push("name" + whitespace + "*[*^$|!~]?=");
}
if (!div.querySelectorAll(":enabled").length) {
rbuggyQSA.push(":enabled", ":disabled");
}
div.querySelectorAll("*,:x");
rbuggyQSA.push(",.*:");
});
}
if (support.matchesSelector = rnative.test(matches = docElem.matches || docElem.webkitMatchesSelector || docElem.mozMatchesSelector || docElem.oMatchesSelector || docElem.msMatchesSelector)) {
assert(function (div) {
support.disconnectedMatch = matches.call(div, "div");
matches.call(div, "[s!='']:x");
rbuggyMatches.push("!=", pseudos);
});
}
rbuggyQSA = rbuggyQSA.length && new RegExp(rbuggyQSA.join("|"));
rbuggyMatches = rbuggyMatches.length && new RegExp(rbuggyMatches.join("|"));
hasCompare = rnative.test(docElem.compareDocumentPosition);
contains = hasCompare || rnative.test(docElem.contains) ? function (a, b) {
var adown = a.nodeType === 9 ? a.documentElement : a,
bup = b && b.parentNode;
return a === bup || !!(bup && bup.nodeType === 1 && (adown.contains ? adown.contains(bup) : a.compareDocumentPosition && a.compareDocumentPosition(bup) & 16));
} : function (a, b) {
if (b) {
while (b = b.parentNode) {
if (b === a) {
return true;
}
}
}
return false;
};
sortOrder = hasCompare ? function (a, b) {
if (a === b) {
hasDuplicate = true;
return 0;
}
var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
if (compare) {
return compare;
}
compare = (a.ownerDocument || a) === (b.ownerDocument || b) ? a.compareDocumentPosition(b) : 1;
if (compare & 1 || !support.sortDetached && b.compareDocumentPosition(a) === compare) {
if (a === doc || a.ownerDocument === preferredDoc && contains(preferredDoc, a)) {
return -1;
}
if (b === doc || b.ownerDocument === preferredDoc && contains(preferredDoc, b)) {
return 1;
}
return sortInput ? indexOf(sortInput, a) - indexOf(sortInput, b) : 0;
}
return compare & 4 ? -1 : 1;
} : function (a, b) {
if (a === b) {
hasDuplicate = true;
return 0;
}
var cur,
i = 0,
aup = a.parentNode,
bup = b.parentNode,
ap = [a],
bp = [b];
if (!aup || !bup) {
return a === doc ? -1 : b === doc ? 1 : aup ? -1 : bup ? 1 : sortInput ? indexOf(sortInput, a) - indexOf(sortInput, b) : 0;
} else if (aup === bup) {
return siblingCheck(a, b);
}
cur = a;
while (cur = cur.parentNode) {
ap.unshift(cur);
}
cur = b;
while (cur = cur.parentNode) {
bp.unshift(cur);
}
while (ap[i] === bp[i]) {
i++;
}
return i ? siblingCheck(ap[i], bp[i]) : ap[i] === preferredDoc ? -1 : bp[i] === preferredDoc ? 1 : 0;
};
return doc;
};
Sizzle.matches = function (expr, elements) {
return Sizzle(expr, null, null, elements);
};
Sizzle.matchesSelector = function (elem, expr) {
if ((elem.ownerDocument || elem) !== document) {
setDocument(elem);
}
expr = expr.replace(rattributeQuotes, "='$1']");
if (support.matchesSelector && documentIsHTML && (!rbuggyMatches || !rbuggyMatches.test(expr)) && (!rbuggyQSA || !rbuggyQSA.test(expr))) {
try {
var ret = matches.call(elem, expr);
if (ret || support.disconnectedMatch || elem.document && elem.document.nodeType !== 11) {
return ret;
}
} catch (e) {}
}
return Sizzle(expr, document, null, [elem]).length > 0;
};
Sizzle.contains = function (context, elem) {
if ((context.ownerDocument || context) !== document) {
setDocument(context);
}
return contains(context, elem);
};
Sizzle.attr = function (elem, name) {
if ((elem.ownerDocument || elem) !== document) {
setDocument(elem);
}
var fn = Expr.attrHandle[name.toLowerCase()],
val = fn && hasOwn.call(Expr.attrHandle, name.toLowerCase()) ? fn(elem, name, !documentIsHTML) : undefined;
return val !== undefined ? val : support.attributes || !documentIsHTML ? elem.getAttribute(name) : (val = elem.getAttributeNode(name)) && val.specified ? val.value : null;
};
Sizzle.error = function (msg) {
throw new Error("Syntax error, unrecognized expression: " + msg);
};
Sizzle.uniqueSort = function (results) {
var elem,
duplicates = [],
j = 0,
i = 0;
hasDuplicate = !support.detectDuplicates;
sortInput = !support.sortStable && results.slice(0);
results.sort(sortOrder);
if (hasDuplicate) {
while (elem = results[i++]) {
if (elem === results[i]) {
j = duplicates.push(i);
}
}
while (j--) {
results.splice(duplicates[j], 1);
}
}
sortInput = null;
return results;
};
getText = Sizzle.getText = function (elem) {
var node,
ret = "",
i = 0,
nodeType = elem.nodeType;
if (!nodeType) {
while (node = elem[i++]) {
ret += getText(node);
}
} else if (nodeType === 1 || nodeType === 9 || nodeType === 11) {
if (typeof elem.textContent === "string") {
return elem.textContent;
} else {
for (elem = elem.firstChild; elem; elem = elem.nextSibling) {
ret += getText(elem);
}
}
} else if (nodeType === 3 || nodeType === 4) {
return elem.nodeValue;
}
return ret;
};
Expr = Sizzle.selectors = {
cacheLength: 50,
createPseudo: markFunction,
match: matchExpr,
attrHandle: {},
find: {},
relative: {
">": { dir: "parentNode", first: true },
" ": { dir: "parentNode" },
"+": { dir: "previousSibling", first: true },
"~": { dir: "previousSibling" }
},
preFilter: {
"ATTR": function ATTR(match) {
match[1] = match[1].replace(runescape, funescape);
match[3] = (match[3] || match[4] || match[5] || "").replace(runescape, funescape);
if (match[2] === "~=") {
match[3] = " " + match[3] + " ";
}
return match.slice(0, 4);
},
"CHILD": function CHILD(match) {
match[1] = match[1].toLowerCase();
if (match[1].slice(0, 3) === "nth") {
if (!match[3]) {
Sizzle.error(match[0]);
}
match[4] = +(match[4] ? match[5] + (match[6] || 1) : 2 * (match[3] === "even" || match[3] === "odd"));
match[5] = +(match[7] + match[8] || match[3] === "odd");
} else if (match[3]) {
Sizzle.error(match[0]);
}
return match;
},
"PSEUDO": function PSEUDO(match) {
var excess,
unquoted = !match[6] && match[2];
if (matchExpr["CHILD"].test(match[0])) {
return null;
}
if (match[3]) {
match[2] = match[4] || match[5] || "";
} else if (unquoted && rpseudo.test(unquoted) && (excess = tokenize(unquoted, true)) && (excess = unquoted.indexOf(")", unquoted.length - excess) - unquoted.length)) {
match[0] = match[0].slice(0, excess);
match[2] = unquoted.slice(0, excess);
}
return match.slice(0, 3);
}
},
filter: {
"TAG": function TAG(nodeNameSelector) {
var nodeName = nodeNameSelector.replace(runescape, funescape).toLowerCase();
return nodeNameSelector === "*" ? function () {
return true;
} : function (elem) {
return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
};
},
"CLASS": function CLASS(className) {
var pattern = classCache[className + " "];
return pattern || (pattern = new RegExp("(^|" + whitespace + ")" + className + "(" + whitespace + "|$)")) && classCache(className, function (elem) {
return pattern.test(typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "");
});
},
"ATTR": function ATTR(name, operator, check) {
return function (elem) {
var result = Sizzle.attr(elem, name);
if (result == null) {
return operator === "!=";
}
if (!operator) {
return true;
}
result += "";
return operator === "=" ? result === check : operator === "!=" ? result !== check : operator === "^=" ? check && result.indexOf(check) === 0 : operator === "*=" ? check && result.indexOf(check) > -1 : operator === "$=" ? check && result.slice(-check.length) === check : operator === "~=" ? (" " + result.replace(rwhitespace, " ") + " ").indexOf(check) > -1 : operator === "|=" ? result === check || result.slice(0, check.length + 1) === check + "-" : false;
};
},
"CHILD": function CHILD(type, what, argument, first, last) {
var simple = type.slice(0, 3) !== "nth",
forward = type.slice(-4) !== "last",
ofType = what === "of-type";
return first === 1 && last === 0 ? function (elem) {
return !!elem.parentNode;
} : function (elem, context, xml) {
var cache,
outerCache,
node,
diff,
nodeIndex,
start,
dir = simple !== forward ? "nextSibling" : "previousSibling",
parent = elem.parentNode,
name = ofType && elem.nodeName.toLowerCase(),
useCache = !xml && !ofType;
if (parent) {
if (simple) {
while (dir) {
node = elem;
while (node = node[dir]) {
if (ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1) {
return false;
}
}
start = dir = type === "only" && !start && "nextSibling";
}
return true;
}
start = [forward ? parent.firstChild : parent.lastChild];
if (forward && useCache) {
outerCache = parent[expando] || (parent[expando] = {});
cache = outerCache[type] || [];
nodeIndex = cache[0] === dirruns && cache[1];
diff = cache[0] === dirruns && cache[2];
node = nodeIndex && parent.childNodes[nodeIndex];
while (node = ++nodeIndex && node && node[dir] || (diff = nodeIndex = 0) || start.pop()) {
if (node.nodeType === 1 && ++diff && node === elem) {
outerCache[type] = [dirruns, nodeIndex, diff];
break;
}
}
} else if (useCache && (cache = (elem[expando] || (elem[expando] = {}))[type]) && cache[0] === dirruns) {
diff = cache[1];
} else {
while (node = ++nodeIndex && node && node[dir] || (diff = nodeIndex = 0) || start.pop()) {
if ((ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1) && ++diff) {
if (useCache) {
(node[expando] || (node[expando] = {}))[type] = [dirruns, diff];
}
if (node === elem) {
break;
}
}
}
}
diff -= last;
return diff === first || diff % first === 0 && diff / first >= 0;
}
};
},
"PSEUDO": function PSEUDO(pseudo, argument) {
var args,
fn = Expr.pseudos[pseudo] || Expr.setFilters[pseudo.toLowerCase()] || Sizzle.error("unsupported pseudo: " + pseudo);
if (fn[expando]) {
return fn(argument);
}
if (fn.length > 1) {
args = [pseudo, pseudo, "", argument];
return Expr.setFilters.hasOwnProperty(pseudo.toLowerCase()) ? markFunction(function (seed, matches) {
var idx,
matched = fn(seed, argument),
i = matched.length;
while (i--) {
idx = indexOf(seed, matched[i]);
seed[idx] = !(matches[idx] = matched[i]);
}
}) : function (elem) {
return fn(elem, 0, args);
};
}
return fn;
}
},
pseudos: {
"not": markFunction(function (selector) {
var input = [],
results = [],
matcher = compile(selector.replace(rtrim, "$1"));
return matcher[expando] ? markFunction(function (seed, matches, context, xml) {
var elem,
unmatched = matcher(seed, null, xml, []),
i = seed.length;
while (i--) {
if (elem = unmatched[i]) {
seed[i] = !(matches[i] = elem);
}
}
}) : function (elem, context, xml) {
input[0] = elem;
matcher(input, null, xml, results);
input[0] = null;
return !results.pop();
};
}),
"has": markFunction(function (selector) {
return function (elem) {
return Sizzle(selector, elem).length > 0;
};
}),
"contains": markFunction(function (text) {
text = text.replace(runescape, funescape);
return function (elem) {
return (elem.textContent || elem.innerText || getText(elem)).indexOf(text) > -1;
};
}),
"lang": markFunction(function (lang) {
if (!ridentifier.test(lang || "")) {
Sizzle.error("unsupported lang: " + lang);
}
lang = lang.replace(runescape, funescape).toLowerCase();
return function (elem) {
var elemLang;
do {
if (elemLang = documentIsHTML ? elem.lang : elem.getAttribute("xml:lang") || elem.getAttribute("lang")) {
elemLang = elemLang.toLowerCase();
return elemLang === lang || elemLang.indexOf(lang + "-") === 0;
}
} while ((elem = elem.parentNode) && elem.nodeType === 1);
return false;
};
}),
"target": function target(elem) {
var hash = window.location && window.location.hash;
return hash && hash.slice(1) === elem.id;
},
"root": function root(elem) {
return elem === docElem;
},
"focus": function focus(elem) {
return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
},
"enabled": function enabled(elem) {
return elem.disabled === false;
},
"disabled": function disabled(elem) {
return elem.disabled === true;
},
"checked": function checked(elem) {
var nodeName = elem.nodeName.toLowerCase();
return nodeName === "input" && !!elem.checked || nodeName === "option" && !!elem.selected;
},
"selected": function selected(elem) {
if (elem.parentNode) {
elem.parentNode.selectedIndex;
}
return elem.selected === true;
},
"empty": function empty(elem) {
for (elem = elem.firstChild; elem; elem = elem.nextSibling) {
if (elem.nodeType < 6) {
return false;
}
}
return true;
},
"parent": function parent(elem) {
return !Expr.pseudos["empty"](elem);
},
"header": function header(elem) {
return rheader.test(elem.nodeName);
},
"input": function input(elem) {
return rinputs.test(elem.nodeName);
},
"button": function button(elem) {
var name = elem.nodeName.toLowerCase();
return name === "input" && elem.type === "button" || name === "button";
},
"text": function text(elem) {
var attr;
return elem.nodeName.toLowerCase() === "input" && elem.type === "text" && ((attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text");
},
"first": createPositionalPseudo(function () {
return [0];
}),
"last": createPositionalPseudo(function (matchIndexes, length) {
return [length - 1];
}),
"eq": createPositionalPseudo(function (matchIndexes, length, argument) {
return [argument < 0 ? argument + length : argument];
}),
"even": createPositionalPseudo(function (matchIndexes, length) {
var i = 0;
for (; i < length; i += 2) {
matchIndexes.push(i);
}
return matchIndexes;
}),
"odd": createPositionalPseudo(function (matchIndexes, length) {
var i = 1;
for (; i < length; i += 2) {
matchIndexes.push(i);
}
return matchIndexes;
}),
"lt": createPositionalPseudo(function (matchIndexes, length, argument) {
var i = argument < 0 ? argument + length : argument;
for (; --i >= 0;) {
matchIndexes.push(i);
}
return matchIndexes;
}),
"gt": createPositionalPseudo(function (matchIndexes, length, argument) {
var i = argument < 0 ? argument + length : argument;
for (; ++i < length;) {
matchIndexes.push(i);
}
return matchIndexes;
})
}
};
Expr.pseudos["nth"] = Expr.pseudos["eq"];
for (i in { radio: true, checkbox: true, file: true, password: true, image: true }) {
Expr.pseudos[i] = createInputPseudo(i);
}
for (i in { submit: true, reset: true }) {
Expr.pseudos[i] = createButtonPseudo(i);
}
function setFilters() {}
setFilters.prototype = Expr.filters = Expr.pseudos;
Expr.setFilters = new setFilters();
tokenize = Sizzle.tokenize = function (selector, parseOnly) {
var matched,
match,
tokens,
type,
soFar,
groups,
preFilters,
cached = tokenCache[selector + " "];
if (cached) {
return parseOnly ? 0 : cached.slice(0);
}
soFar = selector;
groups = [];
preFilters = Expr.preFilter;
while (soFar) {
if (!matched || (match = rcomma.exec(soFar))) {
if (match) {
soFar = soFar.slice(match[0].length) || soFar;
}
groups.push(tokens = []);
}
matched = false;
if (match = rcombinators.exec(soFar)) {
matched = match.shift();
tokens.push({
value: matched,
type: match[0].replace(rtrim, " ")
});
soFar = soFar.slice(matched.length);
}
for (type in Expr.filter) {
if ((match = matchExpr[type].exec(soFar)) && (!preFilters[type] || (match = preFilters[type](match)))) {
matched = match.shift();
tokens.push({
value: matched,
type: type,
matches: match
});
soFar = soFar.slice(matched.length);
}
}
if (!matched) {
break;
}
}
return parseOnly ? soFar.length : soFar ? Sizzle.error(selector) : tokenCache(selector, groups).slice(0);
};
function toSelector(tokens) {
var i = 0,
len = tokens.length,
selector = "";
for (; i < len; i++) {
selector += tokens[i].value;
}
return selector;
}
function addCombinator(matcher, combinator, base) {
var dir = combinator.dir,
checkNonElements = base && dir === "parentNode",
doneName = done++;
return combinator.first ? function (elem, context, xml) {
while (elem = elem[dir]) {
if (elem.nodeType === 1 || checkNonElements) {
return matcher(elem, context, xml);
}
}
} : function (elem, context, xml) {
var oldCache,
outerCache,
newCache = [dirruns, doneName];
if (xml) {
while (elem = elem[dir]) {
if (elem.nodeType === 1 || checkNonElements) {
if (matcher(elem, context, xml)) {
return true;
}
}
}
} else {
while (elem = elem[dir]) {
if (elem.nodeType === 1 || checkNonElements) {
outerCache = elem[expando] || (elem[expando] = {});
if ((oldCache = outerCache[dir]) && oldCache[0] === dirruns && oldCache[1] === doneName) {
return newCache[2] = oldCache[2];
} else {
outerCache[dir] = newCache;
if (newCache[2] = matcher(elem, context, xml)) {
return true;
}
}
}
}
}
};
}
function elementMatcher(matchers) {
return matchers.length > 1 ? function (elem, context, xml) {
var i = matchers.length;
while (i--) {
if (!matchers[i](elem, context, xml)) {
return false;
}
}
return true;
} : matchers[0];
}
function multipleContexts(selector, contexts, results) {
var i = 0,
len = contexts.length;
for (; i < len; i++) {
Sizzle(selector, contexts[i], results);
}
return results;
}
function condense(unmatched, map, filter, context, xml) {
var elem,
newUnmatched = [],
i = 0,
len = unmatched.length,
mapped = map != null;
for (; i < len; i++) {
if (elem = unmatched[i]) {
if (!filter || filter(elem, context, xml)) {
newUnmatched.push(elem);
if (mapped) {
map.push(i);
}
}
}
}
return newUnmatched;
}
function setMatcher(preFilter, selector, matcher, postFilter, postFinder, postSelector) {
if (postFilter && !postFilter[expando]) {
postFilter = setMatcher(postFilter);
}
if (postFinder && !postFinder[expando]) {
postFinder = setMatcher(postFinder, postSelector);
}
return markFunction(function (seed, results, context, xml) {
var temp,
i,
elem,
preMap = [],
postMap = [],
preexisting = results.length,
elems = seed || multipleContexts(selector || "*", context.nodeType ? [context] : context, []),
matcherIn = preFilter && (seed || !selector) ? condense(elems, preMap, preFilter, context, xml) : elems,
matcherOut = matcher ? postFinder || (seed ? preFilter : preexisting || postFilter) ? [] : results : matcherIn;
if (matcher) {
matcher(matcherIn, matcherOut, context, xml);
}
if (postFilter) {
temp = condense(matcherOut, postMap);
postFilter(temp, [], context, xml);
i = temp.length;
while (i--) {
if (elem = temp[i]) {
matcherOut[postMap[i]] = !(matcherIn[postMap[i]] = elem);
}
}
}
if (seed) {
if (postFinder || preFilter) {
if (postFinder) {
temp = [];
i = matcherOut.length;
while (i--) {
if (elem = matcherOut[i]) {
temp.push(matcherIn[i] = elem);
}
}
postFinder(null, matcherOut = [], temp, xml);
}
i = matcherOut.length;
while (i--) {
if ((elem = matcherOut[i]) && (temp = postFinder ? indexOf(seed, elem) : preMap[i]) > -1) {
seed[temp] = !(results[temp] = elem);
}
}
}
} else {
matcherOut = condense(matcherOut === results ? matcherOut.splice(preexisting, matcherOut.length) : matcherOut);
if (postFinder) {
postFinder(null, results, matcherOut, xml);
} else {
push.apply(results, matcherOut);
}
}
});
}
function matcherFromTokens(tokens) {
var checkContext,
matcher,
j,
len = tokens.length,
leadingRelative = Expr.relative[tokens[0].type],
implicitRelative = leadingRelative || Expr.relative[" "],
i = leadingRelative ? 1 : 0,
matchContext = addCombinator(function (elem) {
return elem === checkContext;
}, implicitRelative, true),
matchAnyContext = addCombinator(function (elem) {
return indexOf(checkContext, elem) > -1;
}, implicitRelative, true),
matchers = [function (elem, context, xml) {
var ret = !leadingRelative && (xml || context !== outermostContext) || ((checkContext = context).nodeType ? matchContext(elem, context, xml) : matchAnyContext(elem, context, xml));
checkContext = null;
return ret;
}];
for (; i < len; i++) {
if (matcher = Expr.relative[tokens[i].type]) {
matchers = [addCombinator(elementMatcher(matchers), matcher)];
} else {
matcher = Expr.filter[tokens[i].type].apply(null, tokens[i].matches);
if (matcher[expando]) {
j = ++i;
for (; j < len; j++) {
if (Expr.relative[tokens[j].type]) {
break;
}
}
return setMatcher(i > 1 && elementMatcher(matchers), i > 1 && toSelector(tokens.slice(0, i - 1).concat({ value: tokens[i - 2].type === " " ? "*" : "" })).replace(rtrim, "$1"), matcher, i < j && matcherFromTokens(tokens.slice(i, j)), j < len && matcherFromTokens(tokens = tokens.slice(j)), j < len && toSelector(tokens));
}
matchers.push(matcher);
}
}
return elementMatcher(matchers);
}
function matcherFromGroupMatchers(elementMatchers, setMatchers) {
var bySet = setMatchers.length > 0,
byElement = elementMatchers.length > 0,
superMatcher = function superMatcher(seed, context, xml, results, outermost) {
var elem,
j,
matcher,
matchedCount = 0,
i = "0",
unmatched = seed && [],
setMatched = [],
contextBackup = outermostContext,
elems = seed || byElement && Expr.find["TAG"]("*", outermost),
dirrunsUnique = dirruns += contextBackup == null ? 1 : Math.random() || 0.1,
len = elems.length;
if (outermost) {
outermostContext = context !== document && context;
}
for (; i !== len && (elem = elems[i]) != null; i++) {
if (byElement && elem) {
j = 0;
while (matcher = elementMatchers[j++]) {
if (matcher(elem, context, xml)) {
results.push(elem);
break;
}
}
if (outermost) {
dirruns = dirrunsUnique;
}
}
if (bySet) {
if (elem = !matcher && elem) {
matchedCount--;
}
if (seed) {
unmatched.push(elem);
}
}
}
matchedCount += i;
if (bySet && i !== matchedCount) {
j = 0;
while (matcher = setMatchers[j++]) {
matcher(unmatched, setMatched, context, xml);
}
if (seed) {
if (matchedCount > 0) {
while (i--) {
if (!(unmatched[i] || setMatched[i])) {
setMatched[i] = pop.call(results);
}
}
}
setMatched = condense(setMatched);
}
push.apply(results, setMatched);
if (outermost && !seed && setMatched.length > 0 && matchedCount + setMatchers.length > 1) {
Sizzle.uniqueSort(results);
}
}
if (outermost) {
dirruns = dirrunsUnique;
outermostContext = contextBackup;
}
return unmatched;
};
return bySet ? markFunction(superMatcher) : superMatcher;
}
compile = Sizzle.compile = function (selector, match) {
var i,
setMatchers = [],
elementMatchers = [],
cached = compilerCache[selector + " "];
if (!cached) {
if (!match) {
match = tokenize(selector);
}
i = match.length;
while (i--) {
cached = matcherFromTokens(match[i]);
if (cached[expando]) {
setMatchers.push(cached);
} else {
elementMatchers.push(cached);
}
}
cached = compilerCache(selector, matcherFromGroupMatchers(elementMatchers, setMatchers));
cached.selector = selector;
}
return cached;
};
select = Sizzle.select = function (selector, context, results, seed) {
var i,
tokens,
token,
type,
find,
compiled = typeof selector === "function" && selector,
match = !seed && tokenize(selector = compiled.selector || selector);
results = results || [];
if (match.length === 1) {
tokens = match[0] = match[0].slice(0);
if (tokens.length > 2 && (token = tokens[0]).type === "ID" && support.getById && context.nodeType === 9 && documentIsHTML && Expr.relative[tokens[1].type]) {
context = (Expr.find["ID"](token.matches[0].replace(runescape, funescape), context) || [])[0];
if (!context) {
return results;
} else if (compiled) {
context = context.parentNode;
}
selector = selector.slice(tokens.shift().value.length);
}
i = matchExpr["needsContext"].test(selector) ? 0 : tokens.length;
while (i--) {
token = tokens[i];
if (Expr.relative[type = token.type]) {
break;
}
if (find = Expr.find[type]) {
if (seed = find(token.matches[0].replace(runescape, funescape), rsibling.test(tokens[0].type) && testContext(context.parentNode) || context)) {
tokens.splice(i, 1);
selector = seed.length && toSelector(tokens);
if (!selector) {
push.apply(results, seed);
return results;
}
break;
}
}
}
}
(compiled || compile(selector, match))(seed, context, !documentIsHTML, results, rsibling.test(selector) && testContext(context.parentNode) || context);
return results;
};
support.sortStable = expando.split("").sort(sortOrder).join("") === expando;
support.detectDuplicates = !!hasDuplicate;
setDocument();
support.sortDetached = assert(function (div1) {
return div1.compareDocumentPosition(document.createElement("div")) & 1;
});
if (!assert(function (div) {
div.innerHTML = "<a href='#'></a>";
return div.firstChild.getAttribute("href") === "#";
})) {
addHandle("type|href|height|width", function (elem, name, isXML) {
if (!isXML) {
return elem.getAttribute(name, name.toLowerCase() === "type" ? 1 : 2);
}
});
}
if (!support.attributes || !assert(function (div) {
div.innerHTML = "<input/>";
div.firstChild.setAttribute("value", "");
return div.firstChild.getAttribute("value") === "";
})) {
addHandle("value", function (elem, name, isXML) {
if (!isXML && elem.nodeName.toLowerCase() === "input") {
return elem.defaultValue;
}
});
}
if (!assert(function (div) {
return div.getAttribute("disabled") == null;
})) {
addHandle(booleans, function (elem, name, isXML) {
var val;
if (!isXML) {
return elem[name] === true ? name.toLowerCase() : (val = elem.getAttributeNode(name)) && val.specified ? val.value : null;
}
});
}
return Sizzle;
}(window);
jQuery.find = Sizzle;
jQuery.expr = Sizzle.selectors;
jQuery.expr[":"] = jQuery.expr.pseudos;
jQuery.unique = Sizzle.uniqueSort;
jQuery.text = Sizzle.getText;
jQuery.isXMLDoc = Sizzle.isXML;
jQuery.contains = Sizzle.contains;
var rneedsContext = jQuery.expr.match.needsContext;
var rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/;
var risSimple = /^.[^:#\[\.,]*$/;
function winnow(elements, qualifier, not) {
if (jQuery.isFunction(qualifier)) {
return jQuery.grep(elements, function (elem, i) {
return !!qualifier.call(elem, i, elem) !== not;
});
}
if (qualifier.nodeType) {
return jQuery.grep(elements, function (elem) {
return elem === qualifier !== not;
});
}
if (typeof qualifier === "string") {
if (risSimple.test(qualifier)) {
return jQuery.filter(qualifier, elements, not);
}
qualifier = jQuery.filter(qualifier, elements);
}
return jQuery.grep(elements, function (elem) {
return indexOf.call(qualifier, elem) >= 0 !== not;
});
}
jQuery.filter = function (expr, elems, not) {
var elem = elems[0];
if (not) {
expr = ":not(" + expr + ")";
}
return elems.length === 1 && elem.nodeType === 1 ? jQuery.find.matchesSelector(elem, expr) ? [elem] : [] : jQuery.find.matches(expr, jQuery.grep(elems, function (elem) {
return elem.nodeType === 1;
}));
};
jQuery.fn.extend({
find: function find(selector) {
var i,
len = this.length,
ret = [],
self = this;
if (typeof selector !== "string") {
return this.pushStack(jQuery(selector).filter(function () {
for (i = 0; i < len; i++) {
if (jQuery.contains(self[i], this)) {
return true;
}
}
}));
}
for (i = 0; i < len; i++) {
jQuery.find(selector, self[i], ret);
}
ret = this.pushStack(len > 1 ? jQuery.unique(ret) : ret);
ret.selector = this.selector ? this.selector + " " + selector : selector;
return ret;
},
filter: function filter(selector) {
return this.pushStack(winnow(this, selector || [], false));
},
not: function not(selector) {
return this.pushStack(winnow(this, selector || [], true));
},
is: function is(selector) {
return !!winnow(this, typeof selector === "string" && rneedsContext.test(selector) ? jQuery(selector) : selector || [], false).length;
}
});
var rootjQuery,
rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,
init = jQuery.fn.init = function (selector, context) {
var match, elem;
if (!selector) {
return this;
}
if (typeof selector === "string") {
if (selector[0] === "<" && selector[selector.length - 1] === ">" && selector.length >= 3) {
match = [null, selector, null];
} else {
match = rquickExpr.exec(selector);
}
if (match && (match[1] || !context)) {
if (match[1]) {
context = context instanceof jQuery ? context[0] : context;
jQuery.merge(this, jQuery.parseHTML(match[1], context && context.nodeType ? context.ownerDocument || context : document, true));
if (rsingleTag.test(match[1]) && jQuery.isPlainObject(context)) {
for (match in context) {
if (jQuery.isFunction(this[match])) {
this[match](context[match]);
} else {
this.attr(match, context[match]);
}
}
}
return this;
} else {
elem = document.getElementById(match[2]);
if (elem && elem.parentNode) {
this.length = 1;
this[0] = elem;
}
this.context = document;
this.selector = selector;
return this;
}
} else if (!context || context.jquery) {
return (context || rootjQuery).find(selector);
} else {
return this.constructor(context).find(selector);
}
} else if (selector.nodeType) {
this.context = this[0] = selector;
this.length = 1;
return this;
} else if (jQuery.isFunction(selector)) {
return typeof rootjQuery.ready !== "undefined" ? rootjQuery.ready(selector) : selector(jQuery);
}
if (selector.selector !== undefined) {
this.selector = selector.selector;
this.context = selector.context;
}
return jQuery.makeArray(selector, this);
};
init.prototype = jQuery.fn;
rootjQuery = jQuery(document);
var rparentsprev = /^(?:parents|prev(?:Until|All))/,
guaranteedUnique = {
children: true,
contents: true,
next: true,
prev: true
};
jQuery.extend({
dir: function dir(elem, _dir, until) {
var matched = [],
truncate = until !== undefined;
while ((elem = elem[_dir]) && elem.nodeType !== 9) {
if (elem.nodeType === 1) {
if (truncate && jQuery(elem).is(until)) {
break;
}
matched.push(elem);
}
}
return matched;
},
sibling: function sibling(n, elem) {
var matched = [];
for (; n; n = n.nextSibling) {
if (n.nodeType === 1 && n !== elem) {
matched.push(n);
}
}
return matched;
}
});
jQuery.fn.extend({
has: function has(target) {
var targets = jQuery(target, this),
l = targets.length;
return this.filter(function () {
var i = 0;
for (; i < l; i++) {
if (jQuery.contains(this, targets[i])) {
return true;
}
}
});
},
closest: function closest(selectors, context) {
var cur,
i = 0,
l = this.length,
matched = [],
pos = rneedsContext.test(selectors) || typeof selectors !== "string" ? jQuery(selectors, context || this.context) : 0;
for (; i < l; i++) {
for (cur = this[i]; cur && cur !== context; cur = cur.parentNode) {
if (cur.nodeType < 11 && (pos ? pos.index(cur) > -1 : cur.nodeType === 1 && jQuery.find.matchesSelector(cur, selectors))) {
matched.push(cur);
break;
}
}
}
return this.pushStack(matched.length > 1 ? jQuery.unique(matched) : matched);
},
index: function index(elem) {
if (!elem) {
return this[0] && this[0].parentNode ? this.first().prevAll().length : -1;
}
if (typeof elem === "string") {
return indexOf.call(jQuery(elem), this[0]);
}
return indexOf.call(this, elem.jquery ? elem[0] : elem);
},
add: function add(selector, context) {
return this.pushStack(jQuery.unique(jQuery.merge(this.get(), jQuery(selector, context))));
},
addBack: function addBack(selector) {
return this.add(selector == null ? this.prevObject : this.prevObject.filter(selector));
}
});
function sibling(cur, dir) {
while ((cur = cur[dir]) && cur.nodeType !== 1) {}
return cur;
}
jQuery.each({
parent: function parent(elem) {
var parent = elem.parentNode;
return parent && parent.nodeType !== 11 ? parent : null;
},
parents: function parents(elem) {
return jQuery.dir(elem, "parentNode");
},
parentsUntil: function parentsUntil(elem, i, until) {
return jQuery.dir(elem, "parentNode", until);
},
next: function next(elem) {
return sibling(elem, "nextSibling");
},
prev: function prev(elem) {
return sibling(elem, "previousSibling");
},
nextAll: function nextAll(elem) {
return jQuery.dir(elem, "nextSibling");
},
prevAll: function prevAll(elem) {
return jQuery.dir(elem, "previousSibling");
},
nextUntil: function nextUntil(elem, i, until) {
return jQuery.dir(elem, "nextSibling", until);
},
prevUntil: function prevUntil(elem, i, until) {
return jQuery.dir(elem, "previousSibling", until);
},
siblings: function siblings(elem) {
return jQuery.sibling((elem.parentNode || {}).firstChild, elem);
},
children: function children(elem) {
return jQuery.sibling(elem.firstChild);
},
contents: function contents(elem) {
return elem.contentDocument || jQuery.merge([], elem.childNodes);
}
}, function (name, fn) {
jQuery.fn[name] = function (until, selector) {
var matched = jQuery.map(this, fn, until);
if (name.slice(-5) !== "Until") {
selector = until;
}
if (selector && typeof selector === "string") {
matched = jQuery.filter(selector, matched);
}
if (this.length > 1) {
if (!guaranteedUnique[name]) {
jQuery.unique(matched);
}
if (rparentsprev.test(name)) {
matched.reverse();
}
}
return this.pushStack(matched);
};
});
var rnotwhite = /\S+/g;
var optionsCache = {};
function createOptions(options) {
var object = optionsCache[options] = {};
jQuery.each(options.match(rnotwhite) || [], function (_, flag) {
object[flag] = true;
});
return object;
}
jQuery.Callbacks = function (options) {
options = typeof options === "string" ? optionsCache[options] || createOptions(options) : jQuery.extend({}, options);
var memory,
_fired,
firing,
firingStart,
firingLength,
firingIndex,
list = [],
stack = !options.once && [],
fire = function fire(data) {
memory = options.memory && data;
_fired = true;
firingIndex = firingStart || 0;
firingStart = 0;
firingLength = list.length;
firing = true;
for (; list && firingIndex < firingLength; firingIndex++) {
if (list[firingIndex].apply(data[0], data[1]) === false && options.stopOnFalse) {
memory = false;
break;
}
}
firing = false;
if (list) {
if (stack) {
if (stack.length) {
fire(stack.shift());
}
} else if (memory) {
list = [];
} else {
self.disable();
}
}
},
self = {
add: function add() {
if (list) {
var start = list.length;
(function add(args) {
jQuery.each(args, function (_, arg) {
var type = jQuery.type(arg);
if (type === "function") {
if (!options.unique || !self.has(arg)) {
list.push(arg);
}
} else if (arg && arg.length && type !== "string") {
add(arg);
}
});
})(arguments);
if (firing) {
firingLength = list.length;
} else if (memory) {
firingStart = start;
fire(memory);
}
}
return this;
},
remove: function remove() {
if (list) {
jQuery.each(arguments, function (_, arg) {
var index;
while ((index = jQuery.inArray(arg, list, index)) > -1) {
list.splice(index, 1);
if (firing) {
if (index <= firingLength) {
firingLength--;
}
if (index <= firingIndex) {
firingIndex--;
}
}
}
});
}
return this;
},
has: function has(fn) {
return fn ? jQuery.inArray(fn, list) > -1 : !!(list && list.length);
},
empty: function empty() {
list = [];
firingLength = 0;
return this;
},
disable: function disable() {
list = stack = memory = undefined;
return this;
},
disabled: function disabled() {
return !list;
},
lock: function lock() {
stack = undefined;
if (!memory) {
self.disable();
}
return this;
},
locked: function locked() {
return !stack;
},
fireWith: function fireWith(context, args) {
if (list && (!_fired || stack)) {
args = args || [];
args = [context, args.slice ? args.slice() : args];
if (firing) {
stack.push(args);
} else {
fire(args);
}
}
return this;
},
fire: function fire() {
self.fireWith(this, arguments);
return this;
},
fired: function fired() {
return !!_fired;
}
};
return self;
};
jQuery.extend({
Deferred: function Deferred(func) {
var tuples = [["resolve", "done", jQuery.Callbacks("once memory"), "resolved"], ["reject", "fail", jQuery.Callbacks("once memory"), "rejected"], ["notify", "progress", jQuery.Callbacks("memory")]],
_state = "pending",
_promise = {
state: function state() {
return _state;
},
always: function always() {
deferred.done(arguments).fail(arguments);
return this;
},
then: function then() {
var fns = arguments;
return jQuery.Deferred(function (newDefer) {
jQuery.each(tuples, function (i, tuple) {
var fn = jQuery.isFunction(fns[i]) && fns[i];
deferred[tuple[1]](function () {
var returned = fn && fn.apply(this, arguments);
if (returned && jQuery.isFunction(returned.promise)) {
returned.promise().done(newDefer.resolve).fail(newDefer.reject).progress(newDefer.notify);
} else {
newDefer[tuple[0] + "With"](this === _promise ? newDefer.promise() : this, fn ? [returned] : arguments);
}
});
});
fns = null;
}).promise();
},
promise: function promise(obj) {
return obj != null ? jQuery.extend(obj, _promise) : _promise;
}
},
deferred = {};
_promise.pipe = _promise.then;
jQuery.each(tuples, function (i, tuple) {
var list = tuple[2],
stateString = tuple[3];
_promise[tuple[1]] = list.add;
if (stateString) {
list.add(function () {
_state = stateString;
}, tuples[i ^ 1][2].disable, tuples[2][2].lock);
}
deferred[tuple[0]] = function () {
deferred[tuple[0] + "With"](this === deferred ? _promise : this, arguments);
return this;
};
deferred[tuple[0] + "With"] = list.fireWith;
});
_promise.promise(deferred);
if (func) {
func.call(deferred, deferred);
}
return deferred;
},
when: function when(subordinate) {
var i = 0,
resolveValues = _slice.call(arguments),
length = resolveValues.length,
remaining = length !== 1 || subordinate && jQuery.isFunction(subordinate.promise) ? length : 0,
deferred = remaining === 1 ? subordinate : jQuery.Deferred(),
updateFunc = function updateFunc(i, contexts, values) {
return function (value) {
contexts[i] = this;
values[i] = arguments.length > 1 ? _slice.call(arguments) : value;
if (values === progressValues) {
deferred.notifyWith(contexts, values);
} else if (! --remaining) {
deferred.resolveWith(contexts, values);
}
};
},
progressValues,
progressContexts,
resolveContexts;
if (length > 1) {
progressValues = new Array(length);
progressContexts = new Array(length);
resolveContexts = new Array(length);
for (; i < length; i++) {
if (resolveValues[i] && jQuery.isFunction(resolveValues[i].promise)) {
resolveValues[i].promise().done(updateFunc(i, resolveContexts, resolveValues)).fail(deferred.reject).progress(updateFunc(i, progressContexts, progressValues));
} else {
--remaining;
}
}
}
if (!remaining) {
deferred.resolveWith(resolveContexts, resolveValues);
}
return deferred.promise();
}
});
var readyList;
jQuery.fn.ready = function (fn) {
jQuery.ready.promise().done(fn);
return this;
};
jQuery.extend({
isReady: false,
readyWait: 1,
holdReady: function holdReady(hold) {
if (hold) {
jQuery.readyWait++;
} else {
jQuery.ready(true);
}
},
ready: function ready(wait) {
if (wait === true ? --jQuery.readyWait : jQuery.isReady) {
return;
}
jQuery.isReady = true;
if (wait !== true && --jQuery.readyWait > 0) {
return;
}
readyList.resolveWith(document, [jQuery]);
if (jQuery.fn.triggerHandler) {
jQuery(document).triggerHandler("ready");
jQuery(document).off("ready");
}
}
});
function completed() {
document.removeEventListener("DOMContentLoaded", completed, false);
window.removeEventListener("load", completed, false);
jQuery.ready();
}
jQuery.ready.promise = function (obj) {
if (!readyList) {
readyList = jQuery.Deferred();
if (document.readyState === "complete") {
setTimeout(jQuery.ready);
} else {
document.addEventListener("DOMContentLoaded", completed, false);
window.addEventListener("load", completed, false);
}
}
return readyList.promise(obj);
};
jQuery.ready.promise();
var access = jQuery.access = function (elems, fn, key, value, chainable, emptyGet, raw) {
var i = 0,
len = elems.length,
bulk = key == null;
if (jQuery.type(key) === "object") {
chainable = true;
for (i in key) {
jQuery.access(elems, fn, i, key[i], true, emptyGet, raw);
}
} else if (value !== undefined) {
chainable = true;
if (!jQuery.isFunction(value)) {
raw = true;
}
if (bulk) {
if (raw) {
fn.call(elems, value);
fn = null;
} else {
bulk = fn;
fn = function fn(elem, key, value) {
return bulk.call(jQuery(elem), value);
};
}
}
if (fn) {
for (; i < len; i++) {
fn(elems[i], key, raw ? value : value.call(elems[i], i, fn(elems[i], key)));
}
}
}
return chainable ? elems : bulk ? fn.call(elems) : len ? fn(elems[0], key) : emptyGet;
};
jQuery.acceptData = function (owner) {
return owner.nodeType === 1 || owner.nodeType === 9 || !+owner.nodeType;
};
function Data() {
Object.defineProperty(this.cache = {}, 0, {
get: function get() {
return {};
}
});
this.expando = jQuery.expando + Data.uid++;
}
Data.uid = 1;
Data.accepts = jQuery.acceptData;
Data.prototype = {
key: function key(owner) {
if (!Data.accepts(owner)) {
return 0;
}
var descriptor = {},
unlock = owner[this.expando];
if (!unlock) {
unlock = Data.uid++;
try {
descriptor[this.expando] = { value: unlock };
Object.defineProperties(owner, descriptor);
} catch (e) {
descriptor[this.expando] = unlock;
jQuery.extend(owner, descriptor);
}
}
if (!this.cache[unlock]) {
this.cache[unlock] = {};
}
return unlock;
},
set: function set(owner, data, value) {
var prop,
unlock = this.key(owner),
cache = this.cache[unlock];
if (typeof data === "string") {
cache[data] = value;
} else {
if (jQuery.isEmptyObject(cache)) {
jQuery.extend(this.cache[unlock], data);
} else {
for (prop in data) {
cache[prop] = data[prop];
}
}
}
return cache;
},
get: function get(owner, key) {
var cache = this.cache[this.key(owner)];
return key === undefined ? cache : cache[key];
},
access: function access(owner, key, value) {
var stored;
if (key === undefined || key && typeof key === "string" && value === undefined) {
stored = this.get(owner, key);
return stored !== undefined ? stored : this.get(owner, jQuery.camelCase(key));
}
this.set(owner, key, value);
return value !== undefined ? value : key;
},
remove: function remove(owner, key) {
var i,
name,
camel,
unlock = this.key(owner),
cache = this.cache[unlock];
if (key === undefined) {
this.cache[unlock] = {};
} else {
if (jQuery.isArray(key)) {
name = key.concat(key.map(jQuery.camelCase));
} else {
camel = jQuery.camelCase(key);
if (key in cache) {
name = [key, camel];
} else {
name = camel;
name = name in cache ? [name] : name.match(rnotwhite) || [];
}
}
i = name.length;
while (i--) {
delete cache[name[i]];
}
}
},
hasData: function hasData(owner) {
return !jQuery.isEmptyObject(this.cache[owner[this.expando]] || {});
},
discard: function discard(owner) {
if (owner[this.expando]) {
delete this.cache[owner[this.expando]];
}
}
};
var data_priv = new Data();
var data_user = new Data();
var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
rmultiDash = /([A-Z])/g;
function dataAttr(elem, key, data) {
var name;
if (data === undefined && elem.nodeType === 1) {
name = "data-" + key.replace(rmultiDash, "-$1").toLowerCase();
data = elem.getAttribute(name);
if (typeof data === "string") {
try {
data = data === "true" ? true : data === "false" ? false : data === "null" ? null : +data + "" === data ? +data : rbrace.test(data) ? jQuery.parseJSON(data) : data;
} catch (e) {}
data_user.set(elem, key, data);
} else {
data = undefined;
}
}
return data;
}
jQuery.extend({
hasData: function hasData(elem) {
return data_user.hasData(elem) || data_priv.hasData(elem);
},
data: function data(elem, name, _data) {
return data_user.access(elem, name, _data);
},
removeData: function removeData(elem, name) {
data_user.remove(elem, name);
},
_data: function _data(elem, name, data) {
return data_priv.access(elem, name, data);
},
_removeData: function _removeData(elem, name) {
data_priv.remove(elem, name);
}
});
jQuery.fn.extend({
data: function data(key, value) {
var i,
name,
data,
elem = this[0],
attrs = elem && elem.attributes;
if (key === undefined) {
if (this.length) {
data = data_user.get(elem);
if (elem.nodeType === 1 && !data_priv.get(elem, "hasDataAttrs")) {
i = attrs.length;
while (i--) {
if (attrs[i]) {
name = attrs[i].name;
if (name.indexOf("data-") === 0) {
name = jQuery.camelCase(name.slice(5));
dataAttr(elem, name, data[name]);
}
}
}
data_priv.set(elem, "hasDataAttrs", true);
}
}
return data;
}
if (typeof key === "object") {
return this.each(function () {
data_user.set(this, key);
});
}
return access(this, function (value) {
var data,
camelKey = jQuery.camelCase(key);
if (elem && value === undefined) {
data = data_user.get(elem, key);
if (data !== undefined) {
return data;
}
data = data_user.get(elem, camelKey);
if (data !== undefined) {
return data;
}
data = dataAttr(elem, camelKey, undefined);
if (data !== undefined) {
return data;
}
return;
}
this.each(function () {
var data = data_user.get(this, camelKey);
data_user.set(this, camelKey, value);
if (key.indexOf("-") !== -1 && data !== undefined) {
data_user.set(this, key, value);
}
});
}, null, value, arguments.length > 1, null, true);
},
removeData: function removeData(key) {
return this.each(function () {
data_user.remove(this, key);
});
}
});
jQuery.extend({
queue: function queue(elem, type, data) {
var queue;
if (elem) {
type = (type || "fx") + "queue";
queue = data_priv.get(elem, type);
if (data) {
if (!queue || jQuery.isArray(data)) {
queue = data_priv.access(elem, type, jQuery.makeArray(data));
} else {
queue.push(data);
}
}
return queue || [];
}
},
dequeue: function dequeue(elem, type) {
type = type || "fx";
var queue = jQuery.queue(elem, type),
startLength = queue.length,
fn = queue.shift(),
hooks = jQuery._queueHooks(elem, type),
next = function next() {
jQuery.dequeue(elem, type);
};
if (fn === "inprogress") {
fn = queue.shift();
startLength--;
}
if (fn) {
if (type === "fx") {
queue.unshift("inprogress");
}
delete hooks.stop;
fn.call(elem, next, hooks);
}
if (!startLength && hooks) {
hooks.empty.fire();
}
},
_queueHooks: function _queueHooks(elem, type) {
var key = type + "queueHooks";
return data_priv.get(elem, key) || data_priv.access(elem, key, {
empty: jQuery.Callbacks("once memory").add(function () {
data_priv.remove(elem, [type + "queue", key]);
})
});
}
});
jQuery.fn.extend({
queue: function queue(type, data) {
var setter = 2;
if (typeof type !== "string") {
data = type;
type = "fx";
setter--;
}
if (arguments.length < setter) {
return jQuery.queue(this[0], type);
}
return data === undefined ? this : this.each(function () {
var queue = jQuery.queue(this, type, data);
jQuery._queueHooks(this, type);
if (type === "fx" && queue[0] !== "inprogress") {
jQuery.dequeue(this, type);
}
});
},
dequeue: function dequeue(type) {
return this.each(function () {
jQuery.dequeue(this, type);
});
},
clearQueue: function clearQueue(type) {
return this.queue(type || "fx", []);
},
promise: function promise(type, obj) {
var tmp,
count = 1,
defer = jQuery.Deferred(),
elements = this,
i = this.length,
resolve = function resolve() {
if (! --count) {
defer.resolveWith(elements, [elements]);
}
};
if (typeof type !== "string") {
obj = type;
type = undefined;
}
type = type || "fx";
while (i--) {
tmp = data_priv.get(elements[i], type + "queueHooks");
if (tmp && tmp.empty) {
count++;
tmp.empty.add(resolve);
}
}
resolve();
return defer.promise(obj);
}
});
var pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source;
var cssExpand = ["Top", "Right", "Bottom", "Left"];
var isHidden = function isHidden(elem, el) {
elem = el || elem;
return jQuery.css(elem, "display") === "none" || !jQuery.contains(elem.ownerDocument, elem);
};
var rcheckableType = /^(?:checkbox|radio)$/i;
(function () {
var fragment = document.createDocumentFragment(),
div = fragment.appendChild(document.createElement("div")),
input = document.createElement("input");
input.setAttribute("type", "radio");
input.setAttribute("checked", "checked");
input.setAttribute("name", "t");
div.appendChild(input);
support.checkClone = div.cloneNode(true).cloneNode(true).lastChild.checked;
div.innerHTML = "<textarea>x</textarea>";
support.noCloneChecked = !!div.cloneNode(true).lastChild.defaultValue;
})();
var strundefined = typeof undefined;
support.focusinBubbles = "onfocusin" in window;
var rkeyEvent = /^key/,
rmouseEvent = /^(?:mouse|pointer|contextmenu)|click/,
rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
rtypenamespace = /^([^.]*)(?:\.(.+)|)$/;
function returnTrue() {
return true;
}
function returnFalse() {
return false;
}
function safeActiveElement() {
try {
return document.activeElement;
} catch (err) {}
}
jQuery.event = {
global: {},
add: function add(elem, types, handler, data, selector) {
var handleObjIn,
eventHandle,
tmp,
events,
t,
handleObj,
special,
handlers,
type,
namespaces,
origType,
elemData = data_priv.get(elem);
if (!elemData) {
return;
}
if (handler.handler) {
handleObjIn = handler;
handler = handleObjIn.handler;
selector = handleObjIn.selector;
}
if (!handler.guid) {
handler.guid = jQuery.guid++;
}
if (!(events = elemData.events)) {
events = elemData.events = {};
}
if (!(eventHandle = elemData.handle)) {
eventHandle = elemData.handle = function (e) {
return typeof jQuery !== strundefined && jQuery.event.triggered !== e.type ? jQuery.event.dispatch.apply(elem, arguments) : undefined;
};
}
types = (types || "").match(rnotwhite) || [""];
t = types.length;
while (t--) {
tmp = rtypenamespace.exec(types[t]) || [];
type = origType = tmp[1];
namespaces = (tmp[2] || "").split(".").sort();
if (!type) {
continue;
}
special = jQuery.event.special[type] || {};
type = (selector ? special.delegateType : special.bindType) || type;
special = jQuery.event.special[type] || {};
handleObj = jQuery.extend({
type: type,
origType: origType,
data: data,
handler: handler,
guid: handler.guid,
selector: selector,
needsContext: selector && jQuery.expr.match.needsContext.test(selector),
namespace: namespaces.join(".")
}, handleObjIn);
if (!(handlers = events[type])) {
handlers = events[type] = [];
handlers.delegateCount = 0;
if (!special.setup || special.setup.call(elem, data, namespaces, eventHandle) === false) {
if (elem.addEventListener) {
elem.addEventListener(type, eventHandle, false);
}
}
}
if (special.add) {
special.add.call(elem, handleObj);
if (!handleObj.handler.guid) {
handleObj.handler.guid = handler.guid;
}
}
if (selector) {
handlers.splice(handlers.delegateCount++, 0, handleObj);
} else {
handlers.push(handleObj);
}
jQuery.event.global[type] = true;
}
},
remove: function remove(elem, types, handler, selector, mappedTypes) {
var j,
origCount,
tmp,
events,
t,
handleObj,
special,
handlers,
type,
namespaces,
origType,
elemData = data_priv.hasData(elem) && data_priv.get(elem);
if (!elemData || !(events = elemData.events)) {
return;
}
types = (types || "").match(rnotwhite) || [""];
t = types.length;
while (t--) {
tmp = rtypenamespace.exec(types[t]) || [];
type = origType = tmp[1];
namespaces = (tmp[2] || "").split(".").sort();
if (!type) {
for (type in events) {
jQuery.event.remove(elem, type + types[t], handler, selector, true);
}
continue;
}
special = jQuery.event.special[type] || {};
type = (selector ? special.delegateType : special.bindType) || type;
handlers = events[type] || [];
tmp = tmp[2] && new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)");
origCount = j = handlers.length;
while (j--) {
handleObj = handlers[j];
if ((mappedTypes || origType === handleObj.origType) && (!handler || handler.guid === handleObj.guid) && (!tmp || tmp.test(handleObj.namespace)) && (!selector || selector === handleObj.selector || selector === "**" && handleObj.selector)) {
handlers.splice(j, 1);
if (handleObj.selector) {
handlers.delegateCount--;
}
if (special.remove) {
special.remove.call(elem, handleObj);
}
}
}
if (origCount && !handlers.length) {
if (!special.teardown || special.teardown.call(elem, namespaces, elemData.handle) === false) {
jQuery.removeEvent(elem, type, elemData.handle);
}
delete events[type];
}
}
if (jQuery.isEmptyObject(events)) {
delete elemData.handle;
data_priv.remove(elem, "events");
}
},
trigger: function trigger(event, data, elem, onlyHandlers) {
var i,
cur,
tmp,
bubbleType,
ontype,
handle,
special,
eventPath = [elem || document],
type = hasOwn.call(event, "type") ? event.type : event,
namespaces = hasOwn.call(event, "namespace") ? event.namespace.split(".") : [];
cur = tmp = elem = elem || document;
if (elem.nodeType === 3 || elem.nodeType === 8) {
return;
}
if (rfocusMorph.test(type + jQuery.event.triggered)) {
return;
}
if (type.indexOf(".") >= 0) {
namespaces = type.split(".");
type = namespaces.shift();
namespaces.sort();
}
ontype = type.indexOf(":") < 0 && "on" + type;
event = event[jQuery.expando] ? event : new jQuery.Event(type, typeof event === "object" && event);
event.isTrigger = onlyHandlers ? 2 : 3;
event.namespace = namespaces.join(".");
event.namespace_re = event.namespace ? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)") : null;
event.result = undefined;
if (!event.target) {
event.target = elem;
}
data = data == null ? [event] : jQuery.makeArray(data, [event]);
special = jQuery.event.special[type] || {};
if (!onlyHandlers && special.trigger && special.trigger.apply(elem, data) === false) {
return;
}
if (!onlyHandlers && !special.noBubble && !jQuery.isWindow(elem)) {
bubbleType = special.delegateType || type;
if (!rfocusMorph.test(bubbleType + type)) {
cur = cur.parentNode;
}
for (; cur; cur = cur.parentNode) {
eventPath.push(cur);
tmp = cur;
}
if (tmp === (elem.ownerDocument || document)) {
eventPath.push(tmp.defaultView || tmp.parentWindow || window);
}
}
i = 0;
while ((cur = eventPath[i++]) && !event.isPropagationStopped()) {
event.type = i > 1 ? bubbleType : special.bindType || type;
handle = (data_priv.get(cur, "events") || {})[event.type] && data_priv.get(cur, "handle");
if (handle) {
handle.apply(cur, data);
}
handle = ontype && cur[ontype];
if (handle && handle.apply && jQuery.acceptData(cur)) {
event.result = handle.apply(cur, data);
if (event.result === false) {
event.preventDefault();
}
}
}
event.type = type;
if (!onlyHandlers && !event.isDefaultPrevented()) {
if ((!special._default || special._default.apply(eventPath.pop(), data) === false) && jQuery.acceptData(elem)) {
if (ontype && jQuery.isFunction(elem[type]) && !jQuery.isWindow(elem)) {
tmp = elem[ontype];
if (tmp) {
elem[ontype] = null;
}
jQuery.event.triggered = type;
elem[type]();
jQuery.event.triggered = undefined;
if (tmp) {
elem[ontype] = tmp;
}
}
}
}
return event.result;
},
dispatch: function dispatch(event) {
event = jQuery.event.fix(event);
var i,
j,
ret,
matched,
handleObj,
handlerQueue = [],
args = _slice.call(arguments),
handlers = (data_priv.get(this, "events") || {})[event.type] || [],
special = jQuery.event.special[event.type] || {};
args[0] = event;
event.delegateTarget = this;
if (special.preDispatch && special.preDispatch.call(this, event) === false) {
return;
}
handlerQueue = jQuery.event.handlers.call(this, event, handlers);
i = 0;
while ((matched = handlerQueue[i++]) && !event.isPropagationStopped()) {
event.currentTarget = matched.elem;
j = 0;
while ((handleObj = matched.handlers[j++]) && !event.isImmediatePropagationStopped()) {
if (!event.namespace_re || event.namespace_re.test(handleObj.namespace)) {
event.handleObj = handleObj;
event.data = handleObj.data;
ret = ((jQuery.event.special[handleObj.origType] || {}).handle || handleObj.handler).apply(matched.elem, args);
if (ret !== undefined) {
if ((event.result = ret) === false) {
event.preventDefault();
event.stopPropagation();
}
}
}
}
}
if (special.postDispatch) {
special.postDispatch.call(this, event);
}
return event.result;
},
handlers: function handlers(event, _handlers) {
var i,
matches,
sel,
handleObj,
handlerQueue = [],
delegateCount = _handlers.delegateCount,
cur = event.target;
if (delegateCount && cur.nodeType && (!event.button || event.type !== "click")) {
for (; cur !== this; cur = cur.parentNode || this) {
if (cur.disabled !== true || event.type !== "click") {
matches = [];
for (i = 0; i < delegateCount; i++) {
handleObj = _handlers[i];
sel = handleObj.selector + " ";
if (matches[sel] === undefined) {
matches[sel] = handleObj.needsContext ? jQuery(sel, this).index(cur) >= 0 : jQuery.find(sel, this, null, [cur]).length;
}
if (matches[sel]) {
matches.push(handleObj);
}
}
if (matches.length) {
handlerQueue.push({ elem: cur, handlers: matches });
}
}
}
}
if (delegateCount < _handlers.length) {
handlerQueue.push({ elem: this, handlers: _handlers.slice(delegateCount) });
}
return handlerQueue;
},
props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
fixHooks: {},
keyHooks: {
props: "char charCode key keyCode".split(" "),
filter: function filter(event, original) {
if (event.which == null) {
event.which = original.charCode != null ? original.charCode : original.keyCode;
}
return event;
}
},
mouseHooks: {
props: "button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
filter: function filter(event, original) {
var eventDoc,
doc,
body,
button = original.button;
if (event.pageX == null && original.clientX != null) {
eventDoc = event.target.ownerDocument || document;
doc = eventDoc.documentElement;
body = eventDoc.body;
event.pageX = original.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0);
event.pageY = original.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0);
}
if (!event.which && button !== undefined) {
event.which = button & 1 ? 1 : button & 2 ? 3 : button & 4 ? 2 : 0;
}
return event;
}
},
fix: function fix(event) {
if (event[jQuery.expando]) {
return event;
}
var i,
prop,
copy,
type = event.type,
originalEvent = event,
fixHook = this.fixHooks[type];
if (!fixHook) {
this.fixHooks[type] = fixHook = rmouseEvent.test(type) ? this.mouseHooks : rkeyEvent.test(type) ? this.keyHooks : {};
}
copy = fixHook.props ? this.props.concat(fixHook.props) : this.props;
event = new jQuery.Event(originalEvent);
i = copy.length;
while (i--) {
prop = copy[i];
event[prop] = originalEvent[prop];
}
if (!event.target) {
event.target = document;
}
if (event.target.nodeType === 3) {
event.target = event.target.parentNode;
}
return fixHook.filter ? fixHook.filter(event, originalEvent) : event;
},
special: {
load: {
noBubble: true
},
focus: {
trigger: function trigger() {
if (this !== safeActiveElement() && this.focus) {
this.focus();
return false;
}
},
delegateType: "focusin"
},
blur: {
trigger: function trigger() {
if (this === safeActiveElement() && this.blur) {
this.blur();
return false;
}
},
delegateType: "focusout"
},
click: {
trigger: function trigger() {
if (this.type === "checkbox" && this.click && jQuery.nodeName(this, "input")) {
this.click();
return false;
}
},
_default: function _default(event) {
return jQuery.nodeName(event.target, "a");
}
},
beforeunload: {
postDispatch: function postDispatch(event) {
if (event.result !== undefined && event.originalEvent) {
event.originalEvent.returnValue = event.result;
}
}
}
},
simulate: function simulate(type, elem, event, bubble) {
var e = jQuery.extend(new jQuery.Event(), event, {
type: type,
isSimulated: true,
originalEvent: {}
});
if (bubble) {
jQuery.event.trigger(e, null, elem);
} else {
jQuery.event.dispatch.call(elem, e);
}
if (e.isDefaultPrevented()) {
event.preventDefault();
}
}
};
jQuery.removeEvent = function (elem, type, handle) {
if (elem.removeEventListener) {
elem.removeEventListener(type, handle, false);
}
};
jQuery.Event = function (src, props) {
if (!(this instanceof jQuery.Event)) {
return new jQuery.Event(src, props);
}
if (src && src.type) {
this.originalEvent = src;
this.type = src.type;
this.isDefaultPrevented = src.defaultPrevented || src.defaultPrevented === undefined && src.returnValue === false ? returnTrue : returnFalse;
} else {
this.type = src;
}
if (props) {
jQuery.extend(this, props);
}
this.timeStamp = src && src.timeStamp || jQuery.now();
this[jQuery.expando] = true;
};
jQuery.Event.prototype = {
isDefaultPrevented: returnFalse,
isPropagationStopped: returnFalse,
isImmediatePropagationStopped: returnFalse,
preventDefault: function preventDefault() {
var e = this.originalEvent;
this.isDefaultPrevented = returnTrue;
if (e && e.preventDefault) {
e.preventDefault();
}
},
stopPropagation: function stopPropagation() {
var e = this.originalEvent;
this.isPropagationStopped = returnTrue;
if (e && e.stopPropagation) {
e.stopPropagation();
}
},
stopImmediatePropagation: function stopImmediatePropagation() {
var e = this.originalEvent;
this.isImmediatePropagationStopped = returnTrue;
if (e && e.stopImmediatePropagation) {
e.stopImmediatePropagation();
}
this.stopPropagation();
}
};
jQuery.each({
mouseenter: "mouseover",
mouseleave: "mouseout",
pointerenter: "pointerover",
pointerleave: "pointerout"
}, function (orig, fix) {
jQuery.event.special[orig] = {
delegateType: fix,
bindType: fix,
handle: function handle(event) {
var ret,
target = this,
related = event.relatedTarget,
handleObj = event.handleObj;
if (!related || related !== target && !jQuery.contains(target, related)) {
event.type = handleObj.origType;
ret = handleObj.handler.apply(this, arguments);
event.type = fix;
}
return ret;
}
};
});
if (!support.focusinBubbles) {
jQuery.each({ focus: "focusin", blur: "focusout" }, function (orig, fix) {
var handler = function handler(event) {
jQuery.event.simulate(fix, event.target, jQuery.event.fix(event), true);
};
jQuery.event.special[fix] = {
setup: function setup() {
var doc = this.ownerDocument || this,
attaches = data_priv.access(doc, fix);
if (!attaches) {
doc.addEventListener(orig, handler, true);
}
data_priv.access(doc, fix, (attaches || 0) + 1);
},
teardown: function teardown() {
var doc = this.ownerDocument || this,
attaches = data_priv.access(doc, fix) - 1;
if (!attaches) {
doc.removeEventListener(orig, handler, true);
data_priv.remove(doc, fix);
} else {
data_priv.access(doc, fix, attaches);
}
}
};
});
}
jQuery.fn.extend({
on: function on(types, selector, data, fn, one) {
var origFn, type;
if (typeof types === "object") {
if (typeof selector !== "string") {
data = data || selector;
selector = undefined;
}
for (type in types) {
this.on(type, selector, data, types[type], one);
}
return this;
}
if (data == null && fn == null) {
fn = selector;
data = selector = undefined;
} else if (fn == null) {
if (typeof selector === "string") {
fn = data;
data = undefined;
} else {
fn = data;
data = selector;
selector = undefined;
}
}
if (fn === false) {
fn = returnFalse;
} else if (!fn) {
return this;
}
if (one === 1) {
origFn = fn;
fn = function fn(event) {
jQuery().off(event);
return origFn.apply(this, arguments);
};
fn.guid = origFn.guid || (origFn.guid = jQuery.guid++);
}
return this.each(function () {
jQuery.event.add(this, types, fn, data, selector);
});
},
one: function one(types, selector, data, fn) {
return this.on(types, selector, data, fn, 1);
},
off: function off(types, selector, fn) {
var handleObj, type;
if (types && types.preventDefault && types.handleObj) {
handleObj = types.handleObj;
jQuery(types.delegateTarget).off(handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, handleObj.selector, handleObj.handler);
return this;
}
if (typeof types === "object") {
for (type in types) {
this.off(type, selector, types[type]);
}
return this;
}
if (selector === false || typeof selector === "function") {
fn = selector;
selector = undefined;
}
if (fn === false) {
fn = returnFalse;
}
return this.each(function () {
jQuery.event.remove(this, types, fn, selector);
});
},
trigger: function trigger(type, data) {
return this.each(function () {
jQuery.event.trigger(type, data, this);
});
},
triggerHandler: function triggerHandler(type, data) {
var elem = this[0];
if (elem) {
return jQuery.event.trigger(type, data, elem, true);
}
}
});
var rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,
rtagName = /<([\w:]+)/,
rhtml = /<|&#?\w+;/,
rnoInnerhtml = /<(?:script|style|link)/i,
rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
rscriptType = /^$|\/(?:java|ecma)script/i,
rscriptTypeMasked = /^true\/(.*)/,
rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,
wrapMap = {
option: [1, "<select multiple='multiple'>", "</select>"],
thead: [1, "<table>", "</table>"],
col: [2, "<table><colgroup>", "</colgroup></table>"],
tr: [2, "<table><tbody>", "</tbody></table>"],
td: [3, "<table><tbody><tr>", "</tr></tbody></table>"],
_default: [0, "", ""]
};
wrapMap.optgroup = wrapMap.option;
wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
wrapMap.th = wrapMap.td;
function manipulationTarget(elem, content) {
return jQuery.nodeName(elem, "table") && jQuery.nodeName(content.nodeType !== 11 ? content : content.firstChild, "tr") ? elem.getElementsByTagName("tbody")[0] || elem.appendChild(elem.ownerDocument.createElement("tbody")) : elem;
}
function disableScript(elem) {
elem.type = (elem.getAttribute("type") !== null) + "/" + elem.type;
return elem;
}
function restoreScript(elem) {
var match = rscriptTypeMasked.exec(elem.type);
if (match) {
elem.type = match[1];
} else {
elem.removeAttribute("type");
}
return elem;
}
function setGlobalEval(elems, refElements) {
var i = 0,
l = elems.length;
for (; i < l; i++) {
data_priv.set(elems[i], "globalEval", !refElements || data_priv.get(refElements[i], "globalEval"));
}
}
function cloneCopyEvent(src, dest) {
var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events;
if (dest.nodeType !== 1) {
return;
}
if (data_priv.hasData(src)) {
pdataOld = data_priv.access(src);
pdataCur = data_priv.set(dest, pdataOld);
events = pdataOld.events;
if (events) {
delete pdataCur.handle;
pdataCur.events = {};
for (type in events) {
for (i = 0, l = events[type].length; i < l; i++) {
jQuery.event.add(dest, type, events[type][i]);
}
}
}
}
if (data_user.hasData(src)) {
udataOld = data_user.access(src);
udataCur = jQuery.extend({}, udataOld);
data_user.set(dest, udataCur);
}
}
function getAll(context, tag) {
var ret = context.getElementsByTagName ? context.getElementsByTagName(tag || "*") : context.querySelectorAll ? context.querySelectorAll(tag || "*") : [];
return tag === undefined || tag && jQuery.nodeName(context, tag) ? jQuery.merge([context], ret) : ret;
}
function fixInput(src, dest) {
var nodeName = dest.nodeName.toLowerCase();
if (nodeName === "input" && rcheckableType.test(src.type)) {
dest.checked = src.checked;
} else if (nodeName === "input" || nodeName === "textarea") {
dest.defaultValue = src.defaultValue;
}
}
jQuery.extend({
clone: function clone(elem, dataAndEvents, deepDataAndEvents) {
var i,
l,
srcElements,
destElements,
clone = elem.cloneNode(true),
inPage = jQuery.contains(elem.ownerDocument, elem);
if (!support.noCloneChecked && (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem)) {
destElements = getAll(clone);
srcElements = getAll(elem);
for (i = 0, l = srcElements.length; i < l; i++) {
fixInput(srcElements[i], destElements[i]);
}
}
if (dataAndEvents) {
if (deepDataAndEvents) {
srcElements = srcElements || getAll(elem);
destElements = destElements || getAll(clone);
for (i = 0, l = srcElements.length; i < l; i++) {
cloneCopyEvent(srcElements[i], destElements[i]);
}
} else {
cloneCopyEvent(elem, clone);
}
}
destElements = getAll(clone, "script");
if (destElements.length > 0) {
setGlobalEval(destElements, !inPage && getAll(elem, "script"));
}
return clone;
},
buildFragment: function buildFragment(elems, context, scripts, selection) {
var elem,
tmp,
tag,
wrap,
contains,
j,
fragment = context.createDocumentFragment(),
nodes = [],
i = 0,
l = elems.length;
for (; i < l; i++) {
elem = elems[i];
if (elem || elem === 0) {
if (jQuery.type(elem) === "object") {
jQuery.merge(nodes, elem.nodeType ? [elem] : elem);
} else if (!rhtml.test(elem)) {
nodes.push(context.createTextNode(elem));
} else {
tmp = tmp || fragment.appendChild(context.createElement("div"));
tag = (rtagName.exec(elem) || ["", ""])[1].toLowerCase();
wrap = wrapMap[tag] || wrapMap._default;
tmp.innerHTML = wrap[1] + elem.replace(rxhtmlTag, "<$1></$2>") + wrap[2];
j = wrap[0];
while (j--) {
tmp = tmp.lastChild;
}
jQuery.merge(nodes, tmp.childNodes);
tmp = fragment.firstChild;
tmp.textContent = "";
}
}
}
fragment.textContent = "";
i = 0;
while (elem = nodes[i++]) {
if (selection && jQuery.inArray(elem, selection) !== -1) {
continue;
}
contains = jQuery.contains(elem.ownerDocument, elem);
tmp = getAll(fragment.appendChild(elem), "script");
if (contains) {
setGlobalEval(tmp);
}
if (scripts) {
j = 0;
while (elem = tmp[j++]) {
if (rscriptType.test(elem.type || "")) {
scripts.push(elem);
}
}
}
}
return fragment;
},
cleanData: function cleanData(elems) {
var data,
elem,
type,
key,
special = jQuery.event.special,
i = 0;
for (; (elem = elems[i]) !== undefined; i++) {
if (jQuery.acceptData(elem)) {
key = elem[data_priv.expando];
if (key && (data = data_priv.cache[key])) {
if (data.events) {
for (type in data.events) {
if (special[type]) {
jQuery.event.remove(elem, type);
} else {
jQuery.removeEvent(elem, type, data.handle);
}
}
}
if (data_priv.cache[key]) {
delete data_priv.cache[key];
}
}
}
delete data_user.cache[elem[data_user.expando]];
}
}
});
jQuery.fn.extend({
text: function text(value) {
return access(this, function (value) {
return value === undefined ? jQuery.text(this) : this.empty().each(function () {
if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) {
this.textContent = value;
}
});
}, null, value, arguments.length);
},
append: function append() {
return this.domManip(arguments, function (elem) {
if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) {
var target = manipulationTarget(this, elem);
target.appendChild(elem);
}
});
},
prepend: function prepend() {
return this.domManip(arguments, function (elem) {
if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) {
var target = manipulationTarget(this, elem);
target.insertBefore(elem, target.firstChild);
}
});
},
before: function before() {
return this.domManip(arguments, function (elem) {
if (this.parentNode) {
this.parentNode.insertBefore(elem, this);
}
});
},
after: function after() {
return this.domManip(arguments, function (elem) {
if (this.parentNode) {
this.parentNode.insertBefore(elem, this.nextSibling);
}
});
},
remove: function remove(selector, keepData) {
var elem,
elems = selector ? jQuery.filter(selector, this) : this,
i = 0;
for (; (elem = elems[i]) != null; i++) {
if (!keepData && elem.nodeType === 1) {
jQuery.cleanData(getAll(elem));
}
if (elem.parentNode) {
if (keepData && jQuery.contains(elem.ownerDocument, elem)) {
setGlobalEval(getAll(elem, "script"));
}
elem.parentNode.removeChild(elem);
}
}
return this;
},
empty: function empty() {
var elem,
i = 0;
for (; (elem = this[i]) != null; i++) {
if (elem.nodeType === 1) {
jQuery.cleanData(getAll(elem, false));
elem.textContent = "";
}
}
return this;
},
clone: function clone(dataAndEvents, deepDataAndEvents) {
dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
return this.map(function () {
return jQuery.clone(this, dataAndEvents, deepDataAndEvents);
});
},
html: function html(value) {
return access(this, function (value) {
var elem = this[0] || {},
i = 0,
l = this.length;
if (value === undefined && elem.nodeType === 1) {
return elem.innerHTML;
}
if (typeof value === "string" && !rnoInnerhtml.test(value) && !wrapMap[(rtagName.exec(value) || ["", ""])[1].toLowerCase()]) {
value = value.replace(rxhtmlTag, "<$1></$2>");
try {
for (; i < l; i++) {
elem = this[i] || {};
if (elem.nodeType === 1) {
jQuery.cleanData(getAll(elem, false));
elem.innerHTML = value;
}
}
elem = 0;
} catch (e) {}
}
if (elem) {
this.empty().append(value);
}
}, null, value, arguments.length);
},
replaceWith: function replaceWith() {
var arg = arguments[0];
this.domManip(arguments, function (elem) {
arg = this.parentNode;
jQuery.cleanData(getAll(this));
if (arg) {
arg.replaceChild(elem, this);
}
});
return arg && (arg.length || arg.nodeType) ? this : this.remove();
},
detach: function detach(selector) {
return this.remove(selector, true);
},
domManip: function domManip(args, callback) {
args = concat.apply([], args);
var fragment,
first,
scripts,
hasScripts,
node,
doc,
i = 0,
l = this.length,
set = this,
iNoClone = l - 1,
value = args[0],
isFunction = jQuery.isFunction(value);
if (isFunction || l > 1 && typeof value === "string" && !support.checkClone && rchecked.test(value)) {
return this.each(function (index) {
var self = set.eq(index);
if (isFunction) {
args[0] = value.call(this, index, self.html());
}
self.domManip(args, callback);
});
}
if (l) {
fragment = jQuery.buildFragment(args, this[0].ownerDocument, false, this);
first = fragment.firstChild;
if (fragment.childNodes.length === 1) {
fragment = first;
}
if (first) {
scripts = jQuery.map(getAll(fragment, "script"), disableScript);
hasScripts = scripts.length;
for (; i < l; i++) {
node = fragment;
if (i !== iNoClone) {
node = jQuery.clone(node, true, true);
if (hasScripts) {
jQuery.merge(scripts, getAll(node, "script"));
}
}
callback.call(this[i], node, i);
}
if (hasScripts) {
doc = scripts[scripts.length - 1].ownerDocument;
jQuery.map(scripts, restoreScript);
for (i = 0; i < hasScripts; i++) {
node = scripts[i];
if (rscriptType.test(node.type || "") && !data_priv.access(node, "globalEval") && jQuery.contains(doc, node)) {
if (node.src) {
if (jQuery._evalUrl) {
jQuery._evalUrl(node.src);
}
} else {
jQuery.globalEval(node.textContent.replace(rcleanScript, ""));
}
}
}
}
}
}
return this;
}
});
jQuery.each({
appendTo: "append",
prependTo: "prepend",
insertBefore: "before",
insertAfter: "after",
replaceAll: "replaceWith"
}, function (name, original) {
jQuery.fn[name] = function (selector) {
var elems,
ret = [],
insert = jQuery(selector),
last = insert.length - 1,
i = 0;
for (; i <= last; i++) {
elems = i === last ? this : this.clone(true);
jQuery(insert[i])[original](elems);
push.apply(ret, elems.get());
}
return this.pushStack(ret);
};
});
var iframe,
elemdisplay = {};
function actualDisplay(name, doc) {
var style,
elem = jQuery(doc.createElement(name)).appendTo(doc.body),
display = window.getDefaultComputedStyle && (style = window.getDefaultComputedStyle(elem[0])) ? style.display : jQuery.css(elem[0], "display");
elem.detach();
return display;
}
function defaultDisplay(nodeName) {
var doc = document,
display = elemdisplay[nodeName];
if (!display) {
display = actualDisplay(nodeName, doc);
if (display === "none" || !display) {
iframe = (iframe || jQuery("<iframe frameborder='0' width='0' height='0'/>")).appendTo(doc.documentElement);
doc = iframe[0].contentDocument;
doc.write();
doc.close();
display = actualDisplay(nodeName, doc);
iframe.detach();
}
elemdisplay[nodeName] = display;
}
return display;
}
var rmargin = /^margin/;
var rnumnonpx = new RegExp("^(" + pnum + ")(?!px)[a-z%]+$", "i");
var getStyles = function getStyles(elem) {
if (elem.ownerDocument.defaultView.opener) {
return elem.ownerDocument.defaultView.getComputedStyle(elem, null);
}
return window.getComputedStyle(elem, null);
};
function curCSS(elem, name, computed) {
var width,
minWidth,
maxWidth,
ret,
style = elem.style;
computed = computed || getStyles(elem);
if (computed) {
ret = computed.getPropertyValue(name) || computed[name];
}
if (computed) {
if (ret === "" && !jQuery.contains(elem.ownerDocument, elem)) {
ret = jQuery.style(elem, name);
}
if (rnumnonpx.test(ret) && rmargin.test(name)) {
width = style.width;
minWidth = style.minWidth;
maxWidth = style.maxWidth;
style.minWidth = style.maxWidth = style.width = ret;
ret = computed.width;
style.width = width;
style.minWidth = minWidth;
style.maxWidth = maxWidth;
}
}
return ret !== undefined ? ret + "" : ret;
}
function addGetHookIf(conditionFn, hookFn) {
return {
get: function get() {
if (conditionFn()) {
delete this.get;
return;
}
return (this.get = hookFn).apply(this, arguments);
}
};
}
(function () {
var pixelPositionVal,
boxSizingReliableVal,
docElem = document.documentElement,
container = document.createElement("div"),
div = document.createElement("div");
if (!div.style) {
return;
}
div.style.backgroundClip = "content-box";
div.cloneNode(true).style.backgroundClip = "";
support.clearCloneStyle = div.style.backgroundClip === "content-box";
container.style.cssText = "border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;" + "position:absolute";
container.appendChild(div);
function computePixelPositionAndBoxSizingReliable() {
div.style.cssText = "-webkit-box-sizing:border-box;-moz-box-sizing:border-box;" + "box-sizing:border-box;display:block;margin-top:1%;top:1%;" + "border:1px;padding:1px;width:4px;position:absolute";
div.innerHTML = "";
docElem.appendChild(container);
var divStyle = window.getComputedStyle(div, null);
pixelPositionVal = divStyle.top !== "1%";
boxSizingReliableVal = divStyle.width === "4px";
docElem.removeChild(container);
}
if (window.getComputedStyle) {
jQuery.extend(support, {
pixelPosition: function pixelPosition() {
computePixelPositionAndBoxSizingReliable();
return pixelPositionVal;
},
boxSizingReliable: function boxSizingReliable() {
if (boxSizingReliableVal == null) {
computePixelPositionAndBoxSizingReliable();
}
return boxSizingReliableVal;
},
reliableMarginRight: function reliableMarginRight() {
var ret,
marginDiv = div.appendChild(document.createElement("div"));
marginDiv.style.cssText = div.style.cssText = "-webkit-box-sizing:content-box;-moz-box-sizing:content-box;" + "box-sizing:content-box;display:block;margin:0;border:0;padding:0";
marginDiv.style.marginRight = marginDiv.style.width = "0";
div.style.width = "1px";
docElem.appendChild(container);
ret = !parseFloat(window.getComputedStyle(marginDiv, null).marginRight);
docElem.removeChild(container);
div.removeChild(marginDiv);
return ret;
}
});
}
})();
jQuery.swap = function (elem, options, callback, args) {
var ret,
name,
old = {};
for (name in options) {
old[name] = elem.style[name];
elem.style[name] = options[name];
}
ret = callback.apply(elem, args || []);
for (name in options) {
elem.style[name] = old[name];
}
return ret;
};
var rdisplayswap = /^(none|table(?!-c[ea]).+)/,
rnumsplit = new RegExp("^(" + pnum + ")(.*)$", "i"),
rrelNum = new RegExp("^([+-])=(" + pnum + ")", "i"),
cssShow = { position: "absolute", visibility: "hidden", display: "block" },
cssNormalTransform = {
letterSpacing: "0",
fontWeight: "400"
},
cssPrefixes = ["Webkit", "O", "Moz", "ms"];
function vendorPropName(style, name) {
if (name in style) {
return name;
}
var capName = name[0].toUpperCase() + name.slice(1),
origName = name,
i = cssPrefixes.length;
while (i--) {
name = cssPrefixes[i] + capName;
if (name in style) {
return name;
}
}
return origName;
}
function setPositiveNumber(elem, value, subtract) {
var matches = rnumsplit.exec(value);
return matches ? Math.max(0, matches[1] - (subtract || 0)) + (matches[2] || "px") : value;
}
function augmentWidthOrHeight(elem, name, extra, isBorderBox, styles) {
var i = extra === (isBorderBox ? "border" : "content") ? 4 : name === "width" ? 1 : 0,
val = 0;
for (; i < 4; i += 2) {
if (extra === "margin") {
val += jQuery.css(elem, extra + cssExpand[i], true, styles);
}
if (isBorderBox) {
if (extra === "content") {
val -= jQuery.css(elem, "padding" + cssExpand[i], true, styles);
}
if (extra !== "margin") {
val -= jQuery.css(elem, "border" + cssExpand[i] + "Width", true, styles);
}
} else {
val += jQuery.css(elem, "padding" + cssExpand[i], true, styles);
if (extra !== "padding") {
val += jQuery.css(elem, "border" + cssExpand[i] + "Width", true, styles);
}
}
}
return val;
}
function getWidthOrHeight(elem, name, extra) {
var valueIsBorderBox = true,
val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
styles = getStyles(elem),
isBorderBox = jQuery.css(elem, "boxSizing", false, styles) === "border-box";
if (val <= 0 || val == null) {
val = curCSS(elem, name, styles);
if (val < 0 || val == null) {
val = elem.style[name];
}
if (rnumnonpx.test(val)) {
return val;
}
valueIsBorderBox = isBorderBox && (support.boxSizingReliable() || val === elem.style[name]);
val = parseFloat(val) || 0;
}
return val + augmentWidthOrHeight(elem, name, extra || (isBorderBox ? "border" : "content"), valueIsBorderBox, styles) + "px";
}
function showHide(elements, show) {
var display,
elem,
hidden,
values = [],
index = 0,
length = elements.length;
for (; index < length; index++) {
elem = elements[index];
if (!elem.style) {
continue;
}
values[index] = data_priv.get(elem, "olddisplay");
display = elem.style.display;
if (show) {
if (!values[index] && display === "none") {
elem.style.display = "";
}
if (elem.style.display === "" && isHidden(elem)) {
values[index] = data_priv.access(elem, "olddisplay", defaultDisplay(elem.nodeName));
}
} else {
hidden = isHidden(elem);
if (display !== "none" || !hidden) {
data_priv.set(elem, "olddisplay", hidden ? display : jQuery.css(elem, "display"));
}
}
}
for (index = 0; index < length; index++) {
elem = elements[index];
if (!elem.style) {
continue;
}
if (!show || elem.style.display === "none" || elem.style.display === "") {
elem.style.display = show ? values[index] || "" : "none";
}
}
return elements;
}
jQuery.extend({
cssHooks: {
opacity: {
get: function get(elem, computed) {
if (computed) {
var ret = curCSS(elem, "opacity");
return ret === "" ? "1" : ret;
}
}
}
},
cssNumber: {
"columnCount": true,
"fillOpacity": true,
"flexGrow": true,
"flexShrink": true,
"fontWeight": true,
"lineHeight": true,
"opacity": true,
"order": true,
"orphans": true,
"widows": true,
"zIndex": true,
"zoom": true
},
cssProps: {
"float": "cssFloat"
},
style: function style(elem, name, value, extra) {
if (!elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style) {
return;
}
var ret,
type,
hooks,
origName = jQuery.camelCase(name),
style = elem.style;
name = jQuery.cssProps[origName] || (jQuery.cssProps[origName] = vendorPropName(style, origName));
hooks = jQuery.cssHooks[name] || jQuery.cssHooks[origName];
if (value !== undefined) {
type = typeof value;
if (type === "string" && (ret = rrelNum.exec(value))) {
value = (ret[1] + 1) * ret[2] + parseFloat(jQuery.css(elem, name));
type = "number";
}
if (value == null || value !== value) {
return;
}
if (type === "number" && !jQuery.cssNumber[origName]) {
value += "px";
}
if (!support.clearCloneStyle && value === "" && name.indexOf("background") === 0) {
style[name] = "inherit";
}
if (!hooks || !("set" in hooks) || (value = hooks.set(elem, value, extra)) !== undefined) {
style[name] = value;
}
} else {
if (hooks && "get" in hooks && (ret = hooks.get(elem, false, extra)) !== undefined) {
return ret;
}
return style[name];
}
},
css: function css(elem, name, extra, styles) {
var val,
num,
hooks,
origName = jQuery.camelCase(name);
name = jQuery.cssProps[origName] || (jQuery.cssProps[origName] = vendorPropName(elem.style, origName));
hooks = jQuery.cssHooks[name] || jQuery.cssHooks[origName];
if (hooks && "get" in hooks) {
val = hooks.get(elem, true, extra);
}
if (val === undefined) {
val = curCSS(elem, name, styles);
}
if (val === "normal" && name in cssNormalTransform) {
val = cssNormalTransform[name];
}
if (extra === "" || extra) {
num = parseFloat(val);
return extra === true || jQuery.isNumeric(num) ? num || 0 : val;
}
return val;
}
});
jQuery.each(["height", "width"], function (i, name) {
jQuery.cssHooks[name] = {
get: function get(elem, computed, extra) {
if (computed) {
return rdisplayswap.test(jQuery.css(elem, "display")) && elem.offsetWidth === 0 ? jQuery.swap(elem, cssShow, function () {
return getWidthOrHeight(elem, name, extra);
}) : getWidthOrHeight(elem, name, extra);
}
},
set: function set(elem, value, extra) {
var styles = extra && getStyles(elem);
return setPositiveNumber(elem, value, extra ? augmentWidthOrHeight(elem, name, extra, jQuery.css(elem, "boxSizing", false, styles) === "border-box", styles) : 0);
}
};
});
jQuery.cssHooks.marginRight = addGetHookIf(support.reliableMarginRight, function (elem, computed) {
if (computed) {
return jQuery.swap(elem, { "display": "inline-block" }, curCSS, [elem, "marginRight"]);
}
});
jQuery.each({
margin: "",
padding: "",
border: "Width"
}, function (prefix, suffix) {
jQuery.cssHooks[prefix + suffix] = {
expand: function expand(value) {
var i = 0,
expanded = {},
parts = typeof value === "string" ? value.split(" ") : [value];
for (; i < 4; i++) {
expanded[prefix + cssExpand[i] + suffix] = parts[i] || parts[i - 2] || parts[0];
}
return expanded;
}
};
if (!rmargin.test(prefix)) {
jQuery.cssHooks[prefix + suffix].set = setPositiveNumber;
}
});
jQuery.fn.extend({
css: function css(name, value) {
return access(this, function (elem, name, value) {
var styles,
len,
map = {},
i = 0;
if (jQuery.isArray(name)) {
styles = getStyles(elem);
len = name.length;
for (; i < len; i++) {
map[name[i]] = jQuery.css(elem, name[i], false, styles);
}
return map;
}
return value !== undefined ? jQuery.style(elem, name, value) : jQuery.css(elem, name);
}, name, value, arguments.length > 1);
},
show: function show() {
return showHide(this, true);
},
hide: function hide() {
return showHide(this);
},
toggle: function toggle(state) {
if (typeof state === "boolean") {
return state ? this.show() : this.hide();
}
return this.each(function () {
if (isHidden(this)) {
jQuery(this).show();
} else {
jQuery(this).hide();
}
});
}
});
function Tween(elem, options, prop, end, easing) {
return new Tween.prototype.init(elem, options, prop, end, easing);
}
jQuery.Tween = Tween;
Tween.prototype = {
constructor: Tween,
init: function init(elem, options, prop, end, easing, unit) {
this.elem = elem;
this.prop = prop;
this.easing = easing || "swing";
this.options = options;
this.start = this.now = this.cur();
this.end = end;
this.unit = unit || (jQuery.cssNumber[prop] ? "" : "px");
},
cur: function cur() {
var hooks = Tween.propHooks[this.prop];
return hooks && hooks.get ? hooks.get(this) : Tween.propHooks._default.get(this);
},
run: function run(percent) {
var eased,
hooks = Tween.propHooks[this.prop];
if (this.options.duration) {
this.pos = eased = jQuery.easing[this.easing](percent, this.options.duration * percent, 0, 1, this.options.duration);
} else {
this.pos = eased = percent;
}
this.now = (this.end - this.start) * eased + this.start;
if (this.options.step) {
this.options.step.call(this.elem, this.now, this);
}
if (hooks && hooks.set) {
hooks.set(this);
} else {
Tween.propHooks._default.set(this);
}
return this;
}
};
Tween.prototype.init.prototype = Tween.prototype;
Tween.propHooks = {
_default: {
get: function get(tween) {
var result;
if (tween.elem[tween.prop] != null && (!tween.elem.style || tween.elem.style[tween.prop] == null)) {
return tween.elem[tween.prop];
}
result = jQuery.css(tween.elem, tween.prop, "");
return !result || result === "auto" ? 0 : result;
},
set: function set(tween) {
if (jQuery.fx.step[tween.prop]) {
jQuery.fx.step[tween.prop](tween);
} else if (tween.elem.style && (tween.elem.style[jQuery.cssProps[tween.prop]] != null || jQuery.cssHooks[tween.prop])) {
jQuery.style(tween.elem, tween.prop, tween.now + tween.unit);
} else {
tween.elem[tween.prop] = tween.now;
}
}
}
};
Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
set: function set(tween) {
if (tween.elem.nodeType && tween.elem.parentNode) {
tween.elem[tween.prop] = tween.now;
}
}
};
jQuery.easing = {
linear: function linear(p) {
return p;
},
swing: function swing(p) {
return 0.5 - Math.cos(p * Math.PI) / 2;
}
};
jQuery.fx = Tween.prototype.init;
jQuery.fx.step = {};
var fxNow,
timerId,
rfxtypes = /^(?:toggle|show|hide)$/,
rfxnum = new RegExp("^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i"),
rrun = /queueHooks$/,
animationPrefilters = [defaultPrefilter],
tweeners = {
"*": [function (prop, value) {
var tween = this.createTween(prop, value),
target = tween.cur(),
parts = rfxnum.exec(value),
unit = parts && parts[3] || (jQuery.cssNumber[prop] ? "" : "px"),
start = (jQuery.cssNumber[prop] || unit !== "px" && +target) && rfxnum.exec(jQuery.css(tween.elem, prop)),
scale = 1,
maxIterations = 20;
if (start && start[3] !== unit) {
unit = unit || start[3];
parts = parts || [];
start = +target || 1;
do {
scale = scale || ".5";
start = start / scale;
jQuery.style(tween.elem, prop, start + unit);
} while (scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations);
}
if (parts) {
start = tween.start = +start || +target || 0;
tween.unit = unit;
tween.end = parts[1] ? start + (parts[1] + 1) * parts[2] : +parts[2];
}
return tween;
}]
};
function createFxNow() {
setTimeout(function () {
fxNow = undefined;
});
return fxNow = jQuery.now();
}
function genFx(type, includeWidth) {
var which,
i = 0,
attrs = { height: type };
includeWidth = includeWidth ? 1 : 0;
for (; i < 4; i += 2 - includeWidth) {
which = cssExpand[i];
attrs["margin" + which] = attrs["padding" + which] = type;
}
if (includeWidth) {
attrs.opacity = attrs.width = type;
}
return attrs;
}
function createTween(value, prop, animation) {
var tween,
collection = (tweeners[prop] || []).concat(tweeners["*"]),
index = 0,
length = collection.length;
for (; index < length; index++) {
if (tween = collection[index].call(animation, prop, value)) {
return tween;
}
}
}
function defaultPrefilter(elem, props, opts) {
var prop,
value,
toggle,
tween,
hooks,
oldfire,
display,
checkDisplay,
anim = this,
orig = {},
style = elem.style,
hidden = elem.nodeType && isHidden(elem),
dataShow = data_priv.get(elem, "fxshow");
if (!opts.queue) {
hooks = jQuery._queueHooks(elem, "fx");
if (hooks.unqueued == null) {
hooks.unqueued = 0;
oldfire = hooks.empty.fire;
hooks.empty.fire = function () {
if (!hooks.unqueued) {
oldfire();
}
};
}
hooks.unqueued++;
anim.always(function () {
anim.always(function () {
hooks.unqueued--;
if (!jQuery.queue(elem, "fx").length) {
hooks.empty.fire();
}
});
});
}
if (elem.nodeType === 1 && ("height" in props || "width" in props)) {
opts.overflow = [style.overflow, style.overflowX, style.overflowY];
display = jQuery.css(elem, "display");
checkDisplay = display === "none" ? data_priv.get(elem, "olddisplay") || defaultDisplay(elem.nodeName) : display;
if (checkDisplay === "inline" && jQuery.css(elem, "float") === "none") {
style.display = "inline-block";
}
}
if (opts.overflow) {
style.overflow = "hidden";
anim.always(function () {
style.overflow = opts.overflow[0];
style.overflowX = opts.overflow[1];
style.overflowY = opts.overflow[2];
});
}
for (prop in props) {
value = props[prop];
if (rfxtypes.exec(value)) {
delete props[prop];
toggle = toggle || value === "toggle";
if (value === (hidden ? "hide" : "show")) {
if (value === "show" && dataShow && dataShow[prop] !== undefined) {
hidden = true;
} else {
continue;
}
}
orig[prop] = dataShow && dataShow[prop] || jQuery.style(elem, prop);
} else {
display = undefined;
}
}
if (!jQuery.isEmptyObject(orig)) {
if (dataShow) {
if ("hidden" in dataShow) {
hidden = dataShow.hidden;
}
} else {
dataShow = data_priv.access(elem, "fxshow", {});
}
if (toggle) {
dataShow.hidden = !hidden;
}
if (hidden) {
jQuery(elem).show();
} else {
anim.done(function () {
jQuery(elem).hide();
});
}
anim.done(function () {
var prop;
data_priv.remove(elem, "fxshow");
for (prop in orig) {
jQuery.style(elem, prop, orig[prop]);
}
});
for (prop in orig) {
tween = createTween(hidden ? dataShow[prop] : 0, prop, anim);
if (!(prop in dataShow)) {
dataShow[prop] = tween.start;
if (hidden) {
tween.end = tween.start;
tween.start = prop === "width" || prop === "height" ? 1 : 0;
}
}
}
} else if ((display === "none" ? defaultDisplay(elem.nodeName) : display) === "inline") {
style.display = display;
}
}
function propFilter(props, specialEasing) {
var index, name, easing, value, hooks;
for (index in props) {
name = jQuery.camelCase(index);
easing = specialEasing[name];
value = props[index];
if (jQuery.isArray(value)) {
easing = value[1];
value = props[index] = value[0];
}
if (index !== name) {
props[name] = value;
delete props[index];
}
hooks = jQuery.cssHooks[name];
if (hooks && "expand" in hooks) {
value = hooks.expand(value);
delete props[name];
for (index in value) {
if (!(index in props)) {
props[index] = value[index];
specialEasing[index] = easing;
}
}
} else {
specialEasing[name] = easing;
}
}
}
function Animation(elem, properties, options) {
var result,
stopped,
index = 0,
length = animationPrefilters.length,
deferred = jQuery.Deferred().always(function () {
delete tick.elem;
}),
tick = function tick() {
if (stopped) {
return false;
}
var currentTime = fxNow || createFxNow(),
remaining = Math.max(0, animation.startTime + animation.duration - currentTime),
temp = remaining / animation.duration || 0,
percent = 1 - temp,
index = 0,
length = animation.tweens.length;
for (; index < length; index++) {
animation.tweens[index].run(percent);
}
deferred.notifyWith(elem, [animation, percent, remaining]);
if (percent < 1 && length) {
return remaining;
} else {
deferred.resolveWith(elem, [animation]);
return false;
}
},
animation = deferred.promise({
elem: elem,
props: jQuery.extend({}, properties),
opts: jQuery.extend(true, { specialEasing: {} }, options),
originalProperties: properties,
originalOptions: options,
startTime: fxNow || createFxNow(),
duration: options.duration,
tweens: [],
createTween: function createTween(prop, end) {
var tween = jQuery.Tween(elem, animation.opts, prop, end, animation.opts.specialEasing[prop] || animation.opts.easing);
animation.tweens.push(tween);
return tween;
},
stop: function stop(gotoEnd) {
var index = 0,
length = gotoEnd ? animation.tweens.length : 0;
if (stopped) {
return this;
}
stopped = true;
for (; index < length; index++) {
animation.tweens[index].run(1);
}
if (gotoEnd) {
deferred.resolveWith(elem, [animation, gotoEnd]);
} else {
deferred.rejectWith(elem, [animation, gotoEnd]);
}
return this;
}
}),
props = animation.props;
propFilter(props, animation.opts.specialEasing);
for (; index < length; index++) {
result = animationPrefilters[index].call(animation, elem, props, animation.opts);
if (result) {
return result;
}
}
jQuery.map(props, createTween, animation);
if (jQuery.isFunction(animation.opts.start)) {
animation.opts.start.call(elem, animation);
}
jQuery.fx.timer(jQuery.extend(tick, {
elem: elem,
anim: animation,
queue: animation.opts.queue
}));
return animation.progress(animation.opts.progress).done(animation.opts.done, animation.opts.complete).fail(animation.opts.fail).always(animation.opts.always);
}
jQuery.Animation = jQuery.extend(Animation, {
tweener: function tweener(props, callback) {
if (jQuery.isFunction(props)) {
callback = props;
props = ["*"];
} else {
props = props.split(" ");
}
var prop,
index = 0,
length = props.length;
for (; index < length; index++) {
prop = props[index];
tweeners[prop] = tweeners[prop] || [];
tweeners[prop].unshift(callback);
}
},
prefilter: function prefilter(callback, prepend) {
if (prepend) {
animationPrefilters.unshift(callback);
} else {
animationPrefilters.push(callback);
}
}
});
jQuery.speed = function (speed, easing, fn) {
var opt = speed && typeof speed === "object" ? jQuery.extend({}, speed) : {
complete: fn || !fn && easing || jQuery.isFunction(speed) && speed,
duration: speed,
easing: fn && easing || easing && !jQuery.isFunction(easing) && easing
};
opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration : opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[opt.duration] : jQuery.fx.speeds._default;
if (opt.queue == null || opt.queue === true) {
opt.queue = "fx";
}
opt.old = opt.complete;
opt.complete = function () {
if (jQuery.isFunction(opt.old)) {
opt.old.call(this);
}
if (opt.queue) {
jQuery.dequeue(this, opt.queue);
}
};
return opt;
};
jQuery.fn.extend({
fadeTo: function fadeTo(speed, to, easing, callback) {
return this.filter(isHidden).css("opacity", 0).show().end().animate({ opacity: to }, speed, easing, callback);
},
animate: function animate(prop, speed, easing, callback) {
var empty = jQuery.isEmptyObject(prop),
optall = jQuery.speed(speed, easing, callback),
doAnimation = function doAnimation() {
var anim = Animation(this, jQuery.extend({}, prop), optall);
if (empty || data_priv.get(this, "finish")) {
anim.stop(true);
}
};
doAnimation.finish = doAnimation;
return empty || optall.queue === false ? this.each(doAnimation) : this.queue(optall.queue, doAnimation);
},
stop: function stop(type, clearQueue, gotoEnd) {
var stopQueue = function stopQueue(hooks) {
var stop = hooks.stop;
delete hooks.stop;
stop(gotoEnd);
};
if (typeof type !== "string") {
gotoEnd = clearQueue;
clearQueue = type;
type = undefined;
}
if (clearQueue && type !== false) {
this.queue(type || "fx", []);
}
return this.each(function () {
var dequeue = true,
index = type != null && type + "queueHooks",
timers = jQuery.timers,
data = data_priv.get(this);
if (index) {
if (data[index] && data[index].stop) {
stopQueue(data[index]);
}
} else {
for (index in data) {
if (data[index] && data[index].stop && rrun.test(index)) {
stopQueue(data[index]);
}
}
}
for (index = timers.length; index--;) {
if (timers[index].elem === this && (type == null || timers[index].queue === type)) {
timers[index].anim.stop(gotoEnd);
dequeue = false;
timers.splice(index, 1);
}
}
if (dequeue || !gotoEnd) {
jQuery.dequeue(this, type);
}
});
},
finish: function finish(type) {
if (type !== false) {
type = type || "fx";
}
return this.each(function () {
var index,
data = data_priv.get(this),
queue = data[type + "queue"],
hooks = data[type + "queueHooks"],
timers = jQuery.timers,
length = queue ? queue.length : 0;
data.finish = true;
jQuery.queue(this, type, []);
if (hooks && hooks.stop) {
hooks.stop.call(this, true);
}
for (index = timers.length; index--;) {
if (timers[index].elem === this && timers[index].queue === type) {
timers[index].anim.stop(true);
timers.splice(index, 1);
}
}
for (index = 0; index < length; index++) {
if (queue[index] && queue[index].finish) {
queue[index].finish.call(this);
}
}
delete data.finish;
});
}
});
jQuery.each(["toggle", "show", "hide"], function (i, name) {
var cssFn = jQuery.fn[name];
jQuery.fn[name] = function (speed, easing, callback) {
return speed == null || typeof speed === "boolean" ? cssFn.apply(this, arguments) : this.animate(genFx(name, true), speed, easing, callback);
};
});
jQuery.each({
slideDown: genFx("show"),
slideUp: genFx("hide"),
slideToggle: genFx("toggle"),
fadeIn: { opacity: "show" },
fadeOut: { opacity: "hide" },
fadeToggle: { opacity: "toggle" }
}, function (name, props) {
jQuery.fn[name] = function (speed, easing, callback) {
return this.animate(props, speed, easing, callback);
};
});
jQuery.timers = [];
jQuery.fx.tick = function () {
var timer,
i = 0,
timers = jQuery.timers;
fxNow = jQuery.now();
for (; i < timers.length; i++) {
timer = timers[i];
if (!timer() && timers[i] === timer) {
timers.splice(i--, 1);
}
}
if (!timers.length) {
jQuery.fx.stop();
}
fxNow = undefined;
};
jQuery.fx.timer = function (timer) {
jQuery.timers.push(timer);
if (timer()) {
jQuery.fx.start();
} else {
jQuery.timers.pop();
}
};
jQuery.fx.interval = 13;
jQuery.fx.start = function () {
if (!timerId) {
timerId = setInterval(jQuery.fx.tick, jQuery.fx.interval);
}
};
jQuery.fx.stop = function () {
clearInterval(timerId);
timerId = null;
};
jQuery.fx.speeds = {
slow: 600,
fast: 200,
_default: 400
};
jQuery.fn.delay = function (time, type) {
time = jQuery.fx ? jQuery.fx.speeds[time] || time : time;
type = type || "fx";
return this.queue(type, function (next, hooks) {
var timeout = setTimeout(next, time);
hooks.stop = function () {
clearTimeout(timeout);
};
});
};
(function () {
var input = document.createElement("input"),
select = document.createElement("select"),
opt = select.appendChild(document.createElement("option"));
input.type = "checkbox";
support.checkOn = input.value !== "";
support.optSelected = opt.selected;
select.disabled = true;
support.optDisabled = !opt.disabled;
input = document.createElement("input");
input.value = "t";
input.type = "radio";
support.radioValue = input.value === "t";
})();
var nodeHook,
boolHook,
attrHandle = jQuery.expr.attrHandle;
jQuery.fn.extend({
attr: function attr(name, value) {
return access(this, jQuery.attr, name, value, arguments.length > 1);
},
removeAttr: function removeAttr(name) {
return this.each(function () {
jQuery.removeAttr(this, name);
});
}
});
jQuery.extend({
attr: function attr(elem, name, value) {
var hooks,
ret,
nType = elem.nodeType;
if (!elem || nType === 3 || nType === 8 || nType === 2) {
return;
}
if (typeof elem.getAttribute === strundefined) {
return jQuery.prop(elem, name, value);
}
if (nType !== 1 || !jQuery.isXMLDoc(elem)) {
name = name.toLowerCase();
hooks = jQuery.attrHooks[name] || (jQuery.expr.match.bool.test(name) ? boolHook : nodeHook);
}
if (value !== undefined) {
if (value === null) {
jQuery.removeAttr(elem, name);
} else if (hooks && "set" in hooks && (ret = hooks.set(elem, value, name)) !== undefined) {
return ret;
} else {
elem.setAttribute(name, value + "");
return value;
}
} else if (hooks && "get" in hooks && (ret = hooks.get(elem, name)) !== null) {
return ret;
} else {
ret = jQuery.find.attr(elem, name);
return ret == null ? undefined : ret;
}
},
removeAttr: function removeAttr(elem, value) {
var name,
propName,
i = 0,
attrNames = value && value.match(rnotwhite);
if (attrNames && elem.nodeType === 1) {
while (name = attrNames[i++]) {
propName = jQuery.propFix[name] || name;
if (jQuery.expr.match.bool.test(name)) {
elem[propName] = false;
}
elem.removeAttribute(name);
}
}
},
attrHooks: {
type: {
set: function set(elem, value) {
if (!support.radioValue && value === "radio" && jQuery.nodeName(elem, "input")) {
var val = elem.value;
elem.setAttribute("type", value);
if (val) {
elem.value = val;
}
return value;
}
}
}
}
});
boolHook = {
set: function set(elem, value, name) {
if (value === false) {
jQuery.removeAttr(elem, name);
} else {
elem.setAttribute(name, name);
}
return name;
}
};
jQuery.each(jQuery.expr.match.bool.source.match(/\w+/g), function (i, name) {
var getter = attrHandle[name] || jQuery.find.attr;
attrHandle[name] = function (elem, name, isXML) {
var ret, handle;
if (!isXML) {
handle = attrHandle[name];
attrHandle[name] = ret;
ret = getter(elem, name, isXML) != null ? name.toLowerCase() : null;
attrHandle[name] = handle;
}
return ret;
};
});
var rfocusable = /^(?:input|select|textarea|button)$/i;
jQuery.fn.extend({
prop: function prop(name, value) {
return access(this, jQuery.prop, name, value, arguments.length > 1);
},
removeProp: function removeProp(name) {
return this.each(function () {
delete this[jQuery.propFix[name] || name];
});
}
});
jQuery.extend({
propFix: {
"for": "htmlFor",
"class": "className"
},
prop: function prop(elem, name, value) {
var ret,
hooks,
notxml,
nType = elem.nodeType;
if (!elem || nType === 3 || nType === 8 || nType === 2) {
return;
}
notxml = nType !== 1 || !jQuery.isXMLDoc(elem);
if (notxml) {
name = jQuery.propFix[name] || name;
hooks = jQuery.propHooks[name];
}
if (value !== undefined) {
return hooks && "set" in hooks && (ret = hooks.set(elem, value, name)) !== undefined ? ret : elem[name] = value;
} else {
return hooks && "get" in hooks && (ret = hooks.get(elem, name)) !== null ? ret : elem[name];
}
},
propHooks: {
tabIndex: {
get: function get(elem) {
return elem.hasAttribute("tabindex") || rfocusable.test(elem.nodeName) || elem.href ? elem.tabIndex : -1;
}
}
}
});
if (!support.optSelected) {
jQuery.propHooks.selected = {
get: function get(elem) {
var parent = elem.parentNode;
if (parent && parent.parentNode) {
parent.parentNode.selectedIndex;
}
return null;
}
};
}
jQuery.each(["tabIndex", "readOnly", "maxLength", "cellSpacing", "cellPadding", "rowSpan", "colSpan", "useMap", "frameBorder", "contentEditable"], function () {
jQuery.propFix[this.toLowerCase()] = this;
});
var rclass = /[\t\r\n\f]/g;
jQuery.fn.extend({
addClass: function addClass(value) {
var classes,
elem,
cur,
clazz,
j,
finalValue,
proceed = typeof value === "string" && value,
i = 0,
len = this.length;
if (jQuery.isFunction(value)) {
return this.each(function (j) {
jQuery(this).addClass(value.call(this, j, this.className));
});
}
if (proceed) {
classes = (value || "").match(rnotwhite) || [];
for (; i < len; i++) {
elem = this[i];
cur = elem.nodeType === 1 && (elem.className ? (" " + elem.className + " ").replace(rclass, " ") : " ");
if (cur) {
j = 0;
while (clazz = classes[j++]) {
if (cur.indexOf(" " + clazz + " ") < 0) {
cur += clazz + " ";
}
}
finalValue = jQuery.trim(cur);
if (elem.className !== finalValue) {
elem.className = finalValue;
}
}
}
}
return this;
},
removeClass: function removeClass(value) {
var classes,
elem,
cur,
clazz,
j,
finalValue,
proceed = arguments.length === 0 || typeof value === "string" && value,
i = 0,
len = this.length;
if (jQuery.isFunction(value)) {
return this.each(function (j) {
jQuery(this).removeClass(value.call(this, j, this.className));
});
}
if (proceed) {
classes = (value || "").match(rnotwhite) || [];
for (; i < len; i++) {
elem = this[i];
cur = elem.nodeType === 1 && (elem.className ? (" " + elem.className + " ").replace(rclass, " ") : "");
if (cur) {
j = 0;
while (clazz = classes[j++]) {
while (cur.indexOf(" " + clazz + " ") >= 0) {
cur = cur.replace(" " + clazz + " ", " ");
}
}
finalValue = value ? jQuery.trim(cur) : "";
if (elem.className !== finalValue) {
elem.className = finalValue;
}
}
}
}
return this;
},
toggleClass: function toggleClass(value, stateVal) {
var type = typeof value;
if (typeof stateVal === "boolean" && type === "string") {
return stateVal ? this.addClass(value) : this.removeClass(value);
}
if (jQuery.isFunction(value)) {
return this.each(function (i) {
jQuery(this).toggleClass(value.call(this, i, this.className, stateVal), stateVal);
});
}
return this.each(function () {
if (type === "string") {
var className,
i = 0,
self = jQuery(this),
classNames = value.match(rnotwhite) || [];
while (className = classNames[i++]) {
if (self.hasClass(className)) {
self.removeClass(className);
} else {
self.addClass(className);
}
}
} else if (type === strundefined || type === "boolean") {
if (this.className) {
data_priv.set(this, "__className__", this.className);
}
this.className = this.className || value === false ? "" : data_priv.get(this, "__className__") || "";
}
});
},
hasClass: function hasClass(selector) {
var className = " " + selector + " ",
i = 0,
l = this.length;
for (; i < l; i++) {
if (this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf(className) >= 0) {
return true;
}
}
return false;
}
});
var rreturn = /\r/g;
jQuery.fn.extend({
val: function val(value) {
var hooks,
ret,
isFunction,
elem = this[0];
if (!arguments.length) {
if (elem) {
hooks = jQuery.valHooks[elem.type] || jQuery.valHooks[elem.nodeName.toLowerCase()];
if (hooks && "get" in hooks && (ret = hooks.get(elem, "value")) !== undefined) {
return ret;
}
ret = elem.value;
return typeof ret === "string" ? ret.replace(rreturn, "") : ret == null ? "" : ret;
}
return;
}
isFunction = jQuery.isFunction(value);
return this.each(function (i) {
var val;
if (this.nodeType !== 1) {
return;
}
if (isFunction) {
val = value.call(this, i, jQuery(this).val());
} else {
val = value;
}
if (val == null) {
val = "";
} else if (typeof val === "number") {
val += "";
} else if (jQuery.isArray(val)) {
val = jQuery.map(val, function (value) {
return value == null ? "" : value + "";
});
}
hooks = jQuery.valHooks[this.type] || jQuery.valHooks[this.nodeName.toLowerCase()];
if (!hooks || !("set" in hooks) || hooks.set(this, val, "value") === undefined) {
this.value = val;
}
});
}
});
jQuery.extend({
valHooks: {
option: {
get: function get(elem) {
var val = jQuery.find.attr(elem, "value");
return val != null ? val : jQuery.trim(jQuery.text(elem));
}
},
select: {
get: function get(elem) {
var value,
option,
options = elem.options,
index = elem.selectedIndex,
one = elem.type === "select-one" || index < 0,
values = one ? null : [],
max = one ? index + 1 : options.length,
i = index < 0 ? max : one ? index : 0;
for (; i < max; i++) {
option = options[i];
if ((option.selected || i === index) && (support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) && (!option.parentNode.disabled || !jQuery.nodeName(option.parentNode, "optgroup"))) {
value = jQuery(option).val();
if (one) {
return value;
}
values.push(value);
}
}
return values;
},
set: function set(elem, value) {
var optionSet,
option,
options = elem.options,
values = jQuery.makeArray(value),
i = options.length;
while (i--) {
option = options[i];
if (option.selected = jQuery.inArray(option.value, values) >= 0) {
optionSet = true;
}
}
if (!optionSet) {
elem.selectedIndex = -1;
}
return values;
}
}
}
});
jQuery.each(["radio", "checkbox"], function () {
jQuery.valHooks[this] = {
set: function set(elem, value) {
if (jQuery.isArray(value)) {
return elem.checked = jQuery.inArray(jQuery(elem).val(), value) >= 0;
}
}
};
if (!support.checkOn) {
jQuery.valHooks[this].get = function (elem) {
return elem.getAttribute("value") === null ? "on" : elem.value;
};
}
});
jQuery.each(("blur focus focusin focusout load resize scroll unload click dblclick " + "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + "change select submit keydown keypress keyup error contextmenu").split(" "), function (i, name) {
jQuery.fn[name] = function (data, fn) {
return arguments.length > 0 ? this.on(name, null, data, fn) : this.trigger(name);
};
});
jQuery.fn.extend({
hover: function hover(fnOver, fnOut) {
return this.mouseenter(fnOver).mouseleave(fnOut || fnOver);
},
bind: function bind(types, data, fn) {
return this.on(types, null, data, fn);
},
unbind: function unbind(types, fn) {
return this.off(types, null, fn);
},
delegate: function delegate(selector, types, data, fn) {
return this.on(types, selector, data, fn);
},
undelegate: function undelegate(selector, types, fn) {
return arguments.length === 1 ? this.off(selector, "**") : this.off(types, selector || "**", fn);
}
});
var nonce = jQuery.now();
var rquery = /\?/;
jQuery.parseJSON = function (data) {
return JSON.parse(data + "");
};
jQuery.parseXML = function (data) {
var xml, tmp;
if (!data || typeof data !== "string") {
return null;
}
try {
tmp = new DOMParser();
xml = tmp.parseFromString(data, "text/xml");
} catch (e) {
xml = undefined;
}
if (!xml || xml.getElementsByTagName("parsererror").length) {
jQuery.error("Invalid XML: " + data);
}
return xml;
};
var rhash = /#.*$/,
rts = /([?&])_=[^&]*/,
rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg,
rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
rnoContent = /^(?:GET|HEAD)$/,
rprotocol = /^\/\//,
rurl = /^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,
prefilters = {},
transports = {},
allTypes = "*/".concat("*"),
ajaxLocation = window.location.href,
ajaxLocParts = rurl.exec(ajaxLocation.toLowerCase()) || [];
function addToPrefiltersOrTransports(structure) {
return function (dataTypeExpression, func) {
if (typeof dataTypeExpression !== "string") {
func = dataTypeExpression;
dataTypeExpression = "*";
}
var dataType,
i = 0,
dataTypes = dataTypeExpression.toLowerCase().match(rnotwhite) || [];
if (jQuery.isFunction(func)) {
while (dataType = dataTypes[i++]) {
if (dataType[0] === "+") {
dataType = dataType.slice(1) || "*";
(structure[dataType] = structure[dataType] || []).unshift(func);
} else {
(structure[dataType] = structure[dataType] || []).push(func);
}
}
}
};
}
function inspectPrefiltersOrTransports(structure, options, originalOptions, jqXHR) {
var inspected = {},
seekingTransport = structure === transports;
function inspect(dataType) {
var selected;
inspected[dataType] = true;
jQuery.each(structure[dataType] || [], function (_, prefilterOrFactory) {
var dataTypeOrTransport = prefilterOrFactory(options, originalOptions, jqXHR);
if (typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[dataTypeOrTransport]) {
options.dataTypes.unshift(dataTypeOrTransport);
inspect(dataTypeOrTransport);
return false;
} else if (seekingTransport) {
return !(selected = dataTypeOrTransport);
}
});
return selected;
}
return inspect(options.dataTypes[0]) || !inspected["*"] && inspect("*");
}
function ajaxExtend(target, src) {
var key,
deep,
flatOptions = jQuery.ajaxSettings.flatOptions || {};
for (key in src) {
if (src[key] !== undefined) {
(flatOptions[key] ? target : deep || (deep = {}))[key] = src[key];
}
}
if (deep) {
jQuery.extend(true, target, deep);
}
return target;
}
function ajaxHandleResponses(s, jqXHR, responses) {
var ct,
type,
finalDataType,
firstDataType,
contents = s.contents,
dataTypes = s.dataTypes;
while (dataTypes[0] === "*") {
dataTypes.shift();
if (ct === undefined) {
ct = s.mimeType || jqXHR.getResponseHeader("Content-Type");
}
}
if (ct) {
for (type in contents) {
if (contents[type] && contents[type].test(ct)) {
dataTypes.unshift(type);
break;
}
}
}
if (dataTypes[0] in responses) {
finalDataType = dataTypes[0];
} else {
for (type in responses) {
if (!dataTypes[0] || s.converters[type + " " + dataTypes[0]]) {
finalDataType = type;
break;
}
if (!firstDataType) {
firstDataType = type;
}
}
finalDataType = finalDataType || firstDataType;
}
if (finalDataType) {
if (finalDataType !== dataTypes[0]) {
dataTypes.unshift(finalDataType);
}
return responses[finalDataType];
}
}
function ajaxConvert(s, response, jqXHR, isSuccess) {
var conv2,
current,
conv,
tmp,
prev,
converters = {},
dataTypes = s.dataTypes.slice();
if (dataTypes[1]) {
for (conv in s.converters) {
converters[conv.toLowerCase()] = s.converters[conv];
}
}
current = dataTypes.shift();
while (current) {
if (s.responseFields[current]) {
jqXHR[s.responseFields[current]] = response;
}
if (!prev && isSuccess && s.dataFilter) {
response = s.dataFilter(response, s.dataType);
}
prev = current;
current = dataTypes.shift();
if (current) {
if (current === "*") {
current = prev;
} else if (prev !== "*" && prev !== current) {
conv = converters[prev + " " + current] || converters["* " + current];
if (!conv) {
for (conv2 in converters) {
tmp = conv2.split(" ");
if (tmp[1] === current) {
conv = converters[prev + " " + tmp[0]] || converters["* " + tmp[0]];
if (conv) {
if (conv === true) {
conv = converters[conv2];
} else if (converters[conv2] !== true) {
current = tmp[0];
dataTypes.unshift(tmp[1]);
}
break;
}
}
}
}
if (conv !== true) {
if (conv && s["throws"]) {
response = conv(response);
} else {
try {
response = conv(response);
} catch (e) {
return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current };
}
}
}
}
}
}
return { state: "success", data: response };
}
jQuery.extend({
active: 0,
lastModified: {},
etag: {},
ajaxSettings: {
url: ajaxLocation,
type: "GET",
isLocal: rlocalProtocol.test(ajaxLocParts[1]),
global: true,
processData: true,
async: true,
contentType: "application/x-www-form-urlencoded; charset=UTF-8",
accepts: {
"*": allTypes,
text: "text/plain",
html: "text/html",
xml: "application/xml, text/xml",
json: "application/json, text/javascript"
},
contents: {
xml: /xml/,
html: /html/,
json: /json/
},
responseFields: {
xml: "responseXML",
text: "responseText",
json: "responseJSON"
},
converters: {
"* text": String,
"text html": true,
"text json": jQuery.parseJSON,
"text xml": jQuery.parseXML
},
flatOptions: {
url: true,
context: true
}
},
ajaxSetup: function ajaxSetup(target, settings) {
return settings ? ajaxExtend(ajaxExtend(target, jQuery.ajaxSettings), settings) : ajaxExtend(jQuery.ajaxSettings, target);
},
ajaxPrefilter: addToPrefiltersOrTransports(prefilters),
ajaxTransport: addToPrefiltersOrTransports(transports),
ajax: function ajax(url, options) {
if (typeof url === "object") {
options = url;
url = undefined;
}
options = options || {};
var transport,
cacheURL,
responseHeadersString,
responseHeaders,
timeoutTimer,
parts,
fireGlobals,
i,
s = jQuery.ajaxSetup({}, options),
callbackContext = s.context || s,
globalEventContext = s.context && (callbackContext.nodeType || callbackContext.jquery) ? jQuery(callbackContext) : jQuery.event,
deferred = jQuery.Deferred(),
completeDeferred = jQuery.Callbacks("once memory"),
_statusCode = s.statusCode || {},
requestHeaders = {},
requestHeadersNames = {},
state = 0,
strAbort = "canceled",
jqXHR = {
readyState: 0,
getResponseHeader: function getResponseHeader(key) {
var match;
if (state === 2) {
if (!responseHeaders) {
responseHeaders = {};
while (match = rheaders.exec(responseHeadersString)) {
responseHeaders[match[1].toLowerCase()] = match[2];
}
}
match = responseHeaders[key.toLowerCase()];
}
return match == null ? null : match;
},
getAllResponseHeaders: function getAllResponseHeaders() {
return state === 2 ? responseHeadersString : null;
},
setRequestHeader: function setRequestHeader(name, value) {
var lname = name.toLowerCase();
if (!state) {
name = requestHeadersNames[lname] = requestHeadersNames[lname] || name;
requestHeaders[name] = value;
}
return this;
},
overrideMimeType: function overrideMimeType(type) {
if (!state) {
s.mimeType = type;
}
return this;
},
statusCode: function statusCode(map) {
var code;
if (map) {
if (state < 2) {
for (code in map) {
_statusCode[code] = [_statusCode[code], map[code]];
}
} else {
jqXHR.always(map[jqXHR.status]);
}
}
return this;
},
abort: function abort(statusText) {
var finalText = statusText || strAbort;
if (transport) {
transport.abort(finalText);
}
done(0, finalText);
return this;
}
};
deferred.promise(jqXHR).complete = completeDeferred.add;
jqXHR.success = jqXHR.done;
jqXHR.error = jqXHR.fail;
s.url = ((url || s.url || ajaxLocation) + "").replace(rhash, "").replace(rprotocol, ajaxLocParts[1] + "//");
s.type = options.method || options.type || s.method || s.type;
s.dataTypes = jQuery.trim(s.dataType || "*").toLowerCase().match(rnotwhite) || [""];
if (s.crossDomain == null) {
parts = rurl.exec(s.url.toLowerCase());
s.crossDomain = !!(parts && (parts[1] !== ajaxLocParts[1] || parts[2] !== ajaxLocParts[2] || (parts[3] || (parts[1] === "http:" ? "80" : "443")) !== (ajaxLocParts[3] || (ajaxLocParts[1] === "http:" ? "80" : "443"))));
}
if (s.data && s.processData && typeof s.data !== "string") {
s.data = jQuery.param(s.data, s.traditional);
}
inspectPrefiltersOrTransports(prefilters, s, options, jqXHR);
if (state === 2) {
return jqXHR;
}
fireGlobals = jQuery.event && s.global;
if (fireGlobals && jQuery.active++ === 0) {
jQuery.event.trigger("ajaxStart");
}
s.type = s.type.toUpperCase();
s.hasContent = !rnoContent.test(s.type);
cacheURL = s.url;
if (!s.hasContent) {
if (s.data) {
cacheURL = s.url += (rquery.test(cacheURL) ? "&" : "?") + s.data;
delete s.data;
}
if (s.cache === false) {
s.url = rts.test(cacheURL) ? cacheURL.replace(rts, "$1_=" + nonce++) : cacheURL + (rquery.test(cacheURL) ? "&" : "?") + "_=" + nonce++;
}
}
if (s.ifModified) {
if (jQuery.lastModified[cacheURL]) {
jqXHR.setRequestHeader("If-Modified-Since", jQuery.lastModified[cacheURL]);
}
if (jQuery.etag[cacheURL]) {
jqXHR.setRequestHeader("If-None-Match", jQuery.etag[cacheURL]);
}
}
if (s.data && s.hasContent && s.contentType !== false || options.contentType) {
jqXHR.setRequestHeader("Content-Type", s.contentType);
}
jqXHR.setRequestHeader("Accept", s.dataTypes[0] && s.accepts[s.dataTypes[0]] ? s.accepts[s.dataTypes[0]] + (s.dataTypes[0] !== "*" ? ", " + allTypes + "; q=0.01" : "") : s.accepts["*"]);
for (i in s.headers) {
jqXHR.setRequestHeader(i, s.headers[i]);
}
if (s.beforeSend && (s.beforeSend.call(callbackContext, jqXHR, s) === false || state === 2)) {
return jqXHR.abort();
}
strAbort = "abort";
for (i in { success: 1, error: 1, complete: 1 }) {
jqXHR[i](s[i]);
}
transport = inspectPrefiltersOrTransports(transports, s, options, jqXHR);
if (!transport) {
done(-1, "No Transport");
} else {
jqXHR.readyState = 1;
if (fireGlobals) {
globalEventContext.trigger("ajaxSend", [jqXHR, s]);
}
if (s.async && s.timeout > 0) {
timeoutTimer = setTimeout(function () {
jqXHR.abort("timeout");
}, s.timeout);
}
try {
state = 1;
transport.send(requestHeaders, done);
} catch (e) {
if (state < 2) {
done(-1, e);
} else {
throw e;
}
}
}
function done(status, nativeStatusText, responses, headers) {
var isSuccess,
success,
error,
response,
modified,
statusText = nativeStatusText;
if (state === 2) {
return;
}
state = 2;
if (timeoutTimer) {
clearTimeout(timeoutTimer);
}
transport = undefined;
responseHeadersString = headers || "";
jqXHR.readyState = status > 0 ? 4 : 0;
isSuccess = status >= 200 && status < 300 || status === 304;
if (responses) {
response = ajaxHandleResponses(s, jqXHR, responses);
}
response = ajaxConvert(s, response, jqXHR, isSuccess);
if (isSuccess) {
if (s.ifModified) {
modified = jqXHR.getResponseHeader("Last-Modified");
if (modified) {
jQuery.lastModified[cacheURL] = modified;
}
modified = jqXHR.getResponseHeader("etag");
if (modified) {
jQuery.etag[cacheURL] = modified;
}
}
if (status === 204 || s.type === "HEAD") {
statusText = "nocontent";
} else if (status === 304) {
statusText = "notmodified";
} else {
statusText = response.state;
success = response.data;
error = response.error;
isSuccess = !error;
}
} else {
error = statusText;
if (status || !statusText) {
statusText = "error";
if (status < 0) {
status = 0;
}
}
}
jqXHR.status = status;
jqXHR.statusText = (nativeStatusText || statusText) + "";
if (isSuccess) {
deferred.resolveWith(callbackContext, [success, statusText, jqXHR]);
} else {
deferred.rejectWith(callbackContext, [jqXHR, statusText, error]);
}
jqXHR.statusCode(_statusCode);
_statusCode = undefined;
if (fireGlobals) {
globalEventContext.trigger(isSuccess ? "ajaxSuccess" : "ajaxError", [jqXHR, s, isSuccess ? success : error]);
}
completeDeferred.fireWith(callbackContext, [jqXHR, statusText]);
if (fireGlobals) {
globalEventContext.trigger("ajaxComplete", [jqXHR, s]);
if (! --jQuery.active) {
jQuery.event.trigger("ajaxStop");
}
}
}
return jqXHR;
},
getJSON: function getJSON(url, data, callback) {
return jQuery.get(url, data, callback, "json");
},
getScript: function getScript(url, callback) {
return jQuery.get(url, undefined, callback, "script");
}
});
jQuery.each(["get", "post"], function (i, method) {
jQuery[method] = function (url, data, callback, type) {
if (jQuery.isFunction(data)) {
type = type || callback;
callback = data;
data = undefined;
}
return jQuery.ajax({
url: url,
type: method,
dataType: type,
data: data,
success: callback
});
};
});
jQuery._evalUrl = function (url) {
return jQuery.ajax({
url: url,
type: "GET",
dataType: "script",
async: false,
global: false,
"throws": true
});
};
jQuery.fn.extend({
wrapAll: function wrapAll(html) {
var wrap;
if (jQuery.isFunction(html)) {
return this.each(function (i) {
jQuery(this).wrapAll(html.call(this, i));
});
}
if (this[0]) {
wrap = jQuery(html, this[0].ownerDocument).eq(0).clone(true);
if (this[0].parentNode) {
wrap.insertBefore(this[0]);
}
wrap.map(function () {
var elem = this;
while (elem.firstElementChild) {
elem = elem.firstElementChild;
}
return elem;
}).append(this);
}
return this;
},
wrapInner: function wrapInner(html) {
if (jQuery.isFunction(html)) {
return this.each(function (i) {
jQuery(this).wrapInner(html.call(this, i));
});
}
return this.each(function () {
var self = jQuery(this),
contents = self.contents();
if (contents.length) {
contents.wrapAll(html);
} else {
self.append(html);
}
});
},
wrap: function wrap(html) {
var isFunction = jQuery.isFunction(html);
return this.each(function (i) {
jQuery(this).wrapAll(isFunction ? html.call(this, i) : html);
});
},
unwrap: function unwrap() {
return this.parent().each(function () {
if (!jQuery.nodeName(this, "body")) {
jQuery(this).replaceWith(this.childNodes);
}
}).end();
}
});
jQuery.expr.filters.hidden = function (elem) {
return elem.offsetWidth <= 0 && elem.offsetHeight <= 0;
};
jQuery.expr.filters.visible = function (elem) {
return !jQuery.expr.filters.hidden(elem);
};
var r20 = /%20/g,
rbracket = /\[\]$/,
rCRLF = /\r?\n/g,
rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,
rsubmittable = /^(?:input|select|textarea|keygen)/i;
function buildParams(prefix, obj, traditional, add) {
var name;
if (jQuery.isArray(obj)) {
jQuery.each(obj, function (i, v) {
if (traditional || rbracket.test(prefix)) {
add(prefix, v);
} else {
buildParams(prefix + "[" + (typeof v === "object" ? i : "") + "]", v, traditional, add);
}
});
} else if (!traditional && jQuery.type(obj) === "object") {
for (name in obj) {
buildParams(prefix + "[" + name + "]", obj[name], traditional, add);
}
} else {
add(prefix, obj);
}
}
jQuery.param = function (a, traditional) {
var prefix,
s = [],
add = function add(key, value) {
value = jQuery.isFunction(value) ? value() : value == null ? "" : value;
s[s.length] = encodeURIComponent(key) + "=" + encodeURIComponent(value);
};
if (traditional === undefined) {
traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;
}
if (jQuery.isArray(a) || a.jquery && !jQuery.isPlainObject(a)) {
jQuery.each(a, function () {
add(this.name, this.value);
});
} else {
for (prefix in a) {
buildParams(prefix, a[prefix], traditional, add);
}
}
return s.join("&").replace(r20, "+");
};
jQuery.fn.extend({
serialize: function serialize() {
return jQuery.param(this.serializeArray());
},
serializeArray: function serializeArray() {
return this.map(function () {
var elements = jQuery.prop(this, "elements");
return elements ? jQuery.makeArray(elements) : this;
}).filter(function () {
var type = this.type;
return this.name && !jQuery(this).is(":disabled") && rsubmittable.test(this.nodeName) && !rsubmitterTypes.test(type) && (this.checked || !rcheckableType.test(type));
}).map(function (i, elem) {
var val = jQuery(this).val();
return val == null ? null : jQuery.isArray(val) ? jQuery.map(val, function (val) {
return { name: elem.name, value: val.replace(rCRLF, "\r\n") };
}) : { name: elem.name, value: val.replace(rCRLF, "\r\n") };
}).get();
}
});
jQuery.ajaxSettings.xhr = function () {
try {
return new XMLHttpRequest();
} catch (e) {}
};
var xhrId = 0,
xhrCallbacks = {},
xhrSuccessStatus = {
0: 200,
1223: 204
},
xhrSupported = jQuery.ajaxSettings.xhr();
if (window.attachEvent) {
window.attachEvent("onunload", function () {
for (var key in xhrCallbacks) {
xhrCallbacks[key]();
}
});
}
support.cors = !!xhrSupported && "withCredentials" in xhrSupported;
support.ajax = xhrSupported = !!xhrSupported;
jQuery.ajaxTransport(function (options) {
var _callback;
if (support.cors || xhrSupported && !options.crossDomain) {
return {
send: function send(headers, complete) {
var i,
xhr = options.xhr(),
id = ++xhrId;
xhr.open(options.type, options.url, options.async, options.username, options.password);
if (options.xhrFields) {
for (i in options.xhrFields) {
xhr[i] = options.xhrFields[i];
}
}
if (options.mimeType && xhr.overrideMimeType) {
xhr.overrideMimeType(options.mimeType);
}
if (!options.crossDomain && !headers["X-Requested-With"]) {
headers["X-Requested-With"] = "XMLHttpRequest";
}
for (i in headers) {
xhr.setRequestHeader(i, headers[i]);
}
_callback = function callback(type) {
return function () {
if (_callback) {
delete xhrCallbacks[id];
_callback = xhr.onload = xhr.onerror = null;
if (type === "abort") {
xhr.abort();
} else if (type === "error") {
complete(xhr.status, xhr.statusText);
} else {
complete(xhrSuccessStatus[xhr.status] || xhr.status, xhr.statusText, typeof xhr.responseText === "string" ? {
text: xhr.responseText
} : undefined, xhr.getAllResponseHeaders());
}
}
};
};
xhr.onload = _callback();
xhr.onerror = _callback("error");
_callback = xhrCallbacks[id] = _callback("abort");
try {
xhr.send(options.hasContent && options.data || null);
} catch (e) {
if (_callback) {
throw e;
}
}
},
abort: function abort() {
if (_callback) {
_callback();
}
}
};
}
});
jQuery.ajaxSetup({
accepts: {
script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
},
contents: {
script: /(?:java|ecma)script/
},
converters: {
"text script": function textScript(text) {
jQuery.globalEval(text);
return text;
}
}
});
jQuery.ajaxPrefilter("script", function (s) {
if (s.cache === undefined) {
s.cache = false;
}
if (s.crossDomain) {
s.type = "GET";
}
});
jQuery.ajaxTransport("script", function (s) {
if (s.crossDomain) {
var script, _callback2;
return {
send: function send(_, complete) {
script = jQuery("<script>").prop({
async: true,
charset: s.scriptCharset,
src: s.url
}).on("load error", _callback2 = function callback(evt) {
script.remove();
_callback2 = null;
if (evt) {
complete(evt.type === "error" ? 404 : 200, evt.type);
}
});
document.head.appendChild(script[0]);
},
abort: function abort() {
if (_callback2) {
_callback2();
}
}
};
}
});
var oldCallbacks = [],
rjsonp = /(=)\?(?=&|$)|\?\?/;
jQuery.ajaxSetup({
jsonp: "callback",
jsonpCallback: function jsonpCallback() {
var callback = oldCallbacks.pop() || jQuery.expando + "_" + nonce++;
this[callback] = true;
return callback;
}
});
jQuery.ajaxPrefilter("json jsonp", function (s, originalSettings, jqXHR) {
var callbackName,
overwritten,
responseContainer,
jsonProp = s.jsonp !== false && (rjsonp.test(s.url) ? "url" : typeof s.data === "string" && !(s.contentType || "").indexOf("application/x-www-form-urlencoded") && rjsonp.test(s.data) && "data");
if (jsonProp || s.dataTypes[0] === "jsonp") {
callbackName = s.jsonpCallback = jQuery.isFunction(s.jsonpCallback) ? s.jsonpCallback() : s.jsonpCallback;
if (jsonProp) {
s[jsonProp] = s[jsonProp].replace(rjsonp, "$1" + callbackName);
} else if (s.jsonp !== false) {
s.url += (rquery.test(s.url) ? "&" : "?") + s.jsonp + "=" + callbackName;
}
s.converters["script json"] = function () {
if (!responseContainer) {
jQuery.error(callbackName + " was not called");
}
return responseContainer[0];
};
s.dataTypes[0] = "json";
overwritten = window[callbackName];
window[callbackName] = function () {
responseContainer = arguments;
};
jqXHR.always(function () {
window[callbackName] = overwritten;
if (s[callbackName]) {
s.jsonpCallback = originalSettings.jsonpCallback;
oldCallbacks.push(callbackName);
}
if (responseContainer && jQuery.isFunction(overwritten)) {
overwritten(responseContainer[0]);
}
responseContainer = overwritten = undefined;
});
return "script";
}
});
jQuery.parseHTML = function (data, context, keepScripts) {
if (!data || typeof data !== "string") {
return null;
}
if (typeof context === "boolean") {
keepScripts = context;
context = false;
}
context = context || document;
var parsed = rsingleTag.exec(data),
scripts = !keepScripts && [];
if (parsed) {
return [context.createElement(parsed[1])];
}
parsed = jQuery.buildFragment([data], context, scripts);
if (scripts && scripts.length) {
jQuery(scripts).remove();
}
return jQuery.merge([], parsed.childNodes);
};
var _load = jQuery.fn.load;
jQuery.fn.load = function (url, params, callback) {
if (typeof url !== "string" && _load) {
return _load.apply(this, arguments);
}
var selector,
type,
response,
self = this,
off = url.indexOf(" ");
if (off >= 0) {
selector = jQuery.trim(url.slice(off));
url = url.slice(0, off);
}
if (jQuery.isFunction(params)) {
callback = params;
params = undefined;
} else if (params && typeof params === "object") {
type = "POST";
}
if (self.length > 0) {
jQuery.ajax({
url: url,
type: type,
dataType: "html",
data: params
}).done(function (responseText) {
response = arguments;
self.html(selector ? jQuery("<div>").append(jQuery.parseHTML(responseText)).find(selector) : responseText);
}).complete(callback && function (jqXHR, status) {
self.each(callback, response || [jqXHR.responseText, status, jqXHR]);
});
}
return this;
};
jQuery.each(["ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend"], function (i, type) {
jQuery.fn[type] = function (fn) {
return this.on(type, fn);
};
});
jQuery.expr.filters.animated = function (elem) {
return jQuery.grep(jQuery.timers, function (fn) {
return elem === fn.elem;
}).length;
};
var docElem = window.document.documentElement;
function getWindow(elem) {
return jQuery.isWindow(elem) ? elem : elem.nodeType === 9 && elem.defaultView;
}
jQuery.offset = {
setOffset: function setOffset(elem, options, i) {
var curPosition,
curLeft,
curCSSTop,
curTop,
curOffset,
curCSSLeft,
calculatePosition,
position = jQuery.css(elem, "position"),
curElem = jQuery(elem),
props = {};
if (position === "static") {
elem.style.position = "relative";
}
curOffset = curElem.offset();
curCSSTop = jQuery.css(elem, "top");
curCSSLeft = jQuery.css(elem, "left");
calculatePosition = (position === "absolute" || position === "fixed") && (curCSSTop + curCSSLeft).indexOf("auto") > -1;
if (calculatePosition) {
curPosition = curElem.position();
curTop = curPosition.top;
curLeft = curPosition.left;
} else {
curTop = parseFloat(curCSSTop) || 0;
curLeft = parseFloat(curCSSLeft) || 0;
}
if (jQuery.isFunction(options)) {
options = options.call(elem, i, curOffset);
}
if (options.top != null) {
props.top = options.top - curOffset.top + curTop;
}
if (options.left != null) {
props.left = options.left - curOffset.left + curLeft;
}
if ("using" in options) {
options.using.call(elem, props);
} else {
curElem.css(props);
}
}
};
jQuery.fn.extend({
offset: function offset(options) {
if (arguments.length) {
return options === undefined ? this : this.each(function (i) {
jQuery.offset.setOffset(this, options, i);
});
}
var docElem,
win,
elem = this[0],
box = { top: 0, left: 0 },
doc = elem && elem.ownerDocument;
if (!doc) {
return;
}
docElem = doc.documentElement;
if (!jQuery.contains(docElem, elem)) {
return box;
}
if (typeof elem.getBoundingClientRect !== strundefined) {
box = elem.getBoundingClientRect();
}
win = getWindow(doc);
return {
top: box.top + win.pageYOffset - docElem.clientTop,
left: box.left + win.pageXOffset - docElem.clientLeft
};
},
position: function position() {
if (!this[0]) {
return;
}
var offsetParent,
offset,
elem = this[0],
parentOffset = { top: 0, left: 0 };
if (jQuery.css(elem, "position") === "fixed") {
offset = elem.getBoundingClientRect();
} else {
offsetParent = this.offsetParent();
offset = this.offset();
if (!jQuery.nodeName(offsetParent[0], "html")) {
parentOffset = offsetParent.offset();
}
parentOffset.top += jQuery.css(offsetParent[0], "borderTopWidth", true);
parentOffset.left += jQuery.css(offsetParent[0], "borderLeftWidth", true);
}
return {
top: offset.top - parentOffset.top - jQuery.css(elem, "marginTop", true),
left: offset.left - parentOffset.left - jQuery.css(elem, "marginLeft", true)
};
},
offsetParent: function offsetParent() {
return this.map(function () {
var offsetParent = this.offsetParent || docElem;
while (offsetParent && !jQuery.nodeName(offsetParent, "html") && jQuery.css(offsetParent, "position") === "static") {
offsetParent = offsetParent.offsetParent;
}
return offsetParent || docElem;
});
}
});
jQuery.each({ scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function (method, prop) {
var top = "pageYOffset" === prop;
jQuery.fn[method] = function (val) {
return access(this, function (elem, method, val) {
var win = getWindow(elem);
if (val === undefined) {
return win ? win[prop] : elem[method];
}
if (win) {
win.scrollTo(!top ? val : window.pageXOffset, top ? val : window.pageYOffset);
} else {
elem[method] = val;
}
}, method, val, arguments.length, null);
};
});
jQuery.each(["top", "left"], function (i, prop) {
jQuery.cssHooks[prop] = addGetHookIf(support.pixelPosition, function (elem, computed) {
if (computed) {
computed = curCSS(elem, prop);
return rnumnonpx.test(computed) ? jQuery(elem).position()[prop] + "px" : computed;
}
});
});
jQuery.each({ Height: "height", Width: "width" }, function (name, type) {
jQuery.each({ padding: "inner" + name, content: type, "": "outer" + name }, function (defaultExtra, funcName) {
jQuery.fn[funcName] = function (margin, value) {
var chainable = arguments.length && (defaultExtra || typeof margin !== "boolean"),
extra = defaultExtra || (margin === true || value === true ? "margin" : "border");
return access(this, function (elem, type, value) {
var doc;
if (jQuery.isWindow(elem)) {
return elem.document.documentElement["client" + name];
}
if (elem.nodeType === 9) {
doc = elem.documentElement;
return Math.max(elem.body["scroll" + name], doc["scroll" + name], elem.body["offset" + name], doc["offset" + name], doc["client" + name]);
}
return value === undefined ? jQuery.css(elem, type, extra) : jQuery.style(elem, type, value, extra);
}, type, chainable ? margin : undefined, chainable, null);
};
});
});
jQuery.fn.size = function () {
return this.length;
};
jQuery.fn.andSelf = jQuery.fn.addBack;
if (typeof define === "function" && define.amd) {
define("jquery", [], function () {
return jQuery;
});
}
var _jQuery = window.jQuery,
_$ = window.$;
jQuery.noConflict = function (deep) {
if (window.$ === jQuery) {
window.$ = _$;
}
if (deep && window.jQuery === jQuery) {
window.jQuery = _jQuery;
}
return jQuery;
};
if (typeof noGlobal === strundefined) {
window.jQuery = window.$ = jQuery;
}
return jQuery;
});
}, 489, null, "jquery/dist/jquery.js");
__d(/* strophe/strophe.js */function(global, require, module, exports) {
(function (callback) {
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
define('strophe-base64', function () {
return factory();
});
} else {
root.Base64 = factory();
}
})(this, function () {
var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
var obj = {
encode: function encode(input) {
var output = "";
var chr1, chr2, chr3;
var enc1, enc2, enc3, enc4;
var i = 0;
do {
chr1 = input.charCodeAt(i++);
chr2 = input.charCodeAt(i++);
chr3 = input.charCodeAt(i++);
enc1 = chr1 >> 2;
enc2 = (chr1 & 3) << 4 | chr2 >> 4;
enc3 = (chr2 & 15) << 2 | chr3 >> 6;
enc4 = chr3 & 63;
if (isNaN(chr2)) {
enc2 = (chr1 & 3) << 4;
enc3 = enc4 = 64;
} else if (isNaN(chr3)) {
enc4 = 64;
}
output = output + keyStr.charAt(enc1) + keyStr.charAt(enc2) + keyStr.charAt(enc3) + keyStr.charAt(enc4);
} while (i < input.length);
return output;
},
decode: function decode(input) {
var output = "";
var chr1, chr2, chr3;
var enc1, enc2, enc3, enc4;
var i = 0;
input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
do {
enc1 = keyStr.indexOf(input.charAt(i++));
enc2 = keyStr.indexOf(input.charAt(i++));
enc3 = keyStr.indexOf(input.charAt(i++));
enc4 = keyStr.indexOf(input.charAt(i++));
chr1 = enc1 << 2 | enc2 >> 4;
chr2 = (enc2 & 15) << 4 | enc3 >> 2;
chr3 = (enc3 & 3) << 6 | enc4;
output = output + String.fromCharCode(chr1);
if (enc3 != 64) {
output = output + String.fromCharCode(chr2);
}
if (enc4 != 64) {
output = output + String.fromCharCode(chr3);
}
} while (i < input.length);
return output;
}
};
return obj;
});
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
define('strophe-sha1', function () {
return factory();
});
} else {
root.SHA1 = factory();
}
})(this, function () {
function core_sha1(x, len) {
x[len >> 5] |= 0x80 << 24 - len % 32;
x[(len + 64 >> 9 << 4) + 15] = len;
var w = new Array(80);
var a = 1732584193;
var b = -271733879;
var c = -1732584194;
var d = 271733878;
var e = -1009589776;
var i, j, t, olda, oldb, oldc, oldd, olde;
for (i = 0; i < x.length; i += 16) {
olda = a;
oldb = b;
oldc = c;
oldd = d;
olde = e;
for (j = 0; j < 80; j++) {
if (j < 16) {
w[j] = x[i + j];
} else {
w[j] = rol(w[j - 3] ^ w[j - 8] ^ w[j - 14] ^ w[j - 16], 1);
}
t = safe_add(safe_add(rol(a, 5), sha1_ft(j, b, c, d)), safe_add(safe_add(e, w[j]), sha1_kt(j)));
e = d;
d = c;
c = rol(b, 30);
b = a;
a = t;
}
a = safe_add(a, olda);
b = safe_add(b, oldb);
c = safe_add(c, oldc);
d = safe_add(d, oldd);
e = safe_add(e, olde);
}
return [a, b, c, d, e];
}
function sha1_ft(t, b, c, d) {
if (t < 20) {
return b & c | ~b & d;
}
if (t < 40) {
return b ^ c ^ d;
}
if (t < 60) {
return b & c | b & d | c & d;
}
return b ^ c ^ d;
}
function sha1_kt(t) {
return t < 20 ? 1518500249 : t < 40 ? 1859775393 : t < 60 ? -1894007588 : -899497514;
}
function core_hmac_sha1(key, data) {
var bkey = str2binb(key);
if (bkey.length > 16) {
bkey = core_sha1(bkey, key.length * 8);
}
var ipad = new Array(16),
opad = new Array(16);
for (var i = 0; i < 16; i++) {
ipad[i] = bkey[i] ^ 0x36363636;
opad[i] = bkey[i] ^ 0x5C5C5C5C;
}
var hash = core_sha1(ipad.concat(str2binb(data)), 512 + data.length * 8);
return core_sha1(opad.concat(hash), 512 + 160);
}
function safe_add(x, y) {
var lsw = (x & 0xFFFF) + (y & 0xFFFF);
var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
return msw << 16 | lsw & 0xFFFF;
}
function rol(num, cnt) {
return num << cnt | num >>> 32 - cnt;
}
function str2binb(str) {
var bin = [];
var mask = 255;
for (var i = 0; i < str.length * 8; i += 8) {
bin[i >> 5] |= (str.charCodeAt(i / 8) & mask) << 24 - i % 32;
}
return bin;
}
function binb2str(bin) {
var str = "";
var mask = 255;
for (var i = 0; i < bin.length * 32; i += 8) {
str += String.fromCharCode(bin[i >> 5] >>> 24 - i % 32 & mask);
}
return str;
}
function binb2b64(binarray) {
var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
var str = "";
var triplet, j;
for (var i = 0; i < binarray.length * 4; i += 3) {
triplet = (binarray[i >> 2] >> 8 * (3 - i % 4) & 0xFF) << 16 | (binarray[i + 1 >> 2] >> 8 * (3 - (i + 1) % 4) & 0xFF) << 8 | binarray[i + 2 >> 2] >> 8 * (3 - (i + 2) % 4) & 0xFF;
for (j = 0; j < 4; j++) {
if (i * 8 + j * 6 > binarray.length * 32) {
str += "=";
} else {
str += tab.charAt(triplet >> 6 * (3 - j) & 0x3F);
}
}
}
return str;
}
return {
b64_hmac_sha1: function b64_hmac_sha1(key, data) {
return binb2b64(core_hmac_sha1(key, data));
},
b64_sha1: function b64_sha1(s) {
return binb2b64(core_sha1(str2binb(s), s.length * 8));
},
binb2str: binb2str,
core_hmac_sha1: core_hmac_sha1,
str_hmac_sha1: function str_hmac_sha1(key, data) {
return binb2str(core_hmac_sha1(key, data));
},
str_sha1: function str_sha1(s) {
return binb2str(core_sha1(str2binb(s), s.length * 8));
}
};
});
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
define('strophe-md5', function () {
return factory();
});
} else {
root.MD5 = factory();
}
})(this, function (b) {
var safe_add = function safe_add(x, y) {
var lsw = (x & 0xFFFF) + (y & 0xFFFF);
var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
return msw << 16 | lsw & 0xFFFF;
};
var bit_rol = function bit_rol(num, cnt) {
return num << cnt | num >>> 32 - cnt;
};
var str2binl = function str2binl(str) {
var bin = [];
for (var i = 0; i < str.length * 8; i += 8) {
bin[i >> 5] |= (str.charCodeAt(i / 8) & 255) << i % 32;
}
return bin;
};
var binl2str = function binl2str(bin) {
var str = "";
for (var i = 0; i < bin.length * 32; i += 8) {
str += String.fromCharCode(bin[i >> 5] >>> i % 32 & 255);
}
return str;
};
var binl2hex = function binl2hex(binarray) {
var hex_tab = "0123456789abcdef";
var str = "";
for (var i = 0; i < binarray.length * 4; i++) {
str += hex_tab.charAt(binarray[i >> 2] >> i % 4 * 8 + 4 & 0xF) + hex_tab.charAt(binarray[i >> 2] >> i % 4 * 8 & 0xF);
}
return str;
};
var md5_cmn = function md5_cmn(q, a, b, x, s, t) {
return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s), b);
};
var md5_ff = function md5_ff(a, b, c, d, x, s, t) {
return md5_cmn(b & c | ~b & d, a, b, x, s, t);
};
var md5_gg = function md5_gg(a, b, c, d, x, s, t) {
return md5_cmn(b & d | c & ~d, a, b, x, s, t);
};
var md5_hh = function md5_hh(a, b, c, d, x, s, t) {
return md5_cmn(b ^ c ^ d, a, b, x, s, t);
};
var md5_ii = function md5_ii(a, b, c, d, x, s, t) {
return md5_cmn(c ^ (b | ~d), a, b, x, s, t);
};
var core_md5 = function core_md5(x, len) {
x[len >> 5] |= 0x80 << len % 32;
x[(len + 64 >>> 9 << 4) + 14] = len;
var a = 1732584193;
var b = -271733879;
var c = -1732584194;
var d = 271733878;
var olda, oldb, oldc, oldd;
for (var i = 0; i < x.length; i += 16) {
olda = a;
oldb = b;
oldc = c;
oldd = d;
a = md5_ff(a, b, c, d, x[i + 0], 7, -680876936);
d = md5_ff(d, a, b, c, x[i + 1], 12, -389564586);
c = md5_ff(c, d, a, b, x[i + 2], 17, 606105819);
b = md5_ff(b, c, d, a, x[i + 3], 22, -1044525330);
a = md5_ff(a, b, c, d, x[i + 4], 7, -176418897);
d = md5_ff(d, a, b, c, x[i + 5], 12, 1200080426);
c = md5_ff(c, d, a, b, x[i + 6], 17, -1473231341);
b = md5_ff(b, c, d, a, x[i + 7], 22, -45705983);
a = md5_ff(a, b, c, d, x[i + 8], 7, 1770035416);
d = md5_ff(d, a, b, c, x[i + 9], 12, -1958414417);
c = md5_ff(c, d, a, b, x[i + 10], 17, -42063);
b = md5_ff(b, c, d, a, x[i + 11], 22, -1990404162);
a = md5_ff(a, b, c, d, x[i + 12], 7, 1804603682);
d = md5_ff(d, a, b, c, x[i + 13], 12, -40341101);
c = md5_ff(c, d, a, b, x[i + 14], 17, -1502002290);
b = md5_ff(b, c, d, a, x[i + 15], 22, 1236535329);
a = md5_gg(a, b, c, d, x[i + 1], 5, -165796510);
d = md5_gg(d, a, b, c, x[i + 6], 9, -1069501632);
c = md5_gg(c, d, a, b, x[i + 11], 14, 643717713);
b = md5_gg(b, c, d, a, x[i + 0], 20, -373897302);
a = md5_gg(a, b, c, d, x[i + 5], 5, -701558691);
d = md5_gg(d, a, b, c, x[i + 10], 9, 38016083);
c = md5_gg(c, d, a, b, x[i + 15], 14, -660478335);
b = md5_gg(b, c, d, a, x[i + 4], 20, -405537848);
a = md5_gg(a, b, c, d, x[i + 9], 5, 568446438);
d = md5_gg(d, a, b, c, x[i + 14], 9, -1019803690);
c = md5_gg(c, d, a, b, x[i + 3], 14, -187363961);
b = md5_gg(b, c, d, a, x[i + 8], 20, 1163531501);
a = md5_gg(a, b, c, d, x[i + 13], 5, -1444681467);
d = md5_gg(d, a, b, c, x[i + 2], 9, -51403784);
c = md5_gg(c, d, a, b, x[i + 7], 14, 1735328473);
b = md5_gg(b, c, d, a, x[i + 12], 20, -1926607734);
a = md5_hh(a, b, c, d, x[i + 5], 4, -378558);
d = md5_hh(d, a, b, c, x[i + 8], 11, -2022574463);
c = md5_hh(c, d, a, b, x[i + 11], 16, 1839030562);
b = md5_hh(b, c, d, a, x[i + 14], 23, -35309556);
a = md5_hh(a, b, c, d, x[i + 1], 4, -1530992060);
d = md5_hh(d, a, b, c, x[i + 4], 11, 1272893353);
c = md5_hh(c, d, a, b, x[i + 7], 16, -155497632);
b = md5_hh(b, c, d, a, x[i + 10], 23, -1094730640);
a = md5_hh(a, b, c, d, x[i + 13], 4, 681279174);
d = md5_hh(d, a, b, c, x[i + 0], 11, -358537222);
c = md5_hh(c, d, a, b, x[i + 3], 16, -722521979);
b = md5_hh(b, c, d, a, x[i + 6], 23, 76029189);
a = md5_hh(a, b, c, d, x[i + 9], 4, -640364487);
d = md5_hh(d, a, b, c, x[i + 12], 11, -421815835);
c = md5_hh(c, d, a, b, x[i + 15], 16, 530742520);
b = md5_hh(b, c, d, a, x[i + 2], 23, -995338651);
a = md5_ii(a, b, c, d, x[i + 0], 6, -198630844);
d = md5_ii(d, a, b, c, x[i + 7], 10, 1126891415);
c = md5_ii(c, d, a, b, x[i + 14], 15, -1416354905);
b = md5_ii(b, c, d, a, x[i + 5], 21, -57434055);
a = md5_ii(a, b, c, d, x[i + 12], 6, 1700485571);
d = md5_ii(d, a, b, c, x[i + 3], 10, -1894986606);
c = md5_ii(c, d, a, b, x[i + 10], 15, -1051523);
b = md5_ii(b, c, d, a, x[i + 1], 21, -2054922799);
a = md5_ii(a, b, c, d, x[i + 8], 6, 1873313359);
d = md5_ii(d, a, b, c, x[i + 15], 10, -30611744);
c = md5_ii(c, d, a, b, x[i + 6], 15, -1560198380);
b = md5_ii(b, c, d, a, x[i + 13], 21, 1309151649);
a = md5_ii(a, b, c, d, x[i + 4], 6, -145523070);
d = md5_ii(d, a, b, c, x[i + 11], 10, -1120210379);
c = md5_ii(c, d, a, b, x[i + 2], 15, 718787259);
b = md5_ii(b, c, d, a, x[i + 9], 21, -343485551);
a = safe_add(a, olda);
b = safe_add(b, oldb);
c = safe_add(c, oldc);
d = safe_add(d, oldd);
}
return [a, b, c, d];
};
var obj = {
hexdigest: function hexdigest(s) {
return binl2hex(core_md5(str2binl(s), s.length * 8));
},
hash: function hash(s) {
return binl2str(core_md5(str2binl(s), s.length * 8));
}
};
return obj;
});
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
define('strophe-utils', function () {
return factory();
});
} else {
root.stropheUtils = factory();
}
})(this, function () {
var utils = {
utf16to8: function utf16to8(str) {
var i, c;
var out = "";
var len = str.length;
for (i = 0; i < len; i++) {
c = str.charCodeAt(i);
if (c >= 0x0000 && c <= 0x007F) {
out += str.charAt(i);
} else if (c > 0x07FF) {
out += String.fromCharCode(0xE0 | c >> 12 & 0x0F);
out += String.fromCharCode(0x80 | c >> 6 & 0x3F);
out += String.fromCharCode(0x80 | c >> 0 & 0x3F);
} else {
out += String.fromCharCode(0xC0 | c >> 6 & 0x1F);
out += String.fromCharCode(0x80 | c >> 0 & 0x3F);
}
}
return out;
}
};
return utils;
});
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
define('strophe-polyfill', [], function () {
return factory();
});
} else {
return factory();
}
})(this, function () {
if (!Function.prototype.bind) {
Function.prototype.bind = function (obj) {
var func = this;
var _slice = Array.prototype.slice;
var _concat = Array.prototype.concat;
var _args = _slice.call(arguments, 1);
return function () {
return func.apply(obj ? obj : this, _concat.call(_args, _slice.call(arguments, 0)));
};
};
}
if (!Array.isArray) {
Array.isArray = function (arg) {
return Object.prototype.toString.call(arg) === '[object Array]';
};
}
if (!Array.prototype.indexOf) {
Array.prototype.indexOf = function (elt) {
var len = this.length;
var from = Number(arguments[1]) || 0;
from = from < 0 ? Math.ceil(from) : Math.floor(from);
if (from < 0) {
from += len;
}
for (; from < len; from++) {
if (from in this && this[from] === elt) {
return from;
}
}
return -1;
};
}
});
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
define('strophe-core', ['strophe-sha1', 'strophe-base64', 'strophe-md5', 'strophe-utils', "strophe-polyfill"], function () {
return factory.apply(this, arguments);
});
} else {
var o = factory(root.SHA1, root.Base64, root.MD5, root.stropheUtils);
window.Strophe = o.Strophe;
window.$build = o.$build;
window.$iq = o.$iq;
window.$msg = o.$msg;
window.$pres = o.$pres;
window.SHA1 = o.SHA1;
window.Base64 = o.Base64;
window.MD5 = o.MD5;
window.b64_hmac_sha1 = o.SHA1.b64_hmac_sha1;
window.b64_sha1 = o.SHA1.b64_sha1;
window.str_hmac_sha1 = o.SHA1.str_hmac_sha1;
window.str_sha1 = o.SHA1.str_sha1;
}
})(this, function (SHA1, Base64, MD5, utils) {
var Strophe;
function $build(name, attrs) {
return new Strophe.Builder(name, attrs);
}
function $msg(attrs) {
return new Strophe.Builder("message", attrs);
}
function $iq(attrs) {
return new Strophe.Builder("iq", attrs);
}
function $pres(attrs) {
return new Strophe.Builder("presence", attrs);
}
Strophe = {
VERSION: "1.2.4",
NS: {
HTTPBIND: "http://jabber.org/protocol/httpbind",
BOSH: "urn:xmpp:xbosh",
CLIENT: "jabber:client",
AUTH: "jabber:iq:auth",
ROSTER: "jabber:iq:roster",
PROFILE: "jabber:iq:profile",
DISCO_INFO: "http://jabber.org/protocol/disco#info",
DISCO_ITEMS: "http://jabber.org/protocol/disco#items",
MUC: "http://jabber.org/protocol/muc",
SASL: "urn:ietf:params:xml:ns:xmpp-sasl",
STREAM: "http://etherx.jabber.org/streams",
FRAMING: "urn:ietf:params:xml:ns:xmpp-framing",
BIND: "urn:ietf:params:xml:ns:xmpp-bind",
SESSION: "urn:ietf:params:xml:ns:xmpp-session",
VERSION: "jabber:iq:version",
STANZAS: "urn:ietf:params:xml:ns:xmpp-stanzas",
XHTML_IM: "http://jabber.org/protocol/xhtml-im",
XHTML: "http://www.w3.org/1999/xhtml"
},
XHTML: {
tags: ['a', 'blockquote', 'br', 'cite', 'em', 'img', 'li', 'ol', 'p', 'span', 'strong', 'ul', 'body'],
attributes: {
'a': ['href'],
'blockquote': ['style'],
'br': [],
'cite': ['style'],
'em': [],
'img': ['src', 'alt', 'style', 'height', 'width'],
'li': ['style'],
'ol': ['style'],
'p': ['style'],
'span': ['style'],
'strong': [],
'ul': ['style'],
'body': []
},
css: ['background-color', 'color', 'font-family', 'font-size', 'font-style', 'font-weight', 'margin-left', 'margin-right', 'text-align', 'text-decoration'],
validTag: function validTag(tag) {
for (var i = 0; i < Strophe.XHTML.tags.length; i++) {
if (tag == Strophe.XHTML.tags[i]) {
return true;
}
}
return false;
},
validAttribute: function validAttribute(tag, attribute) {
if (typeof Strophe.XHTML.attributes[tag] !== 'undefined' && Strophe.XHTML.attributes[tag].length > 0) {
for (var i = 0; i < Strophe.XHTML.attributes[tag].length; i++) {
if (attribute == Strophe.XHTML.attributes[tag][i]) {
return true;
}
}
}
return false;
},
validCSS: function validCSS(style) {
for (var i = 0; i < Strophe.XHTML.css.length; i++) {
if (style == Strophe.XHTML.css[i]) {
return true;
}
}
return false;
}
},
Status: {
ERROR: 0,
CONNECTING: 1,
CONNFAIL: 2,
AUTHENTICATING: 3,
AUTHFAIL: 4,
CONNECTED: 5,
DISCONNECTED: 6,
DISCONNECTING: 7,
ATTACHED: 8,
REDIRECT: 9
},
LogLevel: {
DEBUG: 0,
INFO: 1,
WARN: 2,
ERROR: 3,
FATAL: 4
},
ElementType: {
NORMAL: 1,
TEXT: 3,
CDATA: 4,
FRAGMENT: 11
},
TIMEOUT: 1.1,
SECONDARY_TIMEOUT: 0.1,
addNamespace: function addNamespace(name, value) {
Strophe.NS[name] = value;
},
forEachChild: function forEachChild(elem, elemName, func) {
var i, childNode;
for (i = 0; i < elem.childNodes.length; i++) {
childNode = elem.childNodes[i];
if (childNode.nodeType == Strophe.ElementType.NORMAL && (!elemName || this.isTagEqual(childNode, elemName))) {
func(childNode);
}
}
},
isTagEqual: function isTagEqual(el, name) {
return el.tagName == name;
},
_xmlGenerator: null,
_makeGenerator: function _makeGenerator() {
var doc;
if (document.implementation.createDocument === undefined || document.implementation.createDocument && document.documentMode && document.documentMode < 10) {
doc = this._getIEXmlDom();
doc.appendChild(doc.createElement('strophe'));
} else {
doc = document.implementation.createDocument('jabber:client', 'strophe', null);
}
return doc;
},
xmlGenerator: function xmlGenerator() {
if (!Strophe._xmlGenerator) {
Strophe._xmlGenerator = Strophe._makeGenerator();
}
return Strophe._xmlGenerator;
},
_getIEXmlDom: function _getIEXmlDom() {
var doc = null;
var docStrings = ["Msxml2.DOMDocument.6.0", "Msxml2.DOMDocument.5.0", "Msxml2.DOMDocument.4.0", "MSXML2.DOMDocument.3.0", "MSXML2.DOMDocument", "MSXML.DOMDocument", "Microsoft.XMLDOM"];
for (var d = 0; d < docStrings.length; d++) {
if (doc === null) {
try {
doc = new ActiveXObject(docStrings[d]);
} catch (e) {
doc = null;
}
} else {
break;
}
}
return doc;
},
xmlElement: function xmlElement(name) {
if (!name) {
return null;
}
var node = Strophe.xmlGenerator().createElement(name);
var a, i, k;
for (a = 1; a < arguments.length; a++) {
var arg = arguments[a];
if (!arg) {
continue;
}
if (typeof arg == "string" || typeof arg == "number") {
node.appendChild(Strophe.xmlTextNode(arg));
} else if (typeof arg == "object" && typeof arg.sort == "function") {
for (i = 0; i < arg.length; i++) {
var attr = arg[i];
if (typeof attr == "object" && typeof attr.sort == "function" && attr[1] !== undefined && attr[1] !== null) {
node.setAttribute(attr[0], attr[1]);
}
}
} else if (typeof arg == "object") {
for (k in arg) {
if (arg.hasOwnProperty(k)) {
if (arg[k] !== undefined && arg[k] !== null) {
node.setAttribute(k, arg[k]);
}
}
}
}
}
return node;
},
xmlescape: function xmlescape(text) {
text = text.replace(/\&/g, "&amp;");
text = text.replace(/</g, "&lt;");
text = text.replace(/>/g, "&gt;");
text = text.replace(/'/g, "&apos;");
text = text.replace(/"/g, "&quot;");
return text;
},
xmlunescape: function xmlunescape(text) {
text = text.replace(/\&amp;/g, "&");
text = text.replace(/&lt;/g, "<");
text = text.replace(/&gt;/g, ">");
text = text.replace(/&apos;/g, "'");
text = text.replace(/&quot;/g, "\"");
return text;
},
xmlTextNode: function xmlTextNode(text) {
return Strophe.xmlGenerator().createTextNode(text);
},
xmlHtmlNode: function xmlHtmlNode(html) {
var node;
if (window.DOMParser) {
var parser = new DOMParser();
node = parser.parseFromString(html, "text/xml");
} else {
node = new ActiveXObject("Microsoft.XMLDOM");
node.async = "false";
node.loadXML(html);
}
return node;
},
getText: function getText(elem) {
if (!elem) {
return null;
}
var str = "";
if (elem.childNodes.length === 0 && elem.nodeType == Strophe.ElementType.TEXT) {
str += elem.nodeValue;
}
for (var i = 0; i < elem.childNodes.length; i++) {
if (elem.childNodes[i].nodeType == Strophe.ElementType.TEXT) {
str += elem.childNodes[i].nodeValue;
}
}
return Strophe.xmlescape(str);
},
copyElement: function copyElement(elem) {
var i, el;
if (elem.nodeType == Strophe.ElementType.NORMAL) {
el = Strophe.xmlElement(elem.tagName);
for (i = 0; i < elem.attributes.length; i++) {
el.setAttribute(elem.attributes[i].nodeName, elem.attributes[i].value);
}
for (i = 0; i < elem.childNodes.length; i++) {
el.appendChild(Strophe.copyElement(elem.childNodes[i]));
}
} else if (elem.nodeType == Strophe.ElementType.TEXT) {
el = Strophe.xmlGenerator().createTextNode(elem.nodeValue);
}
return el;
},
createHtml: function createHtml(elem) {
var i, el, j, tag, attribute, value, css, cssAttrs, attr, cssName, cssValue;
if (elem.nodeType == Strophe.ElementType.NORMAL) {
tag = elem.nodeName.toLowerCase();
if (Strophe.XHTML.validTag(tag)) {
try {
el = Strophe.xmlElement(tag);
for (i = 0; i < Strophe.XHTML.attributes[tag].length; i++) {
attribute = Strophe.XHTML.attributes[tag][i];
value = elem.getAttribute(attribute);
if (typeof value == 'undefined' || value === null || value === '' || value === false || value === 0) {
continue;
}
if (attribute == 'style' && typeof value == 'object') {
if (typeof value.cssText != 'undefined') {
value = value.cssText;
}
}
if (attribute == 'style') {
css = [];
cssAttrs = value.split(';');
for (j = 0; j < cssAttrs.length; j++) {
attr = cssAttrs[j].split(':');
cssName = attr[0].replace(/^\s*/, "").replace(/\s*$/, "").toLowerCase();
if (Strophe.XHTML.validCSS(cssName)) {
cssValue = attr[1].replace(/^\s*/, "").replace(/\s*$/, "");
css.push(cssName + ': ' + cssValue);
}
}
if (css.length > 0) {
value = css.join('; ');
el.setAttribute(attribute, value);
}
} else {
el.setAttribute(attribute, value);
}
}
for (i = 0; i < elem.childNodes.length; i++) {
el.appendChild(Strophe.createHtml(elem.childNodes[i]));
}
} catch (e) {
el = Strophe.xmlTextNode('');
}
} else {
el = Strophe.xmlGenerator().createDocumentFragment();
for (i = 0; i < elem.childNodes.length; i++) {
el.appendChild(Strophe.createHtml(elem.childNodes[i]));
}
}
} else if (elem.nodeType == Strophe.ElementType.FRAGMENT) {
el = Strophe.xmlGenerator().createDocumentFragment();
for (i = 0; i < elem.childNodes.length; i++) {
el.appendChild(Strophe.createHtml(elem.childNodes[i]));
}
} else if (elem.nodeType == Strophe.ElementType.TEXT) {
el = Strophe.xmlTextNode(elem.nodeValue);
}
return el;
},
escapeNode: function escapeNode(node) {
if (typeof node !== "string") {
return node;
}
return node.replace(/^\s+|\s+$/g, '').replace(/\\/g, "\\5c").replace(/ /g, "\\20").replace(/\"/g, "\\22").replace(/\&/g, "\\26").replace(/\'/g, "\\27").replace(/\//g, "\\2f").replace(/:/g, "\\3a").replace(/</g, "\\3c").replace(/>/g, "\\3e").replace(/@/g, "\\40");
},
unescapeNode: function unescapeNode(node) {
if (typeof node !== "string") {
return node;
}
return node.replace(/\\20/g, " ").replace(/\\22/g, '"').replace(/\\26/g, "&").replace(/\\27/g, "'").replace(/\\2f/g, "/").replace(/\\3a/g, ":").replace(/\\3c/g, "<").replace(/\\3e/g, ">").replace(/\\40/g, "@").replace(/\\5c/g, "\\");
},
getNodeFromJid: function getNodeFromJid(jid) {
if (jid.indexOf("@") < 0) {
return null;
}
return jid.split("@")[0];
},
getDomainFromJid: function getDomainFromJid(jid) {
var bare = Strophe.getBareJidFromJid(jid);
if (bare.indexOf("@") < 0) {
return bare;
} else {
var parts = bare.split("@");
parts.splice(0, 1);
return parts.join('@');
}
},
getResourceFromJid: function getResourceFromJid(jid) {
var s = jid.split("/");
if (s.length < 2) {
return null;
}
s.splice(0, 1);
return s.join('/');
},
getBareJidFromJid: function getBareJidFromJid(jid) {
return jid ? jid.split("/")[0] : null;
},
log: function log(level, msg) {
return;
},
debug: function debug(msg) {
this.log(this.LogLevel.DEBUG, msg);
},
info: function info(msg) {
this.log(this.LogLevel.INFO, msg);
},
warn: function warn(msg) {
this.log(this.LogLevel.WARN, msg);
},
error: function error(msg) {
this.log(this.LogLevel.ERROR, msg);
},
fatal: function fatal(msg) {
this.log(this.LogLevel.FATAL, msg);
},
serialize: function serialize(elem) {
var result;
if (!elem) {
return null;
}
if (typeof elem.tree === "function") {
elem = elem.tree();
}
var nodeName = elem.nodeName;
var i, child;
if (elem.getAttribute("_realname")) {
nodeName = elem.getAttribute("_realname");
}
result = "<" + nodeName;
for (i = 0; i < elem.attributes.length; i++) {
if (elem.attributes[i].nodeName != "_realname") {
result += " " + elem.attributes[i].nodeName + "='" + elem.attributes[i].value.replace(/&/g, "&amp;").replace(/\'/g, "&apos;").replace(/>/g, "&gt;").replace(/</g, "&lt;") + "'";
}
}
if (elem.childNodes.length > 0) {
result += ">";
for (i = 0; i < elem.childNodes.length; i++) {
child = elem.childNodes[i];
switch (child.nodeType) {
case Strophe.ElementType.NORMAL:
result += Strophe.serialize(child);
break;
case Strophe.ElementType.TEXT:
result += Strophe.xmlescape(child.nodeValue);
break;
case Strophe.ElementType.CDATA:
result += "<![CDATA[" + child.nodeValue + "]]>";
}
}
result += "</" + nodeName + ">";
} else {
result += "/>";
}
return result;
},
_requestId: 0,
_connectionPlugins: {},
addConnectionPlugin: function addConnectionPlugin(name, ptype) {
Strophe._connectionPlugins[name] = ptype;
}
};
Strophe.Builder = function (name, attrs) {
if (name == "presence" || name == "message" || name == "iq") {
if (attrs && !attrs.xmlns) {
attrs.xmlns = Strophe.NS.CLIENT;
} else if (!attrs) {
attrs = { xmlns: Strophe.NS.CLIENT };
}
}
this.nodeTree = Strophe.xmlElement(name, attrs);
this.node = this.nodeTree;
};
Strophe.Builder.prototype = {
tree: function tree() {
return this.nodeTree;
},
toString: function toString() {
return Strophe.serialize(this.nodeTree);
},
up: function up() {
this.node = this.node.parentNode;
return this;
},
attrs: function attrs(moreattrs) {
for (var k in moreattrs) {
if (moreattrs.hasOwnProperty(k)) {
if (moreattrs[k] === undefined) {
this.node.removeAttribute(k);
} else {
this.node.setAttribute(k, moreattrs[k]);
}
}
}
return this;
},
c: function c(name, attrs, text) {
var child = Strophe.xmlElement(name, attrs, text);
this.node.appendChild(child);
if (typeof text !== "string") {
this.node = child;
}
return this;
},
cnode: function cnode(elem) {
var impNode;
var xmlGen = Strophe.xmlGenerator();
try {
impNode = xmlGen.importNode !== undefined;
} catch (e) {
impNode = false;
}
var newElem = impNode ? xmlGen.importNode(elem, true) : Strophe.copyElement(elem);
this.node.appendChild(newElem);
this.node = newElem;
return this;
},
t: function t(text) {
var child = Strophe.xmlTextNode(text);
this.node.appendChild(child);
return this;
},
h: function h(html) {
var fragment = document.createElement('body');
fragment.innerHTML = html;
var xhtml = Strophe.createHtml(fragment);
while (xhtml.childNodes.length > 0) {
this.node.appendChild(xhtml.childNodes[0]);
}
return this;
}
};
Strophe.Handler = function (handler, ns, name, type, id, from, options) {
this.handler = handler;
this.ns = ns;
this.name = name;
this.type = type;
this.id = id;
this.options = options || { matchBare: false };
if (!this.options.matchBare) {
this.options.matchBare = false;
}
if (this.options.matchBare) {
this.from = from ? Strophe.getBareJidFromJid(from) : null;
} else {
this.from = from;
}
this.user = true;
};
Strophe.Handler.prototype = {
isMatch: function isMatch(elem) {
var nsMatch;
var from = null;
if (this.options.matchBare) {
from = Strophe.getBareJidFromJid(elem.getAttribute('from'));
} else {
from = elem.getAttribute('from');
}
nsMatch = false;
if (!this.ns) {
nsMatch = true;
} else {
var that = this;
Strophe.forEachChild(elem, null, function (elem) {
if (elem.getAttribute("xmlns") == that.ns) {
nsMatch = true;
}
});
nsMatch = nsMatch || elem.getAttribute("xmlns") == this.ns;
}
var elem_type = elem.getAttribute("type");
if (nsMatch && (!this.name || Strophe.isTagEqual(elem, this.name)) && (!this.type || (Array.isArray(this.type) ? this.type.indexOf(elem_type) != -1 : elem_type == this.type)) && (!this.id || elem.getAttribute("id") == this.id) && (!this.from || from == this.from)) {
return true;
}
return false;
},
run: function run(elem) {
var result = null;
try {
result = this.handler(elem);
} catch (e) {
if (e.sourceURL) {
Strophe.fatal("error: " + this.handler + " " + e.sourceURL + ":" + e.line + " - " + e.name + ": " + e.message);
} else if (e.fileName) {
if (typeof console != "undefined") {
console.trace();
console.error(this.handler, " - error - ", e, e.message);
}
Strophe.fatal("error: " + this.handler + " " + e.fileName + ":" + e.lineNumber + " - " + e.name + ": " + e.message);
} else {
Strophe.fatal("error: " + e.message + "\n" + e.stack);
}
throw e;
}
return result;
},
toString: function toString() {
return "{Handler: " + this.handler + "(" + this.name + "," + this.id + "," + this.ns + ")}";
}
};
Strophe.TimedHandler = function (period, handler) {
this.period = period;
this.handler = handler;
this.lastCalled = new Date().getTime();
this.user = true;
};
Strophe.TimedHandler.prototype = {
run: function run() {
this.lastCalled = new Date().getTime();
return this.handler();
},
reset: function reset() {
this.lastCalled = new Date().getTime();
},
toString: function toString() {
return "{TimedHandler: " + this.handler + "(" + this.period + ")}";
}
};
Strophe.Connection = function (service, options) {
this.service = service;
this.options = options || {};
var proto = this.options.protocol || "";
if (service.indexOf("ws:") === 0 || service.indexOf("wss:") === 0 || proto.indexOf("ws") === 0) {
this._proto = new Strophe.Websocket(this);
} else {
this._proto = new Strophe.Bosh(this);
}
this.jid = "";
this.domain = null;
this.features = null;
this._sasl_data = {};
this.do_session = false;
this.do_bind = false;
this.timedHandlers = [];
this.handlers = [];
this.removeTimeds = [];
this.removeHandlers = [];
this.addTimeds = [];
this.addHandlers = [];
this._authentication = {};
this._idleTimeout = null;
this._disconnectTimeout = null;
this.authenticated = false;
this.connected = false;
this.disconnecting = false;
this.do_authentication = true;
this.paused = false;
this.restored = false;
this._data = [];
this._uniqueId = 0;
this._sasl_success_handler = null;
this._sasl_failure_handler = null;
this._sasl_challenge_handler = null;
this.maxRetries = 5;
this._idleTimeout = setTimeout(this._onIdle.bind(this), 100);
for (var k in Strophe._connectionPlugins) {
if (Strophe._connectionPlugins.hasOwnProperty(k)) {
var ptype = Strophe._connectionPlugins[k];
var F = function F() {};
F.prototype = ptype;
this[k] = new F();
this[k].init(this);
}
}
};
Strophe.Connection.prototype = {
reset: function reset() {
this._proto._reset();
this.do_session = false;
this.do_bind = false;
this.timedHandlers = [];
this.handlers = [];
this.removeTimeds = [];
this.removeHandlers = [];
this.addTimeds = [];
this.addHandlers = [];
this._authentication = {};
this.authenticated = false;
this.connected = false;
this.disconnecting = false;
this.restored = false;
this._data = [];
this._requests = [];
this._uniqueId = 0;
},
pause: function pause() {
this.paused = true;
},
resume: function resume() {
this.paused = false;
},
getUniqueId: function getUniqueId(suffix) {
var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
var r = Math.random() * 16 | 0,
v = c == 'x' ? r : r & 0x3 | 0x8;
return v.toString(16);
});
if (typeof suffix == "string" || typeof suffix == "number") {
return uuid + ":" + suffix;
} else {
return uuid + "";
}
},
connect: function connect(jid, pass, callback, wait, hold, route, authcid) {
this.jid = jid;
this.authzid = Strophe.getBareJidFromJid(this.jid);
this.authcid = authcid || Strophe.getNodeFromJid(this.jid);
this.pass = pass;
this.servtype = "xmpp";
this.connect_callback = callback;
this.disconnecting = false;
this.connected = false;
this.authenticated = false;
this.restored = false;
this.domain = Strophe.getDomainFromJid(this.jid);
this._changeConnectStatus(Strophe.Status.CONNECTING, null);
this._proto._connect(wait, hold, route);
},
attach: function attach(jid, sid, rid, callback, wait, hold, wind) {
if (this._proto instanceof Strophe.Bosh) {
this._proto._attach(jid, sid, rid, callback, wait, hold, wind);
} else {
throw {
name: 'StropheSessionError',
message: 'The "attach" method can only be used with a BOSH connection.'
};
}
},
restore: function restore(jid, callback, wait, hold, wind) {
if (this._sessionCachingSupported()) {
this._proto._restore(jid, callback, wait, hold, wind);
} else {
throw {
name: 'StropheSessionError',
message: 'The "restore" method can only be used with a BOSH connection.'
};
}
},
_sessionCachingSupported: function _sessionCachingSupported() {
if (this._proto instanceof Strophe.Bosh) {
if (!JSON) {
return false;
}
try {
window.sessionStorage.setItem('_strophe_', '_strophe_');
window.sessionStorage.removeItem('_strophe_');
} catch (e) {
return false;
}
return true;
}
return false;
},
xmlInput: function xmlInput(elem) {
return;
},
xmlOutput: function xmlOutput(elem) {
return;
},
rawInput: function rawInput(data) {
return;
},
rawOutput: function rawOutput(data) {
return;
},
nextValidRid: function nextValidRid(rid) {
return;
},
send: function send(elem) {
if (elem === null) {
return;
}
if (typeof elem.sort === "function") {
for (var i = 0; i < elem.length; i++) {
this._queueData(elem[i]);
}
} else if (typeof elem.tree === "function") {
this._queueData(elem.tree());
} else {
this._queueData(elem);
}
this._proto._send();
},
flush: function flush() {
clearTimeout(this._idleTimeout);
this._onIdle();
},
sendIQ: function sendIQ(elem, callback, errback, timeout) {
var timeoutHandler = null;
var that = this;
if (typeof elem.tree === "function") {
elem = elem.tree();
}
var id = elem.getAttribute('id');
if (!id) {
id = this.getUniqueId("sendIQ");
elem.setAttribute("id", id);
}
var expectedFrom = elem.getAttribute("to");
var fulljid = this.jid;
var handler = this.addHandler(function (stanza) {
if (timeoutHandler) {
that.deleteTimedHandler(timeoutHandler);
}
var acceptable = false;
var from = stanza.getAttribute("from");
if (from === expectedFrom || !expectedFrom && (from === Strophe.getBareJidFromJid(fulljid) || from === Strophe.getDomainFromJid(fulljid) || from === fulljid)) {
acceptable = true;
}
if (!acceptable) {
throw {
name: "StropheError",
message: "Got answer to IQ from wrong jid:" + from + "\nExpected jid: " + expectedFrom
};
}
var iqtype = stanza.getAttribute('type');
if (iqtype == 'result') {
if (callback) {
callback(stanza);
}
} else if (iqtype == 'error') {
if (errback) {
errback(stanza);
}
} else {
throw {
name: "StropheError",
message: "Got bad IQ type of " + iqtype
};
}
}, null, 'iq', ['error', 'result'], id);
if (timeout) {
timeoutHandler = this.addTimedHandler(timeout, function () {
that.deleteHandler(handler);
if (errback) {
errback(null);
}
return false;
});
}
this.send(elem);
return id;
},
_queueData: function _queueData(element) {
if (element === null || !element.tagName || !element.childNodes) {
throw {
name: "StropheError",
message: "Cannot queue non-DOMElement."
};
}
this._data.push(element);
},
_sendRestart: function _sendRestart() {
this._data.push("restart");
this._proto._sendRestart();
this._idleTimeout = setTimeout(this._onIdle.bind(this), 100);
},
addTimedHandler: function addTimedHandler(period, handler) {
var thand = new Strophe.TimedHandler(period, handler);
this.addTimeds.push(thand);
return thand;
},
deleteTimedHandler: function deleteTimedHandler(handRef) {
this.removeTimeds.push(handRef);
},
addHandler: function addHandler(handler, ns, name, type, id, from, options) {
var hand = new Strophe.Handler(handler, ns, name, type, id, from, options);
this.addHandlers.push(hand);
return hand;
},
deleteHandler: function deleteHandler(handRef) {
this.removeHandlers.push(handRef);
var i = this.addHandlers.indexOf(handRef);
if (i >= 0) {
this.addHandlers.splice(i, 1);
}
},
disconnect: function disconnect(reason) {
this._changeConnectStatus(Strophe.Status.DISCONNECTING, reason);
Strophe.info("Disconnect was called because: " + reason);
if (this.connected) {
var pres = false;
this.disconnecting = true;
if (this.authenticated) {
pres = $pres({
xmlns: Strophe.NS.CLIENT,
type: 'unavailable'
});
}
this._disconnectTimeout = this._addSysTimedHandler(3000, this._onDisconnectTimeout.bind(this));
this._proto._disconnect(pres);
} else {
Strophe.info("Disconnect was called before Strophe connected to the server");
this._proto._abortAllRequests();
}
},
_changeConnectStatus: function _changeConnectStatus(status, condition) {
for (var k in Strophe._connectionPlugins) {
if (Strophe._connectionPlugins.hasOwnProperty(k)) {
var plugin = this[k];
if (plugin.statusChanged) {
try {
plugin.statusChanged(status, condition);
} catch (err) {
Strophe.error("" + k + " plugin caused an exception " + "changing status: " + err);
}
}
}
}
if (this.connect_callback) {
try {
this.connect_callback(status, condition);
} catch (e) {
Strophe.error("User connection callback caused an " + "exception: " + e);
}
}
},
_doDisconnect: function _doDisconnect(condition) {
if (typeof this._idleTimeout == "number") {
clearTimeout(this._idleTimeout);
}
if (this._disconnectTimeout !== null) {
this.deleteTimedHandler(this._disconnectTimeout);
this._disconnectTimeout = null;
}
Strophe.info("_doDisconnect was called");
this._proto._doDisconnect();
this.authenticated = false;
this.disconnecting = false;
this.restored = false;
this.handlers = [];
this.timedHandlers = [];
this.removeTimeds = [];
this.removeHandlers = [];
this.addTimeds = [];
this.addHandlers = [];
this._changeConnectStatus(Strophe.Status.DISCONNECTED, condition);
this.connected = false;
},
_dataRecv: function _dataRecv(req, raw) {
Strophe.info("_dataRecv called");
var elem = this._proto._reqToData(req);
if (elem === null) {
return;
}
if (this.xmlInput !== Strophe.Connection.prototype.xmlInput) {
if (elem.nodeName === this._proto.strip && elem.childNodes.length) {
this.xmlInput(elem.childNodes[0]);
} else {
this.xmlInput(elem);
}
}
if (this.rawInput !== Strophe.Connection.prototype.rawInput) {
if (raw) {
this.rawInput(raw);
} else {
this.rawInput(Strophe.serialize(elem));
}
}
var i, hand;
while (this.removeHandlers.length > 0) {
hand = this.removeHandlers.pop();
i = this.handlers.indexOf(hand);
if (i >= 0) {
this.handlers.splice(i, 1);
}
}
while (this.addHandlers.length > 0) {
this.handlers.push(this.addHandlers.pop());
}
if (this.disconnecting && this._proto._emptyQueue()) {
this._doDisconnect();
return;
}
var type = elem.getAttribute("type");
var cond, conflict;
if (type !== null && type == "terminate") {
if (this.disconnecting) {
return;
}
cond = elem.getAttribute("condition");
conflict = elem.getElementsByTagName("conflict");
if (cond !== null) {
if (cond == "remote-stream-error" && conflict.length > 0) {
cond = "conflict";
}
this._changeConnectStatus(Strophe.Status.CONNFAIL, cond);
} else {
this._changeConnectStatus(Strophe.Status.CONNFAIL, "unknown");
}
this._doDisconnect(cond);
return;
}
var that = this;
Strophe.forEachChild(elem, null, function (child) {
var i, newList;
newList = that.handlers;
that.handlers = [];
for (i = 0; i < newList.length; i++) {
var hand = newList[i];
try {
if (hand.isMatch(child) && (that.authenticated || !hand.user)) {
if (hand.run(child)) {
that.handlers.push(hand);
}
} else {
that.handlers.push(hand);
}
} catch (e) {
Strophe.warn('Removing Strophe handlers due to uncaught exception: ' + e.message);
}
}
});
},
mechanisms: {},
_connect_cb: function _connect_cb(req, _callback, raw) {
Strophe.info("_connect_cb was called");
this.connected = true;
var bodyWrap;
try {
bodyWrap = this._proto._reqToData(req);
} catch (e) {
if (e != "badformat") {
throw e;
}
this._changeConnectStatus(Strophe.Status.CONNFAIL, 'bad-format');
this._doDisconnect('bad-format');
}
if (!bodyWrap) {
return;
}
if (this.xmlInput !== Strophe.Connection.prototype.xmlInput) {
if (bodyWrap.nodeName === this._proto.strip && bodyWrap.childNodes.length) {
this.xmlInput(bodyWrap.childNodes[0]);
} else {
this.xmlInput(bodyWrap);
}
}
if (this.rawInput !== Strophe.Connection.prototype.rawInput) {
if (raw) {
this.rawInput(raw);
} else {
this.rawInput(Strophe.serialize(bodyWrap));
}
}
var conncheck = this._proto._connect_cb(bodyWrap);
if (conncheck === Strophe.Status.CONNFAIL) {
return;
}
this._authentication.sasl_scram_sha1 = false;
this._authentication.sasl_plain = false;
this._authentication.sasl_digest_md5 = false;
this._authentication.sasl_anonymous = false;
this._authentication.legacy_auth = false;
var hasFeatures;
if (bodyWrap.getElementsByTagNameNS) {
hasFeatures = bodyWrap.getElementsByTagNameNS(Strophe.NS.STREAM, "features").length > 0;
} else {
hasFeatures = bodyWrap.getElementsByTagName("stream:features").length > 0 || bodyWrap.getElementsByTagName("features").length > 0;
}
var mechanisms = bodyWrap.getElementsByTagName("mechanism");
var matched = [];
var i,
mech,
found_authentication = false;
if (!hasFeatures) {
this._proto._no_auth_received(_callback);
return;
}
if (mechanisms.length > 0) {
for (i = 0; i < mechanisms.length; i++) {
mech = Strophe.getText(mechanisms[i]);
if (this.mechanisms[mech]) matched.push(this.mechanisms[mech]);
}
}
this._authentication.legacy_auth = bodyWrap.getElementsByTagName("auth").length > 0;
found_authentication = this._authentication.legacy_auth || matched.length > 0;
if (!found_authentication) {
this._proto._no_auth_received(_callback);
return;
}
if (this.do_authentication !== false) this.authenticate(matched);
},
authenticate: function authenticate(matched) {
var i;
for (i = 0; i < matched.length - 1; ++i) {
var higher = i;
for (var j = i + 1; j < matched.length; ++j) {
if (matched[j].prototype.priority > matched[higher].prototype.priority) {
higher = j;
}
}
if (higher != i) {
var swap = matched[i];
matched[i] = matched[higher];
matched[higher] = swap;
}
}
var mechanism_found = false;
for (i = 0; i < matched.length; ++i) {
if (!matched[i].test(this)) continue;
this._sasl_success_handler = this._addSysHandler(this._sasl_success_cb.bind(this), null, "success", null, null);
this._sasl_failure_handler = this._addSysHandler(this._sasl_failure_cb.bind(this), null, "failure", null, null);
this._sasl_challenge_handler = this._addSysHandler(this._sasl_challenge_cb.bind(this), null, "challenge", null, null);
this._sasl_mechanism = new matched[i]();
this._sasl_mechanism.onStart(this);
var request_auth_exchange = $build("auth", {
xmlns: Strophe.NS.SASL,
mechanism: this._sasl_mechanism.name
});
if (this._sasl_mechanism.isClientFirst) {
var response = this._sasl_mechanism.onChallenge(this, null);
request_auth_exchange.t(Base64.encode(response));
}
this.send(request_auth_exchange.tree());
mechanism_found = true;
break;
}
if (!mechanism_found) {
if (Strophe.getNodeFromJid(this.jid) === null) {
this._changeConnectStatus(Strophe.Status.CONNFAIL, 'x-strophe-bad-non-anon-jid');
this.disconnect('x-strophe-bad-non-anon-jid');
} else {
this._changeConnectStatus(Strophe.Status.AUTHENTICATING, null);
this._addSysHandler(this._auth1_cb.bind(this), null, null, null, "_auth_1");
this.send($iq({
type: "get",
to: this.domain,
id: "_auth_1"
}).c("query", {
xmlns: Strophe.NS.AUTH
}).c("username", {}).t(Strophe.getNodeFromJid(this.jid)).tree());
}
}
},
_sasl_challenge_cb: function _sasl_challenge_cb(elem) {
var challenge = Base64.decode(Strophe.getText(elem));
var response = this._sasl_mechanism.onChallenge(this, challenge);
var stanza = $build('response', {
xmlns: Strophe.NS.SASL
});
if (response !== "") {
stanza.t(Base64.encode(response));
}
this.send(stanza.tree());
return true;
},
_auth1_cb: function _auth1_cb(elem) {
var iq = $iq({ type: "set", id: "_auth_2" }).c('query', { xmlns: Strophe.NS.AUTH }).c('username', {}).t(Strophe.getNodeFromJid(this.jid)).up().c('password').t(this.pass);
if (!Strophe.getResourceFromJid(this.jid)) {
this.jid = Strophe.getBareJidFromJid(this.jid) + '/strophe';
}
iq.up().c('resource', {}).t(Strophe.getResourceFromJid(this.jid));
this._addSysHandler(this._auth2_cb.bind(this), null, null, null, "_auth_2");
this.send(iq.tree());
return false;
},
_sasl_success_cb: function _sasl_success_cb(elem) {
if (this._sasl_data["server-signature"]) {
var serverSignature;
var success = Base64.decode(Strophe.getText(elem));
var attribMatch = /([a-z]+)=([^,]+)(,|$)/;
var matches = success.match(attribMatch);
if (matches[1] == "v") {
serverSignature = matches[2];
}
if (serverSignature != this._sasl_data["server-signature"]) {
this.deleteHandler(this._sasl_failure_handler);
this._sasl_failure_handler = null;
if (this._sasl_challenge_handler) {
this.deleteHandler(this._sasl_challenge_handler);
this._sasl_challenge_handler = null;
}
this._sasl_data = {};
return this._sasl_failure_cb(null);
}
}
Strophe.info("SASL authentication succeeded.");
if (this._sasl_mechanism) this._sasl_mechanism.onSuccess();
this.deleteHandler(this._sasl_failure_handler);
this._sasl_failure_handler = null;
if (this._sasl_challenge_handler) {
this.deleteHandler(this._sasl_challenge_handler);
this._sasl_challenge_handler = null;
}
var streamfeature_handlers = [];
var wrapper = function wrapper(handlers, elem) {
while (handlers.length) {
this.deleteHandler(handlers.pop());
}
this._sasl_auth1_cb.bind(this)(elem);
return false;
};
streamfeature_handlers.push(this._addSysHandler(function (elem) {
wrapper.bind(this)(streamfeature_handlers, elem);
}.bind(this), null, "stream:features", null, null));
streamfeature_handlers.push(this._addSysHandler(function (elem) {
wrapper.bind(this)(streamfeature_handlers, elem);
}.bind(this), Strophe.NS.STREAM, "features", null, null));
this._sendRestart();
return false;
},
_sasl_auth1_cb: function _sasl_auth1_cb(elem) {
this.features = elem;
var i, child;
for (i = 0; i < elem.childNodes.length; i++) {
child = elem.childNodes[i];
if (child.nodeName == 'bind') {
this.do_bind = true;
}
if (child.nodeName == 'session') {
this.do_session = true;
}
}
if (!this.do_bind) {
this._changeConnectStatus(Strophe.Status.AUTHFAIL, null);
return false;
} else {
this._addSysHandler(this._sasl_bind_cb.bind(this), null, null, null, "_bind_auth_2");
var resource = Strophe.getResourceFromJid(this.jid);
if (resource) {
this.send($iq({ type: "set", id: "_bind_auth_2" }).c('bind', { xmlns: Strophe.NS.BIND }).c('resource', {}).t(resource).tree());
} else {
this.send($iq({ type: "set", id: "_bind_auth_2" }).c('bind', { xmlns: Strophe.NS.BIND }).tree());
}
}
return false;
},
_sasl_bind_cb: function _sasl_bind_cb(elem) {
if (elem.getAttribute("type") == "error") {
Strophe.info("SASL binding failed.");
var conflict = elem.getElementsByTagName("conflict"),
condition;
if (conflict.length > 0) {
condition = 'conflict';
}
this._changeConnectStatus(Strophe.Status.AUTHFAIL, condition);
return false;
}
var bind = elem.getElementsByTagName("bind");
var jidNode;
if (bind.length > 0) {
jidNode = bind[0].getElementsByTagName("jid");
if (jidNode.length > 0) {
this.jid = Strophe.getText(jidNode[0]);
if (this.do_session) {
this._addSysHandler(this._sasl_session_cb.bind(this), null, null, null, "_session_auth_2");
this.send($iq({ type: "set", id: "_session_auth_2" }).c('session', { xmlns: Strophe.NS.SESSION }).tree());
} else {
this.authenticated = true;
this._changeConnectStatus(Strophe.Status.CONNECTED, null);
}
}
} else {
Strophe.info("SASL binding failed.");
this._changeConnectStatus(Strophe.Status.AUTHFAIL, null);
return false;
}
},
_sasl_session_cb: function _sasl_session_cb(elem) {
if (elem.getAttribute("type") == "result") {
this.authenticated = true;
this._changeConnectStatus(Strophe.Status.CONNECTED, null);
} else if (elem.getAttribute("type") == "error") {
Strophe.info("Session creation failed.");
this._changeConnectStatus(Strophe.Status.AUTHFAIL, null);
return false;
}
return false;
},
_sasl_failure_cb: function _sasl_failure_cb(elem) {
if (this._sasl_success_handler) {
this.deleteHandler(this._sasl_success_handler);
this._sasl_success_handler = null;
}
if (this._sasl_challenge_handler) {
this.deleteHandler(this._sasl_challenge_handler);
this._sasl_challenge_handler = null;
}
if (this._sasl_mechanism) this._sasl_mechanism.onFailure();
this._changeConnectStatus(Strophe.Status.AUTHFAIL, null);
return false;
},
_auth2_cb: function _auth2_cb(elem) {
if (elem.getAttribute("type") == "result") {
this.authenticated = true;
this._changeConnectStatus(Strophe.Status.CONNECTED, null);
} else if (elem.getAttribute("type") == "error") {
this._changeConnectStatus(Strophe.Status.AUTHFAIL, null);
this.disconnect('authentication failed');
}
return false;
},
_addSysTimedHandler: function _addSysTimedHandler(period, handler) {
var thand = new Strophe.TimedHandler(period, handler);
thand.user = false;
this.addTimeds.push(thand);
return thand;
},
_addSysHandler: function _addSysHandler(handler, ns, name, type, id) {
var hand = new Strophe.Handler(handler, ns, name, type, id);
hand.user = false;
this.addHandlers.push(hand);
return hand;
},
_onDisconnectTimeout: function _onDisconnectTimeout() {
Strophe.info("_onDisconnectTimeout was called");
this._proto._onDisconnectTimeout();
this._doDisconnect();
return false;
},
_onIdle: function _onIdle() {
var i, thand, since, newList;
while (this.addTimeds.length > 0) {
this.timedHandlers.push(this.addTimeds.pop());
}
while (this.removeTimeds.length > 0) {
thand = this.removeTimeds.pop();
i = this.timedHandlers.indexOf(thand);
if (i >= 0) {
this.timedHandlers.splice(i, 1);
}
}
var now = new Date().getTime();
newList = [];
for (i = 0; i < this.timedHandlers.length; i++) {
thand = this.timedHandlers[i];
if (this.authenticated || !thand.user) {
since = thand.lastCalled + thand.period;
if (since - now <= 0) {
if (thand.run()) {
newList.push(thand);
}
} else {
newList.push(thand);
}
}
}
this.timedHandlers = newList;
clearTimeout(this._idleTimeout);
this._proto._onIdle();
if (this.connected) {
this._idleTimeout = setTimeout(this._onIdle.bind(this), 100);
}
}
};
Strophe.SASLMechanism = function (name, isClientFirst, priority) {
this.name = name;
this.isClientFirst = isClientFirst;
this.priority = priority;
};
Strophe.SASLMechanism.prototype = {
test: function test(connection) {
return true;
},
onStart: function onStart(connection) {
this._connection = connection;
},
onChallenge: function onChallenge(connection, challenge) {
throw new Error("You should implement challenge handling!");
},
onFailure: function onFailure() {
this._connection = null;
},
onSuccess: function onSuccess() {
this._connection = null;
}
};
Strophe.SASLAnonymous = function () {};
Strophe.SASLAnonymous.prototype = new Strophe.SASLMechanism("ANONYMOUS", false, 10);
Strophe.SASLAnonymous.test = function (connection) {
return connection.authcid === null;
};
Strophe.Connection.prototype.mechanisms[Strophe.SASLAnonymous.prototype.name] = Strophe.SASLAnonymous;
Strophe.SASLPlain = function () {};
Strophe.SASLPlain.prototype = new Strophe.SASLMechanism("PLAIN", true, 20);
Strophe.SASLPlain.test = function (connection) {
return connection.authcid !== null;
};
Strophe.SASLPlain.prototype.onChallenge = function (connection) {
var auth_str = connection.authzid;
auth_str = auth_str + '\0';
auth_str = auth_str + connection.authcid;
auth_str = auth_str + '\0';
auth_str = auth_str + connection.pass;
return utils.utf16to8(auth_str);
};
Strophe.Connection.prototype.mechanisms[Strophe.SASLPlain.prototype.name] = Strophe.SASLPlain;
Strophe.SASLSHA1 = function () {};
Strophe.SASLSHA1.prototype = new Strophe.SASLMechanism("SCRAM-SHA-1", true, 40);
Strophe.SASLSHA1.test = function (connection) {
return connection.authcid !== null;
};
Strophe.SASLSHA1.prototype.onChallenge = function (connection, challenge, test_cnonce) {
var cnonce = test_cnonce || MD5.hexdigest(Math.random() * 1234567890);
var auth_str = "n=" + utils.utf16to8(connection.authcid);
auth_str += ",r=";
auth_str += cnonce;
connection._sasl_data.cnonce = cnonce;
connection._sasl_data["client-first-message-bare"] = auth_str;
auth_str = "n,," + auth_str;
this.onChallenge = function (connection, challenge) {
var nonce, salt, iter, Hi, U, U_old, i, k, pass;
var clientKey, serverKey, clientSignature;
var responseText = "c=biws,";
var authMessage = connection._sasl_data["client-first-message-bare"] + "," + challenge + ",";
var cnonce = connection._sasl_data.cnonce;
var attribMatch = /([a-z]+)=([^,]+)(,|$)/;
while (challenge.match(attribMatch)) {
var matches = challenge.match(attribMatch);
challenge = challenge.replace(matches[0], "");
switch (matches[1]) {
case "r":
nonce = matches[2];
break;
case "s":
salt = matches[2];
break;
case "i":
iter = matches[2];
break;
}
}
if (nonce.substr(0, cnonce.length) !== cnonce) {
connection._sasl_data = {};
return connection._sasl_failure_cb();
}
responseText += "r=" + nonce;
authMessage += responseText;
salt = Base64.decode(salt);
salt += "\x00\x00\x00\x01";
pass = utils.utf16to8(connection.pass);
Hi = U_old = SHA1.core_hmac_sha1(pass, salt);
for (i = 1; i < iter; i++) {
U = SHA1.core_hmac_sha1(pass, SHA1.binb2str(U_old));
for (k = 0; k < 5; k++) {
Hi[k] ^= U[k];
}
U_old = U;
}
Hi = SHA1.binb2str(Hi);
clientKey = SHA1.core_hmac_sha1(Hi, "Client Key");
serverKey = SHA1.str_hmac_sha1(Hi, "Server Key");
clientSignature = SHA1.core_hmac_sha1(SHA1.str_sha1(SHA1.binb2str(clientKey)), authMessage);
connection._sasl_data["server-signature"] = SHA1.b64_hmac_sha1(serverKey, authMessage);
for (k = 0; k < 5; k++) {
clientKey[k] ^= clientSignature[k];
}
responseText += ",p=" + Base64.encode(SHA1.binb2str(clientKey));
return responseText;
}.bind(this);
return auth_str;
};
Strophe.Connection.prototype.mechanisms[Strophe.SASLSHA1.prototype.name] = Strophe.SASLSHA1;
Strophe.SASLMD5 = function () {};
Strophe.SASLMD5.prototype = new Strophe.SASLMechanism("DIGEST-MD5", false, 30);
Strophe.SASLMD5.test = function (connection) {
return connection.authcid !== null;
};
Strophe.SASLMD5.prototype._quote = function (str) {
return '"' + str.replace(/\\/g, "\\\\").replace(/"/g, '\\"') + '"';
};
Strophe.SASLMD5.prototype.onChallenge = function (connection, challenge, test_cnonce) {
var attribMatch = /([a-z]+)=("[^"]+"|[^,"]+)(?:,|$)/;
var cnonce = test_cnonce || MD5.hexdigest("" + Math.random() * 1234567890);
var realm = "";
var host = null;
var nonce = "";
var qop = "";
var matches;
while (challenge.match(attribMatch)) {
matches = challenge.match(attribMatch);
challenge = challenge.replace(matches[0], "");
matches[2] = matches[2].replace(/^"(.+)"$/, "$1");
switch (matches[1]) {
case "realm":
realm = matches[2];
break;
case "nonce":
nonce = matches[2];
break;
case "qop":
qop = matches[2];
break;
case "host":
host = matches[2];
break;
}
}
var digest_uri = connection.servtype + "/" + connection.domain;
if (host !== null) {
digest_uri = digest_uri + "/" + host;
}
var cred = utils.utf16to8(connection.authcid + ":" + realm + ":" + this._connection.pass);
var A1 = MD5.hash(cred) + ":" + nonce + ":" + cnonce;
var A2 = 'AUTHENTICATE:' + digest_uri;
var responseText = "";
responseText += 'charset=utf-8,';
responseText += 'username=' + this._quote(utils.utf16to8(connection.authcid)) + ',';
responseText += 'realm=' + this._quote(realm) + ',';
responseText += 'nonce=' + this._quote(nonce) + ',';
responseText += 'nc=00000001,';
responseText += 'cnonce=' + this._quote(cnonce) + ',';
responseText += 'digest-uri=' + this._quote(digest_uri) + ',';
responseText += 'response=' + MD5.hexdigest(MD5.hexdigest(A1) + ":" + nonce + ":00000001:" + cnonce + ":auth:" + MD5.hexdigest(A2)) + ",";
responseText += 'qop=auth';
this.onChallenge = function () {
return "";
}.bind(this);
return responseText;
};
Strophe.Connection.prototype.mechanisms[Strophe.SASLMD5.prototype.name] = Strophe.SASLMD5;
return {
Strophe: Strophe,
$build: $build,
$msg: $msg,
$iq: $iq,
$pres: $pres,
SHA1: SHA1,
Base64: Base64,
MD5: MD5
};
});
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
define('strophe-bosh', ['strophe-core'], function (core) {
return factory(core.Strophe, core.$build);
});
} else {
return factory(Strophe, $build);
}
})(this, function (Strophe, $build) {
Strophe.Request = function (elem, func, rid, sends) {
this.id = ++Strophe._requestId;
this.xmlData = elem;
this.data = Strophe.serialize(elem);
this.origFunc = func;
this.func = func;
this.rid = rid;
this.date = NaN;
this.sends = sends || 0;
this.abort = false;
this.dead = null;
this.age = function () {
if (!this.date) {
return 0;
}
var now = new Date();
return (now - this.date) / 1000;
};
this.timeDead = function () {
if (!this.dead) {
return 0;
}
var now = new Date();
return (now - this.dead) / 1000;
};
this.xhr = this._newXHR();
};
Strophe.Request.prototype = {
getResponse: function getResponse() {
var node = null;
if (this.xhr.responseXML && this.xhr.responseXML.documentElement) {
node = this.xhr.responseXML.documentElement;
if (node.tagName == "parsererror") {
Strophe.error("invalid response received");
Strophe.error("responseText: " + this.xhr.responseText);
Strophe.error("responseXML: " + Strophe.serialize(this.xhr.responseXML));
throw "parsererror";
}
} else if (this.xhr.responseText) {
Strophe.error("invalid response received");
Strophe.error("responseText: " + this.xhr.responseText);
throw "badformat";
}
return node;
},
_newXHR: function _newXHR() {
var xhr = null;
if (window.XMLHttpRequest) {
xhr = new XMLHttpRequest();
if (xhr.overrideMimeType) {
xhr.overrideMimeType("text/xml; charset=utf-8");
}
} else if (window.ActiveXObject) {
xhr = new ActiveXObject("Microsoft.XMLHTTP");
}
xhr.onreadystatechange = this.func.bind(null, this);
return xhr;
}
};
Strophe.Bosh = function (connection) {
this._conn = connection;
this.rid = Math.floor(Math.random() * 4294967295);
this.sid = null;
this.hold = 1;
this.wait = 60;
this.window = 5;
this.errors = 0;
this._requests = [];
};
Strophe.Bosh.prototype = {
strip: null,
_buildBody: function _buildBody() {
var bodyWrap = $build('body', {
rid: this.rid++,
xmlns: Strophe.NS.HTTPBIND
});
if (this.sid !== null) {
bodyWrap.attrs({ sid: this.sid });
}
if (this._conn.options.keepalive) {
this._cacheSession();
}
return bodyWrap;
},
_reset: function _reset() {
this.rid = Math.floor(Math.random() * 4294967295);
this.sid = null;
this.errors = 0;
window.sessionStorage.removeItem('strophe-bosh-session');
this._conn.nextValidRid(this.rid);
},
_connect: function _connect(wait, hold, route) {
this.wait = wait || this.wait;
this.hold = hold || this.hold;
this.errors = 0;
var body = this._buildBody().attrs({
to: this._conn.domain,
"xml:lang": "en",
wait: this.wait,
hold: this.hold,
content: "text/xml; charset=utf-8",
ver: "1.6",
"xmpp:version": "1.0",
"xmlns:xmpp": Strophe.NS.BOSH
});
if (route) {
body.attrs({
route: route
});
}
var _connect_cb = this._conn._connect_cb;
this._requests.push(new Strophe.Request(body.tree(), this._onRequestStateChange.bind(this, _connect_cb.bind(this._conn)), body.tree().getAttribute("rid")));
this._throttledRequestHandler();
},
_attach: function _attach(jid, sid, rid, callback, wait, hold, wind) {
this._conn.jid = jid;
this.sid = sid;
this.rid = rid;
this._conn.connect_callback = callback;
this._conn.domain = Strophe.getDomainFromJid(this._conn.jid);
this._conn.authenticated = true;
this._conn.connected = true;
this.wait = wait || this.wait;
this.hold = hold || this.hold;
this.window = wind || this.window;
this._conn._changeConnectStatus(Strophe.Status.ATTACHED, null);
},
_restore: function _restore(jid, callback, wait, hold, wind) {
var session = JSON.parse(window.sessionStorage.getItem('strophe-bosh-session'));
if (typeof session !== "undefined" && session !== null && session.rid && session.sid && session.jid && (typeof jid === "undefined" || jid === "null" || Strophe.getBareJidFromJid(session.jid) == Strophe.getBareJidFromJid(jid))) {
this._conn.restored = true;
this._attach(session.jid, session.sid, session.rid, callback, wait, hold, wind);
} else {
throw { name: "StropheSessionError", message: "_restore: no restoreable session." };
}
},
_cacheSession: function _cacheSession() {
if (this._conn.authenticated) {
if (this._conn.jid && this.rid && this.sid) {
window.sessionStorage.setItem('strophe-bosh-session', JSON.stringify({
'jid': this._conn.jid,
'rid': this.rid,
'sid': this.sid
}));
}
} else {
window.sessionStorage.removeItem('strophe-bosh-session');
}
},
_connect_cb: function _connect_cb(bodyWrap) {
var typ = bodyWrap.getAttribute("type");
var cond, conflict;
if (typ !== null && typ == "terminate") {
cond = bodyWrap.getAttribute("condition");
Strophe.error("BOSH-Connection failed: " + cond);
conflict = bodyWrap.getElementsByTagName("conflict");
if (cond !== null) {
if (cond == "remote-stream-error" && conflict.length > 0) {
cond = "conflict";
}
this._conn._changeConnectStatus(Strophe.Status.CONNFAIL, cond);
} else {
this._conn._changeConnectStatus(Strophe.Status.CONNFAIL, "unknown");
}
this._conn._doDisconnect(cond);
return Strophe.Status.CONNFAIL;
}
if (!this.sid) {
this.sid = bodyWrap.getAttribute("sid");
}
var wind = bodyWrap.getAttribute('requests');
if (wind) {
this.window = parseInt(wind, 10);
}
var hold = bodyWrap.getAttribute('hold');
if (hold) {
this.hold = parseInt(hold, 10);
}
var wait = bodyWrap.getAttribute('wait');
if (wait) {
this.wait = parseInt(wait, 10);
}
},
_disconnect: function _disconnect(pres) {
this._sendTerminate(pres);
},
_doDisconnect: function _doDisconnect() {
this.sid = null;
this.rid = Math.floor(Math.random() * 4294967295);
window.sessionStorage.removeItem('strophe-bosh-session');
this._conn.nextValidRid(this.rid);
},
_emptyQueue: function _emptyQueue() {
return this._requests.length === 0;
},
_hitError: function _hitError(reqStatus) {
this.errors++;
Strophe.warn("request errored, status: " + reqStatus + ", number of errors: " + this.errors);
if (this.errors > 4) {
this._conn._onDisconnectTimeout();
}
},
_no_auth_received: function _no_auth_received(_callback) {
if (_callback) {
_callback = _callback.bind(this._conn);
} else {
_callback = this._conn._connect_cb.bind(this._conn);
}
var body = this._buildBody();
this._requests.push(new Strophe.Request(body.tree(), this._onRequestStateChange.bind(this, _callback.bind(this._conn)), body.tree().getAttribute("rid")));
this._throttledRequestHandler();
},
_onDisconnectTimeout: function _onDisconnectTimeout() {
this._abortAllRequests();
},
_abortAllRequests: function _abortAllRequests() {
var req;
while (this._requests.length > 0) {
req = this._requests.pop();
req.abort = true;
req.xhr.abort();
req.xhr.onreadystatechange = function () {};
}
},
_onIdle: function _onIdle() {
var data = this._conn._data;
if (this._conn.authenticated && this._requests.length === 0 && data.length === 0 && !this._conn.disconnecting) {
Strophe.info("no requests during idle cycle, sending " + "blank request");
data.push(null);
}
if (this._conn.paused) {
return;
}
if (this._requests.length < 2 && data.length > 0) {
var body = this._buildBody();
for (var i = 0; i < data.length; i++) {
if (data[i] !== null) {
if (data[i] === "restart") {
body.attrs({
to: this._conn.domain,
"xml:lang": "en",
"xmpp:restart": "true",
"xmlns:xmpp": Strophe.NS.BOSH
});
} else {
body.cnode(data[i]).up();
}
}
}
delete this._conn._data;
this._conn._data = [];
this._requests.push(new Strophe.Request(body.tree(), this._onRequestStateChange.bind(this, this._conn._dataRecv.bind(this._conn)), body.tree().getAttribute("rid")));
this._throttledRequestHandler();
}
if (this._requests.length > 0) {
var time_elapsed = this._requests[0].age();
if (this._requests[0].dead !== null) {
if (this._requests[0].timeDead() > Math.floor(Strophe.SECONDARY_TIMEOUT * this.wait)) {
this._throttledRequestHandler();
}
}
if (time_elapsed > Math.floor(Strophe.TIMEOUT * this.wait)) {
Strophe.warn("Request " + this._requests[0].id + " timed out, over " + Math.floor(Strophe.TIMEOUT * this.wait) + " seconds since last activity");
this._throttledRequestHandler();
}
}
},
_onRequestStateChange: function _onRequestStateChange(func, req) {
Strophe.debug("request id " + req.id + "." + req.sends + " state changed to " + req.xhr.readyState);
if (req.abort) {
req.abort = false;
return;
}
var reqStatus;
if (req.xhr.readyState == 4) {
reqStatus = 0;
try {
reqStatus = req.xhr.status;
} catch (e) {}
if (typeof reqStatus == "undefined") {
reqStatus = 0;
}
if (this.disconnecting) {
if (reqStatus >= 400) {
this._hitError(reqStatus);
return;
}
}
var reqIs0 = this._requests[0] == req;
var reqIs1 = this._requests[1] == req;
if (reqStatus > 0 && reqStatus < 500 || req.sends > 5) {
this._removeRequest(req);
Strophe.debug("request id " + req.id + " should now be removed");
}
if (reqStatus == 200) {
if (reqIs1 || reqIs0 && this._requests.length > 0 && this._requests[0].age() > Math.floor(Strophe.SECONDARY_TIMEOUT * this.wait)) {
this._restartRequest(0);
}
this._conn.nextValidRid(Number(req.rid) + 1);
Strophe.debug("request id " + req.id + "." + req.sends + " got 200");
func(req);
this.errors = 0;
} else {
Strophe.error("request id " + req.id + "." + req.sends + " error " + reqStatus + " happened");
if (reqStatus === 0 || reqStatus >= 400 && reqStatus < 600 || reqStatus >= 12000) {
this._hitError(reqStatus);
if (reqStatus >= 400 && reqStatus < 500) {
this._conn._changeConnectStatus(Strophe.Status.DISCONNECTING, null);
this._conn._doDisconnect();
}
}
}
if (!(reqStatus > 0 && reqStatus < 500 || req.sends > 5)) {
this._throttledRequestHandler();
}
}
},
_processRequest: function _processRequest(i) {
var self = this;
var req = this._requests[i];
var reqStatus = -1;
try {
if (req.xhr.readyState == 4) {
reqStatus = req.xhr.status;
}
} catch (e) {
Strophe.error("caught an error in _requests[" + i + "], reqStatus: " + reqStatus);
}
if (typeof reqStatus == "undefined") {
reqStatus = -1;
}
if (req.sends > this._conn.maxRetries) {
this._conn._onDisconnectTimeout();
return;
}
var time_elapsed = req.age();
var primaryTimeout = !isNaN(time_elapsed) && time_elapsed > Math.floor(Strophe.TIMEOUT * this.wait);
var secondaryTimeout = req.dead !== null && req.timeDead() > Math.floor(Strophe.SECONDARY_TIMEOUT * this.wait);
var requestCompletedWithServerError = req.xhr.readyState == 4 && (reqStatus < 1 || reqStatus >= 500);
if (primaryTimeout || secondaryTimeout || requestCompletedWithServerError) {
if (secondaryTimeout) {
Strophe.error("Request " + this._requests[i].id + " timed out (secondary), restarting");
}
req.abort = true;
req.xhr.abort();
req.xhr.onreadystatechange = function () {};
this._requests[i] = new Strophe.Request(req.xmlData, req.origFunc, req.rid, req.sends);
req = this._requests[i];
}
if (req.xhr.readyState === 0) {
Strophe.debug("request id " + req.id + "." + req.sends + " posting");
try {
req.xhr.open("POST", this._conn.service, this._conn.options.sync ? false : true);
req.xhr.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
} catch (e2) {
Strophe.error("XHR open failed.");
if (!this._conn.connected) {
this._conn._changeConnectStatus(Strophe.Status.CONNFAIL, "bad-service");
}
this._conn.disconnect();
return;
}
var sendFunc = function sendFunc() {
req.date = new Date();
if (self._conn.options.customHeaders) {
var headers = self._conn.options.customHeaders;
for (var header in headers) {
if (headers.hasOwnProperty(header)) {
req.xhr.setRequestHeader(header, headers[header]);
}
}
}
req.xhr.send(req.data);
};
if (req.sends > 1) {
var backoff = Math.min(Math.floor(Strophe.TIMEOUT * this.wait), Math.pow(req.sends, 3)) * 1000;
setTimeout(sendFunc, backoff);
} else {
sendFunc();
}
req.sends++;
if (this._conn.xmlOutput !== Strophe.Connection.prototype.xmlOutput) {
if (req.xmlData.nodeName === this.strip && req.xmlData.childNodes.length) {
this._conn.xmlOutput(req.xmlData.childNodes[0]);
} else {
this._conn.xmlOutput(req.xmlData);
}
}
if (this._conn.rawOutput !== Strophe.Connection.prototype.rawOutput) {
this._conn.rawOutput(req.data);
}
} else {
Strophe.debug("_processRequest: " + (i === 0 ? "first" : "second") + " request has readyState of " + req.xhr.readyState);
}
},
_removeRequest: function _removeRequest(req) {
Strophe.debug("removing request");
var i;
for (i = this._requests.length - 1; i >= 0; i--) {
if (req == this._requests[i]) {
this._requests.splice(i, 1);
}
}
req.xhr.onreadystatechange = function () {};
this._throttledRequestHandler();
},
_restartRequest: function _restartRequest(i) {
var req = this._requests[i];
if (req.dead === null) {
req.dead = new Date();
}
this._processRequest(i);
},
_reqToData: function _reqToData(req) {
try {
return req.getResponse();
} catch (e) {
if (e != "parsererror") {
throw e;
}
this._conn.disconnect("strophe-parsererror");
}
},
_sendTerminate: function _sendTerminate(pres) {
Strophe.info("_sendTerminate was called");
var body = this._buildBody().attrs({ type: "terminate" });
if (pres) {
body.cnode(pres.tree());
}
var req = new Strophe.Request(body.tree(), this._onRequestStateChange.bind(this, this._conn._dataRecv.bind(this._conn)), body.tree().getAttribute("rid"));
this._requests.push(req);
this._throttledRequestHandler();
},
_send: function _send() {
clearTimeout(this._conn._idleTimeout);
this._throttledRequestHandler();
this._conn._idleTimeout = setTimeout(this._conn._onIdle.bind(this._conn), 100);
},
_sendRestart: function _sendRestart() {
this._throttledRequestHandler();
clearTimeout(this._conn._idleTimeout);
},
_throttledRequestHandler: function _throttledRequestHandler() {
if (!this._requests) {
Strophe.debug("_throttledRequestHandler called with " + "undefined requests");
} else {
Strophe.debug("_throttledRequestHandler called with " + this._requests.length + " requests");
}
if (!this._requests || this._requests.length === 0) {
return;
}
if (this._requests.length > 0) {
this._processRequest(0);
}
if (this._requests.length > 1 && Math.abs(this._requests[0].rid - this._requests[1].rid) < this.window) {
this._processRequest(1);
}
}
};
return Strophe;
});
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
define('strophe-websocket', ['strophe-core'], function (core) {
return factory(core.Strophe, core.$build);
});
} else {
return factory(Strophe, $build);
}
})(this, function (Strophe, $build) {
Strophe.Websocket = function (connection) {
this._conn = connection;
this.strip = "wrapper";
var service = connection.service;
if (service.indexOf("ws:") !== 0 && service.indexOf("wss:") !== 0) {
var new_service = "";
if (connection.options.protocol === "ws" && window.location.protocol !== "https:") {
new_service += "ws";
} else {
new_service += "wss";
}
new_service += "://" + window.location.host;
if (service.indexOf("/") !== 0) {
new_service += window.location.pathname + service;
} else {
new_service += service;
}
connection.service = new_service;
}
};
Strophe.Websocket.prototype = {
_buildStream: function _buildStream() {
return $build("open", {
"xmlns": Strophe.NS.FRAMING,
"to": this._conn.domain,
"version": '1.0'
});
},
_check_streamerror: function _check_streamerror(bodyWrap, connectstatus) {
var errors;
if (bodyWrap.getElementsByTagNameNS) {
errors = bodyWrap.getElementsByTagNameNS(Strophe.NS.STREAM, "error");
} else {
errors = bodyWrap.getElementsByTagName("stream:error");
}
if (errors.length === 0) {
return false;
}
var error = errors[0];
var condition = "";
var text = "";
var ns = "urn:ietf:params:xml:ns:xmpp-streams";
for (var i = 0; i < error.childNodes.length; i++) {
var e = error.childNodes[i];
if (e.getAttribute("xmlns") !== ns) {
break;
}if (e.nodeName === "text") {
text = e.textContent;
} else {
condition = e.nodeName;
}
}
var errorString = "WebSocket stream error: ";
if (condition) {
errorString += condition;
} else {
errorString += "unknown";
}
if (text) {
errorString += " - " + condition;
}
Strophe.error(errorString);
this._conn._changeConnectStatus(connectstatus, condition);
this._conn._doDisconnect();
return true;
},
_reset: function _reset() {
return;
},
_connect: function _connect() {
this._closeSocket();
this.socket = new WebSocket(this._conn.service, "xmpp");
this.socket.onopen = this._onOpen.bind(this);
this.socket.onerror = this._onError.bind(this);
this.socket.onclose = this._onClose.bind(this);
this.socket.onmessage = this._connect_cb_wrapper.bind(this);
},
_connect_cb: function _connect_cb(bodyWrap) {
var error = this._check_streamerror(bodyWrap, Strophe.Status.CONNFAIL);
if (error) {
return Strophe.Status.CONNFAIL;
}
},
_handleStreamStart: function _handleStreamStart(message) {
var error = false;
var ns = message.getAttribute("xmlns");
if (typeof ns !== "string") {
error = "Missing xmlns in <open />";
} else if (ns !== Strophe.NS.FRAMING) {
error = "Wrong xmlns in <open />: " + ns;
}
var ver = message.getAttribute("version");
if (typeof ver !== "string") {
error = "Missing version in <open />";
} else if (ver !== "1.0") {
error = "Wrong version in <open />: " + ver;
}
if (error) {
this._conn._changeConnectStatus(Strophe.Status.CONNFAIL, error);
this._conn._doDisconnect();
return false;
}
return true;
},
_connect_cb_wrapper: function _connect_cb_wrapper(message) {
if (message.data.indexOf("<open ") === 0 || message.data.indexOf("<?xml") === 0) {
var data = message.data.replace(/^(<\?.*?\?>\s*)*/, "");
if (data === '') return;
var streamStart = new DOMParser().parseFromString(data, "text/xml").documentElement;
this._conn.xmlInput(streamStart);
this._conn.rawInput(message.data);
if (this._handleStreamStart(streamStart)) {
this._connect_cb(streamStart);
}
} else if (message.data.indexOf("<close ") === 0) {
this._conn.rawInput(message.data);
this._conn.xmlInput(message);
var see_uri = message.getAttribute("see-other-uri");
if (see_uri) {
this._conn._changeConnectStatus(Strophe.Status.REDIRECT, "Received see-other-uri, resetting connection");
this._conn.reset();
this._conn.service = see_uri;
this._connect();
} else {
this._conn._changeConnectStatus(Strophe.Status.CONNFAIL, "Received closing stream");
this._conn._doDisconnect();
}
} else {
var string = this._streamWrap(message.data);
var elem = new DOMParser().parseFromString(string, "text/xml").documentElement;
this.socket.onmessage = this._onMessage.bind(this);
this._conn._connect_cb(elem, null, message.data);
}
},
_disconnect: function _disconnect(pres) {
if (this.socket && this.socket.readyState !== WebSocket.CLOSED) {
if (pres) {
this._conn.send(pres);
}
var close = $build("close", { "xmlns": Strophe.NS.FRAMING });
this._conn.xmlOutput(close);
var closeString = Strophe.serialize(close);
this._conn.rawOutput(closeString);
try {
this.socket.send(closeString);
} catch (e) {
Strophe.info("Couldn't send <close /> tag.");
}
}
this._conn._doDisconnect();
},
_doDisconnect: function _doDisconnect() {
Strophe.info("WebSockets _doDisconnect was called");
this._closeSocket();
},
_streamWrap: function _streamWrap(stanza) {
return "<wrapper>" + stanza + '</wrapper>';
},
_closeSocket: function _closeSocket() {
if (this.socket) {
try {
this.socket.close();
} catch (e) {}
}
this.socket = null;
},
_emptyQueue: function _emptyQueue() {
return true;
},
_onClose: function _onClose() {
if (this._conn.connected && !this._conn.disconnecting) {
Strophe.error("Websocket closed unexcectedly");
this._conn._doDisconnect();
} else {
Strophe.info("Websocket closed");
}
},
_no_auth_received: function _no_auth_received(_callback) {
Strophe.error("Server did not send any auth methods");
this._conn._changeConnectStatus(Strophe.Status.CONNFAIL, "Server did not send any auth methods");
if (_callback) {
_callback = _callback.bind(this._conn);
_callback();
}
this._conn._doDisconnect();
},
_onDisconnectTimeout: function _onDisconnectTimeout() {},
_abortAllRequests: function _abortAllRequests() {},
_onError: function _onError(error) {
Strophe.error("Websocket error " + error);
this._conn._changeConnectStatus(Strophe.Status.CONNFAIL, "The WebSocket connection could not be established was disconnected.");
this._disconnect();
},
_onIdle: function _onIdle() {
var data = this._conn._data;
if (data.length > 0 && !this._conn.paused) {
for (var i = 0; i < data.length; i++) {
if (data[i] !== null) {
var stanza, rawStanza;
if (data[i] === "restart") {
stanza = this._buildStream().tree();
} else {
stanza = data[i];
}
rawStanza = Strophe.serialize(stanza);
this._conn.xmlOutput(stanza);
this._conn.rawOutput(rawStanza);
this.socket.send(rawStanza);
}
}
this._conn._data = [];
}
},
_onMessage: function _onMessage(message) {
var elem, data;
var close = '<close xmlns="urn:ietf:params:xml:ns:xmpp-framing" />';
if (message.data === close) {
this._conn.rawInput(close);
this._conn.xmlInput(message);
if (!this._conn.disconnecting) {
this._conn._doDisconnect();
}
return;
} else if (message.data.search("<open ") === 0) {
elem = new DOMParser().parseFromString(message.data, "text/xml").documentElement;
if (!this._handleStreamStart(elem)) {
return;
}
} else {
data = this._streamWrap(message.data);
elem = new DOMParser().parseFromString(data, "text/xml").documentElement;
}
if (this._check_streamerror(elem, Strophe.Status.ERROR)) {
return;
}
if (this._conn.disconnecting && elem.firstChild.nodeName === "presence" && elem.firstChild.getAttribute("type") === "unavailable") {
this._conn.xmlInput(elem);
this._conn.rawInput(Strophe.serialize(elem));
return;
}
this._conn._dataRecv(elem, message.data);
},
_onOpen: function _onOpen() {
Strophe.info("Websocket open");
var start = this._buildStream();
this._conn.xmlOutput(start.tree());
var startString = Strophe.serialize(start);
this._conn.rawOutput(startString);
this.socket.send(startString);
},
_reqToData: function _reqToData(stanza) {
return stanza;
},
_send: function _send() {
this._conn.flush();
},
_sendRestart: function _sendRestart() {
clearTimeout(this._conn._idleTimeout);
this._conn._onIdle.bind(this._conn)();
}
};
return Strophe;
});
(function (root) {
if (typeof define === 'function' && define.amd) {
define("strophe", ["strophe-core", "strophe-bosh", "strophe-websocket"], function (wrapper) {
return wrapper;
});
}
})(this);
if (callback) {
if (typeof define === 'function' && define.amd) {
var n_callback = callback;
require(["strophe"], function (o) {
n_callback(o.Strophe, o.$build, o.$msg, o.$iq, o.$pres);
});
} else {
return callback(Strophe, $build, $msg, $iq, $pres);
}
}
})(function (Strophe, build, msg, iq, pres) {
window.Strophe = Strophe;
window.$build = build;
window.$msg = msg;
window.$iq = iq;
window.$pres = pres;
});
}, 490, null, "strophe/strophe.js");
__d(/* strophejs-plugins/disco/strophe.disco.js */function(global, require, module, exports) {
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
define("strophe.disco", ["strophe"], function (Strophe) {
factory(Strophe.Strophe, Strophe.$build, Strophe.$iq, Strophe.$msg, Strophe.$pres);
return Strophe;
});
} else {
factory(root.Strophe, root.$build, root.$iq, root.$msg, root.$pres);
}
})(this, function (Strophe, $build, $iq, $msg, $pres) {
Strophe.addConnectionPlugin('disco', {
_connection: null,
_identities: [],
_features: [],
_items: [],
init: function init(conn) {
this._connection = conn;
this._identities = [];
this._features = [];
this._items = [];
conn.addHandler(this._onDiscoInfo.bind(this), Strophe.NS.DISCO_INFO, 'iq', 'get', null, null);
conn.addHandler(this._onDiscoItems.bind(this), Strophe.NS.DISCO_ITEMS, 'iq', 'get', null, null);
},
addIdentity: function addIdentity(category, type, name, lang) {
for (var i = 0; i < this._identities.length; i++) {
if (this._identities[i].category == category && this._identities[i].type == type && this._identities[i].name == name && this._identities[i].lang == lang) {
return false;
}
}
this._identities.push({ category: category, type: type, name: name, lang: lang });
return true;
},
addFeature: function addFeature(var_name) {
for (var i = 0; i < this._features.length; i++) {
if (this._features[i] == var_name) return false;
}
this._features.push(var_name);
return true;
},
removeFeature: function removeFeature(var_name) {
for (var i = 0; i < this._features.length; i++) {
if (this._features[i] === var_name) {
this._features.splice(i, 1);
return true;
}
}
return false;
},
addItem: function addItem(jid, name, node, call_back) {
if (node && !call_back) return false;
this._items.push({ jid: jid, name: name, node: node, call_back: call_back });
return true;
},
info: function info(jid, node, success, error, timeout) {
var attrs = { xmlns: Strophe.NS.DISCO_INFO };
if (node) attrs.node = node;
var info = $iq({ from: this._connection.jid,
to: jid, type: 'get' }).c('query', attrs);
this._connection.sendIQ(info, success, error, timeout);
},
items: function items(jid, node, success, error, timeout) {
var attrs = { xmlns: Strophe.NS.DISCO_ITEMS };
if (node) attrs.node = node;
var items = $iq({ from: this._connection.jid,
to: jid, type: 'get' }).c('query', attrs);
this._connection.sendIQ(items, success, error, timeout);
},
_buildIQResult: function _buildIQResult(stanza, query_attrs) {
var id = stanza.getAttribute('id');
var from = stanza.getAttribute('from');
var iqresult = $iq({ type: 'result', id: id });
if (from !== null) {
iqresult.attrs({ to: from });
}
return iqresult.c('query', query_attrs);
},
_onDiscoInfo: function _onDiscoInfo(stanza) {
var node = stanza.getElementsByTagName('query')[0].getAttribute('node');
var attrs = { xmlns: Strophe.NS.DISCO_INFO };
var i;
if (node) {
attrs.node = node;
}
var iqresult = this._buildIQResult(stanza, attrs);
for (i = 0; i < this._identities.length; i++) {
attrs = { category: this._identities[i].category,
type: this._identities[i].type };
if (this._identities[i].name) attrs.name = this._identities[i].name;
if (this._identities[i].lang) attrs['xml:lang'] = this._identities[i].lang;
iqresult.c('identity', attrs).up();
}
for (i = 0; i < this._features.length; i++) {
iqresult.c('feature', { 'var': this._features[i] }).up();
}
this._connection.send(iqresult.tree());
return true;
},
_onDiscoItems: function _onDiscoItems(stanza) {
var query_attrs = { xmlns: Strophe.NS.DISCO_ITEMS };
var node = stanza.getElementsByTagName('query')[0].getAttribute('node');
var items, i;
if (node) {
query_attrs.node = node;
items = [];
for (i = 0; i < this._items.length; i++) {
if (this._items[i].node == node) {
items = this._items[i].call_back(stanza);
break;
}
}
} else {
items = this._items;
}
var iqresult = this._buildIQResult(stanza, query_attrs);
for (i = 0; i < items.length; i++) {
var attrs = { jid: items[i].jid };
if (items[i].name) attrs.name = items[i].name;
if (items[i].node) attrs.node = items[i].node;
iqresult.c('item', attrs).up();
}
this._connection.send(iqresult.tree());
return true;
}
});
});
}, 491, null, "strophejs-plugins/disco/strophe.disco.js");
__d(/* strophejs-plugins/caps/strophe.caps.jsonly.js */function(global, require, module, exports) {
Strophe.addConnectionPlugin('caps', {
HASH: 'sha-1',
node: 'http://strophe.im/strophejs/',
_ver: '',
_connection: null,
_knownCapabilities: {},
_jidVerIndex: {},
init: function init(conn) {
this._connection = conn;
Strophe.addNamespace('CAPS', 'http://jabber.org/protocol/caps');
if (!this._connection.disco) {
throw "Caps plugin requires the disco plugin to be installed.";
}
this._connection.disco.addFeature(Strophe.NS.CAPS);
this._connection.addHandler(this._delegateCapabilities.bind(this), Strophe.NS.CAPS);
},
generateCapsAttrs: function generateCapsAttrs() {
return {
'xmlns': Strophe.NS.CAPS,
'hash': this.HASH,
'node': this.node,
'ver': this.generateVer()
};
},
generateVer: function generateVer() {
if (this._ver !== "") {
return this._ver;
}
var ver = "",
identities = this._connection.disco._identities.sort(this._sortIdentities),
identitiesLen = identities.length,
features = this._connection.disco._features.sort(),
featuresLen = features.length;
for (var i = 0; i < identitiesLen; i++) {
var curIdent = identities[i];
ver += curIdent.category + "/" + curIdent.type + "/" + curIdent.lang + "/" + curIdent.name + "<";
}
for (var i = 0; i < featuresLen; i++) {
ver += features[i] + '<';
}
this._ver = b64_sha1(ver);
return this._ver;
},
getCapabilitiesByJid: function getCapabilitiesByJid(jid) {
if (this._jidVerIndex[jid]) {
return this._knownCapabilities[this._jidVerIndex[jid]];
}
return null;
},
_delegateCapabilities: function _delegateCapabilities(stanza) {
var from = stanza.getAttribute('from'),
c = stanza.querySelector('c'),
ver = c.getAttribute('ver'),
node = c.getAttribute('node');
if (!this._knownCapabilities[ver]) {
return this._requestCapabilities(from, node, ver);
} else {
this._jidVerIndex[from] = ver;
}
if (!this._jidVerIndex[from] || !this._jidVerIndex[from] !== ver) {
this._jidVerIndex[from] = ver;
}
return true;
},
_requestCapabilities: function _requestCapabilities(to, node, ver) {
if (to !== this._connection.jid) {
var id = this._connection.disco.info(to, node + '#' + ver);
this._connection.addHandler(this._handleDiscoInfoReply.bind(this), Strophe.NS.DISCO_INFO, 'iq', 'result', id, to);
}
return true;
},
_handleDiscoInfoReply: function _handleDiscoInfoReply(stanza) {
var query = stanza.querySelector('query'),
node = query.getAttribute('node').split('#'),
ver = node[1],
from = stanza.getAttribute('from');
if (!this._knownCapabilities[ver]) {
var childNodes = query.childNodes,
childNodesLen = childNodes.length;
this._knownCapabilities[ver] = [];
for (var i = 0; i < childNodesLen; i++) {
var node = childNodes[i];
this._knownCapabilities[ver].push({ name: node.nodeName, attributes: node.attributes });
}
this._jidVerIndex[from] = ver;
} else if (!this._jidVerIndex[from] || !this._jidVerIndex[from] !== ver) {
this._jidVerIndex[from] = ver;
}
return false;
},
_sortIdentities: function _sortIdentities(a, b) {
if (a.category > b.category) {
return 1;
}
if (a.category < b.category) {
return -1;
}
if (a.type > b.type) {
return 1;
}
if (a.type < b.type) {
return -1;
}
if (a.lang > b.lang) {
return 1;
}
if (a.lang < b.lang) {
return -1;
}
return 0;
}
});
}, 492, null, "strophejs-plugins/caps/strophe.caps.jsonly.js");
__d(/* jitsi-meet/react/features/base/lib-jitsi-meet/actionTypes.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var LIB_DID_DISPOSE = exports.LIB_DID_DISPOSE = Symbol('LIB_DID_DISPOSE');
var LIB_DID_INIT = exports.LIB_DID_INIT = Symbol('LIB_DID_INIT');
var LIB_INIT_ERROR = exports.LIB_INIT_ERROR = Symbol('LIB_INIT_ERROR');
var LIB_WILL_DISPOSE = exports.LIB_WILL_DISPOSE = Symbol('LIB_WILL_DISPOSE');
var LIB_WILL_INIT = exports.LIB_WILL_INIT = Symbol('LIB_WILL_INIT');
var SET_WEBRTC_READY = exports.SET_WEBRTC_READY = Symbol('SET_WEBRTC_READY');
}, 493, null, "jitsi-meet/react/features/base/lib-jitsi-meet/actionTypes.js");
__d(/* jitsi-meet/react/features/base/lib-jitsi-meet/constants.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var WEBRTC_NOT_READY = exports.WEBRTC_NOT_READY = 'WEBRTC_NOT_READY';
var WEBRTC_NOT_SUPPORTED = exports.WEBRTC_NOT_SUPPORTED = 'WEBRTC_NOT_SUPPORTED';
}, 494, null, "jitsi-meet/react/features/base/lib-jitsi-meet/constants.js");
__d(/* jitsi-meet/react/features/base/lib-jitsi-meet/functions.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
exports.createLocalTrack = createLocalTrack;
exports.isFatalJitsiConnectionError = isFatalJitsiConnectionError;
exports.loadConfig = loadConfig;
var _config = require(496 ); // 496 = ../../base/config
var _util = require(529 ); // 529 = ../../base/util
var _ = require(436 ); // 436 = ./_
var _2 = babelHelpers.interopRequireDefault(_);
var JitsiConnectionErrors = _2.default.errors.connection;
function createLocalTrack(type, deviceId) {
return _2.default.createLocalTracks({
cameraDeviceId: deviceId,
devices: [type],
firefox_fake_device: window.config && window.config.firefox_fake_device,
micDeviceId: deviceId
}).then(function (_ref) {
var _ref2 = babelHelpers.slicedToArray(_ref, 1),
jitsiLocalTrack = _ref2[0];
return jitsiLocalTrack;
});
}
function isFatalJitsiConnectionError(error) {
return error === JitsiConnectionErrors.CONNECTION_DROPPED_ERROR || error === JitsiConnectionErrors.OTHER_ERROR || error === JitsiConnectionErrors.SERVER_ERROR;
}
function loadConfig(host) {
var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'config.js';
var promise = void 0;
if (typeof APP === 'undefined') {
promise = (0, _util.loadScript)(new URL(path, host).toString()).then(function () {
var _window = window,
config = _window.config;
window.config = undefined;
if (typeof config !== 'object') {
throw new Error('window.config is not an object');
}
return config;
}).catch(function (err) {
console.error('Failed to load ' + path + ' from ' + host, err);
throw err;
});
} else {
promise = Promise.resolve(window.config);
}
promise = promise.then(function (value) {
(0, _config.setConfigFromURLParams)();
return value;
});
return promise;
}
}, 495, null, "jitsi-meet/react/features/base/lib-jitsi-meet/functions.js");
__d(/* jitsi-meet/react/features/base/config/index.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _actions = require(497 ); // 497 = ./actions
Object.keys(_actions).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _actions[key];
}
});
});
var _actionTypes = require(498 ); // 498 = ./actionTypes
Object.keys(_actionTypes).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _actionTypes[key];
}
});
});
var _functions = require(499 ); // 499 = ./functions
Object.keys(_functions).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _functions[key];
}
});
});
require(504 ); // 504 = ./reducer
}, 496, null, "jitsi-meet/react/features/base/config/index.js");
__d(/* jitsi-meet/react/features/base/config/actions.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
exports.setConfig = setConfig;
var _actionTypes = require(498 ); // 498 = ./actionTypes
function setConfig(config) {
return {
type: _actionTypes.SET_CONFIG,
config: config
};
}
}, 497, null, "jitsi-meet/react/features/base/config/actions.js");
__d(/* jitsi-meet/react/features/base/config/actionTypes.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var SET_CONFIG = exports.SET_CONFIG = Symbol('SET_CONFIG');
}, 498, null, "jitsi-meet/react/features/base/config/actionTypes.js");
__d(/* jitsi-meet/react/features/base/config/functions.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
exports.parseURLParams = exports.getRoomName = undefined;
var _getRoomName = require(500 ); // 500 = ./getRoomName
Object.defineProperty(exports, 'getRoomName', {
enumerable: true,
get: function get() {
return babelHelpers.interopRequireDefault(_getRoomName).default;
}
});
exports.chooseBOSHAddress = chooseBOSHAddress;
exports.obtainConfig = obtainConfig;
exports.overrideConfigJSON = overrideConfigJSON;
exports.setConfigFromURLParams = setConfigFromURLParams;
var _jssha = require(501 ); // 501 = jssha
var _jssha2 = babelHelpers.interopRequireDefault(_jssha);
var _lodash = require(502 ); // 502 = lodash
var _lodash2 = babelHelpers.interopRequireDefault(_lodash);
var _parseURLParams = require(503 ); // 503 = ./parseURLParams
var _parseURLParams2 = babelHelpers.interopRequireDefault(_parseURLParams);
var _KEYS_TO_IGNORE = ['analyticsScriptUrls', 'callStatsCustomScriptUrl'];
var logger = require(464 ).getLogger(__filename); // 464 = jitsi-meet-logger
exports.parseURLParams = _parseURLParams2.default;
function chooseBOSHAddress(config, roomName) {
if (!roomName) {
return;
}
var boshList = config.boshList;
if (!boshList || !Array.isArray(boshList) || !boshList.length) {
return;
}
var hash = new _jssha2.default(roomName, 'TEXT').getHash('SHA-1', 'HEX');
var n = parseInt(hash.substr(-6), 16);
var idx = n % boshList.length;
config.bosh = boshList[idx];
logger.log('Setting config.bosh to ' + config.bosh + ' (idx=' + idx + ')');
var boshAttemptFirstList = config.boshAttemptFirstList;
if (boshAttemptFirstList && Array.isArray(boshAttemptFirstList) && boshAttemptFirstList.length > 0) {
idx = n % boshAttemptFirstList.length;
var attemptFirstAddress = boshAttemptFirstList[idx];
if (attemptFirstAddress === config.bosh) {
logger.log('Not setting config.boshAttemptFirst, address matches.');
} else {
config.boshAttemptFirst = attemptFirstAddress;
logger.log('Setting config.boshAttemptFirst=' + attemptFirstAddress + ' (idx=' + idx + ')');
}
}
}
function obtainConfig(endpoint, roomName, complete) {
logger.info('Send config request to ' + endpoint + ' for room: ' + roomName);
$.ajax(endpoint, {
contentType: 'application/json',
data: JSON.stringify({ roomName: roomName }),
dataType: 'json',
method: 'POST',
error: function error(jqXHR, textStatus, errorThrown) {
logger.error('Get config error: ', jqXHR, errorThrown);
complete(false, 'Get config response status: ' + textStatus);
},
success: function success(data) {
var _window = window,
config = _window.config,
interfaceConfig = _window.interfaceConfig,
loggingConfig = _window.loggingConfig;
try {
overrideConfigJSON(config, interfaceConfig, loggingConfig, data);
complete(true);
} catch (e) {
logger.error('Parse config error: ', e);
complete(false, e);
}
}
});
}
function overrideConfigJSON(config, interfaceConfig, loggingConfig, json) {
for (var _iterator = Object.keys(json), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[typeof Symbol === 'function' ? Symbol.iterator : '@@iterator']();;) {
var _ref;
if (_isArray) {
if (_i >= _iterator.length) break;
_ref = _iterator[_i++];
} else {
_i = _iterator.next();
if (_i.done) break;
_ref = _i.value;
}
var configName = _ref;
var configObj = void 0;
if (configName === 'config') {
configObj = config;
} else if (configName === 'interfaceConfig') {
configObj = interfaceConfig;
} else if (configName === 'loggingConfig') {
configObj = loggingConfig;
}
if (configObj) {
var configJSON = json[configName];
if (!_lodash2.default.isEmpty(configJSON)) {
logger.info('Extending ' + configName + ' ' + ('with: ' + JSON.stringify(configJSON)));
_lodash2.default.merge(configObj, configJSON);
}
}
}
}
function setConfigFromURLParams() {
var params = (0, _parseURLParams2.default)(window.location);
var _window2 = window,
config = _window2.config,
interfaceConfig = _window2.interfaceConfig,
loggingConfig = _window2.loggingConfig;
var json = {};
config && (json.config = {});
interfaceConfig && (json.interfaceConfig = {});
loggingConfig && (json.loggingConfig = {});
for (var _iterator2 = Object.keys(params), _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[typeof Symbol === 'function' ? Symbol.iterator : '@@iterator']();;) {
var _ref2;
if (_isArray2) {
if (_i2 >= _iterator2.length) break;
_ref2 = _iterator2[_i2++];
} else {
_i2 = _iterator2.next();
if (_i2.done) break;
_ref2 = _i2.value;
}
var param = _ref2;
var base = json;
var names = param.split('.');
var last = names.pop();
if (_KEYS_TO_IGNORE.indexOf(last) !== -1) {
continue;
}
for (var _iterator3 = names, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[typeof Symbol === 'function' ? Symbol.iterator : '@@iterator']();;) {
var _ref3;
if (_isArray3) {
if (_i3 >= _iterator3.length) break;
_ref3 = _iterator3[_i3++];
} else {
_i3 = _iterator3.next();
if (_i3.done) break;
_ref3 = _i3.value;
}
var name = _ref3;
base = base[name] = base[name] || {};
}
base[last] = params[param];
}
overrideConfigJSON(config, interfaceConfig, loggingConfig, json);
}
}, 499, null, "jitsi-meet/react/features/base/config/functions.js");
__d(/* jitsi-meet/react/features/base/config/getRoomName.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = getRoomName;
function getRoomName() {
var getroomnode = config.getroomnode;
var path = window.location.pathname;
var roomName = void 0;
if (getroomnode && typeof getroomnode === 'function') {
roomName = getroomnode.call(config, path);
} else {
roomName = path.substring(path.lastIndexOf('/') + 1).toLowerCase() || undefined;
}
return roomName;
}
}, 500, null, "jitsi-meet/react/features/base/config/getRoomName.js");
__d(/* jssha/src/sha.js */function(global, require, module, exports) {
(function (T) {
function z(a, c, b) {
var g = 0,
f = [0],
h = "",
l = null,
h = b || "UTF8";if ("UTF8" !== h && "UTF16" !== h) throw "encoding must be UTF8 or UTF16";if ("HEX" === c) {
if (0 !== a.length % 2) throw "srcString of HEX type must be in byte increments";l = B(a);g = l.binLen;f = l.value;
} else if ("ASCII" === c || "TEXT" === c) l = J(a, h), g = l.binLen, f = l.value;else if ("B64" === c) l = K(a), g = l.binLen, f = l.value;else throw "inputFormat must be HEX, TEXT, ASCII, or B64";this.getHash = function (a, c, b, h) {
var l = null,
d = f.slice(),
n = g,
p;3 === arguments.length ? "number" !== typeof b && (h = b, b = 1) : 2 === arguments.length && (b = 1);if (b !== parseInt(b, 10) || 1 > b) throw "numRounds must a integer >= 1";switch (c) {case "HEX":
l = L;break;case "B64":
l = M;break;default:
throw "format must be HEX or B64";}if ("SHA-1" === a) for (p = 0; p < b; p++) {
d = y(d, n), n = 160;
} else if ("SHA-224" === a) for (p = 0; p < b; p++) {
d = v(d, n, a), n = 224;
} else if ("SHA-256" === a) for (p = 0; p < b; p++) {
d = v(d, n, a), n = 256;
} else if ("SHA-384" === a) for (p = 0; p < b; p++) {
d = v(d, n, a), n = 384;
} else if ("SHA-512" === a) for (p = 0; p < b; p++) {
d = v(d, n, a), n = 512;
} else throw "Chosen SHA variant is not supported";
return l(d, N(h));
};this.getHMAC = function (a, b, c, l, s) {
var d,
n,
p,
m,
w = [],
x = [];d = null;switch (l) {case "HEX":
l = L;break;case "B64":
l = M;break;default:
throw "outputFormat must be HEX or B64";}if ("SHA-1" === c) n = 64, m = 160;else if ("SHA-224" === c) n = 64, m = 224;else if ("SHA-256" === c) n = 64, m = 256;else if ("SHA-384" === c) n = 128, m = 384;else if ("SHA-512" === c) n = 128, m = 512;else throw "Chosen SHA variant is not supported";if ("HEX" === b) d = B(a), p = d.binLen, d = d.value;else if ("ASCII" === b || "TEXT" === b) d = J(a, h), p = d.binLen, d = d.value;else if ("B64" === b) d = K(a), p = d.binLen, d = d.value;else throw "inputFormat must be HEX, TEXT, ASCII, or B64";a = 8 * n;b = n / 4 - 1;n < p / 8 ? (d = "SHA-1" === c ? y(d, p) : v(d, p, c), d[b] &= 4294967040) : n > p / 8 && (d[b] &= 4294967040);for (n = 0; n <= b; n += 1) {
w[n] = d[n] ^ 909522486, x[n] = d[n] ^ 1549556828;
}c = "SHA-1" === c ? y(x.concat(y(w.concat(f), a + g)), a + m) : v(x.concat(v(w.concat(f), a + g, c)), a + m, c);return l(c, N(s));
};
}function s(a, c) {
this.a = a;this.b = c;
}function J(a, c) {
var b = [],
g,
f = [],
h = 0,
l;if ("UTF8" === c) for (l = 0; l < a.length; l += 1) {
for (g = a.charCodeAt(l), f = [], 2048 < g ? (f[0] = 224 | (g & 61440) >>> 12, f[1] = 128 | (g & 4032) >>> 6, f[2] = 128 | g & 63) : 128 < g ? (f[0] = 192 | (g & 1984) >>> 6, f[1] = 128 | g & 63) : f[0] = g, g = 0; g < f.length; g += 1) {
b[h >>> 2] |= f[g] << 24 - h % 4 * 8, h += 1;
}
} else if ("UTF16" === c) for (l = 0; l < a.length; l += 1) {
b[h >>> 2] |= a.charCodeAt(l) << 16 - h % 4 * 8, h += 2;
}return { value: b, binLen: 8 * h };
}function B(a) {
var c = [],
b = a.length,
g,
f;if (0 !== b % 2) throw "String of HEX type must be in byte increments";for (g = 0; g < b; g += 2) {
f = parseInt(a.substr(g, 2), 16);if (isNaN(f)) throw "String of HEX type contains invalid characters";c[g >>> 3] |= f << 24 - g % 8 * 4;
}return { value: c,
binLen: 4 * b };
}function K(a) {
var c = [],
b = 0,
g,
f,
h,
l,
r;if (-1 === a.search(/^[a-zA-Z0-9=+\/]+$/)) throw "Invalid character in base-64 string";g = a.indexOf("=");a = a.replace(/\=/g, "");if (-1 !== g && g < a.length) throw "Invalid '=' found in base-64 string";for (f = 0; f < a.length; f += 4) {
r = a.substr(f, 4);for (h = l = 0; h < r.length; h += 1) {
g = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(r[h]), l |= g << 18 - 6 * h;
}for (h = 0; h < r.length - 1; h += 1) {
c[b >> 2] |= (l >>> 16 - 8 * h & 255) << 24 - b % 4 * 8, b += 1;
}
}return { value: c, binLen: 8 * b };
}function L(a, c) {
var b = "",
g = 4 * a.length,
f,
h;for (f = 0; f < g; f += 1) {
h = a[f >>> 2] >>> 8 * (3 - f % 4), b += "0123456789abcdef".charAt(h >>> 4 & 15) + "0123456789abcdef".charAt(h & 15);
}return c.outputUpper ? b.toUpperCase() : b;
}function M(a, c) {
var b = "",
g = 4 * a.length,
f,
h,
l;for (f = 0; f < g; f += 3) {
for (l = (a[f >>> 2] >>> 8 * (3 - f % 4) & 255) << 16 | (a[f + 1 >>> 2] >>> 8 * (3 - (f + 1) % 4) & 255) << 8 | a[f + 2 >>> 2] >>> 8 * (3 - (f + 2) % 4) & 255, h = 0; 4 > h; h += 1) {
b = 8 * f + 6 * h <= 32 * a.length ? b + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(l >>> 6 * (3 - h) & 63) : b + c.b64Pad;
}
}return b;
}function N(a) {
var c = { outputUpper: !1, b64Pad: "=" };try {
a.hasOwnProperty("outputUpper") && (c.outputUpper = a.outputUpper), a.hasOwnProperty("b64Pad") && (c.b64Pad = a.b64Pad);
} catch (b) {}if ("boolean" !== typeof c.outputUpper) throw "Invalid outputUpper formatting option";if ("string" !== typeof c.b64Pad) throw "Invalid b64Pad formatting option";return c;
}function U(a, c) {
return a << c | a >>> 32 - c;
}function u(a, c) {
return a >>> c | a << 32 - c;
}function t(a, c) {
var b = null,
b = new s(a.a, a.b);return b = 32 >= c ? new s(b.a >>> c | b.b << 32 - c & 4294967295, b.b >>> c | b.a << 32 - c & 4294967295) : new s(b.b >>> c - 32 | b.a << 64 - c & 4294967295, b.a >>> c - 32 | b.b << 64 - c & 4294967295);
}function O(a, c) {
var b = null;return b = 32 >= c ? new s(a.a >>> c, a.b >>> c | a.a << 32 - c & 4294967295) : new s(0, a.a >>> c - 32);
}function V(a, c, b) {
return a ^ c ^ b;
}function P(a, c, b) {
return a & c ^ ~a & b;
}function W(a, c, b) {
return new s(a.a & c.a ^ ~a.a & b.a, a.b & c.b ^ ~a.b & b.b);
}function Q(a, c, b) {
return a & c ^ a & b ^ c & b;
}function X(a, c, b) {
return new s(a.a & c.a ^ a.a & b.a ^ c.a & b.a, a.b & c.b ^ a.b & b.b ^ c.b & b.b);
}function Y(a) {
return u(a, 2) ^ u(a, 13) ^ u(a, 22);
}function Z(a) {
var c = t(a, 28),
b = t(a, 34);a = t(a, 39);return new s(c.a ^ b.a ^ a.a, c.b ^ b.b ^ a.b);
}function $(a) {
return u(a, 6) ^ u(a, 11) ^ u(a, 25);
}function aa(a) {
var c = t(a, 14),
b = t(a, 18);a = t(a, 41);return new s(c.a ^ b.a ^ a.a, c.b ^ b.b ^ a.b);
}function ba(a) {
return u(a, 7) ^ u(a, 18) ^ a >>> 3;
}function ca(a) {
var c = t(a, 1),
b = t(a, 8);a = O(a, 7);return new s(c.a ^ b.a ^ a.a, c.b ^ b.b ^ a.b);
}function da(a) {
return u(a, 17) ^ u(a, 19) ^ a >>> 10;
}function ea(a) {
var c = t(a, 19),
b = t(a, 61);a = O(a, 6);return new s(c.a ^ b.a ^ a.a, c.b ^ b.b ^ a.b);
}function R(a, c) {
var b = (a & 65535) + (c & 65535);return ((a >>> 16) + (c >>> 16) + (b >>> 16) & 65535) << 16 | b & 65535;
}function fa(a, c, b, g) {
var f = (a & 65535) + (c & 65535) + (b & 65535) + (g & 65535);return ((a >>> 16) + (c >>> 16) + (b >>> 16) + (g >>> 16) + (f >>> 16) & 65535) << 16 | f & 65535;
}function S(a, c, b, g, f) {
var h = (a & 65535) + (c & 65535) + (b & 65535) + (g & 65535) + (f & 65535);return ((a >>> 16) + (c >>> 16) + (b >>> 16) + (g >>> 16) + (f >>> 16) + (h >>> 16) & 65535) << 16 | h & 65535;
}function ga(a, c) {
var b, g, f;b = (a.b & 65535) + (c.b & 65535);g = (a.b >>> 16) + (c.b >>> 16) + (b >>> 16);f = (g & 65535) << 16 | b & 65535;b = (a.a & 65535) + (c.a & 65535) + (g >>> 16);g = (a.a >>> 16) + (c.a >>> 16) + (b >>> 16);return new s((g & 65535) << 16 | b & 65535, f);
}function ha(a, c, b, g) {
var f, h, l;f = (a.b & 65535) + (c.b & 65535) + (b.b & 65535) + (g.b & 65535);h = (a.b >>> 16) + (c.b >>> 16) + (b.b >>> 16) + (g.b >>> 16) + (f >>> 16);l = (h & 65535) << 16 | f & 65535;f = (a.a & 65535) + (c.a & 65535) + (b.a & 65535) + (g.a & 65535) + (h >>> 16);h = (a.a >>> 16) + (c.a >>> 16) + (b.a >>> 16) + (g.a >>> 16) + (f >>> 16);return new s((h & 65535) << 16 | f & 65535, l);
}function ia(a, c, b, g, f) {
var h, l, r;h = (a.b & 65535) + (c.b & 65535) + (b.b & 65535) + (g.b & 65535) + (f.b & 65535);l = (a.b >>> 16) + (c.b >>> 16) + (b.b >>> 16) + (g.b >>> 16) + (f.b >>> 16) + (h >>> 16);r = (l & 65535) << 16 | h & 65535;h = (a.a & 65535) + (c.a & 65535) + (b.a & 65535) + (g.a & 65535) + (f.a & 65535) + (l >>> 16);l = (a.a >>> 16) + (c.a >>> 16) + (b.a >>> 16) + (g.a >>> 16) + (f.a >>> 16) + (h >>> 16);return new s((l & 65535) << 16 | h & 65535, r);
}function y(a, c) {
var b = [],
g,
f,
h,
l,
r,
s,
u = P,
t = V,
v = Q,
d = U,
n = R,
p,
m,
w = S,
x,
q = [1732584193, 4023233417, 2562383102, 271733878, 3285377520];a[c >>> 5] |= 128 << 24 - c % 32;a[(c + 65 >>> 9 << 4) + 15] = c;x = a.length;for (p = 0; p < x; p += 16) {
g = q[0];f = q[1];h = q[2];l = q[3];r = q[4];for (m = 0; 80 > m; m += 1) {
b[m] = 16 > m ? a[m + p] : d(b[m - 3] ^ b[m - 8] ^ b[m - 14] ^ b[m - 16], 1), s = 20 > m ? w(d(g, 5), u(f, h, l), r, 1518500249, b[m]) : 40 > m ? w(d(g, 5), t(f, h, l), r, 1859775393, b[m]) : 60 > m ? w(d(g, 5), v(f, h, l), r, 2400959708, b[m]) : w(d(g, 5), t(f, h, l), r, 3395469782, b[m]), r = l, l = h, h = d(f, 30), f = g, g = s;
}q[0] = n(g, q[0]);q[1] = n(f, q[1]);q[2] = n(h, q[2]);q[3] = n(l, q[3]);q[4] = n(r, q[4]);
}return q;
}function v(a, c, b) {
var g,
f,
h,
l,
r,
t,
u,
v,
z,
d,
n,
p,
m,
w,
x,
q,
y,
C,
D,
E,
F,
G,
H,
I,
e,
A = [],
B,
k = [1116352408, 1899447441, 3049323471, 3921009573, 961987163, 1508970993, 2453635748, 2870763221, 3624381080, 310598401, 607225278, 1426881987, 1925078388, 2162078206, 2614888103, 3248222580, 3835390401, 4022224774, 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986, 2554220882, 2821834349, 2952996808, 3210313671, 3336571891, 3584528711, 113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291, 1695183700, 1986661051, 2177026350, 2456956037, 2730485921, 2820302411, 3259730800, 3345764771, 3516065817, 3600352804, 4094571909, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, 1537002063, 1747873779, 1955562222, 2024104815, 2227730452, 2361852424, 2428436474, 2756734187, 3204031479, 3329325298];d = [3238371032, 914150663, 812702999, 4144912697, 4290775857, 1750603025, 1694076839, 3204075428];f = [1779033703, 3144134277, 1013904242, 2773480762, 1359893119, 2600822924, 528734635, 1541459225];if ("SHA-224" === b || "SHA-256" === b) n = 64, g = (c + 65 >>> 9 << 4) + 15, w = 16, x = 1, e = Number, q = R, y = fa, C = S, D = ba, E = da, F = Y, G = $, I = Q, H = P, d = "SHA-224" === b ? d : f;else if ("SHA-384" === b || "SHA-512" === b) n = 80, g = (c + 128 >>> 10 << 5) + 31, w = 32, x = 2, e = s, q = ga, y = ha, C = ia, D = ca, E = ea, F = Z, G = aa, I = X, H = W, k = [new e(k[0], 3609767458), new e(k[1], 602891725), new e(k[2], 3964484399), new e(k[3], 2173295548), new e(k[4], 4081628472), new e(k[5], 3053834265), new e(k[6], 2937671579), new e(k[7], 3664609560), new e(k[8], 2734883394), new e(k[9], 1164996542), new e(k[10], 1323610764), new e(k[11], 3590304994), new e(k[12], 4068182383), new e(k[13], 991336113), new e(k[14], 633803317), new e(k[15], 3479774868), new e(k[16], 2666613458), new e(k[17], 944711139), new e(k[18], 2341262773), new e(k[19], 2007800933), new e(k[20], 1495990901), new e(k[21], 1856431235), new e(k[22], 3175218132), new e(k[23], 2198950837), new e(k[24], 3999719339), new e(k[25], 766784016), new e(k[26], 2566594879), new e(k[27], 3203337956), new e(k[28], 1034457026), new e(k[29], 2466948901), new e(k[30], 3758326383), new e(k[31], 168717936), new e(k[32], 1188179964), new e(k[33], 1546045734), new e(k[34], 1522805485), new e(k[35], 2643833823), new e(k[36], 2343527390), new e(k[37], 1014477480), new e(k[38], 1206759142), new e(k[39], 344077627), new e(k[40], 1290863460), new e(k[41], 3158454273), new e(k[42], 3505952657), new e(k[43], 106217008), new e(k[44], 3606008344), new e(k[45], 1432725776), new e(k[46], 1467031594), new e(k[47], 851169720), new e(k[48], 3100823752), new e(k[49], 1363258195), new e(k[50], 3750685593), new e(k[51], 3785050280), new e(k[52], 3318307427), new e(k[53], 3812723403), new e(k[54], 2003034995), new e(k[55], 3602036899), new e(k[56], 1575990012), new e(k[57], 1125592928), new e(k[58], 2716904306), new e(k[59], 442776044), new e(k[60], 593698344), new e(k[61], 3733110249), new e(k[62], 2999351573), new e(k[63], 3815920427), new e(3391569614, 3928383900), new e(3515267271, 566280711), new e(3940187606, 3454069534), new e(4118630271, 4000239992), new e(116418474, 1914138554), new e(174292421, 2731055270), new e(289380356, 3203993006), new e(460393269, 320620315), new e(685471733, 587496836), new e(852142971, 1086792851), new e(1017036298, 365543100), new e(1126000580, 2618297676), new e(1288033470, 3409855158), new e(1501505948, 4234509866), new e(1607167915, 987167468), new e(1816402316, 1246189591)], d = "SHA-384" === b ? [new e(3418070365, d[0]), new e(1654270250, d[1]), new e(2438529370, d[2]), new e(355462360, d[3]), new e(1731405415, d[4]), new e(41048885895, d[5]), new e(3675008525, d[6]), new e(1203062813, d[7])] : [new e(f[0], 4089235720), new e(f[1], 2227873595), new e(f[2], 4271175723), new e(f[3], 1595750129), new e(f[4], 2917565137), new e(f[5], 725511199), new e(f[6], 4215389547), new e(f[7], 327033209)];else throw "Unexpected error in SHA-2 implementation";a[c >>> 5] |= 128 << 24 - c % 32;a[g] = c;B = a.length;for (p = 0; p < B; p += w) {
c = d[0];g = d[1];f = d[2];h = d[3];l = d[4];r = d[5];t = d[6];u = d[7];for (m = 0; m < n; m += 1) {
A[m] = 16 > m ? new e(a[m * x + p], a[m * x + p + 1]) : y(E(A[m - 2]), A[m - 7], D(A[m - 15]), A[m - 16]), v = C(u, G(l), H(l, r, t), k[m], A[m]), z = q(F(c), I(c, g, f)), u = t, t = r, r = l, l = q(h, v), h = f, f = g, g = c, c = q(v, z);
}d[0] = q(c, d[0]);d[1] = q(g, d[1]);d[2] = q(f, d[2]);d[3] = q(h, d[3]);d[4] = q(l, d[4]);d[5] = q(r, d[5]);d[6] = q(t, d[6]);d[7] = q(u, d[7]);
}if ("SHA-224" === b) a = [d[0], d[1], d[2], d[3], d[4], d[5], d[6]];else if ("SHA-256" === b) a = d;else if ("SHA-384" === b) a = [d[0].a, d[0].b, d[1].a, d[1].b, d[2].a, d[2].b, d[3].a, d[3].b, d[4].a, d[4].b, d[5].a, d[5].b];else if ("SHA-512" === b) a = [d[0].a, d[0].b, d[1].a, d[1].b, d[2].a, d[2].b, d[3].a, d[3].b, d[4].a, d[4].b, d[5].a, d[5].b, d[6].a, d[6].b, d[7].a, d[7].b];else throw "Unexpected error in SHA-2 implementation";return a;
}"function" === typeof define && typeof define.amd ? define(function () {
return z;
}) : "undefined" !== typeof exports ? "undefined" !== typeof module && module.exports ? module.exports = exports = z : exports = z : T.jsSHA = z;
})(this);
}, 501, null, "jssha/src/sha.js");
__d(/* lodash/lodash.js */function(global, require, module, exports) {/**
* @license
* Lodash <https://lodash.com/>
* Copyright JS Foundation and other contributors <https://js.foundation/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/
;(function () {
var undefined;
var VERSION = '4.17.4';
var LARGE_ARRAY_SIZE = 200;
var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',
FUNC_ERROR_TEXT = 'Expected a function';
var HASH_UNDEFINED = '__lodash_hash_undefined__';
var MAX_MEMOIZE_SIZE = 500;
var PLACEHOLDER = '__lodash_placeholder__';
var CLONE_DEEP_FLAG = 1,
CLONE_FLAT_FLAG = 2,
CLONE_SYMBOLS_FLAG = 4;
var COMPARE_PARTIAL_FLAG = 1,
COMPARE_UNORDERED_FLAG = 2;
var WRAP_BIND_FLAG = 1,
WRAP_BIND_KEY_FLAG = 2,
WRAP_CURRY_BOUND_FLAG = 4,
WRAP_CURRY_FLAG = 8,
WRAP_CURRY_RIGHT_FLAG = 16,
WRAP_PARTIAL_FLAG = 32,
WRAP_PARTIAL_RIGHT_FLAG = 64,
WRAP_ARY_FLAG = 128,
WRAP_REARG_FLAG = 256,
WRAP_FLIP_FLAG = 512;
var DEFAULT_TRUNC_LENGTH = 30,
DEFAULT_TRUNC_OMISSION = '...';
var HOT_COUNT = 800,
HOT_SPAN = 16;
var LAZY_FILTER_FLAG = 1,
LAZY_MAP_FLAG = 2,
LAZY_WHILE_FLAG = 3;
var INFINITY = 1 / 0,
MAX_SAFE_INTEGER = 9007199254740991,
MAX_INTEGER = 1.7976931348623157e+308,
NAN = 0 / 0;
var MAX_ARRAY_LENGTH = 4294967295,
MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,
HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;
var wrapFlags = [['ary', WRAP_ARY_FLAG], ['bind', WRAP_BIND_FLAG], ['bindKey', WRAP_BIND_KEY_FLAG], ['curry', WRAP_CURRY_FLAG], ['curryRight', WRAP_CURRY_RIGHT_FLAG], ['flip', WRAP_FLIP_FLAG], ['partial', WRAP_PARTIAL_FLAG], ['partialRight', WRAP_PARTIAL_RIGHT_FLAG], ['rearg', WRAP_REARG_FLAG]];
var argsTag = '[object Arguments]',
arrayTag = '[object Array]',
asyncTag = '[object AsyncFunction]',
boolTag = '[object Boolean]',
dateTag = '[object Date]',
domExcTag = '[object DOMException]',
errorTag = '[object Error]',
funcTag = '[object Function]',
genTag = '[object GeneratorFunction]',
mapTag = '[object Map]',
numberTag = '[object Number]',
nullTag = '[object Null]',
objectTag = '[object Object]',
promiseTag = '[object Promise]',
proxyTag = '[object Proxy]',
regexpTag = '[object RegExp]',
setTag = '[object Set]',
stringTag = '[object String]',
symbolTag = '[object Symbol]',
undefinedTag = '[object Undefined]',
weakMapTag = '[object WeakMap]',
weakSetTag = '[object WeakSet]';
var arrayBufferTag = '[object ArrayBuffer]',
dataViewTag = '[object DataView]',
float32Tag = '[object Float32Array]',
float64Tag = '[object Float64Array]',
int8Tag = '[object Int8Array]',
int16Tag = '[object Int16Array]',
int32Tag = '[object Int32Array]',
uint8Tag = '[object Uint8Array]',
uint8ClampedTag = '[object Uint8ClampedArray]',
uint16Tag = '[object Uint16Array]',
uint32Tag = '[object Uint32Array]';
var reEmptyStringLeading = /\b__p \+= '';/g,
reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,
reUnescapedHtml = /[&<>"']/g,
reHasEscapedHtml = RegExp(reEscapedHtml.source),
reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
var reEscape = /<%-([\s\S]+?)%>/g,
reEvaluate = /<%([\s\S]+?)%>/g,
reInterpolate = /<%=([\s\S]+?)%>/g;
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
reIsPlainProp = /^\w*$/,
reLeadingDot = /^\./,
rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
reHasRegExpChar = RegExp(reRegExpChar.source);
var reTrim = /^\s+|\s+$/g,
reTrimStart = /^\s+/,
reTrimEnd = /\s+$/;
var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,
reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/,
reSplitDetails = /,? & /;
var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
var reEscapeChar = /\\(\\)?/g;
var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
var reFlags = /\w*$/;
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
var reIsBinary = /^0b[01]+$/i;
var reIsHostCtor = /^\[object .+?Constructor\]$/;
var reIsOctal = /^0o[0-7]+$/i;
var reIsUint = /^(?:0|[1-9]\d*)$/;
var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
var reNoMatch = /($^)/;
var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
var rsAstralRange = '\\ud800-\\udfff',
rsComboMarksRange = '\\u0300-\\u036f',
reComboHalfMarksRange = '\\ufe20-\\ufe2f',
rsComboSymbolsRange = '\\u20d0-\\u20ff',
rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
rsDingbatRange = '\\u2700-\\u27bf',
rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
rsPunctuationRange = '\\u2000-\\u206f',
rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000',
rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
rsVarRange = '\\ufe0e\\ufe0f',
rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
var rsApos = '[\'\u2019]',
rsAstral = '[' + rsAstralRange + ']',
rsBreak = '[' + rsBreakRange + ']',
rsCombo = '[' + rsComboRange + ']',
rsDigits = '\\d+',
rsDingbat = '[' + rsDingbatRange + ']',
rsLower = '[' + rsLowerRange + ']',
rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
rsFitz = '\\ud83c[\\udffb-\\udfff]',
rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
rsNonAstral = '[^' + rsAstralRange + ']',
rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
rsUpper = '[' + rsUpperRange + ']',
rsZWJ = '\\u200d';
var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',
rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',
rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',
rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',
reOptMod = rsModifier + '?',
rsOptVar = '[' + rsVarRange + ']?',
rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
rsOrdLower = '\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)',
rsOrdUpper = '\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)',
rsSeq = rsOptVar + reOptMod + rsOptJoin,
rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,
rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
var reApos = RegExp(rsApos, 'g');
var reComboMark = RegExp(rsCombo, 'g');
var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
var reUnicodeWord = RegExp([rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')', rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')', rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower, rsUpper + '+' + rsOptContrUpper, rsOrdUpper, rsOrdLower, rsDigits, rsEmoji].join('|'), 'g');
var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');
var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
var contextProps = ['Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array', 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object', 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array', 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap', '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'];
var templateCounter = -1;
var typedArrayTags = {};
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
var cloneableTags = {};
cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = cloneableTags[boolTag] = cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag] = cloneableTags[numberTag] = cloneableTags[objectTag] = cloneableTags[regexpTag] = cloneableTags[setTag] = cloneableTags[stringTag] = cloneableTags[symbolTag] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false;
var deburredLetters = {
'\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
'\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
'\xc7': 'C', '\xe7': 'c',
'\xd0': 'D', '\xf0': 'd',
'\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
'\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
'\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
'\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
'\xd1': 'N', '\xf1': 'n',
'\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
'\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
'\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
'\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
'\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
'\xc6': 'Ae', '\xe6': 'ae',
'\xde': 'Th', '\xfe': 'th',
'\xdf': 'ss',
'\u0100': 'A', '\u0102': 'A', '\u0104': 'A',
'\u0101': 'a', '\u0103': 'a', '\u0105': 'a',
'\u0106': 'C', '\u0108': 'C', '\u010A': 'C', '\u010C': 'C',
'\u0107': 'c', '\u0109': 'c', '\u010B': 'c', '\u010D': 'c',
'\u010E': 'D', '\u0110': 'D', '\u010F': 'd', '\u0111': 'd',
'\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011A': 'E',
'\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011B': 'e',
'\u011C': 'G', '\u011E': 'G', '\u0120': 'G', '\u0122': 'G',
'\u011D': 'g', '\u011F': 'g', '\u0121': 'g', '\u0123': 'g',
'\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
'\u0128': 'I', '\u012A': 'I', '\u012C': 'I', '\u012E': 'I', '\u0130': 'I',
'\u0129': 'i', '\u012B': 'i', '\u012D': 'i', '\u012F': 'i', '\u0131': 'i',
'\u0134': 'J', '\u0135': 'j',
'\u0136': 'K', '\u0137': 'k', '\u0138': 'k',
'\u0139': 'L', '\u013B': 'L', '\u013D': 'L', '\u013F': 'L', '\u0141': 'L',
'\u013A': 'l', '\u013C': 'l', '\u013E': 'l', '\u0140': 'l', '\u0142': 'l',
'\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014A': 'N',
'\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014B': 'n',
'\u014C': 'O', '\u014E': 'O', '\u0150': 'O',
'\u014D': 'o', '\u014F': 'o', '\u0151': 'o',
'\u0154': 'R', '\u0156': 'R', '\u0158': 'R',
'\u0155': 'r', '\u0157': 'r', '\u0159': 'r',
'\u015A': 'S', '\u015C': 'S', '\u015E': 'S', '\u0160': 'S',
'\u015B': 's', '\u015D': 's', '\u015F': 's', '\u0161': 's',
'\u0162': 'T', '\u0164': 'T', '\u0166': 'T',
'\u0163': 't', '\u0165': 't', '\u0167': 't',
'\u0168': 'U', '\u016A': 'U', '\u016C': 'U', '\u016E': 'U', '\u0170': 'U', '\u0172': 'U',
'\u0169': 'u', '\u016B': 'u', '\u016D': 'u', '\u016F': 'u', '\u0171': 'u', '\u0173': 'u',
'\u0174': 'W', '\u0175': 'w',
'\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y',
'\u0179': 'Z', '\u017B': 'Z', '\u017D': 'Z',
'\u017A': 'z', '\u017C': 'z', '\u017E': 'z',
'\u0132': 'IJ', '\u0133': 'ij',
'\u0152': 'Oe', '\u0153': 'oe',
'\u0149': "'n", '\u017F': 's'
};
var htmlEscapes = {
'&': '&amp;',
'<': '&lt;',
'>': '&gt;',
'"': '&quot;',
"'": '&#39;'
};
var htmlUnescapes = {
'&amp;': '&',
'&lt;': '<',
'&gt;': '>',
'&quot;': '"',
'&#39;': "'"
};
var stringEscapes = {
'\\': '\\',
"'": "'",
'\n': 'n',
'\r': 'r',
'\u2028': 'u2028',
'\u2029': 'u2029'
};
var freeParseFloat = parseFloat,
freeParseInt = parseInt;
var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
var root = freeGlobal || freeSelf || Function('return this')();
var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
var moduleExports = freeModule && freeModule.exports === freeExports;
var freeProcess = moduleExports && freeGlobal.process;
var nodeUtil = function () {
try {
return freeProcess && freeProcess.binding && freeProcess.binding('util');
} catch (e) {}
}();
var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer,
nodeIsDate = nodeUtil && nodeUtil.isDate,
nodeIsMap = nodeUtil && nodeUtil.isMap,
nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,
nodeIsSet = nodeUtil && nodeUtil.isSet,
nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
function addMapEntry(map, pair) {
map.set(pair[0], pair[1]);
return map;
}
function addSetEntry(set, value) {
set.add(value);
return set;
}
function apply(func, thisArg, args) {
switch (args.length) {
case 0:
return func.call(thisArg);
case 1:
return func.call(thisArg, args[0]);
case 2:
return func.call(thisArg, args[0], args[1]);
case 3:
return func.call(thisArg, args[0], args[1], args[2]);
}
return func.apply(thisArg, args);
}
function arrayAggregator(array, setter, iteratee, accumulator) {
var index = -1,
length = array == null ? 0 : array.length;
while (++index < length) {
var value = array[index];
setter(accumulator, value, iteratee(value), array);
}
return accumulator;
}
function arrayEach(array, iteratee) {
var index = -1,
length = array == null ? 0 : array.length;
while (++index < length) {
if (iteratee(array[index], index, array) === false) {
break;
}
}
return array;
}
function arrayEachRight(array, iteratee) {
var length = array == null ? 0 : array.length;
while (length--) {
if (iteratee(array[length], length, array) === false) {
break;
}
}
return array;
}
function arrayEvery(array, predicate) {
var index = -1,
length = array == null ? 0 : array.length;
while (++index < length) {
if (!predicate(array[index], index, array)) {
return false;
}
}
return true;
}
function arrayFilter(array, predicate) {
var index = -1,
length = array == null ? 0 : array.length,
resIndex = 0,
result = [];
while (++index < length) {
var value = array[index];
if (predicate(value, index, array)) {
result[resIndex++] = value;
}
}
return result;
}
function arrayIncludes(array, value) {
var length = array == null ? 0 : array.length;
return !!length && baseIndexOf(array, value, 0) > -1;
}
function arrayIncludesWith(array, value, comparator) {
var index = -1,
length = array == null ? 0 : array.length;
while (++index < length) {
if (comparator(value, array[index])) {
return true;
}
}
return false;
}
function arrayMap(array, iteratee) {
var index = -1,
length = array == null ? 0 : array.length,
result = Array(length);
while (++index < length) {
result[index] = iteratee(array[index], index, array);
}
return result;
}
function arrayPush(array, values) {
var index = -1,
length = values.length,
offset = array.length;
while (++index < length) {
array[offset + index] = values[index];
}
return array;
}
function arrayReduce(array, iteratee, accumulator, initAccum) {
var index = -1,
length = array == null ? 0 : array.length;
if (initAccum && length) {
accumulator = array[++index];
}
while (++index < length) {
accumulator = iteratee(accumulator, array[index], index, array);
}
return accumulator;
}
function arrayReduceRight(array, iteratee, accumulator, initAccum) {
var length = array == null ? 0 : array.length;
if (initAccum && length) {
accumulator = array[--length];
}
while (length--) {
accumulator = iteratee(accumulator, array[length], length, array);
}
return accumulator;
}
function arraySome(array, predicate) {
var index = -1,
length = array == null ? 0 : array.length;
while (++index < length) {
if (predicate(array[index], index, array)) {
return true;
}
}
return false;
}
var asciiSize = baseProperty('length');
function asciiToArray(string) {
return string.split('');
}
function asciiWords(string) {
return string.match(reAsciiWord) || [];
}
function baseFindKey(collection, predicate, eachFunc) {
var result;
eachFunc(collection, function (value, key, collection) {
if (predicate(value, key, collection)) {
result = key;
return false;
}
});
return result;
}
function baseFindIndex(array, predicate, fromIndex, fromRight) {
var length = array.length,
index = fromIndex + (fromRight ? 1 : -1);
while (fromRight ? index-- : ++index < length) {
if (predicate(array[index], index, array)) {
return index;
}
}
return -1;
}
function baseIndexOf(array, value, fromIndex) {
return value === value ? strictIndexOf(array, value, fromIndex) : baseFindIndex(array, baseIsNaN, fromIndex);
}
function baseIndexOfWith(array, value, fromIndex, comparator) {
var index = fromIndex - 1,
length = array.length;
while (++index < length) {
if (comparator(array[index], value)) {
return index;
}
}
return -1;
}
function baseIsNaN(value) {
return value !== value;
}
function baseMean(array, iteratee) {
var length = array == null ? 0 : array.length;
return length ? baseSum(array, iteratee) / length : NAN;
}
function baseProperty(key) {
return function (object) {
return object == null ? undefined : object[key];
};
}
function basePropertyOf(object) {
return function (key) {
return object == null ? undefined : object[key];
};
}
function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
eachFunc(collection, function (value, index, collection) {
accumulator = initAccum ? (initAccum = false, value) : iteratee(accumulator, value, index, collection);
});
return accumulator;
}
function baseSortBy(array, comparer) {
var length = array.length;
array.sort(comparer);
while (length--) {
array[length] = array[length].value;
}
return array;
}
function baseSum(array, iteratee) {
var result,
index = -1,
length = array.length;
while (++index < length) {
var current = iteratee(array[index]);
if (current !== undefined) {
result = result === undefined ? current : result + current;
}
}
return result;
}
function baseTimes(n, iteratee) {
var index = -1,
result = Array(n);
while (++index < n) {
result[index] = iteratee(index);
}
return result;
}
function baseToPairs(object, props) {
return arrayMap(props, function (key) {
return [key, object[key]];
});
}
function baseUnary(func) {
return function (value) {
return func(value);
};
}
function baseValues(object, props) {
return arrayMap(props, function (key) {
return object[key];
});
}
function cacheHas(cache, key) {
return cache.has(key);
}
function charsStartIndex(strSymbols, chrSymbols) {
var index = -1,
length = strSymbols.length;
while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
return index;
}
function charsEndIndex(strSymbols, chrSymbols) {
var index = strSymbols.length;
while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
return index;
}
function countHolders(array, placeholder) {
var length = array.length,
result = 0;
while (length--) {
if (array[length] === placeholder) {
++result;
}
}
return result;
}
var deburrLetter = basePropertyOf(deburredLetters);
var escapeHtmlChar = basePropertyOf(htmlEscapes);
function escapeStringChar(chr) {
return '\\' + stringEscapes[chr];
}
function getValue(object, key) {
return object == null ? undefined : object[key];
}
function hasUnicode(string) {
return reHasUnicode.test(string);
}
function hasUnicodeWord(string) {
return reHasUnicodeWord.test(string);
}
function iteratorToArray(iterator) {
var data,
result = [];
while (!(data = iterator.next()).done) {
result.push(data.value);
}
return result;
}
function mapToArray(map) {
var index = -1,
result = Array(map.size);
map.forEach(function (value, key) {
result[++index] = [key, value];
});
return result;
}
function overArg(func, transform) {
return function (arg) {
return func(transform(arg));
};
}
function replaceHolders(array, placeholder) {
var index = -1,
length = array.length,
resIndex = 0,
result = [];
while (++index < length) {
var value = array[index];
if (value === placeholder || value === PLACEHOLDER) {
array[index] = PLACEHOLDER;
result[resIndex++] = index;
}
}
return result;
}
function setToArray(set) {
var index = -1,
result = Array(set.size);
set.forEach(function (value) {
result[++index] = value;
});
return result;
}
function setToPairs(set) {
var index = -1,
result = Array(set.size);
set.forEach(function (value) {
result[++index] = [value, value];
});
return result;
}
function strictIndexOf(array, value, fromIndex) {
var index = fromIndex - 1,
length = array.length;
while (++index < length) {
if (array[index] === value) {
return index;
}
}
return -1;
}
function strictLastIndexOf(array, value, fromIndex) {
var index = fromIndex + 1;
while (index--) {
if (array[index] === value) {
return index;
}
}
return index;
}
function stringSize(string) {
return hasUnicode(string) ? unicodeSize(string) : asciiSize(string);
}
function stringToArray(string) {
return hasUnicode(string) ? unicodeToArray(string) : asciiToArray(string);
}
var unescapeHtmlChar = basePropertyOf(htmlUnescapes);
function unicodeSize(string) {
var result = reUnicode.lastIndex = 0;
while (reUnicode.test(string)) {
++result;
}
return result;
}
function unicodeToArray(string) {
return string.match(reUnicode) || [];
}
function unicodeWords(string) {
return string.match(reUnicodeWord) || [];
}
var runInContext = function runInContext(context) {
context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));
var Array = context.Array,
Date = context.Date,
Error = context.Error,
Function = context.Function,
Math = context.Math,
Object = context.Object,
RegExp = context.RegExp,
String = context.String,
TypeError = context.TypeError;
var arrayProto = Array.prototype,
funcProto = Function.prototype,
objectProto = Object.prototype;
var coreJsData = context['__core-js_shared__'];
var funcToString = funcProto.toString;
var hasOwnProperty = objectProto.hasOwnProperty;
var idCounter = 0;
var maskSrcKey = function () {
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
return uid ? 'Symbol(src)_1.' + uid : '';
}();
var nativeObjectToString = objectProto.toString;
var objectCtorString = funcToString.call(Object);
var oldDash = root._;
var reIsNative = RegExp('^' + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$');
var Buffer = moduleExports ? context.Buffer : undefined,
Symbol = context.Symbol,
Uint8Array = context.Uint8Array,
allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,
getPrototype = overArg(Object.getPrototypeOf, Object),
objectCreate = Object.create,
propertyIsEnumerable = objectProto.propertyIsEnumerable,
splice = arrayProto.splice,
spreadableSymbol = Symbol ? typeof Symbol === 'function' ? Symbol.isConcatSpreadable : '@@isConcatSpreadable' : undefined,
symIterator = Symbol ? typeof Symbol === 'function' ? Symbol.iterator : '@@iterator' : undefined,
symToStringTag = Symbol ? typeof Symbol === 'function' ? Symbol.toStringTag : '@@toStringTag' : undefined;
var defineProperty = function () {
try {
var func = getNative(Object, 'defineProperty');
func({}, '', {});
return func;
} catch (e) {}
}();
var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,
ctxNow = Date && Date.now !== root.Date.now && Date.now,
ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;
var nativeCeil = Math.ceil,
nativeFloor = Math.floor,
nativeGetSymbols = Object.getOwnPropertySymbols,
nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
nativeIsFinite = context.isFinite,
nativeJoin = arrayProto.join,
nativeKeys = overArg(Object.keys, Object),
nativeMax = Math.max,
nativeMin = Math.min,
nativeNow = Date.now,
nativeParseInt = context.parseInt,
nativeRandom = Math.random,
nativeReverse = arrayProto.reverse;
var DataView = getNative(context, 'DataView'),
Map = getNative(context, 'Map'),
Promise = getNative(context, 'Promise'),
Set = getNative(context, 'Set'),
WeakMap = getNative(context, 'WeakMap'),
nativeCreate = getNative(Object, 'create');
var metaMap = WeakMap && new WeakMap();
var realNames = {};
var dataViewCtorString = toSource(DataView),
mapCtorString = toSource(Map),
promiseCtorString = toSource(Promise),
setCtorString = toSource(Set),
weakMapCtorString = toSource(WeakMap);
var symbolProto = Symbol ? typeof Symbol === 'function' ? Symbol.prototype : '@@prototype' : undefined,
symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,
symbolToString = symbolProto ? symbolProto.toString : undefined;
function lodash(value) {
if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
if (value instanceof LodashWrapper) {
return value;
}
if (hasOwnProperty.call(value, '__wrapped__')) {
return wrapperClone(value);
}
}
return new LodashWrapper(value);
}
var baseCreate = function () {
function object() {}
return function (proto) {
if (!isObject(proto)) {
return {};
}
if (objectCreate) {
return objectCreate(proto);
}
object.prototype = proto;
var result = new object();
object.prototype = undefined;
return result;
};
}();
function baseLodash() {}
function LodashWrapper(value, chainAll) {
this.__wrapped__ = value;
this.__actions__ = [];
this.__chain__ = !!chainAll;
this.__index__ = 0;
this.__values__ = undefined;
}
lodash.templateSettings = {
'escape': reEscape,
'evaluate': reEvaluate,
'interpolate': reInterpolate,
'variable': '',
'imports': {
'_': lodash
}
};
lodash.prototype = baseLodash.prototype;
lodash.prototype.constructor = lodash;
LodashWrapper.prototype = baseCreate(baseLodash.prototype);
LodashWrapper.prototype.constructor = LodashWrapper;
function LazyWrapper(value) {
this.__wrapped__ = value;
this.__actions__ = [];
this.__dir__ = 1;
this.__filtered__ = false;
this.__iteratees__ = [];
this.__takeCount__ = MAX_ARRAY_LENGTH;
this.__views__ = [];
}
function lazyClone() {
var result = new LazyWrapper(this.__wrapped__);
result.__actions__ = copyArray(this.__actions__);
result.__dir__ = this.__dir__;
result.__filtered__ = this.__filtered__;
result.__iteratees__ = copyArray(this.__iteratees__);
result.__takeCount__ = this.__takeCount__;
result.__views__ = copyArray(this.__views__);
return result;
}
function lazyReverse() {
if (this.__filtered__) {
var result = new LazyWrapper(this);
result.__dir__ = -1;
result.__filtered__ = true;
} else {
result = this.clone();
result.__dir__ *= -1;
}
return result;
}
function lazyValue() {
var array = this.__wrapped__.value(),
dir = this.__dir__,
isArr = isArray(array),
isRight = dir < 0,
arrLength = isArr ? array.length : 0,
view = getView(0, arrLength, this.__views__),
start = view.start,
end = view.end,
length = end - start,
index = isRight ? end : start - 1,
iteratees = this.__iteratees__,
iterLength = iteratees.length,
resIndex = 0,
takeCount = nativeMin(length, this.__takeCount__);
if (!isArr || !isRight && arrLength == length && takeCount == length) {
return baseWrapperValue(array, this.__actions__);
}
var result = [];
outer: while (length-- && resIndex < takeCount) {
index += dir;
var iterIndex = -1,
value = array[index];
while (++iterIndex < iterLength) {
var data = iteratees[iterIndex],
iteratee = data.iteratee,
type = data.type,
computed = iteratee(value);
if (type == LAZY_MAP_FLAG) {
value = computed;
} else if (!computed) {
if (type == LAZY_FILTER_FLAG) {
continue outer;
} else {
break outer;
}
}
}
result[resIndex++] = value;
}
return result;
}
LazyWrapper.prototype = baseCreate(baseLodash.prototype);
LazyWrapper.prototype.constructor = LazyWrapper;
function Hash(entries) {
var index = -1,
length = entries == null ? 0 : entries.length;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
function hashClear() {
this.__data__ = nativeCreate ? nativeCreate(null) : {};
this.size = 0;
}
function hashDelete(key) {
var result = this.has(key) && delete this.__data__[key];
this.size -= result ? 1 : 0;
return result;
}
function hashGet(key) {
var data = this.__data__;
if (nativeCreate) {
var result = data[key];
return result === HASH_UNDEFINED ? undefined : result;
}
return hasOwnProperty.call(data, key) ? data[key] : undefined;
}
function hashHas(key) {
var data = this.__data__;
return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
}
function hashSet(key, value) {
var data = this.__data__;
this.size += this.has(key) ? 0 : 1;
data[key] = nativeCreate && value === undefined ? HASH_UNDEFINED : value;
return this;
}
Hash.prototype.clear = hashClear;
Hash.prototype['delete'] = hashDelete;
Hash.prototype.get = hashGet;
Hash.prototype.has = hashHas;
Hash.prototype.set = hashSet;
function ListCache(entries) {
var index = -1,
length = entries == null ? 0 : entries.length;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
function listCacheClear() {
this.__data__ = [];
this.size = 0;
}
function listCacheDelete(key) {
var data = this.__data__,
index = assocIndexOf(data, key);
if (index < 0) {
return false;
}
var lastIndex = data.length - 1;
if (index == lastIndex) {
data.pop();
} else {
splice.call(data, index, 1);
}
--this.size;
return true;
}
function listCacheGet(key) {
var data = this.__data__,
index = assocIndexOf(data, key);
return index < 0 ? undefined : data[index][1];
}
function listCacheHas(key) {
return assocIndexOf(this.__data__, key) > -1;
}
function listCacheSet(key, value) {
var data = this.__data__,
index = assocIndexOf(data, key);
if (index < 0) {
++this.size;
data.push([key, value]);
} else {
data[index][1] = value;
}
return this;
}
ListCache.prototype.clear = listCacheClear;
ListCache.prototype['delete'] = listCacheDelete;
ListCache.prototype.get = listCacheGet;
ListCache.prototype.has = listCacheHas;
ListCache.prototype.set = listCacheSet;
function MapCache(entries) {
var index = -1,
length = entries == null ? 0 : entries.length;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
function mapCacheClear() {
this.size = 0;
this.__data__ = {
'hash': new Hash(),
'map': new (Map || ListCache)(),
'string': new Hash()
};
}
function mapCacheDelete(key) {
var result = getMapData(this, key)['delete'](key);
this.size -= result ? 1 : 0;
return result;
}
function mapCacheGet(key) {
return getMapData(this, key).get(key);
}
function mapCacheHas(key) {
return getMapData(this, key).has(key);
}
function mapCacheSet(key, value) {
var data = getMapData(this, key),
size = data.size;
data.set(key, value);
this.size += data.size == size ? 0 : 1;
return this;
}
MapCache.prototype.clear = mapCacheClear;
MapCache.prototype['delete'] = mapCacheDelete;
MapCache.prototype.get = mapCacheGet;
MapCache.prototype.has = mapCacheHas;
MapCache.prototype.set = mapCacheSet;
function SetCache(values) {
var index = -1,
length = values == null ? 0 : values.length;
this.__data__ = new MapCache();
while (++index < length) {
this.add(values[index]);
}
}
function setCacheAdd(value) {
this.__data__.set(value, HASH_UNDEFINED);
return this;
}
function setCacheHas(value) {
return this.__data__.has(value);
}
SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
SetCache.prototype.has = setCacheHas;
function Stack(entries) {
var data = this.__data__ = new ListCache(entries);
this.size = data.size;
}
function stackClear() {
this.__data__ = new ListCache();
this.size = 0;
}
function stackDelete(key) {
var data = this.__data__,
result = data['delete'](key);
this.size = data.size;
return result;
}
function stackGet(key) {
return this.__data__.get(key);
}
function stackHas(key) {
return this.__data__.has(key);
}
function stackSet(key, value) {
var data = this.__data__;
if (data instanceof ListCache) {
var pairs = data.__data__;
if (!Map || pairs.length < LARGE_ARRAY_SIZE - 1) {
pairs.push([key, value]);
this.size = ++data.size;
return this;
}
data = this.__data__ = new MapCache(pairs);
}
data.set(key, value);
this.size = data.size;
return this;
}
Stack.prototype.clear = stackClear;
Stack.prototype['delete'] = stackDelete;
Stack.prototype.get = stackGet;
Stack.prototype.has = stackHas;
Stack.prototype.set = stackSet;
function arrayLikeKeys(value, inherited) {
var isArr = isArray(value),
isArg = !isArr && isArguments(value),
isBuff = !isArr && !isArg && isBuffer(value),
isType = !isArr && !isArg && !isBuff && isTypedArray(value),
skipIndexes = isArr || isArg || isBuff || isType,
result = skipIndexes ? baseTimes(value.length, String) : [],
length = result.length;
for (var key in value) {
if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && (key == 'length' || isBuff && (key == 'offset' || key == 'parent') || isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset') || isIndex(key, length)))) {
result.push(key);
}
}
return result;
}
function arraySample(array) {
var length = array.length;
return length ? array[baseRandom(0, length - 1)] : undefined;
}
function arraySampleSize(array, n) {
return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));
}
function arrayShuffle(array) {
return shuffleSelf(copyArray(array));
}
function assignMergeValue(object, key, value) {
if (value !== undefined && !eq(object[key], value) || value === undefined && !(key in object)) {
baseAssignValue(object, key, value);
}
}
function assignValue(object, key, value) {
var objValue = object[key];
if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || value === undefined && !(key in object)) {
baseAssignValue(object, key, value);
}
}
function assocIndexOf(array, key) {
var length = array.length;
while (length--) {
if (eq(array[length][0], key)) {
return length;
}
}
return -1;
}
function baseAggregator(collection, setter, iteratee, accumulator) {
baseEach(collection, function (value, key, collection) {
setter(accumulator, value, iteratee(value), collection);
});
return accumulator;
}
function baseAssign(object, source) {
return object && copyObject(source, keys(source), object);
}
function baseAssignIn(object, source) {
return object && copyObject(source, keysIn(source), object);
}
function baseAssignValue(object, key, value) {
if (key == '__proto__' && defineProperty) {
defineProperty(object, key, {
'configurable': true,
'enumerable': true,
'value': value,
'writable': true
});
} else {
object[key] = value;
}
}
function baseAt(object, paths) {
var index = -1,
length = paths.length,
result = Array(length),
skip = object == null;
while (++index < length) {
result[index] = skip ? undefined : get(object, paths[index]);
}
return result;
}
function baseClamp(number, lower, upper) {
if (number === number) {
if (upper !== undefined) {
number = number <= upper ? number : upper;
}
if (lower !== undefined) {
number = number >= lower ? number : lower;
}
}
return number;
}
function baseClone(value, bitmask, customizer, key, object, stack) {
var result,
isDeep = bitmask & CLONE_DEEP_FLAG,
isFlat = bitmask & CLONE_FLAT_FLAG,
isFull = bitmask & CLONE_SYMBOLS_FLAG;
if (customizer) {
result = object ? customizer(value, key, object, stack) : customizer(value);
}
if (result !== undefined) {
return result;
}
if (!isObject(value)) {
return value;
}
var isArr = isArray(value);
if (isArr) {
result = initCloneArray(value);
if (!isDeep) {
return copyArray(value, result);
}
} else {
var tag = getTag(value),
isFunc = tag == funcTag || tag == genTag;
if (isBuffer(value)) {
return cloneBuffer(value, isDeep);
}
if (tag == objectTag || tag == argsTag || isFunc && !object) {
result = isFlat || isFunc ? {} : initCloneObject(value);
if (!isDeep) {
return isFlat ? copySymbolsIn(value, baseAssignIn(result, value)) : copySymbols(value, baseAssign(result, value));
}
} else {
if (!cloneableTags[tag]) {
return object ? value : {};
}
result = initCloneByTag(value, tag, baseClone, isDeep);
}
}
stack || (stack = new Stack());
var stacked = stack.get(value);
if (stacked) {
return stacked;
}
stack.set(value, result);
var keysFunc = isFull ? isFlat ? getAllKeysIn : getAllKeys : isFlat ? keysIn : keys;
var props = isArr ? undefined : keysFunc(value);
arrayEach(props || value, function (subValue, key) {
if (props) {
key = subValue;
subValue = value[key];
}
assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
});
return result;
}
function baseConforms(source) {
var props = keys(source);
return function (object) {
return baseConformsTo(object, source, props);
};
}
function baseConformsTo(object, source, props) {
var length = props.length;
if (object == null) {
return !length;
}
object = Object(object);
while (length--) {
var key = props[length],
predicate = source[key],
value = object[key];
if (value === undefined && !(key in object) || !predicate(value)) {
return false;
}
}
return true;
}
function baseDelay(func, wait, args) {
if (typeof func != 'function') {
throw new TypeError(FUNC_ERROR_TEXT);
}
return setTimeout(function () {
func.apply(undefined, args);
}, wait);
}
function baseDifference(array, values, iteratee, comparator) {
var index = -1,
includes = arrayIncludes,
isCommon = true,
length = array.length,
result = [],
valuesLength = values.length;
if (!length) {
return result;
}
if (iteratee) {
values = arrayMap(values, baseUnary(iteratee));
}
if (comparator) {
includes = arrayIncludesWith;
isCommon = false;
} else if (values.length >= LARGE_ARRAY_SIZE) {
includes = cacheHas;
isCommon = false;
values = new SetCache(values);
}
outer: while (++index < length) {
var value = array[index],
computed = iteratee == null ? value : iteratee(value);
value = comparator || value !== 0 ? value : 0;
if (isCommon && computed === computed) {
var valuesIndex = valuesLength;
while (valuesIndex--) {
if (values[valuesIndex] === computed) {
continue outer;
}
}
result.push(value);
} else if (!includes(values, computed, comparator)) {
result.push(value);
}
}
return result;
}
var baseEach = createBaseEach(baseForOwn);
var baseEachRight = createBaseEach(baseForOwnRight, true);
function baseEvery(collection, predicate) {
var result = true;
baseEach(collection, function (value, index, collection) {
result = !!predicate(value, index, collection);
return result;
});
return result;
}
function baseExtremum(array, iteratee, comparator) {
var index = -1,
length = array.length;
while (++index < length) {
var value = array[index],
current = iteratee(value);
if (current != null && (computed === undefined ? current === current && !isSymbol(current) : comparator(current, computed))) {
var computed = current,
result = value;
}
}
return result;
}
function baseFill(array, value, start, end) {
var length = array.length;
start = toInteger(start);
if (start < 0) {
start = -start > length ? 0 : length + start;
}
end = end === undefined || end > length ? length : toInteger(end);
if (end < 0) {
end += length;
}
end = start > end ? 0 : toLength(end);
while (start < end) {
array[start++] = value;
}
return array;
}
function baseFilter(collection, predicate) {
var result = [];
baseEach(collection, function (value, index, collection) {
if (predicate(value, index, collection)) {
result.push(value);
}
});
return result;
}
function baseFlatten(array, depth, predicate, isStrict, result) {
var index = -1,
length = array.length;
predicate || (predicate = isFlattenable);
result || (result = []);
while (++index < length) {
var value = array[index];
if (depth > 0 && predicate(value)) {
if (depth > 1) {
baseFlatten(value, depth - 1, predicate, isStrict, result);
} else {
arrayPush(result, value);
}
} else if (!isStrict) {
result[result.length] = value;
}
}
return result;
}
var baseFor = createBaseFor();
var baseForRight = createBaseFor(true);
function baseForOwn(object, iteratee) {
return object && baseFor(object, iteratee, keys);
}
function baseForOwnRight(object, iteratee) {
return object && baseForRight(object, iteratee, keys);
}
function baseFunctions(object, props) {
return arrayFilter(props, function (key) {
return isFunction(object[key]);
});
}
function baseGet(object, path) {
path = castPath(path, object);
var index = 0,
length = path.length;
while (object != null && index < length) {
object = object[toKey(path[index++])];
}
return index && index == length ? object : undefined;
}
function baseGetAllKeys(object, keysFunc, symbolsFunc) {
var result = keysFunc(object);
return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
}
function baseGetTag(value) {
if (value == null) {
return value === undefined ? undefinedTag : nullTag;
}
return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
}
function baseGt(value, other) {
return value > other;
}
function baseHas(object, key) {
return object != null && hasOwnProperty.call(object, key);
}
function baseHasIn(object, key) {
return object != null && key in Object(object);
}
function baseInRange(number, start, end) {
return number >= nativeMin(start, end) && number < nativeMax(start, end);
}
function baseIntersection(arrays, iteratee, comparator) {
var includes = comparator ? arrayIncludesWith : arrayIncludes,
length = arrays[0].length,
othLength = arrays.length,
othIndex = othLength,
caches = Array(othLength),
maxLength = Infinity,
result = [];
while (othIndex--) {
var array = arrays[othIndex];
if (othIndex && iteratee) {
array = arrayMap(array, baseUnary(iteratee));
}
maxLength = nativeMin(array.length, maxLength);
caches[othIndex] = !comparator && (iteratee || length >= 120 && array.length >= 120) ? new SetCache(othIndex && array) : undefined;
}
array = arrays[0];
var index = -1,
seen = caches[0];
outer: while (++index < length && result.length < maxLength) {
var value = array[index],
computed = iteratee ? iteratee(value) : value;
value = comparator || value !== 0 ? value : 0;
if (!(seen ? cacheHas(seen, computed) : includes(result, computed, comparator))) {
othIndex = othLength;
while (--othIndex) {
var cache = caches[othIndex];
if (!(cache ? cacheHas(cache, computed) : includes(arrays[othIndex], computed, comparator))) {
continue outer;
}
}
if (seen) {
seen.push(computed);
}
result.push(value);
}
}
return result;
}
function baseInverter(object, setter, iteratee, accumulator) {
baseForOwn(object, function (value, key, object) {
setter(accumulator, iteratee(value), key, object);
});
return accumulator;
}
function baseInvoke(object, path, args) {
path = castPath(path, object);
object = parent(object, path);
var func = object == null ? object : object[toKey(last(path))];
return func == null ? undefined : apply(func, object, args);
}
function baseIsArguments(value) {
return isObjectLike(value) && baseGetTag(value) == argsTag;
}
function baseIsArrayBuffer(value) {
return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;
}
function baseIsDate(value) {
return isObjectLike(value) && baseGetTag(value) == dateTag;
}
function baseIsEqual(value, other, bitmask, customizer, stack) {
if (value === other) {
return true;
}
if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) {
return value !== value && other !== other;
}
return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
}
function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
var objIsArr = isArray(object),
othIsArr = isArray(other),
objTag = objIsArr ? arrayTag : getTag(object),
othTag = othIsArr ? arrayTag : getTag(other);
objTag = objTag == argsTag ? objectTag : objTag;
othTag = othTag == argsTag ? objectTag : othTag;
var objIsObj = objTag == objectTag,
othIsObj = othTag == objectTag,
isSameTag = objTag == othTag;
if (isSameTag && isBuffer(object)) {
if (!isBuffer(other)) {
return false;
}
objIsArr = true;
objIsObj = false;
}
if (isSameTag && !objIsObj) {
stack || (stack = new Stack());
return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
}
if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
if (objIsWrapped || othIsWrapped) {
var objUnwrapped = objIsWrapped ? object.value() : object,
othUnwrapped = othIsWrapped ? other.value() : other;
stack || (stack = new Stack());
return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
}
}
if (!isSameTag) {
return false;
}
stack || (stack = new Stack());
return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
}
function baseIsMap(value) {
return isObjectLike(value) && getTag(value) == mapTag;
}
function baseIsMatch(object, source, matchData, customizer) {
var index = matchData.length,
length = index,
noCustomizer = !customizer;
if (object == null) {
return !length;
}
object = Object(object);
while (index--) {
var data = matchData[index];
if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) {
return false;
}
}
while (++index < length) {
data = matchData[index];
var key = data[0],
objValue = object[key],
srcValue = data[1];
if (noCustomizer && data[2]) {
if (objValue === undefined && !(key in object)) {
return false;
}
} else {
var stack = new Stack();
if (customizer) {
var result = customizer(objValue, srcValue, key, object, source, stack);
}
if (!(result === undefined ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) : result)) {
return false;
}
}
}
return true;
}
function baseIsNative(value) {
if (!isObject(value) || isMasked(value)) {
return false;
}
var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
return pattern.test(toSource(value));
}
function baseIsRegExp(value) {
return isObjectLike(value) && baseGetTag(value) == regexpTag;
}
function baseIsSet(value) {
return isObjectLike(value) && getTag(value) == setTag;
}
function baseIsTypedArray(value) {
return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
}
function baseIteratee(value) {
if (typeof value == 'function') {
return value;
}
if (value == null) {
return identity;
}
if (typeof value == 'object') {
return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value);
}
return property(value);
}
function baseKeys(object) {
if (!isPrototype(object)) {
return nativeKeys(object);
}
var result = [];
for (var key in Object(object)) {
if (hasOwnProperty.call(object, key) && key != 'constructor') {
result.push(key);
}
}
return result;
}
function baseKeysIn(object) {
if (!isObject(object)) {
return nativeKeysIn(object);
}
var isProto = isPrototype(object),
result = [];
for (var key in object) {
if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
result.push(key);
}
}
return result;
}
function baseLt(value, other) {
return value < other;
}
function baseMap(collection, iteratee) {
var index = -1,
result = isArrayLike(collection) ? Array(collection.length) : [];
baseEach(collection, function (value, key, collection) {
result[++index] = iteratee(value, key, collection);
});
return result;
}
function baseMatches(source) {
var matchData = getMatchData(source);
if (matchData.length == 1 && matchData[0][2]) {
return matchesStrictComparable(matchData[0][0], matchData[0][1]);
}
return function (object) {
return object === source || baseIsMatch(object, source, matchData);
};
}
function baseMatchesProperty(path, srcValue) {
if (isKey(path) && isStrictComparable(srcValue)) {
return matchesStrictComparable(toKey(path), srcValue);
}
return function (object) {
var objValue = get(object, path);
return objValue === undefined && objValue === srcValue ? hasIn(object, path) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
};
}
function baseMerge(object, source, srcIndex, customizer, stack) {
if (object === source) {
return;
}
baseFor(source, function (srcValue, key) {
if (isObject(srcValue)) {
stack || (stack = new Stack());
baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
} else {
var newValue = customizer ? customizer(object[key], srcValue, key + '', object, source, stack) : undefined;
if (newValue === undefined) {
newValue = srcValue;
}
assignMergeValue(object, key, newValue);
}
}, keysIn);
}
function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
var objValue = object[key],
srcValue = source[key],
stacked = stack.get(srcValue);
if (stacked) {
assignMergeValue(object, key, stacked);
return;
}
var newValue = customizer ? customizer(objValue, srcValue, key + '', object, source, stack) : undefined;
var isCommon = newValue === undefined;
if (isCommon) {
var isArr = isArray(srcValue),
isBuff = !isArr && isBuffer(srcValue),
isTyped = !isArr && !isBuff && isTypedArray(srcValue);
newValue = srcValue;
if (isArr || isBuff || isTyped) {
if (isArray(objValue)) {
newValue = objValue;
} else if (isArrayLikeObject(objValue)) {
newValue = copyArray(objValue);
} else if (isBuff) {
isCommon = false;
newValue = cloneBuffer(srcValue, true);
} else if (isTyped) {
isCommon = false;
newValue = cloneTypedArray(srcValue, true);
} else {
newValue = [];
}
} else if (isPlainObject(srcValue) || isArguments(srcValue)) {
newValue = objValue;
if (isArguments(objValue)) {
newValue = toPlainObject(objValue);
} else if (!isObject(objValue) || srcIndex && isFunction(objValue)) {
newValue = initCloneObject(srcValue);
}
} else {
isCommon = false;
}
}
if (isCommon) {
stack.set(srcValue, newValue);
mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
stack['delete'](srcValue);
}
assignMergeValue(object, key, newValue);
}
function baseNth(array, n) {
var length = array.length;
if (!length) {
return;
}
n += n < 0 ? length : 0;
return isIndex(n, length) ? array[n] : undefined;
}
function baseOrderBy(collection, iteratees, orders) {
var index = -1;
iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(getIteratee()));
var result = baseMap(collection, function (value, key, collection) {
var criteria = arrayMap(iteratees, function (iteratee) {
return iteratee(value);
});
return { 'criteria': criteria, 'index': ++index, 'value': value };
});
return baseSortBy(result, function (object, other) {
return compareMultiple(object, other, orders);
});
}
function basePick(object, paths) {
return basePickBy(object, paths, function (value, path) {
return hasIn(object, path);
});
}
function basePickBy(object, paths, predicate) {
var index = -1,
length = paths.length,
result = {};
while (++index < length) {
var path = paths[index],
value = baseGet(object, path);
if (predicate(value, path)) {
baseSet(result, castPath(path, object), value);
}
}
return result;
}
function basePropertyDeep(path) {
return function (object) {
return baseGet(object, path);
};
}
function basePullAll(array, values, iteratee, comparator) {
var indexOf = comparator ? baseIndexOfWith : baseIndexOf,
index = -1,
length = values.length,
seen = array;
if (array === values) {
values = copyArray(values);
}
if (iteratee) {
seen = arrayMap(array, baseUnary(iteratee));
}
while (++index < length) {
var fromIndex = 0,
value = values[index],
computed = iteratee ? iteratee(value) : value;
while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {
if (seen !== array) {
splice.call(seen, fromIndex, 1);
}
splice.call(array, fromIndex, 1);
}
}
return array;
}
function basePullAt(array, indexes) {
var length = array ? indexes.length : 0,
lastIndex = length - 1;
while (length--) {
var index = indexes[length];
if (length == lastIndex || index !== previous) {
var previous = index;
if (isIndex(index)) {
splice.call(array, index, 1);
} else {
baseUnset(array, index);
}
}
}
return array;
}
function baseRandom(lower, upper) {
return lower + nativeFloor(nativeRandom() * (upper - lower + 1));
}
function baseRange(start, end, step, fromRight) {
var index = -1,
length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),
result = Array(length);
while (length--) {
result[fromRight ? length : ++index] = start;
start += step;
}
return result;
}
function baseRepeat(string, n) {
var result = '';
if (!string || n < 1 || n > MAX_SAFE_INTEGER) {
return result;
}
do {
if (n % 2) {
result += string;
}
n = nativeFloor(n / 2);
if (n) {
string += string;
}
} while (n);
return result;
}
function baseRest(func, start) {
return setToString(overRest(func, start, identity), func + '');
}
function baseSample(collection) {
return arraySample(values(collection));
}
function baseSampleSize(collection, n) {
var array = values(collection);
return shuffleSelf(array, baseClamp(n, 0, array.length));
}
function baseSet(object, path, value, customizer) {
if (!isObject(object)) {
return object;
}
path = castPath(path, object);
var index = -1,
length = path.length,
lastIndex = length - 1,
nested = object;
while (nested != null && ++index < length) {
var key = toKey(path[index]),
newValue = value;
if (index != lastIndex) {
var objValue = nested[key];
newValue = customizer ? customizer(objValue, key, nested) : undefined;
if (newValue === undefined) {
newValue = isObject(objValue) ? objValue : isIndex(path[index + 1]) ? [] : {};
}
}
assignValue(nested, key, newValue);
nested = nested[key];
}
return object;
}
var baseSetData = !metaMap ? identity : function (func, data) {
metaMap.set(func, data);
return func;
};
var baseSetToString = !defineProperty ? identity : function (func, string) {
return defineProperty(func, 'toString', {
'configurable': true,
'enumerable': false,
'value': constant(string),
'writable': true
});
};
function baseShuffle(collection) {
return shuffleSelf(values(collection));
}
function baseSlice(array, start, end) {
var index = -1,
length = array.length;
if (start < 0) {
start = -start > length ? 0 : length + start;
}
end = end > length ? length : end;
if (end < 0) {
end += length;
}
length = start > end ? 0 : end - start >>> 0;
start >>>= 0;
var result = Array(length);
while (++index < length) {
result[index] = array[index + start];
}
return result;
}
function baseSome(collection, predicate) {
var result;
baseEach(collection, function (value, index, collection) {
result = predicate(value, index, collection);
return !result;
});
return !!result;
}
function baseSortedIndex(array, value, retHighest) {
var low = 0,
high = array == null ? low : array.length;
if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
while (low < high) {
var mid = low + high >>> 1,
computed = array[mid];
if (computed !== null && !isSymbol(computed) && (retHighest ? computed <= value : computed < value)) {
low = mid + 1;
} else {
high = mid;
}
}
return high;
}
return baseSortedIndexBy(array, value, identity, retHighest);
}
function baseSortedIndexBy(array, value, iteratee, retHighest) {
value = iteratee(value);
var low = 0,
high = array == null ? 0 : array.length,
valIsNaN = value !== value,
valIsNull = value === null,
valIsSymbol = isSymbol(value),
valIsUndefined = value === undefined;
while (low < high) {
var mid = nativeFloor((low + high) / 2),
computed = iteratee(array[mid]),
othIsDefined = computed !== undefined,
othIsNull = computed === null,
othIsReflexive = computed === computed,
othIsSymbol = isSymbol(computed);
if (valIsNaN) {
var setLow = retHighest || othIsReflexive;
} else if (valIsUndefined) {
setLow = othIsReflexive && (retHighest || othIsDefined);
} else if (valIsNull) {
setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);
} else if (valIsSymbol) {
setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);
} else if (othIsNull || othIsSymbol) {
setLow = false;
} else {
setLow = retHighest ? computed <= value : computed < value;
}
if (setLow) {
low = mid + 1;
} else {
high = mid;
}
}
return nativeMin(high, MAX_ARRAY_INDEX);
}
function baseSortedUniq(array, iteratee) {
var index = -1,
length = array.length,
resIndex = 0,
result = [];
while (++index < length) {
var value = array[index],
computed = iteratee ? iteratee(value) : value;
if (!index || !eq(computed, seen)) {
var seen = computed;
result[resIndex++] = value === 0 ? 0 : value;
}
}
return result;
}
function baseToNumber(value) {
if (typeof value == 'number') {
return value;
}
if (isSymbol(value)) {
return NAN;
}
return +value;
}
function baseToString(value) {
if (typeof value == 'string') {
return value;
}
if (isArray(value)) {
return arrayMap(value, baseToString) + '';
}
if (isSymbol(value)) {
return symbolToString ? symbolToString.call(value) : '';
}
var result = value + '';
return result == '0' && 1 / value == -INFINITY ? '-0' : result;
}
function baseUniq(array, iteratee, comparator) {
var index = -1,
includes = arrayIncludes,
length = array.length,
isCommon = true,
result = [],
seen = result;
if (comparator) {
isCommon = false;
includes = arrayIncludesWith;
} else if (length >= LARGE_ARRAY_SIZE) {
var set = iteratee ? null : createSet(array);
if (set) {
return setToArray(set);
}
isCommon = false;
includes = cacheHas;
seen = new SetCache();
} else {
seen = iteratee ? [] : result;
}
outer: while (++index < length) {
var value = array[index],
computed = iteratee ? iteratee(value) : value;
value = comparator || value !== 0 ? value : 0;
if (isCommon && computed === computed) {
var seenIndex = seen.length;
while (seenIndex--) {
if (seen[seenIndex] === computed) {
continue outer;
}
}
if (iteratee) {
seen.push(computed);
}
result.push(value);
} else if (!includes(seen, computed, comparator)) {
if (seen !== result) {
seen.push(computed);
}
result.push(value);
}
}
return result;
}
function baseUnset(object, path) {
path = castPath(path, object);
object = parent(object, path);
return object == null || delete object[toKey(last(path))];
}
function baseUpdate(object, path, updater, customizer) {
return baseSet(object, path, updater(baseGet(object, path)), customizer);
}
function baseWhile(array, predicate, isDrop, fromRight) {
var length = array.length,
index = fromRight ? length : -1;
while ((fromRight ? index-- : ++index < length) && predicate(array[index], index, array)) {}
return isDrop ? baseSlice(array, fromRight ? 0 : index, fromRight ? index + 1 : length) : baseSlice(array, fromRight ? index + 1 : 0, fromRight ? length : index);
}
function baseWrapperValue(value, actions) {
var result = value;
if (result instanceof LazyWrapper) {
result = result.value();
}
return arrayReduce(actions, function (result, action) {
return action.func.apply(action.thisArg, arrayPush([result], action.args));
}, result);
}
function baseXor(arrays, iteratee, comparator) {
var length = arrays.length;
if (length < 2) {
return length ? baseUniq(arrays[0]) : [];
}
var index = -1,
result = Array(length);
while (++index < length) {
var array = arrays[index],
othIndex = -1;
while (++othIndex < length) {
if (othIndex != index) {
result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);
}
}
}
return baseUniq(baseFlatten(result, 1), iteratee, comparator);
}
function baseZipObject(props, values, assignFunc) {
var index = -1,
length = props.length,
valsLength = values.length,
result = {};
while (++index < length) {
var value = index < valsLength ? values[index] : undefined;
assignFunc(result, props[index], value);
}
return result;
}
function castArrayLikeObject(value) {
return isArrayLikeObject(value) ? value : [];
}
function castFunction(value) {
return typeof value == 'function' ? value : identity;
}
function castPath(value, object) {
if (isArray(value)) {
return value;
}
return isKey(value, object) ? [value] : stringToPath(toString(value));
}
var castRest = baseRest;
function castSlice(array, start, end) {
var length = array.length;
end = end === undefined ? length : end;
return !start && end >= length ? array : baseSlice(array, start, end);
}
var clearTimeout = ctxClearTimeout || function (id) {
return root.clearTimeout(id);
};
function cloneBuffer(buffer, isDeep) {
if (isDeep) {
return buffer.slice();
}
var length = buffer.length,
result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
buffer.copy(result);
return result;
}
function cloneArrayBuffer(arrayBuffer) {
var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
new Uint8Array(result).set(new Uint8Array(arrayBuffer));
return result;
}
function cloneDataView(dataView, isDeep) {
var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
}
function cloneMap(map, isDeep, cloneFunc) {
var array = isDeep ? cloneFunc(mapToArray(map), CLONE_DEEP_FLAG) : mapToArray(map);
return arrayReduce(array, addMapEntry, new map.constructor());
}
function cloneRegExp(regexp) {
var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
result.lastIndex = regexp.lastIndex;
return result;
}
function cloneSet(set, isDeep, cloneFunc) {
var array = isDeep ? cloneFunc(setToArray(set), CLONE_DEEP_FLAG) : setToArray(set);
return arrayReduce(array, addSetEntry, new set.constructor());
}
function cloneSymbol(symbol) {
return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
}
function cloneTypedArray(typedArray, isDeep) {
var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
}
function compareAscending(value, other) {
if (value !== other) {
var valIsDefined = value !== undefined,
valIsNull = value === null,
valIsReflexive = value === value,
valIsSymbol = isSymbol(value);
var othIsDefined = other !== undefined,
othIsNull = other === null,
othIsReflexive = other === other,
othIsSymbol = isSymbol(other);
if (!othIsNull && !othIsSymbol && !valIsSymbol && value > other || valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol || valIsNull && othIsDefined && othIsReflexive || !valIsDefined && othIsReflexive || !valIsReflexive) {
return 1;
}
if (!valIsNull && !valIsSymbol && !othIsSymbol && value < other || othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol || othIsNull && valIsDefined && valIsReflexive || !othIsDefined && valIsReflexive || !othIsReflexive) {
return -1;
}
}
return 0;
}
function compareMultiple(object, other, orders) {
var index = -1,
objCriteria = object.criteria,
othCriteria = other.criteria,
length = objCriteria.length,
ordersLength = orders.length;
while (++index < length) {
var result = compareAscending(objCriteria[index], othCriteria[index]);
if (result) {
if (index >= ordersLength) {
return result;
}
var order = orders[index];
return result * (order == 'desc' ? -1 : 1);
}
}
return object.index - other.index;
}
function composeArgs(args, partials, holders, isCurried) {
var argsIndex = -1,
argsLength = args.length,
holdersLength = holders.length,
leftIndex = -1,
leftLength = partials.length,
rangeLength = nativeMax(argsLength - holdersLength, 0),
result = Array(leftLength + rangeLength),
isUncurried = !isCurried;
while (++leftIndex < leftLength) {
result[leftIndex] = partials[leftIndex];
}
while (++argsIndex < holdersLength) {
if (isUncurried || argsIndex < argsLength) {
result[holders[argsIndex]] = args[argsIndex];
}
}
while (rangeLength--) {
result[leftIndex++] = args[argsIndex++];
}
return result;
}
function composeArgsRight(args, partials, holders, isCurried) {
var argsIndex = -1,
argsLength = args.length,
holdersIndex = -1,
holdersLength = holders.length,
rightIndex = -1,
rightLength = partials.length,
rangeLength = nativeMax(argsLength - holdersLength, 0),
result = Array(rangeLength + rightLength),
isUncurried = !isCurried;
while (++argsIndex < rangeLength) {
result[argsIndex] = args[argsIndex];
}
var offset = argsIndex;
while (++rightIndex < rightLength) {
result[offset + rightIndex] = partials[rightIndex];
}
while (++holdersIndex < holdersLength) {
if (isUncurried || argsIndex < argsLength) {
result[offset + holders[holdersIndex]] = args[argsIndex++];
}
}
return result;
}
function copyArray(source, array) {
var index = -1,
length = source.length;
array || (array = Array(length));
while (++index < length) {
array[index] = source[index];
}
return array;
}
function copyObject(source, props, object, customizer) {
var isNew = !object;
object || (object = {});
var index = -1,
length = props.length;
while (++index < length) {
var key = props[index];
var newValue = customizer ? customizer(object[key], source[key], key, object, source) : undefined;
if (newValue === undefined) {
newValue = source[key];
}
if (isNew) {
baseAssignValue(object, key, newValue);
} else {
assignValue(object, key, newValue);
}
}
return object;
}
function copySymbols(source, object) {
return copyObject(source, getSymbols(source), object);
}
function copySymbolsIn(source, object) {
return copyObject(source, getSymbolsIn(source), object);
}
function createAggregator(setter, initializer) {
return function (collection, iteratee) {
var func = isArray(collection) ? arrayAggregator : baseAggregator,
accumulator = initializer ? initializer() : {};
return func(collection, setter, getIteratee(iteratee, 2), accumulator);
};
}
function createAssigner(assigner) {
return baseRest(function (object, sources) {
var index = -1,
length = sources.length,
customizer = length > 1 ? sources[length - 1] : undefined,
guard = length > 2 ? sources[2] : undefined;
customizer = assigner.length > 3 && typeof customizer == 'function' ? (length--, customizer) : undefined;
if (guard && isIterateeCall(sources[0], sources[1], guard)) {
customizer = length < 3 ? undefined : customizer;
length = 1;
}
object = Object(object);
while (++index < length) {
var source = sources[index];
if (source) {
assigner(object, source, index, customizer);
}
}
return object;
});
}
function createBaseEach(eachFunc, fromRight) {
return function (collection, iteratee) {
if (collection == null) {
return collection;
}
if (!isArrayLike(collection)) {
return eachFunc(collection, iteratee);
}
var length = collection.length,
index = fromRight ? length : -1,
iterable = Object(collection);
while (fromRight ? index-- : ++index < length) {
if (iteratee(iterable[index], index, iterable) === false) {
break;
}
}
return collection;
};
}
function createBaseFor(fromRight) {
return function (object, iteratee, keysFunc) {
var index = -1,
iterable = Object(object),
props = keysFunc(object),
length = props.length;
while (length--) {
var key = props[fromRight ? length : ++index];
if (iteratee(iterable[key], key, iterable) === false) {
break;
}
}
return object;
};
}
function createBind(func, bitmask, thisArg) {
var isBind = bitmask & WRAP_BIND_FLAG,
Ctor = createCtor(func);
function wrapper() {
var fn = this && this !== root && this instanceof wrapper ? Ctor : func;
return fn.apply(isBind ? thisArg : this, arguments);
}
return wrapper;
}
function createCaseFirst(methodName) {
return function (string) {
string = toString(string);
var strSymbols = hasUnicode(string) ? stringToArray(string) : undefined;
var chr = strSymbols ? strSymbols[0] : string.charAt(0);
var trailing = strSymbols ? castSlice(strSymbols, 1).join('') : string.slice(1);
return chr[methodName]() + trailing;
};
}
function createCompounder(callback) {
return function (string) {
return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');
};
}
function createCtor(Ctor) {
return function () {
var args = arguments;
switch (args.length) {
case 0:
return new Ctor();
case 1:
return new Ctor(args[0]);
case 2:
return new Ctor(args[0], args[1]);
case 3:
return new Ctor(args[0], args[1], args[2]);
case 4:
return new Ctor(args[0], args[1], args[2], args[3]);
case 5:
return new Ctor(args[0], args[1], args[2], args[3], args[4]);
case 6:
return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);
case 7:
return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
}
var thisBinding = baseCreate(Ctor.prototype),
result = Ctor.apply(thisBinding, args);
return isObject(result) ? result : thisBinding;
};
}
function createCurry(func, bitmask, arity) {
var Ctor = createCtor(func);
function wrapper() {
var length = arguments.length,
args = Array(length),
index = length,
placeholder = getHolder(wrapper);
while (index--) {
args[index] = arguments[index];
}
var holders = length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder ? [] : replaceHolders(args, placeholder);
length -= holders.length;
if (length < arity) {
return createRecurry(func, bitmask, createHybrid, wrapper.placeholder, undefined, args, holders, undefined, undefined, arity - length);
}
var fn = this && this !== root && this instanceof wrapper ? Ctor : func;
return apply(fn, this, args);
}
return wrapper;
}
function createFind(findIndexFunc) {
return function (collection, predicate, fromIndex) {
var iterable = Object(collection);
if (!isArrayLike(collection)) {
var iteratee = getIteratee(predicate, 3);
collection = keys(collection);
predicate = function predicate(key) {
return iteratee(iterable[key], key, iterable);
};
}
var index = findIndexFunc(collection, predicate, fromIndex);
return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;
};
}
function createFlow(fromRight) {
return flatRest(function (funcs) {
var length = funcs.length,
index = length,
prereq = LodashWrapper.prototype.thru;
if (fromRight) {
funcs.reverse();
}
while (index--) {
var func = funcs[index];
if (typeof func != 'function') {
throw new TypeError(FUNC_ERROR_TEXT);
}
if (prereq && !wrapper && getFuncName(func) == 'wrapper') {
var wrapper = new LodashWrapper([], true);
}
}
index = wrapper ? index : length;
while (++index < length) {
func = funcs[index];
var funcName = getFuncName(func),
data = funcName == 'wrapper' ? getData(func) : undefined;
if (data && isLaziable(data[0]) && data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && !data[4].length && data[9] == 1) {
wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
} else {
wrapper = func.length == 1 && isLaziable(func) ? wrapper[funcName]() : wrapper.thru(func);
}
}
return function () {
var args = arguments,
value = args[0];
if (wrapper && args.length == 1 && isArray(value)) {
return wrapper.plant(value).value();
}
var index = 0,
result = length ? funcs[index].apply(this, args) : value;
while (++index < length) {
result = funcs[index].call(this, result);
}
return result;
};
});
}
function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {
var isAry = bitmask & WRAP_ARY_FLAG,
isBind = bitmask & WRAP_BIND_FLAG,
isBindKey = bitmask & WRAP_BIND_KEY_FLAG,
isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),
isFlip = bitmask & WRAP_FLIP_FLAG,
Ctor = isBindKey ? undefined : createCtor(func);
function wrapper() {
var length = arguments.length,
args = Array(length),
index = length;
while (index--) {
args[index] = arguments[index];
}
if (isCurried) {
var placeholder = getHolder(wrapper),
holdersCount = countHolders(args, placeholder);
}
if (partials) {
args = composeArgs(args, partials, holders, isCurried);
}
if (partialsRight) {
args = composeArgsRight(args, partialsRight, holdersRight, isCurried);
}
length -= holdersCount;
if (isCurried && length < arity) {
var newHolders = replaceHolders(args, placeholder);
return createRecurry(func, bitmask, createHybrid, wrapper.placeholder, thisArg, args, newHolders, argPos, ary, arity - length);
}
var thisBinding = isBind ? thisArg : this,
fn = isBindKey ? thisBinding[func] : func;
length = args.length;
if (argPos) {
args = reorder(args, argPos);
} else if (isFlip && length > 1) {
args.reverse();
}
if (isAry && ary < length) {
args.length = ary;
}
if (this && this !== root && this instanceof wrapper) {
fn = Ctor || createCtor(fn);
}
return fn.apply(thisBinding, args);
}
return wrapper;
}
function createInverter(setter, toIteratee) {
return function (object, iteratee) {
return baseInverter(object, setter, toIteratee(iteratee), {});
};
}
function createMathOperation(operator, defaultValue) {
return function (value, other) {
var result;
if (value === undefined && other === undefined) {
return defaultValue;
}
if (value !== undefined) {
result = value;
}
if (other !== undefined) {
if (result === undefined) {
return other;
}
if (typeof value == 'string' || typeof other == 'string') {
value = baseToString(value);
other = baseToString(other);
} else {
value = baseToNumber(value);
other = baseToNumber(other);
}
result = operator(value, other);
}
return result;
};
}
function createOver(arrayFunc) {
return flatRest(function (iteratees) {
iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
return baseRest(function (args) {
var thisArg = this;
return arrayFunc(iteratees, function (iteratee) {
return apply(iteratee, thisArg, args);
});
});
});
}
function createPadding(length, chars) {
chars = chars === undefined ? ' ' : baseToString(chars);
var charsLength = chars.length;
if (charsLength < 2) {
return charsLength ? baseRepeat(chars, length) : chars;
}
var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));
return hasUnicode(chars) ? castSlice(stringToArray(result), 0, length).join('') : result.slice(0, length);
}
function createPartial(func, bitmask, thisArg, partials) {
var isBind = bitmask & WRAP_BIND_FLAG,
Ctor = createCtor(func);
function wrapper() {
var argsIndex = -1,
argsLength = arguments.length,
leftIndex = -1,
leftLength = partials.length,
args = Array(leftLength + argsLength),
fn = this && this !== root && this instanceof wrapper ? Ctor : func;
while (++leftIndex < leftLength) {
args[leftIndex] = partials[leftIndex];
}
while (argsLength--) {
args[leftIndex++] = arguments[++argsIndex];
}
return apply(fn, isBind ? thisArg : this, args);
}
return wrapper;
}
function createRange(fromRight) {
return function (start, end, step) {
if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {
end = step = undefined;
}
start = toFinite(start);
if (end === undefined) {
end = start;
start = 0;
} else {
end = toFinite(end);
}
step = step === undefined ? start < end ? 1 : -1 : toFinite(step);
return baseRange(start, end, step, fromRight);
};
}
function createRelationalOperation(operator) {
return function (value, other) {
if (!(typeof value == 'string' && typeof other == 'string')) {
value = toNumber(value);
other = toNumber(other);
}
return operator(value, other);
};
}
function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {
var isCurry = bitmask & WRAP_CURRY_FLAG,
newHolders = isCurry ? holders : undefined,
newHoldersRight = isCurry ? undefined : holders,
newPartials = isCurry ? partials : undefined,
newPartialsRight = isCurry ? undefined : partials;
bitmask |= isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG;
bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);
if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {
bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);
}
var newData = [func, bitmask, thisArg, newPartials, newHolders, newPartialsRight, newHoldersRight, argPos, ary, arity];
var result = wrapFunc.apply(undefined, newData);
if (isLaziable(func)) {
setData(result, newData);
}
result.placeholder = placeholder;
return setWrapToString(result, func, bitmask);
}
function createRound(methodName) {
var func = Math[methodName];
return function (number, precision) {
number = toNumber(number);
precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
if (precision) {
var pair = (toString(number) + 'e').split('e'),
value = func(pair[0] + 'e' + (+pair[1] + precision));
pair = (toString(value) + 'e').split('e');
return +(pair[0] + 'e' + (+pair[1] - precision));
}
return func(number);
};
}
var createSet = !(Set && 1 / setToArray(new Set([, -0]))[1] == INFINITY) ? noop : function (values) {
return new Set(values);
};
function createToPairs(keysFunc) {
return function (object) {
var tag = getTag(object);
if (tag == mapTag) {
return mapToArray(object);
}
if (tag == setTag) {
return setToPairs(object);
}
return baseToPairs(object, keysFunc(object));
};
}
function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {
var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;
if (!isBindKey && typeof func != 'function') {
throw new TypeError(FUNC_ERROR_TEXT);
}
var length = partials ? partials.length : 0;
if (!length) {
bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);
partials = holders = undefined;
}
ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);
arity = arity === undefined ? arity : toInteger(arity);
length -= holders ? holders.length : 0;
if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {
var partialsRight = partials,
holdersRight = holders;
partials = holders = undefined;
}
var data = isBindKey ? undefined : getData(func);
var newData = [func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity];
if (data) {
mergeData(newData, data);
}
func = newData[0];
bitmask = newData[1];
thisArg = newData[2];
partials = newData[3];
holders = newData[4];
arity = newData[9] = newData[9] === undefined ? isBindKey ? 0 : func.length : nativeMax(newData[9] - length, 0);
if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {
bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);
}
if (!bitmask || bitmask == WRAP_BIND_FLAG) {
var result = createBind(func, bitmask, thisArg);
} else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {
result = createCurry(func, bitmask, arity);
} else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {
result = createPartial(func, bitmask, thisArg, partials);
} else {
result = createHybrid.apply(undefined, newData);
}
var setter = data ? baseSetData : setData;
return setWrapToString(setter(result, newData), func, bitmask);
}
function customDefaultsAssignIn(objValue, srcValue, key, object) {
if (objValue === undefined || eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key)) {
return srcValue;
}
return objValue;
}
function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {
if (isObject(objValue) && isObject(srcValue)) {
stack.set(srcValue, objValue);
baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);
stack['delete'](srcValue);
}
return objValue;
}
function customOmitClone(value) {
return isPlainObject(value) ? undefined : value;
}
function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
arrLength = array.length,
othLength = other.length;
if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
return false;
}
var stacked = stack.get(array);
if (stacked && stack.get(other)) {
return stacked == other;
}
var index = -1,
result = true,
seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : undefined;
stack.set(array, other);
stack.set(other, array);
while (++index < arrLength) {
var arrValue = array[index],
othValue = other[index];
if (customizer) {
var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack);
}
if (compared !== undefined) {
if (compared) {
continue;
}
result = false;
break;
}
if (seen) {
if (!arraySome(other, function (othValue, othIndex) {
if (!cacheHas(seen, othIndex) && (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
return seen.push(othIndex);
}
})) {
result = false;
break;
}
} else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
result = false;
break;
}
}
stack['delete'](array);
stack['delete'](other);
return result;
}
function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
switch (tag) {
case dataViewTag:
if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) {
return false;
}
object = object.buffer;
other = other.buffer;
case arrayBufferTag:
if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
return false;
}
return true;
case boolTag:
case dateTag:
case numberTag:
return eq(+object, +other);
case errorTag:
return object.name == other.name && object.message == other.message;
case regexpTag:
case stringTag:
return object == other + '';
case mapTag:
var convert = mapToArray;
case setTag:
var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
convert || (convert = setToArray);
if (object.size != other.size && !isPartial) {
return false;
}
var stacked = stack.get(object);
if (stacked) {
return stacked == other;
}
bitmask |= COMPARE_UNORDERED_FLAG;
stack.set(object, other);
var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
stack['delete'](object);
return result;
case symbolTag:
if (symbolValueOf) {
return symbolValueOf.call(object) == symbolValueOf.call(other);
}
}
return false;
}
function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
objProps = getAllKeys(object),
objLength = objProps.length,
othProps = getAllKeys(other),
othLength = othProps.length;
if (objLength != othLength && !isPartial) {
return false;
}
var index = objLength;
while (index--) {
var key = objProps[index];
if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
return false;
}
}
var stacked = stack.get(object);
if (stacked && stack.get(other)) {
return stacked == other;
}
var result = true;
stack.set(object, other);
stack.set(other, object);
var skipCtor = isPartial;
while (++index < objLength) {
key = objProps[index];
var objValue = object[key],
othValue = other[key];
if (customizer) {
var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
}
if (!(compared === undefined ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) {
result = false;
break;
}
skipCtor || (skipCtor = key == 'constructor');
}
if (result && !skipCtor) {
var objCtor = object.constructor,
othCtor = other.constructor;
if (objCtor != othCtor && 'constructor' in object && 'constructor' in other && !(typeof objCtor == 'function' && objCtor instanceof objCtor && typeof othCtor == 'function' && othCtor instanceof othCtor)) {
result = false;
}
}
stack['delete'](object);
stack['delete'](other);
return result;
}
function flatRest(func) {
return setToString(overRest(func, undefined, flatten), func + '');
}
function getAllKeys(object) {
return baseGetAllKeys(object, keys, getSymbols);
}
function getAllKeysIn(object) {
return baseGetAllKeys(object, keysIn, getSymbolsIn);
}
var getData = !metaMap ? noop : function (func) {
return metaMap.get(func);
};
function getFuncName(func) {
var result = func.name + '',
array = realNames[result],
length = hasOwnProperty.call(realNames, result) ? array.length : 0;
while (length--) {
var data = array[length],
otherFunc = data.func;
if (otherFunc == null || otherFunc == func) {
return data.name;
}
}
return result;
}
function getHolder(func) {
var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;
return object.placeholder;
}
function getIteratee() {
var result = lodash.iteratee || iteratee;
result = result === iteratee ? baseIteratee : result;
return arguments.length ? result(arguments[0], arguments[1]) : result;
}
function getMapData(map, key) {
var data = map.__data__;
return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map;
}
function getMatchData(object) {
var result = keys(object),
length = result.length;
while (length--) {
var key = result[length],
value = object[key];
result[length] = [key, value, isStrictComparable(value)];
}
return result;
}
function getNative(object, key) {
var value = getValue(object, key);
return baseIsNative(value) ? value : undefined;
}
function getRawTag(value) {
var isOwn = hasOwnProperty.call(value, symToStringTag),
tag = value[symToStringTag];
try {
value[symToStringTag] = undefined;
var unmasked = true;
} catch (e) {}
var result = nativeObjectToString.call(value);
if (unmasked) {
if (isOwn) {
value[symToStringTag] = tag;
} else {
delete value[symToStringTag];
}
}
return result;
}
var getSymbols = !nativeGetSymbols ? stubArray : function (object) {
if (object == null) {
return [];
}
object = Object(object);
return arrayFilter(nativeGetSymbols(object), function (symbol) {
return propertyIsEnumerable.call(object, symbol);
});
};
var getSymbolsIn = !nativeGetSymbols ? stubArray : function (object) {
var result = [];
while (object) {
arrayPush(result, getSymbols(object));
object = getPrototype(object);
}
return result;
};
var getTag = baseGetTag;
if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map && getTag(new Map()) != mapTag || Promise && getTag(Promise.resolve()) != promiseTag || Set && getTag(new Set()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) {
getTag = function getTag(value) {
var result = baseGetTag(value),
Ctor = result == objectTag ? value.constructor : undefined,
ctorString = Ctor ? toSource(Ctor) : '';
if (ctorString) {
switch (ctorString) {
case dataViewCtorString:
return dataViewTag;
case mapCtorString:
return mapTag;
case promiseCtorString:
return promiseTag;
case setCtorString:
return setTag;
case weakMapCtorString:
return weakMapTag;
}
}
return result;
};
}
function getView(start, end, transforms) {
var index = -1,
length = transforms.length;
while (++index < length) {
var data = transforms[index],
size = data.size;
switch (data.type) {
case 'drop':
start += size;break;
case 'dropRight':
end -= size;break;
case 'take':
end = nativeMin(end, start + size);break;
case 'takeRight':
start = nativeMax(start, end - size);break;
}
}
return { 'start': start, 'end': end };
}
function getWrapDetails(source) {
var match = source.match(reWrapDetails);
return match ? match[1].split(reSplitDetails) : [];
}
function hasPath(object, path, hasFunc) {
path = castPath(path, object);
var index = -1,
length = path.length,
result = false;
while (++index < length) {
var key = toKey(path[index]);
if (!(result = object != null && hasFunc(object, key))) {
break;
}
object = object[key];
}
if (result || ++index != length) {
return result;
}
length = object == null ? 0 : object.length;
return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object));
}
function initCloneArray(array) {
var length = array.length,
result = array.constructor(length);
if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
result.index = array.index;
result.input = array.input;
}
return result;
}
function initCloneObject(object) {
return typeof object.constructor == 'function' && !isPrototype(object) ? baseCreate(getPrototype(object)) : {};
}
function initCloneByTag(object, tag, cloneFunc, isDeep) {
var Ctor = object.constructor;
switch (tag) {
case arrayBufferTag:
return cloneArrayBuffer(object);
case boolTag:
case dateTag:
return new Ctor(+object);
case dataViewTag:
return cloneDataView(object, isDeep);
case float32Tag:case float64Tag:
case int8Tag:case int16Tag:case int32Tag:
case uint8Tag:case uint8ClampedTag:case uint16Tag:case uint32Tag:
return cloneTypedArray(object, isDeep);
case mapTag:
return cloneMap(object, isDeep, cloneFunc);
case numberTag:
case stringTag:
return new Ctor(object);
case regexpTag:
return cloneRegExp(object);
case setTag:
return cloneSet(object, isDeep, cloneFunc);
case symbolTag:
return cloneSymbol(object);
}
}
function insertWrapDetails(source, details) {
var length = details.length;
if (!length) {
return source;
}
var lastIndex = length - 1;
details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];
details = details.join(length > 2 ? ', ' : ' ');
return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n');
}
function isFlattenable(value) {
return isArray(value) || isArguments(value) || !!(spreadableSymbol && value && value[spreadableSymbol]);
}
function isIndex(value, length) {
length = length == null ? MAX_SAFE_INTEGER : length;
return !!length && (typeof value == 'number' || reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length;
}
function isIterateeCall(value, index, object) {
if (!isObject(object)) {
return false;
}
var type = typeof index;
if (type == 'number' ? isArrayLike(object) && isIndex(index, object.length) : type == 'string' && index in object) {
return eq(object[index], value);
}
return false;
}
function isKey(value, object) {
if (isArray(value)) {
return false;
}
var type = typeof value;
if (type == 'number' || type == 'symbol' || type == 'boolean' || value == null || isSymbol(value)) {
return true;
}
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
}
function isKeyable(value) {
var type = typeof value;
return type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean' ? value !== '__proto__' : value === null;
}
function isLaziable(func) {
var funcName = getFuncName(func),
other = lodash[funcName];
if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {
return false;
}
if (func === other) {
return true;
}
var data = getData(other);
return !!data && func === data[0];
}
function isMasked(func) {
return !!maskSrcKey && maskSrcKey in func;
}
var isMaskable = coreJsData ? isFunction : stubFalse;
function isPrototype(value) {
var Ctor = value && value.constructor,
proto = typeof Ctor == 'function' && Ctor.prototype || objectProto;
return value === proto;
}
function isStrictComparable(value) {
return value === value && !isObject(value);
}
function matchesStrictComparable(key, srcValue) {
return function (object) {
if (object == null) {
return false;
}
return object[key] === srcValue && (srcValue !== undefined || key in Object(object));
};
}
function memoizeCapped(func) {
var result = memoize(func, function (key) {
if (cache.size === MAX_MEMOIZE_SIZE) {
cache.clear();
}
return key;
});
var cache = result.cache;
return result;
}
function mergeData(data, source) {
var bitmask = data[1],
srcBitmask = source[1],
newBitmask = bitmask | srcBitmask,
isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);
var isCombo = srcBitmask == WRAP_ARY_FLAG && bitmask == WRAP_CURRY_FLAG || srcBitmask == WRAP_ARY_FLAG && bitmask == WRAP_REARG_FLAG && data[7].length <= source[8] || srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG) && source[7].length <= source[8] && bitmask == WRAP_CURRY_FLAG;
if (!(isCommon || isCombo)) {
return data;
}
if (srcBitmask & WRAP_BIND_FLAG) {
data[2] = source[2];
newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;
}
var value = source[3];
if (value) {
var partials = data[3];
data[3] = partials ? composeArgs(partials, value, source[4]) : value;
data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];
}
value = source[5];
if (value) {
partials = data[5];
data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;
data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];
}
value = source[7];
if (value) {
data[7] = value;
}
if (srcBitmask & WRAP_ARY_FLAG) {
data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);
}
if (data[9] == null) {
data[9] = source[9];
}
data[0] = source[0];
data[1] = newBitmask;
return data;
}
function nativeKeysIn(object) {
var result = [];
if (object != null) {
for (var key in Object(object)) {
result.push(key);
}
}
return result;
}
function objectToString(value) {
return nativeObjectToString.call(value);
}
function overRest(func, start, transform) {
start = nativeMax(start === undefined ? func.length - 1 : start, 0);
return function () {
var args = arguments,
index = -1,
length = nativeMax(args.length - start, 0),
array = Array(length);
while (++index < length) {
array[index] = args[start + index];
}
index = -1;
var otherArgs = Array(start + 1);
while (++index < start) {
otherArgs[index] = args[index];
}
otherArgs[start] = transform(array);
return apply(func, this, otherArgs);
};
}
function parent(object, path) {
return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
}
function reorder(array, indexes) {
var arrLength = array.length,
length = nativeMin(indexes.length, arrLength),
oldArray = copyArray(array);
while (length--) {
var index = indexes[length];
array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;
}
return array;
}
var setData = shortOut(baseSetData);
var setTimeout = ctxSetTimeout || function (func, wait) {
return root.setTimeout(func, wait);
};
var setToString = shortOut(baseSetToString);
function setWrapToString(wrapper, reference, bitmask) {
var source = reference + '';
return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));
}
function shortOut(func) {
var count = 0,
lastCalled = 0;
return function () {
var stamp = nativeNow(),
remaining = HOT_SPAN - (stamp - lastCalled);
lastCalled = stamp;
if (remaining > 0) {
if (++count >= HOT_COUNT) {
return arguments[0];
}
} else {
count = 0;
}
return func.apply(undefined, arguments);
};
}
function shuffleSelf(array, size) {
var index = -1,
length = array.length,
lastIndex = length - 1;
size = size === undefined ? length : size;
while (++index < size) {
var rand = baseRandom(index, lastIndex),
value = array[rand];
array[rand] = array[index];
array[index] = value;
}
array.length = size;
return array;
}
var stringToPath = memoizeCapped(function (string) {
var result = [];
if (reLeadingDot.test(string)) {
result.push('');
}
string.replace(rePropName, function (match, number, quote, string) {
result.push(quote ? string.replace(reEscapeChar, '$1') : number || match);
});
return result;
});
function toKey(value) {
if (typeof value == 'string' || isSymbol(value)) {
return value;
}
var result = value + '';
return result == '0' && 1 / value == -INFINITY ? '-0' : result;
}
function toSource(func) {
if (func != null) {
try {
return funcToString.call(func);
} catch (e) {}
try {
return func + '';
} catch (e) {}
}
return '';
}
function updateWrapDetails(details, bitmask) {
arrayEach(wrapFlags, function (pair) {
var value = '_.' + pair[0];
if (bitmask & pair[1] && !arrayIncludes(details, value)) {
details.push(value);
}
});
return details.sort();
}
function wrapperClone(wrapper) {
if (wrapper instanceof LazyWrapper) {
return wrapper.clone();
}
var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);
result.__actions__ = copyArray(wrapper.__actions__);
result.__index__ = wrapper.__index__;
result.__values__ = wrapper.__values__;
return result;
}
function chunk(array, size, guard) {
if (guard ? isIterateeCall(array, size, guard) : size === undefined) {
size = 1;
} else {
size = nativeMax(toInteger(size), 0);
}
var length = array == null ? 0 : array.length;
if (!length || size < 1) {
return [];
}
var index = 0,
resIndex = 0,
result = Array(nativeCeil(length / size));
while (index < length) {
result[resIndex++] = baseSlice(array, index, index += size);
}
return result;
}
function compact(array) {
var index = -1,
length = array == null ? 0 : array.length,
resIndex = 0,
result = [];
while (++index < length) {
var value = array[index];
if (value) {
result[resIndex++] = value;
}
}
return result;
}
function concat() {
var length = arguments.length;
if (!length) {
return [];
}
var args = Array(length - 1),
array = arguments[0],
index = length;
while (index--) {
args[index - 1] = arguments[index];
}
return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));
}
var difference = baseRest(function (array, values) {
return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true)) : [];
});
var differenceBy = baseRest(function (array, values) {
var iteratee = last(values);
if (isArrayLikeObject(iteratee)) {
iteratee = undefined;
}
return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2)) : [];
});
var differenceWith = baseRest(function (array, values) {
var comparator = last(values);
if (isArrayLikeObject(comparator)) {
comparator = undefined;
}
return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator) : [];
});
function drop(array, n, guard) {
var length = array == null ? 0 : array.length;
if (!length) {
return [];
}
n = guard || n === undefined ? 1 : toInteger(n);
return baseSlice(array, n < 0 ? 0 : n, length);
}
function dropRight(array, n, guard) {
var length = array == null ? 0 : array.length;
if (!length) {
return [];
}
n = guard || n === undefined ? 1 : toInteger(n);
n = length - n;
return baseSlice(array, 0, n < 0 ? 0 : n);
}
function dropRightWhile(array, predicate) {
return array && array.length ? baseWhile(array, getIteratee(predicate, 3), true, true) : [];
}
function dropWhile(array, predicate) {
return array && array.length ? baseWhile(array, getIteratee(predicate, 3), true) : [];
}
function fill(array, value, start, end) {
var length = array == null ? 0 : array.length;
if (!length) {
return [];
}
if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {
start = 0;
end = length;
}
return baseFill(array, value, start, end);
}
function findIndex(array, predicate, fromIndex) {
var length = array == null ? 0 : array.length;
if (!length) {
return -1;
}
var index = fromIndex == null ? 0 : toInteger(fromIndex);
if (index < 0) {
index = nativeMax(length + index, 0);
}
return baseFindIndex(array, getIteratee(predicate, 3), index);
}
function findLastIndex(array, predicate, fromIndex) {
var length = array == null ? 0 : array.length;
if (!length) {
return -1;
}
var index = length - 1;
if (fromIndex !== undefined) {
index = toInteger(fromIndex);
index = fromIndex < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);
}
return baseFindIndex(array, getIteratee(predicate, 3), index, true);
}
function flatten(array) {
var length = array == null ? 0 : array.length;
return length ? baseFlatten(array, 1) : [];
}
function flattenDeep(array) {
var length = array == null ? 0 : array.length;
return length ? baseFlatten(array, INFINITY) : [];
}
function flattenDepth(array, depth) {
var length = array == null ? 0 : array.length;
if (!length) {
return [];
}
depth = depth === undefined ? 1 : toInteger(depth);
return baseFlatten(array, depth);
}
function fromPairs(pairs) {
var index = -1,
length = pairs == null ? 0 : pairs.length,
result = {};
while (++index < length) {
var pair = pairs[index];
result[pair[0]] = pair[1];
}
return result;
}
function head(array) {
return array && array.length ? array[0] : undefined;
}
function indexOf(array, value, fromIndex) {
var length = array == null ? 0 : array.length;
if (!length) {
return -1;
}
var index = fromIndex == null ? 0 : toInteger(fromIndex);
if (index < 0) {
index = nativeMax(length + index, 0);
}
return baseIndexOf(array, value, index);
}
function initial(array) {
var length = array == null ? 0 : array.length;
return length ? baseSlice(array, 0, -1) : [];
}
var intersection = baseRest(function (arrays) {
var mapped = arrayMap(arrays, castArrayLikeObject);
return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped) : [];
});
var intersectionBy = baseRest(function (arrays) {
var iteratee = last(arrays),
mapped = arrayMap(arrays, castArrayLikeObject);
if (iteratee === last(mapped)) {
iteratee = undefined;
} else {
mapped.pop();
}
return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped, getIteratee(iteratee, 2)) : [];
});
var intersectionWith = baseRest(function (arrays) {
var comparator = last(arrays),
mapped = arrayMap(arrays, castArrayLikeObject);
comparator = typeof comparator == 'function' ? comparator : undefined;
if (comparator) {
mapped.pop();
}
return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped, undefined, comparator) : [];
});
function join(array, separator) {
return array == null ? '' : nativeJoin.call(array, separator);
}
function last(array) {
var length = array == null ? 0 : array.length;
return length ? array[length - 1] : undefined;
}
function lastIndexOf(array, value, fromIndex) {
var length = array == null ? 0 : array.length;
if (!length) {
return -1;
}
var index = length;
if (fromIndex !== undefined) {
index = toInteger(fromIndex);
index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);
}
return value === value ? strictLastIndexOf(array, value, index) : baseFindIndex(array, baseIsNaN, index, true);
}
function nth(array, n) {
return array && array.length ? baseNth(array, toInteger(n)) : undefined;
}
var pull = baseRest(pullAll);
function pullAll(array, values) {
return array && array.length && values && values.length ? basePullAll(array, values) : array;
}
function pullAllBy(array, values, iteratee) {
return array && array.length && values && values.length ? basePullAll(array, values, getIteratee(iteratee, 2)) : array;
}
function pullAllWith(array, values, comparator) {
return array && array.length && values && values.length ? basePullAll(array, values, undefined, comparator) : array;
}
var pullAt = flatRest(function (array, indexes) {
var length = array == null ? 0 : array.length,
result = baseAt(array, indexes);
basePullAt(array, arrayMap(indexes, function (index) {
return isIndex(index, length) ? +index : index;
}).sort(compareAscending));
return result;
});
function remove(array, predicate) {
var result = [];
if (!(array && array.length)) {
return result;
}
var index = -1,
indexes = [],
length = array.length;
predicate = getIteratee(predicate, 3);
while (++index < length) {
var value = array[index];
if (predicate(value, index, array)) {
result.push(value);
indexes.push(index);
}
}
basePullAt(array, indexes);
return result;
}
function reverse(array) {
return array == null ? array : nativeReverse.call(array);
}
function slice(array, start, end) {
var length = array == null ? 0 : array.length;
if (!length) {
return [];
}
if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {
start = 0;
end = length;
} else {
start = start == null ? 0 : toInteger(start);
end = end === undefined ? length : toInteger(end);
}
return baseSlice(array, start, end);
}
function sortedIndex(array, value) {
return baseSortedIndex(array, value);
}
function sortedIndexBy(array, value, iteratee) {
return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));
}
function sortedIndexOf(array, value) {
var length = array == null ? 0 : array.length;
if (length) {
var index = baseSortedIndex(array, value);
if (index < length && eq(array[index], value)) {
return index;
}
}
return -1;
}
function sortedLastIndex(array, value) {
return baseSortedIndex(array, value, true);
}
function sortedLastIndexBy(array, value, iteratee) {
return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true);
}
function sortedLastIndexOf(array, value) {
var length = array == null ? 0 : array.length;
if (length) {
var index = baseSortedIndex(array, value, true) - 1;
if (eq(array[index], value)) {
return index;
}
}
return -1;
}
function sortedUniq(array) {
return array && array.length ? baseSortedUniq(array) : [];
}
function sortedUniqBy(array, iteratee) {
return array && array.length ? baseSortedUniq(array, getIteratee(iteratee, 2)) : [];
}
function tail(array) {
var length = array == null ? 0 : array.length;
return length ? baseSlice(array, 1, length) : [];
}
function take(array, n, guard) {
if (!(array && array.length)) {
return [];
}
n = guard || n === undefined ? 1 : toInteger(n);
return baseSlice(array, 0, n < 0 ? 0 : n);
}
function takeRight(array, n, guard) {
var length = array == null ? 0 : array.length;
if (!length) {
return [];
}
n = guard || n === undefined ? 1 : toInteger(n);
n = length - n;
return baseSlice(array, n < 0 ? 0 : n, length);
}
function takeRightWhile(array, predicate) {
return array && array.length ? baseWhile(array, getIteratee(predicate, 3), false, true) : [];
}
function takeWhile(array, predicate) {
return array && array.length ? baseWhile(array, getIteratee(predicate, 3)) : [];
}
var union = baseRest(function (arrays) {
return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));
});
var unionBy = baseRest(function (arrays) {
var iteratee = last(arrays);
if (isArrayLikeObject(iteratee)) {
iteratee = undefined;
}
return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2));
});
var unionWith = baseRest(function (arrays) {
var comparator = last(arrays);
comparator = typeof comparator == 'function' ? comparator : undefined;
return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);
});
function uniq(array) {
return array && array.length ? baseUniq(array) : [];
}
function uniqBy(array, iteratee) {
return array && array.length ? baseUniq(array, getIteratee(iteratee, 2)) : [];
}
function uniqWith(array, comparator) {
comparator = typeof comparator == 'function' ? comparator : undefined;
return array && array.length ? baseUniq(array, undefined, comparator) : [];
}
function unzip(array) {
if (!(array && array.length)) {
return [];
}
var length = 0;
array = arrayFilter(array, function (group) {
if (isArrayLikeObject(group)) {
length = nativeMax(group.length, length);
return true;
}
});
return baseTimes(length, function (index) {
return arrayMap(array, baseProperty(index));
});
}
function unzipWith(array, iteratee) {
if (!(array && array.length)) {
return [];
}
var result = unzip(array);
if (iteratee == null) {
return result;
}
return arrayMap(result, function (group) {
return apply(iteratee, undefined, group);
});
}
var without = baseRest(function (array, values) {
return isArrayLikeObject(array) ? baseDifference(array, values) : [];
});
var xor = baseRest(function (arrays) {
return baseXor(arrayFilter(arrays, isArrayLikeObject));
});
var xorBy = baseRest(function (arrays) {
var iteratee = last(arrays);
if (isArrayLikeObject(iteratee)) {
iteratee = undefined;
}
return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2));
});
var xorWith = baseRest(function (arrays) {
var comparator = last(arrays);
comparator = typeof comparator == 'function' ? comparator : undefined;
return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);
});
var zip = baseRest(unzip);
function zipObject(props, values) {
return baseZipObject(props || [], values || [], assignValue);
}
function zipObjectDeep(props, values) {
return baseZipObject(props || [], values || [], baseSet);
}
var zipWith = baseRest(function (arrays) {
var length = arrays.length,
iteratee = length > 1 ? arrays[length - 1] : undefined;
iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;
return unzipWith(arrays, iteratee);
});
function chain(value) {
var result = lodash(value);
result.__chain__ = true;
return result;
}
function tap(value, interceptor) {
interceptor(value);
return value;
}
function thru(value, interceptor) {
return interceptor(value);
}
var wrapperAt = flatRest(function (paths) {
var length = paths.length,
start = length ? paths[0] : 0,
value = this.__wrapped__,
interceptor = function interceptor(object) {
return baseAt(object, paths);
};
if (length > 1 || this.__actions__.length || !(value instanceof LazyWrapper) || !isIndex(start)) {
return this.thru(interceptor);
}
value = value.slice(start, +start + (length ? 1 : 0));
value.__actions__.push({
'func': thru,
'args': [interceptor],
'thisArg': undefined
});
return new LodashWrapper(value, this.__chain__).thru(function (array) {
if (length && !array.length) {
array.push(undefined);
}
return array;
});
});
function wrapperChain() {
return chain(this);
}
function wrapperCommit() {
return new LodashWrapper(this.value(), this.__chain__);
}
function wrapperNext() {
if (this.__values__ === undefined) {
this.__values__ = toArray(this.value());
}
var done = this.__index__ >= this.__values__.length,
value = done ? undefined : this.__values__[this.__index__++];
return { 'done': done, 'value': value };
}
function wrapperToIterator() {
return this;
}
function wrapperPlant(value) {
var result,
parent = this;
while (parent instanceof baseLodash) {
var clone = wrapperClone(parent);
clone.__index__ = 0;
clone.__values__ = undefined;
if (result) {
previous.__wrapped__ = clone;
} else {
result = clone;
}
var previous = clone;
parent = parent.__wrapped__;
}
previous.__wrapped__ = value;
return result;
}
function wrapperReverse() {
var value = this.__wrapped__;
if (value instanceof LazyWrapper) {
var wrapped = value;
if (this.__actions__.length) {
wrapped = new LazyWrapper(this);
}
wrapped = wrapped.reverse();
wrapped.__actions__.push({
'func': thru,
'args': [reverse],
'thisArg': undefined
});
return new LodashWrapper(wrapped, this.__chain__);
}
return this.thru(reverse);
}
function wrapperValue() {
return baseWrapperValue(this.__wrapped__, this.__actions__);
}
var countBy = createAggregator(function (result, value, key) {
if (hasOwnProperty.call(result, key)) {
++result[key];
} else {
baseAssignValue(result, key, 1);
}
});
function every(collection, predicate, guard) {
var func = isArray(collection) ? arrayEvery : baseEvery;
if (guard && isIterateeCall(collection, predicate, guard)) {
predicate = undefined;
}
return func(collection, getIteratee(predicate, 3));
}
function filter(collection, predicate) {
var func = isArray(collection) ? arrayFilter : baseFilter;
return func(collection, getIteratee(predicate, 3));
}
var find = createFind(findIndex);
var findLast = createFind(findLastIndex);
function flatMap(collection, iteratee) {
return baseFlatten(map(collection, iteratee), 1);
}
function flatMapDeep(collection, iteratee) {
return baseFlatten(map(collection, iteratee), INFINITY);
}
function flatMapDepth(collection, iteratee, depth) {
depth = depth === undefined ? 1 : toInteger(depth);
return baseFlatten(map(collection, iteratee), depth);
}
function forEach(collection, iteratee) {
var func = isArray(collection) ? arrayEach : baseEach;
return func(collection, getIteratee(iteratee, 3));
}
function forEachRight(collection, iteratee) {
var func = isArray(collection) ? arrayEachRight : baseEachRight;
return func(collection, getIteratee(iteratee, 3));
}
var groupBy = createAggregator(function (result, value, key) {
if (hasOwnProperty.call(result, key)) {
result[key].push(value);
} else {
baseAssignValue(result, key, [value]);
}
});
function includes(collection, value, fromIndex, guard) {
collection = isArrayLike(collection) ? collection : values(collection);
fromIndex = fromIndex && !guard ? toInteger(fromIndex) : 0;
var length = collection.length;
if (fromIndex < 0) {
fromIndex = nativeMax(length + fromIndex, 0);
}
return isString(collection) ? fromIndex <= length && collection.indexOf(value, fromIndex) > -1 : !!length && baseIndexOf(collection, value, fromIndex) > -1;
}
var invokeMap = baseRest(function (collection, path, args) {
var index = -1,
isFunc = typeof path == 'function',
result = isArrayLike(collection) ? Array(collection.length) : [];
baseEach(collection, function (value) {
result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);
});
return result;
});
var keyBy = createAggregator(function (result, value, key) {
baseAssignValue(result, key, value);
});
function map(collection, iteratee) {
var func = isArray(collection) ? arrayMap : baseMap;
return func(collection, getIteratee(iteratee, 3));
}
function orderBy(collection, iteratees, orders, guard) {
if (collection == null) {
return [];
}
if (!isArray(iteratees)) {
iteratees = iteratees == null ? [] : [iteratees];
}
orders = guard ? undefined : orders;
if (!isArray(orders)) {
orders = orders == null ? [] : [orders];
}
return baseOrderBy(collection, iteratees, orders);
}
var partition = createAggregator(function (result, value, key) {
result[key ? 0 : 1].push(value);
}, function () {
return [[], []];
});
function reduce(collection, iteratee, accumulator) {
var func = isArray(collection) ? arrayReduce : baseReduce,
initAccum = arguments.length < 3;
return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);
}
function reduceRight(collection, iteratee, accumulator) {
var func = isArray(collection) ? arrayReduceRight : baseReduce,
initAccum = arguments.length < 3;
return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);
}
function reject(collection, predicate) {
var func = isArray(collection) ? arrayFilter : baseFilter;
return func(collection, negate(getIteratee(predicate, 3)));
}
function sample(collection) {
var func = isArray(collection) ? arraySample : baseSample;
return func(collection);
}
function sampleSize(collection, n, guard) {
if (guard ? isIterateeCall(collection, n, guard) : n === undefined) {
n = 1;
} else {
n = toInteger(n);
}
var func = isArray(collection) ? arraySampleSize : baseSampleSize;
return func(collection, n);
}
function shuffle(collection) {
var func = isArray(collection) ? arrayShuffle : baseShuffle;
return func(collection);
}
function size(collection) {
if (collection == null) {
return 0;
}
if (isArrayLike(collection)) {
return isString(collection) ? stringSize(collection) : collection.length;
}
var tag = getTag(collection);
if (tag == mapTag || tag == setTag) {
return collection.size;
}
return baseKeys(collection).length;
}
function some(collection, predicate, guard) {
var func = isArray(collection) ? arraySome : baseSome;
if (guard && isIterateeCall(collection, predicate, guard)) {
predicate = undefined;
}
return func(collection, getIteratee(predicate, 3));
}
var sortBy = baseRest(function (collection, iteratees) {
if (collection == null) {
return [];
}
var length = iteratees.length;
if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {
iteratees = [];
} else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
iteratees = [iteratees[0]];
}
return baseOrderBy(collection, baseFlatten(iteratees, 1), []);
});
var now = ctxNow || function () {
return root.Date.now();
};
function after(n, func) {
if (typeof func != 'function') {
throw new TypeError(FUNC_ERROR_TEXT);
}
n = toInteger(n);
return function () {
if (--n < 1) {
return func.apply(this, arguments);
}
};
}
function ary(func, n, guard) {
n = guard ? undefined : n;
n = func && n == null ? func.length : n;
return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);
}
function before(n, func) {
var result;
if (typeof func != 'function') {
throw new TypeError(FUNC_ERROR_TEXT);
}
n = toInteger(n);
return function () {
if (--n > 0) {
result = func.apply(this, arguments);
}
if (n <= 1) {
func = undefined;
}
return result;
};
}
var bind = baseRest(function (func, thisArg, partials) {
var bitmask = WRAP_BIND_FLAG;
if (partials.length) {
var holders = replaceHolders(partials, getHolder(bind));
bitmask |= WRAP_PARTIAL_FLAG;
}
return createWrap(func, bitmask, thisArg, partials, holders);
});
var bindKey = baseRest(function (object, key, partials) {
var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;
if (partials.length) {
var holders = replaceHolders(partials, getHolder(bindKey));
bitmask |= WRAP_PARTIAL_FLAG;
}
return createWrap(key, bitmask, object, partials, holders);
});
function curry(func, arity, guard) {
arity = guard ? undefined : arity;
var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
result.placeholder = curry.placeholder;
return result;
}
function curryRight(func, arity, guard) {
arity = guard ? undefined : arity;
var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
result.placeholder = curryRight.placeholder;
return result;
}
function debounce(func, wait, options) {
var lastArgs,
lastThis,
maxWait,
result,
timerId,
lastCallTime,
lastInvokeTime = 0,
leading = false,
maxing = false,
trailing = true;
if (typeof func != 'function') {
throw new TypeError(FUNC_ERROR_TEXT);
}
wait = toNumber(wait) || 0;
if (isObject(options)) {
leading = !!options.leading;
maxing = 'maxWait' in options;
maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
trailing = 'trailing' in options ? !!options.trailing : trailing;
}
function invokeFunc(time) {
var args = lastArgs,
thisArg = lastThis;
lastArgs = lastThis = undefined;
lastInvokeTime = time;
result = func.apply(thisArg, args);
return result;
}
function leadingEdge(time) {
lastInvokeTime = time;
timerId = setTimeout(timerExpired, wait);
return leading ? invokeFunc(time) : result;
}
function remainingWait(time) {
var timeSinceLastCall = time - lastCallTime,
timeSinceLastInvoke = time - lastInvokeTime,
result = wait - timeSinceLastCall;
return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;
}
function shouldInvoke(time) {
var timeSinceLastCall = time - lastCallTime,
timeSinceLastInvoke = time - lastInvokeTime;
return lastCallTime === undefined || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
}
function timerExpired() {
var time = now();
if (shouldInvoke(time)) {
return trailingEdge(time);
}
timerId = setTimeout(timerExpired, remainingWait(time));
}
function trailingEdge(time) {
timerId = undefined;
if (trailing && lastArgs) {
return invokeFunc(time);
}
lastArgs = lastThis = undefined;
return result;
}
function cancel() {
if (timerId !== undefined) {
clearTimeout(timerId);
}
lastInvokeTime = 0;
lastArgs = lastCallTime = lastThis = timerId = undefined;
}
function flush() {
return timerId === undefined ? result : trailingEdge(now());
}
function debounced() {
var time = now(),
isInvoking = shouldInvoke(time);
lastArgs = arguments;
lastThis = this;
lastCallTime = time;
if (isInvoking) {
if (timerId === undefined) {
return leadingEdge(lastCallTime);
}
if (maxing) {
timerId = setTimeout(timerExpired, wait);
return invokeFunc(lastCallTime);
}
}
if (timerId === undefined) {
timerId = setTimeout(timerExpired, wait);
}
return result;
}
debounced.cancel = cancel;
debounced.flush = flush;
return debounced;
}
var defer = baseRest(function (func, args) {
return baseDelay(func, 1, args);
});
var delay = baseRest(function (func, wait, args) {
return baseDelay(func, toNumber(wait) || 0, args);
});
function flip(func) {
return createWrap(func, WRAP_FLIP_FLAG);
}
function memoize(func, resolver) {
if (typeof func != 'function' || resolver != null && typeof resolver != 'function') {
throw new TypeError(FUNC_ERROR_TEXT);
}
var memoized = function memoized() {
var args = arguments,
key = resolver ? resolver.apply(this, args) : args[0],
cache = memoized.cache;
if (cache.has(key)) {
return cache.get(key);
}
var result = func.apply(this, args);
memoized.cache = cache.set(key, result) || cache;
return result;
};
memoized.cache = new (memoize.Cache || MapCache)();
return memoized;
}
memoize.Cache = MapCache;
function negate(predicate) {
if (typeof predicate != 'function') {
throw new TypeError(FUNC_ERROR_TEXT);
}
return function () {
var args = arguments;
switch (args.length) {
case 0:
return !predicate.call(this);
case 1:
return !predicate.call(this, args[0]);
case 2:
return !predicate.call(this, args[0], args[1]);
case 3:
return !predicate.call(this, args[0], args[1], args[2]);
}
return !predicate.apply(this, args);
};
}
function once(func) {
return before(2, func);
}
var overArgs = castRest(function (func, transforms) {
transforms = transforms.length == 1 && isArray(transforms[0]) ? arrayMap(transforms[0], baseUnary(getIteratee())) : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));
var funcsLength = transforms.length;
return baseRest(function (args) {
var index = -1,
length = nativeMin(args.length, funcsLength);
while (++index < length) {
args[index] = transforms[index].call(this, args[index]);
}
return apply(func, this, args);
});
});
var partial = baseRest(function (func, partials) {
var holders = replaceHolders(partials, getHolder(partial));
return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);
});
var partialRight = baseRest(function (func, partials) {
var holders = replaceHolders(partials, getHolder(partialRight));
return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);
});
var rearg = flatRest(function (func, indexes) {
return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);
});
function rest(func, start) {
if (typeof func != 'function') {
throw new TypeError(FUNC_ERROR_TEXT);
}
start = start === undefined ? start : toInteger(start);
return baseRest(func, start);
}
function spread(func, start) {
if (typeof func != 'function') {
throw new TypeError(FUNC_ERROR_TEXT);
}
start = start == null ? 0 : nativeMax(toInteger(start), 0);
return baseRest(function (args) {
var array = args[start],
otherArgs = castSlice(args, 0, start);
if (array) {
arrayPush(otherArgs, array);
}
return apply(func, this, otherArgs);
});
}
function throttle(func, wait, options) {
var leading = true,
trailing = true;
if (typeof func != 'function') {
throw new TypeError(FUNC_ERROR_TEXT);
}
if (isObject(options)) {
leading = 'leading' in options ? !!options.leading : leading;
trailing = 'trailing' in options ? !!options.trailing : trailing;
}
return debounce(func, wait, {
'leading': leading,
'maxWait': wait,
'trailing': trailing
});
}
function unary(func) {
return ary(func, 1);
}
function wrap(value, wrapper) {
return partial(castFunction(wrapper), value);
}
function castArray() {
if (!arguments.length) {
return [];
}
var value = arguments[0];
return isArray(value) ? value : [value];
}
function clone(value) {
return baseClone(value, CLONE_SYMBOLS_FLAG);
}
function cloneWith(value, customizer) {
customizer = typeof customizer == 'function' ? customizer : undefined;
return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);
}
function cloneDeep(value) {
return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
}
function cloneDeepWith(value, customizer) {
customizer = typeof customizer == 'function' ? customizer : undefined;
return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);
}
function conformsTo(object, source) {
return source == null || baseConformsTo(object, source, keys(source));
}
function eq(value, other) {
return value === other || value !== value && other !== other;
}
var gt = createRelationalOperation(baseGt);
var gte = createRelationalOperation(function (value, other) {
return value >= other;
});
var isArguments = baseIsArguments(function () {
return arguments;
}()) ? baseIsArguments : function (value) {
return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee');
};
var isArray = Array.isArray;
var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;
function isArrayLike(value) {
return value != null && isLength(value.length) && !isFunction(value);
}
function isArrayLikeObject(value) {
return isObjectLike(value) && isArrayLike(value);
}
function isBoolean(value) {
return value === true || value === false || isObjectLike(value) && baseGetTag(value) == boolTag;
}
var isBuffer = nativeIsBuffer || stubFalse;
var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;
function isElement(value) {
return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);
}
function isEmpty(value) {
if (value == null) {
return true;
}
if (isArrayLike(value) && (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' || isBuffer(value) || isTypedArray(value) || isArguments(value))) {
return !value.length;
}
var tag = getTag(value);
if (tag == mapTag || tag == setTag) {
return !value.size;
}
if (isPrototype(value)) {
return !baseKeys(value).length;
}
for (var key in value) {
if (hasOwnProperty.call(value, key)) {
return false;
}
}
return true;
}
function isEqual(value, other) {
return baseIsEqual(value, other);
}
function isEqualWith(value, other, customizer) {
customizer = typeof customizer == 'function' ? customizer : undefined;
var result = customizer ? customizer(value, other) : undefined;
return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;
}
function isError(value) {
if (!isObjectLike(value)) {
return false;
}
var tag = baseGetTag(value);
return tag == errorTag || tag == domExcTag || typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value);
}
function isFinite(value) {
return typeof value == 'number' && nativeIsFinite(value);
}
function isFunction(value) {
if (!isObject(value)) {
return false;
}
var tag = baseGetTag(value);
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
}
function isInteger(value) {
return typeof value == 'number' && value == toInteger(value);
}
function isLength(value) {
return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
}
function isObject(value) {
var type = typeof value;
return value != null && (type == 'object' || type == 'function');
}
function isObjectLike(value) {
return value != null && typeof value == 'object';
}
var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
function isMatch(object, source) {
return object === source || baseIsMatch(object, source, getMatchData(source));
}
function isMatchWith(object, source, customizer) {
customizer = typeof customizer == 'function' ? customizer : undefined;
return baseIsMatch(object, source, getMatchData(source), customizer);
}
function isNaN(value) {
return isNumber(value) && value != +value;
}
function isNative(value) {
if (isMaskable(value)) {
throw new Error(CORE_ERROR_TEXT);
}
return baseIsNative(value);
}
function isNull(value) {
return value === null;
}
function isNil(value) {
return value == null;
}
function isNumber(value) {
return typeof value == 'number' || isObjectLike(value) && baseGetTag(value) == numberTag;
}
function isPlainObject(value) {
if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
return false;
}
var proto = getPrototype(value);
if (proto === null) {
return true;
}
var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
return typeof Ctor == 'function' && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;
}
var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;
function isSafeInteger(value) {
return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;
}
var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
function isString(value) {
return typeof value == 'string' || !isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag;
}
function isSymbol(value) {
return typeof value == 'symbol' || isObjectLike(value) && baseGetTag(value) == symbolTag;
}
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
function isUndefined(value) {
return value === undefined;
}
function isWeakMap(value) {
return isObjectLike(value) && getTag(value) == weakMapTag;
}
function isWeakSet(value) {
return isObjectLike(value) && baseGetTag(value) == weakSetTag;
}
var lt = createRelationalOperation(baseLt);
var lte = createRelationalOperation(function (value, other) {
return value <= other;
});
function toArray(value) {
if (!value) {
return [];
}
if (isArrayLike(value)) {
return isString(value) ? stringToArray(value) : copyArray(value);
}
if (symIterator && value[symIterator]) {
return iteratorToArray(value[symIterator]());
}
var tag = getTag(value),
func = tag == mapTag ? mapToArray : tag == setTag ? setToArray : values;
return func(value);
}
function toFinite(value) {
if (!value) {
return value === 0 ? value : 0;
}
value = toNumber(value);
if (value === INFINITY || value === -INFINITY) {
var sign = value < 0 ? -1 : 1;
return sign * MAX_INTEGER;
}
return value === value ? value : 0;
}
function toInteger(value) {
var result = toFinite(value),
remainder = result % 1;
return result === result ? remainder ? result - remainder : result : 0;
}
function toLength(value) {
return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;
}
function toNumber(value) {
if (typeof value == 'number') {
return value;
}
if (isSymbol(value)) {
return NAN;
}
if (isObject(value)) {
var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
value = isObject(other) ? other + '' : other;
}
if (typeof value != 'string') {
return value === 0 ? value : +value;
}
value = value.replace(reTrim, '');
var isBinary = reIsBinary.test(value);
return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
}
function toPlainObject(value) {
return copyObject(value, keysIn(value));
}
function toSafeInteger(value) {
return value ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER) : value === 0 ? value : 0;
}
function toString(value) {
return value == null ? '' : baseToString(value);
}
var assign = createAssigner(function (object, source) {
if (isPrototype(source) || isArrayLike(source)) {
copyObject(source, keys(source), object);
return;
}
for (var key in source) {
if (hasOwnProperty.call(source, key)) {
assignValue(object, key, source[key]);
}
}
});
var assignIn = createAssigner(function (object, source) {
copyObject(source, keysIn(source), object);
});
var assignInWith = createAssigner(function (object, source, srcIndex, customizer) {
copyObject(source, keysIn(source), object, customizer);
});
var assignWith = createAssigner(function (object, source, srcIndex, customizer) {
copyObject(source, keys(source), object, customizer);
});
var at = flatRest(baseAt);
function create(prototype, properties) {
var result = baseCreate(prototype);
return properties == null ? result : baseAssign(result, properties);
}
var defaults = baseRest(function (args) {
args.push(undefined, customDefaultsAssignIn);
return apply(assignInWith, undefined, args);
});
var defaultsDeep = baseRest(function (args) {
args.push(undefined, customDefaultsMerge);
return apply(mergeWith, undefined, args);
});
function findKey(object, predicate) {
return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);
}
function findLastKey(object, predicate) {
return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);
}
function forIn(object, iteratee) {
return object == null ? object : baseFor(object, getIteratee(iteratee, 3), keysIn);
}
function forInRight(object, iteratee) {
return object == null ? object : baseForRight(object, getIteratee(iteratee, 3), keysIn);
}
function forOwn(object, iteratee) {
return object && baseForOwn(object, getIteratee(iteratee, 3));
}
function forOwnRight(object, iteratee) {
return object && baseForOwnRight(object, getIteratee(iteratee, 3));
}
function functions(object) {
return object == null ? [] : baseFunctions(object, keys(object));
}
function functionsIn(object) {
return object == null ? [] : baseFunctions(object, keysIn(object));
}
function get(object, path, defaultValue) {
var result = object == null ? undefined : baseGet(object, path);
return result === undefined ? defaultValue : result;
}
function has(object, path) {
return object != null && hasPath(object, path, baseHas);
}
function hasIn(object, path) {
return object != null && hasPath(object, path, baseHasIn);
}
var invert = createInverter(function (result, value, key) {
result[value] = key;
}, constant(identity));
var invertBy = createInverter(function (result, value, key) {
if (hasOwnProperty.call(result, value)) {
result[value].push(key);
} else {
result[value] = [key];
}
}, getIteratee);
var invoke = baseRest(baseInvoke);
function keys(object) {
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
}
function keysIn(object) {
return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
}
function mapKeys(object, iteratee) {
var result = {};
iteratee = getIteratee(iteratee, 3);
baseForOwn(object, function (value, key, object) {
baseAssignValue(result, iteratee(value, key, object), value);
});
return result;
}
function mapValues(object, iteratee) {
var result = {};
iteratee = getIteratee(iteratee, 3);
baseForOwn(object, function (value, key, object) {
baseAssignValue(result, key, iteratee(value, key, object));
});
return result;
}
var merge = createAssigner(function (object, source, srcIndex) {
baseMerge(object, source, srcIndex);
});
var mergeWith = createAssigner(function (object, source, srcIndex, customizer) {
baseMerge(object, source, srcIndex, customizer);
});
var omit = flatRest(function (object, paths) {
var result = {};
if (object == null) {
return result;
}
var isDeep = false;
paths = arrayMap(paths, function (path) {
path = castPath(path, object);
isDeep || (isDeep = path.length > 1);
return path;
});
copyObject(object, getAllKeysIn(object), result);
if (isDeep) {
result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
}
var length = paths.length;
while (length--) {
baseUnset(result, paths[length]);
}
return result;
});
function omitBy(object, predicate) {
return pickBy(object, negate(getIteratee(predicate)));
}
var pick = flatRest(function (object, paths) {
return object == null ? {} : basePick(object, paths);
});
function pickBy(object, predicate) {
if (object == null) {
return {};
}
var props = arrayMap(getAllKeysIn(object), function (prop) {
return [prop];
});
predicate = getIteratee(predicate);
return basePickBy(object, props, function (value, path) {
return predicate(value, path[0]);
});
}
function result(object, path, defaultValue) {
path = castPath(path, object);
var index = -1,
length = path.length;
if (!length) {
length = 1;
object = undefined;
}
while (++index < length) {
var value = object == null ? undefined : object[toKey(path[index])];
if (value === undefined) {
index = length;
value = defaultValue;
}
object = isFunction(value) ? value.call(object) : value;
}
return object;
}
function set(object, path, value) {
return object == null ? object : baseSet(object, path, value);
}
function setWith(object, path, value, customizer) {
customizer = typeof customizer == 'function' ? customizer : undefined;
return object == null ? object : baseSet(object, path, value, customizer);
}
var toPairs = createToPairs(keys);
var toPairsIn = createToPairs(keysIn);
function transform(object, iteratee, accumulator) {
var isArr = isArray(object),
isArrLike = isArr || isBuffer(object) || isTypedArray(object);
iteratee = getIteratee(iteratee, 4);
if (accumulator == null) {
var Ctor = object && object.constructor;
if (isArrLike) {
accumulator = isArr ? new Ctor() : [];
} else if (isObject(object)) {
accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};
} else {
accumulator = {};
}
}
(isArrLike ? arrayEach : baseForOwn)(object, function (value, index, object) {
return iteratee(accumulator, value, index, object);
});
return accumulator;
}
function unset(object, path) {
return object == null ? true : baseUnset(object, path);
}
function update(object, path, updater) {
return object == null ? object : baseUpdate(object, path, castFunction(updater));
}
function updateWith(object, path, updater, customizer) {
customizer = typeof customizer == 'function' ? customizer : undefined;
return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);
}
function values(object) {
return object == null ? [] : baseValues(object, keys(object));
}
function valuesIn(object) {
return object == null ? [] : baseValues(object, keysIn(object));
}
function clamp(number, lower, upper) {
if (upper === undefined) {
upper = lower;
lower = undefined;
}
if (upper !== undefined) {
upper = toNumber(upper);
upper = upper === upper ? upper : 0;
}
if (lower !== undefined) {
lower = toNumber(lower);
lower = lower === lower ? lower : 0;
}
return baseClamp(toNumber(number), lower, upper);
}
function inRange(number, start, end) {
start = toFinite(start);
if (end === undefined) {
end = start;
start = 0;
} else {
end = toFinite(end);
}
number = toNumber(number);
return baseInRange(number, start, end);
}
function random(lower, upper, floating) {
if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {
upper = floating = undefined;
}
if (floating === undefined) {
if (typeof upper == 'boolean') {
floating = upper;
upper = undefined;
} else if (typeof lower == 'boolean') {
floating = lower;
lower = undefined;
}
}
if (lower === undefined && upper === undefined) {
lower = 0;
upper = 1;
} else {
lower = toFinite(lower);
if (upper === undefined) {
upper = lower;
lower = 0;
} else {
upper = toFinite(upper);
}
}
if (lower > upper) {
var temp = lower;
lower = upper;
upper = temp;
}
if (floating || lower % 1 || upper % 1) {
var rand = nativeRandom();
return nativeMin(lower + rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1))), upper);
}
return baseRandom(lower, upper);
}
var camelCase = createCompounder(function (result, word, index) {
word = word.toLowerCase();
return result + (index ? capitalize(word) : word);
});
function capitalize(string) {
return upperFirst(toString(string).toLowerCase());
}
function deburr(string) {
string = toString(string);
return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');
}
function endsWith(string, target, position) {
string = toString(string);
target = baseToString(target);
var length = string.length;
position = position === undefined ? length : baseClamp(toInteger(position), 0, length);
var end = position;
position -= target.length;
return position >= 0 && string.slice(position, end) == target;
}
function escape(string) {
string = toString(string);
return string && reHasUnescapedHtml.test(string) ? string.replace(reUnescapedHtml, escapeHtmlChar) : string;
}
function escapeRegExp(string) {
string = toString(string);
return string && reHasRegExpChar.test(string) ? string.replace(reRegExpChar, '\\$&') : string;
}
var kebabCase = createCompounder(function (result, word, index) {
return result + (index ? '-' : '') + word.toLowerCase();
});
var lowerCase = createCompounder(function (result, word, index) {
return result + (index ? ' ' : '') + word.toLowerCase();
});
var lowerFirst = createCaseFirst('toLowerCase');
function pad(string, length, chars) {
string = toString(string);
length = toInteger(length);
var strLength = length ? stringSize(string) : 0;
if (!length || strLength >= length) {
return string;
}
var mid = (length - strLength) / 2;
return createPadding(nativeFloor(mid), chars) + string + createPadding(nativeCeil(mid), chars);
}
function padEnd(string, length, chars) {
string = toString(string);
length = toInteger(length);
var strLength = length ? stringSize(string) : 0;
return length && strLength < length ? string + createPadding(length - strLength, chars) : string;
}
function padStart(string, length, chars) {
string = toString(string);
length = toInteger(length);
var strLength = length ? stringSize(string) : 0;
return length && strLength < length ? createPadding(length - strLength, chars) + string : string;
}
function parseInt(string, radix, guard) {
if (guard || radix == null) {
radix = 0;
} else if (radix) {
radix = +radix;
}
return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);
}
function repeat(string, n, guard) {
if (guard ? isIterateeCall(string, n, guard) : n === undefined) {
n = 1;
} else {
n = toInteger(n);
}
return baseRepeat(toString(string), n);
}
function replace() {
var args = arguments,
string = toString(args[0]);
return args.length < 3 ? string : string.replace(args[1], args[2]);
}
var snakeCase = createCompounder(function (result, word, index) {
return result + (index ? '_' : '') + word.toLowerCase();
});
function split(string, separator, limit) {
if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {
separator = limit = undefined;
}
limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;
if (!limit) {
return [];
}
string = toString(string);
if (string && (typeof separator == 'string' || separator != null && !isRegExp(separator))) {
separator = baseToString(separator);
if (!separator && hasUnicode(string)) {
return castSlice(stringToArray(string), 0, limit);
}
}
return string.split(separator, limit);
}
var startCase = createCompounder(function (result, word, index) {
return result + (index ? ' ' : '') + upperFirst(word);
});
function startsWith(string, target, position) {
string = toString(string);
position = position == null ? 0 : baseClamp(toInteger(position), 0, string.length);
target = baseToString(target);
return string.slice(position, position + target.length) == target;
}
function template(string, options, guard) {
var settings = lodash.templateSettings;
if (guard && isIterateeCall(string, options, guard)) {
options = undefined;
}
string = toString(string);
options = assignInWith({}, options, settings, customDefaultsAssignIn);
var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn),
importsKeys = keys(imports),
importsValues = baseValues(imports, importsKeys);
var isEscaping,
isEvaluating,
index = 0,
interpolate = options.interpolate || reNoMatch,
source = "__p += '";
var reDelimiters = RegExp((options.escape || reNoMatch).source + '|' + interpolate.source + '|' + (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' + (options.evaluate || reNoMatch).source + '|$', 'g');
var sourceURL = '//# sourceURL=' + ('sourceURL' in options ? options.sourceURL : 'lodash.templateSources[' + ++templateCounter + ']') + '\n';
string.replace(reDelimiters, function (match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
interpolateValue || (interpolateValue = esTemplateValue);
source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);
if (escapeValue) {
isEscaping = true;
source += "' +\n__e(" + escapeValue + ") +\n'";
}
if (evaluateValue) {
isEvaluating = true;
source += "';\n" + evaluateValue + ";\n__p += '";
}
if (interpolateValue) {
source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
}
index = offset + match.length;
return match;
});
source += "';\n";
var variable = options.variable;
if (!variable) {
source = 'with (obj) {\n' + source + '\n}\n';
}
source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source).replace(reEmptyStringMiddle, '$1').replace(reEmptyStringTrailing, '$1;');
source = 'function(' + (variable || 'obj') + ') {\n' + (variable ? '' : 'obj || (obj = {});\n') + "var __t, __p = ''" + (isEscaping ? ', __e = _.escape' : '') + (isEvaluating ? ', __j = Array.prototype.join;\n' + "function print() { __p += __j.call(arguments, '') }\n" : ';\n') + source + 'return __p\n}';
var result = attempt(function () {
return Function(importsKeys, sourceURL + 'return ' + source).apply(undefined, importsValues);
});
result.source = source;
if (isError(result)) {
throw result;
}
return result;
}
function toLower(value) {
return toString(value).toLowerCase();
}
function toUpper(value) {
return toString(value).toUpperCase();
}
function trim(string, chars, guard) {
string = toString(string);
if (string && (guard || chars === undefined)) {
return string.replace(reTrim, '');
}
if (!string || !(chars = baseToString(chars))) {
return string;
}
var strSymbols = stringToArray(string),
chrSymbols = stringToArray(chars),
start = charsStartIndex(strSymbols, chrSymbols),
end = charsEndIndex(strSymbols, chrSymbols) + 1;
return castSlice(strSymbols, start, end).join('');
}
function trimEnd(string, chars, guard) {
string = toString(string);
if (string && (guard || chars === undefined)) {
return string.replace(reTrimEnd, '');
}
if (!string || !(chars = baseToString(chars))) {
return string;
}
var strSymbols = stringToArray(string),
end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;
return castSlice(strSymbols, 0, end).join('');
}
function trimStart(string, chars, guard) {
string = toString(string);
if (string && (guard || chars === undefined)) {
return string.replace(reTrimStart, '');
}
if (!string || !(chars = baseToString(chars))) {
return string;
}
var strSymbols = stringToArray(string),
start = charsStartIndex(strSymbols, stringToArray(chars));
return castSlice(strSymbols, start).join('');
}
function truncate(string, options) {
var length = DEFAULT_TRUNC_LENGTH,
omission = DEFAULT_TRUNC_OMISSION;
if (isObject(options)) {
var separator = 'separator' in options ? options.separator : separator;
length = 'length' in options ? toInteger(options.length) : length;
omission = 'omission' in options ? baseToString(options.omission) : omission;
}
string = toString(string);
var strLength = string.length;
if (hasUnicode(string)) {
var strSymbols = stringToArray(string);
strLength = strSymbols.length;
}
if (length >= strLength) {
return string;
}
var end = length - stringSize(omission);
if (end < 1) {
return omission;
}
var result = strSymbols ? castSlice(strSymbols, 0, end).join('') : string.slice(0, end);
if (separator === undefined) {
return result + omission;
}
if (strSymbols) {
end += result.length - end;
}
if (isRegExp(separator)) {
if (string.slice(end).search(separator)) {
var match,
substring = result;
if (!separator.global) {
separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g');
}
separator.lastIndex = 0;
while (match = separator.exec(substring)) {
var newEnd = match.index;
}
result = result.slice(0, newEnd === undefined ? end : newEnd);
}
} else if (string.indexOf(baseToString(separator), end) != end) {
var index = result.lastIndexOf(separator);
if (index > -1) {
result = result.slice(0, index);
}
}
return result + omission;
}
function unescape(string) {
string = toString(string);
return string && reHasEscapedHtml.test(string) ? string.replace(reEscapedHtml, unescapeHtmlChar) : string;
}
var upperCase = createCompounder(function (result, word, index) {
return result + (index ? ' ' : '') + word.toUpperCase();
});
var upperFirst = createCaseFirst('toUpperCase');
function words(string, pattern, guard) {
string = toString(string);
pattern = guard ? undefined : pattern;
if (pattern === undefined) {
return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);
}
return string.match(pattern) || [];
}
var attempt = baseRest(function (func, args) {
try {
return apply(func, undefined, args);
} catch (e) {
return isError(e) ? e : new Error(e);
}
});
var bindAll = flatRest(function (object, methodNames) {
arrayEach(methodNames, function (key) {
key = toKey(key);
baseAssignValue(object, key, bind(object[key], object));
});
return object;
});
function cond(pairs) {
var length = pairs == null ? 0 : pairs.length,
toIteratee = getIteratee();
pairs = !length ? [] : arrayMap(pairs, function (pair) {
if (typeof pair[1] != 'function') {
throw new TypeError(FUNC_ERROR_TEXT);
}
return [toIteratee(pair[0]), pair[1]];
});
return baseRest(function (args) {
var index = -1;
while (++index < length) {
var pair = pairs[index];
if (apply(pair[0], this, args)) {
return apply(pair[1], this, args);
}
}
});
}
function conforms(source) {
return baseConforms(baseClone(source, CLONE_DEEP_FLAG));
}
function constant(value) {
return function () {
return value;
};
}
function defaultTo(value, defaultValue) {
return value == null || value !== value ? defaultValue : value;
}
var flow = createFlow();
var flowRight = createFlow(true);
function identity(value) {
return value;
}
function iteratee(func) {
return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG));
}
function matches(source) {
return baseMatches(baseClone(source, CLONE_DEEP_FLAG));
}
function matchesProperty(path, srcValue) {
return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));
}
var method = baseRest(function (path, args) {
return function (object) {
return baseInvoke(object, path, args);
};
});
var methodOf = baseRest(function (object, args) {
return function (path) {
return baseInvoke(object, path, args);
};
});
function mixin(object, source, options) {
var props = keys(source),
methodNames = baseFunctions(source, props);
if (options == null && !(isObject(source) && (methodNames.length || !props.length))) {
options = source;
source = object;
object = this;
methodNames = baseFunctions(source, keys(source));
}
var chain = !(isObject(options) && 'chain' in options) || !!options.chain,
isFunc = isFunction(object);
arrayEach(methodNames, function (methodName) {
var func = source[methodName];
object[methodName] = func;
if (isFunc) {
object.prototype[methodName] = function () {
var chainAll = this.__chain__;
if (chain || chainAll) {
var result = object(this.__wrapped__),
actions = result.__actions__ = copyArray(this.__actions__);
actions.push({ 'func': func, 'args': arguments, 'thisArg': object });
result.__chain__ = chainAll;
return result;
}
return func.apply(object, arrayPush([this.value()], arguments));
};
}
});
return object;
}
function noConflict() {
if (root._ === this) {
root._ = oldDash;
}
return this;
}
function noop() {}
function nthArg(n) {
n = toInteger(n);
return baseRest(function (args) {
return baseNth(args, n);
});
}
var over = createOver(arrayMap);
var overEvery = createOver(arrayEvery);
var overSome = createOver(arraySome);
function property(path) {
return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
}
function propertyOf(object) {
return function (path) {
return object == null ? undefined : baseGet(object, path);
};
}
var range = createRange();
var rangeRight = createRange(true);
function stubArray() {
return [];
}
function stubFalse() {
return false;
}
function stubObject() {
return {};
}
function stubString() {
return '';
}
function stubTrue() {
return true;
}
function times(n, iteratee) {
n = toInteger(n);
if (n < 1 || n > MAX_SAFE_INTEGER) {
return [];
}
var index = MAX_ARRAY_LENGTH,
length = nativeMin(n, MAX_ARRAY_LENGTH);
iteratee = getIteratee(iteratee);
n -= MAX_ARRAY_LENGTH;
var result = baseTimes(length, iteratee);
while (++index < n) {
iteratee(index);
}
return result;
}
function toPath(value) {
if (isArray(value)) {
return arrayMap(value, toKey);
}
return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));
}
function uniqueId(prefix) {
var id = ++idCounter;
return toString(prefix) + id;
}
var add = createMathOperation(function (augend, addend) {
return augend + addend;
}, 0);
var ceil = createRound('ceil');
var divide = createMathOperation(function (dividend, divisor) {
return dividend / divisor;
}, 1);
var floor = createRound('floor');
function max(array) {
return array && array.length ? baseExtremum(array, identity, baseGt) : undefined;
}
function maxBy(array, iteratee) {
return array && array.length ? baseExtremum(array, getIteratee(iteratee, 2), baseGt) : undefined;
}
function mean(array) {
return baseMean(array, identity);
}
function meanBy(array, iteratee) {
return baseMean(array, getIteratee(iteratee, 2));
}
function min(array) {
return array && array.length ? baseExtremum(array, identity, baseLt) : undefined;
}
function minBy(array, iteratee) {
return array && array.length ? baseExtremum(array, getIteratee(iteratee, 2), baseLt) : undefined;
}
var multiply = createMathOperation(function (multiplier, multiplicand) {
return multiplier * multiplicand;
}, 1);
var round = createRound('round');
var subtract = createMathOperation(function (minuend, subtrahend) {
return minuend - subtrahend;
}, 0);
function sum(array) {
return array && array.length ? baseSum(array, identity) : 0;
}
function sumBy(array, iteratee) {
return array && array.length ? baseSum(array, getIteratee(iteratee, 2)) : 0;
}
lodash.after = after;
lodash.ary = ary;
lodash.assign = assign;
lodash.assignIn = assignIn;
lodash.assignInWith = assignInWith;
lodash.assignWith = assignWith;
lodash.at = at;
lodash.before = before;
lodash.bind = bind;
lodash.bindAll = bindAll;
lodash.bindKey = bindKey;
lodash.castArray = castArray;
lodash.chain = chain;
lodash.chunk = chunk;
lodash.compact = compact;
lodash.concat = concat;
lodash.cond = cond;
lodash.conforms = conforms;
lodash.constant = constant;
lodash.countBy = countBy;
lodash.create = create;
lodash.curry = curry;
lodash.curryRight = curryRight;
lodash.debounce = debounce;
lodash.defaults = defaults;
lodash.defaultsDeep = defaultsDeep;
lodash.defer = defer;
lodash.delay = delay;
lodash.difference = difference;
lodash.differenceBy = differenceBy;
lodash.differenceWith = differenceWith;
lodash.drop = drop;
lodash.dropRight = dropRight;
lodash.dropRightWhile = dropRightWhile;
lodash.dropWhile = dropWhile;
lodash.fill = fill;
lodash.filter = filter;
lodash.flatMap = flatMap;
lodash.flatMapDeep = flatMapDeep;
lodash.flatMapDepth = flatMapDepth;
lodash.flatten = flatten;
lodash.flattenDeep = flattenDeep;
lodash.flattenDepth = flattenDepth;
lodash.flip = flip;
lodash.flow = flow;
lodash.flowRight = flowRight;
lodash.fromPairs = fromPairs;
lodash.functions = functions;
lodash.functionsIn = functionsIn;
lodash.groupBy = groupBy;
lodash.initial = initial;
lodash.intersection = intersection;
lodash.intersectionBy = intersectionBy;
lodash.intersectionWith = intersectionWith;
lodash.invert = invert;
lodash.invertBy = invertBy;
lodash.invokeMap = invokeMap;
lodash.iteratee = iteratee;
lodash.keyBy = keyBy;
lodash.keys = keys;
lodash.keysIn = keysIn;
lodash.map = map;
lodash.mapKeys = mapKeys;
lodash.mapValues = mapValues;
lodash.matches = matches;
lodash.matchesProperty = matchesProperty;
lodash.memoize = memoize;
lodash.merge = merge;
lodash.mergeWith = mergeWith;
lodash.method = method;
lodash.methodOf = methodOf;
lodash.mixin = mixin;
lodash.negate = negate;
lodash.nthArg = nthArg;
lodash.omit = omit;
lodash.omitBy = omitBy;
lodash.once = once;
lodash.orderBy = orderBy;
lodash.over = over;
lodash.overArgs = overArgs;
lodash.overEvery = overEvery;
lodash.overSome = overSome;
lodash.partial = partial;
lodash.partialRight = partialRight;
lodash.partition = partition;
lodash.pick = pick;
lodash.pickBy = pickBy;
lodash.property = property;
lodash.propertyOf = propertyOf;
lodash.pull = pull;
lodash.pullAll = pullAll;
lodash.pullAllBy = pullAllBy;
lodash.pullAllWith = pullAllWith;
lodash.pullAt = pullAt;
lodash.range = range;
lodash.rangeRight = rangeRight;
lodash.rearg = rearg;
lodash.reject = reject;
lodash.remove = remove;
lodash.rest = rest;
lodash.reverse = reverse;
lodash.sampleSize = sampleSize;
lodash.set = set;
lodash.setWith = setWith;
lodash.shuffle = shuffle;
lodash.slice = slice;
lodash.sortBy = sortBy;
lodash.sortedUniq = sortedUniq;
lodash.sortedUniqBy = sortedUniqBy;
lodash.split = split;
lodash.spread = spread;
lodash.tail = tail;
lodash.take = take;
lodash.takeRight = takeRight;
lodash.takeRightWhile = takeRightWhile;
lodash.takeWhile = takeWhile;
lodash.tap = tap;
lodash.throttle = throttle;
lodash.thru = thru;
lodash.toArray = toArray;
lodash.toPairs = toPairs;
lodash.toPairsIn = toPairsIn;
lodash.toPath = toPath;
lodash.toPlainObject = toPlainObject;
lodash.transform = transform;
lodash.unary = unary;
lodash.union = union;
lodash.unionBy = unionBy;
lodash.unionWith = unionWith;
lodash.uniq = uniq;
lodash.uniqBy = uniqBy;
lodash.uniqWith = uniqWith;
lodash.unset = unset;
lodash.unzip = unzip;
lodash.unzipWith = unzipWith;
lodash.update = update;
lodash.updateWith = updateWith;
lodash.values = values;
lodash.valuesIn = valuesIn;
lodash.without = without;
lodash.words = words;
lodash.wrap = wrap;
lodash.xor = xor;
lodash.xorBy = xorBy;
lodash.xorWith = xorWith;
lodash.zip = zip;
lodash.zipObject = zipObject;
lodash.zipObjectDeep = zipObjectDeep;
lodash.zipWith = zipWith;
lodash.entries = toPairs;
lodash.entriesIn = toPairsIn;
lodash.extend = assignIn;
lodash.extendWith = assignInWith;
mixin(lodash, lodash);
lodash.add = add;
lodash.attempt = attempt;
lodash.camelCase = camelCase;
lodash.capitalize = capitalize;
lodash.ceil = ceil;
lodash.clamp = clamp;
lodash.clone = clone;
lodash.cloneDeep = cloneDeep;
lodash.cloneDeepWith = cloneDeepWith;
lodash.cloneWith = cloneWith;
lodash.conformsTo = conformsTo;
lodash.deburr = deburr;
lodash.defaultTo = defaultTo;
lodash.divide = divide;
lodash.endsWith = endsWith;
lodash.eq = eq;
lodash.escape = escape;
lodash.escapeRegExp = escapeRegExp;
lodash.every = every;
lodash.find = find;
lodash.findIndex = findIndex;
lodash.findKey = findKey;
lodash.findLast = findLast;
lodash.findLastIndex = findLastIndex;
lodash.findLastKey = findLastKey;
lodash.floor = floor;
lodash.forEach = forEach;
lodash.forEachRight = forEachRight;
lodash.forIn = forIn;
lodash.forInRight = forInRight;
lodash.forOwn = forOwn;
lodash.forOwnRight = forOwnRight;
lodash.get = get;
lodash.gt = gt;
lodash.gte = gte;
lodash.has = has;
lodash.hasIn = hasIn;
lodash.head = head;
lodash.identity = identity;
lodash.includes = includes;
lodash.indexOf = indexOf;
lodash.inRange = inRange;
lodash.invoke = invoke;
lodash.isArguments = isArguments;
lodash.isArray = isArray;
lodash.isArrayBuffer = isArrayBuffer;
lodash.isArrayLike = isArrayLike;
lodash.isArrayLikeObject = isArrayLikeObject;
lodash.isBoolean = isBoolean;
lodash.isBuffer = isBuffer;
lodash.isDate = isDate;
lodash.isElement = isElement;
lodash.isEmpty = isEmpty;
lodash.isEqual = isEqual;
lodash.isEqualWith = isEqualWith;
lodash.isError = isError;
lodash.isFinite = isFinite;
lodash.isFunction = isFunction;
lodash.isInteger = isInteger;
lodash.isLength = isLength;
lodash.isMap = isMap;
lodash.isMatch = isMatch;
lodash.isMatchWith = isMatchWith;
lodash.isNaN = isNaN;
lodash.isNative = isNative;
lodash.isNil = isNil;
lodash.isNull = isNull;
lodash.isNumber = isNumber;
lodash.isObject = isObject;
lodash.isObjectLike = isObjectLike;
lodash.isPlainObject = isPlainObject;
lodash.isRegExp = isRegExp;
lodash.isSafeInteger = isSafeInteger;
lodash.isSet = isSet;
lodash.isString = isString;
lodash.isSymbol = isSymbol;
lodash.isTypedArray = isTypedArray;
lodash.isUndefined = isUndefined;
lodash.isWeakMap = isWeakMap;
lodash.isWeakSet = isWeakSet;
lodash.join = join;
lodash.kebabCase = kebabCase;
lodash.last = last;
lodash.lastIndexOf = lastIndexOf;
lodash.lowerCase = lowerCase;
lodash.lowerFirst = lowerFirst;
lodash.lt = lt;
lodash.lte = lte;
lodash.max = max;
lodash.maxBy = maxBy;
lodash.mean = mean;
lodash.meanBy = meanBy;
lodash.min = min;
lodash.minBy = minBy;
lodash.stubArray = stubArray;
lodash.stubFalse = stubFalse;
lodash.stubObject = stubObject;
lodash.stubString = stubString;
lodash.stubTrue = stubTrue;
lodash.multiply = multiply;
lodash.nth = nth;
lodash.noConflict = noConflict;
lodash.noop = noop;
lodash.now = now;
lodash.pad = pad;
lodash.padEnd = padEnd;
lodash.padStart = padStart;
lodash.parseInt = parseInt;
lodash.random = random;
lodash.reduce = reduce;
lodash.reduceRight = reduceRight;
lodash.repeat = repeat;
lodash.replace = replace;
lodash.result = result;
lodash.round = round;
lodash.runInContext = runInContext;
lodash.sample = sample;
lodash.size = size;
lodash.snakeCase = snakeCase;
lodash.some = some;
lodash.sortedIndex = sortedIndex;
lodash.sortedIndexBy = sortedIndexBy;
lodash.sortedIndexOf = sortedIndexOf;
lodash.sortedLastIndex = sortedLastIndex;
lodash.sortedLastIndexBy = sortedLastIndexBy;
lodash.sortedLastIndexOf = sortedLastIndexOf;
lodash.startCase = startCase;
lodash.startsWith = startsWith;
lodash.subtract = subtract;
lodash.sum = sum;
lodash.sumBy = sumBy;
lodash.template = template;
lodash.times = times;
lodash.toFinite = toFinite;
lodash.toInteger = toInteger;
lodash.toLength = toLength;
lodash.toLower = toLower;
lodash.toNumber = toNumber;
lodash.toSafeInteger = toSafeInteger;
lodash.toString = toString;
lodash.toUpper = toUpper;
lodash.trim = trim;
lodash.trimEnd = trimEnd;
lodash.trimStart = trimStart;
lodash.truncate = truncate;
lodash.unescape = unescape;
lodash.uniqueId = uniqueId;
lodash.upperCase = upperCase;
lodash.upperFirst = upperFirst;
lodash.each = forEach;
lodash.eachRight = forEachRight;
lodash.first = head;
mixin(lodash, function () {
var source = {};
baseForOwn(lodash, function (func, methodName) {
if (!hasOwnProperty.call(lodash.prototype, methodName)) {
source[methodName] = func;
}
});
return source;
}(), { 'chain': false });
lodash.VERSION = VERSION;
arrayEach(['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], function (methodName) {
lodash[methodName].placeholder = lodash;
});
arrayEach(['drop', 'take'], function (methodName, index) {
LazyWrapper.prototype[methodName] = function (n) {
n = n === undefined ? 1 : nativeMax(toInteger(n), 0);
var result = this.__filtered__ && !index ? new LazyWrapper(this) : this.clone();
if (result.__filtered__) {
result.__takeCount__ = nativeMin(n, result.__takeCount__);
} else {
result.__views__.push({
'size': nativeMin(n, MAX_ARRAY_LENGTH),
'type': methodName + (result.__dir__ < 0 ? 'Right' : '')
});
}
return result;
};
LazyWrapper.prototype[methodName + 'Right'] = function (n) {
return this.reverse()[methodName](n).reverse();
};
});
arrayEach(['filter', 'map', 'takeWhile'], function (methodName, index) {
var type = index + 1,
isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;
LazyWrapper.prototype[methodName] = function (iteratee) {
var result = this.clone();
result.__iteratees__.push({
'iteratee': getIteratee(iteratee, 3),
'type': type
});
result.__filtered__ = result.__filtered__ || isFilter;
return result;
};
});
arrayEach(['head', 'last'], function (methodName, index) {
var takeName = 'take' + (index ? 'Right' : '');
LazyWrapper.prototype[methodName] = function () {
return this[takeName](1).value()[0];
};
});
arrayEach(['initial', 'tail'], function (methodName, index) {
var dropName = 'drop' + (index ? '' : 'Right');
LazyWrapper.prototype[methodName] = function () {
return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);
};
});
LazyWrapper.prototype.compact = function () {
return this.filter(identity);
};
LazyWrapper.prototype.find = function (predicate) {
return this.filter(predicate).head();
};
LazyWrapper.prototype.findLast = function (predicate) {
return this.reverse().find(predicate);
};
LazyWrapper.prototype.invokeMap = baseRest(function (path, args) {
if (typeof path == 'function') {
return new LazyWrapper(this);
}
return this.map(function (value) {
return baseInvoke(value, path, args);
});
});
LazyWrapper.prototype.reject = function (predicate) {
return this.filter(negate(getIteratee(predicate)));
};
LazyWrapper.prototype.slice = function (start, end) {
start = toInteger(start);
var result = this;
if (result.__filtered__ && (start > 0 || end < 0)) {
return new LazyWrapper(result);
}
if (start < 0) {
result = result.takeRight(-start);
} else if (start) {
result = result.drop(start);
}
if (end !== undefined) {
end = toInteger(end);
result = end < 0 ? result.dropRight(-end) : result.take(end - start);
}
return result;
};
LazyWrapper.prototype.takeRightWhile = function (predicate) {
return this.reverse().takeWhile(predicate).reverse();
};
LazyWrapper.prototype.toArray = function () {
return this.take(MAX_ARRAY_LENGTH);
};
baseForOwn(LazyWrapper.prototype, function (func, methodName) {
var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName),
isTaker = /^(?:head|last)$/.test(methodName),
lodashFunc = lodash[isTaker ? 'take' + (methodName == 'last' ? 'Right' : '') : methodName],
retUnwrapped = isTaker || /^find/.test(methodName);
if (!lodashFunc) {
return;
}
lodash.prototype[methodName] = function () {
var value = this.__wrapped__,
args = isTaker ? [1] : arguments,
isLazy = value instanceof LazyWrapper,
iteratee = args[0],
useLazy = isLazy || isArray(value);
var interceptor = function interceptor(value) {
var result = lodashFunc.apply(lodash, arrayPush([value], args));
return isTaker && chainAll ? result[0] : result;
};
if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {
isLazy = useLazy = false;
}
var chainAll = this.__chain__,
isHybrid = !!this.__actions__.length,
isUnwrapped = retUnwrapped && !chainAll,
onlyLazy = isLazy && !isHybrid;
if (!retUnwrapped && useLazy) {
value = onlyLazy ? value : new LazyWrapper(this);
var result = func.apply(value, args);
result.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined });
return new LodashWrapper(result, chainAll);
}
if (isUnwrapped && onlyLazy) {
return func.apply(this, args);
}
result = this.thru(interceptor);
return isUnwrapped ? isTaker ? result.value()[0] : result.value() : result;
};
});
arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function (methodName) {
var func = arrayProto[methodName],
chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',
retUnwrapped = /^(?:pop|shift)$/.test(methodName);
lodash.prototype[methodName] = function () {
var args = arguments;
if (retUnwrapped && !this.__chain__) {
var value = this.value();
return func.apply(isArray(value) ? value : [], args);
}
return this[chainName](function (value) {
return func.apply(isArray(value) ? value : [], args);
});
};
});
baseForOwn(LazyWrapper.prototype, function (func, methodName) {
var lodashFunc = lodash[methodName];
if (lodashFunc) {
var key = lodashFunc.name + '',
names = realNames[key] || (realNames[key] = []);
names.push({ 'name': methodName, 'func': lodashFunc });
}
});
realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [{
'name': 'wrapper',
'func': undefined
}];
LazyWrapper.prototype.clone = lazyClone;
LazyWrapper.prototype.reverse = lazyReverse;
LazyWrapper.prototype.value = lazyValue;
lodash.prototype.at = wrapperAt;
lodash.prototype.chain = wrapperChain;
lodash.prototype.commit = wrapperCommit;
lodash.prototype.next = wrapperNext;
lodash.prototype.plant = wrapperPlant;
lodash.prototype.reverse = wrapperReverse;
lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;
lodash.prototype.first = lodash.prototype.head;
if (symIterator) {
lodash.prototype[symIterator] = wrapperToIterator;
}
return lodash;
};
var _ = runInContext();
if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) {
root._ = _;
define(function () {
return _;
});
} else if (freeModule) {
(freeModule.exports = _)._ = _;
freeExports._ = _;
} else {
root._ = _;
}
}).call(this);
}, 502, null, "lodash/lodash.js");
__d(/* jitsi-meet/react/features/base/config/parseURLParams.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = parseURLParams;
function parseURLParams(url) {
var dontParse = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
var source = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'hash';
var paramStr = source === 'search' ? url.search : url.hash;
var params = {};
paramStr && paramStr.substr(1).split('&').forEach(function (part) {
var param = part.split('=');
var key = param[0];
if (!key) {
return;
}
var value = void 0;
try {
value = param[1];
if (!dontParse) {
value = JSON.parse(decodeURIComponent(value).replace(/\\&/, '&'));
}
} catch (e) {
var msg = 'Failed to parse URL parameter value: ' + String(value);
console.warn(msg, e);
window.onerror && window.onerror(msg, null, null, null, e);
return;
}
params[key] = value;
});
return params;
}
}, 503, null, "jitsi-meet/react/features/base/config/parseURLParams.js");
__d(/* jitsi-meet/react/features/base/config/reducer.js */function(global, require, module, exports) {var _lodash = require(502 ); // 502 = lodash
var _lodash2 = babelHelpers.interopRequireDefault(_lodash);
var _redux = require(505 ); // 505 = ../redux
var _actionTypes = require(498 ); // 498 = ./actionTypes
var INITIAL_NON_RN_STATE = {};
var INITIAL_RN_STATE = {
disableAudioLevels: true,
disableThirdPartyRequests: true,
p2p: {
preferH264: true
}
};
_redux.ReducerRegistry.register('features/base/config', function () {
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _getInitialState();
var action = arguments[1];
switch (action.type) {
case _actionTypes.SET_CONFIG:
return _setConfig(state, action);
default:
return state;
}
});
function _getInitialState() {
return navigator.product === 'ReactNative' ? INITIAL_RN_STATE : INITIAL_NON_RN_STATE;
}
function _setConfig(state, action) {
var config = action.config;
config = _translateLegacyConfig(config);
var newState = _lodash2.default.merge({}, config, _getInitialState());
return (0, _redux.equals)(state, newState) ? state : newState;
}
function _translateLegacyConfig(oldValue) {
var newValue = oldValue;
if (typeof oldValue.p2p !== 'object') {
newValue = (0, _redux.set)(newValue, 'p2p', {});
}
var _arr = [['backToP2PDelay', 'backToP2PDelay'], ['enableP2P', 'enabled'], ['p2pStunServers', 'stunServers']];
for (var _i = 0; _i < _arr.length; _i++) {
var _ref = _arr[_i];
var _ref2 = babelHelpers.slicedToArray(_ref, 2);
var oldKey = _ref2[0];
var newKey = _ref2[1];
if (oldKey in newValue) {
var v = newValue[oldKey];
if (newValue === oldValue) {
newValue = babelHelpers.extends({}, newValue);
}
delete newValue[oldKey];
newValue.p2p = babelHelpers.extends({}, newValue.p2p, babelHelpers.defineProperty({}, newKey, v));
}
}
return newValue;
}
}, 504, null, "jitsi-meet/react/features/base/config/reducer.js");
__d(/* jitsi-meet/react/features/base/redux/index.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _functions = require(506 ); // 506 = ./functions
Object.keys(_functions).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _functions[key];
}
});
});
var _MiddlewareRegistry = require(507 ); // 507 = ./MiddlewareRegistry
Object.defineProperty(exports, 'MiddlewareRegistry', {
enumerable: true,
get: function get() {
return babelHelpers.interopRequireDefault(_MiddlewareRegistry).default;
}
});
var _ReducerRegistry = require(528 ); // 528 = ./ReducerRegistry
Object.defineProperty(exports, 'ReducerRegistry', {
enumerable: true,
get: function get() {
return babelHelpers.interopRequireDefault(_ReducerRegistry).default;
}
});
}, 505, null, "jitsi-meet/react/features/base/redux/index.js");
__d(/* jitsi-meet/react/features/base/redux/functions.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
exports.assign = assign;
exports.equals = equals;
exports.set = set;
var _lodash = require(502 ); // 502 = lodash
var _lodash2 = babelHelpers.interopRequireDefault(_lodash);
function assign(target, source) {
var t = target;
for (var property in source) {
t = set(t, property, source[property], t === target);
}
return t;
}
function equals(a, b) {
return _lodash2.default.isEqual(a, b);
}
function set(state, property, value) {
return _set(state, property, value, true);
}
function _set(state, property, value, copyOnWrite) {
if (typeof value === 'undefined' && Object.prototype.hasOwnProperty.call(state, property)) {
var newState = copyOnWrite ? babelHelpers.extends({}, state) : state;
if (delete newState[property]) {
return newState;
}
}
if (state[property] !== value) {
if (copyOnWrite) {
return babelHelpers.extends({}, state, babelHelpers.defineProperty({}, property, value));
}
state[property] = value;
}
return state;
}
}, 506, null, "jitsi-meet/react/features/base/redux/functions.js");
__d(/* jitsi-meet/react/features/base/redux/MiddlewareRegistry.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _redux = require(508 ); // 508 = redux
var MiddlewareRegistry = function () {
function MiddlewareRegistry() {
babelHelpers.classCallCheck(this, MiddlewareRegistry);
this._elements = [];
}
babelHelpers.createClass(MiddlewareRegistry, [{
key: 'applyMiddleware',
value: function applyMiddleware() {
for (var _len = arguments.length, additional = Array(_len), _key = 0; _key < _len; _key++) {
additional[_key] = arguments[_key];
}
var middlewares = [].concat(babelHelpers.toConsumableArray(this._elements), additional);
return _redux.applyMiddleware.apply(undefined, babelHelpers.toConsumableArray(middlewares));
}
}, {
key: 'register',
value: function register(middleware) {
this._elements.push(middleware);
}
}]);
return MiddlewareRegistry;
}();
exports.default = new MiddlewareRegistry();
}, 507, null, "jitsi-meet/react/features/base/redux/MiddlewareRegistry.js");
__d(/* redux/lib/index.js */function(global, require, module, exports) {'use strict';
exports.__esModule = true;
exports.compose = exports.applyMiddleware = exports.bindActionCreators = exports.combineReducers = exports.createStore = undefined;
var _createStore = require(509 ); // 509 = ./createStore
var _createStore2 = _interopRequireDefault(_createStore);
var _combineReducers = require(523 ); // 523 = ./combineReducers
var _combineReducers2 = _interopRequireDefault(_combineReducers);
var _bindActionCreators = require(525 ); // 525 = ./bindActionCreators
var _bindActionCreators2 = _interopRequireDefault(_bindActionCreators);
var _applyMiddleware = require(526 ); // 526 = ./applyMiddleware
var _applyMiddleware2 = _interopRequireDefault(_applyMiddleware);
var _compose = require(527 ); // 527 = ./compose
var _compose2 = _interopRequireDefault(_compose);
var _warning = require(524 ); // 524 = ./utils/warning
var _warning2 = _interopRequireDefault(_warning);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { 'default': obj };
}
function isCrushed() {}
if (process.env.NODE_ENV !== 'production' && typeof isCrushed.name === 'string' && isCrushed.name !== 'isCrushed') {
(0, _warning2['default'])('You are currently using minified code outside of NODE_ENV === \'production\'. ' + 'This means that you are running a slower development build of Redux. ' + 'You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify ' + 'or DefinePlugin for webpack (http://stackoverflow.com/questions/30030031) ' + 'to ensure you have the correct code for your production build.');
}
exports.createStore = _createStore2['default'];
exports.combineReducers = _combineReducers2['default'];
exports.bindActionCreators = _bindActionCreators2['default'];
exports.applyMiddleware = _applyMiddleware2['default'];
exports.compose = _compose2['default'];
}, 508, null, "redux/lib/index.js");
__d(/* redux/lib/createStore.js */function(global, require, module, exports) {'use strict';
exports.__esModule = true;
exports.ActionTypes = undefined;
exports['default'] = createStore;
var _isPlainObject = require(510 ); // 510 = lodash/isPlainObject
var _isPlainObject2 = _interopRequireDefault(_isPlainObject);
var _symbolObservable = require(520 ); // 520 = symbol-observable
var _symbolObservable2 = _interopRequireDefault(_symbolObservable);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { 'default': obj };
}
var ActionTypes = exports.ActionTypes = {
INIT: '@@redux/INIT'
};function createStore(reducer, preloadedState, enhancer) {
var _ref2;
if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') {
enhancer = preloadedState;
preloadedState = undefined;
}
if (typeof enhancer !== 'undefined') {
if (typeof enhancer !== 'function') {
throw new Error('Expected the enhancer to be a function.');
}
return enhancer(createStore)(reducer, preloadedState);
}
if (typeof reducer !== 'function') {
throw new Error('Expected the reducer to be a function.');
}
var currentReducer = reducer;
var currentState = preloadedState;
var currentListeners = [];
var nextListeners = currentListeners;
var isDispatching = false;
function ensureCanMutateNextListeners() {
if (nextListeners === currentListeners) {
nextListeners = currentListeners.slice();
}
}
function getState() {
return currentState;
}
function subscribe(listener) {
if (typeof listener !== 'function') {
throw new Error('Expected listener to be a function.');
}
var isSubscribed = true;
ensureCanMutateNextListeners();
nextListeners.push(listener);
return function unsubscribe() {
if (!isSubscribed) {
return;
}
isSubscribed = false;
ensureCanMutateNextListeners();
var index = nextListeners.indexOf(listener);
nextListeners.splice(index, 1);
};
}
function dispatch(action) {
if (!(0, _isPlainObject2['default'])(action)) {
throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.');
}
if (typeof action.type === 'undefined') {
throw new Error('Actions may not have an undefined "type" property. ' + 'Have you misspelled a constant?');
}
if (isDispatching) {
throw new Error('Reducers may not dispatch actions.');
}
try {
isDispatching = true;
currentState = currentReducer(currentState, action);
} finally {
isDispatching = false;
}
var listeners = currentListeners = nextListeners;
for (var i = 0; i < listeners.length; i++) {
var listener = listeners[i];
listener();
}
return action;
}
function replaceReducer(nextReducer) {
if (typeof nextReducer !== 'function') {
throw new Error('Expected the nextReducer to be a function.');
}
currentReducer = nextReducer;
dispatch({ type: ActionTypes.INIT });
}
function observable() {
var _ref;
var outerSubscribe = subscribe;
return _ref = {
subscribe: function subscribe(observer) {
if (typeof observer !== 'object') {
throw new TypeError('Expected the observer to be an object.');
}
function observeState() {
if (observer.next) {
observer.next(getState());
}
}
observeState();
var unsubscribe = outerSubscribe(observeState);
return { unsubscribe: unsubscribe };
}
}, _ref[_symbolObservable2['default']] = function () {
return this;
}, _ref;
}
dispatch({ type: ActionTypes.INIT });
return _ref2 = {
dispatch: dispatch,
subscribe: subscribe,
getState: getState,
replaceReducer: replaceReducer
}, _ref2[_symbolObservable2['default']] = observable, _ref2;
}
}, 509, null, "redux/lib/createStore.js");
__d(/* lodash/isPlainObject.js */function(global, require, module, exports) {var baseGetTag = require(511 ), // 511 = ./_baseGetTag
getPrototype = require(517 ), // 517 = ./_getPrototype
isObjectLike = require(519 ); // 519 = ./isObjectLike
var objectTag = '[object Object]';
var funcProto = Function.prototype,
objectProto = Object.prototype;
var funcToString = funcProto.toString;
var hasOwnProperty = objectProto.hasOwnProperty;
var objectCtorString = funcToString.call(Object);
function isPlainObject(value) {
if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
return false;
}
var proto = getPrototype(value);
if (proto === null) {
return true;
}
var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
return typeof Ctor == 'function' && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;
}
module.exports = isPlainObject;
}, 510, null, "lodash/isPlainObject.js");
__d(/* lodash/_baseGetTag.js */function(global, require, module, exports) {var Symbol = require(512 ), // 512 = ./_Symbol
getRawTag = require(515 ), // 515 = ./_getRawTag
objectToString = require(516 ); // 516 = ./_objectToString
var nullTag = '[object Null]',
undefinedTag = '[object Undefined]';
var symToStringTag = Symbol ? typeof Symbol === 'function' ? Symbol.toStringTag : '@@toStringTag' : undefined;
function baseGetTag(value) {
if (value == null) {
return value === undefined ? undefinedTag : nullTag;
}
return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
}
module.exports = baseGetTag;
}, 511, null, "lodash/_baseGetTag.js");
__d(/* lodash/_Symbol.js */function(global, require, module, exports) {var root = require(513 ); // 513 = ./_root
var Symbol = root.Symbol;
module.exports = Symbol;
}, 512, null, "lodash/_Symbol.js");
__d(/* lodash/_root.js */function(global, require, module, exports) {var freeGlobal = require(514 ); // 514 = ./_freeGlobal
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
var root = freeGlobal || freeSelf || Function('return this')();
module.exports = root;
}, 513, null, "lodash/_root.js");
__d(/* lodash/_freeGlobal.js */function(global, require, module, exports) {
var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
module.exports = freeGlobal;
}, 514, null, "lodash/_freeGlobal.js");
__d(/* lodash/_getRawTag.js */function(global, require, module, exports) {var Symbol = require(512 ); // 512 = ./_Symbol
var objectProto = Object.prototype;
var hasOwnProperty = objectProto.hasOwnProperty;
var nativeObjectToString = objectProto.toString;
var symToStringTag = Symbol ? typeof Symbol === 'function' ? Symbol.toStringTag : '@@toStringTag' : undefined;
function getRawTag(value) {
var isOwn = hasOwnProperty.call(value, symToStringTag),
tag = value[symToStringTag];
try {
value[symToStringTag] = undefined;
var unmasked = true;
} catch (e) {}
var result = nativeObjectToString.call(value);
if (unmasked) {
if (isOwn) {
value[symToStringTag] = tag;
} else {
delete value[symToStringTag];
}
}
return result;
}
module.exports = getRawTag;
}, 515, null, "lodash/_getRawTag.js");
__d(/* lodash/_objectToString.js */function(global, require, module, exports) {
var objectProto = Object.prototype;
var nativeObjectToString = objectProto.toString;
function objectToString(value) {
return nativeObjectToString.call(value);
}
module.exports = objectToString;
}, 516, null, "lodash/_objectToString.js");
__d(/* lodash/_getPrototype.js */function(global, require, module, exports) {var overArg = require(518 ); // 518 = ./_overArg
var getPrototype = overArg(Object.getPrototypeOf, Object);
module.exports = getPrototype;
}, 517, null, "lodash/_getPrototype.js");
__d(/* lodash/_overArg.js */function(global, require, module, exports) {
function overArg(func, transform) {
return function (arg) {
return func(transform(arg));
};
}
module.exports = overArg;
}, 518, null, "lodash/_overArg.js");
__d(/* lodash/isObjectLike.js */function(global, require, module, exports) {
function isObjectLike(value) {
return value != null && typeof value == 'object';
}
module.exports = isObjectLike;
}, 519, null, "lodash/isObjectLike.js");
__d(/* symbol-observable/index.js */function(global, require, module, exports) {module.exports = require(521 ); // 521 = ./lib/index
}, 520, null, "symbol-observable/index.js");
__d(/* symbol-observable/lib/index.js */function(global, require, module, exports) {'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _ponyfill = require(522 ); // 522 = ./ponyfill
var _ponyfill2 = _interopRequireDefault(_ponyfill);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { 'default': obj };
}
var root;
if (typeof self !== 'undefined') {
root = self;
} else if (typeof window !== 'undefined') {
root = window;
} else if (typeof global !== 'undefined') {
root = global;
} else if (typeof module !== 'undefined') {
root = module;
} else {
root = Function('return this')();
}
var result = (0, _ponyfill2['default'])(root);
exports['default'] = result;
}, 521, null, "symbol-observable/lib/index.js");
__d(/* symbol-observable/lib/ponyfill.js */function(global, require, module, exports) {'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports['default'] = symbolObservablePonyfill;
function symbolObservablePonyfill(root) {
var result;
var _Symbol = root.Symbol;
if (typeof _Symbol === 'function') {
if (_Symbol.observable) {
result = _Symbol.observable;
} else {
result = _Symbol('observable');
_Symbol.observable = result;
}
} else {
result = '@@observable';
}
return result;
};
}, 522, null, "symbol-observable/lib/ponyfill.js");
__d(/* redux/lib/combineReducers.js */function(global, require, module, exports) {'use strict';
exports.__esModule = true;
exports['default'] = combineReducers;
var _createStore = require(509 ); // 509 = ./createStore
var _isPlainObject = require(510 ); // 510 = lodash/isPlainObject
var _isPlainObject2 = _interopRequireDefault(_isPlainObject);
var _warning = require(524 ); // 524 = ./utils/warning
var _warning2 = _interopRequireDefault(_warning);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { 'default': obj };
}
function getUndefinedStateErrorMessage(key, action) {
var actionType = action && action.type;
var actionName = actionType && '"' + actionType.toString() + '"' || 'an action';
return 'Given action ' + actionName + ', reducer "' + key + '" returned undefined. ' + 'To ignore an action, you must explicitly return the previous state. ' + 'If you want this reducer to hold no value, you can return null instead of undefined.';
}
function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {
var reducerKeys = Object.keys(reducers);
var argumentName = action && action.type === _createStore.ActionTypes.INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer';
if (reducerKeys.length === 0) {
return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.';
}
if (!(0, _isPlainObject2['default'])(inputState)) {
return 'The ' + argumentName + ' has unexpected type of "' + {}.toString.call(inputState).match(/\s([a-z|A-Z]+)/)[1] + '". Expected argument to be an object with the following ' + ('keys: "' + reducerKeys.join('", "') + '"');
}
var unexpectedKeys = Object.keys(inputState).filter(function (key) {
return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key];
});
unexpectedKeys.forEach(function (key) {
unexpectedKeyCache[key] = true;
});
if (unexpectedKeys.length > 0) {
return 'Unexpected ' + (unexpectedKeys.length > 1 ? 'keys' : 'key') + ' ' + ('"' + unexpectedKeys.join('", "') + '" found in ' + argumentName + '. ') + 'Expected to find one of the known reducer keys instead: ' + ('"' + reducerKeys.join('", "') + '". Unexpected keys will be ignored.');
}
}
function assertReducerShape(reducers) {
Object.keys(reducers).forEach(function (key) {
var reducer = reducers[key];
var initialState = reducer(undefined, { type: _createStore.ActionTypes.INIT });
if (typeof initialState === 'undefined') {
throw new Error('Reducer "' + key + '" returned undefined during initialization. ' + 'If the state passed to the reducer is undefined, you must ' + 'explicitly return the initial state. The initial state may ' + 'not be undefined. If you don\'t want to set a value for this reducer, ' + 'you can use null instead of undefined.');
}
var type = '@@redux/PROBE_UNKNOWN_ACTION_' + Math.random().toString(36).substring(7).split('').join('.');
if (typeof reducer(undefined, { type: type }) === 'undefined') {
throw new Error('Reducer "' + key + '" returned undefined when probed with a random type. ' + ('Don\'t try to handle ' + _createStore.ActionTypes.INIT + ' or other actions in "redux/*" ') + 'namespace. They are considered private. Instead, you must return the ' + 'current state for any unknown actions, unless it is undefined, ' + 'in which case you must return the initial state, regardless of the ' + 'action type. The initial state may not be undefined, but can be null.');
}
});
}
function combineReducers(reducers) {
var reducerKeys = Object.keys(reducers);
var finalReducers = {};
for (var i = 0; i < reducerKeys.length; i++) {
var key = reducerKeys[i];
if (process.env.NODE_ENV !== 'production') {
if (typeof reducers[key] === 'undefined') {
(0, _warning2['default'])('No reducer provided for key "' + key + '"');
}
}
if (typeof reducers[key] === 'function') {
finalReducers[key] = reducers[key];
}
}
var finalReducerKeys = Object.keys(finalReducers);
var unexpectedKeyCache = void 0;
if (process.env.NODE_ENV !== 'production') {
unexpectedKeyCache = {};
}
var shapeAssertionError = void 0;
try {
assertReducerShape(finalReducers);
} catch (e) {
shapeAssertionError = e;
}
return function combination() {
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var action = arguments[1];
if (shapeAssertionError) {
throw shapeAssertionError;
}
if (process.env.NODE_ENV !== 'production') {
var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache);
if (warningMessage) {
(0, _warning2['default'])(warningMessage);
}
}
var hasChanged = false;
var nextState = {};
for (var _i = 0; _i < finalReducerKeys.length; _i++) {
var _key = finalReducerKeys[_i];
var reducer = finalReducers[_key];
var previousStateForKey = state[_key];
var nextStateForKey = reducer(previousStateForKey, action);
if (typeof nextStateForKey === 'undefined') {
var errorMessage = getUndefinedStateErrorMessage(_key, action);
throw new Error(errorMessage);
}
nextState[_key] = nextStateForKey;
hasChanged = hasChanged || nextStateForKey !== previousStateForKey;
}
return hasChanged ? nextState : state;
};
}
}, 523, null, "redux/lib/combineReducers.js");
__d(/* redux/lib/utils/warning.js */function(global, require, module, exports) {'use strict';
exports.__esModule = true;
exports['default'] = warning;
function warning(message) {
if (typeof console !== 'undefined' && typeof console.error === 'function') {
console.error(message);
}
try {
throw new Error(message);
} catch (e) {}
}
}, 524, null, "redux/lib/utils/warning.js");
__d(/* redux/lib/bindActionCreators.js */function(global, require, module, exports) {'use strict';
exports.__esModule = true;
exports['default'] = bindActionCreators;
function bindActionCreator(actionCreator, dispatch) {
return function () {
return dispatch(actionCreator.apply(undefined, arguments));
};
}
function bindActionCreators(actionCreators, dispatch) {
if (typeof actionCreators === 'function') {
return bindActionCreator(actionCreators, dispatch);
}
if (typeof actionCreators !== 'object' || actionCreators === null) {
throw new Error('bindActionCreators expected an object or a function, instead received ' + (actionCreators === null ? 'null' : typeof actionCreators) + '. ' + 'Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');
}
var keys = Object.keys(actionCreators);
var boundActionCreators = {};
for (var i = 0; i < keys.length; i++) {
var key = keys[i];
var actionCreator = actionCreators[key];
if (typeof actionCreator === 'function') {
boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);
}
}
return boundActionCreators;
}
}, 525, null, "redux/lib/bindActionCreators.js");
__d(/* redux/lib/applyMiddleware.js */function(global, require, module, exports) {'use strict';
exports.__esModule = true;
var _extends = Object.assign || function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}return target;
};
exports['default'] = applyMiddleware;
var _compose = require(527 ); // 527 = ./compose
var _compose2 = _interopRequireDefault(_compose);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { 'default': obj };
}
function applyMiddleware() {
for (var _len = arguments.length, middlewares = Array(_len), _key = 0; _key < _len; _key++) {
middlewares[_key] = arguments[_key];
}
return function (createStore) {
return function (reducer, preloadedState, enhancer) {
var store = createStore(reducer, preloadedState, enhancer);
var _dispatch = store.dispatch;
var chain = [];
var middlewareAPI = {
getState: store.getState,
dispatch: function dispatch(action) {
return _dispatch(action);
}
};
chain = middlewares.map(function (middleware) {
return middleware(middlewareAPI);
});
_dispatch = _compose2['default'].apply(undefined, chain)(store.dispatch);
return _extends({}, store, {
dispatch: _dispatch
});
};
};
}
}, 526, null, "redux/lib/applyMiddleware.js");
__d(/* redux/lib/compose.js */function(global, require, module, exports) {"use strict";
exports.__esModule = true;
exports["default"] = compose;
function compose() {
for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) {
funcs[_key] = arguments[_key];
}
if (funcs.length === 0) {
return function (arg) {
return arg;
};
}
if (funcs.length === 1) {
return funcs[0];
}
return funcs.reduce(function (a, b) {
return function () {
return a(b.apply(undefined, arguments));
};
});
}
}, 527, null, "redux/lib/compose.js");
__d(/* jitsi-meet/react/features/base/redux/ReducerRegistry.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _redux = require(508 ); // 508 = redux
var ReducerRegistry = function () {
function ReducerRegistry() {
babelHelpers.classCallCheck(this, ReducerRegistry);
this._elements = {};
}
babelHelpers.createClass(ReducerRegistry, [{
key: 'combineReducers',
value: function combineReducers() {
var additional = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
return (0, _redux.combineReducers)(babelHelpers.extends({}, this._elements, additional));
}
}, {
key: 'register',
value: function register(name, reducer) {
this._elements[name] = reducer;
}
}]);
return ReducerRegistry;
}();
exports.default = new ReducerRegistry();
}, 528, null, "jitsi-meet/react/features/base/redux/ReducerRegistry.js");
__d(/* jitsi-meet/react/features/base/util/index.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _loadScript = require(530 ); // 530 = ./loadScript
Object.keys(_loadScript).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _loadScript[key];
}
});
});
var _randomUtil = require(531 ); // 531 = ./randomUtil
Object.keys(_randomUtil).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _randomUtil[key];
}
});
});
var _uri = require(532 ); // 532 = ./uri
Object.keys(_uri).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _uri[key];
}
});
});
}, 529, null, "jitsi-meet/react/features/base/util/index.js");
__d(/* jitsi-meet/react/features/base/util/loadScript.native.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
exports.loadScript = loadScript;
function loadScript(url) {
var fetch = void 0;
var method = 'GET';
if (typeof (fetch = window.fetch) === 'function') {
fetch = fetch(url, { method: method });
} else {
fetch = new Promise(function (resolve) {
var xhr = new XMLHttpRequest();
xhr.responseType = 'text';
xhr.onreadystatechange = function () {
if (xhr.readyState === 4) {
resolve(xhr);
}
};
xhr.open(method, url, true);
xhr.send();
});
}
return fetch.then(function (response) {
switch (response.status) {
case 200:
return response.responseText || response.text();
default:
throw response.statusText;
}
}).then(function (responseText) {
eval.call(window, responseText);
});
}
}, 530, null, "jitsi-meet/react/features/base/util/loadScript.native.js");
__d(/* jitsi-meet/react/features/base/util/randomUtil.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
exports.randomAlphanumString = randomAlphanumString;
exports.randomElement = randomElement;
exports.randomHexDigit = randomHexDigit;
exports.randomHexString = randomHexString;
exports.randomInt = randomInt;
var ALPHANUM = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
var HEX_DIGITS = '0123456789abcdef';
function randomAlphanumString(length) {
return _randomString(length, ALPHANUM);
}
function randomElement(arr) {
return arr[randomInt(0, arr.length - 1)];
}
function randomHexDigit() {
return randomElement(HEX_DIGITS);
}
function randomHexString(length) {
return _randomString(length, HEX_DIGITS);
}
function randomInt(min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
function _randomString(length, characters) {
var result = '';
for (var i = 0; i < length; ++i) {
result += randomElement(characters);
}
return result;
}
}, 531, null, "jitsi-meet/react/features/base/util/randomUtil.js");
__d(/* jitsi-meet/react/features/base/util/uri.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getLocationContextRoot = getLocationContextRoot;
exports.parseStandardURIString = parseStandardURIString;
exports.parseURIString = parseURIString;
exports.toURLString = toURLString;
exports.urlObjectToString = urlObjectToString;
var _URI_AUTHORITY_PATTERN = '(//[^/?#]+)';
var _URI_PATH_PATTERN = '([^?#]*)';
var _URI_PROTOCOL_PATTERN = '([a-z][a-z0-9\\.\\+-]*:)';
function _fixURIStringHierPart(uri) {
var regex = new RegExp('^' + _URI_PROTOCOL_PATTERN + '//hipchat\\.com/video/call/', 'gi');
var match = regex.exec(uri);
if (!match) {
regex = new RegExp('^' + _URI_PROTOCOL_PATTERN + '//enso\\.me/(?:call|meeting)/', 'gi');
match = regex.exec(uri);
}
if (match) {
uri = match[1] + '//enso.hipchat.me/' + uri.substring(regex.lastIndex);
}
return uri;
}
function _fixURIStringScheme(uri) {
var regex = new RegExp('^' + _URI_PROTOCOL_PATTERN + '+', 'gi');
var match = regex.exec(uri);
if (match) {
var protocol = match[match.length - 1].toLowerCase();
if (protocol !== 'http:' && protocol !== 'https:') {
protocol = 'https:';
}
uri = uri.substring(regex.lastIndex);
if (uri.startsWith('//')) {
uri = protocol + uri;
}
}
return uri;
}
function getLocationContextRoot(location) {
var pathname = location.pathname;
var contextRootEndIndex = pathname.lastIndexOf('/');
return contextRootEndIndex === -1 ? '/' : pathname.substring(0, contextRootEndIndex + 1);
}
function _objectToURLParamsArray() {
var obj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var params = [];
for (var key in obj) {
try {
params.push(key + '=' + encodeURIComponent(JSON.stringify(obj[key])));
} catch (e) {
console.warn('Error encoding ' + key + ': ' + e);
}
}
return params;
}
function parseStandardURIString(str) {
var obj = {
toString: _standardURIToString
};
var regex = void 0;
var match = void 0;
regex = new RegExp('^' + _URI_PROTOCOL_PATTERN, 'gi');
match = regex.exec(str);
if (match) {
obj.protocol = match[1].toLowerCase();
str = str.substring(regex.lastIndex);
}
regex = new RegExp('^' + _URI_AUTHORITY_PATTERN, 'gi');
match = regex.exec(str);
if (match) {
var authority = match[1].substring(2);
str = str.substring(regex.lastIndex);
var userinfoEndIndex = authority.indexOf('@');
if (userinfoEndIndex !== -1) {
authority = authority.substring(userinfoEndIndex + 1);
}
obj.host = authority;
var portBeginIndex = authority.lastIndexOf(':');
if (portBeginIndex !== -1) {
obj.port = authority.substring(portBeginIndex + 1);
authority = authority.substring(0, portBeginIndex);
}
obj.hostname = authority;
}
regex = new RegExp('^' + _URI_PATH_PATTERN, 'gi');
match = regex.exec(str);
var pathname = void 0;
if (match) {
pathname = match[1];
str = str.substring(regex.lastIndex);
}
if (pathname) {
pathname.startsWith('/') || (pathname = '/' + pathname);
} else {
pathname = '/';
}
obj.pathname = pathname;
if (str.startsWith('?')) {
var hashBeginIndex = str.indexOf('#', 1);
if (hashBeginIndex === -1) {
hashBeginIndex = str.length;
}
obj.search = str.substring(0, hashBeginIndex);
str = str.substring(hashBeginIndex);
} else {
obj.search = '';
}
obj.hash = str.startsWith('#') ? str : '';
return obj;
}
function parseURIString(uri) {
if (typeof uri !== 'string') {
return undefined;
}
var obj = parseStandardURIString(_fixURIStringHierPart(_fixURIStringScheme(uri)));
obj.contextRoot = getLocationContextRoot(obj);
var pathname = obj.pathname;
obj.room = pathname.substring(pathname.lastIndexOf('/') + 1) || undefined;
return obj;
}
function _standardURIToString(thiz) {
var _ref = thiz || this,
hash = _ref.hash,
host = _ref.host,
pathname = _ref.pathname,
protocol = _ref.protocol,
search = _ref.search;
var str = '';
protocol && (str += protocol);
host && (str += '//' + host);
str += pathname || '/';
search && (str += search);
hash && (str += hash);
return str;
}
function toURLString(obj) {
var str = void 0;
switch (typeof obj) {
case 'object':
if (obj) {
if (obj instanceof URL) {
str = obj.href;
} else {
str = urlObjectToString(obj);
}
}
break;
case 'string':
str = String(obj);
break;
}
return str;
}
function urlObjectToString(o) {
var url = parseStandardURIString(_fixURIStringScheme(o.url || ''));
if (!url.protocol) {
var protocol = o.protocol || o.scheme;
if (protocol) {
protocol.endsWith(':') || (protocol += ':');
url.protocol = protocol;
}
}
var pathname = url.pathname;
if (!url.host) {
var domain = o.domain || o.host || o.hostname;
if (domain) {
var _parseStandardURIStri = parseStandardURIString(domain),
host = _parseStandardURIStri.host,
hostname = _parseStandardURIStri.hostname,
contextRoot = _parseStandardURIStri.pathname,
port = _parseStandardURIStri.port;
if (host) {
url.host = host;
url.hostname = hostname;
url.port = port;
}
pathname === '/' && contextRoot !== '/' && (pathname = contextRoot);
}
}
var room = o.roomName || o.room;
if (room && (url.pathname.endsWith('/') || !url.pathname.endsWith('/' + room))) {
pathname.endsWith('/') || (pathname += '/');
pathname += room;
}
url.pathname = pathname;
var jwt = o.jwt;
if (jwt) {
var search = url.search;
if (search.indexOf('?jwt=') === -1 && search.indexOf('&jwt=') === -1) {
search.startsWith('?') || (search = '?' + search);
search.length === 1 || (search += '&');
search += 'jwt=' + jwt;
url.search = search;
}
}
var hash = url.hash;
var _arr = ['config', 'interfaceConfig'];
for (var _i = 0; _i < _arr.length; _i++) {
var configName = _arr[_i];
var urlParamsArray = _objectToURLParamsArray(o[configName + 'Overwrite'] || o[configName] || o[configName + 'Override']);
if (urlParamsArray.length) {
var urlParamsString = configName + '.' + urlParamsArray.join('&' + configName + '.');
if (hash.length) {
urlParamsString = '&' + urlParamsString;
} else {
hash = '#';
}
hash += urlParamsString;
}
}
url.hash = hash;
return url.toString() || undefined;
}
}, 532, null, "jitsi-meet/react/features/base/util/uri.js");
__d(/* jitsi-meet/react/features/base/lib-jitsi-meet/middleware.js */function(global, require, module, exports) {var _config = require(496 ); // 496 = ../config
var _logging = require(534 ); // 534 = ../logging
var _participants = require(540 ); // 540 = ../participants
var _redux = require(505 ); // 505 = ../redux
var _actions = require(435 ); // 435 = ./actions
var _actionTypes = require(493 ); // 493 = ./actionTypes
var _constants = require(494 ); // 494 = ./constants
_redux.MiddlewareRegistry.register(function (store) {
return function (next) {
return function (action) {
switch (action.type) {
case _actionTypes.LIB_DID_INIT:
store.dispatch((0, _actions.setWebRTCReady)(true));
break;
case _actionTypes.LIB_INIT_ERROR:
return _libInitError(store, next, action);
case _participants.PARTICIPANT_LEFT:
action.participant.local && store.dispatch((0, _actions.disposeLib)());
break;
case _config.SET_CONFIG:
return _setConfig(store, next, action);
}
return next(action);
};
};
});
function _libInitError(store, next, action) {
var nextState = next(action);
var error = action.error;
if (error) {
var webRTCReady = void 0;
switch (error.name) {
case _constants.WEBRTC_NOT_READY:
webRTCReady = error.webRTCReadyPromise;
break;
case _constants.WEBRTC_NOT_SUPPORTED:
webRTCReady = false;
break;
}
typeof webRTCReady === 'undefined' || store.dispatch((0, _actions.setWebRTCReady)(webRTCReady));
}
return nextState;
}
function _setConfig(_ref, next, action) {
var dispatch = _ref.dispatch,
getState = _ref.getState;
var initialized = getState()['features/base/lib-jitsi-meet'].initialized;
if (initialized) {
dispatch((0, _actions.disposeLib)());
}
var result = next(action);
dispatch((0, _logging.setLoggingConfig)(window.loggingConfig));
dispatch((0, _actions.initLib)());
return result;
}
}, 533, null, "jitsi-meet/react/features/base/lib-jitsi-meet/middleware.js");
__d(/* jitsi-meet/react/features/base/logging/index.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _actions = require(535 ); // 535 = ./actions
Object.keys(_actions).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _actions[key];
}
});
});
var _actionTypes = require(536 ); // 536 = ./actionTypes
Object.keys(_actionTypes).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _actionTypes[key];
}
});
});
require(537 ); // 537 = ./middleware
require(539 ); // 539 = ./reducer
}, 534, null, "jitsi-meet/react/features/base/logging/index.js");
__d(/* jitsi-meet/react/features/base/logging/actions.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
exports.setLoggingConfig = setLoggingConfig;
var _actionTypes = require(536 ); // 536 = ./actionTypes
function setLoggingConfig(config) {
return {
type: _actionTypes.SET_LOGGING_CONFIG,
config: config
};
}
}, 535, null, "jitsi-meet/react/features/base/logging/actions.js");
__d(/* jitsi-meet/react/features/base/logging/actionTypes.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var SET_LOGGING_CONFIG = exports.SET_LOGGING_CONFIG = Symbol('SET_LOGGING_CONFIG');
}, 536, null, "jitsi-meet/react/features/base/logging/actionTypes.js");
__d(/* jitsi-meet/react/features/base/logging/middleware.js */function(global, require, module, exports) {var _jitsiMeetLogger = require(464 ); // 464 = jitsi-meet-logger
var _jitsiMeetLogger2 = babelHelpers.interopRequireDefault(_jitsiMeetLogger);
var _app = require(430 ); // 430 = ../../app
var _libJitsiMeet = require(434 ); // 434 = ../lib-jitsi-meet
var _libJitsiMeet2 = babelHelpers.interopRequireDefault(_libJitsiMeet);
var _redux = require(505 ); // 505 = ../redux
var _JitsiMeetLogStorage = require(538 ); // 538 = ../../../../modules/util/JitsiMeetLogStorage
var _JitsiMeetLogStorage2 = babelHelpers.interopRequireDefault(_JitsiMeetLogStorage);
var _actionTypes = require(536 ); // 536 = ./actionTypes
_redux.MiddlewareRegistry.register(function (store) {
return function (next) {
return function (action) {
switch (action.type) {
case _app.APP_WILL_MOUNT:
return _appWillMount(store, next, action);
case _libJitsiMeet.LIB_WILL_INIT:
return _libWillInit(store, next, action);
case _actionTypes.SET_LOGGING_CONFIG:
return _setLoggingConfig(store, next, action);
}
return next(action);
};
};
});
function _appWillMount(_ref, next, action) {
var getState = _ref.getState;
var config = getState()['features/base/logging'].config;
_setLogLevels(_jitsiMeetLogger2.default, config);
typeof APP === 'undefined' || _setLogLevels(_libJitsiMeet2.default, config);
return next(action);
}
function _initLogging(loggingConfig) {
if (typeof APP === 'object' && !APP.logCollector && !loggingConfig.disableLogCollector) {
APP.logCollector = new _jitsiMeetLogger2.default.LogCollector(new _JitsiMeetLogStorage2.default());
_jitsiMeetLogger2.default.addGlobalTransport(APP.logCollector);
_libJitsiMeet2.default.addGlobalLogTransport(APP.logCollector);
}
}
function _libWillInit(_ref2, next, action) {
var getState = _ref2.getState;
_setLogLevels(_libJitsiMeet2.default, getState()['features/base/logging'].config);
return next(action);
}
function _setLoggingConfig(_ref3, next, action) {
var getState = _ref3.getState;
var oldValue = getState()['features/base/logging'].config;
var result = next(action);
var newValue = getState()['features/base/logging'].config;
if (oldValue !== newValue) {
_setLogLevels(_jitsiMeetLogger2.default, newValue);
_setLogLevels(_libJitsiMeet2.default, newValue);
_initLogging(newValue);
}
return result;
}
function _setLogLevels(logger, config) {
logger.setLogLevel(config.defaultLogLevel);
Object.keys(config).forEach(function (id) {
return id === 'defaultLogLevel' || logger.setLogLevelById(config[id], id);
});
}
}, 537, null, "jitsi-meet/react/features/base/logging/middleware.js");
__d(/* jitsi-meet/modules/util/JitsiMeetLogStorage.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var JitsiMeetLogStorage = function () {
function JitsiMeetLogStorage() {
babelHelpers.classCallCheck(this, JitsiMeetLogStorage);
this.counter = 1;
}
babelHelpers.createClass(JitsiMeetLogStorage, [{
key: 'isReady',
value: function isReady() {
return Boolean(APP.logCollectorStarted && APP.conference);
}
}, {
key: 'storeLogs',
value: function storeLogs(logEntries) {
if (!APP.conference.isCallstatsEnabled()) {
return;
}
var logJSON = '{"log' + this.counter + '":"\n';
for (var i = 0, len = logEntries.length; i < len; i++) {
var logEntry = logEntries[i];
if (typeof logEntry === 'object') {
logJSON += '(' + logEntry.count + ') ' + logEntry.text + '\n';
} else {
logJSON += logEntry + '\n';
}
}
logJSON += '"}';
this.counter += 1;
try {
APP.conference.logJSON(logJSON);
} catch (error) {
console.error("Failed to store the logs: ", logJSON, error);
}
}
}]);
return JitsiMeetLogStorage;
}();
exports.default = JitsiMeetLogStorage;
}, 538, null, "jitsi-meet/modules/util/JitsiMeetLogStorage.js");
__d(/* jitsi-meet/react/features/base/logging/reducer.js */function(global, require, module, exports) {var _redux = require(505 ); // 505 = ../redux
var _actionTypes = require(536 ); // 536 = ./actionTypes
var INITIAL_STATE = {
config: {
defaultLogLevel: 'trace',
'modules/statistics/CallStats.js': 'info',
'modules/xmpp/strophe.util.js': 'log'
}
};
_redux.ReducerRegistry.register('features/base/logging', function () {
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : INITIAL_STATE;
var action = arguments[1];
switch (action.type) {
case _actionTypes.SET_LOGGING_CONFIG:
return _setLoggingConfig(state, action);
default:
return state;
}
});
function _setLoggingConfig(state, action) {
var config = babelHelpers.extends({}, INITIAL_STATE.config, action.config);
if ((0, _redux.equals)(state.config, config)) {
return state;
}
return babelHelpers.extends({}, state, {
config: config
});
}
}, 539, null, "jitsi-meet/react/features/base/logging/reducer.js");
__d(/* jitsi-meet/react/features/base/participants/index.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _actions = require(541 ); // 541 = ./actions
Object.keys(_actions).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _actions[key];
}
});
});
var _actionTypes = require(542 ); // 542 = ./actionTypes
Object.keys(_actionTypes).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _actionTypes[key];
}
});
});
var _components = require(545 ); // 545 = ./components
Object.keys(_components).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _components[key];
}
});
});
var _constants = require(543 ); // 543 = ./constants
Object.keys(_constants).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _constants[key];
}
});
});
var _functions = require(544 ); // 544 = ./functions
Object.keys(_functions).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _functions[key];
}
});
});
require(607 ); // 607 = ./middleware
require(609 ); // 609 = ./reducer
}, 540, null, "jitsi-meet/react/features/base/participants/index.js");
__d(/* jitsi-meet/react/features/base/participants/actions.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
exports.dominantSpeakerChanged = dominantSpeakerChanged;
exports.localParticipantConnectionStatusChanged = localParticipantConnectionStatusChanged;
exports.localParticipantIdChanged = localParticipantIdChanged;
exports.localParticipantJoined = localParticipantJoined;
exports.localParticipantRoleChanged = localParticipantRoleChanged;
exports.participantConnectionStatusChanged = participantConnectionStatusChanged;
exports.localParticipantLeft = localParticipantLeft;
exports.participantDisplayNameChanged = participantDisplayNameChanged;
exports.participantJoined = participantJoined;
exports.participantLeft = participantLeft;
exports.participantPresenceChanged = participantPresenceChanged;
exports.participantRoleChanged = participantRoleChanged;
exports.participantUpdated = participantUpdated;
exports.pinParticipant = pinParticipant;
var _actionTypes = require(542 ); // 542 = ./actionTypes
var _constants = require(543 ); // 543 = ./constants
var _functions = require(544 ); // 544 = ./functions
function dominantSpeakerChanged(id) {
return {
type: _actionTypes.DOMINANT_SPEAKER_CHANGED,
participant: {
id: id
}
};
}
function localParticipantConnectionStatusChanged(connectionStatus) {
return function (dispatch, getState) {
var participant = (0, _functions.getLocalParticipant)(getState);
if (participant) {
return dispatch(participantConnectionStatusChanged(participant.id, connectionStatus));
}
};
}
function localParticipantIdChanged(id) {
return function (dispatch, getState) {
var participant = (0, _functions.getLocalParticipant)(getState);
if (participant) {
return dispatch({
type: _actionTypes.PARTICIPANT_ID_CHANGED,
newValue: id,
oldValue: participant.id
});
}
};
}
function localParticipantJoined() {
var participant = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
return participantJoined(babelHelpers.extends({}, participant, {
local: true
}));
}
function localParticipantRoleChanged(role) {
return function (dispatch, getState) {
var participant = (0, _functions.getLocalParticipant)(getState);
if (participant) {
return dispatch(participantRoleChanged(participant.id, role));
}
};
}
function participantConnectionStatusChanged(id, connectionStatus) {
return {
type: _actionTypes.PARTICIPANT_UPDATED,
participant: {
connectionStatus: connectionStatus,
id: id
}
};
}
function localParticipantLeft() {
return function (dispatch, getState) {
var participant = (0, _functions.getLocalParticipant)(getState);
if (participant) {
return dispatch(participantLeft(participant.id));
}
};
}
function participantDisplayNameChanged(id) {
var displayName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
return {
type: _actionTypes.PARTICIPANT_DISPLAY_NAME_CHANGED,
id: id,
name: displayName.substr(0, _constants.MAX_DISPLAY_NAME_LENGTH)
};
}
function participantJoined(participant) {
return {
type: _actionTypes.PARTICIPANT_JOINED,
participant: participant
};
}
function participantLeft(id) {
return {
type: _actionTypes.PARTICIPANT_LEFT,
participant: {
id: id
}
};
}
function participantPresenceChanged(id, presence) {
return participantUpdated({
id: id,
presence: presence
});
}
function participantRoleChanged(id, role) {
return participantUpdated({
id: id,
role: role
});
}
function participantUpdated() {
var participant = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
return {
type: _actionTypes.PARTICIPANT_UPDATED,
participant: participant
};
}
function pinParticipant(id) {
return {
type: _actionTypes.PIN_PARTICIPANT,
participant: {
id: id
}
};
}
}, 541, null, "jitsi-meet/react/features/base/participants/actions.js");
__d(/* jitsi-meet/react/features/base/participants/actionTypes.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var DOMINANT_SPEAKER_CHANGED = exports.DOMINANT_SPEAKER_CHANGED = Symbol('DOMINANT_SPEAKER_CHANGED');
var PARTICIPANT_DISPLAY_NAME_CHANGED = exports.PARTICIPANT_DISPLAY_NAME_CHANGED = Symbol('PARTICIPANT_DISPLAY_NAME_CHANGED');
var PARTICIPANT_ID_CHANGED = exports.PARTICIPANT_ID_CHANGED = Symbol('PARTICIPANT_ID_CHANGED');
var PARTICIPANT_JOINED = exports.PARTICIPANT_JOINED = Symbol('PARTICIPANT_JOINED');
var PARTICIPANT_LEFT = exports.PARTICIPANT_LEFT = Symbol('PARTICIPANT_LEFT');
var PARTICIPANT_UPDATED = exports.PARTICIPANT_UPDATED = Symbol('PARTICIPANT_UPDATED');
var PIN_PARTICIPANT = exports.PIN_PARTICIPANT = Symbol('PIN_PARTICIPANT');
}, 542, null, "jitsi-meet/react/features/base/participants/actionTypes.js");
__d(/* jitsi-meet/react/features/base/participants/constants.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var LOCAL_PARTICIPANT_DEFAULT_ID = exports.LOCAL_PARTICIPANT_DEFAULT_ID = 'local';
var MAX_DISPLAY_NAME_LENGTH = exports.MAX_DISPLAY_NAME_LENGTH = 50;
var PARTICIPANT_ROLE = exports.PARTICIPANT_ROLE = {
MODERATOR: 'moderator',
NONE: 'none',
PARTICIPANT: 'participant'
};
}, 543, null, "jitsi-meet/react/features/base/participants/constants.js");
__d(/* jitsi-meet/react/features/base/participants/functions.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getAvatarURL = getAvatarURL;
exports.getLocalParticipant = getLocalParticipant;
exports.getParticipantById = getParticipantById;
function getAvatarURL(participant) {
if (typeof config === 'object' && config.disableThirdPartyRequests) {
return 'images/avatar2.png';
}
var avatarID = participant.avatarID,
avatarURL = participant.avatarURL,
email = participant.email,
id = participant.id;
if (avatarURL) {
return avatarURL;
}
var key = email || avatarID;
var urlPrefix = void 0;
var urlSuffix = void 0;
if (key && key.indexOf('@') > 0) {
urlPrefix = 'https://www.gravatar.com/avatar/';
urlSuffix = '?d=wavatar&size=200';
} else {
if (!key) {
key = id;
if (!key) {
return undefined;
}
}
urlPrefix = typeof interfaceConfig === 'object' && interfaceConfig.RANDOM_AVATAR_URL_PREFIX;
if (urlPrefix) {
urlSuffix = interfaceConfig.RANDOM_AVATAR_URL_SUFFIX;
} else {
urlPrefix = 'https://api.adorable.io/avatars/200/';
urlSuffix = '.png';
}
}
return urlPrefix + MD5.hexdigest(key.trim().toLowerCase()) + urlSuffix;
}
function getLocalParticipant(stateOrGetState) {
var participants = _getParticipants(stateOrGetState);
return participants.find(function (p) {
return p.local;
});
}
function getParticipantById(stateOrGetState, id) {
var participants = _getParticipants(stateOrGetState);
return participants.find(function (p) {
return p.id === id;
});
}
function _getParticipants(stateOrGetState) {
if (Array.isArray(stateOrGetState)) {
return stateOrGetState;
}
var state = typeof stateOrGetState === 'function' ? stateOrGetState() : stateOrGetState;
return state['features/base/participants'] || [];
}
}, 544, null, "jitsi-meet/react/features/base/participants/functions.js");
__d(/* jitsi-meet/react/features/base/participants/components/index.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _Avatar = require(546 ); // 546 = ./Avatar
Object.defineProperty(exports, 'Avatar', {
enumerable: true,
get: function get() {
return babelHelpers.interopRequireDefault(_Avatar).default;
}
});
var _ParticipantView = require(547 ); // 547 = ./ParticipantView
Object.defineProperty(exports, 'ParticipantView', {
enumerable: true,
get: function get() {
return babelHelpers.interopRequireDefault(_ParticipantView).default;
}
});
}, 545, null, "jitsi-meet/react/features/base/participants/components/index.js");
__d(/* jitsi-meet/react/features/base/participants/components/Avatar.native.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/react/features/base/participants/components/Avatar.native.js';
var _react = require(34 ); // 34 = react
var _react2 = babelHelpers.interopRequireDefault(_react);
var _reactNative = require(69 ); // 69 = react-native
var Avatar = function (_Component) {
babelHelpers.inherits(Avatar, _Component);
function Avatar(props) {
babelHelpers.classCallCheck(this, Avatar);
var _this = babelHelpers.possibleConstructorReturn(this, (Avatar.__proto__ || Object.getPrototypeOf(Avatar)).call(this, props));
_this.componentWillReceiveProps(props);
return _this;
}
babelHelpers.createClass(Avatar, [{
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(nextProps) {
var prevURI = this.props && this.props.uri;
var nextURI = nextProps && nextProps.uri;
var nextState = void 0;
if (prevURI !== nextURI || !this.state) {
nextState = babelHelpers.extends({}, nextState, {
source: {
uri: nextURI
}
});
}
if (nextState) {
if (this.state) {
this.setState(nextState);
} else {
this.state = nextState;
}
}
}
}, {
key: 'render',
value: function render() {
var _props = this.props,
uri = _props.uri,
props = babelHelpers.objectWithoutProperties(_props, ['uri']);
return _react2.default.createElement(_reactNative.Image, babelHelpers.extends({}, props, {
resizeMode: 'contain',
source: this.state.source, __source: {
fileName: _jsxFileName,
lineNumber: 103
}
}));
}
}]);
return Avatar;
}(_react.Component);
Avatar.propTypes = {
style: _react2.default.PropTypes.object,
uri: _react2.default.PropTypes.string
};
exports.default = Avatar;
}, 546, null, "jitsi-meet/react/features/base/participants/components/Avatar.native.js");
__d(/* jitsi-meet/react/features/base/participants/components/ParticipantView.native.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/react/features/base/participants/components/ParticipantView.native.js';
var _react = require(34 ); // 34 = react
var _react2 = babelHelpers.interopRequireDefault(_react);
var _reactRedux = require(548 ); // 548 = react-redux
var _libJitsiMeet = require(434 ); // 434 = ../../lib-jitsi-meet
var _media = require(567 ); // 567 = ../../media
var _react3 = require(589 ); // 589 = ../../react
var _tracks = require(580 ); // 580 = ../../tracks
var _Avatar = require(546 ); // 546 = ./Avatar
var _Avatar2 = babelHelpers.interopRequireDefault(_Avatar);
var _functions = require(544 ); // 544 = ../functions
var _styles = require(600 ); // 600 = ./styles
var _styles2 = babelHelpers.interopRequireDefault(_styles);
var ParticipantView = function (_Component) {
babelHelpers.inherits(ParticipantView, _Component);
function ParticipantView() {
babelHelpers.classCallCheck(this, ParticipantView);
return babelHelpers.possibleConstructorReturn(this, (ParticipantView.__proto__ || Object.getPrototypeOf(ParticipantView)).apply(this, arguments));
}
babelHelpers.createClass(ParticipantView, [{
key: 'render',
value: function render() {
var _props = this.props,
avatar = _props._avatar,
connectionStatus = _props._connectionStatus,
videoTrack = _props._videoTrack;
var waitForVideoStarted = false;
var renderVideo = !this.props._audioOnly && connectionStatus === _libJitsiMeet.JitsiParticipantConnectionStatus.ACTIVE && (0, _media.shouldRenderVideoTrack)(videoTrack, waitForVideoStarted);
var renderAvatar = Boolean(!renderVideo && avatar);
return _react2.default.createElement(
_react3.Container,
{
style: babelHelpers.extends({}, _styles2.default.participantView, this.props.style), __source: {
fileName: _jsxFileName,
lineNumber: 127
}
},
renderVideo && _toBoolean(this.props.showVideo, true) && _react2.default.createElement(_media.VideoTrack, {
videoTrack: videoTrack,
waitForVideoStarted: waitForVideoStarted,
zOrder: this.props.zOrder, __source: {
fileName: _jsxFileName,
lineNumber: 140
}
}),
renderAvatar && _toBoolean(this.props.showAvatar, true) && _react2.default.createElement(_Avatar2.default, {
style: this.props.avatarStyle,
uri: avatar, __source: {
fileName: _jsxFileName,
lineNumber: 152
}
})
);
}
}]);
return ParticipantView;
}(_react.Component);
ParticipantView.propTypes = {
_audioOnly: _react2.default.PropTypes.bool,
_avatar: _react2.default.PropTypes.string,
_connectionStatus: _react2.default.PropTypes.string,
_videoTrack: _react2.default.PropTypes.object,
avatarStyle: _react2.default.PropTypes.object,
participantId: _react2.default.PropTypes.string,
showAvatar: _react2.default.PropTypes.bool,
showVideo: _react2.default.PropTypes.bool,
style: _react2.default.PropTypes.object,
zOrder: _react2.default.PropTypes.number
};
function _toBoolean(value, undefinedValue) {
return Boolean(typeof value === 'undefined' ? undefinedValue : value);
}
function _mapStateToProps(state, ownProps) {
var participantId = ownProps.participantId;
var participant = (0, _functions.getParticipantById)(state['features/base/participants'], participantId);
var avatar = void 0;
var connectionStatus = void 0;
if (participant) {
avatar = (0, _functions.getAvatarURL)(participant);
connectionStatus = participant.connectionStatus;
}
return {
_audioOnly: state['features/base/conference'].audioOnly,
_avatar: avatar,
_connectionStatus: connectionStatus || _libJitsiMeet.JitsiParticipantConnectionStatus.ACTIVE,
_videoTrack: (0, _tracks.getTrackByMediaTypeAndParticipant)(state['features/base/tracks'], _media.MEDIA_TYPE.VIDEO, participantId)
};
}
exports.default = (0, _reactRedux.connect)(_mapStateToProps)(ParticipantView);
}, 547, null, "jitsi-meet/react/features/base/participants/components/ParticipantView.native.js");
__d(/* react-redux/lib/index.js */function(global, require, module, exports) {'use strict';
exports.__esModule = true;
exports.connect = exports.connectAdvanced = exports.createProvider = exports.Provider = undefined;
var _Provider = require(549 ); // 549 = ./components/Provider
var _Provider2 = _interopRequireDefault(_Provider);
var _connectAdvanced = require(554 ); // 554 = ./components/connectAdvanced
var _connectAdvanced2 = _interopRequireDefault(_connectAdvanced);
var _connect = require(558 ); // 558 = ./connect/connect
var _connect2 = _interopRequireDefault(_connect);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
exports.Provider = _Provider2.default;
exports.createProvider = _Provider.createProvider;
exports.connectAdvanced = _connectAdvanced2.default;
exports.connect = _connect2.default;
}, 548, null, "react-redux/lib/index.js");
__d(/* react-redux/lib/components/Provider.js */function(global, require, module, exports) {'use strict';
exports.__esModule = true;
exports.createProvider = createProvider;
var _react = require(34 ); // 34 = react
var _propTypes = require(550 ); // 550 = prop-types
var _propTypes2 = _interopRequireDefault(_propTypes);
var _PropTypes = require(552 ); // 552 = ../utils/PropTypes
var _warning = require(553 ); // 553 = ../utils/warning
var _warning2 = _interopRequireDefault(_warning);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
function _possibleConstructorReturn(self, call) {
if (!self) {
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}return call && (typeof call === "object" || typeof call === "function") ? call : self;
}
function _inherits(subClass, superClass) {
if (typeof superClass !== "function" && superClass !== null) {
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
}subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
}
var didWarnAboutReceivingStore = false;
function warnAboutReceivingStore() {
if (didWarnAboutReceivingStore) {
return;
}
didWarnAboutReceivingStore = true;
(0, _warning2.default)('<Provider> does not support changing `store` on the fly. ' + 'It is most likely that you see this error because you updated to ' + 'Redux 2.x and React Redux 2.x which no longer hot reload reducers ' + 'automatically. See https://github.com/reactjs/react-redux/releases/' + 'tag/v2.0.0 for the migration instructions.');
}
function createProvider() {
var _Provider$childContex;
var storeKey = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'store';
var subKey = arguments[1];
var subscriptionKey = subKey || storeKey + 'Subscription';
var Provider = function (_Component) {
_inherits(Provider, _Component);
Provider.prototype.getChildContext = function getChildContext() {
var _ref;
return _ref = {}, _ref[storeKey] = this[storeKey], _ref[subscriptionKey] = null, _ref;
};
function Provider(props, context) {
_classCallCheck(this, Provider);
var _this = _possibleConstructorReturn(this, _Component.call(this, props, context));
_this[storeKey] = props.store;
return _this;
}
Provider.prototype.render = function render() {
return _react.Children.only(this.props.children);
};
return Provider;
}(_react.Component);
if (process.env.NODE_ENV !== 'production') {
Provider.prototype.componentWillReceiveProps = function (nextProps) {
if (this[storeKey] !== nextProps.store) {
warnAboutReceivingStore();
}
};
}
Provider.propTypes = {
store: _PropTypes.storeShape.isRequired,
children: _propTypes2.default.element.isRequired
};
Provider.childContextTypes = (_Provider$childContex = {}, _Provider$childContex[storeKey] = _PropTypes.storeShape.isRequired, _Provider$childContex[subscriptionKey] = _PropTypes.subscriptionShape, _Provider$childContex);
Provider.displayName = 'Provider';
return Provider;
}
exports.default = createProvider();
}, 549, null, "react-redux/lib/components/Provider.js");
__d(/* prop-types/index.js */function(global, require, module, exports) {
if (process.env.NODE_ENV !== 'production') {
var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && (typeof Symbol === 'function' ? Symbol.for : '@@for') && (typeof Symbol === 'function' ? Symbol.for : '@@for')('react.element') || 0xeac7;
var isValidElement = function isValidElement(object) {
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
};
var throwOnDirectAccess = true;
module.exports = require(62 )(isValidElement, throwOnDirectAccess); // 62 = ./factoryWithTypeCheckers
} else {
module.exports = require(551 )(); // 551 = ./factoryWithThrowingShims
}
}, 550, null, "prop-types/index.js");
__d(/* prop-types/factoryWithThrowingShims.js */function(global, require, module, exports) {
'use strict';
var emptyFunction = require(41 ); // 41 = fbjs/lib/emptyFunction
var invariant = require(44 ); // 44 = fbjs/lib/invariant
var ReactPropTypesSecret = require(63 ); // 63 = ./lib/ReactPropTypesSecret
module.exports = function () {
function shim(props, propName, componentName, location, propFullName, secret) {
if (secret === ReactPropTypesSecret) {
return;
}
invariant(false, 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use PropTypes.checkPropTypes() to call them. ' + 'Read more at http://fb.me/use-check-prop-types');
};
shim.isRequired = shim;
function getShim() {
return shim;
};
var ReactPropTypes = {
array: shim,
bool: shim,
func: shim,
number: shim,
object: shim,
string: shim,
symbol: shim,
any: shim,
arrayOf: getShim,
element: shim,
instanceOf: getShim,
node: shim,
objectOf: getShim,
oneOf: getShim,
oneOfType: getShim,
shape: getShim
};
ReactPropTypes.checkPropTypes = emptyFunction;
ReactPropTypes.PropTypes = ReactPropTypes;
return ReactPropTypes;
};
}, 551, null, "prop-types/factoryWithThrowingShims.js");
__d(/* react-redux/lib/utils/PropTypes.js */function(global, require, module, exports) {'use strict';
exports.__esModule = true;
exports.storeShape = exports.subscriptionShape = undefined;
var _propTypes = require(550 ); // 550 = prop-types
var _propTypes2 = _interopRequireDefault(_propTypes);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
var subscriptionShape = exports.subscriptionShape = _propTypes2.default.shape({
trySubscribe: _propTypes2.default.func.isRequired,
tryUnsubscribe: _propTypes2.default.func.isRequired,
notifyNestedSubs: _propTypes2.default.func.isRequired,
isSubscribed: _propTypes2.default.func.isRequired
});
var storeShape = exports.storeShape = _propTypes2.default.shape({
subscribe: _propTypes2.default.func.isRequired,
dispatch: _propTypes2.default.func.isRequired,
getState: _propTypes2.default.func.isRequired
});
}, 552, null, "react-redux/lib/utils/PropTypes.js");
__d(/* react-redux/lib/utils/warning.js */function(global, require, module, exports) {'use strict';
exports.__esModule = true;
exports.default = warning;
function warning(message) {
if (typeof console !== 'undefined' && typeof console.error === 'function') {
console.error(message);
}
try {
throw new Error(message);
} catch (e) {}
}
}, 553, null, "react-redux/lib/utils/warning.js");
__d(/* react-redux/lib/components/connectAdvanced.js */function(global, require, module, exports) {'use strict';
exports.__esModule = true;
var _extends = Object.assign || function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}return target;
};
exports.default = connectAdvanced;
var _hoistNonReactStatics = require(555 ); // 555 = hoist-non-react-statics
var _hoistNonReactStatics2 = _interopRequireDefault(_hoistNonReactStatics);
var _invariant = require(556 ); // 556 = invariant
var _invariant2 = _interopRequireDefault(_invariant);
var _react = require(34 ); // 34 = react
var _Subscription = require(557 ); // 557 = ../utils/Subscription
var _Subscription2 = _interopRequireDefault(_Subscription);
var _PropTypes = require(552 ); // 552 = ../utils/PropTypes
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
function _possibleConstructorReturn(self, call) {
if (!self) {
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}return call && (typeof call === "object" || typeof call === "function") ? call : self;
}
function _inherits(subClass, superClass) {
if (typeof superClass !== "function" && superClass !== null) {
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
}subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
}
function _objectWithoutProperties(obj, keys) {
var target = {};for (var i in obj) {
if (keys.indexOf(i) >= 0) continue;if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;target[i] = obj[i];
}return target;
}
var hotReloadingVersion = 0;
var dummyState = {};
function noop() {}
function makeSelectorStateful(sourceSelector, store) {
var selector = {
run: function runComponentSelector(props) {
try {
var nextProps = sourceSelector(store.getState(), props);
if (nextProps !== selector.props || selector.error) {
selector.shouldComponentUpdate = true;
selector.props = nextProps;
selector.error = null;
}
} catch (error) {
selector.shouldComponentUpdate = true;
selector.error = error;
}
}
};
return selector;
}
function connectAdvanced(selectorFactory) {
var _contextTypes, _childContextTypes;
var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
_ref$getDisplayName = _ref.getDisplayName,
getDisplayName = _ref$getDisplayName === undefined ? function (name) {
return 'ConnectAdvanced(' + name + ')';
} : _ref$getDisplayName,
_ref$methodName = _ref.methodName,
methodName = _ref$methodName === undefined ? 'connectAdvanced' : _ref$methodName,
_ref$renderCountProp = _ref.renderCountProp,
renderCountProp = _ref$renderCountProp === undefined ? undefined : _ref$renderCountProp,
_ref$shouldHandleStat = _ref.shouldHandleStateChanges,
shouldHandleStateChanges = _ref$shouldHandleStat === undefined ? true : _ref$shouldHandleStat,
_ref$storeKey = _ref.storeKey,
storeKey = _ref$storeKey === undefined ? 'store' : _ref$storeKey,
_ref$withRef = _ref.withRef,
withRef = _ref$withRef === undefined ? false : _ref$withRef,
connectOptions = _objectWithoutProperties(_ref, ['getDisplayName', 'methodName', 'renderCountProp', 'shouldHandleStateChanges', 'storeKey', 'withRef']);
var subscriptionKey = storeKey + 'Subscription';
var version = hotReloadingVersion++;
var contextTypes = (_contextTypes = {}, _contextTypes[storeKey] = _PropTypes.storeShape, _contextTypes[subscriptionKey] = _PropTypes.subscriptionShape, _contextTypes);
var childContextTypes = (_childContextTypes = {}, _childContextTypes[subscriptionKey] = _PropTypes.subscriptionShape, _childContextTypes);
return function wrapWithConnect(WrappedComponent) {
(0, _invariant2.default)(typeof WrappedComponent == 'function', 'You must pass a component to the function returned by ' + ('connect. Instead received ' + JSON.stringify(WrappedComponent)));
var wrappedComponentName = WrappedComponent.displayName || WrappedComponent.name || 'Component';
var displayName = getDisplayName(wrappedComponentName);
var selectorFactoryOptions = _extends({}, connectOptions, {
getDisplayName: getDisplayName,
methodName: methodName,
renderCountProp: renderCountProp,
shouldHandleStateChanges: shouldHandleStateChanges,
storeKey: storeKey,
withRef: withRef,
displayName: displayName,
wrappedComponentName: wrappedComponentName,
WrappedComponent: WrappedComponent
});
var Connect = function (_Component) {
_inherits(Connect, _Component);
function Connect(props, context) {
_classCallCheck(this, Connect);
var _this = _possibleConstructorReturn(this, _Component.call(this, props, context));
_this.version = version;
_this.state = {};
_this.renderCount = 0;
_this.store = props[storeKey] || context[storeKey];
_this.propsMode = Boolean(props[storeKey]);
_this.setWrappedInstance = _this.setWrappedInstance.bind(_this);
(0, _invariant2.default)(_this.store, 'Could not find "' + storeKey + '" in either the context or props of ' + ('"' + displayName + '". Either wrap the root component in a <Provider>, ') + ('or explicitly pass "' + storeKey + '" as a prop to "' + displayName + '".'));
_this.initSelector();
_this.initSubscription();
return _this;
}
Connect.prototype.getChildContext = function getChildContext() {
var _ref2;
var subscription = this.propsMode ? null : this.subscription;
return _ref2 = {}, _ref2[subscriptionKey] = subscription || this.context[subscriptionKey], _ref2;
};
Connect.prototype.componentDidMount = function componentDidMount() {
if (!shouldHandleStateChanges) return;
this.subscription.trySubscribe();
this.selector.run(this.props);
if (this.selector.shouldComponentUpdate) this.forceUpdate();
};
Connect.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
this.selector.run(nextProps);
};
Connect.prototype.shouldComponentUpdate = function shouldComponentUpdate() {
return this.selector.shouldComponentUpdate;
};
Connect.prototype.componentWillUnmount = function componentWillUnmount() {
if (this.subscription) this.subscription.tryUnsubscribe();
this.subscription = null;
this.notifyNestedSubs = noop;
this.store = null;
this.selector.run = noop;
this.selector.shouldComponentUpdate = false;
};
Connect.prototype.getWrappedInstance = function getWrappedInstance() {
(0, _invariant2.default)(withRef, 'To access the wrapped instance, you need to specify ' + ('{ withRef: true } in the options argument of the ' + methodName + '() call.'));
return this.wrappedInstance;
};
Connect.prototype.setWrappedInstance = function setWrappedInstance(ref) {
this.wrappedInstance = ref;
};
Connect.prototype.initSelector = function initSelector() {
var sourceSelector = selectorFactory(this.store.dispatch, selectorFactoryOptions);
this.selector = makeSelectorStateful(sourceSelector, this.store);
this.selector.run(this.props);
};
Connect.prototype.initSubscription = function initSubscription() {
if (!shouldHandleStateChanges) return;
var parentSub = (this.propsMode ? this.props : this.context)[subscriptionKey];
this.subscription = new _Subscription2.default(this.store, parentSub, this.onStateChange.bind(this));
this.notifyNestedSubs = this.subscription.notifyNestedSubs.bind(this.subscription);
};
Connect.prototype.onStateChange = function onStateChange() {
this.selector.run(this.props);
if (!this.selector.shouldComponentUpdate) {
this.notifyNestedSubs();
} else {
this.componentDidUpdate = this.notifyNestedSubsOnComponentDidUpdate;
this.setState(dummyState);
}
};
Connect.prototype.notifyNestedSubsOnComponentDidUpdate = function notifyNestedSubsOnComponentDidUpdate() {
this.componentDidUpdate = undefined;
this.notifyNestedSubs();
};
Connect.prototype.isSubscribed = function isSubscribed() {
return Boolean(this.subscription) && this.subscription.isSubscribed();
};
Connect.prototype.addExtraProps = function addExtraProps(props) {
if (!withRef && !renderCountProp && !(this.propsMode && this.subscription)) return props;
var withExtras = _extends({}, props);
if (withRef) withExtras.ref = this.setWrappedInstance;
if (renderCountProp) withExtras[renderCountProp] = this.renderCount++;
if (this.propsMode && this.subscription) withExtras[subscriptionKey] = this.subscription;
return withExtras;
};
Connect.prototype.render = function render() {
var selector = this.selector;
selector.shouldComponentUpdate = false;
if (selector.error) {
throw selector.error;
} else {
return (0, _react.createElement)(WrappedComponent, this.addExtraProps(selector.props));
}
};
return Connect;
}(_react.Component);
Connect.WrappedComponent = WrappedComponent;
Connect.displayName = displayName;
Connect.childContextTypes = childContextTypes;
Connect.contextTypes = contextTypes;
Connect.propTypes = contextTypes;
if (process.env.NODE_ENV !== 'production') {
Connect.prototype.componentWillUpdate = function componentWillUpdate() {
if (this.version !== version) {
this.version = version;
this.initSelector();
if (this.subscription) this.subscription.tryUnsubscribe();
this.initSubscription();
if (shouldHandleStateChanges) this.subscription.trySubscribe();
}
};
}
return (0, _hoistNonReactStatics2.default)(Connect, WrappedComponent);
};
}
}, 554, null, "react-redux/lib/components/connectAdvanced.js");
__d(/* hoist-non-react-statics/index.js */function(global, require, module, exports) {
'use strict';
var REACT_STATICS = {
childContextTypes: true,
contextTypes: true,
defaultProps: true,
displayName: true,
getDefaultProps: true,
mixins: true,
propTypes: true,
type: true
};
var KNOWN_STATICS = {
name: true,
length: true,
prototype: true,
caller: true,
arguments: true,
arity: true
};
var isGetOwnPropertySymbolsAvailable = typeof Object.getOwnPropertySymbols === 'function';
module.exports = function hoistNonReactStatics(targetComponent, sourceComponent, customStatics) {
if (typeof sourceComponent !== 'string') {
var keys = Object.getOwnPropertyNames(sourceComponent);
if (isGetOwnPropertySymbolsAvailable) {
keys = keys.concat(Object.getOwnPropertySymbols(sourceComponent));
}
for (var i = 0; i < keys.length; ++i) {
if (!REACT_STATICS[keys[i]] && !KNOWN_STATICS[keys[i]] && (!customStatics || !customStatics[keys[i]])) {
try {
targetComponent[keys[i]] = sourceComponent[keys[i]];
} catch (error) {}
}
}
}
return targetComponent;
};
}, 555, null, "hoist-non-react-statics/index.js");
__d(/* invariant/browser.js */function(global, require, module, exports) {
'use strict';
var invariant = function invariant(condition, format, a, b, c, d, e, f) {
if (process.env.NODE_ENV !== 'production') {
if (format === undefined) {
throw new Error('invariant requires an error message argument');
}
}
if (!condition) {
var error;
if (format === undefined) {
error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
} else {
var args = [a, b, c, d, e, f];
var argIndex = 0;
error = new Error(format.replace(/%s/g, function () {
return args[argIndex++];
}));
error.name = 'Invariant Violation';
}
error.framesToPop = 1;
throw error;
}
};
module.exports = invariant;
}, 556, null, "invariant/browser.js");
__d(/* react-redux/lib/utils/Subscription.js */function(global, require, module, exports) {"use strict";
exports.__esModule = true;
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
var CLEARED = null;
var nullListeners = {
notify: function notify() {}
};
function createListenerCollection() {
var current = [];
var next = [];
return {
clear: function clear() {
next = CLEARED;
current = CLEARED;
},
notify: function notify() {
var listeners = current = next;
for (var i = 0; i < listeners.length; i++) {
listeners[i]();
}
},
subscribe: function subscribe(listener) {
var isSubscribed = true;
if (next === current) next = current.slice();
next.push(listener);
return function unsubscribe() {
if (!isSubscribed || current === CLEARED) return;
isSubscribed = false;
if (next === current) next = current.slice();
next.splice(next.indexOf(listener), 1);
};
}
};
}
var Subscription = function () {
function Subscription(store, parentSub, onStateChange) {
_classCallCheck(this, Subscription);
this.store = store;
this.parentSub = parentSub;
this.onStateChange = onStateChange;
this.unsubscribe = null;
this.listeners = nullListeners;
}
Subscription.prototype.addNestedSub = function addNestedSub(listener) {
this.trySubscribe();
return this.listeners.subscribe(listener);
};
Subscription.prototype.notifyNestedSubs = function notifyNestedSubs() {
this.listeners.notify();
};
Subscription.prototype.isSubscribed = function isSubscribed() {
return Boolean(this.unsubscribe);
};
Subscription.prototype.trySubscribe = function trySubscribe() {
if (!this.unsubscribe) {
this.unsubscribe = this.parentSub ? this.parentSub.addNestedSub(this.onStateChange) : this.store.subscribe(this.onStateChange);
this.listeners = createListenerCollection();
}
};
Subscription.prototype.tryUnsubscribe = function tryUnsubscribe() {
if (this.unsubscribe) {
this.unsubscribe();
this.unsubscribe = null;
this.listeners.clear();
this.listeners = nullListeners;
}
};
return Subscription;
}();
exports.default = Subscription;
}, 557, null, "react-redux/lib/utils/Subscription.js");
__d(/* react-redux/lib/connect/connect.js */function(global, require, module, exports) {'use strict';
exports.__esModule = true;
var _extends = Object.assign || function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}return target;
};
exports.createConnect = createConnect;
var _connectAdvanced = require(554 ); // 554 = ../components/connectAdvanced
var _connectAdvanced2 = _interopRequireDefault(_connectAdvanced);
var _shallowEqual = require(559 ); // 559 = ../utils/shallowEqual
var _shallowEqual2 = _interopRequireDefault(_shallowEqual);
var _mapDispatchToProps = require(560 ); // 560 = ./mapDispatchToProps
var _mapDispatchToProps2 = _interopRequireDefault(_mapDispatchToProps);
var _mapStateToProps = require(563 ); // 563 = ./mapStateToProps
var _mapStateToProps2 = _interopRequireDefault(_mapStateToProps);
var _mergeProps = require(564 ); // 564 = ./mergeProps
var _mergeProps2 = _interopRequireDefault(_mergeProps);
var _selectorFactory = require(565 ); // 565 = ./selectorFactory
var _selectorFactory2 = _interopRequireDefault(_selectorFactory);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
function _objectWithoutProperties(obj, keys) {
var target = {};for (var i in obj) {
if (keys.indexOf(i) >= 0) continue;if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;target[i] = obj[i];
}return target;
}
function match(arg, factories, name) {
for (var i = factories.length - 1; i >= 0; i--) {
var result = factories[i](arg);
if (result) return result;
}
return function (dispatch, options) {
throw new Error('Invalid value of type ' + typeof arg + ' for ' + name + ' argument when connecting component ' + options.wrappedComponentName + '.');
};
}
function strictEqual(a, b) {
return a === b;
}
function createConnect() {
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
_ref$connectHOC = _ref.connectHOC,
connectHOC = _ref$connectHOC === undefined ? _connectAdvanced2.default : _ref$connectHOC,
_ref$mapStateToPropsF = _ref.mapStateToPropsFactories,
mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? _mapStateToProps2.default : _ref$mapStateToPropsF,
_ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,
mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? _mapDispatchToProps2.default : _ref$mapDispatchToPro,
_ref$mergePropsFactor = _ref.mergePropsFactories,
mergePropsFactories = _ref$mergePropsFactor === undefined ? _mergeProps2.default : _ref$mergePropsFactor,
_ref$selectorFactory = _ref.selectorFactory,
selectorFactory = _ref$selectorFactory === undefined ? _selectorFactory2.default : _ref$selectorFactory;
return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {
var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},
_ref2$pure = _ref2.pure,
pure = _ref2$pure === undefined ? true : _ref2$pure,
_ref2$areStatesEqual = _ref2.areStatesEqual,
areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,
_ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,
areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? _shallowEqual2.default : _ref2$areOwnPropsEqua,
_ref2$areStatePropsEq = _ref2.areStatePropsEqual,
areStatePropsEqual = _ref2$areStatePropsEq === undefined ? _shallowEqual2.default : _ref2$areStatePropsEq,
_ref2$areMergedPropsE = _ref2.areMergedPropsEqual,
areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? _shallowEqual2.default : _ref2$areMergedPropsE,
extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);
var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');
var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');
var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');
return connectHOC(selectorFactory, _extends({
methodName: 'connect',
getDisplayName: function getDisplayName(name) {
return 'Connect(' + name + ')';
},
shouldHandleStateChanges: Boolean(mapStateToProps),
initMapStateToProps: initMapStateToProps,
initMapDispatchToProps: initMapDispatchToProps,
initMergeProps: initMergeProps,
pure: pure,
areStatesEqual: areStatesEqual,
areOwnPropsEqual: areOwnPropsEqual,
areStatePropsEqual: areStatePropsEqual,
areMergedPropsEqual: areMergedPropsEqual
}, extraOptions));
};
}
exports.default = createConnect();
}, 558, null, "react-redux/lib/connect/connect.js");
__d(/* react-redux/lib/utils/shallowEqual.js */function(global, require, module, exports) {'use strict';
exports.__esModule = true;
exports.default = shallowEqual;
var hasOwn = Object.prototype.hasOwnProperty;
function is(x, y) {
if (x === y) {
return x !== 0 || y !== 0 || 1 / x === 1 / y;
} else {
return x !== x && y !== y;
}
}
function shallowEqual(objA, objB) {
if (is(objA, objB)) return true;
if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {
return false;
}
var keysA = Object.keys(objA);
var keysB = Object.keys(objB);
if (keysA.length !== keysB.length) return false;
for (var i = 0; i < keysA.length; i++) {
if (!hasOwn.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {
return false;
}
}
return true;
}
}, 559, null, "react-redux/lib/utils/shallowEqual.js");
__d(/* react-redux/lib/connect/mapDispatchToProps.js */function(global, require, module, exports) {'use strict';
exports.__esModule = true;
exports.whenMapDispatchToPropsIsFunction = whenMapDispatchToPropsIsFunction;
exports.whenMapDispatchToPropsIsMissing = whenMapDispatchToPropsIsMissing;
exports.whenMapDispatchToPropsIsObject = whenMapDispatchToPropsIsObject;
var _redux = require(508 ); // 508 = redux
var _wrapMapToProps = require(561 ); // 561 = ./wrapMapToProps
function whenMapDispatchToPropsIsFunction(mapDispatchToProps) {
return typeof mapDispatchToProps === 'function' ? (0, _wrapMapToProps.wrapMapToPropsFunc)(mapDispatchToProps, 'mapDispatchToProps') : undefined;
}
function whenMapDispatchToPropsIsMissing(mapDispatchToProps) {
return !mapDispatchToProps ? (0, _wrapMapToProps.wrapMapToPropsConstant)(function (dispatch) {
return { dispatch: dispatch };
}) : undefined;
}
function whenMapDispatchToPropsIsObject(mapDispatchToProps) {
return mapDispatchToProps && typeof mapDispatchToProps === 'object' ? (0, _wrapMapToProps.wrapMapToPropsConstant)(function (dispatch) {
return (0, _redux.bindActionCreators)(mapDispatchToProps, dispatch);
}) : undefined;
}
exports.default = [whenMapDispatchToPropsIsFunction, whenMapDispatchToPropsIsMissing, whenMapDispatchToPropsIsObject];
}, 560, null, "react-redux/lib/connect/mapDispatchToProps.js");
__d(/* react-redux/lib/connect/wrapMapToProps.js */function(global, require, module, exports) {'use strict';
exports.__esModule = true;
exports.wrapMapToPropsConstant = wrapMapToPropsConstant;
exports.getDependsOnOwnProps = getDependsOnOwnProps;
exports.wrapMapToPropsFunc = wrapMapToPropsFunc;
var _verifyPlainObject = require(562 ); // 562 = ../utils/verifyPlainObject
var _verifyPlainObject2 = _interopRequireDefault(_verifyPlainObject);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
function wrapMapToPropsConstant(getConstant) {
return function initConstantSelector(dispatch, options) {
var constant = getConstant(dispatch, options);
function constantSelector() {
return constant;
}
constantSelector.dependsOnOwnProps = false;
return constantSelector;
};
}
function getDependsOnOwnProps(mapToProps) {
return mapToProps.dependsOnOwnProps !== null && mapToProps.dependsOnOwnProps !== undefined ? Boolean(mapToProps.dependsOnOwnProps) : mapToProps.length !== 1;
}
function wrapMapToPropsFunc(mapToProps, methodName) {
return function initProxySelector(dispatch, _ref) {
var displayName = _ref.displayName;
var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {
return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);
};
proxy.dependsOnOwnProps = true;
proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {
proxy.mapToProps = mapToProps;
proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);
var props = proxy(stateOrDispatch, ownProps);
if (typeof props === 'function') {
proxy.mapToProps = props;
proxy.dependsOnOwnProps = getDependsOnOwnProps(props);
props = proxy(stateOrDispatch, ownProps);
}
if (process.env.NODE_ENV !== 'production') (0, _verifyPlainObject2.default)(props, displayName, methodName);
return props;
};
return proxy;
};
}
}, 561, null, "react-redux/lib/connect/wrapMapToProps.js");
__d(/* react-redux/lib/utils/verifyPlainObject.js */function(global, require, module, exports) {'use strict';
exports.__esModule = true;
exports.default = verifyPlainObject;
var _isPlainObject = require(510 ); // 510 = lodash/isPlainObject
var _isPlainObject2 = _interopRequireDefault(_isPlainObject);
var _warning = require(553 ); // 553 = ./warning
var _warning2 = _interopRequireDefault(_warning);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
function verifyPlainObject(value, displayName, methodName) {
if (!(0, _isPlainObject2.default)(value)) {
(0, _warning2.default)(methodName + '() in ' + displayName + ' must return a plain object. Instead received ' + value + '.');
}
}
}, 562, null, "react-redux/lib/utils/verifyPlainObject.js");
__d(/* react-redux/lib/connect/mapStateToProps.js */function(global, require, module, exports) {'use strict';
exports.__esModule = true;
exports.whenMapStateToPropsIsFunction = whenMapStateToPropsIsFunction;
exports.whenMapStateToPropsIsMissing = whenMapStateToPropsIsMissing;
var _wrapMapToProps = require(561 ); // 561 = ./wrapMapToProps
function whenMapStateToPropsIsFunction(mapStateToProps) {
return typeof mapStateToProps === 'function' ? (0, _wrapMapToProps.wrapMapToPropsFunc)(mapStateToProps, 'mapStateToProps') : undefined;
}
function whenMapStateToPropsIsMissing(mapStateToProps) {
return !mapStateToProps ? (0, _wrapMapToProps.wrapMapToPropsConstant)(function () {
return {};
}) : undefined;
}
exports.default = [whenMapStateToPropsIsFunction, whenMapStateToPropsIsMissing];
}, 563, null, "react-redux/lib/connect/mapStateToProps.js");
__d(/* react-redux/lib/connect/mergeProps.js */function(global, require, module, exports) {'use strict';
exports.__esModule = true;
var _extends = Object.assign || function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}return target;
};
exports.defaultMergeProps = defaultMergeProps;
exports.wrapMergePropsFunc = wrapMergePropsFunc;
exports.whenMergePropsIsFunction = whenMergePropsIsFunction;
exports.whenMergePropsIsOmitted = whenMergePropsIsOmitted;
var _verifyPlainObject = require(562 ); // 562 = ../utils/verifyPlainObject
var _verifyPlainObject2 = _interopRequireDefault(_verifyPlainObject);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
function defaultMergeProps(stateProps, dispatchProps, ownProps) {
return _extends({}, ownProps, stateProps, dispatchProps);
}
function wrapMergePropsFunc(mergeProps) {
return function initMergePropsProxy(dispatch, _ref) {
var displayName = _ref.displayName,
pure = _ref.pure,
areMergedPropsEqual = _ref.areMergedPropsEqual;
var hasRunOnce = false;
var mergedProps = void 0;
return function mergePropsProxy(stateProps, dispatchProps, ownProps) {
var nextMergedProps = mergeProps(stateProps, dispatchProps, ownProps);
if (hasRunOnce) {
if (!pure || !areMergedPropsEqual(nextMergedProps, mergedProps)) mergedProps = nextMergedProps;
} else {
hasRunOnce = true;
mergedProps = nextMergedProps;
if (process.env.NODE_ENV !== 'production') (0, _verifyPlainObject2.default)(mergedProps, displayName, 'mergeProps');
}
return mergedProps;
};
};
}
function whenMergePropsIsFunction(mergeProps) {
return typeof mergeProps === 'function' ? wrapMergePropsFunc(mergeProps) : undefined;
}
function whenMergePropsIsOmitted(mergeProps) {
return !mergeProps ? function () {
return defaultMergeProps;
} : undefined;
}
exports.default = [whenMergePropsIsFunction, whenMergePropsIsOmitted];
}, 564, null, "react-redux/lib/connect/mergeProps.js");
__d(/* react-redux/lib/connect/selectorFactory.js */function(global, require, module, exports) {'use strict';
exports.__esModule = true;
exports.impureFinalPropsSelectorFactory = impureFinalPropsSelectorFactory;
exports.pureFinalPropsSelectorFactory = pureFinalPropsSelectorFactory;
exports.default = finalPropsSelectorFactory;
var _verifySubselectors = require(566 ); // 566 = ./verifySubselectors
var _verifySubselectors2 = _interopRequireDefault(_verifySubselectors);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
function _objectWithoutProperties(obj, keys) {
var target = {};for (var i in obj) {
if (keys.indexOf(i) >= 0) continue;if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;target[i] = obj[i];
}return target;
}
function impureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch) {
return function impureFinalPropsSelector(state, ownProps) {
return mergeProps(mapStateToProps(state, ownProps), mapDispatchToProps(dispatch, ownProps), ownProps);
};
}
function pureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, _ref) {
var areStatesEqual = _ref.areStatesEqual,
areOwnPropsEqual = _ref.areOwnPropsEqual,
areStatePropsEqual = _ref.areStatePropsEqual;
var hasRunAtLeastOnce = false;
var state = void 0;
var ownProps = void 0;
var stateProps = void 0;
var dispatchProps = void 0;
var mergedProps = void 0;
function handleFirstCall(firstState, firstOwnProps) {
state = firstState;
ownProps = firstOwnProps;
stateProps = mapStateToProps(state, ownProps);
dispatchProps = mapDispatchToProps(dispatch, ownProps);
mergedProps = mergeProps(stateProps, dispatchProps, ownProps);
hasRunAtLeastOnce = true;
return mergedProps;
}
function handleNewPropsAndNewState() {
stateProps = mapStateToProps(state, ownProps);
if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps);
mergedProps = mergeProps(stateProps, dispatchProps, ownProps);
return mergedProps;
}
function handleNewProps() {
if (mapStateToProps.dependsOnOwnProps) stateProps = mapStateToProps(state, ownProps);
if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps);
mergedProps = mergeProps(stateProps, dispatchProps, ownProps);
return mergedProps;
}
function handleNewState() {
var nextStateProps = mapStateToProps(state, ownProps);
var statePropsChanged = !areStatePropsEqual(nextStateProps, stateProps);
stateProps = nextStateProps;
if (statePropsChanged) mergedProps = mergeProps(stateProps, dispatchProps, ownProps);
return mergedProps;
}
function handleSubsequentCalls(nextState, nextOwnProps) {
var propsChanged = !areOwnPropsEqual(nextOwnProps, ownProps);
var stateChanged = !areStatesEqual(nextState, state);
state = nextState;
ownProps = nextOwnProps;
if (propsChanged && stateChanged) return handleNewPropsAndNewState();
if (propsChanged) return handleNewProps();
if (stateChanged) return handleNewState();
return mergedProps;
}
return function pureFinalPropsSelector(nextState, nextOwnProps) {
return hasRunAtLeastOnce ? handleSubsequentCalls(nextState, nextOwnProps) : handleFirstCall(nextState, nextOwnProps);
};
}
function finalPropsSelectorFactory(dispatch, _ref2) {
var initMapStateToProps = _ref2.initMapStateToProps,
initMapDispatchToProps = _ref2.initMapDispatchToProps,
initMergeProps = _ref2.initMergeProps,
options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);
var mapStateToProps = initMapStateToProps(dispatch, options);
var mapDispatchToProps = initMapDispatchToProps(dispatch, options);
var mergeProps = initMergeProps(dispatch, options);
if (process.env.NODE_ENV !== 'production') {
(0, _verifySubselectors2.default)(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);
}
var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;
return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);
}
}, 565, null, "react-redux/lib/connect/selectorFactory.js");
__d(/* react-redux/lib/connect/verifySubselectors.js */function(global, require, module, exports) {'use strict';
exports.__esModule = true;
exports.default = verifySubselectors;
var _warning = require(553 ); // 553 = ../utils/warning
var _warning2 = _interopRequireDefault(_warning);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
function verify(selector, methodName, displayName) {
if (!selector) {
throw new Error('Unexpected value for ' + methodName + ' in ' + displayName + '.');
} else if (methodName === 'mapStateToProps' || methodName === 'mapDispatchToProps') {
if (!selector.hasOwnProperty('dependsOnOwnProps')) {
(0, _warning2.default)('The selector for ' + methodName + ' of ' + displayName + ' did not specify a value for dependsOnOwnProps.');
}
}
}
function verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps, displayName) {
verify(mapStateToProps, 'mapStateToProps', displayName);
verify(mapDispatchToProps, 'mapDispatchToProps', displayName);
verify(mergeProps, 'mergeProps', displayName);
}
}, 566, null, "react-redux/lib/connect/verifySubselectors.js");
__d(/* jitsi-meet/react/features/base/media/index.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _actions = require(568 ); // 568 = ./actions
Object.keys(_actions).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _actions[key];
}
});
});
var _actionTypes = require(569 ); // 569 = ./actionTypes
Object.keys(_actionTypes).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _actionTypes[key];
}
});
});
var _components = require(571 ); // 571 = ./components
Object.keys(_components).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _components[key];
}
});
});
var _constants = require(570 ); // 570 = ./constants
Object.keys(_constants).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _constants[key];
}
});
});
var _functions = require(586 ); // 586 = ./functions
Object.keys(_functions).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _functions[key];
}
});
});
require(587 ); // 587 = ./middleware
require(588 ); // 588 = ./reducer
}, 567, null, "jitsi-meet/react/features/base/media/index.js");
__d(/* jitsi-meet/react/features/base/media/actions.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
exports.setAudioAvailable = setAudioAvailable;
exports.setAudioMuted = setAudioMuted;
exports.setCameraFacingMode = setCameraFacingMode;
exports.setVideoAvailable = setVideoAvailable;
exports.setVideoMuted = setVideoMuted;
exports.toggleAudioMuted = toggleAudioMuted;
exports.toggleCameraFacingMode = toggleCameraFacingMode;
exports.toggleVideoMuted = toggleVideoMuted;
var _actionTypes = require(569 ); // 569 = ./actionTypes
var _constants = require(570 ); // 570 = ./constants
function setAudioAvailable(available) {
return {
type: _actionTypes.SET_AUDIO_AVAILABLE,
available: available
};
}
function setAudioMuted(muted) {
return {
type: _actionTypes.SET_AUDIO_MUTED,
muted: muted
};
}
function setCameraFacingMode(cameraFacingMode) {
return {
type: _actionTypes.SET_CAMERA_FACING_MODE,
cameraFacingMode: cameraFacingMode
};
}
function setVideoAvailable(available) {
return {
type: _actionTypes.SET_VIDEO_AVAILABLE,
available: available
};
}
function setVideoMuted(muted) {
return {
type: _actionTypes.SET_VIDEO_MUTED,
muted: muted
};
}
function toggleAudioMuted() {
return function (dispatch, getState) {
var muted = getState()['features/base/media'].audio.muted;
return dispatch(setAudioMuted(!muted));
};
}
function toggleCameraFacingMode() {
return {
type: _actionTypes.TOGGLE_CAMERA_FACING_MODE
};
}
function toggleVideoMuted() {
return function (dispatch, getState) {
var muted = getState()['features/base/media'].video.muted;
return dispatch(setVideoMuted(!muted));
};
}
}, 568, null, "jitsi-meet/react/features/base/media/actions.js");
__d(/* jitsi-meet/react/features/base/media/actionTypes.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var SET_AUDIO_MUTED = exports.SET_AUDIO_MUTED = Symbol('SET_AUDIO_MUTED');
var SET_AUDIO_AVAILABLE = exports.SET_AUDIO_AVAILABLE = Symbol('SET_AUDIO_AVAILABLE');
var SET_CAMERA_FACING_MODE = exports.SET_CAMERA_FACING_MODE = Symbol('SET_CAMERA_FACING_MODE');
var SET_VIDEO_AVAILABLE = exports.SET_VIDEO_AVAILABLE = Symbol('SET_VIDEO_AVAILABLE');
var SET_VIDEO_MUTED = exports.SET_VIDEO_MUTED = Symbol('SET_VIDEO_MUTED');
var TOGGLE_CAMERA_FACING_MODE = exports.TOGGLE_CAMERA_FACING_MODE = Symbol('TOGGLE_CAMERA_FACING_MODE');
}, 569, null, "jitsi-meet/react/features/base/media/actionTypes.js");
__d(/* jitsi-meet/react/features/base/media/constants.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var CAMERA_FACING_MODE = exports.CAMERA_FACING_MODE = {
ENVIRONMENT: 'environment',
USER: 'user'
};
var MEDIA_TYPE = exports.MEDIA_TYPE = {
AUDIO: 'audio',
VIDEO: 'video'
};
var VIDEO_TYPE = exports.VIDEO_TYPE = {
CAMERA: 'camera',
DESKTOP: 'desktop'
};
}, 570, null, "jitsi-meet/react/features/base/media/constants.js");
__d(/* jitsi-meet/react/features/base/media/components/index.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _ = require(572 ); // 572 = ./_
Object.keys(_).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _[key];
}
});
});
}, 571, null, "jitsi-meet/react/features/base/media/components/index.js");
__d(/* jitsi-meet/react/features/base/media/components/_.native.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _native = require(573 ); // 573 = ./native
Object.keys(_native).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _native[key];
}
});
});
}, 572, null, "jitsi-meet/react/features/base/media/components/_.native.js");
__d(/* jitsi-meet/react/features/base/media/components/native/index.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _Audio = require(574 ); // 574 = ./Audio
Object.defineProperty(exports, 'Audio', {
enumerable: true,
get: function get() {
return babelHelpers.interopRequireDefault(_Audio).default;
}
});
var _Video = require(576 ); // 576 = ./Video
Object.defineProperty(exports, 'Video', {
enumerable: true,
get: function get() {
return babelHelpers.interopRequireDefault(_Video).default;
}
});
var _VideoTrack = require(578 ); // 578 = ./VideoTrack
Object.defineProperty(exports, 'VideoTrack', {
enumerable: true,
get: function get() {
return babelHelpers.interopRequireDefault(_VideoTrack).default;
}
});
}, 573, null, "jitsi-meet/react/features/base/media/components/native/index.js");
__d(/* jitsi-meet/react/features/base/media/components/native/Audio.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _AbstractAudio2 = require(575 ); // 575 = ../AbstractAudio
var _AbstractAudio3 = babelHelpers.interopRequireDefault(_AbstractAudio2);
var Audio = function (_AbstractAudio) {
babelHelpers.inherits(Audio, _AbstractAudio);
function Audio() {
babelHelpers.classCallCheck(this, Audio);
return babelHelpers.possibleConstructorReturn(this, (Audio.__proto__ || Object.getPrototypeOf(Audio)).apply(this, arguments));
}
babelHelpers.createClass(Audio, [{
key: 'render',
value: function render() {
return null;
}
}]);
return Audio;
}(_AbstractAudio3.default);
Audio.propTypes = _AbstractAudio3.default.propTypes;
exports.default = Audio;
}, 574, null, "jitsi-meet/react/features/base/media/components/native/Audio.js");
__d(/* jitsi-meet/react/features/base/media/components/AbstractAudio.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _react = require(34 ); // 34 = react
var _react2 = babelHelpers.interopRequireDefault(_react);
var AbstractAudio = function (_Component) {
babelHelpers.inherits(AbstractAudio, _Component);
function AbstractAudio(props) {
babelHelpers.classCallCheck(this, AbstractAudio);
var _this = babelHelpers.possibleConstructorReturn(this, (AbstractAudio.__proto__ || Object.getPrototypeOf(AbstractAudio)).call(this, props));
_this._setRef = _this._setRef.bind(_this);
return _this;
}
babelHelpers.createClass(AbstractAudio, [{
key: 'pause',
value: function pause() {
this._ref && typeof this._ref.pause === 'function' && this._ref.pause();
}
}, {
key: 'play',
value: function play() {
this._ref && typeof this._ref.play === 'function' && this._ref.play();
}
}, {
key: '_render',
value: function _render(type, props) {
var _ref = props || this.props,
children = _ref.children,
ref = _ref.ref,
filteredProps = babelHelpers.objectWithoutProperties(_ref, ['children', 'ref']);
return _react2.default.createElement(type, babelHelpers.extends({}, filteredProps, {
ref: this._setRef
}), children);
}
}, {
key: '_setRef',
value: function _setRef(ref) {
this._ref = ref;
}
}]);
return AbstractAudio;
}(_react.Component);
AbstractAudio.propTypes = {
src: _react2.default.PropTypes.string,
stream: _react2.default.PropTypes.object
};
exports.default = AbstractAudio;
}, 575, null, "jitsi-meet/react/features/base/media/components/AbstractAudio.js");
__d(/* jitsi-meet/react/features/base/media/components/native/Video.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/react/features/base/media/components/native/Video.js';
var _react = require(34 ); // 34 = react
var _react2 = babelHelpers.interopRequireDefault(_react);
var _reactNativeWebrtc = require(469 ); // 469 = react-native-webrtc
var _styles = require(577 ); // 577 = ./styles
var _styles2 = babelHelpers.interopRequireDefault(_styles);
var Video = function (_Component) {
babelHelpers.inherits(Video, _Component);
function Video() {
babelHelpers.classCallCheck(this, Video);
return babelHelpers.possibleConstructorReturn(this, (Video.__proto__ || Object.getPrototypeOf(Video)).apply(this, arguments));
}
babelHelpers.createClass(Video, [{
key: 'componentDidMount',
value: function componentDidMount() {
var onPlaying = this.props.onPlaying;
onPlaying && onPlaying();
}
}, {
key: 'render',
value: function render() {
var stream = this.props.stream;
if (stream) {
var streamURL = stream.toURL();
var style = _styles2.default.video;
var objectFit = style && style.objectFit || 'cover';
return _react2.default.createElement(_reactNativeWebrtc.RTCView, {
mirror: this.props.mirror,
objectFit: objectFit,
streamURL: streamURL,
style: style,
zOrder: this.props.zOrder, __source: {
fileName: _jsxFileName,
lineNumber: 86
}
});
}
return null;
}
}]);
return Video;
}(_react.Component);
Video.propTypes = {
mirror: _react2.default.PropTypes.bool,
onPlaying: _react2.default.PropTypes.func,
stream: _react2.default.PropTypes.object,
zOrder: _react2.default.PropTypes.number
};
exports.default = Video;
}, 576, null, "jitsi-meet/react/features/base/media/components/native/Video.js");
__d(/* jitsi-meet/react/features/base/media/components/native/styles.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _reactNative = require(69 ); // 69 = react-native
var video = {
flex: 1
};
exports.default = _reactNative.StyleSheet.create({
video: video
});
}, 577, null, "jitsi-meet/react/features/base/media/components/native/styles.js");
__d(/* jitsi-meet/react/features/base/media/components/native/VideoTrack.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/react/features/base/media/components/native/VideoTrack.js';
var _react = require(34 ); // 34 = react
var _react2 = babelHelpers.interopRequireDefault(_react);
var _reactNative = require(69 ); // 69 = react-native
var _reactRedux = require(548 ); // 548 = react-redux
var _AbstractVideoTrack2 = require(579 ); // 579 = ../AbstractVideoTrack
var _AbstractVideoTrack3 = babelHelpers.interopRequireDefault(_AbstractVideoTrack2);
var _styles = require(577 ); // 577 = ./styles
var _styles2 = babelHelpers.interopRequireDefault(_styles);
var VideoTrack = function (_AbstractVideoTrack) {
babelHelpers.inherits(VideoTrack, _AbstractVideoTrack);
function VideoTrack(props) {
babelHelpers.classCallCheck(this, VideoTrack);
var _this = babelHelpers.possibleConstructorReturn(this, (VideoTrack.__proto__ || Object.getPrototypeOf(VideoTrack)).call(this, props));
_this._animation = null;
_this.state = babelHelpers.extends({}, _this.state, {
fade: new _reactNative.Animated.Value(1),
flip: new _reactNative.Animated.Value(1)
});
return _this;
}
babelHelpers.createClass(VideoTrack, [{
key: 'render',
value: function render() {
return _react2.default.createElement(
_reactNative.Animated.View,
{
style: [_styles2.default.video, this._getAnimationStyles()], __source: {
fileName: _jsxFileName,
lineNumber: 57
}
},
babelHelpers.get(VideoTrack.prototype.__proto__ || Object.getPrototypeOf(VideoTrack.prototype), 'render', this).call(this)
);
}
}, {
key: '_animateSetVideoTrack',
value: function _animateSetVideoTrack(oldValue, newValue) {
var _this2 = this;
if (this._animation) {
this._animation.stop();
this._animation = null;
this.state.fade.setValue(1);
this.state.flip.setValue(1);
}
var animation = oldValue && newValue && oldValue.local && newValue.local ? 'flip' : 'fade';
return this._animateVideoTrack(animation, 0).then(function () {
babelHelpers.get(VideoTrack.prototype.__proto__ || Object.getPrototypeOf(VideoTrack.prototype), '_setVideoTrack', _this2).call(_this2, newValue);
return _this2._animateVideoTrack(animation, 1);
}).catch(function () {
console.log('Animation was stopped');
});
}
}, {
key: '_animateVideoTrack',
value: function _animateVideoTrack(animatedValue, toValue) {
var _this3 = this;
return new Promise(function (resolve, reject) {
_this3._animation = _reactNative.Animated.timing(_this3.state[animatedValue], { toValue: toValue });
_this3._animation.start(function (result) {
_this3._animation = null;
result.finished ? resolve() : reject();
});
});
}
}, {
key: '_getAnimationStyles',
value: function _getAnimationStyles() {
return {
opacity: this.state.fade,
transform: [{
rotateY: this.state.flip.interpolate({
inputRange: [0, 1],
outputRange: ['90deg', '0deg']
})
}]
};
}
}, {
key: '_setVideoTrack',
value: function _setVideoTrack(videoTrack) {
var oldValue = this.state.videoTrack;
var oldJitsiTrack = oldValue ? oldValue.jitsiTrack : null;
var newValue = videoTrack;
var newJitsiTrack = newValue ? newValue.jitsiTrack : null;
if (oldJitsiTrack === newJitsiTrack) {
babelHelpers.get(VideoTrack.prototype.__proto__ || Object.getPrototypeOf(VideoTrack.prototype), '_setVideoTrack', this).call(this, newValue);
} else {
this._animateSetVideoTrack(oldValue, newValue);
}
}
}]);
return VideoTrack;
}(_AbstractVideoTrack3.default);
VideoTrack.propTypes = _AbstractVideoTrack3.default.propTypes;
exports.default = (0, _reactRedux.connect)()(VideoTrack);
}, 578, null, "jitsi-meet/react/features/base/media/components/native/VideoTrack.js");
__d(/* jitsi-meet/react/features/base/media/components/AbstractVideoTrack.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/react/features/base/media/components/AbstractVideoTrack.js';
var _react = require(34 ); // 34 = react
var _react2 = babelHelpers.interopRequireDefault(_react);
var _tracks = require(580 ); // 580 = ../../tracks
var _functions = require(586 ); // 586 = ../functions
var _ = require(572 ); // 572 = ./_
var AbstractVideoTrack = function (_Component) {
babelHelpers.inherits(AbstractVideoTrack, _Component);
function AbstractVideoTrack(props) {
babelHelpers.classCallCheck(this, AbstractVideoTrack);
var _this = babelHelpers.possibleConstructorReturn(this, (AbstractVideoTrack.__proto__ || Object.getPrototypeOf(AbstractVideoTrack)).call(this, props));
_this.state = {
videoTrack: _falsy2null(props.videoTrack)
};
_this._onVideoPlaying = _this._onVideoPlaying.bind(_this);
return _this;
}
babelHelpers.createClass(AbstractVideoTrack, [{
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(nextProps) {
var oldValue = this.state.videoTrack;
var newValue = _falsy2null(nextProps.videoTrack);
if (oldValue !== newValue) {
this._setVideoTrack(newValue);
}
}
}, {
key: 'render',
value: function render() {
var videoTrack = this.state.videoTrack;
var render = void 0;
if (this.props.waitForVideoStarted) {
if ((0, _functions.shouldRenderVideoTrack)(videoTrack, true)) {
render = true;
} else if ((0, _functions.shouldRenderVideoTrack)(videoTrack, false) && !videoTrack.videoStarted) {
render = true;
}
} else {
render = (0, _functions.shouldRenderVideoTrack)(videoTrack, false);
}
var stream = render ? videoTrack.jitsiTrack.getOriginalStream() : null;
return _react2.default.createElement(_.Video, {
mirror: videoTrack && videoTrack.mirror,
onPlaying: this._onVideoPlaying,
stream: stream,
zOrder: this.props.zOrder, __source: {
fileName: _jsxFileName,
lineNumber: 126
}
});
}
}, {
key: '_onVideoPlaying',
value: function _onVideoPlaying() {
var videoTrack = this.props.videoTrack;
if (this.props.triggerOnPlayingUpdate && videoTrack && !videoTrack.videoStarted) {
this.props.dispatch((0, _tracks.trackVideoStarted)(videoTrack.jitsiTrack));
}
}
}, {
key: '_setVideoTrack',
value: function _setVideoTrack(videoTrack) {
this.setState({ videoTrack: videoTrack });
}
}]);
return AbstractVideoTrack;
}(_react.Component);
AbstractVideoTrack.defaultProps = {
triggerOnPlayingUpdate: true
};
AbstractVideoTrack.propTypes = {
dispatch: _react2.default.PropTypes.func,
triggerOnPlayingUpdate: _react2.default.PropTypes.bool,
videoTrack: _react2.default.PropTypes.object,
waitForVideoStarted: _react2.default.PropTypes.bool,
zOrder: _react2.default.PropTypes.number
};
exports.default = AbstractVideoTrack;
function _falsy2null(value) {
return value || null;
}
}, 579, null, "jitsi-meet/react/features/base/media/components/AbstractVideoTrack.js");
__d(/* jitsi-meet/react/features/base/tracks/index.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _actions = require(581 ); // 581 = ./actions
Object.keys(_actions).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _actions[key];
}
});
});
var _actionTypes = require(582 ); // 582 = ./actionTypes
Object.keys(_actionTypes).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _actionTypes[key];
}
});
});
var _functions = require(583 ); // 583 = ./functions
Object.keys(_functions).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _functions[key];
}
});
});
require(584 ); // 584 = ./middleware
require(585 ); // 585 = ./reducer
}, 580, null, "jitsi-meet/react/features/base/tracks/index.js");
__d(/* jitsi-meet/react/features/base/tracks/actions.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
exports.createInitialLocalTracks = createInitialLocalTracks;
exports.destroyLocalTracks = destroyLocalTracks;
exports.replaceLocalTrack = replaceLocalTrack;
exports.trackAdded = trackAdded;
exports.trackMutedChanged = trackMutedChanged;
exports.trackRemoved = trackRemoved;
exports.trackVideoStarted = trackVideoStarted;
exports.trackVideoTypeChanged = trackVideoTypeChanged;
exports._disposeAndRemoveTracks = _disposeAndRemoveTracks;
exports.setTrackMuted = setTrackMuted;
var _libJitsiMeet = require(434 ); // 434 = ../lib-jitsi-meet
var _media = require(567 ); // 567 = ../media
var _participants = require(540 ); // 540 = ../participants
var _actionTypes = require(582 ); // 582 = ./actionTypes
var _functions = require(583 ); // 583 = ./functions
function createInitialLocalTracks() {
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
return function (dispatch, getState) {
var devices = options.devices || [_media.MEDIA_TYPE.AUDIO, _media.MEDIA_TYPE.VIDEO];
var store = {
dispatch: dispatch,
getState: getState
};
for (var _iterator = devices, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[typeof Symbol === 'function' ? Symbol.iterator : '@@iterator']();;) {
var _ref;
if (_isArray) {
if (_i >= _iterator.length) break;
_ref = _iterator[_i++];
} else {
_i = _iterator.next();
if (_i.done) break;
_ref = _i.value;
}
var device = _ref;
(0, _functions.createLocalTracks)({
cameraDeviceId: options.cameraDeviceId,
devices: [device],
facingMode: options.facingMode || _media.CAMERA_FACING_MODE.USER,
micDeviceId: options.micDeviceId
}, false, store).then(function (localTracks) {
return dispatch(_updateLocalTracks(localTracks));
});
}
};
}
function destroyLocalTracks() {
return function (dispatch, getState) {
return dispatch(_disposeAndRemoveTracks(getState()['features/base/tracks'].filter(function (t) {
return t.local;
}).map(function (t) {
return t.jitsiTrack;
})));
};
}
function replaceLocalTrack(oldTrack, newTrack, conference) {
return function (dispatch, getState) {
var currentConference = conference || getState()['features/base/conference'].conference;
return currentConference.replaceTrack(oldTrack, newTrack).then(function () {
var disposePromise = oldTrack ? dispatch(_disposeAndRemoveTracks([oldTrack])) : Promise.resolve();
return disposePromise.then(function () {
if (newTrack) {
var muteAction = newTrack.isVideoTrack() ? _media.setVideoMuted : _media.setAudioMuted;
return dispatch(muteAction(newTrack.isMuted()));
}
}).then(function () {
if (newTrack) {
return dispatch(_addTracks([newTrack]));
}
});
});
};
}
function trackAdded(track) {
return function (dispatch, getState) {
track.on(_libJitsiMeet.JitsiTrackEvents.TRACK_MUTE_CHANGED, function () {
return dispatch(trackMutedChanged(track));
});
track.on(_libJitsiMeet.JitsiTrackEvents.TRACK_VIDEOTYPE_CHANGED, function (type) {
return dispatch(trackVideoTypeChanged(track, type));
});
var local = track.isLocal();
var participantId = void 0;
if (local) {
var participant = (0, _participants.getLocalParticipant)(getState);
if (participant) {
participantId = participant.id;
}
} else {
participantId = track.getParticipantId();
}
return dispatch({
type: _actionTypes.TRACK_ADDED,
track: {
jitsiTrack: track,
local: local,
mediaType: track.getType(),
mirror: _shouldMirror(track),
muted: track.isMuted(),
participantId: participantId,
videoStarted: false,
videoType: track.videoType
}
});
};
}
function trackMutedChanged(track) {
return {
type: _actionTypes.TRACK_UPDATED,
track: {
jitsiTrack: track,
muted: track.isMuted()
}
};
}
function trackRemoved(track) {
track.removeAllListeners(_libJitsiMeet.JitsiTrackEvents.TRACK_MUTE_CHANGED);
track.removeAllListeners(_libJitsiMeet.JitsiTrackEvents.TRACK_VIDEOTYPE_CHANGED);
return {
type: _actionTypes.TRACK_REMOVED,
track: {
jitsiTrack: track
}
};
}
function trackVideoStarted(track) {
return {
type: _actionTypes.TRACK_UPDATED,
track: {
jitsiTrack: track,
videoStarted: true
}
};
}
function trackVideoTypeChanged(track, videoType) {
return {
type: _actionTypes.TRACK_UPDATED,
track: {
jitsiTrack: track,
videoType: videoType
}
};
}
function _addTracks(tracks) {
return function (dispatch) {
return Promise.all(tracks.map(function (t) {
return dispatch(trackAdded(t));
}));
};
}
function _disposeAndRemoveTracks(tracks) {
return function (dispatch) {
return Promise.all(tracks.map(function (t) {
return t.dispose().catch(function (err) {
if (err.name !== _libJitsiMeet.JitsiTrackErrors.TRACK_IS_DISPOSED) {
throw err;
}
});
})).then(Promise.all(tracks.map(function (t) {
return dispatch(trackRemoved(t));
})));
};
}
function _getLocalTrack(tracks, mediaType) {
return tracks.find(function (track) {
return track.isLocal() && track.getType() === mediaType;
});
}
function _getLocalTracksToChange(currentTracks, newTracks) {
var tracksToAdd = [];
var tracksToRemove = [];
var _arr = [_media.MEDIA_TYPE.AUDIO, _media.MEDIA_TYPE.VIDEO];
for (var _i2 = 0; _i2 < _arr.length; _i2++) {
var mediaType = _arr[_i2];
var newTrack = _getLocalTrack(newTracks, mediaType);
if (newTrack) {
var currentTrack = _getLocalTrack(currentTracks, mediaType);
tracksToAdd.push(newTrack);
currentTrack && tracksToRemove.push(currentTrack);
}
}
return {
tracksToAdd: tracksToAdd,
tracksToRemove: tracksToRemove
};
}
function setTrackMuted(track, muted) {
return function (dispatch) {
if (track.isMuted() === muted) {
return Promise.resolve();
}
var f = muted ? 'mute' : 'unmute';
return track[f]().catch(function (error) {
console.error('set track ' + f + ' failed', error);
var setMuted = track.mediaType === _media.MEDIA_TYPE.AUDIO ? _media.setAudioMuted : _media.setVideoMuted;
dispatch(setMuted(!muted));
});
};
}
function _shouldMirror(track) {
return track && track.isLocal() && track.isVideoTrack() && track.getCameraFacingMode() === _media.CAMERA_FACING_MODE.USER;
}
function _updateLocalTracks() {
var newTracks = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
return function (dispatch, getState) {
var tracks = getState()['features/base/tracks'].map(function (t) {
return t.jitsiTrack;
});
var _getLocalTracksToChan = _getLocalTracksToChange(tracks, newTracks),
tracksToAdd = _getLocalTracksToChan.tracksToAdd,
tracksToRemove = _getLocalTracksToChan.tracksToRemove;
return dispatch(_disposeAndRemoveTracks(tracksToRemove)).then(function () {
return dispatch(_addTracks(tracksToAdd));
});
};
}
}, 581, null, "jitsi-meet/react/features/base/tracks/actions.js");
__d(/* jitsi-meet/react/features/base/tracks/actionTypes.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var TRACK_ADDED = exports.TRACK_ADDED = Symbol('TRACK_ADDED');
var TRACK_REMOVED = exports.TRACK_REMOVED = Symbol('TRACK_REMOVED');
var TRACK_UPDATED = exports.TRACK_UPDATED = Symbol('TRACK_UPDATED');
}, 582, null, "jitsi-meet/react/features/base/tracks/actionTypes.js");
__d(/* jitsi-meet/react/features/base/tracks/functions.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
exports.createLocalTracks = createLocalTracks;
exports.getLocalAudioTrack = getLocalAudioTrack;
exports.getLocalTrack = getLocalTrack;
exports.getLocalVideoTrack = getLocalVideoTrack;
exports.getTrackByMediaTypeAndParticipant = getTrackByMediaTypeAndParticipant;
exports.getTrackByJitsiTrack = getTrackByJitsiTrack;
exports.getTracksByMediaType = getTracksByMediaType;
var _libJitsiMeet = require(434 ); // 434 = ../lib-jitsi-meet
var _libJitsiMeet2 = babelHelpers.interopRequireDefault(_libJitsiMeet);
var _media = require(567 ); // 567 = ../media
var logger = require(464 ).getLogger(__filename); // 464 = jitsi-meet-logger
function createLocalTracks(options, firePermissionPromptIsShownEvent, store) {
options || (options = {});var _options = options,
cameraDeviceId = _options.cameraDeviceId,
micDeviceId = _options.micDeviceId;
if (typeof APP !== 'undefined') {
if (typeof cameraDeviceId === 'undefined' || cameraDeviceId === null) {
cameraDeviceId = APP.settings.getCameraDeviceId();
}
if (typeof micDeviceId === 'undefined' || micDeviceId === null) {
micDeviceId = APP.settings.getMicDeviceId();
}
store || (store = APP.store);
}
var _store$getState$featu = store.getState()['features/base/config'],
firefox_fake_device = _store$getState$featu.firefox_fake_device,
resolution = _store$getState$featu.resolution;
return _libJitsiMeet2.default.createLocalTracks({
cameraDeviceId: cameraDeviceId,
desktopSharingExtensionExternalInstallation: options.desktopSharingExtensionExternalInstallation,
desktopSharingSources: options.desktopSharingSources,
devices: options.devices.slice(0),
firefox_fake_device: firefox_fake_device,
micDeviceId: micDeviceId,
resolution: resolution
}, firePermissionPromptIsShownEvent).then(function (tracks) {
if (typeof APP !== 'undefined') {
tracks.forEach(function (track) {
return track.on(_libJitsiMeet.JitsiTrackEvents.NO_DATA_FROM_SOURCE, APP.UI.showTrackNotWorkingDialog.bind(null, track));
});
}
return tracks;
}).catch(function (err) {
logger.error('Failed to create local tracks', options.devices, err);
return Promise.reject(err);
});
}
function getLocalAudioTrack(tracks) {
return getLocalTrack(tracks, _media.MEDIA_TYPE.AUDIO);
}
function getLocalTrack(tracks, mediaType) {
return tracks.find(function (t) {
return t.local && t.mediaType === mediaType;
});
}
function getLocalVideoTrack(tracks) {
return getLocalTrack(tracks, _media.MEDIA_TYPE.VIDEO);
}
function getTrackByMediaTypeAndParticipant(tracks, mediaType, participantId) {
return tracks.find(function (t) {
return t.participantId === participantId && t.mediaType === mediaType;
});
}
function getTrackByJitsiTrack(tracks, jitsiTrack) {
return tracks.find(function (t) {
return t.jitsiTrack === jitsiTrack;
});
}
function getTracksByMediaType(tracks, mediaType) {
return tracks.filter(function (t) {
return t.mediaType === mediaType;
});
}
}, 583, null, "jitsi-meet/react/features/base/tracks/functions.js");
__d(/* jitsi-meet/react/features/base/tracks/middleware.js */function(global, require, module, exports) {var _media = require(567 ); // 567 = ../media
var _redux = require(505 ); // 505 = ../redux
var _actions = require(581 ); // 581 = ./actions
var _actionTypes = require(582 ); // 582 = ./actionTypes
var _functions = require(583 ); // 583 = ./functions
_redux.MiddlewareRegistry.register(function (store) {
return function (next) {
return function (action) {
switch (action.type) {
case _media.SET_AUDIO_MUTED:
_setMuted(store, action, _media.MEDIA_TYPE.AUDIO);
break;
case _media.SET_CAMERA_FACING_MODE:
{
var localTrack = _getLocalTrack(store, _media.MEDIA_TYPE.VIDEO);
var jitsiTrack = void 0;
if (localTrack && (jitsiTrack = localTrack.jitsiTrack) && jitsiTrack.getCameraFacingMode() !== action.cameraFacingMode) {
store.dispatch((0, _media.toggleCameraFacingMode)());
}
break;
}
case _media.SET_VIDEO_MUTED:
_setMuted(store, action, _media.MEDIA_TYPE.VIDEO);
break;
case _media.TOGGLE_CAMERA_FACING_MODE:
{
var _localTrack = _getLocalTrack(store, _media.MEDIA_TYPE.VIDEO);
var _jitsiTrack = void 0;
if (_localTrack && (_jitsiTrack = _localTrack.jitsiTrack)) {
_jitsiTrack._switchCamera();
var mirror = _jitsiTrack.getCameraFacingMode() === _media.CAMERA_FACING_MODE.USER;
store.dispatch({
type: _actionTypes.TRACK_UPDATED,
track: {
jitsiTrack: _jitsiTrack,
mirror: mirror
}
});
}
break;
}
case _actionTypes.TRACK_ADDED:
if (typeof APP !== 'undefined' && !action.track.local) {
APP.UI.addRemoteStream(action.track.jitsiTrack);
}
break;
case _actionTypes.TRACK_REMOVED:
if (typeof APP !== 'undefined' && !action.track.local) {
APP.UI.removeRemoteStream(action.track.jitsiTrack);
}
break;
case _actionTypes.TRACK_UPDATED:
if (typeof APP !== 'undefined') {
var _jitsiTrack2 = action.track.jitsiTrack;
var isMuted = _jitsiTrack2.isMuted();
var participantID = _jitsiTrack2.getParticipantId();
var isVideoTrack = _jitsiTrack2.isVideoTrack();
if (_jitsiTrack2.isLocal()) {
if (isVideoTrack) {
APP.conference.videoMuted = isMuted;
} else {
APP.conference.audioMuted = isMuted;
}
}
if (isVideoTrack) {
APP.UI.setVideoMuted(participantID, isMuted);
APP.UI.onPeerVideoTypeChanged(participantID, _jitsiTrack2.videoType);
} else {
APP.UI.setAudioMuted(participantID, isMuted);
}
}
return _trackUpdated(store, next, action);
}
return next(action);
};
};
});
function _getLocalTrack(store, mediaType) {
return (0, _functions.getLocalTrack)(store.getState()['features/base/tracks'], mediaType);
}
function _setMuted(store, _ref, mediaType) {
var muted = _ref.muted;
var localTrack = _getLocalTrack(store, mediaType);
localTrack && store.dispatch((0, _actions.setTrackMuted)(localTrack.jitsiTrack, muted));
}
function _trackUpdated(store, next, action) {
var track = action.track;
var mediaType = void 0;
var oldMuted = void 0;
if ('muted' in track) {
mediaType = track.jitsiTrack.getType();
var localTrack = _getLocalTrack(store, mediaType);
if (localTrack) {
oldMuted = localTrack.muted;
}
}
var result = next(action);
if (typeof oldMuted !== 'undefined') {
var _localTrack2 = _getLocalTrack(store, mediaType);
if (_localTrack2) {
var newMuted = _localTrack2.muted;
if (oldMuted !== newMuted) {
switch (mediaType) {
case _media.MEDIA_TYPE.AUDIO:
store.dispatch((0, _media.setAudioMuted)(newMuted));
break;
case _media.MEDIA_TYPE.VIDEO:
store.dispatch((0, _media.setVideoMuted)(newMuted));
break;
}
}
}
}
return result;
}
}, 584, null, "jitsi-meet/react/features/base/tracks/middleware.js");
__d(/* jitsi-meet/react/features/base/tracks/reducer.js */function(global, require, module, exports) {var _participants = require(540 ); // 540 = ../participants
var _redux = require(505 ); // 505 = ../redux
var _actionTypes = require(582 ); // 582 = ./actionTypes
function track(state, action) {
switch (action.type) {
case _participants.PARTICIPANT_ID_CHANGED:
if (state.participantId === action.oldValue) {
return babelHelpers.extends({}, state, {
participantId: action.newValue
});
}
break;
case _actionTypes.TRACK_UPDATED:
{
var t = action.track;
if (state.jitsiTrack === t.jitsiTrack) {
for (var p in t) {
if (state[p] !== t[p]) {
return babelHelpers.extends({}, state, t);
}
}
}
break;
}
}
return state;
}
_redux.ReducerRegistry.register('features/base/tracks', function () {
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
var action = arguments[1];
switch (action.type) {
case _participants.PARTICIPANT_ID_CHANGED:
case _actionTypes.TRACK_UPDATED:
return state.map(function (t) {
return track(t, action);
});
case _actionTypes.TRACK_ADDED:
return [].concat(babelHelpers.toConsumableArray(state), [action.track]);
case _actionTypes.TRACK_REMOVED:
return state.filter(function (t) {
return t.jitsiTrack !== action.track.jitsiTrack;
});
default:
return state;
}
});
}, 585, null, "jitsi-meet/react/features/base/tracks/reducer.js");
__d(/* jitsi-meet/react/features/base/media/functions.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
exports.shouldRenderVideoTrack = shouldRenderVideoTrack;
function shouldRenderVideoTrack(videoTrack, waitForVideoStarted) {
return videoTrack && !videoTrack.muted && (!waitForVideoStarted || videoTrack.videoStarted);
}
}, 586, null, "jitsi-meet/react/features/base/media/functions.js");
__d(/* jitsi-meet/react/features/base/media/middleware.js */function(global, require, module, exports) {var _conference = require(432 ); // 432 = ../conference
var _config = require(496 ); // 496 = ../config
var _redux = require(505 ); // 505 = ../redux
var _tracks = require(580 ); // 580 = ../tracks
var _actions = require(568 ); // 568 = ./actions
var _constants = require(570 ); // 570 = ./constants
_redux.MiddlewareRegistry.register(function (store) {
return function (next) {
return function (action) {
switch (action.type) {
case _conference.SET_ROOM:
return _setRoom(store, next, action);
case _tracks.TRACK_ADDED:
{
var result = next(action);
action.track.local && _syncTrackMutedState(store, action.track);
return result;
}
}
return next(action);
};
};
});
function _setRoom(_ref, next, action) {
var dispatch = _ref.dispatch,
getState = _ref.getState;
var state = getState();
var audioMuted = void 0;
var videoMuted = void 0;
if (action.room) {
var urlParams = (0, _config.parseURLParams)(state['features/base/connection'].locationURL);
audioMuted = urlParams['config.startWithAudioMuted'];
videoMuted = urlParams['config.startWithVideoMuted'];
}
var config = state['features/base/config'];
typeof audioMuted === 'undefined' && (audioMuted = config.startWithAudioMuted);
typeof videoMuted === 'undefined' && (videoMuted = config.startWithVideoMuted);
var _state$featuresBase = state['features/base/media'],
audio = _state$featuresBase.audio,
video = _state$featuresBase.video;
audioMuted = Boolean(audioMuted);
videoMuted = Boolean(videoMuted);
audio.muted !== audioMuted && dispatch((0, _actions.setAudioMuted)(audioMuted));
video.facingMode !== _constants.CAMERA_FACING_MODE.USER && dispatch((0, _actions.setCameraFacingMode)(_constants.CAMERA_FACING_MODE.USER));
video.muted !== videoMuted && dispatch((0, _actions.setVideoMuted)(videoMuted));
return next(action);
}
function _syncTrackMutedState(_ref2, track) {
var dispatch = _ref2.dispatch,
getState = _ref2.getState;
var state = getState()['features/base/media'];
var muted = state[track.mediaType].muted;
if (track.muted !== muted) {
track.muted = muted;
dispatch((0, _tracks.setTrackMuted)(track.jitsiTrack, muted));
}
}
}, 587, null, "jitsi-meet/react/features/base/media/middleware.js");
__d(/* jitsi-meet/react/features/base/media/reducer.js */function(global, require, module, exports) {var _redux = require(508 ); // 508 = redux
var _redux2 = require(505 ); // 505 = ../redux
var _actionTypes = require(569 ); // 569 = ./actionTypes
var _constants = require(570 ); // 570 = ./constants
var AUDIO_INITIAL_MEDIA_STATE = {
available: true,
muted: false
};
function _audio() {
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : AUDIO_INITIAL_MEDIA_STATE;
var action = arguments[1];
switch (action.type) {
case _actionTypes.SET_AUDIO_AVAILABLE:
return babelHelpers.extends({}, state, {
available: action.available
});
case _actionTypes.SET_AUDIO_MUTED:
return babelHelpers.extends({}, state, {
muted: action.muted
});
default:
return state;
}
}
var VIDEO_INITIAL_MEDIA_STATE = {
available: true,
facingMode: _constants.CAMERA_FACING_MODE.USER,
muted: false
};
function _video() {
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : VIDEO_INITIAL_MEDIA_STATE;
var action = arguments[1];
switch (action.type) {
case _actionTypes.SET_CAMERA_FACING_MODE:
return babelHelpers.extends({}, state, {
facingMode: action.cameraFacingMode
});
case _actionTypes.SET_VIDEO_AVAILABLE:
return babelHelpers.extends({}, state, {
available: action.available
});
case _actionTypes.SET_VIDEO_MUTED:
return babelHelpers.extends({}, state, {
muted: action.muted
});
case _actionTypes.TOGGLE_CAMERA_FACING_MODE:
{
var cameraFacingMode = state.facingMode;
cameraFacingMode = cameraFacingMode === _constants.CAMERA_FACING_MODE.USER ? _constants.CAMERA_FACING_MODE.ENVIRONMENT : _constants.CAMERA_FACING_MODE.USER;
return babelHelpers.extends({}, state, {
facingMode: cameraFacingMode
});
}
default:
return state;
}
}
_redux2.ReducerRegistry.register('features/base/media', (0, _redux.combineReducers)({
audio: _audio,
video: _video
}));
}, 588, null, "jitsi-meet/react/features/base/media/reducer.js");
__d(/* jitsi-meet/react/features/base/react/index.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _components = require(590 ); // 590 = ./components
Object.keys(_components).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _components[key];
}
});
});
var _functions = require(597 ); // 597 = ./functions
Object.keys(_functions).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _functions[key];
}
});
});
var _Platform = require(598 ); // 598 = ./Platform
Object.defineProperty(exports, 'Platform', {
enumerable: true,
get: function get() {
return babelHelpers.interopRequireDefault(_Platform).default;
}
});
var _RouteRegistry = require(599 ); // 599 = ./RouteRegistry
Object.defineProperty(exports, 'RouteRegistry', {
enumerable: true,
get: function get() {
return babelHelpers.interopRequireDefault(_RouteRegistry).default;
}
});
}, 589, null, "jitsi-meet/react/features/base/react/index.js");
__d(/* jitsi-meet/react/features/base/react/components/index.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _ = require(591 ); // 591 = ./_
Object.keys(_).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _[key];
}
});
});
}, 590, null, "jitsi-meet/react/features/base/react/components/index.js");
__d(/* jitsi-meet/react/features/base/react/components/_.native.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _native = require(592 ); // 592 = ./native
Object.keys(_native).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _native[key];
}
});
});
}, 591, null, "jitsi-meet/react/features/base/react/components/_.native.js");
__d(/* jitsi-meet/react/features/base/react/components/native/index.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _Container = require(593 ); // 593 = ./Container
Object.defineProperty(exports, 'Container', {
enumerable: true,
get: function get() {
return babelHelpers.interopRequireDefault(_Container).default;
}
});
var _Link = require(595 ); // 595 = ./Link
Object.defineProperty(exports, 'Link', {
enumerable: true,
get: function get() {
return babelHelpers.interopRequireDefault(_Link).default;
}
});
var _Text = require(596 ); // 596 = ./Text
Object.defineProperty(exports, 'Text', {
enumerable: true,
get: function get() {
return babelHelpers.interopRequireDefault(_Text).default;
}
});
}, 592, null, "jitsi-meet/react/features/base/react/components/native/index.js");
__d(/* jitsi-meet/react/features/base/react/components/native/Container.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _react = require(34 ); // 34 = react
var _react2 = babelHelpers.interopRequireDefault(_react);
var _reactNative = require(69 ); // 69 = react-native
var _ = require(589 ); // 589 = ../../
var _AbstractContainer2 = require(594 ); // 594 = ../AbstractContainer
var _AbstractContainer3 = babelHelpers.interopRequireDefault(_AbstractContainer2);
var Container = function (_AbstractContainer) {
babelHelpers.inherits(Container, _AbstractContainer);
function Container() {
babelHelpers.classCallCheck(this, Container);
return babelHelpers.possibleConstructorReturn(this, (Container.__proto__ || Object.getPrototypeOf(Container)).apply(this, arguments));
}
babelHelpers.createClass(Container, [{
key: 'render',
value: function render() {
var _props = this.props,
onClick = _props.onClick,
_props$touchFeedback = _props.touchFeedback,
touchFeedback = _props$touchFeedback === undefined ? onClick : _props$touchFeedback,
_props$visible = _props.visible,
visible = _props$visible === undefined ? true : _props$visible,
props = babelHelpers.objectWithoutProperties(_props, ['onClick', 'touchFeedback', 'visible']);
if (!visible) {
if (_.Platform.OS === 'android') {
return null;
}
props.style = babelHelpers.extends({}, props.style, {
height: 0,
width: 0
});
}
var element = babelHelpers.get(Container.prototype.__proto__ || Object.getPrototypeOf(Container.prototype), '_render', this).call(this, _reactNative.View, props);
if (visible && (onClick || touchFeedback)) {
element = _react2.default.createElement(touchFeedback ? _reactNative.TouchableHighlight : _reactNative.TouchableWithoutFeedback, { onPress: onClick }, element);
}
return element;
}
}]);
return Container;
}(_AbstractContainer3.default);
Container.propTypes = _AbstractContainer3.default.propTypes;
exports.default = Container;
}, 593, null, "jitsi-meet/react/features/base/react/components/native/Container.js");
__d(/* jitsi-meet/react/features/base/react/components/AbstractContainer.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _react = require(34 ); // 34 = react
var _react2 = babelHelpers.interopRequireDefault(_react);
var AbstractContainer = function (_Component) {
babelHelpers.inherits(AbstractContainer, _Component);
function AbstractContainer() {
babelHelpers.classCallCheck(this, AbstractContainer);
return babelHelpers.possibleConstructorReturn(this, (AbstractContainer.__proto__ || Object.getPrototypeOf(AbstractContainer)).apply(this, arguments));
}
babelHelpers.createClass(AbstractContainer, [{
key: '_render',
value: function _render(type, props) {
var _ref = props || this.props,
children = _ref.children,
touchFeedback = _ref.touchFeedback,
visible = _ref.visible,
filteredProps = babelHelpers.objectWithoutProperties(_ref, ['children', 'touchFeedback', 'visible']);
return _react2.default.createElement(type, filteredProps, children);
}
}]);
return AbstractContainer;
}(_react.Component);
AbstractContainer.propTypes = {
children: _react2.default.PropTypes.node,
onClick: _react2.default.PropTypes.func,
style: _react2.default.PropTypes.object,
touchFeedback: _react2.default.PropTypes.bool,
visible: _react2.default.PropTypes.bool
};
exports.default = AbstractContainer;
}, 594, null, "jitsi-meet/react/features/base/react/components/AbstractContainer.js");
__d(/* jitsi-meet/react/features/base/react/components/native/Link.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/react/features/base/react/components/native/Link.js';
var _react = require(34 ); // 34 = react
var _react2 = babelHelpers.interopRequireDefault(_react);
var _reactNative = require(69 ); // 69 = react-native
var _Text = require(596 ); // 596 = ./Text
var _Text2 = babelHelpers.interopRequireDefault(_Text);
var Link = function (_Component) {
babelHelpers.inherits(Link, _Component);
function Link(props) {
babelHelpers.classCallCheck(this, Link);
var _this = babelHelpers.possibleConstructorReturn(this, (Link.__proto__ || Object.getPrototypeOf(Link)).call(this, props));
_this._onPress = _this._onPress.bind(_this);
return _this;
}
babelHelpers.createClass(Link, [{
key: 'render',
value: function render() {
return _react2.default.createElement(
_Text2.default,
{
onPress: this._onPress,
style: this.props.style, __source: {
fileName: _jsxFileName,
lineNumber: 58
}
},
this.props.children
);
}
}, {
key: '_onLinkingOpenURLRejected',
value: function _onLinkingOpenURLRejected(reason) {
var onRejected = this.props.onLinkingOpenURLRejected;
onRejected && onRejected(reason);
}
}, {
key: '_onPress',
value: function _onPress() {
var _this2 = this;
_reactNative.Linking.openURL(this.props.url).catch(function (reason) {
return _this2._onLinkingOpenURLRejected(reason);
});
}
}]);
return Link;
}(_react.Component);
Link.propTypes = {
children: _react2.default.PropTypes.node,
onLinkingOpenURLRejected: _react2.default.PropTypes.func,
style: _react2.default.PropTypes.object,
url: _react2.default.PropTypes.string
};
exports.default = Link;
}, 595, null, "jitsi-meet/react/features/base/react/components/native/Link.js");
__d(/* jitsi-meet/react/features/base/react/components/native/Text.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _reactNative = require(69 ); // 69 = react-native
Object.defineProperty(exports, 'default', {
enumerable: true,
get: function get() {
return _reactNative.Text;
}
});
}, 596, null, "jitsi-meet/react/features/base/react/components/native/Text.js");
__d(/* jitsi-meet/react/features/base/react/functions.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
exports.stopEventPropagation = stopEventPropagation;
function stopEventPropagation(eventHandler) {
return function (ev) {
var r = eventHandler(ev);
if (ev && ev.stopPropagation) {
ev.stopPropagation();
ev.preventDefault && ev.preventDefault();
}
return r;
};
}
}, 597, null, "jitsi-meet/react/features/base/react/functions.js");
__d(/* jitsi-meet/react/features/base/react/Platform.native.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _reactNative = require(69 ); // 69 = react-native
exports.default = _reactNative.Platform;
}, 598, null, "jitsi-meet/react/features/base/react/Platform.native.js");
__d(/* jitsi-meet/react/features/base/react/RouteRegistry.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _react = require(34 ); // 34 = react
var RouteRegistry = function () {
function RouteRegistry() {
babelHelpers.classCallCheck(this, RouteRegistry);
this._elements = [];
}
babelHelpers.createClass(RouteRegistry, [{
key: 'areRoutesEqual',
value: function areRoutesEqual(a, b) {
if (a === b) {
return true;
}
if (!a) {
return !b;
}
if (!b) {
return !a;
}
var aKeys = Object.keys(a);
var bKeys = Object.keys(b);
return aKeys.length === bKeys.length && aKeys.every(function (key) {
return a[key] === b[key];
});
}
}, {
key: 'getRoutes',
value: function getRoutes() {
return this._elements.map(function (r) {
return babelHelpers.extends({}, r);
});
}
}, {
key: 'getRouteByComponent',
value: function getRouteByComponent(component) {
var route = this._elements.find(function (r) {
return r.component === component;
});
return route ? babelHelpers.extends({}, route) : null;
}
}, {
key: 'register',
value: function register(route) {
if (this._elements.includes(route)) {
throw new Error('Route ' + String(route.component) + ' is registered already!');
}
this._elements.push(route);
}
}]);
return RouteRegistry;
}();
exports.default = new RouteRegistry();
}, 599, null, "jitsi-meet/react/features/base/react/RouteRegistry.js");
__d(/* jitsi-meet/react/features/base/participants/components/styles.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _styles = require(601 ); // 601 = ../../styles
exports.default = (0, _styles.createStyleSheet)({
participantView: {
alignItems: 'stretch',
flex: 1,
justifyContent: 'center'
}
});
}, 600, null, "jitsi-meet/react/features/base/participants/components/styles.js");
__d(/* jitsi-meet/react/features/base/styles/index.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _components = require(602 ); // 602 = ./components
Object.keys(_components).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _components[key];
}
});
});
var _functions = require(606 ); // 606 = ./functions
Object.keys(_functions).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _functions[key];
}
});
});
}, 601, null, "jitsi-meet/react/features/base/styles/index.js");
__d(/* jitsi-meet/react/features/base/styles/components/index.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _styles = require(603 ); // 603 = ./styles
Object.keys(_styles).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _styles[key];
}
});
});
}, 602, null, "jitsi-meet/react/features/base/styles/components/index.js");
__d(/* jitsi-meet/react/features/base/styles/components/styles/index.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _BoxModel = require(604 ); // 604 = ./BoxModel
Object.keys(_BoxModel).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _BoxModel[key];
}
});
});
var _ColorPalette = require(605 ); // 605 = ./ColorPalette
Object.keys(_ColorPalette).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _ColorPalette[key];
}
});
});
}, 603, null, "jitsi-meet/react/features/base/styles/components/styles/index.js");
__d(/* jitsi-meet/react/features/base/styles/components/styles/BoxModel.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var BoxModel = exports.BoxModel = {
margin: 10,
padding: 10
};
}, 604, null, "jitsi-meet/react/features/base/styles/components/styles/BoxModel.js");
__d(/* jitsi-meet/react/features/base/styles/components/styles/ColorPalette.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var BLACK = '#111111';
var ColorPalette = exports.ColorPalette = {
appBackground: BLACK,
black: BLACK,
blue: '#17A0DB',
buttonUnderlay: '#495258',
darkGrey: '#555555',
red: '#D00000',
white: 'white'
};
}, 605, null, "jitsi-meet/react/features/base/styles/components/styles/ColorPalette.js");
__d(/* jitsi-meet/react/features/base/styles/functions.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
exports.createStyleSheet = createStyleSheet;
exports.fixAndroidViewClipping = fixAndroidViewClipping;
var _react = require(589 ); // 589 = ../react
var _components = require(602 ); // 602 = ./components
var _WELL_KNOWN_NUMBER_PROPERTIES = ['height', 'width'];
function createStyleSheet(styles) {
var overrides = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var combinedStyles = {};
for (var _iterator = Object.keys(styles), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[typeof Symbol === 'function' ? Symbol.iterator : '@@iterator']();;) {
var _ref;
if (_isArray) {
if (_i >= _iterator.length) break;
_ref = _iterator[_i++];
} else {
_i = _iterator.next();
if (_i.done) break;
_ref = _i.value;
}
var k = _ref;
combinedStyles[k] = _shimStyles(babelHelpers.extends({}, styles[k], overrides[k]));
}
return combinedStyles;
}
function fixAndroidViewClipping(styles) {
if (_react.Platform.OS === 'android') {
styles.borderColor = _components.ColorPalette.appBackground;
styles.borderWidth = 1;
}
return styles;
}
function _shimStyles(styles) {
for (var _iterator2 = _WELL_KNOWN_NUMBER_PROPERTIES, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[typeof Symbol === 'function' ? Symbol.iterator : '@@iterator']();;) {
var _ref2;
if (_isArray2) {
if (_i2 >= _iterator2.length) break;
_ref2 = _iterator2[_i2++];
} else {
_i2 = _iterator2.next();
if (_i2.done) break;
_ref2 = _i2.value;
}
var k = _ref2;
var v = styles[k];
var typeofV = typeof v;
if (typeofV !== 'undefined' && typeofV !== 'number') {
var numberV = Number(v);
if (Number.isNaN(numberV)) {
delete styles[k];
} else {
styles[k] = numberV;
}
}
}
return styles;
}
}, 606, null, "jitsi-meet/react/features/base/styles/functions.js");
__d(/* jitsi-meet/react/features/base/participants/middleware.js */function(global, require, module, exports) {var _UIEvents = require(608 ); // 608 = ../../../../service/UI/UIEvents
var _UIEvents2 = babelHelpers.interopRequireDefault(_UIEvents);
var _conference = require(432 ); // 432 = ../conference
var _redux = require(505 ); // 505 = ../redux
var _actions = require(541 ); // 541 = ./actions
var _actionTypes = require(542 ); // 542 = ./actionTypes
var _constants = require(543 ); // 543 = ./constants
var _functions = require(544 ); // 544 = ./functions
_redux.MiddlewareRegistry.register(function (store) {
return function (next) {
return function (action) {
switch (action.type) {
case _conference.CONFERENCE_JOINED:
store.dispatch((0, _actions.localParticipantIdChanged)(action.conference.myUserId()));
break;
case _conference.CONFERENCE_LEFT:
store.dispatch((0, _actions.localParticipantIdChanged)(_constants.LOCAL_PARTICIPANT_DEFAULT_ID));
break;
case _actionTypes.PARTICIPANT_DISPLAY_NAME_CHANGED:
{
if (typeof APP !== 'undefined') {
var participant = (0, _functions.getLocalParticipant)(store.getState());
if (participant && participant.id === action.id) {
APP.UI.emitEvent(_UIEvents2.default.NICKNAME_CHANGED, action.name);
}
}
break;
}
}
return next(action);
};
};
});
}, 607, null, "jitsi-meet/react/features/base/participants/middleware.js");
__d(/* jitsi-meet/service/UI/UIEvents.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = {
NICKNAME_CHANGED: "UI.nickname_changed",
SELECTED_ENDPOINT: "UI.selected_endpoint",
PINNED_ENDPOINT: "UI.pinned_endpoint",
MESSAGE_CREATED: "UI.message_created",
LANG_CHANGED: "UI.lang_changed",
EMAIL_CHANGED: "UI.email_changed",
START_MUTED_CHANGED: "UI.start_muted_changed",
AUDIO_MUTED: "UI.audio_muted",
VIDEO_MUTED: "UI.video_muted",
VIDEO_UNMUTING_WHILE_AUDIO_ONLY: "UI.video_unmuting_while_audio_only",
ETHERPAD_CLICKED: "UI.etherpad_clicked",
SHARED_VIDEO_CLICKED: "UI.start_shared_video",
UPDATE_SHARED_VIDEO: "UI.update_shared_video",
USER_KICKED: "UI.user_kicked",
REMOTE_AUDIO_MUTED: "UI.remote_audio_muted",
TOGGLE_FULLSCREEN: "UI.toogle_fullscreen",
FULLSCREEN_TOGGLED: "UI.fullscreen_toggled",
AUTH_CLICKED: "UI.auth_clicked",
TOGGLE_AUDIO_ONLY: "UI.toggle_audioonly",
TOGGLE_CHAT: "UI.toggle_chat",
TOGGLE_SETTINGS: "UI.toggle_settings",
TOGGLE_CONTACT_LIST: "UI.toggle_contact_list",
TOGGLE_PROFILE: "UI.toggle_profile",
TOGGLE_FILMSTRIP: "UI.toggle_filmstrip",
TOGGLED_FILMSTRIP: "UI.toggled_filmstrip",
UPDATED_FILMSTRIP_DISPLAY: "UI.updated_filmstrip_display",
TOGGLE_SCREENSHARING: "UI.toggle_screensharing",
TOGGLED_SHARED_DOCUMENT: "UI.toggled_shared_document",
CONTACT_CLICKED: "UI.contact_clicked",
HANGUP: "UI.hangup",
LOGOUT: "UI.logout",
RECORDING_TOGGLED: "UI.recording_toggled",
SUBJECT_CHANGED: "UI.subject_changed",
VIDEO_DEVICE_CHANGED: "UI.video_device_changed",
AUDIO_DEVICE_CHANGED: "UI.audio_device_changed",
AUDIO_OUTPUT_DEVICE_CHANGED: "UI.audio_output_device_changed",
FOLLOW_ME_ENABLED: "UI.follow_me_enabled",
LOCAL_FLIPX_CHANGED: "UI.local_flipx_changed",
RESOLUTION_CHANGED: "UI.resolution_changed",
EXTERNAL_INSTALLATION_CANCELED: "UI.external_installation_canceled",
SIDE_TOOLBAR_CONTAINER_TOGGLED: "UI.side_container_toggled",
LOCAL_RAISE_HAND_CHANGED: "UI.local_raise_hand_changed",
LARGE_VIDEO_AVATAR_VISIBLE: "UI.large_video_avatar_visible",
LARGE_VIDEO_ID_CHANGED: "UI.large_video_id_changed",
TOGGLE_ROOM_LOCK: "UI.toggle_room_lock",
CONTACT_ADDED: "UI.contact_added",
CONTACT_REMOVED: "UI.contact_removed",
USER_AVATAR_CHANGED: "UI.user_avatar_changed",
DISPLAY_NAME_CHANGED: "UI.display_name_changed",
SHOW_CUSTOM_TOOLBAR_BUTTON_POPUP: "UI.show_custom_toolbar_button_popup"
};
}, 608, null, "jitsi-meet/service/UI/UIEvents.js");
__d(/* jitsi-meet/react/features/base/participants/reducer.js */function(global, require, module, exports) {var _redux = require(505 ); // 505 = ../redux
var _util = require(529 ); // 529 = ../util
var _actionTypes = require(542 ); // 542 = ./actionTypes
var _constants = require(543 ); // 543 = ./constants
var PARTICIPANT_PROPS_TO_OMIT_WHEN_UPDATE = ['dominantSpeaker', 'id', 'local', 'pinned'];
function _participant(state, action) {
switch (action.type) {
case _actionTypes.DOMINANT_SPEAKER_CHANGED:
return (0, _redux.set)(state, 'dominantSpeaker', state.id === action.participant.id);
case _actionTypes.PARTICIPANT_ID_CHANGED:
if (state.id === action.oldValue) {
return babelHelpers.extends({}, state, {
id: action.newValue
});
}
break;
case _actionTypes.PARTICIPANT_JOINED:
{
var participant = action.participant;var avatarURL = participant.avatarURL,
connectionStatus = participant.connectionStatus,
dominantSpeaker = participant.dominantSpeaker,
email = participant.email,
local = participant.local,
pinned = participant.pinned,
role = participant.role;
var avatarID = participant.avatarID,
id = participant.id,
name = participant.name;
if (!avatarID && local) {
avatarID = (0, _util.randomHexString)(32);
}
if (!id && local) {
id = _constants.LOCAL_PARTICIPANT_DEFAULT_ID;
}
if (!name) {
name = local ? 'me' : 'Fellow Jitster';
}
return {
avatarID: avatarID,
avatarURL: avatarURL,
connectionStatus: connectionStatus,
dominantSpeaker: dominantSpeaker || false,
email: email,
id: id,
local: local || false,
name: name,
pinned: pinned || false,
role: role || _constants.PARTICIPANT_ROLE.NONE
};
}
case _actionTypes.PARTICIPANT_UPDATED:
{
var _participant2 = action.participant;var _local = _participant2.local;
var _id = _participant2.id;
if (!_id && _local) {
_id = _constants.LOCAL_PARTICIPANT_DEFAULT_ID;
}
if (state.id === _id) {
var newState = babelHelpers.extends({}, state);
for (var key in _participant2) {
if (_participant2.hasOwnProperty(key) && PARTICIPANT_PROPS_TO_OMIT_WHEN_UPDATE.indexOf(key) === -1) {
newState[key] = _participant2[key];
}
}
return newState;
}
break;
}
case _actionTypes.PIN_PARTICIPANT:
return (0, _redux.set)(state, 'pinned', state.id === action.participant.id);
}
return state;
}
_redux.ReducerRegistry.register('features/base/participants', function () {
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
var action = arguments[1];
switch (action.type) {
case _actionTypes.PARTICIPANT_JOINED:
return [].concat(babelHelpers.toConsumableArray(state), [_participant(undefined, action)]);
case _actionTypes.PARTICIPANT_LEFT:
return state.filter(function (p) {
return p.id !== action.participant.id;
});
case _actionTypes.DOMINANT_SPEAKER_CHANGED:
case _actionTypes.PARTICIPANT_ID_CHANGED:
case _actionTypes.PARTICIPANT_UPDATED:
case _actionTypes.PIN_PARTICIPANT:
return state.map(function (p) {
return _participant(p, action);
});
default:
return state;
}
});
}, 609, null, "jitsi-meet/react/features/base/participants/reducer.js");
__d(/* jitsi-meet/react/features/base/lib-jitsi-meet/reducer.js */function(global, require, module, exports) {var _redux = require(505 ); // 505 = ../redux
var _actionTypes = require(493 ); // 493 = ./actionTypes
var INITIAL_STATE = {};
_redux.ReducerRegistry.register('features/base/lib-jitsi-meet', function () {
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : INITIAL_STATE;
var action = arguments[1];
switch (action.type) {
case _actionTypes.LIB_DID_DISPOSE:
return INITIAL_STATE;
case _actionTypes.LIB_DID_INIT:
return babelHelpers.extends({}, state, {
initError: undefined,
initialized: true
});
case _actionTypes.LIB_INIT_ERROR:
return babelHelpers.extends({}, state, {
initError: action.error,
initialized: false
});
case _actionTypes.SET_WEBRTC_READY:
return babelHelpers.extends({}, state, {
webRTCReady: action.webRTCReady
});
default:
return state;
}
});
}, 610, null, "jitsi-meet/react/features/base/lib-jitsi-meet/reducer.js");
__d(/* jitsi-meet/react/features/base/conference/actionTypes.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var CONFERENCE_FAILED = exports.CONFERENCE_FAILED = Symbol('CONFERENCE_FAILED');
var CONFERENCE_JOINED = exports.CONFERENCE_JOINED = Symbol('CONFERENCE_JOINED');
var CONFERENCE_LEFT = exports.CONFERENCE_LEFT = Symbol('CONFERENCE_LEFT');
var CONFERENCE_WILL_JOIN = exports.CONFERENCE_WILL_JOIN = Symbol('CONFERENCE_WILL_JOIN');
var CONFERENCE_WILL_LEAVE = exports.CONFERENCE_WILL_LEAVE = Symbol('CONFERENCE_WILL_LEAVE');
var LOCK_STATE_CHANGED = exports.LOCK_STATE_CHANGED = Symbol('LOCK_STATE_CHANGED');
var SET_AUDIO_ONLY = exports.SET_AUDIO_ONLY = Symbol('SET_AUDIO_ONLY');
var _SET_AUDIO_ONLY_VIDEO_MUTED = exports._SET_AUDIO_ONLY_VIDEO_MUTED = Symbol('_SET_AUDIO_ONLY_VIDEO_MUTED');
var SET_LARGE_VIDEO_HD_STATUS = exports.SET_LARGE_VIDEO_HD_STATUS = Symbol('SET_LARGE_VIDEO_HD_STATUS');
var SET_LASTN = exports.SET_LASTN = Symbol('SET_LASTN');
var SET_PASSWORD = exports.SET_PASSWORD = Symbol('SET_PASSWORD');
var SET_PASSWORD_FAILED = exports.SET_PASSWORD_FAILED = Symbol('SET_PASSWORD_FAILED');
var SET_ROOM = exports.SET_ROOM = Symbol('SET_ROOM');
}, 611, null, "jitsi-meet/react/features/base/conference/actionTypes.js");
__d(/* jitsi-meet/react/features/base/conference/constants.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var AVATAR_ID_COMMAND = exports.AVATAR_ID_COMMAND = 'avatar-id';
var AVATAR_URL_COMMAND = exports.AVATAR_URL_COMMAND = 'avatar-url';
var EMAIL_COMMAND = exports.EMAIL_COMMAND = 'email';
var JITSI_CONFERENCE_URL_KEY = exports.JITSI_CONFERENCE_URL_KEY = Symbol('url');
}, 612, null, "jitsi-meet/react/features/base/conference/constants.js");
__d(/* jitsi-meet/react/features/base/conference/functions.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
exports._addLocalTracksToConference = _addLocalTracksToConference;
exports._handleParticipantError = _handleParticipantError;
exports.isRoomValid = isRoomValid;
exports._removeLocalTracksFromConference = _removeLocalTracksFromConference;
var _libJitsiMeet = require(434 ); // 434 = ../lib-jitsi-meet
function _addLocalTracksToConference(conference, localTracks) {
var conferenceLocalTracks = conference.getLocalTracks();
var promises = [];
for (var _iterator = localTracks, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[typeof Symbol === 'function' ? Symbol.iterator : '@@iterator']();;) {
var _ref;
if (_isArray) {
if (_i >= _iterator.length) break;
_ref = _iterator[_i++];
} else {
_i = _iterator.next();
if (_i.done) break;
_ref = _i.value;
}
var track = _ref;
if (conferenceLocalTracks.indexOf(track) === -1) {
promises.push(conference.addTrack(track).catch(function (err) {
_reportError('Failed to add local track to conference', err);
}));
}
}
return Promise.all(promises);
}
function _handleParticipantError(err) {
if (err.message !== 'Data channels support is disabled!') {
throw err;
}
}
function isRoomValid(room) {
return typeof room === 'string' && room !== '';
}
function _removeLocalTracksFromConference(conference, localTracks) {
return Promise.all(localTracks.map(function (track) {
return conference.removeTrack(track).catch(function (err) {
if (err.name !== _libJitsiMeet.JitsiTrackErrors.TRACK_IS_DISPOSED) {
_reportError('Failed to remove local track from conference', err);
}
});
}));
}
function _reportError(msg, err) {
console.error(msg, err);
}
}, 613, null, "jitsi-meet/react/features/base/conference/functions.js");
__d(/* jitsi-meet/react/features/base/conference/middleware.js */function(global, require, module, exports) {var _UIEvents = require(608 ); // 608 = ../../../../service/UI/UIEvents
var _UIEvents2 = babelHelpers.interopRequireDefault(_UIEvents);
var _connection = require(615 ); // 615 = ../connection
var _participants = require(540 ); // 540 = ../participants
var _redux = require(505 ); // 505 = ../redux
var _tracks = require(580 ); // 580 = ../tracks
var _actions = require(433 ); // 433 = ./actions
var _actionTypes = require(611 ); // 611 = ./actionTypes
var _functions = require(613 ); // 613 = ./functions
_redux.MiddlewareRegistry.register(function (store) {
return function (next) {
return function (action) {
switch (action.type) {
case _connection.CONNECTION_ESTABLISHED:
return _connectionEstablished(store, next, action);
case _actionTypes.CONFERENCE_JOINED:
return _conferenceJoined(store, next, action);
case _participants.PIN_PARTICIPANT:
return _pinParticipant(store, next, action);
case _actionTypes.SET_AUDIO_ONLY:
return _setAudioOnly(store, next, action);
case _actionTypes.SET_LASTN:
return _setLastN(store, next, action);
case _tracks.TRACK_ADDED:
case _tracks.TRACK_REMOVED:
return _trackAddedOrRemoved(store, next, action);
}
return next(action);
};
};
});
function _connectionEstablished(store, next, action) {
var result = next(action);
if (typeof APP === 'undefined') {
store.dispatch((0, _actions.createConference)());
}
return result;
}
function _conferenceJoined(store, next, action) {
var result = next(action);
var _store$getState$featu = store.getState()['features/base/conference'],
audioOnly = _store$getState$featu.audioOnly,
conference = _store$getState$featu.conference;
if (audioOnly && conference.getLastN() !== 0) {
store.dispatch((0, _actions.setLastN)(0));
}
return result;
}
function _pinParticipant(store, next, action) {
var state = store.getState();
var participants = state['features/base/participants'];
var id = action.participant.id;
var participantById = (0, _participants.getParticipantById)(participants, id);
var pin = void 0;
if (participantById) {
pin = !participantById.local;
} else {
var localParticipant = (0, _participants.getLocalParticipant)(participants);
pin = !localParticipant || !localParticipant.pinned;
}
if (pin) {
var conference = state['features/base/conference'].conference;
try {
conference.pinParticipant(id);
} catch (err) {
(0, _functions._handleParticipantError)(err);
}
}
return next(action);
}
function _setAudioOnly(store, next, action) {
var result = next(action);
var audioOnly = action.audioOnly;
store.dispatch((0, _actions.setLastN)(audioOnly ? 0 : undefined));
store.dispatch((0, _actions._setAudioOnlyVideoMuted)(audioOnly));
if (typeof APP !== 'undefined') {
APP.UI.emitEvent(_UIEvents2.default.TOGGLE_AUDIO_ONLY, audioOnly);
}
return result;
}
function _setLastN(store, next, action) {
var conference = store.getState()['features/base/conference'].conference;
if (conference) {
try {
conference.setLastN(action.lastN);
} catch (err) {
console.error('Failed to set lastN: ' + err);
}
}
return next(action);
}
function _syncConferenceLocalTracksWithState(store, action) {
var state = store.getState()['features/base/conference'];
var conference = state.conference;
var promise = void 0;
if (conference && conference !== state.leaving) {
var track = action.track.jitsiTrack;
if (action.type === _tracks.TRACK_ADDED) {
promise = (0, _functions._addLocalTracksToConference)(conference, [track]);
} else {
promise = (0, _functions._removeLocalTracksFromConference)(conference, [track]);
}
}
return promise || Promise.resolve();
}
function _trackAddedOrRemoved(store, next, action) {
var track = action.track;
if (track && track.local) {
return _syncConferenceLocalTracksWithState(store, action).then(function () {
return next(action);
});
}
return next(action);
}
}, 614, null, "jitsi-meet/react/features/base/conference/middleware.js");
__d(/* jitsi-meet/react/features/base/connection/index.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _actions = require(616 ); // 616 = ./actions
Object.keys(_actions).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _actions[key];
}
});
});
var _actionTypes = require(617 ); // 617 = ./actionTypes
Object.keys(_actionTypes).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _actionTypes[key];
}
});
});
var _functions = require(618 ); // 618 = ./functions
Object.keys(_functions).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _functions[key];
}
});
});
require(619 ); // 619 = ./reducer
}, 615, null, "jitsi-meet/react/features/base/connection/index.js");
__d(/* jitsi-meet/react/features/base/connection/actions.native.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
exports.connect = connect;
exports.connectionEstablished = connectionEstablished;
exports.connectionFailed = connectionFailed;
exports.disconnect = disconnect;
exports.setLocationURL = setLocationURL;
var _lodash = require(502 ); // 502 = lodash
var _lodash2 = babelHelpers.interopRequireDefault(_lodash);
var _conference = require(432 ); // 432 = ../conference
var _libJitsiMeet = require(434 ); // 434 = ../lib-jitsi-meet
var _libJitsiMeet2 = babelHelpers.interopRequireDefault(_libJitsiMeet);
var _util = require(529 ); // 529 = ../util
var _actionTypes = require(617 ); // 617 = ./actionTypes
function connect() {
return function (dispatch, getState) {
var state = getState();
var options = _constructOptions(state);
var _state$featuresJwt = state['features/jwt'],
issuer = _state$featuresJwt.issuer,
jwt = _state$featuresJwt.jwt;
var connection = new _libJitsiMeet2.default.JitsiConnection(options.appId, jwt && issuer && issuer !== 'anonymous' ? jwt : undefined, options);
dispatch(_connectionWillConnect(connection));
connection.addEventListener(_libJitsiMeet.JitsiConnectionEvents.CONNECTION_DISCONNECTED, _onConnectionDisconnected);
connection.addEventListener(_libJitsiMeet.JitsiConnectionEvents.CONNECTION_ESTABLISHED, _onConnectionEstablished);
connection.addEventListener(_libJitsiMeet.JitsiConnectionEvents.CONNECTION_FAILED, _onConnectionFailed);
connection.connect();
function _onConnectionDisconnected(message) {
connection.removeEventListener(_libJitsiMeet.JitsiConnectionEvents.CONNECTION_DISCONNECTED, _onConnectionDisconnected);
dispatch(_connectionDisconnected(connection, message));
}
function _onConnectionEstablished() {
unsubscribe();
dispatch(connectionEstablished(connection));
}
function _onConnectionFailed(err) {
unsubscribe();
console.error('CONNECTION FAILED:', err);
dispatch(connectionFailed(connection, err));
}
function unsubscribe() {
connection.removeEventListener(_libJitsiMeet.JitsiConnectionEvents.CONNECTION_ESTABLISHED, _onConnectionEstablished);
connection.removeEventListener(_libJitsiMeet.JitsiConnectionEvents.CONNECTION_FAILED, _onConnectionFailed);
}
};
}
function _connectionDisconnected(connection, message) {
return {
type: _actionTypes.CONNECTION_DISCONNECTED,
connection: connection,
message: message
};
}
function _connectionWillConnect(connection) {
return {
type: _actionTypes.CONNECTION_WILL_CONNECT,
connection: connection
};
}
function connectionEstablished(connection) {
return {
type: _actionTypes.CONNECTION_ESTABLISHED,
connection: connection
};
}
function connectionFailed(connection, error, message) {
return {
type: _actionTypes.CONNECTION_FAILED,
connection: connection,
error: error,
message: message
};
}
function _constructOptions(state) {
var defaultOptions = state['features/base/connection'].options;
var options = _lodash2.default.merge({}, defaultOptions, state['features/base/config']);
var bosh = options.bosh;
if (bosh) {
var room = state['features/base/conference'].room;
room && (bosh += '?room=' + room.toLowerCase());
if (bosh !== defaultOptions.bosh && !(0, _util.parseStandardURIString)(bosh).protocol) {
var _parseStandardURIStri = (0, _util.parseStandardURIString)(defaultOptions.bosh),
protocol = _parseStandardURIStri.protocol;
protocol && (bosh = protocol + bosh);
}
options.bosh = bosh;
}
return options;
}
function disconnect() {
return function (dispatch, getState) {
var state = getState();
var _state$featuresBase = state['features/base/conference'],
conference = _state$featuresBase.conference,
joining = _state$featuresBase.joining;
var conference_ = conference || joining;
var promise = void 0;
if (conference_) {
dispatch((0, _conference.conferenceWillLeave)(conference_));
promise = conference_.leave();
} else {
promise = Promise.resolve();
}
var _state$featuresBase2 = state['features/base/connection'],
connecting = _state$featuresBase2.connecting,
connection = _state$featuresBase2.connection;
var connection_ = connection || connecting;
if (connection_) {
promise = promise.then(function () {
return connection_.disconnect();
});
}
return promise;
};
}
function setLocationURL(locationURL) {
return {
type: _actionTypes.SET_LOCATION_URL,
locationURL: locationURL
};
}
}, 616, null, "jitsi-meet/react/features/base/connection/actions.native.js");
__d(/* jitsi-meet/react/features/base/connection/actionTypes.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var CONNECTION_DISCONNECTED = exports.CONNECTION_DISCONNECTED = Symbol('CONNECTION_DISCONNECTED');
var CONNECTION_ESTABLISHED = exports.CONNECTION_ESTABLISHED = Symbol('CONNECTION_ESTABLISHED');
var CONNECTION_FAILED = exports.CONNECTION_FAILED = Symbol('CONNECTION_FAILED');
var CONNECTION_WILL_CONNECT = exports.CONNECTION_WILL_CONNECT = Symbol('CONNECTION_WILL_CONNECT');
var SET_LOCATION_URL = exports.SET_LOCATION_URL = Symbol('SET_LOCATION_URL');
}, 617, null, "jitsi-meet/react/features/base/connection/actionTypes.js");
__d(/* jitsi-meet/react/features/base/connection/functions.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getInviteURL = getInviteURL;
exports.getURLWithoutParams = getURLWithoutParams;
function getInviteURL(stateOrGetState) {
var state = typeof stateOrGetState === 'function' ? stateOrGetState() : stateOrGetState;
var locationURL = state instanceof URL ? state : state['features/base/connection'].locationURL;
var inviteURL = void 0;
if (locationURL) {
inviteURL = getURLWithoutParams(locationURL).href;
}
return inviteURL;
}
function getURLWithoutParams(url) {
var _url = url,
hash = _url.hash,
search = _url.search;
if (hash && hash.length > 1 || search && search.length > 1) {
url = new URL(url.href);
url.hash = '';
url.search = '';
var _url2 = url,
href = _url2.href;
if (href) {
href.endsWith('#') && (href = href.substring(0, href.length - 1));
href.endsWith('?') && (href = href.substring(0, href.length - 1));
url.href === href || (url = new URL(href));
}
}
return url;
}
}, 618, null, "jitsi-meet/react/features/base/connection/functions.js");
__d(/* jitsi-meet/react/features/base/connection/reducer.js */function(global, require, module, exports) {var _redux = require(505 ); // 505 = ../redux
var _util = require(529 ); // 529 = ../util
var _actionTypes = require(617 ); // 617 = ./actionTypes
_redux.ReducerRegistry.register('features/base/connection', function () {
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var action = arguments[1];
switch (action.type) {
case _actionTypes.CONNECTION_DISCONNECTED:
return _connectionDisconnected(state, action);
case _actionTypes.CONNECTION_ESTABLISHED:
return _connectionEstablished(state, action);
case _actionTypes.CONNECTION_FAILED:
return _connectionFailed(state, action);
case _actionTypes.CONNECTION_WILL_CONNECT:
return _connectionWillConnect(state, action);
case _actionTypes.SET_LOCATION_URL:
return _setLocationURL(state, action);
}
return state;
});
function _connectionDisconnected(state, _ref) {
var connection = _ref.connection;
if (state.connection !== connection) {
return state;
}
return (0, _redux.assign)(state, {
connecting: undefined,
connection: undefined
});
}
function _connectionEstablished(state, _ref2) {
var connection = _ref2.connection;
return (0, _redux.assign)(state, {
connecting: undefined,
connection: connection
});
}
function _connectionFailed(state, _ref3) {
var connection = _ref3.connection;
if (state.connection && state.connection !== connection) {
return state;
}
return (0, _redux.assign)(state, {
connecting: undefined,
connection: undefined
});
}
function _connectionWillConnect(state, _ref4) {
var connection = _ref4.connection;
return (0, _redux.set)(state, 'connecting', connection);
}
function _constructOptions(locationURL) {
var locationURI = (0, _util.parseURIString)(locationURL.href);
var protocol = locationURI.protocol;
var domain = locationURI.hostname;
if (!protocol && domain === 'beta.meet.jit.si') {
var windowLocation = window.location;
windowLocation && (protocol = windowLocation.protocol);
protocol || (protocol = 'http:');
}
protocol || (protocol = 'https:');
return {
bosh: String(protocol) + '//' + domain + (locationURI.contextRoot || '/') + 'http-bind',
hosts: {
domain: domain,
muc: 'conference.' + domain
}
};
}
function _setLocationURL(state, _ref5) {
var locationURL = _ref5.locationURL;
return (0, _redux.assign)(state, {
locationURL: locationURL,
options: locationURL ? _constructOptions(locationURL) : undefined
});
}
}, 619, null, "jitsi-meet/react/features/base/connection/reducer.js");
__d(/* jitsi-meet/react/features/base/conference/reducer.js */function(global, require, module, exports) {var _roomLock = require(621 ); // 621 = ../../room-lock
var _libJitsiMeet = require(434 ); // 434 = ../lib-jitsi-meet
var _redux = require(505 ); // 505 = ../redux
var _actionTypes = require(611 ); // 611 = ./actionTypes
var _functions = require(613 ); // 613 = ./functions
_redux.ReducerRegistry.register('features/base/conference', function () {
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var action = arguments[1];
switch (action.type) {
case _actionTypes.CONFERENCE_FAILED:
return _conferenceFailed(state, action);
case _actionTypes.CONFERENCE_JOINED:
return _conferenceJoined(state, action);
case _actionTypes.CONFERENCE_LEFT:
return _conferenceLeft(state, action);
case _actionTypes.CONFERENCE_WILL_JOIN:
return _conferenceWillJoin(state, action);
case _actionTypes.CONFERENCE_WILL_LEAVE:
return _conferenceWillLeave(state, action);
case _actionTypes.LOCK_STATE_CHANGED:
return _lockStateChanged(state, action);
case _actionTypes.SET_AUDIO_ONLY:
return _setAudioOnly(state, action);
case _actionTypes._SET_AUDIO_ONLY_VIDEO_MUTED:
return _setAudioOnlyVideoMuted(state, action);
case _actionTypes.SET_LARGE_VIDEO_HD_STATUS:
return _setLargeVideoHDStatus(state, action);
case _actionTypes.SET_PASSWORD:
return _setPassword(state, action);
case _actionTypes.SET_ROOM:
return _setRoom(state, action);
}
return state;
});
function _conferenceFailed(state, _ref) {
var conference = _ref.conference,
error = _ref.error;
if (state.conference && state.conference !== conference) {
return state;
}
var passwordRequired = _libJitsiMeet.JitsiConferenceErrors.PASSWORD_REQUIRED === error ? conference : undefined;
return (0, _redux.assign)(state, {
audioOnly: undefined,
audioOnlyVideoMuted: undefined,
conference: undefined,
joining: undefined,
leaving: undefined,
locked: passwordRequired ? _roomLock.LOCKED_REMOTELY : undefined,
password: undefined,
passwordRequired: passwordRequired
});
}
function _conferenceJoined(state, _ref2) {
var conference = _ref2.conference;
var locked = conference.room.locked ? _roomLock.LOCKED_REMOTELY : undefined;
return (0, _redux.assign)(state, {
conference: conference,
joining: undefined,
leaving: undefined,
locked: locked,
passwordRequired: undefined
});
}
function _conferenceLeft(state, _ref3) {
var conference = _ref3.conference;
if (state.conference !== conference) {
return state;
}
return (0, _redux.assign)(state, {
audioOnly: undefined,
audioOnlyVideoMuted: undefined,
conference: undefined,
joining: undefined,
leaving: undefined,
locked: undefined,
password: undefined,
passwordRequired: undefined
});
}
function _conferenceWillJoin(state, _ref4) {
var conference = _ref4.conference;
return (0, _redux.set)(state, 'joining', conference);
}
function _conferenceWillLeave(state, _ref5) {
var conference = _ref5.conference;
if (state.conference !== conference) {
return state;
}
return (0, _redux.assign)(state, {
joining: undefined,
leaving: conference,
passwordRequired: undefined
});
}
function _lockStateChanged(state, _ref6) {
var conference = _ref6.conference,
locked = _ref6.locked;
if (state.conference !== conference) {
return state;
}
return (0, _redux.assign)(state, {
locked: locked ? state.locked || _roomLock.LOCKED_REMOTELY : undefined,
password: locked ? state.password : undefined
});
}
function _setAudioOnly(state, action) {
return (0, _redux.set)(state, 'audioOnly', action.audioOnly);
}
function _setAudioOnlyVideoMuted(state, action) {
return (0, _redux.set)(state, 'audioOnlyVideoMuted', action.muted);
}
function _setLargeVideoHDStatus(state, action) {
return (0, _redux.set)(state, 'isLargeVideoHD', action.isLargeVideoHD);
}
function _setPassword(state, _ref7) {
var conference = _ref7.conference,
method = _ref7.method,
password = _ref7.password;
switch (method) {
case conference.join:
if (state.passwordRequired === conference) {
return (0, _redux.assign)(state, {
locked: _roomLock.LOCKED_REMOTELY,
password: password,
passwordRequired: undefined
});
}
break;
case conference.lock:
return (0, _redux.assign)(state, {
locked: password ? _roomLock.LOCKED_LOCALLY : undefined,
password: password
});
}
return state;
}
function _setRoom(state, action) {
var room = action.room;
if (!(0, _functions.isRoomValid)(room)) {
room = undefined;
}
return (0, _redux.set)(state, 'room', room);
}
}, 620, null, "jitsi-meet/react/features/base/conference/reducer.js");
__d(/* jitsi-meet/react/features/room-lock/index.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _actions = require(622 ); // 622 = ./actions
Object.keys(_actions).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _actions[key];
}
});
});
var _components = require(670 ); // 670 = ./components
Object.keys(_components).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _components[key];
}
});
});
var _constants = require(673 ); // 673 = ./constants
Object.keys(_constants).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _constants[key];
}
});
});
require(674 ); // 674 = ./middleware
}, 621, null, "jitsi-meet/react/features/room-lock/index.js");
__d(/* jitsi-meet/react/features/room-lock/actions.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
exports.beginRoomLockRequest = beginRoomLockRequest;
exports.endRoomLockRequest = endRoomLockRequest;
exports._showPasswordDialog = _showPasswordDialog;
var _conference = require(432 ); // 432 = ../base/conference
var _dialog = require(623 ); // 623 = ../base/dialog
var _components = require(670 ); // 670 = ./components
function beginRoomLockRequest(conference) {
return function (dispatch, getState) {
if (typeof conference === 'undefined') {
var state = getState();
conference = state['features/base/conference'].conference;
}
if (conference) {
dispatch((0, _dialog.openDialog)(_components.RoomLockPrompt, { conference: conference }));
}
};
}
function endRoomLockRequest(conference, password) {
return function (dispatch) {
var setPassword_ = password ? dispatch((0, _conference.setPassword)(conference, conference.lock, password)) : Promise.resolve();
var endRoomLockRequest_ = function endRoomLockRequest_() {
dispatch((0, _dialog.hideDialog)());
};
setPassword_.then(endRoomLockRequest_, endRoomLockRequest_);
};
}
function _showPasswordDialog(conference) {
return (0, _dialog.openDialog)(_components.PasswordRequiredPrompt, { conference: conference });
}
}, 622, null, "jitsi-meet/react/features/room-lock/actions.js");
__d(/* jitsi-meet/react/features/base/dialog/index.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _actions = require(624 ); // 624 = ./actions
Object.keys(_actions).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _actions[key];
}
});
});
var _actionTypes = require(625 ); // 625 = ./actionTypes
Object.keys(_actionTypes).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _actionTypes[key];
}
});
});
var _components = require(626 ); // 626 = ./components
Object.keys(_components).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _components[key];
}
});
});
require(669 ); // 669 = ./reducer
}, 623, null, "jitsi-meet/react/features/base/dialog/index.js");
__d(/* jitsi-meet/react/features/base/dialog/actions.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
exports.hideDialog = hideDialog;
exports.openDialog = openDialog;
exports.toggleDialog = toggleDialog;
var _actionTypes = require(625 ); // 625 = ./actionTypes
function hideDialog() {
return {
type: _actionTypes.HIDE_DIALOG
};
}
function openDialog(component, componentProps) {
return {
type: _actionTypes.OPEN_DIALOG,
component: component,
componentProps: componentProps
};
}
function toggleDialog(component, componentProps) {
return function (dispatch, getState) {
var state = getState();
var dialogState = state['features/base/dialog'];
if (dialogState.component === component) {
dispatch(hideDialog());
} else {
dispatch(openDialog(component, componentProps));
}
};
}
}, 624, null, "jitsi-meet/react/features/base/dialog/actions.js");
__d(/* jitsi-meet/react/features/base/dialog/actionTypes.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var HIDE_DIALOG = exports.HIDE_DIALOG = Symbol('HIDE_DIALOG');
var OPEN_DIALOG = exports.OPEN_DIALOG = Symbol('OPEN_DIALOG');
}, 625, null, "jitsi-meet/react/features/base/dialog/actionTypes.js");
__d(/* jitsi-meet/react/features/base/dialog/components/index.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _DialogContainer = require(627 ); // 627 = ./DialogContainer
Object.defineProperty(exports, 'DialogContainer', {
enumerable: true,
get: function get() {
return babelHelpers.interopRequireDefault(_DialogContainer).default;
}
});
var _Dialog = require(628 ); // 628 = ./Dialog
Object.defineProperty(exports, 'Dialog', {
enumerable: true,
get: function get() {
return babelHelpers.interopRequireDefault(_Dialog).default;
}
});
var _StatelessDialog = require(668 ); // 668 = ./StatelessDialog
Object.defineProperty(exports, 'StatelessDialog', {
enumerable: true,
get: function get() {
return babelHelpers.interopRequireDefault(_StatelessDialog).default;
}
});
}, 626, null, "jitsi-meet/react/features/base/dialog/components/index.js");
__d(/* jitsi-meet/react/features/base/dialog/components/DialogContainer.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
exports.DialogContainer = undefined;
var _react = require(34 ); // 34 = react
var _react2 = babelHelpers.interopRequireDefault(_react);
var _reactRedux = require(548 ); // 548 = react-redux
var DialogContainer = exports.DialogContainer = function (_Component) {
babelHelpers.inherits(DialogContainer, _Component);
function DialogContainer() {
babelHelpers.classCallCheck(this, DialogContainer);
return babelHelpers.possibleConstructorReturn(this, (DialogContainer.__proto__ || Object.getPrototypeOf(DialogContainer)).apply(this, arguments));
}
babelHelpers.createClass(DialogContainer, [{
key: 'render',
value: function render() {
if (!this.props._component) {
return null;
}
return _react2.default.createElement(this.props._component, this.props._componentProps);
}
}]);
return DialogContainer;
}(_react.Component);
DialogContainer.propTypes = {
_component: _react2.default.PropTypes.func,
_componentProps: _react2.default.PropTypes.object
};
function _mapStateToProps(state) {
return {
_component: state['features/base/dialog'].component,
_componentProps: state['features/base/dialog'].componentProps
};
}
exports.default = (0, _reactRedux.connect)(_mapStateToProps)(DialogContainer);
}, 627, null, "jitsi-meet/react/features/base/dialog/components/DialogContainer.js");
__d(/* jitsi-meet/react/features/base/dialog/components/Dialog.native.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/react/features/base/dialog/components/Dialog.native.js';
var _react = require(34 ); // 34 = react
var _react2 = babelHelpers.interopRequireDefault(_react);
var _reactNativePrompt = require(629 ); // 629 = react-native-prompt
var _reactNativePrompt2 = babelHelpers.interopRequireDefault(_reactNativePrompt);
var _reactRedux = require(548 ); // 548 = react-redux
var _i18n = require(632 ); // 632 = ../../i18n
var _AbstractDialog2 = require(666 ); // 666 = ./AbstractDialog
var _AbstractDialog3 = babelHelpers.interopRequireDefault(_AbstractDialog2);
var Dialog = function (_AbstractDialog) {
babelHelpers.inherits(Dialog, _AbstractDialog);
function Dialog() {
babelHelpers.classCallCheck(this, Dialog);
return babelHelpers.possibleConstructorReturn(this, (Dialog.__proto__ || Object.getPrototypeOf(Dialog)).apply(this, arguments));
}
babelHelpers.createClass(Dialog, [{
key: 'render',
value: function render() {
var _props = this.props,
cancelDisabled = _props.cancelDisabled,
cancelTitleKey = _props.cancelTitleKey,
bodyKey = _props.bodyKey,
okDisabled = _props.okDisabled,
okTitleKey = _props.okTitleKey,
t = _props.t,
titleKey = _props.titleKey;
return _react2.default.createElement(_reactNativePrompt2.default, {
cancelText: cancelDisabled ? undefined : t(cancelTitleKey || 'dialog.Cancel'),
onCancel: this._onCancel,
onSubmit: this._onSubmit,
placeholder: t(bodyKey),
submitText: okDisabled ? undefined : t(okTitleKey || 'dialog.Ok'),
title: t(titleKey),
visible: true, __source: {
fileName: _jsxFileName,
lineNumber: 44
}
});
}
}]);
return Dialog;
}(_AbstractDialog3.default);
Dialog.propTypes = {
bodyKey: _react2.default.PropTypes.string
};
exports.default = (0, _i18n.translate)((0, _reactRedux.connect)()(Dialog));
}, 628, null, "jitsi-meet/react/features/base/dialog/components/Dialog.native.js");
__d(/* react-native-prompt/src/index.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _Prompt = require(630 ); // 630 = ./Prompt
var _Prompt2 = babelHelpers.interopRequireDefault(_Prompt);
exports.default = _Prompt2.default;
}, 629, null, "react-native-prompt/src/index.js");
__d(/* react-native-prompt/src/Prompt.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/node_modules/react-native-prompt/src/Prompt.js';
var _react = require(34 ); // 34 = react
var _react2 = babelHelpers.interopRequireDefault(_react);
var _reactNative = require(69 ); // 69 = react-native
var _styles = require(631 ); // 631 = ./styles
var _styles2 = babelHelpers.interopRequireDefault(_styles);
var Prompt = function (_Component) {
babelHelpers.inherits(Prompt, _Component);
function Prompt() {
var _ref;
var _temp, _this, _ret;
babelHelpers.classCallCheck(this, Prompt);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = babelHelpers.possibleConstructorReturn(this, (_ref = Prompt.__proto__ || Object.getPrototypeOf(Prompt)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
value: '',
visible: false
}, _this._onChangeText = function (value) {
_this.setState({ value: value });
_this.props.onChangeText(value);
}, _this._onSubmitPress = function () {
var value = _this.state.value;
_this.props.onSubmit(value);
}, _this._onCancelPress = function () {
_this.props.onCancel();
}, _this.close = function () {
_this.setState({ visible: false });
}, _this._renderDialog = function () {
var _this$props = _this.props,
title = _this$props.title,
placeholder = _this$props.placeholder,
defaultValue = _this$props.defaultValue,
cancelText = _this$props.cancelText,
submitText = _this$props.submitText,
borderColor = _this$props.borderColor,
promptStyle = _this$props.promptStyle,
titleStyle = _this$props.titleStyle,
buttonStyle = _this$props.buttonStyle,
buttonTextStyle = _this$props.buttonTextStyle,
submitButtonStyle = _this$props.submitButtonStyle,
submitButtonTextStyle = _this$props.submitButtonTextStyle,
cancelButtonStyle = _this$props.cancelButtonStyle,
cancelButtonTextStyle = _this$props.cancelButtonTextStyle,
inputStyle = _this$props.inputStyle;
return _react2.default.createElement(
_reactNative.View,
{ style: _styles2.default.dialog, key: 'prompt', __source: {
fileName: _jsxFileName,
lineNumber: 105
}
},
_react2.default.createElement(_reactNative.View, { style: _styles2.default.dialogOverlay, __source: {
fileName: _jsxFileName,
lineNumber: 106
}
}),
_react2.default.createElement(
_reactNative.View,
{ style: [_styles2.default.dialogContent, { borderColor: borderColor }, promptStyle], __source: {
fileName: _jsxFileName,
lineNumber: 107
}
},
_react2.default.createElement(
_reactNative.View,
{ style: [_styles2.default.dialogTitle, { borderColor: borderColor }], __source: {
fileName: _jsxFileName,
lineNumber: 108
}
},
_react2.default.createElement(
_reactNative.Text,
{ style: [_styles2.default.dialogTitleText, titleStyle], __source: {
fileName: _jsxFileName,
lineNumber: 109
}
},
title
)
),
_react2.default.createElement(
_reactNative.View,
{ style: _styles2.default.dialogBody, __source: {
fileName: _jsxFileName,
lineNumber: 113
}
},
_react2.default.createElement(_reactNative.TextInput, babelHelpers.extends({
style: [_styles2.default.dialogInput, inputStyle],
defaultValue: defaultValue,
onChangeText: _this._onChangeText,
placeholder: placeholder,
autoFocus: true,
underlineColorAndroid: 'white'
}, _this.props.textInputProps, {
__source: {
fileName: _jsxFileName,
lineNumber: 114
}
}))
),
_react2.default.createElement(
_reactNative.View,
{ style: [_styles2.default.dialogFooter, { borderColor: borderColor }], __source: {
fileName: _jsxFileName,
lineNumber: 123
}
},
_react2.default.createElement(
_reactNative.TouchableWithoutFeedback,
{ onPress: _this._onCancelPress, __source: {
fileName: _jsxFileName,
lineNumber: 124
}
},
_react2.default.createElement(
_reactNative.View,
{ style: [_styles2.default.dialogAction, buttonStyle, cancelButtonStyle], __source: {
fileName: _jsxFileName,
lineNumber: 125
}
},
_react2.default.createElement(
_reactNative.Text,
{ style: [_styles2.default.dialogActionText, buttonTextStyle, cancelButtonTextStyle], __source: {
fileName: _jsxFileName,
lineNumber: 126
}
},
cancelText
)
)
),
_react2.default.createElement(
_reactNative.TouchableWithoutFeedback,
{ onPress: _this._onSubmitPress, __source: {
fileName: _jsxFileName,
lineNumber: 131
}
},
_react2.default.createElement(
_reactNative.View,
{ style: [_styles2.default.dialogAction, buttonStyle, submitButtonStyle], __source: {
fileName: _jsxFileName,
lineNumber: 132
}
},
_react2.default.createElement(
_reactNative.Text,
{ style: [_styles2.default.dialogActionText, buttonTextStyle, submitButtonTextStyle], __source: {
fileName: _jsxFileName,
lineNumber: 133
}
},
submitText
)
)
)
)
)
);
}, _temp), babelHelpers.possibleConstructorReturn(_this, _ret);
}
babelHelpers.createClass(Prompt, [{
key: 'componentDidMount',
value: function componentDidMount() {
this.setState({ value: this.props.defaultValue });
}
}, {
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(nextProps) {
var visible = nextProps.visible,
defaultValue = nextProps.defaultValue;
this.setState({ visible: visible, value: defaultValue });
}
}, {
key: 'render',
value: function render() {
var _this2 = this;
return _react2.default.createElement(
_reactNative.Modal,
{ onRequestClose: function onRequestClose() {
return _this2.close();
}, transparent: true, visible: this.props.visible, __source: {
fileName: _jsxFileName,
lineNumber: 146
}
},
this._renderDialog()
);
}
}]);
return Prompt;
}(_react.Component);
Prompt.propTypes = {
title: _react.PropTypes.string.isRequired,
visible: _react.PropTypes.bool,
defaultValue: _react.PropTypes.string,
placeholder: _react.PropTypes.string,
onCancel: _react.PropTypes.func.isRequired,
cancelText: _react.PropTypes.string,
onSubmit: _react.PropTypes.func.isRequired,
submitText: _react.PropTypes.string,
onChangeText: _react.PropTypes.func.isRequired,
borderColor: _react.PropTypes.string,
promptStyle: _react.PropTypes.object,
titleStyle: _react.PropTypes.object,
buttonStyle: _react.PropTypes.object,
buttonTextStyle: _react.PropTypes.object,
submitButtonStyle: _react.PropTypes.object,
submitButtonTextStyle: _react.PropTypes.object,
cancelButtonStyle: _react.PropTypes.object,
cancelButtonTextStyle: _react.PropTypes.object,
inputStyle: _react.PropTypes.object,
textInputProps: _react.PropTypes.object
};
Prompt.defaultProps = {
visible: false,
defaultValue: '',
cancelText: 'Cancel',
submitText: 'OK',
borderColor: '#ccc',
promptStyle: {},
titleStyle: {},
buttonStyle: {},
buttonTextStyle: {},
submitButtonStyle: {},
submitButtonTextStyle: {},
cancelButtonStyle: {},
cancelButtonTextStyle: {},
inputStyle: {},
onChangeText: function onChangeText() {}
};
exports.default = Prompt;
;
}, 630, null, "react-native-prompt/src/Prompt.js");
__d(/* react-native-prompt/src/styles.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _reactNative = require(69 ); // 69 = react-native
exports.default = _reactNative.StyleSheet.create({
dialog: {
flex: 1,
alignItems: 'center'
},
dialogOverlay: {
backgroundColor: 'rgba(0, 0, 0, 0.8)',
position: 'absolute',
top: 0,
bottom: 0,
left: 0,
right: 0
},
dialogContent: {
elevation: 5,
marginTop: 150,
width: 300,
backgroundColor: 'white',
borderRadius: 5,
borderWidth: 1,
overflow: 'hidden'
},
dialogTitle: {
borderBottomWidth: 1,
paddingVertical: 10,
paddingHorizontal: 15
},
dialogTitleText: {
fontSize: 18,
fontWeight: '600'
},
dialogBody: {
paddingHorizontal: 10
},
dialogInput: {
height: 50,
fontSize: 18
},
dialogFooter: {
borderTopWidth: 1,
flexDirection: 'row'
},
dialogAction: {
flex: 1,
padding: 15
},
dialogActionText: {
fontSize: 18,
textAlign: 'center',
color: '#006dbf'
}
});
}, 631, null, "react-native-prompt/src/styles.js");
__d(/* jitsi-meet/react/features/base/i18n/index.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
exports.LANGUAGES = exports.DEFAULT_LANGUAGE = exports.i18next = undefined;
var _functions = require(633 ); // 633 = ./functions
Object.keys(_functions).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _functions[key];
}
});
});
var _i18next = require(640 ); // 640 = ./i18next
Object.defineProperty(exports, 'i18next', {
enumerable: true,
get: function get() {
return babelHelpers.interopRequireDefault(_i18next).default;
}
});
Object.defineProperty(exports, 'DEFAULT_LANGUAGE', {
enumerable: true,
get: function get() {
return _i18next.DEFAULT_LANGUAGE;
}
});
Object.defineProperty(exports, 'LANGUAGES', {
enumerable: true,
get: function get() {
return _i18next.LANGUAGES;
}
});
require(665 ); // 665 = ./middleware
}, 632, null, "jitsi-meet/react/features/base/i18n/index.js");
__d(/* jitsi-meet/react/features/base/i18n/functions.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/react/features/base/i18n/functions.js';
exports.translate = translate;
exports.translateToHTML = translateToHTML;
var _react = require(34 ); // 34 = react
var _react2 = babelHelpers.interopRequireDefault(_react);
var _reactI18next = require(634 ); // 634 = react-i18next
function translate(component) {
return (0, _reactI18next.translate)(['main', 'languages'], { wait: true })(component);
}
function translateToHTML(t, key) {
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
return _react2.default.createElement('span', { dangerouslySetInnerHTML: { __html: t(key, options) }, __source: {
fileName: _jsxFileName,
lineNumber: 30
}
});
}
}, 633, null, "jitsi-meet/react/features/base/i18n/functions.js");
__d(/* react-i18next/dist/commonjs/index.js */function(global, require, module, exports) {'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.Trans = exports.I18nextProvider = exports.Interpolate = exports.translate = exports.loadNamespaces = undefined;
var _translate = require(635 ); // 635 = ./translate
var _translate2 = _interopRequireDefault(_translate);
var _interpolate = require(636 ); // 636 = ./interpolate
var _interpolate2 = _interopRequireDefault(_interpolate);
var _trans = require(637 ); // 637 = ./trans
var _trans2 = _interopRequireDefault(_trans);
var _I18nextProvider = require(638 ); // 638 = ./I18nextProvider
var _I18nextProvider2 = _interopRequireDefault(_I18nextProvider);
var _loadNamespaces = require(639 ); // 639 = ./loadNamespaces
var _loadNamespaces2 = _interopRequireDefault(_loadNamespaces);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
exports.loadNamespaces = _loadNamespaces2.default;
exports.translate = _translate2.default;
exports.Interpolate = _interpolate2.default;
exports.I18nextProvider = _I18nextProvider2.default;
exports.Trans = _trans2.default;
}, 634, null, "react-i18next/dist/commonjs/index.js");
__d(/* react-i18next/dist/commonjs/translate.js */function(global, require, module, exports) {'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends = Object.assign || function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}return target;
};
var _createClass = function () {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if ("value" in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor);
}
}return function (Constructor, protoProps, staticProps) {
if (protoProps) defineProperties(Constructor.prototype, protoProps);if (staticProps) defineProperties(Constructor, staticProps);return Constructor;
};
}();
exports.default = translate;
var _react = require(34 ); // 34 = react
var _react2 = _interopRequireDefault(_react);
var _propTypes = require(550 ); // 550 = prop-types
var _propTypes2 = _interopRequireDefault(_propTypes);
var _hoistNonReactStatics = require(555 ); // 555 = hoist-non-react-statics
var _hoistNonReactStatics2 = _interopRequireDefault(_hoistNonReactStatics);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
function _defineProperty(obj, key, value) {
if (key in obj) {
Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });
} else {
obj[key] = value;
}return obj;
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
function _possibleConstructorReturn(self, call) {
if (!self) {
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}return call && (typeof call === "object" || typeof call === "function") ? call : self;
}
function _inherits(subClass, superClass) {
if (typeof superClass !== "function" && superClass !== null) {
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
}subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
}
function getDisplayName(component) {
return component.displayName || component.name || 'Component';
}
var removedIsInitialSSR = false;
function translate(namespaces) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var _options$withRef = options.withRef,
withRef = _options$withRef === undefined ? false : _options$withRef,
_options$bindI18n = options.bindI18n,
bindI18n = _options$bindI18n === undefined ? 'languageChanged loaded' : _options$bindI18n,
_options$bindStore = options.bindStore,
bindStore = _options$bindStore === undefined ? 'added removed' : _options$bindStore,
_options$translateFun = options.translateFuncName,
translateFuncName = _options$translateFun === undefined ? 't' : _options$translateFun;
var _options$wait = options.wait,
wait = _options$wait === undefined ? false : _options$wait;
return function Wrapper(WrappedComponent) {
var _Translate$childConte;
var Translate = function (_Component) {
_inherits(Translate, _Component);
function Translate(props, context) {
_classCallCheck(this, Translate);
var _this = _possibleConstructorReturn(this, (Translate.__proto__ || Object.getPrototypeOf(Translate)).call(this, props, context));
_this.i18n = context.i18n || props.i18n || options.i18n;
namespaces = namespaces || _this.i18n.options.defaultNS;
if (typeof namespaces === 'string') namespaces = [namespaces];
if (!wait && _this.i18n.options && (_this.i18n.options.wait || _this.i18n.options.react && _this.i18n.options.react.wait)) wait = true;
_this.nsMode = options.nsMode || _this.i18n.options && _this.i18n.options.react && _this.i18n.options.react.nsMode || 'default';
if (props.initialI18nStore) {
_this.i18n.services.resourceStore.data = props.initialI18nStore;
wait = false;
}
if (props.initialLanguage) {
_this.i18n.changeLanguage(props.initialLanguage);
}
if (_this.i18n.options.isInitialSSR) {
wait = false;
}
_this.state = {
i18nLoadedAt: null,
ready: false
};
_this.onI18nChanged = _this.onI18nChanged.bind(_this);
_this.getWrappedInstance = _this.getWrappedInstance.bind(_this);
return _this;
}
_createClass(Translate, [{
key: 'getChildContext',
value: function getChildContext() {
var _ref;
return _ref = {}, _defineProperty(_ref, translateFuncName, this[translateFuncName]), _defineProperty(_ref, 'i18n', this.i18n), _ref;
}
}, {
key: 'componentWillMount',
value: function componentWillMount() {
this[translateFuncName] = this.i18n.getFixedT(null, this.nsMode === 'fallback' ? namespaces : namespaces[0]);
}
}, {
key: 'componentDidMount',
value: function componentDidMount() {
var _this2 = this;
var bind = function bind() {
if (bindI18n && _this2.i18n) _this2.i18n.on(bindI18n, _this2.onI18nChanged);
if (bindStore && _this2.i18n.store) _this2.i18n.store.on(bindStore, _this2.onI18nChanged);
};
this.mounted = true;
this.i18n.loadNamespaces(namespaces, function () {
var ready = function ready() {
if (_this2.mounted && !_this2.state.ready) _this2.setState({ ready: true });
if (wait && _this2.mounted) bind();
};
if (_this2.i18n.isInitialized) {
ready();
} else {
var initialized = function initialized() {
setTimeout(function () {
_this2.i18n.off('initialized', initialized);
}, 1000);
ready();
};
_this2.i18n.on('initialized', initialized);
}
});
if (!wait) bind();
}
}, {
key: 'componentWillUnmount',
value: function componentWillUnmount() {
var _this3 = this;
this.mounted = false;
if (this.onI18nChanged) {
if (bindI18n) {
var p = bindI18n.split(' ');
p.forEach(function (f) {
return _this3.i18n.off(f, _this3.onI18nChanged);
});
}
if (bindStore) {
var _p = bindStore.split(' ');
_p.forEach(function (f) {
return _this3.i18n.store && _this3.i18n.store.off(f, _this3.onI18nChanged);
});
}
}
}
}, {
key: 'onI18nChanged',
value: function onI18nChanged() {
if (!this.mounted) return;
this.setState({ i18nLoadedAt: new Date() });
}
}, {
key: 'getWrappedInstance',
value: function getWrappedInstance() {
if (!withRef) {
console.error('To access the wrapped instance, you need to specify ' + '{ withRef: true } as the second argument of the translate() call.');
}
return this.refs.wrappedInstance;
}
}, {
key: 'render',
value: function render() {
var _extraProps,
_this4 = this;
var _state = this.state,
i18nLoadedAt = _state.i18nLoadedAt,
ready = _state.ready;
var extraProps = (_extraProps = {
i18nLoadedAt: i18nLoadedAt
}, _defineProperty(_extraProps, translateFuncName, this[translateFuncName]), _defineProperty(_extraProps, 'i18n', this.i18n), _extraProps);
if (withRef) {
extraProps.ref = 'wrappedInstance';
}
if (!ready && wait) return null;
if (this.i18n.options.isInitialSSR && !removedIsInitialSSR) {
removedIsInitialSSR = true;
setTimeout(function () {
delete _this4.i18n.options.isInitialSSR;
}, 100);
}
return _react2.default.createElement(WrappedComponent, _extends({}, this.props, extraProps));
}
}]);
return Translate;
}(_react.Component);
Translate.WrappedComponent = WrappedComponent;
Translate.contextTypes = {
i18n: _propTypes2.default.object
};
Translate.childContextTypes = (_Translate$childConte = {}, _defineProperty(_Translate$childConte, translateFuncName, _propTypes2.default.func.isRequired), _defineProperty(_Translate$childConte, 'i18n', _propTypes2.default.object), _Translate$childConte);
Translate.displayName = 'Translate(' + getDisplayName(WrappedComponent) + ')';
Translate.namespaces = namespaces;
return (0, _hoistNonReactStatics2.default)(Translate, WrappedComponent);
};
}
}, 635, null, "react-i18next/dist/commonjs/translate.js");
__d(/* react-i18next/dist/commonjs/interpolate.js */function(global, require, module, exports) {'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends = Object.assign || function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}return target;
};
var _createClass = function () {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if ("value" in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor);
}
}return function (Constructor, protoProps, staticProps) {
if (protoProps) defineProperties(Constructor.prototype, protoProps);if (staticProps) defineProperties(Constructor, staticProps);return Constructor;
};
}();
var _react = require(34 ); // 34 = react
var _react2 = _interopRequireDefault(_react);
var _propTypes = require(550 ); // 550 = prop-types
var _propTypes2 = _interopRequireDefault(_propTypes);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
function _possibleConstructorReturn(self, call) {
if (!self) {
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}return call && (typeof call === "object" || typeof call === "function") ? call : self;
}
function _inherits(subClass, superClass) {
if (typeof superClass !== "function" && superClass !== null) {
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
}subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
}
var Interpolate = function (_Component) {
_inherits(Interpolate, _Component);
function Interpolate(props, context) {
_classCallCheck(this, Interpolate);
var _this = _possibleConstructorReturn(this, (Interpolate.__proto__ || Object.getPrototypeOf(Interpolate)).call(this, props, context));
_this.i18n = context.i18n;
_this.t = context.t;
return _this;
}
_createClass(Interpolate, [{
key: 'render',
value: function render() {
var _this2 = this;
var parent = this.props.parent || 'span';
var REGEXP = this.props.regexp || this.i18n.services.interpolator.regexp;
var _props = this.props,
className = _props.className,
style = _props.style;
var useDangerouslySetInnerHTML = this.props.useDangerouslySetInnerHTML || false;
var dangerouslySetInnerHTMLPartElement = this.props.dangerouslySetInnerHTMLPartElement || 'span';
var tOpts = _extends({}, this.props.options, { interpolation: { prefix: '#$?', suffix: '?$#' } });
var format = this.t(this.props.i18nKey, tOpts);
if (!format || typeof format !== 'string') return _react2.default.createElement('noscript', null);
var children = [];
var handleFormat = function handleFormat(key, props) {
if (key.indexOf(_this2.i18n.options.interpolation.formatSeparator) < 0) {
if (props[key] === undefined) _this2.i18n.services.logger.warn('interpolator: missed to pass in variable ' + key + ' for interpolating ' + format);
return props[key];
}
var p = key.split(_this2.i18n.options.interpolation.formatSeparator);
var k = p.shift().trim();
var f = p.join(_this2.i18n.options.interpolation.formatSeparator).trim();
if (props[k] === undefined) _this2.i18n.services.logger.warn('interpolator: missed to pass in variable ' + k + ' for interpolating ' + format);
return _this2.i18n.options.interpolation.format(props[k], f, _this2.i18n.language);
};
format.split(REGEXP).reduce(function (memo, match, index) {
var child = void 0;
if (index % 2 === 0) {
if (match.length === 0) return memo;
if (useDangerouslySetInnerHTML) {
child = _react2.default.createElement(dangerouslySetInnerHTMLPartElement, { dangerouslySetInnerHTML: { __html: match } });
} else {
child = match;
}
} else {
child = handleFormat(match, _this2.props);
}
memo.push(child);
return memo;
}, children);
var additionalProps = {};
if (this.i18n.options.react && this.i18n.options.react.exposeNamespace) {
var ns = typeof this.t.ns === 'string' ? this.t.ns : this.t.ns[0];
if (this.props.i18nKey && this.i18n.options.nsSeparator && this.props.i18nKey.indexOf(this.i18n.options.nsSeparator) > -1) {
var parts = this.props.i18nKey.split(this.i18n.options.nsSeparator);
ns = parts[0];
}
if (this.t.ns) additionalProps['data-i18next-options'] = JSON.stringify({ ns: ns });
}
if (className) additionalProps.className = className;
if (style) additionalProps.style = style;
return _react2.default.createElement.apply(this, [parent, additionalProps].concat(children));
}
}]);
return Interpolate;
}(_react.Component);
Interpolate.propTypes = {
className: _propTypes2.default.string
};
Interpolate.defaultProps = {
className: ''
};
Interpolate.contextTypes = {
i18n: _propTypes2.default.object.isRequired,
t: _propTypes2.default.func.isRequired
};
exports.default = Interpolate;
}, 636, null, "react-i18next/dist/commonjs/interpolate.js");
__d(/* react-i18next/dist/commonjs/trans.js */function(global, require, module, exports) {'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if ("value" in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor);
}
}return function (Constructor, protoProps, staticProps) {
if (protoProps) defineProperties(Constructor.prototype, protoProps);if (staticProps) defineProperties(Constructor, staticProps);return Constructor;
};
}();
var _extends = Object.assign || function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}return target;
};
var _typeof = typeof Symbol === "function" && typeof (typeof Symbol === "function" ? Symbol.iterator : "@@iterator") === "symbol" ? function (obj) {
return typeof obj;
} : function (obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== (typeof Symbol === "function" ? Symbol.prototype : "@@prototype") ? "symbol" : typeof obj;
};
var _react = require(34 ); // 34 = react
var _react2 = _interopRequireDefault(_react);
var _propTypes = require(550 ); // 550 = prop-types
var _propTypes2 = _interopRequireDefault(_propTypes);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
function _possibleConstructorReturn(self, call) {
if (!self) {
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}return call && (typeof call === "object" || typeof call === "function") ? call : self;
}
function _inherits(subClass, superClass) {
if (typeof superClass !== "function" && superClass !== null) {
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
}subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
}
function nodesToString(mem, children, index) {
if (Object.prototype.toString.call(children) !== '[object Array]') children = [children];
children.forEach(function (child, i) {
var elementKey = '' + i;
if (typeof child === 'string') {
mem = '' + mem + child;
} else if (child.props && child.props.children) {
mem = mem + '<' + elementKey + '>' + nodesToString('', child.props.children, i + 1) + '</' + elementKey + '>';
} else if (_react2.default.isValidElement(child)) {
mem = mem + '<' + elementKey + '></' + elementKey + '>';
} else if ((typeof child === 'undefined' ? 'undefined' : _typeof(child)) === 'object') {
var clone = _extends({}, child);
var format = clone.format;
delete clone.format;
var keys = Object.keys(clone);
if (format && keys.length === 1) {
mem = mem + '<' + elementKey + '>{{' + keys[0] + ', ' + format + '}}</' + elementKey + '>';
} else if (keys.length === 1) {
mem = mem + '<' + elementKey + '>{{' + keys[0] + '}}</' + elementKey + '>';
}
}
});
return mem;
}
var REGEXP = new RegExp('(?:<([^>]*)>(.*?)<\\/\\1>)', 'gi');
function renderNodes(children, targetString, i18n) {
function getChildren(nodes, str) {
if (Object.prototype.toString.call(nodes) !== '[object Array]') nodes = [nodes];
var toRender = str.split(REGEXP).reduce(function (mem, match, i) {
if (match) mem.push(match);
return mem;
}, []);
return toRender.reduce(function (mem, part, i) {
var isTag = !isNaN(part);
var previousIsTag = i > 0 ? !isNaN(toRender[i - 1]) : false;
if (previousIsTag) {
var child = nodes[parseInt(toRender[i - 1], 10)] || {};
if (child.props && !child.props.children) previousIsTag = false;
}
if (previousIsTag) return mem;
if (isTag) {
var _child = nodes[parseInt(part, 10)] || {};
var isElement = _react2.default.isValidElement(_child);
if (typeof _child === 'string') {
mem.push(_child);
} else if (_child.props && _child.props.children) {
var inner = getChildren(_child.props && _child.props.children, toRender[i + 1]);
mem.push(_react2.default.cloneElement(_child, _extends({}, _child.props, { key: i }), inner));
} else if ((typeof _child === 'undefined' ? 'undefined' : _typeof(_child)) === 'object' && !isElement) {
var interpolated = i18n.services.interpolator.interpolate(toRender[i + 1], _child, i18n.language);
mem.push(interpolated);
} else {
mem.push(_child);
}
}
if (!isTag && !previousIsTag) mem.push(part);
return mem;
}, []);
}
return getChildren(children, targetString);
}
var Trans = function (_React$Component) {
_inherits(Trans, _React$Component);
function Trans(props, context) {
_classCallCheck(this, Trans);
var _this = _possibleConstructorReturn(this, (Trans.__proto__ || Object.getPrototypeOf(Trans)).call(this, props, context));
_this.i18n = context.i18n;
_this.t = context.t;
return _this;
}
_createClass(Trans, [{
key: 'componentDidMount',
value: function componentDidMount() {}
}, {
key: 'render',
value: function render() {
var _props = this.props,
children = _props.children,
count = _props.count,
parent = _props.parent;
var defaultValue = nodesToString('', children, 0);
var key = this.props.i18nKey || defaultValue;
var translation = this.t(key, { interpolation: { prefix: '#$?', suffix: '?$#' }, defaultValue: defaultValue, count: count });
var additionalProps = {};
if (this.i18n.options.react && this.i18n.options.react.exposeNamespace) {
var ns = typeof this.t.ns === 'string' ? this.t.ns : this.t.ns[0];
if (this.props.i18nKey && this.i18n.options.nsSeparator && this.props.i18nKey.indexOf(this.i18n.options.nsSeparator) > -1) {
var parts = this.props.i18nKey.split(this.i18n.options.nsSeparator);
ns = parts[0];
}
if (this.t.ns) additionalProps['data-i18next-options'] = JSON.stringify({ ns: ns });
}
return _react2.default.createElement(parent, additionalProps, renderNodes(children, translation, this.i18n));
}
}]);
return Trans;
}(_react2.default.Component);
exports.default = Trans;
Trans.propTypes = {
count: _propTypes2.default.number,
parent: _propTypes2.default.string,
i18nKey: _propTypes2.default.string
};
Trans.defaultProps = {
parent: 'div'
};
Trans.contextTypes = {
i18n: _propTypes2.default.object.isRequired,
t: _propTypes2.default.func.isRequired
};
}, 637, null, "react-i18next/dist/commonjs/trans.js");
__d(/* react-i18next/dist/commonjs/I18nextProvider.js */function(global, require, module, exports) {'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if ("value" in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor);
}
}return function (Constructor, protoProps, staticProps) {
if (protoProps) defineProperties(Constructor.prototype, protoProps);if (staticProps) defineProperties(Constructor, staticProps);return Constructor;
};
}();
var _react = require(34 ); // 34 = react
var _propTypes = require(550 ); // 550 = prop-types
var _propTypes2 = _interopRequireDefault(_propTypes);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
function _possibleConstructorReturn(self, call) {
if (!self) {
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}return call && (typeof call === "object" || typeof call === "function") ? call : self;
}
function _inherits(subClass, superClass) {
if (typeof superClass !== "function" && superClass !== null) {
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
}subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
}
var I18nextProvider = function (_Component) {
_inherits(I18nextProvider, _Component);
function I18nextProvider(props, context) {
_classCallCheck(this, I18nextProvider);
var _this = _possibleConstructorReturn(this, (I18nextProvider.__proto__ || Object.getPrototypeOf(I18nextProvider)).call(this, props, context));
_this.i18n = props.i18n;
if (props.initialI18nStore) {
_this.i18n.services.resourceStore.data = props.initialI18nStore;
_this.i18n.options.isInitialSSR = true;
}
if (props.initialLanguage) {
_this.i18n.changeLanguage(props.initialLanguage);
}
return _this;
}
_createClass(I18nextProvider, [{
key: 'getChildContext',
value: function getChildContext() {
return { i18n: this.i18n };
}
}, {
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(nextProps) {
if (this.props.i18n !== nextProps.i18n) {
throw new Error('[react-i18next][I18nextProvider]does not support changing the i18n object.');
}
}
}, {
key: 'render',
value: function render() {
var children = this.props.children;
return _react.Children.only(children);
}
}]);
return I18nextProvider;
}(_react.Component);
I18nextProvider.propTypes = {
i18n: _propTypes2.default.object.isRequired,
children: _propTypes2.default.element.isRequired
};
I18nextProvider.childContextTypes = {
i18n: _propTypes2.default.object.isRequired
};
exports.default = I18nextProvider;
}, 638, null, "react-i18next/dist/commonjs/I18nextProvider.js");
__d(/* react-i18next/dist/commonjs/loadNamespaces.js */function(global, require, module, exports) {'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _slicedToArray = function () {
function sliceIterator(arr, i) {
var _arr = [];var _n = true;var _d = false;var _e = undefined;try {
for (var _i = arr[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](), _s; !(_n = (_s = _i.next()).done); _n = true) {
_arr.push(_s.value);if (i && _arr.length === i) break;
}
} catch (err) {
_d = true;_e = err;
} finally {
try {
if (!_n && _i["return"]) _i["return"]();
} finally {
if (_d) throw _e;
}
}return _arr;
}return function (arr, i) {
if (Array.isArray(arr)) {
return arr;
} else if ((typeof Symbol === "function" ? Symbol.iterator : "@@iterator") in Object(arr)) {
return sliceIterator(arr, i);
} else {
throw new TypeError("Invalid attempt to destructure non-iterable instance");
}
};
}();
var _typeof = typeof Symbol === "function" && typeof (typeof Symbol === "function" ? Symbol.iterator : "@@iterator") === "symbol" ? function (obj) {
return typeof obj;
} : function (obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== (typeof Symbol === "function" ? Symbol.prototype : "@@prototype") ? "symbol" : typeof obj;
};
exports.default = loadNamespaces;
function eachComponents(components, iterator) {
for (var i = 0, l = components.length; i < l; i++) {
if (_typeof(components[i]) === 'object') {
var _iteratorNormalCompletion = true;
var _didIteratorError = false;
var _iteratorError = undefined;
try {
for (var _iterator = Object.entries(components[i])[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
var _step$value = _slicedToArray(_step.value, 2),
key = _step$value[0],
value = _step$value[1];
iterator(value, i, key);
}
} catch (err) {
_didIteratorError = true;
_iteratorError = err;
} finally {
try {
if (!_iteratorNormalCompletion && _iterator.return) {
_iterator.return();
}
} finally {
if (_didIteratorError) {
throw _iteratorError;
}
}
}
} else {
iterator(components[i], i);
}
}
}
function filterAndFlattenComponents(components) {
var flattened = [];
eachComponents(components, function (Component) {
if (Component && Component.namespaces) {
Component.namespaces.forEach(function (namespace) {
if (flattened.indexOf(namespace) === -1) {
flattened.push(namespace);
}
});
}
});
return flattened;
}
function loadNamespaces(_ref) {
var components = _ref.components,
i18n = _ref.i18n;
var allNamespaces = filterAndFlattenComponents(components);
return new Promise(function (resolve) {
i18n.loadNamespaces(allNamespaces, resolve);
});
}
}, 639, null, "react-i18next/dist/commonjs/loadNamespaces.js");
__d(/* jitsi-meet/react/features/base/i18n/i18next.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
exports.DEFAULT_LANGUAGE = exports.LANGUAGES = undefined;
var _i18next = require(641 ); // 641 = i18next
var _i18next2 = babelHelpers.interopRequireDefault(_i18next);
var _i18nextXhrBackend = require(657 ); // 657 = i18next-xhr-backend
var _i18nextXhrBackend2 = babelHelpers.interopRequireDefault(_i18nextXhrBackend);
var _languages = require(661 ); // 661 = ../../../../lang/languages.json
var _languages2 = babelHelpers.interopRequireDefault(_languages);
var _main = require(662 ); // 662 = ../../../../lang/main.json
var _main2 = babelHelpers.interopRequireDefault(_main);
var _languageDetector = require(663 ); // 663 = ./languageDetector
var _languageDetector2 = babelHelpers.interopRequireDefault(_languageDetector);
var LANGUAGES = exports.LANGUAGES = Object.keys(_languages2.default);
var DEFAULT_LANGUAGE = exports.DEFAULT_LANGUAGE = LANGUAGES[0];
var options = {
app: typeof interfaceConfig !== 'undefined' && interfaceConfig.APP_NAME || 'Jitsi Meet',
compatibilityAPI: 'v1',
compatibilityJSON: 'v1',
fallbackLng: DEFAULT_LANGUAGE,
fallbackOnEmpty: true,
fallbackOnNull: true,
lngWhitelist: LANGUAGES.slice(),
load: 'unspecific',
ns: {
defaultNs: 'main',
namespaces: ['main', 'languages']
},
resGetPath: 'lang/__ns__-__lng__.json',
useDataAttrOptions: true
};
_i18next2.default.use(_i18nextXhrBackend2.default).use(_languageDetector2.default).use({
name: 'resolveAppName',
process: function process(res, key) {
return _i18next2.default.t(key, { app: options.app });
},
type: 'postProcessor'
}).init(options);
_i18next2.default.addResourceBundle(DEFAULT_LANGUAGE, 'main', _main2.default, true, true);
_i18next2.default.addResourceBundle(DEFAULT_LANGUAGE, 'languages', _languages2.default, true, true);
exports.default = _i18next2.default;
}, 640, null, "jitsi-meet/react/features/base/i18n/i18next.js");
__d(/* i18next/index.js */function(global, require, module, exports) {module.exports = require(642 ).default; // 642 = ./dist/commonjs/index.js
}, 641, null, "i18next/index.js");
__d(/* i18next/dist/commonjs/index.js */function(global, require, module, exports) {'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.use = exports.t = exports.setDefaultNamespace = exports.on = exports.off = exports.loadResources = exports.loadNamespaces = exports.loadLanguages = exports.init = exports.getFixedT = exports.exists = exports.dir = exports.createInstance = exports.cloneInstance = exports.changeLanguage = undefined;
var _i18next = require(643 ); // 643 = ./i18next
var _i18next2 = _interopRequireDefault(_i18next);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
exports.default = _i18next2.default;
var changeLanguage = exports.changeLanguage = _i18next2.default.changeLanguage.bind(_i18next2.default);
var cloneInstance = exports.cloneInstance = _i18next2.default.cloneInstance.bind(_i18next2.default);
var createInstance = exports.createInstance = _i18next2.default.createInstance.bind(_i18next2.default);
var dir = exports.dir = _i18next2.default.dir.bind(_i18next2.default);
var exists = exports.exists = _i18next2.default.exists.bind(_i18next2.default);
var getFixedT = exports.getFixedT = _i18next2.default.getFixedT.bind(_i18next2.default);
var init = exports.init = _i18next2.default.init.bind(_i18next2.default);
var loadLanguages = exports.loadLanguages = _i18next2.default.loadLanguages.bind(_i18next2.default);
var loadNamespaces = exports.loadNamespaces = _i18next2.default.loadNamespaces.bind(_i18next2.default);
var loadResources = exports.loadResources = _i18next2.default.loadResources.bind(_i18next2.default);
var off = exports.off = _i18next2.default.off.bind(_i18next2.default);
var on = exports.on = _i18next2.default.on.bind(_i18next2.default);
var setDefaultNamespace = exports.setDefaultNamespace = _i18next2.default.setDefaultNamespace.bind(_i18next2.default);
var t = exports.t = _i18next2.default.t.bind(_i18next2.default);
var use = exports.use = _i18next2.default.use.bind(_i18next2.default);
}, 642, null, "i18next/dist/commonjs/index.js");
__d(/* i18next/dist/commonjs/i18next.js */function(global, require, module, exports) {'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends = Object.assign || function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}return target;
};
var _logger = require(644 ); // 644 = ./logger
var _logger2 = _interopRequireDefault(_logger);
var _EventEmitter2 = require(645 ); // 645 = ./EventEmitter
var _EventEmitter3 = _interopRequireDefault(_EventEmitter2);
var _ResourceStore = require(646 ); // 646 = ./ResourceStore
var _ResourceStore2 = _interopRequireDefault(_ResourceStore);
var _Translator = require(648 ); // 648 = ./Translator
var _Translator2 = _interopRequireDefault(_Translator);
var _LanguageUtils = require(651 ); // 651 = ./LanguageUtils
var _LanguageUtils2 = _interopRequireDefault(_LanguageUtils);
var _PluralResolver = require(652 ); // 652 = ./PluralResolver
var _PluralResolver2 = _interopRequireDefault(_PluralResolver);
var _Interpolator = require(653 ); // 653 = ./Interpolator
var _Interpolator2 = _interopRequireDefault(_Interpolator);
var _BackendConnector = require(654 ); // 654 = ./BackendConnector
var _BackendConnector2 = _interopRequireDefault(_BackendConnector);
var _CacheConnector = require(655 ); // 655 = ./CacheConnector
var _CacheConnector2 = _interopRequireDefault(_CacheConnector);
var _defaults2 = require(656 ); // 656 = ./defaults
var _postProcessor = require(649 ); // 649 = ./postProcessor
var _postProcessor2 = _interopRequireDefault(_postProcessor);
var _v = require(650 ); // 650 = ./compatibility/v1
var compat = _interopRequireWildcard(_v);
function _interopRequireWildcard(obj) {
if (obj && obj.__esModule) {
return obj;
} else {
var newObj = {};if (obj != null) {
for (var key in obj) {
if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
}
}newObj.default = obj;return newObj;
}
}
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
function _defaults(obj, defaults) {
var keys = Object.getOwnPropertyNames(defaults);for (var i = 0; i < keys.length; i++) {
var key = keys[i];var value = Object.getOwnPropertyDescriptor(defaults, key);if (value && value.configurable && obj[key] === undefined) {
Object.defineProperty(obj, key, value);
}
}return obj;
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
function _possibleConstructorReturn(self, call) {
if (!self) {
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}return call && (typeof call === "object" || typeof call === "function") ? call : self;
}
function _inherits(subClass, superClass) {
if (typeof superClass !== "function" && superClass !== null) {
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
}subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass);
}
function noop() {}
var I18n = function (_EventEmitter) {
_inherits(I18n, _EventEmitter);
function I18n() {
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var callback = arguments[1];
_classCallCheck(this, I18n);
var _this = _possibleConstructorReturn(this, _EventEmitter.call(this));
_this.options = (0, _defaults2.transformOptions)(options);
_this.services = {};
_this.logger = _logger2.default;
_this.modules = { external: [] };
if (callback && !_this.isInitialized && !options.isClone) {
var _ret;
if (!_this.options.initImmediate) return _ret = _this.init(options, callback), _possibleConstructorReturn(_this, _ret);
setTimeout(function () {
_this.init(options, callback);
}, 0);
}
return _this;
}
I18n.prototype.init = function init(options, callback) {
var _this2 = this;
if (typeof options === 'function') {
callback = options;
options = {};
}
if (!options) options = {};
if (options.compatibilityAPI === 'v1') {
this.options = _extends({}, (0, _defaults2.get)(), (0, _defaults2.transformOptions)(compat.convertAPIOptions(options)), {});
} else if (options.compatibilityJSON === 'v1') {
this.options = _extends({}, (0, _defaults2.get)(), (0, _defaults2.transformOptions)(compat.convertJSONOptions(options)), {});
} else {
this.options = _extends({}, (0, _defaults2.get)(), this.options, (0, _defaults2.transformOptions)(options));
}
this.format = this.options.interpolation.format;
if (!callback) callback = noop;
function createClassOnDemand(ClassOrObject) {
if (!ClassOrObject) return null;
if (typeof ClassOrObject === 'function') return new ClassOrObject();
return ClassOrObject;
}
if (!this.options.isClone) {
if (this.modules.logger) {
_logger2.default.init(createClassOnDemand(this.modules.logger), this.options);
} else {
_logger2.default.init(null, this.options);
}
var lu = new _LanguageUtils2.default(this.options);
this.store = new _ResourceStore2.default(this.options.resources, this.options);
var s = this.services;
s.logger = _logger2.default;
s.resourceStore = this.store;
s.resourceStore.on('added removed', function (lng, ns) {
s.cacheConnector.save();
});
s.languageUtils = lu;
s.pluralResolver = new _PluralResolver2.default(lu, { prepend: this.options.pluralSeparator, compatibilityJSON: this.options.compatibilityJSON, simplifyPluralSuffix: this.options.simplifyPluralSuffix });
s.interpolator = new _Interpolator2.default(this.options);
s.backendConnector = new _BackendConnector2.default(createClassOnDemand(this.modules.backend), s.resourceStore, s, this.options);
s.backendConnector.on('*', function (event) {
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
args[_key - 1] = arguments[_key];
}
_this2.emit.apply(_this2, [event].concat(args));
});
s.backendConnector.on('loaded', function (loaded) {
s.cacheConnector.save();
});
s.cacheConnector = new _CacheConnector2.default(createClassOnDemand(this.modules.cache), s.resourceStore, s, this.options);
s.cacheConnector.on('*', function (event) {
for (var _len2 = arguments.length, args = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
args[_key2 - 1] = arguments[_key2];
}
_this2.emit.apply(_this2, [event].concat(args));
});
if (this.modules.languageDetector) {
s.languageDetector = createClassOnDemand(this.modules.languageDetector);
s.languageDetector.init(s, this.options.detection, this.options);
}
this.translator = new _Translator2.default(this.services, this.options);
this.translator.on('*', function (event) {
for (var _len3 = arguments.length, args = Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
args[_key3 - 1] = arguments[_key3];
}
_this2.emit.apply(_this2, [event].concat(args));
});
this.modules.external.forEach(function (m) {
if (m.init) m.init(_this2);
});
}
var storeApi = ['getResource', 'addResource', 'addResources', 'addResourceBundle', 'removeResourceBundle', 'hasResourceBundle', 'getResourceBundle'];
storeApi.forEach(function (fcName) {
_this2[fcName] = function () {
var _store;
return (_store = _this2.store)[fcName].apply(_store, arguments);
};
});
if (this.options.compatibilityAPI === 'v1') compat.appendBackwardsAPI(this);
var load = function load() {
_this2.changeLanguage(_this2.options.lng, function (err, t) {
_this2.isInitialized = true;
_this2.logger.log('initialized', _this2.options);
_this2.emit('initialized', _this2.options);
callback(err, t);
});
};
if (this.options.resources || !this.options.initImmediate) {
load();
} else {
setTimeout(load, 0);
}
return this;
};
I18n.prototype.loadResources = function loadResources() {
var _this3 = this;
var callback = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : noop;
if (!this.options.resources) {
if (this.language && this.language.toLowerCase() === 'cimode') return callback();
var toLoad = [];
var append = function append(lng) {
if (!lng) return;
var lngs = _this3.services.languageUtils.toResolveHierarchy(lng);
lngs.forEach(function (l) {
if (toLoad.indexOf(l) < 0) toLoad.push(l);
});
};
if (!this.language) {
var fallbacks = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
fallbacks.forEach(function (l) {
return append(l);
});
} else {
append(this.language);
}
if (this.options.preload) {
this.options.preload.forEach(function (l) {
return append(l);
});
}
this.services.cacheConnector.load(toLoad, this.options.ns, function () {
_this3.services.backendConnector.load(toLoad, _this3.options.ns, callback);
});
} else {
callback(null);
}
};
I18n.prototype.reloadResources = function reloadResources(lngs, ns) {
if (!lngs) lngs = this.languages;
if (!ns) ns = this.options.ns;
this.services.backendConnector.reload(lngs, ns);
};
I18n.prototype.use = function use(module) {
if (module.type === 'backend') {
this.modules.backend = module;
}
if (module.type === 'cache') {
this.modules.cache = module;
}
if (module.type === 'logger' || module.log && module.warn && module.error) {
this.modules.logger = module;
}
if (module.type === 'languageDetector') {
this.modules.languageDetector = module;
}
if (module.type === 'postProcessor') {
_postProcessor2.default.addPostProcessor(module);
}
if (module.type === '3rdParty') {
this.modules.external.push(module);
}
return this;
};
I18n.prototype.changeLanguage = function changeLanguage(lng, callback) {
var _this4 = this;
var done = function done(err, l) {
if (l) {
_this4.emit('languageChanged', l);
_this4.logger.log('languageChanged', l);
}
if (callback) callback(err, function () {
return _this4.t.apply(_this4, arguments);
});
};
var setLng = function setLng(l) {
if (l) {
_this4.language = l;
_this4.languages = _this4.services.languageUtils.toResolveHierarchy(l);
_this4.translator.changeLanguage(l);
if (_this4.services.languageDetector) _this4.services.languageDetector.cacheUserLanguage(l);
}
_this4.loadResources(function (err) {
done(err, l);
});
};
if (!lng && this.services.languageDetector && !this.services.languageDetector.async) {
setLng(this.services.languageDetector.detect());
} else if (!lng && this.services.languageDetector && this.services.languageDetector.async) {
this.services.languageDetector.detect(setLng);
} else {
setLng(lng);
}
};
I18n.prototype.getFixedT = function getFixedT(lng, ns) {
var _this5 = this;
var fixedT = function fixedT(key) {
var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var options = _extends({}, opts);
options.lng = options.lng || fixedT.lng;
options.lngs = options.lngs || fixedT.lngs;
options.ns = options.ns || fixedT.ns;
return _this5.t(key, options);
};
if (typeof lng === 'string') {
fixedT.lng = lng;
} else {
fixedT.lngs = lng;
}
fixedT.ns = ns;
return fixedT;
};
I18n.prototype.t = function t() {
var _translator;
return this.translator && (_translator = this.translator).translate.apply(_translator, arguments);
};
I18n.prototype.exists = function exists() {
var _translator2;
return this.translator && (_translator2 = this.translator).exists.apply(_translator2, arguments);
};
I18n.prototype.setDefaultNamespace = function setDefaultNamespace(ns) {
this.options.defaultNS = ns;
};
I18n.prototype.loadNamespaces = function loadNamespaces(ns, callback) {
var _this6 = this;
if (!this.options.ns) return callback && callback();
if (typeof ns === 'string') ns = [ns];
ns.forEach(function (n) {
if (_this6.options.ns.indexOf(n) < 0) _this6.options.ns.push(n);
});
this.loadResources(callback);
};
I18n.prototype.loadLanguages = function loadLanguages(lngs, callback) {
if (typeof lngs === 'string') lngs = [lngs];
var preloaded = this.options.preload || [];
var newLngs = lngs.filter(function (lng) {
return preloaded.indexOf(lng) < 0;
});
if (!newLngs.length) return callback();
this.options.preload = preloaded.concat(newLngs);
this.loadResources(callback);
};
I18n.prototype.dir = function dir(lng) {
if (!lng) lng = this.languages && this.languages.length > 0 ? this.languages[0] : this.language;
if (!lng) return 'rtl';
var rtlLngs = ['ar', 'shu', 'sqr', 'ssh', 'xaa', 'yhd', 'yud', 'aao', 'abh', 'abv', 'acm', 'acq', 'acw', 'acx', 'acy', 'adf', 'ads', 'aeb', 'aec', 'afb', 'ajp', 'apc', 'apd', 'arb', 'arq', 'ars', 'ary', 'arz', 'auz', 'avl', 'ayh', 'ayl', 'ayn', 'ayp', 'bbz', 'pga', 'he', 'iw', 'ps', 'pbt', 'pbu', 'pst', 'prp', 'prd', 'ur', 'ydd', 'yds', 'yih', 'ji', 'yi', 'hbo', 'men', 'xmn', 'fa', 'jpr', 'peo', 'pes', 'prs', 'dv', 'sam'];
return rtlLngs.indexOf(this.services.languageUtils.getLanguagePartFromCode(lng)) >= 0 ? 'rtl' : 'ltr';
};
I18n.prototype.createInstance = function createInstance() {
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var callback = arguments[1];
return new I18n(options, callback);
};
I18n.prototype.cloneInstance = function cloneInstance() {
var _this7 = this;
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : noop;
var mergedOptions = _extends({}, this.options, options, { isClone: true });
var clone = new I18n(mergedOptions, callback);
var membersToCopy = ['store', 'services', 'language'];
membersToCopy.forEach(function (m) {
clone[m] = _this7[m];
});
clone.translator = new _Translator2.default(clone.services, clone.options);
clone.translator.on('*', function (event) {
for (var _len4 = arguments.length, args = Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
args[_key4 - 1] = arguments[_key4];
}
clone.emit.apply(clone, [event].concat(args));
});
clone.init(mergedOptions, callback);
return clone;
};
return I18n;
}(_EventEmitter3.default);
exports.default = new I18n();
}, 643, null, "i18next/dist/commonjs/i18next.js");
__d(/* i18next/dist/commonjs/logger.js */function(global, require, module, exports) {'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends = Object.assign || function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}return target;
};
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
function _toConsumableArray(arr) {
if (Array.isArray(arr)) {
for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {
arr2[i] = arr[i];
}return arr2;
} else {
return Array.from(arr);
}
}
var consoleLogger = {
type: 'logger',
log: function log(args) {
this.output('log', args);
},
warn: function warn(args) {
this.output('warn', args);
},
error: function error(args) {
this.output('error', args);
},
output: function output(type, args) {
var _console;
if (console && console[type]) (_console = console)[type].apply(_console, _toConsumableArray(args));
}
};
var Logger = function () {
function Logger(concreteLogger) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
_classCallCheck(this, Logger);
this.init(concreteLogger, options);
}
Logger.prototype.init = function init(concreteLogger) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
this.prefix = options.prefix || 'i18next:';
this.logger = concreteLogger || consoleLogger;
this.options = options;
this.debug = options.debug;
};
Logger.prototype.setDebug = function setDebug(bool) {
this.debug = bool;
};
Logger.prototype.log = function log() {
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return this.forward(args, 'log', '', true);
};
Logger.prototype.warn = function warn() {
for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
args[_key2] = arguments[_key2];
}
return this.forward(args, 'warn', '', true);
};
Logger.prototype.error = function error() {
for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
args[_key3] = arguments[_key3];
}
return this.forward(args, 'error', '');
};
Logger.prototype.deprecate = function deprecate() {
for (var _len4 = arguments.length, args = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
args[_key4] = arguments[_key4];
}
return this.forward(args, 'warn', 'WARNING DEPRECATED: ', true);
};
Logger.prototype.forward = function forward(args, lvl, prefix, debugOnly) {
if (debugOnly && !this.debug) return null;
if (typeof args[0] === 'string') args[0] = '' + prefix + this.prefix + ' ' + args[0];
return this.logger[lvl](args);
};
Logger.prototype.create = function create(moduleName) {
return new Logger(this.logger, _extends({ prefix: this.prefix + ':' + moduleName + ':' }, this.options));
};
return Logger;
}();
exports.default = new Logger();
}, 644, null, "i18next/dist/commonjs/logger.js");
__d(/* i18next/dist/commonjs/EventEmitter.js */function(global, require, module, exports) {'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
var EventEmitter = function () {
function EventEmitter() {
_classCallCheck(this, EventEmitter);
this.observers = {};
}
EventEmitter.prototype.on = function on(events, listener) {
var _this = this;
events.split(' ').forEach(function (event) {
_this.observers[event] = _this.observers[event] || [];
_this.observers[event].push(listener);
});
};
EventEmitter.prototype.off = function off(event, listener) {
var _this2 = this;
if (!this.observers[event]) {
return;
}
this.observers[event].forEach(function () {
if (!listener) {
delete _this2.observers[event];
} else {
var index = _this2.observers[event].indexOf(listener);
if (index > -1) {
_this2.observers[event].splice(index, 1);
}
}
});
};
EventEmitter.prototype.emit = function emit(event) {
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
args[_key - 1] = arguments[_key];
}
if (this.observers[event]) {
var cloned = [].concat(this.observers[event]);
cloned.forEach(function (observer) {
observer.apply(undefined, args);
});
}
if (this.observers['*']) {
var _cloned = [].concat(this.observers['*']);
_cloned.forEach(function (observer) {
var _ref;
observer.apply(observer, (_ref = [event]).concat.apply(_ref, args));
});
}
};
return EventEmitter;
}();
exports.default = EventEmitter;
}, 645, null, "i18next/dist/commonjs/EventEmitter.js");
__d(/* i18next/dist/commonjs/ResourceStore.js */function(global, require, module, exports) {'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends = Object.assign || function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}return target;
};
var _EventEmitter2 = require(645 ); // 645 = ./EventEmitter
var _EventEmitter3 = _interopRequireDefault(_EventEmitter2);
var _utils = require(647 ); // 647 = ./utils
var utils = _interopRequireWildcard(_utils);
function _interopRequireWildcard(obj) {
if (obj && obj.__esModule) {
return obj;
} else {
var newObj = {};if (obj != null) {
for (var key in obj) {
if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
}
}newObj.default = obj;return newObj;
}
}
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
function _defaults(obj, defaults) {
var keys = Object.getOwnPropertyNames(defaults);for (var i = 0; i < keys.length; i++) {
var key = keys[i];var value = Object.getOwnPropertyDescriptor(defaults, key);if (value && value.configurable && obj[key] === undefined) {
Object.defineProperty(obj, key, value);
}
}return obj;
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
function _possibleConstructorReturn(self, call) {
if (!self) {
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}return call && (typeof call === "object" || typeof call === "function") ? call : self;
}
function _inherits(subClass, superClass) {
if (typeof superClass !== "function" && superClass !== null) {
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
}subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass);
}
var ResourceStore = function (_EventEmitter) {
_inherits(ResourceStore, _EventEmitter);
function ResourceStore() {
var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : { ns: ['translation'], defaultNS: 'translation' };
_classCallCheck(this, ResourceStore);
var _this = _possibleConstructorReturn(this, _EventEmitter.call(this));
_this.data = data;
_this.options = options;
return _this;
}
ResourceStore.prototype.addNamespaces = function addNamespaces(ns) {
if (this.options.ns.indexOf(ns) < 0) {
this.options.ns.push(ns);
}
};
ResourceStore.prototype.removeNamespaces = function removeNamespaces(ns) {
var index = this.options.ns.indexOf(ns);
if (index > -1) {
this.options.ns.splice(index, 1);
}
};
ResourceStore.prototype.getResource = function getResource(lng, ns, key) {
var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
var keySeparator = options.keySeparator || this.options.keySeparator;
if (keySeparator === undefined) keySeparator = '.';
var path = [lng, ns];
if (key && typeof key !== 'string') path = path.concat(key);
if (key && typeof key === 'string') path = path.concat(keySeparator ? key.split(keySeparator) : key);
if (lng.indexOf('.') > -1) {
path = lng.split('.');
}
return utils.getPath(this.data, path);
};
ResourceStore.prototype.addResource = function addResource(lng, ns, key, value) {
var options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : { silent: false };
var keySeparator = this.options.keySeparator;
if (keySeparator === undefined) keySeparator = '.';
var path = [lng, ns];
if (key) path = path.concat(keySeparator ? key.split(keySeparator) : key);
if (lng.indexOf('.') > -1) {
path = lng.split('.');
value = ns;
ns = path[1];
}
this.addNamespaces(ns);
utils.setPath(this.data, path, value);
if (!options.silent) this.emit('added', lng, ns, key, value);
};
ResourceStore.prototype.addResources = function addResources(lng, ns, resources) {
for (var m in resources) {
if (typeof resources[m] === 'string') this.addResource(lng, ns, m, resources[m], { silent: true });
}
this.emit('added', lng, ns, resources);
};
ResourceStore.prototype.addResourceBundle = function addResourceBundle(lng, ns, resources, deep, overwrite) {
var path = [lng, ns];
if (lng.indexOf('.') > -1) {
path = lng.split('.');
deep = resources;
resources = ns;
ns = path[1];
}
this.addNamespaces(ns);
var pack = utils.getPath(this.data, path) || {};
if (deep) {
utils.deepExtend(pack, resources, overwrite);
} else {
pack = _extends({}, pack, resources);
}
utils.setPath(this.data, path, pack);
this.emit('added', lng, ns, resources);
};
ResourceStore.prototype.removeResourceBundle = function removeResourceBundle(lng, ns) {
if (this.hasResourceBundle(lng, ns)) {
delete this.data[lng][ns];
}
this.removeNamespaces(ns);
this.emit('removed', lng, ns);
};
ResourceStore.prototype.hasResourceBundle = function hasResourceBundle(lng, ns) {
return this.getResource(lng, ns) !== undefined;
};
ResourceStore.prototype.getResourceBundle = function getResourceBundle(lng, ns) {
if (!ns) ns = this.options.defaultNS;
if (this.options.compatibilityAPI === 'v1') return _extends({}, this.getResource(lng, ns));
return this.getResource(lng, ns);
};
ResourceStore.prototype.toJSON = function toJSON() {
return this.data;
};
return ResourceStore;
}(_EventEmitter3.default);
exports.default = ResourceStore;
}, 646, null, "i18next/dist/commonjs/ResourceStore.js");
__d(/* i18next/dist/commonjs/utils.js */function(global, require, module, exports) {'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.makeString = makeString;
exports.copy = copy;
exports.setPath = setPath;
exports.pushPath = pushPath;
exports.getPath = getPath;
exports.deepExtend = deepExtend;
exports.regexEscape = regexEscape;
exports.escape = escape;
function makeString(object) {
if (object == null) return '';
return '' + object;
}
function copy(a, s, t) {
a.forEach(function (m) {
if (s[m]) t[m] = s[m];
});
}
function getLastOfPath(object, path, Empty) {
function cleanKey(key) {
return key && key.indexOf('###') > -1 ? key.replace(/###/g, '.') : key;
}
function canNotTraverseDeeper() {
return !object || typeof object === 'string';
}
var stack = typeof path !== 'string' ? [].concat(path) : path.split('.');
while (stack.length > 1) {
if (canNotTraverseDeeper()) return {};
var key = cleanKey(stack.shift());
if (!object[key] && Empty) object[key] = new Empty();
object = object[key];
}
if (canNotTraverseDeeper()) return {};
return {
obj: object,
k: cleanKey(stack.shift())
};
}
function setPath(object, path, newValue) {
var _getLastOfPath = getLastOfPath(object, path, Object),
obj = _getLastOfPath.obj,
k = _getLastOfPath.k;
obj[k] = newValue;
}
function pushPath(object, path, newValue, concat) {
var _getLastOfPath2 = getLastOfPath(object, path, Object),
obj = _getLastOfPath2.obj,
k = _getLastOfPath2.k;
obj[k] = obj[k] || [];
if (concat) obj[k] = obj[k].concat(newValue);
if (!concat) obj[k].push(newValue);
}
function getPath(object, path) {
var _getLastOfPath3 = getLastOfPath(object, path),
obj = _getLastOfPath3.obj,
k = _getLastOfPath3.k;
if (!obj) return undefined;
return obj[k];
}
function deepExtend(target, source, overwrite) {
for (var prop in source) {
if (prop in target) {
if (typeof target[prop] === 'string' || target[prop] instanceof String || typeof source[prop] === 'string' || source[prop] instanceof String) {
if (overwrite) target[prop] = source[prop];
} else {
deepExtend(target[prop], source[prop], overwrite);
}
} else {
target[prop] = source[prop];
}
}
return target;
}
function regexEscape(str) {
return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&');
}
var _entityMap = {
"&": "&amp;",
"<": "&lt;",
">": "&gt;",
'"': '&quot;',
"'": '&#39;',
"/": '&#x2F;'
};
function escape(data) {
if (typeof data === 'string') {
return data.replace(/[&<>"'\/]/g, function (s) {
return _entityMap[s];
});
}
return data;
}
}, 647, null, "i18next/dist/commonjs/utils.js");
__d(/* i18next/dist/commonjs/Translator.js */function(global, require, module, exports) {'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends = Object.assign || function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}return target;
};
var _typeof = typeof Symbol === "function" && typeof (typeof Symbol === "function" ? Symbol.iterator : "@@iterator") === "symbol" ? function (obj) {
return typeof obj;
} : function (obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== (typeof Symbol === "function" ? Symbol.prototype : "@@prototype") ? "symbol" : typeof obj;
};
var _logger = require(644 ); // 644 = ./logger
var _logger2 = _interopRequireDefault(_logger);
var _EventEmitter2 = require(645 ); // 645 = ./EventEmitter
var _EventEmitter3 = _interopRequireDefault(_EventEmitter2);
var _postProcessor = require(649 ); // 649 = ./postProcessor
var _postProcessor2 = _interopRequireDefault(_postProcessor);
var _v = require(650 ); // 650 = ./compatibility/v1
var compat = _interopRequireWildcard(_v);
var _utils = require(647 ); // 647 = ./utils
var utils = _interopRequireWildcard(_utils);
function _interopRequireWildcard(obj) {
if (obj && obj.__esModule) {
return obj;
} else {
var newObj = {};if (obj != null) {
for (var key in obj) {
if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
}
}newObj.default = obj;return newObj;
}
}
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
function _defaults(obj, defaults) {
var keys = Object.getOwnPropertyNames(defaults);for (var i = 0; i < keys.length; i++) {
var key = keys[i];var value = Object.getOwnPropertyDescriptor(defaults, key);if (value && value.configurable && obj[key] === undefined) {
Object.defineProperty(obj, key, value);
}
}return obj;
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
function _possibleConstructorReturn(self, call) {
if (!self) {
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}return call && (typeof call === "object" || typeof call === "function") ? call : self;
}
function _inherits(subClass, superClass) {
if (typeof superClass !== "function" && superClass !== null) {
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
}subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass);
}
var Translator = function (_EventEmitter) {
_inherits(Translator, _EventEmitter);
function Translator(services) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
_classCallCheck(this, Translator);
var _this = _possibleConstructorReturn(this, _EventEmitter.call(this));
utils.copy(['resourceStore', 'languageUtils', 'pluralResolver', 'interpolator', 'backendConnector'], services, _this);
_this.options = options;
_this.logger = _logger2.default.create('translator');
return _this;
}
Translator.prototype.changeLanguage = function changeLanguage(lng) {
if (lng) this.language = lng;
};
Translator.prototype.exists = function exists(key) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : { interpolation: {} };
if (this.options.compatibilityAPI === 'v1') {
options = compat.convertTOptions(options);
}
return this.resolve(key, options) !== undefined;
};
Translator.prototype.extractFromKey = function extractFromKey(key, options) {
var nsSeparator = options.nsSeparator || this.options.nsSeparator;
if (nsSeparator === undefined) nsSeparator = ':';
var keySeparator = options.keySeparator || this.options.keySeparator || '.';
var namespaces = options.ns || this.options.defaultNS;
if (nsSeparator && key.indexOf(nsSeparator) > -1) {
var parts = key.split(nsSeparator);
if (nsSeparator !== keySeparator || nsSeparator === keySeparator && this.options.ns.indexOf(parts[0]) > -1) namespaces = parts.shift();
key = parts.join(keySeparator);
}
if (typeof namespaces === 'string') namespaces = [namespaces];
return {
key: key,
namespaces: namespaces
};
};
Translator.prototype.translate = function translate(keys) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
if ((typeof options === 'undefined' ? 'undefined' : _typeof(options)) !== 'object') {
options = this.options.overloadTranslationOptionHandler(arguments);
} else if (this.options.compatibilityAPI === 'v1') {
options = compat.convertTOptions(options);
}
if (keys === undefined || keys === null || keys === '') return '';
if (typeof keys === 'number') keys = String(keys);
if (typeof keys === 'string') keys = [keys];
var keySeparator = options.keySeparator || this.options.keySeparator || '.';
var _extractFromKey = this.extractFromKey(keys[keys.length - 1], options),
key = _extractFromKey.key,
namespaces = _extractFromKey.namespaces;
var namespace = namespaces[namespaces.length - 1];
var lng = options.lng || this.language;
var appendNamespaceToCIMode = options.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
if (lng && lng.toLowerCase() === 'cimode') {
if (appendNamespaceToCIMode) {
var nsSeparator = options.nsSeparator || this.options.nsSeparator;
return namespace + nsSeparator + key;
}
return key;
}
var res = this.resolve(keys, options);
var resType = Object.prototype.toString.apply(res);
var noObject = ['[object Number]', '[object Function]', '[object RegExp]'];
var joinArrays = options.joinArrays !== undefined ? options.joinArrays : this.options.joinArrays;
if (res && typeof res !== 'string' && noObject.indexOf(resType) < 0 && !(joinArrays && resType === '[object Array]')) {
if (!options.returnObjects && !this.options.returnObjects) {
this.logger.warn('accessing an object - but returnObjects options is not enabled!');
return this.options.returnedObjectHandler ? this.options.returnedObjectHandler(key, res, options) : 'key \'' + key + ' (' + this.language + ')\' returned an object instead of string.';
}
if (options.keySeparator || this.options.keySeparator) {
var copy = resType === '[object Array]' ? [] : {};
for (var m in res) {
if (Object.prototype.hasOwnProperty.call(res, m)) {
copy[m] = this.translate('' + key + keySeparator + m, _extends({}, options, { joinArrays: false, ns: namespaces }));
}
}
res = copy;
}
} else if (joinArrays && resType === '[object Array]') {
res = res.join(joinArrays);
if (res) res = this.extendTranslation(res, key, options);
} else {
var usedDefault = false;
var usedKey = false;
if (!this.isValidLookup(res) && options.defaultValue !== undefined) {
usedDefault = true;
res = options.defaultValue;
}
if (!this.isValidLookup(res)) {
usedKey = true;
res = key;
}
if (usedKey || usedDefault) {
this.logger.log('missingKey', lng, namespace, key, res);
var lngs = [];
var fallbackLngs = this.languageUtils.getFallbackCodes(this.options.fallbackLng, options.lng || this.language);
if (this.options.saveMissingTo === 'fallback' && fallbackLngs && fallbackLngs[0]) {
for (var i = 0; i < fallbackLngs.length; i++) {
lngs.push(fallbackLngs[i]);
}
} else if (this.options.saveMissingTo === 'all') {
lngs = this.languageUtils.toResolveHierarchy(options.lng || this.language);
} else {
lngs.push(options.lng || this.language);
}
if (this.options.saveMissing) {
if (this.options.missingKeyHandler) {
this.options.missingKeyHandler(lngs, namespace, key, res);
} else if (this.backendConnector && this.backendConnector.saveMissing) {
this.backendConnector.saveMissing(lngs, namespace, key, res);
}
}
this.emit('missingKey', lngs, namespace, key, res);
}
res = this.extendTranslation(res, key, options);
if (usedKey && res === key && this.options.appendNamespaceToMissingKey) res = namespace + ':' + key;
if (usedKey && this.options.parseMissingKeyHandler) res = this.options.parseMissingKeyHandler(res);
}
return res;
};
Translator.prototype.extendTranslation = function extendTranslation(res, key, options) {
var _this2 = this;
if (options.interpolation) this.interpolator.init(_extends({}, options, { interpolation: _extends({}, this.options.interpolation, options.interpolation) }));
var data = options.replace && typeof options.replace !== 'string' ? options.replace : options;
if (this.options.interpolation.defaultVariables) data = _extends({}, this.options.interpolation.defaultVariables, data);
res = this.interpolator.interpolate(res, data, options.lng || this.language);
if (options.nest !== false) res = this.interpolator.nest(res, function () {
return _this2.translate.apply(_this2, arguments);
}, options);
if (options.interpolation) this.interpolator.reset();
var postProcess = options.postProcess || this.options.postProcess;
var postProcessorNames = typeof postProcess === 'string' ? [postProcess] : postProcess;
if (res !== undefined && postProcessorNames && postProcessorNames.length && options.applyPostProcessor !== false) {
res = _postProcessor2.default.handle(postProcessorNames, res, key, options, this);
}
return res;
};
Translator.prototype.resolve = function resolve(keys) {
var _this3 = this;
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var found = void 0;
if (typeof keys === 'string') keys = [keys];
keys.forEach(function (k) {
if (_this3.isValidLookup(found)) return;
var extracted = _this3.extractFromKey(k, options);
var key = extracted.key;
var namespaces = extracted.namespaces;
if (_this3.options.fallbackNS) namespaces = namespaces.concat(_this3.options.fallbackNS);
var needsPluralHandling = options.count !== undefined && typeof options.count !== 'string';
var needsContextHandling = options.context !== undefined && typeof options.context === 'string' && options.context !== '';
var codes = options.lngs ? options.lngs : _this3.languageUtils.toResolveHierarchy(options.lng || _this3.language);
namespaces.forEach(function (ns) {
if (_this3.isValidLookup(found)) return;
codes.forEach(function (code) {
if (_this3.isValidLookup(found)) return;
var finalKey = key;
var finalKeys = [finalKey];
var pluralSuffix = void 0;
if (needsPluralHandling) pluralSuffix = _this3.pluralResolver.getSuffix(code, options.count);
if (needsPluralHandling && needsContextHandling) finalKeys.push(finalKey + pluralSuffix);
if (needsContextHandling) finalKeys.push(finalKey += '' + _this3.options.contextSeparator + options.context);
if (needsPluralHandling) finalKeys.push(finalKey += pluralSuffix);
var possibleKey = void 0;
while (possibleKey = finalKeys.pop()) {
if (!_this3.isValidLookup(found)) {
found = _this3.getResource(code, ns, possibleKey, options);
}
}
});
});
});
return found;
};
Translator.prototype.isValidLookup = function isValidLookup(res) {
return res !== undefined && !(!this.options.returnNull && res === null) && !(!this.options.returnEmptyString && res === '');
};
Translator.prototype.getResource = function getResource(code, ns, key) {
var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
return this.resourceStore.getResource(code, ns, key, options);
};
return Translator;
}(_EventEmitter3.default);
exports.default = Translator;
}, 648, null, "i18next/dist/commonjs/Translator.js");
__d(/* i18next/dist/commonjs/postProcessor.js */function(global, require, module, exports) {"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = {
processors: {},
addPostProcessor: function addPostProcessor(module) {
this.processors[module.name] = module;
},
handle: function handle(processors, value, key, options, translator) {
var _this = this;
processors.forEach(function (processor) {
if (_this.processors[processor]) value = _this.processors[processor].process(value, key, options, translator);
});
return value;
}
};
}, 649, null, "i18next/dist/commonjs/postProcessor.js");
__d(/* i18next/dist/commonjs/compatibility/v1.js */function(global, require, module, exports) {'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.convertAPIOptions = convertAPIOptions;
exports.convertJSONOptions = convertJSONOptions;
exports.convertTOptions = convertTOptions;
exports.appendBackwardsAPI = appendBackwardsAPI;
var _logger = require(644 ); // 644 = ../logger
var _logger2 = _interopRequireDefault(_logger);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
function convertInterpolation(options) {
options.interpolation = {
unescapeSuffix: 'HTML'
};
options.interpolation.prefix = options.interpolationPrefix || '__';
options.interpolation.suffix = options.interpolationSuffix || '__';
options.interpolation.escapeValue = options.escapeInterpolation || false;
options.interpolation.nestingPrefix = options.reusePrefix || '$t(';
options.interpolation.nestingSuffix = options.reuseSuffix || ')';
return options;
}
function convertAPIOptions(options) {
if (options.resStore) options.resources = options.resStore;
if (options.ns && options.ns.defaultNs) {
options.defaultNS = options.ns.defaultNs;
options.ns = options.ns.namespaces;
} else {
options.defaultNS = options.ns || 'translation';
}
if (options.fallbackToDefaultNS && options.defaultNS) options.fallbackNS = options.defaultNS;
options.saveMissing = options.sendMissing;
options.saveMissingTo = options.sendMissingTo || 'current';
options.returnNull = !options.fallbackOnNull;
options.returnEmptyString = !options.fallbackOnEmpty;
options.returnObjects = options.returnObjectTrees;
options.joinArrays = '\n';
options.returnedObjectHandler = options.objectTreeKeyHandler;
options.parseMissingKeyHandler = options.parseMissingKey;
options.appendNamespaceToMissingKey = true;
options.nsSeparator = options.nsseparator || ':';
options.keySeparator = options.keyseparator || '.';
if (options.shortcutFunction === 'sprintf') {
options.overloadTranslationOptionHandler = function handle(args) {
var values = [];
for (var i = 1; i < args.length; i++) {
values.push(args[i]);
}
return {
postProcess: 'sprintf',
sprintf: values
};
};
}
options.whitelist = options.lngWhitelist;
options.preload = options.preload;
if (options.load === 'current') options.load = 'currentOnly';
if (options.load === 'unspecific') options.load = 'languageOnly';
options.backend = options.backend || {};
options.backend.loadPath = options.resGetPath || 'locales/__lng__/__ns__.json';
options.backend.addPath = options.resPostPath || 'locales/add/__lng__/__ns__';
options.backend.allowMultiLoading = options.dynamicLoad;
options.cache = options.cache || {};
options.cache.prefix = 'res_';
options.cache.expirationTime = 7 * 24 * 60 * 60 * 1000;
options.cache.enabled = options.useLocalStorage;
options = convertInterpolation(options);
if (options.defaultVariables) options.interpolation.defaultVariables = options.defaultVariables;
return options;
}
function convertJSONOptions(options) {
options = convertInterpolation(options);
options.joinArrays = '\n';
return options;
}
function convertTOptions(options) {
if (options.interpolationPrefix || options.interpolationSuffix || options.escapeInterpolation !== undefined) {
options = convertInterpolation(options);
}
options.nsSeparator = options.nsseparator;
options.keySeparator = options.keyseparator;
options.returnObjects = options.returnObjectTrees;
return options;
}
function appendBackwardsAPI(i18n) {
i18n.lng = function () {
_logger2.default.deprecate('i18next.lng() can be replaced by i18next.language for detected language or i18next.languages for languages ordered by translation lookup.');
return i18n.services.languageUtils.toResolveHierarchy(i18n.language)[0];
};
i18n.preload = function (lngs, cb) {
_logger2.default.deprecate('i18next.preload() can be replaced with i18next.loadLanguages()');
i18n.loadLanguages(lngs, cb);
};
i18n.setLng = function (lng, options, callback) {
_logger2.default.deprecate('i18next.setLng() can be replaced with i18next.changeLanguage() or i18next.getFixedT() to get a translation function with fixed language or namespace.');
if (typeof options === 'function') {
callback = options;
options = {};
}
if (!options) options = {};
if (options.fixLng === true) {
if (callback) return callback(null, i18n.getFixedT(lng));
}
return i18n.changeLanguage(lng, callback);
};
i18n.addPostProcessor = function (name, fc) {
_logger2.default.deprecate('i18next.addPostProcessor() can be replaced by i18next.use({ type: \'postProcessor\', name: \'name\', process: fc })');
i18n.use({
type: 'postProcessor',
name: name,
process: fc
});
};
}
}, 650, null, "i18next/dist/commonjs/compatibility/v1.js");
__d(/* i18next/dist/commonjs/LanguageUtils.js */function(global, require, module, exports) {'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _logger = require(644 ); // 644 = ./logger
var _logger2 = _interopRequireDefault(_logger);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
function capitalize(string) {
return string.charAt(0).toUpperCase() + string.slice(1);
}
var LanguageUtil = function () {
function LanguageUtil(options) {
_classCallCheck(this, LanguageUtil);
this.options = options;
this.whitelist = this.options.whitelist || false;
this.logger = _logger2.default.create('languageUtils');
}
LanguageUtil.prototype.getScriptPartFromCode = function getScriptPartFromCode(code) {
if (!code || code.indexOf('-') < 0) return null;
var p = code.split('-');
if (p.length === 2) return null;
p.pop();
return this.formatLanguageCode(p.join('-'));
};
LanguageUtil.prototype.getLanguagePartFromCode = function getLanguagePartFromCode(code) {
if (!code || code.indexOf('-') < 0) return code;
var p = code.split('-');
return this.formatLanguageCode(p[0]);
};
LanguageUtil.prototype.formatLanguageCode = function formatLanguageCode(code) {
if (typeof code === 'string' && code.indexOf('-') > -1) {
var specialCases = ['hans', 'hant', 'latn', 'cyrl', 'cans', 'mong', 'arab'];
var p = code.split('-');
if (this.options.lowerCaseLng) {
p = p.map(function (part) {
return part.toLowerCase();
});
} else if (p.length === 2) {
p[0] = p[0].toLowerCase();
p[1] = p[1].toUpperCase();
if (specialCases.indexOf(p[1].toLowerCase()) > -1) p[1] = capitalize(p[1].toLowerCase());
} else if (p.length === 3) {
p[0] = p[0].toLowerCase();
if (p[1].length === 2) p[1] = p[1].toUpperCase();
if (p[0] !== 'sgn' && p[2].length === 2) p[2] = p[2].toUpperCase();
if (specialCases.indexOf(p[1].toLowerCase()) > -1) p[1] = capitalize(p[1].toLowerCase());
if (specialCases.indexOf(p[2].toLowerCase()) > -1) p[2] = capitalize(p[2].toLowerCase());
}
return p.join('-');
}
return this.options.cleanCode || this.options.lowerCaseLng ? code.toLowerCase() : code;
};
LanguageUtil.prototype.isWhitelisted = function isWhitelisted(code) {
if (this.options.load === 'languageOnly' || this.options.nonExplicitWhitelist) {
code = this.getLanguagePartFromCode(code);
}
return !this.whitelist || !this.whitelist.length || this.whitelist.indexOf(code) > -1;
};
LanguageUtil.prototype.getFallbackCodes = function getFallbackCodes(fallbacks, code) {
if (!fallbacks) return [];
if (typeof fallbacks === 'string') fallbacks = [fallbacks];
if (Object.prototype.toString.apply(fallbacks) === '[object Array]') return fallbacks;
if (!code) return fallbacks.default || [];
var found = fallbacks[code];
if (!found) found = fallbacks[this.getScriptPartFromCode(code)];
if (!found) found = fallbacks[this.formatLanguageCode(code)];
if (!found) found = fallbacks.default;
return found || [];
};
LanguageUtil.prototype.toResolveHierarchy = function toResolveHierarchy(code, fallbackCode) {
var _this = this;
var fallbackCodes = this.getFallbackCodes(fallbackCode || this.options.fallbackLng || [], code);
var codes = [];
var addCode = function addCode(c) {
if (!c) return;
if (_this.isWhitelisted(c)) {
codes.push(c);
} else {
_this.logger.warn('rejecting non-whitelisted language code: ' + c);
}
};
if (typeof code === 'string' && code.indexOf('-') > -1) {
if (this.options.load !== 'languageOnly') addCode(this.formatLanguageCode(code));
if (this.options.load !== 'languageOnly' && this.options.load !== 'currentOnly') addCode(this.getScriptPartFromCode(code));
if (this.options.load !== 'currentOnly') addCode(this.getLanguagePartFromCode(code));
} else if (typeof code === 'string') {
addCode(this.formatLanguageCode(code));
}
fallbackCodes.forEach(function (fc) {
if (codes.indexOf(fc) < 0) addCode(_this.formatLanguageCode(fc));
});
return codes;
};
return LanguageUtil;
}();
exports.default = LanguageUtil;
}, 651, null, "i18next/dist/commonjs/LanguageUtils.js");
__d(/* i18next/dist/commonjs/PluralResolver.js */function(global, require, module, exports) {'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _logger = require(644 ); // 644 = ./logger
var _logger2 = _interopRequireDefault(_logger);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
var sets = [{ lngs: ['ach', 'ak', 'am', 'arn', 'br', 'fil', 'gun', 'ln', 'mfe', 'mg', 'mi', 'oc', 'tg', 'ti', 'tr', 'uz', 'wa'], nr: [1, 2], fc: 1 }, { lngs: ['af', 'an', 'ast', 'az', 'bg', 'bn', 'ca', 'da', 'de', 'dev', 'el', 'en', 'eo', 'es', 'es_ar', 'et', 'eu', 'fi', 'fo', 'fur', 'fy', 'gl', 'gu', 'ha', 'he', 'hi', 'hu', 'hy', 'ia', 'it', 'kn', 'ku', 'lb', 'mai', 'ml', 'mn', 'mr', 'nah', 'nap', 'nb', 'ne', 'nl', 'nn', 'no', 'nso', 'pa', 'pap', 'pms', 'ps', 'pt', 'pt_br', 'rm', 'sco', 'se', 'si', 'so', 'son', 'sq', 'sv', 'sw', 'ta', 'te', 'tk', 'ur', 'yo'], nr: [1, 2], fc: 2 }, { lngs: ['ay', 'bo', 'cgg', 'fa', 'id', 'ja', 'jbo', 'ka', 'kk', 'km', 'ko', 'ky', 'lo', 'ms', 'sah', 'su', 'th', 'tt', 'ug', 'vi', 'wo', 'zh'], nr: [1], fc: 3 }, { lngs: ['be', 'bs', 'dz', 'hr', 'ru', 'sr', 'uk'], nr: [1, 2, 5], fc: 4 }, { lngs: ['ar'], nr: [0, 1, 2, 3, 11, 100], fc: 5 }, { lngs: ['cs', 'sk'], nr: [1, 2, 5], fc: 6 }, { lngs: ['csb', 'pl'], nr: [1, 2, 5], fc: 7 }, { lngs: ['cy'], nr: [1, 2, 3, 8], fc: 8 }, { lngs: ['fr'], nr: [1, 2], fc: 9 }, { lngs: ['ga'], nr: [1, 2, 3, 7, 11], fc: 10 }, { lngs: ['gd'], nr: [1, 2, 3, 20], fc: 11 }, { lngs: ['is'], nr: [1, 2], fc: 12 }, { lngs: ['jv'], nr: [0, 1], fc: 13 }, { lngs: ['kw'], nr: [1, 2, 3, 4], fc: 14 }, { lngs: ['lt'], nr: [1, 2, 10], fc: 15 }, { lngs: ['lv'], nr: [1, 2, 0], fc: 16 }, { lngs: ['mk'], nr: [1, 2], fc: 17 }, { lngs: ['mnk'], nr: [0, 1, 2], fc: 18 }, { lngs: ['mt'], nr: [1, 2, 11, 20], fc: 19 }, { lngs: ['or'], nr: [2, 1], fc: 2 }, { lngs: ['ro'], nr: [1, 2, 20], fc: 20 }, { lngs: ['sl'], nr: [5, 1, 2, 3], fc: 21 }];
var _rulesPluralsTypes = {
1: function _(n) {
return Number(n > 1);
},
2: function _(n) {
return Number(n != 1);
},
3: function _(n) {
return 0;
},
4: function _(n) {
return Number(n % 10 == 1 && n % 100 != 11 ? 0 : n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2);
},
5: function _(n) {
return Number(n === 0 ? 0 : n == 1 ? 1 : n == 2 ? 2 : n % 100 >= 3 && n % 100 <= 10 ? 3 : n % 100 >= 11 ? 4 : 5);
},
6: function _(n) {
return Number(n == 1 ? 0 : n >= 2 && n <= 4 ? 1 : 2);
},
7: function _(n) {
return Number(n == 1 ? 0 : n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2);
},
8: function _(n) {
return Number(n == 1 ? 0 : n == 2 ? 1 : n != 8 && n != 11 ? 2 : 3);
},
9: function _(n) {
return Number(n >= 2);
},
10: function _(n) {
return Number(n == 1 ? 0 : n == 2 ? 1 : n < 7 ? 2 : n < 11 ? 3 : 4);
},
11: function _(n) {
return Number(n == 1 || n == 11 ? 0 : n == 2 || n == 12 ? 1 : n > 2 && n < 20 ? 2 : 3);
},
12: function _(n) {
return Number(n % 10 != 1 || n % 100 == 11);
},
13: function _(n) {
return Number(n !== 0);
},
14: function _(n) {
return Number(n == 1 ? 0 : n == 2 ? 1 : n == 3 ? 2 : 3);
},
15: function _(n) {
return Number(n % 10 == 1 && n % 100 != 11 ? 0 : n % 10 >= 2 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2);
},
16: function _(n) {
return Number(n % 10 == 1 && n % 100 != 11 ? 0 : n !== 0 ? 1 : 2);
},
17: function _(n) {
return Number(n == 1 || n % 10 == 1 ? 0 : 1);
},
18: function _(n) {
return Number(n == 0 ? 0 : n == 1 ? 1 : 2);
},
19: function _(n) {
return Number(n == 1 ? 0 : n === 0 || n % 100 > 1 && n % 100 < 11 ? 1 : n % 100 > 10 && n % 100 < 20 ? 2 : 3);
},
20: function _(n) {
return Number(n == 1 ? 0 : n === 0 || n % 100 > 0 && n % 100 < 20 ? 1 : 2);
},
21: function _(n) {
return Number(n % 100 == 1 ? 1 : n % 100 == 2 ? 2 : n % 100 == 3 || n % 100 == 4 ? 3 : 0);
}
};
function createRules() {
var rules = {};
sets.forEach(function (set) {
set.lngs.forEach(function (l) {
rules[l] = {
numbers: set.nr,
plurals: _rulesPluralsTypes[set.fc]
};
});
});
return rules;
}
var PluralResolver = function () {
function PluralResolver(languageUtils) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
_classCallCheck(this, PluralResolver);
this.languageUtils = languageUtils;
this.options = options;
this.logger = _logger2.default.create('pluralResolver');
this.rules = createRules();
}
PluralResolver.prototype.addRule = function addRule(lng, obj) {
this.rules[lng] = obj;
};
PluralResolver.prototype.getRule = function getRule(code) {
return this.rules[this.languageUtils.getLanguagePartFromCode(code)];
};
PluralResolver.prototype.needsPlural = function needsPlural(code) {
var rule = this.getRule(code);
return rule && rule.numbers.length > 1;
};
PluralResolver.prototype.getSuffix = function getSuffix(code, count) {
var _this = this;
var rule = this.getRule(code);
if (rule) {
if (rule.numbers.length === 1) return '';
var idx = rule.noAbs ? rule.plurals(count) : rule.plurals(Math.abs(count));
var suffix = rule.numbers[idx];
if (this.options.simplifyPluralSuffix && rule.numbers.length === 2 && rule.numbers[0] === 1) {
if (suffix === 2) {
suffix = 'plural';
} else if (suffix === 1) {
suffix = '';
}
}
var returnSuffix = function returnSuffix() {
return _this.options.prepend && suffix.toString() ? _this.options.prepend + suffix.toString() : suffix.toString();
};
if (this.options.compatibilityJSON === 'v1') {
if (suffix === 1) return '';
if (typeof suffix === 'number') return '_plural_' + suffix.toString();
return returnSuffix();
} else if (this.options.compatibilityJSON === 'v2' || rule.numbers.length === 2 && rule.numbers[0] === 1) {
return returnSuffix();
} else if (rule.numbers.length === 2 && rule.numbers[0] === 1) {
return returnSuffix();
}
return this.options.prepend && idx.toString() ? this.options.prepend + idx.toString() : idx.toString();
}
this.logger.warn('no plural rule found for: ' + code);
return '';
};
return PluralResolver;
}();
exports.default = PluralResolver;
}, 652, null, "i18next/dist/commonjs/PluralResolver.js");
__d(/* i18next/dist/commonjs/Interpolator.js */function(global, require, module, exports) {'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends = Object.assign || function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}return target;
};
var _utils = require(647 ); // 647 = ./utils
var utils = _interopRequireWildcard(_utils);
var _logger = require(644 ); // 644 = ./logger
var _logger2 = _interopRequireDefault(_logger);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
function _interopRequireWildcard(obj) {
if (obj && obj.__esModule) {
return obj;
} else {
var newObj = {};if (obj != null) {
for (var key in obj) {
if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
}
}newObj.default = obj;return newObj;
}
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
var Interpolator = function () {
function Interpolator() {
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
_classCallCheck(this, Interpolator);
this.logger = _logger2.default.create('interpolator');
this.init(options, true);
}
Interpolator.prototype.init = function init() {
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var reset = arguments[1];
if (reset) {
this.options = options;
this.format = options.interpolation && options.interpolation.format || function (value) {
return value;
};
this.escape = options.interpolation && options.interpolation.escape || utils.escape;
}
if (!options.interpolation) options.interpolation = { escapeValue: true };
var iOpts = options.interpolation;
this.escapeValue = iOpts.escapeValue !== undefined ? iOpts.escapeValue : true;
this.prefix = iOpts.prefix ? utils.regexEscape(iOpts.prefix) : iOpts.prefixEscaped || '{{';
this.suffix = iOpts.suffix ? utils.regexEscape(iOpts.suffix) : iOpts.suffixEscaped || '}}';
this.formatSeparator = iOpts.formatSeparator ? iOpts.formatSeparator : iOpts.formatSeparator || ',';
this.unescapePrefix = iOpts.unescapeSuffix ? '' : iOpts.unescapePrefix || '-';
this.unescapeSuffix = this.unescapePrefix ? '' : iOpts.unescapeSuffix || '';
this.nestingPrefix = iOpts.nestingPrefix ? utils.regexEscape(iOpts.nestingPrefix) : iOpts.nestingPrefixEscaped || utils.regexEscape('$t(');
this.nestingSuffix = iOpts.nestingSuffix ? utils.regexEscape(iOpts.nestingSuffix) : iOpts.nestingSuffixEscaped || utils.regexEscape(')');
this.resetRegExp();
};
Interpolator.prototype.reset = function reset() {
if (this.options) this.init(this.options);
};
Interpolator.prototype.resetRegExp = function resetRegExp() {
var regexpStr = this.prefix + '(.+?)' + this.suffix;
this.regexp = new RegExp(regexpStr, 'g');
var regexpUnescapeStr = '' + this.prefix + this.unescapePrefix + '(.+?)' + this.unescapeSuffix + this.suffix;
this.regexpUnescape = new RegExp(regexpUnescapeStr, 'g');
var nestingRegexpStr = this.nestingPrefix + '(.+?)' + this.nestingSuffix;
this.nestingRegexp = new RegExp(nestingRegexpStr, 'g');
};
Interpolator.prototype.interpolate = function interpolate(str, data, lng) {
var _this = this;
var match = void 0;
var value = void 0;
function regexSafe(val) {
return val.replace(/\$/g, '$$$$');
}
var handleFormat = function handleFormat(key) {
if (key.indexOf(_this.formatSeparator) < 0) return utils.getPath(data, key);
var p = key.split(_this.formatSeparator);
var k = p.shift().trim();
var f = p.join(_this.formatSeparator).trim();
return _this.format(utils.getPath(data, k), f, lng);
};
this.resetRegExp();
while (match = this.regexpUnescape.exec(str)) {
value = handleFormat(match[1].trim());
str = str.replace(match[0], value);
this.regexpUnescape.lastIndex = 0;
}
while (match = this.regexp.exec(str)) {
value = handleFormat(match[1].trim());
if (typeof value !== 'string') value = utils.makeString(value);
if (!value) {
this.logger.warn('missed to pass in variable ' + match[1] + ' for interpolating ' + str);
value = '';
}
value = this.escapeValue ? regexSafe(this.escape(value)) : regexSafe(value);
str = str.replace(match[0], value);
this.regexp.lastIndex = 0;
}
return str;
};
Interpolator.prototype.nest = function nest(str, fc) {
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
var match = void 0;
var value = void 0;
var clonedOptions = _extends({}, options);
clonedOptions.applyPostProcessor = false;
function handleHasOptions(key) {
if (key.indexOf(',') < 0) return key;
var p = key.split(',');
key = p.shift();
var optionsString = p.join(',');
optionsString = this.interpolate(optionsString, clonedOptions);
optionsString = optionsString.replace(/'/g, '"');
try {
clonedOptions = JSON.parse(optionsString);
} catch (e) {
this.logger.error('failed parsing options string in nesting for key ' + key, e);
}
return key;
}
while (match = this.nestingRegexp.exec(str)) {
value = fc(handleHasOptions.call(this, match[1].trim()), clonedOptions);
if (value && match[0] === str && typeof value !== 'string') return value;
if (typeof value !== 'string') value = utils.makeString(value);
if (!value) {
this.logger.warn('missed to resolve ' + match[1] + ' for nesting ' + str);
value = '';
}
str = str.replace(match[0], value);
this.regexp.lastIndex = 0;
}
return str;
};
return Interpolator;
}();
exports.default = Interpolator;
}, 653, null, "i18next/dist/commonjs/Interpolator.js");
__d(/* i18next/dist/commonjs/BackendConnector.js */function(global, require, module, exports) {'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends = Object.assign || function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}return target;
};
var _slicedToArray = function () {
function sliceIterator(arr, i) {
var _arr = [];var _n = true;var _d = false;var _e = undefined;try {
for (var _i = arr[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](), _s; !(_n = (_s = _i.next()).done); _n = true) {
_arr.push(_s.value);if (i && _arr.length === i) break;
}
} catch (err) {
_d = true;_e = err;
} finally {
try {
if (!_n && _i["return"]) _i["return"]();
} finally {
if (_d) throw _e;
}
}return _arr;
}return function (arr, i) {
if (Array.isArray(arr)) {
return arr;
} else if ((typeof Symbol === "function" ? Symbol.iterator : "@@iterator") in Object(arr)) {
return sliceIterator(arr, i);
} else {
throw new TypeError("Invalid attempt to destructure non-iterable instance");
}
};
}();
var _utils = require(647 ); // 647 = ./utils
var utils = _interopRequireWildcard(_utils);
var _logger = require(644 ); // 644 = ./logger
var _logger2 = _interopRequireDefault(_logger);
var _EventEmitter2 = require(645 ); // 645 = ./EventEmitter
var _EventEmitter3 = _interopRequireDefault(_EventEmitter2);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
function _interopRequireWildcard(obj) {
if (obj && obj.__esModule) {
return obj;
} else {
var newObj = {};if (obj != null) {
for (var key in obj) {
if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
}
}newObj.default = obj;return newObj;
}
}
function _defaults(obj, defaults) {
var keys = Object.getOwnPropertyNames(defaults);for (var i = 0; i < keys.length; i++) {
var key = keys[i];var value = Object.getOwnPropertyDescriptor(defaults, key);if (value && value.configurable && obj[key] === undefined) {
Object.defineProperty(obj, key, value);
}
}return obj;
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
function _possibleConstructorReturn(self, call) {
if (!self) {
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}return call && (typeof call === "object" || typeof call === "function") ? call : self;
}
function _inherits(subClass, superClass) {
if (typeof superClass !== "function" && superClass !== null) {
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
}subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass);
}
function remove(arr, what) {
var found = arr.indexOf(what);
while (found !== -1) {
arr.splice(found, 1);
found = arr.indexOf(what);
}
}
var Connector = function (_EventEmitter) {
_inherits(Connector, _EventEmitter);
function Connector(backend, store, services) {
var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
_classCallCheck(this, Connector);
var _this = _possibleConstructorReturn(this, _EventEmitter.call(this));
_this.backend = backend;
_this.store = store;
_this.services = services;
_this.options = options;
_this.logger = _logger2.default.create('backendConnector');
_this.state = {};
_this.queue = [];
if (_this.backend && _this.backend.init) {
_this.backend.init(services, options.backend, options);
}
return _this;
}
Connector.prototype.queueLoad = function queueLoad(languages, namespaces, callback) {
var _this2 = this;
var toLoad = [];
var pending = [];
var toLoadLanguages = [];
var toLoadNamespaces = [];
languages.forEach(function (lng) {
var hasAllNamespaces = true;
namespaces.forEach(function (ns) {
var name = lng + '|' + ns;
if (_this2.store.hasResourceBundle(lng, ns)) {
_this2.state[name] = 2;
} else if (_this2.state[name] < 0) {} else if (_this2.state[name] === 1) {
if (pending.indexOf(name) < 0) pending.push(name);
} else {
_this2.state[name] = 1;
hasAllNamespaces = false;
if (pending.indexOf(name) < 0) pending.push(name);
if (toLoad.indexOf(name) < 0) toLoad.push(name);
if (toLoadNamespaces.indexOf(ns) < 0) toLoadNamespaces.push(ns);
}
});
if (!hasAllNamespaces) toLoadLanguages.push(lng);
});
if (toLoad.length || pending.length) {
this.queue.push({
pending: pending,
loaded: {},
errors: [],
callback: callback
});
}
return {
toLoad: toLoad,
pending: pending,
toLoadLanguages: toLoadLanguages,
toLoadNamespaces: toLoadNamespaces
};
};
Connector.prototype.loaded = function loaded(name, err, data) {
var _this3 = this;
var _name$split = name.split('|'),
_name$split2 = _slicedToArray(_name$split, 2),
lng = _name$split2[0],
ns = _name$split2[1];
if (err) this.emit('failedLoading', lng, ns, err);
if (data) {
this.store.addResourceBundle(lng, ns, data);
}
this.state[name] = err ? -1 : 2;
this.queue.forEach(function (q) {
utils.pushPath(q.loaded, [lng], ns);
remove(q.pending, name);
if (err) q.errors.push(err);
if (q.pending.length === 0 && !q.done) {
_this3.emit('loaded', q.loaded);
q.done = true;
if (q.errors.length) {
q.callback(q.errors);
} else {
q.callback();
}
}
});
this.queue = this.queue.filter(function (q) {
return !q.done;
});
};
Connector.prototype.read = function read(lng, ns, fcName) {
var tried = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
var _this4 = this;
var wait = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 250;
var callback = arguments[5];
if (!lng.length) return callback(null, {});
return this.backend[fcName](lng, ns, function (err, data) {
if (err && data && tried < 5) {
setTimeout(function () {
_this4.read.call(_this4, lng, ns, fcName, tried + 1, wait * 2, callback);
}, wait);
return;
}
callback(err, data);
});
};
Connector.prototype.load = function load(languages, namespaces, callback) {
var _this5 = this;
if (!this.backend) {
this.logger.warn('No backend was added via i18next.use. Will not load resources.');
return callback && callback();
}
var options = _extends({}, this.backend.options, this.options.backend);
if (typeof languages === 'string') languages = this.services.languageUtils.toResolveHierarchy(languages);
if (typeof namespaces === 'string') namespaces = [namespaces];
var toLoad = this.queueLoad(languages, namespaces, callback);
if (!toLoad.toLoad.length) {
if (!toLoad.pending.length) callback();
return null;
}
if (options.allowMultiLoading && this.backend.readMulti) {
this.read(toLoad.toLoadLanguages, toLoad.toLoadNamespaces, 'readMulti', null, null, function (err, data) {
if (err) _this5.logger.warn('loading namespaces ' + toLoad.toLoadNamespaces.join(', ') + ' for languages ' + toLoad.toLoadLanguages.join(', ') + ' via multiloading failed', err);
if (!err && data) _this5.logger.log('successfully loaded namespaces ' + toLoad.toLoadNamespaces.join(', ') + ' for languages ' + toLoad.toLoadLanguages.join(', ') + ' via multiloading', data);
toLoad.toLoad.forEach(function (name) {
var _name$split3 = name.split('|'),
_name$split4 = _slicedToArray(_name$split3, 2),
l = _name$split4[0],
n = _name$split4[1];
var bundle = utils.getPath(data, [l, n]);
if (bundle) {
_this5.loaded(name, err, bundle);
} else {
var error = 'loading namespace ' + n + ' for language ' + l + ' via multiloading failed';
_this5.loaded(name, error);
_this5.logger.error(error);
}
});
});
} else {
toLoad.toLoad.forEach(function (name) {
_this5.loadOne(name);
});
}
};
Connector.prototype.reload = function reload(languages, namespaces) {
var _this6 = this;
if (!this.backend) {
this.logger.warn('No backend was added via i18next.use. Will not load resources.');
}
var options = _extends({}, this.backend.options, this.options.backend);
if (typeof languages === 'string') languages = this.services.languageUtils.toResolveHierarchy(languages);
if (typeof namespaces === 'string') namespaces = [namespaces];
if (options.allowMultiLoading && this.backend.readMulti) {
this.read(languages, namespaces, 'readMulti', null, null, function (err, data) {
if (err) _this6.logger.warn('reloading namespaces ' + namespaces.join(', ') + ' for languages ' + languages.join(', ') + ' via multiloading failed', err);
if (!err && data) _this6.logger.log('successfully reloaded namespaces ' + namespaces.join(', ') + ' for languages ' + languages.join(', ') + ' via multiloading', data);
languages.forEach(function (l) {
namespaces.forEach(function (n) {
var bundle = utils.getPath(data, [l, n]);
if (bundle) {
_this6.loaded(l + '|' + n, err, bundle);
} else {
var error = 'reloading namespace ' + n + ' for language ' + l + ' via multiloading failed';
_this6.loaded(l + '|' + n, error);
_this6.logger.error(error);
}
});
});
});
} else {
languages.forEach(function (l) {
namespaces.forEach(function (n) {
_this6.loadOne(l + '|' + n, 're');
});
});
}
};
Connector.prototype.loadOne = function loadOne(name) {
var _this7 = this;
var prefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
var _name$split5 = name.split('|'),
_name$split6 = _slicedToArray(_name$split5, 2),
lng = _name$split6[0],
ns = _name$split6[1];
this.read(lng, ns, 'read', null, null, function (err, data) {
if (err) _this7.logger.warn(prefix + 'loading namespace ' + ns + ' for language ' + lng + ' failed', err);
if (!err && data) _this7.logger.log(prefix + 'loaded namespace ' + ns + ' for language ' + lng, data);
_this7.loaded(name, err, data);
});
};
Connector.prototype.saveMissing = function saveMissing(languages, namespace, key, fallbackValue) {
if (this.backend && this.backend.create) this.backend.create(languages, namespace, key, fallbackValue);
if (!languages || !languages[0]) return;
this.store.addResource(languages[0], namespace, key, fallbackValue);
};
return Connector;
}(_EventEmitter3.default);
exports.default = Connector;
}, 654, null, "i18next/dist/commonjs/BackendConnector.js");
__d(/* i18next/dist/commonjs/CacheConnector.js */function(global, require, module, exports) {'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends = Object.assign || function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}return target;
};
var _logger = require(644 ); // 644 = ./logger
var _logger2 = _interopRequireDefault(_logger);
var _EventEmitter2 = require(645 ); // 645 = ./EventEmitter
var _EventEmitter3 = _interopRequireDefault(_EventEmitter2);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
function _defaults(obj, defaults) {
var keys = Object.getOwnPropertyNames(defaults);for (var i = 0; i < keys.length; i++) {
var key = keys[i];var value = Object.getOwnPropertyDescriptor(defaults, key);if (value && value.configurable && obj[key] === undefined) {
Object.defineProperty(obj, key, value);
}
}return obj;
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
function _possibleConstructorReturn(self, call) {
if (!self) {
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}return call && (typeof call === "object" || typeof call === "function") ? call : self;
}
function _inherits(subClass, superClass) {
if (typeof superClass !== "function" && superClass !== null) {
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
}subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass);
}
var Connector = function (_EventEmitter) {
_inherits(Connector, _EventEmitter);
function Connector(cache, store, services) {
var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
_classCallCheck(this, Connector);
var _this = _possibleConstructorReturn(this, _EventEmitter.call(this));
_this.cache = cache;
_this.store = store;
_this.services = services;
_this.options = options;
_this.logger = _logger2.default.create('cacheConnector');
if (_this.cache && _this.cache.init) _this.cache.init(services, options.cache, options);
return _this;
}
Connector.prototype.load = function load(languages, namespaces, callback) {
var _this2 = this;
if (!this.cache) return callback && callback();
var options = _extends({}, this.cache.options, this.options.cache);
var loadLngs = typeof languages === 'string' ? this.services.languageUtils.toResolveHierarchy(languages) : languages;
if (options.enabled) {
this.cache.load(loadLngs, function (err, data) {
if (err) _this2.logger.error('loading languages ' + loadLngs.join(', ') + ' from cache failed', err);
if (data) {
for (var l in data) {
if (Object.prototype.hasOwnProperty.call(data, l)) {
for (var n in data[l]) {
if (Object.prototype.hasOwnProperty.call(data[l], n)) {
if (n !== 'i18nStamp') {
var bundle = data[l][n];
if (bundle) _this2.store.addResourceBundle(l, n, bundle);
}
}
}
}
}
}
if (callback) callback();
});
} else if (callback) {
callback();
}
};
Connector.prototype.save = function save() {
if (this.cache && this.options.cache && this.options.cache.enabled) this.cache.save(this.store.data);
};
return Connector;
}(_EventEmitter3.default);
exports.default = Connector;
}, 655, null, "i18next/dist/commonjs/CacheConnector.js");
__d(/* i18next/dist/commonjs/defaults.js */function(global, require, module, exports) {'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.transformOptions = transformOptions;
function get() {
return {
debug: false,
initImmediate: true,
ns: ['translation'],
defaultNS: ['translation'],
fallbackLng: ['dev'],
fallbackNS: false,
whitelist: false,
nonExplicitWhitelist: false,
load: 'all',
preload: false,
simplifyPluralSuffix: true,
keySeparator: '.',
nsSeparator: ':',
pluralSeparator: '_',
contextSeparator: '_',
saveMissing: false,
saveMissingTo: 'fallback',
missingKeyHandler: false,
postProcess: false,
returnNull: true,
returnEmptyString: true,
returnObjects: false,
joinArrays: false,
returnedObjectHandler: function returnedObjectHandler() {},
parseMissingKeyHandler: false,
appendNamespaceToMissingKey: false,
appendNamespaceToCIMode: false,
overloadTranslationOptionHandler: function handle(args) {
return { defaultValue: args[1] };
},
interpolation: {
escapeValue: true,
format: function format(value, _format, lng) {
return value;
},
prefix: '{{',
suffix: '}}',
formatSeparator: ',',
unescapePrefix: '-',
nestingPrefix: '$t(',
nestingSuffix: ')',
defaultVariables: undefined }
};
}
exports.get = get;
function transformOptions(options) {
if (typeof options.ns === 'string') options.ns = [options.ns];
if (typeof options.fallbackLng === 'string') options.fallbackLng = [options.fallbackLng];
if (typeof options.fallbackNS === 'string') options.fallbackNS = [options.fallbackNS];
if (options.whitelist && options.whitelist.indexOf('cimode') < 0) options.whitelist.push('cimode');
return options;
}
}, 656, null, "i18next/dist/commonjs/defaults.js");
__d(/* i18next-xhr-backend/index.js */function(global, require, module, exports) {module.exports = require(658 ).default; // 658 = ./dist/commonjs/index.js
}, 657, null, "i18next-xhr-backend/index.js");
__d(/* i18next-xhr-backend/dist/commonjs/index.js */function(global, require, module, exports) {'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if ("value" in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor);
}
}return function (Constructor, protoProps, staticProps) {
if (protoProps) defineProperties(Constructor.prototype, protoProps);if (staticProps) defineProperties(Constructor, staticProps);return Constructor;
};
}();
var _utils = require(659 ); // 659 = ./utils
var utils = _interopRequireWildcard(_utils);
var _ajax = require(660 ); // 660 = ./ajax
var _ajax2 = _interopRequireDefault(_ajax);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
function _interopRequireWildcard(obj) {
if (obj && obj.__esModule) {
return obj;
} else {
var newObj = {};if (obj != null) {
for (var key in obj) {
if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
}
}newObj.default = obj;return newObj;
}
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
function getDefaults() {
return {
loadPath: '/locales/{{lng}}/{{ns}}.json',
addPath: 'locales/add/{{lng}}/{{ns}}',
allowMultiLoading: false,
parse: JSON.parse,
crossDomain: false,
ajax: _ajax2.default
};
}
var Backend = function () {
function Backend(services) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
_classCallCheck(this, Backend);
this.init(services, options);
this.type = 'backend';
}
_createClass(Backend, [{
key: 'init',
value: function init(services) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
this.services = services;
this.options = utils.defaults(options, this.options || {}, getDefaults());
}
}, {
key: 'readMulti',
value: function readMulti(languages, namespaces, callback) {
var loadPath = this.options.loadPath;
if (typeof this.options.loadPath === 'function') {
loadPath = this.options.loadPath(languages, namespaces);
}
var url = this.services.interpolator.interpolate(loadPath, { lng: languages.join('+'), ns: namespaces.join('+') });
this.loadUrl(url, callback);
}
}, {
key: 'read',
value: function read(language, namespace, callback) {
var loadPath = this.options.loadPath;
if (typeof this.options.loadPath === 'function') {
loadPath = this.options.loadPath([language], [namespace]);
}
var url = this.services.interpolator.interpolate(loadPath, { lng: language, ns: namespace });
this.loadUrl(url, callback);
}
}, {
key: 'loadUrl',
value: function loadUrl(url, callback) {
var _this = this;
this.options.ajax(url, this.options, function (data, xhr) {
if (xhr.status >= 500 && xhr.status < 600) return callback('failed loading ' + url, true);
if (xhr.status >= 400 && xhr.status < 500) return callback('failed loading ' + url, false);
var ret = void 0,
err = void 0;
try {
ret = _this.options.parse(data, url);
} catch (e) {
err = 'failed parsing ' + url + ' to json';
}
if (err) return callback(err, false);
callback(null, ret);
});
}
}, {
key: 'create',
value: function create(languages, namespace, key, fallbackValue) {
var _this2 = this;
if (typeof languages === 'string') languages = [languages];
var payload = {};
payload[key] = fallbackValue || '';
languages.forEach(function (lng) {
var url = _this2.services.interpolator.interpolate(_this2.options.addPath, { lng: lng, ns: namespace });
_this2.options.ajax(url, _this2.options, function (data, xhr) {}, payload);
});
}
}]);
return Backend;
}();
Backend.type = 'backend';
exports.default = Backend;
}, 658, null, "i18next-xhr-backend/dist/commonjs/index.js");
__d(/* i18next-xhr-backend/dist/commonjs/utils.js */function(global, require, module, exports) {"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.defaults = defaults;
exports.extend = extend;
var arr = [];
var each = arr.forEach;
var slice = arr.slice;
function defaults(obj) {
each.call(slice.call(arguments, 1), function (source) {
if (source) {
for (var prop in source) {
if (obj[prop] === undefined) obj[prop] = source[prop];
}
}
});
return obj;
}
function extend(obj) {
each.call(slice.call(arguments, 1), function (source) {
if (source) {
for (var prop in source) {
obj[prop] = source[prop];
}
}
});
return obj;
}
}, 659, null, "i18next-xhr-backend/dist/commonjs/utils.js");
__d(/* i18next-xhr-backend/dist/commonjs/ajax.js */function(global, require, module, exports) {'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _typeof = typeof Symbol === "function" && typeof (typeof Symbol === "function" ? Symbol.iterator : "@@iterator") === "symbol" ? function (obj) {
return typeof obj;
} : function (obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== (typeof Symbol === "function" ? Symbol.prototype : "@@prototype") ? "symbol" : typeof obj;
};
function addQueryString(url, params) {
if (params && (typeof params === 'undefined' ? 'undefined' : _typeof(params)) === 'object') {
var queryString = '',
e = encodeURIComponent;
for (var paramName in params) {
queryString += '&' + e(paramName) + '=' + e(params[paramName]);
}
if (!queryString) {
return url;
}
url = url + (url.indexOf('?') !== -1 ? '&' : '?') + queryString.slice(1);
}
return url;
}
function ajax(url, options, callback, data, cache) {
if (data && (typeof data === 'undefined' ? 'undefined' : _typeof(data)) === 'object') {
if (!cache) {
data['_t'] = new Date();
}
data = addQueryString('', data).slice(1);
}
if (options.queryStringParams) {
url = addQueryString(url, options.queryStringParams);
}
try {
var x;
if (XMLHttpRequest) {
x = new XMLHttpRequest();
} else {
x = new ActiveXObject('MSXML2.XMLHTTP.3.0');
}
x.open(data ? 'POST' : 'GET', url, 1);
if (!options.crossDomain) {
x.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
}
x.withCredentials = !!options.withCredentials;
if (data) {
x.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
}
var h = options.customHeaders;
if (h) {
for (var i in h) {
x.setRequestHeader(i, h[i]);
}
}
x.onreadystatechange = function () {
x.readyState > 3 && callback && callback(x.responseText, x);
};
x.send(data);
} catch (e) {
console && console.log(e);
}
}
exports.default = ajax;
}, 660, null, "i18next-xhr-backend/dist/commonjs/ajax.js");
__d(/* jitsi-meet/lang/languages.json */function(global, require, module, exports) {module.exports = module.exports = {
"en": "English",
"bg": "Bulgarian",
"de": "German",
"es": "Spanish",
"fr": "French",
"hy": "Armenian",
"it": "Italian",
"oc": "Occitan",
"pl": "Polish",
"ptBR": "Portuguese (Brazil)",
"ru": "Russian",
"sk": "Slovak",
"sl": "Slovenian",
"sv": "Swedish",
"tr": "Turkish",
"zhCN": "Chinese (China)",
"nb": "Norwegian Bokmal",
"eo": "Esperanto"
};
}, 661, null, "jitsi-meet/lang/languages.json");
__d(/* jitsi-meet/lang/main.json */function(global, require, module, exports) {module.exports = module.exports = {
"contactlist": "Participants (__pcount__)",
"addParticipants": "Share the link",
"roomLocked": "Callers must enter a password",
"roomUnlocked": "Anyone with the link can join",
"passwordSetRemotely": "set by another participant",
"connectionsettings": "Connection Settings",
"poweredby": "powered by",
"feedback": "Give us your feedback",
"inviteUrlDefaultMsg": "Your conference is currently being created...",
"me": "me",
"speaker": "Speaker",
"raisedHand": "Would like to speak",
"defaultNickname": "ex. Jane Pink",
"defaultLink": "e.g. __url__",
"callingName": "__name__",
"audioOnly": {
"audioOnly": "Audio only",
"featureToggleDisabled": "Toggling of __feature__ is disabled while in audio only mode"
},
"userMedia": {
"react-nativeGrantPermissions": "Select <b><i>Allow</i></b> when your browser asks for permissions.",
"chromeGrantPermissions": "Select <b><i>Allow</i></b> when your browser asks for permissions.",
"androidGrantPermissions": "Select <b><i>Allow</i></b> when your browser asks for permissions.",
"firefoxGrantPermissions": "Select <b><i>Share Selected Device</i></b> when your browser asks for permissions.",
"operaGrantPermissions": "Select <b><i>Allow</i></b> when your browser asks for permissions.",
"iexplorerGrantPermissions": "Select <b><i>OK</i></b> when your browser asks for permissions.",
"safariGrantPermissions": "Select <b><i>OK</i></b> when your browser asks for permissions.",
"nwjsGrantPermissions": "Please grant permissions to use your camera and microphone",
"edgeGrantPermissions": "Select <b><i>Yes</i></b> when your browser asks for permissions."
},
"keyboardShortcuts": {
"keyboardShortcuts": "Keyboard shortcuts",
"raiseHand": "Raise or lower your hand",
"pushToTalk": "Push to talk",
"toggleScreensharing": "Switch between camera and screen sharing",
"toggleFilmstrip": "Show or hide the videos",
"toggleShortcuts": "Show or hide this help menu",
"focusLocal": "Focus on your video",
"focusRemote": "Focus on another caller's video",
"toggleChat": "Open or close the chat",
"mute": "Mute or unmute your microphone",
"fullScreen": "Enter or exit full screen",
"videoMute": "Start or stop your camera",
"showSpeakerStats": "Show speaker stats"
},
"welcomepage": {
"disable": "Don't show this page again",
"feature1": {
"content": "No downloads required. __app__ works directly within your browser. Simply share your conference URL with others to get started.",
"title": "Simple to use"
},
"feature2": {
"content": "Multi-party video conferences work with as little as 128Kbps. Screen-sharing and audio-only conferences are possible with far less.",
"title": "Low bandwidth"
},
"feature3": {
"content": "__app__ is licensed under the Apache License. You are free to download, use, modify, and share it as per this license.",
"title": "Open source"
},
"feature4": {
"content": "There are no artificial restrictions on the number of users or conference participants. Server power and bandwidth are the only limiting factors.",
"title": "Unlimited users"
},
"feature5": {
"content": "It's easy to share your screen with others. __app__ is ideal for on-line presentations, lectures, and tech support sessions.",
"title": "Screen sharing"
},
"feature6": {
"content": "Need some privacy? __app__ conference rooms can be secured with a password in order to exclude unwanted guests and prevent interruptions.",
"title": "Secure rooms"
},
"feature7": {
"content": "__app__ features Etherpad, a real-time collaborative text editor that's great for meeting minutes, writing articles, and more.",
"title": "Shared notes"
},
"feature8": {
"content": "Learn about your users through easy integration with Piwik, Google Analytics, and other usage monitoring and statistics systems.",
"title": "Usage statistics"
},
"go": "GO",
"join": "JOIN",
"privacy": "Privacy",
"roomname": "Enter room name",
"roomnamePlaceHolder": "room name",
"sendFeedback": "Send feedback",
"terms": "Terms"
},
"startupoverlay": {
"policyText": " ",
"title": "__app__ needs to use your microphone and camera."
},
"suspendedoverlay": {
"title": "Your video call was interrupted because this computer went to sleep.",
"text": "Press the <i>Rejoin</i> button to reconnect.",
"rejoinKeyTitle": "Rejoin"
},
"toolbar": {
"addPeople": "Add people to your call",
"audioonly": "Enable / Disable audio only mode (saves bandwidth)",
"mute": "Mute / Unmute",
"videomute": "Start / Stop camera",
"authenticate": "Authenticate",
"lock": "Lock / Unlock room",
"invite": "Share the link",
"chat": "Open / Close chat",
"etherpad": "Open / Close shared document",
"sharedvideo": "Share a YouTube video",
"sharescreen": "Start / Stop screen sharing",
"fullscreen": "View / Exit full screen",
"sip": "Call SIP number",
"Settings": "Settings",
"hangup": "Leave",
"login": "Login",
"logout": "Logout",
"dialpad": "Open / Close dialpad",
"sharedVideoMutedPopup": "Your shared video has been muted so<br/>that you can talk to the other participants.",
"micMutedPopup": "Your microphone has been muted so that you<br/>would fully enjoy your shared video.",
"talkWhileMutedPopup": "Trying to speak? You are muted.",
"unableToUnmutePopup": "You cannot un-mute while the shared video is on.",
"cameraDisabled": "Camera is not available",
"micDisabled": "Microphone is not available",
"filmstrip": "Show / Hide videos",
"profile": "Edit your profile",
"raiseHand": "Raise / Lower your hand"
},
"unsupportedBrowser": {
"appInstalled": "or if you already have it<br /><strong>then</strong>",
"appNotInstalled": "You need <strong>__app__</strong> to join a conversation on your mobile",
"downloadApp": "Download the App",
"joinConversation": "Join the conversation",
"startConference": "Start a conference"
},
"bottomtoolbar": {
"chat": "Open / close chat",
"filmstrip": "Show / hide videos",
"contactlist": "View and invite participants"
},
"chat": {
"nickname": {
"title": "Enter a nickname in the box below",
"popover": "Choose a nickname"
},
"messagebox": "Enter text..."
},
"settings": {
"title": "Settings",
"update": "Update",
"name": "Name",
"startAudioMuted": "Everyone starts muted",
"startVideoMuted": "Everyone starts hidden",
"selectCamera": "Camera",
"selectMic": "Microphone",
"selectAudioOutput": "Audio output",
"followMe": "Everyone follows me",
"noDevice": "None",
"cameraAndMic": "Camera and microphone",
"moderator": "MODERATOR",
"password": "SET PASSWORD",
"audioVideo": "AUDIO AND VIDEO"
},
"profile": {
"title": "Profile",
"setDisplayNameLabel": "Set your display name",
"setEmailLabel": "Set your gravatar email",
"setEmailInput": "Enter e-mail"
},
"videothumbnail": {
"editnickname": "Click to edit your<br/>display name",
"moderator": "The owner of<br/>this conference",
"videomute": "Participant has<br/>stopped the camera",
"mute": "Participant is muted",
"kick": "Kick out",
"muted": "Muted",
"domute": "Mute",
"flip": "Flip",
"remoteControl": "Remote control"
},
"connectionindicator": {
"header": "Connection data",
"bitrate": "Bitrate:",
"packetloss": "Packet loss:",
"resolution": "Resolution:",
"framerate": "Frame rate:",
"less": "Show less",
"more": "Show more",
"address": "Address:",
"remoteport_plural": "Remote ports:",
"localport_plural": "Local ports:",
"remoteport": "Remote port:",
"localport": "Local port:",
"localaddress": "Local address:",
"localaddress_plural": "Local addresses:",
"remoteaddress": "Remote address:",
"remoteaddress_plural": "Remote addresses:",
"transport": "Transport:",
"transport_plural": "Transports:",
"bandwidth": "Estimated bandwidth:",
"na": "Come back here for connection information once the conference starts",
"peer_to_peer": " (p2p)",
"turn": " (turn)"
},
"notify": {
"disconnected": "disconnected",
"moderator": "Moderator rights granted!",
"connected": "connected",
"somebody": "Somebody",
"me": "Me",
"focus": "Conference focus",
"focusFail": "__component__ not available - retry in __ms__ sec",
"grantedTo": "Moderator rights granted to __to__!",
"grantedToUnknown": "Moderator rights granted to $t(notify.somebody)!",
"muted": "You have started the conversation muted.",
"mutedTitle": "You're muted!",
"raisedHand": "Would like to speak."
},
"dialog": {
"add": "Add",
"allow": "Allow",
"kickMessage": "Ouch! You have been kicked out of the meet!",
"popupError": "Your browser is blocking popup windows from this site. Please enable popups in your browser's security settings and try again.",
"passwordErrorTitle": "Password Error",
"passwordError": "This conversation is currently protected by a password. Only the owner of the conference can set a password.",
"passwordError2": "This conversation isn't currently protected by a password. Only the owner of the conference can set a password.",
"connectError": "Oops! Something went wrong and we couldn't connect to the conference.",
"connectErrorWithMsg": "Oops! Something went wrong and we couldn't connect to the conference: __msg__",
"incorrectPassword": "Password is incorrect",
"connecting": "Connecting",
"copy": "Copy",
"error": "Error",
"createPassword": "Create password",
"detectext": "Error when trying to detect desktopsharing extension.",
"failtoinstall": "Failed to install desktop sharing extension",
"failedpermissions": "Failed to obtain permissions to use the local microphone and/or camera.",
"conferenceReloadTitle": "Unfortunately, something went wrong.",
"conferenceReloadMsg": "We're trying to fix this. Reconnecting in __seconds__ sec...",
"conferenceDisconnectTitle": "You have been disconnected.",
"conferenceDisconnectMsg": "You may want to check your network connection. Reconnecting in __seconds__ sec...",
"rejoinNow": "Rejoin now",
"maxUsersLimitReached": "The limit for maximum number of participants in the conference has been reached. The conference is full. Please try again later!",
"lockTitle": "Lock failed",
"lockMessage": "Failed to lock the conference.",
"warning": "Warning",
"passwordNotSupported": "Room passwords are currently not supported.",
"internalErrorTitle": "Internal error",
"internalError": "Oups! Something went wrong. The following error occurred: [setRemoteDescription]",
"unableToSwitch": "Unable to switch video stream.",
"SLDFailure": "Oops! Something went wrong and we failed to mute! (SLD Failure)",
"SRDFailure": "Oops! Something went wrong and we failed to stop video! (SRD Failure)",
"oops": "Oops!",
"currentPassword": "The current password is",
"passwordLabel": "Password",
"defaultError": "There was some kind of error",
"passwordRequired": "Password required",
"Ok": "Ok",
"done": "Done",
"Remove": "Remove",
"removePassword": "Remove password",
"shareVideoTitle": "Share a video",
"shareVideoLinkError": "Please provide a correct youtube link.",
"removeSharedVideoTitle": "Remove shared video",
"removeSharedVideoMsg": "Are you sure you would like to remove your shared video?",
"alreadySharedVideoMsg": "Another participant is already sharing video. This conference allows only one shared video at a time.",
"WaitingForHost": "Waiting for the host ...",
"WaitForHostMsg": "The conference <b>__room__ </b> has not yet started. If you are the host then please authenticate. Otherwise, please wait for the host to arrive.",
"IamHost": "I am the host",
"Cancel": "Cancel",
"Submit": "Submit",
"retry": "Retry",
"logoutTitle": "Logout",
"logoutQuestion": "Are you sure you want to logout and stop the conference?",
"sessTerminated": "Session Terminated",
"hungUp": "You hung up",
"joinAgain": "Join again",
"Share": "Share",
"Save": "Save",
"recording": "Recording",
"recordingToken": "Enter recording token",
"passwordCheck": "Are you sure you would like to remove your password?",
"passwordMsg": "Set a password to lock your room",
"shareLink": "Share the link to the call",
"settings1": "Configure your conference",
"settings2": "Participants join muted",
"settings3": "Require nicknames<br/><br/>Set a password to lock your room:",
"yourPassword": "Enter new password",
"Back": "Back",
"serviceUnavailable": "Service unavailable",
"gracefulShutdown": "Our service is currently down for maintenance. Please try again later.",
"Yes": "Yes",
"reservationError": "Reservation system error",
"reservationErrorMsg": "Error code: __code__, message: __msg__",
"password": "Enter password",
"userPassword": "user password",
"token": "token",
"tokenAuthFailedTitle": "Authentication problem",
"tokenAuthFailed": "Sorry, you're not allowed to join this call.",
"displayNameRequired": "Display name is required",
"enterDisplayName": "Please enter your display name",
"extensionRequired": "Extension required:",
"firefoxExtensionPrompt": "You need to install a Firefox extension in order to use screen sharing. Please try again after you <a href='__url__'>get it from here</a>!",
"rateExperience": "Please rate your meeting experience.",
"feedbackHelp": "Your feedback will help us to improve our video experience.",
"feedbackQuestion": "Tell us about your call!",
"thankYou": "Thank you for using __appName__!",
"sorryFeedback": "We're sorry to hear that. Would you like to tell us more?",
"liveStreaming": "Live Streaming",
"streamKey": "Stream name/key",
"startLiveStreaming": "Start live streaming",
"stopStreamingWarning": "Are you sure you would like to stop the live streaming?",
"stopRecordingWarning": "Are you sure you would like to stop the recording?",
"stopLiveStreaming": "Stop live streaming",
"stopRecording": "Stop recording",
"doNotShowWarningAgain": "Don't show this warning again",
"doNotShowMessageAgain": "Don't show this message again",
"permissionDenied": "Permission Denied",
"screenSharingPermissionDeniedError": "You have not granted permission to share your screen.",
"micErrorPresent": "There was an error connecting to your microphone.",
"cameraErrorPresent": "There was an error connecting to your camera.",
"cameraUnsupportedResolutionError": "Your camera does not support required video resolution.",
"cameraUnknownError": "Cannot use camera for a unknown reason.",
"cameraPermissionDeniedError": "You have not granted permission to use your camera. You can still join the conference but others won't see you. Use the camera button in the address bar to fix this.",
"cameraNotFoundError": "Camera was not found.",
"cameraConstraintFailedError": "Your camera does not satisfy some of the required constraints.",
"micUnknownError": "Cannot use microphone for a unknown reason.",
"micPermissionDeniedError": "You have not granted permission to use your microphone. You can still join the conference but others won't hear you. Use the camera button in the address bar to fix this.",
"micNotFoundError": "Microphone was not found.",
"micConstraintFailedError": "Your microphone does not satisfy some of the required constraints.",
"micNotSendingData": "We are unable to access your microphone. Please select another device from the settings menu or try to restart the application.",
"cameraNotSendingData": "We are unable to access your camera. Please check if another application is using this device, select another device from the settings menu or try to restart the application.",
"goToStore": "Go to the webstore",
"externalInstallationTitle": "Extension required",
"externalInstallationMsg": "You need to install our desktop sharing extension.",
"inlineInstallationMsg": "You need to install our desktop sharing extension.",
"inlineInstallExtension": "Install now",
"muteParticipantTitle": "Mute this participant?",
"muteParticipantBody": "You won't be able to unmute them, but they can unmute themselves at any time.",
"muteParticipantButton": "Mute",
"remoteControlTitle": "Remote desktop control",
"remoteControlRequestMessage": "Will you allow __user__ to remotely control your desktop?",
"remoteControlShareScreenWarning": "Note that if you press \"Allow\" you will share your screen!",
"remoteControlDeniedMessage": "__user__ rejected your remote control request!",
"remoteControlAllowedMessage": "__user__ accepted your remote control request!",
"remoteControlErrorMessage": "An error occurred while trying to request remote control permissions from __user__!",
"startRemoteControlErrorMessage": "An error occurred while trying to start the remote control session!",
"remoteControlStopMessage": "The remote control session ended!",
"close": "Close",
"shareYourScreen": "Share your screen",
"yourEntireScreen": "Your entire screen",
"applicationWindow": "Application window"
},
"email": {
"sharedKey": ["This conference is password-protected. Please use the following pin when joining:", "", "", "__sharedKey__", "", ""],
"subject": "Invitation to a __appName__ (__conferenceName__)",
"body": ["Hey there, I%27d like to invite you to a __appName__ conference I%27ve just set up.", "", "", "Please click on the following link in order to join the conference.", "", "", "__roomUrl__", "", "", "__sharedKeyText__", " Note that __appName__ is currently only supported by __supportedBrowsers__, so you need to be using one of these browsers.", "", "", "Talk to you in a sec!"],
"and": "and"
},
"connection": {
"ERROR": "Error",
"CONNECTING": "Connecting",
"RECONNECTING": "A network problem occurred. Reconnecting...",
"CONNFAIL": "Connection failed",
"AUTHENTICATING": "Authenticating",
"AUTHFAIL": "Authentication failed",
"CONNECTED": "Connected",
"DISCONNECTED": "Disconnected",
"DISCONNECTING": "Disconnecting",
"ATTACHED": "Attached",
"FETCH_SESSION_ID": "Obtaining session-id...",
"GOT_SESSION_ID": "Obtaining session-id... Done",
"GET_SESSION_ID_ERROR": "Get session-id error: __code__",
"USER_CONNECTION_INTERRUPTED": "__displayName__ is having connectivity issues...",
"LOW_BANDWIDTH": "Video for __displayName__ has been turned off to save bandwidth"
},
"recording": {
"pending": "Recording waiting for a participant to join...",
"on": "Recording",
"off": "Recording stopped",
"failedToStart": "Recording failed to start",
"buttonTooltip": "Start / Stop recording",
"error": "Recording failed. Please try again.",
"unavailable": "The recording service is currently unavailable. Please try again later."
},
"liveStreaming": {
"pending": "Starting Live Stream...",
"on": "Live Streaming",
"off": "Live Streaming Stopped",
"unavailable": "The live streaming service is currently unavailable. Please try again later.",
"failedToStart": "Live streaming failed to start",
"buttonTooltip": "Start / Stop live stream",
"streamIdRequired": "Please fill in the stream id in order to launch the live streaming.",
"streamIdHelp": "Where do I find this?",
"error": "Live streaming failed. Please try again.",
"busy": "All recorders are currently busy. Please try again later."
},
"speakerStats": {
"hours": "__count__h",
"minutes": "__count__m",
"name": "Name",
"seconds": "__count__s",
"speakerStats": "Speaker Stats",
"speakerTime": "Speaker Time"
},
"deviceSelection": {
"deviceSettings": "Device settings",
"noPermission": "Permission not granted",
"previewUnavailable": "Preview unavailable",
"selectADevice": "Select a device",
"testAudio": "Test sound"
},
"invite": {
"addPassword": "Add password",
"callNumber": "Call __number__",
"enterID": "Enter Meeting ID: __conferenceID__ following by # to dial in from a phone",
"howToDialIn": "To dial in, use one of the following numbers and meeting ID",
"hidePassword": "Hide password",
"inviteTo": "Invite people to __conferenceName__",
"invitedYouTo": "__userName__ has invited you to the __inviteURL__ conference",
"locked": "This call is locked. New callers must have the link and enter the password to join.",
"showPassword": "Show password",
"unlocked": "This call is unlocked. Any new caller with the link may join the call."
},
"videoStatus": {
"hd": "HD",
"hdVideo": "HD video",
"sd": "SD",
"sdVideo": "SD video"
},
"dialOut": {
"dial": "Dial",
"dialOut": "Call a phone number",
"statusMessage": "is now __status__",
"enterPhone": "Enter phone number",
"phoneNotAllowed": "Oh, we don't support that destination yet! Sorry!"
},
"addPeople": {
"add": "Add",
"noResults": "No matching search results",
"searchPlaceholder": "Search for people and rooms to add",
"title": "Add people to your call",
"failedToAdd": "Failed to add participants"
},
"inlineDialogFailure": {
"msg": "We stumbled a bit.",
"retry": "Try again",
"support": "Support",
"supportMsg": "If this keeps happening, reach out to"
}
};
}, 662, null, "jitsi-meet/lang/main.json");
__d(/* jitsi-meet/react/features/base/i18n/languageDetector.native.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _reactNativeLocaleDetector = require(664 ); // 664 = react-native-locale-detector
var _reactNativeLocaleDetector2 = babelHelpers.interopRequireDefault(_reactNativeLocaleDetector);
exports.default = {
cacheUserLanguage: Function.prototype,
detect: function detect() {
return _reactNativeLocaleDetector2.default;
},
init: Function.prototype,
type: 'languageDetector'
};
}, 663, null, "jitsi-meet/react/features/base/i18n/languageDetector.native.js");
__d(/* react-native-locale-detector/index.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _require = require(69 ), // 69 = react-native
NativeModules = _require.NativeModules;
var RNI18n = NativeModules.RNI18n;
exports.default = RNI18n ? RNI18n.locale.replace(/_/, '-') : '';
}, 664, null, "react-native-locale-detector/index.js");
__d(/* jitsi-meet/react/features/base/i18n/middleware.js */function(global, require, module, exports) {var _config = require(496 ); // 496 = ../config
var _redux = require(505 ); // 505 = ../redux
_redux.MiddlewareRegistry.register(function (store) {
return function (next) {
return function (action) {
switch (action.type) {
case _config.SET_CONFIG:
return _setConfig(store, next, action);
}
return next(action);
};
};
});
function _setConfig(_ref, next, action) {
var getState = _ref.getState;
var oldValue = getState()['features/base/config'];
var result = next(action);
var newValue = getState()['features/base/config'];
if (oldValue !== newValue && typeof APP === 'object') {
APP.translation.init();
}
return result;
}
}, 665, null, "jitsi-meet/react/features/base/i18n/middleware.js");
__d(/* jitsi-meet/react/features/base/dialog/components/AbstractDialog.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _react = require(34 ); // 34 = react
var _react2 = babelHelpers.interopRequireDefault(_react);
var _actions = require(624 ); // 624 = ../actions
var _constants = require(667 ); // 667 = ../constants
var AbstractDialog = function (_Component) {
babelHelpers.inherits(AbstractDialog, _Component);
function AbstractDialog(props) {
babelHelpers.classCallCheck(this, AbstractDialog);
var _this = babelHelpers.possibleConstructorReturn(this, (AbstractDialog.__proto__ || Object.getPrototypeOf(AbstractDialog)).call(this, props));
_this._onCancel = _this._onCancel.bind(_this);
_this._onSubmit = _this._onSubmit.bind(_this);
return _this;
}
babelHelpers.createClass(AbstractDialog, [{
key: '_onCancel',
value: function _onCancel() {
var hide = true;
if (this.props.onCancel) {
hide = this.props.onCancel();
}
if (hide) {
this.props.dispatch((0, _actions.hideDialog)());
}
}
}, {
key: '_onSubmit',
value: function _onSubmit(value) {
var hide = true;
if (this.props.onSubmit) {
hide = this.props.onSubmit(value);
}
if (hide) {
this.props.dispatch((0, _actions.hideDialog)());
}
}
}]);
return AbstractDialog;
}(_react.Component);
AbstractDialog.propTypes = babelHelpers.extends({}, _constants.DIALOG_PROP_TYPES, {
dispatch: _react2.default.PropTypes.func
});
exports.default = AbstractDialog;
}, 666, null, "jitsi-meet/react/features/base/dialog/components/AbstractDialog.js");
__d(/* jitsi-meet/react/features/base/dialog/constants.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
exports.DIALOG_PROP_TYPES = undefined;
var _react = require(34 ); // 34 = react
var _react2 = babelHelpers.interopRequireDefault(_react);
var DIALOG_PROP_TYPES = exports.DIALOG_PROP_TYPES = {
cancelDisabled: _react2.default.PropTypes.bool,
cancelTitleKey: _react2.default.PropTypes.string,
okDisabled: _react2.default.PropTypes.bool,
okTitleKey: _react2.default.PropTypes.string,
onCancel: _react2.default.PropTypes.func,
onSubmit: _react2.default.PropTypes.func,
t: _react2.default.PropTypes.func,
titleKey: _react2.default.PropTypes.string,
titleString: _react2.default.PropTypes.string
};
}, 667, null, "jitsi-meet/react/features/base/dialog/constants.js");
__d(/* jitsi-meet/react/features/base/dialog/components/StatelessDialog.native.js */function(global, require, module, exports) {
}, 668, null, "jitsi-meet/react/features/base/dialog/components/StatelessDialog.native.js");
__d(/* jitsi-meet/react/features/base/dialog/reducer.js */function(global, require, module, exports) {var _redux = require(505 ); // 505 = ../redux
var _actionTypes = require(625 ); // 625 = ./actionTypes
_redux.ReducerRegistry.register('features/base/dialog', function () {
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var action = arguments[1];
switch (action.type) {
case _actionTypes.HIDE_DIALOG:
return (0, _redux.assign)(state, {
component: undefined,
componentProps: undefined
});
case _actionTypes.OPEN_DIALOG:
return (0, _redux.assign)(state, {
component: action.component,
componentProps: action.componentProps
});
}
return state;
});
}, 669, null, "jitsi-meet/react/features/base/dialog/reducer.js");
__d(/* jitsi-meet/react/features/room-lock/components/index.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _RoomLockPrompt = require(671 ); // 671 = ./RoomLockPrompt
Object.defineProperty(exports, 'RoomLockPrompt', {
enumerable: true,
get: function get() {
return babelHelpers.interopRequireDefault(_RoomLockPrompt).default;
}
});
var _PasswordRequiredPrompt = require(672 ); // 672 = ./PasswordRequiredPrompt
Object.defineProperty(exports, 'PasswordRequiredPrompt', {
enumerable: true,
get: function get() {
return babelHelpers.interopRequireDefault(_PasswordRequiredPrompt).default;
}
});
}, 670, null, "jitsi-meet/react/features/room-lock/components/index.js");
__d(/* jitsi-meet/react/features/room-lock/components/RoomLockPrompt.native.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/react/features/room-lock/components/RoomLockPrompt.native.js';
var _react = require(34 ); // 34 = react
var _react2 = babelHelpers.interopRequireDefault(_react);
var _reactRedux = require(548 ); // 548 = react-redux
var _dialog = require(623 ); // 623 = ../../base/dialog
var _actions = require(622 ); // 622 = ../actions
var RoomLockPrompt = function (_Component) {
babelHelpers.inherits(RoomLockPrompt, _Component);
function RoomLockPrompt(props) {
babelHelpers.classCallCheck(this, RoomLockPrompt);
var _this = babelHelpers.possibleConstructorReturn(this, (RoomLockPrompt.__proto__ || Object.getPrototypeOf(RoomLockPrompt)).call(this, props));
_this._onCancel = _this._onCancel.bind(_this);
_this._onSubmit = _this._onSubmit.bind(_this);
return _this;
}
babelHelpers.createClass(RoomLockPrompt, [{
key: 'render',
value: function render() {
return _react2.default.createElement(_dialog.Dialog, {
bodyKey: 'dialog.passwordLabel',
onCancel: this._onCancel,
onSubmit: this._onSubmit,
titleKey: 'toolbar.lock', __source: {
fileName: _jsxFileName,
lineNumber: 49
}
});
}
}, {
key: '_onCancel',
value: function _onCancel() {
return this._onSubmit(undefined);
}
}, {
key: '_onSubmit',
value: function _onSubmit(value) {
this.props.dispatch((0, _actions.endRoomLockRequest)(this.props.conference, value));
return false;
}
}]);
return RoomLockPrompt;
}(_react.Component);
RoomLockPrompt.propTypes = {
conference: _react2.default.PropTypes.object,
dispatch: _react2.default.PropTypes.func
};
exports.default = (0, _reactRedux.connect)()(RoomLockPrompt);
}, 671, null, "jitsi-meet/react/features/room-lock/components/RoomLockPrompt.native.js");
__d(/* jitsi-meet/react/features/room-lock/components/PasswordRequiredPrompt.native.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/react/features/room-lock/components/PasswordRequiredPrompt.native.js';
var _react = require(34 ); // 34 = react
var _react2 = babelHelpers.interopRequireDefault(_react);
var _reactRedux = require(548 ); // 548 = react-redux
var _dialog = require(623 ); // 623 = ../../base/dialog
var _conference = require(432 ); // 432 = ../../base/conference
var PasswordRequiredPrompt = function (_Component) {
babelHelpers.inherits(PasswordRequiredPrompt, _Component);
function PasswordRequiredPrompt(props) {
babelHelpers.classCallCheck(this, PasswordRequiredPrompt);
var _this = babelHelpers.possibleConstructorReturn(this, (PasswordRequiredPrompt.__proto__ || Object.getPrototypeOf(PasswordRequiredPrompt)).call(this, props));
_this._onCancel = _this._onCancel.bind(_this);
_this._onSubmit = _this._onSubmit.bind(_this);
return _this;
}
babelHelpers.createClass(PasswordRequiredPrompt, [{
key: 'render',
value: function render() {
return _react2.default.createElement(_dialog.Dialog, {
bodyKey: 'dialog.passwordLabel',
onCancel: this._onCancel,
onSubmit: this._onSubmit,
titleKey: 'dialog.passwordRequired', __source: {
fileName: _jsxFileName,
lineNumber: 49
}
});
}
}, {
key: '_onCancel',
value: function _onCancel() {
return this._onSubmit(undefined);
}
}, {
key: '_onSubmit',
value: function _onSubmit(value) {
var conference = this.props.conference;
this.props.dispatch((0, _conference.setPassword)(conference, conference.join, value));
return true;
}
}]);
return PasswordRequiredPrompt;
}(_react.Component);
PasswordRequiredPrompt.propTypes = {
conference: _react2.default.PropTypes.object,
dispatch: _react2.default.PropTypes.func
};
exports.default = (0, _reactRedux.connect)()(PasswordRequiredPrompt);
}, 672, null, "jitsi-meet/react/features/room-lock/components/PasswordRequiredPrompt.native.js");
__d(/* jitsi-meet/react/features/room-lock/constants.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var LOCKED_LOCALLY = exports.LOCKED_LOCALLY = 'LOCKED_LOCALLY';
var LOCKED_REMOTELY = exports.LOCKED_REMOTELY = 'LOCKED_REMOTELY';
}, 673, null, "jitsi-meet/react/features/room-lock/constants.js");
__d(/* jitsi-meet/react/features/room-lock/middleware.js */function(global, require, module, exports) {var _UIEvents = require(608 ); // 608 = ../../../service/UI/UIEvents
var _UIEvents2 = babelHelpers.interopRequireDefault(_UIEvents);
var _conference = require(432 ); // 432 = ../base/conference
var _libJitsiMeet = require(434 ); // 434 = ../base/lib-jitsi-meet
var _redux = require(505 ); // 505 = ../base/redux
var _actions = require(622 ); // 622 = ./actions
var logger = require(464 ).getLogger(__filename); // 464 = jitsi-meet-logger
_redux.MiddlewareRegistry.register(function (store) {
return function (next) {
return function (action) {
switch (action.type) {
case _conference.CONFERENCE_FAILED:
{
var conference = action.conference,
error = action.error;
if (conference && error === _libJitsiMeet.JitsiConferenceErrors.PASSWORD_REQUIRED) {
if (typeof APP !== 'undefined') {
APP.UI.emitEvent(_UIEvents2.default.TOGGLE_ROOM_LOCK, true);
}
store.dispatch((0, _actions._showPasswordDialog)(conference));
}
break;
}
case _conference.LOCK_STATE_CHANGED:
if (typeof APP !== 'undefined') {
APP.UI.emitEvent(_UIEvents2.default.TOGGLE_ROOM_LOCK, action.locked);
}
break;
case _conference.SET_PASSWORD_FAILED:
return _setPasswordFailed(store, next, action);
}
return next(action);
};
};
});
function _setPasswordFailed(store, next, action) {
if (typeof APP !== 'undefined') {
var error = action.error;
var title = void 0;
var message = void 0;
if (error === _libJitsiMeet.JitsiConferenceErrors.PASSWORD_NOT_SUPPORTED) {
logger.warn('room passwords not supported');
title = 'dialog.warning';
message = 'dialog.passwordNotSupported';
} else {
logger.warn('setting password failed', error);
title = 'dialog.lockTitle';
message = 'dialog.lockMessage';
}
APP.UI.messageHandler.showError(title, message);
}
return next(action);
}
}, 674, null, "jitsi-meet/react/features/room-lock/middleware.js");
__d(/* jitsi-meet/react/features/app/actionTypes.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var APP_WILL_MOUNT = exports.APP_WILL_MOUNT = Symbol('APP_WILL_MOUNT');
var APP_WILL_UNMOUNT = exports.APP_WILL_UNMOUNT = Symbol('APP_WILL_UNMOUNT');
}, 675, null, "jitsi-meet/react/features/app/actionTypes.js");
__d(/* jitsi-meet/react/features/app/components/index.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _App = require(677 ); // 677 = ./App
Object.keys(_App).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _App[key];
}
});
});
}, 676, null, "jitsi-meet/react/features/app/components/index.js");
__d(/* jitsi-meet/react/features/app/components/App.native.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
exports.App = undefined;
var _react = require(34 ); // 34 = react
var _react2 = babelHelpers.interopRequireDefault(_react);
var _reactNative = require(69 ); // 69 = react-native
var _react3 = require(589 ); // 589 = ../../base/react
require(678 ); // 678 = ../../mobile/audio-mode
require(680 ); // 680 = ../../mobile/background
require(685 ); // 685 = ../../mobile/external-api
require(687 ); // 687 = ../../mobile/full-screen
require(690 ); // 690 = ../../mobile/proximity
require(692 ); // 692 = ../../mobile/wake-lock
var _AbstractApp2 = require(695 ); // 695 = ./AbstractApp
var App = exports.App = function (_AbstractApp) {
babelHelpers.inherits(App, _AbstractApp);
function App(props) {
babelHelpers.classCallCheck(this, App);
var _this = babelHelpers.possibleConstructorReturn(this, (App.__proto__ || Object.getPrototypeOf(App)).call(this, props));
_this._onLinkingURL = _this._onLinkingURL.bind(_this);
_this._maybeDisableExceptionsManager();
return _this;
}
babelHelpers.createClass(App, [{
key: 'componentWillMount',
value: function componentWillMount() {
babelHelpers.get(App.prototype.__proto__ || Object.getPrototypeOf(App.prototype), 'componentWillMount', this).call(this);
_reactNative.Linking.addEventListener('url', this._onLinkingURL);
}
}, {
key: 'componentWillUnmount',
value: function componentWillUnmount() {
_reactNative.Linking.removeEventListener('url', this._onLinkingURL);
babelHelpers.get(App.prototype.__proto__ || Object.getPrototypeOf(App.prototype), 'componentWillUnmount', this).call(this);
}
}, {
key: '_maybeDisableExceptionsManager',
value: function _maybeDisableExceptionsManager() {
if (__DEV__) {
return;
}
if (_react3.Platform.OS !== 'android') {
return;
}
var oldHandler = global.ErrorUtils.getGlobalHandler();
var newHandler = _handleException;
if (!oldHandler || oldHandler !== newHandler) {
newHandler.next = oldHandler;
global.ErrorUtils.setGlobalHandler(newHandler);
}
}
}, {
key: '_onLinkingURL',
value: function _onLinkingURL(_ref) {
var url = _ref.url;
this._openURL(url);
}
}]);
return App;
}(_AbstractApp2.AbstractApp);
App.propTypes = babelHelpers.extends({}, _AbstractApp2.AbstractApp.propTypes, {
welcomePageEnabled: _react2.default.PropTypes.bool
});
function _handleException(error, fatal) {
if (fatal) {
console.error(error);
} else {
var next = _handleException.next;
typeof next === 'function' && next(error, fatal);
}
}
}, 677, null, "jitsi-meet/react/features/app/components/App.native.js");
__d(/* jitsi-meet/react/features/mobile/audio-mode/index.js */function(global, require, module, exports) {require(679 ); // 679 = ./middleware
}, 678, null, "jitsi-meet/react/features/mobile/audio-mode/index.js");
__d(/* jitsi-meet/react/features/mobile/audio-mode/middleware.js */function(global, require, module, exports) {var _reactNative = require(69 ); // 69 = react-native
var _app = require(430 ); // 430 = ../../app
var _conference = require(432 ); // 432 = ../../base/conference
var _redux = require(505 ); // 505 = ../../base/redux
_redux.MiddlewareRegistry.register(function (store) {
return function (next) {
return function (action) {
var AudioMode = _reactNative.NativeModules.AudioMode;
if (AudioMode) {
var mode = void 0;
switch (action.type) {
case _app.APP_WILL_MOUNT:
case _conference.CONFERENCE_FAILED:
case _conference.CONFERENCE_LEFT:
mode = AudioMode.DEFAULT;
break;
case _conference.CONFERENCE_WILL_JOIN:
{
var audioOnly = store.getState()['features/base/conference'].audioOnly;
mode = audioOnly ? AudioMode.AUDIO_CALL : AudioMode.VIDEO_CALL;
break;
}
case _conference.SET_AUDIO_ONLY:
mode = action.audioOnly ? AudioMode.AUDIO_CALL : AudioMode.VIDEO_CALL;
break;
default:
mode = null;
break;
}
if (mode !== null) {
AudioMode.setMode(mode).catch(function (err) {
return console.error('Failed to set audio mode ' + String(mode) + ': ' + err);
});
}
}
return next(action);
};
};
});
}, 679, null, "jitsi-meet/react/features/mobile/audio-mode/middleware.js");
__d(/* jitsi-meet/react/features/mobile/background/index.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _actions = require(681 ); // 681 = ./actions
Object.keys(_actions).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _actions[key];
}
});
});
var _actionTypes = require(682 ); // 682 = ./actionTypes
Object.keys(_actionTypes).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _actionTypes[key];
}
});
});
require(683 ); // 683 = ./middleware
require(684 ); // 684 = ./reducer
}, 680, null, "jitsi-meet/react/features/mobile/background/index.js");
__d(/* jitsi-meet/react/features/mobile/background/actions.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
exports._setAppStateListener = _setAppStateListener;
exports._setBackgroundVideoMuted = _setBackgroundVideoMuted;
exports.appStateChanged = appStateChanged;
var _conference = require(432 ); // 432 = ../../base/conference
var _media = require(567 ); // 567 = ../../base/media
var _actionTypes = require(682 ); // 682 = ./actionTypes
function _setAppStateListener(listener) {
return {
type: _actionTypes._SET_APP_STATE_LISTENER,
listener: listener
};
}
function _setBackgroundVideoMuted(muted) {
return function (dispatch, getState) {
var audioOnly = getState()['features/base/conference'].audioOnly;
if (audioOnly) {
return;
}
dispatch((0, _conference.setLastN)(muted ? 0 : undefined));
if (muted) {
var video = getState()['features/base/media'].video;
if (video.muted) {
return;
}
} else {
var videoMuted = getState()['features/background'].videoMuted;
if (!videoMuted) {
return;
}
}
dispatch({
type: _actionTypes._SET_BACKGROUND_VIDEO_MUTED,
muted: muted
});
dispatch((0, _media.setVideoMuted)(muted));
};
}
function appStateChanged(appState) {
return {
type: _actionTypes.APP_STATE_CHANGED,
appState: appState
};
}
}, 681, null, "jitsi-meet/react/features/mobile/background/actions.js");
__d(/* jitsi-meet/react/features/mobile/background/actionTypes.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _SET_APP_STATE_LISTENER = exports._SET_APP_STATE_LISTENER = Symbol('_SET_APP_STATE_LISTENER');
var _SET_BACKGROUND_VIDEO_MUTED = exports._SET_BACKGROUND_VIDEO_MUTED = Symbol('_SET_BACKGROUND_VIDEO_MUTED');
var APP_STATE_CHANGED = exports.APP_STATE_CHANGED = Symbol('APP_STATE_CHANGED');
}, 682, null, "jitsi-meet/react/features/mobile/background/actionTypes.js");
__d(/* jitsi-meet/react/features/mobile/background/middleware.js */function(global, require, module, exports) {var _reactNative = require(69 ); // 69 = react-native
var _app = require(430 ); // 430 = ../../app
var _redux = require(505 ); // 505 = ../../base/redux
var _actions = require(681 ); // 681 = ./actions
var _actionTypes = require(682 ); // 682 = ./actionTypes
_redux.MiddlewareRegistry.register(function (store) {
return function (next) {
return function (action) {
switch (action.type) {
case _actionTypes._SET_APP_STATE_LISTENER:
{
var appStateListener = store.getState()['features/background'].appStateListener;
if (appStateListener) {
_reactNative.AppState.removeEventListener('change', appStateListener);
}
if (action.listener) {
_reactNative.AppState.addEventListener('change', action.listener);
}
break;
}
case _actionTypes.APP_STATE_CHANGED:
_appStateChanged(store.dispatch, action.appState);
break;
case _app.APP_WILL_MOUNT:
store.dispatch((0, _actions._setAppStateListener)(_onAppStateChange.bind(undefined, store.dispatch)));
break;
case _app.APP_WILL_UNMOUNT:
store.dispatch((0, _actions._setAppStateListener)(null));
break;
}
return next(action);
};
};
});
function _appStateChanged(dispatch, appState) {
var muted = void 0;
switch (appState) {
case 'active':
muted = false;
break;
case 'background':
muted = true;
break;
case 'inactive':
default:
return;
}
dispatch((0, _actions._setBackgroundVideoMuted)(muted));
}
function _onAppStateChange(dispatch, appState) {
dispatch((0, _actions.appStateChanged)(appState));
}
}, 683, null, "jitsi-meet/react/features/mobile/background/middleware.js");
__d(/* jitsi-meet/react/features/mobile/background/reducer.js */function(global, require, module, exports) {var _redux = require(505 ); // 505 = ../../base/redux
var _actionTypes = require(682 ); // 682 = ./actionTypes
_redux.ReducerRegistry.register('features/background', function () {
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var action = arguments[1];
switch (action.type) {
case _actionTypes._SET_APP_STATE_LISTENER:
return babelHelpers.extends({}, state, {
appStateListener: action.listener
});
case _actionTypes._SET_BACKGROUND_VIDEO_MUTED:
return babelHelpers.extends({}, state, {
videoMuted: action.muted
});
case _actionTypes.APP_STATE_CHANGED:
return babelHelpers.extends({}, state, {
appState: action.appState
});
}
return state;
});
}, 684, null, "jitsi-meet/react/features/mobile/background/reducer.js");
__d(/* jitsi-meet/react/features/mobile/external-api/index.js */function(global, require, module, exports) {require(686 ); // 686 = ./middleware
}, 685, null, "jitsi-meet/react/features/mobile/external-api/index.js");
__d(/* jitsi-meet/react/features/mobile/external-api/middleware.js */function(global, require, module, exports) {var _reactNative = require(69 ); // 69 = react-native
var _conference = require(432 ); // 432 = ../../base/conference
var _redux = require(505 ); // 505 = ../../base/redux
var _util = require(529 ); // 529 = ../../base/util
_redux.MiddlewareRegistry.register(function (store) {
return function (next) {
return function (action) {
var result = next(action);
switch (action.type) {
case _conference.CONFERENCE_FAILED:
case _conference.CONFERENCE_JOINED:
case _conference.CONFERENCE_LEFT:
case _conference.CONFERENCE_WILL_JOIN:
case _conference.CONFERENCE_WILL_LEAVE:
{
var conference = action.conference,
type = action.type,
data = babelHelpers.objectWithoutProperties(action, ['conference', 'type']);
if (conference) {
data.url = (0, _util.toURLString)(conference[_conference.JITSI_CONFERENCE_URL_KEY]);
}
var name = type.toString();
if (name.startsWith('Symbol(') && name.endsWith(')')) {
name = name.slice(7, -1);
}
if (name.startsWith('@@')) {
name = name.slice(2);
}
_sendEvent(store, name, data);
break;
}
}
return result;
};
};
});
function _sendEvent(store, name, data) {
var state = store.getState();
var app = state['features/app'].app;
if (app) {
var externalAPIScope = app.props.externalAPIScope;
if (externalAPIScope) {
_reactNative.NativeModules.ExternalAPI.sendEvent(name, data, externalAPIScope);
}
}
}
}, 686, null, "jitsi-meet/react/features/mobile/external-api/middleware.js");
__d(/* jitsi-meet/react/features/mobile/full-screen/index.js */function(global, require, module, exports) {require(688 ); // 688 = ./middleware
}, 687, null, "jitsi-meet/react/features/mobile/full-screen/index.js");
__d(/* jitsi-meet/react/features/mobile/full-screen/middleware.js */function(global, require, module, exports) {var _reactNative = require(69 ); // 69 = react-native
var _reactNativeImmersive = require(689 ); // 689 = react-native-immersive
var _background = require(680 ); // 680 = ../background
var _conference2 = require(432 ); // 432 = ../../base/conference
var _dialog = require(623 ); // 623 = ../../base/dialog
var _react = require(589 ); // 589 = ../../base/react
var _redux = require(505 ); // 505 = ../../base/redux
_redux.MiddlewareRegistry.register(function (store) {
return function (next) {
return function (action) {
var fullScreen = null;
switch (action.type) {
case _background.APP_STATE_CHANGED:
{
if (action.appState === 'active') {
var _store$getState$featu = store.getState()['features/base/conference'],
audioOnly = _store$getState$featu.audioOnly,
conference = _store$getState$featu.conference;
fullScreen = conference ? !audioOnly : false;
}
break;
}
case _conference2.CONFERENCE_WILL_JOIN:
{
var _audioOnly = store.getState()['features/base/conference'].audioOnly;
fullScreen = !_audioOnly;
break;
}
case _conference2.CONFERENCE_FAILED:
case _conference2.CONFERENCE_LEFT:
fullScreen = false;
break;
case _dialog.HIDE_DIALOG:
{
var _store$getState$featu2 = store.getState()['features/base/conference'],
_audioOnly2 = _store$getState$featu2.audioOnly,
_conference = _store$getState$featu2.conference;
fullScreen = _conference ? !_audioOnly2 : false;
break;
}
case _conference2.SET_AUDIO_ONLY:
fullScreen = !action.audioOnly;
break;
}
if (fullScreen !== null) {
_setFullScreen(fullScreen).catch(function (err) {
return console.warn('Failed to set full screen mode: ' + err);
});
}
return next(action);
};
};
});
function _setFullScreen(fullScreen) {
if (_react.Platform.OS === 'android') {
return fullScreen ? _reactNativeImmersive.Immersive.on() : _reactNativeImmersive.Immersive.off();
}
_reactNative.StatusBar.setHidden(fullScreen, 'slide');
return Promise.resolve();
}
}, 688, null, "jitsi-meet/react/features/mobile/full-screen/middleware.js");
__d(/* react-native-immersive/index.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
exports.Immersive = undefined;
var _reactNative = require(69 ); // 69 = react-native
var RNImmersive = _reactNative.NativeModules.RNImmersive;
function unSupportedError() {
throw new Error('[react-native-immersive] does not support iOS');
}
var Immersive = _reactNative.Platform.OS === 'android' ? {
on: function on() {
return RNImmersive.on();
},
off: function off() {
return RNImmersive.off();
},
setImmersive: function setImmersive(isOn) {
return RNImmersive.setImmersive(isOn);
}
} : {
on: unSupportedError,
off: unSupportedError,
setImmersive: unSupportedError
};
exports.Immersive = Immersive;
exports.default = Immersive;
}, 689, null, "react-native-immersive/index.js");
__d(/* jitsi-meet/react/features/mobile/proximity/index.js */function(global, require, module, exports) {require(691 ); // 691 = ./middleware
}, 690, null, "jitsi-meet/react/features/mobile/proximity/index.js");
__d(/* jitsi-meet/react/features/mobile/proximity/middleware.js */function(global, require, module, exports) {var _reactNative = require(69 ); // 69 = react-native
var _conference = require(432 ); // 432 = ../../base/conference
var _redux = require(505 ); // 505 = ../../base/redux
_redux.MiddlewareRegistry.register(function (store) {
return function (next) {
return function (action) {
switch (action.type) {
case _conference.CONFERENCE_JOINED:
{
var audioOnly = store.getState()['features/base/conference'].audioOnly;
_setProximityEnabled(audioOnly);
break;
}
case _conference.CONFERENCE_FAILED:
case _conference.CONFERENCE_LEFT:
_setProximityEnabled(false);
break;
case _conference.SET_AUDIO_ONLY:
_setProximityEnabled(action.audioOnly);
break;
}
return next(action);
};
};
});
function _setProximityEnabled(enabled) {
_reactNative.NativeModules.Proximity.setEnabled(Boolean(enabled));
}
}, 691, null, "jitsi-meet/react/features/mobile/proximity/middleware.js");
__d(/* jitsi-meet/react/features/mobile/wake-lock/index.js */function(global, require, module, exports) {require(693 ); // 693 = ./middleware
}, 692, null, "jitsi-meet/react/features/mobile/wake-lock/index.js");
__d(/* jitsi-meet/react/features/mobile/wake-lock/middleware.js */function(global, require, module, exports) {var _reactNativeKeepAwake = require(694 ); // 694 = react-native-keep-awake
var _reactNativeKeepAwake2 = babelHelpers.interopRequireDefault(_reactNativeKeepAwake);
var _conference = require(432 ); // 432 = ../../base/conference
var _redux = require(505 ); // 505 = ../../base/redux
_redux.MiddlewareRegistry.register(function (store) {
return function (next) {
return function (action) {
switch (action.type) {
case _conference.CONFERENCE_JOINED:
{
var audioOnly = store.getState()['features/base/conference'].audioOnly;
_setWakeLock(!audioOnly);
break;
}
case _conference.CONFERENCE_FAILED:
case _conference.CONFERENCE_LEFT:
_setWakeLock(false);
break;
case _conference.SET_AUDIO_ONLY:
_setWakeLock(!action.audioOnly);
break;
}
return next(action);
};
};
});
function _setWakeLock(wakeLock) {
if (wakeLock) {
_reactNativeKeepAwake2.default.activate();
} else {
_reactNativeKeepAwake2.default.deactivate();
}
}
}, 693, null, "jitsi-meet/react/features/mobile/wake-lock/middleware.js");
__d(/* react-native-keep-awake/index.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _react = require(34 ); // 34 = react
var _react2 = babelHelpers.interopRequireDefault(_react);
var _reactNative = require(69 ); // 69 = react-native
var KeepAwake = function (_Component) {
babelHelpers.inherits(KeepAwake, _Component);
function KeepAwake() {
babelHelpers.classCallCheck(this, KeepAwake);
return babelHelpers.possibleConstructorReturn(this, (KeepAwake.__proto__ || Object.getPrototypeOf(KeepAwake)).apply(this, arguments));
}
babelHelpers.createClass(KeepAwake, [{
key: 'componentWillMount',
value: function componentWillMount() {
KeepAwake.activate();
}
}, {
key: 'componentWillUnmount',
value: function componentWillUnmount() {
KeepAwake.deactivate();
}
}, {
key: 'render',
value: function render() {
return this.props.children || null;
}
}], [{
key: 'activate',
value: function activate() {
_reactNative.NativeModules.KCKeepAwake.activate();
}
}, {
key: 'deactivate',
value: function deactivate() {
_reactNative.NativeModules.KCKeepAwake.deactivate();
}
}]);
return KeepAwake;
}(_react.Component);
exports.default = KeepAwake;
}, 694, null, "react-native-keep-awake/index.js");
__d(/* jitsi-meet/react/features/app/components/AbstractApp.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
exports.AbstractApp = undefined;
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/react/features/app/components/AbstractApp.js';
var _react = require(34 ); // 34 = react
var _react2 = babelHelpers.interopRequireDefault(_react);
var _reactI18next = require(634 ); // 634 = react-i18next
var _reactRedux = require(548 ); // 548 = react-redux
var _redux = require(508 ); // 508 = redux
var _reduxThunk = require(696 ); // 696 = redux-thunk
var _reduxThunk2 = babelHelpers.interopRequireDefault(_reduxThunk);
var _i18n = require(632 ); // 632 = ../../base/i18n
var _participants = require(540 ); // 540 = ../../base/participants
var _react3 = require(589 ); // 589 = ../../base/react
var _redux2 = require(505 ); // 505 = ../../base/redux
var _util = require(529 ); // 529 = ../../base/util
var _actions = require(431 ); // 431 = ../actions
var DEFAULT_URL = 'https://meet.jit.si';
var AbstractApp = exports.AbstractApp = function (_Component) {
babelHelpers.inherits(AbstractApp, _Component);
function AbstractApp(props) {
babelHelpers.classCallCheck(this, AbstractApp);
var _this = babelHelpers.possibleConstructorReturn(this, (AbstractApp.__proto__ || Object.getPrototypeOf(AbstractApp)).call(this, props));
_this.state = {
route: undefined,
store: _this._maybeCreateStore(props)
};
return _this;
}
babelHelpers.createClass(AbstractApp, [{
key: 'componentWillMount',
value: function componentWillMount() {
var dispatch = this._getStore().dispatch;
dispatch((0, _actions.appWillMount)(this));
var localParticipant = void 0;
if (typeof APP === 'object') {
localParticipant = {
avatarID: APP.settings.getAvatarId(),
avatarURL: APP.settings.getAvatarUrl(),
email: APP.settings.getEmail(),
name: APP.settings.getDisplayName()
};
}
dispatch((0, _participants.localParticipantJoined)(localParticipant));
this._openURL((0, _util.toURLString)(this.props.url) || this._getDefaultURL());
}
}, {
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(nextProps) {
if (typeof nextProps.store === 'undefined' && typeof this.props.store !== 'undefined') {
this.setState({
store: this._maybeCreateStore(nextProps)
});
}
var url = nextProps.url;
url = (0, _util.toURLString)(url);
if ((0, _util.toURLString)(this.props.url) !== url) {
this._openURL(url || this._getDefaultURL());
}
}
}, {
key: 'componentWillUnmount',
value: function componentWillUnmount() {
var dispatch = this._getStore().dispatch;
dispatch((0, _participants.localParticipantLeft)());
dispatch((0, _actions.appWillUnmount)(this));
}
}, {
key: 'getWindowLocation',
value: function getWindowLocation() {
return undefined;
}
}, {
key: 'render',
value: function render() {
var route = this.state.route;
if (route) {
return _react2.default.createElement(
_reactI18next.I18nextProvider,
{ i18n: _i18n.i18next, __source: {
fileName: _jsxFileName,
lineNumber: 191
}
},
_react2.default.createElement(
_reactRedux.Provider,
{ store: this._getStore(), __source: {
fileName: _jsxFileName,
lineNumber: 192
}
},
this._createElement(route.component)
)
);
}
return null;
}
}, {
key: '_createElement',
value: function _createElement(component, props) {
var _props = this.props,
dispatch = _props.dispatch,
store = _props.store,
defaultURL = _props.defaultURL,
url = _props.url,
thisProps = babelHelpers.objectWithoutProperties(_props, ['dispatch', 'store', 'defaultURL', 'url']);
return _react2.default.createElement(component, babelHelpers.extends({}, thisProps, props));
}
}, {
key: '_createStore',
value: function _createStore() {
var reducer = _redux2.ReducerRegistry.combineReducers();
var middleware = _redux2.MiddlewareRegistry.applyMiddleware(_reduxThunk2.default);
var devToolsExtension = void 0;
if (typeof window === 'object' && (devToolsExtension = window.devToolsExtension)) {
middleware = (0, _redux.compose)(middleware, devToolsExtension());
}
return (0, _redux.createStore)(reducer, middleware);
}
}, {
key: '_getDefaultURL',
value: function _getDefaultURL() {
var windowLocation = this.getWindowLocation();
if (windowLocation) {
var href = windowLocation.toString();
if (href) {
return href;
}
}
return this.props.defaultURL || DEFAULT_URL;
}
}, {
key: '_getStore',
value: function _getStore() {
var store = this.state.store;
if (typeof store === 'undefined') {
store = this.props.store;
}
return store;
}
}, {
key: '_maybeCreateStore',
value: function _maybeCreateStore(props) {
var store = props.store;
if (typeof store === 'undefined') {
store = this._createStore();
if (typeof APP !== 'undefined') {
APP.store = store;
}
}
return store;
}
}, {
key: '_navigate',
value: function _navigate(route) {
var _this2 = this;
if (_react3.RouteRegistry.areRoutesEqual(this.state.route, route)) {
return Promise.resolve();
}
var nextState = {
route: route
};
route && this._onRouteEnter(route, nextState, function (pathname) {
_this2._openURL(pathname);
nextState = undefined;
});
return new Promise(function (resolve) {
if (nextState) {
_this2.setState(nextState, resolve);
} else {
resolve();
}
});
}
}, {
key: '_onRouteEnter',
value: function _onRouteEnter(route) {
var onEnter = route.onEnter;
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
args[_key - 1] = arguments[_key];
}
typeof onEnter === 'function' && onEnter.apply(undefined, args);
}
}, {
key: '_openURL',
value: function _openURL(url) {
this._getStore().dispatch((0, _actions.appNavigate)((0, _util.toURLString)(url)));
}
}]);
return AbstractApp;
}(_react.Component);
AbstractApp.propTypes = {
defaultURL: _react2.default.PropTypes.string,
store: _react2.default.PropTypes.object,
url: _react2.default.PropTypes.oneOfType([_react2.default.PropTypes.object, _react2.default.PropTypes.string])
};
}, 695, null, "jitsi-meet/react/features/app/components/AbstractApp.js");
__d(/* redux-thunk/lib/index.js */function(global, require, module, exports) {'use strict';
exports.__esModule = true;
function createThunkMiddleware(extraArgument) {
return function (_ref) {
var dispatch = _ref.dispatch,
getState = _ref.getState;
return function (next) {
return function (action) {
if (typeof action === 'function') {
return action(dispatch, getState, extraArgument);
}
return next(action);
};
};
};
}
var thunk = createThunkMiddleware();
thunk.withExtraArgument = createThunkMiddleware;
exports['default'] = thunk;
}, 696, null, "redux-thunk/lib/index.js");
__d(/* jitsi-meet/react/features/app/functions.native.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
exports._getRouteToRender = _getRouteToRender;
var _conference = require(432 ); // 432 = ../base/conference
var _react = require(589 ); // 589 = ../base/react
var _conference2 = require(698 ); // 698 = ../conference
var _welcome = require(980 ); // 980 = ../welcome
function _getRouteToRender(stateOrGetState) {
var state = typeof stateOrGetState === 'function' ? stateOrGetState() : stateOrGetState;
var room = state['features/base/conference'].room;
var component = void 0;
if ((0, _conference.isRoomValid)(room)) {
component = _conference2.Conference;
} else {
var app = state['features/app'].app;
component = app && app.props.welcomePageEnabled ? _welcome.WelcomePage : null;
}
return _react.RouteRegistry.getRouteByComponent(component);
}
}, 697, null, "jitsi-meet/react/features/app/functions.native.js");
__d(/* jitsi-meet/react/features/conference/index.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _components = require(699 ); // 699 = ./components
Object.keys(_components).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _components[key];
}
});
});
require(978 ); // 978 = ./route
}, 698, null, "jitsi-meet/react/features/conference/index.js");
__d(/* jitsi-meet/react/features/conference/components/index.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _Conference = require(700 ); // 700 = ./Conference
Object.defineProperty(exports, 'Conference', {
enumerable: true,
get: function get() {
return babelHelpers.interopRequireDefault(_Conference).default;
}
});
}, 699, null, "jitsi-meet/react/features/conference/components/index.js");
__d(/* jitsi-meet/react/features/conference/components/Conference.native.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/react/features/conference/components/Conference.native.js';
var _react = require(34 ); // 34 = react
var _react2 = babelHelpers.interopRequireDefault(_react);
var _reactRedux = require(548 ); // 548 = react-redux
var _connection = require(615 ); // 615 = ../../base/connection
var _dialog = require(623 ); // 623 = ../../base/dialog
var _react3 = require(589 ); // 589 = ../../base/react
var _filmstrip = require(701 ); // 701 = ../../filmstrip
var _largeVideo = require(899 ); // 899 = ../../large-video
var _overlay = require(907 ); // 907 = ../../overlay
var _toolbox = require(924 ); // 924 = ../../toolbox
var _styles = require(977 ); // 977 = ./styles
var _styles2 = babelHelpers.interopRequireDefault(_styles);
var _TOOLBOX_TIMEOUT_MS = 5000;
var Conference = function (_Component) {
babelHelpers.inherits(Conference, _Component);
function Conference(props) {
babelHelpers.classCallCheck(this, Conference);
var _this = babelHelpers.possibleConstructorReturn(this, (Conference.__proto__ || Object.getPrototypeOf(Conference)).call(this, props));
_this._toolboxTimeout = undefined;
_this._onClick = _this._onClick.bind(_this);
return _this;
}
babelHelpers.createClass(Conference, [{
key: 'componentDidMount',
value: function componentDidMount() {
this._setToolboxTimeout(this.props._toolboxVisible);
}
}, {
key: 'componentWillMount',
value: function componentWillMount() {
this.props._onConnect();
}
}, {
key: 'componentWillUnmount',
value: function componentWillUnmount() {
this._clearToolboxTimeout();
this.props._onDisconnect();
}
}, {
key: 'render',
value: function render() {
return _react2.default.createElement(
_react3.Container,
{
onClick: this._onClick,
style: _styles2.default.conference,
touchFeedback: false, __source: {
fileName: _jsxFileName,
lineNumber: 129
}
},
_react2.default.createElement(_largeVideo.LargeVideo, {
__source: {
fileName: _jsxFileName,
lineNumber: 137
}
}),
_react2.default.createElement(_filmstrip.Filmstrip, {
__source: {
fileName: _jsxFileName,
lineNumber: 146
}
}),
_react2.default.createElement(_overlay.OverlayContainer, {
__source: {
fileName: _jsxFileName,
lineNumber: 152
}
}),
_react2.default.createElement(_toolbox.Toolbox, {
__source: {
fileName: _jsxFileName,
lineNumber: 157
}
}),
_react2.default.createElement(_dialog.DialogContainer, {
__source: {
fileName: _jsxFileName,
lineNumber: 162
}
})
);
}
}, {
key: '_clearToolboxTimeout',
value: function _clearToolboxTimeout() {
if (this._toolboxTimeout) {
clearTimeout(this._toolboxTimeout);
this._toolboxTimeout = undefined;
}
}
}, {
key: '_onClick',
value: function _onClick() {
var toolboxVisible = !this.props._toolboxVisible;
this.props._setToolboxVisible(toolboxVisible);
this._setToolboxTimeout(toolboxVisible);
}
}, {
key: '_setToolboxTimeout',
value: function _setToolboxTimeout(toolboxVisible) {
this._clearToolboxTimeout();
if (toolboxVisible) {
this._toolboxTimeout = setTimeout(this._onClick, _TOOLBOX_TIMEOUT_MS);
}
}
}]);
return Conference;
}(_react.Component);
Conference.propTypes = {
_onConnect: _react2.default.PropTypes.func,
_onDisconnect: _react2.default.PropTypes.func,
_setToolboxVisible: _react2.default.PropTypes.func,
_toolboxVisible: _react2.default.PropTypes.bool
};
function _mapDispatchToProps(dispatch) {
return {
_onConnect: function _onConnect() {
dispatch((0, _connection.connect)());
},
_onDisconnect: function _onDisconnect() {
dispatch((0, _connection.disconnect)());
},
_setToolboxVisible: function _setToolboxVisible(visible) {
dispatch((0, _toolbox.setToolboxVisible)(visible));
}
};
}
function _mapStateToProps(state) {
return {
_toolboxVisible: state['features/toolbox'].visible
};
}
exports.default = (0, _reactRedux.connect)(_mapStateToProps, _mapDispatchToProps)(Conference);
}, 700, null, "jitsi-meet/react/features/conference/components/Conference.native.js");
__d(/* jitsi-meet/react/features/filmstrip/index.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _actions = require(702 ); // 702 = ./actions
Object.keys(_actions).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _actions[key];
}
});
});
var _actionTypes = require(703 ); // 703 = ./actionTypes
Object.keys(_actionTypes).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _actionTypes[key];
}
});
});
var _components = require(704 ); // 704 = ./components
Object.keys(_components).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _components[key];
}
});
});
require(876 ); // 876 = ./middleware
require(898 ); // 898 = ./reducer
}, 701, null, "jitsi-meet/react/features/filmstrip/index.js");
__d(/* jitsi-meet/react/features/filmstrip/actions.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
exports.setFilmstripRemoteVideosVisibility = setFilmstripRemoteVideosVisibility;
exports.setFilmstripVisibility = setFilmstripVisibility;
var _actionTypes = require(703 ); // 703 = ./actionTypes
function setFilmstripRemoteVideosVisibility(remoteVideosVisible) {
return {
type: _actionTypes.SET_FILMSTRIP_REMOTE_VIDEOS_VISIBLITY,
remoteVideosVisible: remoteVideosVisible
};
}
function setFilmstripVisibility(visible) {
return {
type: _actionTypes.SET_FILMSTRIP_VISIBILITY,
visible: visible
};
}
}, 702, null, "jitsi-meet/react/features/filmstrip/actions.js");
__d(/* jitsi-meet/react/features/filmstrip/actionTypes.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var SET_FILMSTRIP_REMOTE_VIDEOS_VISIBLITY = exports.SET_FILMSTRIP_REMOTE_VIDEOS_VISIBLITY = Symbol('SET_FILMSTRIP_REMOTE_VIDEOS_VISIBLITY');
var SET_FILMSTRIP_VISIBILITY = exports.SET_FILMSTRIP_VISIBILITY = Symbol('SET_FILMSTRIP_VISIBILITY');
}, 703, null, "jitsi-meet/react/features/filmstrip/actionTypes.js");
__d(/* jitsi-meet/react/features/filmstrip/components/index.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _ = require(705 ); // 705 = ./_
Object.keys(_).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _[key];
}
});
});
var _Filmstrip = require(874 ); // 874 = ./Filmstrip
Object.defineProperty(exports, 'Filmstrip', {
enumerable: true,
get: function get() {
return babelHelpers.interopRequireDefault(_Filmstrip).default;
}
});
}, 704, null, "jitsi-meet/react/features/filmstrip/components/index.js");
__d(/* jitsi-meet/react/features/filmstrip/components/_.native.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _native = require(706 ); // 706 = ./native
Object.keys(_native).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _native[key];
}
});
});
}, 705, null, "jitsi-meet/react/features/filmstrip/components/_.native.js");
__d(/* jitsi-meet/react/features/filmstrip/components/native/index.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _AudioMutedIndicator = require(707 ); // 707 = ./AudioMutedIndicator
Object.keys(_AudioMutedIndicator).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _AudioMutedIndicator[key];
}
});
});
var _DominantSpeakerIndicator = require(869 ); // 869 = ./DominantSpeakerIndicator
Object.keys(_DominantSpeakerIndicator).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _DominantSpeakerIndicator[key];
}
});
});
var _ModeratorIndicator = require(872 ); // 872 = ./ModeratorIndicator
Object.keys(_ModeratorIndicator).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _ModeratorIndicator[key];
}
});
});
var _styles = require(867 ); // 867 = ./styles
Object.defineProperty(exports, 'styles', {
enumerable: true,
get: function get() {
return babelHelpers.interopRequireDefault(_styles).default;
}
});
var _VideoMutedIndicator = require(873 ); // 873 = ./VideoMutedIndicator
Object.keys(_VideoMutedIndicator).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _VideoMutedIndicator[key];
}
});
});
}, 706, null, "jitsi-meet/react/features/filmstrip/components/native/index.js");
__d(/* jitsi-meet/react/features/filmstrip/components/native/AudioMutedIndicator.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
exports.AudioMutedIndicator = undefined;
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/react/features/filmstrip/components/native/AudioMutedIndicator.js';
var _react = require(34 ); // 34 = react
var _react2 = babelHelpers.interopRequireDefault(_react);
var _fontIcons = require(708 ); // 708 = ../../../base/font-icons
var _styles = require(867 ); // 867 = ./styles
var _styles2 = babelHelpers.interopRequireDefault(_styles);
var AudioMutedIndicator = exports.AudioMutedIndicator = function (_Component) {
babelHelpers.inherits(AudioMutedIndicator, _Component);
function AudioMutedIndicator() {
babelHelpers.classCallCheck(this, AudioMutedIndicator);
return babelHelpers.possibleConstructorReturn(this, (AudioMutedIndicator.__proto__ || Object.getPrototypeOf(AudioMutedIndicator)).apply(this, arguments));
}
babelHelpers.createClass(AudioMutedIndicator, [{
key: 'render',
value: function render() {
return _react2.default.createElement(_fontIcons.Icon, {
name: 'mic-disabled',
style: _styles2.default.thumbnailIndicator, __source: {
fileName: _jsxFileName,
lineNumber: 18
}
});
}
}]);
return AudioMutedIndicator;
}(_react.Component);
}, 707, null, "jitsi-meet/react/features/filmstrip/components/native/AudioMutedIndicator.js");
__d(/* jitsi-meet/react/features/base/font-icons/index.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _Icon = require(709 ); // 709 = ./Icon
Object.keys(_Icon).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _Icon[key];
}
});
});
}, 708, null, "jitsi-meet/react/features/base/font-icons/index.js");
__d(/* jitsi-meet/react/features/base/font-icons/Icon.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
exports.Icon = undefined;
var _reactNativeVectorIcons = require(710 ); // 710 = react-native-vector-icons
var _jitsi = require(866 ); // 866 = ./jitsi.json
var _jitsi2 = babelHelpers.interopRequireDefault(_jitsi);
var Icon = exports.Icon = (0, _reactNativeVectorIcons.createIconSetFromIcoMoon)(_jitsi2.default);
}, 709, null, "jitsi-meet/react/features/base/font-icons/Icon.js");
__d(/* react-native-vector-icons/index.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _createIconSet = require(711 ); // 711 = ./lib/create-icon-set
Object.defineProperty(exports, 'createIconSet', {
enumerable: true,
get: function get() {
return babelHelpers.interopRequireDefault(_createIconSet).default;
}
});
var _createIconSetFromFontello = require(864 ); // 864 = ./lib/create-icon-set-from-fontello
Object.defineProperty(exports, 'createIconSetFromFontello', {
enumerable: true,
get: function get() {
return babelHelpers.interopRequireDefault(_createIconSetFromFontello).default;
}
});
var _createIconSetFromIcomoon = require(865 ); // 865 = ./lib/create-icon-set-from-icomoon
Object.defineProperty(exports, 'createIconSetFromIcoMoon', {
enumerable: true,
get: function get() {
return babelHelpers.interopRequireDefault(_createIconSetFromIcomoon).default;
}
});
}, 710, null, "react-native-vector-icons/index.js");
__d(/* react-native-vector-icons/lib/create-icon-set.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/node_modules/react-native-vector-icons/lib/create-icon-set.js';
exports.default = createIconSet;
var _react = require(34 ); // 34 = react
var _react2 = babelHelpers.interopRequireDefault(_react);
var _propTypes = require(550 ); // 550 = prop-types
var _propTypes2 = babelHelpers.interopRequireDefault(_propTypes);
var _reactNative = require(712 ); // 712 = ./react-native
var _iconButton = require(713 ); // 713 = ./icon-button
var _iconButton2 = babelHelpers.interopRequireDefault(_iconButton);
var _tabBarItemIos = require(851 ); // 851 = ./tab-bar-item-ios
var _tabBarItemIos2 = babelHelpers.interopRequireDefault(_tabBarItemIos);
var _toolbarAndroid = require(863 ); // 863 = ./toolbar-android
var _toolbarAndroid2 = babelHelpers.interopRequireDefault(_toolbarAndroid);
var NativeIconAPI = _reactNative.NativeModules.RNVectorIconsManager || _reactNative.NativeModules.RNVectorIconsModule;
var DEFAULT_ICON_SIZE = 12;
var DEFAULT_ICON_COLOR = 'black';
function createIconSet(glyphMap, fontFamily, fontFile) {
var fontReference = fontFamily;
if (_reactNative.Platform.OS === 'android' && fontFile) {
fontReference = fontFile.replace(/\.(otf|ttf)$/, '');
}
if (_reactNative.Platform.OS === 'windows' && fontFile) {
fontReference = 'Assets/' + fontFile + '#' + fontFamily;
}
var IconNamePropType = _propTypes2.default.oneOf(Object.keys(glyphMap));
var Icon = function (_Component) {
babelHelpers.inherits(Icon, _Component);
function Icon() {
var _ref;
var _temp, _this, _ret;
babelHelpers.classCallCheck(this, Icon);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = babelHelpers.possibleConstructorReturn(this, (_ref = Icon.__proto__ || Object.getPrototypeOf(Icon)).call.apply(_ref, [this].concat(args))), _this), _this.root = null, _this.handleRef = function (ref) {
_this.root = ref;
}, _temp), babelHelpers.possibleConstructorReturn(_this, _ret);
}
babelHelpers.createClass(Icon, [{
key: 'setNativeProps',
value: function setNativeProps(nativeProps) {
if (this.root) {
this.root.setNativeProps(nativeProps);
}
}
}, {
key: 'render',
value: function render() {
var _props = this.props,
name = _props.name,
size = _props.size,
color = _props.color,
style = _props.style,
props = babelHelpers.objectWithoutProperties(_props, ['name', 'size', 'color', 'style']);
var glyph = name ? glyphMap[name] || '?' : '';
if (typeof glyph === 'number') {
glyph = String.fromCharCode(glyph);
}
var styleDefaults = {
fontSize: size,
color: color
};
var styleOverrides = {
fontFamily: fontReference,
fontWeight: 'normal',
fontStyle: 'normal'
};
props.style = [styleDefaults, style, styleOverrides];
props.ref = this.handleRef;
return _react2.default.createElement(
_reactNative.Text,
babelHelpers.extends({}, props, {
__source: {
fileName: _jsxFileName,
lineNumber: 81
}
}),
glyph,
this.props.children
);
}
}]);
return Icon;
}(_react.Component);
Icon.propTypes = {
name: IconNamePropType,
size: _propTypes2.default.number,
color: _propTypes2.default.string,
children: _propTypes2.default.node,
style: _propTypes2.default.any };
Icon.defaultProps = {
size: DEFAULT_ICON_SIZE,
allowFontScaling: false
};
var imageSourceCache = {};
function ensureNativeModuleAvailable() {
if (!NativeIconAPI) {
if (_reactNative.Platform.OS === 'android') {
throw new Error('RNVectorIconsModule not available, did you properly integrate the module? Try running `react-native link react-native-vector-icons` and recompiling.');
}
throw new Error('RNVectorIconsManager not available, did you add the library to your project and link with libRNVectorIcons.a? Try running `react-native link react-native-vector-icons` and recompiling.');
}
}
function getImageSource(name) {
var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_ICON_SIZE;
var color = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : DEFAULT_ICON_COLOR;
ensureNativeModuleAvailable();
var glyph = glyphMap[name] || '?';
if (typeof glyph === 'number') {
glyph = String.fromCharCode(glyph);
}
var processedColor = (0, _reactNative.processColor)(color);
var cacheKey = glyph + ':' + size + ':' + processedColor;
var scale = _reactNative.PixelRatio.get();
return new Promise(function (resolve, reject) {
var cached = imageSourceCache[cacheKey];
if (typeof cached !== 'undefined') {
if (!cached || cached instanceof Error) {
reject(cached);
} else {
resolve({ uri: cached, scale: scale });
}
} else {
NativeIconAPI.getImageForFont(fontReference, glyph, size, processedColor, function (err, image) {
var error = typeof err === 'string' ? new Error(err) : err;
imageSourceCache[cacheKey] = image || error || false;
if (!error && image) {
resolve({ uri: image, scale: scale });
} else {
reject(error);
}
});
}
});
}
function loadFont() {
var file = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : fontFile;
if (_reactNative.Platform.OS === 'ios') {
ensureNativeModuleAvailable();
if (!file) {
return Promise.reject(new Error('Unable to load font, because no file was specified. '));
}
return NativeIconAPI.loadFontWithFileName.apply(NativeIconAPI, babelHelpers.toConsumableArray(file.split('.')));
}
return Promise.resolve();
}
Icon.Button = (0, _iconButton2.default)(Icon);
Icon.TabBarItem = (0, _tabBarItemIos2.default)(IconNamePropType, getImageSource);
Icon.TabBarItemIOS = Icon.TabBarItem;
Icon.ToolbarAndroid = (0, _toolbarAndroid2.default)(IconNamePropType, getImageSource);
Icon.getImageSource = getImageSource;
Icon.loadFont = loadFont;
return Icon;
}
}, 711, null, "react-native-vector-icons/lib/create-icon-set.js");
__d(/* react-native-vector-icons/lib/react-native.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _reactNative = require(69 ); // 69 = react-native
Object.keys(_reactNative).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _reactNative[key];
}
});
});
}, 712, null, "react-native-vector-icons/lib/react-native.js");
__d(/* react-native-vector-icons/lib/icon-button.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/node_modules/react-native-vector-icons/lib/icon-button.js';
exports.default = createIconButtonComponent;
var _isString = require(714 ); // 714 = lodash/isString
var _isString2 = babelHelpers.interopRequireDefault(_isString);
var _omit = require(716 ); // 716 = lodash/omit
var _omit2 = babelHelpers.interopRequireDefault(_omit);
var _pick = require(844 ); // 844 = lodash/pick
var _pick2 = babelHelpers.interopRequireDefault(_pick);
var _react = require(34 ); // 34 = react
var _react2 = babelHelpers.interopRequireDefault(_react);
var _propTypes = require(550 ); // 550 = prop-types
var _propTypes2 = babelHelpers.interopRequireDefault(_propTypes);
var _reactNative = require(712 ); // 712 = ./react-native
var styles = _reactNative.StyleSheet.create({
container: {
flexDirection: 'row',
justifyContent: 'flex-start',
alignItems: 'center',
padding: 8
},
touchable: {
overflow: 'hidden'
},
icon: {
marginRight: 10
},
text: {
fontWeight: '600',
backgroundColor: 'transparent'
}
});
var IOS7_BLUE = '#007AFF';
function createIconButtonComponent(Icon) {
var _class, _temp;
return _temp = _class = function (_Component) {
babelHelpers.inherits(IconButton, _Component);
function IconButton() {
babelHelpers.classCallCheck(this, IconButton);
return babelHelpers.possibleConstructorReturn(this, (IconButton.__proto__ || Object.getPrototypeOf(IconButton)).apply(this, arguments));
}
babelHelpers.createClass(IconButton, [{
key: 'render',
value: function render() {
var _props = this.props,
style = _props.style,
iconStyle = _props.iconStyle,
children = _props.children,
restProps = babelHelpers.objectWithoutProperties(_props, ['style', 'iconStyle', 'children']);
var iconProps = (0, _pick2.default)(restProps, Object.keys(_reactNative.Text.propTypes), 'style', 'name', 'size', 'color');
var touchableProps = (0, _pick2.default)(restProps, Object.keys(_reactNative.TouchableHighlight.propTypes));
var props = (0, _omit2.default)(restProps, Object.keys(iconProps), Object.keys(touchableProps), 'iconStyle', 'borderRadius', 'backgroundColor');
iconProps.style = iconStyle ? [styles.icon, iconStyle] : styles.icon;
var colorStyle = (0, _pick2.default)(this.props, 'color');
var blockStyle = (0, _pick2.default)(this.props, 'backgroundColor', 'borderRadius');
return _react2.default.createElement(
_reactNative.TouchableHighlight,
babelHelpers.extends({
style: [styles.touchable, blockStyle]
}, touchableProps, {
__source: {
fileName: _jsxFileName,
lineNumber: 77
}
}),
_react2.default.createElement(
_reactNative.View,
babelHelpers.extends({ style: [styles.container, blockStyle, style] }, props, {
__source: {
fileName: _jsxFileName,
lineNumber: 81
}
}),
_react2.default.createElement(Icon, babelHelpers.extends({}, iconProps, {
__source: {
fileName: _jsxFileName,
lineNumber: 82
}
})),
(0, _isString2.default)(children) ? _react2.default.createElement(
_reactNative.Text,
{ style: [styles.text, colorStyle], __source: {
fileName: _jsxFileName,
lineNumber: 84
}
},
children
) : children
)
);
}
}]);
return IconButton;
}(_react.Component), _class.propTypes = {
backgroundColor: _propTypes2.default.string,
borderRadius: _propTypes2.default.number,
color: _propTypes2.default.string,
size: _propTypes2.default.number,
iconStyle: _propTypes2.default.any,
style: _propTypes2.default.any,
children: _propTypes2.default.node
}, _class.defaultProps = {
backgroundColor: IOS7_BLUE,
borderRadius: 5,
color: 'white',
size: 20
}, _temp;
}
}, 713, null, "react-native-vector-icons/lib/icon-button.js");
__d(/* lodash/isString.js */function(global, require, module, exports) {var baseGetTag = require(511 ), // 511 = ./_baseGetTag
isArray = require(715 ), // 715 = ./isArray
isObjectLike = require(519 ); // 519 = ./isObjectLike
var stringTag = '[object String]';
function isString(value) {
return typeof value == 'string' || !isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag;
}
module.exports = isString;
}, 714, null, "lodash/isString.js");
__d(/* lodash/isArray.js */function(global, require, module, exports) {
var isArray = Array.isArray;
module.exports = isArray;
}, 715, null, "lodash/isArray.js");
__d(/* lodash/omit.js */function(global, require, module, exports) {var arrayMap = require(717 ), // 717 = ./_arrayMap
baseClone = require(718 ), // 718 = ./_baseClone
baseUnset = require(818 ), // 818 = ./_baseUnset
castPath = require(819 ), // 819 = ./_castPath
copyObject = require(762 ), // 762 = ./_copyObject
customOmitClone = require(832 ), // 832 = ./_customOmitClone
flatRest = require(833 ), // 833 = ./_flatRest
getAllKeysIn = require(795 ); // 795 = ./_getAllKeysIn
var CLONE_DEEP_FLAG = 1,
CLONE_FLAT_FLAG = 2,
CLONE_SYMBOLS_FLAG = 4;
var omit = flatRest(function (object, paths) {
var result = {};
if (object == null) {
return result;
}
var isDeep = false;
paths = arrayMap(paths, function (path) {
path = castPath(path, object);
isDeep || (isDeep = path.length > 1);
return path;
});
copyObject(object, getAllKeysIn(object), result);
if (isDeep) {
result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
}
var length = paths.length;
while (length--) {
baseUnset(result, paths[length]);
}
return result;
});
module.exports = omit;
}, 716, null, "lodash/omit.js");
__d(/* lodash/_arrayMap.js */function(global, require, module, exports) {
function arrayMap(array, iteratee) {
var index = -1,
length = array == null ? 0 : array.length,
result = Array(length);
while (++index < length) {
result[index] = iteratee(array[index], index, array);
}
return result;
}
module.exports = arrayMap;
}, 717, null, "lodash/_arrayMap.js");
__d(/* lodash/_baseClone.js */function(global, require, module, exports) {var Stack = require(719 ), // 719 = ./_Stack
arrayEach = require(757 ), // 757 = ./_arrayEach
assignValue = require(758 ), // 758 = ./_assignValue
baseAssign = require(761 ), // 761 = ./_baseAssign
baseAssignIn = require(780 ), // 780 = ./_baseAssignIn
cloneBuffer = require(784 ), // 784 = ./_cloneBuffer
copyArray = require(785 ), // 785 = ./_copyArray
copySymbols = require(786 ), // 786 = ./_copySymbols
copySymbolsIn = require(790 ), // 790 = ./_copySymbolsIn
getAllKeys = require(793 ), // 793 = ./_getAllKeys
getAllKeysIn = require(795 ), // 795 = ./_getAllKeysIn
getTag = require(796 ), // 796 = ./_getTag
initCloneArray = require(801 ), // 801 = ./_initCloneArray
initCloneByTag = require(802 ), // 802 = ./_initCloneByTag
initCloneObject = require(816 ), // 816 = ./_initCloneObject
isArray = require(715 ), // 715 = ./isArray
isBuffer = require(768 ), // 768 = ./isBuffer
isObject = require(737 ), // 737 = ./isObject
keys = require(763 ); // 763 = ./keys
var CLONE_DEEP_FLAG = 1,
CLONE_FLAT_FLAG = 2,
CLONE_SYMBOLS_FLAG = 4;
var argsTag = '[object Arguments]',
arrayTag = '[object Array]',
boolTag = '[object Boolean]',
dateTag = '[object Date]',
errorTag = '[object Error]',
funcTag = '[object Function]',
genTag = '[object GeneratorFunction]',
mapTag = '[object Map]',
numberTag = '[object Number]',
objectTag = '[object Object]',
regexpTag = '[object RegExp]',
setTag = '[object Set]',
stringTag = '[object String]',
symbolTag = '[object Symbol]',
weakMapTag = '[object WeakMap]';
var arrayBufferTag = '[object ArrayBuffer]',
dataViewTag = '[object DataView]',
float32Tag = '[object Float32Array]',
float64Tag = '[object Float64Array]',
int8Tag = '[object Int8Array]',
int16Tag = '[object Int16Array]',
int32Tag = '[object Int32Array]',
uint8Tag = '[object Uint8Array]',
uint8ClampedTag = '[object Uint8ClampedArray]',
uint16Tag = '[object Uint16Array]',
uint32Tag = '[object Uint32Array]';
var cloneableTags = {};
cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = cloneableTags[boolTag] = cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag] = cloneableTags[numberTag] = cloneableTags[objectTag] = cloneableTags[regexpTag] = cloneableTags[setTag] = cloneableTags[stringTag] = cloneableTags[symbolTag] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false;
function baseClone(value, bitmask, customizer, key, object, stack) {
var result,
isDeep = bitmask & CLONE_DEEP_FLAG,
isFlat = bitmask & CLONE_FLAT_FLAG,
isFull = bitmask & CLONE_SYMBOLS_FLAG;
if (customizer) {
result = object ? customizer(value, key, object, stack) : customizer(value);
}
if (result !== undefined) {
return result;
}
if (!isObject(value)) {
return value;
}
var isArr = isArray(value);
if (isArr) {
result = initCloneArray(value);
if (!isDeep) {
return copyArray(value, result);
}
} else {
var tag = getTag(value),
isFunc = tag == funcTag || tag == genTag;
if (isBuffer(value)) {
return cloneBuffer(value, isDeep);
}
if (tag == objectTag || tag == argsTag || isFunc && !object) {
result = isFlat || isFunc ? {} : initCloneObject(value);
if (!isDeep) {
return isFlat ? copySymbolsIn(value, baseAssignIn(result, value)) : copySymbols(value, baseAssign(result, value));
}
} else {
if (!cloneableTags[tag]) {
return object ? value : {};
}
result = initCloneByTag(value, tag, baseClone, isDeep);
}
}
stack || (stack = new Stack());
var stacked = stack.get(value);
if (stacked) {
return stacked;
}
stack.set(value, result);
var keysFunc = isFull ? isFlat ? getAllKeysIn : getAllKeys : isFlat ? keysIn : keys;
var props = isArr ? undefined : keysFunc(value);
arrayEach(props || value, function (subValue, key) {
if (props) {
key = subValue;
subValue = value[key];
}
assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
});
return result;
}
module.exports = baseClone;
}, 718, null, "lodash/_baseClone.js");
__d(/* lodash/_Stack.js */function(global, require, module, exports) {var ListCache = require(720 ), // 720 = ./_ListCache
stackClear = require(728 ), // 728 = ./_stackClear
stackDelete = require(729 ), // 729 = ./_stackDelete
stackGet = require(730 ), // 730 = ./_stackGet
stackHas = require(731 ), // 731 = ./_stackHas
stackSet = require(732 ); // 732 = ./_stackSet
function Stack(entries) {
var data = this.__data__ = new ListCache(entries);
this.size = data.size;
}
Stack.prototype.clear = stackClear;
Stack.prototype['delete'] = stackDelete;
Stack.prototype.get = stackGet;
Stack.prototype.has = stackHas;
Stack.prototype.set = stackSet;
module.exports = Stack;
}, 719, null, "lodash/_Stack.js");
__d(/* lodash/_ListCache.js */function(global, require, module, exports) {var listCacheClear = require(721 ), // 721 = ./_listCacheClear
listCacheDelete = require(722 ), // 722 = ./_listCacheDelete
listCacheGet = require(725 ), // 725 = ./_listCacheGet
listCacheHas = require(726 ), // 726 = ./_listCacheHas
listCacheSet = require(727 ); // 727 = ./_listCacheSet
function ListCache(entries) {
var index = -1,
length = entries == null ? 0 : entries.length;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
ListCache.prototype.clear = listCacheClear;
ListCache.prototype['delete'] = listCacheDelete;
ListCache.prototype.get = listCacheGet;
ListCache.prototype.has = listCacheHas;
ListCache.prototype.set = listCacheSet;
module.exports = ListCache;
}, 720, null, "lodash/_ListCache.js");
__d(/* lodash/_listCacheClear.js */function(global, require, module, exports) {
function listCacheClear() {
this.__data__ = [];
this.size = 0;
}
module.exports = listCacheClear;
}, 721, null, "lodash/_listCacheClear.js");
__d(/* lodash/_listCacheDelete.js */function(global, require, module, exports) {var assocIndexOf = require(723 ); // 723 = ./_assocIndexOf
var arrayProto = Array.prototype;
var splice = arrayProto.splice;
function listCacheDelete(key) {
var data = this.__data__,
index = assocIndexOf(data, key);
if (index < 0) {
return false;
}
var lastIndex = data.length - 1;
if (index == lastIndex) {
data.pop();
} else {
splice.call(data, index, 1);
}
--this.size;
return true;
}
module.exports = listCacheDelete;
}, 722, null, "lodash/_listCacheDelete.js");
__d(/* lodash/_assocIndexOf.js */function(global, require, module, exports) {var eq = require(724 ); // 724 = ./eq
function assocIndexOf(array, key) {
var length = array.length;
while (length--) {
if (eq(array[length][0], key)) {
return length;
}
}
return -1;
}
module.exports = assocIndexOf;
}, 723, null, "lodash/_assocIndexOf.js");
__d(/* lodash/eq.js */function(global, require, module, exports) {
function eq(value, other) {
return value === other || value !== value && other !== other;
}
module.exports = eq;
}, 724, null, "lodash/eq.js");
__d(/* lodash/_listCacheGet.js */function(global, require, module, exports) {var assocIndexOf = require(723 ); // 723 = ./_assocIndexOf
function listCacheGet(key) {
var data = this.__data__,
index = assocIndexOf(data, key);
return index < 0 ? undefined : data[index][1];
}
module.exports = listCacheGet;
}, 725, null, "lodash/_listCacheGet.js");
__d(/* lodash/_listCacheHas.js */function(global, require, module, exports) {var assocIndexOf = require(723 ); // 723 = ./_assocIndexOf
function listCacheHas(key) {
return assocIndexOf(this.__data__, key) > -1;
}
module.exports = listCacheHas;
}, 726, null, "lodash/_listCacheHas.js");
__d(/* lodash/_listCacheSet.js */function(global, require, module, exports) {var assocIndexOf = require(723 ); // 723 = ./_assocIndexOf
function listCacheSet(key, value) {
var data = this.__data__,
index = assocIndexOf(data, key);
if (index < 0) {
++this.size;
data.push([key, value]);
} else {
data[index][1] = value;
}
return this;
}
module.exports = listCacheSet;
}, 727, null, "lodash/_listCacheSet.js");
__d(/* lodash/_stackClear.js */function(global, require, module, exports) {var ListCache = require(720 ); // 720 = ./_ListCache
function stackClear() {
this.__data__ = new ListCache();
this.size = 0;
}
module.exports = stackClear;
}, 728, null, "lodash/_stackClear.js");
__d(/* lodash/_stackDelete.js */function(global, require, module, exports) {
function stackDelete(key) {
var data = this.__data__,
result = data['delete'](key);
this.size = data.size;
return result;
}
module.exports = stackDelete;
}, 729, null, "lodash/_stackDelete.js");
__d(/* lodash/_stackGet.js */function(global, require, module, exports) {
function stackGet(key) {
return this.__data__.get(key);
}
module.exports = stackGet;
}, 730, null, "lodash/_stackGet.js");
__d(/* lodash/_stackHas.js */function(global, require, module, exports) {
function stackHas(key) {
return this.__data__.has(key);
}
module.exports = stackHas;
}, 731, null, "lodash/_stackHas.js");
__d(/* lodash/_stackSet.js */function(global, require, module, exports) {var ListCache = require(720 ), // 720 = ./_ListCache
Map = require(733 ), // 733 = ./_Map
MapCache = require(742 ); // 742 = ./_MapCache
var LARGE_ARRAY_SIZE = 200;
function stackSet(key, value) {
var data = this.__data__;
if (data instanceof ListCache) {
var pairs = data.__data__;
if (!Map || pairs.length < LARGE_ARRAY_SIZE - 1) {
pairs.push([key, value]);
this.size = ++data.size;
return this;
}
data = this.__data__ = new MapCache(pairs);
}
data.set(key, value);
this.size = data.size;
return this;
}
module.exports = stackSet;
}, 732, null, "lodash/_stackSet.js");
__d(/* lodash/_Map.js */function(global, require, module, exports) {var getNative = require(734 ), // 734 = ./_getNative
root = require(513 ); // 513 = ./_root
var Map = getNative(root, 'Map');
module.exports = Map;
}, 733, null, "lodash/_Map.js");
__d(/* lodash/_getNative.js */function(global, require, module, exports) {var baseIsNative = require(735 ), // 735 = ./_baseIsNative
getValue = require(741 ); // 741 = ./_getValue
function getNative(object, key) {
var value = getValue(object, key);
return baseIsNative(value) ? value : undefined;
}
module.exports = getNative;
}, 734, null, "lodash/_getNative.js");
__d(/* lodash/_baseIsNative.js */function(global, require, module, exports) {var isFunction = require(736 ), // 736 = ./isFunction
isMasked = require(738 ), // 738 = ./_isMasked
isObject = require(737 ), // 737 = ./isObject
toSource = require(740 ); // 740 = ./_toSource
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
var reIsHostCtor = /^\[object .+?Constructor\]$/;
var funcProto = Function.prototype,
objectProto = Object.prototype;
var funcToString = funcProto.toString;
var hasOwnProperty = objectProto.hasOwnProperty;
var reIsNative = RegExp('^' + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$');
function baseIsNative(value) {
if (!isObject(value) || isMasked(value)) {
return false;
}
var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
return pattern.test(toSource(value));
}
module.exports = baseIsNative;
}, 735, null, "lodash/_baseIsNative.js");
__d(/* lodash/isFunction.js */function(global, require, module, exports) {var baseGetTag = require(511 ), // 511 = ./_baseGetTag
isObject = require(737 ); // 737 = ./isObject
var asyncTag = '[object AsyncFunction]',
funcTag = '[object Function]',
genTag = '[object GeneratorFunction]',
proxyTag = '[object Proxy]';
function isFunction(value) {
if (!isObject(value)) {
return false;
}
var tag = baseGetTag(value);
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
}
module.exports = isFunction;
}, 736, null, "lodash/isFunction.js");
__d(/* lodash/isObject.js */function(global, require, module, exports) {
function isObject(value) {
var type = typeof value;
return value != null && (type == 'object' || type == 'function');
}
module.exports = isObject;
}, 737, null, "lodash/isObject.js");
__d(/* lodash/_isMasked.js */function(global, require, module, exports) {var coreJsData = require(739 ); // 739 = ./_coreJsData
var maskSrcKey = function () {
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
return uid ? 'Symbol(src)_1.' + uid : '';
}();
function isMasked(func) {
return !!maskSrcKey && maskSrcKey in func;
}
module.exports = isMasked;
}, 738, null, "lodash/_isMasked.js");
__d(/* lodash/_coreJsData.js */function(global, require, module, exports) {var root = require(513 ); // 513 = ./_root
var coreJsData = root['__core-js_shared__'];
module.exports = coreJsData;
}, 739, null, "lodash/_coreJsData.js");
__d(/* lodash/_toSource.js */function(global, require, module, exports) {
var funcProto = Function.prototype;
var funcToString = funcProto.toString;
function toSource(func) {
if (func != null) {
try {
return funcToString.call(func);
} catch (e) {}
try {
return func + '';
} catch (e) {}
}
return '';
}
module.exports = toSource;
}, 740, null, "lodash/_toSource.js");
__d(/* lodash/_getValue.js */function(global, require, module, exports) {
function getValue(object, key) {
return object == null ? undefined : object[key];
}
module.exports = getValue;
}, 741, null, "lodash/_getValue.js");
__d(/* lodash/_MapCache.js */function(global, require, module, exports) {var mapCacheClear = require(743 ), // 743 = ./_mapCacheClear
mapCacheDelete = require(751 ), // 751 = ./_mapCacheDelete
mapCacheGet = require(754 ), // 754 = ./_mapCacheGet
mapCacheHas = require(755 ), // 755 = ./_mapCacheHas
mapCacheSet = require(756 ); // 756 = ./_mapCacheSet
function MapCache(entries) {
var index = -1,
length = entries == null ? 0 : entries.length;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
MapCache.prototype.clear = mapCacheClear;
MapCache.prototype['delete'] = mapCacheDelete;
MapCache.prototype.get = mapCacheGet;
MapCache.prototype.has = mapCacheHas;
MapCache.prototype.set = mapCacheSet;
module.exports = MapCache;
}, 742, null, "lodash/_MapCache.js");
__d(/* lodash/_mapCacheClear.js */function(global, require, module, exports) {var Hash = require(744 ), // 744 = ./_Hash
ListCache = require(720 ), // 720 = ./_ListCache
Map = require(733 ); // 733 = ./_Map
function mapCacheClear() {
this.size = 0;
this.__data__ = {
'hash': new Hash(),
'map': new (Map || ListCache)(),
'string': new Hash()
};
}
module.exports = mapCacheClear;
}, 743, null, "lodash/_mapCacheClear.js");
__d(/* lodash/_Hash.js */function(global, require, module, exports) {var hashClear = require(745 ), // 745 = ./_hashClear
hashDelete = require(747 ), // 747 = ./_hashDelete
hashGet = require(748 ), // 748 = ./_hashGet
hashHas = require(749 ), // 749 = ./_hashHas
hashSet = require(750 ); // 750 = ./_hashSet
function Hash(entries) {
var index = -1,
length = entries == null ? 0 : entries.length;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
Hash.prototype.clear = hashClear;
Hash.prototype['delete'] = hashDelete;
Hash.prototype.get = hashGet;
Hash.prototype.has = hashHas;
Hash.prototype.set = hashSet;
module.exports = Hash;
}, 744, null, "lodash/_Hash.js");
__d(/* lodash/_hashClear.js */function(global, require, module, exports) {var nativeCreate = require(746 ); // 746 = ./_nativeCreate
function hashClear() {
this.__data__ = nativeCreate ? nativeCreate(null) : {};
this.size = 0;
}
module.exports = hashClear;
}, 745, null, "lodash/_hashClear.js");
__d(/* lodash/_nativeCreate.js */function(global, require, module, exports) {var getNative = require(734 ); // 734 = ./_getNative
var nativeCreate = getNative(Object, 'create');
module.exports = nativeCreate;
}, 746, null, "lodash/_nativeCreate.js");
__d(/* lodash/_hashDelete.js */function(global, require, module, exports) {
function hashDelete(key) {
var result = this.has(key) && delete this.__data__[key];
this.size -= result ? 1 : 0;
return result;
}
module.exports = hashDelete;
}, 747, null, "lodash/_hashDelete.js");
__d(/* lodash/_hashGet.js */function(global, require, module, exports) {var nativeCreate = require(746 ); // 746 = ./_nativeCreate
var HASH_UNDEFINED = '__lodash_hash_undefined__';
var objectProto = Object.prototype;
var hasOwnProperty = objectProto.hasOwnProperty;
function hashGet(key) {
var data = this.__data__;
if (nativeCreate) {
var result = data[key];
return result === HASH_UNDEFINED ? undefined : result;
}
return hasOwnProperty.call(data, key) ? data[key] : undefined;
}
module.exports = hashGet;
}, 748, null, "lodash/_hashGet.js");
__d(/* lodash/_hashHas.js */function(global, require, module, exports) {var nativeCreate = require(746 ); // 746 = ./_nativeCreate
var objectProto = Object.prototype;
var hasOwnProperty = objectProto.hasOwnProperty;
function hashHas(key) {
var data = this.__data__;
return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
}
module.exports = hashHas;
}, 749, null, "lodash/_hashHas.js");
__d(/* lodash/_hashSet.js */function(global, require, module, exports) {var nativeCreate = require(746 ); // 746 = ./_nativeCreate
var HASH_UNDEFINED = '__lodash_hash_undefined__';
function hashSet(key, value) {
var data = this.__data__;
this.size += this.has(key) ? 0 : 1;
data[key] = nativeCreate && value === undefined ? HASH_UNDEFINED : value;
return this;
}
module.exports = hashSet;
}, 750, null, "lodash/_hashSet.js");
__d(/* lodash/_mapCacheDelete.js */function(global, require, module, exports) {var getMapData = require(752 ); // 752 = ./_getMapData
function mapCacheDelete(key) {
var result = getMapData(this, key)['delete'](key);
this.size -= result ? 1 : 0;
return result;
}
module.exports = mapCacheDelete;
}, 751, null, "lodash/_mapCacheDelete.js");
__d(/* lodash/_getMapData.js */function(global, require, module, exports) {var isKeyable = require(753 ); // 753 = ./_isKeyable
function getMapData(map, key) {
var data = map.__data__;
return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map;
}
module.exports = getMapData;
}, 752, null, "lodash/_getMapData.js");
__d(/* lodash/_isKeyable.js */function(global, require, module, exports) {
function isKeyable(value) {
var type = typeof value;
return type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean' ? value !== '__proto__' : value === null;
}
module.exports = isKeyable;
}, 753, null, "lodash/_isKeyable.js");
__d(/* lodash/_mapCacheGet.js */function(global, require, module, exports) {var getMapData = require(752 ); // 752 = ./_getMapData
function mapCacheGet(key) {
return getMapData(this, key).get(key);
}
module.exports = mapCacheGet;
}, 754, null, "lodash/_mapCacheGet.js");
__d(/* lodash/_mapCacheHas.js */function(global, require, module, exports) {var getMapData = require(752 ); // 752 = ./_getMapData
function mapCacheHas(key) {
return getMapData(this, key).has(key);
}
module.exports = mapCacheHas;
}, 755, null, "lodash/_mapCacheHas.js");
__d(/* lodash/_mapCacheSet.js */function(global, require, module, exports) {var getMapData = require(752 ); // 752 = ./_getMapData
function mapCacheSet(key, value) {
var data = getMapData(this, key),
size = data.size;
data.set(key, value);
this.size += data.size == size ? 0 : 1;
return this;
}
module.exports = mapCacheSet;
}, 756, null, "lodash/_mapCacheSet.js");
__d(/* lodash/_arrayEach.js */function(global, require, module, exports) {
function arrayEach(array, iteratee) {
var index = -1,
length = array == null ? 0 : array.length;
while (++index < length) {
if (iteratee(array[index], index, array) === false) {
break;
}
}
return array;
}
module.exports = arrayEach;
}, 757, null, "lodash/_arrayEach.js");
__d(/* lodash/_assignValue.js */function(global, require, module, exports) {var baseAssignValue = require(759 ), // 759 = ./_baseAssignValue
eq = require(724 ); // 724 = ./eq
var objectProto = Object.prototype;
var hasOwnProperty = objectProto.hasOwnProperty;
function assignValue(object, key, value) {
var objValue = object[key];
if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || value === undefined && !(key in object)) {
baseAssignValue(object, key, value);
}
}
module.exports = assignValue;
}, 758, null, "lodash/_assignValue.js");
__d(/* lodash/_baseAssignValue.js */function(global, require, module, exports) {var defineProperty = require(760 ); // 760 = ./_defineProperty
function baseAssignValue(object, key, value) {
if (key == '__proto__' && defineProperty) {
defineProperty(object, key, {
'configurable': true,
'enumerable': true,
'value': value,
'writable': true
});
} else {
object[key] = value;
}
}
module.exports = baseAssignValue;
}, 759, null, "lodash/_baseAssignValue.js");
__d(/* lodash/_defineProperty.js */function(global, require, module, exports) {var getNative = require(734 ); // 734 = ./_getNative
var defineProperty = function () {
try {
var func = getNative(Object, 'defineProperty');
func({}, '', {});
return func;
} catch (e) {}
}();
module.exports = defineProperty;
}, 760, null, "lodash/_defineProperty.js");
__d(/* lodash/_baseAssign.js */function(global, require, module, exports) {var copyObject = require(762 ), // 762 = ./_copyObject
keys = require(763 ); // 763 = ./keys
function baseAssign(object, source) {
return object && copyObject(source, keys(source), object);
}
module.exports = baseAssign;
}, 761, null, "lodash/_baseAssign.js");
__d(/* lodash/_copyObject.js */function(global, require, module, exports) {var assignValue = require(758 ), // 758 = ./_assignValue
baseAssignValue = require(759 ); // 759 = ./_baseAssignValue
function copyObject(source, props, object, customizer) {
var isNew = !object;
object || (object = {});
var index = -1,
length = props.length;
while (++index < length) {
var key = props[index];
var newValue = customizer ? customizer(object[key], source[key], key, object, source) : undefined;
if (newValue === undefined) {
newValue = source[key];
}
if (isNew) {
baseAssignValue(object, key, newValue);
} else {
assignValue(object, key, newValue);
}
}
return object;
}
module.exports = copyObject;
}, 762, null, "lodash/_copyObject.js");
__d(/* lodash/keys.js */function(global, require, module, exports) {var arrayLikeKeys = require(764 ), // 764 = ./_arrayLikeKeys
baseKeys = require(776 ), // 776 = ./_baseKeys
isArrayLike = require(779 ); // 779 = ./isArrayLike
function keys(object) {
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
}
module.exports = keys;
}, 763, null, "lodash/keys.js");
__d(/* lodash/_arrayLikeKeys.js */function(global, require, module, exports) {var baseTimes = require(765 ), // 765 = ./_baseTimes
isArguments = require(766 ), // 766 = ./isArguments
isArray = require(715 ), // 715 = ./isArray
isBuffer = require(768 ), // 768 = ./isBuffer
isIndex = require(770 ), // 770 = ./_isIndex
isTypedArray = require(771 ); // 771 = ./isTypedArray
var objectProto = Object.prototype;
var hasOwnProperty = objectProto.hasOwnProperty;
function arrayLikeKeys(value, inherited) {
var isArr = isArray(value),
isArg = !isArr && isArguments(value),
isBuff = !isArr && !isArg && isBuffer(value),
isType = !isArr && !isArg && !isBuff && isTypedArray(value),
skipIndexes = isArr || isArg || isBuff || isType,
result = skipIndexes ? baseTimes(value.length, String) : [],
length = result.length;
for (var key in value) {
if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && (key == 'length' || isBuff && (key == 'offset' || key == 'parent') || isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset') || isIndex(key, length)))) {
result.push(key);
}
}
return result;
}
module.exports = arrayLikeKeys;
}, 764, null, "lodash/_arrayLikeKeys.js");
__d(/* lodash/_baseTimes.js */function(global, require, module, exports) {
function baseTimes(n, iteratee) {
var index = -1,
result = Array(n);
while (++index < n) {
result[index] = iteratee(index);
}
return result;
}
module.exports = baseTimes;
}, 765, null, "lodash/_baseTimes.js");
__d(/* lodash/isArguments.js */function(global, require, module, exports) {var baseIsArguments = require(767 ), // 767 = ./_baseIsArguments
isObjectLike = require(519 ); // 519 = ./isObjectLike
var objectProto = Object.prototype;
var hasOwnProperty = objectProto.hasOwnProperty;
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
var isArguments = baseIsArguments(function () {
return arguments;
}()) ? baseIsArguments : function (value) {
return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee');
};
module.exports = isArguments;
}, 766, null, "lodash/isArguments.js");
__d(/* lodash/_baseIsArguments.js */function(global, require, module, exports) {var baseGetTag = require(511 ), // 511 = ./_baseGetTag
isObjectLike = require(519 ); // 519 = ./isObjectLike
var argsTag = '[object Arguments]';
function baseIsArguments(value) {
return isObjectLike(value) && baseGetTag(value) == argsTag;
}
module.exports = baseIsArguments;
}, 767, null, "lodash/_baseIsArguments.js");
__d(/* lodash/isBuffer.js */function(global, require, module, exports) {var root = require(513 ), // 513 = ./_root
stubFalse = require(769 ); // 769 = ./stubFalse
var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
var moduleExports = freeModule && freeModule.exports === freeExports;
var Buffer = moduleExports ? root.Buffer : undefined;
var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
var isBuffer = nativeIsBuffer || stubFalse;
module.exports = isBuffer;
}, 768, null, "lodash/isBuffer.js");
__d(/* lodash/stubFalse.js */function(global, require, module, exports) {
function stubFalse() {
return false;
}
module.exports = stubFalse;
}, 769, null, "lodash/stubFalse.js");
__d(/* lodash/_isIndex.js */function(global, require, module, exports) {
var MAX_SAFE_INTEGER = 9007199254740991;
var reIsUint = /^(?:0|[1-9]\d*)$/;
function isIndex(value, length) {
length = length == null ? MAX_SAFE_INTEGER : length;
return !!length && (typeof value == 'number' || reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length;
}
module.exports = isIndex;
}, 770, null, "lodash/_isIndex.js");
__d(/* lodash/isTypedArray.js */function(global, require, module, exports) {var baseIsTypedArray = require(772 ), // 772 = ./_baseIsTypedArray
baseUnary = require(774 ), // 774 = ./_baseUnary
nodeUtil = require(775 ); // 775 = ./_nodeUtil
var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
module.exports = isTypedArray;
}, 771, null, "lodash/isTypedArray.js");
__d(/* lodash/_baseIsTypedArray.js */function(global, require, module, exports) {var baseGetTag = require(511 ), // 511 = ./_baseGetTag
isLength = require(773 ), // 773 = ./isLength
isObjectLike = require(519 ); // 519 = ./isObjectLike
var argsTag = '[object Arguments]',
arrayTag = '[object Array]',
boolTag = '[object Boolean]',
dateTag = '[object Date]',
errorTag = '[object Error]',
funcTag = '[object Function]',
mapTag = '[object Map]',
numberTag = '[object Number]',
objectTag = '[object Object]',
regexpTag = '[object RegExp]',
setTag = '[object Set]',
stringTag = '[object String]',
weakMapTag = '[object WeakMap]';
var arrayBufferTag = '[object ArrayBuffer]',
dataViewTag = '[object DataView]',
float32Tag = '[object Float32Array]',
float64Tag = '[object Float64Array]',
int8Tag = '[object Int8Array]',
int16Tag = '[object Int16Array]',
int32Tag = '[object Int32Array]',
uint8Tag = '[object Uint8Array]',
uint8ClampedTag = '[object Uint8ClampedArray]',
uint16Tag = '[object Uint16Array]',
uint32Tag = '[object Uint32Array]';
var typedArrayTags = {};
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
function baseIsTypedArray(value) {
return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
}
module.exports = baseIsTypedArray;
}, 772, null, "lodash/_baseIsTypedArray.js");
__d(/* lodash/isLength.js */function(global, require, module, exports) {
var MAX_SAFE_INTEGER = 9007199254740991;
function isLength(value) {
return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
}
module.exports = isLength;
}, 773, null, "lodash/isLength.js");
__d(/* lodash/_baseUnary.js */function(global, require, module, exports) {
function baseUnary(func) {
return function (value) {
return func(value);
};
}
module.exports = baseUnary;
}, 774, null, "lodash/_baseUnary.js");
__d(/* lodash/_nodeUtil.js */function(global, require, module, exports) {var freeGlobal = require(514 ); // 514 = ./_freeGlobal
var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
var moduleExports = freeModule && freeModule.exports === freeExports;
var freeProcess = moduleExports && freeGlobal.process;
var nodeUtil = function () {
try {
return freeProcess && freeProcess.binding && freeProcess.binding('util');
} catch (e) {}
}();
module.exports = nodeUtil;
}, 775, null, "lodash/_nodeUtil.js");
__d(/* lodash/_baseKeys.js */function(global, require, module, exports) {var isPrototype = require(777 ), // 777 = ./_isPrototype
nativeKeys = require(778 ); // 778 = ./_nativeKeys
var objectProto = Object.prototype;
var hasOwnProperty = objectProto.hasOwnProperty;
function baseKeys(object) {
if (!isPrototype(object)) {
return nativeKeys(object);
}
var result = [];
for (var key in Object(object)) {
if (hasOwnProperty.call(object, key) && key != 'constructor') {
result.push(key);
}
}
return result;
}
module.exports = baseKeys;
}, 776, null, "lodash/_baseKeys.js");
__d(/* lodash/_isPrototype.js */function(global, require, module, exports) {
var objectProto = Object.prototype;
function isPrototype(value) {
var Ctor = value && value.constructor,
proto = typeof Ctor == 'function' && Ctor.prototype || objectProto;
return value === proto;
}
module.exports = isPrototype;
}, 777, null, "lodash/_isPrototype.js");
__d(/* lodash/_nativeKeys.js */function(global, require, module, exports) {var overArg = require(518 ); // 518 = ./_overArg
var nativeKeys = overArg(Object.keys, Object);
module.exports = nativeKeys;
}, 778, null, "lodash/_nativeKeys.js");
__d(/* lodash/isArrayLike.js */function(global, require, module, exports) {var isFunction = require(736 ), // 736 = ./isFunction
isLength = require(773 ); // 773 = ./isLength
function isArrayLike(value) {
return value != null && isLength(value.length) && !isFunction(value);
}
module.exports = isArrayLike;
}, 779, null, "lodash/isArrayLike.js");
__d(/* lodash/_baseAssignIn.js */function(global, require, module, exports) {var copyObject = require(762 ), // 762 = ./_copyObject
keysIn = require(781 ); // 781 = ./keysIn
function baseAssignIn(object, source) {
return object && copyObject(source, keysIn(source), object);
}
module.exports = baseAssignIn;
}, 780, null, "lodash/_baseAssignIn.js");
__d(/* lodash/keysIn.js */function(global, require, module, exports) {var arrayLikeKeys = require(764 ), // 764 = ./_arrayLikeKeys
baseKeysIn = require(782 ), // 782 = ./_baseKeysIn
isArrayLike = require(779 ); // 779 = ./isArrayLike
function keysIn(object) {
return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
}
module.exports = keysIn;
}, 781, null, "lodash/keysIn.js");
__d(/* lodash/_baseKeysIn.js */function(global, require, module, exports) {var isObject = require(737 ), // 737 = ./isObject
isPrototype = require(777 ), // 777 = ./_isPrototype
nativeKeysIn = require(783 ); // 783 = ./_nativeKeysIn
var objectProto = Object.prototype;
var hasOwnProperty = objectProto.hasOwnProperty;
function baseKeysIn(object) {
if (!isObject(object)) {
return nativeKeysIn(object);
}
var isProto = isPrototype(object),
result = [];
for (var key in object) {
if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
result.push(key);
}
}
return result;
}
module.exports = baseKeysIn;
}, 782, null, "lodash/_baseKeysIn.js");
__d(/* lodash/_nativeKeysIn.js */function(global, require, module, exports) {
function nativeKeysIn(object) {
var result = [];
if (object != null) {
for (var key in Object(object)) {
result.push(key);
}
}
return result;
}
module.exports = nativeKeysIn;
}, 783, null, "lodash/_nativeKeysIn.js");
__d(/* lodash/_cloneBuffer.js */function(global, require, module, exports) {var root = require(513 ); // 513 = ./_root
var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
var moduleExports = freeModule && freeModule.exports === freeExports;
var Buffer = moduleExports ? root.Buffer : undefined,
allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;
function cloneBuffer(buffer, isDeep) {
if (isDeep) {
return buffer.slice();
}
var length = buffer.length,
result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
buffer.copy(result);
return result;
}
module.exports = cloneBuffer;
}, 784, null, "lodash/_cloneBuffer.js");
__d(/* lodash/_copyArray.js */function(global, require, module, exports) {
function copyArray(source, array) {
var index = -1,
length = source.length;
array || (array = Array(length));
while (++index < length) {
array[index] = source[index];
}
return array;
}
module.exports = copyArray;
}, 785, null, "lodash/_copyArray.js");
__d(/* lodash/_copySymbols.js */function(global, require, module, exports) {var copyObject = require(762 ), // 762 = ./_copyObject
getSymbols = require(787 ); // 787 = ./_getSymbols
function copySymbols(source, object) {
return copyObject(source, getSymbols(source), object);
}
module.exports = copySymbols;
}, 786, null, "lodash/_copySymbols.js");
__d(/* lodash/_getSymbols.js */function(global, require, module, exports) {var arrayFilter = require(788 ), // 788 = ./_arrayFilter
stubArray = require(789 ); // 789 = ./stubArray
var objectProto = Object.prototype;
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
var nativeGetSymbols = Object.getOwnPropertySymbols;
var getSymbols = !nativeGetSymbols ? stubArray : function (object) {
if (object == null) {
return [];
}
object = Object(object);
return arrayFilter(nativeGetSymbols(object), function (symbol) {
return propertyIsEnumerable.call(object, symbol);
});
};
module.exports = getSymbols;
}, 787, null, "lodash/_getSymbols.js");
__d(/* lodash/_arrayFilter.js */function(global, require, module, exports) {
function arrayFilter(array, predicate) {
var index = -1,
length = array == null ? 0 : array.length,
resIndex = 0,
result = [];
while (++index < length) {
var value = array[index];
if (predicate(value, index, array)) {
result[resIndex++] = value;
}
}
return result;
}
module.exports = arrayFilter;
}, 788, null, "lodash/_arrayFilter.js");
__d(/* lodash/stubArray.js */function(global, require, module, exports) {
function stubArray() {
return [];
}
module.exports = stubArray;
}, 789, null, "lodash/stubArray.js");
__d(/* lodash/_copySymbolsIn.js */function(global, require, module, exports) {var copyObject = require(762 ), // 762 = ./_copyObject
getSymbolsIn = require(791 ); // 791 = ./_getSymbolsIn
function copySymbolsIn(source, object) {
return copyObject(source, getSymbolsIn(source), object);
}
module.exports = copySymbolsIn;
}, 790, null, "lodash/_copySymbolsIn.js");
__d(/* lodash/_getSymbolsIn.js */function(global, require, module, exports) {var arrayPush = require(792 ), // 792 = ./_arrayPush
getPrototype = require(517 ), // 517 = ./_getPrototype
getSymbols = require(787 ), // 787 = ./_getSymbols
stubArray = require(789 ); // 789 = ./stubArray
var nativeGetSymbols = Object.getOwnPropertySymbols;
var getSymbolsIn = !nativeGetSymbols ? stubArray : function (object) {
var result = [];
while (object) {
arrayPush(result, getSymbols(object));
object = getPrototype(object);
}
return result;
};
module.exports = getSymbolsIn;
}, 791, null, "lodash/_getSymbolsIn.js");
__d(/* lodash/_arrayPush.js */function(global, require, module, exports) {
function arrayPush(array, values) {
var index = -1,
length = values.length,
offset = array.length;
while (++index < length) {
array[offset + index] = values[index];
}
return array;
}
module.exports = arrayPush;
}, 792, null, "lodash/_arrayPush.js");
__d(/* lodash/_getAllKeys.js */function(global, require, module, exports) {var baseGetAllKeys = require(794 ), // 794 = ./_baseGetAllKeys
getSymbols = require(787 ), // 787 = ./_getSymbols
keys = require(763 ); // 763 = ./keys
function getAllKeys(object) {
return baseGetAllKeys(object, keys, getSymbols);
}
module.exports = getAllKeys;
}, 793, null, "lodash/_getAllKeys.js");
__d(/* lodash/_baseGetAllKeys.js */function(global, require, module, exports) {var arrayPush = require(792 ), // 792 = ./_arrayPush
isArray = require(715 ); // 715 = ./isArray
function baseGetAllKeys(object, keysFunc, symbolsFunc) {
var result = keysFunc(object);
return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
}
module.exports = baseGetAllKeys;
}, 794, null, "lodash/_baseGetAllKeys.js");
__d(/* lodash/_getAllKeysIn.js */function(global, require, module, exports) {var baseGetAllKeys = require(794 ), // 794 = ./_baseGetAllKeys
getSymbolsIn = require(791 ), // 791 = ./_getSymbolsIn
keysIn = require(781 ); // 781 = ./keysIn
function getAllKeysIn(object) {
return baseGetAllKeys(object, keysIn, getSymbolsIn);
}
module.exports = getAllKeysIn;
}, 795, null, "lodash/_getAllKeysIn.js");
__d(/* lodash/_getTag.js */function(global, require, module, exports) {var DataView = require(797 ), // 797 = ./_DataView
Map = require(733 ), // 733 = ./_Map
Promise = require(798 ), // 798 = ./_Promise
Set = require(799 ), // 799 = ./_Set
WeakMap = require(800 ), // 800 = ./_WeakMap
baseGetTag = require(511 ), // 511 = ./_baseGetTag
toSource = require(740 ); // 740 = ./_toSource
var mapTag = '[object Map]',
objectTag = '[object Object]',
promiseTag = '[object Promise]',
setTag = '[object Set]',
weakMapTag = '[object WeakMap]';
var dataViewTag = '[object DataView]';
var dataViewCtorString = toSource(DataView),
mapCtorString = toSource(Map),
promiseCtorString = toSource(Promise),
setCtorString = toSource(Set),
weakMapCtorString = toSource(WeakMap);
var getTag = baseGetTag;
if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map && getTag(new Map()) != mapTag || Promise && getTag(Promise.resolve()) != promiseTag || Set && getTag(new Set()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) {
getTag = function getTag(value) {
var result = baseGetTag(value),
Ctor = result == objectTag ? value.constructor : undefined,
ctorString = Ctor ? toSource(Ctor) : '';
if (ctorString) {
switch (ctorString) {
case dataViewCtorString:
return dataViewTag;
case mapCtorString:
return mapTag;
case promiseCtorString:
return promiseTag;
case setCtorString:
return setTag;
case weakMapCtorString:
return weakMapTag;
}
}
return result;
};
}
module.exports = getTag;
}, 796, null, "lodash/_getTag.js");
__d(/* lodash/_DataView.js */function(global, require, module, exports) {var getNative = require(734 ), // 734 = ./_getNative
root = require(513 ); // 513 = ./_root
var DataView = getNative(root, 'DataView');
module.exports = DataView;
}, 797, null, "lodash/_DataView.js");
__d(/* lodash/_Promise.js */function(global, require, module, exports) {var getNative = require(734 ), // 734 = ./_getNative
root = require(513 ); // 513 = ./_root
var Promise = getNative(root, 'Promise');
module.exports = Promise;
}, 798, null, "lodash/_Promise.js");
__d(/* lodash/_Set.js */function(global, require, module, exports) {var getNative = require(734 ), // 734 = ./_getNative
root = require(513 ); // 513 = ./_root
var Set = getNative(root, 'Set');
module.exports = Set;
}, 799, null, "lodash/_Set.js");
__d(/* lodash/_WeakMap.js */function(global, require, module, exports) {var getNative = require(734 ), // 734 = ./_getNative
root = require(513 ); // 513 = ./_root
var WeakMap = getNative(root, 'WeakMap');
module.exports = WeakMap;
}, 800, null, "lodash/_WeakMap.js");
__d(/* lodash/_initCloneArray.js */function(global, require, module, exports) {
var objectProto = Object.prototype;
var hasOwnProperty = objectProto.hasOwnProperty;
function initCloneArray(array) {
var length = array.length,
result = array.constructor(length);
if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
result.index = array.index;
result.input = array.input;
}
return result;
}
module.exports = initCloneArray;
}, 801, null, "lodash/_initCloneArray.js");
__d(/* lodash/_initCloneByTag.js */function(global, require, module, exports) {var cloneArrayBuffer = require(803 ), // 803 = ./_cloneArrayBuffer
cloneDataView = require(805 ), // 805 = ./_cloneDataView
cloneMap = require(806 ), // 806 = ./_cloneMap
cloneRegExp = require(810 ), // 810 = ./_cloneRegExp
cloneSet = require(811 ), // 811 = ./_cloneSet
cloneSymbol = require(814 ), // 814 = ./_cloneSymbol
cloneTypedArray = require(815 ); // 815 = ./_cloneTypedArray
var boolTag = '[object Boolean]',
dateTag = '[object Date]',
mapTag = '[object Map]',
numberTag = '[object Number]',
regexpTag = '[object RegExp]',
setTag = '[object Set]',
stringTag = '[object String]',
symbolTag = '[object Symbol]';
var arrayBufferTag = '[object ArrayBuffer]',
dataViewTag = '[object DataView]',
float32Tag = '[object Float32Array]',
float64Tag = '[object Float64Array]',
int8Tag = '[object Int8Array]',
int16Tag = '[object Int16Array]',
int32Tag = '[object Int32Array]',
uint8Tag = '[object Uint8Array]',
uint8ClampedTag = '[object Uint8ClampedArray]',
uint16Tag = '[object Uint16Array]',
uint32Tag = '[object Uint32Array]';
function initCloneByTag(object, tag, cloneFunc, isDeep) {
var Ctor = object.constructor;
switch (tag) {
case arrayBufferTag:
return cloneArrayBuffer(object);
case boolTag:
case dateTag:
return new Ctor(+object);
case dataViewTag:
return cloneDataView(object, isDeep);
case float32Tag:case float64Tag:
case int8Tag:case int16Tag:case int32Tag:
case uint8Tag:case uint8ClampedTag:case uint16Tag:case uint32Tag:
return cloneTypedArray(object, isDeep);
case mapTag:
return cloneMap(object, isDeep, cloneFunc);
case numberTag:
case stringTag:
return new Ctor(object);
case regexpTag:
return cloneRegExp(object);
case setTag:
return cloneSet(object, isDeep, cloneFunc);
case symbolTag:
return cloneSymbol(object);
}
}
module.exports = initCloneByTag;
}, 802, null, "lodash/_initCloneByTag.js");
__d(/* lodash/_cloneArrayBuffer.js */function(global, require, module, exports) {var Uint8Array = require(804 ); // 804 = ./_Uint8Array
function cloneArrayBuffer(arrayBuffer) {
var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
new Uint8Array(result).set(new Uint8Array(arrayBuffer));
return result;
}
module.exports = cloneArrayBuffer;
}, 803, null, "lodash/_cloneArrayBuffer.js");
__d(/* lodash/_Uint8Array.js */function(global, require, module, exports) {var root = require(513 ); // 513 = ./_root
var Uint8Array = root.Uint8Array;
module.exports = Uint8Array;
}, 804, null, "lodash/_Uint8Array.js");
__d(/* lodash/_cloneDataView.js */function(global, require, module, exports) {var cloneArrayBuffer = require(803 ); // 803 = ./_cloneArrayBuffer
function cloneDataView(dataView, isDeep) {
var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
}
module.exports = cloneDataView;
}, 805, null, "lodash/_cloneDataView.js");
__d(/* lodash/_cloneMap.js */function(global, require, module, exports) {var addMapEntry = require(807 ), // 807 = ./_addMapEntry
arrayReduce = require(808 ), // 808 = ./_arrayReduce
mapToArray = require(809 ); // 809 = ./_mapToArray
var CLONE_DEEP_FLAG = 1;
function cloneMap(map, isDeep, cloneFunc) {
var array = isDeep ? cloneFunc(mapToArray(map), CLONE_DEEP_FLAG) : mapToArray(map);
return arrayReduce(array, addMapEntry, new map.constructor());
}
module.exports = cloneMap;
}, 806, null, "lodash/_cloneMap.js");
__d(/* lodash/_addMapEntry.js */function(global, require, module, exports) {
function addMapEntry(map, pair) {
map.set(pair[0], pair[1]);
return map;
}
module.exports = addMapEntry;
}, 807, null, "lodash/_addMapEntry.js");
__d(/* lodash/_arrayReduce.js */function(global, require, module, exports) {
function arrayReduce(array, iteratee, accumulator, initAccum) {
var index = -1,
length = array == null ? 0 : array.length;
if (initAccum && length) {
accumulator = array[++index];
}
while (++index < length) {
accumulator = iteratee(accumulator, array[index], index, array);
}
return accumulator;
}
module.exports = arrayReduce;
}, 808, null, "lodash/_arrayReduce.js");
__d(/* lodash/_mapToArray.js */function(global, require, module, exports) {
function mapToArray(map) {
var index = -1,
result = Array(map.size);
map.forEach(function (value, key) {
result[++index] = [key, value];
});
return result;
}
module.exports = mapToArray;
}, 809, null, "lodash/_mapToArray.js");
__d(/* lodash/_cloneRegExp.js */function(global, require, module, exports) {
var reFlags = /\w*$/;
function cloneRegExp(regexp) {
var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
result.lastIndex = regexp.lastIndex;
return result;
}
module.exports = cloneRegExp;
}, 810, null, "lodash/_cloneRegExp.js");
__d(/* lodash/_cloneSet.js */function(global, require, module, exports) {var addSetEntry = require(812 ), // 812 = ./_addSetEntry
arrayReduce = require(808 ), // 808 = ./_arrayReduce
setToArray = require(813 ); // 813 = ./_setToArray
var CLONE_DEEP_FLAG = 1;
function cloneSet(set, isDeep, cloneFunc) {
var array = isDeep ? cloneFunc(setToArray(set), CLONE_DEEP_FLAG) : setToArray(set);
return arrayReduce(array, addSetEntry, new set.constructor());
}
module.exports = cloneSet;
}, 811, null, "lodash/_cloneSet.js");
__d(/* lodash/_addSetEntry.js */function(global, require, module, exports) {
function addSetEntry(set, value) {
set.add(value);
return set;
}
module.exports = addSetEntry;
}, 812, null, "lodash/_addSetEntry.js");
__d(/* lodash/_setToArray.js */function(global, require, module, exports) {
function setToArray(set) {
var index = -1,
result = Array(set.size);
set.forEach(function (value) {
result[++index] = value;
});
return result;
}
module.exports = setToArray;
}, 813, null, "lodash/_setToArray.js");
__d(/* lodash/_cloneSymbol.js */function(global, require, module, exports) {var Symbol = require(512 ); // 512 = ./_Symbol
var symbolProto = Symbol ? typeof Symbol === 'function' ? Symbol.prototype : '@@prototype' : undefined,
symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
function cloneSymbol(symbol) {
return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
}
module.exports = cloneSymbol;
}, 814, null, "lodash/_cloneSymbol.js");
__d(/* lodash/_cloneTypedArray.js */function(global, require, module, exports) {var cloneArrayBuffer = require(803 ); // 803 = ./_cloneArrayBuffer
function cloneTypedArray(typedArray, isDeep) {
var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
}
module.exports = cloneTypedArray;
}, 815, null, "lodash/_cloneTypedArray.js");
__d(/* lodash/_initCloneObject.js */function(global, require, module, exports) {var baseCreate = require(817 ), // 817 = ./_baseCreate
getPrototype = require(517 ), // 517 = ./_getPrototype
isPrototype = require(777 ); // 777 = ./_isPrototype
function initCloneObject(object) {
return typeof object.constructor == 'function' && !isPrototype(object) ? baseCreate(getPrototype(object)) : {};
}
module.exports = initCloneObject;
}, 816, null, "lodash/_initCloneObject.js");
__d(/* lodash/_baseCreate.js */function(global, require, module, exports) {var isObject = require(737 ); // 737 = ./isObject
var objectCreate = Object.create;
var baseCreate = function () {
function object() {}
return function (proto) {
if (!isObject(proto)) {
return {};
}
if (objectCreate) {
return objectCreate(proto);
}
object.prototype = proto;
var result = new object();
object.prototype = undefined;
return result;
};
}();
module.exports = baseCreate;
}, 817, null, "lodash/_baseCreate.js");
__d(/* lodash/_baseUnset.js */function(global, require, module, exports) {var castPath = require(819 ), // 819 = ./_castPath
last = require(827 ), // 827 = ./last
parent = require(828 ), // 828 = ./_parent
toKey = require(830 ); // 830 = ./_toKey
function baseUnset(object, path) {
path = castPath(path, object);
object = parent(object, path);
return object == null || delete object[toKey(last(path))];
}
module.exports = baseUnset;
}, 818, null, "lodash/_baseUnset.js");
__d(/* lodash/_castPath.js */function(global, require, module, exports) {var isArray = require(715 ), // 715 = ./isArray
isKey = require(820 ), // 820 = ./_isKey
stringToPath = require(822 ), // 822 = ./_stringToPath
toString = require(825 ); // 825 = ./toString
function castPath(value, object) {
if (isArray(value)) {
return value;
}
return isKey(value, object) ? [value] : stringToPath(toString(value));
}
module.exports = castPath;
}, 819, null, "lodash/_castPath.js");
__d(/* lodash/_isKey.js */function(global, require, module, exports) {var isArray = require(715 ), // 715 = ./isArray
isSymbol = require(821 ); // 821 = ./isSymbol
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
reIsPlainProp = /^\w*$/;
function isKey(value, object) {
if (isArray(value)) {
return false;
}
var type = typeof value;
if (type == 'number' || type == 'symbol' || type == 'boolean' || value == null || isSymbol(value)) {
return true;
}
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
}
module.exports = isKey;
}, 820, null, "lodash/_isKey.js");
__d(/* lodash/isSymbol.js */function(global, require, module, exports) {var baseGetTag = require(511 ), // 511 = ./_baseGetTag
isObjectLike = require(519 ); // 519 = ./isObjectLike
var symbolTag = '[object Symbol]';
function isSymbol(value) {
return typeof value == 'symbol' || isObjectLike(value) && baseGetTag(value) == symbolTag;
}
module.exports = isSymbol;
}, 821, null, "lodash/isSymbol.js");
__d(/* lodash/_stringToPath.js */function(global, require, module, exports) {var memoizeCapped = require(823 ); // 823 = ./_memoizeCapped
var reLeadingDot = /^\./,
rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
var reEscapeChar = /\\(\\)?/g;
var stringToPath = memoizeCapped(function (string) {
var result = [];
if (reLeadingDot.test(string)) {
result.push('');
}
string.replace(rePropName, function (match, number, quote, string) {
result.push(quote ? string.replace(reEscapeChar, '$1') : number || match);
});
return result;
});
module.exports = stringToPath;
}, 822, null, "lodash/_stringToPath.js");
__d(/* lodash/_memoizeCapped.js */function(global, require, module, exports) {var memoize = require(824 ); // 824 = ./memoize
var MAX_MEMOIZE_SIZE = 500;
function memoizeCapped(func) {
var result = memoize(func, function (key) {
if (cache.size === MAX_MEMOIZE_SIZE) {
cache.clear();
}
return key;
});
var cache = result.cache;
return result;
}
module.exports = memoizeCapped;
}, 823, null, "lodash/_memoizeCapped.js");
__d(/* lodash/memoize.js */function(global, require, module, exports) {var MapCache = require(742 ); // 742 = ./_MapCache
var FUNC_ERROR_TEXT = 'Expected a function';
function memoize(func, resolver) {
if (typeof func != 'function' || resolver != null && typeof resolver != 'function') {
throw new TypeError(FUNC_ERROR_TEXT);
}
var memoized = function memoized() {
var args = arguments,
key = resolver ? resolver.apply(this, args) : args[0],
cache = memoized.cache;
if (cache.has(key)) {
return cache.get(key);
}
var result = func.apply(this, args);
memoized.cache = cache.set(key, result) || cache;
return result;
};
memoized.cache = new (memoize.Cache || MapCache)();
return memoized;
}
memoize.Cache = MapCache;
module.exports = memoize;
}, 824, null, "lodash/memoize.js");
__d(/* lodash/toString.js */function(global, require, module, exports) {var baseToString = require(826 ); // 826 = ./_baseToString
function toString(value) {
return value == null ? '' : baseToString(value);
}
module.exports = toString;
}, 825, null, "lodash/toString.js");
__d(/* lodash/_baseToString.js */function(global, require, module, exports) {var Symbol = require(512 ), // 512 = ./_Symbol
arrayMap = require(717 ), // 717 = ./_arrayMap
isArray = require(715 ), // 715 = ./isArray
isSymbol = require(821 ); // 821 = ./isSymbol
var INFINITY = 1 / 0;
var symbolProto = Symbol ? typeof Symbol === 'function' ? Symbol.prototype : '@@prototype' : undefined,
symbolToString = symbolProto ? symbolProto.toString : undefined;
function baseToString(value) {
if (typeof value == 'string') {
return value;
}
if (isArray(value)) {
return arrayMap(value, baseToString) + '';
}
if (isSymbol(value)) {
return symbolToString ? symbolToString.call(value) : '';
}
var result = value + '';
return result == '0' && 1 / value == -INFINITY ? '-0' : result;
}
module.exports = baseToString;
}, 826, null, "lodash/_baseToString.js");
__d(/* lodash/last.js */function(global, require, module, exports) {
function last(array) {
var length = array == null ? 0 : array.length;
return length ? array[length - 1] : undefined;
}
module.exports = last;
}, 827, null, "lodash/last.js");
__d(/* lodash/_parent.js */function(global, require, module, exports) {var baseGet = require(829 ), // 829 = ./_baseGet
baseSlice = require(831 ); // 831 = ./_baseSlice
function parent(object, path) {
return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
}
module.exports = parent;
}, 828, null, "lodash/_parent.js");
__d(/* lodash/_baseGet.js */function(global, require, module, exports) {var castPath = require(819 ), // 819 = ./_castPath
toKey = require(830 ); // 830 = ./_toKey
function baseGet(object, path) {
path = castPath(path, object);
var index = 0,
length = path.length;
while (object != null && index < length) {
object = object[toKey(path[index++])];
}
return index && index == length ? object : undefined;
}
module.exports = baseGet;
}, 829, null, "lodash/_baseGet.js");
__d(/* lodash/_toKey.js */function(global, require, module, exports) {var isSymbol = require(821 ); // 821 = ./isSymbol
var INFINITY = 1 / 0;
function toKey(value) {
if (typeof value == 'string' || isSymbol(value)) {
return value;
}
var result = value + '';
return result == '0' && 1 / value == -INFINITY ? '-0' : result;
}
module.exports = toKey;
}, 830, null, "lodash/_toKey.js");
__d(/* lodash/_baseSlice.js */function(global, require, module, exports) {
function baseSlice(array, start, end) {
var index = -1,
length = array.length;
if (start < 0) {
start = -start > length ? 0 : length + start;
}
end = end > length ? length : end;
if (end < 0) {
end += length;
}
length = start > end ? 0 : end - start >>> 0;
start >>>= 0;
var result = Array(length);
while (++index < length) {
result[index] = array[index + start];
}
return result;
}
module.exports = baseSlice;
}, 831, null, "lodash/_baseSlice.js");
__d(/* lodash/_customOmitClone.js */function(global, require, module, exports) {var isPlainObject = require(510 ); // 510 = ./isPlainObject
function customOmitClone(value) {
return isPlainObject(value) ? undefined : value;
}
module.exports = customOmitClone;
}, 832, null, "lodash/_customOmitClone.js");
__d(/* lodash/_flatRest.js */function(global, require, module, exports) {var flatten = require(834 ), // 834 = ./flatten
overRest = require(837 ), // 837 = ./_overRest
setToString = require(839 ); // 839 = ./_setToString
function flatRest(func) {
return setToString(overRest(func, undefined, flatten), func + '');
}
module.exports = flatRest;
}, 833, null, "lodash/_flatRest.js");
__d(/* lodash/flatten.js */function(global, require, module, exports) {var baseFlatten = require(835 ); // 835 = ./_baseFlatten
function flatten(array) {
var length = array == null ? 0 : array.length;
return length ? baseFlatten(array, 1) : [];
}
module.exports = flatten;
}, 834, null, "lodash/flatten.js");
__d(/* lodash/_baseFlatten.js */function(global, require, module, exports) {var arrayPush = require(792 ), // 792 = ./_arrayPush
isFlattenable = require(836 ); // 836 = ./_isFlattenable
function baseFlatten(array, depth, predicate, isStrict, result) {
var index = -1,
length = array.length;
predicate || (predicate = isFlattenable);
result || (result = []);
while (++index < length) {
var value = array[index];
if (depth > 0 && predicate(value)) {
if (depth > 1) {
baseFlatten(value, depth - 1, predicate, isStrict, result);
} else {
arrayPush(result, value);
}
} else if (!isStrict) {
result[result.length] = value;
}
}
return result;
}
module.exports = baseFlatten;
}, 835, null, "lodash/_baseFlatten.js");
__d(/* lodash/_isFlattenable.js */function(global, require, module, exports) {var Symbol = require(512 ), // 512 = ./_Symbol
isArguments = require(766 ), // 766 = ./isArguments
isArray = require(715 ); // 715 = ./isArray
var spreadableSymbol = Symbol ? typeof Symbol === 'function' ? Symbol.isConcatSpreadable : '@@isConcatSpreadable' : undefined;
function isFlattenable(value) {
return isArray(value) || isArguments(value) || !!(spreadableSymbol && value && value[spreadableSymbol]);
}
module.exports = isFlattenable;
}, 836, null, "lodash/_isFlattenable.js");
__d(/* lodash/_overRest.js */function(global, require, module, exports) {var apply = require(838 ); // 838 = ./_apply
var nativeMax = Math.max;
function overRest(func, start, transform) {
start = nativeMax(start === undefined ? func.length - 1 : start, 0);
return function () {
var args = arguments,
index = -1,
length = nativeMax(args.length - start, 0),
array = Array(length);
while (++index < length) {
array[index] = args[start + index];
}
index = -1;
var otherArgs = Array(start + 1);
while (++index < start) {
otherArgs[index] = args[index];
}
otherArgs[start] = transform(array);
return apply(func, this, otherArgs);
};
}
module.exports = overRest;
}, 837, null, "lodash/_overRest.js");
__d(/* lodash/_apply.js */function(global, require, module, exports) {
function apply(func, thisArg, args) {
switch (args.length) {
case 0:
return func.call(thisArg);
case 1:
return func.call(thisArg, args[0]);
case 2:
return func.call(thisArg, args[0], args[1]);
case 3:
return func.call(thisArg, args[0], args[1], args[2]);
}
return func.apply(thisArg, args);
}
module.exports = apply;
}, 838, null, "lodash/_apply.js");
__d(/* lodash/_setToString.js */function(global, require, module, exports) {var baseSetToString = require(840 ), // 840 = ./_baseSetToString
shortOut = require(843 ); // 843 = ./_shortOut
var setToString = shortOut(baseSetToString);
module.exports = setToString;
}, 839, null, "lodash/_setToString.js");
__d(/* lodash/_baseSetToString.js */function(global, require, module, exports) {var constant = require(841 ), // 841 = ./constant
defineProperty = require(760 ), // 760 = ./_defineProperty
identity = require(842 ); // 842 = ./identity
var baseSetToString = !defineProperty ? identity : function (func, string) {
return defineProperty(func, 'toString', {
'configurable': true,
'enumerable': false,
'value': constant(string),
'writable': true
});
};
module.exports = baseSetToString;
}, 840, null, "lodash/_baseSetToString.js");
__d(/* lodash/constant.js */function(global, require, module, exports) {
function constant(value) {
return function () {
return value;
};
}
module.exports = constant;
}, 841, null, "lodash/constant.js");
__d(/* lodash/identity.js */function(global, require, module, exports) {
function identity(value) {
return value;
}
module.exports = identity;
}, 842, null, "lodash/identity.js");
__d(/* lodash/_shortOut.js */function(global, require, module, exports) {
var HOT_COUNT = 800,
HOT_SPAN = 16;
var nativeNow = Date.now;
function shortOut(func) {
var count = 0,
lastCalled = 0;
return function () {
var stamp = nativeNow(),
remaining = HOT_SPAN - (stamp - lastCalled);
lastCalled = stamp;
if (remaining > 0) {
if (++count >= HOT_COUNT) {
return arguments[0];
}
} else {
count = 0;
}
return func.apply(undefined, arguments);
};
}
module.exports = shortOut;
}, 843, null, "lodash/_shortOut.js");
__d(/* lodash/pick.js */function(global, require, module, exports) {var basePick = require(845 ), // 845 = ./_basePick
flatRest = require(833 ); // 833 = ./_flatRest
var pick = flatRest(function (object, paths) {
return object == null ? {} : basePick(object, paths);
});
module.exports = pick;
}, 844, null, "lodash/pick.js");
__d(/* lodash/_basePick.js */function(global, require, module, exports) {var basePickBy = require(846 ), // 846 = ./_basePickBy
hasIn = require(848 ); // 848 = ./hasIn
function basePick(object, paths) {
return basePickBy(object, paths, function (value, path) {
return hasIn(object, path);
});
}
module.exports = basePick;
}, 845, null, "lodash/_basePick.js");
__d(/* lodash/_basePickBy.js */function(global, require, module, exports) {var baseGet = require(829 ), // 829 = ./_baseGet
baseSet = require(847 ), // 847 = ./_baseSet
castPath = require(819 ); // 819 = ./_castPath
function basePickBy(object, paths, predicate) {
var index = -1,
length = paths.length,
result = {};
while (++index < length) {
var path = paths[index],
value = baseGet(object, path);
if (predicate(value, path)) {
baseSet(result, castPath(path, object), value);
}
}
return result;
}
module.exports = basePickBy;
}, 846, null, "lodash/_basePickBy.js");
__d(/* lodash/_baseSet.js */function(global, require, module, exports) {var assignValue = require(758 ), // 758 = ./_assignValue
castPath = require(819 ), // 819 = ./_castPath
isIndex = require(770 ), // 770 = ./_isIndex
isObject = require(737 ), // 737 = ./isObject
toKey = require(830 ); // 830 = ./_toKey
function baseSet(object, path, value, customizer) {
if (!isObject(object)) {
return object;
}
path = castPath(path, object);
var index = -1,
length = path.length,
lastIndex = length - 1,
nested = object;
while (nested != null && ++index < length) {
var key = toKey(path[index]),
newValue = value;
if (index != lastIndex) {
var objValue = nested[key];
newValue = customizer ? customizer(objValue, key, nested) : undefined;
if (newValue === undefined) {
newValue = isObject(objValue) ? objValue : isIndex(path[index + 1]) ? [] : {};
}
}
assignValue(nested, key, newValue);
nested = nested[key];
}
return object;
}
module.exports = baseSet;
}, 847, null, "lodash/_baseSet.js");
__d(/* lodash/hasIn.js */function(global, require, module, exports) {var baseHasIn = require(849 ), // 849 = ./_baseHasIn
hasPath = require(850 ); // 850 = ./_hasPath
function hasIn(object, path) {
return object != null && hasPath(object, path, baseHasIn);
}
module.exports = hasIn;
}, 848, null, "lodash/hasIn.js");
__d(/* lodash/_baseHasIn.js */function(global, require, module, exports) {
function baseHasIn(object, key) {
return object != null && key in Object(object);
}
module.exports = baseHasIn;
}, 849, null, "lodash/_baseHasIn.js");
__d(/* lodash/_hasPath.js */function(global, require, module, exports) {var castPath = require(819 ), // 819 = ./_castPath
isArguments = require(766 ), // 766 = ./isArguments
isArray = require(715 ), // 715 = ./isArray
isIndex = require(770 ), // 770 = ./_isIndex
isLength = require(773 ), // 773 = ./isLength
toKey = require(830 ); // 830 = ./_toKey
function hasPath(object, path, hasFunc) {
path = castPath(path, object);
var index = -1,
length = path.length,
result = false;
while (++index < length) {
var key = toKey(path[index]);
if (!(result = object != null && hasFunc(object, key))) {
break;
}
object = object[key];
}
if (result || ++index != length) {
return result;
}
length = object == null ? 0 : object.length;
return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object));
}
module.exports = hasPath;
}, 850, null, "lodash/_hasPath.js");
__d(/* react-native-vector-icons/lib/tab-bar-item-ios.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/node_modules/react-native-vector-icons/lib/tab-bar-item-ios.js';
exports.default = createTabBarItemIOSComponent;
var _isEqual = require(852 ); // 852 = lodash/isEqual
var _isEqual2 = babelHelpers.interopRequireDefault(_isEqual);
var _pick = require(844 ); // 844 = lodash/pick
var _pick2 = babelHelpers.interopRequireDefault(_pick);
var _react = require(34 ); // 34 = react
var _react2 = babelHelpers.interopRequireDefault(_react);
var _propTypes = require(550 ); // 550 = prop-types
var _propTypes2 = babelHelpers.interopRequireDefault(_propTypes);
var _reactNative = require(712 ); // 712 = ./react-native
function createTabBarItemIOSComponent(IconNamePropType, getImageSource) {
var _class, _temp;
return _temp = _class = function (_Component) {
babelHelpers.inherits(TabBarItemIOS, _Component);
function TabBarItemIOS() {
babelHelpers.classCallCheck(this, TabBarItemIOS);
return babelHelpers.possibleConstructorReturn(this, (TabBarItemIOS.__proto__ || Object.getPrototypeOf(TabBarItemIOS)).apply(this, arguments));
}
babelHelpers.createClass(TabBarItemIOS, [{
key: 'updateIconSources',
value: function updateIconSources(props) {
var _this2 = this;
if (props.iconName) {
getImageSource(props.iconName, props.iconSize, props.iconColor).then(function (icon) {
return _this2.setState({ icon: icon });
});
}
if (props.selectedIconName || props.selectedIconColor) {
var selectedIconName = props.selectedIconName || props.iconName;
var selectedIconColor = props.selectedIconColor || props.iconColor;
getImageSource(selectedIconName, props.iconSize, selectedIconColor).then(function (selectedIcon) {
return _this2.setState({ selectedIcon: selectedIcon });
});
}
}
}, {
key: 'componentWillMount',
value: function componentWillMount() {
this.updateIconSources(this.props);
}
}, {
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(nextProps) {
var keys = Object.keys(TabBarItemIOS.propTypes);
if (!(0, _isEqual2.default)((0, _pick2.default)(nextProps, keys), (0, _pick2.default)(this.props, keys))) {
this.updateIconSources(nextProps);
}
}
}, {
key: 'render',
value: function render() {
return _react2.default.createElement(_reactNative.TabBarIOS.Item, babelHelpers.extends({}, this.props, this.state, {
__source: {
fileName: _jsxFileName,
lineNumber: 55
}
}));
}
}]);
return TabBarItemIOS;
}(_react.Component), _class.propTypes = {
iconName: IconNamePropType.isRequired,
selectedIconName: IconNamePropType,
iconSize: _propTypes2.default.number,
iconColor: _propTypes2.default.string,
selectedIconColor: _propTypes2.default.string
}, _class.defaultProps = {
iconSize: 30
}, _temp;
}
}, 851, null, "react-native-vector-icons/lib/tab-bar-item-ios.js");
__d(/* lodash/isEqual.js */function(global, require, module, exports) {var baseIsEqual = require(853 ); // 853 = ./_baseIsEqual
function isEqual(value, other) {
return baseIsEqual(value, other);
}
module.exports = isEqual;
}, 852, null, "lodash/isEqual.js");
__d(/* lodash/_baseIsEqual.js */function(global, require, module, exports) {var baseIsEqualDeep = require(854 ), // 854 = ./_baseIsEqualDeep
isObjectLike = require(519 ); // 519 = ./isObjectLike
function baseIsEqual(value, other, bitmask, customizer, stack) {
if (value === other) {
return true;
}
if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) {
return value !== value && other !== other;
}
return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
}
module.exports = baseIsEqual;
}, 853, null, "lodash/_baseIsEqual.js");
__d(/* lodash/_baseIsEqualDeep.js */function(global, require, module, exports) {var Stack = require(719 ), // 719 = ./_Stack
equalArrays = require(855 ), // 855 = ./_equalArrays
equalByTag = require(861 ), // 861 = ./_equalByTag
equalObjects = require(862 ), // 862 = ./_equalObjects
getTag = require(796 ), // 796 = ./_getTag
isArray = require(715 ), // 715 = ./isArray
isBuffer = require(768 ), // 768 = ./isBuffer
isTypedArray = require(771 ); // 771 = ./isTypedArray
var COMPARE_PARTIAL_FLAG = 1;
var argsTag = '[object Arguments]',
arrayTag = '[object Array]',
objectTag = '[object Object]';
var objectProto = Object.prototype;
var hasOwnProperty = objectProto.hasOwnProperty;
function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
var objIsArr = isArray(object),
othIsArr = isArray(other),
objTag = objIsArr ? arrayTag : getTag(object),
othTag = othIsArr ? arrayTag : getTag(other);
objTag = objTag == argsTag ? objectTag : objTag;
othTag = othTag == argsTag ? objectTag : othTag;
var objIsObj = objTag == objectTag,
othIsObj = othTag == objectTag,
isSameTag = objTag == othTag;
if (isSameTag && isBuffer(object)) {
if (!isBuffer(other)) {
return false;
}
objIsArr = true;
objIsObj = false;
}
if (isSameTag && !objIsObj) {
stack || (stack = new Stack());
return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
}
if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
if (objIsWrapped || othIsWrapped) {
var objUnwrapped = objIsWrapped ? object.value() : object,
othUnwrapped = othIsWrapped ? other.value() : other;
stack || (stack = new Stack());
return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
}
}
if (!isSameTag) {
return false;
}
stack || (stack = new Stack());
return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
}
module.exports = baseIsEqualDeep;
}, 854, null, "lodash/_baseIsEqualDeep.js");
__d(/* lodash/_equalArrays.js */function(global, require, module, exports) {var SetCache = require(856 ), // 856 = ./_SetCache
arraySome = require(859 ), // 859 = ./_arraySome
cacheHas = require(860 ); // 860 = ./_cacheHas
var COMPARE_PARTIAL_FLAG = 1,
COMPARE_UNORDERED_FLAG = 2;
function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
arrLength = array.length,
othLength = other.length;
if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
return false;
}
var stacked = stack.get(array);
if (stacked && stack.get(other)) {
return stacked == other;
}
var index = -1,
result = true,
seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : undefined;
stack.set(array, other);
stack.set(other, array);
while (++index < arrLength) {
var arrValue = array[index],
othValue = other[index];
if (customizer) {
var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack);
}
if (compared !== undefined) {
if (compared) {
continue;
}
result = false;
break;
}
if (seen) {
if (!arraySome(other, function (othValue, othIndex) {
if (!cacheHas(seen, othIndex) && (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
return seen.push(othIndex);
}
})) {
result = false;
break;
}
} else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
result = false;
break;
}
}
stack['delete'](array);
stack['delete'](other);
return result;
}
module.exports = equalArrays;
}, 855, null, "lodash/_equalArrays.js");
__d(/* lodash/_SetCache.js */function(global, require, module, exports) {var MapCache = require(742 ), // 742 = ./_MapCache
setCacheAdd = require(857 ), // 857 = ./_setCacheAdd
setCacheHas = require(858 ); // 858 = ./_setCacheHas
function SetCache(values) {
var index = -1,
length = values == null ? 0 : values.length;
this.__data__ = new MapCache();
while (++index < length) {
this.add(values[index]);
}
}
SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
SetCache.prototype.has = setCacheHas;
module.exports = SetCache;
}, 856, null, "lodash/_SetCache.js");
__d(/* lodash/_setCacheAdd.js */function(global, require, module, exports) {
var HASH_UNDEFINED = '__lodash_hash_undefined__';
function setCacheAdd(value) {
this.__data__.set(value, HASH_UNDEFINED);
return this;
}
module.exports = setCacheAdd;
}, 857, null, "lodash/_setCacheAdd.js");
__d(/* lodash/_setCacheHas.js */function(global, require, module, exports) {
function setCacheHas(value) {
return this.__data__.has(value);
}
module.exports = setCacheHas;
}, 858, null, "lodash/_setCacheHas.js");
__d(/* lodash/_arraySome.js */function(global, require, module, exports) {
function arraySome(array, predicate) {
var index = -1,
length = array == null ? 0 : array.length;
while (++index < length) {
if (predicate(array[index], index, array)) {
return true;
}
}
return false;
}
module.exports = arraySome;
}, 859, null, "lodash/_arraySome.js");
__d(/* lodash/_cacheHas.js */function(global, require, module, exports) {
function cacheHas(cache, key) {
return cache.has(key);
}
module.exports = cacheHas;
}, 860, null, "lodash/_cacheHas.js");
__d(/* lodash/_equalByTag.js */function(global, require, module, exports) {var Symbol = require(512 ), // 512 = ./_Symbol
Uint8Array = require(804 ), // 804 = ./_Uint8Array
eq = require(724 ), // 724 = ./eq
equalArrays = require(855 ), // 855 = ./_equalArrays
mapToArray = require(809 ), // 809 = ./_mapToArray
setToArray = require(813 ); // 813 = ./_setToArray
var COMPARE_PARTIAL_FLAG = 1,
COMPARE_UNORDERED_FLAG = 2;
var boolTag = '[object Boolean]',
dateTag = '[object Date]',
errorTag = '[object Error]',
mapTag = '[object Map]',
numberTag = '[object Number]',
regexpTag = '[object RegExp]',
setTag = '[object Set]',
stringTag = '[object String]',
symbolTag = '[object Symbol]';
var arrayBufferTag = '[object ArrayBuffer]',
dataViewTag = '[object DataView]';
var symbolProto = Symbol ? typeof Symbol === 'function' ? Symbol.prototype : '@@prototype' : undefined,
symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
switch (tag) {
case dataViewTag:
if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) {
return false;
}
object = object.buffer;
other = other.buffer;
case arrayBufferTag:
if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
return false;
}
return true;
case boolTag:
case dateTag:
case numberTag:
return eq(+object, +other);
case errorTag:
return object.name == other.name && object.message == other.message;
case regexpTag:
case stringTag:
return object == other + '';
case mapTag:
var convert = mapToArray;
case setTag:
var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
convert || (convert = setToArray);
if (object.size != other.size && !isPartial) {
return false;
}
var stacked = stack.get(object);
if (stacked) {
return stacked == other;
}
bitmask |= COMPARE_UNORDERED_FLAG;
stack.set(object, other);
var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
stack['delete'](object);
return result;
case symbolTag:
if (symbolValueOf) {
return symbolValueOf.call(object) == symbolValueOf.call(other);
}
}
return false;
}
module.exports = equalByTag;
}, 861, null, "lodash/_equalByTag.js");
__d(/* lodash/_equalObjects.js */function(global, require, module, exports) {var getAllKeys = require(793 ); // 793 = ./_getAllKeys
var COMPARE_PARTIAL_FLAG = 1;
var objectProto = Object.prototype;
var hasOwnProperty = objectProto.hasOwnProperty;
function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
objProps = getAllKeys(object),
objLength = objProps.length,
othProps = getAllKeys(other),
othLength = othProps.length;
if (objLength != othLength && !isPartial) {
return false;
}
var index = objLength;
while (index--) {
var key = objProps[index];
if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
return false;
}
}
var stacked = stack.get(object);
if (stacked && stack.get(other)) {
return stacked == other;
}
var result = true;
stack.set(object, other);
stack.set(other, object);
var skipCtor = isPartial;
while (++index < objLength) {
key = objProps[index];
var objValue = object[key],
othValue = other[key];
if (customizer) {
var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
}
if (!(compared === undefined ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) {
result = false;
break;
}
skipCtor || (skipCtor = key == 'constructor');
}
if (result && !skipCtor) {
var objCtor = object.constructor,
othCtor = other.constructor;
if (objCtor != othCtor && 'constructor' in object && 'constructor' in other && !(typeof objCtor == 'function' && objCtor instanceof objCtor && typeof othCtor == 'function' && othCtor instanceof othCtor)) {
result = false;
}
}
stack['delete'](object);
stack['delete'](other);
return result;
}
module.exports = equalObjects;
}, 862, null, "lodash/_equalObjects.js");
__d(/* react-native-vector-icons/lib/toolbar-android.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/node_modules/react-native-vector-icons/lib/toolbar-android.js';
exports.default = createToolbarAndroidComponent;
var _isEqual = require(852 ); // 852 = lodash/isEqual
var _isEqual2 = babelHelpers.interopRequireDefault(_isEqual);
var _pick = require(844 ); // 844 = lodash/pick
var _pick2 = babelHelpers.interopRequireDefault(_pick);
var _react = require(34 ); // 34 = react
var _react2 = babelHelpers.interopRequireDefault(_react);
var _propTypes = require(550 ); // 550 = prop-types
var _propTypes2 = babelHelpers.interopRequireDefault(_propTypes);
var _reactNative = require(712 ); // 712 = ./react-native
function createToolbarAndroidComponent(IconNamePropType, getImageSource) {
var _class, _temp;
return _temp = _class = function (_Component) {
babelHelpers.inherits(IconToolbarAndroid, _Component);
function IconToolbarAndroid() {
babelHelpers.classCallCheck(this, IconToolbarAndroid);
return babelHelpers.possibleConstructorReturn(this, (IconToolbarAndroid.__proto__ || Object.getPrototypeOf(IconToolbarAndroid)).apply(this, arguments));
}
babelHelpers.createClass(IconToolbarAndroid, [{
key: 'updateIconSources',
value: function updateIconSources(props) {
var _this2 = this;
var size = props.iconSize;
var color = props.iconColor || props.titleColor;
if (props.logoName) {
getImageSource(props.logoName, size, color).then(function (logo) {
return _this2.setState({ logo: logo });
});
}
if (props.navIconName) {
getImageSource(props.navIconName, size, color).then(function (navIcon) {
return _this2.setState({ navIcon: navIcon });
});
}
if (props.overflowIconName) {
getImageSource(props.overflowIconName, size, color).then(function (overflowIcon) {
return _this2.setState({ overflowIcon: overflowIcon });
});
}
Promise.all((props.actions || []).map(function (action) {
if (action.iconName) {
return getImageSource(action.iconName, action.iconSize || size, action.iconColor || color).then(function (icon) {
return babelHelpers.extends({}, action, { icon: icon });
});
}
return Promise.resolve(action);
})).then(function (actions) {
return _this2.setState({ actions: actions });
});
}
}, {
key: 'componentWillMount',
value: function componentWillMount() {
this.updateIconSources(this.props);
}
}, {
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(nextProps) {
var _this3 = this;
var keys = Object.keys(IconToolbarAndroid.propTypes);
if (!(0, _isEqual2.default)((0, _pick2.default)(nextProps, keys), (0, _pick2.default)(this.props, keys))) {
var stateToEvict = {};
if (!nextProps.logoName) {
stateToEvict.logo = undefined;
}
if (!nextProps.navIconName) {
stateToEvict.navIcon = undefined;
}
if (!nextProps.overflowIconName) {
stateToEvict.overflowIcon = undefined;
}
if (this.state && Object.keys(stateToEvict).length) {
this.setState(stateToEvict, function () {
return _this3.updateIconSources(nextProps);
});
} else {
this.updateIconSources(nextProps);
}
}
}
}, {
key: 'render',
value: function render() {
return _react2.default.createElement(_reactNative.ToolbarAndroid, babelHelpers.extends({}, this.props, this.state, {
__source: {
fileName: _jsxFileName,
lineNumber: 93
}
}));
}
}]);
return IconToolbarAndroid;
}(_react.Component), _class.propTypes = {
logoIconName: IconNamePropType,
navIconName: IconNamePropType,
overflowIconName: IconNamePropType,
actions: _propTypes2.default.arrayOf(_propTypes2.default.shape({
title: _propTypes2.default.string.isRequired,
iconName: IconNamePropType,
iconSize: _propTypes2.default.number,
iconColor: _propTypes2.default.string,
show: _propTypes2.default.oneOf(['always', 'ifRoom', 'never']),
showWithText: _propTypes2.default.bool
})),
iconSize: _propTypes2.default.number,
iconColor: _propTypes2.default.string
}, _class.defaultProps = {
iconSize: 24
}, _temp;
}
}, 863, null, "react-native-vector-icons/lib/toolbar-android.js");
__d(/* react-native-vector-icons/lib/create-icon-set-from-fontello.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = createIconSetFromFontello;
var _createIconSet = require(711 ); // 711 = ./create-icon-set
var _createIconSet2 = babelHelpers.interopRequireDefault(_createIconSet);
function createIconSetFromFontello(config, fontFamilyArg, fontFile) {
var glyphMap = {};
config.glyphs.forEach(function (glyph) {
glyphMap[glyph.css] = glyph.code;
});
var fontFamily = fontFamilyArg || config.name || 'fontello';
return (0, _createIconSet2.default)(glyphMap, fontFamily, fontFile || fontFamily + '.ttf');
}
}, 864, null, "react-native-vector-icons/lib/create-icon-set-from-fontello.js");
__d(/* react-native-vector-icons/lib/create-icon-set-from-icomoon.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = createIconSetFromIcoMoon;
var _createIconSet = require(711 ); // 711 = ./create-icon-set
var _createIconSet2 = babelHelpers.interopRequireDefault(_createIconSet);
function createIconSetFromIcoMoon(config, fontFamilyArg, fontFile) {
var glyphMap = {};
config.icons.forEach(function (icon) {
glyphMap[icon.properties.name] = icon.properties.code;
});
var fontFamily = fontFamilyArg || config.preferences.fontPref.metadata.fontFamily;
return (0, _createIconSet2.default)(glyphMap, fontFamily, fontFile || fontFamily + '.ttf');
}
}, 865, null, "react-native-vector-icons/lib/create-icon-set-from-icomoon.js");
__d(/* jitsi-meet/react/features/base/font-icons/jitsi.json */function(global, require, module, exports) {module.exports = module.exports = {
"IcoMoonType": "selection",
"icons": [{
"icon": {
"paths": ["M330.667 554.667c-0.427-14.933 6.4-29.44 17.92-39.253 32 6.827 61.867 20.053 88.747 39.253 0 29.013-23.893 52.907-53.333 52.907s-52.907-23.467-53.333-52.907zM586.667 554.667c26.88-18.773 56.747-32 88.747-38.827 11.52 9.813 18.347 24.32 17.92 38.827 0 29.867-23.893 53.76-53.333 53.76s-53.333-23.893-53.333-53.76v0zM512 384c-118.187-1.707-234.667 27.733-338.347 85.333l-2.987 42.667c0 52.48 12.373 104.107 35.84 151.040 101.12-15.36 203.093-23.040 305.493-23.040s204.373 7.68 305.493 23.040c23.467-46.933 35.84-98.56 35.84-151.040l-2.987-42.667c-103.68-57.6-220.16-87.040-338.347-85.333zM512 85.333c235.641 0 426.667 191.025 426.667 426.667s-191.025 426.667-426.667 426.667c-235.641 0-426.667-191.025-426.667-426.667s191.025-426.667 426.667-426.667z"],
"attrs": [{}],
"isMulticolor": false,
"isMulticolor2": false,
"grid": 24,
"tags": ["ninja"]
},
"attrs": [{}],
"properties": {
"order": 851,
"id": 121,
"name": "ninja",
"prevSize": 32,
"code": 59657
},
"setIdx": 0,
"setId": 1,
"iconIdx": 0
}, {
"icon": {
"paths": ["M282 460c62 120 162 220 282 282l94-94c12-12 30-16 44-10 48 16 100 24 152 24 24 0 42 18 42 42v150c0 24-18 42-42 42-400 0-726-326-726-726 0-24 18-42 42-42h150c24 0 42 18 42 42 0 54 8 104 24 152 4 14 2 32-10 44z"],
"attrs": [],
"isMulticolor": false,
"isMulticolor2": false,
"tags": ["phone"],
"defaultCode": 57549,
"grid": 24
},
"attrs": [],
"properties": {
"ligatures": "call, local_phone, phone",
"id": 120,
"order": 848,
"prevSize": 32,
"code": 57549,
"name": "phone"
},
"setIdx": 0,
"setId": 1,
"iconIdx": 41
}, {
"icon": {
"paths": ["M756.704 395.862l267.296-202.213v635.075l-267.296-202.213v191.923c0 12.085-11.296 21.863-25.216 21.863h-706.272c-13.92 0-25.216-9.777-25.216-21.863v-612.25c0-12.085 11.296-21.863 25.216-21.863h706.272c13.92 0 25.216 9.777 25.216 21.863v189.679zM371.338 647.772c47.817 0 86.529-40.232 86.529-89.811v-184.835c0-49.651-38.713-89.883-86.529-89.883-47.788 0-86.515 40.232-86.515 89.883v184.835c0 49.579 38.756 89.811 86.515 89.811v0zM356.754 709.93v32.78h33.718v-33.412c73.858-9.606 131.235-73.73 131.235-151.351v-88.232h-30.636v88.232c0 67.57-53.696 122.534-119.734 122.534-66.024 0-119.691-54.964-119.691-122.534v-88.232h-30.636v88.232c0 79.215 59.674 144.502 135.744 151.969v0.014z"],
"attrs": [{}],
"isMulticolor": false,
"isMulticolor2": false,
"tags": ["Combined Shape"],
"grid": 0
},
"attrs": [{}],
"properties": {
"order": 109,
"id": 0,
"name": "mic-camera-combined",
"prevSize": 32,
"code": 59651
},
"setIdx": 0,
"setId": 1,
"iconIdx": 1
}, {
"icon": {
"paths": ["M42.667 896h170.667v-512h-170.667v512zM981.333 426.667c0-46.933-38.4-85.333-85.333-85.333h-269.227l40.533-194.987 1.28-13.653c0-17.493-7.253-33.707-18.773-45.227l-45.227-44.8-280.747 281.173c-15.787 15.36-25.173 36.693-25.173 60.16v426.667c0 46.933 38.4 85.333 85.333 85.333h384c35.413 0 65.707-21.333 78.507-52.053l128.853-300.8c3.84-9.813 5.973-20.053 5.973-31.147v-81.493l-0.427-0.427 0.427-3.413z"],
"attrs": [{}],
"isMulticolor": false,
"isMulticolor2": false,
"tags": ["ic_thumb_up_black_24px"],
"grid": 0
},
"attrs": [{}],
"properties": {
"order": 104,
"id": 1,
"name": "feedback",
"prevSize": 32,
"code": 59677
},
"setIdx": 0,
"setId": 1,
"iconIdx": 2
}, {
"icon": {
"paths": ["M896 128h-768c-46.933 0-85.333 38.4-85.333 85.333v597.333c0 46.933 38.4 85.333 85.333 85.333h768c46.933 0 85.333-38.4 85.333-85.333v-597.333c0-46.933-38.4-85.333-85.333-85.333zM896 810.667h-768v-128h768v128z"],
"attrs": [{}],
"isMulticolor": false,
"isMulticolor2": false,
"tags": ["ic_call_to_action_black_24px"],
"grid": 0
},
"attrs": [{}],
"properties": {
"order": 103,
"id": 2,
"name": "toggle-filmstrip",
"prevSize": 32,
"code": 59676
},
"setIdx": 0,
"setId": 1,
"iconIdx": 3
}, {
"icon": {
"paths": ["M512 820c106 0 200-56 256-138-2-84-172-132-256-132-86 0-254 48-256 132 56 82 150 138 256 138zM512 214c-70 0-128 58-128 128s58 128 128 128 128-58 128-128-58-128-128-128zM512 86c236 0 426 190 426 426s-190 426-426 426-426-190-426-426 190-426 426-426z"],
"attrs": [],
"isMulticolor": false,
"isMulticolor2": false,
"tags": ["account_circle"],
"grid": 0
},
"attrs": [],
"properties": {
"id": 3,
"order": 60,
"ligatures": "account_circle",
"prevSize": 32,
"code": 59649,
"name": "avatar"
},
"setIdx": 0,
"setId": 1,
"iconIdx": 4
}, {
"icon": {
"paths": ["M512 384c-68 0-134 10-196 30v132c0 16-10 34-24 40-42 20-80 46-114 78-8 8-18 12-30 12s-22-4-30-12l-106-106c-8-8-12-18-12-30s4-22 12-30c130-124 306-200 500-200s370 76 500 200c8 8 12 18 12 30s-4 22-12 30l-106 106c-8 8-18 12-30 12s-22-4-30-12c-34-32-72-58-114-78-14-6-24-20-24-38v-132c-62-20-128-32-196-32z"],
"attrs": [],
"isMulticolor": false,
"isMulticolor2": false,
"tags": ["call_end"],
"grid": 0
},
"attrs": [],
"properties": {
"id": 4,
"order": 849,
"ligatures": "call_end",
"prevSize": 32,
"code": 59653,
"name": "hangup"
},
"setIdx": 0,
"setId": 1,
"iconIdx": 5
}, {
"icon": {
"paths": ["M854 682v-512h-684v598l86-86h598zM854 86c46 0 84 38 84 84v512c0 46-38 86-84 86h-598l-170 170v-768c0-46 38-84 84-84h684z"],
"attrs": [],
"isMulticolor": false,
"isMulticolor2": false,
"tags": ["chat_bubble_outline"],
"grid": 0
},
"attrs": [],
"properties": {
"id": 5,
"order": 61,
"ligatures": "chat_bubble_outline",
"prevSize": 32,
"code": 59654,
"name": "chat"
},
"setIdx": 0,
"setId": 1,
"iconIdx": 6
}, {
"icon": {
"paths": ["M726 554h-128v-170h-172v170h-128l214 214zM826 428c110 8 198 100 198 212 0 118-96 214-214 214h-554c-142 0-256-114-256-256 0-132 100-240 228-254 54-102 160-174 284-174 156 0 284 110 314 258z"],
"attrs": [],
"isMulticolor": false,
"isMulticolor2": false,
"tags": ["cloud_download"],
"grid": 0
},
"attrs": [],
"properties": {
"id": 6,
"order": 99,
"ligatures": "cloud_download",
"prevSize": 32,
"code": 59650,
"name": "download"
},
"setIdx": 0,
"setId": 1,
"iconIdx": 7
}, {
"icon": {
"paths": ["M884 300l-78 78-160-160 78-78c16-16 44-16 60 0l100 100c16 16 16 44 0 60zM128 736l472-472 160 160-472 472h-160v-160z"],
"attrs": [],
"isMulticolor": false,
"isMulticolor2": false,
"tags": ["mode_edit"],
"grid": 0
},
"attrs": [],
"properties": {
"id": 7,
"order": 89,
"ligatures": "create, edit, mode_edit",
"prevSize": 32,
"code": 59655,
"name": "edit"
},
"setIdx": 0,
"setId": 1,
"iconIdx": 8
}, {
"icon": {
"paths": ["M554 384h236l-236-234v234zM682 598v-86h-340v86h340zM682 768v-86h-340v86h340zM598 86l256 256v512c0 46-40 84-86 84h-512c-46 0-86-38-86-84l2-684c0-46 38-84 84-84h342z"],
"attrs": [],
"isMulticolor": false,
"isMulticolor2": false,
"tags": ["description"],
"grid": 0
},
"attrs": [],
"properties": {
"id": 8,
"order": 85,
"ligatures": "description",
"prevSize": 32,
"code": 59656,
"name": "share-doc"
},
"setIdx": 0,
"setId": 1,
"iconIdx": 9
}, {
"icon": {
"paths": ["M512 214l284 426h-568zM214 726h596v84h-596v-84z"],
"attrs": [],
"isMulticolor": false,
"isMulticolor2": false,
"tags": ["eject"],
"grid": 0
},
"attrs": [],
"properties": {
"id": 10,
"order": 98,
"ligatures": "eject",
"prevSize": 32,
"code": 59652,
"name": "kick"
},
"setIdx": 0,
"setId": 1,
"iconIdx": 10
}, {
"icon": {
"paths": ["M512 342l256 256-60 60-196-196-196 196-60-60z"],
"attrs": [],
"isMulticolor": false,
"isMulticolor2": false,
"tags": ["expand_less"],
"grid": 0
},
"attrs": [],
"properties": {
"id": 11,
"order": 106,
"ligatures": "expand_less",
"prevSize": 32,
"code": 59679,
"name": "menu-up"
},
"setIdx": 0,
"setId": 1,
"iconIdx": 11
}, {
"icon": {
"paths": ["M708 366l60 60-256 256-256-256 60-60 196 196z"],
"attrs": [],
"isMulticolor": false,
"isMulticolor2": false,
"tags": ["expand_more"],
"grid": 0
},
"attrs": [],
"properties": {
"id": 12,
"order": 107,
"ligatures": "expand_more",
"prevSize": 32,
"code": 59680,
"name": "menu-down"
},
"setIdx": 0,
"setId": 1,
"iconIdx": 12
}, {
"icon": {
"paths": ["M598 214h212v212h-84v-128h-128v-84zM726 726v-128h84v212h-212v-84h128zM214 426v-212h212v84h-128v128h-84zM298 598v128h128v84h-212v-212h84z"],
"attrs": [],
"isMulticolor": false,
"isMulticolor2": false,
"tags": ["fullscreen"],
"grid": 0
},
"attrs": [],
"properties": {
"id": 13,
"order": 94,
"ligatures": "fullscreen",
"prevSize": 32,
"code": 59659,
"name": "full-screen"
},
"setIdx": 0,
"setId": 1,
"iconIdx": 13
}, {
"icon": {
"paths": ["M682 342h128v84h-212v-212h84v128zM598 810v-212h212v84h-128v128h-84zM342 342v-128h84v212h-212v-84h128zM214 682v-84h212v212h-84v-128h-128z"],
"attrs": [],
"isMulticolor": false,
"isMulticolor2": false,
"tags": ["fullscreen_exit"],
"grid": 0
},
"attrs": [],
"properties": {
"id": 14,
"order": 92,
"ligatures": "fullscreen_exit",
"prevSize": 32,
"code": 59660,
"name": "exit-full-screen"
},
"setIdx": 0,
"setId": 1,
"iconIdx": 14
}, {
"icon": {
"paths": ["M512 736l-264 160 70-300-232-202 306-26 120-282 120 282 306 26-232 202 70 300z"],
"attrs": [],
"isMulticolor": false,
"isMulticolor2": false,
"tags": ["star"],
"grid": 0
},
"attrs": [],
"properties": {
"id": 15,
"order": 101,
"ligatures": "grade, star",
"prevSize": 32,
"code": 59658,
"name": "star-full"
},
"setIdx": 0,
"setId": 1,
"iconIdx": 15
}, {
"icon": {
"paths": ["M768 854v-428h-512v428h512zM768 342c46 0 86 38 86 84v428c0 46-40 84-86 84h-512c-46 0-86-38-86-84v-428c0-46 40-84 86-84h388v-86c0-72-60-132-132-132s-132 60-132 132h-82c0-118 96-214 214-214s214 96 214 214v86h42zM512 726c-46 0-86-40-86-86s40-86 86-86 86 40 86 86-40 86-86 86z"],
"attrs": [],
"isMulticolor": false,
"isMulticolor2": false,
"tags": ["lock_open"],
"grid": 0
},
"attrs": [],
"properties": {
"id": 16,
"order": 66,
"ligatures": "lock_open",
"prevSize": 32,
"code": 59661,
"name": "security"
},
"setIdx": 0,
"setId": 1,
"iconIdx": 16
}, {
"icon": {
"paths": ["M768 854v-428h-512v428h512zM380 256v86h264v-86c0-72-60-132-132-132s-132 60-132 132zM768 342c46 0 86 38 86 84v428c0 46-40 84-86 84h-512c-46 0-86-38-86-84v-428c0-46 40-84 86-84h42v-86c0-118 96-214 214-214s214 96 214 214v86h42zM512 726c-46 0-86-40-86-86s40-86 86-86 86 40 86 86-40 86-86 86z"],
"attrs": [],
"isMulticolor": false,
"isMulticolor2": false,
"tags": ["lock_outline"],
"grid": 0
},
"attrs": [],
"properties": {
"id": 17,
"order": 65,
"ligatures": "lock_outline",
"prevSize": 32,
"code": 59662,
"name": "security-locked"
},
"setIdx": 0,
"setId": 1,
"iconIdx": 17
}, {
"icon": {
"paths": ["M512 768v-128l170 170-170 172v-128c-188 0-342-154-342-342 0-66 20-130 54-182l62 62c-20 36-30 76-30 120 0 142 114 256 256 256zM512 170c188 0 342 154 342 342 0 66-20 130-54 182l-62-62c20-36 30-76 30-120 0-142-114-256-256-256v128l-170-170 170-172v128z"],
"attrs": [],
"isMulticolor": false,
"isMulticolor2": false,
"tags": ["sync"],
"grid": 0
},
"attrs": [],
"properties": {
"id": 18,
"order": 67,
"ligatures": "loop, sync",
"prevSize": 32,
"code": 59663,
"name": "reload"
},
"setIdx": 0,
"setId": 1,
"iconIdx": 18
}, {
"icon": {
"paths": ["M738 470h72c0 146-116 266-256 286v140h-84v-140c-140-20-256-140-256-286h72c0 128 108 216 226 216s226-88 226-216zM512 598c-70 0-128-58-128-128v-256c0-70 58-128 128-128s128 58 128 128v256c0 70-58 128-128 128z"],
"attrs": [],
"isMulticolor": false,
"isMulticolor2": false,
"tags": ["mic"],
"grid": 0
},
"attrs": [],
"properties": {
"id": 19,
"order": 68,
"ligatures": "mic",
"prevSize": 32,
"code": 59664,
"name": "microphone"
},
"setIdx": 0,
"setId": 1,
"iconIdx": 19
}, {
"icon": {
"paths": ["M738 470h72c0 146-116 266-256 286v140h-84v-140c-140-20-256-140-256-286h72c0 128 108 216 226 216s226-88 226-216zM460 210v264c0 28 24 50 52 50s50-22 50-50l2-264c0-28-24-52-52-52s-52 24-52 52zM512 598c-70 0-128-58-128-128v-256c0-70 58-128 128-128s128 58 128 128v256c0 70-58 128-128 128z"],
"attrs": [],
"isMulticolor": false,
"isMulticolor2": false,
"tags": ["mic_none"],
"grid": 0
},
"attrs": [],
"properties": {
"id": 20,
"order": 69,
"ligatures": "mic_none",
"prevSize": 32,
"code": 59665,
"name": "mic-empty"
},
"setIdx": 0,
"setId": 1,
"iconIdx": 20
}, {
"icon": {
"paths": ["M182 128l714 714-54 54-178-178c-32 20-72 32-110 38v140h-84v-140c-140-20-256-140-256-286h72c0 128 108 216 226 216 34 0 68-8 98-22l-70-70c-8 2-18 4-28 4-70 0-128-58-128-128v-32l-256-256zM640 476l-256-254v-8c0-70 58-128 128-128s128 58 128 128v262zM810 470c0 50-14 98-38 140l-52-54c12-26 18-54 18-86h72z"],
"attrs": [],
"isMulticolor": false,
"isMulticolor2": false,
"tags": ["mic_off"],
"grid": 0
},
"attrs": [],
"properties": {
"id": 21,
"order": 70,
"ligatures": "mic_off",
"prevSize": 32,
"code": 59666,
"name": "mic-disabled"
},
"setIdx": 0,
"setId": 1,
"iconIdx": 21
}, {
"icon": {
"paths": ["M982 234v620c0 94-78 170-172 170h-310c-46 0-90-18-122-50l-336-342s54-52 56-52c10-8 22-12 34-12 10 0 18 2 26 6 2 0 184 104 184 104v-508c0-36 28-64 64-64s64 28 64 64v300h42v-406c0-36 28-64 64-64s64 28 64 64v406h42v-364c0-36 28-64 64-64s64 28 64 64v364h44v-236c0-36 28-64 64-64s64 28 64 64z"],
"attrs": [],
"isMulticolor": false,
"isMulticolor2": false,
"tags": ["pan_tool"],
"grid": 0
},
"attrs": [],
"properties": {
"id": 22,
"order": 105,
"ligatures": "pan_tool",
"prevSize": 32,
"code": 59678,
"name": "raised-hand"
},
"setIdx": 0,
"setId": 1,
"iconIdx": 22
}, {
"icon": {
"paths": ["M704 278c-46 0-86 38-86 84s40 86 86 86 86-40 86-86-40-84-86-84zM704 512c-82 0-150-68-150-150s68-148 150-148 150 66 150 148-68 150-150 150zM320 278c-46 0-86 38-86 84s40 86 86 86 86-40 86-86-40-84-86-84zM320 512c-82 0-150-68-150-150s68-148 150-148 150 66 150 148-68 150-150 150zM918 746v-52c0-24-110-76-214-76-46 0-90 12-128 24 14 16 22 32 22 52v52h320zM534 746v-52c0-24-110-76-214-76s-214 52-214 76v52h428zM704 554c92 0 278 48 278 140v116h-940v-116c0-92 186-140 278-140 52 0 130 16 192 44 62-28 140-44 192-44z"],
"attrs": [],
"isMulticolor": false,
"isMulticolor2": false,
"tags": ["people_outline"],
"grid": 0
},
"attrs": [],
"properties": {
"id": 23,
"order": 100,
"ligatures": "people_outline",
"prevSize": 32,
"code": 59675,
"name": "contactList"
},
"setIdx": 0,
"setId": 1,
"iconIdx": 23
}, {
"icon": {
"paths": ["M640 598c114 0 342 56 342 170v86h-684v-86c0-114 228-170 342-170zM256 426h128v86h-128v128h-86v-128h-128v-86h128v-128h86v128zM640 512c-94 0-170-76-170-170s76-172 170-172 170 78 170 172-76 170-170 170z"],
"attrs": [],
"isMulticolor": false,
"isMulticolor2": false,
"tags": ["person_add"],
"grid": 0
},
"attrs": [],
"properties": {
"id": 24,
"order": 87,
"ligatures": "person_add",
"prevSize": 32,
"code": 59667,
"name": "link"
},
"setIdx": 0,
"setId": 1,
"iconIdx": 24
}, {
"icon": {
"paths": ["M512 854c188 0 342-154 342-342s-154-342-342-342-342 154-342 342 154 342 342 342zM512 86c236 0 426 190 426 426s-190 426-426 426-426-190-426-426 190-426 426-426zM426 704v-384l256 192z"],
"attrs": [],
"isMulticolor": false,
"isMulticolor2": false,
"tags": ["play_circle_outline"],
"grid": 0
},
"attrs": [],
"properties": {
"id": 25,
"order": 82,
"ligatures": "play_circle_outline",
"prevSize": 32,
"code": 59668,
"name": "shared-video"
},
"setIdx": 0,
"setId": 1,
"iconIdx": 25
}, {
"icon": {
"paths": ["M512 662c82 0 150-68 150-150s-68-150-150-150-150 68-150 150 68 150 150 150zM830 554l90 70c8 6 10 18 4 28l-86 148c-6 10-16 12-26 8l-106-42c-22 16-46 32-72 42l-16 112c-2 10-10 18-20 18h-172c-10 0-18-8-20-18l-16-112c-26-10-50-24-72-42l-106 42c-10 4-20 2-26-8l-86-148c-6-10-4-22 4-28l90-70c-2-14-2-28-2-42s0-28 2-42l-90-70c-8-6-10-18-4-28l86-148c6-10 16-12 26-8l106 42c22-16 46-32 72-42l16-112c2-10 10-18 20-18h172c10 0 18 8 20 18l16 112c26 10 50 24 72 42l106-42c10-4 20-2 26 8l86 148c6 10 4 22-4 28l-90 70c2 14 2 28 2 42s0 28-2 42z"],
"attrs": [],
"isMulticolor": false,
"isMulticolor2": false,
"tags": ["settings"],
"grid": 0
},
"attrs": [],
"properties": {
"id": 26,
"order": 81,
"ligatures": "settings",
"prevSize": 32,
"code": 59669,
"name": "settings"
},
"setIdx": 0,
"setId": 1,
"iconIdx": 26
}, {
"icon": {
"paths": ["M512 658l160 96-42-182 142-124-188-16-72-172-72 172-188 16 142 124-42 182zM938 394l-232 202 70 300-264-160-264 160 70-300-232-202 306-26 120-282 120 282z"],
"attrs": [],
"isMulticolor": false,
"isMulticolor2": false,
"tags": ["star_border"],
"grid": 0
},
"attrs": [],
"properties": {
"id": 27,
"order": 76,
"ligatures": "star_border",
"prevSize": 32,
"code": 59670,
"name": "star"
},
"setIdx": 0,
"setId": 1,
"iconIdx": 27
}, {
"icon": {
"paths": ["M640 662l150-150-150-150v108h-256v-108l-150 150 150 150v-108h256v108zM854 170c46 0 84 40 84 86v512c0 46-38 86-84 86h-684c-46 0-84-40-84-86v-512c0-46 38-86 84-86h136l78-84h256l78 84h136z"],
"attrs": [],
"isMulticolor": false,
"isMulticolor2": false,
"tags": ["switch_camera"],
"grid": 0
},
"attrs": [],
"properties": {
"id": 28,
"order": 108,
"ligatures": "switch_camera",
"prevSize": 32,
"code": 59681,
"name": "switch-camera"
},
"setIdx": 0,
"setId": 1,
"iconIdx": 28
}, {
"icon": {
"paths": ["M896 726v-512h-768v512h768zM896 128c46 0 86 40 86 86l-2 512c0 46-38 84-84 84h-214v86h-340v-86h-214c-46 0-86-38-86-84v-512c0-46 40-86 86-86h768z"],
"attrs": [],
"isMulticolor": false,
"isMulticolor2": false,
"tags": ["tv"],
"grid": 0
},
"attrs": [],
"properties": {
"id": 29,
"order": 93,
"ligatures": "tv",
"prevSize": 32,
"code": 59671,
"name": "share-desktop"
},
"setIdx": 0,
"setId": 1,
"iconIdx": 29
}, {
"icon": {
"paths": ["M726 448l170-170v468l-170-170v150c0 24-20 42-44 42h-512c-24 0-42-18-42-42v-428c0-24 18-42 42-42h512c24 0 44 18 44 42v150z"],
"attrs": [],
"isMulticolor": false,
"isMulticolor2": false,
"tags": ["videocam"],
"grid": 0
},
"attrs": [],
"properties": {
"id": 30,
"order": 77,
"ligatures": "videocam",
"prevSize": 32,
"code": 59672,
"name": "camera"
},
"setIdx": 0,
"setId": 1,
"iconIdx": 30
}, {
"icon": {
"paths": ["M140 86l756 756-54 54-136-136c-6 4-16 8-24 8h-512c-24 0-42-18-42-42v-428c0-24 18-42 42-42h32l-116-116zM896 278v456l-478-478h264c24 0 44 18 44 42v150z"],
"attrs": [],
"isMulticolor": false,
"isMulticolor2": false,
"tags": ["videocam_off"],
"grid": 0
},
"attrs": [],
"properties": {
"id": 31,
"order": 78,
"ligatures": "videocam_off",
"prevSize": 32,
"code": 59673,
"name": "camera-disabled"
},
"setIdx": 0,
"setId": 1,
"iconIdx": 31
}, {
"icon": {
"paths": ["M598 138c172 38 298 192 298 374s-126 336-298 374v-88c124-36 212-150 212-286s-88-250-212-286v-88zM704 512c0 76-42 140-106 172v-344c64 32 106 96 106 172zM128 384h170l214-214v684l-214-214h-170v-256z"],
"attrs": [],
"isMulticolor": false,
"isMulticolor2": false,
"tags": ["volume_up"],
"grid": 0
},
"attrs": [],
"properties": {
"id": 32,
"order": 79,
"ligatures": "volume_up",
"prevSize": 32,
"code": 59674,
"name": "volume"
},
"setIdx": 0,
"setId": 1,
"iconIdx": 32
}, {
"icon": {
"paths": ["M-0 724.847h196.337v187.951h-196.337v-187.951z", "M271.842 543.628h196.337v369.169h-196.337v-369.169z", "M543.656 362.438h196.337v550.36h-196.337v-550.36z", "M815.47 181.234v731.564h119.56c-14.589-33.025-23.125-71.503-23.232-111.943 0.132-86.42 38.697-163.851 99.656-216.468l0.348-403.153h-196.332z", "M1087.292-0v533.672c28.874-10.572 62.222-16.73 97.009-16.825 35.717 0.129 69.823 6.614 101.322 18.371l-1.999-535.218h-196.332z", "M1192.868 584.148c-0.009-0-0.020-0-0.031-0-122.247 0-221.351 98.447-221.372 219.896-0 0.007-0 0.014-0 0.021 0 121.467 99.111 219.935 221.372 219.935 0.011 0 0.021-0 0.032-0 122.248-0.014 221.345-98.477 221.345-219.935 0-0.007-0-0.013-0-0.020-0.021-121.441-99.11-219.883-221.345-219.897zM1194.706 651.393c87.601 0.006 158.614 69.787 158.614 155.866 0 0.006-0 0.012-0 0.019-0.022 86.062-71.026 155.822-158.614 155.828-87.588-0.006-158.593-69.766-158.615-155.826-0-0.007-0-0.014-0-0.020 0-86.079 71.013-155.86 158.613-155.866z", "M1286.795 668.318l48.348 52.528-236.375 217.567-48.348-52.528 236.375-217.567z"],
"width": 1414,
"attrs": [{}, {}, {}, {}, {}, {}, {}],
"isMulticolor": false,
"isMulticolor2": false,
"tags": ["connection-lost"],
"grid": 0
},
"attrs": [{}, {}, {}, {}, {}, {}, {}],
"properties": {
"order": 33,
"id": 33,
"name": "connection-lost",
"prevSize": 32,
"code": 59648
},
"setIdx": 0,
"setId": 1,
"iconIdx": 33
}, {
"icon": {
"paths": ["M3.881 813.165h220.26v210.835h-220.26v-210.835z", "M308.817 609.857h220.27v414.143h-220.27v-414.143z", "M613.764 406.588h220.268v617.412h-220.268v-617.412z", "M918.685 203.285h220.265v820.715h-220.265v-820.715z", "M1223.629 0h220.263v1024h-220.263v-1024z"],
"width": 1444,
"attrs": [{
"opacity": 1,
"visibility": false
}, {
"opacity": 1,
"visibility": false
}, {
"opacity": 1,
"visibility": false
}, {
"opacity": 1,
"visibility": false
}, {
"opacity": 1,
"visibility": false
}],
"isMulticolor": false,
"isMulticolor2": false,
"tags": ["connection-2"],
"grid": 0
},
"attrs": [{
"opacity": 1,
"visibility": false
}, {
"opacity": 1,
"visibility": false
}, {
"opacity": 1,
"visibility": false
}, {
"opacity": 1,
"visibility": false
}, {
"opacity": 1,
"visibility": false
}],
"properties": {
"order": 37,
"id": 34,
"prevSize": 32,
"code": 58906,
"name": "connection",
"ligatures": ""
},
"setIdx": 0,
"setId": 1,
"iconIdx": 34
}, {
"icon": {
"paths": ["M1123.444 20.985c-23.593-26.481-64.131-28.989-90.74-5.395l-1008.269 893.436c-26.609 23.468-28.991 64.131-5.46 90.676 12.674 14.306 30.308 21.649 48.126 21.649 15.123 0 30.372-5.401 42.544-16.195l130.045-115.22c90.743 81.844 210.569 132.165 342.473 132.101 282.816-0.061 510.913-227.969 511.287-510.972 0.126-109.934-34.682-211.367-93.499-294.72l118.088-104.625c26.483-23.526 28.997-64.129 5.404-90.735zM944.422 510.182c0.128 200.922-161.896 363.201-362.509 362.952-87.56-0.123-167.573-31.151-230.061-82.569l331.277-293.509v73.176c1.071 60.993 32.696 92.18 94.944 93.692 61.997-1.512 93.686-32.763 95.131-93.756v-41.096h-72.227v47.499c0.251 4.642-0.564 10.607-2.511 17.949-1.25 3.261-3.448 6.020-6.525 8.093-3.197 2.572-7.845 3.828-13.868 3.828-10.543-0.31-17.132-4.268-19.827-11.921-1.068-3.512-1.947-6.905-2.508-10.163-0.254-2.887-0.377-5.532-0.377-7.786v-143.511l42.477-37.634c0.215 0.432 0.452 0.851 0.63 1.303 1.947 6.467 2.762 12.799 2.511 19.076v36.772h72.227v-30.121c-0.246-31.245-9.086-54.699-26.363-70.447l40.711-36.069c35.787 56.055 56.803 122.585 56.867 194.244z", "M239.795 628.53c-12.613-37.023-19.827-76.557-19.827-117.913-0.19-200.236 161.584-362.009 361.945-362.135 56.853 0 110.313 13.302 158.133 36.398l117.846-104.421c-79.444-50.952-173.758-80.817-275.292-80.948-283.377-0.181-511.354 227.729-511.789 511.675-0.126 79.567 18.636 154.679 51.137 221.882l117.848-104.538z", "M388.576 333.98h-97.514v249.057l72.23-64.070v-0.689h0.815l117.72-104.418c0-0.564 0.123-0.94 0.123-1.509 0.753-53.898-30.369-80.069-93.374-78.37zM405.959 398.483c1.942 2.767 3.074 6.469 3.323 11.112 0.312 4.452 0.438 9.6 0.438 15.246 0.251 10.916-0.689 19.83-2.949 26.985-2.952 7.594-10.983 11.357-24.159 11.357h-19.325v-74.043h15.31c7.842 0 13.865 0.683 18.072 2.19 4.397 1.573 7.468 3.953 9.29 7.153z"],
"width": 1140,
"attrs": [],
"isMulticolor": false,
"isMulticolor2": false,
"tags": ["recDisable"],
"grid": 0
},
"attrs": [],
"properties": {
"order": 43,
"id": 35,
"prevSize": 32,
"code": 58899,
"name": "recDisable",
"ligatures": ""
},
"setIdx": 0,
"setId": 1,
"iconIdx": 35
}, {
"icon": {
"paths": ["M581.278-1.708c284.857 0.19 514.807 230.517 514.427 514.997-0.378 285.047-230.073 514.553-514.869 514.615-284.541 0.062-515.311-230.517-514.933-514.422 0.439-285.936 230.009-515.439 515.375-515.19zM580.579 148.244c-201.764 0.123-364.666 163.032-364.478 364.663 0 202.018 162.524 364.735 364.478 364.984 202.018 0.316 365.174-163.030 365.048-365.423-0.252-201.767-163.156-364.35-365.048-364.224z", "M287.698 335.093h98.196c63.442-1.767 94.785 24.518 94.027 78.863 0.254 19.081-2.211 34.882-7.456 47.521-6.005 12.508-18.706 21.988-38.167 28.181v0.819c28.373 6.259 43.031 23.573 43.981 51.946v57.689c0 11.247 0.254 22.813 0.758 34.756 0.819 12.005 3.033 20.979 6.696 27.043h-71.846c-3.727-6.064-6.128-15.038-7.14-27.043-1.012-11.943-1.454-23.509-1.138-34.756v-52.321c0-9.603-2.214-16.553-6.573-20.979-4.675-4.107-12.701-6.19-24.012-6.19h-14.599v141.291h-72.73v-326.82zM360.428 465.139h19.463c13.271 0 21.359-3.794 24.331-11.375 2.276-7.204 3.221-16.304 2.969-27.171 0-5.815-0.126-10.867-0.442-15.418-0.252-4.675-1.392-8.404-3.352-11.247-1.831-3.157-4.926-5.561-9.352-7.14-4.233-1.454-10.299-2.211-18.2-2.211h-15.418v74.564z", "M498.372 335.093h162.082v62.687h-89.35v65.587h78.103v62.685h-78.103v73.11h92.822v62.749h-165.557v-326.818z", "M682.507 424.001c0.316-31.782 9.416-55.542 27.425-71.407 17.44-15.29 40.185-22.936 68.181-22.936 28.247 0 51.119 7.646 68.623 23 17.82 15.798 26.92 39.623 27.171 71.407v30.333h-72.73v-37.031c0.254-6.192-0.57-12.639-2.527-19.209-1.264-3.157-3.475-5.938-6.573-8.214-3.221-1.515-7.898-2.404-13.964-2.404-10.615 0.316-17.249 3.855-19.967 10.618-2.211 6.573-3.223 13.017-2.907 19.209v161.956c0 2.273 0.126 4.865 0.38 7.772 0.568 3.411 1.454 6.824 2.527 10.233 2.717 7.775 9.352 11.756 19.967 12.007 6.067 0 10.744-1.261 13.964-3.791 3.098-2.15 5.309-4.867 6.573-8.216 1.96-7.33 2.782-13.33 2.527-18.007v-47.837h72.73v41.328c-1.451 61.547-33.364 93.015-95.794 94.469-62.685-1.454-94.53-32.922-95.607-94.343v-148.937z"],
"width": 1142,
"attrs": [],
"isMulticolor": false,
"isMulticolor2": false,
"tags": ["recEnable"],
"grid": 0
},
"attrs": [],
"properties": {
"order": 44,
"id": 36,
"prevSize": 32,
"code": 58900,
"name": "recEnable",
"ligatures": ""
},
"setIdx": 0,
"setId": 1,
"iconIdx": 36
}, {
"icon": {
"paths": ["M952.495 4.935h-818.689c-72.81 0-132.183 60.63-132.183 135.162v750.719c0 74.473 59.372 135.101 132.183 135.101h818.686c72.936 0 132.314-60.625 132.314-135.101v-750.722c0.003-74.532-59.378-135.159-132.311-135.159zM946.346 884.349h-806.14v-737.822h806.015l0.126 737.822z", "M685.753 285.456h216.911v566.758h-216.911v-566.758z", "M428.672 413.998h216.911v438.216h-216.911v-438.216z", "M172.339 542.54h216.161v309.677h-216.161v-309.677z"],
"width": 1088,
"attrs": [],
"isMulticolor": false,
"isMulticolor2": false,
"tags": ["presentation"],
"grid": 0
},
"attrs": [],
"properties": {
"order": 53,
"id": 37,
"prevSize": 32,
"code": 58883,
"name": "presentation",
"ligatures": ""
},
"setIdx": 0,
"setId": 1,
"iconIdx": 37
}, {
"icon": {
"paths": ["M512 42c46 0 86 40 86 86s-40 86-86 86-86-40-86-86 40-86 86-86zM512 298c46 0 86 40 86 86s-40 86-86 86-86-40-86-86 40-86 86-86zM768 298c46 0 86 40 86 86s-40 86-86 86-86-40-86-86 40-86 86-86zM768 554c46 0 86 40 86 86s-40 86-86 86-86-40-86-86 40-86 86-86zM512 554c46 0 86 40 86 86s-40 86-86 86-86-40-86-86 40-86 86-86zM768 214c-46 0-86-40-86-86s40-86 86-86 86 40 86 86-40 86-86 86zM256 554c46 0 86 40 86 86s-40 86-86 86-86-40-86-86 40-86 86-86zM256 298c46 0 86 40 86 86s-40 86-86 86-86-40-86-86 40-86 86-86zM256 42c46 0 86 40 86 86s-40 86-86 86-86-40-86-86 40-86 86-86zM512 810c46 0 86 40 86 86s-40 86-86 86-86-40-86-86 40-86 86-86z"],
"attrs": [],
"isMulticolor": false,
"isMulticolor2": false,
"tags": ["dialpad"],
"grid": 0
},
"attrs": [],
"properties": {
"order": 115,
"ligatures": "dialpad",
"id": 38,
"prevSize": 32,
"code": 59685,
"name": "dialpad"
},
"setIdx": 0,
"setId": 1,
"iconIdx": 38
}, {
"icon": {
"paths": ["M512 384c70 0 128 58 128 128s-58 128-128 128-128-58-128-128 58-128 128-128zM512 726c118 0 214-96 214-214s-96-214-214-214-214 96-214 214 96 214 214 214zM512 192c214 0 396 132 470 320-74 188-256 320-470 320s-396-132-470-320c74-188 256-320 470-320z"],
"attrs": [],
"isMulticolor": false,
"isMulticolor2": false,
"tags": ["visibility"],
"grid": 0
},
"attrs": [],
"properties": {
"order": 114,
"ligatures": "remove_red_eye, visibility",
"id": 39,
"prevSize": 32,
"code": 59683,
"name": "visibility"
},
"setIdx": 0,
"setId": 1,
"iconIdx": 39
}, {
"icon": {
"paths": ["M506 384h6c70 0 128 58 128 128v8zM322 418c-14 28-24 60-24 94 0 118 96 214 214 214 34 0 66-10 94-24l-66-66c-8 2-18 4-28 4-70 0-128-58-128-128 0-10 2-20 4-28zM86 182l54-54 756 756-54 54c-47.968-47.365-96.266-94.401-144-142-58 24-120 36-186 36-214 0-396-132-470-320 34-84 90-156 160-212-39.017-38.983-77.307-78.693-116-118zM512 298c-28 0-54 6-78 16l-92-92c52-20 110-30 170-30 214 0 394 132 468 320-32 80-82 148-146 202l-124-124c10-24 16-50 16-78 0-118-96-214-214-214z"],
"attrs": [],
"isMulticolor": false,
"isMulticolor2": false,
"tags": ["visibility_off"],
"grid": 0
},
"attrs": [],
"properties": {
"order": 113,
"ligatures": "visibility_off",
"id": 40,
"prevSize": 32,
"code": 59684,
"name": "visibility-off"
},
"setIdx": 0,
"setId": 1,
"iconIdx": 40
}],
"height": 1024,
"metadata": {
"name": "jitsi"
},
"preferences": {
"showGlyphs": true,
"showQuickUse": true,
"showQuickUse2": true,
"showSVGs": true,
"fontPref": {
"prefix": "icon-",
"metadata": {
"fontFamily": "jitsi",
"majorVersion": 1,
"minorVersion": 0
},
"metrics": {
"emSize": 1024,
"baseline": 0
},
"embed": false
},
"imagePref": {
"prefix": "icon-",
"png": true,
"useClassSelector": true
},
"historySize": 100,
"showCodes": false,
"search": "",
"showLiga": false
}
};
}, 866, null, "jitsi-meet/react/features/base/font-icons/jitsi.json");
__d(/* jitsi-meet/react/features/filmstrip/components/native/styles.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _styles = require(601 ); // 601 = ../../../base/styles
var _styles2 = require(868 ); // 868 = ../styles
var _styles3 = babelHelpers.interopRequireDefault(_styles2);
var indicator = {
textShadowColor: _styles.ColorPalette.black,
textShadowOffset: {
height: -1,
width: 0
}
};
exports.default = (0, _styles.createStyleSheet)(_styles3.default, {
thumbnailIndicator: indicator,
dominantSpeakerIndicator: {
fontSize: 12
},
dominantSpeakerIndicatorBackground: {
borderRadius: 16,
padding: 4
},
moderatorIndicator: indicator,
thumbnail: {
height: 80,
width: 80
}
});
}, 867, null, "jitsi-meet/react/features/filmstrip/components/native/styles.js");
__d(/* jitsi-meet/react/features/filmstrip/components/styles.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _react = require(589 ); // 589 = ../../base/react
var _styles = require(601 ); // 601 = ../../base/styles
exports.default = {
avatar: {
alignSelf: 'center',
borderRadius: _react.Platform.OS === 'android' ? 100 : 25,
flex: 0,
height: 50,
width: 50
},
dominantSpeakerIndicator: {
color: _styles.ColorPalette.white,
fontSize: 15
},
dominantSpeakerIndicatorBackground: {
backgroundColor: _styles.ColorPalette.blue,
borderRadius: 15,
left: 4,
padding: 5,
position: 'absolute',
top: 4
},
filmstrip: {
alignItems: 'flex-end',
alignSelf: 'stretch',
bottom: _styles.BoxModel.margin,
flex: 1,
flexDirection: 'column',
left: 0,
position: 'absolute',
right: 0
},
filmstripScrollViewContentContainer: {
paddingHorizontal: _styles.BoxModel.padding
},
moderatorIndicator: {
backgroundColor: 'transparent',
bottom: 4,
color: _styles.ColorPalette.white,
position: 'absolute',
right: 4
},
thumbnail: {
alignItems: 'stretch',
backgroundColor: _styles.ColorPalette.appBackground,
borderColor: '#424242',
borderRadius: 3,
borderStyle: 'solid',
borderWidth: 1,
flex: 1,
justifyContent: 'center',
marginLeft: 2,
marginRight: 2,
overflow: 'hidden',
position: 'relative'
},
thumbnailIndicator: {
backgroundColor: 'transparent',
color: _styles.ColorPalette.white,
paddingLeft: 1,
paddingRight: 1,
position: 'relative'
},
thumbnailIndicatorContainer: {
alignSelf: 'stretch',
bottom: 4,
flex: 1,
flexDirection: 'row',
left: 4,
position: 'absolute'
},
thumbnailPinned: {
borderColor: _styles.ColorPalette.blue,
shadowColor: _styles.ColorPalette.black,
shadowOffset: {
height: 5,
width: 5
},
shadowRadius: 5
}
};
}, 868, null, "jitsi-meet/react/features/filmstrip/components/styles.js");
__d(/* jitsi-meet/react/features/filmstrip/components/native/DominantSpeakerIndicator.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
exports.DominantSpeakerIndicator = undefined;
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/react/features/filmstrip/components/native/DominantSpeakerIndicator.js';
var _react = require(34 ); // 34 = react
var _react2 = babelHelpers.interopRequireDefault(_react);
var _reactNative = require(69 ); // 69 = react-native
var _FontAwesome = require(870 ); // 870 = react-native-vector-icons/FontAwesome
var _FontAwesome2 = babelHelpers.interopRequireDefault(_FontAwesome);
var _styles = require(867 ); // 867 = ./styles
var _styles2 = babelHelpers.interopRequireDefault(_styles);
var DominantSpeakerIndicator = exports.DominantSpeakerIndicator = function (_Component) {
babelHelpers.inherits(DominantSpeakerIndicator, _Component);
function DominantSpeakerIndicator() {
babelHelpers.classCallCheck(this, DominantSpeakerIndicator);
return babelHelpers.possibleConstructorReturn(this, (DominantSpeakerIndicator.__proto__ || Object.getPrototypeOf(DominantSpeakerIndicator)).apply(this, arguments));
}
babelHelpers.createClass(DominantSpeakerIndicator, [{
key: 'render',
value: function render() {
return _react2.default.createElement(
_reactNative.View,
{ style: _styles2.default.dominantSpeakerIndicatorBackground, __source: {
fileName: _jsxFileName,
lineNumber: 19
}
},
_react2.default.createElement(_FontAwesome2.default, {
name: 'bullhorn',
style: _styles2.default.dominantSpeakerIndicator, __source: {
fileName: _jsxFileName,
lineNumber: 20
}
})
);
}
}]);
return DominantSpeakerIndicator;
}(_react.Component);
}, 869, null, "jitsi-meet/react/features/filmstrip/components/native/DominantSpeakerIndicator.js");
__d(/* react-native-vector-icons/FontAwesome.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getImageSource = exports.ToolbarAndroid = exports.TabBarItemIOS = exports.TabBarItem = exports.Button = undefined;
var _createIconSet = require(711 ); // 711 = ./lib/create-icon-set
var _createIconSet2 = babelHelpers.interopRequireDefault(_createIconSet);
var _FontAwesome = require(871 ); // 871 = ./glyphmaps/FontAwesome.json
var _FontAwesome2 = babelHelpers.interopRequireDefault(_FontAwesome);
var iconSet = (0, _createIconSet2.default)(_FontAwesome2.default, 'FontAwesome', 'FontAwesome.ttf');
exports.default = iconSet;
var Button = exports.Button = iconSet.Button;
var TabBarItem = exports.TabBarItem = iconSet.TabBarItem;
var TabBarItemIOS = exports.TabBarItemIOS = iconSet.TabBarItemIOS;
var ToolbarAndroid = exports.ToolbarAndroid = iconSet.ToolbarAndroid;
var getImageSource = exports.getImageSource = iconSet.getImageSource;
}, 870, null, "react-native-vector-icons/FontAwesome.js");
__d(/* react-native-vector-icons/glyphmaps/FontAwesome.json */function(global, require, module, exports) {module.exports = module.exports = {
"glass": 61440,
"music": 61441,
"search": 61442,
"envelope-o": 61443,
"heart": 61444,
"star": 61445,
"star-o": 61446,
"user": 61447,
"film": 61448,
"th-large": 61449,
"th": 61450,
"th-list": 61451,
"check": 61452,
"remove": 61453,
"close": 61453,
"times": 61453,
"search-plus": 61454,
"search-minus": 61456,
"power-off": 61457,
"signal": 61458,
"gear": 61459,
"cog": 61459,
"trash-o": 61460,
"home": 61461,
"file-o": 61462,
"clock-o": 61463,
"road": 61464,
"download": 61465,
"arrow-circle-o-down": 61466,
"arrow-circle-o-up": 61467,
"inbox": 61468,
"play-circle-o": 61469,
"rotate-right": 61470,
"repeat": 61470,
"refresh": 61473,
"list-alt": 61474,
"lock": 61475,
"flag": 61476,
"headphones": 61477,
"volume-off": 61478,
"volume-down": 61479,
"volume-up": 61480,
"qrcode": 61481,
"barcode": 61482,
"tag": 61483,
"tags": 61484,
"book": 61485,
"bookmark": 61486,
"print": 61487,
"camera": 61488,
"font": 61489,
"bold": 61490,
"italic": 61491,
"text-height": 61492,
"text-width": 61493,
"align-left": 61494,
"align-center": 61495,
"align-right": 61496,
"align-justify": 61497,
"list": 61498,
"dedent": 61499,
"outdent": 61499,
"indent": 61500,
"video-camera": 61501,
"photo": 61502,
"image": 61502,
"picture-o": 61502,
"pencil": 61504,
"map-marker": 61505,
"adjust": 61506,
"tint": 61507,
"edit": 61508,
"pencil-square-o": 61508,
"share-square-o": 61509,
"check-square-o": 61510,
"arrows": 61511,
"step-backward": 61512,
"fast-backward": 61513,
"backward": 61514,
"play": 61515,
"pause": 61516,
"stop": 61517,
"forward": 61518,
"fast-forward": 61520,
"step-forward": 61521,
"eject": 61522,
"chevron-left": 61523,
"chevron-right": 61524,
"plus-circle": 61525,
"minus-circle": 61526,
"times-circle": 61527,
"check-circle": 61528,
"question-circle": 61529,
"info-circle": 61530,
"crosshairs": 61531,
"times-circle-o": 61532,
"check-circle-o": 61533,
"ban": 61534,
"arrow-left": 61536,
"arrow-right": 61537,
"arrow-up": 61538,
"arrow-down": 61539,
"mail-forward": 61540,
"share": 61540,
"expand": 61541,
"compress": 61542,
"plus": 61543,
"minus": 61544,
"asterisk": 61545,
"exclamation-circle": 61546,
"gift": 61547,
"leaf": 61548,
"fire": 61549,
"eye": 61550,
"eye-slash": 61552,
"warning": 61553,
"exclamation-triangle": 61553,
"plane": 61554,
"calendar": 61555,
"random": 61556,
"comment": 61557,
"magnet": 61558,
"chevron-up": 61559,
"chevron-down": 61560,
"retweet": 61561,
"shopping-cart": 61562,
"folder": 61563,
"folder-open": 61564,
"arrows-v": 61565,
"arrows-h": 61566,
"bar-chart-o": 61568,
"bar-chart": 61568,
"twitter-square": 61569,
"facebook-square": 61570,
"camera-retro": 61571,
"key": 61572,
"gears": 61573,
"cogs": 61573,
"comments": 61574,
"thumbs-o-up": 61575,
"thumbs-o-down": 61576,
"star-half": 61577,
"heart-o": 61578,
"sign-out": 61579,
"linkedin-square": 61580,
"thumb-tack": 61581,
"external-link": 61582,
"sign-in": 61584,
"trophy": 61585,
"github-square": 61586,
"upload": 61587,
"lemon-o": 61588,
"phone": 61589,
"square-o": 61590,
"bookmark-o": 61591,
"phone-square": 61592,
"twitter": 61593,
"facebook-f": 61594,
"facebook": 61594,
"github": 61595,
"unlock": 61596,
"credit-card": 61597,
"feed": 61598,
"rss": 61598,
"hdd-o": 61600,
"bullhorn": 61601,
"bell": 61683,
"certificate": 61603,
"hand-o-right": 61604,
"hand-o-left": 61605,
"hand-o-up": 61606,
"hand-o-down": 61607,
"arrow-circle-left": 61608,
"arrow-circle-right": 61609,
"arrow-circle-up": 61610,
"arrow-circle-down": 61611,
"globe": 61612,
"wrench": 61613,
"tasks": 61614,
"filter": 61616,
"briefcase": 61617,
"arrows-alt": 61618,
"group": 61632,
"users": 61632,
"chain": 61633,
"link": 61633,
"cloud": 61634,
"flask": 61635,
"cut": 61636,
"scissors": 61636,
"copy": 61637,
"files-o": 61637,
"paperclip": 61638,
"save": 61639,
"floppy-o": 61639,
"square": 61640,
"navicon": 61641,
"reorder": 61641,
"bars": 61641,
"list-ul": 61642,
"list-ol": 61643,
"strikethrough": 61644,
"underline": 61645,
"table": 61646,
"magic": 61648,
"truck": 61649,
"pinterest": 61650,
"pinterest-square": 61651,
"google-plus-square": 61652,
"google-plus": 61653,
"money": 61654,
"caret-down": 61655,
"caret-up": 61656,
"caret-left": 61657,
"caret-right": 61658,
"columns": 61659,
"unsorted": 61660,
"sort": 61660,
"sort-down": 61661,
"sort-desc": 61661,
"sort-up": 61662,
"sort-asc": 61662,
"envelope": 61664,
"linkedin": 61665,
"rotate-left": 61666,
"undo": 61666,
"legal": 61667,
"gavel": 61667,
"dashboard": 61668,
"tachometer": 61668,
"comment-o": 61669,
"comments-o": 61670,
"flash": 61671,
"bolt": 61671,
"sitemap": 61672,
"umbrella": 61673,
"paste": 61674,
"clipboard": 61674,
"lightbulb-o": 61675,
"exchange": 61676,
"cloud-download": 61677,
"cloud-upload": 61678,
"user-md": 61680,
"stethoscope": 61681,
"suitcase": 61682,
"bell-o": 61602,
"coffee": 61684,
"cutlery": 61685,
"file-text-o": 61686,
"building-o": 61687,
"hospital-o": 61688,
"ambulance": 61689,
"medkit": 61690,
"fighter-jet": 61691,
"beer": 61692,
"h-square": 61693,
"plus-square": 61694,
"angle-double-left": 61696,
"angle-double-right": 61697,
"angle-double-up": 61698,
"angle-double-down": 61699,
"angle-left": 61700,
"angle-right": 61701,
"angle-up": 61702,
"angle-down": 61703,
"desktop": 61704,
"laptop": 61705,
"tablet": 61706,
"mobile-phone": 61707,
"mobile": 61707,
"circle-o": 61708,
"quote-left": 61709,
"quote-right": 61710,
"spinner": 61712,
"circle": 61713,
"mail-reply": 61714,
"reply": 61714,
"github-alt": 61715,
"folder-o": 61716,
"folder-open-o": 61717,
"smile-o": 61720,
"frown-o": 61721,
"meh-o": 61722,
"gamepad": 61723,
"keyboard-o": 61724,
"flag-o": 61725,
"flag-checkered": 61726,
"terminal": 61728,
"code": 61729,
"mail-reply-all": 61730,
"reply-all": 61730,
"star-half-empty": 61731,
"star-half-full": 61731,
"star-half-o": 61731,
"location-arrow": 61732,
"crop": 61733,
"code-fork": 61734,
"unlink": 61735,
"chain-broken": 61735,
"question": 61736,
"info": 61737,
"exclamation": 61738,
"superscript": 61739,
"subscript": 61740,
"eraser": 61741,
"puzzle-piece": 61742,
"microphone": 61744,
"microphone-slash": 61745,
"shield": 61746,
"calendar-o": 61747,
"fire-extinguisher": 61748,
"rocket": 61749,
"maxcdn": 61750,
"chevron-circle-left": 61751,
"chevron-circle-right": 61752,
"chevron-circle-up": 61753,
"chevron-circle-down": 61754,
"html5": 61755,
"css3": 61756,
"anchor": 61757,
"unlock-alt": 61758,
"bullseye": 61760,
"ellipsis-h": 61761,
"ellipsis-v": 61762,
"rss-square": 61763,
"play-circle": 61764,
"ticket": 61765,
"minus-square": 61766,
"minus-square-o": 61767,
"level-up": 61768,
"level-down": 61769,
"check-square": 61770,
"pencil-square": 61771,
"external-link-square": 61772,
"share-square": 61773,
"compass": 61774,
"toggle-down": 61776,
"caret-square-o-down": 61776,
"toggle-up": 61777,
"caret-square-o-up": 61777,
"toggle-right": 61778,
"caret-square-o-right": 61778,
"euro": 61779,
"eur": 61779,
"gbp": 61780,
"dollar": 61781,
"usd": 61781,
"rupee": 61782,
"inr": 61782,
"cny": 61783,
"rmb": 61783,
"yen": 61783,
"jpy": 61783,
"ruble": 61784,
"rouble": 61784,
"rub": 61784,
"won": 61785,
"krw": 61785,
"bitcoin": 61786,
"btc": 61786,
"file": 61787,
"file-text": 61788,
"sort-alpha-asc": 61789,
"sort-alpha-desc": 61790,
"sort-amount-asc": 61792,
"sort-amount-desc": 61793,
"sort-numeric-asc": 61794,
"sort-numeric-desc": 61795,
"thumbs-up": 61796,
"thumbs-down": 61797,
"youtube-square": 61798,
"youtube": 61799,
"xing": 61800,
"xing-square": 61801,
"youtube-play": 61802,
"dropbox": 61803,
"stack-overflow": 61804,
"instagram": 61805,
"flickr": 61806,
"adn": 61808,
"bitbucket": 61809,
"bitbucket-square": 61810,
"tumblr": 61811,
"tumblr-square": 61812,
"long-arrow-down": 61813,
"long-arrow-up": 61814,
"long-arrow-left": 61815,
"long-arrow-right": 61816,
"apple": 61817,
"windows": 61818,
"android": 61819,
"linux": 61820,
"dribbble": 61821,
"skype": 61822,
"foursquare": 61824,
"trello": 61825,
"female": 61826,
"male": 61827,
"gittip": 61828,
"gratipay": 61828,
"sun-o": 61829,
"moon-o": 61830,
"archive": 61831,
"bug": 61832,
"vk": 61833,
"weibo": 61834,
"renren": 61835,
"pagelines": 61836,
"stack-exchange": 61837,
"arrow-circle-o-right": 61838,
"arrow-circle-o-left": 61840,
"toggle-left": 61841,
"caret-square-o-left": 61841,
"dot-circle-o": 61842,
"wheelchair": 61843,
"vimeo-square": 61844,
"turkish-lira": 61845,
"try": 61845,
"plus-square-o": 61846,
"space-shuttle": 61847,
"slack": 61848,
"envelope-square": 61849,
"wordpress": 61850,
"openid": 61851,
"institution": 61852,
"bank": 61852,
"university": 61852,
"mortar-board": 61853,
"graduation-cap": 61853,
"yahoo": 61854,
"google": 61856,
"reddit": 61857,
"reddit-square": 61858,
"stumbleupon-circle": 61859,
"stumbleupon": 61860,
"delicious": 61861,
"digg": 61862,
"pied-piper-pp": 61863,
"pied-piper-alt": 61864,
"drupal": 61865,
"joomla": 61866,
"language": 61867,
"fax": 61868,
"building": 61869,
"child": 61870,
"paw": 61872,
"spoon": 61873,
"cube": 61874,
"cubes": 61875,
"behance": 61876,
"behance-square": 61877,
"steam": 61878,
"steam-square": 61879,
"recycle": 61880,
"automobile": 61881,
"car": 61881,
"cab": 61882,
"taxi": 61882,
"tree": 61883,
"spotify": 61884,
"deviantart": 61885,
"soundcloud": 61886,
"database": 61888,
"file-pdf-o": 61889,
"file-word-o": 61890,
"file-excel-o": 61891,
"file-powerpoint-o": 61892,
"file-photo-o": 61893,
"file-picture-o": 61893,
"file-image-o": 61893,
"file-zip-o": 61894,
"file-archive-o": 61894,
"file-sound-o": 61895,
"file-audio-o": 61895,
"file-movie-o": 61896,
"file-video-o": 61896,
"file-code-o": 61897,
"vine": 61898,
"codepen": 61899,
"jsfiddle": 61900,
"life-bouy": 61901,
"life-buoy": 61901,
"life-saver": 61901,
"support": 61901,
"life-ring": 61901,
"circle-o-notch": 61902,
"ra": 61904,
"resistance": 61904,
"rebel": 61904,
"ge": 61905,
"empire": 61905,
"git-square": 61906,
"git": 61907,
"y-combinator-square": 61908,
"yc-square": 61908,
"hacker-news": 61908,
"tencent-weibo": 61909,
"qq": 61910,
"wechat": 61911,
"weixin": 61911,
"send": 61912,
"paper-plane": 61912,
"send-o": 61913,
"paper-plane-o": 61913,
"history": 61914,
"circle-thin": 61915,
"header": 61916,
"paragraph": 61917,
"sliders": 61918,
"share-alt": 61920,
"share-alt-square": 61921,
"bomb": 61922,
"soccer-ball-o": 61923,
"futbol-o": 61923,
"tty": 61924,
"binoculars": 61925,
"plug": 61926,
"slideshare": 61927,
"twitch": 61928,
"yelp": 61929,
"newspaper-o": 61930,
"wifi": 61931,
"calculator": 61932,
"paypal": 61933,
"google-wallet": 61934,
"cc-visa": 61936,
"cc-mastercard": 61937,
"cc-discover": 61938,
"cc-amex": 61939,
"cc-paypal": 61940,
"cc-stripe": 61941,
"bell-slash": 61942,
"bell-slash-o": 61943,
"trash": 61944,
"copyright": 61945,
"at": 61946,
"eyedropper": 61947,
"paint-brush": 61948,
"birthday-cake": 61949,
"area-chart": 61950,
"pie-chart": 61952,
"line-chart": 61953,
"lastfm": 61954,
"lastfm-square": 61955,
"toggle-off": 61956,
"toggle-on": 61957,
"bicycle": 61958,
"bus": 61959,
"ioxhost": 61960,
"angellist": 61961,
"cc": 61962,
"shekel": 61963,
"sheqel": 61963,
"ils": 61963,
"meanpath": 61964,
"buysellads": 61965,
"connectdevelop": 61966,
"dashcube": 61968,
"forumbee": 61969,
"leanpub": 61970,
"sellsy": 61971,
"shirtsinbulk": 61972,
"simplybuilt": 61973,
"skyatlas": 61974,
"cart-plus": 61975,
"cart-arrow-down": 61976,
"diamond": 61977,
"ship": 61978,
"user-secret": 61979,
"motorcycle": 61980,
"street-view": 61981,
"heartbeat": 61982,
"venus": 61985,
"mars": 61986,
"mercury": 61987,
"intersex": 61988,
"transgender": 61988,
"transgender-alt": 61989,
"venus-double": 61990,
"mars-double": 61991,
"venus-mars": 61992,
"mars-stroke": 61993,
"mars-stroke-v": 61994,
"mars-stroke-h": 61995,
"neuter": 61996,
"genderless": 61997,
"facebook-official": 62000,
"pinterest-p": 62001,
"whatsapp": 62002,
"server": 62003,
"user-plus": 62004,
"user-times": 62005,
"hotel": 62006,
"bed": 62006,
"viacoin": 62007,
"train": 62008,
"subway": 62009,
"medium": 62010,
"yc": 62011,
"y-combinator": 62011,
"optin-monster": 62012,
"opencart": 62013,
"expeditedssl": 62014,
"battery-4": 62016,
"battery": 62016,
"battery-full": 62016,
"battery-3": 62017,
"battery-three-quarters": 62017,
"battery-2": 62018,
"battery-half": 62018,
"battery-1": 62019,
"battery-quarter": 62019,
"battery-0": 62020,
"battery-empty": 62020,
"mouse-pointer": 62021,
"i-cursor": 62022,
"object-group": 62023,
"object-ungroup": 62024,
"sticky-note": 62025,
"sticky-note-o": 62026,
"cc-jcb": 62027,
"cc-diners-club": 62028,
"clone": 62029,
"balance-scale": 62030,
"hourglass-o": 62032,
"hourglass-1": 62033,
"hourglass-start": 62033,
"hourglass-2": 62034,
"hourglass-half": 62034,
"hourglass-3": 62035,
"hourglass-end": 62035,
"hourglass": 62036,
"hand-grab-o": 62037,
"hand-rock-o": 62037,
"hand-stop-o": 62038,
"hand-paper-o": 62038,
"hand-scissors-o": 62039,
"hand-lizard-o": 62040,
"hand-spock-o": 62041,
"hand-pointer-o": 62042,
"hand-peace-o": 62043,
"trademark": 62044,
"registered": 62045,
"creative-commons": 62046,
"gg": 62048,
"gg-circle": 62049,
"tripadvisor": 62050,
"odnoklassniki": 62051,
"odnoklassniki-square": 62052,
"get-pocket": 62053,
"wikipedia-w": 62054,
"safari": 62055,
"chrome": 62056,
"firefox": 62057,
"opera": 62058,
"internet-explorer": 62059,
"tv": 62060,
"television": 62060,
"contao": 62061,
"500px": 62062,
"amazon": 62064,
"calendar-plus-o": 62065,
"calendar-minus-o": 62066,
"calendar-times-o": 62067,
"calendar-check-o": 62068,
"industry": 62069,
"map-pin": 62070,
"map-signs": 62071,
"map-o": 62072,
"map": 62073,
"commenting": 62074,
"commenting-o": 62075,
"houzz": 62076,
"vimeo": 62077,
"black-tie": 62078,
"fonticons": 62080,
"reddit-alien": 62081,
"edge": 62082,
"credit-card-alt": 62083,
"codiepie": 62084,
"modx": 62085,
"fort-awesome": 62086,
"usb": 62087,
"product-hunt": 62088,
"mixcloud": 62089,
"scribd": 62090,
"pause-circle": 62091,
"pause-circle-o": 62092,
"stop-circle": 62093,
"stop-circle-o": 62094,
"shopping-bag": 62096,
"shopping-basket": 62097,
"hashtag": 62098,
"bluetooth": 62099,
"bluetooth-b": 62100,
"percent": 62101,
"gitlab": 62102,
"wpbeginner": 62103,
"wpforms": 62104,
"envira": 62105,
"universal-access": 62106,
"wheelchair-alt": 62107,
"question-circle-o": 62108,
"blind": 62109,
"audio-description": 62110,
"volume-control-phone": 62112,
"braille": 62113,
"assistive-listening-systems": 62114,
"asl-interpreting": 62115,
"american-sign-language-interpreting": 62115,
"deafness": 62116,
"hard-of-hearing": 62116,
"deaf": 62116,
"glide": 62117,
"glide-g": 62118,
"signing": 62119,
"sign-language": 62119,
"low-vision": 62120,
"viadeo": 62121,
"viadeo-square": 62122,
"snapchat": 62123,
"snapchat-ghost": 62124,
"snapchat-square": 62125,
"pied-piper": 62126,
"first-order": 62128,
"yoast": 62129,
"themeisle": 62130,
"google-plus-circle": 62131,
"google-plus-official": 62131,
"fa": 62132,
"font-awesome": 62132,
"handshake-o": 62133,
"envelope-open": 62134,
"envelope-open-o": 62135,
"linode": 62136,
"address-book": 62137,
"address-book-o": 62138,
"vcard": 62139,
"address-card": 62139,
"vcard-o": 62140,
"address-card-o": 62140,
"user-circle": 62141,
"user-circle-o": 62142,
"user-o": 62144,
"id-badge": 62145,
"drivers-license": 62146,
"id-card": 62146,
"drivers-license-o": 62147,
"id-card-o": 62147,
"quora": 62148,
"free-code-camp": 62149,
"telegram": 62150,
"thermometer-4": 62151,
"thermometer": 62151,
"thermometer-full": 62151,
"thermometer-3": 62152,
"thermometer-three-quarters": 62152,
"thermometer-2": 62153,
"thermometer-half": 62153,
"thermometer-1": 62154,
"thermometer-quarter": 62154,
"thermometer-0": 62155,
"thermometer-empty": 62155,
"shower": 62156,
"bathtub": 62157,
"s15": 62157,
"bath": 62157,
"podcast": 62158,
"window-maximize": 62160,
"window-minimize": 62161,
"window-restore": 62162,
"times-rectangle": 62163,
"window-close": 62163,
"times-rectangle-o": 62164,
"window-close-o": 62164,
"bandcamp": 62165,
"grav": 62166,
"etsy": 62167,
"imdb": 62168,
"ravelry": 62169,
"eercast": 62170,
"microchip": 62171,
"snowflake-o": 62172,
"superpowers": 62173,
"wpexplorer": 62174,
"meetup": 62176
};
}, 871, null, "react-native-vector-icons/glyphmaps/FontAwesome.json");
__d(/* jitsi-meet/react/features/filmstrip/components/native/ModeratorIndicator.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
exports.ModeratorIndicator = undefined;
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/react/features/filmstrip/components/native/ModeratorIndicator.js';
var _react = require(34 ); // 34 = react
var _react2 = babelHelpers.interopRequireDefault(_react);
var _FontAwesome = require(870 ); // 870 = react-native-vector-icons/FontAwesome
var _FontAwesome2 = babelHelpers.interopRequireDefault(_FontAwesome);
var _styles = require(867 ); // 867 = ./styles
var _styles2 = babelHelpers.interopRequireDefault(_styles);
var ModeratorIndicator = exports.ModeratorIndicator = function (_Component) {
babelHelpers.inherits(ModeratorIndicator, _Component);
function ModeratorIndicator() {
babelHelpers.classCallCheck(this, ModeratorIndicator);
return babelHelpers.possibleConstructorReturn(this, (ModeratorIndicator.__proto__ || Object.getPrototypeOf(ModeratorIndicator)).apply(this, arguments));
}
babelHelpers.createClass(ModeratorIndicator, [{
key: 'render',
value: function render() {
return _react2.default.createElement(_FontAwesome2.default, {
name: 'star',
style: _styles2.default.moderatorIndicator, __source: {
fileName: _jsxFileName,
lineNumber: 17
}
});
}
}]);
return ModeratorIndicator;
}(_react.Component);
}, 872, null, "jitsi-meet/react/features/filmstrip/components/native/ModeratorIndicator.js");
__d(/* jitsi-meet/react/features/filmstrip/components/native/VideoMutedIndicator.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
exports.VideoMutedIndicator = undefined;
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/react/features/filmstrip/components/native/VideoMutedIndicator.js';
var _react = require(34 ); // 34 = react
var _react2 = babelHelpers.interopRequireDefault(_react);
var _fontIcons = require(708 ); // 708 = ../../../base/font-icons
var _styles = require(867 ); // 867 = ./styles
var _styles2 = babelHelpers.interopRequireDefault(_styles);
var VideoMutedIndicator = exports.VideoMutedIndicator = function (_Component) {
babelHelpers.inherits(VideoMutedIndicator, _Component);
function VideoMutedIndicator() {
babelHelpers.classCallCheck(this, VideoMutedIndicator);
return babelHelpers.possibleConstructorReturn(this, (VideoMutedIndicator.__proto__ || Object.getPrototypeOf(VideoMutedIndicator)).apply(this, arguments));
}
babelHelpers.createClass(VideoMutedIndicator, [{
key: 'render',
value: function render() {
return _react2.default.createElement(_fontIcons.Icon, {
name: 'camera-disabled',
style: _styles2.default.thumbnailIndicator, __source: {
fileName: _jsxFileName,
lineNumber: 18
}
});
}
}]);
return VideoMutedIndicator;
}(_react.Component);
}, 873, null, "jitsi-meet/react/features/filmstrip/components/native/VideoMutedIndicator.js");
__d(/* jitsi-meet/react/features/filmstrip/components/Filmstrip.native.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/react/features/filmstrip/components/Filmstrip.native.js';
var _react = require(34 ); // 34 = react
var _react2 = babelHelpers.interopRequireDefault(_react);
var _reactNative = require(69 ); // 69 = react-native
var _reactRedux = require(548 ); // 548 = react-redux
var _react3 = require(589 ); // 589 = ../../base/react
var _Thumbnail = require(875 ); // 875 = ./Thumbnail
var _Thumbnail2 = babelHelpers.interopRequireDefault(_Thumbnail);
var _ = require(705 ); // 705 = ./_
var Filmstrip = function (_Component) {
babelHelpers.inherits(Filmstrip, _Component);
function Filmstrip() {
babelHelpers.classCallCheck(this, Filmstrip);
return babelHelpers.possibleConstructorReturn(this, (Filmstrip.__proto__ || Object.getPrototypeOf(Filmstrip)).apply(this, arguments));
}
babelHelpers.createClass(Filmstrip, [{
key: 'render',
value: function render() {
return _react2.default.createElement(
_react3.Container,
{
style: _.styles.filmstrip,
visible: this.props._visible, __source: {
fileName: _jsxFileName,
lineNumber: 50
}
},
_react2.default.createElement(
_reactNative.ScrollView,
{
contentContainerStyle: _.styles.filmstripScrollViewContentContainer,
horizontal: true,
showsHorizontalScrollIndicator: false,
showsVerticalScrollIndicator: false, __source: {
fileName: _jsxFileName,
lineNumber: 53
}
},
this._sort(this.props._participants).map(function (p) {
return _react2.default.createElement(_Thumbnail2.default, {
key: p.id,
participant: p, __source: {
fileName: _jsxFileName,
lineNumber: 65
}
});
})
)
);
}
}, {
key: '_sort',
value: function _sort(participants) {
var sortedParticipants = [];
for (var i = participants.length - 1; i >= 0; --i) {
var p = participants[i];
p.local || sortedParticipants.push(p);
}
for (var _i = participants.length - 1; _i >= 0; --_i) {
var _p = participants[_i];
_p.local && sortedParticipants.push(_p);
}
return sortedParticipants;
}
}]);
return Filmstrip;
}(_react.Component);
Filmstrip.propTypes = {
_participants: _react2.default.PropTypes.array,
_visible: _react2.default.PropTypes.bool.isRequired
};
function _mapStateToProps(state) {
return {
_participants: state['features/base/participants'],
_visible: !state['features/toolbox'].visible
};
}
exports.default = (0, _reactRedux.connect)(_mapStateToProps)(Filmstrip);
}, 874, null, "jitsi-meet/react/features/filmstrip/components/Filmstrip.native.js");
__d(/* jitsi-meet/react/features/filmstrip/components/Thumbnail.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/react/features/filmstrip/components/Thumbnail.js';
var _react = require(34 ); // 34 = react
var _react2 = babelHelpers.interopRequireDefault(_react);
var _reactRedux = require(548 ); // 548 = react-redux
var _media = require(567 ); // 567 = ../../base/media
var _participants = require(540 ); // 540 = ../../base/participants
var _react3 = require(589 ); // 589 = ../../base/react
var _tracks = require(580 ); // 580 = ../../base/tracks
var _ = require(705 ); // 705 = ./_
var Thumbnail = function (_Component) {
babelHelpers.inherits(Thumbnail, _Component);
function Thumbnail(props) {
babelHelpers.classCallCheck(this, Thumbnail);
var _this = babelHelpers.possibleConstructorReturn(this, (Thumbnail.__proto__ || Object.getPrototypeOf(Thumbnail)).call(this, props));
_this._onClick = _this._onClick.bind(_this);
return _this;
}
babelHelpers.createClass(Thumbnail, [{
key: 'render',
value: function render() {
var audioTrack = this.props._audioTrack;
var largeVideo = this.props._largeVideo;
var participant = this.props.participant;
var videoTrack = this.props._videoTrack;
var style = _.styles.thumbnail;
if (participant.pinned) {
style = babelHelpers.extends({}, style, _.styles.thumbnailPinned);
}
var audioMuted = !audioTrack || audioTrack.muted;
var renderAudio = !audioMuted && !audioTrack.local;
var participantId = participant.id;
var participantNotInLargeVideo = participantId !== largeVideo.participantId;
var videoMuted = !videoTrack || videoTrack.muted;
return _react2.default.createElement(
_react3.Container,
{
onClick: this._onClick,
style: style, __source: {
fileName: _jsxFileName,
lineNumber: 86
}
},
renderAudio && _react2.default.createElement(_media.Audio, {
stream: audioTrack.jitsiTrack.getOriginalStream(), __source: {
fileName: _jsxFileName,
lineNumber: 91
}
}),
_react2.default.createElement(_participants.ParticipantView, {
avatarStyle: _.styles.avatar,
participantId: participantId,
showAvatar: participantNotInLargeVideo,
showVideo: participantNotInLargeVideo,
zOrder: 1, __source: {
fileName: _jsxFileName,
lineNumber: 95
}
}),
participant.role === _participants.PARTICIPANT_ROLE.MODERATOR && _react2.default.createElement(_.ModeratorIndicator, {
__source: {
fileName: _jsxFileName,
lineNumber: 103
}
}),
participant.dominantSpeaker && _react2.default.createElement(_.DominantSpeakerIndicator, {
__source: {
fileName: _jsxFileName,
lineNumber: 106
}
}),
_react2.default.createElement(
_react3.Container,
{ style: _.styles.thumbnailIndicatorContainer, __source: {
fileName: _jsxFileName,
lineNumber: 108
}
},
audioMuted && _react2.default.createElement(_.AudioMutedIndicator, {
__source: {
fileName: _jsxFileName,
lineNumber: 110
}
}),
videoMuted && _react2.default.createElement(_.VideoMutedIndicator, {
__source: {
fileName: _jsxFileName,
lineNumber: 113
}
})
)
);
}
}, {
key: '_onClick',
value: function _onClick() {
var _props = this.props,
dispatch = _props.dispatch,
participant = _props.participant;
dispatch((0, _participants.pinParticipant)(participant.pinned ? null : participant.id));
}
}]);
return Thumbnail;
}(_react.Component);
Thumbnail.propTypes = {
_audioTrack: _react2.default.PropTypes.object,
_largeVideo: _react2.default.PropTypes.object,
_videoTrack: _react2.default.PropTypes.object,
dispatch: _react2.default.PropTypes.func,
participant: _react2.default.PropTypes.object
};
function _mapStateToProps(state, ownProps) {
var largeVideo = state['features/large-video'];
var tracks = state['features/base/tracks'];
var id = ownProps.participant.id;
var audioTrack = (0, _tracks.getTrackByMediaTypeAndParticipant)(tracks, _media.MEDIA_TYPE.AUDIO, id);
var videoTrack = (0, _tracks.getTrackByMediaTypeAndParticipant)(tracks, _media.MEDIA_TYPE.VIDEO, id);
return {
_audioTrack: audioTrack,
_largeVideo: largeVideo,
_videoTrack: videoTrack
};
}
exports.default = (0, _reactRedux.connect)(_mapStateToProps)(Thumbnail);
}, 875, null, "jitsi-meet/react/features/filmstrip/components/Thumbnail.js");
__d(/* jitsi-meet/react/features/filmstrip/middleware.js */function(global, require, module, exports) {var _redux = require(505 ); // 505 = ../base/redux
var _jwt = require(877 ); // 877 = ../jwt
var _Filmstrip = require(889 ); // 889 = ../../../modules/UI/videolayout/Filmstrip
var _Filmstrip2 = babelHelpers.interopRequireDefault(_Filmstrip);
var _UIEvents = require(608 ); // 608 = ../../../service/UI/UIEvents
var _UIEvents2 = babelHelpers.interopRequireDefault(_UIEvents);
var _actionTypes = require(703 ); // 703 = ./actionTypes
_redux.MiddlewareRegistry.register(function (_ref) {
var getState = _ref.getState;
return function (next) {
return function (action) {
switch (action.type) {
case _jwt.SET_CALL_OVERLAY_VISIBLE:
if (typeof APP !== 'undefined') {
var oldValue = Boolean(getState()['features/jwt'].callOverlayVisible);
var result = next(action);
var newValue = Boolean(getState()['features/jwt'].callOverlayVisible);
oldValue === newValue || _Filmstrip2.default.filmstrip && _Filmstrip2.default.toggleFilmstrip(!newValue, false);
return result;
}
break;
case _actionTypes.SET_FILMSTRIP_REMOTE_VIDEOS_VISIBLITY:
case _actionTypes.SET_FILMSTRIP_VISIBILITY:
{
var _result = next(action);
typeof APP === 'undefined' || APP.UI.emitEvent(_UIEvents2.default.UPDATED_FILMSTRIP_DISPLAY);
return _result;
}
}
return next(action);
};
};
});
}, 876, null, "jitsi-meet/react/features/filmstrip/middleware.js");
__d(/* jitsi-meet/react/features/jwt/index.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _actions = require(878 ); // 878 = ./actions
Object.keys(_actions).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _actions[key];
}
});
});
var _actionTypes = require(879 ); // 879 = ./actionTypes
Object.keys(_actionTypes).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _actionTypes[key];
}
});
});
var _components = require(880 ); // 880 = ./components
Object.keys(_components).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _components[key];
}
});
});
var _functions = require(883 ); // 883 = ./functions
Object.keys(_functions).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _functions[key];
}
});
});
require(884 ); // 884 = ./middleware
require(888 ); // 888 = ./reducer
}, 877, null, "jitsi-meet/react/features/jwt/index.js");
__d(/* jitsi-meet/react/features/jwt/actions.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
exports.setCallOverlayVisible = setCallOverlayVisible;
exports.setJWT = setJWT;
var _actionTypes = require(879 ); // 879 = ./actionTypes
function setCallOverlayVisible(callOverlayVisible) {
return function (dispatch, getState) {
getState()['features/jwt'].callOverlayVisible === callOverlayVisible || dispatch({
type: _actionTypes.SET_CALL_OVERLAY_VISIBLE,
callOverlayVisible: callOverlayVisible
});
};
}
function setJWT(jwt) {
return {
type: _actionTypes.SET_JWT,
jwt: jwt
};
}
}, 878, null, "jitsi-meet/react/features/jwt/actions.js");
__d(/* jitsi-meet/react/features/jwt/actionTypes.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var SET_CALL_OVERLAY_VISIBLE = exports.SET_CALL_OVERLAY_VISIBLE = Symbol('SET_CALL_OVERLAY_VISIBLE');
var SET_JWT = exports.SET_JWT = Symbol('SET_JWT');
}, 879, null, "jitsi-meet/react/features/jwt/actionTypes.js");
__d(/* jitsi-meet/react/features/jwt/components/index.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _CallOverlay = require(881 ); // 881 = ./CallOverlay
Object.defineProperty(exports, 'CallOverlay', {
enumerable: true,
get: function get() {
return babelHelpers.interopRequireDefault(_CallOverlay).default;
}
});
}, 880, null, "jitsi-meet/react/features/jwt/components/index.js");
__d(/* jitsi-meet/react/features/jwt/components/CallOverlay.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/react/features/jwt/components/CallOverlay.js';
var _react = require(34 ); // 34 = react
var _react2 = babelHelpers.interopRequireDefault(_react);
var _reactRedux = require(548 ); // 548 = react-redux
var _media = require(567 ); // 567 = ../../base/media
var _participants = require(540 ); // 540 = ../../base/participants
var _react3 = require(589 ); // 589 = ../../base/react
var _UIEvents = require(608 ); // 608 = ../../../../service/UI/UIEvents
var _UIEvents2 = babelHelpers.interopRequireDefault(_UIEvents);
var _styles = require(882 ); // 882 = ./styles
var _styles2 = babelHelpers.interopRequireDefault(_styles);
var CallOverlay = function (_Component) {
babelHelpers.inherits(CallOverlay, _Component);
function CallOverlay(props) {
babelHelpers.classCallCheck(this, CallOverlay);
var _this = babelHelpers.possibleConstructorReturn(this, (CallOverlay.__proto__ || Object.getPrototypeOf(CallOverlay)).call(this, props));
_this.state = {
className: undefined,
renderAudio: typeof interfaceConfig !== 'object' || !interfaceConfig.DISABLE_RINGING,
ringing: true
};
_this._onLargeVideoAvatarVisible = _this._onLargeVideoAvatarVisible.bind(_this);
_this._setAudio = _this._setAudio.bind(_this);
if (typeof APP === 'object') {
APP.UI.addListener(_UIEvents2.default.LARGE_VIDEO_AVATAR_VISIBLE, _this._onLargeVideoAvatarVisible);
}
return _this;
}
babelHelpers.createClass(CallOverlay, [{
key: 'componentDidMount',
value: function componentDidMount() {
var _this2 = this;
if (this.state.ringing && !this._ringingTimeout) {
this._ringingTimeout = setTimeout(function () {
_this2._pauseAudio();
_this2._ringingTimeout = undefined;
_this2.setState({
ringing: false
});
}, 30000);
}
this._playAudio();
}
}, {
key: 'componentWillUnmount',
value: function componentWillUnmount() {
this._pauseAudio();
if (this._ringingTimeout) {
clearTimeout(this._ringingTimeout);
this._ringingTimeout = undefined;
}
if (typeof APP === 'object') {
APP.UI.removeListener(_UIEvents2.default.LARGE_VIDEO_AVATAR_VISIBLE, this._onLargeVideoAvatarVisible);
}
}
}, {
key: 'render',
value: function render() {
var _state = this.state,
className = _state.className,
ringing = _state.ringing;
var _props$_callee = this.props._callee,
avatarUrl = _props$_callee.avatarUrl,
avatar = _props$_callee.avatar,
name = _props$_callee.name;
return _react2.default.createElement(
_react3.Container,
babelHelpers.extends({}, this._style('ringing', className), {
id: 'ringOverlay', __source: {
fileName: _jsxFileName,
lineNumber: 164
}
}),
_react2.default.createElement(
_react3.Container,
babelHelpers.extends({}, this._style('ringing__content'), {
__source: {
fileName: _jsxFileName,
lineNumber: 167
}
}),
_react2.default.createElement(
_react3.Text,
babelHelpers.extends({}, this._style('ringing__text'), {
__source: {
fileName: _jsxFileName,
lineNumber: 169
}
}),
ringing ? 'Calling...' : ''
),
_react2.default.createElement(_participants.Avatar, babelHelpers.extends({}, this._style('ringing__avatar'), {
uri: avatarUrl || avatar, __source: {
fileName: _jsxFileName,
lineNumber: 172
}
})),
_react2.default.createElement(
_react3.Container,
babelHelpers.extends({}, this._style('ringing__caller-info'), {
__source: {
fileName: _jsxFileName,
lineNumber: 175
}
}),
_react2.default.createElement(
_react3.Text,
babelHelpers.extends({}, this._style('ringing__text'), {
__source: {
fileName: _jsxFileName,
lineNumber: 177
}
}),
name,
ringing ? '' : ' isn\'t available'
)
)
),
this._renderAudio()
);
}
}, {
key: '_onLargeVideoAvatarVisible',
value: function _onLargeVideoAvatarVisible(largeVideoAvatarVisible) {
this.setState({
className: largeVideoAvatarVisible ? 'solidBG' : undefined
});
}
}, {
key: '_pauseAudio',
value: function _pauseAudio() {
var audio = this._audio;
if (audio) {
audio.pause();
}
if (this._playAudioInterval) {
clearInterval(this._playAudioInterval);
this._playAudioInterval = undefined;
}
}
}, {
key: '_playAudio',
value: function _playAudio() {
var _this3 = this;
if (this._audio) {
this._audio.play();
if (!this._playAudioInterval) {
this._playAudioInterval = setInterval(function () {
return _this3._playAudio();
}, 5000);
}
}
}
}, {
key: '_renderAudio',
value: function _renderAudio() {
if (this.state.renderAudio && this.state.ringing) {
return _react2.default.createElement(_media.Audio, {
ref: this._setAudio,
src: './sounds/ring.ogg', __source: {
fileName: _jsxFileName,
lineNumber: 251
}
});
}
return null;
}
}, {
key: '_setAudio',
value: function _setAudio(audio) {
this._audio = audio;
}
}, {
key: '_style',
value: function _style() {
var className = '';
var style = void 0;
for (var _len = arguments.length, classNames = Array(_len), _key = 0; _key < _len; _key++) {
classNames[_key] = arguments[_key];
}
for (var _iterator = classNames, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[typeof Symbol === 'function' ? Symbol.iterator : '@@iterator']();;) {
var _ref;
if (_isArray) {
if (_i >= _iterator.length) break;
_ref = _iterator[_i++];
} else {
_i = _iterator.next();
if (_i.done) break;
_ref = _i.value;
}
var aClassName = _ref;
if (aClassName) {
if (_styles2.default && aClassName in _styles2.default) {
style = babelHelpers.extends({}, style, _styles2.default[aClassName]);
} else {
className += aClassName;
}
}
}
var props = {};
if (className) {
props.className = className;
}
if (style) {
props.style = style;
}
return props;
}
}]);
return CallOverlay;
}(_react.Component);
CallOverlay.propTypes = {
_callee: _react2.default.PropTypes.object
};
function _mapStateToProps(state) {
return {
_callee: state['features/jwt'].callee
};
}
exports.default = (0, _reactRedux.connect)(_mapStateToProps)(CallOverlay);
}, 881, null, "jitsi-meet/react/features/jwt/components/CallOverlay.js");
__d(/* jitsi-meet/react/features/jwt/components/styles.native.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _styles = require(601 ); // 601 = ../../base/styles
exports.default = (0, _styles.createStyleSheet)({
ringing: {
alignItems: 'center',
backgroundColor: _styles.ColorPalette.black,
bottom: 0,
flex: 0,
flexDirection: 'column',
justifyContent: 'center',
left: 0,
opacity: 0.8,
position: 'absolute',
right: 0,
top: 0
},
'ringing__avatar': {
borderRadius: 50,
flex: 0,
height: 100,
width: 100
},
'ringing__caller-info': {
alignItems: 'center',
flex: 0,
flexDirection: 'row',
justifyContent: 'center'
},
'ringing__content': {
alignItems: 'center',
flex: 0,
flexDirection: 'column',
justifyContent: 'center'
},
'ringing__text': {
color: _styles.ColorPalette.white
}
});
}, 882, null, "jitsi-meet/react/features/jwt/components/styles.native.js");
__d(/* jitsi-meet/react/features/jwt/functions.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
exports.parseJWTFromURLParams = parseJWTFromURLParams;
var _config = require(496 ); // 496 = ../base/config
function parseJWTFromURLParams() {
var url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window.location;
return (0, _config.parseURLParams)(url, true, 'search').jwt;
}
}, 883, null, "jitsi-meet/react/features/jwt/functions.js");
__d(/* jitsi-meet/react/features/jwt/middleware.js */function(global, require, module, exports) {var _jwtDecode = require(885 ); // 885 = jwt-decode
var _jwtDecode2 = babelHelpers.interopRequireDefault(_jwtDecode);
var _conference = require(432 ); // 432 = ../base/conference
var _config = require(496 ); // 496 = ../base/config
var _connection = require(615 ); // 615 = ../base/connection
var _libJitsiMeet = require(434 ); // 434 = ../base/lib-jitsi-meet
var _participants = require(540 ); // 540 = ../base/participants
var _redux = require(505 ); // 505 = ../base/redux
var _actions = require(878 ); // 878 = ./actions
var _actionTypes = require(879 ); // 879 = ./actionTypes
var _functions = require(883 ); // 883 = ./functions
_redux.MiddlewareRegistry.register(function (store) {
return function (next) {
return function (action) {
switch (action.type) {
case _conference.CONFERENCE_FAILED:
case _conference.CONFERENCE_LEFT:
case _conference.CONFERENCE_WILL_LEAVE:
case _libJitsiMeet.LIB_INIT_ERROR:
case _participants.PARTICIPANT_JOINED:
case _conference.SET_ROOM:
return _maybeSetCallOverlayVisible(store, next, action);
case _config.SET_CONFIG:
case _connection.SET_LOCATION_URL:
return _setConfigOrLocationURL(store, next, action);
case _actionTypes.SET_JWT:
return _setJWT(store, next, action);
}
return next(action);
};
};
});
function _maybeSetCallOverlayVisible(_ref, next, action) {
var dispatch = _ref.dispatch,
getState = _ref.getState;
var result = next(action);
var state = getState();
var stateFeaturesJWT = state['features/jwt'];
var callOverlayVisible = void 0;
if (stateFeaturesJWT.callee) {
var _state$featuresBase = state['features/base/conference'],
conference = _state$featuresBase.conference,
leaving = _state$featuresBase.leaving,
room = _state$featuresBase.room;
if (room && (!conference || conference !== leaving)) {
switch (action.type) {
case _conference.CONFERENCE_FAILED:
case _conference.CONFERENCE_LEFT:
case _conference.CONFERENCE_WILL_LEAVE:
case _libJitsiMeet.LIB_INIT_ERROR:
break;
default:
{
var participants = state['features/base/participants'];
callOverlayVisible = Boolean(participants && participants.length === 1 && participants[0].local);
if (callOverlayVisible && stateFeaturesJWT.callOverlayVisible === false) {
callOverlayVisible = false;
}
break;
}
}
}
}
dispatch((0, _actions.setCallOverlayVisible)(callOverlayVisible));
return result;
}
function _setConfigOrLocationURL(_ref2, next, action) {
var dispatch = _ref2.dispatch,
getState = _ref2.getState;
var result = next(action);
var locationURL = getState()['features/base/connection'].locationURL;
var jwt = void 0;
if (locationURL) {
jwt = (0, _functions.parseJWTFromURLParams)(locationURL);
}
dispatch((0, _actions.setJWT)(jwt));
return result;
}
function _setJWT(store, next, action) {
var jwt = action.jwt,
type = action.type,
actionPayload = babelHelpers.objectWithoutProperties(action, ['jwt', 'type']);
if (jwt && !Object.keys(actionPayload).length) {
var enableUserRolesBasedOnToken = store.getState()['features/base/config'].enableUserRolesBasedOnToken;
action.isGuest = !enableUserRolesBasedOnToken;
var jwtPayload = (0, _jwtDecode2.default)(jwt);
if (jwtPayload) {
var context = jwtPayload.context,
iss = jwtPayload.iss;
action.jwt = jwt;
action.issuer = iss;
if (context) {
action.callee = context.callee;
action.caller = context.user;
action.group = context.group;
action.server = context.server;
}
}
}
return _maybeSetCallOverlayVisible(store, next, action);
}
}, 884, null, "jitsi-meet/react/features/jwt/middleware.js");
__d(/* jwt-decode/lib/index.js */function(global, require, module, exports) {'use strict';
var base64_url_decode = require(886 ); // 886 = ./base64_url_decode
function InvalidTokenError(message) {
this.message = message;
}
InvalidTokenError.prototype = new Error();
InvalidTokenError.prototype.name = 'InvalidTokenError';
module.exports = function (token, options) {
if (typeof token !== 'string') {
throw new InvalidTokenError('Invalid token specified');
}
options = options || {};
var pos = options.header === true ? 0 : 1;
try {
return JSON.parse(base64_url_decode(token.split('.')[pos]));
} catch (e) {
throw new InvalidTokenError('Invalid token specified: ' + e.message);
}
};
module.exports.InvalidTokenError = InvalidTokenError;
}, 885, null, "jwt-decode/lib/index.js");
__d(/* jwt-decode/lib/base64_url_decode.js */function(global, require, module, exports) {var atob = require(887 ); // 887 = ./atob
function b64DecodeUnicode(str) {
return decodeURIComponent(atob(str).replace(/(.)/g, function (m, p) {
var code = p.charCodeAt(0).toString(16).toUpperCase();
if (code.length < 2) {
code = '0' + code;
}
return '%' + code;
}));
}
module.exports = function (str) {
var output = str.replace(/-/g, "+").replace(/_/g, "/");
switch (output.length % 4) {
case 0:
break;
case 2:
output += "==";
break;
case 3:
output += "=";
break;
default:
throw "Illegal base64url string!";
}
try {
return b64DecodeUnicode(output);
} catch (err) {
return atob(output);
}
};
}, 886, null, "jwt-decode/lib/base64_url_decode.js");
__d(/* jwt-decode/lib/atob.js */function(global, require, module, exports) {
var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
function InvalidCharacterError(message) {
this.message = message;
}
InvalidCharacterError.prototype = new Error();
InvalidCharacterError.prototype.name = 'InvalidCharacterError';
function polyfill(input) {
var str = String(input).replace(/=+$/, '');
if (str.length % 4 == 1) {
throw new InvalidCharacterError("'atob' failed: The string to be decoded is not correctly encoded.");
}
for (var bc = 0, bs, buffer, idx = 0, output = ''; buffer = str.charAt(idx++); ~buffer && (bs = bc % 4 ? bs * 64 + buffer : buffer, bc++ % 4) ? output += String.fromCharCode(255 & bs >> (-2 * bc & 6)) : 0) {
buffer = chars.indexOf(buffer);
}
return output;
}
module.exports = typeof window !== 'undefined' && window.atob && window.atob.bind(window) || polyfill;
}, 887, null, "jwt-decode/lib/atob.js");
__d(/* jitsi-meet/react/features/jwt/reducer.js */function(global, require, module, exports) {var _redux = require(505 ); // 505 = ../base/redux
var _actionTypes = require(879 ); // 879 = ./actionTypes
var _INITIAL_STATE = {
callOverlayVisible: undefined,
isGuest: true
};
_redux.ReducerRegistry.register('features/jwt', function () {
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _INITIAL_STATE;
var action = arguments[1];
switch (action.type) {
case _actionTypes.SET_CALL_OVERLAY_VISIBLE:
return (0, _redux.set)(state, 'callOverlayVisible', action.callOverlayVisible);
case _actionTypes.SET_JWT:
{
var type = action.type,
payload = babelHelpers.objectWithoutProperties(action, ['type']);
var nextState = babelHelpers.extends({}, _INITIAL_STATE, payload);
return (0, _redux.equals)(state, nextState) ? state : nextState;
}
}
return state;
});
}, 888, null, "jitsi-meet/react/features/jwt/reducer.js");
__d(/* jitsi-meet/modules/UI/videolayout/Filmstrip.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _filmstrip = require(701 ); // 701 = ../../../react/features/filmstrip
var _UIEvents = require(608 ); // 608 = ../../../service/UI/UIEvents
var _UIEvents2 = babelHelpers.interopRequireDefault(_UIEvents);
var _UIUtil = require(890 ); // 890 = ../util/UIUtil
var _UIUtil2 = babelHelpers.interopRequireDefault(_UIUtil);
var Filmstrip = {
init: function init(eventEmitter) {
this.iconMenuDownClassName = 'icon-menu-down';
this.iconMenuUpClassName = 'icon-menu-up';
this.filmstripContainerClassName = 'filmstrip';
this.filmstrip = $('#remoteVideos');
this.filmstripRemoteVideos = $('#filmstripRemoteVideosContainer');
this.eventEmitter = eventEmitter;
if (!interfaceConfig.filmStripOnly) {
this._initFilmstripToolbar();
this.registerListeners();
}
},
setRemoteVideoVisibility: function setRemoteVideoVisibility(shouldShow) {
if (config.disable1On1Mode) {
return;
}
APP.store.dispatch((0, _filmstrip.setFilmstripRemoteVideosVisibility)(shouldShow));
this.filmstripRemoteVideos.toggleClass('hide-videos', !shouldShow);
},
_initFilmstripToolbar: function _initFilmstripToolbar() {
var toolbarContainerHTML = this._generateToolbarHTML();
var className = this.filmstripContainerClassName;
var container = document.querySelector("." + className);
_UIUtil2.default.prependChild(container, toolbarContainerHTML);
var iconSelector = '#toggleFilmstripButton i';
this.toggleFilmstripIcon = document.querySelector(iconSelector);
},
_generateToolbarHTML: function _generateToolbarHTML() {
var container = document.createElement('div');
var isVisible = this.isFilmstripVisible();
container.className = 'filmstrip__toolbar';
container.innerHTML = "\n <button id=\"toggleFilmstripButton\">\n <i class=\"icon-menu-" + (isVisible ? 'down' : 'up') + "\">\n </i>\n </button>\n ";
return container;
},
registerListeners: function registerListeners() {
var _this = this;
$('#toggleFilmstripButton').on('click', function () {
return _this.eventEmitter.emit(_UIEvents2.default.TOGGLE_FILMSTRIP);
});
this._registerToggleFilmstripShortcut();
},
_registerToggleFilmstripShortcut: function _registerToggleFilmstripShortcut() {
var _this2 = this;
var shortcut = 'F';
var shortcutAttr = 'filmstripPopover';
var description = 'keyboardShortcuts.toggleFilmstrip';
var handler = function handler() {
return _this2.eventEmitter.emit(_UIEvents2.default.TOGGLE_FILMSTRIP);
};
APP.keyboardshortcut.registerShortcut(shortcut, shortcutAttr, handler, description);
},
showMenuDownIcon: function showMenuDownIcon() {
var icon = this.toggleFilmstripIcon;
if (icon) {
icon.classList.add(this.iconMenuDownClassName);
icon.classList.remove(this.iconMenuUpClassName);
}
},
showMenuUpIcon: function showMenuUpIcon() {
var icon = this.toggleFilmstripIcon;
if (icon) {
icon.classList.add(this.iconMenuUpClassName);
icon.classList.remove(this.iconMenuDownClassName);
}
},
toggleFilmstrip: function toggleFilmstrip(visible) {
var sendAnalytics = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
var isVisibleDefined = typeof visible === 'boolean';
if (!isVisibleDefined) {
visible = this.isFilmstripVisible();
} else if (this.isFilmstripVisible() === visible) {
return;
}
if (sendAnalytics) {
JitsiMeetJS.analytics.sendEvent('toolbar.filmstrip.toggled');
}
this.filmstrip.toggleClass("hidden");
if (visible) {
this.showMenuUpIcon();
} else {
this.showMenuDownIcon();
}
var eventEmitter = this.eventEmitter;
var isFilmstripVisible = this.isFilmstripVisible();
if (eventEmitter) {
eventEmitter.emit(_UIEvents2.default.TOGGLED_FILMSTRIP, this.isFilmstripVisible());
}
APP.store.dispatch((0, _filmstrip.setFilmstripVisibility)(isFilmstripVisible));
},
isFilmstripVisible: function isFilmstripVisible() {
return !this.filmstrip.hasClass('hidden');
},
setFilmstripOnly: function setFilmstripOnly() {
this.filmstrip.addClass('filmstrip__videos-filmstripOnly');
},
getFilmstripHeight: function getFilmstripHeight() {
if (this.isFilmstripVisible() && !interfaceConfig.VERTICAL_FILMSTRIP) {
return $("." + this.filmstripContainerClassName).outerHeight();
} else {
return 0;
}
},
getFilmstripWidth: function getFilmstripWidth() {
return this.filmstrip.innerWidth() - parseInt(this.filmstrip.css('paddingLeft'), 10) - parseInt(this.filmstrip.css('paddingRight'), 10);
},
calculateThumbnailSize: function calculateThumbnailSize() {
var availableSizes = this.calculateAvailableSize();
var width = availableSizes.availableWidth;
var height = availableSizes.availableHeight;
return this.calculateThumbnailSizeFromAvailable(width, height);
},
calculateAvailableSize: function calculateAvailableSize() {
var availableHeight = interfaceConfig.FILM_STRIP_MAX_HEIGHT;
var thumbs = this.getThumbs(true);
var numvids = thumbs.remoteThumbs.length;
var localVideoContainer = $("#localVideoContainer");
var videoAreaAvailableWidth = _UIUtil2.default.getAvailableVideoWidth() - this._getFilmstripExtraPanelsWidth() - _UIUtil2.default.parseCssInt(this.filmstrip.css('right'), 10) - _UIUtil2.default.parseCssInt(this.filmstrip.css('paddingLeft'), 10) - _UIUtil2.default.parseCssInt(this.filmstrip.css('paddingRight'), 10) - _UIUtil2.default.parseCssInt(this.filmstrip.css('borderLeftWidth'), 10) - _UIUtil2.default.parseCssInt(this.filmstrip.css('borderRightWidth'), 10) - 5;
var availableWidth = videoAreaAvailableWidth;
if (thumbs.localThumb) {
availableWidth = Math.floor(videoAreaAvailableWidth - (_UIUtil2.default.parseCssInt(localVideoContainer.css('borderLeftWidth'), 10) + _UIUtil2.default.parseCssInt(localVideoContainer.css('borderRightWidth'), 10) + _UIUtil2.default.parseCssInt(localVideoContainer.css('paddingLeft'), 10) + _UIUtil2.default.parseCssInt(localVideoContainer.css('paddingRight'), 10) + _UIUtil2.default.parseCssInt(localVideoContainer.css('marginLeft'), 10) + _UIUtil2.default.parseCssInt(localVideoContainer.css('marginRight'), 10)));
}
if (numvids && !interfaceConfig.VERTICAL_FILMSTRIP) {
var remoteVideoContainer = thumbs.remoteThumbs.eq(0);
availableWidth = Math.floor(videoAreaAvailableWidth - numvids * (_UIUtil2.default.parseCssInt(remoteVideoContainer.css('borderLeftWidth'), 10) + _UIUtil2.default.parseCssInt(remoteVideoContainer.css('borderRightWidth'), 10) + _UIUtil2.default.parseCssInt(remoteVideoContainer.css('paddingLeft'), 10) + _UIUtil2.default.parseCssInt(remoteVideoContainer.css('paddingRight'), 10) + _UIUtil2.default.parseCssInt(remoteVideoContainer.css('marginLeft'), 10) + _UIUtil2.default.parseCssInt(remoteVideoContainer.css('marginRight'), 10)));
}
var maxHeight = Math.min(interfaceConfig.FILM_STRIP_MAX_HEIGHT || 120, availableHeight);
availableHeight = Math.min(maxHeight, window.innerHeight - 18);
return { availableWidth: availableWidth, availableHeight: availableHeight };
},
_getFilmstripExtraPanelsWidth: function _getFilmstripExtraPanelsWidth() {
var className = this.filmstripContainerClassName;
var width = 0;
$("." + className).children().each(function () {
if (this.id !== 'remoteVideos') {
width += $(this).outerWidth();
}
});
return width;
},
calculateThumbnailSizeFromAvailable: function calculateThumbnailSizeFromAvailable(availableWidth, availableHeight) {
var remoteThumbsInRow = interfaceConfig.VERTICAL_FILMSTRIP ? 0 : this.getThumbs(true).remoteThumbs.length;
var remoteLocalWidthRatio = interfaceConfig.REMOTE_THUMBNAIL_RATIO / interfaceConfig.LOCAL_THUMBNAIL_RATIO;
var lW = Math.min(availableWidth / (remoteLocalWidthRatio * remoteThumbsInRow + 1), availableHeight * interfaceConfig.LOCAL_THUMBNAIL_RATIO);
var h = lW / interfaceConfig.LOCAL_THUMBNAIL_RATIO;
var remoteVideoWidth = lW * remoteLocalWidthRatio;
var localVideo = void 0;
if (interfaceConfig.VERTICAL_FILMSTRIP) {
localVideo = {
thumbWidth: remoteVideoWidth,
thumbHeight: h * remoteLocalWidthRatio
};
} else {
localVideo = {
thumbWidth: lW,
thumbHeight: h
};
}
return {
localVideo: localVideo,
remoteVideo: {
thumbWidth: remoteVideoWidth,
thumbHeight: h
}
};
},
resizeThumbnails: function resizeThumbnails(local, remote) {
var _this3 = this;
var animate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
var forceUpdate = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
return new Promise(function (resolve) {
var thumbs = _this3.getThumbs(!forceUpdate);
var promises = [];
if (thumbs.localThumb) {
promises.push(new Promise(function (resolve) {
thumbs.localThumb.animate({
height: local.thumbHeight,
width: local.thumbWidth
}, _this3._getAnimateOptions(animate, resolve));
}));
}
if (thumbs.remoteThumbs) {
promises.push(new Promise(function (resolve) {
thumbs.remoteThumbs.animate({
height: remote.thumbHeight,
width: remote.thumbWidth
}, _this3._getAnimateOptions(animate, resolve));
}));
}
promises.push(new Promise(function (resolve) {
if (interfaceConfig.VERTICAL_FILMSTRIP) {
resolve();
} else {
_this3.filmstrip.animate({
height: remote.thumbHeight + 2
}, _this3._getAnimateOptions(animate, resolve));
}
}));
promises.push(new Promise(function () {
var _getThumbs = _this3.getThumbs(),
localThumb = _getThumbs.localThumb;
var height = localThumb.height();
var fontSize = _UIUtil2.default.getIndicatorFontSize(height);
_this3.filmstrip.find('.indicator').animate({
fontSize: fontSize
}, _this3._getAnimateOptions(animate, resolve));
}));
if (!animate) {
resolve();
}
Promise.all(promises).then(resolve);
});
},
_getAnimateOptions: function _getAnimateOptions(animate) {
var cb = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : $.noop;
return {
queue: false,
duration: animate ? 500 : 0,
complete: cb
};
},
getThumbs: function getThumbs() {
var only_visible = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
var selector = 'span';
if (only_visible) {
selector += ':visible';
}
var localThumb = $("#localVideoContainer");
var remoteThumbs = this.filmstripRemoteVideos.children(selector);
if (localThumb.hasClass("hidden")) {
return { remoteThumbs: remoteThumbs };
} else {
return { remoteThumbs: remoteThumbs, localThumb: localThumb };
}
}
};
exports.default = Filmstrip;
}, 889, null, "jitsi-meet/modules/UI/videolayout/Filmstrip.js");
__d(/* jitsi-meet/modules/UI/util/UIUtil.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _keyboardshortcut = require(891 ); // 891 = ../../keyboardshortcut/keyboardshortcut
var _keyboardshortcut2 = babelHelpers.interopRequireDefault(_keyboardshortcut);
var TOOLTIP_POSITIONS = {
'bottom': 'n',
'bottom-left': 'ne',
'bottom-right': 'nw',
'left': 'e',
'right': 'w',
'top': 's',
'top-left': 'se',
'top-right': 'sw'
};
var SHOW_CLASSES = {
'block': 'show',
'inline': 'show-inline',
'list-item': 'show-list-item'
};
var ThumbnailSizes = {
SMALL: 60,
MEDIUM: 80
};
var IndicatorFontSizes = {
SMALL: 5,
MEDIUM: 6,
NORMAL: 8
};
var UIUtil = {
getAvailableVideoWidth: function getAvailableVideoWidth() {
return window.innerWidth;
},
buttonClick: function buttonClick(id, classname) {
$("#" + id).toggleClass(classname);
},
getTextWidth: function getTextWidth(el) {
return el.clientWidth + 1;
},
getTextHeight: function getTextHeight(el) {
return el.clientHeight + 1;
},
playSoundNotification: function playSoundNotification(id) {
document.getElementById(id).play();
},
escapeHtml: function escapeHtml(unsafeText) {
return $('<div/>').text(unsafeText).html();
},
unescapeHtml: function unescapeHtml(safe) {
return $('<div />').html(safe).text();
},
imageToGrayScale: function imageToGrayScale(canvas) {
var context = canvas.getContext('2d');
var imgData = context.getImageData(0, 0, canvas.width, canvas.height);
var pixels = imgData.data;
for (var i = 0, n = pixels.length; i < n; i += 4) {
var grayscale = pixels[i] * 0.3 + pixels[i + 1] * 0.59 + pixels[i + 2] * 0.11;
pixels[i] = grayscale;
pixels[i + 1] = grayscale;
pixels[i + 2] = grayscale;
}
context.putImageData(imgData, 0, 0);
},
activateTooltips: function activateTooltips() {
AJS.$('[data-tooltip]').tooltip({
gravity: function gravity() {
return this.getAttribute('data-tooltip');
},
title: function title() {
return this.getAttribute('content');
},
html: true,
hoverable: false,
live: true });
},
setTooltip: function setTooltip(element, key, position) {
if (element) {
var selector = element.jquery ? element : $(element);
selector.attr('data-tooltip', TOOLTIP_POSITIONS[position]);
selector.attr('data-i18n', '[content]' + key);
APP.translation.translateElement(selector);
}
},
setTooltipText: function setTooltipText(element, text, position) {
if (element) {
UIUtil.removeTooltip(element);
element.setAttribute('data-tooltip', TOOLTIP_POSITIONS[position]);
element.setAttribute('content', text);
}
},
removeTooltip: function removeTooltip(element) {
element.removeAttribute('data-tooltip', '');
element.removeAttribute('data-i18n', '');
element.removeAttribute('content', '');
},
_getTooltipText: function _getTooltipText(element) {
var title = element.getAttribute('content');
var shortcut = element.getAttribute('shortcut');
if (shortcut) {
var shortcutString = _keyboardshortcut2.default.getShortcutTooltip(shortcut);
title += ' ' + shortcutString;
}
return title;
},
prependChild: function prependChild(container, newChild) {
var firstChild = container.childNodes[0];
if (firstChild) {
container.insertBefore(newChild, firstChild);
} else {
container.appendChild(newChild);
}
},
isButtonEnabled: function isButtonEnabled(name) {
return interfaceConfig.TOOLBAR_BUTTONS.indexOf(name) !== -1 || interfaceConfig.MAIN_TOOLBAR_BUTTONS.indexOf(name) !== -1;
},
isSettingEnabled: function isSettingEnabled(name) {
return interfaceConfig.SETTINGS_SECTIONS.indexOf(name) !== -1;
},
isAuthenticationEnabled: function isAuthenticationEnabled() {
return interfaceConfig.AUTHENTICATION_ENABLE;
},
setVisible: function setVisible(id, visible) {
var element = void 0;
if (id instanceof HTMLElement) {
element = id;
} else {
element = document.getElementById(id);
}
if (!element) {
return;
}
if (!visible) element.classList.add('hide');else if (element.classList.contains('hide')) {
element.classList.remove('hide');
}
var type = this._getElementDefaultDisplay(element.tagName);
var className = SHOW_CLASSES[type];
if (visible) {
element.classList.add(className);
} else if (element.classList.contains(className)) element.classList.remove(className);
},
_getElementDefaultDisplay: function _getElementDefaultDisplay(tag) {
var tempElement = document.createElement(tag);
document.body.appendChild(tempElement);
var style = window.getComputedStyle(tempElement).display;
document.body.removeChild(tempElement);
return style;
},
setVisibleBySelector: function setVisibleBySelector(jquerySelector, isVisible) {
if (jquerySelector && jquerySelector.length > 0) {
jquerySelector.css("visibility", isVisible ? "visible" : "hidden");
}
},
hideDisabledButtons: function hideDisabledButtons(mappings) {
var selector = Object.keys(mappings).map(function (buttonName) {
return UIUtil.isButtonEnabled(buttonName) ? null : "#" + mappings[buttonName].id;
}).filter(function (item) {
return item;
}).join(',');
$(selector).hide();
},
redirect: function redirect(url) {
window.location.href = url;
},
isFullScreen: function isFullScreen() {
return document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement || document.msFullscreenElement;
},
exitFullScreen: function exitFullScreen() {
if (document.exitFullscreen) {
document.exitFullscreen();
} else if (document.msExitFullscreen) {
document.msExitFullscreen();
} else if (document.mozCancelFullScreen) {
document.mozCancelFullScreen();
} else if (document.webkitExitFullscreen) {
document.webkitExitFullscreen();
}
},
enterFullScreen: function enterFullScreen() {
if (document.documentElement.requestFullscreen) {
document.documentElement.requestFullscreen();
} else if (document.documentElement.msRequestFullscreen) {
document.documentElement.msRequestFullscreen();
} else if (document.documentElement.mozRequestFullScreen) {
document.documentElement.mozRequestFullScreen();
} else if (document.documentElement.webkitRequestFullscreen) {
document.documentElement.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);
}
},
attrsToString: function attrsToString(attrs) {
return Object.keys(attrs).map(function (key) {
return ' ' + key + '="' + attrs[key] + '"';
}).join(' ');
},
isVisible: function isVisible(el) {
return el.offsetParent !== null;
},
animateShowElement: function animateShowElement(selector, show, hideDelay) {
if (show) {
if (!selector.is(":visible")) selector.css("display", "inline-block");
selector.fadeIn(300, function () {
selector.css({ opacity: 1 });
});
if (hideDelay && hideDelay > 0) setTimeout(function () {
selector.fadeOut(300, function () {
selector.css({ opacity: 0 });
});
}, hideDelay);
} else {
selector.fadeOut(300, function () {
selector.css({ opacity: 0 });
});
}
},
parseCssInt: function parseCssInt(cssValue) {
return parseInt(cssValue) || 0;
},
setLinkHref: function setLinkHref(aLinkElement, link) {
if (link) {
aLinkElement.attr('href', link);
} else {
aLinkElement.css({
"pointer-events": "none",
"cursor": "default"
});
}
},
getIndicatorFontSize: function getIndicatorFontSize(thumbnailHeight) {
var height = typeof thumbnailHeight === 'undefined' ? $('#localVideoContainer').height() : thumbnailHeight;
var SMALL = ThumbnailSizes.SMALL,
MEDIUM = ThumbnailSizes.MEDIUM;
var fontSize = IndicatorFontSizes.NORMAL;
if (height <= SMALL) {
fontSize = IndicatorFontSizes.SMALL;
} else if (height > SMALL && height <= MEDIUM) {
fontSize = IndicatorFontSizes.MEDIUM;
}
return fontSize;
}
};
exports.default = UIUtil;
}, 890, null, "jitsi-meet/modules/UI/util/UIUtil.js");
__d(/* jitsi-meet/modules/keyboardshortcut/keyboardshortcut.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _dialog = require(623 ); // 623 = ../../react/features/base/dialog
var _speakerStats = require(892 ); // 892 = ../../react/features/speaker-stats
var keyboardShortcutDialog = null;
function initGlobalShortcuts() {
KeyboardShortcut.registerShortcut("ESCAPE", null, function () {
showKeyboardShortcutsPanel(false);
});
KeyboardShortcut.registerShortcut("?", null, function () {
JitsiMeetJS.analytics.sendEvent("shortcut.shortcut.help");
showKeyboardShortcutsPanel(true);
}, "keyboardShortcuts.toggleShortcuts");
KeyboardShortcut.registerShortcut(" ", null, function () {
JitsiMeetJS.analytics.sendEvent("shortcut.talk.clicked");
APP.conference.muteAudio(true);
});
KeyboardShortcut._addShortcutToHelp("SPACE", "keyboardShortcuts.pushToTalk");
if (!interfaceConfig.filmStripOnly) {
KeyboardShortcut.registerShortcut("T", null, function () {
JitsiMeetJS.analytics.sendEvent("shortcut.speakerStats.clicked");
APP.store.dispatch((0, _dialog.toggleDialog)(_speakerStats.SpeakerStats, {
conference: APP.conference
}));
}, "keyboardShortcuts.showSpeakerStats");
}
KeyboardShortcut._addShortcutToHelp("0", "keyboardShortcuts.focusLocal");
KeyboardShortcut._addShortcutToHelp("1-9", "keyboardShortcuts.focusRemote");
}
function showKeyboardShortcutsPanel(show) {
if (show && !APP.UI.messageHandler.isDialogOpened() && keyboardShortcutDialog === null) {
var msg = $('#keyboard-shortcuts').html();
var buttons = { Close: true };
keyboardShortcutDialog = APP.UI.messageHandler.openDialog('keyboardShortcuts.keyboardShortcuts', msg, true, buttons);
} else if (keyboardShortcutDialog !== null) {
keyboardShortcutDialog.close();
keyboardShortcutDialog = null;
}
}
var _shortcuts = {};
var enabled = true;
var KeyboardShortcut = {
init: function init() {
initGlobalShortcuts();
var self = this;
window.onkeyup = function (e) {
if (!enabled) {
return;
}
var key = self._getKeyboardKey(e).toUpperCase();
var num = parseInt(key, 10);
if (!($(":focus").is("input[type=text]") || $(":focus").is("input[type=password]") || $(":focus").is("textarea"))) {
if (_shortcuts.hasOwnProperty(key)) {
_shortcuts[key].function(e);
} else if (!isNaN(num) && num >= 0 && num <= 9) {
APP.UI.clickOnVideo(num);
}
} else if (key === "ESCAPE" && $('#smileysContainer').is(':visible')) {
APP.UI.toggleSmileys();
}
};
window.onkeydown = function (e) {
if (!enabled) {
return;
}
if (!($(":focus").is("input[type=text]") || $(":focus").is("input[type=password]") || $(":focus").is("textarea"))) {
var key = self._getKeyboardKey(e).toUpperCase();
if (key === " ") {
if (APP.conference.isLocalAudioMuted()) APP.conference.muteAudio(false);
}
}
};
},
enable: function enable(value) {
enabled = value;
},
registerShortcut: function registerShortcut(shortcutChar, shortcutAttr, exec, helpDescription) {
_shortcuts[shortcutChar] = {
character: shortcutChar,
shortcutAttr: shortcutAttr,
function: exec
};
if (helpDescription) this._addShortcutToHelp(shortcutChar, helpDescription);
},
unregisterShortcut: function unregisterShortcut(shortcutChar) {
_shortcuts.remove(shortcutChar);
this._removeShortcutFromHelp(shortcutChar);
},
getShortcutTooltip: function getShortcutTooltip(shortcutAttr) {
if (typeof shortcutAttr === "string" && shortcutAttr.length > 0) {
for (var key in _shortcuts) {
if (_shortcuts.hasOwnProperty(key) && _shortcuts[key].shortcutAttr && _shortcuts[key].shortcutAttr === shortcutAttr) {
return " (" + _shortcuts[key].character + ")";
}
}
}
return "";
},
_getKeyboardKey: function _getKeyboardKey(e) {
if (typeof e.key === "string") {
return e.key;
}
if (e.type === "keypress" && (e.which >= 32 && e.which <= 126 || e.which >= 160 && e.which <= 255)) {
return String.fromCharCode(e.which);
}
switch (e.which) {
case 27:
return "Escape";
case 191:
return e.shiftKey ? "?" : "/";
}
if (e.shiftKey || e.type === "keypress") {
return String.fromCharCode(e.which);
} else {
return String.fromCharCode(e.which).toLowerCase();
}
},
_addShortcutToHelp: function _addShortcutToHelp(shortcutChar, shortcutDescriptionKey) {
var listElement = document.createElement("li");
var itemClass = 'shortcuts-list__item';
listElement.className = itemClass;
listElement.id = shortcutChar;
var spanElement = document.createElement("span");
spanElement.className = "item-action";
var kbdElement = document.createElement("kbd");
var classes = 'aui-label regular-key';
kbdElement.className = classes;
kbdElement.innerHTML = shortcutChar;
spanElement.appendChild(kbdElement);
var descriptionElement = document.createElement("span");
var descriptionClass = "shortcuts-list__description";
descriptionElement.className = descriptionClass;
descriptionElement.setAttribute("data-i18n", shortcutDescriptionKey);
APP.translation.translateElement($(descriptionElement));
listElement.appendChild(spanElement);
listElement.appendChild(descriptionElement);
var parentListElement = document.getElementById("keyboard-shortcuts-list");
if (parentListElement) parentListElement.appendChild(listElement);
},
_removeShortcutFromHelp: function _removeShortcutFromHelp(shortcutChar) {
var parentListElement = document.getElementById("keyboard-shortcuts-list");
var shortcutElement = document.getElementById(shortcutChar);
if (shortcutElement) parentListElement.removeChild(shortcutElement);
}
};
exports.default = KeyboardShortcut;
}, 891, null, "jitsi-meet/modules/keyboardshortcut/keyboardshortcut.js");
__d(/* jitsi-meet/react/features/speaker-stats/index.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _components = require(893 ); // 893 = ./components
Object.keys(_components).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _components[key];
}
});
});
}, 892, null, "jitsi-meet/react/features/speaker-stats/index.js");
__d(/* jitsi-meet/react/features/speaker-stats/components/index.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _SpeakerStats = require(894 ); // 894 = ./SpeakerStats
Object.defineProperty(exports, 'SpeakerStats', {
enumerable: true,
get: function get() {
return babelHelpers.interopRequireDefault(_SpeakerStats).default;
}
});
}, 893, null, "jitsi-meet/react/features/speaker-stats/components/index.js");
__d(/* jitsi-meet/react/features/speaker-stats/components/SpeakerStats.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/react/features/speaker-stats/components/SpeakerStats.js';
var _react = require(34 ); // 34 = react
var _react2 = babelHelpers.interopRequireDefault(_react);
var _dialog = require(623 ); // 623 = ../../base/dialog
var _i18n = require(632 ); // 632 = ../../base/i18n
var _SpeakerStatsItem = require(895 ); // 895 = ./SpeakerStatsItem
var _SpeakerStatsItem2 = babelHelpers.interopRequireDefault(_SpeakerStatsItem);
var _SpeakerStatsLabels = require(897 ); // 897 = ./SpeakerStatsLabels
var _SpeakerStatsLabels2 = babelHelpers.interopRequireDefault(_SpeakerStatsLabels);
var SpeakerStats = function (_Component) {
babelHelpers.inherits(SpeakerStats, _Component);
function SpeakerStats(props) {
babelHelpers.classCallCheck(this, SpeakerStats);
var _this = babelHelpers.possibleConstructorReturn(this, (SpeakerStats.__proto__ || Object.getPrototypeOf(SpeakerStats)).call(this, props));
_this.state = {
stats: {}
};
_this._updateInterval = null;
_this._updateStats = _this._updateStats.bind(_this);
return _this;
}
babelHelpers.createClass(SpeakerStats, [{
key: 'componentWillMount',
value: function componentWillMount() {
this._updateStats();
this._updateInterval = setInterval(this._updateStats, 1000);
}
}, {
key: 'componentWillUnmount',
value: function componentWillUnmount() {
clearInterval(this._updateInterval);
}
}, {
key: 'render',
value: function render() {
var _this2 = this;
var userIds = Object.keys(this.state.stats);
var items = userIds.map(function (userId) {
return _this2._createStatsItem(userId);
});
return _react2.default.createElement(
_dialog.Dialog,
{
cancelTitleKey: 'dialog.close',
submitDisabled: true,
titleKey: 'speakerStats.speakerStats', __source: {
fileName: _jsxFileName,
lineNumber: 82
}
},
_react2.default.createElement(
'div',
{ className: 'speaker-stats', __source: {
fileName: _jsxFileName,
lineNumber: 86
}
},
_react2.default.createElement(_SpeakerStatsLabels2.default, {
__source: {
fileName: _jsxFileName,
lineNumber: 87
}
}),
items
)
);
}
}, {
key: '_updateStats',
value: function _updateStats() {
var stats = this.props.conference.getSpeakerStats();
this.setState({ stats: stats });
}
}, {
key: '_createStatsItem',
value: function _createStatsItem(userId) {
var statsModel = this.state.stats[userId];
if (!statsModel) {
return null;
}
var isDominantSpeaker = statsModel.isDominantSpeaker();
var dominantSpeakerTime = statsModel.getTotalDominantSpeakerTime();
var hasLeft = statsModel.hasLeft();
var displayName = '';
if (statsModel.isLocalStats()) {
var t = this.props.t;
var meString = t('me');
displayName = APP.settings.getDisplayName();
displayName = displayName ? displayName + ' (' + meString + ')' : meString;
} else {
displayName = this.state.stats[userId].getDisplayName() || interfaceConfig.DEFAULT_REMOTE_DISPLAY_NAME;
}
return _react2.default.createElement(_SpeakerStatsItem2.default, {
displayName: displayName,
dominantSpeakerTime: dominantSpeakerTime,
hasLeft: hasLeft,
isDominantSpeaker: isDominantSpeaker,
key: userId, __source: {
fileName: _jsxFileName,
lineNumber: 140
}
});
}
}]);
return SpeakerStats;
}(_react.Component);
SpeakerStats.propTypes = {
conference: _react2.default.PropTypes.object,
t: _react2.default.PropTypes.func
};
exports.default = (0, _i18n.translate)(SpeakerStats);
}, 894, null, "jitsi-meet/react/features/speaker-stats/components/SpeakerStats.js");
__d(/* jitsi-meet/react/features/speaker-stats/components/SpeakerStatsItem.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/react/features/speaker-stats/components/SpeakerStatsItem.js';
var _react = require(34 ); // 34 = react
var _react2 = babelHelpers.interopRequireDefault(_react);
var _TimeElapsed = require(896 ); // 896 = ./TimeElapsed
var _TimeElapsed2 = babelHelpers.interopRequireDefault(_TimeElapsed);
var SpeakerStatsItem = function (_Component) {
babelHelpers.inherits(SpeakerStatsItem, _Component);
function SpeakerStatsItem() {
babelHelpers.classCallCheck(this, SpeakerStatsItem);
return babelHelpers.possibleConstructorReturn(this, (SpeakerStatsItem.__proto__ || Object.getPrototypeOf(SpeakerStatsItem)).apply(this, arguments));
}
babelHelpers.createClass(SpeakerStatsItem, [{
key: 'render',
value: function render() {
var hasLeftClass = this.props.hasLeft ? 'status-user-left' : '';
var rowDisplayClass = 'speaker-stats-item ' + hasLeftClass;
var dotClass = this.props.isDominantSpeaker ? 'status-active' : 'status-inactive';
var speakerStatusClass = 'speaker-stats-item__status-dot ' + dotClass;
return _react2.default.createElement(
'div',
{ className: rowDisplayClass, __source: {
fileName: _jsxFileName,
lineNumber: 53
}
},
_react2.default.createElement(
'div',
{ className: 'speaker-stats-item__status', __source: {
fileName: _jsxFileName,
lineNumber: 54
}
},
_react2.default.createElement('span', { className: speakerStatusClass, __source: {
fileName: _jsxFileName,
lineNumber: 55
}
})
),
_react2.default.createElement(
'div',
{ className: 'speaker-stats-item__name', __source: {
fileName: _jsxFileName,
lineNumber: 57
}
},
this.props.displayName
),
_react2.default.createElement(
'div',
{ className: 'speaker-stats-item__time', __source: {
fileName: _jsxFileName,
lineNumber: 60
}
},
_react2.default.createElement(_TimeElapsed2.default, {
time: this.props.dominantSpeakerTime, __source: {
fileName: _jsxFileName,
lineNumber: 61
}
})
)
);
}
}]);
return SpeakerStatsItem;
}(_react.Component);
SpeakerStatsItem.propTypes = {
displayName: _react2.default.PropTypes.string,
dominantSpeakerTime: _react2.default.PropTypes.number,
hasLeft: _react2.default.PropTypes.bool,
isDominantSpeaker: _react2.default.PropTypes.bool
};
exports.default = SpeakerStatsItem;
}, 895, null, "jitsi-meet/react/features/speaker-stats/components/SpeakerStatsItem.js");
__d(/* jitsi-meet/react/features/speaker-stats/components/TimeElapsed.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/react/features/speaker-stats/components/TimeElapsed.js';
var _react = require(34 ); // 34 = react
var _react2 = babelHelpers.interopRequireDefault(_react);
var _i18n = require(632 ); // 632 = ../../base/i18n
var TimeElapsed = function (_Component) {
babelHelpers.inherits(TimeElapsed, _Component);
function TimeElapsed() {
babelHelpers.classCallCheck(this, TimeElapsed);
return babelHelpers.possibleConstructorReturn(this, (TimeElapsed.__proto__ || Object.getPrototypeOf(TimeElapsed)).apply(this, arguments));
}
babelHelpers.createClass(TimeElapsed, [{
key: 'render',
value: function render() {
var time = this.props.time;
var hours = _getHoursCount(time);
var minutes = _getMinutesCount(time);
var seconds = _getSecondsCount(time);
var timeElapsed = [];
if (hours) {
var hourPassed = this._createTimeDisplay(hours, 'speakerStats.hours', 'hours');
timeElapsed.push(hourPassed);
}
if (hours || minutes) {
var minutesPassed = this._createTimeDisplay(minutes, 'speakerStats.minutes', 'minutes');
timeElapsed.push(minutesPassed);
}
var secondsPassed = this._createTimeDisplay(seconds, 'speakerStats.seconds', 'seconds');
timeElapsed.push(secondsPassed);
return _react2.default.createElement(
'div',
{
__source: {
fileName: _jsxFileName,
lineNumber: 69
}
},
timeElapsed
);
}
}, {
key: '_createTimeDisplay',
value: function _createTimeDisplay(count, countNounKey, countType) {
var t = this.props.t;
return _react2.default.createElement(
'span',
{ key: countType, __source: {
fileName: _jsxFileName,
lineNumber: 90
}
},
t(countNounKey, { count: count })
);
}
}]);
return TimeElapsed;
}(_react.Component);
TimeElapsed.propTypes = {
t: _react2.default.PropTypes.func,
time: _react2.default.PropTypes.number
};
exports.default = (0, _i18n.translate)(TimeElapsed);
function _getHoursCount(milliseconds) {
return Math.floor(milliseconds / (60 * 60 * 1000));
}
function _getMinutesCount(milliseconds) {
return Math.floor(milliseconds / (60 * 1000) % 60);
}
function _getSecondsCount(milliseconds) {
return Math.floor(milliseconds / 1000 % 60);
}
}, 896, null, "jitsi-meet/react/features/speaker-stats/components/TimeElapsed.js");
__d(/* jitsi-meet/react/features/speaker-stats/components/SpeakerStatsLabels.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/react/features/speaker-stats/components/SpeakerStatsLabels.js';
var _react = require(34 ); // 34 = react
var _react2 = babelHelpers.interopRequireDefault(_react);
var _i18n = require(632 ); // 632 = ../../base/i18n
var SpeakerStatsLabels = function (_Component) {
babelHelpers.inherits(SpeakerStatsLabels, _Component);
function SpeakerStatsLabels() {
babelHelpers.classCallCheck(this, SpeakerStatsLabels);
return babelHelpers.possibleConstructorReturn(this, (SpeakerStatsLabels.__proto__ || Object.getPrototypeOf(SpeakerStatsLabels)).apply(this, arguments));
}
babelHelpers.createClass(SpeakerStatsLabels, [{
key: 'render',
value: function render() {
var t = this.props.t;
return _react2.default.createElement(
'div',
{ className: 'speaker-stats-item__labels', __source: {
fileName: _jsxFileName,
lineNumber: 33
}
},
_react2.default.createElement('div', { className: 'speaker-stats-item__status', __source: {
fileName: _jsxFileName,
lineNumber: 34
}
}),
_react2.default.createElement(
'div',
{ className: 'speaker-stats-item__name', __source: {
fileName: _jsxFileName,
lineNumber: 35
}
},
t('speakerStats.name')
),
_react2.default.createElement(
'div',
{ className: 'speaker-stats-item__time', __source: {
fileName: _jsxFileName,
lineNumber: 38
}
},
t('speakerStats.speakerTime')
)
);
}
}]);
return SpeakerStatsLabels;
}(_react.Component);
SpeakerStatsLabels.propTypes = {
t: _react2.default.PropTypes.func
};
exports.default = (0, _i18n.translate)(SpeakerStatsLabels);
}, 897, null, "jitsi-meet/react/features/speaker-stats/components/SpeakerStatsLabels.js");
__d(/* jitsi-meet/react/features/filmstrip/reducer.js */function(global, require, module, exports) {var _redux = require(505 ); // 505 = ../base/redux
var _actionTypes = require(703 ); // 703 = ./actionTypes
var DEFAULT_STATE = {
remoteVideosVisible: true,
visible: true
};
_redux.ReducerRegistry.register('features/filmstrip', function () {
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DEFAULT_STATE;
var action = arguments[1];
switch (action.type) {
case _actionTypes.SET_FILMSTRIP_REMOTE_VIDEOS_VISIBLITY:
return babelHelpers.extends({}, state, {
remoteVideosVisible: action.remoteVideosVisible
});
case _actionTypes.SET_FILMSTRIP_VISIBILITY:
return babelHelpers.extends({}, state, {
visible: action.visible
});
}
return state;
});
}, 898, null, "jitsi-meet/react/features/filmstrip/reducer.js");
__d(/* jitsi-meet/react/features/large-video/index.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _actions = require(900 ); // 900 = ./actions
Object.keys(_actions).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _actions[key];
}
});
});
var _components = require(902 ); // 902 = ./components
Object.keys(_components).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _components[key];
}
});
});
require(905 ); // 905 = ./middleware
require(906 ); // 906 = ./reducer
}, 899, null, "jitsi-meet/react/features/large-video/index.js");
__d(/* jitsi-meet/react/features/large-video/actions.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
exports.selectParticipant = selectParticipant;
exports.selectParticipantInLargeVideo = selectParticipantInLargeVideo;
var _conference = require(432 ); // 432 = ../base/conference
var _media = require(567 ); // 567 = ../base/media
var _tracks = require(580 ); // 580 = ../base/tracks
var _actionTypes = require(901 ); // 901 = ./actionTypes
function selectParticipant() {
return function (dispatch, getState) {
var state = getState();
var conference = state['features/base/conference'].conference;
if (conference) {
var largeVideo = state['features/large-video'];
var tracks = state['features/base/tracks'];
var id = largeVideo.participantId;
var videoTrack = (0, _tracks.getTrackByMediaTypeAndParticipant)(tracks, _media.MEDIA_TYPE.VIDEO, id);
try {
conference.selectParticipant(videoTrack && videoTrack.videoType === _media.VIDEO_TYPE.CAMERA ? id : null);
} catch (err) {
(0, _conference._handleParticipantError)(err);
}
}
};
}
function selectParticipantInLargeVideo() {
return function (dispatch, getState) {
var state = getState();
var participantId = _electParticipantInLargeVideo(state);
var largeVideo = state['features/large-video'];
if (participantId !== largeVideo.participantId) {
dispatch({
type: _actionTypes.SELECT_LARGE_VIDEO_PARTICIPANT,
participantId: participantId
});
dispatch(selectParticipant());
}
};
}
function _electLastVisibleVideo(tracks) {
for (var i = tracks.length - 1; i >= 0; --i) {
var track = tracks[i];
if (!track.local && track.mediaType === _media.MEDIA_TYPE.VIDEO) {
return track;
}
}
return (0, _tracks.getLocalVideoTrack)(tracks);
}
function _electParticipantInLargeVideo(state) {
var participants = state['features/base/participants'];
var participant = participants.find(function (p) {
return p.pinned;
});
var id = participant ? participant.id : undefined;
if (!id) {
participant = participants.find(function (p) {
return p.dominantSpeaker && !p.local;
});
if (participant) {
id = participant.id;
}
if (!id) {
var tracks = state['features/base/tracks'];
var videoTrack = _electLastVisibleVideo(tracks);
id = videoTrack && videoTrack.participantId;
}
}
return id;
}
}, 900, null, "jitsi-meet/react/features/large-video/actions.js");
__d(/* jitsi-meet/react/features/large-video/actionTypes.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var SELECT_LARGE_VIDEO_PARTICIPANT = exports.SELECT_LARGE_VIDEO_PARTICIPANT = Symbol('SELECT_LARGE_VIDEO_PARTICIPANT');
}, 901, null, "jitsi-meet/react/features/large-video/actionTypes.js");
__d(/* jitsi-meet/react/features/large-video/components/index.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _LargeVideo = require(903 ); // 903 = ./LargeVideo
Object.defineProperty(exports, 'LargeVideo', {
enumerable: true,
get: function get() {
return babelHelpers.interopRequireDefault(_LargeVideo).default;
}
});
}, 902, null, "jitsi-meet/react/features/large-video/components/index.js");
__d(/* jitsi-meet/react/features/large-video/components/LargeVideo.native.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/react/features/large-video/components/LargeVideo.native.js';
var _react = require(34 ); // 34 = react
var _react2 = babelHelpers.interopRequireDefault(_react);
var _reactRedux = require(548 ); // 548 = react-redux
var _participants = require(540 ); // 540 = ../../base/participants
var _styles = require(904 ); // 904 = ./styles
var _styles2 = babelHelpers.interopRequireDefault(_styles);
var LargeVideo = function (_Component) {
babelHelpers.inherits(LargeVideo, _Component);
function LargeVideo() {
babelHelpers.classCallCheck(this, LargeVideo);
return babelHelpers.possibleConstructorReturn(this, (LargeVideo.__proto__ || Object.getPrototypeOf(LargeVideo)).apply(this, arguments));
}
babelHelpers.createClass(LargeVideo, [{
key: 'render',
value: function render() {
return _react2.default.createElement(_participants.ParticipantView, {
avatarStyle: _styles2.default.avatar,
participantId: this.props._participantId,
style: _styles2.default.largeVideo,
zOrder: 0, __source: {
fileName: _jsxFileName,
lineNumber: 39
}
});
}
}]);
return LargeVideo;
}(_react.Component);
LargeVideo.propTypes = {
_participantId: _react2.default.PropTypes.string
};
function _mapStateToProps(state) {
return {
_participantId: state['features/large-video'].participantId
};
}
exports.default = (0, _reactRedux.connect)(_mapStateToProps)(LargeVideo);
}, 903, null, "jitsi-meet/react/features/large-video/components/LargeVideo.native.js");
__d(/* jitsi-meet/react/features/large-video/components/styles.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _styles = require(601 ); // 601 = ../../base/styles
exports.default = (0, _styles.createStyleSheet)({
avatar: {
alignSelf: 'center',
borderRadius: 100,
flex: 0,
height: 200,
width: 200
},
largeVideo: {
alignItems: 'stretch',
backgroundColor: _styles.ColorPalette.appBackground,
bottom: 0,
flex: 1,
justifyContent: 'center',
left: 0,
position: 'absolute',
right: 0,
top: 0
}
});
}, 904, null, "jitsi-meet/react/features/large-video/components/styles.js");
__d(/* jitsi-meet/react/features/large-video/middleware.js */function(global, require, module, exports) {var _participants = require(540 ); // 540 = ../base/participants
var _redux = require(505 ); // 505 = ../base/redux
var _tracks = require(580 ); // 580 = ../base/tracks
var _actions = require(900 ); // 900 = ./actions
_redux.MiddlewareRegistry.register(function (store) {
return function (next) {
return function (action) {
var result = next(action);
switch (action.type) {
case _participants.DOMINANT_SPEAKER_CHANGED:
case _participants.PARTICIPANT_JOINED:
case _participants.PARTICIPANT_LEFT:
case _participants.PIN_PARTICIPANT:
case _tracks.TRACK_ADDED:
case _tracks.TRACK_REMOVED:
store.dispatch((0, _actions.selectParticipantInLargeVideo)());
break;
case _tracks.TRACK_UPDATED:
{
if ('videoType' in action.track) {
var state = store.getState();
var track = (0, _tracks.getTrackByJitsiTrack)(state['features/base/tracks'], action.track.jitsiTrack);
var participantId = state['features/large-video'].participantId;
track.participantId === participantId && store.dispatch((0, _actions.selectParticipant)());
}
break;
}
}
return result;
};
};
});
}, 905, null, "jitsi-meet/react/features/large-video/middleware.js");
__d(/* jitsi-meet/react/features/large-video/reducer.js */function(global, require, module, exports) {var _participants = require(540 ); // 540 = ../base/participants
var _redux = require(505 ); // 505 = ../base/redux
var _actionTypes = require(901 ); // 901 = ./actionTypes
_redux.ReducerRegistry.register('features/large-video', function () {
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var action = arguments[1];
switch (action.type) {
case _participants.PARTICIPANT_ID_CHANGED:
if (state.participantId === action.oldValue) {
return babelHelpers.extends({}, state, {
participantId: action.newValue
});
}
break;
case _actionTypes.SELECT_LARGE_VIDEO_PARTICIPANT:
return babelHelpers.extends({}, state, {
participantId: action.participantId
});
}
return state;
});
}, 906, null, "jitsi-meet/react/features/large-video/reducer.js");
__d(/* jitsi-meet/react/features/overlay/index.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _actions = require(908 ); // 908 = ./actions
Object.keys(_actions).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _actions[key];
}
});
});
var _components = require(911 ); // 911 = ./components
Object.keys(_components).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _components[key];
}
});
});
require(923 ); // 923 = ./reducer
}, 907, null, "jitsi-meet/react/features/overlay/index.js");
__d(/* jitsi-meet/react/features/overlay/actions.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
exports.mediaPermissionPromptVisibilityChanged = mediaPermissionPromptVisibilityChanged;
exports._reloadNow = _reloadNow;
exports.suspendDetected = suspendDetected;
var _helpers = require(909 ); // 909 = ../../../modules/util/helpers
var _actionTypes = require(910 ); // 910 = ./actionTypes
var logger = require(464 ).getLogger(__filename); // 464 = jitsi-meet-logger
function mediaPermissionPromptVisibilityChanged(isVisible, browser) {
return {
type: _actionTypes.MEDIA_PERMISSION_PROMPT_VISIBILITY_CHANGED,
browser: browser,
isVisible: isVisible
};
}
function _reloadNow() {
return function (dispatch, getState) {
var locationURL = getState()['features/base/connection'].locationURL;
logger.info('Reloading the conference using URL: ' + locationURL);
if (window.self === window.top) {
(0, _helpers.replace)(locationURL);
} else {
(0, _helpers.reload)();
}
};
}
function suspendDetected() {
return {
type: _actionTypes.SUSPEND_DETECTED
};
}
}, 908, null, "jitsi-meet/react/features/overlay/actions.js");
__d(/* jitsi-meet/modules/util/helpers.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
exports.createDeferred = createDeferred;
exports.debounce = debounce;
exports.getJitsiMeetGlobalNS = getJitsiMeetGlobalNS;
exports.reload = reload;
exports.replace = replace;
exports.reportError = reportError;
var logger = require(464 ).getLogger(__filename); // 464 = jitsi-meet-logger
function createDeferred() {
var deferred = {};
deferred.promise = new Promise(function (resolve, reject) {
deferred.resolve = resolve;
deferred.reject = reject;
});
return deferred;
}
function debounce(fn) {
var wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
var leading = options.leading || false;
var trailing = typeof options.trailing === 'undefined' || options.trailing;
var called = false;
return function () {
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
if (!called) {
leading && fn.apply(undefined, args);
setTimeout(function () {
called = false;
trailing && fn.apply(undefined, args);
}, wait);
called = true;
}
};
}
function getJitsiMeetGlobalNS() {
if (!window.JitsiMeetJS) {
window.JitsiMeetJS = {};
}
if (!window.JitsiMeetJS.app) {
window.JitsiMeetJS.app = {};
}
return window.JitsiMeetJS.app;
}
function reload() {
window.location.reload();
}
function replace(url) {
window.location.replace(url);
}
function reportError(e) {
var msg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
logger.error(msg, e);
window.onerror && window.onerror(msg, null, null, null, e);
}
}, 909, null, "jitsi-meet/modules/util/helpers.js");
__d(/* jitsi-meet/react/features/overlay/actionTypes.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var MEDIA_PERMISSION_PROMPT_VISIBILITY_CHANGED = exports.MEDIA_PERMISSION_PROMPT_VISIBILITY_CHANGED = Symbol('MEDIA_PERMISSION_PROMPT_VISIBILITY_CHANGED');
var SUSPEND_DETECTED = exports.SUSPEND_DETECTED = Symbol('SUSPEND_DETECTED');
}, 910, null, "jitsi-meet/react/features/overlay/actionTypes.js");
__d(/* jitsi-meet/react/features/overlay/components/index.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _OverlayContainer = require(912 ); // 912 = ./OverlayContainer
Object.defineProperty(exports, 'OverlayContainer', {
enumerable: true,
get: function get() {
return babelHelpers.interopRequireDefault(_OverlayContainer).default;
}
});
}, 911, null, "jitsi-meet/react/features/overlay/components/index.js");
__d(/* jitsi-meet/react/features/overlay/components/OverlayContainer.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _react = require(34 ); // 34 = react
var _react2 = babelHelpers.interopRequireDefault(_react);
var _reactRedux = require(548 ); // 548 = react-redux
var _jwt = require(877 ); // 877 = ../../jwt
var _PageReloadFilmstripOnlyOverlay = require(913 ); // 913 = ./PageReloadFilmstripOnlyOverlay
var _PageReloadFilmstripOnlyOverlay2 = babelHelpers.interopRequireDefault(_PageReloadFilmstripOnlyOverlay);
var _PageReloadOverlay = require(918 ); // 918 = ./PageReloadOverlay
var _PageReloadOverlay2 = babelHelpers.interopRequireDefault(_PageReloadOverlay);
var _SuspendedFilmstripOnlyOverlay = require(919 ); // 919 = ./SuspendedFilmstripOnlyOverlay
var _SuspendedFilmstripOnlyOverlay2 = babelHelpers.interopRequireDefault(_SuspendedFilmstripOnlyOverlay);
var _SuspendedOverlay = require(920 ); // 920 = ./SuspendedOverlay
var _SuspendedOverlay2 = babelHelpers.interopRequireDefault(_SuspendedOverlay);
var _UserMediaPermissionsFilmstripOnlyOverlay = require(921 ); // 921 = ./UserMediaPermissionsFilmstripOnlyOverlay
var _UserMediaPermissionsFilmstripOnlyOverlay2 = babelHelpers.interopRequireDefault(_UserMediaPermissionsFilmstripOnlyOverlay);
var _UserMediaPermissionsOverlay = require(922 ); // 922 = ./UserMediaPermissionsOverlay
var _UserMediaPermissionsOverlay2 = babelHelpers.interopRequireDefault(_UserMediaPermissionsOverlay);
var OverlayContainer = function (_Component) {
babelHelpers.inherits(OverlayContainer, _Component);
function OverlayContainer(props) {
babelHelpers.classCallCheck(this, OverlayContainer);
var _this = babelHelpers.possibleConstructorReturn(this, (OverlayContainer.__proto__ || Object.getPrototypeOf(OverlayContainer)).call(this, props));
_this.state = {
filmstripOnly: typeof interfaceConfig === 'object' && interfaceConfig.filmStripOnly
};
return _this;
}
babelHelpers.createClass(OverlayContainer, [{
key: 'componentDidUpdate',
value: function componentDidUpdate() {
if (typeof APP === 'object') {
APP.UI.overlayVisible = this.props._connectionEstablished && this.props._haveToReload || this.props._suspendDetected || this.props._isMediaPermissionPromptVisible;
}
}
}, {
key: 'render',
value: function render() {
var filmstripOnly = this.state.filmstripOnly;
var overlayComponent = void 0,
props = void 0;
if (this.props._connectionEstablished && this.props._haveToReload) {
overlayComponent = filmstripOnly ? _PageReloadFilmstripOnlyOverlay2.default : _PageReloadOverlay2.default;
props = {
isNetworkFailure: this.props._isNetworkFailure,
reason: this.props._reason
};
} else if (this.props._suspendDetected) {
overlayComponent = filmstripOnly ? _SuspendedFilmstripOnlyOverlay2.default : _SuspendedOverlay2.default;
} else if (this.props._isMediaPermissionPromptVisible) {
overlayComponent = filmstripOnly ? _UserMediaPermissionsFilmstripOnlyOverlay2.default : _UserMediaPermissionsOverlay2.default;
props = {
browser: this.props._browser
};
} else if (this.props._callOverlayVisible) {
overlayComponent = _jwt.CallOverlay;
}
return overlayComponent ? _react2.default.createElement(overlayComponent, props) : null;
}
}]);
return OverlayContainer;
}(_react.Component);
OverlayContainer.propTypes = {
_browser: _react2.default.PropTypes.string,
_callOverlayVisible: _react2.default.PropTypes.bool,
_connectionEstablished: _react2.default.PropTypes.bool,
_haveToReload: _react2.default.PropTypes.bool,
_isMediaPermissionPromptVisible: _react2.default.PropTypes.bool,
_isNetworkFailure: _react2.default.PropTypes.bool,
_reason: _react2.default.PropTypes.string,
_suspendDetected: _react2.default.PropTypes.bool
};
function _mapStateToProps(state) {
var stateFeaturesOverlay = state['features/overlay'];
return {
_browser: stateFeaturesOverlay.browser,
_callOverlayVisible: Boolean(state['features/jwt'].callOverlayVisible),
_connectionEstablished: stateFeaturesOverlay.connectionEstablished,
_haveToReload: stateFeaturesOverlay.haveToReload,
_isMediaPermissionPromptVisible: stateFeaturesOverlay.isMediaPermissionPromptVisible,
_isNetworkFailure: stateFeaturesOverlay.isNetworkFailure,
_reason: stateFeaturesOverlay.reason,
_suspendDetected: stateFeaturesOverlay.suspendDetected
};
}
exports.default = (0, _reactRedux.connect)(_mapStateToProps)(OverlayContainer);
}, 912, null, "jitsi-meet/react/features/overlay/components/OverlayContainer.js");
__d(/* jitsi-meet/react/features/overlay/components/PageReloadFilmstripOnlyOverlay.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/react/features/overlay/components/PageReloadFilmstripOnlyOverlay.js';
var _react = require(34 ); // 34 = react
var _react2 = babelHelpers.interopRequireDefault(_react);
var _reactRedux = require(548 ); // 548 = react-redux
var _i18n = require(632 ); // 632 = ../../base/i18n
var _AbstractPageReloadOverlay = require(914 ); // 914 = ./AbstractPageReloadOverlay
var _AbstractPageReloadOverlay2 = babelHelpers.interopRequireDefault(_AbstractPageReloadOverlay);
var _FilmstripOnlyOverlayFrame = require(916 ); // 916 = ./FilmstripOnlyOverlayFrame
var _FilmstripOnlyOverlayFrame2 = babelHelpers.interopRequireDefault(_FilmstripOnlyOverlayFrame);
var PageReloadFilmstripOnlyOverlay = function (_AbstractPageReloadOv) {
babelHelpers.inherits(PageReloadFilmstripOnlyOverlay, _AbstractPageReloadOv);
function PageReloadFilmstripOnlyOverlay() {
babelHelpers.classCallCheck(this, PageReloadFilmstripOnlyOverlay);
return babelHelpers.possibleConstructorReturn(this, (PageReloadFilmstripOnlyOverlay.__proto__ || Object.getPrototypeOf(PageReloadFilmstripOnlyOverlay)).apply(this, arguments));
}
babelHelpers.createClass(PageReloadFilmstripOnlyOverlay, [{
key: 'render',
value: function render() {
var t = this.props.t;
var _state = this.state,
message = _state.message,
timeLeft = _state.timeLeft,
title = _state.title;
return _react2.default.createElement(
_FilmstripOnlyOverlayFrame2.default,
{
__source: {
fileName: _jsxFileName,
lineNumber: 26
}
},
_react2.default.createElement(
'div',
{ className: 'inlay-filmstrip-only__container', __source: {
fileName: _jsxFileName,
lineNumber: 27
}
},
_react2.default.createElement(
'div',
{ className: 'inlay-filmstrip-only__title', __source: {
fileName: _jsxFileName,
lineNumber: 28
}
},
t(title)
),
_react2.default.createElement(
'div',
{ className: 'inlay-filmstrip-only__text', __source: {
fileName: _jsxFileName,
lineNumber: 31
}
},
t(message, { seconds: timeLeft })
)
),
this._renderButton(),
this._renderProgressBar()
);
}
}]);
return PageReloadFilmstripOnlyOverlay;
}(_AbstractPageReloadOverlay2.default);
exports.default = (0, _i18n.translate)((0, _reactRedux.connect)()(PageReloadFilmstripOnlyOverlay));
}, 913, null, "jitsi-meet/react/features/overlay/components/PageReloadFilmstripOnlyOverlay.js");
__d(/* jitsi-meet/react/features/overlay/components/AbstractPageReloadOverlay.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/react/features/overlay/components/AbstractPageReloadOverlay.js';
var _react = require(34 ); // 34 = react
var _react2 = babelHelpers.interopRequireDefault(_react);
var _util = require(529 ); // 529 = ../../base/util
var _actions = require(908 ); // 908 = ../actions
var _ReloadButton = require(915 ); // 915 = ./ReloadButton
var _ReloadButton2 = babelHelpers.interopRequireDefault(_ReloadButton);
var logger = require(464 ).getLogger(__filename); // 464 = jitsi-meet-logger
var AbstractPageReloadOverlay = function (_Component) {
babelHelpers.inherits(AbstractPageReloadOverlay, _Component);
function AbstractPageReloadOverlay(props) {
babelHelpers.classCallCheck(this, AbstractPageReloadOverlay);
var _this = babelHelpers.possibleConstructorReturn(this, (AbstractPageReloadOverlay.__proto__ || Object.getPrototypeOf(AbstractPageReloadOverlay)).call(this, props));
var timeoutSeconds = 10 + (0, _util.randomInt)(0, 20);
var message = void 0,
title = void 0;
if (_this.props.isNetworkFailure) {
title = 'dialog.conferenceDisconnectTitle';
message = 'dialog.conferenceDisconnectMsg';
} else {
title = 'dialog.conferenceReloadTitle';
message = 'dialog.conferenceReloadMsg';
}
_this.state = {
message: message,
timeLeft: timeoutSeconds,
timeoutSeconds: timeoutSeconds,
title: title
};
return _this;
}
babelHelpers.createClass(AbstractPageReloadOverlay, [{
key: 'componentDidMount',
value: function componentDidMount() {
var _this2 = this;
APP.conference.logEvent('page.reload', undefined, this.props.reason);
logger.info('The conference will be reloaded after ' + this.state.timeoutSeconds + ' seconds.');
AJS.progressBars.update('#reloadProgressBar', 0);
this._interval = setInterval(function () {
if (_this2.state.timeLeft === 0) {
if (_this2._interval) {
clearInterval(_this2._interval);
_this2._interval = undefined;
}
_this2.props.dispatch((0, _actions._reloadNow)());
} else {
_this2.setState(function (prevState) {
return {
timeLeft: prevState.timeLeft - 1
};
});
}
}, 1000);
}
}, {
key: 'componentDidUpdate',
value: function componentDidUpdate() {
var _state = this.state,
timeLeft = _state.timeLeft,
timeoutSeconds = _state.timeoutSeconds;
AJS.progressBars.update('#reloadProgressBar', (timeoutSeconds - timeLeft) / timeoutSeconds);
}
}, {
key: 'componentWillUnmount',
value: function componentWillUnmount() {
if (this._interval) {
clearInterval(this._interval);
this._interval = undefined;
}
}
}, {
key: '_renderButton',
value: function _renderButton() {
if (this.props.isNetworkFailure) {
return _react2.default.createElement(_ReloadButton2.default, { textKey: 'dialog.rejoinNow', __source: {
fileName: _jsxFileName,
lineNumber: 202
}
});
}
return null;
}
}, {
key: '_renderProgressBar',
value: function _renderProgressBar() {
return _react2.default.createElement(
'div',
{
className: 'aui-progress-indicator',
id: 'reloadProgressBar', __source: {
fileName: _jsxFileName,
lineNumber: 217
}
},
_react2.default.createElement('span', { className: 'aui-progress-indicator-value', __source: {
fileName: _jsxFileName,
lineNumber: 220
}
})
);
}
}]);
return AbstractPageReloadOverlay;
}(_react.Component);
AbstractPageReloadOverlay.propTypes = {
dispatch: _react2.default.PropTypes.func,
isNetworkFailure: _react2.default.PropTypes.bool,
reason: _react2.default.PropTypes.string,
t: _react2.default.PropTypes.func
};
exports.default = AbstractPageReloadOverlay;
}, 914, null, "jitsi-meet/react/features/overlay/components/AbstractPageReloadOverlay.js");
__d(/* jitsi-meet/react/features/overlay/components/ReloadButton.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/react/features/overlay/components/ReloadButton.js';
var _react = require(34 ); // 34 = react
var _react2 = babelHelpers.interopRequireDefault(_react);
var _reactRedux = require(548 ); // 548 = react-redux
var _i18n = require(632 ); // 632 = ../../base/i18n
var _actions = require(908 ); // 908 = ../actions
var ReloadButton = function (_Component) {
babelHelpers.inherits(ReloadButton, _Component);
function ReloadButton() {
babelHelpers.classCallCheck(this, ReloadButton);
return babelHelpers.possibleConstructorReturn(this, (ReloadButton.__proto__ || Object.getPrototypeOf(ReloadButton)).apply(this, arguments));
}
babelHelpers.createClass(ReloadButton, [{
key: 'render',
value: function render() {
var className = 'button-control button-control_overlay button-control_center';
return _react2.default.createElement(
'button',
{
className: className,
onClick: this.props._reloadNow, __source: {
fileName: _jsxFileName,
lineNumber: 55
}
},
this.props.t(this.props.textKey)
);
}
}]);
return ReloadButton;
}(_react.Component);
ReloadButton.propTypes = {
_reloadNow: _react2.default.PropTypes.func,
t: _react2.default.PropTypes.func,
textKey: _react2.default.PropTypes.string.isRequired
};
function _mapDispatchToProps(dispatch) {
return {
_reloadNow: function _reloadNow() {
dispatch((0, _actions._reloadNow)());
}
};
}
exports.default = (0, _i18n.translate)((0, _reactRedux.connect)(undefined, _mapDispatchToProps)(ReloadButton));
}, 915, null, "jitsi-meet/react/features/overlay/components/ReloadButton.js");
__d(/* jitsi-meet/react/features/overlay/components/FilmstripOnlyOverlayFrame.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/react/features/overlay/components/FilmstripOnlyOverlayFrame.js';
var _react = require(34 ); // 34 = react
var _react2 = babelHelpers.interopRequireDefault(_react);
var _reactRedux = require(548 ); // 548 = react-redux
var _participants = require(540 ); // 540 = ../../base/participants
var _OverlayFrame = require(917 ); // 917 = ./OverlayFrame
var _OverlayFrame2 = babelHelpers.interopRequireDefault(_OverlayFrame);
var FilmstripOnlyOverlayFrame = function (_Component) {
babelHelpers.inherits(FilmstripOnlyOverlayFrame, _Component);
function FilmstripOnlyOverlayFrame() {
babelHelpers.classCallCheck(this, FilmstripOnlyOverlayFrame);
return babelHelpers.possibleConstructorReturn(this, (FilmstripOnlyOverlayFrame.__proto__ || Object.getPrototypeOf(FilmstripOnlyOverlayFrame)).apply(this, arguments));
}
babelHelpers.createClass(FilmstripOnlyOverlayFrame, [{
key: '_renderIcon',
value: function _renderIcon() {
if (!this.props.icon) {
return null;
}
var iconClass = 'inlay-filmstrip-only__icon ' + this.props.icon;
var iconBGClass = 'inlay-filmstrip-only__icon-background';
return _react2.default.createElement(
'div',
{
__source: {
fileName: _jsxFileName,
lineNumber: 71
}
},
_react2.default.createElement('div', { className: iconBGClass, __source: {
fileName: _jsxFileName,
lineNumber: 72
}
}),
_react2.default.createElement(
'div',
{ className: 'inlay-filmstrip-only__icon-container', __source: {
fileName: _jsxFileName,
lineNumber: 73
}
},
_react2.default.createElement('span', { className: iconClass, __source: {
fileName: _jsxFileName,
lineNumber: 74
}
})
)
);
}
}, {
key: 'render',
value: function render() {
return _react2.default.createElement(
_OverlayFrame2.default,
{ isLightOverlay: this.props.isLightOverlay, __source: {
fileName: _jsxFileName,
lineNumber: 88
}
},
_react2.default.createElement(
'div',
{ className: 'inlay-filmstrip-only', __source: {
fileName: _jsxFileName,
lineNumber: 89
}
},
_react2.default.createElement(
'div',
{ className: 'inlay-filmstrip-only__content', __source: {
fileName: _jsxFileName,
lineNumber: 90
}
},
this.props.children
),
_react2.default.createElement(
'div',
{ className: 'inlay-filmstrip-only__avatar-container', __source: {
fileName: _jsxFileName,
lineNumber: 95
}
},
_react2.default.createElement(_participants.Avatar, { uri: this.props._avatar, __source: {
fileName: _jsxFileName,
lineNumber: 96
}
}),
this._renderIcon()
)
)
);
}
}]);
return FilmstripOnlyOverlayFrame;
}(_react.Component);
FilmstripOnlyOverlayFrame.propTypes = {
_avatar: _react2.default.PropTypes.string,
children: _react2.default.PropTypes.node.isRequired,
icon: _react2.default.PropTypes.string,
isLightOverlay: _react2.default.PropTypes.bool
};
function _mapStateToProps(state) {
return {
_avatar: (0, _participants.getAvatarURL)((0, _participants.getLocalParticipant)(state) || {})
};
}
exports.default = (0, _reactRedux.connect)(_mapStateToProps)(FilmstripOnlyOverlayFrame);
}, 916, null, "jitsi-meet/react/features/overlay/components/FilmstripOnlyOverlayFrame.js");
__d(/* jitsi-meet/react/features/overlay/components/OverlayFrame.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/react/features/overlay/components/OverlayFrame.js';
var _react = require(34 ); // 34 = react
var _react2 = babelHelpers.interopRequireDefault(_react);
var OverlayFrame = function (_Component) {
babelHelpers.inherits(OverlayFrame, _Component);
function OverlayFrame(props) {
babelHelpers.classCallCheck(this, OverlayFrame);
var _this = babelHelpers.possibleConstructorReturn(this, (OverlayFrame.__proto__ || Object.getPrototypeOf(OverlayFrame)).call(this, props));
_this.state = {
filmstripOnly: interfaceConfig.filmStripOnly
};
return _this;
}
babelHelpers.createClass(OverlayFrame, [{
key: 'render',
value: function render() {
var containerClass = this.props.isLightOverlay ? 'overlay__container-light' : 'overlay__container';
var contentClass = 'overlay__content';
if (this.state.filmstripOnly) {
containerClass += ' filmstrip-only';
contentClass += ' filmstrip-only';
}
return _react2.default.createElement(
'div',
{
className: containerClass,
id: 'overlay', __source: {
fileName: _jsxFileName,
lineNumber: 66
}
},
_react2.default.createElement(
'div',
{ className: contentClass, __source: {
fileName: _jsxFileName,
lineNumber: 69
}
},
this.props.children
)
);
}
}]);
return OverlayFrame;
}(_react.Component);
OverlayFrame.propTypes = {
children: _react2.default.PropTypes.node.isRequired,
isLightOverlay: _react2.default.PropTypes.bool
};
exports.default = OverlayFrame;
}, 917, null, "jitsi-meet/react/features/overlay/components/OverlayFrame.js");
__d(/* jitsi-meet/react/features/overlay/components/PageReloadOverlay.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/react/features/overlay/components/PageReloadOverlay.js';
var _react = require(34 ); // 34 = react
var _react2 = babelHelpers.interopRequireDefault(_react);
var _reactRedux = require(548 ); // 548 = react-redux
var _i18n = require(632 ); // 632 = ../../base/i18n
var _AbstractPageReloadOverlay = require(914 ); // 914 = ./AbstractPageReloadOverlay
var _AbstractPageReloadOverlay2 = babelHelpers.interopRequireDefault(_AbstractPageReloadOverlay);
var _OverlayFrame = require(917 ); // 917 = ./OverlayFrame
var _OverlayFrame2 = babelHelpers.interopRequireDefault(_OverlayFrame);
var PageReloadOverlay = function (_AbstractPageReloadOv) {
babelHelpers.inherits(PageReloadOverlay, _AbstractPageReloadOv);
function PageReloadOverlay() {
babelHelpers.classCallCheck(this, PageReloadOverlay);
return babelHelpers.possibleConstructorReturn(this, (PageReloadOverlay.__proto__ || Object.getPrototypeOf(PageReloadOverlay)).apply(this, arguments));
}
babelHelpers.createClass(PageReloadOverlay, [{
key: 'render',
value: function render() {
var _props = this.props,
isNetworkFailure = _props.isNetworkFailure,
t = _props.t;
var _state = this.state,
message = _state.message,
timeLeft = _state.timeLeft,
title = _state.title;
return _react2.default.createElement(
_OverlayFrame2.default,
{ isLightOverlay: isNetworkFailure, __source: {
fileName: _jsxFileName,
lineNumber: 26
}
},
_react2.default.createElement(
'div',
{ className: 'inlay', __source: {
fileName: _jsxFileName,
lineNumber: 27
}
},
_react2.default.createElement(
'span',
{
className: 'reload_overlay_title', __source: {
fileName: _jsxFileName,
lineNumber: 28
}
},
t(title)
),
_react2.default.createElement(
'span',
{ className: 'reload_overlay_text', __source: {
fileName: _jsxFileName,
lineNumber: 32
}
},
t(message, { seconds: timeLeft })
),
this._renderProgressBar(),
this._renderButton()
)
);
}
}]);
return PageReloadOverlay;
}(_AbstractPageReloadOverlay2.default);
exports.default = (0, _i18n.translate)((0, _reactRedux.connect)()(PageReloadOverlay));
}, 918, null, "jitsi-meet/react/features/overlay/components/PageReloadOverlay.js");
__d(/* jitsi-meet/react/features/overlay/components/SuspendedFilmstripOnlyOverlay.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/react/features/overlay/components/SuspendedFilmstripOnlyOverlay.js';
var _react = require(34 ); // 34 = react
var _react2 = babelHelpers.interopRequireDefault(_react);
var _i18n = require(632 ); // 632 = ../../base/i18n
var _FilmstripOnlyOverlayFrame = require(916 ); // 916 = ./FilmstripOnlyOverlayFrame
var _FilmstripOnlyOverlayFrame2 = babelHelpers.interopRequireDefault(_FilmstripOnlyOverlayFrame);
var _ReloadButton = require(915 ); // 915 = ./ReloadButton
var _ReloadButton2 = babelHelpers.interopRequireDefault(_ReloadButton);
var SuspendedFilmstripOnlyOverlay = function (_Component) {
babelHelpers.inherits(SuspendedFilmstripOnlyOverlay, _Component);
function SuspendedFilmstripOnlyOverlay() {
babelHelpers.classCallCheck(this, SuspendedFilmstripOnlyOverlay);
return babelHelpers.possibleConstructorReturn(this, (SuspendedFilmstripOnlyOverlay.__proto__ || Object.getPrototypeOf(SuspendedFilmstripOnlyOverlay)).apply(this, arguments));
}
babelHelpers.createClass(SuspendedFilmstripOnlyOverlay, [{
key: 'render',
value: function render() {
var t = this.props.t;
return _react2.default.createElement(
_FilmstripOnlyOverlayFrame2.default,
{ isLightOverlay: true, __source: {
fileName: _jsxFileName,
lineNumber: 38
}
},
_react2.default.createElement(
'div',
{ className: 'inlay-filmstrip-only__container', __source: {
fileName: _jsxFileName,
lineNumber: 39
}
},
_react2.default.createElement(
'div',
{ className: 'inlay-filmstrip-only__title', __source: {
fileName: _jsxFileName,
lineNumber: 40
}
},
t('suspendedoverlay.title')
),
_react2.default.createElement(
'div',
{ className: 'inlay-filmstrip-only__text', __source: {
fileName: _jsxFileName,
lineNumber: 43
}
},
(0, _i18n.translateToHTML)(t, 'suspendedoverlay.text')
)
),
_react2.default.createElement(_ReloadButton2.default, { textKey: 'suspendedoverlay.rejoinKeyTitle', __source: {
fileName: _jsxFileName,
lineNumber: 47
}
})
);
}
}]);
return SuspendedFilmstripOnlyOverlay;
}(_react.Component);
SuspendedFilmstripOnlyOverlay.propTypes = {
t: _react2.default.PropTypes.func
};
exports.default = (0, _i18n.translate)(SuspendedFilmstripOnlyOverlay);
}, 919, null, "jitsi-meet/react/features/overlay/components/SuspendedFilmstripOnlyOverlay.js");
__d(/* jitsi-meet/react/features/overlay/components/SuspendedOverlay.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/react/features/overlay/components/SuspendedOverlay.js';
var _react = require(34 ); // 34 = react
var _react2 = babelHelpers.interopRequireDefault(_react);
var _i18n = require(632 ); // 632 = ../../base/i18n
var _OverlayFrame = require(917 ); // 917 = ./OverlayFrame
var _OverlayFrame2 = babelHelpers.interopRequireDefault(_OverlayFrame);
var _ReloadButton = require(915 ); // 915 = ./ReloadButton
var _ReloadButton2 = babelHelpers.interopRequireDefault(_ReloadButton);
var SuspendedOverlay = function (_Component) {
babelHelpers.inherits(SuspendedOverlay, _Component);
function SuspendedOverlay() {
babelHelpers.classCallCheck(this, SuspendedOverlay);
return babelHelpers.possibleConstructorReturn(this, (SuspendedOverlay.__proto__ || Object.getPrototypeOf(SuspendedOverlay)).apply(this, arguments));
}
babelHelpers.createClass(SuspendedOverlay, [{
key: 'render',
value: function render() {
var t = this.props.t;
return _react2.default.createElement(
_OverlayFrame2.default,
{
__source: {
fileName: _jsxFileName,
lineNumber: 38
}
},
_react2.default.createElement(
'div',
{ className: 'inlay', __source: {
fileName: _jsxFileName,
lineNumber: 39
}
},
_react2.default.createElement('span', { className: 'inlay__icon icon-microphone', __source: {
fileName: _jsxFileName,
lineNumber: 40
}
}),
_react2.default.createElement('span', { className: 'inlay__icon icon-camera', __source: {
fileName: _jsxFileName,
lineNumber: 41
}
}),
_react2.default.createElement(
'h3',
{
className: 'inlay__title', __source: {
fileName: _jsxFileName,
lineNumber: 42
}
},
t('suspendedoverlay.title')
),
_react2.default.createElement(
'span',
{ className: 'inlay__text', __source: {
fileName: _jsxFileName,
lineNumber: 46
}
},
(0, _i18n.translateToHTML)(t, 'suspendedoverlay.title')
),
_react2.default.createElement(_ReloadButton2.default, { textKey: 'suspendedoverlay.rejoinKeyTitle', __source: {
fileName: _jsxFileName,
lineNumber: 51
}
})
)
);
}
}]);
return SuspendedOverlay;
}(_react.Component);
SuspendedOverlay.propTypes = {
t: _react2.default.PropTypes.func
};
exports.default = (0, _i18n.translate)(SuspendedOverlay);
}, 920, null, "jitsi-meet/react/features/overlay/components/SuspendedOverlay.js");
__d(/* jitsi-meet/react/features/overlay/components/UserMediaPermissionsFilmstripOnlyOverlay.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/react/features/overlay/components/UserMediaPermissionsFilmstripOnlyOverlay.js';
var _react = require(34 ); // 34 = react
var _react2 = babelHelpers.interopRequireDefault(_react);
var _i18n = require(632 ); // 632 = ../../base/i18n
var _FilmstripOnlyOverlayFrame = require(916 ); // 916 = ./FilmstripOnlyOverlayFrame
var _FilmstripOnlyOverlayFrame2 = babelHelpers.interopRequireDefault(_FilmstripOnlyOverlayFrame);
var UserMediaPermissionsFilmstripOnlyOverlay = function (_Component) {
babelHelpers.inherits(UserMediaPermissionsFilmstripOnlyOverlay, _Component);
function UserMediaPermissionsFilmstripOnlyOverlay() {
babelHelpers.classCallCheck(this, UserMediaPermissionsFilmstripOnlyOverlay);
return babelHelpers.possibleConstructorReturn(this, (UserMediaPermissionsFilmstripOnlyOverlay.__proto__ || Object.getPrototypeOf(UserMediaPermissionsFilmstripOnlyOverlay)).apply(this, arguments));
}
babelHelpers.createClass(UserMediaPermissionsFilmstripOnlyOverlay, [{
key: 'render',
value: function render() {
var t = this.props.t;
var textKey = 'userMedia.' + this.props.browser + 'GrantPermissions';
return _react2.default.createElement(
_FilmstripOnlyOverlayFrame2.default,
{
icon: 'icon-mic-camera-combined',
isLightOverlay: true, __source: {
fileName: _jsxFileName,
lineNumber: 47
}
},
_react2.default.createElement(
'div',
{ className: 'inlay-filmstrip-only__container', __source: {
fileName: _jsxFileName,
lineNumber: 50
}
},
_react2.default.createElement(
'div',
{ className: 'inlay-filmstrip-only__title', __source: {
fileName: _jsxFileName,
lineNumber: 51
}
},
t('startupoverlay.title', { postProcess: 'resolveAppName' })
),
_react2.default.createElement(
'div',
{ className: 'inlay-filmstrip-only__text', __source: {
fileName: _jsxFileName,
lineNumber: 57
}
},
(0, _i18n.translateToHTML)(t, textKey)
)
)
);
}
}]);
return UserMediaPermissionsFilmstripOnlyOverlay;
}(_react.Component);
UserMediaPermissionsFilmstripOnlyOverlay.propTypes = {
browser: _react2.default.PropTypes.string,
t: _react2.default.PropTypes.func
};
exports.default = (0, _i18n.translate)(UserMediaPermissionsFilmstripOnlyOverlay);
}, 921, null, "jitsi-meet/react/features/overlay/components/UserMediaPermissionsFilmstripOnlyOverlay.js");
__d(/* jitsi-meet/react/features/overlay/components/UserMediaPermissionsOverlay.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/react/features/overlay/components/UserMediaPermissionsOverlay.js';
var _react = require(34 ); // 34 = react
var _react2 = babelHelpers.interopRequireDefault(_react);
var _i18n = require(632 ); // 632 = ../../base/i18n
var _OverlayFrame = require(917 ); // 917 = ./OverlayFrame
var _OverlayFrame2 = babelHelpers.interopRequireDefault(_OverlayFrame);
var UserMediaPermissionsOverlay = function (_Component) {
babelHelpers.inherits(UserMediaPermissionsOverlay, _Component);
function UserMediaPermissionsOverlay(props) {
babelHelpers.classCallCheck(this, UserMediaPermissionsOverlay);
var _this = babelHelpers.possibleConstructorReturn(this, (UserMediaPermissionsOverlay.__proto__ || Object.getPrototypeOf(UserMediaPermissionsOverlay)).call(this, props));
_this.state = {
policyLogoSrc: interfaceConfig.POLICY_LOGO
};
return _this;
}
babelHelpers.createClass(UserMediaPermissionsOverlay, [{
key: 'render',
value: function render() {
var _props = this.props,
browser = _props.browser,
t = _props.t;
return _react2.default.createElement(
_OverlayFrame2.default,
{
__source: {
fileName: _jsxFileName,
lineNumber: 68
}
},
_react2.default.createElement(
'div',
{ className: 'inlay', __source: {
fileName: _jsxFileName,
lineNumber: 69
}
},
_react2.default.createElement('span', { className: 'inlay__icon icon-microphone', __source: {
fileName: _jsxFileName,
lineNumber: 70
}
}),
_react2.default.createElement('span', { className: 'inlay__icon icon-camera', __source: {
fileName: _jsxFileName,
lineNumber: 71
}
}),
_react2.default.createElement(
'h3',
{ className: 'inlay__title', __source: {
fileName: _jsxFileName,
lineNumber: 72
}
},
t('startupoverlay.title', { postProcess: 'resolveAppName' })
),
_react2.default.createElement(
'span',
{ className: 'inlay__text', __source: {
fileName: _jsxFileName,
lineNumber: 78
}
},
(0, _i18n.translateToHTML)(t, 'userMedia.' + browser + 'GrantPermissions')
)
),
_react2.default.createElement(
'div',
{ className: 'policy overlay__policy', __source: {
fileName: _jsxFileName,
lineNumber: 85
}
},
_react2.default.createElement(
'p',
{ className: 'policy__text', __source: {
fileName: _jsxFileName,
lineNumber: 86
}
},
(0, _i18n.translateToHTML)(t, 'startupoverlay.policyText')
),
this._renderPolicyLogo()
)
);
}
}, {
key: '_renderPolicyLogo',
value: function _renderPolicyLogo() {
var policyLogoSrc = this.state.policyLogoSrc;
if (policyLogoSrc) {
return _react2.default.createElement(
'div',
{ className: 'policy__logo', __source: {
fileName: _jsxFileName,
lineNumber: 108
}
},
_react2.default.createElement('img', { src: policyLogoSrc, __source: {
fileName: _jsxFileName,
lineNumber: 109
}
})
);
}
return null;
}
}]);
return UserMediaPermissionsOverlay;
}(_react.Component);
UserMediaPermissionsOverlay.propTypes = {
browser: _react2.default.PropTypes.string,
t: _react2.default.PropTypes.func
};
exports.default = (0, _i18n.translate)(UserMediaPermissionsOverlay);
}, 922, null, "jitsi-meet/react/features/overlay/components/UserMediaPermissionsOverlay.js");
__d(/* jitsi-meet/react/features/overlay/reducer.js */function(global, require, module, exports) {var _conference = require(432 ); // 432 = ../base/conference
var _connection = require(615 ); // 615 = ../base/connection
var _libJitsiMeet = require(434 ); // 434 = ../base/lib-jitsi-meet
var _redux = require(505 ); // 505 = ../base/redux
var _actionTypes = require(910 ); // 910 = ./actionTypes
var logger = require(464 ).getLogger(__filename); // 464 = jitsi-meet-logger
_redux.ReducerRegistry.register('features/overlay', function () {
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var action = arguments[1];
switch (action.type) {
case _conference.CONFERENCE_FAILED:
return _conferenceFailed(state, action);
case _connection.CONNECTION_ESTABLISHED:
return _connectionEstablished(state, action);
case _connection.CONNECTION_FAILED:
return _connectionFailed(state, action);
case _actionTypes.MEDIA_PERMISSION_PROMPT_VISIBILITY_CHANGED:
return _mediaPermissionPromptVisibilityChanged(state, action);
case _actionTypes.SUSPEND_DETECTED:
return _suspendDetected(state, action);
}
return state;
});
function _conferenceFailed(state, _ref) {
var error = _ref.error,
message = _ref.message;
if (error === _libJitsiMeet.JitsiConferenceErrors.FOCUS_LEFT || error === _libJitsiMeet.JitsiConferenceErrors.VIDEOBRIDGE_NOT_AVAILABLE) {
return (0, _redux.assign)(state, {
haveToReload: true,
isNetworkFailure: false,
reason: message
});
}
return state;
}
function _connectionEstablished(state) {
return (0, _redux.set)(state, 'connectionEstablished', true);
}
function _connectionFailed(state, _ref2) {
var error = _ref2.error,
message = _ref2.message;
if ((0, _libJitsiMeet.isFatalJitsiConnectionError)(error)) {
logger.error('XMPP connection error: ' + message);
return (0, _redux.assign)(state, {
haveToReload: true,
isNetworkFailure: error === _libJitsiMeet.JitsiConnectionErrors.CONNECTION_DROPPED_ERROR,
reason: 'xmpp-conn-dropped: ' + message
});
}
return state;
}
function _mediaPermissionPromptVisibilityChanged(state, action) {
return (0, _redux.assign)(state, {
browser: action.browser,
isMediaPermissionPromptVisible: action.isVisible
});
}
function _suspendDetected(state) {
return (0, _redux.set)(state, 'suspendDetected', true);
}
}, 923, null, "jitsi-meet/react/features/overlay/reducer.js");
__d(/* jitsi-meet/react/features/toolbox/index.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _actions = require(925 ); // 925 = ./actions
Object.keys(_actions).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _actions[key];
}
});
});
var _actionTypes = require(926 ); // 926 = ./actionTypes
Object.keys(_actionTypes).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _actionTypes[key];
}
});
});
var _components = require(928 ); // 928 = ./components
Object.keys(_components).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _components[key];
}
});
});
require(937 ); // 937 = ./middleware
require(938 ); // 938 = ./reducer
}, 924, null, "jitsi-meet/react/features/toolbox/index.js");
__d(/* jitsi-meet/react/features/toolbox/actions.native.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
exports.changeLocalRaiseHand = changeLocalRaiseHand;
exports.clearToolboxTimeout = clearToolboxTimeout;
exports.setSubject = setSubject;
exports.setSubjectSlideIn = setSubjectSlideIn;
exports.setToolbarButton = setToolbarButton;
exports.setToolbarHovered = setToolbarHovered;
exports.setToolboxAlwaysVisible = setToolboxAlwaysVisible;
exports.setToolboxEnabled = setToolboxEnabled;
exports.setToolboxTimeout = setToolboxTimeout;
exports.setToolboxTimeoutMS = setToolboxTimeoutMS;
exports.setToolboxVisible = setToolboxVisible;
exports.showEtherpadButton = showEtherpadButton;
exports.toggleFullScreen = toggleFullScreen;
exports.toggleToolbarButton = toggleToolbarButton;
var _actionTypes = require(926 ); // 926 = ./actionTypes
var _functions = require(927 ); // 927 = ./functions.native
function changeLocalRaiseHand(handRaised) {
return function (dispatch, getState) {
var buttonName = 'raisehand';
var button = (0, _functions.getButton)(buttonName, getState());
button.toggled = handRaised;
dispatch(setToolbarButton(buttonName, button));
};
}
function clearToolboxTimeout() {
return {
type: _actionTypes.CLEAR_TOOLBOX_TIMEOUT
};
}
function setSubject(subject) {
return {
type: _actionTypes.SET_SUBJECT,
subject: subject
};
}
function setSubjectSlideIn(subjectSlideIn) {
return {
type: _actionTypes.SET_SUBJECT_SLIDE_IN,
subjectSlideIn: subjectSlideIn
};
}
function setToolbarButton(buttonName, button) {
return {
type: _actionTypes.SET_TOOLBAR_BUTTON,
button: button,
buttonName: buttonName
};
}
function setToolbarHovered(hovered) {
return {
type: _actionTypes.SET_TOOLBAR_HOVERED,
hovered: hovered
};
}
function setToolboxAlwaysVisible(alwaysVisible) {
return {
type: _actionTypes.SET_TOOLBOX_ALWAYS_VISIBLE,
alwaysVisible: alwaysVisible
};
}
function setToolboxEnabled(enabled) {
return {
type: _actionTypes.SET_TOOLBOX_ENABLED,
enabled: enabled
};
}
function setToolboxTimeout(handler, timeoutMS) {
return {
type: _actionTypes.SET_TOOLBOX_TIMEOUT,
handler: handler,
timeoutMS: timeoutMS
};
}
function setToolboxTimeoutMS(timeoutMS) {
return {
type: _actionTypes.SET_TOOLBOX_TIMEOUT_MS,
timeoutMS: timeoutMS
};
}
function setToolboxVisible(visible) {
return {
type: _actionTypes.SET_TOOLBOX_VISIBLE,
visible: visible
};
}
function showEtherpadButton() {
return function (dispatch) {
dispatch(setToolbarButton('etherpad', {
hidden: false
}));
};
}
function toggleFullScreen(isFullScreen) {
return function (dispatch, getState) {
var buttonName = 'fullscreen';
var button = (0, _functions.getButton)(buttonName, getState());
button.toggled = isFullScreen;
dispatch(setToolbarButton(buttonName, button));
};
}
function toggleToolbarButton(buttonName) {
return function (dispatch, getState) {
var button = (0, _functions.getButton)(buttonName, getState());
dispatch(setToolbarButton(buttonName, {
toggled: !button.toggled
}));
};
}
}, 925, null, "jitsi-meet/react/features/toolbox/actions.native.js");
__d(/* jitsi-meet/react/features/toolbox/actionTypes.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var CLEAR_TOOLBOX_TIMEOUT = exports.CLEAR_TOOLBOX_TIMEOUT = Symbol('CLEAR_TOOLBOX_TIMEOUT');
var SET_DEFAULT_TOOLBOX_BUTTONS = exports.SET_DEFAULT_TOOLBOX_BUTTONS = Symbol('SET_DEFAULT_TOOLBOX_BUTTONS');
var SET_SUBJECT = exports.SET_SUBJECT = Symbol('SET_SUBJECT');
var SET_SUBJECT_SLIDE_IN = exports.SET_SUBJECT_SLIDE_IN = Symbol('SET_SUBJECT_SLIDE_IN');
var SET_TOOLBAR_BUTTON = exports.SET_TOOLBAR_BUTTON = Symbol('SET_TOOLBAR_BUTTON');
var SET_TOOLBAR_HOVERED = exports.SET_TOOLBAR_HOVERED = Symbol('SET_TOOLBAR_HOVERED');
var SET_TOOLBOX_ALWAYS_VISIBLE = exports.SET_TOOLBOX_ALWAYS_VISIBLE = Symbol('SET_TOOLBOX_ALWAYS_VISIBLE');
var SET_TOOLBOX_ENABLED = exports.SET_TOOLBOX_ENABLED = Symbol('SET_TOOLBOX_ENABLED');
var SET_TOOLBOX_TIMEOUT = exports.SET_TOOLBOX_TIMEOUT = Symbol('SET_TOOLBOX_TIMEOUT');
var SET_TOOLBOX_TIMEOUT_MS = exports.SET_TOOLBOX_TIMEOUT_MS = Symbol('SET_TOOLBOX_TIMEOUT');
var SET_TOOLBOX_VISIBLE = exports.SET_TOOLBOX_VISIBLE = Symbol('SET_TOOLBOX_VISIBLE');
}, 926, null, "jitsi-meet/react/features/toolbox/actionTypes.js");
__d(/* jitsi-meet/react/features/toolbox/functions.native.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
exports.abstractMapDispatchToProps = abstractMapDispatchToProps;
exports.abstractMapStateToProps = abstractMapStateToProps;
exports.getButton = getButton;
var _app = require(430 ); // 430 = ../app
var _media = require(567 ); // 567 = ../base/media
var _tracks = require(580 ); // 580 = ../base/tracks
function abstractMapDispatchToProps(dispatch) {
return {
_onHangup: function _onHangup() {
dispatch((0, _app.appNavigate)(undefined));
},
_onToggleAudio: function _onToggleAudio() {
dispatch((0, _media.toggleAudioMuted)());
},
_onToggleVideo: function _onToggleVideo() {
dispatch((0, _media.toggleVideoMuted)());
}
};
}
function abstractMapStateToProps(state) {
var tracks = state['features/base/tracks'];
var visible = state['features/toolbox'].visible;
var audioTrack = (0, _tracks.getLocalAudioTrack)(tracks);
var videoTrack = (0, _tracks.getLocalVideoTrack)(tracks);
return {
_audioMuted: !audioTrack || audioTrack.muted,
_videoMuted: !videoTrack || videoTrack.muted,
_visible: visible
};
}
function getButton(buttonName, state) {
var _state$featuresToolb = state['features/toolbox'],
primaryToolbarButtons = _state$featuresToolb.primaryToolbarButtons,
secondaryToolbarButtons = _state$featuresToolb.secondaryToolbarButtons;
return primaryToolbarButtons.get(buttonName) || secondaryToolbarButtons.get(buttonName);
}
}, 927, null, "jitsi-meet/react/features/toolbox/functions.native.js");
__d(/* jitsi-meet/react/features/toolbox/components/index.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _Toolbox = require(929 ); // 929 = ./Toolbox
Object.defineProperty(exports, 'Toolbox', {
enumerable: true,
get: function get() {
return babelHelpers.interopRequireDefault(_Toolbox).default;
}
});
}, 928, null, "jitsi-meet/react/features/toolbox/components/index.js");
__d(/* jitsi-meet/react/features/toolbox/components/Toolbox.native.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/react/features/toolbox/components/Toolbox.native.js';
var _react = require(34 ); // 34 = react
var _react2 = babelHelpers.interopRequireDefault(_react);
var _reactNative = require(69 ); // 69 = react-native
var _reactRedux = require(548 ); // 548 = react-redux
var _conference = require(432 ); // 432 = ../../base/conference
var _media = require(567 ); // 567 = ../../base/media
var _react3 = require(589 ); // 589 = ../../base/react
var _styles = require(601 ); // 601 = ../../base/styles
var _roomLock = require(621 ); // 621 = ../../room-lock
var _shareRoom = require(930 ); // 930 = ../../share-room
var _functions = require(927 ); // 927 = ../functions
var _styles2 = require(934 ); // 934 = ./styles
var _styles3 = babelHelpers.interopRequireDefault(_styles2);
var _ToolbarButton = require(935 ); // 935 = ./ToolbarButton
var _ToolbarButton2 = babelHelpers.interopRequireDefault(_ToolbarButton);
var Toolbox = function (_Component) {
babelHelpers.inherits(Toolbox, _Component);
function Toolbox() {
babelHelpers.classCallCheck(this, Toolbox);
return babelHelpers.possibleConstructorReturn(this, (Toolbox.__proto__ || Object.getPrototypeOf(Toolbox)).apply(this, arguments));
}
babelHelpers.createClass(Toolbox, [{
key: 'render',
value: function render() {
return _react2.default.createElement(
_react3.Container,
{
style: _styles3.default.toolbarContainer,
visible: this.props._visible, __source: {
fileName: _jsxFileName,
lineNumber: 99
}
},
this._renderPrimaryToolbar(),
this._renderSecondaryToolbar()
);
}
}, {
key: '_getMuteButtonStyles',
value: function _getMuteButtonStyles(mediaType) {
var iconName = void 0;
var iconStyle = void 0;
var style = void 0;
if (this.props['_' + mediaType + 'Muted']) {
iconName = this[mediaType + 'MutedIcon'];
iconStyle = _styles3.default.whitePrimaryToolbarButtonIcon;
style = _styles3.default.whitePrimaryToolbarButton;
} else {
iconName = this[mediaType + 'Icon'];
iconStyle = _styles3.default.primaryToolbarButtonIcon;
style = _styles3.default.primaryToolbarButton;
}
return {
iconName: iconName,
iconStyle: iconStyle,
style: style
};
}
}, {
key: '_renderPrimaryToolbar',
value: function _renderPrimaryToolbar() {
var audioButtonStyles = this._getMuteButtonStyles(_media.MEDIA_TYPE.AUDIO);
var videoButtonStyles = this._getMuteButtonStyles(_media.MEDIA_TYPE.VIDEO);
return _react2.default.createElement(
_reactNative.View,
{ style: _styles3.default.primaryToolbar, __source: {
fileName: _jsxFileName,
lineNumber: 161
}
},
_react2.default.createElement(_ToolbarButton2.default, {
iconName: audioButtonStyles.iconName,
iconStyle: audioButtonStyles.iconStyle,
onClick: this.props._onToggleAudio,
style: audioButtonStyles.style, __source: {
fileName: _jsxFileName,
lineNumber: 162
}
}),
_react2.default.createElement(_ToolbarButton2.default, {
iconName: 'hangup',
iconStyle: _styles3.default.whitePrimaryToolbarButtonIcon,
onClick: this.props._onHangup,
style: _styles3.default.hangup,
underlayColor: _styles.ColorPalette.buttonUnderlay, __source: {
fileName: _jsxFileName,
lineNumber: 167
}
}),
_react2.default.createElement(_ToolbarButton2.default, {
disabled: this.props._audioOnly,
iconName: videoButtonStyles.iconName,
iconStyle: videoButtonStyles.iconStyle,
onClick: this.props._onToggleVideo,
style: videoButtonStyles.style, __source: {
fileName: _jsxFileName,
lineNumber: 173
}
})
);
}
}, {
key: '_renderSecondaryToolbar',
value: function _renderSecondaryToolbar() {
var iconStyle = _styles3.default.secondaryToolbarButtonIcon;
var style = _styles3.default.secondaryToolbarButton;
var underlayColor = 'transparent';
var _props = this.props,
audioOnly = _props._audioOnly,
videoMuted = _props._videoMuted;
return _react2.default.createElement(
_reactNative.View,
{ style: _styles3.default.secondaryToolbar, __source: {
fileName: _jsxFileName,
lineNumber: 204
}
},
_react2.default.createElement(_ToolbarButton2.default, {
disabled: audioOnly || videoMuted,
iconName: 'switch-camera',
iconStyle: iconStyle,
onClick: this.props._onToggleCameraFacingMode,
style: style,
underlayColor: underlayColor, __source: {
fileName: _jsxFileName,
lineNumber: 205
}
}),
_react2.default.createElement(_ToolbarButton2.default, {
iconName: this.props._locked ? 'security-locked' : 'security',
iconStyle: iconStyle,
onClick: this.props._onRoomLock,
style: style,
underlayColor: underlayColor, __source: {
fileName: _jsxFileName,
lineNumber: 212
}
}),
_react2.default.createElement(_ToolbarButton2.default, {
iconName: audioOnly ? 'visibility-off' : 'visibility',
iconStyle: iconStyle,
onClick: this.props._onToggleAudioOnly,
style: style,
underlayColor: underlayColor, __source: {
fileName: _jsxFileName,
lineNumber: 220
}
}),
_react2.default.createElement(_ToolbarButton2.default, {
iconName: 'link',
iconStyle: iconStyle,
onClick: this.props._onShareRoom,
style: style,
underlayColor: underlayColor, __source: {
fileName: _jsxFileName,
lineNumber: 226
}
})
);
}
}]);
return Toolbox;
}(_react.Component);
Toolbox.propTypes = {
_audioMuted: _react2.default.PropTypes.bool,
_audioOnly: _react2.default.PropTypes.bool,
_locked: _react2.default.PropTypes.bool,
_onHangup: _react2.default.PropTypes.func,
_onRoomLock: _react2.default.PropTypes.func,
_onShareRoom: _react2.default.PropTypes.func,
_onToggleAudio: _react2.default.PropTypes.func,
_onToggleAudioOnly: _react2.default.PropTypes.func,
_onToggleCameraFacingMode: _react2.default.PropTypes.func,
_onToggleVideo: _react2.default.PropTypes.func,
_videoMuted: _react2.default.PropTypes.bool,
_visible: _react2.default.PropTypes.bool
};
babelHelpers.extends(Toolbox.prototype, {
audioIcon: 'microphone',
audioMutedIcon: 'mic-disabled',
videoIcon: 'camera',
videoMutedIcon: 'camera-disabled'
});
function _mapDispatchToProps(dispatch) {
return babelHelpers.extends({}, (0, _functions.abstractMapDispatchToProps)(dispatch), {
_onRoomLock: function _onRoomLock() {
dispatch((0, _roomLock.beginRoomLockRequest)());
},
_onShareRoom: function _onShareRoom() {
dispatch((0, _shareRoom.beginShareRoom)());
},
_onToggleAudioOnly: function _onToggleAudioOnly() {
dispatch((0, _conference.toggleAudioOnly)());
},
_onToggleCameraFacingMode: function _onToggleCameraFacingMode() {
dispatch((0, _media.toggleCameraFacingMode)());
}
});
}
function _mapStateToProps(state) {
var conference = state['features/base/conference'];
return babelHelpers.extends({}, (0, _functions.abstractMapStateToProps)(state), {
_audioOnly: Boolean(conference.audioOnly),
_locked: Boolean(conference.locked)
});
}
exports.default = (0, _reactRedux.connect)(_mapStateToProps, _mapDispatchToProps)(Toolbox);
}, 929, null, "jitsi-meet/react/features/toolbox/components/Toolbox.native.js");
__d(/* jitsi-meet/react/features/share-room/index.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _actions = require(931 ); // 931 = ./actions
Object.keys(_actions).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _actions[key];
}
});
});
var _actionTypes = require(932 ); // 932 = ./actionTypes
Object.keys(_actionTypes).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _actionTypes[key];
}
});
});
require(933 ); // 933 = ./middleware
}, 930, null, "jitsi-meet/react/features/share-room/index.js");
__d(/* jitsi-meet/react/features/share-room/actions.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
exports.beginShareRoom = beginShareRoom;
exports.endShareRoom = endShareRoom;
var _connection = require(615 ); // 615 = ../base/connection
var _actionTypes = require(932 ); // 932 = ./actionTypes
function beginShareRoom(roomURL) {
return function (dispatch, getState) {
if (!roomURL) {
roomURL = (0, _connection.getInviteURL)(getState);
}
roomURL && dispatch({
type: _actionTypes.BEGIN_SHARE_ROOM,
roomURL: roomURL
});
};
}
function endShareRoom(roomURL, shared) {
return {
type: _actionTypes.END_SHARE_ROOM,
roomURL: roomURL,
shared: shared
};
}
}, 931, null, "jitsi-meet/react/features/share-room/actions.js");
__d(/* jitsi-meet/react/features/share-room/actionTypes.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var BEGIN_SHARE_ROOM = exports.BEGIN_SHARE_ROOM = Symbol('BEGIN_SHARE_ROOM');
var END_SHARE_ROOM = exports.END_SHARE_ROOM = Symbol('END_SHARE_ROOM');
}, 932, null, "jitsi-meet/react/features/share-room/actionTypes.js");
__d(/* jitsi-meet/react/features/share-room/middleware.js */function(global, require, module, exports) {var _reactNative = require(69 ); // 69 = react-native
var _redux = require(505 ); // 505 = ../base/redux
var _actions = require(931 ); // 931 = ./actions
var _actionTypes = require(932 ); // 932 = ./actionTypes
_redux.MiddlewareRegistry.register(function (store) {
return function (next) {
return function (action) {
switch (action.type) {
case _actionTypes.BEGIN_SHARE_ROOM:
_shareRoom(action.roomURL, store.dispatch);
break;
}
return next(action);
};
};
});
function _shareRoom(roomURL, dispatch) {
var message = 'Click the following link to join the meeting: ' + roomURL;
var title = 'Jitsi Meet Conference';
var onFulfilled = function onFulfilled(shared) {
return dispatch((0, _actions.endShareRoom)(roomURL, shared));
};
_reactNative.Share.share({
message: message,
title: title
}, {
dialogTitle: title,
subject: title }).then(function (value) {
onFulfilled(value.action === _reactNative.Share.sharedAction);
}, function (reason) {
console.error('Failed to share conference/room URL ' + roomURL + ':', reason);
onFulfilled(false);
});
}
}, 933, null, "jitsi-meet/react/features/share-room/middleware.js");
__d(/* jitsi-meet/react/features/toolbox/components/styles.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _styles = require(601 ); // 601 = ../../base/styles
var _toolbar = {
flex: 1,
position: 'absolute'
};
var _toolbarButton = {
flex: 0,
justifyContent: 'center',
opacity: 0.7
};
var _toolbarButtonIcon = {
alignSelf: 'center'
};
var primaryToolbarButton = babelHelpers.extends({}, _toolbarButton, {
backgroundColor: _styles.ColorPalette.white,
borderRadius: 30,
borderWidth: 0,
flexDirection: 'row',
height: 60,
margin: _styles.BoxModel.margin,
width: 60
});
var primaryToolbarButtonIcon = babelHelpers.extends({}, _toolbarButtonIcon, {
color: _styles.ColorPalette.darkGrey,
fontSize: 24
});
var secondaryToolbarButtonIcon = babelHelpers.extends({}, _toolbarButtonIcon, {
color: _styles.ColorPalette.white,
fontSize: 18
});
exports.default = (0, _styles.createStyleSheet)({
hangup: babelHelpers.extends({}, primaryToolbarButton, {
backgroundColor: _styles.ColorPalette.red
}),
primaryToolbar: babelHelpers.extends({}, _toolbar, {
bottom: 3 * _styles.BoxModel.margin,
flexDirection: 'row',
justifyContent: 'center',
left: 0,
right: 0
}),
primaryToolbarButton: primaryToolbarButton,
primaryToolbarButtonIcon: primaryToolbarButtonIcon,
secondaryToolbar: babelHelpers.extends({}, _toolbar, {
bottom: 0,
flexDirection: 'column',
right: _styles.BoxModel.margin,
top: _styles.BoxModel.margin * 2
}),
secondaryToolbarButton: babelHelpers.extends({}, _toolbarButton, {
backgroundColor: _styles.ColorPalette.darkGrey,
borderRadius: 20,
flexDirection: 'column',
height: 40,
margin: _styles.BoxModel.margin / 2,
width: 40
}),
secondaryToolbarButtonIcon: secondaryToolbarButtonIcon,
toolbarContainer: {
bottom: 0,
left: 0,
position: 'absolute',
right: 0,
top: 0
},
whitePrimaryToolbarButton: babelHelpers.extends({}, primaryToolbarButton, {
backgroundColor: _styles.ColorPalette.buttonUnderlay
}),
whitePrimaryToolbarButtonIcon: babelHelpers.extends({}, primaryToolbarButtonIcon, {
color: _styles.ColorPalette.white
})
});
}, 934, null, "jitsi-meet/react/features/toolbox/components/styles.js");
__d(/* jitsi-meet/react/features/toolbox/components/ToolbarButton.native.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _react = require(34 ); // 34 = react
var _react2 = babelHelpers.interopRequireDefault(_react);
var _reactNative = require(69 ); // 69 = react-native
var _reactRedux = require(548 ); // 548 = react-redux
var _fontIcons = require(708 ); // 708 = ../../base/font-icons
var _AbstractToolbarButton = require(936 ); // 936 = ./AbstractToolbarButton
var _AbstractToolbarButton2 = babelHelpers.interopRequireDefault(_AbstractToolbarButton);
var ToolbarButton = function (_AbstractToolbarButto) {
babelHelpers.inherits(ToolbarButton, _AbstractToolbarButto);
function ToolbarButton() {
babelHelpers.classCallCheck(this, ToolbarButton);
return babelHelpers.possibleConstructorReturn(this, (ToolbarButton.__proto__ || Object.getPrototypeOf(ToolbarButton)).apply(this, arguments));
}
babelHelpers.createClass(ToolbarButton, [{
key: '_renderButton',
value: function _renderButton(children) {
var props = {};
'disabled' in this.props && (props.disabled = this.props.disabled);
'onClick' in this.props && (props.onPress = this._onClick);
'style' in this.props && (props.style = this.props.style);
'underlayColor' in this.props && (props.underlayColor = this.props.underlayColor);
return _react2.default.createElement(_reactNative.TouchableHighlight, props, children);
}
}, {
key: '_renderIcon',
value: function _renderIcon() {
return babelHelpers.get(ToolbarButton.prototype.__proto__ || Object.getPrototypeOf(ToolbarButton.prototype), '_renderIcon', this).call(this, _fontIcons.Icon);
}
}]);
return ToolbarButton;
}(_AbstractToolbarButton2.default);
ToolbarButton.propTypes = babelHelpers.extends({}, _AbstractToolbarButton2.default.propTypes, {
disabled: _react2.default.PropTypes.bool
});
exports.default = (0, _reactRedux.connect)()(ToolbarButton);
}, 935, null, "jitsi-meet/react/features/toolbox/components/ToolbarButton.native.js");
__d(/* jitsi-meet/react/features/toolbox/components/AbstractToolbarButton.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _react = require(34 ); // 34 = react
var _react2 = babelHelpers.interopRequireDefault(_react);
var AbstractToolbarButton = function (_Component) {
babelHelpers.inherits(AbstractToolbarButton, _Component);
function AbstractToolbarButton(props) {
babelHelpers.classCallCheck(this, AbstractToolbarButton);
var _this = babelHelpers.possibleConstructorReturn(this, (AbstractToolbarButton.__proto__ || Object.getPrototypeOf(AbstractToolbarButton)).call(this, props));
_this._onClick = _this._onClick.bind(_this);
return _this;
}
babelHelpers.createClass(AbstractToolbarButton, [{
key: '_onClick',
value: function _onClick() {
var onClick = this.props.onClick;
return onClick && onClick.apply(undefined, arguments);
}
}, {
key: 'render',
value: function render() {
return this._renderButton(this._renderIcon());
}
}, {
key: '_renderIcon',
value: function _renderIcon(type) {
var props = {};
'iconName' in this.props && (props.name = this.props.iconName);
'iconStyle' in this.props && (props.style = this.props.iconStyle);
return _react2.default.createElement(type, props);
}
}]);
return AbstractToolbarButton;
}(_react.Component);
AbstractToolbarButton.propTypes = {
iconName: _react2.default.PropTypes.string,
iconStyle: _react2.default.PropTypes.object,
onClick: _react2.default.PropTypes.func,
style: _react2.default.PropTypes.oneOfType([_react2.default.PropTypes.array, _react2.default.PropTypes.object]),
underlayColor: _react2.default.PropTypes.any
};
exports.default = AbstractToolbarButton;
}, 936, null, "jitsi-meet/react/features/toolbox/components/AbstractToolbarButton.js");
__d(/* jitsi-meet/react/features/toolbox/middleware.js */function(global, require, module, exports) {var _media = require(567 ); // 567 = ../base/media
var _redux = require(505 ); // 505 = ../base/redux
var _actions = require(925 ); // 925 = ./actions
var _actionTypes = require(926 ); // 926 = ./actionTypes
_redux.MiddlewareRegistry.register(function (store) {
return function (next) {
return function (action) {
switch (action.type) {
case _actionTypes.CLEAR_TOOLBOX_TIMEOUT:
{
var timeoutID = store.getState()['features/toolbox'].timeoutID;
clearTimeout(timeoutID);
break;
}
case _actionTypes.SET_TOOLBOX_TIMEOUT:
{
var _timeoutID = store.getState()['features/toolbox'].timeoutID;
var handler = action.handler,
timeoutMS = action.timeoutMS;
clearTimeout(_timeoutID);
var newTimeoutId = setTimeout(handler, timeoutMS);
action.timeoutID = newTimeoutId;
break;
}
case _media.SET_AUDIO_AVAILABLE:
case _media.SET_AUDIO_MUTED:
{
return _setAudioAvailableOrMuted(store, next, action);
}
case _media.SET_VIDEO_AVAILABLE:
case _media.SET_VIDEO_MUTED:
return _setVideoAvailableOrMuted(store, next, action);
}
return next(action);
};
};
});
function _setAudioAvailableOrMuted(_ref, next, action) {
var dispatch = _ref.dispatch,
getState = _ref.getState;
var result = next(action);
var _getState$featuresBa = getState()['features/base/media'].audio,
available = _getState$featuresBa.available,
muted = _getState$featuresBa.muted;
var i18nKey = available ? 'mute' : 'micDisabled';
dispatch((0, _actions.setToolbarButton)('microphone', {
enabled: available,
i18n: '[content]toolbar.' + i18nKey,
toggled: available ? muted : true
}));
return result;
}
function _setVideoAvailableOrMuted(_ref2, next, action) {
var dispatch = _ref2.dispatch,
getState = _ref2.getState;
var result = next(action);
var _getState$featuresBa2 = getState()['features/base/media'].video,
available = _getState$featuresBa2.available,
muted = _getState$featuresBa2.muted;
var i18nKey = available ? 'videomute' : 'cameraDisabled';
dispatch((0, _actions.setToolbarButton)('camera', {
enabled: available,
i18n: '[content]toolbar.' + i18nKey,
toggled: available ? muted : true
}));
return result;
}
}, 937, null, "jitsi-meet/react/features/toolbox/middleware.js");
__d(/* jitsi-meet/react/features/toolbox/reducer.js */function(global, require, module, exports) {var _redux = require(505 ); // 505 = ../base/redux
var _actionTypes = require(926 ); // 926 = ./actionTypes
var _defaultToolbarButtons = require(939 ); // 939 = ./defaultToolbarButtons
var _defaultToolbarButtons2 = babelHelpers.interopRequireDefault(_defaultToolbarButtons);
function _getInitialState() {
var timeoutMS = 5000;
if (typeof interfaceConfig !== 'undefined' && interfaceConfig.INITIAL_TOOLBAR_TIMEOUT) {
timeoutMS = interfaceConfig.INITIAL_TOOLBAR_TIMEOUT;
}
return {
alwaysVisible: false,
enabled: true,
hovered: false,
primaryToolbarButtons: new Map(),
secondaryToolbarButtons: new Map(),
subject: '',
subjectSlideIn: false,
timeoutID: null,
timeoutMS: timeoutMS,
visible: false
};
}
_redux.ReducerRegistry.register('features/toolbox', function () {
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _getInitialState();
var action = arguments[1];
switch (action.type) {
case _actionTypes.CLEAR_TOOLBOX_TIMEOUT:
return babelHelpers.extends({}, state, {
timeoutID: undefined
});
case _actionTypes.SET_DEFAULT_TOOLBOX_BUTTONS:
{
var primaryToolbarButtons = action.primaryToolbarButtons,
secondaryToolbarButtons = action.secondaryToolbarButtons;
return babelHelpers.extends({}, state, {
primaryToolbarButtons: primaryToolbarButtons,
secondaryToolbarButtons: secondaryToolbarButtons
});
}
case _actionTypes.SET_SUBJECT:
return babelHelpers.extends({}, state, {
subject: action.subject
});
case _actionTypes.SET_SUBJECT_SLIDE_IN:
return babelHelpers.extends({}, state, {
subjectSlideIn: action.subjectSlideIn
});
case _actionTypes.SET_TOOLBAR_BUTTON:
return _setButton(state, action);
case _actionTypes.SET_TOOLBAR_HOVERED:
return babelHelpers.extends({}, state, {
hovered: action.hovered
});
case _actionTypes.SET_TOOLBOX_ALWAYS_VISIBLE:
return babelHelpers.extends({}, state, {
alwaysVisible: action.alwaysVisible
});
case _actionTypes.SET_TOOLBOX_ENABLED:
return babelHelpers.extends({}, state, {
enabled: action.enabled
});
case _actionTypes.SET_TOOLBOX_TIMEOUT:
return babelHelpers.extends({}, state, {
timeoutID: action.timeoutID,
timeoutMS: action.timeoutMS
});
case _actionTypes.SET_TOOLBOX_TIMEOUT_MS:
return babelHelpers.extends({}, state, {
timeoutMS: action.timeoutMS
});
case _actionTypes.SET_TOOLBOX_VISIBLE:
return babelHelpers.extends({}, state, {
visible: action.visible
});
}
return state;
});
function _setButton(state, _ref) {
var button = _ref.button,
buttonName = _ref.buttonName;
var buttonDefinition = _defaultToolbarButtons2.default[buttonName];
if (!buttonDefinition || !buttonDefinition.isDisplayed()) {
return babelHelpers.extends({}, state);
}
var primaryToolbarButtons = state.primaryToolbarButtons,
secondaryToolbarButtons = state.secondaryToolbarButtons;
var selectedButton = primaryToolbarButtons.get(buttonName);
var place = 'primaryToolbarButtons';
if (!selectedButton) {
selectedButton = secondaryToolbarButtons.get(buttonName);
place = 'secondaryToolbarButtons';
}
selectedButton = babelHelpers.extends({}, selectedButton, button);
var updatedToolbar = state[place].set(buttonName, selectedButton);
return babelHelpers.extends({}, state, babelHelpers.defineProperty({}, place, new Map(updatedToolbar)));
}
}, 938, null, "jitsi-meet/react/features/toolbox/reducer.js");
__d(/* jitsi-meet/react/features/toolbox/defaultToolbarButtons.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/react/features/toolbox/defaultToolbarButtons.js';
var _react = require(34 ); // 34 = react
var _react2 = babelHelpers.interopRequireDefault(_react);
var _deviceSelection = require(940 ); // 940 = ../device-selection
var _dialOut = require(963 ); // 963 = ../dial-out
var _invite = require(969 ); // 969 = ../invite
var _UIEvents = require(608 ); // 608 = ../../../service/UI/UIEvents
var _UIEvents2 = babelHelpers.interopRequireDefault(_UIEvents);
var buttons = {
addtocall: {
classNames: ['button', 'icon-add'],
enabled: true,
id: 'toolbar_button_add',
isDisplayed: function isDisplayed() {
return !APP.store.getState()['features/jwt'].isGuest;
},
onClick: function onClick() {
JitsiMeetJS.analytics.sendEvent('toolbar.add.clicked');
return (0, _invite.openAddPeopleDialog)();
},
tooltipKey: 'toolbar.addPeople'
},
camera: {
classNames: ['button', 'icon-camera'],
enabled: true,
isDisplayed: function isDisplayed() {
return true;
},
id: 'toolbar_button_camera',
onClick: function onClick() {
if (APP.conference.videoMuted) {
JitsiMeetJS.analytics.sendEvent('toolbar.video.enabled');
APP.UI.emitEvent(_UIEvents2.default.VIDEO_MUTED, false);
} else {
JitsiMeetJS.analytics.sendEvent('toolbar.video.disabled');
APP.UI.emitEvent(_UIEvents2.default.VIDEO_MUTED, true);
}
},
popups: [{
className: 'loginmenu',
dataAttr: 'audioOnly.featureToggleDisabled',
dataInterpolate: { feature: 'video mute' },
id: 'unmuteWhileAudioOnly'
}],
shortcut: 'V',
shortcutAttr: 'toggleVideoPopover',
shortcutFunc: function shortcutFunc() {
if (APP.conference.isAudioOnly()) {
APP.UI.emitEvent(_UIEvents2.default.VIDEO_UNMUTING_WHILE_AUDIO_ONLY);
return;
}
JitsiMeetJS.analytics.sendEvent('shortcut.videomute.toggled');
APP.conference.toggleVideoMuted();
},
shortcutDescription: 'keyboardShortcuts.videoMute',
tooltipKey: 'toolbar.videomute'
},
chat: {
classNames: ['button', 'icon-chat'],
enabled: true,
html: _react2.default.createElement(
'span',
{ className: 'badge-round', __source: {
fileName: _jsxFileName,
lineNumber: 78
}
},
_react2.default.createElement('span', { id: 'unreadMessages', __source: {
fileName: _jsxFileName,
lineNumber: 79
}
})
),
id: 'toolbar_button_chat',
onClick: function onClick() {
JitsiMeetJS.analytics.sendEvent('toolbar.chat.toggled');
APP.UI.emitEvent(_UIEvents2.default.TOGGLE_CHAT);
},
shortcut: 'C',
shortcutAttr: 'toggleChatPopover',
shortcutFunc: function shortcutFunc() {
JitsiMeetJS.analytics.sendEvent('shortcut.chat.toggled');
APP.UI.toggleChat();
},
shortcutDescription: 'keyboardShortcuts.toggleChat',
sideContainerId: 'chat_container',
tooltipKey: 'toolbar.chat'
},
contacts: {
classNames: ['button', 'icon-contactList'],
enabled: true,
html: _react2.default.createElement(
'span',
{ className: 'badge-round', __source: {
fileName: _jsxFileName,
lineNumber: 112
}
},
_react2.default.createElement(
'span',
{ id: 'numberOfParticipants', __source: {
fileName: _jsxFileName,
lineNumber: 113
}
},
'1'
)
),
id: 'toolbar_contact_list',
onClick: function onClick() {
JitsiMeetJS.analytics.sendEvent('toolbar.contacts.toggled');
APP.UI.emitEvent(_UIEvents2.default.TOGGLE_CONTACT_LIST);
},
sideContainerId: 'contacts_container',
tooltipKey: 'bottomtoolbar.contactlist'
},
desktop: {
classNames: ['button', 'icon-share-desktop'],
enabled: true,
id: 'toolbar_button_desktopsharing',
onClick: function onClick() {
if (APP.conference.isSharingScreen) {
JitsiMeetJS.analytics.sendEvent('toolbar.screen.disabled');
} else {
JitsiMeetJS.analytics.sendEvent('toolbar.screen.enabled');
}
APP.UI.emitEvent(_UIEvents2.default.TOGGLE_SCREENSHARING);
},
popups: [{
className: 'loginmenu',
dataAttr: 'audioOnly.featureToggleDisabled',
dataInterpolate: { feature: 'screen sharing' },
id: 'screenshareWhileAudioOnly'
}],
shortcut: 'D',
shortcutAttr: 'toggleDesktopSharingPopover',
shortcutFunc: function shortcutFunc() {
JitsiMeetJS.analytics.sendEvent('shortcut.screen.toggled');
APP.conference.toggleScreenSharing();
},
shortcutDescription: 'keyboardShortcuts.toggleScreensharing',
tooltipKey: 'toolbar.sharescreen'
},
dialout: {
classNames: ['button', 'icon-telephone'],
enabled: true,
hidden: true,
id: 'toolbar_button_dial_out',
onClick: function onClick() {
JitsiMeetJS.analytics.sendEvent('toolbar.sip.clicked');
return (0, _dialOut.openDialOutDialog)();
},
tooltipKey: 'dialOut.dialOut'
},
fodeviceselection: {
classNames: ['button', 'icon-settings'],
enabled: true,
isDisplayed: function isDisplayed() {
return interfaceConfig.filmStripOnly;
},
id: 'toolbar_button_fodeviceselection',
onClick: function onClick() {
JitsiMeetJS.analytics.sendEvent('toolbar.fodeviceselection.toggled');
return (0, _deviceSelection.openDeviceSelectionDialog)();
},
sideContainerId: 'settings_container',
tooltipKey: 'toolbar.Settings'
},
dialpad: {
classNames: ['button', 'icon-dialpad'],
enabled: true,
hidden: true,
id: 'toolbar_button_dialpad',
onClick: function onClick() {
JitsiMeetJS.analytics.sendEvent('toolbar.sip.dialpad.clicked');
},
tooltipKey: 'toolbar.dialpad'
},
etherpad: {
classNames: ['button', 'icon-share-doc'],
enabled: true,
hidden: true,
id: 'toolbar_button_etherpad',
onClick: function onClick() {
JitsiMeetJS.analytics.sendEvent('toolbar.etherpad.clicked');
APP.UI.emitEvent(_UIEvents2.default.ETHERPAD_CLICKED);
},
tooltipKey: 'toolbar.etherpad'
},
fullscreen: {
classNames: ['button', 'icon-full-screen'],
enabled: true,
id: 'toolbar_button_fullScreen',
onClick: function onClick() {
JitsiMeetJS.analytics.sendEvent('toolbar.fullscreen.enabled');
APP.UI.emitEvent(_UIEvents2.default.TOGGLE_FULLSCREEN);
},
shortcut: 'S',
shortcutAttr: 'toggleFullscreenPopover',
shortcutDescription: 'keyboardShortcuts.fullScreen',
shortcutFunc: function shortcutFunc() {
JitsiMeetJS.analytics.sendEvent('shortcut.fullscreen.toggled');
APP.UI.toggleFullScreen();
},
tooltipKey: 'toolbar.fullscreen'
},
hangup: {
classNames: ['button', 'icon-hangup', 'button_hangup'],
enabled: true,
isDisplayed: function isDisplayed() {
return true;
},
id: 'toolbar_button_hangup',
onClick: function onClick() {
JitsiMeetJS.analytics.sendEvent('toolbar.hangup');
APP.UI.emitEvent(_UIEvents2.default.HANGUP);
},
tooltipKey: 'toolbar.hangup'
},
invite: {
classNames: ['button', 'icon-link'],
enabled: true,
id: 'toolbar_button_link',
onClick: function onClick() {
JitsiMeetJS.analytics.sendEvent('toolbar.invite.clicked');
return (0, _invite.openInviteDialog)();
},
tooltipKey: 'toolbar.invite'
},
microphone: {
classNames: ['button', 'icon-microphone'],
enabled: true,
isDisplayed: function isDisplayed() {
return true;
},
id: 'toolbar_button_mute',
onClick: function onClick() {
var sharedVideoManager = APP.UI.getSharedVideoManager();
if (APP.conference.audioMuted) {
if (sharedVideoManager && sharedVideoManager.isSharedVideoVolumeOn() && !sharedVideoManager.isSharedVideoOwner()) {
APP.UI.showCustomToolbarPopup('#unableToUnmutePopup', true, 5000);
} else {
JitsiMeetJS.analytics.sendEvent('toolbar.audio.unmuted');
APP.UI.emitEvent(_UIEvents2.default.AUDIO_MUTED, false, true);
}
} else {
JitsiMeetJS.analytics.sendEvent('toolbar.audio.muted');
APP.UI.emitEvent(_UIEvents2.default.AUDIO_MUTED, true, true);
}
},
popups: [{
className: 'loginmenu',
dataAttr: 'toolbar.micMutedPopup',
id: 'micMutedPopup'
}, {
className: 'loginmenu',
dataAttr: 'toolbar.unableToUnmutePopup',
id: 'unableToUnmutePopup'
}, {
className: 'loginmenu',
dataAttr: 'toolbar.talkWhileMutedPopup',
id: 'talkWhileMutedPopup'
}],
shortcut: 'M',
shortcutAttr: 'mutePopover',
shortcutFunc: function shortcutFunc() {
JitsiMeetJS.analytics.sendEvent('shortcut.audiomute.toggled');
APP.conference.toggleAudioMuted();
},
shortcutDescription: 'keyboardShortcuts.mute',
tooltipKey: 'toolbar.mute'
},
profile: {
classNames: ['button'],
enabled: true,
html: _react2.default.createElement('img', {
id: 'avatar',
src: 'images/avatar2.png', __source: {
fileName: _jsxFileName,
lineNumber: 341
}
}),
id: 'toolbar_button_profile',
onClick: function onClick() {
JitsiMeetJS.analytics.sendEvent('toolbar.profile.toggled');
APP.UI.emitEvent(_UIEvents2.default.TOGGLE_PROFILE);
},
sideContainerId: 'profile_container',
tooltipKey: 'profile.setDisplayNameLabel'
},
raisehand: {
classNames: ['button', 'icon-raised-hand'],
enabled: true,
id: 'toolbar_button_raisehand',
onClick: function onClick() {
JitsiMeetJS.analytics.sendEvent('toolbar.raiseHand.clicked');
APP.conference.maybeToggleRaisedHand();
},
shortcut: 'R',
shortcutAttr: 'raiseHandPopover',
shortcutDescription: 'keyboardShortcuts.raiseHand',
shortcutFunc: function shortcutFunc() {
JitsiMeetJS.analytics.sendEvent('shortcut.raisehand.clicked');
APP.conference.maybeToggleRaisedHand();
},
tooltipKey: 'toolbar.raiseHand'
},
recording: {
classNames: ['button'],
enabled: true,
hidden: true,
id: 'toolbar_button_record',
tooltipKey: 'liveStreaming.buttonTooltip'
},
settings: {
classNames: ['button', 'icon-settings'],
enabled: true,
id: 'toolbar_button_settings',
onClick: function onClick() {
JitsiMeetJS.analytics.sendEvent('toolbar.settings.toggled');
APP.UI.emitEvent(_UIEvents2.default.TOGGLE_SETTINGS);
},
sideContainerId: 'settings_container',
tooltipKey: 'toolbar.Settings'
},
sharedvideo: {
classNames: ['button', 'icon-shared-video'],
enabled: true,
id: 'toolbar_button_sharedvideo',
onClick: function onClick() {
JitsiMeetJS.analytics.sendEvent('toolbar.sharedvideo.clicked');
APP.UI.emitEvent(_UIEvents2.default.SHARED_VIDEO_CLICKED);
},
popups: [{
className: 'loginmenu extendedToolbarPopup',
dataAttr: 'toolbar.sharedVideoMutedPopup',
dataAttrPosition: 'w',
id: 'sharedVideoMutedPopup'
}],
tooltipKey: 'toolbar.sharedvideo'
}
};
Object.keys(buttons).forEach(function (name) {
var button = buttons[name];
if (!button.isDisplayed) {
button.isDisplayed = function () {
return !interfaceConfig.filmStripOnly;
};
}
});
exports.default = buttons;
}, 939, null, "jitsi-meet/react/features/toolbox/defaultToolbarButtons.js");
__d(/* jitsi-meet/react/features/device-selection/index.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _actions = require(941 ); // 941 = ./actions
Object.keys(_actions).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _actions[key];
}
});
});
var _actionTypes = require(953 ); // 953 = ./actionTypes
Object.keys(_actionTypes).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _actionTypes[key];
}
});
});
var _components = require(954 ); // 954 = ./components
Object.keys(_components).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _components[key];
}
});
});
require(961 ); // 961 = ./middleware
require(962 ); // 962 = ./reducer
}, 940, null, "jitsi-meet/react/features/device-selection/index.js");
__d(/* jitsi-meet/react/features/device-selection/actions.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
exports.openDeviceSelectionDialog = openDeviceSelectionDialog;
var _dialog = require(623 ); // 623 = ../base/dialog
var _libJitsiMeet = require(434 ); // 434 = ../base/lib-jitsi-meet
var _libJitsiMeet2 = babelHelpers.interopRequireDefault(_libJitsiMeet);
var _constants = require(942 ); // 942 = ../../../modules/API/constants
var _devices = require(943 ); // 943 = ../base/devices
var _i18n = require(632 ); // 632 = ../base/i18n
var _transport = require(948 ); // 948 = ../../../modules/transport
var _actionTypes = require(953 ); // 953 = ./actionTypes
var _components = require(954 ); // 954 = ./components
function openDeviceSelectionDialog() {
return function (dispatch) {
if (interfaceConfig.filmStripOnly) {
dispatch(_openDeviceSelectionDialogInPopup());
} else {
dispatch(_openDeviceSelectionDialogHere());
}
};
}
function _openDeviceSelectionDialogHere() {
return function (dispatch) {
return _libJitsiMeet2.default.mediaDevices.isDeviceListAvailable().then(function (isDeviceListAvailable) {
dispatch((0, _dialog.openDialog)(_components.DeviceSelectionDialog, {
currentAudioInputId: APP.settings.getMicDeviceId(),
currentAudioOutputId: APP.settings.getAudioOutputDeviceId(),
currentVideoInputId: APP.settings.getCameraDeviceId(),
disableAudioInputChange: !_libJitsiMeet2.default.isMultipleAudioInputSupported(),
disableDeviceChange: !isDeviceListAvailable || !_libJitsiMeet2.default.mediaDevices.isDeviceChangeAvailable(),
hasAudioPermission: _libJitsiMeet2.default.mediaDevices.isDevicePermissionGranted.bind(null, 'audio'),
hasVideoPermission: _libJitsiMeet2.default.mediaDevices.isDevicePermissionGranted.bind(null, 'video'),
hideAudioInputPreview: !_libJitsiMeet2.default.isCollectingLocalStats(),
hideAudioOutputSelect: !_libJitsiMeet2.default.mediaDevices.isDeviceChangeAvailable('output')
}));
});
};
}
function _openDeviceSelectionDialogInPopup() {
return function (dispatch, getState) {
var popupDialogData = getState()['features/device-selection'].popupDialogData;
if (popupDialogData) {
popupDialogData.popup.focus();
return;
}
var scope = 'dialog_' + _constants.API_ID;
var url = window.location.origin + '/static/deviceSelectionPopup.html#scope=' + encodeURIComponent(JSON.stringify(scope));
var popup = window.open(url, 'device-selection-popup', 'toolbar=no,scrollbars=no,resizable=no,width=720,height=458');
popup.addEventListener('DOMContentLoaded', function () {
popup.init(_i18n.i18next);
});
var transport = new _transport.Transport({
backend: new _transport.PostMessageTransportBackend({
postisOptions: {
scope: scope,
window: popup
}
})
});
transport.on('request', _processRequest.bind(undefined, dispatch, getState));
transport.on('event', function (event) {
if (event.type === 'devices-dialog' && event.name === 'close') {
popup.close();
transport.dispose();
dispatch(_setDeviceSelectionPopupData());
return true;
}
return false;
});
dispatch(_setDeviceSelectionPopupData({
popup: popup,
transport: transport
}));
};
}
function _processRequest(dispatch, getState, request, responseCallback) {
if (request.type === 'devices') {
switch (request.name) {
case 'isDeviceListAvailable':
_libJitsiMeet2.default.mediaDevices.isDeviceListAvailable().then(function (isDeviceListAvailable) {
return responseCallback(isDeviceListAvailable);
}).catch(function (e) {
return responseCallback(null, e);
});
break;
case 'isDeviceChangeAvailable':
responseCallback(_libJitsiMeet2.default.mediaDevices.isDeviceChangeAvailable(request.deviceType));
break;
case 'isMultipleAudioInputSupported':
responseCallback(_libJitsiMeet2.default.isMultipleAudioInputSupported());
break;
case 'getCurrentDevices':
responseCallback({
audioInput: APP.settings.getMicDeviceId(),
audioOutput: APP.settings.getAudioOutputDeviceId(),
videoInput: APP.settings.getCameraDeviceId()
});
break;
case 'getAvailableDevices':
responseCallback(getState()['features/base/devices']);
break;
case 'setDevice':
{
var action = void 0;
var device = request.device;
switch (device.kind) {
case 'audioinput':
action = _devices.setAudioInputDevice;
break;
case 'audiooutput':
action = _devices.setAudioOutputDevice;
break;
case 'videoinput':
action = _devices.setVideoInputDevice;
break;
default:
}
dispatch(action(device.id));
responseCallback(true);
break;
}
default:
return false;
}
return true;
}
return false;
}
function _setDeviceSelectionPopupData(popupDialogData) {
return {
type: _actionTypes.SET_DEVICE_SELECTION_POPUP_DATA,
popupDialogData: popupDialogData
};
}
}, 941, null, "jitsi-meet/react/features/device-selection/actions.js");
__d(/* jitsi-meet/modules/API/constants.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
exports.API_ID = undefined;
var _parseURLParams = require(503 ); // 503 = ../../react/features/base/config/parseURLParams
var _parseURLParams2 = babelHelpers.interopRequireDefault(_parseURLParams);
var API_ID = exports.API_ID = (0, _parseURLParams2.default)(window.location).jitsi_meet_external_api_id;
}, 942, null, "jitsi-meet/modules/API/constants.js");
__d(/* jitsi-meet/react/features/base/devices/index.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _actions = require(944 ); // 944 = ./actions
Object.keys(_actions).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _actions[key];
}
});
});
var _actionTypes = require(945 ); // 945 = ./actionTypes
Object.keys(_actionTypes).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _actionTypes[key];
}
});
});
require(946 ); // 946 = ./middleware
require(947 ); // 947 = ./reducer
}, 943, null, "jitsi-meet/react/features/base/devices/index.js");
__d(/* jitsi-meet/react/features/base/devices/actions.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
exports.setAudioInputDevice = setAudioInputDevice;
exports.setAudioOutputDevice = setAudioOutputDevice;
exports.setVideoInputDevice = setVideoInputDevice;
exports.updateDeviceList = updateDeviceList;
var _actionTypes = require(945 ); // 945 = ./actionTypes
function setAudioInputDevice(deviceId) {
return {
type: _actionTypes.SET_AUDIO_INPUT_DEVICE,
deviceId: deviceId
};
}
function setAudioOutputDevice(deviceId) {
return {
type: _actionTypes.SET_AUDIO_OUTPUT_DEVICE,
deviceId: deviceId
};
}
function setVideoInputDevice(deviceId) {
return {
type: _actionTypes.SET_VIDEO_INPUT_DEVICE,
deviceId: deviceId
};
}
function updateDeviceList(devices) {
return {
type: _actionTypes.UPDATE_DEVICE_LIST,
devices: devices
};
}
}, 944, null, "jitsi-meet/react/features/base/devices/actions.js");
__d(/* jitsi-meet/react/features/base/devices/actionTypes.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var SET_AUDIO_INPUT_DEVICE = exports.SET_AUDIO_INPUT_DEVICE = Symbol('SET_AUDIO_INPUT_DEVICE');
var SET_AUDIO_OUTPUT_DEVICE = exports.SET_AUDIO_OUTPUT_DEVICE = Symbol('SET_AUDIO_OUTPUT_DEVICE');
var SET_VIDEO_INPUT_DEVICE = exports.SET_VIDEO_INPUT_DEVICE = Symbol('SET_VIDEO_INPUT_DEVICE');
var UPDATE_DEVICE_LIST = exports.UPDATE_DEVICE_LIST = Symbol('UPDATE_DEVICE_LIST');
}, 945, null, "jitsi-meet/react/features/base/devices/actionTypes.js");
__d(/* jitsi-meet/react/features/base/devices/middleware.js */function(global, require, module, exports) {var _UIEvents = require(608 ); // 608 = ../../../../service/UI/UIEvents
var _UIEvents2 = babelHelpers.interopRequireDefault(_UIEvents);
var _redux = require(505 ); // 505 = ../redux
var _actionTypes = require(945 ); // 945 = ./actionTypes
_redux.MiddlewareRegistry.register(function (store) {
return function (next) {
return function (action) {
switch (action.type) {
case _actionTypes.SET_AUDIO_INPUT_DEVICE:
APP.UI.emitEvent(_UIEvents2.default.AUDIO_DEVICE_CHANGED, action.deviceId);
break;
case _actionTypes.SET_AUDIO_OUTPUT_DEVICE:
APP.UI.emitEvent(_UIEvents2.default.AUDIO_OUTPUT_DEVICE_CHANGED, action.deviceId);
break;
case _actionTypes.SET_VIDEO_INPUT_DEVICE:
APP.UI.emitEvent(_UIEvents2.default.VIDEO_DEVICE_CHANGED, action.deviceId);
break;
}
return next(action);
};
};
});
}, 946, null, "jitsi-meet/react/features/base/devices/middleware.js");
__d(/* jitsi-meet/react/features/base/devices/reducer.js */function(global, require, module, exports) {var _actionTypes = require(945 ); // 945 = ./actionTypes
var _redux = require(505 ); // 505 = ../redux
var DEFAULT_STATE = {
audioInput: [],
audioOutput: [],
videoInput: []
};
_redux.ReducerRegistry.register('features/base/devices', function () {
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DEFAULT_STATE;
var action = arguments[1];
switch (action.type) {
case _actionTypes.UPDATE_DEVICE_LIST:
{
var deviceList = _groupDevicesByKind(action.devices);
return babelHelpers.extends({}, deviceList);
}
case _actionTypes.SET_AUDIO_INPUT_DEVICE:
case _actionTypes.SET_VIDEO_INPUT_DEVICE:
case _actionTypes.SET_AUDIO_OUTPUT_DEVICE:
default:
return state;
}
});
function _groupDevicesByKind(devices) {
return {
audioInput: devices.filter(function (device) {
return device.kind === 'audioinput';
}),
audioOutput: devices.filter(function (device) {
return device.kind === 'audiooutput';
}),
videoInput: devices.filter(function (device) {
return device.kind === 'videoinput';
})
};
}
}, 947, null, "jitsi-meet/react/features/base/devices/reducer.js");
__d(/* jitsi-meet/modules/transport/index.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
exports.Transport = exports.PostMessageTransportBackend = undefined;
exports.getJitsiMeetTransport = getJitsiMeetTransport;
var _constants = require(942 ); // 942 = ../API/constants
var _helpers = require(909 ); // 909 = ../util/helpers
var _PostMessageTransportBackend = require(949 ); // 949 = ./PostMessageTransportBackend
var _PostMessageTransportBackend2 = babelHelpers.interopRequireDefault(_PostMessageTransportBackend);
var _Transport = require(951 ); // 951 = ./Transport
var _Transport2 = babelHelpers.interopRequireDefault(_Transport);
exports.PostMessageTransportBackend = _PostMessageTransportBackend2.default;
exports.Transport = _Transport2.default;
var postisOptions = {};
if (typeof _constants.API_ID === 'number') {
postisOptions.scope = 'jitsi_meet_external_api_' + _constants.API_ID;
}
var transport = void 0;
function getJitsiMeetTransport() {
if (!transport) {
transport = new _Transport2.default({
backend: new _PostMessageTransportBackend2.default({
enableLegacyFormat: true,
postisOptions: postisOptions
})
});
}
return transport;
}
(0, _helpers.getJitsiMeetGlobalNS)().setExternalTransportBackend = function (externalTransportBackend) {
return transport.setBackend(externalTransportBackend);
};
}, 948, null, "jitsi-meet/modules/transport/index.js");
__d(/* jitsi-meet/modules/transport/PostMessageTransportBackend.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _postis = require(950 ); // 950 = postis
var _postis2 = babelHelpers.interopRequireDefault(_postis);
var DEFAULT_POSTIS_OPTIONS = {
window: window.opener || window.parent
};
var LEGACY_INCOMING_METHODS = ['avatar-url', 'display-name', 'email', 'toggle-audio', 'toggle-chat', 'toggle-contact-list', 'toggle-film-strip', 'toggle-share-screen', 'toggle-video', 'video-hangup'];
var LEGACY_OUTGOING_METHODS = ['display-name-change', 'incoming-message', 'outgoing-message', 'participant-joined', 'participant-left', 'video-conference-joined', 'video-conference-left', 'video-ready-to-close'];
var POSTIS_METHOD_NAME = 'message';
var PostMessageTransportBackend = function () {
function PostMessageTransportBackend() {
var _this = this;
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
enableLegacyFormat = _ref.enableLegacyFormat,
postisOptions = _ref.postisOptions;
babelHelpers.classCallCheck(this, PostMessageTransportBackend);
this.postis = (0, _postis2.default)(babelHelpers.extends({}, DEFAULT_POSTIS_OPTIONS, postisOptions));
this._enableLegacyFormat = enableLegacyFormat;
if (this._enableLegacyFormat) {
LEGACY_INCOMING_METHODS.forEach(function (method) {
return _this.postis.listen(method, function (params) {
return _this._legacyMessageReceivedCallback(method, params);
});
});
}
this._receiveCallback = function () {};
this.postis.listen(POSTIS_METHOD_NAME, function (message) {
return _this._receiveCallback(message);
});
}
babelHelpers.createClass(PostMessageTransportBackend, [{
key: '_legacyMessageReceivedCallback',
value: function _legacyMessageReceivedCallback(method) {
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
this._receiveCallback({
data: {
name: method,
data: params
}
});
}
}, {
key: '_sendLegacyMessage',
value: function _sendLegacyMessage(_ref2) {
var name = _ref2.name,
data = babelHelpers.objectWithoutProperties(_ref2, ['name']);
if (name && LEGACY_OUTGOING_METHODS.indexOf(name) !== -1) {
this.postis.send({
method: name,
params: data
});
}
}
}, {
key: 'dispose',
value: function dispose() {
this.postis.destroy();
}
}, {
key: 'send',
value: function send(message) {
this.postis.send({
method: POSTIS_METHOD_NAME,
params: message
});
if (this._enableLegacyFormat) {
this._sendLegacyMessage(message.data);
}
}
}, {
key: 'setReceiveCallback',
value: function setReceiveCallback(callback) {
this._receiveCallback = callback;
}
}]);
return PostMessageTransportBackend;
}();
exports.default = PostMessageTransportBackend;
}, 949, null, "jitsi-meet/modules/transport/PostMessageTransportBackend.js");
__d(/* postis/src/index.js */function(global, require, module, exports) {function Postis(options) {
var scope = options.scope;
var targetWindow = options.window;
var windowForEventListening = options.windowForEventListening || window;
var listeners = {};
var sendBuffer = [];
var listenBuffer = {};
var _ready = false;
var readyMethod = "__ready__";
var readynessCheck;
var listener = function listener(event) {
var data;
try {
data = JSON.parse(event.data);
} catch (e) {
return;
}
if (data.postis && data.scope === scope) {
var listenersForMethod = listeners[data.method];
if (listenersForMethod) {
for (var i = 0; i < listenersForMethod.length; i++) {
listenersForMethod[i].call(null, data.params);
}
} else {
listenBuffer[data.method] = listenBuffer[data.method] || [];
listenBuffer[data.method].push(data.params);
}
}
};
windowForEventListening.addEventListener("message", listener, false);
var postis = {
listen: function listen(method, callback) {
listeners[method] = listeners[method] || [];
listeners[method].push(callback);
var listenBufferForMethod = listenBuffer[method];
if (listenBufferForMethod) {
var listenersForMethod = listeners[method];
for (var i = 0; i < listenersForMethod.length; i++) {
for (var j = 0; j < listenBufferForMethod.length; j++) {
listenersForMethod[i].call(null, listenBufferForMethod[j]);
}
}
}
delete listenBuffer[method];
},
send: function send(opts) {
var method = opts.method;
if ((_ready || opts.method === readyMethod) && targetWindow && typeof targetWindow.postMessage === "function") {
targetWindow.postMessage(JSON.stringify({
postis: true,
scope: scope,
method: method,
params: opts.params
}), "*");
} else {
sendBuffer.push(opts);
}
},
ready: function ready(callback) {
if (_ready) {
callback();
} else {
setTimeout(function () {
postis.ready(callback);
}, 50);
}
},
destroy: function destroy(callback) {
clearInterval(readynessCheck);
_ready = false;
if (windowForEventListening && typeof windowForEventListening.removeEventListener === "function") {
windowForEventListening.removeEventListener("message", listener);
}
callback && callback();
}
};
var readyCheckID = +new Date() + Math.random() + "";
readynessCheck = setInterval(function () {
postis.send({
method: readyMethod,
params: readyCheckID
});
}, 50);
postis.listen(readyMethod, function (id) {
if (id === readyCheckID) {
clearInterval(readynessCheck);
_ready = true;
for (var i = 0; i < sendBuffer.length; i++) {
postis.send(sendBuffer[i]);
}
sendBuffer = [];
} else {
postis.send({
method: readyMethod,
params: id
});
}
});
return postis;
}
module.exports = Postis;
}, 950, null, "postis/src/index.js");
__d(/* jitsi-meet/modules/transport/Transport.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _constants = require(952 ); // 952 = ./constants
var Transport = function () {
function Transport() {
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
backend = _ref.backend;
babelHelpers.classCallCheck(this, Transport);
this._listeners = new Map();
this._requestID = 0;
this._responseHandlers = new Map();
this._unprocessedMessages = new Set();
this.addListener = this.on;
if (backend) {
this.setBackend(backend);
}
}
babelHelpers.createClass(Transport, [{
key: '_disposeBackend',
value: function _disposeBackend() {
if (this._backend) {
this._backend.dispose();
this._backend = null;
}
}
}, {
key: '_onMessageReceived',
value: function _onMessageReceived(message) {
var _this = this;
if (message.type === _constants.MESSAGE_TYPE_RESPONSE) {
var handler = this._responseHandlers.get(message.id);
if (handler) {
handler(message);
this._responseHandlers.delete(message.id);
}
} else if (message.type === _constants.MESSAGE_TYPE_REQUEST) {
this.emit('request', message.data, function (result, error) {
_this._backend.send({
type: _constants.MESSAGE_TYPE_RESPONSE,
error: error,
id: message.id,
result: result
});
});
} else {
this.emit('event', message.data);
}
}
}, {
key: 'dispose',
value: function dispose() {
this._responseHandlers.clear();
this._unprocessedMessages.clear();
this.removeAllListeners();
this._disposeBackend();
}
}, {
key: 'emit',
value: function emit(eventName) {
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
args[_key - 1] = arguments[_key];
}
var listenersForEvent = this._listeners.get(eventName);
var isProcessed = false;
if (listenersForEvent && listenersForEvent.size) {
listenersForEvent.forEach(function (listener) {
isProcessed = listener.apply(undefined, args) || isProcessed;
});
}
if (!isProcessed) {
this._unprocessedMessages.add(args);
}
return isProcessed;
}
}, {
key: 'on',
value: function on(eventName, listener) {
var _this2 = this;
var listenersForEvent = this._listeners.get(eventName);
if (!listenersForEvent) {
listenersForEvent = new Set();
this._listeners.set(eventName, listenersForEvent);
}
listenersForEvent.add(listener);
this._unprocessedMessages.forEach(function (args) {
if (listener.apply(undefined, babelHelpers.toConsumableArray(args))) {
_this2._unprocessedMessages.delete(args);
}
});
return this;
}
}, {
key: 'removeAllListeners',
value: function removeAllListeners(eventName) {
if (eventName) {
this._listeners.delete(eventName);
} else {
this._listeners.clear();
}
return this;
}
}, {
key: 'removeListener',
value: function removeListener(eventName, listener) {
var listenersForEvent = this._listeners.get(eventName);
if (listenersForEvent) {
listenersForEvent.delete(listener);
}
return this;
}
}, {
key: 'sendEvent',
value: function sendEvent() {
var event = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
if (this._backend) {
this._backend.send({
type: _constants.MESSAGE_TYPE_EVENT,
data: event
});
}
}
}, {
key: 'sendRequest',
value: function sendRequest(request) {
var _this3 = this;
if (!this._backend) {
return Promise.reject(new Error('No transport backend defined!'));
}
this._requestID++;
var id = this._requestID;
return new Promise(function (resolve, reject) {
_this3._responseHandlers.set(id, function (_ref2) {
var error = _ref2.error,
result = _ref2.result;
if (typeof result !== 'undefined') {
resolve(result);
} else if (typeof error !== 'undefined') {
reject(error);
} else {
reject(new Error('Unexpected response format!'));
}
});
_this3._backend.send({
type: _constants.MESSAGE_TYPE_REQUEST,
data: request,
id: id
});
});
}
}, {
key: 'setBackend',
value: function setBackend(backend) {
this._disposeBackend();
this._backend = backend;
this._backend.setReceiveCallback(this._onMessageReceived.bind(this));
}
}]);
return Transport;
}();
exports.default = Transport;
}, 951, null, "jitsi-meet/modules/transport/Transport.js");
__d(/* jitsi-meet/modules/transport/constants.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var MESSAGE_TYPE_EVENT = exports.MESSAGE_TYPE_EVENT = 'event';
var MESSAGE_TYPE_REQUEST = exports.MESSAGE_TYPE_REQUEST = 'request';
var MESSAGE_TYPE_RESPONSE = exports.MESSAGE_TYPE_RESPONSE = 'response';
}, 952, null, "jitsi-meet/modules/transport/constants.js");
__d(/* jitsi-meet/react/features/device-selection/actionTypes.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var SET_DEVICE_SELECTION_POPUP_DATA = exports.SET_DEVICE_SELECTION_POPUP_DATA = Symbol('SET_DEVICE_SELECTION_POPUP_DATA');
}, 953, null, "jitsi-meet/react/features/device-selection/actionTypes.js");
__d(/* jitsi-meet/react/features/device-selection/components/index.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _DeviceSelectionDialog = require(955 ); // 955 = ./DeviceSelectionDialog
Object.defineProperty(exports, 'DeviceSelectionDialog', {
enumerable: true,
get: function get() {
return babelHelpers.interopRequireDefault(_DeviceSelectionDialog).default;
}
});
var _DeviceSelectionDialogBase = require(956 ); // 956 = ./DeviceSelectionDialogBase
Object.defineProperty(exports, 'DeviceSelectionDialogBase', {
enumerable: true,
get: function get() {
return babelHelpers.interopRequireDefault(_DeviceSelectionDialogBase).default;
}
});
}, 954, null, "jitsi-meet/react/features/device-selection/components/index.js");
__d(/* jitsi-meet/react/features/device-selection/components/DeviceSelectionDialog.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/react/features/device-selection/components/DeviceSelectionDialog.js';
var _react = require(34 ); // 34 = react
var _react2 = babelHelpers.interopRequireDefault(_react);
var _reactRedux = require(548 ); // 548 = react-redux
var _devices = require(943 ); // 943 = ../../base/devices
var _dialog = require(623 ); // 623 = ../../base/dialog
var _DeviceSelectionDialogBase = require(956 ); // 956 = ./DeviceSelectionDialogBase
var _DeviceSelectionDialogBase2 = babelHelpers.interopRequireDefault(_DeviceSelectionDialogBase);
var DeviceSelectionDialog = function (_Component) {
babelHelpers.inherits(DeviceSelectionDialog, _Component);
function DeviceSelectionDialog() {
babelHelpers.classCallCheck(this, DeviceSelectionDialog);
return babelHelpers.possibleConstructorReturn(this, (DeviceSelectionDialog.__proto__ || Object.getPrototypeOf(DeviceSelectionDialog)).apply(this, arguments));
}
babelHelpers.createClass(DeviceSelectionDialog, [{
key: 'render',
value: function render() {
var _props = this.props,
currentAudioInputId = _props.currentAudioInputId,
currentAudioOutputId = _props.currentAudioOutputId,
currentVideoInputId = _props.currentVideoInputId,
disableAudioInputChange = _props.disableAudioInputChange,
disableDeviceChange = _props.disableDeviceChange,
dispatch = _props.dispatch,
hasAudioPermission = _props.hasAudioPermission,
hasVideoPermission = _props.hasVideoPermission,
hideAudioInputPreview = _props.hideAudioInputPreview,
hideAudioOutputSelect = _props.hideAudioOutputSelect;
var props = {
availableDevices: this.props._availableDevices,
closeModal: function closeModal() {
return dispatch((0, _dialog.hideDialog)());
},
currentAudioInputId: currentAudioInputId,
currentAudioOutputId: currentAudioOutputId,
currentVideoInputId: currentVideoInputId,
disableAudioInputChange: disableAudioInputChange,
disableDeviceChange: disableDeviceChange,
hasAudioPermission: hasAudioPermission,
hasVideoPermission: hasVideoPermission,
hideAudioInputPreview: hideAudioInputPreview,
hideAudioOutputSelect: hideAudioOutputSelect,
setAudioInputDevice: function setAudioInputDevice(id) {
dispatch((0, _devices.setAudioInputDevice)(id));
return Promise.resolve();
},
setAudioOutputDevice: function setAudioOutputDevice(id) {
dispatch((0, _devices.setAudioOutputDevice)(id));
return Promise.resolve();
},
setVideoInputDevice: function setVideoInputDevice(id) {
dispatch((0, _devices.setVideoInputDevice)(id));
return Promise.resolve();
}
};
return _react2.default.createElement(_DeviceSelectionDialogBase2.default, babelHelpers.extends({}, props, {
__source: {
fileName: _jsxFileName,
lineNumber: 144
}
}));
}
}]);
return DeviceSelectionDialog;
}(_react.Component);
DeviceSelectionDialog.propTypes = {
_availableDevices: _react2.default.PropTypes.object,
currentAudioInputId: _react2.default.PropTypes.string,
currentAudioOutputId: _react2.default.PropTypes.string,
currentVideoInputId: _react2.default.PropTypes.string,
disableAudioInputChange: _react2.default.PropTypes.bool,
disableDeviceChange: _react2.default.PropTypes.bool,
dispatch: _react2.default.PropTypes.func,
hasAudioPermission: _react2.default.PropTypes.func,
hasVideoPermission: _react2.default.PropTypes.func,
hideAudioInputPreview: _react2.default.PropTypes.bool,
hideAudioOutputSelect: _react2.default.PropTypes.bool
};
function _mapStateToProps(state) {
return {
_availableDevices: state['features/base/devices']
};
}
exports.default = (0, _reactRedux.connect)(_mapStateToProps)(DeviceSelectionDialog);
}, 955, null, "jitsi-meet/react/features/device-selection/components/DeviceSelectionDialog.js");
__d(/* jitsi-meet/react/features/device-selection/components/DeviceSelectionDialogBase.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/react/features/device-selection/components/DeviceSelectionDialogBase.js';
var _react = require(34 ); // 34 = react
var _react2 = babelHelpers.interopRequireDefault(_react);
var _dialog = require(623 ); // 623 = ../../base/dialog
var _i18n = require(632 ); // 632 = ../../base/i18n
var _libJitsiMeet = require(434 ); // 434 = ../../base/lib-jitsi-meet
var _AudioInputPreview = require(957 ); // 957 = ./AudioInputPreview
var _AudioInputPreview2 = babelHelpers.interopRequireDefault(_AudioInputPreview);
var _AudioOutputPreview = require(958 ); // 958 = ./AudioOutputPreview
var _AudioOutputPreview2 = babelHelpers.interopRequireDefault(_AudioOutputPreview);
var _DeviceSelector = require(959 ); // 959 = ./DeviceSelector
var _DeviceSelector2 = babelHelpers.interopRequireDefault(_DeviceSelector);
var _VideoInputPreview = require(960 ); // 960 = ./VideoInputPreview
var _VideoInputPreview2 = babelHelpers.interopRequireDefault(_VideoInputPreview);
var DeviceSelectionDialogBase = function (_Component) {
babelHelpers.inherits(DeviceSelectionDialogBase, _Component);
function DeviceSelectionDialogBase(props) {
babelHelpers.classCallCheck(this, DeviceSelectionDialogBase);
var _this = babelHelpers.possibleConstructorReturn(this, (DeviceSelectionDialogBase.__proto__ || Object.getPrototypeOf(DeviceSelectionDialogBase)).call(this, props));
var availableDevices = _this.props.availableDevices;
_this.state = {
previewAudioTrack: null,
previewVideoTrack: null,
previewVideoTrackError: null,
selectedAudioInputId: _this.props.currentAudioInputId || '',
selectedAudioOutputId: _this.props.currentAudioOutputId || '',
selectedVideoInputId: _this.props.currentVideoInputId || availableDevices.videoInput && availableDevices.videoInput[0] && availableDevices.videoInput[0].deviceId || ''
};
_this._isClosing = false;
_this._setDevicesAndClose = _this._setDevicesAndClose.bind(_this);
_this._onCancel = _this._onCancel.bind(_this);
_this._onSubmit = _this._onSubmit.bind(_this);
_this._updateAudioOutput = _this._updateAudioOutput.bind(_this);
_this._updateAudioInput = _this._updateAudioInput.bind(_this);
_this._updateVideoInput = _this._updateVideoInput.bind(_this);
return _this;
}
babelHelpers.createClass(DeviceSelectionDialogBase, [{
key: 'componentDidMount',
value: function componentDidMount() {
this._updateAudioOutput(this.state.selectedAudioOutputId);
this._updateAudioInput(this.state.selectedAudioInputId);
this._updateVideoInput(this.state.selectedVideoInputId);
}
}, {
key: 'componentWillUnmount',
value: function componentWillUnmount() {
if (!this._isClosing) {
this._attemptPreviewTrackCleanup();
}
}
}, {
key: 'render',
value: function render() {
return _react2.default.createElement(
_dialog.StatelessDialog,
{
cancelTitleKey: 'dialog.Cancel',
disableBlanketClickDismiss: this.props.disableBlanketClickDismiss,
okTitleKey: 'dialog.Save',
onCancel: this._onCancel,
onSubmit: this._onSubmit,
titleKey: 'deviceSelection.deviceSettings', __source: {
fileName: _jsxFileName,
lineNumber: 213
}
},
_react2.default.createElement(
'div',
{ className: 'device-selection', __source: {
fileName: _jsxFileName,
lineNumber: 221
}
},
_react2.default.createElement(
'div',
{ className: 'device-selection-column column-video', __source: {
fileName: _jsxFileName,
lineNumber: 222
}
},
_react2.default.createElement(
'div',
{ className: 'device-selection-video-container', __source: {
fileName: _jsxFileName,
lineNumber: 223
}
},
_react2.default.createElement(_VideoInputPreview2.default, {
error: this.state.previewVideoTrackError,
track: this.state.previewVideoTrack, __source: {
fileName: _jsxFileName,
lineNumber: 224
}
})
),
this._renderAudioInputPreview()
),
_react2.default.createElement(
'div',
{ className: 'device-selection-column column-selectors', __source: {
fileName: _jsxFileName,
lineNumber: 230
}
},
_react2.default.createElement(
'div',
{ className: 'device-selectors', __source: {
fileName: _jsxFileName,
lineNumber: 231
}
},
this._renderSelectors()
),
this._renderAudioOutputPreview()
)
)
);
}
}, {
key: '_attemptPreviewTrackCleanup',
value: function _attemptPreviewTrackCleanup() {
return Promise.all([this._disposeVideoPreview(), this._disposeAudioPreview()]);
}
}, {
key: '_disposeAudioPreview',
value: function _disposeAudioPreview() {
return this.state.previewAudioTrack ? this.state.previewAudioTrack.dispose() : Promise.resolve();
}
}, {
key: '_disposeVideoPreview',
value: function _disposeVideoPreview() {
return this.state.previewVideoTrack ? this.state.previewVideoTrack.dispose() : Promise.resolve();
}
}, {
key: '_onCancel',
value: function _onCancel() {
if (this._isClosing) {
return false;
}
this._isClosing = true;
var cleanupPromises = this._attemptPreviewTrackCleanup();
Promise.all(cleanupPromises).then(this.props.closeModal).catch(this.props.closeModal);
return false;
}
}, {
key: '_onSubmit',
value: function _onSubmit() {
if (this._isClosing) {
return false;
}
this._isClosing = true;
this._attemptPreviewTrackCleanup().then(this._setDevicesAndClose, this._setDevicesAndClose);
return false;
}
}, {
key: '_renderAudioInputPreview',
value: function _renderAudioInputPreview() {
if (this.props.hideAudioInputPreview) {
return null;
}
return _react2.default.createElement(_AudioInputPreview2.default, {
track: this.state.previewAudioTrack, __source: {
fileName: _jsxFileName,
lineNumber: 337
}
});
}
}, {
key: '_renderAudioOutputPreview',
value: function _renderAudioOutputPreview() {
if (this.props.hideAudioOutputSelect) {
return null;
}
return _react2.default.createElement(_AudioOutputPreview2.default, {
deviceId: this.state.selectedAudioOutputId, __source: {
fileName: _jsxFileName,
lineNumber: 355
}
});
}
}, {
key: '_renderSelector',
value: function _renderSelector(props) {
return _react2.default.createElement(_DeviceSelector2.default, babelHelpers.extends({}, props, {
__source: {
fileName: _jsxFileName,
lineNumber: 369
}
}));
}
}, {
key: '_renderSelectors',
value: function _renderSelectors() {
var availableDevices = this.props.availableDevices;
var configurations = [{
devices: availableDevices.videoInput,
hasPermission: this.props.hasVideoPermission(),
icon: 'icon-camera',
isDisabled: this.props.disableDeviceChange,
key: 'videoInput',
label: 'settings.selectCamera',
onSelect: this._updateVideoInput,
selectedDeviceId: this.state.selectedVideoInputId
}, {
devices: availableDevices.audioInput,
hasPermission: this.props.hasAudioPermission(),
icon: 'icon-microphone',
isDisabled: this.props.disableAudioInputChange || this.props.disableDeviceChange,
key: 'audioInput',
label: 'settings.selectMic',
onSelect: this._updateAudioInput,
selectedDeviceId: this.state.selectedAudioInputId
}];
if (!this.props.hideAudioOutputSelect) {
configurations.push({
devices: availableDevices.audioOutput,
hasPermission: this.props.hasAudioPermission() || this.props.hasVideoPermission(),
icon: 'icon-volume',
isDisabled: this.props.disableDeviceChange,
key: 'audioOutput',
label: 'settings.selectAudioOutput',
onSelect: this._updateAudioOutput,
selectedDeviceId: this.state.selectedAudioOutputId
});
}
return configurations.map(this._renderSelector);
}
}, {
key: '_setDevicesAndClose',
value: function _setDevicesAndClose() {
var _props = this.props,
setVideoInputDevice = _props.setVideoInputDevice,
setAudioInputDevice = _props.setAudioInputDevice,
setAudioOutputDevice = _props.setAudioOutputDevice,
closeModal = _props.closeModal;
var promises = [];
if (this.state.selectedVideoInputId !== this.props.currentVideoInputId) {
promises.push(setVideoInputDevice(this.state.selectedVideoInputId));
}
if (this.state.selectedAudioInputId !== this.props.currentAudioInputId) {
promises.push(setAudioInputDevice(this.state.selectedAudioInputId));
}
if (this.state.selectedAudioOutputId !== this.props.currentAudioOutputId) {
promises.push(setAudioOutputDevice(this.state.selectedAudioOutputId));
}
Promise.all(promises).then(closeModal, closeModal);
}
}, {
key: '_updateAudioInput',
value: function _updateAudioInput(deviceId) {
var _this2 = this;
this.setState({
selectedAudioInputId: deviceId
}, function () {
_this2._disposeAudioPreview().then(function () {
return (0, _libJitsiMeet.createLocalTrack)('audio', deviceId);
}).then(function (jitsiLocalTrack) {
_this2.setState({
previewAudioTrack: jitsiLocalTrack
});
}).catch(function () {
_this2.setState({
previewAudioTrack: null
});
});
});
}
}, {
key: '_updateAudioOutput',
value: function _updateAudioOutput(deviceId) {
this.setState({
selectedAudioOutputId: deviceId
});
}
}, {
key: '_updateVideoInput',
value: function _updateVideoInput(deviceId) {
var _this3 = this;
this.setState({
selectedVideoInputId: deviceId
}, function () {
_this3._disposeVideoPreview().then(function () {
return (0, _libJitsiMeet.createLocalTrack)('video', deviceId);
}).then(function (jitsiLocalTrack) {
_this3.setState({
previewVideoTrack: jitsiLocalTrack,
previewVideoTrackError: null
});
}).catch(function () {
_this3.setState({
previewVideoTrack: null,
previewVideoTrackError: _this3.props.t('deviceSelection.previewUnavailable')
});
});
});
}
}]);
return DeviceSelectionDialogBase;
}(_react.Component);
DeviceSelectionDialogBase.propTypes = {
availableDevices: _react2.default.PropTypes.object,
closeModal: _react2.default.PropTypes.func,
currentAudioInputId: _react2.default.PropTypes.string,
currentAudioOutputId: _react2.default.PropTypes.string,
currentVideoInputId: _react2.default.PropTypes.string,
disableAudioInputChange: _react2.default.PropTypes.bool,
disableBlanketClickDismiss: _react2.default.PropTypes.bool,
disableDeviceChange: _react2.default.PropTypes.bool,
hasAudioPermission: _react2.default.PropTypes.func,
hasVideoPermission: _react2.default.PropTypes.func,
hideAudioInputPreview: _react2.default.PropTypes.bool,
hideAudioOutputSelect: _react2.default.PropTypes.bool,
setAudioInputDevice: _react2.default.PropTypes.func,
setAudioOutputDevice: _react2.default.PropTypes.func,
setVideoInputDevice: _react2.default.PropTypes.func,
t: _react2.default.PropTypes.func
};
exports.default = (0, _i18n.translate)(DeviceSelectionDialogBase);
}, 956, null, "jitsi-meet/react/features/device-selection/components/DeviceSelectionDialogBase.js");
__d(/* jitsi-meet/react/features/device-selection/components/AudioInputPreview.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/react/features/device-selection/components/AudioInputPreview.js';
var _react = require(34 ); // 34 = react
var _react2 = babelHelpers.interopRequireDefault(_react);
var _libJitsiMeet = require(434 ); // 434 = ../../base/lib-jitsi-meet
var AudioInputPreview = function (_PureComponent) {
babelHelpers.inherits(AudioInputPreview, _PureComponent);
function AudioInputPreview(props) {
babelHelpers.classCallCheck(this, AudioInputPreview);
var _this = babelHelpers.possibleConstructorReturn(this, (AudioInputPreview.__proto__ || Object.getPrototypeOf(AudioInputPreview)).call(this, props));
_this.state = {
audioLevel: 0
};
_this._updateAudioLevel = _this._updateAudioLevel.bind(_this);
return _this;
}
babelHelpers.createClass(AudioInputPreview, [{
key: 'componentDidMount',
value: function componentDidMount() {
this._listenForAudioUpdates(this.props.track);
}
}, {
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(nextProps) {
this._listenForAudioUpdates(nextProps.track);
this._updateAudioLevel(0);
}
}, {
key: 'componentWillUnmount',
value: function componentWillUnmount() {
this._stopListeningForAudioUpdates();
}
}, {
key: 'render',
value: function render() {
var audioMeterFill = {
width: Math.floor(this.state.audioLevel * 100) + '%'
};
return _react2.default.createElement(
'div',
{ className: 'audio-input-preview', __source: {
fileName: _jsxFileName,
lineNumber: 81
}
},
_react2.default.createElement('div', {
className: 'audio-input-preview-level',
style: audioMeterFill, __source: {
fileName: _jsxFileName,
lineNumber: 82
}
})
);
}
}, {
key: '_listenForAudioUpdates',
value: function _listenForAudioUpdates(track) {
this._stopListeningForAudioUpdates();
track && track.on(_libJitsiMeet.JitsiTrackEvents.TRACK_AUDIO_LEVEL_CHANGED, this._updateAudioLevel);
}
}, {
key: '_stopListeningForAudioUpdates',
value: function _stopListeningForAudioUpdates() {
this.props.track && this.props.track.off(_libJitsiMeet.JitsiTrackEvents.TRACK_AUDIO_LEVEL_CHANGED, this._updateAudioLevel);
}
}, {
key: '_updateAudioLevel',
value: function _updateAudioLevel(audioLevel) {
this.setState({
audioLevel: audioLevel
});
}
}]);
return AudioInputPreview;
}(_react.PureComponent);
AudioInputPreview.propTypes = {
track: _react2.default.PropTypes.object
};
exports.default = AudioInputPreview;
}, 957, null, "jitsi-meet/react/features/device-selection/components/AudioInputPreview.js");
__d(/* jitsi-meet/react/features/device-selection/components/AudioOutputPreview.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/react/features/device-selection/components/AudioOutputPreview.js';
var _react = require(34 ); // 34 = react
var _react2 = babelHelpers.interopRequireDefault(_react);
var _i18n = require(632 ); // 632 = ../../base/i18n
var TEST_SOUND_PATH = 'sounds/ring.wav';
var AudioOutputPreview = function (_Component) {
babelHelpers.inherits(AudioOutputPreview, _Component);
function AudioOutputPreview(props) {
babelHelpers.classCallCheck(this, AudioOutputPreview);
var _this = babelHelpers.possibleConstructorReturn(this, (AudioOutputPreview.__proto__ || Object.getPrototypeOf(AudioOutputPreview)).call(this, props));
_this._audioElement = null;
_this._onClick = _this._onClick.bind(_this);
_this._setAudioElement = _this._setAudioElement.bind(_this);
return _this;
}
babelHelpers.createClass(AudioOutputPreview, [{
key: 'componentDidMount',
value: function componentDidMount() {
this._setAudioSink();
}
}, {
key: 'componentDidUpdate',
value: function componentDidUpdate() {
this._setAudioSink();
}
}, {
key: 'render',
value: function render() {
return _react2.default.createElement(
'div',
{ className: 'audio-output-preview', __source: {
fileName: _jsxFileName,
lineNumber: 75
}
},
_react2.default.createElement(
'a',
{ onClick: this._onClick, __source: {
fileName: _jsxFileName,
lineNumber: 76
}
},
this.props.t('deviceSelection.testAudio')
),
_react2.default.createElement('audio', {
preload: 'auto',
ref: this._setAudioElement,
src: TEST_SOUND_PATH, __source: {
fileName: _jsxFileName,
lineNumber: 79
}
})
);
}
}, {
key: '_onClick',
value: function _onClick() {
this._audioElement && this._audioElement.play();
}
}, {
key: '_setAudioElement',
value: function _setAudioElement(element) {
this._audioElement = element;
}
}, {
key: '_setAudioSink',
value: function _setAudioSink() {
this._audioElement && this._audioElement.setSinkId(this.props.deviceId);
}
}]);
return AudioOutputPreview;
}(_react.Component);
AudioOutputPreview.propTypes = {
deviceId: _react2.default.PropTypes.string,
t: _react2.default.PropTypes.func
};
exports.default = (0, _i18n.translate)(AudioOutputPreview);
}, 958, null, "jitsi-meet/react/features/device-selection/components/AudioOutputPreview.js");
__d(/* jitsi-meet/react/features/device-selection/components/DeviceSelector.native.js */function(global, require, module, exports) {
}, 959, null, "jitsi-meet/react/features/device-selection/components/DeviceSelector.native.js");
__d(/* jitsi-meet/react/features/device-selection/components/VideoInputPreview.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/react/features/device-selection/components/VideoInputPreview.js';
var _react = require(34 ); // 34 = react
var _react2 = babelHelpers.interopRequireDefault(_react);
var _media = require(567 ); // 567 = ../../base/media
var VIDEO_ERROR_CLASS = 'video-preview-has-error';
var VideoInputPreview = function (_Component) {
babelHelpers.inherits(VideoInputPreview, _Component);
function VideoInputPreview() {
babelHelpers.classCallCheck(this, VideoInputPreview);
return babelHelpers.possibleConstructorReturn(this, (VideoInputPreview.__proto__ || Object.getPrototypeOf(VideoInputPreview)).apply(this, arguments));
}
babelHelpers.createClass(VideoInputPreview, [{
key: 'render',
value: function render() {
var error = this.props.error;
var errorClass = error ? VIDEO_ERROR_CLASS : '';
var className = 'video-input-preview ' + errorClass;
return _react2.default.createElement(
'div',
{ className: className, __source: {
fileName: _jsxFileName,
lineNumber: 44
}
},
_react2.default.createElement(_media.VideoTrack, {
className: 'video-input-preview-display flipVideoX',
triggerOnPlayingUpdate: false,
videoTrack: { jitsiTrack: this.props.track }, __source: {
fileName: _jsxFileName,
lineNumber: 45
}
}),
_react2.default.createElement(
'div',
{ className: 'video-input-preview-error', __source: {
fileName: _jsxFileName,
lineNumber: 49
}
},
error || ''
)
);
}
}]);
return VideoInputPreview;
}(_react.Component);
VideoInputPreview.propTypes = {
error: _react2.default.PropTypes.string,
track: _react2.default.PropTypes.object
};
exports.default = VideoInputPreview;
}, 960, null, "jitsi-meet/react/features/device-selection/components/VideoInputPreview.js");
__d(/* jitsi-meet/react/features/device-selection/middleware.js */function(global, require, module, exports) {var _devices = require(943 ); // 943 = ../base/devices
var _redux = require(505 ); // 505 = ../base/redux
_redux.MiddlewareRegistry.register(function (store) {
return function (next) {
return function (action) {
var result = next(action);
if (action.type === _devices.UPDATE_DEVICE_LIST) {
var popupDialogData = store.getState()['features/device-selection'].popupDialogData;
if (popupDialogData) {
popupDialogData.transport.sendEvent({ name: 'deviceListChanged' });
}
}
return result;
};
};
});
}, 961, null, "jitsi-meet/react/features/device-selection/middleware.js");
__d(/* jitsi-meet/react/features/device-selection/reducer.js */function(global, require, module, exports) {var _redux = require(505 ); // 505 = ../base/redux
var _actionTypes = require(953 ); // 953 = ./actionTypes
_redux.ReducerRegistry.register('features/device-selection', function () {
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var action = arguments[1];
if (action.type === _actionTypes.SET_DEVICE_SELECTION_POPUP_DATA) {
return babelHelpers.extends({}, state, {
popupDialogData: action.popupDialogData
});
}
return state;
});
}, 962, null, "jitsi-meet/react/features/device-selection/reducer.js");
__d(/* jitsi-meet/react/features/dial-out/index.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _actions = require(964 ); // 964 = ./actions
Object.keys(_actions).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _actions[key];
}
});
});
var _components = require(966 ); // 966 = ./components
Object.keys(_components).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _components[key];
}
});
});
require(968 ); // 968 = ./reducer
}, 963, null, "jitsi-meet/react/features/dial-out/index.js");
__d(/* jitsi-meet/react/features/dial-out/actions.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
exports.cancel = cancel;
exports.dial = dial;
exports.checkDialNumber = checkDialNumber;
exports.openDialOutDialog = openDialOutDialog;
exports.updateDialOutCodes = updateDialOutCodes;
var _dialog = require(623 ); // 623 = ../../features/base/dialog
var _actionTypes = require(965 ); // 965 = ./actionTypes
var _components = require(966 ); // 966 = ./components
function cancel() {
return {
type: _actionTypes.DIAL_OUT_CANCELED
};
}
function dial(dialNumber) {
return function (dispatch, getState) {
var conference = getState()['features/base/conference'].conference;
conference.dial(dialNumber);
};
}
function checkDialNumber(dialNumber) {
return function (dispatch, getState) {
var dialOutAuthUrl = getState()['features/base/config'].dialOutAuthUrl;
if (!dialOutAuthUrl) {
var response = {};
response.allow = true;
dispatch({
type: _actionTypes.PHONE_NUMBER_CHECKED,
response: response
});
return;
}
var fullUrl = dialOutAuthUrl + '?phone=' + dialNumber;
$.getJSON(fullUrl).success(function (response) {
return dispatch({
type: _actionTypes.PHONE_NUMBER_CHECKED,
response: response
});
}).error(function (error) {
return dispatch({
type: _actionTypes.DIAL_OUT_SERVICE_FAILED,
error: error
});
});
};
}
function openDialOutDialog() {
return (0, _dialog.openDialog)(_components.DialOutDialog);
}
function updateDialOutCodes() {
return function (dispatch, getState) {
var dialOutCodesUrl = getState()['features/base/config'].dialOutCodesUrl;
if (!dialOutCodesUrl) {
return;
}
$.getJSON(dialOutCodesUrl).success(function (response) {
return dispatch({
type: _actionTypes.DIAL_OUT_CODES_UPDATED,
response: response
});
}).error(function (error) {
return dispatch({
type: _actionTypes.DIAL_OUT_SERVICE_FAILED,
error: error
});
});
};
}
}, 964, null, "jitsi-meet/react/features/dial-out/actions.js");
__d(/* jitsi-meet/react/features/dial-out/actionTypes.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var PHONE_NUMBER_CHECKED = exports.PHONE_NUMBER_CHECKED = Symbol('PHONE_NUMBER_CHECKED');
var DIAL_OUT_CANCELED = exports.DIAL_OUT_CANCELED = Symbol('DIAL_OUT_CANCELED');
var DIAL_OUT_CODES_UPDATED = exports.DIAL_OUT_CODES_UPDATED = Symbol('DIAL_OUT_CODES_UPDATED');
var DIAL_OUT_SERVICE_FAILED = exports.DIAL_OUT_SERVICE_FAILED = Symbol('DIAL_OUT_SERVICE_FAILED');
}, 965, null, "jitsi-meet/react/features/dial-out/actionTypes.js");
__d(/* jitsi-meet/react/features/dial-out/components/index.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _DialOutDialog = require(967 ); // 967 = ./DialOutDialog
Object.defineProperty(exports, 'DialOutDialog', {
enumerable: true,
get: function get() {
return babelHelpers.interopRequireDefault(_DialOutDialog).default;
}
});
}, 966, null, "jitsi-meet/react/features/dial-out/components/index.js");
__d(/* jitsi-meet/react/features/dial-out/components/DialOutDialog.native.js */function(global, require, module, exports) {
}, 967, null, "jitsi-meet/react/features/dial-out/components/DialOutDialog.native.js");
__d(/* jitsi-meet/react/features/dial-out/reducer.js */function(global, require, module, exports) {var _redux = require(505 ); // 505 = ../base/redux
var _actionTypes = require(965 ); // 965 = ./actionTypes
var DEFAULT_STATE = {
dialOutCodes: null,
error: null,
isDialNumberAllowed: true
};
_redux.ReducerRegistry.register('features/dial-out', function () {
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DEFAULT_STATE;
var action = arguments[1];
switch (action.type) {
case _actionTypes.DIAL_OUT_CANCELED:
{
return babelHelpers.extends({}, DEFAULT_STATE, {
dialOutCodes: state.dialOutCodes
});
}
case _actionTypes.DIAL_OUT_CODES_UPDATED:
{
return babelHelpers.extends({}, state, {
error: null,
dialOutCodes: action.response
});
}
case _actionTypes.DIAL_OUT_SERVICE_FAILED:
{
return babelHelpers.extends({}, state, {
error: action.error
});
}
case _actionTypes.PHONE_NUMBER_CHECKED:
{
return babelHelpers.extends({}, state, {
error: null,
isDialNumberAllowed: action.response.allow
});
}
}
return state;
});
}, 968, null, "jitsi-meet/react/features/dial-out/reducer.js");
__d(/* jitsi-meet/react/features/invite/index.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _actions = require(970 ); // 970 = ./actions
Object.keys(_actions).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _actions[key];
}
});
});
var _components = require(972 ); // 972 = ./components
Object.keys(_components).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _components[key];
}
});
});
require(975 ); // 975 = ./reducer
require(976 ); // 976 = ./middleware
}, 969, null, "jitsi-meet/react/features/invite/index.js");
__d(/* jitsi-meet/react/features/invite/actions.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
exports.openInviteDialog = openInviteDialog;
exports.openAddPeopleDialog = openAddPeopleDialog;
exports.updateDialInNumbers = updateDialInNumbers;
var _dialog = require(623 ); // 623 = ../../features/base/dialog
var _actionTypes = require(971 ); // 971 = ./actionTypes
var _components = require(972 ); // 972 = ./components
function openInviteDialog() {
return (0, _dialog.openDialog)(_components.InviteDialog);
}
function openAddPeopleDialog() {
return (0, _dialog.openDialog)(_components.AddPeopleDialog);
}
function updateDialInNumbers() {
return function (dispatch, getState) {
var state = getState();
var _state$featuresBase = state['features/base/config'],
dialInConfCodeUrl = _state$featuresBase.dialInConfCodeUrl,
dialInNumbersUrl = _state$featuresBase.dialInNumbersUrl,
hosts = _state$featuresBase.hosts;
var mucURL = hosts && hosts.muc;
if (!dialInConfCodeUrl || !dialInNumbersUrl || !mucURL) {
return;
}
var room = state['features/base/conference'].room;
var conferenceIDURL = dialInConfCodeUrl + '?conference=' + room + '@' + mucURL;
Promise.all([$.getJSON(dialInNumbersUrl), $.getJSON(conferenceIDURL)]).then(function (_ref) {
var _ref2 = babelHelpers.slicedToArray(_ref, 2),
dialInNumbers = _ref2[0],
_ref2$ = _ref2[1],
conference = _ref2$.conference,
id = _ref2$.id,
message = _ref2$.message;
if (!conference || !id) {
return Promise.reject(message);
}
dispatch({
type: _actionTypes.UPDATE_DIAL_IN_NUMBERS_SUCCESS,
conferenceID: id,
dialInNumbers: dialInNumbers
});
}).catch(function (error) {
dispatch({
type: _actionTypes.UPDATE_DIAL_IN_NUMBERS_FAILED,
error: error
});
});
};
}
}, 970, null, "jitsi-meet/react/features/invite/actions.js");
__d(/* jitsi-meet/react/features/invite/actionTypes.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var UPDATE_DIAL_IN_NUMBERS_FAILED = exports.UPDATE_DIAL_IN_NUMBERS_FAILED = Symbol('UPDATE_DIAL_IN_NUMBERS_FAILED');
var UPDATE_DIAL_IN_NUMBERS_SUCCESS = exports.UPDATE_DIAL_IN_NUMBERS_SUCCESS = Symbol('UPDATE_DIAL_IN_NUMBERS_SUCCESS');
}, 971, null, "jitsi-meet/react/features/invite/actionTypes.js");
__d(/* jitsi-meet/react/features/invite/components/index.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _InviteDialog = require(973 ); // 973 = ./InviteDialog
Object.defineProperty(exports, 'InviteDialog', {
enumerable: true,
get: function get() {
return babelHelpers.interopRequireDefault(_InviteDialog).default;
}
});
var _AddPeopleDialog = require(974 ); // 974 = ./AddPeopleDialog
Object.defineProperty(exports, 'AddPeopleDialog', {
enumerable: true,
get: function get() {
return babelHelpers.interopRequireDefault(_AddPeopleDialog).default;
}
});
}, 972, null, "jitsi-meet/react/features/invite/components/index.js");
__d(/* jitsi-meet/react/features/invite/components/InviteDialog.native.js */function(global, require, module, exports) {
}, 973, null, "jitsi-meet/react/features/invite/components/InviteDialog.native.js");
__d(/* jitsi-meet/react/features/invite/components/AddPeopleDialog.native.js */function(global, require, module, exports) {
}, 974, null, "jitsi-meet/react/features/invite/components/AddPeopleDialog.native.js");
__d(/* jitsi-meet/react/features/invite/reducer.js */function(global, require, module, exports) {var _redux = require(505 ); // 505 = ../base/redux
var _actionTypes = require(971 ); // 971 = ./actionTypes
var DEFAULT_STATE = {
numbersEnabled: true
};
_redux.ReducerRegistry.register('features/invite', function () {
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DEFAULT_STATE;
var action = arguments[1];
switch (action.type) {
case _actionTypes.UPDATE_DIAL_IN_NUMBERS_FAILED:
return babelHelpers.extends({}, state, {
error: action.error
});
case _actionTypes.UPDATE_DIAL_IN_NUMBERS_SUCCESS:
{
var _action$dialInNumbers = action.dialInNumbers,
numbers = _action$dialInNumbers.numbers,
numbersEnabled = _action$dialInNumbers.numbersEnabled;
return {
conferenceID: action.conferenceID,
numbers: numbers,
numbersEnabled: numbersEnabled
};
}
}
return state;
});
}, 975, null, "jitsi-meet/react/features/invite/reducer.js");
__d(/* jitsi-meet/react/features/invite/middleware.js */function(global, require, module, exports) {var _redux = require(505 ); // 505 = ../base/redux
var _actionTypes = require(971 ); // 971 = ./actionTypes
var logger = require(464 ).getLogger(__filename); // 464 = jitsi-meet-logger
_redux.MiddlewareRegistry.register(function (store) {
return function (next) {
return function (action) {
var result = next(action);
switch (action.type) {
case _actionTypes.UPDATE_DIAL_IN_NUMBERS_FAILED:
logger.error('Error encountered while fetching dial-in numbers:', action.error);
break;
}
return result;
};
};
});
}, 976, null, "jitsi-meet/react/features/invite/middleware.js");
__d(/* jitsi-meet/react/features/conference/components/styles.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _styles = require(601 ); // 601 = ../../base/styles
exports.default = (0, _styles.createStyleSheet)({
conference: (0, _styles.fixAndroidViewClipping)({
alignSelf: 'stretch',
backgroundColor: _styles.ColorPalette.appBackground,
flex: 1
})
});
}, 977, null, "jitsi-meet/react/features/conference/components/styles.js");
__d(/* jitsi-meet/react/features/conference/route.js */function(global, require, module, exports) {var _ConferenceUrl = require(979 ); // 979 = ../../../modules/URL/ConferenceUrl
var _ConferenceUrl2 = babelHelpers.interopRequireDefault(_ConferenceUrl);
var _config = require(496 ); // 496 = ../base/config
var _react = require(589 ); // 589 = ../base/react
var _components = require(699 ); // 699 = ./components
var logger = require(464 ).getLogger(__filename); // 464 = jitsi-meet-logger
_react.RouteRegistry.register({
component: _components.Conference,
onEnter: function onEnter() {
_obtainConfigAndInit();
},
path: '/:room'
});
function _initConference() {
_setTokenData();
APP.ConferenceUrl = new _ConferenceUrl2.default(window.location);
}
function _obtainConfig(location, room) {
return new Promise(function (resolve, reject) {
return (0, _config.obtainConfig)(location, room, function (success, error) {
success ? resolve() : reject(error);
});
});
}
function _obtainConfigAndInit() {
if (typeof APP !== 'undefined' && !APP.ConferenceUrl) {
var location = config.configLocation;
var room = APP.conference.roomName;
if (location) {
_obtainConfig(location, room).then(function () {
_obtainConfigHandler();
_initConference();
}).catch(function (err) {
APP.UI.messageHandler.openReportDialog(null, 'dialog.connectError', err);
});
} else {
(0, _config.chooseBOSHAddress)(config, room);
_initConference();
}
}
}
function _obtainConfigHandler() {
var now = window.performance.now();
APP.connectionTimes['configuration.fetched'] = now;
logger.log('(TIME) configuration fetched:\t', now);
}
function _setTokenData() {
var state = APP.store.getState();
var caller = state['features/jwt'].caller;
if (caller) {
var avatarUrl = caller.avatarUrl,
avatar = caller.avatar,
email = caller.email,
name = caller.name;
APP.settings.setEmail((email || '').trim(), true);
APP.settings.setAvatarUrl((avatarUrl || avatar || '').trim());
APP.settings.setDisplayName((name || '').trim(), true);
}
}
}, 978, null, "jitsi-meet/react/features/conference/route.js");
__d(/* jitsi-meet/modules/URL/ConferenceUrl.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var logger = require(464 ).getLogger(__filename); // 464 = jitsi-meet-logger
var ConferenceUrl = function ConferenceUrl(location) {
babelHelpers.classCallCheck(this, ConferenceUrl);
logger.info("Stored original conference URL: " + location.href);
logger.info("Conference URL for invites: " + location.protocol + "//" + location.host + location.pathname);
};
exports.default = ConferenceUrl;
}, 979, null, "jitsi-meet/modules/URL/ConferenceUrl.js");
__d(/* jitsi-meet/react/features/welcome/index.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _components = require(981 ); // 981 = ./components
Object.keys(_components).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _components[key];
}
});
});
require(986 ); // 986 = ./route
}, 980, null, "jitsi-meet/react/features/welcome/index.js");
__d(/* jitsi-meet/react/features/welcome/components/index.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _WelcomePage = require(982 ); // 982 = ./WelcomePage
Object.defineProperty(exports, 'WelcomePage', {
enumerable: true,
get: function get() {
return babelHelpers.interopRequireDefault(_WelcomePage).default;
}
});
}, 981, null, "jitsi-meet/react/features/welcome/components/index.js");
__d(/* jitsi-meet/react/features/welcome/components/WelcomePage.native.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/react/features/welcome/components/WelcomePage.native.js';
var _react = require(34 ); // 34 = react
var _react2 = babelHelpers.interopRequireDefault(_react);
var _reactNative = require(69 ); // 69 = react-native
var _reactRedux = require(548 ); // 548 = react-redux
var _i18n = require(632 ); // 632 = ../../base/i18n
var _react3 = require(589 ); // 589 = ../../base/react
var _styles = require(601 ); // 601 = ../../base/styles
var _AbstractWelcomePage2 = require(983 ); // 983 = ./AbstractWelcomePage
var _styles2 = require(985 ); // 985 = ./styles
var _styles3 = babelHelpers.interopRequireDefault(_styles2);
var PRIVACY_URL = 'https://jitsi.org/meet/privacy';
var SEND_FEEDBACK_URL = 'mailto:support@jitsi.org';
var TERMS_URL = 'https://jitsi.org/meet/terms';
var WelcomePage = function (_AbstractWelcomePage) {
babelHelpers.inherits(WelcomePage, _AbstractWelcomePage);
function WelcomePage() {
babelHelpers.classCallCheck(this, WelcomePage);
return babelHelpers.possibleConstructorReturn(this, (WelcomePage.__proto__ || Object.getPrototypeOf(WelcomePage)).apply(this, arguments));
}
babelHelpers.createClass(WelcomePage, [{
key: 'render',
value: function render() {
return _react2.default.createElement(
_reactNative.View,
{ style: _styles3.default.container, __source: {
fileName: _jsxFileName,
lineNumber: 47
}
},
this._renderLocalVideo(),
this._renderLocalVideoOverlay()
);
}
}, {
key: '_renderLegalese',
value: function _renderLegalese() {
var t = this.props.t;
return _react2.default.createElement(
_reactNative.View,
{ style: _styles3.default.legaleseContainer, __source: {
fileName: _jsxFileName,
lineNumber: 69
}
},
_react2.default.createElement(
_react3.Link,
{
style: _styles3.default.legaleseItem,
url: TERMS_URL, __source: {
fileName: _jsxFileName,
lineNumber: 70
}
},
t('welcomepage.terms')
),
_react2.default.createElement(
_react3.Link,
{
style: _styles3.default.legaleseItem,
url: PRIVACY_URL, __source: {
fileName: _jsxFileName,
lineNumber: 75
}
},
t('welcomepage.privacy')
),
_react2.default.createElement(
_react3.Link,
{
style: _styles3.default.legaleseItem,
url: SEND_FEEDBACK_URL, __source: {
fileName: _jsxFileName,
lineNumber: 80
}
},
t('welcomepage.sendFeedback')
)
);
}
}, {
key: '_renderLocalVideoOverlay',
value: function _renderLocalVideoOverlay() {
var t = this.props.t;
return _react2.default.createElement(
_reactNative.View,
{ style: _styles3.default.localVideoOverlay, __source: {
fileName: _jsxFileName,
lineNumber: 102
}
},
_react2.default.createElement(
_reactNative.View,
{ style: _styles3.default.roomContainer, __source: {
fileName: _jsxFileName,
lineNumber: 103
}
},
_react2.default.createElement(
_react3.Text,
{ style: _styles3.default.title, __source: {
fileName: _jsxFileName,
lineNumber: 104
}
},
t('welcomepage.roomname')
),
_react2.default.createElement(_reactNative.TextInput, {
accessibilityLabel: 'Input room name.',
autoCapitalize: 'none',
autoComplete: false,
autoCorrect: false,
autoFocus: false,
onChangeText: this._onRoomChange,
placeholder: t('welcomepage.roomnamePlaceHolder'),
style: _styles3.default.textInput,
underlineColorAndroid: 'transparent',
value: this.state.room, __source: {
fileName: _jsxFileName,
lineNumber: 107
}
}),
_react2.default.createElement(
_reactNative.TouchableHighlight,
{
accessibilityLabel: 'Tap to Join.',
disabled: this._isJoinDisabled(),
onPress: this._onJoin,
style: _styles3.default.button,
underlayColor: _styles.ColorPalette.white, __source: {
fileName: _jsxFileName,
lineNumber: 118
}
},
_react2.default.createElement(
_react3.Text,
{ style: _styles3.default.buttonText, __source: {
fileName: _jsxFileName,
lineNumber: 124
}
},
t('welcomepage.join')
)
)
),
this._renderLegalese()
);
}
}]);
return WelcomePage;
}(_AbstractWelcomePage2.AbstractWelcomePage);
WelcomePage.propTypes = _AbstractWelcomePage2.AbstractWelcomePage.propTypes;
exports.default = (0, _i18n.translate)((0, _reactRedux.connect)(_AbstractWelcomePage2._mapStateToProps)(WelcomePage));
}, 982, null, "jitsi-meet/react/features/welcome/components/WelcomePage.native.js");
__d(/* jitsi-meet/react/features/welcome/components/AbstractWelcomePage.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
exports.AbstractWelcomePage = undefined;
var _jsxFileName = '/Users/manu/UC/matrix/github/others/jitsi-meet/react/features/welcome/components/AbstractWelcomePage.js';
exports._mapStateToProps = _mapStateToProps;
var _react = require(34 ); // 34 = react
var _react2 = babelHelpers.interopRequireDefault(_react);
var _app = require(430 ); // 430 = ../../app
var _conference = require(432 ); // 432 = ../../base/conference
var _media = require(567 ); // 567 = ../../base/media
var _tracks = require(580 ); // 580 = ../../base/tracks
var _roomnameGenerator = require(984 ); // 984 = ../roomnameGenerator
var AbstractWelcomePage = exports.AbstractWelcomePage = function (_Component) {
babelHelpers.inherits(AbstractWelcomePage, _Component);
function AbstractWelcomePage(props) {
babelHelpers.classCallCheck(this, AbstractWelcomePage);
var _this = babelHelpers.possibleConstructorReturn(this, (AbstractWelcomePage.__proto__ || Object.getPrototypeOf(AbstractWelcomePage)).call(this, props));
_this.state = {
animateTimeoutId: null,
generatedRoomname: '',
room: '',
roomPlaceholder: '',
updateTimeoutId: null
};
_this._animateRoomnameChanging = _this._animateRoomnameChanging.bind(_this);
_this._onJoin = _this._onJoin.bind(_this);
_this._onRoomChange = _this._onRoomChange.bind(_this);
_this._updateRoomname = _this._updateRoomname.bind(_this);
return _this;
}
babelHelpers.createClass(AbstractWelcomePage, [{
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(nextProps) {
this.setState({ room: nextProps._room });
}
}, {
key: 'componentWillUnmount',
value: function componentWillUnmount() {
this._clearTimeouts();
}
}, {
key: '_animateRoomnameChanging',
value: function _animateRoomnameChanging(word) {
var _this2 = this;
var animateTimeoutId = null;
var roomPlaceholder = this.state.roomPlaceholder + word.substr(0, 1);
if (word.length > 1) {
animateTimeoutId = setTimeout(function () {
_this2._animateRoomnameChanging(word.substring(1, word.length));
}, 70);
}
this.setState({
animateTimeoutId: animateTimeoutId,
roomPlaceholder: roomPlaceholder
});
}
}, {
key: '_clearTimeouts',
value: function _clearTimeouts() {
clearTimeout(this.state.animateTimeoutId);
clearTimeout(this.state.updateTimeoutId);
}
}, {
key: '_isJoinDisabled',
value: function _isJoinDisabled() {
return !(0, _conference.isRoomValid)(this.state.room);
}
}, {
key: '_onJoin',
value: function _onJoin() {
var room = this.state.room || this.state.generatedRoomname;
room && this.props.dispatch((0, _app.appNavigate)(room));
}
}, {
key: '_onRoomChange',
value: function _onRoomChange(value) {
this.setState({ room: value });
}
}, {
key: '_renderLocalVideo',
value: function _renderLocalVideo() {
return _react2.default.createElement(_media.VideoTrack, { videoTrack: this.props._localVideoTrack, __source: {
fileName: _jsxFileName,
lineNumber: 169
}
});
}
}, {
key: '_updateRoomname',
value: function _updateRoomname() {
var _this3 = this;
var generatedRoomname = (0, _roomnameGenerator.generateRoomWithoutSeparator)();
var roomPlaceholder = '';
var updateTimeoutId = setTimeout(this._updateRoomname, 10000);
this._clearTimeouts();
this.setState({
generatedRoomname: generatedRoomname,
roomPlaceholder: roomPlaceholder,
updateTimeoutId: updateTimeoutId
}, function () {
return _this3._animateRoomnameChanging(generatedRoomname);
});
}
}]);
return AbstractWelcomePage;
}(_react.Component);
AbstractWelcomePage.propTypes = {
_localVideoTrack: _react2.default.PropTypes.object,
_room: _react2.default.PropTypes.string,
dispatch: _react2.default.PropTypes.func
};
function _mapStateToProps(state) {
var conference = state['features/base/conference'];
var tracks = state['features/base/tracks'];
return {
_localVideoTrack: (0, _tracks.getLocalVideoTrack)(tracks),
_room: conference.room
};
}
}, 983, null, "jitsi-meet/react/features/welcome/components/AbstractWelcomePage.js");
__d(/* jitsi-meet/react/features/welcome/roomnameGenerator.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
exports.generateRoomWithoutSeparator = generateRoomWithoutSeparator;
var _util = require(529 ); // 529 = ../base/util
var _PLURALNOUN_ = ['Aliens', 'Animals', 'Antelopes', 'Ants', 'Apes', 'Apples', 'Baboons', 'Bacteria', 'Badgers', 'Bananas', 'Bats', 'Bears', 'Birds', 'Bonobos', 'Brides', 'Bugs', 'Bulls', 'Butterflies', 'Cheetahs', 'Cherries', 'Chicken', 'Children', 'Chimps', 'Clowns', 'Cows', 'Creatures', 'Dinosaurs', 'Dogs', 'Dolphins', 'Donkeys', 'Dragons', 'Ducks', 'Dwarfs', 'Eagles', 'Elephants', 'Elves', 'Fathers', 'Fish', 'Flowers', 'Frogs', 'Fruit', 'Fungi', 'Galaxies', 'Geese', 'Goats', 'Gorillas', 'Hedgehogs', 'Hippos', 'Horses', 'Hunters', 'Insects', 'Kids', 'Knights', 'Lemons', 'Lemurs', 'Leopards', 'LifeForms', 'Lions', 'Lizards', 'Mice', 'Monkeys', 'Monsters', 'Mushrooms', 'Octopodes', 'Oranges', 'Orangutans', 'Organisms', 'Pants', 'Parrots', 'Penguins', 'People', 'Pigeons', 'Pigs', 'Pineapples', 'Plants', 'Potatoes', 'Priests', 'Rats', 'Reptiles', 'Reptilians', 'Rhinos', 'Seagulls', 'Sheep', 'Siblings', 'Snakes', 'Spaghetti', 'Spiders', 'Squid', 'Squirrels', 'Stars', 'Students', 'Teachers', 'Tigers', 'Tomatoes', 'Trees', 'Vampires', 'Vegetables', 'Viruses', 'Vulcans', 'Weasels', 'Werewolves', 'Whales', 'Witches', 'Wizards', 'Wolves', 'Workers', 'Worms', 'Zebras'];
var _VERB_ = ['Abandon', 'Adapt', 'Advertise', 'Answer', 'Anticipate', 'Appreciate', 'Approach', 'Argue', 'Ask', 'Bite', 'Blossom', 'Blush', 'Breathe', 'Breed', 'Bribe', 'Burn', 'Calculate', 'Clean', 'Code', 'Communicate', 'Compute', 'Confess', 'Confiscate', 'Conjugate', 'Conjure', 'Consume', 'Contemplate', 'Crawl', 'Dance', 'Delegate', 'Devour', 'Develop', 'Differ', 'Discuss', 'Dissolve', 'Drink', 'Eat', 'Elaborate', 'Emancipate', 'Estimate', 'Expire', 'Extinguish', 'Extract', 'Facilitate', 'Fall', 'Feed', 'Finish', 'Floss', 'Fly', 'Follow', 'Fragment', 'Freeze', 'Gather', 'Glow', 'Grow', 'Hex', 'Hide', 'Hug', 'Hurry', 'Improve', 'Intersect', 'Investigate', 'Jinx', 'Joke', 'Jubilate', 'Kiss', 'Laugh', 'Manage', 'Meet', 'Merge', 'Move', 'Object', 'Observe', 'Offer', 'Paint', 'Participate', 'Party', 'Perform', 'Plan', 'Pursue', 'Pierce', 'Play', 'Postpone', 'Pray', 'Proclaim', 'Question', 'Read', 'Reckon', 'Rejoice', 'Represent', 'Resize', 'Rhyme', 'Scream', 'Search', 'Select', 'Share', 'Shoot', 'Shout', 'Signal', 'Sing', 'Skate', 'Sleep', 'Smile', 'Smoke', 'Solve', 'Spell', 'Steer', 'Stink', 'Substitute', 'Swim', 'Taste', 'Teach', 'Terminate', 'Think', 'Type', 'Unite', 'Vanish', 'Worship'];
var _ADVERB_ = ['Absently', 'Accurately', 'Accusingly', 'Adorably', 'AllTheTime', 'Alone', 'Always', 'Amazingly', 'Angrily', 'Anxiously', 'Anywhere', 'Appallingly', 'Apparently', 'Articulately', 'Astonishingly', 'Badly', 'Barely', 'Beautifully', 'Blindly', 'Bravely', 'Brightly', 'Briskly', 'Brutally', 'Calmly', 'Carefully', 'Casually', 'Cautiously', 'Cleverly', 'Constantly', 'Correctly', 'Crazily', 'Curiously', 'Cynically', 'Daily', 'Dangerously', 'Deliberately', 'Delicately', 'Desperately', 'Discreetly', 'Eagerly', 'Easily', 'Euphoricly', 'Evenly', 'Everywhere', 'Exactly', 'Expectantly', 'Extensively', 'Ferociously', 'Fiercely', 'Finely', 'Flatly', 'Frequently', 'Frighteningly', 'Gently', 'Gloriously', 'Grimly', 'Guiltily', 'Happily', 'Hard', 'Hastily', 'Heroically', 'High', 'Highly', 'Hourly', 'Humbly', 'Hysterically', 'Immensely', 'Impartially', 'Impolitely', 'Indifferently', 'Intensely', 'Jealously', 'Jovially', 'Kindly', 'Lazily', 'Lightly', 'Loudly', 'Lovingly', 'Loyally', 'Magnificently', 'Malevolently', 'Merrily', 'Mightily', 'Miserably', 'Mysteriously', 'NOT', 'Nervously', 'Nicely', 'Nowhere', 'Objectively', 'Obnoxiously', 'Obsessively', 'Obviously', 'Often', 'Painfully', 'Patiently', 'Playfully', 'Politely', 'Poorly', 'Precisely', 'Promptly', 'Quickly', 'Quietly', 'Randomly', 'Rapidly', 'Rarely', 'Recklessly', 'Regularly', 'Remorsefully', 'Responsibly', 'Rudely', 'Ruthlessly', 'Sadly', 'Scornfully', 'Seamlessly', 'Seldom', 'Selfishly', 'Seriously', 'Shakily', 'Sharply', 'Sideways', 'Silently', 'Sleepily', 'Slightly', 'Slowly', 'Slyly', 'Smoothly', 'Softly', 'Solemnly', 'Steadily', 'Sternly', 'Strangely', 'Strongly', 'Stunningly', 'Surely', 'Tenderly', 'Thoughtfully', 'Tightly', 'Uneasily', 'Vanishingly', 'Violently', 'Warmly', 'Weakly', 'Wearily', 'Weekly', 'Weirdly', 'Well', 'Well', 'Wickedly', 'Wildly', 'Wisely', 'Wonderfully', 'Yearly'];
var _ADJECTIVE_ = ['Abominable', 'Accurate', 'Adorable', 'All', 'Alleged', 'Ancient', 'Angry', 'Anxious', 'Appalling', 'Apparent', 'Astonishing', 'Attractive', 'Awesome', 'Baby', 'Bad', 'Beautiful', 'Benign', 'Big', 'Bitter', 'Blind', 'Blue', 'Bold', 'Brave', 'Bright', 'Brisk', 'Calm', 'Camouflaged', 'Casual', 'Cautious', 'Choppy', 'Chosen', 'Clever', 'Cold', 'Cool', 'Crawly', 'Crazy', 'Creepy', 'Cruel', 'Curious', 'Cynical', 'Dangerous', 'Dark', 'Delicate', 'Desperate', 'Difficult', 'Discreet', 'Disguised', 'Dizzy', 'Dumb', 'Eager', 'Easy', 'Edgy', 'Electric', 'Elegant', 'Emancipated', 'Enormous', 'Euphoric', 'Evil', 'Fast', 'Ferocious', 'Fierce', 'Fine', 'Flawed', 'Flying', 'Foolish', 'Foxy', 'Freezing', 'Funny', 'Furious', 'Gentle', 'Glorious', 'Golden', 'Good', 'Green', 'Green', 'Guilty', 'Hairy', 'Happy', 'Hard', 'Hasty', 'Hazy', 'Heroic', 'Hostile', 'Hot', 'Humble', 'Humongous', 'Humorous', 'Hysterical', 'Idealistic', 'Ignorant', 'Immense', 'Impartial', 'Impolite', 'Indifferent', 'Infuriated', 'Insightful', 'Intense', 'Interesting', 'Intimidated', 'Intriguing', 'Jealous', 'Jolly', 'Jovial', 'Jumpy', 'Kind', 'Laughing', 'Lazy', 'Liquid', 'Lonely', 'Longing', 'Loud', 'Loving', 'Loyal', 'Macabre', 'Mad', 'Magical', 'Magnificent', 'Malevolent', 'Medieval', 'Memorable', 'Mere', 'Merry', 'Mighty', 'Mischievous', 'Miserable', 'Modified', 'Moody', 'Most', 'Mysterious', 'Mystical', 'Needy', 'Nervous', 'Nice', 'Objective', 'Obnoxious', 'Obsessive', 'Obvious', 'Opinionated', 'Orange', 'Painful', 'Passionate', 'Perfect', 'Pink', 'Playful', 'Poisonous', 'Polite', 'Poor', 'Popular', 'Powerful', 'Precise', 'Preserved', 'Pretty', 'Purple', 'Quick', 'Quiet', 'Random', 'Rapid', 'Rare', 'Real', 'Reassuring', 'Reckless', 'Red', 'Regular', 'Remorseful', 'Responsible', 'Rich', 'Rude', 'Ruthless', 'Sad', 'Scared', 'Scary', 'Scornful', 'Screaming', 'Selfish', 'Serious', 'Shady', 'Shaky', 'Sharp', 'Shiny', 'Shy', 'Simple', 'Sleepy', 'Slow', 'Sly', 'Small', 'Smart', 'Smelly', 'Smiling', 'Smooth', 'Smug', 'Sober', 'Soft', 'Solemn', 'Square', 'Square', 'Steady', 'Strange', 'Strong', 'Stunning', 'Subjective', 'Successful', 'Surly', 'Sweet', 'Tactful', 'Tense', 'Thoughtful', 'Tight', 'Tiny', 'Tolerant', 'Uneasy', 'Unique', 'Unseen', 'Warm', 'Weak', 'Weird', 'WellCooked', 'Wild', 'Wise', 'Witty', 'Wonderful', 'Worried', 'Yellow', 'Young', 'Zealous'];
var CATEGORIES = {
_ADJECTIVE_: _ADJECTIVE_,
_ADVERB_: _ADVERB_,
_PLURALNOUN_: _PLURALNOUN_,
_VERB_: _VERB_
};
var PATTERNS = ['_ADJECTIVE__PLURALNOUN__VERB__ADVERB_'];
function generateRoomWithoutSeparator() {
var name = (0, _util.randomElement)(PATTERNS);
while (_hasTemplate(name)) {
for (var template in CATEGORIES) {
var word = (0, _util.randomElement)(CATEGORIES[template]);
name = name.replace(template, word);
}
}
return name;
}
function _hasTemplate(s) {
for (var template in CATEGORIES) {
if (s.indexOf(template) >= 0) {
return true;
}
}
return false;
}
}, 984, null, "jitsi-meet/react/features/welcome/roomnameGenerator.js");
__d(/* jitsi-meet/react/features/welcome/components/styles.js */function(global, require, module, exports) {Object.defineProperty(exports, "__esModule", {
value: true
});
var _styles = require(601 ); // 601 = ../../base/styles
var TEXT_COLOR = _styles.ColorPalette.white;
exports.default = (0, _styles.createStyleSheet)({
button: {
backgroundColor: _styles.ColorPalette.white,
borderColor: _styles.ColorPalette.white,
borderRadius: 8,
borderWidth: 1,
height: 45,
justifyContent: 'center',
marginBottom: _styles.BoxModel.margin,
marginTop: _styles.BoxModel.margin
},
buttonText: {
alignSelf: 'center',
color: '#00ccff',
fontSize: 18
},
container: (0, _styles.fixAndroidViewClipping)({
alignSelf: 'stretch',
backgroundColor: _styles.ColorPalette.blue,
flex: 1
}),
legaleseContainer: {
alignItems: 'center',
flex: 0,
flexDirection: 'row',
justifyContent: 'center'
},
legaleseItem: {
color: TEXT_COLOR,
fontSize: 12,
margin: _styles.BoxModel.margin
},
localVideoOverlay: {
backgroundColor: 'transparent',
bottom: 0,
flex: 1,
flexDirection: 'column',
left: 0,
position: 'absolute',
right: 0,
top: 0
},
roomContainer: {
flex: 1,
flexDirection: 'column',
justifyContent: 'center',
margin: 3 * _styles.BoxModel.margin
},
textInput: {
backgroundColor: 'transparent',
borderColor: _styles.ColorPalette.white,
borderRadius: 8,
borderWidth: 1,
color: TEXT_COLOR,
fontSize: 23,
height: 50,
padding: 4,
textAlign: 'center'
},
title: {
color: TEXT_COLOR,
fontSize: 25,
marginBottom: 2 * _styles.BoxModel.margin,
textAlign: 'center'
}
});
}, 985, null, "jitsi-meet/react/features/welcome/components/styles.js");
__d(/* jitsi-meet/react/features/welcome/route.js */function(global, require, module, exports) {var _react = require(589 ); // 589 = ../base/react
var _components = require(981 ); // 981 = ./components
var _roomnameGenerator = require(984 ); // 984 = ./roomnameGenerator
_react.RouteRegistry.register({
component: _components.WelcomePage,
onEnter: onEnter,
path: '/'
});
function onEnter(nextState, replace) {
if (typeof APP === 'object' && !(config.enableWelcomePage && APP.settings.isWelcomePageEnabled())) {
var room = (0, _roomnameGenerator.generateRoomWithoutSeparator)();
replace('/' + room);
}
}
}, 986, null, "jitsi-meet/react/features/welcome/route.js");
__d(/* jitsi-meet/react/features/app/middleware.js */function(global, require, module, exports) {var _conference = require(432 ); // 432 = ../base/conference
var _connection = require(615 ); // 615 = ../base/connection
var _redux = require(505 ); // 505 = ../base/redux
var _tracks = require(580 ); // 580 = ../base/tracks
_redux.MiddlewareRegistry.register(function (store) {
return function (next) {
return function (action) {
switch (action.type) {
case _connection.CONNECTION_ESTABLISHED:
return _connectionEstablished(store, next, action);
case _connection.SET_LOCATION_URL:
return _setLocationURL(store, next, action);
case _conference.SET_ROOM:
return _setRoom(store, next, action);
}
return next(action);
};
};
});
function _connectionEstablished(store, next, action) {
var result = next(action);
var _window = window,
history = _window.history,
location = _window.location;
if (history && location && history.length && typeof history.replaceState === 'function') {
var replacement = (0, _connection.getURLWithoutParams)(location);
if (location !== replacement) {
history.replaceState(history.state, document && document.title || '', replacement);
}
}
return result;
}
function _navigate(_ref) {
var dispatch = _ref.dispatch,
getState = _ref.getState;
var state = getState();
var _state$featuresApp = state['features/app'],
app = _state$featuresApp.app,
getRouteToRender = _state$featuresApp.getRouteToRender;
var routeToRender = getRouteToRender && getRouteToRender(state);
if (navigator.product === 'ReactNative') {
if (typeof routeToRender === 'undefined' || routeToRender === null) {
app.props.welcomePageEnabled || dispatch((0, _tracks.destroyLocalTracks)());
} else {
state['features/base/tracks'].some(function (t) {
return t.local;
}) || dispatch((0, _tracks.createInitialLocalTracks)());
}
}
return app._navigate(routeToRender);
}
function _setLocationURL(_ref2, next, action) {
var getState = _ref2.getState;
return getState()['features/app'].app._navigate(undefined).then(function () {
return next(action);
});
}
function _setRoom(store, next, action) {
var result = next(action);
_navigate(store);
return result;
}
}, 987, null, "jitsi-meet/react/features/app/middleware.js");
__d(/* jitsi-meet/react/features/app/reducer.js */function(global, require, module, exports) {var _conference = require(432 ); // 432 = ../base/conference
var _connection = require(615 ); // 615 = ../base/connection
var _redux = require(505 ); // 505 = ../base/redux
var _actionTypes = require(675 ); // 675 = ./actionTypes
var _functions = require(697 ); // 697 = ./functions
_redux.ReducerRegistry.register('features/app', function () {
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var action = arguments[1];
switch (action.type) {
case _actionTypes.APP_WILL_MOUNT:
{
var app = action.app;
if (state.app !== app) {
return babelHelpers.extends({}, state, {
app: app
});
}
break;
}
case _actionTypes.APP_WILL_UNMOUNT:
if (state.app === action.app) {
return babelHelpers.extends({}, state, {
app: undefined
});
}
break;
case _connection.SET_LOCATION_URL:
return (0, _redux.set)(state, 'getRouteToRender', undefined);
case _conference.SET_ROOM:
return (0, _redux.set)(state, 'getRouteToRender', _functions._getRouteToRender);
}
return state;
});
}, 988, null, "jitsi-meet/react/features/app/reducer.js");
;require(243);
;require(0);