diff --git a/dist/realtime-core.browser.js b/dist/realtime-core.browser.js new file mode 100644 index 000000000..143be8327 --- /dev/null +++ b/dist/realtime-core.browser.js @@ -0,0 +1,16765 @@ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define('leancloud-realtime', ['exports'], factory) : + (factory((global.AV = global.AV || {}))); +}(this, (function (exports) { 'use strict'; + + var define = undefined; + var require = require || function(id) {throw new Error('Unexpected required ' + id)}; + + + + var process = (window && window.process) || {}; + process.env = process.env || {}; + + var commonjsGlobal = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; + + function commonjsRequire () { + throw new Error('Dynamic requires are not currently supported by rollup-plugin-commonjs'); + } + + function unwrapExports (x) { + return x && x.__esModule ? x['default'] : x; + } + + function createCommonjsModule(fn, module) { + return module = { exports: {} }, fn(module, module.exports), module.exports; + } + + // 7.1.4 ToInteger + var ceil = Math.ceil; + var floor = Math.floor; + var _toInteger = function (it) { + return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); + }; + + // 7.2.1 RequireObjectCoercible(argument) + var _defined = function (it) { + if (it == undefined) throw TypeError("Can't call method on " + it); + return it; + }; + + // true -> String#at + // false -> String#codePointAt + var _stringAt = function (TO_STRING) { + return function (that, pos) { + var s = String(_defined(that)); + var i = _toInteger(pos); + var l = s.length; + var a, b; + if (i < 0 || i >= l) return TO_STRING ? '' : undefined; + a = s.charCodeAt(i); + return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff + ? TO_STRING ? s.charAt(i) : a + : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; + }; + }; + + var _library = true; + + var _global = createCommonjsModule(function (module) { + // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 + var global = module.exports = typeof window != 'undefined' && window.Math == Math + ? window : typeof self != 'undefined' && self.Math == Math ? self + // eslint-disable-next-line no-new-func + : Function('return this')(); + if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef + }); + + var _core = createCommonjsModule(function (module) { + var core = module.exports = { version: '2.5.1' }; + if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef + }); + + var _aFunction = function (it) { + if (typeof it != 'function') throw TypeError(it + ' is not a function!'); + return it; + }; + + // optional / simple context binding + + var _ctx = function (fn, that, length) { + _aFunction(fn); + if (that === undefined) return fn; + switch (length) { + case 1: return function (a) { + return fn.call(that, a); + }; + case 2: return function (a, b) { + return fn.call(that, a, b); + }; + case 3: return function (a, b, c) { + return fn.call(that, a, b, c); + }; + } + return function (/* ...args */) { + return fn.apply(that, arguments); + }; + }; + + var _isObject = function (it) { + return typeof it === 'object' ? it !== null : typeof it === 'function'; + }; + + var _anObject = function (it) { + if (!_isObject(it)) throw TypeError(it + ' is not an object!'); + return it; + }; + + var _fails = function (exec) { + try { + return !!exec(); + } catch (e) { + return true; + } + }; + + // Thank's IE8 for his funny defineProperty + var _descriptors = !_fails(function () { + return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; + }); + + var document$1 = _global.document; + // typeof document.createElement is 'object' in old IE + var is = _isObject(document$1) && _isObject(document$1.createElement); + var _domCreate = function (it) { + return is ? document$1.createElement(it) : {}; + }; + + var _ie8DomDefine = !_descriptors && !_fails(function () { + return Object.defineProperty(_domCreate('div'), 'a', { get: function () { return 7; } }).a != 7; + }); + + // 7.1.1 ToPrimitive(input [, PreferredType]) + + // instead of the ES6 spec version, we didn't implement @@toPrimitive case + // and the second argument - flag - preferred type is a string + var _toPrimitive = function (it, S) { + if (!_isObject(it)) return it; + var fn, val; + if (S && typeof (fn = it.toString) == 'function' && !_isObject(val = fn.call(it))) return val; + if (typeof (fn = it.valueOf) == 'function' && !_isObject(val = fn.call(it))) return val; + if (!S && typeof (fn = it.toString) == 'function' && !_isObject(val = fn.call(it))) return val; + throw TypeError("Can't convert object to primitive value"); + }; + + var dP = Object.defineProperty; + + var f = _descriptors ? Object.defineProperty : function defineProperty(O, P, Attributes) { + _anObject(O); + P = _toPrimitive(P, true); + _anObject(Attributes); + if (_ie8DomDefine) try { + return dP(O, P, Attributes); + } catch (e) { /* empty */ } + if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); + if ('value' in Attributes) O[P] = Attributes.value; + return O; + }; + + var _objectDp = { + f: f + }; + + var _propertyDesc = function (bitmap, value) { + return { + enumerable: !(bitmap & 1), + configurable: !(bitmap & 2), + writable: !(bitmap & 4), + value: value + }; + }; + + var _hide = _descriptors ? function (object, key, value) { + return _objectDp.f(object, key, _propertyDesc(1, value)); + } : function (object, key, value) { + object[key] = value; + return object; + }; + + var PROTOTYPE = 'prototype'; + + var $export = function (type, name, source) { + var IS_FORCED = type & $export.F; + var IS_GLOBAL = type & $export.G; + var IS_STATIC = type & $export.S; + var IS_PROTO = type & $export.P; + var IS_BIND = type & $export.B; + var IS_WRAP = type & $export.W; + var exports = IS_GLOBAL ? _core : _core[name] || (_core[name] = {}); + var expProto = exports[PROTOTYPE]; + var target = IS_GLOBAL ? _global : IS_STATIC ? _global[name] : (_global[name] || {})[PROTOTYPE]; + var key, own, out; + if (IS_GLOBAL) source = name; + for (key in source) { + // contains in native + own = !IS_FORCED && target && target[key] !== undefined; + if (own && key in exports) continue; + // export native or passed + out = own ? target[key] : source[key]; + // prevent global pollution for namespaces + exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] + // bind timers to global for call from export context + : IS_BIND && own ? _ctx(out, _global) + // wrap global constructors for prevent change them in library + : IS_WRAP && target[key] == out ? (function (C) { + var F = function (a, b, c) { + if (this instanceof C) { + switch (arguments.length) { + case 0: return new C(); + case 1: return new C(a); + case 2: return new C(a, b); + } return new C(a, b, c); + } return C.apply(this, arguments); + }; + F[PROTOTYPE] = C[PROTOTYPE]; + return F; + // make static versions for prototype methods + })(out) : IS_PROTO && typeof out == 'function' ? _ctx(Function.call, out) : out; + // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% + if (IS_PROTO) { + (exports.virtual || (exports.virtual = {}))[key] = out; + // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% + if (type & $export.R && expProto && !expProto[key]) _hide(expProto, key, out); + } + } + }; + // type bitmap + $export.F = 1; // forced + $export.G = 2; // global + $export.S = 4; // static + $export.P = 8; // proto + $export.B = 16; // bind + $export.W = 32; // wrap + $export.U = 64; // safe + $export.R = 128; // real proto method for `library` + var _export = $export; + + var _redefine = _hide; + + var hasOwnProperty = {}.hasOwnProperty; + var _has = function (it, key) { + return hasOwnProperty.call(it, key); + }; + + var _iterators = {}; + + var toString = {}.toString; + + var _cof = function (it) { + return toString.call(it).slice(8, -1); + }; + + // fallback for non-array-like ES3 and non-enumerable old V8 strings + + // eslint-disable-next-line no-prototype-builtins + var _iobject = Object('z').propertyIsEnumerable(0) ? Object : function (it) { + return _cof(it) == 'String' ? it.split('') : Object(it); + }; + + // to indexed object, toObject with fallback for non-array-like ES3 strings + + + var _toIobject = function (it) { + return _iobject(_defined(it)); + }; + + // 7.1.15 ToLength + + var min = Math.min; + var _toLength = function (it) { + return it > 0 ? min(_toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 + }; + + var max = Math.max; + var min$1 = Math.min; + var _toAbsoluteIndex = function (index, length) { + index = _toInteger(index); + return index < 0 ? max(index + length, 0) : min$1(index, length); + }; + + // false -> Array#indexOf + // true -> Array#includes + + + + var _arrayIncludes = function (IS_INCLUDES) { + return function ($this, el, fromIndex) { + var O = _toIobject($this); + var length = _toLength(O.length); + var index = _toAbsoluteIndex(fromIndex, length); + var value; + // Array#includes uses SameValueZero equality algorithm + // eslint-disable-next-line no-self-compare + if (IS_INCLUDES && el != el) while (length > index) { + value = O[index++]; + // eslint-disable-next-line no-self-compare + if (value != value) return true; + // Array#indexOf ignores holes, Array#includes - not + } else for (;length > index; index++) if (IS_INCLUDES || index in O) { + if (O[index] === el) return IS_INCLUDES || index || 0; + } return !IS_INCLUDES && -1; + }; + }; + + var SHARED = '__core-js_shared__'; + var store = _global[SHARED] || (_global[SHARED] = {}); + var _shared = function (key) { + return store[key] || (store[key] = {}); + }; + + var id = 0; + var px = Math.random(); + var _uid = function (key) { + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); + }; + + var shared = _shared('keys'); + + var _sharedKey = function (key) { + return shared[key] || (shared[key] = _uid(key)); + }; + + var arrayIndexOf = _arrayIncludes(false); + var IE_PROTO$1 = _sharedKey('IE_PROTO'); + + var _objectKeysInternal = function (object, names) { + var O = _toIobject(object); + var i = 0; + var result = []; + var key; + for (key in O) if (key != IE_PROTO$1) _has(O, key) && result.push(key); + // Don't enum bug & hidden keys + while (names.length > i) if (_has(O, key = names[i++])) { + ~arrayIndexOf(result, key) || result.push(key); + } + return result; + }; + + // IE 8- don't enum bug keys + var _enumBugKeys = ( + 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' + ).split(','); + + // 19.1.2.14 / 15.2.3.14 Object.keys(O) + + + + var _objectKeys = Object.keys || function keys(O) { + return _objectKeysInternal(O, _enumBugKeys); + }; + + var _objectDps = _descriptors ? Object.defineProperties : function defineProperties(O, Properties) { + _anObject(O); + var keys = _objectKeys(Properties); + var length = keys.length; + var i = 0; + var P; + while (length > i) _objectDp.f(O, P = keys[i++], Properties[P]); + return O; + }; + + var document$2 = _global.document; + var _html = document$2 && document$2.documentElement; + + // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) + + + + var IE_PROTO = _sharedKey('IE_PROTO'); + var Empty = function () { /* empty */ }; + var PROTOTYPE$1 = 'prototype'; + + // Create object with fake `null` prototype: use iframe Object with cleared prototype + var createDict = function () { + // Thrash, waste and sodomy: IE GC bug + var iframe = _domCreate('iframe'); + var i = _enumBugKeys.length; + var lt = '<'; + var gt = '>'; + var iframeDocument; + iframe.style.display = 'none'; + _html.appendChild(iframe); + iframe.src = 'javascript:'; // eslint-disable-line no-script-url + // createDict = iframe.contentWindow.Object; + // html.removeChild(iframe); + iframeDocument = iframe.contentWindow.document; + iframeDocument.open(); + iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); + iframeDocument.close(); + createDict = iframeDocument.F; + while (i--) delete createDict[PROTOTYPE$1][_enumBugKeys[i]]; + return createDict(); + }; + + var _objectCreate = Object.create || function create(O, Properties) { + var result; + if (O !== null) { + Empty[PROTOTYPE$1] = _anObject(O); + result = new Empty(); + Empty[PROTOTYPE$1] = null; + // add "__proto__" for Object.getPrototypeOf polyfill + result[IE_PROTO] = O; + } else result = createDict(); + return Properties === undefined ? result : _objectDps(result, Properties); + }; + + var _wks = createCommonjsModule(function (module) { + var store = _shared('wks'); + + var Symbol = _global.Symbol; + var USE_SYMBOL = typeof Symbol == 'function'; + + var $exports = module.exports = function (name) { + return store[name] || (store[name] = + USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : _uid)('Symbol.' + name)); + }; + + $exports.store = store; + }); + + var def = _objectDp.f; + + var TAG = _wks('toStringTag'); + + var _setToStringTag = function (it, tag, stat) { + if (it && !_has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }); + }; + + var IteratorPrototype = {}; + + // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() + _hide(IteratorPrototype, _wks('iterator'), function () { return this; }); + + var _iterCreate = function (Constructor, NAME, next) { + Constructor.prototype = _objectCreate(IteratorPrototype, { next: _propertyDesc(1, next) }); + _setToStringTag(Constructor, NAME + ' Iterator'); + }; + + // 7.1.13 ToObject(argument) + + var _toObject = function (it) { + return Object(_defined(it)); + }; + + // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) + + + var IE_PROTO$2 = _sharedKey('IE_PROTO'); + var ObjectProto = Object.prototype; + + var _objectGpo = Object.getPrototypeOf || function (O) { + O = _toObject(O); + if (_has(O, IE_PROTO$2)) return O[IE_PROTO$2]; + if (typeof O.constructor == 'function' && O instanceof O.constructor) { + return O.constructor.prototype; + } return O instanceof Object ? ObjectProto : null; + }; + + var ITERATOR = _wks('iterator'); + var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` + var FF_ITERATOR = '@@iterator'; + var KEYS = 'keys'; + var VALUES = 'values'; + + var returnThis = function () { return this; }; + + var _iterDefine = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { + _iterCreate(Constructor, NAME, next); + var getMethod = function (kind) { + if (!BUGGY && kind in proto) return proto[kind]; + switch (kind) { + case KEYS: return function keys() { return new Constructor(this, kind); }; + case VALUES: return function values() { return new Constructor(this, kind); }; + } return function entries() { return new Constructor(this, kind); }; + }; + var TAG = NAME + ' Iterator'; + var DEF_VALUES = DEFAULT == VALUES; + var VALUES_BUG = false; + var proto = Base.prototype; + var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; + var $default = $native || getMethod(DEFAULT); + var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined; + var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; + var methods, key, IteratorPrototype; + // Fix native + if ($anyNative) { + IteratorPrototype = _objectGpo($anyNative.call(new Base())); + if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { + // Set @@toStringTag to native iterators + _setToStringTag(IteratorPrototype, TAG, true); + // fix for some old engines + if (!_library && !_has(IteratorPrototype, ITERATOR)) _hide(IteratorPrototype, ITERATOR, returnThis); + } + } + // fix Array#{values, @@iterator}.name in V8 / FF + if (DEF_VALUES && $native && $native.name !== VALUES) { + VALUES_BUG = true; + $default = function values() { return $native.call(this); }; + } + // Define iterator + if ((!_library || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { + _hide(proto, ITERATOR, $default); + } + // Plug for library + _iterators[NAME] = $default; + _iterators[TAG] = returnThis; + if (DEFAULT) { + methods = { + values: DEF_VALUES ? $default : getMethod(VALUES), + keys: IS_SET ? $default : getMethod(KEYS), + entries: $entries + }; + if (FORCED) for (key in methods) { + if (!(key in proto)) _redefine(proto, key, methods[key]); + } else _export(_export.P + _export.F * (BUGGY || VALUES_BUG), NAME, methods); + } + return methods; + }; + + var $at = _stringAt(true); + + // 21.1.3.27 String.prototype[@@iterator]() + _iterDefine(String, 'String', function (iterated) { + this._t = String(iterated); // target + this._i = 0; // next index + // 21.1.5.2.1 %StringIteratorPrototype%.next() + }, function () { + var O = this._t; + var index = this._i; + var point; + if (index >= O.length) return { value: undefined, done: true }; + point = $at(O, index); + this._i += point.length; + return { value: point, done: false }; + }); + + var _addToUnscopables = function () { /* empty */ }; + + var _iterStep = function (done, value) { + return { value: value, done: !!done }; + }; + + // 22.1.3.4 Array.prototype.entries() + // 22.1.3.13 Array.prototype.keys() + // 22.1.3.29 Array.prototype.values() + // 22.1.3.30 Array.prototype[@@iterator]() + var es6_array_iterator = _iterDefine(Array, 'Array', function (iterated, kind) { + this._t = _toIobject(iterated); // target + this._i = 0; // next index + this._k = kind; // kind + // 22.1.5.2.1 %ArrayIteratorPrototype%.next() + }, function () { + var O = this._t; + var kind = this._k; + var index = this._i++; + if (!O || index >= O.length) { + this._t = undefined; + return _iterStep(1); + } + if (kind == 'keys') return _iterStep(0, index); + if (kind == 'values') return _iterStep(0, O[index]); + return _iterStep(0, [index, O[index]]); + }, 'values'); + + // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) + _iterators.Arguments = _iterators.Array; + + _addToUnscopables('keys'); + _addToUnscopables('values'); + _addToUnscopables('entries'); + + var TO_STRING_TAG = _wks('toStringTag'); + + var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' + + 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' + + 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' + + 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' + + 'TextTrackList,TouchList').split(','); + + for (var i = 0; i < DOMIterables.length; i++) { + var NAME = DOMIterables[i]; + var Collection = _global[NAME]; + var proto = Collection && Collection.prototype; + if (proto && !proto[TO_STRING_TAG]) _hide(proto, TO_STRING_TAG, NAME); + _iterators[NAME] = _iterators.Array; + } + + // getting tag from 19.1.3.6 Object.prototype.toString() + + var TAG$1 = _wks('toStringTag'); + // ES3 wrong here + var ARG = _cof(function () { return arguments; }()) == 'Arguments'; + + // fallback for IE11 Script Access Denied error + var tryGet = function (it, key) { + try { + return it[key]; + } catch (e) { /* empty */ } + }; + + var _classof = function (it) { + var O, T, B; + return it === undefined ? 'Undefined' : it === null ? 'Null' + // @@toStringTag case + : typeof (T = tryGet(O = Object(it), TAG$1)) == 'string' ? T + // builtinTag case + : ARG ? _cof(O) + // ES3 arguments fallback + : (B = _cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; + }; + + var _anInstance = function (it, Constructor, name, forbiddenField) { + if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) { + throw TypeError(name + ': incorrect invocation!'); + } return it; + }; + + // call something on iterator step with safe closing on error + + var _iterCall = function (iterator, fn, value, entries) { + try { + return entries ? fn(_anObject(value)[0], value[1]) : fn(value); + // 7.4.6 IteratorClose(iterator, completion) + } catch (e) { + var ret = iterator['return']; + if (ret !== undefined) _anObject(ret.call(iterator)); + throw e; + } + }; + + // check on default Array iterator + + var ITERATOR$1 = _wks('iterator'); + var ArrayProto = Array.prototype; + + var _isArrayIter = function (it) { + return it !== undefined && (_iterators.Array === it || ArrayProto[ITERATOR$1] === it); + }; + + var ITERATOR$2 = _wks('iterator'); + + var core_getIteratorMethod = _core.getIteratorMethod = function (it) { + if (it != undefined) return it[ITERATOR$2] + || it['@@iterator'] + || _iterators[_classof(it)]; + }; + + var _forOf = createCommonjsModule(function (module) { + var BREAK = {}; + var RETURN = {}; + var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) { + var iterFn = ITERATOR ? function () { return iterable; } : core_getIteratorMethod(iterable); + var f = _ctx(fn, that, entries ? 2 : 1); + var index = 0; + var length, step, iterator, result; + if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!'); + // fast case for arrays with default iterator + if (_isArrayIter(iterFn)) for (length = _toLength(iterable.length); length > index; index++) { + result = entries ? f(_anObject(step = iterable[index])[0], step[1]) : f(iterable[index]); + if (result === BREAK || result === RETURN) return result; + } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) { + result = _iterCall(iterator, f, step.value, entries); + if (result === BREAK || result === RETURN) return result; + } + }; + exports.BREAK = BREAK; + exports.RETURN = RETURN; + }); + + // 7.3.20 SpeciesConstructor(O, defaultConstructor) + + + var SPECIES = _wks('species'); + var _speciesConstructor = function (O, D) { + var C = _anObject(O).constructor; + var S; + return C === undefined || (S = _anObject(C)[SPECIES]) == undefined ? D : _aFunction(S); + }; + + // fast apply, http://jsperf.lnkit.com/fast-apply/5 + var _invoke = function (fn, args, that) { + var un = that === undefined; + switch (args.length) { + case 0: return un ? fn() + : fn.call(that); + case 1: return un ? fn(args[0]) + : fn.call(that, args[0]); + case 2: return un ? fn(args[0], args[1]) + : fn.call(that, args[0], args[1]); + case 3: return un ? fn(args[0], args[1], args[2]) + : fn.call(that, args[0], args[1], args[2]); + case 4: return un ? fn(args[0], args[1], args[2], args[3]) + : fn.call(that, args[0], args[1], args[2], args[3]); + } return fn.apply(that, args); + }; + + var process$2 = _global.process; + var setTask = _global.setImmediate; + var clearTask = _global.clearImmediate; + var MessageChannel = _global.MessageChannel; + var Dispatch = _global.Dispatch; + var counter = 0; + var queue = {}; + var ONREADYSTATECHANGE = 'onreadystatechange'; + var defer; + var channel; + var port; + var run = function () { + var id = +this; + // eslint-disable-next-line no-prototype-builtins + if (queue.hasOwnProperty(id)) { + var fn = queue[id]; + delete queue[id]; + fn(); + } + }; + var listener = function (event) { + run.call(event.data); + }; + // Node.js 0.9+ & IE10+ has setImmediate, otherwise: + if (!setTask || !clearTask) { + setTask = function setImmediate(fn) { + var args = []; + var i = 1; + while (arguments.length > i) args.push(arguments[i++]); + queue[++counter] = function () { + // eslint-disable-next-line no-new-func + _invoke(typeof fn == 'function' ? fn : Function(fn), args); + }; + defer(counter); + return counter; + }; + clearTask = function clearImmediate(id) { + delete queue[id]; + }; + // Node.js 0.8- + if (_cof(process$2) == 'process') { + defer = function (id) { + process$2.nextTick(_ctx(run, id, 1)); + }; + // Sphere (JS game engine) Dispatch API + } else if (Dispatch && Dispatch.now) { + defer = function (id) { + Dispatch.now(_ctx(run, id, 1)); + }; + // Browsers with MessageChannel, includes WebWorkers + } else if (MessageChannel) { + channel = new MessageChannel(); + port = channel.port2; + channel.port1.onmessage = listener; + defer = _ctx(port.postMessage, port, 1); + // Browsers with postMessage, skip WebWorkers + // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' + } else if (_global.addEventListener && typeof postMessage == 'function' && !_global.importScripts) { + defer = function (id) { + _global.postMessage(id + '', '*'); + }; + _global.addEventListener('message', listener, false); + // IE8- + } else if (ONREADYSTATECHANGE in _domCreate('script')) { + defer = function (id) { + _html.appendChild(_domCreate('script'))[ONREADYSTATECHANGE] = function () { + _html.removeChild(this); + run.call(id); + }; + }; + // Rest old browsers + } else { + defer = function (id) { + setTimeout(_ctx(run, id, 1), 0); + }; + } + } + var _task = { + set: setTask, + clear: clearTask + }; + + var macrotask = _task.set; + var Observer = _global.MutationObserver || _global.WebKitMutationObserver; + var process$3 = _global.process; + var Promise = _global.Promise; + var isNode$1 = _cof(process$3) == 'process'; + + var _microtask = function () { + var head, last, notify; + + var flush = function () { + var parent, fn; + if (isNode$1 && (parent = process$3.domain)) parent.exit(); + while (head) { + fn = head.fn; + head = head.next; + try { + fn(); + } catch (e) { + if (head) notify(); + else last = undefined; + throw e; + } + } last = undefined; + if (parent) parent.enter(); + }; + + // Node.js + if (isNode$1) { + notify = function () { + process$3.nextTick(flush); + }; + // browsers with MutationObserver + } else if (Observer) { + var toggle = true; + var node = document.createTextNode(''); + new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new + notify = function () { + node.data = toggle = !toggle; + }; + // environments with maybe non-completely correct, but existent Promise + } else if (Promise && Promise.resolve) { + var promise = Promise.resolve(); + notify = function () { + promise.then(flush); + }; + // for other environments - macrotask based on: + // - setImmediate + // - MessageChannel + // - window.postMessag + // - onreadystatechange + // - setTimeout + } else { + notify = function () { + // strange IE + webpack dev server bug - use .call(global) + macrotask.call(_global, flush); + }; + } + + return function (fn) { + var task = { fn: fn, next: undefined }; + if (last) last.next = task; + if (!head) { + head = task; + notify(); + } last = task; + }; + }; + + // 25.4.1.5 NewPromiseCapability(C) + + + function PromiseCapability(C) { + var resolve, reject; + this.promise = new C(function ($$resolve, $$reject) { + if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor'); + resolve = $$resolve; + reject = $$reject; + }); + this.resolve = _aFunction(resolve); + this.reject = _aFunction(reject); + } + + var f$1 = function (C) { + return new PromiseCapability(C); + }; + + var _newPromiseCapability = { + f: f$1 + }; + + var _perform = function (exec) { + try { + return { e: false, v: exec() }; + } catch (e) { + return { e: true, v: e }; + } + }; + + var _promiseResolve = function (C, x) { + _anObject(C); + if (_isObject(x) && x.constructor === C) return x; + var promiseCapability = _newPromiseCapability.f(C); + var resolve = promiseCapability.resolve; + resolve(x); + return promiseCapability.promise; + }; + + var _redefineAll = function (target, src, safe) { + for (var key in src) { + if (safe && target[key]) target[key] = src[key]; + else _hide(target, key, src[key]); + } return target; + }; + + var SPECIES$1 = _wks('species'); + + var _setSpecies = function (KEY) { + var C = typeof _core[KEY] == 'function' ? _core[KEY] : _global[KEY]; + if (_descriptors && C && !C[SPECIES$1]) _objectDp.f(C, SPECIES$1, { + configurable: true, + get: function () { return this; } + }); + }; + + var ITERATOR$3 = _wks('iterator'); + var SAFE_CLOSING = false; + + try { + var riter = [7][ITERATOR$3](); + riter['return'] = function () { SAFE_CLOSING = true; }; + // eslint-disable-next-line no-throw-literal + Array.from(riter, function () { throw 2; }); + } catch (e) { /* empty */ } + + var _iterDetect = function (exec, skipClosing) { + if (!skipClosing && !SAFE_CLOSING) return false; + var safe = false; + try { + var arr = [7]; + var iter = arr[ITERATOR$3](); + iter.next = function () { return { done: safe = true }; }; + arr[ITERATOR$3] = function () { return iter; }; + exec(arr); + } catch (e) { /* empty */ } + return safe; + }; + + var task = _task.set; + var microtask = _microtask(); + + + + var PROMISE = 'Promise'; + var TypeError$1 = _global.TypeError; + var process$1 = _global.process; + var $Promise = _global[PROMISE]; + var isNode = _classof(process$1) == 'process'; + var empty = function () { /* empty */ }; + var Internal; + var newGenericPromiseCapability; + var OwnPromiseCapability; + var Wrapper; + var newPromiseCapability = newGenericPromiseCapability = _newPromiseCapability.f; + + var USE_NATIVE = !!function () { + try { + // correct subclassing with @@species support + var promise = $Promise.resolve(1); + var FakePromise = (promise.constructor = {})[_wks('species')] = function (exec) { + exec(empty, empty); + }; + // unhandled rejections tracking support, NodeJS Promise without it fails @@species test + return (isNode || typeof PromiseRejectionEvent == 'function') && promise.then(empty) instanceof FakePromise; + } catch (e) { /* empty */ } + }(); + + // helpers + var isThenable = function (it) { + var then; + return _isObject(it) && typeof (then = it.then) == 'function' ? then : false; + }; + var notify = function (promise, isReject) { + if (promise._n) return; + promise._n = true; + var chain = promise._c; + microtask(function () { + var value = promise._v; + var ok = promise._s == 1; + var i = 0; + var run = function (reaction) { + var handler = ok ? reaction.ok : reaction.fail; + var resolve = reaction.resolve; + var reject = reaction.reject; + var domain = reaction.domain; + var result, then; + try { + if (handler) { + if (!ok) { + if (promise._h == 2) onHandleUnhandled(promise); + promise._h = 1; + } + if (handler === true) result = value; + else { + if (domain) domain.enter(); + result = handler(value); + if (domain) domain.exit(); + } + if (result === reaction.promise) { + reject(TypeError$1('Promise-chain cycle')); + } else if (then = isThenable(result)) { + then.call(result, resolve, reject); + } else resolve(result); + } else reject(value); + } catch (e) { + reject(e); + } + }; + while (chain.length > i) run(chain[i++]); // variable length - can't use forEach + promise._c = []; + promise._n = false; + if (isReject && !promise._h) onUnhandled(promise); + }); + }; + var onUnhandled = function (promise) { + task.call(_global, function () { + var value = promise._v; + var unhandled = isUnhandled(promise); + var result, handler, console; + if (unhandled) { + result = _perform(function () { + if (isNode) { + process$1.emit('unhandledRejection', value, promise); + } else if (handler = _global.onunhandledrejection) { + handler({ promise: promise, reason: value }); + } else if ((console = _global.console) && console.error) { + console.error('Unhandled promise rejection', value); + } + }); + // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should + promise._h = isNode || isUnhandled(promise) ? 2 : 1; + } promise._a = undefined; + if (unhandled && result.e) throw result.v; + }); + }; + var isUnhandled = function (promise) { + if (promise._h == 1) return false; + var chain = promise._a || promise._c; + var i = 0; + var reaction; + while (chain.length > i) { + reaction = chain[i++]; + if (reaction.fail || !isUnhandled(reaction.promise)) return false; + } return true; + }; + var onHandleUnhandled = function (promise) { + task.call(_global, function () { + var handler; + if (isNode) { + process$1.emit('rejectionHandled', promise); + } else if (handler = _global.onrejectionhandled) { + handler({ promise: promise, reason: promise._v }); + } + }); + }; + var $reject = function (value) { + var promise = this; + if (promise._d) return; + promise._d = true; + promise = promise._w || promise; // unwrap + promise._v = value; + promise._s = 2; + if (!promise._a) promise._a = promise._c.slice(); + notify(promise, true); + }; + var $resolve = function (value) { + var promise = this; + var then; + if (promise._d) return; + promise._d = true; + promise = promise._w || promise; // unwrap + try { + if (promise === value) throw TypeError$1("Promise can't be resolved itself"); + if (then = isThenable(value)) { + microtask(function () { + var wrapper = { _w: promise, _d: false }; // wrap + try { + then.call(value, _ctx($resolve, wrapper, 1), _ctx($reject, wrapper, 1)); + } catch (e) { + $reject.call(wrapper, e); + } + }); + } else { + promise._v = value; + promise._s = 1; + notify(promise, false); + } + } catch (e) { + $reject.call({ _w: promise, _d: false }, e); // wrap + } + }; + + // constructor polyfill + if (!USE_NATIVE) { + // 25.4.3.1 Promise(executor) + $Promise = function Promise(executor) { + _anInstance(this, $Promise, PROMISE, '_h'); + _aFunction(executor); + Internal.call(this); + try { + executor(_ctx($resolve, this, 1), _ctx($reject, this, 1)); + } catch (err) { + $reject.call(this, err); + } + }; + // eslint-disable-next-line no-unused-vars + Internal = function Promise(executor) { + this._c = []; // <- awaiting reactions + this._a = undefined; // <- checked in isUnhandled reactions + this._s = 0; // <- state + this._d = false; // <- done + this._v = undefined; // <- value + this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled + this._n = false; // <- notify + }; + Internal.prototype = _redefineAll($Promise.prototype, { + // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected) + then: function then(onFulfilled, onRejected) { + var reaction = newPromiseCapability(_speciesConstructor(this, $Promise)); + reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true; + reaction.fail = typeof onRejected == 'function' && onRejected; + reaction.domain = isNode ? process$1.domain : undefined; + this._c.push(reaction); + if (this._a) this._a.push(reaction); + if (this._s) notify(this, false); + return reaction.promise; + }, + // 25.4.5.1 Promise.prototype.catch(onRejected) + 'catch': function (onRejected) { + return this.then(undefined, onRejected); + } + }); + OwnPromiseCapability = function () { + var promise = new Internal(); + this.promise = promise; + this.resolve = _ctx($resolve, promise, 1); + this.reject = _ctx($reject, promise, 1); + }; + _newPromiseCapability.f = newPromiseCapability = function (C) { + return C === $Promise || C === Wrapper + ? new OwnPromiseCapability(C) + : newGenericPromiseCapability(C); + }; + } + + _export(_export.G + _export.W + _export.F * !USE_NATIVE, { Promise: $Promise }); + _setToStringTag($Promise, PROMISE); + _setSpecies(PROMISE); + Wrapper = _core[PROMISE]; + + // statics + _export(_export.S + _export.F * !USE_NATIVE, PROMISE, { + // 25.4.4.5 Promise.reject(r) + reject: function reject(r) { + var capability = newPromiseCapability(this); + var $$reject = capability.reject; + $$reject(r); + return capability.promise; + } + }); + _export(_export.S + _export.F * (_library || !USE_NATIVE), PROMISE, { + // 25.4.4.6 Promise.resolve(x) + resolve: function resolve(x) { + return _promiseResolve(_library && this === Wrapper ? $Promise : this, x); + } + }); + _export(_export.S + _export.F * !(USE_NATIVE && _iterDetect(function (iter) { + $Promise.all(iter)['catch'](empty); + })), PROMISE, { + // 25.4.4.1 Promise.all(iterable) + all: function all(iterable) { + var C = this; + var capability = newPromiseCapability(C); + var resolve = capability.resolve; + var reject = capability.reject; + var result = _perform(function () { + var values = []; + var index = 0; + var remaining = 1; + _forOf(iterable, false, function (promise) { + var $index = index++; + var alreadyCalled = false; + values.push(undefined); + remaining++; + C.resolve(promise).then(function (value) { + if (alreadyCalled) return; + alreadyCalled = true; + values[$index] = value; + --remaining || resolve(values); + }, reject); + }); + --remaining || resolve(values); + }); + if (result.e) reject(result.v); + return capability.promise; + }, + // 25.4.4.4 Promise.race(iterable) + race: function race(iterable) { + var C = this; + var capability = newPromiseCapability(C); + var reject = capability.reject; + var result = _perform(function () { + _forOf(iterable, false, function (promise) { + C.resolve(promise).then(capability.resolve, reject); + }); + }); + if (result.e) reject(result.v); + return capability.promise; + } + }); + + _export(_export.P + _export.R, 'Promise', { 'finally': function (onFinally) { + var C = _speciesConstructor(this, _core.Promise || _global.Promise); + var isFunction = typeof onFinally == 'function'; + return this.then( + isFunction ? function (x) { + return _promiseResolve(C, onFinally()).then(function () { return x; }); + } : onFinally, + isFunction ? function (e) { + return _promiseResolve(C, onFinally()).then(function () { throw e; }); + } : onFinally + ); + } }); + + // https://github.com/tc39/proposal-promise-try + + + + + _export(_export.S, 'Promise', { 'try': function (callbackfn) { + var promiseCapability = _newPromiseCapability.f(this); + var result = _perform(callbackfn); + (result.e ? promiseCapability.reject : promiseCapability.resolve)(result.v); + return promiseCapability.promise; + } }); + + var promise$1 = _core.Promise; + + var promise = createCommonjsModule(function (module) { + module.exports = { "default": promise$1, __esModule: true }; + }); + + var _Promise = unwrapExports(promise); + + var long_1 = createCommonjsModule(function (module) { + /* + Copyright 2013 Daniel Wirtz + Copyright 2009 The Closure Library Authors. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS-IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + + /** + * @license long.js (c) 2013 Daniel Wirtz + * Released under the Apache License, Version 2.0 + * see: https://github.com/dcodeIO/long.js for details + */ + (function(global, factory) { + + /* AMD */ if (typeof undefined === 'function' && undefined["amd"]) + undefined([], factory); + /* CommonJS */ else if (typeof commonjsRequire === 'function' && 'object' === "object" && module && module["exports"]) + module["exports"] = factory(); + /* Global */ else + (global["dcodeIO"] = global["dcodeIO"] || {})["Long"] = factory(); + + })(commonjsGlobal, function() { + "use strict"; + + /** + * Constructs a 64 bit two's-complement integer, given its low and high 32 bit values as *signed* integers. + * See the from* functions below for more convenient ways of constructing Longs. + * @exports Long + * @class A Long class for representing a 64 bit two's-complement integer value. + * @param {number} low The low (signed) 32 bits of the long + * @param {number} high The high (signed) 32 bits of the long + * @param {boolean=} unsigned Whether unsigned or not, defaults to `false` for signed + * @constructor + */ + function Long(low, high, unsigned) { + + /** + * The low 32 bits as a signed value. + * @type {number} + */ + this.low = low | 0; + + /** + * The high 32 bits as a signed value. + * @type {number} + */ + this.high = high | 0; + + /** + * Whether unsigned or not. + * @type {boolean} + */ + this.unsigned = !!unsigned; + } + + // The internal representation of a long is the two given signed, 32-bit values. + // We use 32-bit pieces because these are the size of integers on which + // Javascript performs bit-operations. For operations like addition and + // multiplication, we split each number into 16 bit pieces, which can easily be + // multiplied within Javascript's floating-point representation without overflow + // or change in sign. + // + // In the algorithms below, we frequently reduce the negative case to the + // positive case by negating the input(s) and then post-processing the result. + // Note that we must ALWAYS check specially whether those values are MIN_VALUE + // (-2^63) because -MIN_VALUE == MIN_VALUE (since 2^63 cannot be represented as + // a positive number, it overflows back into a negative). Not handling this + // case would often result in infinite recursion. + // + // Common constant values ZERO, ONE, NEG_ONE, etc. are defined below the from* + // methods on which they depend. + + /** + * An indicator used to reliably determine if an object is a Long or not. + * @type {boolean} + * @const + * @private + */ + Long.prototype.__isLong__; + + Object.defineProperty(Long.prototype, "__isLong__", { + value: true, + enumerable: false, + configurable: false + }); + + /** + * @function + * @param {*} obj Object + * @returns {boolean} + * @inner + */ + function isLong(obj) { + return (obj && obj["__isLong__"]) === true; + } + + /** + * Tests if the specified object is a Long. + * @function + * @param {*} obj Object + * @returns {boolean} + */ + Long.isLong = isLong; + + /** + * A cache of the Long representations of small integer values. + * @type {!Object} + * @inner + */ + var INT_CACHE = {}; + + /** + * A cache of the Long representations of small unsigned integer values. + * @type {!Object} + * @inner + */ + var UINT_CACHE = {}; + + /** + * @param {number} value + * @param {boolean=} unsigned + * @returns {!Long} + * @inner + */ + function fromInt(value, unsigned) { + var obj, cachedObj, cache; + if (unsigned) { + value >>>= 0; + if (cache = (0 <= value && value < 256)) { + cachedObj = UINT_CACHE[value]; + if (cachedObj) + return cachedObj; + } + obj = fromBits(value, (value | 0) < 0 ? -1 : 0, true); + if (cache) + UINT_CACHE[value] = obj; + return obj; + } else { + value |= 0; + if (cache = (-128 <= value && value < 128)) { + cachedObj = INT_CACHE[value]; + if (cachedObj) + return cachedObj; + } + obj = fromBits(value, value < 0 ? -1 : 0, false); + if (cache) + INT_CACHE[value] = obj; + return obj; + } + } + + /** + * Returns a Long representing the given 32 bit integer value. + * @function + * @param {number} value The 32 bit integer in question + * @param {boolean=} unsigned Whether unsigned or not, defaults to `false` for signed + * @returns {!Long} The corresponding Long value + */ + Long.fromInt = fromInt; + + /** + * @param {number} value + * @param {boolean=} unsigned + * @returns {!Long} + * @inner + */ + function fromNumber(value, unsigned) { + if (isNaN(value) || !isFinite(value)) + return unsigned ? UZERO : ZERO; + if (unsigned) { + if (value < 0) + return UZERO; + if (value >= TWO_PWR_64_DBL) + return MAX_UNSIGNED_VALUE; + } else { + if (value <= -TWO_PWR_63_DBL) + return MIN_VALUE; + if (value + 1 >= TWO_PWR_63_DBL) + return MAX_VALUE; + } + if (value < 0) + return fromNumber(-value, unsigned).neg(); + return fromBits((value % TWO_PWR_32_DBL) | 0, (value / TWO_PWR_32_DBL) | 0, unsigned); + } + + /** + * Returns a Long representing the given value, provided that it is a finite number. Otherwise, zero is returned. + * @function + * @param {number} value The number in question + * @param {boolean=} unsigned Whether unsigned or not, defaults to `false` for signed + * @returns {!Long} The corresponding Long value + */ + Long.fromNumber = fromNumber; + + /** + * @param {number} lowBits + * @param {number} highBits + * @param {boolean=} unsigned + * @returns {!Long} + * @inner + */ + function fromBits(lowBits, highBits, unsigned) { + return new Long(lowBits, highBits, unsigned); + } + + /** + * Returns a Long representing the 64 bit integer that comes by concatenating the given low and high bits. Each is + * assumed to use 32 bits. + * @function + * @param {number} lowBits The low 32 bits + * @param {number} highBits The high 32 bits + * @param {boolean=} unsigned Whether unsigned or not, defaults to `false` for signed + * @returns {!Long} The corresponding Long value + */ + Long.fromBits = fromBits; + + /** + * @function + * @param {number} base + * @param {number} exponent + * @returns {number} + * @inner + */ + var pow_dbl = Math.pow; // Used 4 times (4*8 to 15+4) + + /** + * @param {string} str + * @param {(boolean|number)=} unsigned + * @param {number=} radix + * @returns {!Long} + * @inner + */ + function fromString(str, unsigned, radix) { + if (str.length === 0) + throw Error('empty string'); + if (str === "NaN" || str === "Infinity" || str === "+Infinity" || str === "-Infinity") + return ZERO; + if (typeof unsigned === 'number') { + // For goog.math.long compatibility + radix = unsigned, + unsigned = false; + } else { + unsigned = !! unsigned; + } + radix = radix || 10; + if (radix < 2 || 36 < radix) + throw RangeError('radix'); + + var p; + if ((p = str.indexOf('-')) > 0) + throw Error('interior hyphen'); + else if (p === 0) { + return fromString(str.substring(1), unsigned, radix).neg(); + } + + // Do several (8) digits each time through the loop, so as to + // minimize the calls to the very expensive emulated div. + var radixToPower = fromNumber(pow_dbl(radix, 8)); + + var result = ZERO; + for (var i = 0; i < str.length; i += 8) { + var size = Math.min(8, str.length - i), + value = parseInt(str.substring(i, i + size), radix); + if (size < 8) { + var power = fromNumber(pow_dbl(radix, size)); + result = result.mul(power).add(fromNumber(value)); + } else { + result = result.mul(radixToPower); + result = result.add(fromNumber(value)); + } + } + result.unsigned = unsigned; + return result; + } + + /** + * Returns a Long representation of the given string, written using the specified radix. + * @function + * @param {string} str The textual representation of the Long + * @param {(boolean|number)=} unsigned Whether unsigned or not, defaults to `false` for signed + * @param {number=} radix The radix in which the text is written (2-36), defaults to 10 + * @returns {!Long} The corresponding Long value + */ + Long.fromString = fromString; + + /** + * @function + * @param {!Long|number|string|!{low: number, high: number, unsigned: boolean}} val + * @returns {!Long} + * @inner + */ + function fromValue(val) { + if (val /* is compatible */ instanceof Long) + return val; + if (typeof val === 'number') + return fromNumber(val); + if (typeof val === 'string') + return fromString(val); + // Throws for non-objects, converts non-instanceof Long: + return fromBits(val.low, val.high, val.unsigned); + } + + /** + * Converts the specified value to a Long. + * @function + * @param {!Long|number|string|!{low: number, high: number, unsigned: boolean}} val Value + * @returns {!Long} + */ + Long.fromValue = fromValue; + + // NOTE: the compiler should inline these constant values below and then remove these variables, so there should be + // no runtime penalty for these. + + /** + * @type {number} + * @const + * @inner + */ + var TWO_PWR_16_DBL = 1 << 16; + + /** + * @type {number} + * @const + * @inner + */ + var TWO_PWR_24_DBL = 1 << 24; + + /** + * @type {number} + * @const + * @inner + */ + var TWO_PWR_32_DBL = TWO_PWR_16_DBL * TWO_PWR_16_DBL; + + /** + * @type {number} + * @const + * @inner + */ + var TWO_PWR_64_DBL = TWO_PWR_32_DBL * TWO_PWR_32_DBL; + + /** + * @type {number} + * @const + * @inner + */ + var TWO_PWR_63_DBL = TWO_PWR_64_DBL / 2; + + /** + * @type {!Long} + * @const + * @inner + */ + var TWO_PWR_24 = fromInt(TWO_PWR_24_DBL); + + /** + * @type {!Long} + * @inner + */ + var ZERO = fromInt(0); + + /** + * Signed zero. + * @type {!Long} + */ + Long.ZERO = ZERO; + + /** + * @type {!Long} + * @inner + */ + var UZERO = fromInt(0, true); + + /** + * Unsigned zero. + * @type {!Long} + */ + Long.UZERO = UZERO; + + /** + * @type {!Long} + * @inner + */ + var ONE = fromInt(1); + + /** + * Signed one. + * @type {!Long} + */ + Long.ONE = ONE; + + /** + * @type {!Long} + * @inner + */ + var UONE = fromInt(1, true); + + /** + * Unsigned one. + * @type {!Long} + */ + Long.UONE = UONE; + + /** + * @type {!Long} + * @inner + */ + var NEG_ONE = fromInt(-1); + + /** + * Signed negative one. + * @type {!Long} + */ + Long.NEG_ONE = NEG_ONE; + + /** + * @type {!Long} + * @inner + */ + var MAX_VALUE = fromBits(0xFFFFFFFF|0, 0x7FFFFFFF|0, false); + + /** + * Maximum signed value. + * @type {!Long} + */ + Long.MAX_VALUE = MAX_VALUE; + + /** + * @type {!Long} + * @inner + */ + var MAX_UNSIGNED_VALUE = fromBits(0xFFFFFFFF|0, 0xFFFFFFFF|0, true); + + /** + * Maximum unsigned value. + * @type {!Long} + */ + Long.MAX_UNSIGNED_VALUE = MAX_UNSIGNED_VALUE; + + /** + * @type {!Long} + * @inner + */ + var MIN_VALUE = fromBits(0, 0x80000000|0, false); + + /** + * Minimum signed value. + * @type {!Long} + */ + Long.MIN_VALUE = MIN_VALUE; + + /** + * @alias Long.prototype + * @inner + */ + var LongPrototype = Long.prototype; + + /** + * Converts the Long to a 32 bit integer, assuming it is a 32 bit integer. + * @returns {number} + */ + LongPrototype.toInt = function toInt() { + return this.unsigned ? this.low >>> 0 : this.low; + }; + + /** + * Converts the Long to a the nearest floating-point representation of this value (double, 53 bit mantissa). + * @returns {number} + */ + LongPrototype.toNumber = function toNumber() { + if (this.unsigned) + return ((this.high >>> 0) * TWO_PWR_32_DBL) + (this.low >>> 0); + return this.high * TWO_PWR_32_DBL + (this.low >>> 0); + }; + + /** + * Converts the Long to a string written in the specified radix. + * @param {number=} radix Radix (2-36), defaults to 10 + * @returns {string} + * @override + * @throws {RangeError} If `radix` is out of range + */ + LongPrototype.toString = function toString(radix) { + radix = radix || 10; + if (radix < 2 || 36 < radix) + throw RangeError('radix'); + if (this.isZero()) + return '0'; + if (this.isNegative()) { // Unsigned Longs are never negative + if (this.eq(MIN_VALUE)) { + // We need to change the Long value before it can be negated, so we remove + // the bottom-most digit in this base and then recurse to do the rest. + var radixLong = fromNumber(radix), + div = this.div(radixLong), + rem1 = div.mul(radixLong).sub(this); + return div.toString(radix) + rem1.toInt().toString(radix); + } else + return '-' + this.neg().toString(radix); + } + + // Do several (6) digits each time through the loop, so as to + // minimize the calls to the very expensive emulated div. + var radixToPower = fromNumber(pow_dbl(radix, 6), this.unsigned), + rem = this; + var result = ''; + while (true) { + var remDiv = rem.div(radixToPower), + intval = rem.sub(remDiv.mul(radixToPower)).toInt() >>> 0, + digits = intval.toString(radix); + rem = remDiv; + if (rem.isZero()) + return digits + result; + else { + while (digits.length < 6) + digits = '0' + digits; + result = '' + digits + result; + } + } + }; + + /** + * Gets the high 32 bits as a signed integer. + * @returns {number} Signed high bits + */ + LongPrototype.getHighBits = function getHighBits() { + return this.high; + }; + + /** + * Gets the high 32 bits as an unsigned integer. + * @returns {number} Unsigned high bits + */ + LongPrototype.getHighBitsUnsigned = function getHighBitsUnsigned() { + return this.high >>> 0; + }; + + /** + * Gets the low 32 bits as a signed integer. + * @returns {number} Signed low bits + */ + LongPrototype.getLowBits = function getLowBits() { + return this.low; + }; + + /** + * Gets the low 32 bits as an unsigned integer. + * @returns {number} Unsigned low bits + */ + LongPrototype.getLowBitsUnsigned = function getLowBitsUnsigned() { + return this.low >>> 0; + }; + + /** + * Gets the number of bits needed to represent the absolute value of this Long. + * @returns {number} + */ + LongPrototype.getNumBitsAbs = function getNumBitsAbs() { + if (this.isNegative()) // Unsigned Longs are never negative + return this.eq(MIN_VALUE) ? 64 : this.neg().getNumBitsAbs(); + var val = this.high != 0 ? this.high : this.low; + for (var bit = 31; bit > 0; bit--) + if ((val & (1 << bit)) != 0) + break; + return this.high != 0 ? bit + 33 : bit + 1; + }; + + /** + * Tests if this Long's value equals zero. + * @returns {boolean} + */ + LongPrototype.isZero = function isZero() { + return this.high === 0 && this.low === 0; + }; + + /** + * Tests if this Long's value is negative. + * @returns {boolean} + */ + LongPrototype.isNegative = function isNegative() { + return !this.unsigned && this.high < 0; + }; + + /** + * Tests if this Long's value is positive. + * @returns {boolean} + */ + LongPrototype.isPositive = function isPositive() { + return this.unsigned || this.high >= 0; + }; + + /** + * Tests if this Long's value is odd. + * @returns {boolean} + */ + LongPrototype.isOdd = function isOdd() { + return (this.low & 1) === 1; + }; + + /** + * Tests if this Long's value is even. + * @returns {boolean} + */ + LongPrototype.isEven = function isEven() { + return (this.low & 1) === 0; + }; + + /** + * Tests if this Long's value equals the specified's. + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ + LongPrototype.equals = function equals(other) { + if (!isLong(other)) + other = fromValue(other); + if (this.unsigned !== other.unsigned && (this.high >>> 31) === 1 && (other.high >>> 31) === 1) + return false; + return this.high === other.high && this.low === other.low; + }; + + /** + * Tests if this Long's value equals the specified's. This is an alias of {@link Long#equals}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ + LongPrototype.eq = LongPrototype.equals; + + /** + * Tests if this Long's value differs from the specified's. + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ + LongPrototype.notEquals = function notEquals(other) { + return !this.eq(/* validates */ other); + }; + + /** + * Tests if this Long's value differs from the specified's. This is an alias of {@link Long#notEquals}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ + LongPrototype.neq = LongPrototype.notEquals; + + /** + * Tests if this Long's value is less than the specified's. + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ + LongPrototype.lessThan = function lessThan(other) { + return this.comp(/* validates */ other) < 0; + }; + + /** + * Tests if this Long's value is less than the specified's. This is an alias of {@link Long#lessThan}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ + LongPrototype.lt = LongPrototype.lessThan; + + /** + * Tests if this Long's value is less than or equal the specified's. + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ + LongPrototype.lessThanOrEqual = function lessThanOrEqual(other) { + return this.comp(/* validates */ other) <= 0; + }; + + /** + * Tests if this Long's value is less than or equal the specified's. This is an alias of {@link Long#lessThanOrEqual}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ + LongPrototype.lte = LongPrototype.lessThanOrEqual; + + /** + * Tests if this Long's value is greater than the specified's. + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ + LongPrototype.greaterThan = function greaterThan(other) { + return this.comp(/* validates */ other) > 0; + }; + + /** + * Tests if this Long's value is greater than the specified's. This is an alias of {@link Long#greaterThan}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ + LongPrototype.gt = LongPrototype.greaterThan; + + /** + * Tests if this Long's value is greater than or equal the specified's. + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ + LongPrototype.greaterThanOrEqual = function greaterThanOrEqual(other) { + return this.comp(/* validates */ other) >= 0; + }; + + /** + * Tests if this Long's value is greater than or equal the specified's. This is an alias of {@link Long#greaterThanOrEqual}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ + LongPrototype.gte = LongPrototype.greaterThanOrEqual; + + /** + * Compares this Long's value with the specified's. + * @param {!Long|number|string} other Other value + * @returns {number} 0 if they are the same, 1 if the this is greater and -1 + * if the given one is greater + */ + LongPrototype.compare = function compare(other) { + if (!isLong(other)) + other = fromValue(other); + if (this.eq(other)) + return 0; + var thisNeg = this.isNegative(), + otherNeg = other.isNegative(); + if (thisNeg && !otherNeg) + return -1; + if (!thisNeg && otherNeg) + return 1; + // At this point the sign bits are the same + if (!this.unsigned) + return this.sub(other).isNegative() ? -1 : 1; + // Both are positive if at least one is unsigned + return (other.high >>> 0) > (this.high >>> 0) || (other.high === this.high && (other.low >>> 0) > (this.low >>> 0)) ? -1 : 1; + }; + + /** + * Compares this Long's value with the specified's. This is an alias of {@link Long#compare}. + * @function + * @param {!Long|number|string} other Other value + * @returns {number} 0 if they are the same, 1 if the this is greater and -1 + * if the given one is greater + */ + LongPrototype.comp = LongPrototype.compare; + + /** + * Negates this Long's value. + * @returns {!Long} Negated Long + */ + LongPrototype.negate = function negate() { + if (!this.unsigned && this.eq(MIN_VALUE)) + return MIN_VALUE; + return this.not().add(ONE); + }; + + /** + * Negates this Long's value. This is an alias of {@link Long#negate}. + * @function + * @returns {!Long} Negated Long + */ + LongPrototype.neg = LongPrototype.negate; + + /** + * Returns the sum of this and the specified Long. + * @param {!Long|number|string} addend Addend + * @returns {!Long} Sum + */ + LongPrototype.add = function add(addend) { + if (!isLong(addend)) + addend = fromValue(addend); + + // Divide each number into 4 chunks of 16 bits, and then sum the chunks. + + var a48 = this.high >>> 16; + var a32 = this.high & 0xFFFF; + var a16 = this.low >>> 16; + var a00 = this.low & 0xFFFF; + + var b48 = addend.high >>> 16; + var b32 = addend.high & 0xFFFF; + var b16 = addend.low >>> 16; + var b00 = addend.low & 0xFFFF; + + var c48 = 0, c32 = 0, c16 = 0, c00 = 0; + c00 += a00 + b00; + c16 += c00 >>> 16; + c00 &= 0xFFFF; + c16 += a16 + b16; + c32 += c16 >>> 16; + c16 &= 0xFFFF; + c32 += a32 + b32; + c48 += c32 >>> 16; + c32 &= 0xFFFF; + c48 += a48 + b48; + c48 &= 0xFFFF; + return fromBits((c16 << 16) | c00, (c48 << 16) | c32, this.unsigned); + }; + + /** + * Returns the difference of this and the specified Long. + * @param {!Long|number|string} subtrahend Subtrahend + * @returns {!Long} Difference + */ + LongPrototype.subtract = function subtract(subtrahend) { + if (!isLong(subtrahend)) + subtrahend = fromValue(subtrahend); + return this.add(subtrahend.neg()); + }; + + /** + * Returns the difference of this and the specified Long. This is an alias of {@link Long#subtract}. + * @function + * @param {!Long|number|string} subtrahend Subtrahend + * @returns {!Long} Difference + */ + LongPrototype.sub = LongPrototype.subtract; + + /** + * Returns the product of this and the specified Long. + * @param {!Long|number|string} multiplier Multiplier + * @returns {!Long} Product + */ + LongPrototype.multiply = function multiply(multiplier) { + if (this.isZero()) + return ZERO; + if (!isLong(multiplier)) + multiplier = fromValue(multiplier); + if (multiplier.isZero()) + return ZERO; + if (this.eq(MIN_VALUE)) + return multiplier.isOdd() ? MIN_VALUE : ZERO; + if (multiplier.eq(MIN_VALUE)) + return this.isOdd() ? MIN_VALUE : ZERO; + + if (this.isNegative()) { + if (multiplier.isNegative()) + return this.neg().mul(multiplier.neg()); + else + return this.neg().mul(multiplier).neg(); + } else if (multiplier.isNegative()) + return this.mul(multiplier.neg()).neg(); + + // If both longs are small, use float multiplication + if (this.lt(TWO_PWR_24) && multiplier.lt(TWO_PWR_24)) + return fromNumber(this.toNumber() * multiplier.toNumber(), this.unsigned); + + // Divide each long into 4 chunks of 16 bits, and then add up 4x4 products. + // We can skip products that would overflow. + + var a48 = this.high >>> 16; + var a32 = this.high & 0xFFFF; + var a16 = this.low >>> 16; + var a00 = this.low & 0xFFFF; + + var b48 = multiplier.high >>> 16; + var b32 = multiplier.high & 0xFFFF; + var b16 = multiplier.low >>> 16; + var b00 = multiplier.low & 0xFFFF; + + var c48 = 0, c32 = 0, c16 = 0, c00 = 0; + c00 += a00 * b00; + c16 += c00 >>> 16; + c00 &= 0xFFFF; + c16 += a16 * b00; + c32 += c16 >>> 16; + c16 &= 0xFFFF; + c16 += a00 * b16; + c32 += c16 >>> 16; + c16 &= 0xFFFF; + c32 += a32 * b00; + c48 += c32 >>> 16; + c32 &= 0xFFFF; + c32 += a16 * b16; + c48 += c32 >>> 16; + c32 &= 0xFFFF; + c32 += a00 * b32; + c48 += c32 >>> 16; + c32 &= 0xFFFF; + c48 += a48 * b00 + a32 * b16 + a16 * b32 + a00 * b48; + c48 &= 0xFFFF; + return fromBits((c16 << 16) | c00, (c48 << 16) | c32, this.unsigned); + }; + + /** + * Returns the product of this and the specified Long. This is an alias of {@link Long#multiply}. + * @function + * @param {!Long|number|string} multiplier Multiplier + * @returns {!Long} Product + */ + LongPrototype.mul = LongPrototype.multiply; + + /** + * Returns this Long divided by the specified. The result is signed if this Long is signed or + * unsigned if this Long is unsigned. + * @param {!Long|number|string} divisor Divisor + * @returns {!Long} Quotient + */ + LongPrototype.divide = function divide(divisor) { + if (!isLong(divisor)) + divisor = fromValue(divisor); + if (divisor.isZero()) + throw Error('division by zero'); + if (this.isZero()) + return this.unsigned ? UZERO : ZERO; + var approx, rem, res; + if (!this.unsigned) { + // This section is only relevant for signed longs and is derived from the + // closure library as a whole. + if (this.eq(MIN_VALUE)) { + if (divisor.eq(ONE) || divisor.eq(NEG_ONE)) + return MIN_VALUE; // recall that -MIN_VALUE == MIN_VALUE + else if (divisor.eq(MIN_VALUE)) + return ONE; + else { + // At this point, we have |other| >= 2, so |this/other| < |MIN_VALUE|. + var halfThis = this.shr(1); + approx = halfThis.div(divisor).shl(1); + if (approx.eq(ZERO)) { + return divisor.isNegative() ? ONE : NEG_ONE; + } else { + rem = this.sub(divisor.mul(approx)); + res = approx.add(rem.div(divisor)); + return res; + } + } + } else if (divisor.eq(MIN_VALUE)) + return this.unsigned ? UZERO : ZERO; + if (this.isNegative()) { + if (divisor.isNegative()) + return this.neg().div(divisor.neg()); + return this.neg().div(divisor).neg(); + } else if (divisor.isNegative()) + return this.div(divisor.neg()).neg(); + res = ZERO; + } else { + // The algorithm below has not been made for unsigned longs. It's therefore + // required to take special care of the MSB prior to running it. + if (!divisor.unsigned) + divisor = divisor.toUnsigned(); + if (divisor.gt(this)) + return UZERO; + if (divisor.gt(this.shru(1))) // 15 >>> 1 = 7 ; with divisor = 8 ; true + return UONE; + res = UZERO; + } + + // Repeat the following until the remainder is less than other: find a + // floating-point that approximates remainder / other *from below*, add this + // into the result, and subtract it from the remainder. It is critical that + // the approximate value is less than or equal to the real value so that the + // remainder never becomes negative. + rem = this; + while (rem.gte(divisor)) { + // Approximate the result of division. This may be a little greater or + // smaller than the actual value. + approx = Math.max(1, Math.floor(rem.toNumber() / divisor.toNumber())); + + // We will tweak the approximate result by changing it in the 48-th digit or + // the smallest non-fractional digit, whichever is larger. + var log2 = Math.ceil(Math.log(approx) / Math.LN2), + delta = (log2 <= 48) ? 1 : pow_dbl(2, log2 - 48), + + // Decrease the approximation until it is smaller than the remainder. Note + // that if it is too large, the product overflows and is negative. + approxRes = fromNumber(approx), + approxRem = approxRes.mul(divisor); + while (approxRem.isNegative() || approxRem.gt(rem)) { + approx -= delta; + approxRes = fromNumber(approx, this.unsigned); + approxRem = approxRes.mul(divisor); + } + + // We know the answer can't be zero... and actually, zero would cause + // infinite recursion since we would make no progress. + if (approxRes.isZero()) + approxRes = ONE; + + res = res.add(approxRes); + rem = rem.sub(approxRem); + } + return res; + }; + + /** + * Returns this Long divided by the specified. This is an alias of {@link Long#divide}. + * @function + * @param {!Long|number|string} divisor Divisor + * @returns {!Long} Quotient + */ + LongPrototype.div = LongPrototype.divide; + + /** + * Returns this Long modulo the specified. + * @param {!Long|number|string} divisor Divisor + * @returns {!Long} Remainder + */ + LongPrototype.modulo = function modulo(divisor) { + if (!isLong(divisor)) + divisor = fromValue(divisor); + return this.sub(this.div(divisor).mul(divisor)); + }; + + /** + * Returns this Long modulo the specified. This is an alias of {@link Long#modulo}. + * @function + * @param {!Long|number|string} divisor Divisor + * @returns {!Long} Remainder + */ + LongPrototype.mod = LongPrototype.modulo; + + /** + * Returns the bitwise NOT of this Long. + * @returns {!Long} + */ + LongPrototype.not = function not() { + return fromBits(~this.low, ~this.high, this.unsigned); + }; + + /** + * Returns the bitwise AND of this Long and the specified. + * @param {!Long|number|string} other Other Long + * @returns {!Long} + */ + LongPrototype.and = function and(other) { + if (!isLong(other)) + other = fromValue(other); + return fromBits(this.low & other.low, this.high & other.high, this.unsigned); + }; + + /** + * Returns the bitwise OR of this Long and the specified. + * @param {!Long|number|string} other Other Long + * @returns {!Long} + */ + LongPrototype.or = function or(other) { + if (!isLong(other)) + other = fromValue(other); + return fromBits(this.low | other.low, this.high | other.high, this.unsigned); + }; + + /** + * Returns the bitwise XOR of this Long and the given one. + * @param {!Long|number|string} other Other Long + * @returns {!Long} + */ + LongPrototype.xor = function xor(other) { + if (!isLong(other)) + other = fromValue(other); + return fromBits(this.low ^ other.low, this.high ^ other.high, this.unsigned); + }; + + /** + * Returns this Long with bits shifted to the left by the given amount. + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long + */ + LongPrototype.shiftLeft = function shiftLeft(numBits) { + if (isLong(numBits)) + numBits = numBits.toInt(); + if ((numBits &= 63) === 0) + return this; + else if (numBits < 32) + return fromBits(this.low << numBits, (this.high << numBits) | (this.low >>> (32 - numBits)), this.unsigned); + else + return fromBits(0, this.low << (numBits - 32), this.unsigned); + }; + + /** + * Returns this Long with bits shifted to the left by the given amount. This is an alias of {@link Long#shiftLeft}. + * @function + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long + */ + LongPrototype.shl = LongPrototype.shiftLeft; + + /** + * Returns this Long with bits arithmetically shifted to the right by the given amount. + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long + */ + LongPrototype.shiftRight = function shiftRight(numBits) { + if (isLong(numBits)) + numBits = numBits.toInt(); + if ((numBits &= 63) === 0) + return this; + else if (numBits < 32) + return fromBits((this.low >>> numBits) | (this.high << (32 - numBits)), this.high >> numBits, this.unsigned); + else + return fromBits(this.high >> (numBits - 32), this.high >= 0 ? 0 : -1, this.unsigned); + }; + + /** + * Returns this Long with bits arithmetically shifted to the right by the given amount. This is an alias of {@link Long#shiftRight}. + * @function + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long + */ + LongPrototype.shr = LongPrototype.shiftRight; + + /** + * Returns this Long with bits logically shifted to the right by the given amount. + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long + */ + LongPrototype.shiftRightUnsigned = function shiftRightUnsigned(numBits) { + if (isLong(numBits)) + numBits = numBits.toInt(); + numBits &= 63; + if (numBits === 0) + return this; + else { + var high = this.high; + if (numBits < 32) { + var low = this.low; + return fromBits((low >>> numBits) | (high << (32 - numBits)), high >>> numBits, this.unsigned); + } else if (numBits === 32) + return fromBits(high, 0, this.unsigned); + else + return fromBits(high >>> (numBits - 32), 0, this.unsigned); + } + }; + + /** + * Returns this Long with bits logically shifted to the right by the given amount. This is an alias of {@link Long#shiftRightUnsigned}. + * @function + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long + */ + LongPrototype.shru = LongPrototype.shiftRightUnsigned; + + /** + * Converts this Long to signed. + * @returns {!Long} Signed long + */ + LongPrototype.toSigned = function toSigned() { + if (!this.unsigned) + return this; + return fromBits(this.low, this.high, false); + }; + + /** + * Converts this Long to unsigned. + * @returns {!Long} Unsigned long + */ + LongPrototype.toUnsigned = function toUnsigned() { + if (this.unsigned) + return this; + return fromBits(this.low, this.high, true); + }; + + /** + * Converts this Long to its byte representation. + * @param {boolean=} le Whether little or big endian, defaults to big endian + * @returns {!Array.} Byte representation + */ + LongPrototype.toBytes = function(le) { + return le ? this.toBytesLE() : this.toBytesBE(); + }; + + /** + * Converts this Long to its little endian byte representation. + * @returns {!Array.} Little endian byte representation + */ + LongPrototype.toBytesLE = function() { + var hi = this.high, + lo = this.low; + return [ + lo & 0xff, + (lo >>> 8) & 0xff, + (lo >>> 16) & 0xff, + (lo >>> 24) & 0xff, + hi & 0xff, + (hi >>> 8) & 0xff, + (hi >>> 16) & 0xff, + (hi >>> 24) & 0xff + ]; + }; + + /** + * Converts this Long to its big endian byte representation. + * @returns {!Array.} Big endian byte representation + */ + LongPrototype.toBytesBE = function() { + var hi = this.high, + lo = this.low; + return [ + (hi >>> 24) & 0xff, + (hi >>> 16) & 0xff, + (hi >>> 8) & 0xff, + hi & 0xff, + (lo >>> 24) & 0xff, + (lo >>> 16) & 0xff, + (lo >>> 8) & 0xff, + lo & 0xff + ]; + }; + + return Long; + }); + }); + + var bytebuffer = createCommonjsModule(function (module) { + /* + Copyright 2013-2014 Daniel Wirtz + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + + /** + * @license bytebuffer.js (c) 2015 Daniel Wirtz + * Backing buffer: ArrayBuffer, Accessor: Uint8Array + * Released under the Apache License, Version 2.0 + * see: https://github.com/dcodeIO/bytebuffer.js for details + */ + (function(global, factory) { + + /* AMD */ if (typeof undefined === 'function' && undefined["amd"]) + undefined(["long"], factory); + /* CommonJS */ else if (typeof commonjsRequire === 'function' && 'object' === "object" && module && module["exports"]) + module['exports'] = (function() { + var Long; try { Long = long_1; } catch (e) {} + return factory(Long); + })(); + /* Global */ else + (global["dcodeIO"] = global["dcodeIO"] || {})["ByteBuffer"] = factory(global["dcodeIO"]["Long"]); + + })(commonjsGlobal, function(Long) { + "use strict"; + + /** + * Constructs a new ByteBuffer. + * @class The swiss army knife for binary data in JavaScript. + * @exports ByteBuffer + * @constructor + * @param {number=} capacity Initial capacity. Defaults to {@link ByteBuffer.DEFAULT_CAPACITY}. + * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to + * {@link ByteBuffer.DEFAULT_ENDIAN}. + * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to + * {@link ByteBuffer.DEFAULT_NOASSERT}. + * @expose + */ + var ByteBuffer = function(capacity, littleEndian, noAssert) { + if (typeof capacity === 'undefined') + capacity = ByteBuffer.DEFAULT_CAPACITY; + if (typeof littleEndian === 'undefined') + littleEndian = ByteBuffer.DEFAULT_ENDIAN; + if (typeof noAssert === 'undefined') + noAssert = ByteBuffer.DEFAULT_NOASSERT; + if (!noAssert) { + capacity = capacity | 0; + if (capacity < 0) + throw RangeError("Illegal capacity"); + littleEndian = !!littleEndian; + noAssert = !!noAssert; + } + + /** + * Backing ArrayBuffer. + * @type {!ArrayBuffer} + * @expose + */ + this.buffer = capacity === 0 ? EMPTY_BUFFER : new ArrayBuffer(capacity); + + /** + * Uint8Array utilized to manipulate the backing buffer. Becomes `null` if the backing buffer has a capacity of `0`. + * @type {?Uint8Array} + * @expose + */ + this.view = capacity === 0 ? null : new Uint8Array(this.buffer); + + /** + * Absolute read/write offset. + * @type {number} + * @expose + * @see ByteBuffer#flip + * @see ByteBuffer#clear + */ + this.offset = 0; + + /** + * Marked offset. + * @type {number} + * @expose + * @see ByteBuffer#mark + * @see ByteBuffer#reset + */ + this.markedOffset = -1; + + /** + * Absolute limit of the contained data. Set to the backing buffer's capacity upon allocation. + * @type {number} + * @expose + * @see ByteBuffer#flip + * @see ByteBuffer#clear + */ + this.limit = capacity; + + /** + * Whether to use little endian byte order, defaults to `false` for big endian. + * @type {boolean} + * @expose + */ + this.littleEndian = littleEndian; + + /** + * Whether to skip assertions of offsets and values, defaults to `false`. + * @type {boolean} + * @expose + */ + this.noAssert = noAssert; + }; + + /** + * ByteBuffer version. + * @type {string} + * @const + * @expose + */ + ByteBuffer.VERSION = "5.0.1"; + + /** + * Little endian constant that can be used instead of its boolean value. Evaluates to `true`. + * @type {boolean} + * @const + * @expose + */ + ByteBuffer.LITTLE_ENDIAN = true; + + /** + * Big endian constant that can be used instead of its boolean value. Evaluates to `false`. + * @type {boolean} + * @const + * @expose + */ + ByteBuffer.BIG_ENDIAN = false; + + /** + * Default initial capacity of `16`. + * @type {number} + * @expose + */ + ByteBuffer.DEFAULT_CAPACITY = 16; + + /** + * Default endianess of `false` for big endian. + * @type {boolean} + * @expose + */ + ByteBuffer.DEFAULT_ENDIAN = ByteBuffer.BIG_ENDIAN; + + /** + * Default no assertions flag of `false`. + * @type {boolean} + * @expose + */ + ByteBuffer.DEFAULT_NOASSERT = false; + + /** + * A `Long` class for representing a 64-bit two's-complement integer value. May be `null` if Long.js has not been loaded + * and int64 support is not available. + * @type {?Long} + * @const + * @see https://github.com/dcodeIO/long.js + * @expose + */ + ByteBuffer.Long = Long || null; + + /** + * @alias ByteBuffer.prototype + * @inner + */ + var ByteBufferPrototype = ByteBuffer.prototype; + + /** + * An indicator used to reliably determine if an object is a ByteBuffer or not. + * @type {boolean} + * @const + * @expose + * @private + */ + ByteBufferPrototype.__isByteBuffer__; + + Object.defineProperty(ByteBufferPrototype, "__isByteBuffer__", { + value: true, + enumerable: false, + configurable: false + }); + + // helpers + + /** + * @type {!ArrayBuffer} + * @inner + */ + var EMPTY_BUFFER = new ArrayBuffer(0); + + /** + * String.fromCharCode reference for compile-time renaming. + * @type {function(...number):string} + * @inner + */ + var stringFromCharCode = String.fromCharCode; + + /** + * Creates a source function for a string. + * @param {string} s String to read from + * @returns {function():number|null} Source function returning the next char code respectively `null` if there are + * no more characters left. + * @throws {TypeError} If the argument is invalid + * @inner + */ + function stringSource(s) { + var i=0; return function() { + return i < s.length ? s.charCodeAt(i++) : null; + }; + } + + /** + * Creates a destination function for a string. + * @returns {function(number=):undefined|string} Destination function successively called with the next char code. + * Returns the final string when called without arguments. + * @inner + */ + function stringDestination() { + var cs = [], ps = []; return function() { + if (arguments.length === 0) + return ps.join('')+stringFromCharCode.apply(String, cs); + if (cs.length + arguments.length > 1024) + ps.push(stringFromCharCode.apply(String, cs)), + cs.length = 0; + Array.prototype.push.apply(cs, arguments); + }; + } + + /** + * Gets the accessor type. + * @returns {Function} `Buffer` under node.js, `Uint8Array` respectively `DataView` in the browser (classes) + * @expose + */ + ByteBuffer.accessor = function() { + return Uint8Array; + }; + /** + * Allocates a new ByteBuffer backed by a buffer of the specified capacity. + * @param {number=} capacity Initial capacity. Defaults to {@link ByteBuffer.DEFAULT_CAPACITY}. + * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to + * {@link ByteBuffer.DEFAULT_ENDIAN}. + * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to + * {@link ByteBuffer.DEFAULT_NOASSERT}. + * @returns {!ByteBuffer} + * @expose + */ + ByteBuffer.allocate = function(capacity, littleEndian, noAssert) { + return new ByteBuffer(capacity, littleEndian, noAssert); + }; + + /** + * Concatenates multiple ByteBuffers into one. + * @param {!Array.} buffers Buffers to concatenate + * @param {(string|boolean)=} encoding String encoding if `buffers` contains a string ("base64", "hex", "binary", + * defaults to "utf8") + * @param {boolean=} littleEndian Whether to use little or big endian byte order for the resulting ByteBuffer. Defaults + * to {@link ByteBuffer.DEFAULT_ENDIAN}. + * @param {boolean=} noAssert Whether to skip assertions of offsets and values for the resulting ByteBuffer. Defaults to + * {@link ByteBuffer.DEFAULT_NOASSERT}. + * @returns {!ByteBuffer} Concatenated ByteBuffer + * @expose + */ + ByteBuffer.concat = function(buffers, encoding, littleEndian, noAssert) { + if (typeof encoding === 'boolean' || typeof encoding !== 'string') { + noAssert = littleEndian; + littleEndian = encoding; + encoding = undefined; + } + var capacity = 0; + for (var i=0, k=buffers.length, length; i 0) capacity += length; + } + if (capacity === 0) + return new ByteBuffer(0, littleEndian, noAssert); + var bb = new ByteBuffer(capacity, littleEndian, noAssert), + bi; + i=0; while (i} buffer Anything that can be wrapped + * @param {(string|boolean)=} encoding String encoding if `buffer` is a string ("base64", "hex", "binary", defaults to + * "utf8") + * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to + * {@link ByteBuffer.DEFAULT_ENDIAN}. + * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to + * {@link ByteBuffer.DEFAULT_NOASSERT}. + * @returns {!ByteBuffer} A ByteBuffer wrapping `buffer` + * @expose + */ + ByteBuffer.wrap = function(buffer, encoding, littleEndian, noAssert) { + if (typeof encoding !== 'string') { + noAssert = littleEndian; + littleEndian = encoding; + encoding = undefined; + } + if (typeof buffer === 'string') { + if (typeof encoding === 'undefined') + encoding = "utf8"; + switch (encoding) { + case "base64": + return ByteBuffer.fromBase64(buffer, littleEndian); + case "hex": + return ByteBuffer.fromHex(buffer, littleEndian); + case "binary": + return ByteBuffer.fromBinary(buffer, littleEndian); + case "utf8": + return ByteBuffer.fromUTF8(buffer, littleEndian); + case "debug": + return ByteBuffer.fromDebug(buffer, littleEndian); + default: + throw Error("Unsupported encoding: "+encoding); + } + } + if (buffer === null || typeof buffer !== 'object') + throw TypeError("Illegal buffer"); + var bb; + if (ByteBuffer.isByteBuffer(buffer)) { + bb = ByteBufferPrototype.clone.call(buffer); + bb.markedOffset = -1; + return bb; + } + if (buffer instanceof Uint8Array) { // Extract ArrayBuffer from Uint8Array + bb = new ByteBuffer(0, littleEndian, noAssert); + if (buffer.length > 0) { // Avoid references to more than one EMPTY_BUFFER + bb.buffer = buffer.buffer; + bb.offset = buffer.byteOffset; + bb.limit = buffer.byteOffset + buffer.byteLength; + bb.view = new Uint8Array(buffer.buffer); + } + } else if (buffer instanceof ArrayBuffer) { // Reuse ArrayBuffer + bb = new ByteBuffer(0, littleEndian, noAssert); + if (buffer.byteLength > 0) { + bb.buffer = buffer; + bb.offset = 0; + bb.limit = buffer.byteLength; + bb.view = buffer.byteLength > 0 ? new Uint8Array(buffer) : null; + } + } else if (Object.prototype.toString.call(buffer) === "[object Array]") { // Create from octets + bb = new ByteBuffer(buffer.length, littleEndian, noAssert); + bb.limit = buffer.length; + for (var i=0; i} value Array of booleans to write + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `length` if omitted. + * @returns {!ByteBuffer} + * @expose + */ + ByteBufferPrototype.writeBitSet = function(value, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (!(value instanceof Array)) + throw TypeError("Illegal BitSet: Not an array"); + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + + var start = offset, + bits = value.length, + bytes = (bits >> 3), + bit = 0, + k; + + offset += this.writeVarint32(bits,offset); + + while(bytes--) { + k = (!!value[bit++] & 1) | + ((!!value[bit++] & 1) << 1) | + ((!!value[bit++] & 1) << 2) | + ((!!value[bit++] & 1) << 3) | + ((!!value[bit++] & 1) << 4) | + ((!!value[bit++] & 1) << 5) | + ((!!value[bit++] & 1) << 6) | + ((!!value[bit++] & 1) << 7); + this.writeByte(k,offset++); + } + + if(bit < bits) { + var m = 0; k = 0; + while(bit < bits) k = k | ((!!value[bit++] & 1) << (m++)); + this.writeByte(k,offset++); + } + + if (relative) { + this.offset = offset; + return this; + } + return offset - start; + }; + + /** + * Reads a BitSet as an array of booleans. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `length` if omitted. + * @returns {Array + * @expose + */ + ByteBufferPrototype.readBitSet = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + + var ret = this.readVarint32(offset), + bits = ret.value, + bytes = (bits >> 3), + bit = 0, + value = [], + k; + + offset += ret.length; + + while(bytes--) { + k = this.readByte(offset++); + value[bit++] = !!(k & 0x01); + value[bit++] = !!(k & 0x02); + value[bit++] = !!(k & 0x04); + value[bit++] = !!(k & 0x08); + value[bit++] = !!(k & 0x10); + value[bit++] = !!(k & 0x20); + value[bit++] = !!(k & 0x40); + value[bit++] = !!(k & 0x80); + } + + if(bit < bits) { + var m = 0; + k = this.readByte(offset++); + while(bit < bits) value[bit++] = !!((k >> (m++)) & 1); + } + + if (relative) { + this.offset = offset; + } + return value; + }; + /** + * Reads the specified number of bytes. + * @param {number} length Number of bytes to read + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `length` if omitted. + * @returns {!ByteBuffer} + * @expose + */ + ByteBufferPrototype.readBytes = function(length, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + length > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+length+") <= "+this.buffer.byteLength); + } + var slice = this.slice(offset, offset + length); + if (relative) this.offset += length; + return slice; + }; + + /** + * Writes a payload of bytes. This is an alias of {@link ByteBuffer#append}. + * @function + * @param {!ByteBuffer|!ArrayBuffer|!Uint8Array|string} source Data to write. If `source` is a ByteBuffer, its offsets + * will be modified according to the performed read operation. + * @param {(string|number)=} encoding Encoding if `data` is a string ("base64", "hex", "binary", defaults to "utf8") + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.writeBytes = ByteBufferPrototype.append; + + // types/ints/int8 + + /** + * Writes an 8bit signed integer. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.writeInt8 = function(value, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof value !== 'number' || value % 1 !== 0) + throw TypeError("Illegal value: "+value+" (not an integer)"); + value |= 0; + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + offset += 1; + var capacity0 = this.buffer.byteLength; + if (offset > capacity0) + this.resize((capacity0 *= 2) > offset ? capacity0 : offset); + offset -= 1; + this.view[offset] = value; + if (relative) this.offset += 1; + return this; + }; + + /** + * Writes an 8bit signed integer. This is an alias of {@link ByteBuffer#writeInt8}. + * @function + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.writeByte = ByteBufferPrototype.writeInt8; + + /** + * Reads an 8bit signed integer. + * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. + * @returns {number} Value read + * @expose + */ + ByteBufferPrototype.readInt8 = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 1 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+1+") <= "+this.buffer.byteLength); + } + var value = this.view[offset]; + if ((value & 0x80) === 0x80) value = -(0xFF - value + 1); // Cast to signed + if (relative) this.offset += 1; + return value; + }; + + /** + * Reads an 8bit signed integer. This is an alias of {@link ByteBuffer#readInt8}. + * @function + * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. + * @returns {number} Value read + * @expose + */ + ByteBufferPrototype.readByte = ByteBufferPrototype.readInt8; + + /** + * Writes an 8bit unsigned integer. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.writeUint8 = function(value, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof value !== 'number' || value % 1 !== 0) + throw TypeError("Illegal value: "+value+" (not an integer)"); + value >>>= 0; + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + offset += 1; + var capacity1 = this.buffer.byteLength; + if (offset > capacity1) + this.resize((capacity1 *= 2) > offset ? capacity1 : offset); + offset -= 1; + this.view[offset] = value; + if (relative) this.offset += 1; + return this; + }; + + /** + * Writes an 8bit unsigned integer. This is an alias of {@link ByteBuffer#writeUint8}. + * @function + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.writeUInt8 = ByteBufferPrototype.writeUint8; + + /** + * Reads an 8bit unsigned integer. + * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. + * @returns {number} Value read + * @expose + */ + ByteBufferPrototype.readUint8 = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 1 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+1+") <= "+this.buffer.byteLength); + } + var value = this.view[offset]; + if (relative) this.offset += 1; + return value; + }; + + /** + * Reads an 8bit unsigned integer. This is an alias of {@link ByteBuffer#readUint8}. + * @function + * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. + * @returns {number} Value read + * @expose + */ + ByteBufferPrototype.readUInt8 = ByteBufferPrototype.readUint8; + + // types/ints/int16 + + /** + * Writes a 16bit signed integer. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. + * @throws {TypeError} If `offset` or `value` is not a valid number + * @throws {RangeError} If `offset` is out of bounds + * @expose + */ + ByteBufferPrototype.writeInt16 = function(value, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof value !== 'number' || value % 1 !== 0) + throw TypeError("Illegal value: "+value+" (not an integer)"); + value |= 0; + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + offset += 2; + var capacity2 = this.buffer.byteLength; + if (offset > capacity2) + this.resize((capacity2 *= 2) > offset ? capacity2 : offset); + offset -= 2; + if (this.littleEndian) { + this.view[offset+1] = (value & 0xFF00) >>> 8; + this.view[offset ] = value & 0x00FF; + } else { + this.view[offset] = (value & 0xFF00) >>> 8; + this.view[offset+1] = value & 0x00FF; + } + if (relative) this.offset += 2; + return this; + }; + + /** + * Writes a 16bit signed integer. This is an alias of {@link ByteBuffer#writeInt16}. + * @function + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. + * @throws {TypeError} If `offset` or `value` is not a valid number + * @throws {RangeError} If `offset` is out of bounds + * @expose + */ + ByteBufferPrototype.writeShort = ByteBufferPrototype.writeInt16; + + /** + * Reads a 16bit signed integer. + * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. + * @returns {number} Value read + * @throws {TypeError} If `offset` is not a valid number + * @throws {RangeError} If `offset` is out of bounds + * @expose + */ + ByteBufferPrototype.readInt16 = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 2 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+2+") <= "+this.buffer.byteLength); + } + var value = 0; + if (this.littleEndian) { + value = this.view[offset ]; + value |= this.view[offset+1] << 8; + } else { + value = this.view[offset ] << 8; + value |= this.view[offset+1]; + } + if ((value & 0x8000) === 0x8000) value = -(0xFFFF - value + 1); // Cast to signed + if (relative) this.offset += 2; + return value; + }; + + /** + * Reads a 16bit signed integer. This is an alias of {@link ByteBuffer#readInt16}. + * @function + * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. + * @returns {number} Value read + * @throws {TypeError} If `offset` is not a valid number + * @throws {RangeError} If `offset` is out of bounds + * @expose + */ + ByteBufferPrototype.readShort = ByteBufferPrototype.readInt16; + + /** + * Writes a 16bit unsigned integer. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. + * @throws {TypeError} If `offset` or `value` is not a valid number + * @throws {RangeError} If `offset` is out of bounds + * @expose + */ + ByteBufferPrototype.writeUint16 = function(value, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof value !== 'number' || value % 1 !== 0) + throw TypeError("Illegal value: "+value+" (not an integer)"); + value >>>= 0; + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + offset += 2; + var capacity3 = this.buffer.byteLength; + if (offset > capacity3) + this.resize((capacity3 *= 2) > offset ? capacity3 : offset); + offset -= 2; + if (this.littleEndian) { + this.view[offset+1] = (value & 0xFF00) >>> 8; + this.view[offset ] = value & 0x00FF; + } else { + this.view[offset] = (value & 0xFF00) >>> 8; + this.view[offset+1] = value & 0x00FF; + } + if (relative) this.offset += 2; + return this; + }; + + /** + * Writes a 16bit unsigned integer. This is an alias of {@link ByteBuffer#writeUint16}. + * @function + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. + * @throws {TypeError} If `offset` or `value` is not a valid number + * @throws {RangeError} If `offset` is out of bounds + * @expose + */ + ByteBufferPrototype.writeUInt16 = ByteBufferPrototype.writeUint16; + + /** + * Reads a 16bit unsigned integer. + * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. + * @returns {number} Value read + * @throws {TypeError} If `offset` is not a valid number + * @throws {RangeError} If `offset` is out of bounds + * @expose + */ + ByteBufferPrototype.readUint16 = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 2 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+2+") <= "+this.buffer.byteLength); + } + var value = 0; + if (this.littleEndian) { + value = this.view[offset ]; + value |= this.view[offset+1] << 8; + } else { + value = this.view[offset ] << 8; + value |= this.view[offset+1]; + } + if (relative) this.offset += 2; + return value; + }; + + /** + * Reads a 16bit unsigned integer. This is an alias of {@link ByteBuffer#readUint16}. + * @function + * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. + * @returns {number} Value read + * @throws {TypeError} If `offset` is not a valid number + * @throws {RangeError} If `offset` is out of bounds + * @expose + */ + ByteBufferPrototype.readUInt16 = ByteBufferPrototype.readUint16; + + // types/ints/int32 + + /** + * Writes a 32bit signed integer. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @expose + */ + ByteBufferPrototype.writeInt32 = function(value, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof value !== 'number' || value % 1 !== 0) + throw TypeError("Illegal value: "+value+" (not an integer)"); + value |= 0; + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + offset += 4; + var capacity4 = this.buffer.byteLength; + if (offset > capacity4) + this.resize((capacity4 *= 2) > offset ? capacity4 : offset); + offset -= 4; + if (this.littleEndian) { + this.view[offset+3] = (value >>> 24) & 0xFF; + this.view[offset+2] = (value >>> 16) & 0xFF; + this.view[offset+1] = (value >>> 8) & 0xFF; + this.view[offset ] = value & 0xFF; + } else { + this.view[offset ] = (value >>> 24) & 0xFF; + this.view[offset+1] = (value >>> 16) & 0xFF; + this.view[offset+2] = (value >>> 8) & 0xFF; + this.view[offset+3] = value & 0xFF; + } + if (relative) this.offset += 4; + return this; + }; + + /** + * Writes a 32bit signed integer. This is an alias of {@link ByteBuffer#writeInt32}. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @expose + */ + ByteBufferPrototype.writeInt = ByteBufferPrototype.writeInt32; + + /** + * Reads a 32bit signed integer. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @returns {number} Value read + * @expose + */ + ByteBufferPrototype.readInt32 = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 4 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+4+") <= "+this.buffer.byteLength); + } + var value = 0; + if (this.littleEndian) { + value = this.view[offset+2] << 16; + value |= this.view[offset+1] << 8; + value |= this.view[offset ]; + value += this.view[offset+3] << 24 >>> 0; + } else { + value = this.view[offset+1] << 16; + value |= this.view[offset+2] << 8; + value |= this.view[offset+3]; + value += this.view[offset ] << 24 >>> 0; + } + value |= 0; // Cast to signed + if (relative) this.offset += 4; + return value; + }; + + /** + * Reads a 32bit signed integer. This is an alias of {@link ByteBuffer#readInt32}. + * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `4` if omitted. + * @returns {number} Value read + * @expose + */ + ByteBufferPrototype.readInt = ByteBufferPrototype.readInt32; + + /** + * Writes a 32bit unsigned integer. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @expose + */ + ByteBufferPrototype.writeUint32 = function(value, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof value !== 'number' || value % 1 !== 0) + throw TypeError("Illegal value: "+value+" (not an integer)"); + value >>>= 0; + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + offset += 4; + var capacity5 = this.buffer.byteLength; + if (offset > capacity5) + this.resize((capacity5 *= 2) > offset ? capacity5 : offset); + offset -= 4; + if (this.littleEndian) { + this.view[offset+3] = (value >>> 24) & 0xFF; + this.view[offset+2] = (value >>> 16) & 0xFF; + this.view[offset+1] = (value >>> 8) & 0xFF; + this.view[offset ] = value & 0xFF; + } else { + this.view[offset ] = (value >>> 24) & 0xFF; + this.view[offset+1] = (value >>> 16) & 0xFF; + this.view[offset+2] = (value >>> 8) & 0xFF; + this.view[offset+3] = value & 0xFF; + } + if (relative) this.offset += 4; + return this; + }; + + /** + * Writes a 32bit unsigned integer. This is an alias of {@link ByteBuffer#writeUint32}. + * @function + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @expose + */ + ByteBufferPrototype.writeUInt32 = ByteBufferPrototype.writeUint32; + + /** + * Reads a 32bit unsigned integer. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @returns {number} Value read + * @expose + */ + ByteBufferPrototype.readUint32 = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 4 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+4+") <= "+this.buffer.byteLength); + } + var value = 0; + if (this.littleEndian) { + value = this.view[offset+2] << 16; + value |= this.view[offset+1] << 8; + value |= this.view[offset ]; + value += this.view[offset+3] << 24 >>> 0; + } else { + value = this.view[offset+1] << 16; + value |= this.view[offset+2] << 8; + value |= this.view[offset+3]; + value += this.view[offset ] << 24 >>> 0; + } + if (relative) this.offset += 4; + return value; + }; + + /** + * Reads a 32bit unsigned integer. This is an alias of {@link ByteBuffer#readUint32}. + * @function + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @returns {number} Value read + * @expose + */ + ByteBufferPrototype.readUInt32 = ByteBufferPrototype.readUint32; + + // types/ints/int64 + + if (Long) { + + /** + * Writes a 64bit signed integer. + * @param {number|!Long} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.writeInt64 = function(value, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof value === 'number') + value = Long.fromNumber(value); + else if (typeof value === 'string') + value = Long.fromString(value); + else if (!(value && value instanceof Long)) + throw TypeError("Illegal value: "+value+" (not an integer or Long)"); + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + if (typeof value === 'number') + value = Long.fromNumber(value); + else if (typeof value === 'string') + value = Long.fromString(value); + offset += 8; + var capacity6 = this.buffer.byteLength; + if (offset > capacity6) + this.resize((capacity6 *= 2) > offset ? capacity6 : offset); + offset -= 8; + var lo = value.low, + hi = value.high; + if (this.littleEndian) { + this.view[offset+3] = (lo >>> 24) & 0xFF; + this.view[offset+2] = (lo >>> 16) & 0xFF; + this.view[offset+1] = (lo >>> 8) & 0xFF; + this.view[offset ] = lo & 0xFF; + offset += 4; + this.view[offset+3] = (hi >>> 24) & 0xFF; + this.view[offset+2] = (hi >>> 16) & 0xFF; + this.view[offset+1] = (hi >>> 8) & 0xFF; + this.view[offset ] = hi & 0xFF; + } else { + this.view[offset ] = (hi >>> 24) & 0xFF; + this.view[offset+1] = (hi >>> 16) & 0xFF; + this.view[offset+2] = (hi >>> 8) & 0xFF; + this.view[offset+3] = hi & 0xFF; + offset += 4; + this.view[offset ] = (lo >>> 24) & 0xFF; + this.view[offset+1] = (lo >>> 16) & 0xFF; + this.view[offset+2] = (lo >>> 8) & 0xFF; + this.view[offset+3] = lo & 0xFF; + } + if (relative) this.offset += 8; + return this; + }; + + /** + * Writes a 64bit signed integer. This is an alias of {@link ByteBuffer#writeInt64}. + * @param {number|!Long} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.writeLong = ByteBufferPrototype.writeInt64; + + /** + * Reads a 64bit signed integer. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {!Long} + * @expose + */ + ByteBufferPrototype.readInt64 = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 8 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+8+") <= "+this.buffer.byteLength); + } + var lo = 0, + hi = 0; + if (this.littleEndian) { + lo = this.view[offset+2] << 16; + lo |= this.view[offset+1] << 8; + lo |= this.view[offset ]; + lo += this.view[offset+3] << 24 >>> 0; + offset += 4; + hi = this.view[offset+2] << 16; + hi |= this.view[offset+1] << 8; + hi |= this.view[offset ]; + hi += this.view[offset+3] << 24 >>> 0; + } else { + hi = this.view[offset+1] << 16; + hi |= this.view[offset+2] << 8; + hi |= this.view[offset+3]; + hi += this.view[offset ] << 24 >>> 0; + offset += 4; + lo = this.view[offset+1] << 16; + lo |= this.view[offset+2] << 8; + lo |= this.view[offset+3]; + lo += this.view[offset ] << 24 >>> 0; + } + var value = new Long(lo, hi, false); + if (relative) this.offset += 8; + return value; + }; + + /** + * Reads a 64bit signed integer. This is an alias of {@link ByteBuffer#readInt64}. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {!Long} + * @expose + */ + ByteBufferPrototype.readLong = ByteBufferPrototype.readInt64; + + /** + * Writes a 64bit unsigned integer. + * @param {number|!Long} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.writeUint64 = function(value, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof value === 'number') + value = Long.fromNumber(value); + else if (typeof value === 'string') + value = Long.fromString(value); + else if (!(value && value instanceof Long)) + throw TypeError("Illegal value: "+value+" (not an integer or Long)"); + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + if (typeof value === 'number') + value = Long.fromNumber(value); + else if (typeof value === 'string') + value = Long.fromString(value); + offset += 8; + var capacity7 = this.buffer.byteLength; + if (offset > capacity7) + this.resize((capacity7 *= 2) > offset ? capacity7 : offset); + offset -= 8; + var lo = value.low, + hi = value.high; + if (this.littleEndian) { + this.view[offset+3] = (lo >>> 24) & 0xFF; + this.view[offset+2] = (lo >>> 16) & 0xFF; + this.view[offset+1] = (lo >>> 8) & 0xFF; + this.view[offset ] = lo & 0xFF; + offset += 4; + this.view[offset+3] = (hi >>> 24) & 0xFF; + this.view[offset+2] = (hi >>> 16) & 0xFF; + this.view[offset+1] = (hi >>> 8) & 0xFF; + this.view[offset ] = hi & 0xFF; + } else { + this.view[offset ] = (hi >>> 24) & 0xFF; + this.view[offset+1] = (hi >>> 16) & 0xFF; + this.view[offset+2] = (hi >>> 8) & 0xFF; + this.view[offset+3] = hi & 0xFF; + offset += 4; + this.view[offset ] = (lo >>> 24) & 0xFF; + this.view[offset+1] = (lo >>> 16) & 0xFF; + this.view[offset+2] = (lo >>> 8) & 0xFF; + this.view[offset+3] = lo & 0xFF; + } + if (relative) this.offset += 8; + return this; + }; + + /** + * Writes a 64bit unsigned integer. This is an alias of {@link ByteBuffer#writeUint64}. + * @function + * @param {number|!Long} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.writeUInt64 = ByteBufferPrototype.writeUint64; + + /** + * Reads a 64bit unsigned integer. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {!Long} + * @expose + */ + ByteBufferPrototype.readUint64 = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 8 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+8+") <= "+this.buffer.byteLength); + } + var lo = 0, + hi = 0; + if (this.littleEndian) { + lo = this.view[offset+2] << 16; + lo |= this.view[offset+1] << 8; + lo |= this.view[offset ]; + lo += this.view[offset+3] << 24 >>> 0; + offset += 4; + hi = this.view[offset+2] << 16; + hi |= this.view[offset+1] << 8; + hi |= this.view[offset ]; + hi += this.view[offset+3] << 24 >>> 0; + } else { + hi = this.view[offset+1] << 16; + hi |= this.view[offset+2] << 8; + hi |= this.view[offset+3]; + hi += this.view[offset ] << 24 >>> 0; + offset += 4; + lo = this.view[offset+1] << 16; + lo |= this.view[offset+2] << 8; + lo |= this.view[offset+3]; + lo += this.view[offset ] << 24 >>> 0; + } + var value = new Long(lo, hi, true); + if (relative) this.offset += 8; + return value; + }; + + /** + * Reads a 64bit unsigned integer. This is an alias of {@link ByteBuffer#readUint64}. + * @function + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {!Long} + * @expose + */ + ByteBufferPrototype.readUInt64 = ByteBufferPrototype.readUint64; + + } // Long + + + // types/floats/float32 + + /* + ieee754 - https://github.com/feross/ieee754 + + The MIT License (MIT) + + Copyright (c) Feross Aboukhadijeh + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + + /** + * Reads an IEEE754 float from a byte array. + * @param {!Array} buffer + * @param {number} offset + * @param {boolean} isLE + * @param {number} mLen + * @param {number} nBytes + * @returns {number} + * @inner + */ + function ieee754_read(buffer, offset, isLE, mLen, nBytes) { + var e, m, + eLen = nBytes * 8 - mLen - 1, + eMax = (1 << eLen) - 1, + eBias = eMax >> 1, + nBits = -7, + i = isLE ? (nBytes - 1) : 0, + d = isLE ? -1 : 1, + s = buffer[offset + i]; + + i += d; + + e = s & ((1 << (-nBits)) - 1); + s >>= (-nBits); + nBits += eLen; + for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {} + + m = e & ((1 << (-nBits)) - 1); + e >>= (-nBits); + nBits += mLen; + for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {} + + if (e === 0) { + e = 1 - eBias; + } else if (e === eMax) { + return m ? NaN : ((s ? -1 : 1) * Infinity); + } else { + m = m + Math.pow(2, mLen); + e = e - eBias; + } + return (s ? -1 : 1) * m * Math.pow(2, e - mLen); + } + + /** + * Writes an IEEE754 float to a byte array. + * @param {!Array} buffer + * @param {number} value + * @param {number} offset + * @param {boolean} isLE + * @param {number} mLen + * @param {number} nBytes + * @inner + */ + function ieee754_write(buffer, value, offset, isLE, mLen, nBytes) { + var e, m, c, + eLen = nBytes * 8 - mLen - 1, + eMax = (1 << eLen) - 1, + eBias = eMax >> 1, + rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0), + i = isLE ? 0 : (nBytes - 1), + d = isLE ? 1 : -1, + s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0; + + value = Math.abs(value); + + if (isNaN(value) || value === Infinity) { + m = isNaN(value) ? 1 : 0; + e = eMax; + } else { + e = Math.floor(Math.log(value) / Math.LN2); + if (value * (c = Math.pow(2, -e)) < 1) { + e--; + c *= 2; + } + if (e + eBias >= 1) { + value += rt / c; + } else { + value += rt * Math.pow(2, 1 - eBias); + } + if (value * c >= 2) { + e++; + c /= 2; + } + + if (e + eBias >= eMax) { + m = 0; + e = eMax; + } else if (e + eBias >= 1) { + m = (value * c - 1) * Math.pow(2, mLen); + e = e + eBias; + } else { + m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen); + e = 0; + } + } + + for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} + + e = (e << mLen) | m; + eLen += mLen; + for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} + + buffer[offset + i - d] |= s * 128; + } + + /** + * Writes a 32bit float. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.writeFloat32 = function(value, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof value !== 'number') + throw TypeError("Illegal value: "+value+" (not a number)"); + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + offset += 4; + var capacity8 = this.buffer.byteLength; + if (offset > capacity8) + this.resize((capacity8 *= 2) > offset ? capacity8 : offset); + offset -= 4; + ieee754_write(this.view, value, offset, this.littleEndian, 23, 4); + if (relative) this.offset += 4; + return this; + }; + + /** + * Writes a 32bit float. This is an alias of {@link ByteBuffer#writeFloat32}. + * @function + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.writeFloat = ByteBufferPrototype.writeFloat32; + + /** + * Reads a 32bit float. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @returns {number} + * @expose + */ + ByteBufferPrototype.readFloat32 = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 4 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+4+") <= "+this.buffer.byteLength); + } + var value = ieee754_read(this.view, offset, this.littleEndian, 23, 4); + if (relative) this.offset += 4; + return value; + }; + + /** + * Reads a 32bit float. This is an alias of {@link ByteBuffer#readFloat32}. + * @function + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @returns {number} + * @expose + */ + ByteBufferPrototype.readFloat = ByteBufferPrototype.readFloat32; + + // types/floats/float64 + + /** + * Writes a 64bit float. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.writeFloat64 = function(value, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof value !== 'number') + throw TypeError("Illegal value: "+value+" (not a number)"); + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + offset += 8; + var capacity9 = this.buffer.byteLength; + if (offset > capacity9) + this.resize((capacity9 *= 2) > offset ? capacity9 : offset); + offset -= 8; + ieee754_write(this.view, value, offset, this.littleEndian, 52, 8); + if (relative) this.offset += 8; + return this; + }; + + /** + * Writes a 64bit float. This is an alias of {@link ByteBuffer#writeFloat64}. + * @function + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.writeDouble = ByteBufferPrototype.writeFloat64; + + /** + * Reads a 64bit float. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {number} + * @expose + */ + ByteBufferPrototype.readFloat64 = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 8 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+8+") <= "+this.buffer.byteLength); + } + var value = ieee754_read(this.view, offset, this.littleEndian, 52, 8); + if (relative) this.offset += 8; + return value; + }; + + /** + * Reads a 64bit float. This is an alias of {@link ByteBuffer#readFloat64}. + * @function + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {number} + * @expose + */ + ByteBufferPrototype.readDouble = ByteBufferPrototype.readFloat64; + + + // types/varints/varint32 + + /** + * Maximum number of bytes required to store a 32bit base 128 variable-length integer. + * @type {number} + * @const + * @expose + */ + ByteBuffer.MAX_VARINT32_BYTES = 5; + + /** + * Calculates the actual number of bytes required to store a 32bit base 128 variable-length integer. + * @param {number} value Value to encode + * @returns {number} Number of bytes required. Capped to {@link ByteBuffer.MAX_VARINT32_BYTES} + * @expose + */ + ByteBuffer.calculateVarint32 = function(value) { + // ref: src/google/protobuf/io/coded_stream.cc + value = value >>> 0; + if (value < 1 << 7 ) return 1; + else if (value < 1 << 14) return 2; + else if (value < 1 << 21) return 3; + else if (value < 1 << 28) return 4; + else return 5; + }; + + /** + * Zigzag encodes a signed 32bit integer so that it can be effectively used with varint encoding. + * @param {number} n Signed 32bit integer + * @returns {number} Unsigned zigzag encoded 32bit integer + * @expose + */ + ByteBuffer.zigZagEncode32 = function(n) { + return (((n |= 0) << 1) ^ (n >> 31)) >>> 0; // ref: src/google/protobuf/wire_format_lite.h + }; + + /** + * Decodes a zigzag encoded signed 32bit integer. + * @param {number} n Unsigned zigzag encoded 32bit integer + * @returns {number} Signed 32bit integer + * @expose + */ + ByteBuffer.zigZagDecode32 = function(n) { + return ((n >>> 1) ^ -(n & 1)) | 0; // // ref: src/google/protobuf/wire_format_lite.h + }; + + /** + * Writes a 32bit base 128 variable-length integer. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. + * @returns {!ByteBuffer|number} this if `offset` is omitted, else the actual number of bytes written + * @expose + */ + ByteBufferPrototype.writeVarint32 = function(value, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof value !== 'number' || value % 1 !== 0) + throw TypeError("Illegal value: "+value+" (not an integer)"); + value |= 0; + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + var size = ByteBuffer.calculateVarint32(value), + b; + offset += size; + var capacity10 = this.buffer.byteLength; + if (offset > capacity10) + this.resize((capacity10 *= 2) > offset ? capacity10 : offset); + offset -= size; + value >>>= 0; + while (value >= 0x80) { + b = (value & 0x7f) | 0x80; + this.view[offset++] = b; + value >>>= 7; + } + this.view[offset++] = value; + if (relative) { + this.offset = offset; + return this; + } + return size; + }; + + /** + * Writes a zig-zag encoded (signed) 32bit base 128 variable-length integer. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. + * @returns {!ByteBuffer|number} this if `offset` is omitted, else the actual number of bytes written + * @expose + */ + ByteBufferPrototype.writeVarint32ZigZag = function(value, offset) { + return this.writeVarint32(ByteBuffer.zigZagEncode32(value), offset); + }; + + /** + * Reads a 32bit base 128 variable-length integer. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. + * @returns {number|!{value: number, length: number}} The value read if offset is omitted, else the value read + * and the actual number of bytes read. + * @throws {Error} If it's not a valid varint. Has a property `truncated = true` if there is not enough data available + * to fully decode the varint. + * @expose + */ + ByteBufferPrototype.readVarint32 = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 1 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+1+") <= "+this.buffer.byteLength); + } + var c = 0, + value = 0 >>> 0, + b; + do { + if (!this.noAssert && offset > this.limit) { + var err = Error("Truncated"); + err['truncated'] = true; + throw err; + } + b = this.view[offset++]; + if (c < 5) + value |= (b & 0x7f) << (7*c); + ++c; + } while ((b & 0x80) !== 0); + value |= 0; + if (relative) { + this.offset = offset; + return value; + } + return { + "value": value, + "length": c + }; + }; + + /** + * Reads a zig-zag encoded (signed) 32bit base 128 variable-length integer. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. + * @returns {number|!{value: number, length: number}} The value read if offset is omitted, else the value read + * and the actual number of bytes read. + * @throws {Error} If it's not a valid varint + * @expose + */ + ByteBufferPrototype.readVarint32ZigZag = function(offset) { + var val = this.readVarint32(offset); + if (typeof val === 'object') + val["value"] = ByteBuffer.zigZagDecode32(val["value"]); + else + val = ByteBuffer.zigZagDecode32(val); + return val; + }; + + // types/varints/varint64 + + if (Long) { + + /** + * Maximum number of bytes required to store a 64bit base 128 variable-length integer. + * @type {number} + * @const + * @expose + */ + ByteBuffer.MAX_VARINT64_BYTES = 10; + + /** + * Calculates the actual number of bytes required to store a 64bit base 128 variable-length integer. + * @param {number|!Long} value Value to encode + * @returns {number} Number of bytes required. Capped to {@link ByteBuffer.MAX_VARINT64_BYTES} + * @expose + */ + ByteBuffer.calculateVarint64 = function(value) { + if (typeof value === 'number') + value = Long.fromNumber(value); + else if (typeof value === 'string') + value = Long.fromString(value); + // ref: src/google/protobuf/io/coded_stream.cc + var part0 = value.toInt() >>> 0, + part1 = value.shiftRightUnsigned(28).toInt() >>> 0, + part2 = value.shiftRightUnsigned(56).toInt() >>> 0; + if (part2 == 0) { + if (part1 == 0) { + if (part0 < 1 << 14) + return part0 < 1 << 7 ? 1 : 2; + else + return part0 < 1 << 21 ? 3 : 4; + } else { + if (part1 < 1 << 14) + return part1 < 1 << 7 ? 5 : 6; + else + return part1 < 1 << 21 ? 7 : 8; + } + } else + return part2 < 1 << 7 ? 9 : 10; + }; + + /** + * Zigzag encodes a signed 64bit integer so that it can be effectively used with varint encoding. + * @param {number|!Long} value Signed long + * @returns {!Long} Unsigned zigzag encoded long + * @expose + */ + ByteBuffer.zigZagEncode64 = function(value) { + if (typeof value === 'number') + value = Long.fromNumber(value, false); + else if (typeof value === 'string') + value = Long.fromString(value, false); + else if (value.unsigned !== false) value = value.toSigned(); + // ref: src/google/protobuf/wire_format_lite.h + return value.shiftLeft(1).xor(value.shiftRight(63)).toUnsigned(); + }; + + /** + * Decodes a zigzag encoded signed 64bit integer. + * @param {!Long|number} value Unsigned zigzag encoded long or JavaScript number + * @returns {!Long} Signed long + * @expose + */ + ByteBuffer.zigZagDecode64 = function(value) { + if (typeof value === 'number') + value = Long.fromNumber(value, false); + else if (typeof value === 'string') + value = Long.fromString(value, false); + else if (value.unsigned !== false) value = value.toSigned(); + // ref: src/google/protobuf/wire_format_lite.h + return value.shiftRightUnsigned(1).xor(value.and(Long.ONE).toSigned().negate()).toSigned(); + }; + + /** + * Writes a 64bit base 128 variable-length integer. + * @param {number|Long} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. + * @returns {!ByteBuffer|number} `this` if offset is omitted, else the actual number of bytes written. + * @expose + */ + ByteBufferPrototype.writeVarint64 = function(value, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof value === 'number') + value = Long.fromNumber(value); + else if (typeof value === 'string') + value = Long.fromString(value); + else if (!(value && value instanceof Long)) + throw TypeError("Illegal value: "+value+" (not an integer or Long)"); + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + if (typeof value === 'number') + value = Long.fromNumber(value, false); + else if (typeof value === 'string') + value = Long.fromString(value, false); + else if (value.unsigned !== false) value = value.toSigned(); + var size = ByteBuffer.calculateVarint64(value), + part0 = value.toInt() >>> 0, + part1 = value.shiftRightUnsigned(28).toInt() >>> 0, + part2 = value.shiftRightUnsigned(56).toInt() >>> 0; + offset += size; + var capacity11 = this.buffer.byteLength; + if (offset > capacity11) + this.resize((capacity11 *= 2) > offset ? capacity11 : offset); + offset -= size; + switch (size) { + case 10: this.view[offset+9] = (part2 >>> 7) & 0x01; + case 9 : this.view[offset+8] = size !== 9 ? (part2 ) | 0x80 : (part2 ) & 0x7F; + case 8 : this.view[offset+7] = size !== 8 ? (part1 >>> 21) | 0x80 : (part1 >>> 21) & 0x7F; + case 7 : this.view[offset+6] = size !== 7 ? (part1 >>> 14) | 0x80 : (part1 >>> 14) & 0x7F; + case 6 : this.view[offset+5] = size !== 6 ? (part1 >>> 7) | 0x80 : (part1 >>> 7) & 0x7F; + case 5 : this.view[offset+4] = size !== 5 ? (part1 ) | 0x80 : (part1 ) & 0x7F; + case 4 : this.view[offset+3] = size !== 4 ? (part0 >>> 21) | 0x80 : (part0 >>> 21) & 0x7F; + case 3 : this.view[offset+2] = size !== 3 ? (part0 >>> 14) | 0x80 : (part0 >>> 14) & 0x7F; + case 2 : this.view[offset+1] = size !== 2 ? (part0 >>> 7) | 0x80 : (part0 >>> 7) & 0x7F; + case 1 : this.view[offset ] = size !== 1 ? (part0 ) | 0x80 : (part0 ) & 0x7F; + } + if (relative) { + this.offset += size; + return this; + } else { + return size; + } + }; + + /** + * Writes a zig-zag encoded 64bit base 128 variable-length integer. + * @param {number|Long} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. + * @returns {!ByteBuffer|number} `this` if offset is omitted, else the actual number of bytes written. + * @expose + */ + ByteBufferPrototype.writeVarint64ZigZag = function(value, offset) { + return this.writeVarint64(ByteBuffer.zigZagEncode64(value), offset); + }; + + /** + * Reads a 64bit base 128 variable-length integer. Requires Long.js. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * read if omitted. + * @returns {!Long|!{value: Long, length: number}} The value read if offset is omitted, else the value read and + * the actual number of bytes read. + * @throws {Error} If it's not a valid varint + * @expose + */ + ByteBufferPrototype.readVarint64 = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 1 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+1+") <= "+this.buffer.byteLength); + } + // ref: src/google/protobuf/io/coded_stream.cc + var start = offset, + part0 = 0, + part1 = 0, + part2 = 0, + b = 0; + b = this.view[offset++]; part0 = (b & 0x7F) ; if ( b & 0x80 ) { + b = this.view[offset++]; part0 |= (b & 0x7F) << 7; if ((b & 0x80) || (this.noAssert && typeof b === 'undefined')) { + b = this.view[offset++]; part0 |= (b & 0x7F) << 14; if ((b & 0x80) || (this.noAssert && typeof b === 'undefined')) { + b = this.view[offset++]; part0 |= (b & 0x7F) << 21; if ((b & 0x80) || (this.noAssert && typeof b === 'undefined')) { + b = this.view[offset++]; part1 = (b & 0x7F) ; if ((b & 0x80) || (this.noAssert && typeof b === 'undefined')) { + b = this.view[offset++]; part1 |= (b & 0x7F) << 7; if ((b & 0x80) || (this.noAssert && typeof b === 'undefined')) { + b = this.view[offset++]; part1 |= (b & 0x7F) << 14; if ((b & 0x80) || (this.noAssert && typeof b === 'undefined')) { + b = this.view[offset++]; part1 |= (b & 0x7F) << 21; if ((b & 0x80) || (this.noAssert && typeof b === 'undefined')) { + b = this.view[offset++]; part2 = (b & 0x7F) ; if ((b & 0x80) || (this.noAssert && typeof b === 'undefined')) { + b = this.view[offset++]; part2 |= (b & 0x7F) << 7; if ((b & 0x80) || (this.noAssert && typeof b === 'undefined')) { + throw Error("Buffer overrun"); }}}}}}}}}} + var value = Long.fromBits(part0 | (part1 << 28), (part1 >>> 4) | (part2) << 24, false); + if (relative) { + this.offset = offset; + return value; + } else { + return { + 'value': value, + 'length': offset-start + }; + } + }; + + /** + * Reads a zig-zag encoded 64bit base 128 variable-length integer. Requires Long.js. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * read if omitted. + * @returns {!Long|!{value: Long, length: number}} The value read if offset is omitted, else the value read and + * the actual number of bytes read. + * @throws {Error} If it's not a valid varint + * @expose + */ + ByteBufferPrototype.readVarint64ZigZag = function(offset) { + var val = this.readVarint64(offset); + if (val && val['value'] instanceof Long) + val["value"] = ByteBuffer.zigZagDecode64(val["value"]); + else + val = ByteBuffer.zigZagDecode64(val); + return val; + }; + + } // Long + + + // types/strings/cstring + + /** + * Writes a NULL-terminated UTF8 encoded string. For this to work the specified string must not contain any NULL + * characters itself. + * @param {string} str String to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * contained in `str` + 1 if omitted. + * @returns {!ByteBuffer|number} this if offset is omitted, else the actual number of bytes written + * @expose + */ + ByteBufferPrototype.writeCString = function(str, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + var i, + k = str.length; + if (!this.noAssert) { + if (typeof str !== 'string') + throw TypeError("Illegal str: Not a string"); + for (i=0; i>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + // UTF8 strings do not contain zero bytes in between except for the zero character, so: + k = utfx.calculateUTF16asUTF8(stringSource(str))[1]; + offset += k+1; + var capacity12 = this.buffer.byteLength; + if (offset > capacity12) + this.resize((capacity12 *= 2) > offset ? capacity12 : offset); + offset -= k+1; + utfx.encodeUTF16toUTF8(stringSource(str), function(b) { + this.view[offset++] = b; + }.bind(this)); + this.view[offset++] = 0; + if (relative) { + this.offset = offset; + return this; + } + return k; + }; + + /** + * Reads a NULL-terminated UTF8 encoded string. For this to work the string read must not contain any NULL characters + * itself. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * read if omitted. + * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string + * read and the actual number of bytes read. + * @expose + */ + ByteBufferPrototype.readCString = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 1 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+1+") <= "+this.buffer.byteLength); + } + var start = offset, + temp; + // UTF8 strings do not contain zero bytes in between except for the zero character itself, so: + var sd, b = -1; + utfx.decodeUTF8toUTF16(function() { + if (b === 0) return null; + if (offset >= this.limit) + throw RangeError("Illegal range: Truncated data, "+offset+" < "+this.limit); + b = this.view[offset++]; + return b === 0 ? null : b; + }.bind(this), sd = stringDestination(), true); + if (relative) { + this.offset = offset; + return sd(); + } else { + return { + "string": sd(), + "length": offset - start + }; + } + }; + + // types/strings/istring + + /** + * Writes a length as uint32 prefixed UTF8 encoded string. + * @param {string} str String to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. + * @returns {!ByteBuffer|number} `this` if `offset` is omitted, else the actual number of bytes written + * @expose + * @see ByteBuffer#writeVarint32 + */ + ByteBufferPrototype.writeIString = function(str, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof str !== 'string') + throw TypeError("Illegal str: Not a string"); + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + var start = offset, + k; + k = utfx.calculateUTF16asUTF8(stringSource(str), this.noAssert)[1]; + offset += 4+k; + var capacity13 = this.buffer.byteLength; + if (offset > capacity13) + this.resize((capacity13 *= 2) > offset ? capacity13 : offset); + offset -= 4+k; + if (this.littleEndian) { + this.view[offset+3] = (k >>> 24) & 0xFF; + this.view[offset+2] = (k >>> 16) & 0xFF; + this.view[offset+1] = (k >>> 8) & 0xFF; + this.view[offset ] = k & 0xFF; + } else { + this.view[offset ] = (k >>> 24) & 0xFF; + this.view[offset+1] = (k >>> 16) & 0xFF; + this.view[offset+2] = (k >>> 8) & 0xFF; + this.view[offset+3] = k & 0xFF; + } + offset += 4; + utfx.encodeUTF16toUTF8(stringSource(str), function(b) { + this.view[offset++] = b; + }.bind(this)); + if (offset !== start + 4 + k) + throw RangeError("Illegal range: Truncated data, "+offset+" == "+(offset+4+k)); + if (relative) { + this.offset = offset; + return this; + } + return offset - start; + }; + + /** + * Reads a length as uint32 prefixed UTF8 encoded string. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * read if omitted. + * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string + * read and the actual number of bytes read. + * @expose + * @see ByteBuffer#readVarint32 + */ + ByteBufferPrototype.readIString = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 4 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+4+") <= "+this.buffer.byteLength); + } + var start = offset; + var len = this.readUint32(offset); + var str = this.readUTF8String(len, ByteBuffer.METRICS_BYTES, offset += 4); + offset += str['length']; + if (relative) { + this.offset = offset; + return str['string']; + } else { + return { + 'string': str['string'], + 'length': offset - start + }; + } + }; + + // types/strings/utf8string + + /** + * Metrics representing number of UTF8 characters. Evaluates to `c`. + * @type {string} + * @const + * @expose + */ + ByteBuffer.METRICS_CHARS = 'c'; + + /** + * Metrics representing number of bytes. Evaluates to `b`. + * @type {string} + * @const + * @expose + */ + ByteBuffer.METRICS_BYTES = 'b'; + + /** + * Writes an UTF8 encoded string. + * @param {string} str String to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} if omitted. + * @returns {!ByteBuffer|number} this if offset is omitted, else the actual number of bytes written. + * @expose + */ + ByteBufferPrototype.writeUTF8String = function(str, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + var k; + var start = offset; + k = utfx.calculateUTF16asUTF8(stringSource(str))[1]; + offset += k; + var capacity14 = this.buffer.byteLength; + if (offset > capacity14) + this.resize((capacity14 *= 2) > offset ? capacity14 : offset); + offset -= k; + utfx.encodeUTF16toUTF8(stringSource(str), function(b) { + this.view[offset++] = b; + }.bind(this)); + if (relative) { + this.offset = offset; + return this; + } + return offset - start; + }; + + /** + * Writes an UTF8 encoded string. This is an alias of {@link ByteBuffer#writeUTF8String}. + * @function + * @param {string} str String to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} if omitted. + * @returns {!ByteBuffer|number} this if offset is omitted, else the actual number of bytes written. + * @expose + */ + ByteBufferPrototype.writeString = ByteBufferPrototype.writeUTF8String; + + /** + * Calculates the number of UTF8 characters of a string. JavaScript itself uses UTF-16, so that a string's + * `length` property does not reflect its actual UTF8 size if it contains code points larger than 0xFFFF. + * @param {string} str String to calculate + * @returns {number} Number of UTF8 characters + * @expose + */ + ByteBuffer.calculateUTF8Chars = function(str) { + return utfx.calculateUTF16asUTF8(stringSource(str))[0]; + }; + + /** + * Calculates the number of UTF8 bytes of a string. + * @param {string} str String to calculate + * @returns {number} Number of UTF8 bytes + * @expose + */ + ByteBuffer.calculateUTF8Bytes = function(str) { + return utfx.calculateUTF16asUTF8(stringSource(str))[1]; + }; + + /** + * Calculates the number of UTF8 bytes of a string. This is an alias of {@link ByteBuffer.calculateUTF8Bytes}. + * @function + * @param {string} str String to calculate + * @returns {number} Number of UTF8 bytes + * @expose + */ + ByteBuffer.calculateString = ByteBuffer.calculateUTF8Bytes; + + /** + * Reads an UTF8 encoded string. + * @param {number} length Number of characters or bytes to read. + * @param {string=} metrics Metrics specifying what `length` is meant to count. Defaults to + * {@link ByteBuffer.METRICS_CHARS}. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * read if omitted. + * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string + * read and the actual number of bytes read. + * @expose + */ + ByteBufferPrototype.readUTF8String = function(length, metrics, offset) { + if (typeof metrics === 'number') { + offset = metrics; + metrics = undefined; + } + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (typeof metrics === 'undefined') metrics = ByteBuffer.METRICS_CHARS; + if (!this.noAssert) { + if (typeof length !== 'number' || length % 1 !== 0) + throw TypeError("Illegal length: "+length+" (not an integer)"); + length |= 0; + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + var i = 0, + start = offset, + sd; + if (metrics === ByteBuffer.METRICS_CHARS) { // The same for node and the browser + sd = stringDestination(); + utfx.decodeUTF8(function() { + return i < length && offset < this.limit ? this.view[offset++] : null; + }.bind(this), function(cp) { + ++i; utfx.UTF8toUTF16(cp, sd); + }); + if (i !== length) + throw RangeError("Illegal range: Truncated data, "+i+" == "+length); + if (relative) { + this.offset = offset; + return sd(); + } else { + return { + "string": sd(), + "length": offset - start + }; + } + } else if (metrics === ByteBuffer.METRICS_BYTES) { + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + length > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+length+") <= "+this.buffer.byteLength); + } + var k = offset + length; + utfx.decodeUTF8toUTF16(function() { + return offset < k ? this.view[offset++] : null; + }.bind(this), sd = stringDestination(), this.noAssert); + if (offset !== k) + throw RangeError("Illegal range: Truncated data, "+offset+" == "+k); + if (relative) { + this.offset = offset; + return sd(); + } else { + return { + 'string': sd(), + 'length': offset - start + }; + } + } else + throw TypeError("Unsupported metrics: "+metrics); + }; + + /** + * Reads an UTF8 encoded string. This is an alias of {@link ByteBuffer#readUTF8String}. + * @function + * @param {number} length Number of characters or bytes to read + * @param {number=} metrics Metrics specifying what `n` is meant to count. Defaults to + * {@link ByteBuffer.METRICS_CHARS}. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * read if omitted. + * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string + * read and the actual number of bytes read. + * @expose + */ + ByteBufferPrototype.readString = ByteBufferPrototype.readUTF8String; + + // types/strings/vstring + + /** + * Writes a length as varint32 prefixed UTF8 encoded string. + * @param {string} str String to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. + * @returns {!ByteBuffer|number} `this` if `offset` is omitted, else the actual number of bytes written + * @expose + * @see ByteBuffer#writeVarint32 + */ + ByteBufferPrototype.writeVString = function(str, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof str !== 'string') + throw TypeError("Illegal str: Not a string"); + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + var start = offset, + k, l; + k = utfx.calculateUTF16asUTF8(stringSource(str), this.noAssert)[1]; + l = ByteBuffer.calculateVarint32(k); + offset += l+k; + var capacity15 = this.buffer.byteLength; + if (offset > capacity15) + this.resize((capacity15 *= 2) > offset ? capacity15 : offset); + offset -= l+k; + offset += this.writeVarint32(k, offset); + utfx.encodeUTF16toUTF8(stringSource(str), function(b) { + this.view[offset++] = b; + }.bind(this)); + if (offset !== start+k+l) + throw RangeError("Illegal range: Truncated data, "+offset+" == "+(offset+k+l)); + if (relative) { + this.offset = offset; + return this; + } + return offset - start; + }; + + /** + * Reads a length as varint32 prefixed UTF8 encoded string. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * read if omitted. + * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string + * read and the actual number of bytes read. + * @expose + * @see ByteBuffer#readVarint32 + */ + ByteBufferPrototype.readVString = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 1 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+1+") <= "+this.buffer.byteLength); + } + var start = offset; + var len = this.readVarint32(offset); + var str = this.readUTF8String(len['value'], ByteBuffer.METRICS_BYTES, offset += len['length']); + offset += str['length']; + if (relative) { + this.offset = offset; + return str['string']; + } else { + return { + 'string': str['string'], + 'length': offset - start + }; + } + }; + + + /** + * Appends some data to this ByteBuffer. This will overwrite any contents behind the specified offset up to the appended + * data's length. + * @param {!ByteBuffer|!ArrayBuffer|!Uint8Array|string} source Data to append. If `source` is a ByteBuffer, its offsets + * will be modified according to the performed read operation. + * @param {(string|number)=} encoding Encoding if `data` is a string ("base64", "hex", "binary", defaults to "utf8") + * @param {number=} offset Offset to append at. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. + * @returns {!ByteBuffer} this + * @expose + * @example A relative `<01 02>03.append(<04 05>)` will result in `<01 02 04 05>, 04 05|` + * @example An absolute `<01 02>03.append(04 05>, 1)` will result in `<01 04>05, 04 05|` + */ + ByteBufferPrototype.append = function(source, encoding, offset) { + if (typeof encoding === 'number' || typeof encoding !== 'string') { + offset = encoding; + encoding = undefined; + } + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + if (!(source instanceof ByteBuffer)) + source = ByteBuffer.wrap(source, encoding); + var length = source.limit - source.offset; + if (length <= 0) return this; // Nothing to append + offset += length; + var capacity16 = this.buffer.byteLength; + if (offset > capacity16) + this.resize((capacity16 *= 2) > offset ? capacity16 : offset); + offset -= length; + this.view.set(source.view.subarray(source.offset, source.limit), offset); + source.offset += length; + if (relative) this.offset += length; + return this; + }; + + /** + * Appends this ByteBuffer's contents to another ByteBuffer. This will overwrite any contents at and after the + specified offset up to the length of this ByteBuffer's data. + * @param {!ByteBuffer} target Target ByteBuffer + * @param {number=} offset Offset to append to. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * read if omitted. + * @returns {!ByteBuffer} this + * @expose + * @see ByteBuffer#append + */ + ByteBufferPrototype.appendTo = function(target, offset) { + target.append(this, offset); + return this; + }; + + /** + * Enables or disables assertions of argument types and offsets. Assertions are enabled by default but you can opt to + * disable them if your code already makes sure that everything is valid. + * @param {boolean} assert `true` to enable assertions, otherwise `false` + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.assert = function(assert) { + this.noAssert = !assert; + return this; + }; + + /** + * Gets the capacity of this ByteBuffer's backing buffer. + * @returns {number} Capacity of the backing buffer + * @expose + */ + ByteBufferPrototype.capacity = function() { + return this.buffer.byteLength; + }; + /** + * Clears this ByteBuffer's offsets by setting {@link ByteBuffer#offset} to `0` and {@link ByteBuffer#limit} to the + * backing buffer's capacity. Discards {@link ByteBuffer#markedOffset}. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.clear = function() { + this.offset = 0; + this.limit = this.buffer.byteLength; + this.markedOffset = -1; + return this; + }; + + /** + * Creates a cloned instance of this ByteBuffer, preset with this ByteBuffer's values for {@link ByteBuffer#offset}, + * {@link ByteBuffer#markedOffset} and {@link ByteBuffer#limit}. + * @param {boolean=} copy Whether to copy the backing buffer or to return another view on the same, defaults to `false` + * @returns {!ByteBuffer} Cloned instance + * @expose + */ + ByteBufferPrototype.clone = function(copy) { + var bb = new ByteBuffer(0, this.littleEndian, this.noAssert); + if (copy) { + bb.buffer = new ArrayBuffer(this.buffer.byteLength); + bb.view = new Uint8Array(bb.buffer); + } else { + bb.buffer = this.buffer; + bb.view = this.view; + } + bb.offset = this.offset; + bb.markedOffset = this.markedOffset; + bb.limit = this.limit; + return bb; + }; + + /** + * Compacts this ByteBuffer to be backed by a {@link ByteBuffer#buffer} of its contents' length. Contents are the bytes + * between {@link ByteBuffer#offset} and {@link ByteBuffer#limit}. Will set `offset = 0` and `limit = capacity` and + * adapt {@link ByteBuffer#markedOffset} to the same relative position if set. + * @param {number=} begin Offset to start at, defaults to {@link ByteBuffer#offset} + * @param {number=} end Offset to end at, defaults to {@link ByteBuffer#limit} + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.compact = function(begin, end) { + if (typeof begin === 'undefined') begin = this.offset; + if (typeof end === 'undefined') end = this.limit; + if (!this.noAssert) { + if (typeof begin !== 'number' || begin % 1 !== 0) + throw TypeError("Illegal begin: Not an integer"); + begin >>>= 0; + if (typeof end !== 'number' || end % 1 !== 0) + throw TypeError("Illegal end: Not an integer"); + end >>>= 0; + if (begin < 0 || begin > end || end > this.buffer.byteLength) + throw RangeError("Illegal range: 0 <= "+begin+" <= "+end+" <= "+this.buffer.byteLength); + } + if (begin === 0 && end === this.buffer.byteLength) + return this; // Already compacted + var len = end - begin; + if (len === 0) { + this.buffer = EMPTY_BUFFER; + this.view = null; + if (this.markedOffset >= 0) this.markedOffset -= begin; + this.offset = 0; + this.limit = 0; + return this; + } + var buffer = new ArrayBuffer(len); + var view = new Uint8Array(buffer); + view.set(this.view.subarray(begin, end)); + this.buffer = buffer; + this.view = view; + if (this.markedOffset >= 0) this.markedOffset -= begin; + this.offset = 0; + this.limit = len; + return this; + }; + + /** + * Creates a copy of this ByteBuffer's contents. Contents are the bytes between {@link ByteBuffer#offset} and + * {@link ByteBuffer#limit}. + * @param {number=} begin Begin offset, defaults to {@link ByteBuffer#offset}. + * @param {number=} end End offset, defaults to {@link ByteBuffer#limit}. + * @returns {!ByteBuffer} Copy + * @expose + */ + ByteBufferPrototype.copy = function(begin, end) { + if (typeof begin === 'undefined') begin = this.offset; + if (typeof end === 'undefined') end = this.limit; + if (!this.noAssert) { + if (typeof begin !== 'number' || begin % 1 !== 0) + throw TypeError("Illegal begin: Not an integer"); + begin >>>= 0; + if (typeof end !== 'number' || end % 1 !== 0) + throw TypeError("Illegal end: Not an integer"); + end >>>= 0; + if (begin < 0 || begin > end || end > this.buffer.byteLength) + throw RangeError("Illegal range: 0 <= "+begin+" <= "+end+" <= "+this.buffer.byteLength); + } + if (begin === end) + return new ByteBuffer(0, this.littleEndian, this.noAssert); + var capacity = end - begin, + bb = new ByteBuffer(capacity, this.littleEndian, this.noAssert); + bb.offset = 0; + bb.limit = capacity; + if (bb.markedOffset >= 0) bb.markedOffset -= begin; + this.copyTo(bb, 0, begin, end); + return bb; + }; + + /** + * Copies this ByteBuffer's contents to another ByteBuffer. Contents are the bytes between {@link ByteBuffer#offset} and + * {@link ByteBuffer#limit}. + * @param {!ByteBuffer} target Target ByteBuffer + * @param {number=} targetOffset Offset to copy to. Will use and increase the target's {@link ByteBuffer#offset} + * by the number of bytes copied if omitted. + * @param {number=} sourceOffset Offset to start copying from. Will use and increase {@link ByteBuffer#offset} by the + * number of bytes copied if omitted. + * @param {number=} sourceLimit Offset to end copying from, defaults to {@link ByteBuffer#limit} + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.copyTo = function(target, targetOffset, sourceOffset, sourceLimit) { + var relative, + targetRelative; + if (!this.noAssert) { + if (!ByteBuffer.isByteBuffer(target)) + throw TypeError("Illegal target: Not a ByteBuffer"); + } + targetOffset = (targetRelative = typeof targetOffset === 'undefined') ? target.offset : targetOffset | 0; + sourceOffset = (relative = typeof sourceOffset === 'undefined') ? this.offset : sourceOffset | 0; + sourceLimit = typeof sourceLimit === 'undefined' ? this.limit : sourceLimit | 0; + + if (targetOffset < 0 || targetOffset > target.buffer.byteLength) + throw RangeError("Illegal target range: 0 <= "+targetOffset+" <= "+target.buffer.byteLength); + if (sourceOffset < 0 || sourceLimit > this.buffer.byteLength) + throw RangeError("Illegal source range: 0 <= "+sourceOffset+" <= "+this.buffer.byteLength); + + var len = sourceLimit - sourceOffset; + if (len === 0) + return target; // Nothing to copy + + target.ensureCapacity(targetOffset + len); + + target.view.set(this.view.subarray(sourceOffset, sourceLimit), targetOffset); + + if (relative) this.offset += len; + if (targetRelative) target.offset += len; + + return this; + }; + + /** + * Makes sure that this ByteBuffer is backed by a {@link ByteBuffer#buffer} of at least the specified capacity. If the + * current capacity is exceeded, it will be doubled. If double the current capacity is less than the required capacity, + * the required capacity will be used instead. + * @param {number} capacity Required capacity + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.ensureCapacity = function(capacity) { + var current = this.buffer.byteLength; + if (current < capacity) + return this.resize((current *= 2) > capacity ? current : capacity); + return this; + }; + + /** + * Overwrites this ByteBuffer's contents with the specified value. Contents are the bytes between + * {@link ByteBuffer#offset} and {@link ByteBuffer#limit}. + * @param {number|string} value Byte value to fill with. If given as a string, the first character is used. + * @param {number=} begin Begin offset. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. defaults to {@link ByteBuffer#offset}. + * @param {number=} end End offset, defaults to {@link ByteBuffer#limit}. + * @returns {!ByteBuffer} this + * @expose + * @example `someByteBuffer.clear().fill(0)` fills the entire backing buffer with zeroes + */ + ByteBufferPrototype.fill = function(value, begin, end) { + var relative = typeof begin === 'undefined'; + if (relative) begin = this.offset; + if (typeof value === 'string' && value.length > 0) + value = value.charCodeAt(0); + if (typeof begin === 'undefined') begin = this.offset; + if (typeof end === 'undefined') end = this.limit; + if (!this.noAssert) { + if (typeof value !== 'number' || value % 1 !== 0) + throw TypeError("Illegal value: "+value+" (not an integer)"); + value |= 0; + if (typeof begin !== 'number' || begin % 1 !== 0) + throw TypeError("Illegal begin: Not an integer"); + begin >>>= 0; + if (typeof end !== 'number' || end % 1 !== 0) + throw TypeError("Illegal end: Not an integer"); + end >>>= 0; + if (begin < 0 || begin > end || end > this.buffer.byteLength) + throw RangeError("Illegal range: 0 <= "+begin+" <= "+end+" <= "+this.buffer.byteLength); + } + if (begin >= end) + return this; // Nothing to fill + while (begin < end) this.view[begin++] = value; + if (relative) this.offset = begin; + return this; + }; + + /** + * Makes this ByteBuffer ready for a new sequence of write or relative read operations. Sets `limit = offset` and + * `offset = 0`. Make sure always to flip a ByteBuffer when all relative read or write operations are complete. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.flip = function() { + this.limit = this.offset; + this.offset = 0; + return this; + }; + /** + * Marks an offset on this ByteBuffer to be used later. + * @param {number=} offset Offset to mark. Defaults to {@link ByteBuffer#offset}. + * @returns {!ByteBuffer} this + * @throws {TypeError} If `offset` is not a valid number + * @throws {RangeError} If `offset` is out of bounds + * @see ByteBuffer#reset + * @expose + */ + ByteBufferPrototype.mark = function(offset) { + offset = typeof offset === 'undefined' ? this.offset : offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + this.markedOffset = offset; + return this; + }; + /** + * Sets the byte order. + * @param {boolean} littleEndian `true` for little endian byte order, `false` for big endian + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.order = function(littleEndian) { + if (!this.noAssert) { + if (typeof littleEndian !== 'boolean') + throw TypeError("Illegal littleEndian: Not a boolean"); + } + this.littleEndian = !!littleEndian; + return this; + }; + + /** + * Switches (to) little endian byte order. + * @param {boolean=} littleEndian Defaults to `true`, otherwise uses big endian + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.LE = function(littleEndian) { + this.littleEndian = typeof littleEndian !== 'undefined' ? !!littleEndian : true; + return this; + }; + + /** + * Switches (to) big endian byte order. + * @param {boolean=} bigEndian Defaults to `true`, otherwise uses little endian + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.BE = function(bigEndian) { + this.littleEndian = typeof bigEndian !== 'undefined' ? !bigEndian : false; + return this; + }; + /** + * Prepends some data to this ByteBuffer. This will overwrite any contents before the specified offset up to the + * prepended data's length. If there is not enough space available before the specified `offset`, the backing buffer + * will be resized and its contents moved accordingly. + * @param {!ByteBuffer|string|!ArrayBuffer} source Data to prepend. If `source` is a ByteBuffer, its offset will be + * modified according to the performed read operation. + * @param {(string|number)=} encoding Encoding if `data` is a string ("base64", "hex", "binary", defaults to "utf8") + * @param {number=} offset Offset to prepend at. Will use and decrease {@link ByteBuffer#offset} by the number of bytes + * prepended if omitted. + * @returns {!ByteBuffer} this + * @expose + * @example A relative `00<01 02 03>.prepend(<04 05>)` results in `<04 05 01 02 03>, 04 05|` + * @example An absolute `00<01 02 03>.prepend(<04 05>, 2)` results in `04<05 02 03>, 04 05|` + */ + ByteBufferPrototype.prepend = function(source, encoding, offset) { + if (typeof encoding === 'number' || typeof encoding !== 'string') { + offset = encoding; + encoding = undefined; + } + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + if (!(source instanceof ByteBuffer)) + source = ByteBuffer.wrap(source, encoding); + var len = source.limit - source.offset; + if (len <= 0) return this; // Nothing to prepend + var diff = len - offset; + if (diff > 0) { // Not enough space before offset, so resize + move + var buffer = new ArrayBuffer(this.buffer.byteLength + diff); + var view = new Uint8Array(buffer); + view.set(this.view.subarray(offset, this.buffer.byteLength), len); + this.buffer = buffer; + this.view = view; + this.offset += diff; + if (this.markedOffset >= 0) this.markedOffset += diff; + this.limit += diff; + offset += diff; + } else { + var arrayView = new Uint8Array(this.buffer); + } + this.view.set(source.view.subarray(source.offset, source.limit), offset - len); + + source.offset = source.limit; + if (relative) + this.offset -= len; + return this; + }; + + /** + * Prepends this ByteBuffer to another ByteBuffer. This will overwrite any contents before the specified offset up to the + * prepended data's length. If there is not enough space available before the specified `offset`, the backing buffer + * will be resized and its contents moved accordingly. + * @param {!ByteBuffer} target Target ByteBuffer + * @param {number=} offset Offset to prepend at. Will use and decrease {@link ByteBuffer#offset} by the number of bytes + * prepended if omitted. + * @returns {!ByteBuffer} this + * @expose + * @see ByteBuffer#prepend + */ + ByteBufferPrototype.prependTo = function(target, offset) { + target.prepend(this, offset); + return this; + }; + /** + * Prints debug information about this ByteBuffer's contents. + * @param {function(string)=} out Output function to call, defaults to console.log + * @expose + */ + ByteBufferPrototype.printDebug = function(out) { + if (typeof out !== 'function') out = console.log.bind(console); + out( + this.toString()+"\n"+ + "-------------------------------------------------------------------\n"+ + this.toDebug(/* columns */ true) + ); + }; + + /** + * Gets the number of remaining readable bytes. Contents are the bytes between {@link ByteBuffer#offset} and + * {@link ByteBuffer#limit}, so this returns `limit - offset`. + * @returns {number} Remaining readable bytes. May be negative if `offset > limit`. + * @expose + */ + ByteBufferPrototype.remaining = function() { + return this.limit - this.offset; + }; + /** + * Resets this ByteBuffer's {@link ByteBuffer#offset}. If an offset has been marked through {@link ByteBuffer#mark} + * before, `offset` will be set to {@link ByteBuffer#markedOffset}, which will then be discarded. If no offset has been + * marked, sets `offset = 0`. + * @returns {!ByteBuffer} this + * @see ByteBuffer#mark + * @expose + */ + ByteBufferPrototype.reset = function() { + if (this.markedOffset >= 0) { + this.offset = this.markedOffset; + this.markedOffset = -1; + } else { + this.offset = 0; + } + return this; + }; + /** + * Resizes this ByteBuffer to be backed by a buffer of at least the given capacity. Will do nothing if already that + * large or larger. + * @param {number} capacity Capacity required + * @returns {!ByteBuffer} this + * @throws {TypeError} If `capacity` is not a number + * @throws {RangeError} If `capacity < 0` + * @expose + */ + ByteBufferPrototype.resize = function(capacity) { + if (!this.noAssert) { + if (typeof capacity !== 'number' || capacity % 1 !== 0) + throw TypeError("Illegal capacity: "+capacity+" (not an integer)"); + capacity |= 0; + if (capacity < 0) + throw RangeError("Illegal capacity: 0 <= "+capacity); + } + if (this.buffer.byteLength < capacity) { + var buffer = new ArrayBuffer(capacity); + var view = new Uint8Array(buffer); + view.set(this.view); + this.buffer = buffer; + this.view = view; + } + return this; + }; + /** + * Reverses this ByteBuffer's contents. + * @param {number=} begin Offset to start at, defaults to {@link ByteBuffer#offset} + * @param {number=} end Offset to end at, defaults to {@link ByteBuffer#limit} + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.reverse = function(begin, end) { + if (typeof begin === 'undefined') begin = this.offset; + if (typeof end === 'undefined') end = this.limit; + if (!this.noAssert) { + if (typeof begin !== 'number' || begin % 1 !== 0) + throw TypeError("Illegal begin: Not an integer"); + begin >>>= 0; + if (typeof end !== 'number' || end % 1 !== 0) + throw TypeError("Illegal end: Not an integer"); + end >>>= 0; + if (begin < 0 || begin > end || end > this.buffer.byteLength) + throw RangeError("Illegal range: 0 <= "+begin+" <= "+end+" <= "+this.buffer.byteLength); + } + if (begin === end) + return this; // Nothing to reverse + Array.prototype.reverse.call(this.view.subarray(begin, end)); + return this; + }; + /** + * Skips the next `length` bytes. This will just advance + * @param {number} length Number of bytes to skip. May also be negative to move the offset back. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.skip = function(length) { + if (!this.noAssert) { + if (typeof length !== 'number' || length % 1 !== 0) + throw TypeError("Illegal length: "+length+" (not an integer)"); + length |= 0; + } + var offset = this.offset + length; + if (!this.noAssert) { + if (offset < 0 || offset > this.buffer.byteLength) + throw RangeError("Illegal length: 0 <= "+this.offset+" + "+length+" <= "+this.buffer.byteLength); + } + this.offset = offset; + return this; + }; + + /** + * Slices this ByteBuffer by creating a cloned instance with `offset = begin` and `limit = end`. + * @param {number=} begin Begin offset, defaults to {@link ByteBuffer#offset}. + * @param {number=} end End offset, defaults to {@link ByteBuffer#limit}. + * @returns {!ByteBuffer} Clone of this ByteBuffer with slicing applied, backed by the same {@link ByteBuffer#buffer} + * @expose + */ + ByteBufferPrototype.slice = function(begin, end) { + if (typeof begin === 'undefined') begin = this.offset; + if (typeof end === 'undefined') end = this.limit; + if (!this.noAssert) { + if (typeof begin !== 'number' || begin % 1 !== 0) + throw TypeError("Illegal begin: Not an integer"); + begin >>>= 0; + if (typeof end !== 'number' || end % 1 !== 0) + throw TypeError("Illegal end: Not an integer"); + end >>>= 0; + if (begin < 0 || begin > end || end > this.buffer.byteLength) + throw RangeError("Illegal range: 0 <= "+begin+" <= "+end+" <= "+this.buffer.byteLength); + } + var bb = this.clone(); + bb.offset = begin; + bb.limit = end; + return bb; + }; + /** + * Returns a copy of the backing buffer that contains this ByteBuffer's contents. Contents are the bytes between + * {@link ByteBuffer#offset} and {@link ByteBuffer#limit}. + * @param {boolean=} forceCopy If `true` returns a copy, otherwise returns a view referencing the same memory if + * possible. Defaults to `false` + * @returns {!ArrayBuffer} Contents as an ArrayBuffer + * @expose + */ + ByteBufferPrototype.toBuffer = function(forceCopy) { + var offset = this.offset, + limit = this.limit; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: Not an integer"); + offset >>>= 0; + if (typeof limit !== 'number' || limit % 1 !== 0) + throw TypeError("Illegal limit: Not an integer"); + limit >>>= 0; + if (offset < 0 || offset > limit || limit > this.buffer.byteLength) + throw RangeError("Illegal range: 0 <= "+offset+" <= "+limit+" <= "+this.buffer.byteLength); + } + // NOTE: It's not possible to have another ArrayBuffer reference the same memory as the backing buffer. This is + // possible with Uint8Array#subarray only, but we have to return an ArrayBuffer by contract. So: + if (!forceCopy && offset === 0 && limit === this.buffer.byteLength) + return this.buffer; + if (offset === limit) + return EMPTY_BUFFER; + var buffer = new ArrayBuffer(limit - offset); + new Uint8Array(buffer).set(new Uint8Array(this.buffer).subarray(offset, limit), 0); + return buffer; + }; + + /** + * Returns a raw buffer compacted to contain this ByteBuffer's contents. Contents are the bytes between + * {@link ByteBuffer#offset} and {@link ByteBuffer#limit}. This is an alias of {@link ByteBuffer#toBuffer}. + * @function + * @param {boolean=} forceCopy If `true` returns a copy, otherwise returns a view referencing the same memory. + * Defaults to `false` + * @returns {!ArrayBuffer} Contents as an ArrayBuffer + * @expose + */ + ByteBufferPrototype.toArrayBuffer = ByteBufferPrototype.toBuffer; + + /** + * Converts the ByteBuffer's contents to a string. + * @param {string=} encoding Output encoding. Returns an informative string representation if omitted but also allows + * direct conversion to "utf8", "hex", "base64" and "binary" encoding. "debug" returns a hex representation with + * highlighted offsets. + * @param {number=} begin Offset to begin at, defaults to {@link ByteBuffer#offset} + * @param {number=} end Offset to end at, defaults to {@link ByteBuffer#limit} + * @returns {string} String representation + * @throws {Error} If `encoding` is invalid + * @expose + */ + ByteBufferPrototype.toString = function(encoding, begin, end) { + if (typeof encoding === 'undefined') + return "ByteBufferAB(offset="+this.offset+",markedOffset="+this.markedOffset+",limit="+this.limit+",capacity="+this.capacity()+")"; + if (typeof encoding === 'number') + encoding = "utf8", + begin = encoding, + end = begin; + switch (encoding) { + case "utf8": + return this.toUTF8(begin, end); + case "base64": + return this.toBase64(begin, end); + case "hex": + return this.toHex(begin, end); + case "binary": + return this.toBinary(begin, end); + case "debug": + return this.toDebug(); + case "columns": + return this.toColumns(); + default: + throw Error("Unsupported encoding: "+encoding); + } + }; + + // lxiv-embeddable + + /** + * lxiv-embeddable (c) 2014 Daniel Wirtz + * Released under the Apache License, Version 2.0 + * see: https://github.com/dcodeIO/lxiv for details + */ + var lxiv = function() { + "use strict"; + + /** + * lxiv namespace. + * @type {!Object.} + * @exports lxiv + */ + var lxiv = {}; + + /** + * Character codes for output. + * @type {!Array.} + * @inner + */ + var aout = [ + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, + 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 97, 98, 99, 100, 101, 102, + 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, + 119, 120, 121, 122, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 43, 47 + ]; + + /** + * Character codes for input. + * @type {!Array.} + * @inner + */ + var ain = []; + for (var i=0, k=aout.length; i>2)&0x3f]); + t = (b&0x3)<<4; + if ((b = src()) !== null) { + t |= (b>>4)&0xf; + dst(aout[(t|((b>>4)&0xf))&0x3f]); + t = (b&0xf)<<2; + if ((b = src()) !== null) + dst(aout[(t|((b>>6)&0x3))&0x3f]), + dst(aout[b&0x3f]); + else + dst(aout[t&0x3f]), + dst(61); + } else + dst(aout[t&0x3f]), + dst(61), + dst(61); + } + }; + + /** + * Decodes base64 char codes to bytes. + * @param {!function():number|null} src Characters source as a function returning the next char code respectively + * `null` if there are no more characters left. + * @param {!function(number)} dst Bytes destination as a function successively called with the next byte. + * @throws {Error} If a character code is invalid + */ + lxiv.decode = function(src, dst) { + var c, t1, t2; + function fail(c) { + throw Error("Illegal character code: "+c); + } + while ((c = src()) !== null) { + t1 = ain[c]; + if (typeof t1 === 'undefined') fail(c); + if ((c = src()) !== null) { + t2 = ain[c]; + if (typeof t2 === 'undefined') fail(c); + dst((t1<<2)>>>0|(t2&0x30)>>4); + if ((c = src()) !== null) { + t1 = ain[c]; + if (typeof t1 === 'undefined') + if (c === 61) break; else fail(c); + dst(((t2&0xf)<<4)>>>0|(t1&0x3c)>>2); + if ((c = src()) !== null) { + t2 = ain[c]; + if (typeof t2 === 'undefined') + if (c === 61) break; else fail(c); + dst(((t1&0x3)<<6)>>>0|t2); + } + } + } + } + }; + + /** + * Tests if a string is valid base64. + * @param {string} str String to test + * @returns {boolean} `true` if valid, otherwise `false` + */ + lxiv.test = function(str) { + return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(str); + }; + + return lxiv; + }(); + + // encodings/base64 + + /** + * Encodes this ByteBuffer's contents to a base64 encoded string. + * @param {number=} begin Offset to begin at, defaults to {@link ByteBuffer#offset}. + * @param {number=} end Offset to end at, defaults to {@link ByteBuffer#limit}. + * @returns {string} Base64 encoded string + * @throws {RangeError} If `begin` or `end` is out of bounds + * @expose + */ + ByteBufferPrototype.toBase64 = function(begin, end) { + if (typeof begin === 'undefined') + begin = this.offset; + if (typeof end === 'undefined') + end = this.limit; + begin = begin | 0; end = end | 0; + if (begin < 0 || end > this.capacity || begin > end) + throw RangeError("begin, end"); + var sd; lxiv.encode(function() { + return begin < end ? this.view[begin++] : null; + }.bind(this), sd = stringDestination()); + return sd(); + }; + + /** + * Decodes a base64 encoded string to a ByteBuffer. + * @param {string} str String to decode + * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to + * {@link ByteBuffer.DEFAULT_ENDIAN}. + * @returns {!ByteBuffer} ByteBuffer + * @expose + */ + ByteBuffer.fromBase64 = function(str, littleEndian) { + if (typeof str !== 'string') + throw TypeError("str"); + var bb = new ByteBuffer(str.length/4*3, littleEndian), + i = 0; + lxiv.decode(stringSource(str), function(b) { + bb.view[i++] = b; + }); + bb.limit = i; + return bb; + }; + + /** + * Encodes a binary string to base64 like `window.btoa` does. + * @param {string} str Binary string + * @returns {string} Base64 encoded string + * @see https://developer.mozilla.org/en-US/docs/Web/API/Window.btoa + * @expose + */ + ByteBuffer.btoa = function(str) { + return ByteBuffer.fromBinary(str).toBase64(); + }; + + /** + * Decodes a base64 encoded string to binary like `window.atob` does. + * @param {string} b64 Base64 encoded string + * @returns {string} Binary string + * @see https://developer.mozilla.org/en-US/docs/Web/API/Window.atob + * @expose + */ + ByteBuffer.atob = function(b64) { + return ByteBuffer.fromBase64(b64).toBinary(); + }; + + // encodings/binary + + /** + * Encodes this ByteBuffer to a binary encoded string, that is using only characters 0x00-0xFF as bytes. + * @param {number=} begin Offset to begin at. Defaults to {@link ByteBuffer#offset}. + * @param {number=} end Offset to end at. Defaults to {@link ByteBuffer#limit}. + * @returns {string} Binary encoded string + * @throws {RangeError} If `offset > limit` + * @expose + */ + ByteBufferPrototype.toBinary = function(begin, end) { + if (typeof begin === 'undefined') + begin = this.offset; + if (typeof end === 'undefined') + end = this.limit; + begin |= 0; end |= 0; + if (begin < 0 || end > this.capacity() || begin > end) + throw RangeError("begin, end"); + if (begin === end) + return ""; + var chars = [], + parts = []; + while (begin < end) { + chars.push(this.view[begin++]); + if (chars.length >= 1024) + parts.push(String.fromCharCode.apply(String, chars)), + chars = []; + } + return parts.join('') + String.fromCharCode.apply(String, chars); + }; + + /** + * Decodes a binary encoded string, that is using only characters 0x00-0xFF as bytes, to a ByteBuffer. + * @param {string} str String to decode + * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to + * {@link ByteBuffer.DEFAULT_ENDIAN}. + * @returns {!ByteBuffer} ByteBuffer + * @expose + */ + ByteBuffer.fromBinary = function(str, littleEndian) { + if (typeof str !== 'string') + throw TypeError("str"); + var i = 0, + k = str.length, + charCode, + bb = new ByteBuffer(k, littleEndian); + while (i 0xff) + throw RangeError("illegal char code: "+charCode); + bb.view[i++] = charCode; + } + bb.limit = k; + return bb; + }; + + // encodings/debug + + /** + * Encodes this ByteBuffer to a hex encoded string with marked offsets. Offset symbols are: + * * `<` : offset, + * * `'` : markedOffset, + * * `>` : limit, + * * `|` : offset and limit, + * * `[` : offset and markedOffset, + * * `]` : markedOffset and limit, + * * `!` : offset, markedOffset and limit + * @param {boolean=} columns If `true` returns two columns hex + ascii, defaults to `false` + * @returns {string|!Array.} Debug string or array of lines if `asArray = true` + * @expose + * @example `>00'01 02<03` contains four bytes with `limit=0, markedOffset=1, offset=3` + * @example `00[01 02 03>` contains four bytes with `offset=markedOffset=1, limit=4` + * @example `00|01 02 03` contains four bytes with `offset=limit=1, markedOffset=-1` + * @example `|` contains zero bytes with `offset=limit=0, markedOffset=-1` + */ + ByteBufferPrototype.toDebug = function(columns) { + var i = -1, + k = this.buffer.byteLength, + b, + hex = "", + asc = "", + out = ""; + while (i 32 && b < 127 ? String.fromCharCode(b) : '.'; + } + ++i; + if (columns) { + if (i > 0 && i % 16 === 0 && i !== k) { + while (hex.length < 3*16+3) hex += " "; + out += hex+asc+"\n"; + hex = asc = ""; + } + } + if (i === this.offset && i === this.limit) + hex += i === this.markedOffset ? "!" : "|"; + else if (i === this.offset) + hex += i === this.markedOffset ? "[" : "<"; + else if (i === this.limit) + hex += i === this.markedOffset ? "]" : ">"; + else + hex += i === this.markedOffset ? "'" : (columns || (i !== 0 && i !== k) ? " " : ""); + } + if (columns && hex !== " ") { + while (hex.length < 3*16+3) + hex += " "; + out += hex + asc + "\n"; + } + return columns ? out : hex; + }; + + /** + * Decodes a hex encoded string with marked offsets to a ByteBuffer. + * @param {string} str Debug string to decode (not be generated with `columns = true`) + * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to + * {@link ByteBuffer.DEFAULT_ENDIAN}. + * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to + * {@link ByteBuffer.DEFAULT_NOASSERT}. + * @returns {!ByteBuffer} ByteBuffer + * @expose + * @see ByteBuffer#toDebug + */ + ByteBuffer.fromDebug = function(str, littleEndian, noAssert) { + var k = str.length, + bb = new ByteBuffer(((k+1)/3)|0, littleEndian, noAssert); + var i = 0, j = 0, ch, b, + rs = false, // Require symbol next + ho = false, hm = false, hl = false, // Already has offset (ho), markedOffset (hm), limit (hl)? + fail = false; + while (i': + if (!noAssert) { + if (hl) { + fail = true; + break; + } + hl = true; + } + bb.limit = j; + rs = false; + break; + case "'": + if (!noAssert) { + if (hm) { + fail = true; + break; + } + hm = true; + } + bb.markedOffset = j; + rs = false; + break; + case ' ': + rs = false; + break; + default: + if (!noAssert) { + if (rs) { + fail = true; + break; + } + } + b = parseInt(ch+str.charAt(i++), 16); + if (!noAssert) { + if (isNaN(b) || b < 0 || b > 255) + throw TypeError("Illegal str: Not a debug encoded string"); + } + bb.view[j++] = b; + rs = true; + } + if (fail) + throw TypeError("Illegal str: Invalid symbol at "+i); + } + if (!noAssert) { + if (!ho || !hl) + throw TypeError("Illegal str: Missing offset or limit"); + if (j>>= 0; + if (typeof end !== 'number' || end % 1 !== 0) + throw TypeError("Illegal end: Not an integer"); + end >>>= 0; + if (begin < 0 || begin > end || end > this.buffer.byteLength) + throw RangeError("Illegal range: 0 <= "+begin+" <= "+end+" <= "+this.buffer.byteLength); + } + var out = new Array(end - begin), + b; + while (begin < end) { + b = this.view[begin++]; + if (b < 0x10) + out.push("0", b.toString(16)); + else out.push(b.toString(16)); + } + return out.join(''); + }; + + /** + * Decodes a hex encoded string to a ByteBuffer. + * @param {string} str String to decode + * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to + * {@link ByteBuffer.DEFAULT_ENDIAN}. + * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to + * {@link ByteBuffer.DEFAULT_NOASSERT}. + * @returns {!ByteBuffer} ByteBuffer + * @expose + */ + ByteBuffer.fromHex = function(str, littleEndian, noAssert) { + if (!noAssert) { + if (typeof str !== 'string') + throw TypeError("Illegal str: Not a string"); + if (str.length % 2 !== 0) + throw TypeError("Illegal str: Length not a multiple of 2"); + } + var k = str.length, + bb = new ByteBuffer((k / 2) | 0, littleEndian), + b; + for (var i=0, j=0; i 255) + throw TypeError("Illegal str: Contains non-hex characters"); + bb.view[j++] = b; + } + bb.limit = j; + return bb; + }; + + // utfx-embeddable + + /** + * utfx-embeddable (c) 2014 Daniel Wirtz + * Released under the Apache License, Version 2.0 + * see: https://github.com/dcodeIO/utfx for details + */ + var utfx = function() { + "use strict"; + + /** + * utfx namespace. + * @inner + * @type {!Object.} + */ + var utfx = {}; + + /** + * Maximum valid code point. + * @type {number} + * @const + */ + utfx.MAX_CODEPOINT = 0x10FFFF; + + /** + * Encodes UTF8 code points to UTF8 bytes. + * @param {(!function():number|null) | number} src Code points source, either as a function returning the next code point + * respectively `null` if there are no more code points left or a single numeric code point. + * @param {!function(number)} dst Bytes destination as a function successively called with the next byte + */ + utfx.encodeUTF8 = function(src, dst) { + var cp = null; + if (typeof src === 'number') + cp = src, + src = function() { return null; }; + while (cp !== null || (cp = src()) !== null) { + if (cp < 0x80) + dst(cp&0x7F); + else if (cp < 0x800) + dst(((cp>>6)&0x1F)|0xC0), + dst((cp&0x3F)|0x80); + else if (cp < 0x10000) + dst(((cp>>12)&0x0F)|0xE0), + dst(((cp>>6)&0x3F)|0x80), + dst((cp&0x3F)|0x80); + else + dst(((cp>>18)&0x07)|0xF0), + dst(((cp>>12)&0x3F)|0x80), + dst(((cp>>6)&0x3F)|0x80), + dst((cp&0x3F)|0x80); + cp = null; + } + }; + + /** + * Decodes UTF8 bytes to UTF8 code points. + * @param {!function():number|null} src Bytes source as a function returning the next byte respectively `null` if there + * are no more bytes left. + * @param {!function(number)} dst Code points destination as a function successively called with each decoded code point. + * @throws {RangeError} If a starting byte is invalid in UTF8 + * @throws {Error} If the last sequence is truncated. Has an array property `bytes` holding the + * remaining bytes. + */ + utfx.decodeUTF8 = function(src, dst) { + var a, b, c, d, fail = function(b) { + b = b.slice(0, b.indexOf(null)); + var err = Error(b.toString()); + err.name = "TruncatedError"; + err['bytes'] = b; + throw err; + }; + while ((a = src()) !== null) { + if ((a&0x80) === 0) + dst(a); + else if ((a&0xE0) === 0xC0) + ((b = src()) === null) && fail([a, b]), + dst(((a&0x1F)<<6) | (b&0x3F)); + else if ((a&0xF0) === 0xE0) + ((b=src()) === null || (c=src()) === null) && fail([a, b, c]), + dst(((a&0x0F)<<12) | ((b&0x3F)<<6) | (c&0x3F)); + else if ((a&0xF8) === 0xF0) + ((b=src()) === null || (c=src()) === null || (d=src()) === null) && fail([a, b, c ,d]), + dst(((a&0x07)<<18) | ((b&0x3F)<<12) | ((c&0x3F)<<6) | (d&0x3F)); + else throw RangeError("Illegal starting byte: "+a); + } + }; + + /** + * Converts UTF16 characters to UTF8 code points. + * @param {!function():number|null} src Characters source as a function returning the next char code respectively + * `null` if there are no more characters left. + * @param {!function(number)} dst Code points destination as a function successively called with each converted code + * point. + */ + utfx.UTF16toUTF8 = function(src, dst) { + var c1, c2 = null; + while (true) { + if ((c1 = c2 !== null ? c2 : src()) === null) + break; + if (c1 >= 0xD800 && c1 <= 0xDFFF) { + if ((c2 = src()) !== null) { + if (c2 >= 0xDC00 && c2 <= 0xDFFF) { + dst((c1-0xD800)*0x400+c2-0xDC00+0x10000); + c2 = null; continue; + } + } + } + dst(c1); + } + if (c2 !== null) dst(c2); + }; + + /** + * Converts UTF8 code points to UTF16 characters. + * @param {(!function():number|null) | number} src Code points source, either as a function returning the next code point + * respectively `null` if there are no more code points left or a single numeric code point. + * @param {!function(number)} dst Characters destination as a function successively called with each converted char code. + * @throws {RangeError} If a code point is out of range + */ + utfx.UTF8toUTF16 = function(src, dst) { + var cp = null; + if (typeof src === 'number') + cp = src, src = function() { return null; }; + while (cp !== null || (cp = src()) !== null) { + if (cp <= 0xFFFF) + dst(cp); + else + cp -= 0x10000, + dst((cp>>10)+0xD800), + dst((cp%0x400)+0xDC00); + cp = null; + } + }; + + /** + * Converts and encodes UTF16 characters to UTF8 bytes. + * @param {!function():number|null} src Characters source as a function returning the next char code respectively `null` + * if there are no more characters left. + * @param {!function(number)} dst Bytes destination as a function successively called with the next byte. + */ + utfx.encodeUTF16toUTF8 = function(src, dst) { + utfx.UTF16toUTF8(src, function(cp) { + utfx.encodeUTF8(cp, dst); + }); + }; + + /** + * Decodes and converts UTF8 bytes to UTF16 characters. + * @param {!function():number|null} src Bytes source as a function returning the next byte respectively `null` if there + * are no more bytes left. + * @param {!function(number)} dst Characters destination as a function successively called with each converted char code. + * @throws {RangeError} If a starting byte is invalid in UTF8 + * @throws {Error} If the last sequence is truncated. Has an array property `bytes` holding the remaining bytes. + */ + utfx.decodeUTF8toUTF16 = function(src, dst) { + utfx.decodeUTF8(src, function(cp) { + utfx.UTF8toUTF16(cp, dst); + }); + }; + + /** + * Calculates the byte length of an UTF8 code point. + * @param {number} cp UTF8 code point + * @returns {number} Byte length + */ + utfx.calculateCodePoint = function(cp) { + return (cp < 0x80) ? 1 : (cp < 0x800) ? 2 : (cp < 0x10000) ? 3 : 4; + }; + + /** + * Calculates the number of UTF8 bytes required to store UTF8 code points. + * @param {(!function():number|null)} src Code points source as a function returning the next code point respectively + * `null` if there are no more code points left. + * @returns {number} The number of UTF8 bytes required + */ + utfx.calculateUTF8 = function(src) { + var cp, l=0; + while ((cp = src()) !== null) + l += (cp < 0x80) ? 1 : (cp < 0x800) ? 2 : (cp < 0x10000) ? 3 : 4; + return l; + }; + + /** + * Calculates the number of UTF8 code points respectively UTF8 bytes required to store UTF16 char codes. + * @param {(!function():number|null)} src Characters source as a function returning the next char code respectively + * `null` if there are no more characters left. + * @returns {!Array.} The number of UTF8 code points at index 0 and the number of UTF8 bytes required at index 1. + */ + utfx.calculateUTF16asUTF8 = function(src) { + var n=0, l=0; + utfx.UTF16toUTF8(src, function(cp) { + ++n; l += (cp < 0x80) ? 1 : (cp < 0x800) ? 2 : (cp < 0x10000) ? 3 : 4; + }); + return [n,l]; + }; + + return utfx; + }(); + + // encodings/utf8 + + /** + * Encodes this ByteBuffer's contents between {@link ByteBuffer#offset} and {@link ByteBuffer#limit} to an UTF8 encoded + * string. + * @returns {string} Hex encoded string + * @throws {RangeError} If `offset > limit` + * @expose + */ + ByteBufferPrototype.toUTF8 = function(begin, end) { + if (typeof begin === 'undefined') begin = this.offset; + if (typeof end === 'undefined') end = this.limit; + if (!this.noAssert) { + if (typeof begin !== 'number' || begin % 1 !== 0) + throw TypeError("Illegal begin: Not an integer"); + begin >>>= 0; + if (typeof end !== 'number' || end % 1 !== 0) + throw TypeError("Illegal end: Not an integer"); + end >>>= 0; + if (begin < 0 || begin > end || end > this.buffer.byteLength) + throw RangeError("Illegal range: 0 <= "+begin+" <= "+end+" <= "+this.buffer.byteLength); + } + var sd; try { + utfx.decodeUTF8toUTF16(function() { + return begin < end ? this.view[begin++] : null; + }.bind(this), sd = stringDestination()); + } catch (e) { + if (begin !== end) + throw RangeError("Illegal range: Truncated data, "+begin+" != "+end); + } + return sd(); + }; + + /** + * Decodes an UTF8 encoded string to a ByteBuffer. + * @param {string} str String to decode + * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to + * {@link ByteBuffer.DEFAULT_ENDIAN}. + * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to + * {@link ByteBuffer.DEFAULT_NOASSERT}. + * @returns {!ByteBuffer} ByteBuffer + * @expose + */ + ByteBuffer.fromUTF8 = function(str, littleEndian, noAssert) { + if (!noAssert) + if (typeof str !== 'string') + throw TypeError("Illegal str: Not a string"); + var bb = new ByteBuffer(utfx.calculateUTF16asUTF8(stringSource(str), true)[1], littleEndian, noAssert), + i = 0; + utfx.encodeUTF16toUTF8(stringSource(str), function(b) { + bb.view[i++] = b; + }); + bb.limit = i; + return bb; + }; + + return ByteBuffer; + }); + }); + + var empty$1 = {}; + + + var empty$2 = Object.freeze({ + default: empty$1 + }); + + var require$$2 = ( empty$2 && empty$1 ) || empty$2; + + var protobufLight = createCommonjsModule(function (module) { + /* + Copyright 2013 Daniel Wirtz + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + + /** + * @license protobuf.js (c) 2013 Daniel Wirtz + * Released under the Apache License, Version 2.0 + * see: https://github.com/dcodeIO/protobuf.js for details + */ + (function(global, factory) { + + /* AMD */ if (typeof undefined === 'function' && undefined["amd"]) + undefined(["bytebuffer"], factory); + /* CommonJS */ else if (typeof commonjsRequire === "function" && 'object' === "object" && module && module["exports"]) + module["exports"] = factory(bytebuffer, true); + /* Global */ else + (global["dcodeIO"] = global["dcodeIO"] || {})["ProtoBuf"] = factory(global["dcodeIO"]["ByteBuffer"]); + + })(commonjsGlobal, function(ByteBuffer, isCommonJS) { + "use strict"; + + /** + * The ProtoBuf namespace. + * @exports ProtoBuf + * @namespace + * @expose + */ + var ProtoBuf = {}; + + /** + * @type {!function(new: ByteBuffer, ...[*])} + * @expose + */ + ProtoBuf.ByteBuffer = ByteBuffer; + + /** + * @type {?function(new: Long, ...[*])} + * @expose + */ + ProtoBuf.Long = ByteBuffer.Long || null; + + /** + * ProtoBuf.js version. + * @type {string} + * @const + * @expose + */ + ProtoBuf.VERSION = "5.0.2"; + + /** + * Wire types. + * @type {Object.} + * @const + * @expose + */ + ProtoBuf.WIRE_TYPES = {}; + + /** + * Varint wire type. + * @type {number} + * @expose + */ + ProtoBuf.WIRE_TYPES.VARINT = 0; + + /** + * Fixed 64 bits wire type. + * @type {number} + * @const + * @expose + */ + ProtoBuf.WIRE_TYPES.BITS64 = 1; + + /** + * Length delimited wire type. + * @type {number} + * @const + * @expose + */ + ProtoBuf.WIRE_TYPES.LDELIM = 2; + + /** + * Start group wire type. + * @type {number} + * @const + * @expose + */ + ProtoBuf.WIRE_TYPES.STARTGROUP = 3; + + /** + * End group wire type. + * @type {number} + * @const + * @expose + */ + ProtoBuf.WIRE_TYPES.ENDGROUP = 4; + + /** + * Fixed 32 bits wire type. + * @type {number} + * @const + * @expose + */ + ProtoBuf.WIRE_TYPES.BITS32 = 5; + + /** + * Packable wire types. + * @type {!Array.} + * @const + * @expose + */ + ProtoBuf.PACKABLE_WIRE_TYPES = [ + ProtoBuf.WIRE_TYPES.VARINT, + ProtoBuf.WIRE_TYPES.BITS64, + ProtoBuf.WIRE_TYPES.BITS32 + ]; + + /** + * Types. + * @dict + * @type {!Object.} + * @const + * @expose + */ + ProtoBuf.TYPES = { + // According to the protobuf spec. + "int32": { + name: "int32", + wireType: ProtoBuf.WIRE_TYPES.VARINT, + defaultValue: 0 + }, + "uint32": { + name: "uint32", + wireType: ProtoBuf.WIRE_TYPES.VARINT, + defaultValue: 0 + }, + "sint32": { + name: "sint32", + wireType: ProtoBuf.WIRE_TYPES.VARINT, + defaultValue: 0 + }, + "int64": { + name: "int64", + wireType: ProtoBuf.WIRE_TYPES.VARINT, + defaultValue: ProtoBuf.Long ? ProtoBuf.Long.ZERO : undefined + }, + "uint64": { + name: "uint64", + wireType: ProtoBuf.WIRE_TYPES.VARINT, + defaultValue: ProtoBuf.Long ? ProtoBuf.Long.UZERO : undefined + }, + "sint64": { + name: "sint64", + wireType: ProtoBuf.WIRE_TYPES.VARINT, + defaultValue: ProtoBuf.Long ? ProtoBuf.Long.ZERO : undefined + }, + "bool": { + name: "bool", + wireType: ProtoBuf.WIRE_TYPES.VARINT, + defaultValue: false + }, + "double": { + name: "double", + wireType: ProtoBuf.WIRE_TYPES.BITS64, + defaultValue: 0 + }, + "string": { + name: "string", + wireType: ProtoBuf.WIRE_TYPES.LDELIM, + defaultValue: "" + }, + "bytes": { + name: "bytes", + wireType: ProtoBuf.WIRE_TYPES.LDELIM, + defaultValue: null // overridden in the code, must be a unique instance + }, + "fixed32": { + name: "fixed32", + wireType: ProtoBuf.WIRE_TYPES.BITS32, + defaultValue: 0 + }, + "sfixed32": { + name: "sfixed32", + wireType: ProtoBuf.WIRE_TYPES.BITS32, + defaultValue: 0 + }, + "fixed64": { + name: "fixed64", + wireType: ProtoBuf.WIRE_TYPES.BITS64, + defaultValue: ProtoBuf.Long ? ProtoBuf.Long.UZERO : undefined + }, + "sfixed64": { + name: "sfixed64", + wireType: ProtoBuf.WIRE_TYPES.BITS64, + defaultValue: ProtoBuf.Long ? ProtoBuf.Long.ZERO : undefined + }, + "float": { + name: "float", + wireType: ProtoBuf.WIRE_TYPES.BITS32, + defaultValue: 0 + }, + "enum": { + name: "enum", + wireType: ProtoBuf.WIRE_TYPES.VARINT, + defaultValue: 0 + }, + "message": { + name: "message", + wireType: ProtoBuf.WIRE_TYPES.LDELIM, + defaultValue: null + }, + "group": { + name: "group", + wireType: ProtoBuf.WIRE_TYPES.STARTGROUP, + defaultValue: null + } + }; + + /** + * Valid map key types. + * @type {!Array.>} + * @const + * @expose + */ + ProtoBuf.MAP_KEY_TYPES = [ + ProtoBuf.TYPES["int32"], + ProtoBuf.TYPES["sint32"], + ProtoBuf.TYPES["sfixed32"], + ProtoBuf.TYPES["uint32"], + ProtoBuf.TYPES["fixed32"], + ProtoBuf.TYPES["int64"], + ProtoBuf.TYPES["sint64"], + ProtoBuf.TYPES["sfixed64"], + ProtoBuf.TYPES["uint64"], + ProtoBuf.TYPES["fixed64"], + ProtoBuf.TYPES["bool"], + ProtoBuf.TYPES["string"], + ProtoBuf.TYPES["bytes"] + ]; + + /** + * Minimum field id. + * @type {number} + * @const + * @expose + */ + ProtoBuf.ID_MIN = 1; + + /** + * Maximum field id. + * @type {number} + * @const + * @expose + */ + ProtoBuf.ID_MAX = 0x1FFFFFFF; + + /** + * If set to `true`, field names will be converted from underscore notation to camel case. Defaults to `false`. + * Must be set prior to parsing. + * @type {boolean} + * @expose + */ + ProtoBuf.convertFieldsToCamelCase = false; + + /** + * By default, messages are populated with (setX, set_x) accessors for each field. This can be disabled by + * setting this to `false` prior to building messages. + * @type {boolean} + * @expose + */ + ProtoBuf.populateAccessors = true; + + /** + * By default, messages are populated with default values if a field is not present on the wire. To disable + * this behavior, set this setting to `false`. + * @type {boolean} + * @expose + */ + ProtoBuf.populateDefaults = true; + + /** + * @alias ProtoBuf.Util + * @expose + */ + ProtoBuf.Util = (function() { + "use strict"; + + /** + * ProtoBuf utilities. + * @exports ProtoBuf.Util + * @namespace + */ + var Util = {}; + + /** + * Flag if running in node or not. + * @type {boolean} + * @const + * @expose + */ + Util.IS_NODE = !!( + typeof process === 'object' && process+'' === '[object process]' && !process['browser'] + ); + + /** + * Constructs a XMLHttpRequest object. + * @return {XMLHttpRequest} + * @throws {Error} If XMLHttpRequest is not supported + * @expose + */ + Util.XHR = function() { + // No dependencies please, ref: http://www.quirksmode.org/js/xmlhttp.html + var XMLHttpFactories = [ + function () {return new XMLHttpRequest()}, + function () {return new ActiveXObject("Msxml2.XMLHTTP")}, + function () {return new ActiveXObject("Msxml3.XMLHTTP")}, + function () {return new ActiveXObject("Microsoft.XMLHTTP")} + ]; + /** @type {?XMLHttpRequest} */ + var xhr = null; + for (var i=0;i} + * @expose + */ + ProtoBuf.Lang = { + + // Characters always ending a statement + DELIM: /[\s\{\}=;:\[\],'"\(\)<>]/g, + + // Field rules + RULE: /^(?:required|optional|repeated|map)$/, + + // Field types + TYPE: /^(?:double|float|int32|uint32|sint32|int64|uint64|sint64|fixed32|sfixed32|fixed64|sfixed64|bool|string|bytes)$/, + + // Names + NAME: /^[a-zA-Z_][a-zA-Z_0-9]*$/, + + // Type definitions + TYPEDEF: /^[a-zA-Z][a-zA-Z_0-9]*$/, + + // Type references + TYPEREF: /^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)+$/, + + // Fully qualified type references + FQTYPEREF: /^(?:\.[a-zA-Z][a-zA-Z_0-9]*)+$/, + + // All numbers + NUMBER: /^-?(?:[1-9][0-9]*|0|0[xX][0-9a-fA-F]+|0[0-7]+|([0-9]*(\.[0-9]*)?([Ee][+-]?[0-9]+)?)|inf|nan)$/, + + // Decimal numbers + NUMBER_DEC: /^(?:[1-9][0-9]*|0)$/, + + // Hexadecimal numbers + NUMBER_HEX: /^0[xX][0-9a-fA-F]+$/, + + // Octal numbers + NUMBER_OCT: /^0[0-7]+$/, + + // Floating point numbers + NUMBER_FLT: /^([0-9]*(\.[0-9]*)?([Ee][+-]?[0-9]+)?|inf|nan)$/, + + // Booleans + BOOL: /^(?:true|false)$/i, + + // Id numbers + ID: /^(?:[1-9][0-9]*|0|0[xX][0-9a-fA-F]+|0[0-7]+)$/, + + // Negative id numbers (enum values) + NEGID: /^\-?(?:[1-9][0-9]*|0|0[xX][0-9a-fA-F]+|0[0-7]+)$/, + + // Whitespaces + WHITESPACE: /\s/, + + // All strings + STRING: /(?:"([^"\\]*(?:\\.[^"\\]*)*)")|(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g, + + // Double quoted strings + STRING_DQ: /(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g, + + // Single quoted strings + STRING_SQ: /(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g + }; + + + /** + * @alias ProtoBuf.Reflect + * @expose + */ + ProtoBuf.Reflect = (function(ProtoBuf) { + "use strict"; + + /** + * Reflection types. + * @exports ProtoBuf.Reflect + * @namespace + */ + var Reflect = {}; + + /** + * Constructs a Reflect base class. + * @exports ProtoBuf.Reflect.T + * @constructor + * @abstract + * @param {!ProtoBuf.Builder} builder Builder reference + * @param {?ProtoBuf.Reflect.T} parent Parent object + * @param {string} name Object name + */ + var T = function(builder, parent, name) { + + /** + * Builder reference. + * @type {!ProtoBuf.Builder} + * @expose + */ + this.builder = builder; + + /** + * Parent object. + * @type {?ProtoBuf.Reflect.T} + * @expose + */ + this.parent = parent; + + /** + * Object name in namespace. + * @type {string} + * @expose + */ + this.name = name; + + /** + * Fully qualified class name + * @type {string} + * @expose + */ + this.className; + }; + + /** + * @alias ProtoBuf.Reflect.T.prototype + * @inner + */ + var TPrototype = T.prototype; + + /** + * Returns the fully qualified name of this object. + * @returns {string} Fully qualified name as of ".PATH.TO.THIS" + * @expose + */ + TPrototype.fqn = function() { + var name = this.name, + ptr = this; + do { + ptr = ptr.parent; + if (ptr == null) + break; + name = ptr.name+"."+name; + } while (true); + return name; + }; + + /** + * Returns a string representation of this Reflect object (its fully qualified name). + * @param {boolean=} includeClass Set to true to include the class name. Defaults to false. + * @return String representation + * @expose + */ + TPrototype.toString = function(includeClass) { + return (includeClass ? this.className + " " : "") + this.fqn(); + }; + + /** + * Builds this type. + * @throws {Error} If this type cannot be built directly + * @expose + */ + TPrototype.build = function() { + throw Error(this.toString(true)+" cannot be built directly"); + }; + + /** + * @alias ProtoBuf.Reflect.T + * @expose + */ + Reflect.T = T; + + /** + * Constructs a new Namespace. + * @exports ProtoBuf.Reflect.Namespace + * @param {!ProtoBuf.Builder} builder Builder reference + * @param {?ProtoBuf.Reflect.Namespace} parent Namespace parent + * @param {string} name Namespace name + * @param {Object.=} options Namespace options + * @param {string?} syntax The syntax level of this definition (e.g., proto3) + * @constructor + * @extends ProtoBuf.Reflect.T + */ + var Namespace = function(builder, parent, name, options, syntax) { + T.call(this, builder, parent, name); + + /** + * @override + */ + this.className = "Namespace"; + + /** + * Children inside the namespace. + * @type {!Array.} + */ + this.children = []; + + /** + * Options. + * @type {!Object.} + */ + this.options = options || {}; + + /** + * Syntax level (e.g., proto2 or proto3). + * @type {!string} + */ + this.syntax = syntax || "proto2"; + }; + + /** + * @alias ProtoBuf.Reflect.Namespace.prototype + * @inner + */ + var NamespacePrototype = Namespace.prototype = Object.create(T.prototype); + + /** + * Returns an array of the namespace's children. + * @param {ProtoBuf.Reflect.T=} type Filter type (returns instances of this type only). Defaults to null (all children). + * @return {Array.} + * @expose + */ + NamespacePrototype.getChildren = function(type) { + type = type || null; + if (type == null) + return this.children.slice(); + var children = []; + for (var i=0, k=this.children.length; i} qn Qualified name to resolve + * @param {boolean=} excludeNonNamespace Excludes non-namespace types, defaults to `false` + * @return {?ProtoBuf.Reflect.Namespace} The resolved type or null if not found + * @expose + */ + NamespacePrototype.resolve = function(qn, excludeNonNamespace) { + var part = typeof qn === 'string' ? qn.split(".") : qn, + ptr = this, + i = 0; + if (part[i] === "") { // Fully qualified name, e.g. ".My.Message' + while (ptr.parent !== null) + ptr = ptr.parent; + i++; + } + var child; + do { + do { + if (!(ptr instanceof Reflect.Namespace)) { + ptr = null; + break; + } + child = ptr.getChild(part[i]); + if (!child || !(child instanceof Reflect.T) || (excludeNonNamespace && !(child instanceof Reflect.Namespace))) { + ptr = null; + break; + } + ptr = child; i++; + } while (i < part.length); + if (ptr != null) + break; // Found + // Else search the parent + if (this.parent !== null) + return this.parent.resolve(qn, excludeNonNamespace); + } while (ptr != null); + return ptr; + }; + + /** + * Determines the shortest qualified name of the specified type, if any, relative to this namespace. + * @param {!ProtoBuf.Reflect.T} t Reflection type + * @returns {string} The shortest qualified name or, if there is none, the fqn + * @expose + */ + NamespacePrototype.qn = function(t) { + var part = [], ptr = t; + do { + part.unshift(ptr.name); + ptr = ptr.parent; + } while (ptr !== null); + for (var len=1; len <= part.length; len++) { + var qn = part.slice(part.length-len); + if (t === this.resolve(qn, t instanceof Reflect.Namespace)) + return qn.join("."); + } + return t.fqn(); + }; + + /** + * Builds the namespace and returns the runtime counterpart. + * @return {Object.} Runtime namespace + * @expose + */ + NamespacePrototype.build = function() { + /** @dict */ + var ns = {}; + var children = this.children; + for (var i=0, k=children.length, child; i} + */ + NamespacePrototype.buildOpt = function() { + var opt = {}, + keys = Object.keys(this.options); + for (var i=0, k=keys.length; i}null} Option value or NULL if there is no such option + */ + NamespacePrototype.getOption = function(name) { + if (typeof name === 'undefined') + return this.options; + return typeof this.options[name] !== 'undefined' ? this.options[name] : null; + }; + + /** + * @alias ProtoBuf.Reflect.Namespace + * @expose + */ + Reflect.Namespace = Namespace; + + /** + * Constructs a new Element implementation that checks and converts values for a + * particular field type, as appropriate. + * + * An Element represents a single value: either the value of a singular field, + * or a value contained in one entry of a repeated field or map field. This + * class does not implement these higher-level concepts; it only encapsulates + * the low-level typechecking and conversion. + * + * @exports ProtoBuf.Reflect.Element + * @param {{name: string, wireType: number}} type Resolved data type + * @param {ProtoBuf.Reflect.T|null} resolvedType Resolved type, if relevant + * (e.g. submessage field). + * @param {boolean} isMapKey Is this element a Map key? The value will be + * converted to string form if so. + * @param {string} syntax Syntax level of defining message type, e.g., + * proto2 or proto3. + * @param {string} name Name of the field containing this element (for error + * messages) + * @constructor + */ + var Element = function(type, resolvedType, isMapKey, syntax, name) { + + /** + * Element type, as a string (e.g., int32). + * @type {{name: string, wireType: number}} + */ + this.type = type; + + /** + * Element type reference to submessage or enum definition, if needed. + * @type {ProtoBuf.Reflect.T|null} + */ + this.resolvedType = resolvedType; + + /** + * Element is a map key. + * @type {boolean} + */ + this.isMapKey = isMapKey; + + /** + * Syntax level of defining message type, e.g., proto2 or proto3. + * @type {string} + */ + this.syntax = syntax; + + /** + * Name of the field containing this element (for error messages) + * @type {string} + */ + this.name = name; + + if (isMapKey && ProtoBuf.MAP_KEY_TYPES.indexOf(type) < 0) + throw Error("Invalid map key type: " + type.name); + }; + + var ElementPrototype = Element.prototype; + + /** + * Obtains a (new) default value for the specified type. + * @param type {string|{name: string, wireType: number}} Field type + * @returns {*} Default value + * @inner + */ + function mkDefault(type) { + if (typeof type === 'string') + type = ProtoBuf.TYPES[type]; + if (typeof type.defaultValue === 'undefined') + throw Error("default value for type "+type.name+" is not supported"); + if (type == ProtoBuf.TYPES["bytes"]) + return new ByteBuffer(0); + return type.defaultValue; + } + + /** + * Returns the default value for this field in proto3. + * @function + * @param type {string|{name: string, wireType: number}} the field type + * @returns {*} Default value + */ + Element.defaultFieldValue = mkDefault; + + /** + * Makes a Long from a value. + * @param {{low: number, high: number, unsigned: boolean}|string|number} value Value + * @param {boolean=} unsigned Whether unsigned or not, defaults to reuse it from Long-like objects or to signed for + * strings and numbers + * @returns {!Long} + * @throws {Error} If the value cannot be converted to a Long + * @inner + */ + function mkLong(value, unsigned) { + if (value && typeof value.low === 'number' && typeof value.high === 'number' && typeof value.unsigned === 'boolean' + && value.low === value.low && value.high === value.high) + return new ProtoBuf.Long(value.low, value.high, typeof unsigned === 'undefined' ? value.unsigned : unsigned); + if (typeof value === 'string') + return ProtoBuf.Long.fromString(value, unsigned || false, 10); + if (typeof value === 'number') + return ProtoBuf.Long.fromNumber(value, unsigned || false); + throw Error("not convertible to Long"); + } + + ElementPrototype.toString = function() { + return (this.name || '') + (this.isMapKey ? 'map' : 'value') + ' element'; + }; + + /** + * Checks if the given value can be set for an element of this type (singular + * field or one element of a repeated field or map). + * @param {*} value Value to check + * @return {*} Verified, maybe adjusted, value + * @throws {Error} If the value cannot be verified for this element slot + * @expose + */ + ElementPrototype.verifyValue = function(value) { + var self = this; + function fail(val, msg) { + throw Error("Illegal value for "+self.toString(true)+" of type "+self.type.name+": "+val+" ("+msg+")"); + } + switch (this.type) { + // Signed 32bit + case ProtoBuf.TYPES["int32"]: + case ProtoBuf.TYPES["sint32"]: + case ProtoBuf.TYPES["sfixed32"]: + // Account for !NaN: value === value + if (typeof value !== 'number' || (value === value && value % 1 !== 0)) + fail(typeof value, "not an integer"); + return value > 4294967295 ? value | 0 : value; + + // Unsigned 32bit + case ProtoBuf.TYPES["uint32"]: + case ProtoBuf.TYPES["fixed32"]: + if (typeof value !== 'number' || (value === value && value % 1 !== 0)) + fail(typeof value, "not an integer"); + return value < 0 ? value >>> 0 : value; + + // Signed 64bit + case ProtoBuf.TYPES["int64"]: + case ProtoBuf.TYPES["sint64"]: + case ProtoBuf.TYPES["sfixed64"]: { + if (ProtoBuf.Long) + try { + return mkLong(value, false); + } catch (e) { + fail(typeof value, e.message); + } + else + fail(typeof value, "requires Long.js"); + } + + // Unsigned 64bit + case ProtoBuf.TYPES["uint64"]: + case ProtoBuf.TYPES["fixed64"]: { + if (ProtoBuf.Long) + try { + return mkLong(value, true); + } catch (e) { + fail(typeof value, e.message); + } + else + fail(typeof value, "requires Long.js"); + } + + // Bool + case ProtoBuf.TYPES["bool"]: + if (typeof value !== 'boolean') + fail(typeof value, "not a boolean"); + return value; + + // Float + case ProtoBuf.TYPES["float"]: + case ProtoBuf.TYPES["double"]: + if (typeof value !== 'number') + fail(typeof value, "not a number"); + return value; + + // Length-delimited string + case ProtoBuf.TYPES["string"]: + if (typeof value !== 'string' && !(value && value instanceof String)) + fail(typeof value, "not a string"); + return ""+value; // Convert String object to string + + // Length-delimited bytes + case ProtoBuf.TYPES["bytes"]: + if (ByteBuffer.isByteBuffer(value)) + return value; + return ByteBuffer.wrap(value, "base64"); + + // Constant enum value + case ProtoBuf.TYPES["enum"]: { + var values = this.resolvedType.getChildren(ProtoBuf.Reflect.Enum.Value); + for (i=0; i 4294967295 || value < 0) + fail(typeof value, "not in range for uint32"); + return value; + } else { + // proto2 requires enum values to be valid. + fail(value, "not a valid enum value"); + } + } + // Embedded message + case ProtoBuf.TYPES["group"]: + case ProtoBuf.TYPES["message"]: { + if (!value || typeof value !== 'object') + fail(typeof value, "object expected"); + if (value instanceof this.resolvedType.clazz) + return value; + if (value instanceof ProtoBuf.Builder.Message) { + // Mismatched type: Convert to object (see: https://github.com/dcodeIO/ProtoBuf.js/issues/180) + var obj = {}; + for (var i in value) + if (value.hasOwnProperty(i)) + obj[i] = value[i]; + value = obj; + } + // Else let's try to construct one from a key-value object + return new (this.resolvedType.clazz)(value); // May throw for a hundred of reasons + } + } + + // We should never end here + throw Error("[INTERNAL] Illegal value for "+this.toString(true)+": "+value+" (undefined type "+this.type+")"); + }; + + /** + * Calculates the byte length of an element on the wire. + * @param {number} id Field number + * @param {*} value Field value + * @returns {number} Byte length + * @throws {Error} If the value cannot be calculated + * @expose + */ + ElementPrototype.calculateLength = function(id, value) { + if (value === null) return 0; // Nothing to encode + // Tag has already been written + var n; + switch (this.type) { + case ProtoBuf.TYPES["int32"]: + return value < 0 ? ByteBuffer.calculateVarint64(value) : ByteBuffer.calculateVarint32(value); + case ProtoBuf.TYPES["uint32"]: + return ByteBuffer.calculateVarint32(value); + case ProtoBuf.TYPES["sint32"]: + return ByteBuffer.calculateVarint32(ByteBuffer.zigZagEncode32(value)); + case ProtoBuf.TYPES["fixed32"]: + case ProtoBuf.TYPES["sfixed32"]: + case ProtoBuf.TYPES["float"]: + return 4; + case ProtoBuf.TYPES["int64"]: + case ProtoBuf.TYPES["uint64"]: + return ByteBuffer.calculateVarint64(value); + case ProtoBuf.TYPES["sint64"]: + return ByteBuffer.calculateVarint64(ByteBuffer.zigZagEncode64(value)); + case ProtoBuf.TYPES["fixed64"]: + case ProtoBuf.TYPES["sfixed64"]: + return 8; + case ProtoBuf.TYPES["bool"]: + return 1; + case ProtoBuf.TYPES["enum"]: + return ByteBuffer.calculateVarint32(value); + case ProtoBuf.TYPES["double"]: + return 8; + case ProtoBuf.TYPES["string"]: + n = ByteBuffer.calculateUTF8Bytes(value); + return ByteBuffer.calculateVarint32(n) + n; + case ProtoBuf.TYPES["bytes"]: + if (value.remaining() < 0) + throw Error("Illegal value for "+this.toString(true)+": "+value.remaining()+" bytes remaining"); + return ByteBuffer.calculateVarint32(value.remaining()) + value.remaining(); + case ProtoBuf.TYPES["message"]: + n = this.resolvedType.calculate(value); + return ByteBuffer.calculateVarint32(n) + n; + case ProtoBuf.TYPES["group"]: + n = this.resolvedType.calculate(value); + return n + ByteBuffer.calculateVarint32((id << 3) | ProtoBuf.WIRE_TYPES.ENDGROUP); + } + // We should never end here + throw Error("[INTERNAL] Illegal value to encode in "+this.toString(true)+": "+value+" (unknown type)"); + }; + + /** + * Encodes a value to the specified buffer. Does not encode the key. + * @param {number} id Field number + * @param {*} value Field value + * @param {ByteBuffer} buffer ByteBuffer to encode to + * @return {ByteBuffer} The ByteBuffer for chaining + * @throws {Error} If the value cannot be encoded + * @expose + */ + ElementPrototype.encodeValue = function(id, value, buffer) { + if (value === null) return buffer; // Nothing to encode + // Tag has already been written + + switch (this.type) { + // 32bit signed varint + case ProtoBuf.TYPES["int32"]: + // "If you use int32 or int64 as the type for a negative number, the resulting varint is always ten bytes + // long – it is, effectively, treated like a very large unsigned integer." (see #122) + if (value < 0) + buffer.writeVarint64(value); + else + buffer.writeVarint32(value); + break; + + // 32bit unsigned varint + case ProtoBuf.TYPES["uint32"]: + buffer.writeVarint32(value); + break; + + // 32bit varint zig-zag + case ProtoBuf.TYPES["sint32"]: + buffer.writeVarint32ZigZag(value); + break; + + // Fixed unsigned 32bit + case ProtoBuf.TYPES["fixed32"]: + buffer.writeUint32(value); + break; + + // Fixed signed 32bit + case ProtoBuf.TYPES["sfixed32"]: + buffer.writeInt32(value); + break; + + // 64bit varint as-is + case ProtoBuf.TYPES["int64"]: + case ProtoBuf.TYPES["uint64"]: + buffer.writeVarint64(value); // throws + break; + + // 64bit varint zig-zag + case ProtoBuf.TYPES["sint64"]: + buffer.writeVarint64ZigZag(value); // throws + break; + + // Fixed unsigned 64bit + case ProtoBuf.TYPES["fixed64"]: + buffer.writeUint64(value); // throws + break; + + // Fixed signed 64bit + case ProtoBuf.TYPES["sfixed64"]: + buffer.writeInt64(value); // throws + break; + + // Bool + case ProtoBuf.TYPES["bool"]: + if (typeof value === 'string') + buffer.writeVarint32(value.toLowerCase() === 'false' ? 0 : !!value); + else + buffer.writeVarint32(value ? 1 : 0); + break; + + // Constant enum value + case ProtoBuf.TYPES["enum"]: + buffer.writeVarint32(value); + break; + + // 32bit float + case ProtoBuf.TYPES["float"]: + buffer.writeFloat32(value); + break; + + // 64bit float + case ProtoBuf.TYPES["double"]: + buffer.writeFloat64(value); + break; + + // Length-delimited string + case ProtoBuf.TYPES["string"]: + buffer.writeVString(value); + break; + + // Length-delimited bytes + case ProtoBuf.TYPES["bytes"]: + if (value.remaining() < 0) + throw Error("Illegal value for "+this.toString(true)+": "+value.remaining()+" bytes remaining"); + var prevOffset = value.offset; + buffer.writeVarint32(value.remaining()); + buffer.append(value); + value.offset = prevOffset; + break; + + // Embedded message + case ProtoBuf.TYPES["message"]: + var bb = new ByteBuffer().LE(); + this.resolvedType.encode(value, bb); + buffer.writeVarint32(bb.offset); + buffer.append(bb.flip()); + break; + + // Legacy group + case ProtoBuf.TYPES["group"]: + this.resolvedType.encode(value, buffer); + buffer.writeVarint32((id << 3) | ProtoBuf.WIRE_TYPES.ENDGROUP); + break; + + default: + // We should never end here + throw Error("[INTERNAL] Illegal value to encode in "+this.toString(true)+": "+value+" (unknown type)"); + } + return buffer; + }; + + /** + * Decode one element value from the specified buffer. + * @param {ByteBuffer} buffer ByteBuffer to decode from + * @param {number} wireType The field wire type + * @param {number} id The field number + * @return {*} Decoded value + * @throws {Error} If the field cannot be decoded + * @expose + */ + ElementPrototype.decode = function(buffer, wireType, id) { + if (wireType != this.type.wireType) + throw Error("Unexpected wire type for element"); + + var value, nBytes; + switch (this.type) { + // 32bit signed varint + case ProtoBuf.TYPES["int32"]: + return buffer.readVarint32() | 0; + + // 32bit unsigned varint + case ProtoBuf.TYPES["uint32"]: + return buffer.readVarint32() >>> 0; + + // 32bit signed varint zig-zag + case ProtoBuf.TYPES["sint32"]: + return buffer.readVarint32ZigZag() | 0; + + // Fixed 32bit unsigned + case ProtoBuf.TYPES["fixed32"]: + return buffer.readUint32() >>> 0; + + case ProtoBuf.TYPES["sfixed32"]: + return buffer.readInt32() | 0; + + // 64bit signed varint + case ProtoBuf.TYPES["int64"]: + return buffer.readVarint64(); + + // 64bit unsigned varint + case ProtoBuf.TYPES["uint64"]: + return buffer.readVarint64().toUnsigned(); + + // 64bit signed varint zig-zag + case ProtoBuf.TYPES["sint64"]: + return buffer.readVarint64ZigZag(); + + // Fixed 64bit unsigned + case ProtoBuf.TYPES["fixed64"]: + return buffer.readUint64(); + + // Fixed 64bit signed + case ProtoBuf.TYPES["sfixed64"]: + return buffer.readInt64(); + + // Bool varint + case ProtoBuf.TYPES["bool"]: + return !!buffer.readVarint32(); + + // Constant enum value (varint) + case ProtoBuf.TYPES["enum"]: + // The following Builder.Message#set will already throw + return buffer.readVarint32(); + + // 32bit float + case ProtoBuf.TYPES["float"]: + return buffer.readFloat(); + + // 64bit float + case ProtoBuf.TYPES["double"]: + return buffer.readDouble(); + + // Length-delimited string + case ProtoBuf.TYPES["string"]: + return buffer.readVString(); + + // Length-delimited bytes + case ProtoBuf.TYPES["bytes"]: { + nBytes = buffer.readVarint32(); + if (buffer.remaining() < nBytes) + throw Error("Illegal number of bytes for "+this.toString(true)+": "+nBytes+" required but got only "+buffer.remaining()); + value = buffer.clone(); // Offset already set + value.limit = value.offset+nBytes; + buffer.offset += nBytes; + return value; + } + + // Length-delimited embedded message + case ProtoBuf.TYPES["message"]: { + nBytes = buffer.readVarint32(); + return this.resolvedType.decode(buffer, nBytes); + } + + // Legacy group + case ProtoBuf.TYPES["group"]: + return this.resolvedType.decode(buffer, -1, id); + } + + // We should never end here + throw Error("[INTERNAL] Illegal decode type"); + }; + + /** + * Converts a value from a string to the canonical element type. + * + * Legal only when isMapKey is true. + * + * @param {string} str The string value + * @returns {*} The value + */ + ElementPrototype.valueFromString = function(str) { + if (!this.isMapKey) { + throw Error("valueFromString() called on non-map-key element"); + } + + switch (this.type) { + case ProtoBuf.TYPES["int32"]: + case ProtoBuf.TYPES["sint32"]: + case ProtoBuf.TYPES["sfixed32"]: + case ProtoBuf.TYPES["uint32"]: + case ProtoBuf.TYPES["fixed32"]: + return this.verifyValue(parseInt(str)); + + case ProtoBuf.TYPES["int64"]: + case ProtoBuf.TYPES["sint64"]: + case ProtoBuf.TYPES["sfixed64"]: + case ProtoBuf.TYPES["uint64"]: + case ProtoBuf.TYPES["fixed64"]: + // Long-based fields support conversions from string already. + return this.verifyValue(str); + + case ProtoBuf.TYPES["bool"]: + return str === "true"; + + case ProtoBuf.TYPES["string"]: + return this.verifyValue(str); + + case ProtoBuf.TYPES["bytes"]: + return ByteBuffer.fromBinary(str); + } + }; + + /** + * Converts a value from the canonical element type to a string. + * + * It should be the case that `valueFromString(valueToString(val))` returns + * a value equivalent to `verifyValue(val)` for every legal value of `val` + * according to this element type. + * + * This may be used when the element must be stored or used as a string, + * e.g., as a map key on an Object. + * + * Legal only when isMapKey is true. + * + * @param {*} val The value + * @returns {string} The string form of the value. + */ + ElementPrototype.valueToString = function(value) { + if (!this.isMapKey) { + throw Error("valueToString() called on non-map-key element"); + } + + if (this.type === ProtoBuf.TYPES["bytes"]) { + return value.toString("binary"); + } else { + return value.toString(); + } + }; + + /** + * @alias ProtoBuf.Reflect.Element + * @expose + */ + Reflect.Element = Element; + + /** + * Constructs a new Message. + * @exports ProtoBuf.Reflect.Message + * @param {!ProtoBuf.Builder} builder Builder reference + * @param {!ProtoBuf.Reflect.Namespace} parent Parent message or namespace + * @param {string} name Message name + * @param {Object.=} options Message options + * @param {boolean=} isGroup `true` if this is a legacy group + * @param {string?} syntax The syntax level of this definition (e.g., proto3) + * @constructor + * @extends ProtoBuf.Reflect.Namespace + */ + var Message = function(builder, parent, name, options, isGroup, syntax) { + Namespace.call(this, builder, parent, name, options, syntax); + + /** + * @override + */ + this.className = "Message"; + + /** + * Extensions range. + * @type {!Array.|undefined} + * @expose + */ + this.extensions = undefined; + + /** + * Runtime message class. + * @type {?function(new:ProtoBuf.Builder.Message)} + * @expose + */ + this.clazz = null; + + /** + * Whether this is a legacy group or not. + * @type {boolean} + * @expose + */ + this.isGroup = !!isGroup; + + // The following cached collections are used to efficiently iterate over or look up fields when decoding. + + /** + * Cached fields. + * @type {?Array.} + * @private + */ + this._fields = null; + + /** + * Cached fields by id. + * @type {?Object.} + * @private + */ + this._fieldsById = null; + + /** + * Cached fields by name. + * @type {?Object.} + * @private + */ + this._fieldsByName = null; + }; + + /** + * @alias ProtoBuf.Reflect.Message.prototype + * @inner + */ + var MessagePrototype = Message.prototype = Object.create(Namespace.prototype); + + /** + * Builds the message and returns the runtime counterpart, which is a fully functional class. + * @see ProtoBuf.Builder.Message + * @param {boolean=} rebuild Whether to rebuild or not, defaults to false + * @return {ProtoBuf.Reflect.Message} Message class + * @throws {Error} If the message cannot be built + * @expose + */ + MessagePrototype.build = function(rebuild) { + if (this.clazz && !rebuild) + return this.clazz; + + // Create the runtime Message class in its own scope + var clazz = (function(ProtoBuf, T) { + + var fields = T.getChildren(ProtoBuf.Reflect.Message.Field), + oneofs = T.getChildren(ProtoBuf.Reflect.Message.OneOf); + + /** + * Constructs a new runtime Message. + * @name ProtoBuf.Builder.Message + * @class Barebone of all runtime messages. + * @param {!Object.|string} values Preset values + * @param {...string} var_args + * @constructor + * @throws {Error} If the message cannot be created + */ + var Message = function(values, var_args) { + ProtoBuf.Builder.Message.call(this); + + // Create virtual oneof properties + for (var i=0, k=oneofs.length; i 0) { + var value; + // Set field values from a values object + if (arguments.length === 1 && values !== null && typeof values === 'object' && + /* not _another_ Message */ (typeof values.encode !== 'function' || values instanceof Message) && + /* not a repeated field */ !Array.isArray(values) && + /* not a Map */ !(values instanceof ProtoBuf.Map) && + /* not a ByteBuffer */ !ByteBuffer.isByteBuffer(values) && + /* not an ArrayBuffer */ !(values instanceof ArrayBuffer) && + /* not a Long */ !(ProtoBuf.Long && values instanceof ProtoBuf.Long)) { + this.$set(values); + } else // Set field values from arguments, in declaration order + for (i=0, k=arguments.length; i} keyOrObj String key or plain object holding multiple values + * @param {(*|boolean)=} value Value to set if key is a string, otherwise omitted + * @param {boolean=} noAssert Whether to not assert for an actual field / proper value type, defaults to `false` + * @returns {!ProtoBuf.Builder.Message} this + * @throws {Error} If the value cannot be set + * @expose + */ + MessagePrototype.set = function(keyOrObj, value, noAssert) { + if (keyOrObj && typeof keyOrObj === 'object') { + noAssert = value; + for (var ikey in keyOrObj) { + // Check if virtual oneof field - don't set these + if (keyOrObj.hasOwnProperty(ikey) && typeof (value = keyOrObj[ikey]) !== 'undefined' && T._oneofsByName[ikey] === undefined) + this.$set(ikey, value, noAssert); + } + return this; + } + var field = T._fieldsByName[keyOrObj]; + if (!noAssert) { + if (!field) + throw Error(this+"#"+keyOrObj+" is not a field: undefined"); + if (!(field instanceof ProtoBuf.Reflect.Message.Field)) + throw Error(this+"#"+keyOrObj+" is not a field: "+field.toString(true)); + this[field.name] = (value = field.verifyValue(value)); // May throw + } else + this[keyOrObj] = value; + if (field && field.oneof) { // Field is part of an OneOf (not a virtual OneOf field) + var currentField = this[field.oneof.name]; // Virtual field references currently set field + if (value !== null) { + if (currentField !== null && currentField !== field.name) + this[currentField] = null; // Clear currently set field + this[field.oneof.name] = field.name; // Point virtual field at this field + } else if (/* value === null && */currentField === keyOrObj) + this[field.oneof.name] = null; // Clear virtual field (current field explicitly cleared) + } + return this; + }; + + /** + * Sets a field's value. This is an alias for [@link ProtoBuf.Builder.Message#set}. + * @name ProtoBuf.Builder.Message#$set + * @function + * @param {string|!Object.} keyOrObj String key or plain object holding multiple values + * @param {(*|boolean)=} value Value to set if key is a string, otherwise omitted + * @param {boolean=} noAssert Whether to not assert the value, defaults to `false` + * @throws {Error} If the value cannot be set + * @expose + */ + MessagePrototype.$set = MessagePrototype.set; + + /** + * Gets a field's value. + * @name ProtoBuf.Builder.Message#get + * @function + * @param {string} key Key + * @param {boolean=} noAssert Whether to not assert for an actual field, defaults to `false` + * @return {*} Value + * @throws {Error} If there is no such field + * @expose + */ + MessagePrototype.get = function(key, noAssert) { + if (noAssert) + return this[key]; + var field = T._fieldsByName[key]; + if (!field || !(field instanceof ProtoBuf.Reflect.Message.Field)) + throw Error(this+"#"+key+" is not a field: undefined"); + if (!(field instanceof ProtoBuf.Reflect.Message.Field)) + throw Error(this+"#"+key+" is not a field: "+field.toString(true)); + return this[field.name]; + }; + + /** + * Gets a field's value. This is an alias for {@link ProtoBuf.Builder.Message#$get}. + * @name ProtoBuf.Builder.Message#$get + * @function + * @param {string} key Key + * @return {*} Value + * @throws {Error} If there is no such field + * @expose + */ + MessagePrototype.$get = MessagePrototype.get; + + // Getters and setters + + for (var i=0; i} data Data payload + * @param {(!ByteBuffer|boolean)=} buffer ByteBuffer to encode to. Will create a new one and flip it if omitted. + * @param {boolean=} noVerify Whether to not verify field values, defaults to `false` + * @return {!ByteBuffer} Encoded message as a ByteBuffer + * @expose + */ + Message.encode = function(data, buffer, noVerify) { + return new Message(data).encode(buffer, noVerify); + }; + + /** + * Calculates the byte length of the message. + * @name ProtoBuf.Builder.Message#calculate + * @function + * @returns {number} Byte length + * @throws {Error} If the message cannot be calculated or if required fields are missing. + * @expose + */ + MessagePrototype.calculate = function() { + return T.calculate(this); + }; + + /** + * Encodes the varint32 length-delimited message. + * @name ProtoBuf.Builder.Message#encodeDelimited + * @function + * @param {(!ByteBuffer|boolean)=} buffer ByteBuffer to encode to. Will create a new one and flip it if omitted. + * @param {boolean=} noVerify Whether to not verify field values, defaults to `false` + * @return {!ByteBuffer} Encoded message as a ByteBuffer + * @throws {Error} If the message cannot be encoded or if required fields are missing. The later still + * returns the encoded ByteBuffer in the `encoded` property on the error. + * @expose + */ + MessagePrototype.encodeDelimited = function(buffer, noVerify) { + var isNew = false; + if (!buffer) + buffer = new ByteBuffer(), + isNew = true; + var enc = new ByteBuffer().LE(); + T.encode(this, enc, noVerify).flip(); + buffer.writeVarint32(enc.remaining()); + buffer.append(enc); + return isNew ? buffer.flip() : buffer; + }; + + /** + * Directly encodes the message to an ArrayBuffer. + * @name ProtoBuf.Builder.Message#encodeAB + * @function + * @return {ArrayBuffer} Encoded message as ArrayBuffer + * @throws {Error} If the message cannot be encoded or if required fields are missing. The later still + * returns the encoded ArrayBuffer in the `encoded` property on the error. + * @expose + */ + MessagePrototype.encodeAB = function() { + try { + return this.encode().toArrayBuffer(); + } catch (e) { + if (e["encoded"]) e["encoded"] = e["encoded"].toArrayBuffer(); + throw(e); + } + }; + + /** + * Returns the message as an ArrayBuffer. This is an alias for {@link ProtoBuf.Builder.Message#encodeAB}. + * @name ProtoBuf.Builder.Message#toArrayBuffer + * @function + * @return {ArrayBuffer} Encoded message as ArrayBuffer + * @throws {Error} If the message cannot be encoded or if required fields are missing. The later still + * returns the encoded ArrayBuffer in the `encoded` property on the error. + * @expose + */ + MessagePrototype.toArrayBuffer = MessagePrototype.encodeAB; + + /** + * Directly encodes the message to a node Buffer. + * @name ProtoBuf.Builder.Message#encodeNB + * @function + * @return {!Buffer} + * @throws {Error} If the message cannot be encoded, not running under node.js or if required fields are + * missing. The later still returns the encoded node Buffer in the `encoded` property on the error. + * @expose + */ + MessagePrototype.encodeNB = function() { + try { + return this.encode().toBuffer(); + } catch (e) { + if (e["encoded"]) e["encoded"] = e["encoded"].toBuffer(); + throw(e); + } + }; + + /** + * Returns the message as a node Buffer. This is an alias for {@link ProtoBuf.Builder.Message#encodeNB}. + * @name ProtoBuf.Builder.Message#toBuffer + * @function + * @return {!Buffer} + * @throws {Error} If the message cannot be encoded or if required fields are missing. The later still + * returns the encoded node Buffer in the `encoded` property on the error. + * @expose + */ + MessagePrototype.toBuffer = MessagePrototype.encodeNB; + + /** + * Directly encodes the message to a base64 encoded string. + * @name ProtoBuf.Builder.Message#encode64 + * @function + * @return {string} Base64 encoded string + * @throws {Error} If the underlying buffer cannot be encoded or if required fields are missing. The later + * still returns the encoded base64 string in the `encoded` property on the error. + * @expose + */ + MessagePrototype.encode64 = function() { + try { + return this.encode().toBase64(); + } catch (e) { + if (e["encoded"]) e["encoded"] = e["encoded"].toBase64(); + throw(e); + } + }; + + /** + * Returns the message as a base64 encoded string. This is an alias for {@link ProtoBuf.Builder.Message#encode64}. + * @name ProtoBuf.Builder.Message#toBase64 + * @function + * @return {string} Base64 encoded string + * @throws {Error} If the message cannot be encoded or if required fields are missing. The later still + * returns the encoded base64 string in the `encoded` property on the error. + * @expose + */ + MessagePrototype.toBase64 = MessagePrototype.encode64; + + /** + * Directly encodes the message to a hex encoded string. + * @name ProtoBuf.Builder.Message#encodeHex + * @function + * @return {string} Hex encoded string + * @throws {Error} If the underlying buffer cannot be encoded or if required fields are missing. The later + * still returns the encoded hex string in the `encoded` property on the error. + * @expose + */ + MessagePrototype.encodeHex = function() { + try { + return this.encode().toHex(); + } catch (e) { + if (e["encoded"]) e["encoded"] = e["encoded"].toHex(); + throw(e); + } + }; + + /** + * Returns the message as a hex encoded string. This is an alias for {@link ProtoBuf.Builder.Message#encodeHex}. + * @name ProtoBuf.Builder.Message#toHex + * @function + * @return {string} Hex encoded string + * @throws {Error} If the message cannot be encoded or if required fields are missing. The later still + * returns the encoded hex string in the `encoded` property on the error. + * @expose + */ + MessagePrototype.toHex = MessagePrototype.encodeHex; + + /** + * Clones a message object or field value to a raw object. + * @param {*} obj Object to clone + * @param {boolean} binaryAsBase64 Whether to include binary data as base64 strings or as a buffer otherwise + * @param {boolean} longsAsStrings Whether to encode longs as strings + * @param {!ProtoBuf.Reflect.T=} resolvedType The resolved field type if a field + * @returns {*} Cloned object + * @inner + */ + function cloneRaw(obj, binaryAsBase64, longsAsStrings, resolvedType) { + if (obj === null || typeof obj !== 'object') { + // Convert enum values to their respective names + if (resolvedType && resolvedType instanceof ProtoBuf.Reflect.Enum) { + var name = ProtoBuf.Reflect.Enum.getName(resolvedType.object, obj); + if (name !== null) + return name; + } + // Pass-through string, number, boolean, null... + return obj; + } + // Convert ByteBuffers to raw buffer or strings + if (ByteBuffer.isByteBuffer(obj)) + return binaryAsBase64 ? obj.toBase64() : obj.toBuffer(); + // Convert Longs to proper objects or strings + if (ProtoBuf.Long.isLong(obj)) + return longsAsStrings ? obj.toString() : ProtoBuf.Long.fromValue(obj); + var clone; + // Clone arrays + if (Array.isArray(obj)) { + clone = []; + obj.forEach(function(v, k) { + clone[k] = cloneRaw(v, binaryAsBase64, longsAsStrings, resolvedType); + }); + return clone; + } + clone = {}; + // Convert maps to objects + if (obj instanceof ProtoBuf.Map) { + var it = obj.entries(); + for (var e = it.next(); !e.done; e = it.next()) + clone[obj.keyElem.valueToString(e.value[0])] = cloneRaw(e.value[1], binaryAsBase64, longsAsStrings, obj.valueElem.resolvedType); + return clone; + } + // Everything else is a non-null object + var type = obj.$type, + field = undefined; + for (var i in obj) + if (obj.hasOwnProperty(i)) { + if (type && (field = type.getChild(i))) + clone[i] = cloneRaw(obj[i], binaryAsBase64, longsAsStrings, field.resolvedType); + else + clone[i] = cloneRaw(obj[i], binaryAsBase64, longsAsStrings); + } + return clone; + } + + /** + * Returns the message's raw payload. + * @param {boolean=} binaryAsBase64 Whether to include binary data as base64 strings instead of Buffers, defaults to `false` + * @param {boolean} longsAsStrings Whether to encode longs as strings + * @returns {Object.} Raw payload + * @expose + */ + MessagePrototype.toRaw = function(binaryAsBase64, longsAsStrings) { + return cloneRaw(this, !!binaryAsBase64, !!longsAsStrings, this.$type); + }; + + /** + * Encodes a message to JSON. + * @returns {string} JSON string + * @expose + */ + MessagePrototype.encodeJSON = function() { + return JSON.stringify( + cloneRaw(this, + /* binary-as-base64 */ true, + /* longs-as-strings */ true, + this.$type + ) + ); + }; + + /** + * Decodes a message from the specified buffer or string. + * @name ProtoBuf.Builder.Message.decode + * @function + * @param {!ByteBuffer|!ArrayBuffer|!Buffer|string} buffer Buffer to decode from + * @param {(number|string)=} length Message length. Defaults to decode all the remainig data. + * @param {string=} enc Encoding if buffer is a string: hex, utf8 (not recommended), defaults to base64 + * @return {!ProtoBuf.Builder.Message} Decoded message + * @throws {Error} If the message cannot be decoded or if required fields are missing. The later still + * returns the decoded message with missing fields in the `decoded` property on the error. + * @expose + * @see ProtoBuf.Builder.Message.decode64 + * @see ProtoBuf.Builder.Message.decodeHex + */ + Message.decode = function(buffer, length, enc) { + if (typeof length === 'string') + enc = length, + length = -1; + if (typeof buffer === 'string') + buffer = ByteBuffer.wrap(buffer, enc ? enc : "base64"); + else if (!ByteBuffer.isByteBuffer(buffer)) + buffer = ByteBuffer.wrap(buffer); // May throw + var le = buffer.littleEndian; + try { + var msg = T.decode(buffer.LE(), length); + buffer.LE(le); + return msg; + } catch (e) { + buffer.LE(le); + throw(e); + } + }; + + /** + * Decodes a varint32 length-delimited message from the specified buffer or string. + * @name ProtoBuf.Builder.Message.decodeDelimited + * @function + * @param {!ByteBuffer|!ArrayBuffer|!Buffer|string} buffer Buffer to decode from + * @param {string=} enc Encoding if buffer is a string: hex, utf8 (not recommended), defaults to base64 + * @return {ProtoBuf.Builder.Message} Decoded message or `null` if not enough bytes are available yet + * @throws {Error} If the message cannot be decoded or if required fields are missing. The later still + * returns the decoded message with missing fields in the `decoded` property on the error. + * @expose + */ + Message.decodeDelimited = function(buffer, enc) { + if (typeof buffer === 'string') + buffer = ByteBuffer.wrap(buffer, enc ? enc : "base64"); + else if (!ByteBuffer.isByteBuffer(buffer)) + buffer = ByteBuffer.wrap(buffer); // May throw + if (buffer.remaining() < 1) + return null; + var off = buffer.offset, + len = buffer.readVarint32(); + if (buffer.remaining() < len) { + buffer.offset = off; + return null; + } + try { + var msg = T.decode(buffer.slice(buffer.offset, buffer.offset + len).LE()); + buffer.offset += len; + return msg; + } catch (err) { + buffer.offset += len; + throw err; + } + }; + + /** + * Decodes the message from the specified base64 encoded string. + * @name ProtoBuf.Builder.Message.decode64 + * @function + * @param {string} str String to decode from + * @return {!ProtoBuf.Builder.Message} Decoded message + * @throws {Error} If the message cannot be decoded or if required fields are missing. The later still + * returns the decoded message with missing fields in the `decoded` property on the error. + * @expose + */ + Message.decode64 = function(str) { + return Message.decode(str, "base64"); + }; + + /** + * Decodes the message from the specified hex encoded string. + * @name ProtoBuf.Builder.Message.decodeHex + * @function + * @param {string} str String to decode from + * @return {!ProtoBuf.Builder.Message} Decoded message + * @throws {Error} If the message cannot be decoded or if required fields are missing. The later still + * returns the decoded message with missing fields in the `decoded` property on the error. + * @expose + */ + Message.decodeHex = function(str) { + return Message.decode(str, "hex"); + }; + + /** + * Decodes the message from a JSON string. + * @name ProtoBuf.Builder.Message.decodeJSON + * @function + * @param {string} str String to decode from + * @return {!ProtoBuf.Builder.Message} Decoded message + * @throws {Error} If the message cannot be decoded or if required fields are + * missing. + * @expose + */ + Message.decodeJSON = function(str) { + return new Message(JSON.parse(str)); + }; + + // Utility + + /** + * Returns a string representation of this Message. + * @name ProtoBuf.Builder.Message#toString + * @function + * @return {string} String representation as of ".Fully.Qualified.MessageName" + * @expose + */ + MessagePrototype.toString = function() { + return T.toString(); + }; + + // Properties + + /** + * Message options. + * @name ProtoBuf.Builder.Message.$options + * @type {Object.} + * @expose + */ + var $optionsS; // cc needs this + + /** + * Message options. + * @name ProtoBuf.Builder.Message#$options + * @type {Object.} + * @expose + */ + var $options; + + /** + * Reflection type. + * @name ProtoBuf.Builder.Message.$type + * @type {!ProtoBuf.Reflect.Message} + * @expose + */ + var $typeS; + + /** + * Reflection type. + * @name ProtoBuf.Builder.Message#$type + * @type {!ProtoBuf.Reflect.Message} + * @expose + */ + var $type; + + if (Object.defineProperty) + Object.defineProperty(Message, '$options', { "value": T.buildOpt() }), + Object.defineProperty(MessagePrototype, "$options", { "value": Message["$options"] }), + Object.defineProperty(Message, "$type", { "value": T }), + Object.defineProperty(MessagePrototype, "$type", { "value": T }); + + return Message; + + })(ProtoBuf, this); + + // Static enums and prototyped sub-messages / cached collections + this._fields = []; + this._fieldsById = {}; + this._fieldsByName = {}; + this._oneofsByName = {}; + for (var i=0, k=this.children.length, child; i>> 3; + switch (wireType) { + case ProtoBuf.WIRE_TYPES.VARINT: + do tag = buf.readUint8(); + while ((tag & 0x80) === 0x80); + break; + case ProtoBuf.WIRE_TYPES.BITS64: + buf.offset += 8; + break; + case ProtoBuf.WIRE_TYPES.LDELIM: + tag = buf.readVarint32(); // reads the varint + buf.offset += tag; // skips n bytes + break; + case ProtoBuf.WIRE_TYPES.STARTGROUP: + skipTillGroupEnd(id, buf); + break; + case ProtoBuf.WIRE_TYPES.ENDGROUP: + if (id === expectedId) + return false; + else + throw Error("Illegal GROUPEND after unknown group: "+id+" ("+expectedId+" expected)"); + case ProtoBuf.WIRE_TYPES.BITS32: + buf.offset += 4; + break; + default: + throw Error("Illegal wire type in unknown group "+expectedId+": "+wireType); + } + return true; + } + + /** + * Decodes an encoded message and returns the decoded message. + * @param {ByteBuffer} buffer ByteBuffer to decode from + * @param {number=} length Message length. Defaults to decode all remaining data. + * @param {number=} expectedGroupEndId Expected GROUPEND id if this is a legacy group + * @return {ProtoBuf.Builder.Message} Decoded message + * @throws {Error} If the message cannot be decoded + * @expose + */ + MessagePrototype.decode = function(buffer, length, expectedGroupEndId) { + if (typeof length !== 'number') + length = -1; + var start = buffer.offset, + msg = new (this.clazz)(), + tag, wireType, id, field; + while (buffer.offset < start+length || (length === -1 && buffer.remaining() > 0)) { + tag = buffer.readVarint32(); + wireType = tag & 0x07; + id = tag >>> 3; + if (wireType === ProtoBuf.WIRE_TYPES.ENDGROUP) { + if (id !== expectedGroupEndId) + throw Error("Illegal group end indicator for "+this.toString(true)+": "+id+" ("+(expectedGroupEndId ? expectedGroupEndId+" expected" : "not a group")+")"); + break; + } + if (!(field = this._fieldsById[id])) { + // "messages created by your new code can be parsed by your old code: old binaries simply ignore the new field when parsing." + switch (wireType) { + case ProtoBuf.WIRE_TYPES.VARINT: + buffer.readVarint32(); + break; + case ProtoBuf.WIRE_TYPES.BITS32: + buffer.offset += 4; + break; + case ProtoBuf.WIRE_TYPES.BITS64: + buffer.offset += 8; + break; + case ProtoBuf.WIRE_TYPES.LDELIM: + var len = buffer.readVarint32(); + buffer.offset += len; + break; + case ProtoBuf.WIRE_TYPES.STARTGROUP: + while (skipTillGroupEnd(id, buffer)) {} + break; + default: + throw Error("Illegal wire type for unknown field "+id+" in "+this.toString(true)+"#decode: "+wireType); + } + continue; + } + if (field.repeated && !field.options["packed"]) { + msg[field.name].push(field.decode(wireType, buffer)); + } else if (field.map) { + var keyval = field.decode(wireType, buffer); + msg[field.name].set(keyval[0], keyval[1]); + } else { + msg[field.name] = field.decode(wireType, buffer); + if (field.oneof) { // Field is part of an OneOf (not a virtual OneOf field) + var currentField = msg[field.oneof.name]; // Virtual field references currently set field + if (currentField !== null && currentField !== field.name) + msg[currentField] = null; // Clear currently set field + msg[field.oneof.name] = field.name; // Point virtual field at this field + } + } + } + + // Check if all required fields are present and set default values for optional fields that are not + for (var i=0, k=this._fields.length; i=} options Options + * @param {!ProtoBuf.Reflect.Message.OneOf=} oneof Enclosing OneOf + * @param {string?} syntax The syntax level of this definition (e.g., proto3) + * @constructor + * @extends ProtoBuf.Reflect.T + */ + var Field = function(builder, message, rule, keytype, type, name, id, options, oneof, syntax) { + T.call(this, builder, message, name); + + /** + * @override + */ + this.className = "Message.Field"; + + /** + * Message field required flag. + * @type {boolean} + * @expose + */ + this.required = rule === "required"; + + /** + * Message field repeated flag. + * @type {boolean} + * @expose + */ + this.repeated = rule === "repeated"; + + /** + * Message field map flag. + * @type {boolean} + * @expose + */ + this.map = rule === "map"; + + /** + * Message field key type. Type reference string if unresolved, protobuf + * type if resolved. Valid only if this.map === true, null otherwise. + * @type {string|{name: string, wireType: number}|null} + * @expose + */ + this.keyType = keytype || null; + + /** + * Message field type. Type reference string if unresolved, protobuf type if + * resolved. In a map field, this is the value type. + * @type {string|{name: string, wireType: number}} + * @expose + */ + this.type = type; + + /** + * Resolved type reference inside the global namespace. + * @type {ProtoBuf.Reflect.T|null} + * @expose + */ + this.resolvedType = null; + + /** + * Unique message field id. + * @type {number} + * @expose + */ + this.id = id; + + /** + * Message field options. + * @type {!Object.} + * @dict + * @expose + */ + this.options = options || {}; + + /** + * Default value. + * @type {*} + * @expose + */ + this.defaultValue = null; + + /** + * Enclosing OneOf. + * @type {?ProtoBuf.Reflect.Message.OneOf} + * @expose + */ + this.oneof = oneof || null; + + /** + * Syntax level of this definition (e.g., proto3). + * @type {string} + * @expose + */ + this.syntax = syntax || 'proto2'; + + /** + * Original field name. + * @type {string} + * @expose + */ + this.originalName = this.name; // Used to revert camelcase transformation on naming collisions + + /** + * Element implementation. Created in build() after types are resolved. + * @type {ProtoBuf.Element} + * @expose + */ + this.element = null; + + /** + * Key element implementation, for map fields. Created in build() after + * types are resolved. + * @type {ProtoBuf.Element} + * @expose + */ + this.keyElement = null; + + // Convert field names to camel case notation if the override is set + if (this.builder.options['convertFieldsToCamelCase'] && !(this instanceof Message.ExtensionField)) + this.name = ProtoBuf.Util.toCamelCase(this.name); + }; + + /** + * @alias ProtoBuf.Reflect.Message.Field.prototype + * @inner + */ + var FieldPrototype = Field.prototype = Object.create(T.prototype); + + /** + * Builds the field. + * @override + * @expose + */ + FieldPrototype.build = function() { + this.element = new Element(this.type, this.resolvedType, false, this.syntax, this.name); + if (this.map) + this.keyElement = new Element(this.keyType, undefined, true, this.syntax, this.name); + + // In proto3, fields do not have field presence, and every field is set to + // its type's default value ("", 0, 0.0, or false). + if (this.syntax === 'proto3' && !this.repeated && !this.map) + this.defaultValue = Element.defaultFieldValue(this.type); + + // Otherwise, default values are present when explicitly specified + else if (typeof this.options['default'] !== 'undefined') + this.defaultValue = this.verifyValue(this.options['default']); + }; + + /** + * Checks if the given value can be set for this field. + * @param {*} value Value to check + * @param {boolean=} skipRepeated Whether to skip the repeated value check or not. Defaults to false. + * @return {*} Verified, maybe adjusted, value + * @throws {Error} If the value cannot be set for this field + * @expose + */ + FieldPrototype.verifyValue = function(value, skipRepeated) { + skipRepeated = skipRepeated || false; + var self = this; + function fail(val, msg) { + throw Error("Illegal value for "+self.toString(true)+" of type "+self.type.name+": "+val+" ("+msg+")"); + } + if (value === null) { // NULL values for optional fields + if (this.required) + fail(typeof value, "required"); + if (this.syntax === 'proto3' && this.type !== ProtoBuf.TYPES["message"]) + fail(typeof value, "proto3 field without field presence cannot be null"); + return null; + } + var i; + if (this.repeated && !skipRepeated) { // Repeated values as arrays + if (!Array.isArray(value)) + value = [value]; + var res = []; + for (i=0; i 0; + + case ProtoBuf.TYPES["bytes"]: + return value.remaining() > 0; + + case ProtoBuf.TYPES["enum"]: + return value !== 0; + + case ProtoBuf.TYPES["message"]: + return value !== null; + default: + return true; + } + }; + + /** + * Encodes the specified field value to the specified buffer. + * @param {*} value Verified field value + * @param {ByteBuffer} buffer ByteBuffer to encode to + * @param {!ProtoBuf.Builder.Message} message Runtime message + * @return {ByteBuffer} The ByteBuffer for chaining + * @throws {Error} If the field cannot be encoded + * @expose + */ + FieldPrototype.encode = function(value, buffer, message) { + if (this.type === null || typeof this.type !== 'object') + throw Error("[INTERNAL] Unresolved type in "+this.toString(true)+": "+this.type); + if (value === null || (this.repeated && value.length == 0)) + return buffer; // Optional omitted + try { + if (this.repeated) { + var i; + // "Only repeated fields of primitive numeric types (types which use the varint, 32-bit, or 64-bit wire + // types) can be declared 'packed'." + if (this.options["packed"] && ProtoBuf.PACKABLE_WIRE_TYPES.indexOf(this.type.wireType) >= 0) { + // "All of the elements of the field are packed into a single key-value pair with wire type 2 + // (length-delimited). Each element is encoded the same way it would be normally, except without a + // tag preceding it." + buffer.writeVarint32((this.id << 3) | ProtoBuf.WIRE_TYPES.LDELIM); + buffer.ensureCapacity(buffer.offset += 1); // We do not know the length yet, so let's assume a varint of length 1 + var start = buffer.offset; // Remember where the contents begin + for (i=0; i 1) { // We need to move the contents + var contents = buffer.slice(start, buffer.offset); + start += varintLen-1; + buffer.offset = start; + buffer.append(contents); + } + buffer.writeVarint32(len, start-varintLen); + } else { + // "If your message definition has repeated elements (without the [packed=true] option), the encoded + // message has zero or more key-value pairs with the same tag number" + for (i=0; i= 0) { + n += ByteBuffer.calculateVarint32((this.id << 3) | ProtoBuf.WIRE_TYPES.LDELIM); + ni = 0; + for (i=0; i= 0) { + if (!skipRepeated) { + nBytes = buffer.readVarint32(); + nBytes = buffer.offset + nBytes; // Limit + var values = []; + while (buffer.offset < nBytes) + values.push(this.decode(this.type.wireType, buffer, true)); + return values; + } + // Read the next value otherwise... + } + + // Handle maps. + if (this.map) { + // Read one (key, value) submessage, and return [key, value] + var key = Element.defaultFieldValue(this.keyType); + value = Element.defaultFieldValue(this.type); + + // Read the length + nBytes = buffer.readVarint32(); + if (buffer.remaining() < nBytes) + throw Error("Illegal number of bytes for "+this.toString(true)+": "+nBytes+" required but got only "+buffer.remaining()); + + // Get a sub-buffer of this key/value submessage + var msgbuf = buffer.clone(); + msgbuf.limit = msgbuf.offset + nBytes; + buffer.offset += nBytes; + + while (msgbuf.remaining() > 0) { + var tag = msgbuf.readVarint32(); + wireType = tag & 0x07; + var id = tag >>> 3; + if (id === 1) { + key = this.keyElement.decode(msgbuf, wireType, id); + } else if (id === 2) { + value = this.element.decode(msgbuf, wireType, id); + } else { + throw Error("Unexpected tag in map field key/value submessage"); + } + } + + return [key, value]; + } + + // Handle singular and non-packed repeated field values. + return this.element.decode(buffer, wireType, this.id); + }; + + /** + * @alias ProtoBuf.Reflect.Message.Field + * @expose + */ + Reflect.Message.Field = Field; + + /** + * Constructs a new Message ExtensionField. + * @exports ProtoBuf.Reflect.Message.ExtensionField + * @param {!ProtoBuf.Builder} builder Builder reference + * @param {!ProtoBuf.Reflect.Message} message Message reference + * @param {string} rule Rule, one of requried, optional, repeated + * @param {string} type Data type, e.g. int32 + * @param {string} name Field name + * @param {number} id Unique field id + * @param {!Object.=} options Options + * @constructor + * @extends ProtoBuf.Reflect.Message.Field + */ + var ExtensionField = function(builder, message, rule, type, name, id, options) { + Field.call(this, builder, message, rule, /* keytype = */ null, type, name, id, options); + + /** + * Extension reference. + * @type {!ProtoBuf.Reflect.Extension} + * @expose + */ + this.extension; + }; + + // Extends Field + ExtensionField.prototype = Object.create(Field.prototype); + + /** + * @alias ProtoBuf.Reflect.Message.ExtensionField + * @expose + */ + Reflect.Message.ExtensionField = ExtensionField; + + /** + * Constructs a new Message OneOf. + * @exports ProtoBuf.Reflect.Message.OneOf + * @param {!ProtoBuf.Builder} builder Builder reference + * @param {!ProtoBuf.Reflect.Message} message Message reference + * @param {string} name OneOf name + * @constructor + * @extends ProtoBuf.Reflect.T + */ + var OneOf = function(builder, message, name) { + T.call(this, builder, message, name); + + /** + * Enclosed fields. + * @type {!Array.} + * @expose + */ + this.fields = []; + }; + + /** + * @alias ProtoBuf.Reflect.Message.OneOf + * @expose + */ + Reflect.Message.OneOf = OneOf; + + /** + * Constructs a new Enum. + * @exports ProtoBuf.Reflect.Enum + * @param {!ProtoBuf.Builder} builder Builder reference + * @param {!ProtoBuf.Reflect.T} parent Parent Reflect object + * @param {string} name Enum name + * @param {Object.=} options Enum options + * @param {string?} syntax The syntax level (e.g., proto3) + * @constructor + * @extends ProtoBuf.Reflect.Namespace + */ + var Enum = function(builder, parent, name, options, syntax) { + Namespace.call(this, builder, parent, name, options, syntax); + + /** + * @override + */ + this.className = "Enum"; + + /** + * Runtime enum object. + * @type {Object.|null} + * @expose + */ + this.object = null; + }; + + /** + * Gets the string name of an enum value. + * @param {!ProtoBuf.Builder.Enum} enm Runtime enum + * @param {number} value Enum value + * @returns {?string} Name or `null` if not present + * @expose + */ + Enum.getName = function(enm, value) { + var keys = Object.keys(enm); + for (var i=0, key; i} + * @expose + */ + EnumPrototype.build = function(rebuild) { + if (this.object && !rebuild) + return this.object; + var enm = new ProtoBuf.Builder.Enum(), + values = this.getChildren(Enum.Value); + for (var i=0, k=values.length; i=} options Options + * @constructor + * @extends ProtoBuf.Reflect.Namespace + */ + var Service = function(builder, root, name, options) { + Namespace.call(this, builder, root, name, options); + + /** + * @override + */ + this.className = "Service"; + + /** + * Built runtime service class. + * @type {?function(new:ProtoBuf.Builder.Service)} + */ + this.clazz = null; + }; + + /** + * @alias ProtoBuf.Reflect.Service.prototype + * @inner + */ + var ServicePrototype = Service.prototype = Object.create(Namespace.prototype); + + /** + * Builds the service and returns the runtime counterpart, which is a fully functional class. + * @see ProtoBuf.Builder.Service + * @param {boolean=} rebuild Whether to rebuild or not + * @return {Function} Service class + * @throws {Error} If the message cannot be built + * @expose + */ + ServicePrototype.build = function(rebuild) { + if (this.clazz && !rebuild) + return this.clazz; + + // Create the runtime Service class in its own scope + return this.clazz = (function(ProtoBuf, T) { + + /** + * Constructs a new runtime Service. + * @name ProtoBuf.Builder.Service + * @param {function(string, ProtoBuf.Builder.Message, function(Error, ProtoBuf.Builder.Message=))=} rpcImpl RPC implementation receiving the method name and the message + * @class Barebone of all runtime services. + * @constructor + * @throws {Error} If the service cannot be created + */ + var Service = function(rpcImpl) { + ProtoBuf.Builder.Service.call(this); + + /** + * Service implementation. + * @name ProtoBuf.Builder.Service#rpcImpl + * @type {!function(string, ProtoBuf.Builder.Message, function(Error, ProtoBuf.Builder.Message=))} + * @expose + */ + this.rpcImpl = rpcImpl || function(name, msg, callback) { + // This is what a user has to implement: A function receiving the method name, the actual message to + // send (type checked) and the callback that's either provided with the error as its first + // argument or null and the actual response message. + setTimeout(callback.bind(this, Error("Not implemented, see: https://github.com/dcodeIO/ProtoBuf.js/wiki/Services")), 0); // Must be async! + }; + }; + + /** + * @alias ProtoBuf.Builder.Service.prototype + * @inner + */ + var ServicePrototype = Service.prototype = Object.create(ProtoBuf.Builder.Service.prototype); + + /** + * Asynchronously performs an RPC call using the given RPC implementation. + * @name ProtoBuf.Builder.Service.[Method] + * @function + * @param {!function(string, ProtoBuf.Builder.Message, function(Error, ProtoBuf.Builder.Message=))} rpcImpl RPC implementation + * @param {ProtoBuf.Builder.Message} req Request + * @param {function(Error, (ProtoBuf.Builder.Message|ByteBuffer|Buffer|string)=)} callback Callback receiving + * the error if any and the response either as a pre-parsed message or as its raw bytes + * @abstract + */ + + /** + * Asynchronously performs an RPC call using the instance's RPC implementation. + * @name ProtoBuf.Builder.Service#[Method] + * @function + * @param {ProtoBuf.Builder.Message} req Request + * @param {function(Error, (ProtoBuf.Builder.Message|ByteBuffer|Buffer|string)=)} callback Callback receiving + * the error if any and the response either as a pre-parsed message or as its raw bytes + * @abstract + */ + + var rpc = T.getChildren(ProtoBuf.Reflect.Service.RPCMethod); + for (var i=0; i} + * @expose + */ + var $optionsS; // cc needs this + + /** + * Service options. + * @name ProtoBuf.Builder.Service#$options + * @type {Object.} + * @expose + */ + var $options; + + /** + * Reflection type. + * @name ProtoBuf.Builder.Service.$type + * @type {!ProtoBuf.Reflect.Service} + * @expose + */ + var $typeS; + + /** + * Reflection type. + * @name ProtoBuf.Builder.Service#$type + * @type {!ProtoBuf.Reflect.Service} + * @expose + */ + var $type; + + if (Object.defineProperty) + Object.defineProperty(Service, "$options", { "value": T.buildOpt() }), + Object.defineProperty(ServicePrototype, "$options", { "value": Service["$options"] }), + Object.defineProperty(Service, "$type", { "value": T }), + Object.defineProperty(ServicePrototype, "$type", { "value": T }); + + return Service; + + })(ProtoBuf, this); + }; + + /** + * @alias ProtoBuf.Reflect.Service + * @expose + */ + Reflect.Service = Service; + + /** + * Abstract service method. + * @exports ProtoBuf.Reflect.Service.Method + * @param {!ProtoBuf.Builder} builder Builder reference + * @param {!ProtoBuf.Reflect.Service} svc Service + * @param {string} name Method name + * @param {Object.=} options Options + * @constructor + * @extends ProtoBuf.Reflect.T + */ + var Method = function(builder, svc, name, options) { + T.call(this, builder, svc, name); + + /** + * @override + */ + this.className = "Service.Method"; + + /** + * Options. + * @type {Object.} + * @expose + */ + this.options = options || {}; + }; + + /** + * @alias ProtoBuf.Reflect.Service.Method.prototype + * @inner + */ + var MethodPrototype = Method.prototype = Object.create(T.prototype); + + /** + * Builds the method's '$options' property. + * @name ProtoBuf.Reflect.Service.Method#buildOpt + * @function + * @return {Object.} + */ + MethodPrototype.buildOpt = NamespacePrototype.buildOpt; + + /** + * @alias ProtoBuf.Reflect.Service.Method + * @expose + */ + Reflect.Service.Method = Method; + + /** + * RPC service method. + * @exports ProtoBuf.Reflect.Service.RPCMethod + * @param {!ProtoBuf.Builder} builder Builder reference + * @param {!ProtoBuf.Reflect.Service} svc Service + * @param {string} name Method name + * @param {string} request Request message name + * @param {string} response Response message name + * @param {boolean} request_stream Whether requests are streamed + * @param {boolean} response_stream Whether responses are streamed + * @param {Object.=} options Options + * @constructor + * @extends ProtoBuf.Reflect.Service.Method + */ + var RPCMethod = function(builder, svc, name, request, response, request_stream, response_stream, options) { + Method.call(this, builder, svc, name, options); + + /** + * @override + */ + this.className = "Service.RPCMethod"; + + /** + * Request message name. + * @type {string} + * @expose + */ + this.requestName = request; + + /** + * Response message name. + * @type {string} + * @expose + */ + this.responseName = response; + + /** + * Whether requests are streamed + * @type {bool} + * @expose + */ + this.requestStream = request_stream; + + /** + * Whether responses are streamed + * @type {bool} + * @expose + */ + this.responseStream = response_stream; + + /** + * Resolved request message type. + * @type {ProtoBuf.Reflect.Message} + * @expose + */ + this.resolvedRequestType = null; + + /** + * Resolved response message type. + * @type {ProtoBuf.Reflect.Message} + * @expose + */ + this.resolvedResponseType = null; + }; + + // Extends Method + RPCMethod.prototype = Object.create(Method.prototype); + + /** + * @alias ProtoBuf.Reflect.Service.RPCMethod + * @expose + */ + Reflect.Service.RPCMethod = RPCMethod; + + return Reflect; + + })(ProtoBuf); + + /** + * @alias ProtoBuf.Builder + * @expose + */ + ProtoBuf.Builder = (function(ProtoBuf, Lang, Reflect) { + "use strict"; + + /** + * Constructs a new Builder. + * @exports ProtoBuf.Builder + * @class Provides the functionality to build protocol messages. + * @param {Object.=} options Options + * @constructor + */ + var Builder = function(options) { + + /** + * Namespace. + * @type {ProtoBuf.Reflect.Namespace} + * @expose + */ + this.ns = new Reflect.Namespace(this, null, ""); // Global namespace + + /** + * Namespace pointer. + * @type {ProtoBuf.Reflect.T} + * @expose + */ + this.ptr = this.ns; + + /** + * Resolved flag. + * @type {boolean} + * @expose + */ + this.resolved = false; + + /** + * The current building result. + * @type {Object.|null} + * @expose + */ + this.result = null; + + /** + * Imported files. + * @type {Array.} + * @expose + */ + this.files = {}; + + /** + * Import root override. + * @type {?string} + * @expose + */ + this.importRoot = null; + + /** + * Options. + * @type {!Object.} + * @expose + */ + this.options = options || {}; + }; + + /** + * @alias ProtoBuf.Builder.prototype + * @inner + */ + var BuilderPrototype = Builder.prototype; + + // ----- Definition tests ----- + + /** + * Tests if a definition most likely describes a message. + * @param {!Object} def + * @returns {boolean} + * @expose + */ + Builder.isMessage = function(def) { + // Messages require a string name + if (typeof def["name"] !== 'string') + return false; + // Messages do not contain values (enum) or rpc methods (service) + if (typeof def["values"] !== 'undefined' || typeof def["rpc"] !== 'undefined') + return false; + return true; + }; + + /** + * Tests if a definition most likely describes a message field. + * @param {!Object} def + * @returns {boolean} + * @expose + */ + Builder.isMessageField = function(def) { + // Message fields require a string rule, name and type and an id + if (typeof def["rule"] !== 'string' || typeof def["name"] !== 'string' || typeof def["type"] !== 'string' || typeof def["id"] === 'undefined') + return false; + return true; + }; + + /** + * Tests if a definition most likely describes an enum. + * @param {!Object} def + * @returns {boolean} + * @expose + */ + Builder.isEnum = function(def) { + // Enums require a string name + if (typeof def["name"] !== 'string') + return false; + // Enums require at least one value + if (typeof def["values"] === 'undefined' || !Array.isArray(def["values"]) || def["values"].length === 0) + return false; + return true; + }; + + /** + * Tests if a definition most likely describes a service. + * @param {!Object} def + * @returns {boolean} + * @expose + */ + Builder.isService = function(def) { + // Services require a string name and an rpc object + if (typeof def["name"] !== 'string' || typeof def["rpc"] !== 'object' || !def["rpc"]) + return false; + return true; + }; + + /** + * Tests if a definition most likely describes an extended message + * @param {!Object} def + * @returns {boolean} + * @expose + */ + Builder.isExtend = function(def) { + // Extends rquire a string ref + if (typeof def["ref"] !== 'string') + return false; + return true; + }; + + // ----- Building ----- + + /** + * Resets the pointer to the root namespace. + * @returns {!ProtoBuf.Builder} this + * @expose + */ + BuilderPrototype.reset = function() { + this.ptr = this.ns; + return this; + }; + + /** + * Defines a namespace on top of the current pointer position and places the pointer on it. + * @param {string} namespace + * @return {!ProtoBuf.Builder} this + * @expose + */ + BuilderPrototype.define = function(namespace) { + if (typeof namespace !== 'string' || !Lang.TYPEREF.test(namespace)) + throw Error("illegal namespace: "+namespace); + namespace.split(".").forEach(function(part) { + var ns = this.ptr.getChild(part); + if (ns === null) // Keep existing + this.ptr.addChild(ns = new Reflect.Namespace(this, this.ptr, part)); + this.ptr = ns; + }, this); + return this; + }; + + /** + * Creates the specified definitions at the current pointer position. + * @param {!Array.} defs Messages, enums or services to create + * @returns {!ProtoBuf.Builder} this + * @throws {Error} If a message definition is invalid + * @expose + */ + BuilderPrototype.create = function(defs) { + if (!defs) + return this; // Nothing to create + if (!Array.isArray(defs)) + defs = [defs]; + else { + if (defs.length === 0) + return this; + defs = defs.slice(); + } + + // It's quite hard to keep track of scopes and memory here, so let's do this iteratively. + var stack = [defs]; + while (stack.length > 0) { + defs = stack.pop(); + + if (!Array.isArray(defs)) // Stack always contains entire namespaces + throw Error("not a valid namespace: "+JSON.stringify(defs)); + + while (defs.length > 0) { + var def = defs.shift(); // Namespaces always contain an array of messages, enums and services + + if (Builder.isMessage(def)) { + var obj = new Reflect.Message(this, this.ptr, def["name"], def["options"], def["isGroup"], def["syntax"]); + + // Create OneOfs + var oneofs = {}; + if (def["oneofs"]) + Object.keys(def["oneofs"]).forEach(function(name) { + obj.addChild(oneofs[name] = new Reflect.Message.OneOf(this, obj, name)); + }, this); + + // Create fields + if (def["fields"]) + def["fields"].forEach(function(fld) { + if (obj.getChild(fld["id"]|0) !== null) + throw Error("duplicate or invalid field id in "+obj.name+": "+fld['id']); + if (fld["options"] && typeof fld["options"] !== 'object') + throw Error("illegal field options in "+obj.name+"#"+fld["name"]); + var oneof = null; + if (typeof fld["oneof"] === 'string' && !(oneof = oneofs[fld["oneof"]])) + throw Error("illegal oneof in "+obj.name+"#"+fld["name"]+": "+fld["oneof"]); + fld = new Reflect.Message.Field(this, obj, fld["rule"], fld["keytype"], fld["type"], fld["name"], fld["id"], fld["options"], oneof, def["syntax"]); + if (oneof) + oneof.fields.push(fld); + obj.addChild(fld); + }, this); + + // Push children to stack + var subObj = []; + if (def["enums"]) + def["enums"].forEach(function(enm) { + subObj.push(enm); + }); + if (def["messages"]) + def["messages"].forEach(function(msg) { + subObj.push(msg); + }); + if (def["services"]) + def["services"].forEach(function(svc) { + subObj.push(svc); + }); + + // Set extension ranges + if (def["extensions"]) { + if (typeof def["extensions"][0] === 'number') // pre 5.0.1 + obj.extensions = [ def["extensions"] ]; + else + obj.extensions = def["extensions"]; + } + + // Create on top of current namespace + this.ptr.addChild(obj); + if (subObj.length > 0) { + stack.push(defs); // Push the current level back + defs = subObj; // Continue processing sub level + subObj = null; + this.ptr = obj; // And move the pointer to this namespace + obj = null; + continue; + } + subObj = null; + + } else if (Builder.isEnum(def)) { + + obj = new Reflect.Enum(this, this.ptr, def["name"], def["options"], def["syntax"]); + def["values"].forEach(function(val) { + obj.addChild(new Reflect.Enum.Value(this, obj, val["name"], val["id"])); + }, this); + this.ptr.addChild(obj); + + } else if (Builder.isService(def)) { + + obj = new Reflect.Service(this, this.ptr, def["name"], def["options"]); + Object.keys(def["rpc"]).forEach(function(name) { + var mtd = def["rpc"][name]; + obj.addChild(new Reflect.Service.RPCMethod(this, obj, name, mtd["request"], mtd["response"], !!mtd["request_stream"], !!mtd["response_stream"], mtd["options"])); + }, this); + this.ptr.addChild(obj); + + } else if (Builder.isExtend(def)) { + + obj = this.ptr.resolve(def["ref"], true); + if (obj) { + def["fields"].forEach(function(fld) { + if (obj.getChild(fld['id']|0) !== null) + throw Error("duplicate extended field id in "+obj.name+": "+fld['id']); + // Check if field id is allowed to be extended + if (obj.extensions) { + var valid = false; + obj.extensions.forEach(function(range) { + if (fld["id"] >= range[0] && fld["id"] <= range[1]) + valid = true; + }); + if (!valid) + throw Error("illegal extended field id in "+obj.name+": "+fld['id']+" (not within valid ranges)"); + } + // Convert extension field names to camel case notation if the override is set + var name = fld["name"]; + if (this.options['convertFieldsToCamelCase']) + name = ProtoBuf.Util.toCamelCase(name); + // see #161: Extensions use their fully qualified name as their runtime key and... + var field = new Reflect.Message.ExtensionField(this, obj, fld["rule"], fld["type"], this.ptr.fqn()+'.'+name, fld["id"], fld["options"]); + // ...are added on top of the current namespace as an extension which is used for + // resolving their type later on (the extension always keeps the original name to + // prevent naming collisions) + var ext = new Reflect.Extension(this, this.ptr, fld["name"], field); + field.extension = ext; + this.ptr.addChild(ext); + obj.addChild(field); + }, this); + + } else if (!/\.?google\.protobuf\./.test(def["ref"])) // Silently skip internal extensions + throw Error("extended message "+def["ref"]+" is not defined"); + + } else + throw Error("not a valid definition: "+JSON.stringify(def)); + + def = null; + obj = null; + } + // Break goes here + defs = null; + this.ptr = this.ptr.parent; // Namespace done, continue at parent + } + this.resolved = false; // Require re-resolve + this.result = null; // Require re-build + return this; + }; + + /** + * Propagates syntax to all children. + * @param {!Object} parent + * @inner + */ + function propagateSyntax(parent) { + if (parent['messages']) { + parent['messages'].forEach(function(child) { + child["syntax"] = parent["syntax"]; + propagateSyntax(child); + }); + } + if (parent['enums']) { + parent['enums'].forEach(function(child) { + child["syntax"] = parent["syntax"]; + }); + } + } + + /** + * Imports another definition into this builder. + * @param {Object.} json Parsed import + * @param {(string|{root: string, file: string})=} filename Imported file name + * @returns {!ProtoBuf.Builder} this + * @throws {Error} If the definition or file cannot be imported + * @expose + */ + BuilderPrototype["import"] = function(json, filename) { + var delim = '/'; + + // Make sure to skip duplicate imports + + if (typeof filename === 'string') { + + if (ProtoBuf.Util.IS_NODE) + filename = require$$2['resolve'](filename); + if (this.files[filename] === true) + return this.reset(); + this.files[filename] = true; + + } else if (typeof filename === 'object') { // Object with root, file. + + var root = filename.root; + if (ProtoBuf.Util.IS_NODE) + root = require$$2['resolve'](root); + if (root.indexOf("\\") >= 0 || filename.file.indexOf("\\") >= 0) + delim = '\\'; + var fname; + if (ProtoBuf.Util.IS_NODE) + fname = require$$2['join'](root, filename.file); + else + fname = root + delim + filename.file; + if (this.files[fname] === true) + return this.reset(); + this.files[fname] = true; + } + + // Import imports + + if (json['imports'] && json['imports'].length > 0) { + var importRoot, + resetRoot = false; + + if (typeof filename === 'object') { // If an import root is specified, override + + this.importRoot = filename["root"]; resetRoot = true; // ... and reset afterwards + importRoot = this.importRoot; + filename = filename["file"]; + if (importRoot.indexOf("\\") >= 0 || filename.indexOf("\\") >= 0) + delim = '\\'; + + } else if (typeof filename === 'string') { + + if (this.importRoot) // If import root is overridden, use it + importRoot = this.importRoot; + else { // Otherwise compute from filename + if (filename.indexOf("/") >= 0) { // Unix + importRoot = filename.replace(/\/[^\/]*$/, ""); + if (/* /file.proto */ importRoot === "") + importRoot = "/"; + } else if (filename.indexOf("\\") >= 0) { // Windows + importRoot = filename.replace(/\\[^\\]*$/, ""); + delim = '\\'; + } else + importRoot = "."; + } + + } else + importRoot = null; + + for (var i=0; i)=} path Specifies what to return. If omitted, the entire namespace will be returned. + * @returns {!ProtoBuf.Builder.Message|!Object.} + * @throws {Error} If a type could not be resolved + * @expose + */ + BuilderPrototype.build = function(path) { + this.reset(); + if (!this.resolved) + this.resolveAll(), + this.resolved = true, + this.result = null; // Require re-build + if (this.result === null) // (Re-)Build + this.result = this.ns.build(); + if (!path) + return this.result; + var part = typeof path === 'string' ? path.split(".") : path, + ptr = this.result; // Build namespace pointer (no hasChild etc.) + for (var i=0; i=} contents Initial contents + * @constructor + */ + var Map = function(field, contents) { + if (!field.map) + throw Error("field is not a map"); + + /** + * The field corresponding to this map. + * @type {!ProtoBuf.Reflect.Field} + */ + this.field = field; + + /** + * Element instance corresponding to key type. + * @type {!ProtoBuf.Reflect.Element} + */ + this.keyElem = new Reflect.Element(field.keyType, null, true, field.syntax); + + /** + * Element instance corresponding to value type. + * @type {!ProtoBuf.Reflect.Element} + */ + this.valueElem = new Reflect.Element(field.type, field.resolvedType, false, field.syntax); + + /** + * Internal map: stores mapping of (string form of key) -> (key, value) + * pair. + * + * We provide map semantics for arbitrary key types, but we build on top + * of an Object, which has only string keys. In order to avoid the need + * to convert a string key back to its native type in many situations, + * we store the native key value alongside the value. Thus, we only need + * a one-way mapping from a key type to its string form that guarantees + * uniqueness and equality (i.e., str(K1) === str(K2) if and only if K1 + * === K2). + * + * @type {!Object} + */ + this.map = {}; + + /** + * Returns the number of elements in the map. + */ + Object.defineProperty(this, "size", { + get: function() { return Object.keys(this.map).length; } + }); + + // Fill initial contents from a raw object. + if (contents) { + var keys = Object.keys(contents); + for (var i = 0; i < keys.length; i++) { + var key = this.keyElem.valueFromString(keys[i]); + var val = this.valueElem.verifyValue(contents[keys[i]]); + this.map[this.keyElem.valueToString(key)] = + { key: key, value: val }; + } + } + }; + + var MapPrototype = Map.prototype; + + /** + * Helper: return an iterator over an array. + * @param {!Array<*>} arr the array + * @returns {!Object} an iterator + * @inner + */ + function arrayIterator(arr) { + var idx = 0; + return { + next: function() { + if (idx < arr.length) + return { done: false, value: arr[idx++] }; + return { done: true }; + } + } + } + + /** + * Clears the map. + */ + MapPrototype.clear = function() { + this.map = {}; + }; + + /** + * Deletes a particular key from the map. + * @returns {boolean} Whether any entry with this key was deleted. + */ + MapPrototype["delete"] = function(key) { + var keyValue = this.keyElem.valueToString(this.keyElem.verifyValue(key)); + var hadKey = keyValue in this.map; + delete this.map[keyValue]; + return hadKey; + }; + + /** + * Returns an iterator over [key, value] pairs in the map. + * @returns {Object} The iterator + */ + MapPrototype.entries = function() { + var entries = []; + var strKeys = Object.keys(this.map); + for (var i = 0, entry; i < strKeys.length; i++) + entries.push([(entry=this.map[strKeys[i]]).key, entry.value]); + return arrayIterator(entries); + }; + + /** + * Returns an iterator over keys in the map. + * @returns {Object} The iterator + */ + MapPrototype.keys = function() { + var keys = []; + var strKeys = Object.keys(this.map); + for (var i = 0; i < strKeys.length; i++) + keys.push(this.map[strKeys[i]].key); + return arrayIterator(keys); + }; + + /** + * Returns an iterator over values in the map. + * @returns {!Object} The iterator + */ + MapPrototype.values = function() { + var values = []; + var strKeys = Object.keys(this.map); + for (var i = 0; i < strKeys.length; i++) + values.push(this.map[strKeys[i]].value); + return arrayIterator(values); + }; + + /** + * Iterates over entries in the map, calling a function on each. + * @param {function(this:*, *, *, *)} cb The callback to invoke with value, key, and map arguments. + * @param {Object=} thisArg The `this` value for the callback + */ + MapPrototype.forEach = function(cb, thisArg) { + var strKeys = Object.keys(this.map); + for (var i = 0, entry; i < strKeys.length; i++) + cb.call(thisArg, (entry=this.map[strKeys[i]]).value, entry.key, this); + }; + + /** + * Sets a key in the map to the given value. + * @param {*} key The key + * @param {*} value The value + * @returns {!ProtoBuf.Map} The map instance + */ + MapPrototype.set = function(key, value) { + var keyValue = this.keyElem.verifyValue(key); + var valValue = this.valueElem.verifyValue(value); + this.map[this.keyElem.valueToString(keyValue)] = + { key: keyValue, value: valValue }; + return this; + }; + + /** + * Gets the value corresponding to a key in the map. + * @param {*} key The key + * @returns {*|undefined} The value, or `undefined` if key not present + */ + MapPrototype.get = function(key) { + var keyValue = this.keyElem.valueToString(this.keyElem.verifyValue(key)); + if (!(keyValue in this.map)) + return undefined; + return this.map[keyValue].value; + }; + + /** + * Determines whether the given key is present in the map. + * @param {*} key The key + * @returns {boolean} `true` if the key is present + */ + MapPrototype.has = function(key) { + var keyValue = this.keyElem.valueToString(this.keyElem.verifyValue(key)); + return (keyValue in this.map); + }; + + return Map; + })(ProtoBuf, ProtoBuf.Reflect); + + + /** + * Constructs a new empty Builder. + * @param {Object.=} options Builder options, defaults to global options set on ProtoBuf + * @return {!ProtoBuf.Builder} Builder + * @expose + */ + ProtoBuf.newBuilder = function(options) { + options = options || {}; + if (typeof options['convertFieldsToCamelCase'] === 'undefined') + options['convertFieldsToCamelCase'] = ProtoBuf.convertFieldsToCamelCase; + if (typeof options['populateAccessors'] === 'undefined') + options['populateAccessors'] = ProtoBuf.populateAccessors; + return new ProtoBuf.Builder(options); + }; + + /** + * Loads a .json definition and returns the Builder. + * @param {!*|string} json JSON definition + * @param {(ProtoBuf.Builder|string|{root: string, file: string})=} builder Builder to append to. Will create a new one if omitted. + * @param {(string|{root: string, file: string})=} filename The corresponding file name if known. Must be specified for imports. + * @return {ProtoBuf.Builder} Builder to create new messages + * @throws {Error} If the definition cannot be parsed or built + * @expose + */ + ProtoBuf.loadJson = function(json, builder, filename) { + if (typeof builder === 'string' || (builder && typeof builder["file"] === 'string' && typeof builder["root"] === 'string')) + filename = builder, + builder = null; + if (!builder || typeof builder !== 'object') + builder = ProtoBuf.newBuilder(); + if (typeof json === 'string') + json = JSON.parse(json); + builder["import"](json, filename); + builder.resolveAll(); + return builder; + }; + + /** + * Loads a .json file and returns the Builder. + * @param {string|!{root: string, file: string}} filename Path to json file or an object specifying 'file' with + * an overridden 'root' path for all imported files. + * @param {function(?Error, !ProtoBuf.Builder=)=} callback Callback that will receive `null` as the first and + * the Builder as its second argument on success, otherwise the error as its first argument. If omitted, the + * file will be read synchronously and this function will return the Builder. + * @param {ProtoBuf.Builder=} builder Builder to append to. Will create a new one if omitted. + * @return {?ProtoBuf.Builder|undefined} The Builder if synchronous (no callback specified, will be NULL if the + * request has failed), else undefined + * @expose + */ + ProtoBuf.loadJsonFile = function(filename, callback, builder) { + if (callback && typeof callback === 'object') + builder = callback, + callback = null; + else if (!callback || typeof callback !== 'function') + callback = null; + if (callback) + return ProtoBuf.Util.fetch(typeof filename === 'string' ? filename : filename["root"]+"/"+filename["file"], function(contents) { + if (contents === null) { + callback(Error("Failed to fetch file")); + return; + } + try { + callback(null, ProtoBuf.loadJson(JSON.parse(contents), builder, filename)); + } catch (e) { + callback(e); + } + }); + var contents = ProtoBuf.Util.fetch(typeof filename === 'object' ? filename["root"]+"/"+filename["file"] : filename); + return contents === null ? null : ProtoBuf.loadJson(JSON.parse(contents), builder, filename); + }; + + return ProtoBuf; + }); + }); + + var messageCompiled = protobufLight.newBuilder({})['import']({ + "package": "push_server.messages2", + "syntax": "proto2", + "options": { + "objc_class_prefix": "AVIM" + }, + "messages": [{ + "name": "JsonObjectMessage", + "syntax": "proto2", + "fields": [{ + "rule": "required", + "type": "string", + "name": "data", + "id": 1 + }] + }, { + "name": "UnreadTuple", + "syntax": "proto2", + "fields": [{ + "rule": "required", + "type": "string", + "name": "cid", + "id": 1 + }, { + "rule": "required", + "type": "int32", + "name": "unread", + "id": 2 + }, { + "rule": "optional", + "type": "string", + "name": "mid", + "id": 3 + }, { + "rule": "optional", + "type": "int64", + "name": "timestamp", + "id": 4 + }, { + "rule": "optional", + "type": "string", + "name": "from", + "id": 5 + }, { + "rule": "optional", + "type": "string", + "name": "data", + "id": 6 + }, { + "rule": "optional", + "type": "int64", + "name": "patchTimestamp", + "id": 7 + }] + }, { + "name": "LogItem", + "syntax": "proto2", + "fields": [{ + "rule": "optional", + "type": "string", + "name": "from", + "id": 1 + }, { + "rule": "optional", + "type": "string", + "name": "data", + "id": 2 + }, { + "rule": "optional", + "type": "int64", + "name": "timestamp", + "id": 3 + }, { + "rule": "optional", + "type": "string", + "name": "msgId", + "id": 4 + }, { + "rule": "optional", + "type": "int64", + "name": "ackAt", + "id": 5 + }, { + "rule": "optional", + "type": "int64", + "name": "readAt", + "id": 6 + }, { + "rule": "optional", + "type": "int64", + "name": "patchTimestamp", + "id": 7 + }] + }, { + "name": "DataCommand", + "syntax": "proto2", + "fields": [{ + "rule": "repeated", + "type": "string", + "name": "ids", + "id": 1 + }, { + "rule": "repeated", + "type": "JsonObjectMessage", + "name": "msg", + "id": 2 + }, { + "rule": "optional", + "type": "bool", + "name": "offline", + "id": 3 + }] + }, { + "name": "SessionCommand", + "syntax": "proto2", + "fields": [{ + "rule": "optional", + "type": "int64", + "name": "t", + "id": 1 + }, { + "rule": "optional", + "type": "string", + "name": "n", + "id": 2 + }, { + "rule": "optional", + "type": "string", + "name": "s", + "id": 3 + }, { + "rule": "optional", + "type": "string", + "name": "ua", + "id": 4 + }, { + "rule": "optional", + "type": "bool", + "name": "r", + "id": 5 + }, { + "rule": "optional", + "type": "string", + "name": "tag", + "id": 6 + }, { + "rule": "optional", + "type": "string", + "name": "deviceId", + "id": 7 + }, { + "rule": "repeated", + "type": "string", + "name": "sessionPeerIds", + "id": 8 + }, { + "rule": "repeated", + "type": "string", + "name": "onlineSessionPeerIds", + "id": 9 + }, { + "rule": "optional", + "type": "string", + "name": "st", + "id": 10 + }, { + "rule": "optional", + "type": "int32", + "name": "stTtl", + "id": 11 + }, { + "rule": "optional", + "type": "int32", + "name": "code", + "id": 12 + }, { + "rule": "optional", + "type": "string", + "name": "reason", + "id": 13 + }, { + "rule": "optional", + "type": "string", + "name": "deviceToken", + "id": 14 + }, { + "rule": "optional", + "type": "bool", + "name": "sp", + "id": 15 + }, { + "rule": "optional", + "type": "string", + "name": "detail", + "id": 16 + }, { + "rule": "optional", + "type": "int64", + "name": "lastUnreadNotifTime", + "id": 17 + }, { + "rule": "optional", + "type": "int64", + "name": "lastPatchTime", + "id": 18 + }, { + "rule": "optional", + "type": "int64", + "name": "configBitmap", + "id": 19 + }] + }, { + "name": "ErrorCommand", + "syntax": "proto2", + "fields": [{ + "rule": "required", + "type": "int32", + "name": "code", + "id": 1 + }, { + "rule": "required", + "type": "string", + "name": "reason", + "id": 2 + }, { + "rule": "optional", + "type": "int32", + "name": "appCode", + "id": 3 + }, { + "rule": "optional", + "type": "string", + "name": "detail", + "id": 4 + }] + }, { + "name": "DirectCommand", + "syntax": "proto2", + "fields": [{ + "rule": "optional", + "type": "string", + "name": "msg", + "id": 1 + }, { + "rule": "optional", + "type": "string", + "name": "uid", + "id": 2 + }, { + "rule": "optional", + "type": "string", + "name": "fromPeerId", + "id": 3 + }, { + "rule": "optional", + "type": "int64", + "name": "timestamp", + "id": 4 + }, { + "rule": "optional", + "type": "bool", + "name": "offline", + "id": 5 + }, { + "rule": "optional", + "type": "bool", + "name": "hasMore", + "id": 6 + }, { + "rule": "repeated", + "type": "string", + "name": "toPeerIds", + "id": 7 + }, { + "rule": "optional", + "type": "bool", + "name": "r", + "id": 10 + }, { + "rule": "optional", + "type": "string", + "name": "cid", + "id": 11 + }, { + "rule": "optional", + "type": "string", + "name": "id", + "id": 12 + }, { + "rule": "optional", + "type": "bool", + "name": "transient", + "id": 13 + }, { + "rule": "optional", + "type": "string", + "name": "dt", + "id": 14 + }, { + "rule": "optional", + "type": "string", + "name": "roomId", + "id": 15 + }, { + "rule": "optional", + "type": "string", + "name": "pushData", + "id": 16 + }, { + "rule": "optional", + "type": "bool", + "name": "will", + "id": 17 + }, { + "rule": "optional", + "type": "int64", + "name": "patchTimestamp", + "id": 18 + }] + }, { + "name": "AckCommand", + "syntax": "proto2", + "fields": [{ + "rule": "optional", + "type": "int32", + "name": "code", + "id": 1 + }, { + "rule": "optional", + "type": "string", + "name": "reason", + "id": 2 + }, { + "rule": "optional", + "type": "string", + "name": "mid", + "id": 3 + }, { + "rule": "optional", + "type": "string", + "name": "cid", + "id": 4 + }, { + "rule": "optional", + "type": "int64", + "name": "t", + "id": 5 + }, { + "rule": "optional", + "type": "string", + "name": "uid", + "id": 6 + }, { + "rule": "optional", + "type": "int64", + "name": "fromts", + "id": 7 + }, { + "rule": "optional", + "type": "int64", + "name": "tots", + "id": 8 + }, { + "rule": "optional", + "type": "string", + "name": "type", + "id": 9 + }, { + "rule": "repeated", + "type": "string", + "name": "ids", + "id": 10 + }, { + "rule": "optional", + "type": "int32", + "name": "appCode", + "id": 11 + }] + }, { + "name": "UnreadCommand", + "syntax": "proto2", + "fields": [{ + "rule": "repeated", + "type": "UnreadTuple", + "name": "convs", + "id": 1 + }, { + "rule": "optional", + "type": "int64", + "name": "notifTime", + "id": 2 + }] + }, { + "name": "ConvCommand", + "syntax": "proto2", + "fields": [{ + "rule": "repeated", + "type": "string", + "name": "m", + "id": 1 + }, { + "rule": "optional", + "type": "bool", + "name": "transient", + "id": 2 + }, { + "rule": "optional", + "type": "bool", + "name": "unique", + "id": 3 + }, { + "rule": "optional", + "type": "string", + "name": "cid", + "id": 4 + }, { + "rule": "optional", + "type": "string", + "name": "cdate", + "id": 5 + }, { + "rule": "optional", + "type": "string", + "name": "initBy", + "id": 6 + }, { + "rule": "optional", + "type": "string", + "name": "sort", + "id": 7 + }, { + "rule": "optional", + "type": "int32", + "name": "limit", + "id": 8 + }, { + "rule": "optional", + "type": "int32", + "name": "skip", + "id": 9 + }, { + "rule": "optional", + "type": "int32", + "name": "flag", + "id": 10 + }, { + "rule": "optional", + "type": "int32", + "name": "count", + "id": 11 + }, { + "rule": "optional", + "type": "string", + "name": "udate", + "id": 12 + }, { + "rule": "optional", + "type": "int64", + "name": "t", + "id": 13 + }, { + "rule": "optional", + "type": "string", + "name": "n", + "id": 14 + }, { + "rule": "optional", + "type": "string", + "name": "s", + "id": 15 + }, { + "rule": "optional", + "type": "bool", + "name": "statusSub", + "id": 16 + }, { + "rule": "optional", + "type": "bool", + "name": "statusPub", + "id": 17 + }, { + "rule": "optional", + "type": "int32", + "name": "statusTTL", + "id": 18 + }, { + "rule": "optional", + "type": "string", + "name": "uniqueId", + "id": 19 + }, { + "rule": "optional", + "type": "string", + "name": "targetClientId", + "id": 20 + }, { + "rule": "optional", + "type": "int64", + "name": "maxReadTimestamp", + "id": 21 + }, { + "rule": "optional", + "type": "int64", + "name": "maxAckTimestamp", + "id": 22 + }, { + "rule": "optional", + "type": "bool", + "name": "queryAllMembers", + "id": 23 + }, { + "rule": "repeated", + "type": "MaxReadTuple", + "name": "maxReadTuples", + "id": 24 + }, { + "rule": "repeated", + "type": "string", + "name": "cids", + "id": 25 + }, { + "rule": "optional", + "type": "JsonObjectMessage", + "name": "results", + "id": 100 + }, { + "rule": "optional", + "type": "JsonObjectMessage", + "name": "where", + "id": 101 + }, { + "rule": "optional", + "type": "JsonObjectMessage", + "name": "attr", + "id": 103 + }] + }, { + "name": "RoomCommand", + "syntax": "proto2", + "fields": [{ + "rule": "optional", + "type": "string", + "name": "roomId", + "id": 1 + }, { + "rule": "optional", + "type": "string", + "name": "s", + "id": 2 + }, { + "rule": "optional", + "type": "int64", + "name": "t", + "id": 3 + }, { + "rule": "optional", + "type": "string", + "name": "n", + "id": 4 + }, { + "rule": "optional", + "type": "bool", + "name": "transient", + "id": 5 + }, { + "rule": "repeated", + "type": "string", + "name": "roomPeerIds", + "id": 6 + }, { + "rule": "optional", + "type": "string", + "name": "byPeerId", + "id": 7 + }] + }, { + "name": "LogsCommand", + "syntax": "proto2", + "fields": [{ + "rule": "optional", + "type": "string", + "name": "cid", + "id": 1 + }, { + "rule": "optional", + "type": "int32", + "name": "l", + "id": 2 + }, { + "rule": "optional", + "type": "int32", + "name": "limit", + "id": 3 + }, { + "rule": "optional", + "type": "int64", + "name": "t", + "id": 4 + }, { + "rule": "optional", + "type": "int64", + "name": "tt", + "id": 5 + }, { + "rule": "optional", + "type": "string", + "name": "tmid", + "id": 6 + }, { + "rule": "optional", + "type": "string", + "name": "mid", + "id": 7 + }, { + "rule": "optional", + "type": "string", + "name": "checksum", + "id": 8 + }, { + "rule": "optional", + "type": "bool", + "name": "stored", + "id": 9 + }, { + "rule": "optional", + "type": "bool", + "name": "reversed", + "id": 10 + }, { + "rule": "repeated", + "type": "LogItem", + "name": "logs", + "id": 105 + }] + }, { + "name": "RcpCommand", + "syntax": "proto2", + "fields": [{ + "rule": "optional", + "type": "string", + "name": "id", + "id": 1 + }, { + "rule": "optional", + "type": "string", + "name": "cid", + "id": 2 + }, { + "rule": "optional", + "type": "int64", + "name": "t", + "id": 3 + }, { + "rule": "optional", + "type": "bool", + "name": "read", + "id": 4 + }] + }, { + "name": "ReadTuple", + "syntax": "proto2", + "fields": [{ + "rule": "required", + "type": "string", + "name": "cid", + "id": 1 + }, { + "rule": "optional", + "type": "int64", + "name": "timestamp", + "id": 2 + }, { + "rule": "optional", + "type": "string", + "name": "mid", + "id": 3 + }] + }, { + "name": "MaxReadTuple", + "syntax": "proto2", + "fields": [{ + "rule": "optional", + "type": "string", + "name": "pid", + "id": 1 + }, { + "rule": "optional", + "type": "int64", + "name": "maxAckTimestamp", + "id": 2 + }, { + "rule": "optional", + "type": "int64", + "name": "maxReadTimestamp", + "id": 3 + }] + }, { + "name": "ReadCommand", + "syntax": "proto2", + "fields": [{ + "rule": "optional", + "type": "string", + "name": "cid", + "id": 1 + }, { + "rule": "repeated", + "type": "string", + "name": "cids", + "id": 2 + }, { + "rule": "repeated", + "type": "ReadTuple", + "name": "convs", + "id": 3 + }] + }, { + "name": "PresenceCommand", + "syntax": "proto2", + "fields": [{ + "rule": "optional", + "type": "StatusType", + "name": "status", + "id": 1 + }, { + "rule": "repeated", + "type": "string", + "name": "sessionPeerIds", + "id": 2 + }, { + "rule": "optional", + "type": "string", + "name": "cid", + "id": 3 + }] + }, { + "name": "ReportCommand", + "syntax": "proto2", + "fields": [{ + "rule": "optional", + "type": "bool", + "name": "initiative", + "id": 1 + }, { + "rule": "optional", + "type": "string", + "name": "type", + "id": 2 + }, { + "rule": "optional", + "type": "string", + "name": "data", + "id": 3 + }] + }, { + "name": "PatchItem", + "syntax": "proto2", + "fields": [{ + "rule": "optional", + "type": "string", + "name": "cid", + "id": 1 + }, { + "rule": "optional", + "type": "string", + "name": "mid", + "id": 2 + }, { + "rule": "optional", + "type": "int64", + "name": "timestamp", + "id": 3 + }, { + "rule": "optional", + "type": "bool", + "name": "recall", + "id": 4 + }, { + "rule": "optional", + "type": "string", + "name": "data", + "id": 5 + }, { + "rule": "optional", + "type": "int64", + "name": "patchTimestamp", + "id": 6 + }, { + "rule": "optional", + "type": "string", + "name": "from", + "id": 7 + }] + }, { + "name": "PatchCommand", + "syntax": "proto2", + "fields": [{ + "rule": "repeated", + "type": "PatchItem", + "name": "patches", + "id": 1 + }, { + "rule": "optional", + "type": "int64", + "name": "lastPatchTime", + "id": 2 + }] + }, { + "name": "GenericCommand", + "syntax": "proto2", + "fields": [{ + "rule": "optional", + "type": "CommandType", + "name": "cmd", + "id": 1 + }, { + "rule": "optional", + "type": "OpType", + "name": "op", + "id": 2 + }, { + "rule": "optional", + "type": "string", + "name": "appId", + "id": 3 + }, { + "rule": "optional", + "type": "string", + "name": "peerId", + "id": 4 + }, { + "rule": "optional", + "type": "int32", + "name": "i", + "id": 5 + }, { + "rule": "optional", + "type": "string", + "name": "installationId", + "id": 6 + }, { + "rule": "optional", + "type": "int32", + "name": "priority", + "id": 7 + }, { + "rule": "optional", + "type": "int32", + "name": "service", + "id": 8 + }, { + "rule": "optional", + "type": "DataCommand", + "name": "dataMessage", + "id": 101 + }, { + "rule": "optional", + "type": "SessionCommand", + "name": "sessionMessage", + "id": 102 + }, { + "rule": "optional", + "type": "ErrorCommand", + "name": "errorMessage", + "id": 103 + }, { + "rule": "optional", + "type": "DirectCommand", + "name": "directMessage", + "id": 104 + }, { + "rule": "optional", + "type": "AckCommand", + "name": "ackMessage", + "id": 105 + }, { + "rule": "optional", + "type": "UnreadCommand", + "name": "unreadMessage", + "id": 106 + }, { + "rule": "optional", + "type": "ReadCommand", + "name": "readMessage", + "id": 107 + }, { + "rule": "optional", + "type": "RcpCommand", + "name": "rcpMessage", + "id": 108 + }, { + "rule": "optional", + "type": "LogsCommand", + "name": "logsMessage", + "id": 109 + }, { + "rule": "optional", + "type": "ConvCommand", + "name": "convMessage", + "id": 110 + }, { + "rule": "optional", + "type": "RoomCommand", + "name": "roomMessage", + "id": 111 + }, { + "rule": "optional", + "type": "PresenceCommand", + "name": "presenceMessage", + "id": 112 + }, { + "rule": "optional", + "type": "ReportCommand", + "name": "reportMessage", + "id": 113 + }, { + "rule": "optional", + "type": "PatchCommand", + "name": "patchMessage", + "id": 114 + }] + }], + "enums": [{ + "name": "CommandType", + "syntax": "proto2", + "values": [{ + "name": "session", + "id": 0 + }, { + "name": "conv", + "id": 1 + }, { + "name": "direct", + "id": 2 + }, { + "name": "ack", + "id": 3 + }, { + "name": "rcp", + "id": 4 + }, { + "name": "unread", + "id": 5 + }, { + "name": "logs", + "id": 6 + }, { + "name": "error", + "id": 7 + }, { + "name": "login", + "id": 8 + }, { + "name": "data", + "id": 9 + }, { + "name": "room", + "id": 10 + }, { + "name": "read", + "id": 11 + }, { + "name": "presence", + "id": 12 + }, { + "name": "report", + "id": 13 + }, { + "name": "echo", + "id": 14 + }, { + "name": "loggedin", + "id": 15 + }, { + "name": "logout", + "id": 16 + }, { + "name": "loggedout", + "id": 17 + }, { + "name": "patch", + "id": 18 + }] + }, { + "name": "OpType", + "syntax": "proto2", + "values": [{ + "name": "open", + "id": 1 + }, { + "name": "add", + "id": 2 + }, { + "name": "remove", + "id": 3 + }, { + "name": "close", + "id": 4 + }, { + "name": "opened", + "id": 5 + }, { + "name": "closed", + "id": 6 + }, { + "name": "query", + "id": 7 + }, { + "name": "query_result", + "id": 8 + }, { + "name": "conflict", + "id": 9 + }, { + "name": "added", + "id": 10 + }, { + "name": "removed", + "id": 11 + }, { + "name": "start", + "id": 30 + }, { + "name": "started", + "id": 31 + }, { + "name": "joined", + "id": 32 + }, { + "name": "members_joined", + "id": 33 + }, { + "name": "left", + "id": 39 + }, { + "name": "members_left", + "id": 40 + }, { + "name": "results", + "id": 42 + }, { + "name": "count", + "id": 43 + }, { + "name": "result", + "id": 44 + }, { + "name": "update", + "id": 45 + }, { + "name": "updated", + "id": 46 + }, { + "name": "mute", + "id": 47 + }, { + "name": "unmute", + "id": 48 + }, { + "name": "status", + "id": 49 + }, { + "name": "members", + "id": 50 + }, { + "name": "max_read", + "id": 51 + }, { + "name": "is_member", + "id": 52 + }, { + "name": "join", + "id": 80 + }, { + "name": "invite", + "id": 81 + }, { + "name": "leave", + "id": 82 + }, { + "name": "kick", + "id": 83 + }, { + "name": "reject", + "id": 84 + }, { + "name": "invited", + "id": 85 + }, { + "name": "kicked", + "id": 86 + }, { + "name": "upload", + "id": 100 + }, { + "name": "uploaded", + "id": 101 + }, { + "name": "modify", + "id": 150 + }, { + "name": "modified", + "id": 151 + }] + }, { + "name": "StatusType", + "syntax": "proto2", + "values": [{ + "name": "on", + "id": 1 + }, { + "name": "off", + "id": 2 + }] + }], + "isNamespace": true + }).build(); + + var _messages$push_server = messageCompiled.push_server.messages2; + var JsonObjectMessage = _messages$push_server.JsonObjectMessage; + var UnreadTuple = _messages$push_server.UnreadTuple; + var LogItem = _messages$push_server.LogItem; + var DataCommand = _messages$push_server.DataCommand; + var SessionCommand = _messages$push_server.SessionCommand; + var ErrorCommand = _messages$push_server.ErrorCommand; + var DirectCommand = _messages$push_server.DirectCommand; + var AckCommand = _messages$push_server.AckCommand; + var UnreadCommand = _messages$push_server.UnreadCommand; + var ConvCommand = _messages$push_server.ConvCommand; + var RoomCommand = _messages$push_server.RoomCommand; + var LogsCommand = _messages$push_server.LogsCommand; + var RcpCommand = _messages$push_server.RcpCommand; + var ReadTuple = _messages$push_server.ReadTuple; + var MaxReadTuple = _messages$push_server.MaxReadTuple; + var ReadCommand = _messages$push_server.ReadCommand; + var PresenceCommand = _messages$push_server.PresenceCommand; + var ReportCommand = _messages$push_server.ReportCommand; + var GenericCommand = _messages$push_server.GenericCommand; + var PatchCommand = _messages$push_server.PatchCommand; + var PatchItem = _messages$push_server.PatchItem; + var CommandType = _messages$push_server.CommandType; + var OpType = _messages$push_server.OpType; + var StatusType = _messages$push_server.StatusType; + + + + + var message = Object.freeze({ + JsonObjectMessage: JsonObjectMessage, + UnreadTuple: UnreadTuple, + LogItem: LogItem, + DataCommand: DataCommand, + SessionCommand: SessionCommand, + ErrorCommand: ErrorCommand, + DirectCommand: DirectCommand, + AckCommand: AckCommand, + UnreadCommand: UnreadCommand, + ConvCommand: ConvCommand, + RoomCommand: RoomCommand, + LogsCommand: LogsCommand, + RcpCommand: RcpCommand, + ReadTuple: ReadTuple, + MaxReadTuple: MaxReadTuple, + ReadCommand: ReadCommand, + PresenceCommand: PresenceCommand, + ReportCommand: ReportCommand, + GenericCommand: GenericCommand, + PatchCommand: PatchCommand, + PatchItem: PatchItem, + CommandType: CommandType, + OpType: OpType, + StatusType: StatusType + }); + + var eventemitter3 = createCommonjsModule(function (module) { + 'use strict'; + + var has = Object.prototype.hasOwnProperty + , prefix = '~'; + + /** + * Constructor to create a storage for our `EE` objects. + * An `Events` instance is a plain object whose properties are event names. + * + * @constructor + * @api private + */ + function Events() {} + + // + // We try to not inherit from `Object.prototype`. In some engines creating an + // instance in this way is faster than calling `Object.create(null)` directly. + // If `Object.create(null)` is not supported we prefix the event names with a + // character to make sure that the built-in object properties are not + // overridden or used as an attack vector. + // + if (Object.create) { + Events.prototype = Object.create(null); + + // + // This hack is needed because the `__proto__` property is still inherited in + // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5. + // + if (!new Events().__proto__) prefix = false; + } + + /** + * Representation of a single event listener. + * + * @param {Function} fn The listener function. + * @param {Mixed} context The context to invoke the listener with. + * @param {Boolean} [once=false] Specify if the listener is a one-time listener. + * @constructor + * @api private + */ + function EE(fn, context, once) { + this.fn = fn; + this.context = context; + this.once = once || false; + } + + /** + * Minimal `EventEmitter` interface that is molded against the Node.js + * `EventEmitter` interface. + * + * @constructor + * @api public + */ + function EventEmitter() { + this._events = new Events(); + this._eventsCount = 0; + } + + /** + * Return an array listing the events for which the emitter has registered + * listeners. + * + * @returns {Array} + * @api public + */ + EventEmitter.prototype.eventNames = function eventNames() { + var names = [] + , events + , name; + + if (this._eventsCount === 0) return names; + + for (name in (events = this._events)) { + if (has.call(events, name)) names.push(prefix ? name.slice(1) : name); + } + + if (Object.getOwnPropertySymbols) { + return names.concat(Object.getOwnPropertySymbols(events)); + } + + return names; + }; + + /** + * Return the listeners registered for a given event. + * + * @param {String|Symbol} event The event name. + * @param {Boolean} exists Only check if there are listeners. + * @returns {Array|Boolean} + * @api public + */ + EventEmitter.prototype.listeners = function listeners(event, exists) { + var evt = prefix ? prefix + event : event + , available = this._events[evt]; + + if (exists) return !!available; + if (!available) return []; + if (available.fn) return [available.fn]; + + for (var i = 0, l = available.length, ee = new Array(l); i < l; i++) { + ee[i] = available[i].fn; + } + + return ee; + }; + + /** + * Calls each of the listeners registered for a given event. + * + * @param {String|Symbol} event The event name. + * @returns {Boolean} `true` if the event had listeners, else `false`. + * @api public + */ + EventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) { + var evt = prefix ? prefix + event : event; + + if (!this._events[evt]) return false; + + var listeners = this._events[evt] + , len = arguments.length + , args + , i; + + if (listeners.fn) { + if (listeners.once) this.removeListener(event, listeners.fn, undefined, true); + + switch (len) { + case 1: return listeners.fn.call(listeners.context), true; + case 2: return listeners.fn.call(listeners.context, a1), true; + case 3: return listeners.fn.call(listeners.context, a1, a2), true; + case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true; + case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true; + case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true; + } + + for (i = 1, args = new Array(len -1); i < len; i++) { + args[i - 1] = arguments[i]; + } + + listeners.fn.apply(listeners.context, args); + } else { + var length = listeners.length + , j; + + for (i = 0; i < length; i++) { + if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true); + + switch (len) { + case 1: listeners[i].fn.call(listeners[i].context); break; + case 2: listeners[i].fn.call(listeners[i].context, a1); break; + case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break; + case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break; + default: + if (!args) for (j = 1, args = new Array(len -1); j < len; j++) { + args[j - 1] = arguments[j]; + } + + listeners[i].fn.apply(listeners[i].context, args); + } + } + } + + return true; + }; + + /** + * Add a listener for a given event. + * + * @param {String|Symbol} event The event name. + * @param {Function} fn The listener function. + * @param {Mixed} [context=this] The context to invoke the listener with. + * @returns {EventEmitter} `this`. + * @api public + */ + EventEmitter.prototype.on = function on(event, fn, context) { + var listener = new EE(fn, context || this) + , evt = prefix ? prefix + event : event; + + if (!this._events[evt]) this._events[evt] = listener, this._eventsCount++; + else if (!this._events[evt].fn) this._events[evt].push(listener); + else this._events[evt] = [this._events[evt], listener]; + + return this; + }; + + /** + * Add a one-time listener for a given event. + * + * @param {String|Symbol} event The event name. + * @param {Function} fn The listener function. + * @param {Mixed} [context=this] The context to invoke the listener with. + * @returns {EventEmitter} `this`. + * @api public + */ + EventEmitter.prototype.once = function once(event, fn, context) { + var listener = new EE(fn, context || this, true) + , evt = prefix ? prefix + event : event; + + if (!this._events[evt]) this._events[evt] = listener, this._eventsCount++; + else if (!this._events[evt].fn) this._events[evt].push(listener); + else this._events[evt] = [this._events[evt], listener]; + + return this; + }; + + /** + * Remove the listeners of a given event. + * + * @param {String|Symbol} event The event name. + * @param {Function} fn Only remove the listeners that match this function. + * @param {Mixed} context Only remove the listeners that have this context. + * @param {Boolean} once Only remove one-time listeners. + * @returns {EventEmitter} `this`. + * @api public + */ + EventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) { + var evt = prefix ? prefix + event : event; + + if (!this._events[evt]) return this; + if (!fn) { + if (--this._eventsCount === 0) this._events = new Events(); + else delete this._events[evt]; + return this; + } + + var listeners = this._events[evt]; + + if (listeners.fn) { + if ( + listeners.fn === fn + && (!once || listeners.once) + && (!context || listeners.context === context) + ) { + if (--this._eventsCount === 0) this._events = new Events(); + else delete this._events[evt]; + } + } else { + for (var i = 0, events = [], length = listeners.length; i < length; i++) { + if ( + listeners[i].fn !== fn + || (once && !listeners[i].once) + || (context && listeners[i].context !== context) + ) { + events.push(listeners[i]); + } + } + + // + // Reset the array, or remove it completely if we have no more listeners. + // + if (events.length) this._events[evt] = events.length === 1 ? events[0] : events; + else if (--this._eventsCount === 0) this._events = new Events(); + else delete this._events[evt]; + } + + return this; + }; + + /** + * Remove all listeners, or those of the specified event. + * + * @param {String|Symbol} [event] The event name. + * @returns {EventEmitter} `this`. + * @api public + */ + EventEmitter.prototype.removeAllListeners = function removeAllListeners(event) { + var evt; + + if (event) { + evt = prefix ? prefix + event : event; + if (this._events[evt]) { + if (--this._eventsCount === 0) this._events = new Events(); + else delete this._events[evt]; + } + } else { + this._events = new Events(); + this._eventsCount = 0; + } + + return this; + }; + + // + // Alias methods names because people roll like that. + // + EventEmitter.prototype.off = EventEmitter.prototype.removeListener; + EventEmitter.prototype.addListener = EventEmitter.prototype.on; + + // + // This function doesn't apply anymore. + // + EventEmitter.prototype.setMaxListeners = function setMaxListeners() { + return this; + }; + + // + // Expose the prefix. + // + EventEmitter.prefixed = prefix; + + // + // Allow `EventEmitter` to be imported as module namespace. + // + EventEmitter.EventEmitter = EventEmitter; + + // + // Expose the module. + // + { + module.exports = EventEmitter; + } + }); + + var _createProperty = function (object, index, value) { + if (index in object) _objectDp.f(object, index, _propertyDesc(0, value)); + else object[index] = value; + }; + + _export(_export.S + _export.F * !_iterDetect(function (iter) { Array.from(iter); }), 'Array', { + // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) + from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) { + var O = _toObject(arrayLike); + var C = typeof this == 'function' ? this : Array; + var aLen = arguments.length; + var mapfn = aLen > 1 ? arguments[1] : undefined; + var mapping = mapfn !== undefined; + var index = 0; + var iterFn = core_getIteratorMethod(O); + var length, result, step, iterator; + if (mapping) mapfn = _ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2); + // if object isn't iterable or it's array with default iterator - use simple case + if (iterFn != undefined && !(C == Array && _isArrayIter(iterFn))) { + for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) { + _createProperty(result, index, mapping ? _iterCall(iterator, mapfn, [step.value, index], true) : step.value); + } + } else { + length = _toLength(O.length); + for (result = new C(length); length > index; index++) { + _createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); + } + } + result.length = index; + return result; + } + }); + + var from$1 = _core.Array.from; + + var from = createCommonjsModule(function (module) { + module.exports = { "default": from$1, __esModule: true }; + }); + + var toConsumableArray = createCommonjsModule(function (module, exports) { + "use strict"; + + exports.__esModule = true; + + + + var _from2 = _interopRequireDefault(from); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + exports.default = 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 (0, _from2.default)(arr); + } + }; + }); + + var _toConsumableArray = unwrapExports(toConsumableArray); + + var _meta = createCommonjsModule(function (module) { + var META = _uid('meta'); + + + var setDesc = _objectDp.f; + var id = 0; + var isExtensible = Object.isExtensible || function () { + return true; + }; + var FREEZE = !_fails(function () { + return isExtensible(Object.preventExtensions({})); + }); + var setMeta = function (it) { + setDesc(it, META, { value: { + i: 'O' + ++id, // object ID + w: {} // weak collections IDs + } }); + }; + var fastKey = function (it, create) { + // return primitive with prefix + if (!_isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; + if (!_has(it, META)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return 'F'; + // not necessary to add metadata + if (!create) return 'E'; + // add missing metadata + setMeta(it); + // return object ID + } return it[META].i; + }; + var getWeak = function (it, create) { + if (!_has(it, META)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return true; + // not necessary to add metadata + if (!create) return false; + // add missing metadata + setMeta(it); + // return hash weak collections IDs + } return it[META].w; + }; + // add metadata on freeze-family methods calling + var onFreeze = function (it) { + if (FREEZE && meta.NEED && isExtensible(it) && !_has(it, META)) setMeta(it); + return it; + }; + var meta = module.exports = { + KEY: META, + NEED: false, + fastKey: fastKey, + getWeak: getWeak, + onFreeze: onFreeze + }; + }); + + var _validateCollection = function (it, TYPE) { + if (!_isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!'); + return it; + }; + + var dP$1 = _objectDp.f; + + + + + + + + + + var fastKey = _meta.fastKey; + + var SIZE = _descriptors ? '_s' : 'size'; + + var getEntry = function (that, key) { + // fast case + var index = fastKey(key); + var entry; + if (index !== 'F') return that._i[index]; + // frozen object case + for (entry = that._f; entry; entry = entry.n) { + if (entry.k == key) return entry; + } + }; + + var _collectionStrong = { + getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { + var C = wrapper(function (that, iterable) { + _anInstance(that, C, NAME, '_i'); + that._t = NAME; // collection type + that._i = _objectCreate(null); // index + that._f = undefined; // first entry + that._l = undefined; // last entry + that[SIZE] = 0; // size + if (iterable != undefined) _forOf(iterable, IS_MAP, that[ADDER], that); + }); + _redefineAll(C.prototype, { + // 23.1.3.1 Map.prototype.clear() + // 23.2.3.2 Set.prototype.clear() + clear: function clear() { + for (var that = _validateCollection(this, NAME), data = that._i, entry = that._f; entry; entry = entry.n) { + entry.r = true; + if (entry.p) entry.p = entry.p.n = undefined; + delete data[entry.i]; + } + that._f = that._l = undefined; + that[SIZE] = 0; + }, + // 23.1.3.3 Map.prototype.delete(key) + // 23.2.3.4 Set.prototype.delete(value) + 'delete': function (key) { + var that = _validateCollection(this, NAME); + var entry = getEntry(that, key); + if (entry) { + var next = entry.n; + var prev = entry.p; + delete that._i[entry.i]; + entry.r = true; + if (prev) prev.n = next; + if (next) next.p = prev; + if (that._f == entry) that._f = next; + if (that._l == entry) that._l = prev; + that[SIZE]--; + } return !!entry; + }, + // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined) + // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined) + forEach: function forEach(callbackfn /* , that = undefined */) { + _validateCollection(this, NAME); + var f = _ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3); + var entry; + while (entry = entry ? entry.n : this._f) { + f(entry.v, entry.k, this); + // revert to the last existing entry + while (entry && entry.r) entry = entry.p; + } + }, + // 23.1.3.7 Map.prototype.has(key) + // 23.2.3.7 Set.prototype.has(value) + has: function has(key) { + return !!getEntry(_validateCollection(this, NAME), key); + } + }); + if (_descriptors) dP$1(C.prototype, 'size', { + get: function () { + return _validateCollection(this, NAME)[SIZE]; + } + }); + return C; + }, + def: function (that, key, value) { + var entry = getEntry(that, key); + var prev, index; + // change existing entry + if (entry) { + entry.v = value; + // create new entry + } else { + that._l = entry = { + i: index = fastKey(key, true), // <- index + k: key, // <- key + v: value, // <- value + p: prev = that._l, // <- previous entry + n: undefined, // <- next entry + r: false // <- removed + }; + if (!that._f) that._f = entry; + if (prev) prev.n = entry; + that[SIZE]++; + // add to index + if (index !== 'F') that._i[index] = entry; + } return that; + }, + getEntry: getEntry, + setStrong: function (C, NAME, IS_MAP) { + // add .keys, .values, .entries, [@@iterator] + // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11 + _iterDefine(C, NAME, function (iterated, kind) { + this._t = _validateCollection(iterated, NAME); // target + this._k = kind; // kind + this._l = undefined; // previous + }, function () { + var that = this; + var kind = that._k; + var entry = that._l; + // revert to the last existing entry + while (entry && entry.r) entry = entry.p; + // get next entry + if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) { + // or finish the iteration + that._t = undefined; + return _iterStep(1); + } + // return step by kind + if (kind == 'keys') return _iterStep(0, entry.k); + if (kind == 'values') return _iterStep(0, entry.v); + return _iterStep(0, [entry.k, entry.v]); + }, IS_MAP ? 'entries' : 'values', !IS_MAP, true); + + // add [@@species], 23.1.2.2, 23.2.2.2 + _setSpecies(NAME); + } + }; + + // 7.2.2 IsArray(argument) + + var _isArray = Array.isArray || function isArray(arg) { + return _cof(arg) == 'Array'; + }; + + var SPECIES$2 = _wks('species'); + + var _arraySpeciesConstructor = function (original) { + var C; + if (_isArray(original)) { + C = original.constructor; + // cross-realm fallback + if (typeof C == 'function' && (C === Array || _isArray(C.prototype))) C = undefined; + if (_isObject(C)) { + C = C[SPECIES$2]; + if (C === null) C = undefined; + } + } return C === undefined ? Array : C; + }; + + // 9.4.2.3 ArraySpeciesCreate(originalArray, length) + + + var _arraySpeciesCreate = function (original, length) { + return new (_arraySpeciesConstructor(original))(length); + }; + + // 0 -> Array#forEach + // 1 -> Array#map + // 2 -> Array#filter + // 3 -> Array#some + // 4 -> Array#every + // 5 -> Array#find + // 6 -> Array#findIndex + + + + + + var _arrayMethods = function (TYPE, $create) { + var IS_MAP = TYPE == 1; + var IS_FILTER = TYPE == 2; + var IS_SOME = TYPE == 3; + var IS_EVERY = TYPE == 4; + var IS_FIND_INDEX = TYPE == 6; + var NO_HOLES = TYPE == 5 || IS_FIND_INDEX; + var create = $create || _arraySpeciesCreate; + return function ($this, callbackfn, that) { + var O = _toObject($this); + var self = _iobject(O); + var f = _ctx(callbackfn, that, 3); + var length = _toLength(self.length); + var index = 0; + var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined; + var val, res; + for (;length > index; index++) if (NO_HOLES || index in self) { + val = self[index]; + res = f(val, index, O); + if (TYPE) { + if (IS_MAP) result[index] = res; // map + else if (res) switch (TYPE) { + case 3: return true; // some + case 5: return val; // find + case 6: return index; // findIndex + case 2: result.push(val); // filter + } else if (IS_EVERY) return false; // every + } + } + return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result; + }; + }; + + var dP$2 = _objectDp.f; + var each = _arrayMethods(0); + + + var _collection = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) { + var Base = _global[NAME]; + var C = Base; + var ADDER = IS_MAP ? 'set' : 'add'; + var proto = C && C.prototype; + var O = {}; + if (!_descriptors || typeof C != 'function' || !(IS_WEAK || proto.forEach && !_fails(function () { + new C().entries().next(); + }))) { + // create collection constructor + C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER); + _redefineAll(C.prototype, methods); + _meta.NEED = true; + } else { + C = wrapper(function (target, iterable) { + _anInstance(target, C, NAME, '_c'); + target._c = new Base(); + if (iterable != undefined) _forOf(iterable, IS_MAP, target[ADDER], target); + }); + each('add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON'.split(','), function (KEY) { + var IS_ADDER = KEY == 'add' || KEY == 'set'; + if (KEY in proto && !(IS_WEAK && KEY == 'clear')) _hide(C.prototype, KEY, function (a, b) { + _anInstance(this, C, KEY); + if (!IS_ADDER && IS_WEAK && !_isObject(a)) return KEY == 'get' ? undefined : false; + var result = this._c[KEY](a === 0 ? 0 : a, b); + return IS_ADDER ? this : result; + }); + }); + IS_WEAK || dP$2(C.prototype, 'size', { + get: function () { + return this._c.size; + } + }); + } + + _setToStringTag(C, NAME); + + O[NAME] = C; + _export(_export.G + _export.W + _export.F, O); + + if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP); + + return C; + }; + + var SET = 'Set'; + + // 23.2 Set Objects + var es6_set = _collection(SET, function (get) { + return function Set() { return get(this, arguments.length > 0 ? arguments[0] : undefined); }; + }, { + // 23.2.3.1 Set.prototype.add(value) + add: function add(value) { + return _collectionStrong.def(_validateCollection(this, SET), value = value === 0 ? 0 : value, value); + } + }, _collectionStrong); + + var _arrayFromIterable = function (iter, ITERATOR) { + var result = []; + _forOf(iter, false, result.push, result, ITERATOR); + return result; + }; + + // https://github.com/DavidBruant/Map-Set.prototype.toJSON + + + var _collectionToJson = function (NAME) { + return function toJSON() { + if (_classof(this) != NAME) throw TypeError(NAME + "#toJSON isn't generic"); + return _arrayFromIterable(this); + }; + }; + + // https://github.com/DavidBruant/Map-Set.prototype.toJSON + + + _export(_export.P + _export.R, 'Set', { toJSON: _collectionToJson('Set') }); + + // https://tc39.github.io/proposal-setmap-offrom/ + + + var _setCollectionOf = function (COLLECTION) { + _export(_export.S, COLLECTION, { of: function of() { + var length = arguments.length; + var A = Array(length); + while (length--) A[length] = arguments[length]; + return new this(A); + } }); + }; + + // https://tc39.github.io/proposal-setmap-offrom/#sec-set.of + _setCollectionOf('Set'); + + // https://tc39.github.io/proposal-setmap-offrom/ + + + + + + var _setCollectionFrom = function (COLLECTION) { + _export(_export.S, COLLECTION, { from: function from(source /* , mapFn, thisArg */) { + var mapFn = arguments[1]; + var mapping, A, n, cb; + _aFunction(this); + mapping = mapFn !== undefined; + if (mapping) _aFunction(mapFn); + if (source == undefined) return new this(); + A = []; + if (mapping) { + n = 0; + cb = _ctx(mapFn, arguments[2], 2); + _forOf(source, false, function (nextItem) { + A.push(cb(nextItem, n++)); + }); + } else { + _forOf(source, false, A.push, A); + } + return new this(A); + } }); + }; + + // https://tc39.github.io/proposal-setmap-offrom/#sec-set.from + _setCollectionFrom('Set'); + + var set$1 = _core.Set; + + var set = createCommonjsModule(function (module) { + module.exports = { "default": set$1, __esModule: true }; + }); + + var _Set = unwrapExports(set); + + var f$2 = Object.getOwnPropertySymbols; + + var _objectGops = { + f: f$2 + }; + + var f$3 = {}.propertyIsEnumerable; + + var _objectPie = { + f: f$3 + }; + + // 19.1.2.1 Object.assign(target, source, ...) + + + + + + var $assign = Object.assign; + + // should work with symbols and should have deterministic property order (V8 bug) + var _objectAssign = !$assign || _fails(function () { + var A = {}; + var B = {}; + // eslint-disable-next-line no-undef + var S = Symbol(); + var K = 'abcdefghijklmnopqrst'; + A[S] = 7; + K.split('').forEach(function (k) { B[k] = k; }); + return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; + }) ? function assign(target, source) { // eslint-disable-line no-unused-vars + var T = _toObject(target); + var aLen = arguments.length; + var index = 1; + var getSymbols = _objectGops.f; + var isEnum = _objectPie.f; + while (aLen > index) { + var S = _iobject(arguments[index++]); + var keys = getSymbols ? _objectKeys(S).concat(getSymbols(S)) : _objectKeys(S); + var length = keys.length; + var j = 0; + var key; + while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key]; + } return T; + } : $assign; + + // 19.1.3.1 Object.assign(target, source) + + + _export(_export.S + _export.F, 'Object', { assign: _objectAssign }); + + var assign$1 = _core.Object.assign; + + var assign = createCommonjsModule(function (module) { + module.exports = { "default": assign$1, __esModule: true }; + }); + + var _Object$assign = unwrapExports(assign); + + var classCallCheck = createCommonjsModule(function (module, exports) { + "use strict"; + + exports.__esModule = true; + + exports.default = function (instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } + }; + }); + + var _classCallCheck = unwrapExports(classCallCheck); + + var f$4 = _wks; + + var _wksExt = { + f: f$4 + }; + + var iterator$2 = _wksExt.f('iterator'); + + var iterator = createCommonjsModule(function (module) { + module.exports = { "default": iterator$2, __esModule: true }; + }); + + var defineProperty = _objectDp.f; + var _wksDefine = function (name) { + var $Symbol = _core.Symbol || (_core.Symbol = _library ? {} : _global.Symbol || {}); + if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: _wksExt.f(name) }); + }; + + // all enumerable object keys, includes symbols + + + + var _enumKeys = function (it) { + var result = _objectKeys(it); + var getSymbols = _objectGops.f; + if (getSymbols) { + var symbols = getSymbols(it); + var isEnum = _objectPie.f; + var i = 0; + var key; + while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key); + } return result; + }; + + // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) + + var hiddenKeys = _enumBugKeys.concat('length', 'prototype'); + + var f$6 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { + return _objectKeysInternal(O, hiddenKeys); + }; + + var _objectGopn = { + f: f$6 + }; + + // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window + + var gOPN$1 = _objectGopn.f; + var toString$1 = {}.toString; + + var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames + ? Object.getOwnPropertyNames(window) : []; + + var getWindowNames = function (it) { + try { + return gOPN$1(it); + } catch (e) { + return windowNames.slice(); + } + }; + + var f$5 = function getOwnPropertyNames(it) { + return windowNames && toString$1.call(it) == '[object Window]' ? getWindowNames(it) : gOPN$1(_toIobject(it)); + }; + + var _objectGopnExt = { + f: f$5 + }; + + var gOPD$1 = Object.getOwnPropertyDescriptor; + + var f$7 = _descriptors ? gOPD$1 : function getOwnPropertyDescriptor(O, P) { + O = _toIobject(O); + P = _toPrimitive(P, true); + if (_ie8DomDefine) try { + return gOPD$1(O, P); + } catch (e) { /* empty */ } + if (_has(O, P)) return _propertyDesc(!_objectPie.f.call(O, P), O[P]); + }; + + var _objectGopd = { + f: f$7 + }; + + // ECMAScript 6 symbols shim + + + + + + var META = _meta.KEY; + + + + + + + + + + + + + + + + + + + var gOPD = _objectGopd.f; + var dP$3 = _objectDp.f; + var gOPN = _objectGopnExt.f; + var $Symbol = _global.Symbol; + var $JSON = _global.JSON; + var _stringify = $JSON && $JSON.stringify; + var PROTOTYPE$2 = 'prototype'; + var HIDDEN = _wks('_hidden'); + var TO_PRIMITIVE = _wks('toPrimitive'); + var isEnum = {}.propertyIsEnumerable; + var SymbolRegistry = _shared('symbol-registry'); + var AllSymbols = _shared('symbols'); + var OPSymbols = _shared('op-symbols'); + var ObjectProto$1 = Object[PROTOTYPE$2]; + var USE_NATIVE$1 = typeof $Symbol == 'function'; + var QObject = _global.QObject; + // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 + var setter = !QObject || !QObject[PROTOTYPE$2] || !QObject[PROTOTYPE$2].findChild; + + // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 + var setSymbolDesc = _descriptors && _fails(function () { + return _objectCreate(dP$3({}, 'a', { + get: function () { return dP$3(this, 'a', { value: 7 }).a; } + })).a != 7; + }) ? function (it, key, D) { + var protoDesc = gOPD(ObjectProto$1, key); + if (protoDesc) delete ObjectProto$1[key]; + dP$3(it, key, D); + if (protoDesc && it !== ObjectProto$1) dP$3(ObjectProto$1, key, protoDesc); + } : dP$3; + + var wrap = function (tag) { + var sym = AllSymbols[tag] = _objectCreate($Symbol[PROTOTYPE$2]); + sym._k = tag; + return sym; + }; + + var isSymbol = USE_NATIVE$1 && typeof $Symbol.iterator == 'symbol' ? function (it) { + return typeof it == 'symbol'; + } : function (it) { + return it instanceof $Symbol; + }; + + var $defineProperty = function defineProperty(it, key, D) { + if (it === ObjectProto$1) $defineProperty(OPSymbols, key, D); + _anObject(it); + key = _toPrimitive(key, true); + _anObject(D); + if (_has(AllSymbols, key)) { + if (!D.enumerable) { + if (!_has(it, HIDDEN)) dP$3(it, HIDDEN, _propertyDesc(1, {})); + it[HIDDEN][key] = true; + } else { + if (_has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false; + D = _objectCreate(D, { enumerable: _propertyDesc(0, false) }); + } return setSymbolDesc(it, key, D); + } return dP$3(it, key, D); + }; + var $defineProperties = function defineProperties(it, P) { + _anObject(it); + var keys = _enumKeys(P = _toIobject(P)); + var i = 0; + var l = keys.length; + var key; + while (l > i) $defineProperty(it, key = keys[i++], P[key]); + return it; + }; + var $create = function create(it, P) { + return P === undefined ? _objectCreate(it) : $defineProperties(_objectCreate(it), P); + }; + var $propertyIsEnumerable = function propertyIsEnumerable(key) { + var E = isEnum.call(this, key = _toPrimitive(key, true)); + if (this === ObjectProto$1 && _has(AllSymbols, key) && !_has(OPSymbols, key)) return false; + return E || !_has(this, key) || !_has(AllSymbols, key) || _has(this, HIDDEN) && this[HIDDEN][key] ? E : true; + }; + var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) { + it = _toIobject(it); + key = _toPrimitive(key, true); + if (it === ObjectProto$1 && _has(AllSymbols, key) && !_has(OPSymbols, key)) return; + var D = gOPD(it, key); + if (D && _has(AllSymbols, key) && !(_has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true; + return D; + }; + var $getOwnPropertyNames = function getOwnPropertyNames(it) { + var names = gOPN(_toIobject(it)); + var result = []; + var i = 0; + var key; + while (names.length > i) { + if (!_has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key); + } return result; + }; + var $getOwnPropertySymbols = function getOwnPropertySymbols(it) { + var IS_OP = it === ObjectProto$1; + var names = gOPN(IS_OP ? OPSymbols : _toIobject(it)); + var result = []; + var i = 0; + var key; + while (names.length > i) { + if (_has(AllSymbols, key = names[i++]) && (IS_OP ? _has(ObjectProto$1, key) : true)) result.push(AllSymbols[key]); + } return result; + }; + + // 19.4.1.1 Symbol([description]) + if (!USE_NATIVE$1) { + $Symbol = function Symbol() { + if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!'); + var tag = _uid(arguments.length > 0 ? arguments[0] : undefined); + var $set = function (value) { + if (this === ObjectProto$1) $set.call(OPSymbols, value); + if (_has(this, HIDDEN) && _has(this[HIDDEN], tag)) this[HIDDEN][tag] = false; + setSymbolDesc(this, tag, _propertyDesc(1, value)); + }; + if (_descriptors && setter) setSymbolDesc(ObjectProto$1, tag, { configurable: true, set: $set }); + return wrap(tag); + }; + _redefine($Symbol[PROTOTYPE$2], 'toString', function toString() { + return this._k; + }); + + _objectGopd.f = $getOwnPropertyDescriptor; + _objectDp.f = $defineProperty; + _objectGopn.f = _objectGopnExt.f = $getOwnPropertyNames; + _objectPie.f = $propertyIsEnumerable; + _objectGops.f = $getOwnPropertySymbols; + + if (_descriptors && !_library) { + _redefine(ObjectProto$1, 'propertyIsEnumerable', $propertyIsEnumerable, true); + } + + _wksExt.f = function (name) { + return wrap(_wks(name)); + }; + } + + _export(_export.G + _export.W + _export.F * !USE_NATIVE$1, { Symbol: $Symbol }); + + for (var es6Symbols = ( + // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 + 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables' + ).split(','), j = 0; es6Symbols.length > j;)_wks(es6Symbols[j++]); + + for (var wellKnownSymbols = _objectKeys(_wks.store), k = 0; wellKnownSymbols.length > k;) _wksDefine(wellKnownSymbols[k++]); + + _export(_export.S + _export.F * !USE_NATIVE$1, 'Symbol', { + // 19.4.2.1 Symbol.for(key) + 'for': function (key) { + return _has(SymbolRegistry, key += '') + ? SymbolRegistry[key] + : SymbolRegistry[key] = $Symbol(key); + }, + // 19.4.2.5 Symbol.keyFor(sym) + keyFor: function keyFor(sym) { + if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!'); + for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key; + }, + useSetter: function () { setter = true; }, + useSimple: function () { setter = false; } + }); + + _export(_export.S + _export.F * !USE_NATIVE$1, 'Object', { + // 19.1.2.2 Object.create(O [, Properties]) + create: $create, + // 19.1.2.4 Object.defineProperty(O, P, Attributes) + defineProperty: $defineProperty, + // 19.1.2.3 Object.defineProperties(O, Properties) + defineProperties: $defineProperties, + // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) + getOwnPropertyDescriptor: $getOwnPropertyDescriptor, + // 19.1.2.7 Object.getOwnPropertyNames(O) + getOwnPropertyNames: $getOwnPropertyNames, + // 19.1.2.8 Object.getOwnPropertySymbols(O) + getOwnPropertySymbols: $getOwnPropertySymbols + }); + + // 24.3.2 JSON.stringify(value [, replacer [, space]]) + $JSON && _export(_export.S + _export.F * (!USE_NATIVE$1 || _fails(function () { + var S = $Symbol(); + // MS Edge converts symbol values to JSON as {} + // WebKit converts symbol values to JSON as null + // V8 throws on boxed symbols + return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}'; + })), 'JSON', { + stringify: function stringify(it) { + if (it === undefined || isSymbol(it)) return; // IE8 returns string on undefined + var args = [it]; + var i = 1; + var replacer, $replacer; + while (arguments.length > i) args.push(arguments[i++]); + replacer = args[1]; + if (typeof replacer == 'function') $replacer = replacer; + if ($replacer || !_isArray(replacer)) replacer = function (key, value) { + if ($replacer) value = $replacer.call(this, key, value); + if (!isSymbol(value)) return value; + }; + args[1] = replacer; + return _stringify.apply($JSON, args); + } + }); + + // 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) + $Symbol[PROTOTYPE$2][TO_PRIMITIVE] || _hide($Symbol[PROTOTYPE$2], TO_PRIMITIVE, $Symbol[PROTOTYPE$2].valueOf); + // 19.4.3.5 Symbol.prototype[@@toStringTag] + _setToStringTag($Symbol, 'Symbol'); + // 20.2.1.9 Math[@@toStringTag] + _setToStringTag(Math, 'Math', true); + // 24.3.3 JSON[@@toStringTag] + _setToStringTag(_global.JSON, 'JSON', true); + + _wksDefine('asyncIterator'); + + _wksDefine('observable'); + + var symbol$1 = _core.Symbol; + + var symbol = createCommonjsModule(function (module) { + module.exports = { "default": symbol$1, __esModule: true }; + }); + + var _Symbol = unwrapExports(symbol); + + var _typeof_1 = createCommonjsModule(function (module, exports) { + "use strict"; + + exports.__esModule = true; + + + + var _iterator2 = _interopRequireDefault(iterator); + + + + var _symbol2 = _interopRequireDefault(symbol); + + var _typeof = typeof _symbol2.default === "function" && typeof _iterator2.default === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj; }; + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + exports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.default) === "symbol" ? function (obj) { + return typeof obj === "undefined" ? "undefined" : _typeof(obj); + } : function (obj) { + return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof(obj); + }; + }); + + var _typeof = unwrapExports(_typeof_1); + + var possibleConstructorReturn = createCommonjsModule(function (module, exports) { + "use strict"; + + exports.__esModule = true; + + + + var _typeof3 = _interopRequireDefault(_typeof_1); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + exports.default = function (self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return call && ((typeof call === "undefined" ? "undefined" : (0, _typeof3.default)(call)) === "object" || typeof call === "function") ? call : self; + }; + }); + + var _possibleConstructorReturn = unwrapExports(possibleConstructorReturn); + + // Works with __proto__ only. Old v8 can't work with null proto objects. + /* eslint-disable no-proto */ + + + var check = function (O, proto) { + _anObject(O); + if (!_isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!"); + }; + var _setProto = { + set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line + function (test, buggy, set) { + try { + set = _ctx(Function.call, _objectGopd.f(Object.prototype, '__proto__').set, 2); + set(test, []); + buggy = !(test instanceof Array); + } catch (e) { buggy = true; } + return function setPrototypeOf(O, proto) { + check(O, proto); + if (buggy) O.__proto__ = proto; + else set(O, proto); + return O; + }; + }({}, false) : undefined), + check: check + }; + + // 19.1.3.19 Object.setPrototypeOf(O, proto) + + _export(_export.S, 'Object', { setPrototypeOf: _setProto.set }); + + var setPrototypeOf$2 = _core.Object.setPrototypeOf; + + var setPrototypeOf = createCommonjsModule(function (module) { + module.exports = { "default": setPrototypeOf$2, __esModule: true }; + }); + + // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) + _export(_export.S, 'Object', { create: _objectCreate }); + + var $Object = _core.Object; + var create$2 = function create(P, D) { + return $Object.create(P, D); + }; + + var create = createCommonjsModule(function (module) { + module.exports = { "default": create$2, __esModule: true }; + }); + + var inherits = createCommonjsModule(function (module, exports) { + "use strict"; + + exports.__esModule = true; + + + + var _setPrototypeOf2 = _interopRequireDefault(setPrototypeOf); + + + + var _create2 = _interopRequireDefault(create); + + + + var _typeof3 = _interopRequireDefault(_typeof_1); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + exports.default = function (subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === "undefined" ? "undefined" : (0, _typeof3.default)(superClass))); + } + + subClass.prototype = (0, _create2.default)(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true + } + }); + if (superClass) _setPrototypeOf2.default ? (0, _setPrototypeOf2.default)(subClass, superClass) : subClass.__proto__ = superClass; + }; + }); + + var _inherits = unwrapExports(inherits); + + /** + * Helpers. + */ + + var s = 1000; + var m = s * 60; + var h = m * 60; + var d$1 = h * 24; + var y = d$1 * 365.25; + + /** + * Parse or format the given `val`. + * + * Options: + * + * - `long` verbose formatting [false] + * + * @param {String|Number} val + * @param {Object} [options] + * @throws {Error} throw an error if val is not a non-empty string or a number + * @return {String|Number} + * @api public + */ + + var ms = function(val, options) { + options = options || {}; + var type = typeof val; + if (type === 'string' && val.length > 0) { + return parse(val); + } else if (type === 'number' && isNaN(val) === false) { + return options.long ? fmtLong(val) : fmtShort(val); + } + throw new Error( + 'val is not a non-empty string or a valid number. val=' + + JSON.stringify(val) + ); + }; + + /** + * Parse the given `str` and return milliseconds. + * + * @param {String} str + * @return {Number} + * @api private + */ + + function parse(str) { + str = String(str); + if (str.length > 100) { + return; + } + var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec( + str + ); + if (!match) { + return; + } + var n = parseFloat(match[1]); + var type = (match[2] || 'ms').toLowerCase(); + switch (type) { + case 'years': + case 'year': + case 'yrs': + case 'yr': + case 'y': + return n * y; + case 'days': + case 'day': + case 'd': + return n * d$1; + case 'hours': + case 'hour': + case 'hrs': + case 'hr': + case 'h': + return n * h; + case 'minutes': + case 'minute': + case 'mins': + case 'min': + case 'm': + return n * m; + case 'seconds': + case 'second': + case 'secs': + case 'sec': + case 's': + return n * s; + case 'milliseconds': + case 'millisecond': + case 'msecs': + case 'msec': + case 'ms': + return n; + default: + return undefined; + } + } + + /** + * Short format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + + function fmtShort(ms) { + if (ms >= d$1) { + return Math.round(ms / d$1) + 'd'; + } + if (ms >= h) { + return Math.round(ms / h) + 'h'; + } + if (ms >= m) { + return Math.round(ms / m) + 'm'; + } + if (ms >= s) { + return Math.round(ms / s) + 's'; + } + return ms + 'ms'; + } + + /** + * Long format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + + function fmtLong(ms) { + return plural(ms, d$1, 'day') || + plural(ms, h, 'hour') || + plural(ms, m, 'minute') || + plural(ms, s, 'second') || + ms + ' ms'; + } + + /** + * Pluralization helper. + */ + + function plural(ms, n, name) { + if (ms < n) { + return; + } + if (ms < n * 1.5) { + return Math.floor(ms / n) + ' ' + name; + } + return Math.ceil(ms / n) + ' ' + name + 's'; + } + + var debug$1 = createCommonjsModule(function (module, exports) { + /** + * This is the common logic for both the Node.js and web browser + * implementations of `debug()`. + * + * Expose `debug()` as the module. + */ + + exports = module.exports = createDebug.debug = createDebug['default'] = createDebug; + exports.coerce = coerce; + exports.disable = disable; + exports.enable = enable; + exports.enabled = enabled; + exports.humanize = ms; + + /** + * The currently active debug mode names, and names to skip. + */ + + exports.names = []; + exports.skips = []; + + /** + * Map of special "%n" handling functions, for the debug "format" argument. + * + * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". + */ + + exports.formatters = {}; + + /** + * Previous log timestamp. + */ + + var prevTime; + + /** + * Select a color. + * @param {String} namespace + * @return {Number} + * @api private + */ + + function selectColor(namespace) { + var hash = 0, i; + + for (i in namespace) { + hash = ((hash << 5) - hash) + namespace.charCodeAt(i); + hash |= 0; // Convert to 32bit integer + } + + return exports.colors[Math.abs(hash) % exports.colors.length]; + } + + /** + * Create a debugger with the given `namespace`. + * + * @param {String} namespace + * @return {Function} + * @api public + */ + + function createDebug(namespace) { + + function debug() { + // disabled? + if (!debug.enabled) return; + + var self = debug; + + // set `diff` timestamp + var curr = +new Date(); + var ms$$1 = curr - (prevTime || curr); + self.diff = ms$$1; + self.prev = prevTime; + self.curr = curr; + prevTime = curr; + + // turn the `arguments` into a proper Array + var args = new Array(arguments.length); + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i]; + } + + args[0] = exports.coerce(args[0]); + + if ('string' !== typeof args[0]) { + // anything else let's inspect with %O + args.unshift('%O'); + } + + // apply any `formatters` transformations + var index = 0; + args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) { + // if we encounter an escaped % then don't increase the array index + if (match === '%%') return match; + index++; + var formatter = exports.formatters[format]; + if ('function' === typeof formatter) { + var val = args[index]; + match = formatter.call(self, val); + + // now we need to remove `args[index]` since it's inlined in the `format` + args.splice(index, 1); + index--; + } + return match; + }); + + // apply env-specific formatting (colors, etc.) + exports.formatArgs.call(self, args); + + var logFn = debug.log || exports.log || console.log.bind(console); + logFn.apply(self, args); + } + + debug.namespace = namespace; + debug.enabled = exports.enabled(namespace); + debug.useColors = exports.useColors(); + debug.color = selectColor(namespace); + + // env-specific initialization logic for debug instances + if ('function' === typeof exports.init) { + exports.init(debug); + } + + return debug; + } + + /** + * Enables a debug mode by namespaces. This can include modes + * separated by a colon and wildcards. + * + * @param {String} namespaces + * @api public + */ + + function enable(namespaces) { + exports.save(namespaces); + + exports.names = []; + exports.skips = []; + + var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); + var len = split.length; + + for (var i = 0; i < len; i++) { + if (!split[i]) continue; // ignore empty strings + namespaces = split[i].replace(/\*/g, '.*?'); + if (namespaces[0] === '-') { + exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); + } else { + exports.names.push(new RegExp('^' + namespaces + '$')); + } + } + } + + /** + * Disable debug output. + * + * @api public + */ + + function disable() { + exports.enable(''); + } + + /** + * Returns true if the given mode name is enabled, false otherwise. + * + * @param {String} name + * @return {Boolean} + * @api public + */ + + function enabled(name) { + var i, len; + for (i = 0, len = exports.skips.length; i < len; i++) { + if (exports.skips[i].test(name)) { + return false; + } + } + for (i = 0, len = exports.names.length; i < len; i++) { + if (exports.names[i].test(name)) { + return true; + } + } + return false; + } + + /** + * Coerce `val`. + * + * @param {Mixed} val + * @return {Mixed} + * @api private + */ + + function coerce(val) { + if (val instanceof Error) return val.stack || val.message; + return val; + } + }); + + var browser$1 = createCommonjsModule(function (module, exports) { + /** + * This is the web browser implementation of `debug()`. + * + * Expose `debug()` as the module. + */ + + exports = module.exports = debug$1; + exports.log = log; + exports.formatArgs = formatArgs; + exports.save = save; + exports.load = load; + exports.useColors = useColors; + exports.storage = 'undefined' != typeof chrome + && 'undefined' != typeof chrome.storage + ? chrome.storage.local + : localstorage(); + + /** + * Colors. + */ + + exports.colors = [ + 'lightseagreen', + 'forestgreen', + 'goldenrod', + 'dodgerblue', + 'darkorchid', + 'crimson' + ]; + + /** + * Currently only WebKit-based Web Inspectors, Firefox >= v31, + * and the Firebug extension (any Firefox version) are known + * to support "%c" CSS customizations. + * + * TODO: add a `localStorage` variable to explicitly enable/disable colors + */ + + function useColors() { + // NB: In an Electron preload script, document will be defined but not fully + // initialized. Since we know we're in Chrome, we'll just detect this case + // explicitly + if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') { + return true; + } + + // is webkit? http://stackoverflow.com/a/16459606/376773 + // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 + return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) || + // is firebug? http://stackoverflow.com/a/398120/376773 + (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) || + // is firefox >= v31? + // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages + (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) || + // double check webkit in userAgent just in case we are in a worker + (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); + } + + /** + * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. + */ + + exports.formatters.j = function(v) { + try { + return JSON.stringify(v); + } catch (err) { + return '[UnexpectedJSONParseError]: ' + err.message; + } + }; + + + /** + * Colorize log arguments if enabled. + * + * @api public + */ + + function formatArgs(args) { + var useColors = this.useColors; + + args[0] = (useColors ? '%c' : '') + + this.namespace + + (useColors ? ' %c' : ' ') + + args[0] + + (useColors ? '%c ' : ' ') + + '+' + exports.humanize(this.diff); + + if (!useColors) return; + + var c = 'color: ' + this.color; + args.splice(1, 0, c, 'color: inherit'); + + // the final "%c" is somewhat tricky, because there could be other + // arguments passed either before or after the %c, so we need to + // figure out the correct index to insert the CSS into + var index = 0; + var lastC = 0; + args[0].replace(/%[a-zA-Z%]/g, function(match) { + if ('%%' === match) return; + index++; + if ('%c' === match) { + // we only are interested in the *last* %c + // (the user may have provided their own) + lastC = index; + } + }); + + args.splice(lastC, 0, c); + } + + /** + * Invokes `console.log()` when available. + * No-op when `console.log` is not a "function". + * + * @api public + */ + + function log() { + // this hackery is required for IE8/9, where + // the `console.log` function doesn't have 'apply' + return 'object' === typeof console + && console.log + && Function.prototype.apply.call(console.log, console, arguments); + } + + /** + * Save `namespaces`. + * + * @param {String} namespaces + * @api private + */ + + function save(namespaces) { + try { + if (null == namespaces) { + exports.storage.removeItem('debug'); + } else { + exports.storage.debug = namespaces; + } + } catch(e) {} + } + + /** + * Load `namespaces`. + * + * @return {String} returns the previously persisted debug modes + * @api private + */ + + function load() { + var r; + try { + r = exports.storage.debug; + } catch(e) {} + + // If debug isn't set in LS, and we're in Electron, try to load $DEBUG + if (!r && typeof process !== 'undefined' && 'env' in process) { + r = process.env.DEBUG; + } + + return r; + } + + /** + * Enable namespaces listed in `localStorage.debug` initially. + */ + + exports.enable(load()); + + /** + * Localstorage attempts to return the localstorage. + * + * This is necessary because safari throws + * when a user disables cookies/localstorage + * and you attempt to access it. + * + * @return {LocalStorage} + * @api private + */ + + function localstorage() { + try { + return window.localStorage; + } catch (e) {} + } + }); + + var bind = function bind(fn, thisArg) { + return function wrap() { + var args = new Array(arguments.length); + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i]; + } + return fn.apply(thisArg, args); + }; + }; + + /*! + * Determine if an object is a Buffer + * + * @author Feross Aboukhadijeh + * @license MIT + */ + + // The _isBuffer check is for Safari 5-7 support, because it's missing + // Object.prototype.constructor. Remove this eventually + var isBuffer_1 = function (obj) { + return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer) + }; + + function isBuffer (obj) { + return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj) + } + + // For Node v0.10 support. Remove this eventually. + function isSlowBuffer (obj) { + return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0)) + } + + /*global toString:true*/ + + // utils is a library of generic helper functions non-specific to axios + + var toString$2 = Object.prototype.toString; + + /** + * Determine if a value is an Array + * + * @param {Object} val The value to test + * @returns {boolean} True if value is an Array, otherwise false + */ + function isArray$1(val) { + return toString$2.call(val) === '[object Array]'; + } + + /** + * Determine if a value is an ArrayBuffer + * + * @param {Object} val The value to test + * @returns {boolean} True if value is an ArrayBuffer, otherwise false + */ + function isArrayBuffer(val) { + return toString$2.call(val) === '[object ArrayBuffer]'; + } + + /** + * Determine if a value is a FormData + * + * @param {Object} val The value to test + * @returns {boolean} True if value is an FormData, otherwise false + */ + function isFormData(val) { + return typeof FormData !== 'undefined' && val instanceof FormData; + } + + /** + * Determine if a value is a view on an ArrayBuffer + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false + */ + function isArrayBufferView(val) { + var result; + if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) { + result = ArrayBuffer.isView(val); + } else { + result = val && val.buffer && val.buffer instanceof ArrayBuffer; + } + return result; + } + + /** + * Determine if a value is a String + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a String, otherwise false + */ + function isString(val) { + return typeof val === 'string'; + } + + /** + * Determine if a value is a Number + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Number, otherwise false + */ + function isNumber(val) { + return typeof val === 'number'; + } + + /** + * Determine if a value is undefined + * + * @param {Object} val The value to test + * @returns {boolean} True if the value is undefined, otherwise false + */ + function isUndefined(val) { + return typeof val === 'undefined'; + } + + /** + * Determine if a value is an Object + * + * @param {Object} val The value to test + * @returns {boolean} True if value is an Object, otherwise false + */ + function isObject$1(val) { + return val !== null && (typeof val === 'undefined' ? 'undefined' : _typeof(val)) === 'object'; + } + + /** + * Determine if a value is a Date + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Date, otherwise false + */ + function isDate(val) { + return toString$2.call(val) === '[object Date]'; + } + + /** + * Determine if a value is a File + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a File, otherwise false + */ + function isFile(val) { + return toString$2.call(val) === '[object File]'; + } + + /** + * Determine if a value is a Blob + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Blob, otherwise false + */ + function isBlob(val) { + return toString$2.call(val) === '[object Blob]'; + } + + /** + * Determine if a value is a Function + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Function, otherwise false + */ + function isFunction(val) { + return toString$2.call(val) === '[object Function]'; + } + + /** + * Determine if a value is a Stream + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Stream, otherwise false + */ + function isStream(val) { + return isObject$1(val) && isFunction(val.pipe); + } + + /** + * Determine if a value is a URLSearchParams object + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a URLSearchParams object, otherwise false + */ + function isURLSearchParams(val) { + return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams; + } + + /** + * Trim excess whitespace off the beginning and end of a string + * + * @param {String} str The String to trim + * @returns {String} The String freed of excess whitespace + */ + function trim(str) { + return str.replace(/^\s*/, '').replace(/\s*$/, ''); + } + + /** + * Determine if we're running in a standard browser environment + * + * This allows axios to run in a web worker, and react-native. + * Both environments support XMLHttpRequest, but not fully standard globals. + * + * web workers: + * typeof window -> undefined + * typeof document -> undefined + * + * react-native: + * navigator.product -> 'ReactNative' + */ + function isStandardBrowserEnv() { + if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') { + return false; + } + return typeof window !== 'undefined' && typeof document !== 'undefined'; + } + + /** + * Iterate over an Array or an Object invoking a function for each item. + * + * If `obj` is an Array callback will be called passing + * the value, index, and complete array for each item. + * + * If 'obj' is an Object callback will be called passing + * the value, key, and complete object for each property. + * + * @param {Object|Array} obj The object to iterate + * @param {Function} fn The callback to invoke for each item + */ + function forEach(obj, fn) { + // Don't bother if no value provided + if (obj === null || typeof obj === 'undefined') { + return; + } + + // Force an array if not already something iterable + if ((typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) !== 'object' && !isArray$1(obj)) { + /*eslint no-param-reassign:0*/ + obj = [obj]; + } + + if (isArray$1(obj)) { + // Iterate over array values + for (var i = 0, l = obj.length; i < l; i++) { + fn.call(null, obj[i], i, obj); + } + } else { + // Iterate over object keys + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + fn.call(null, obj[key], key, obj); + } + } + } + } + + /** + * Accepts varargs expecting each argument to be an object, then + * immutably merges the properties of each object and returns result. + * + * When multiple objects contain the same key the later object in + * the arguments list will take precedence. + * + * Example: + * + * ```js + * var result = merge({foo: 123}, {foo: 456}); + * console.log(result.foo); // outputs 456 + * ``` + * + * @param {Object} obj1 Object to merge + * @returns {Object} Result of all merge properties + */ + function merge() /* obj1, obj2, obj3, ... */{ + var result = {}; + function assignValue(val, key) { + if (_typeof(result[key]) === 'object' && (typeof val === 'undefined' ? 'undefined' : _typeof(val)) === 'object') { + result[key] = merge(result[key], val); + } else { + result[key] = val; + } + } + + for (var i = 0, l = arguments.length; i < l; i++) { + forEach(arguments[i], assignValue); + } + return result; + } + + /** + * Extends object a by mutably adding to it the properties of object b. + * + * @param {Object} a The object to be extended + * @param {Object} b The object to copy properties from + * @param {Object} thisArg The object to bind function to + * @return {Object} The resulting value of object a + */ + function extend(a, b, thisArg) { + forEach(b, function assignValue(val, key) { + if (thisArg && typeof val === 'function') { + a[key] = bind(val, thisArg); + } else { + a[key] = val; + } + }); + return a; + } + + var utils = { + isArray: isArray$1, + isArrayBuffer: isArrayBuffer, + isBuffer: isBuffer_1, + isFormData: isFormData, + isArrayBufferView: isArrayBufferView, + isString: isString, + isNumber: isNumber, + isObject: isObject$1, + isUndefined: isUndefined, + isDate: isDate, + isFile: isFile, + isBlob: isBlob, + isFunction: isFunction, + isStream: isStream, + isURLSearchParams: isURLSearchParams, + isStandardBrowserEnv: isStandardBrowserEnv, + forEach: forEach, + merge: merge, + extend: extend, + trim: trim + }; + + var $JSON$1 = _core.JSON || (_core.JSON = { stringify: JSON.stringify }); + var stringify$1 = function stringify(it) { // eslint-disable-line no-unused-vars + return $JSON$1.stringify.apply($JSON$1, arguments); + }; + + var stringify = createCommonjsModule(function (module) { + module.exports = { "default": stringify$1, __esModule: true }; + }); + + var _JSON$stringify = unwrapExports(stringify); + + var normalizeHeaderName = function normalizeHeaderName(headers, normalizedName) { + utils.forEach(headers, function processHeader(value, name) { + if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) { + headers[normalizedName] = value; + delete headers[name]; + } + }); + }; + + /** + * Update an Error with the specified config, error code, and response. + * + * @param {Error} error The error to update. + * @param {Object} config The config. + * @param {string} [code] The error code (for example, 'ECONNABORTED'). + * @param {Object} [request] The request. + * @param {Object} [response] The response. + * @returns {Error} The error. + */ + + var enhanceError = function enhanceError(error, config, code, request, response) { + error.config = config; + if (code) { + error.code = code; + } + error.request = request; + error.response = response; + return error; + }; + + /** + * Create an Error with the specified message, config, error code, request and response. + * + * @param {string} message The error message. + * @param {Object} config The config. + * @param {string} [code] The error code (for example, 'ECONNABORTED'). + * @param {Object} [request] The request. + * @param {Object} [response] The response. + * @returns {Error} The created error. + */ + var createError = function createError(message, config, code, request, response) { + var error = new Error(message); + return enhanceError(error, config, code, request, response); + }; + + /** + * Resolve or reject a Promise based on response status. + * + * @param {Function} resolve A function that resolves the promise. + * @param {Function} reject A function that rejects the promise. + * @param {object} response The response. + */ + var settle = function settle(resolve, reject, response) { + var validateStatus = response.config.validateStatus; + // Note: status is not exposed by XDomainRequest + if (!response.status || !validateStatus || validateStatus(response.status)) { + resolve(response); + } else { + reject(createError('Request failed with status code ' + response.status, response.config, null, response.request, response)); + } + }; + + function encode(val) { + return encodeURIComponent(val).replace(/%40/gi, '@').replace(/%3A/gi, ':').replace(/%24/g, '$').replace(/%2C/gi, ',').replace(/%20/g, '+').replace(/%5B/gi, '[').replace(/%5D/gi, ']'); + } + + /** + * Build a URL by appending params to the end + * + * @param {string} url The base of the url (e.g., http://www.google.com) + * @param {object} [params] The params to be appended + * @returns {string} The formatted url + */ + var buildURL = function buildURL(url, params, paramsSerializer) { + /*eslint no-param-reassign:0*/ + if (!params) { + return url; + } + + var serializedParams; + if (paramsSerializer) { + serializedParams = paramsSerializer(params); + } else if (utils.isURLSearchParams(params)) { + serializedParams = params.toString(); + } else { + var parts = []; + + utils.forEach(params, function serialize(val, key) { + if (val === null || typeof val === 'undefined') { + return; + } + + if (utils.isArray(val)) { + key = key + '[]'; + } + + if (!utils.isArray(val)) { + val = [val]; + } + + utils.forEach(val, function parseValue(v) { + if (utils.isDate(v)) { + v = v.toISOString(); + } else if (utils.isObject(v)) { + v = _JSON$stringify(v); + } + parts.push(encode(key) + '=' + encode(v)); + }); + }); + + serializedParams = parts.join('&'); + } + + if (serializedParams) { + url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams; + } + + return url; + }; + + /** + * Parse headers into an object + * + * ``` + * Date: Wed, 27 Aug 2014 08:58:49 GMT + * Content-Type: application/json + * Connection: keep-alive + * Transfer-Encoding: chunked + * ``` + * + * @param {String} headers Headers needing to be parsed + * @returns {Object} Headers parsed into an object + */ + var parseHeaders = function parseHeaders(headers) { + var parsed = {}; + var key; + var val; + var i; + + if (!headers) { + return parsed; + } + + utils.forEach(headers.split('\n'), function parser(line) { + i = line.indexOf(':'); + key = utils.trim(line.substr(0, i)).toLowerCase(); + val = utils.trim(line.substr(i + 1)); + + if (key) { + parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val; + } + }); + + return parsed; + }; + + var isURLSameOrigin = utils.isStandardBrowserEnv() ? + + // Standard browser envs have full support of the APIs needed to test + // whether the request URL is of the same origin as current location. + function standardBrowserEnv() { + var msie = /(msie|trident)/i.test(navigator.userAgent); + var urlParsingNode = document.createElement('a'); + var originURL; + + /** + * Parse a URL to discover it's components + * + * @param {String} url The URL to be parsed + * @returns {Object} + */ + function resolveURL(url) { + var href = url; + + if (msie) { + // IE needs attribute set twice to normalize properties + urlParsingNode.setAttribute('href', href); + href = urlParsingNode.href; + } + + urlParsingNode.setAttribute('href', href); + + // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils + return { + href: urlParsingNode.href, + protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '', + host: urlParsingNode.host, + search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '', + hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '', + hostname: urlParsingNode.hostname, + port: urlParsingNode.port, + pathname: urlParsingNode.pathname.charAt(0) === '/' ? urlParsingNode.pathname : '/' + urlParsingNode.pathname + }; + } + + originURL = resolveURL(window.location.href); + + /** + * Determine if a URL shares the same origin as the current location + * + * @param {String} requestURL The URL to test + * @returns {boolean} True if URL shares the same origin, otherwise false + */ + return function isURLSameOrigin(requestURL) { + var parsed = utils.isString(requestURL) ? resolveURL(requestURL) : requestURL; + return parsed.protocol === originURL.protocol && parsed.host === originURL.host; + }; + }() : + + // Non standard browser envs (web workers, react-native) lack needed support. + function nonStandardBrowserEnv() { + return function isURLSameOrigin() { + return true; + }; + }(); + + // btoa polyfill for IE<10 courtesy https://github.com/davidchambers/Base64.js + + var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; + + function E() { + this.message = 'String contains an invalid character'; + } + E.prototype = new Error(); + E.prototype.code = 5; + E.prototype.name = 'InvalidCharacterError'; + + function btoa$1(input) { + var str = String(input); + var output = ''; + for ( + // initialize result and counter + var block, charCode, idx = 0, map = chars; + // if the next str index does not exist: + // change the mapping table to "=" + // check if d has no fractional digits + str.charAt(idx | 0) || (map = '=', idx % 1); + // "8 - idx % 1 * 8" generates the sequence 2, 4, 6, 8 + output += map.charAt(63 & block >> 8 - idx % 1 * 8)) { + charCode = str.charCodeAt(idx += 3 / 4); + if (charCode > 0xFF) { + throw new E(); + } + block = block << 8 | charCode; + } + return output; + } + + var btoa_1 = btoa$1; + + var cookies = utils.isStandardBrowserEnv() ? + + // Standard browser envs support document.cookie + function standardBrowserEnv() { + return { + write: function write(name, value, expires, path, domain, secure) { + var cookie = []; + cookie.push(name + '=' + encodeURIComponent(value)); + + if (utils.isNumber(expires)) { + cookie.push('expires=' + new Date(expires).toGMTString()); + } + + if (utils.isString(path)) { + cookie.push('path=' + path); + } + + if (utils.isString(domain)) { + cookie.push('domain=' + domain); + } + + if (secure === true) { + cookie.push('secure'); + } + + document.cookie = cookie.join('; '); + }, + + read: function read(name) { + var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)')); + return match ? decodeURIComponent(match[3]) : null; + }, + + remove: function remove(name) { + this.write(name, '', Date.now() - 86400000); + } + }; + }() : + + // Non standard browser env (web workers, react-native) lack needed support. + function nonStandardBrowserEnv() { + return { + write: function write() {}, + read: function read() { + return null; + }, + remove: function remove() {} + }; + }(); + + var btoa = typeof window !== 'undefined' && window.btoa && window.btoa.bind(window) || btoa_1; + + var xhr = function xhrAdapter(config) { + return new _Promise(function dispatchXhrRequest(resolve, reject) { + var requestData = config.data; + var requestHeaders = config.headers; + + if (utils.isFormData(requestData)) { + delete requestHeaders['Content-Type']; // Let the browser set it + } + + var request = new XMLHttpRequest(); + var loadEvent = 'onreadystatechange'; + var xDomain = false; + + // For IE 8/9 CORS support + // Only supports POST and GET calls and doesn't returns the response headers. + // DON'T do this for testing b/c XMLHttpRequest is mocked, not XDomainRequest. + if (process.env.NODE_ENV !== 'test' && typeof window !== 'undefined' && window.XDomainRequest && !('withCredentials' in request) && !isURLSameOrigin(config.url)) { + request = new window.XDomainRequest(); + loadEvent = 'onload'; + xDomain = true; + request.onprogress = function handleProgress() {}; + request.ontimeout = function handleTimeout() {}; + } + + // HTTP basic authentication + if (config.auth) { + var username = config.auth.username || ''; + var password = config.auth.password || ''; + requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password); + } + + request.open(config.method.toUpperCase(), buildURL(config.url, config.params, config.paramsSerializer), true); + + // Set the request timeout in MS + request.timeout = config.timeout; + + // Listen for ready state + request[loadEvent] = function handleLoad() { + if (!request || request.readyState !== 4 && !xDomain) { + return; + } + + // The request errored out and we didn't get a response, this will be + // handled by onerror instead + // With one exception: request that using file: protocol, most browsers + // will return status as 0 even though it's a successful request + if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) { + return; + } + + // Prepare the response + var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null; + var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response; + var response = { + data: responseData, + // IE sends 1223 instead of 204 (https://github.com/mzabriskie/axios/issues/201) + status: request.status === 1223 ? 204 : request.status, + statusText: request.status === 1223 ? 'No Content' : request.statusText, + headers: responseHeaders, + config: config, + request: request + }; + + settle(resolve, reject, response); + + // Clean up request + request = null; + }; + + // Handle low level network errors + request.onerror = function handleError() { + // Real errors are hidden from us by the browser + // onerror should only fire if it's a network error + reject(createError('Network Error', config, null, request)); + + // Clean up request + request = null; + }; + + // Handle timeout + request.ontimeout = function handleTimeout() { + reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED', request)); + + // Clean up request + request = null; + }; + + // Add xsrf header + // This is only done if running in a standard browser environment. + // Specifically not if we're in a web worker, or react-native. + if (utils.isStandardBrowserEnv()) { + var cookies$$1 = cookies; + + // Add xsrf header + var xsrfValue = (config.withCredentials || isURLSameOrigin(config.url)) && config.xsrfCookieName ? cookies$$1.read(config.xsrfCookieName) : undefined; + + if (xsrfValue) { + requestHeaders[config.xsrfHeaderName] = xsrfValue; + } + } + + // Add headers to the request + if ('setRequestHeader' in request) { + utils.forEach(requestHeaders, function setRequestHeader(val, key) { + if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') { + // Remove Content-Type if data is undefined + delete requestHeaders[key]; + } else { + // Otherwise add header to the request + request.setRequestHeader(key, val); + } + }); + } + + // Add withCredentials to request if needed + if (config.withCredentials) { + request.withCredentials = true; + } + + // Add responseType to request if needed + if (config.responseType) { + try { + request.responseType = config.responseType; + } catch (e) { + // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2. + // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function. + if (config.responseType !== 'json') { + throw e; + } + } + } + + // Handle progress if needed + if (typeof config.onDownloadProgress === 'function') { + request.addEventListener('progress', config.onDownloadProgress); + } + + // Not all browsers support upload events + if (typeof config.onUploadProgress === 'function' && request.upload) { + request.upload.addEventListener('progress', config.onUploadProgress); + } + + if (config.cancelToken) { + // Handle cancellation + config.cancelToken.promise.then(function onCanceled(cancel) { + if (!request) { + return; + } + + request.abort(); + reject(cancel); + // Clean up request + request = null; + }); + } + + if (requestData === undefined) { + requestData = null; + } + + // Send the request + request.send(requestData); + }); + }; + + var DEFAULT_CONTENT_TYPE = { + 'Content-Type': 'application/x-www-form-urlencoded' + }; + + function setContentTypeIfUnset(headers, value) { + if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) { + headers['Content-Type'] = value; + } + } + + function getDefaultAdapter() { + var adapter; + if (typeof XMLHttpRequest !== 'undefined') { + // For browsers use XHR adapter + adapter = xhr; + } else if (typeof process !== 'undefined') { + // For node use HTTP adapter + adapter = xhr; + } + return adapter; + } + + var defaults = { + adapter: getDefaultAdapter(), + + transformRequest: [function transformRequest(data, headers) { + normalizeHeaderName(headers, 'Content-Type'); + if (utils.isFormData(data) || utils.isArrayBuffer(data) || utils.isBuffer(data) || utils.isStream(data) || utils.isFile(data) || utils.isBlob(data)) { + return data; + } + if (utils.isArrayBufferView(data)) { + return data.buffer; + } + if (utils.isURLSearchParams(data)) { + setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8'); + return data.toString(); + } + if (utils.isObject(data)) { + setContentTypeIfUnset(headers, 'application/json;charset=utf-8'); + return _JSON$stringify(data); + } + return data; + }], + + transformResponse: [function transformResponse(data) { + /*eslint no-param-reassign:0*/ + if (typeof data === 'string') { + try { + data = JSON.parse(data); + } catch (e) {/* Ignore */} + } + return data; + }], + + timeout: 0, + + xsrfCookieName: 'XSRF-TOKEN', + xsrfHeaderName: 'X-XSRF-TOKEN', + + maxContentLength: -1, + + validateStatus: function validateStatus(status) { + return status >= 200 && status < 300; + } + }; + + defaults.headers = { + common: { + 'Accept': 'application/json, text/plain, */*' + } + }; + + utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) { + defaults.headers[method] = {}; + }); + + utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { + defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE); + }); + + var defaults_1 = defaults; + + function InterceptorManager() { + this.handlers = []; + } + + /** + * Add a new interceptor to the stack + * + * @param {Function} fulfilled The function to handle `then` for a `Promise` + * @param {Function} rejected The function to handle `reject` for a `Promise` + * + * @return {Number} An ID used to remove interceptor later + */ + InterceptorManager.prototype.use = function use(fulfilled, rejected) { + this.handlers.push({ + fulfilled: fulfilled, + rejected: rejected + }); + return this.handlers.length - 1; + }; + + /** + * Remove an interceptor from the stack + * + * @param {Number} id The ID that was returned by `use` + */ + InterceptorManager.prototype.eject = function eject(id) { + if (this.handlers[id]) { + this.handlers[id] = null; + } + }; + + /** + * Iterate over all the registered interceptors + * + * This method is particularly useful for skipping over any + * interceptors that may have become `null` calling `eject`. + * + * @param {Function} fn The function to call for each interceptor + */ + InterceptorManager.prototype.forEach = function forEach(fn) { + utils.forEach(this.handlers, function forEachHandler(h) { + if (h !== null) { + fn(h); + } + }); + }; + + var InterceptorManager_1 = InterceptorManager; + + /** + * Transform the data for a request or a response + * + * @param {Object|String} data The data to be transformed + * @param {Array} headers The headers for the request or response + * @param {Array|Function} fns A single function or Array of functions + * @returns {*} The resulting transformed data + */ + var transformData = function transformData(data, headers, fns) { + /*eslint no-param-reassign:0*/ + utils.forEach(fns, function transform(fn) { + data = fn(data, headers); + }); + + return data; + }; + + var isCancel = function isCancel(value) { + return !!(value && value.__CANCEL__); + }; + + /** + * Throws a `Cancel` if cancellation has been requested. + */ + function throwIfCancellationRequested(config) { + if (config.cancelToken) { + config.cancelToken.throwIfRequested(); + } + } + + /** + * Dispatch a request to the server using the configured adapter. + * + * @param {object} config The config that is to be used for the request + * @returns {Promise} The Promise to be fulfilled + */ + var dispatchRequest = function dispatchRequest(config) { + throwIfCancellationRequested(config); + + // Ensure headers exist + config.headers = config.headers || {}; + + // Transform request data + config.data = transformData(config.data, config.headers, config.transformRequest); + + // Flatten headers + config.headers = utils.merge(config.headers.common || {}, config.headers[config.method] || {}, config.headers || {}); + + utils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], function cleanHeaderConfig(method) { + delete config.headers[method]; + }); + + var adapter = config.adapter || defaults_1.adapter; + + return adapter(config).then(function onAdapterResolution(response) { + throwIfCancellationRequested(config); + + // Transform response data + response.data = transformData(response.data, response.headers, config.transformResponse); + + return response; + }, function onAdapterRejection(reason) { + if (!isCancel(reason)) { + throwIfCancellationRequested(config); + + // Transform response data + if (reason && reason.response) { + reason.response.data = transformData(reason.response.data, reason.response.headers, config.transformResponse); + } + } + + return _Promise.reject(reason); + }); + }; + + /** + * Determines whether the specified URL is absolute + * + * @param {string} url The URL to test + * @returns {boolean} True if the specified URL is absolute, otherwise false + */ + + var isAbsoluteURL = function isAbsoluteURL(url) { + // A URL is considered absolute if it begins with "://" or "//" (protocol-relative URL). + // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed + // by any combination of letters, digits, plus, period, or hyphen. + return (/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url) + ); + }; + + /** + * Creates a new URL by combining the specified URLs + * + * @param {string} baseURL The base URL + * @param {string} relativeURL The relative URL + * @returns {string} The combined URL + */ + + var combineURLs = function combineURLs(baseURL, relativeURL) { + return relativeURL ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '') : baseURL; + }; + + /** + * Create a new instance of Axios + * + * @param {Object} instanceConfig The default config for the instance + */ + function Axios(instanceConfig) { + this.defaults = instanceConfig; + this.interceptors = { + request: new InterceptorManager_1(), + response: new InterceptorManager_1() + }; + } + + /** + * Dispatch a request + * + * @param {Object} config The config specific for this request (merged with this.defaults) + */ + Axios.prototype.request = function request(config) { + /*eslint no-param-reassign:0*/ + // Allow for axios('example/url'[, config]) a la fetch API + if (typeof config === 'string') { + config = utils.merge({ + url: arguments[0] + }, arguments[1]); + } + + config = utils.merge(defaults_1, this.defaults, { method: 'get' }, config); + config.method = config.method.toLowerCase(); + + // Support baseURL config + if (config.baseURL && !isAbsoluteURL(config.url)) { + config.url = combineURLs(config.baseURL, config.url); + } + + // Hook up interceptors middleware + var chain = [dispatchRequest, undefined]; + var promise = _Promise.resolve(config); + + this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) { + chain.unshift(interceptor.fulfilled, interceptor.rejected); + }); + + this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) { + chain.push(interceptor.fulfilled, interceptor.rejected); + }); + + while (chain.length) { + promise = promise.then(chain.shift(), chain.shift()); + } + + return promise; + }; + + // Provide aliases for supported request methods + utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) { + /*eslint func-names:0*/ + Axios.prototype[method] = function (url, config) { + return this.request(utils.merge(config || {}, { + method: method, + url: url + })); + }; + }); + + utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { + /*eslint func-names:0*/ + Axios.prototype[method] = function (url, data, config) { + return this.request(utils.merge(config || {}, { + method: method, + url: url, + data: data + })); + }; + }); + + var Axios_1 = Axios; + + /** + * A `Cancel` is an object that is thrown when an operation is canceled. + * + * @class + * @param {string=} message The message. + */ + + function Cancel(message) { + this.message = message; + } + + Cancel.prototype.toString = function toString() { + return 'Cancel' + (this.message ? ': ' + this.message : ''); + }; + + Cancel.prototype.__CANCEL__ = true; + + var Cancel_1 = Cancel; + + /** + * A `CancelToken` is an object that can be used to request cancellation of an operation. + * + * @class + * @param {Function} executor The executor function. + */ + function CancelToken(executor) { + if (typeof executor !== 'function') { + throw new TypeError('executor must be a function.'); + } + + var resolvePromise; + this.promise = new _Promise(function promiseExecutor(resolve) { + resolvePromise = resolve; + }); + + var token = this; + executor(function cancel(message) { + if (token.reason) { + // Cancellation has already been requested + return; + } + + token.reason = new Cancel_1(message); + resolvePromise(token.reason); + }); + } + + /** + * Throws a `Cancel` if cancellation has been requested. + */ + CancelToken.prototype.throwIfRequested = function throwIfRequested() { + if (this.reason) { + throw this.reason; + } + }; + + /** + * Returns an object that contains a new `CancelToken` and a function that, when called, + * cancels the `CancelToken`. + */ + CancelToken.source = function source() { + var cancel; + var token = new CancelToken(function executor(c) { + cancel = c; + }); + return { + token: token, + cancel: cancel + }; + }; + + var CancelToken_1 = CancelToken; + + /** + * Syntactic sugar for invoking a function and expanding an array for arguments. + * + * Common use case would be to use `Function.prototype.apply`. + * + * ```js + * function f(x, y, z) {} + * var args = [1, 2, 3]; + * f.apply(null, args); + * ``` + * + * With `spread` this example can be re-written. + * + * ```js + * spread(function(x, y, z) {})([1, 2, 3]); + * ``` + * + * @param {Function} callback + * @returns {Function} + */ + + var spread = function spread(callback) { + return function wrap(arr) { + return callback.apply(null, arr); + }; + }; + + /** + * Create an instance of Axios + * + * @param {Object} defaultConfig The default config for the instance + * @return {Axios} A new instance of Axios + */ + function createInstance(defaultConfig) { + var context = new Axios_1(defaultConfig); + var instance = bind(Axios_1.prototype.request, context); + + // Copy axios.prototype to instance + utils.extend(instance, Axios_1.prototype, context); + + // Copy context to instance + utils.extend(instance, context); + + return instance; + } + + // Create the default instance to be exported + var axios$2 = createInstance(defaults_1); + + // Expose Axios class to allow class inheritance + axios$2.Axios = Axios_1; + + // Factory for creating new instances + axios$2.create = function create(instanceConfig) { + return createInstance(utils.merge(defaults_1, instanceConfig)); + }; + + // Expose Cancel & CancelToken + axios$2.Cancel = Cancel_1; + axios$2.CancelToken = CancelToken_1; + axios$2.isCancel = isCancel; + + // Expose all/spread + axios$2.all = function all(promises) { + return _Promise.all(promises); + }; + axios$2.spread = spread; + + var axios_1 = axios$2; + + // Allow use of default import syntax in TypeScript + var default_1 = axios$2; + + axios_1.default = default_1; + + var axios = axios_1; + + // most Object methods by ES6 should accept primitives + + + + var _objectSap = function (KEY, exec) { + var fn = (_core.Object || {})[KEY] || Object[KEY]; + var exp = {}; + exp[KEY] = exec(fn); + _export(_export.S + _export.F * _fails(function () { fn(1); }), 'Object', exp); + }; + + // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) + + var $getOwnPropertyDescriptor$1 = _objectGopd.f; + + _objectSap('getOwnPropertyDescriptor', function () { + return function getOwnPropertyDescriptor(it, key) { + return $getOwnPropertyDescriptor$1(_toIobject(it), key); + }; + }); + + var $Object$1 = _core.Object; + var getOwnPropertyDescriptor$1 = function getOwnPropertyDescriptor(it, key) { + return $Object$1.getOwnPropertyDescriptor(it, key); + }; + + var getOwnPropertyDescriptor = createCommonjsModule(function (module) { + module.exports = { "default": getOwnPropertyDescriptor$1, __esModule: true }; + }); + + var _Object$getOwnPropertyDescriptor = unwrapExports(getOwnPropertyDescriptor); + + var stateMachine = createCommonjsModule(function (module, exports) { + /* + + Javascript State Machine Library - https://github.com/jakesgordon/javascript-state-machine + + Copyright (c) 2012, 2013, 2014, 2015, Jake Gordon and contributors + Released under the MIT license - https://github.com/jakesgordon/javascript-state-machine/blob/master/LICENSE + + */ + + (function () { + + var StateMachine = { + + //--------------------------------------------------------------------------- + + VERSION: "2.4.0", + + //--------------------------------------------------------------------------- + + Result: { + SUCCEEDED: 1, // the event transitioned successfully from one state to another + NOTRANSITION: 2, // the event was successfull but no state transition was necessary + CANCELLED: 3, // the event was cancelled by the caller in a beforeEvent callback + PENDING: 4 // the event is asynchronous and the caller is in control of when the transition occurs + }, + + Error: { + INVALID_TRANSITION: 100, // caller tried to fire an event that was innapropriate in the current state + PENDING_TRANSITION: 200, // caller tried to fire an event while an async transition was still pending + INVALID_CALLBACK: 300 // caller provided callback function threw an exception + }, + + WILDCARD: '*', + ASYNC: 'async', + + //--------------------------------------------------------------------------- + + create: function(cfg, target) { + + var initial = (typeof cfg.initial == 'string') ? { state: cfg.initial } : cfg.initial; // allow for a simple string, or an object with { state: 'foo', event: 'setup', defer: true|false } + var terminal = cfg.terminal || cfg['final']; + var fsm = target || cfg.target || {}; + var events = cfg.events || []; + var callbacks = cfg.callbacks || {}; + var map = {}; // track state transitions allowed for an event { event: { from: [ to ] } } + var transitions = {}; // track events allowed from a state { state: [ event ] } + + var add = function(e) { + var from = Array.isArray(e.from) ? e.from : (e.from ? [e.from] : [StateMachine.WILDCARD]); // allow 'wildcard' transition if 'from' is not specified + map[e.name] = map[e.name] || {}; + for (var n = 0 ; n < from.length ; n++) { + transitions[from[n]] = transitions[from[n]] || []; + transitions[from[n]].push(e.name); + + map[e.name][from[n]] = e.to || from[n]; // allow no-op transition if 'to' is not specified + } + if (e.to) + transitions[e.to] = transitions[e.to] || []; + }; + + if (initial) { + initial.event = initial.event || 'startup'; + add({ name: initial.event, from: 'none', to: initial.state }); + } + + for(var n = 0 ; n < events.length ; n++) + add(events[n]); + + for(var name in map) { + if (map.hasOwnProperty(name)) + fsm[name] = StateMachine.buildEvent(name, map[name]); + } + + for(var name in callbacks) { + if (callbacks.hasOwnProperty(name)) + fsm[name] = callbacks[name]; + } + + fsm.current = 'none'; + fsm.is = function(state) { return Array.isArray(state) ? (state.indexOf(this.current) >= 0) : (this.current === state); }; + fsm.can = function(event) { return !this.transition && (map[event] !== undefined) && (map[event].hasOwnProperty(this.current) || map[event].hasOwnProperty(StateMachine.WILDCARD)); }; + fsm.cannot = function(event) { return !this.can(event); }; + fsm.transitions = function() { return (transitions[this.current] || []).concat(transitions[StateMachine.WILDCARD] || []); }; + fsm.isFinished = function() { return this.is(terminal); }; + fsm.error = cfg.error || function(name, from, to, args, error, msg, e) { throw e || msg; }; // default behavior when something unexpected happens is to throw an exception, but caller can override this behavior if desired (see github issue #3 and #17) + fsm.states = function() { return Object.keys(transitions).sort() }; + + if (initial && !initial.defer) + fsm[initial.event](); + + return fsm; + + }, + + //=========================================================================== + + doCallback: function(fsm, func, name, from, to, args) { + if (func) { + try { + return func.apply(fsm, [name, from, to].concat(args)); + } + catch(e) { + return fsm.error(name, from, to, args, StateMachine.Error.INVALID_CALLBACK, "an exception occurred in a caller-provided callback function", e); + } + } + }, + + beforeAnyEvent: function(fsm, name, from, to, args) { return StateMachine.doCallback(fsm, fsm['onbeforeevent'], name, from, to, args); }, + afterAnyEvent: function(fsm, name, from, to, args) { return StateMachine.doCallback(fsm, fsm['onafterevent'] || fsm['onevent'], name, from, to, args); }, + leaveAnyState: function(fsm, name, from, to, args) { return StateMachine.doCallback(fsm, fsm['onleavestate'], name, from, to, args); }, + enterAnyState: function(fsm, name, from, to, args) { return StateMachine.doCallback(fsm, fsm['onenterstate'] || fsm['onstate'], name, from, to, args); }, + changeState: function(fsm, name, from, to, args) { return StateMachine.doCallback(fsm, fsm['onchangestate'], name, from, to, args); }, + + beforeThisEvent: function(fsm, name, from, to, args) { return StateMachine.doCallback(fsm, fsm['onbefore' + name], name, from, to, args); }, + afterThisEvent: function(fsm, name, from, to, args) { return StateMachine.doCallback(fsm, fsm['onafter' + name] || fsm['on' + name], name, from, to, args); }, + leaveThisState: function(fsm, name, from, to, args) { return StateMachine.doCallback(fsm, fsm['onleave' + from], name, from, to, args); }, + enterThisState: function(fsm, name, from, to, args) { return StateMachine.doCallback(fsm, fsm['onenter' + to] || fsm['on' + to], name, from, to, args); }, + + beforeEvent: function(fsm, name, from, to, args) { + if ((false === StateMachine.beforeThisEvent(fsm, name, from, to, args)) || + (false === StateMachine.beforeAnyEvent( fsm, name, from, to, args))) + return false; + }, + + afterEvent: function(fsm, name, from, to, args) { + StateMachine.afterThisEvent(fsm, name, from, to, args); + StateMachine.afterAnyEvent( fsm, name, from, to, args); + }, + + leaveState: function(fsm, name, from, to, args) { + var specific = StateMachine.leaveThisState(fsm, name, from, to, args), + general = StateMachine.leaveAnyState( fsm, name, from, to, args); + if ((false === specific) || (false === general)) + return false; + else if ((StateMachine.ASYNC === specific) || (StateMachine.ASYNC === general)) + return StateMachine.ASYNC; + }, + + enterState: function(fsm, name, from, to, args) { + StateMachine.enterThisState(fsm, name, from, to, args); + StateMachine.enterAnyState( fsm, name, from, to, args); + }, + + //=========================================================================== + + buildEvent: function(name, map) { + return function() { + + var from = this.current; + var to = map[from] || (map[StateMachine.WILDCARD] != StateMachine.WILDCARD ? map[StateMachine.WILDCARD] : from) || from; + var args = Array.prototype.slice.call(arguments); // turn arguments into pure array + + if (this.transition) + return this.error(name, from, to, args, StateMachine.Error.PENDING_TRANSITION, "event " + name + " inappropriate because previous transition did not complete"); + + if (this.cannot(name)) + return this.error(name, from, to, args, StateMachine.Error.INVALID_TRANSITION, "event " + name + " inappropriate in current state " + this.current); + + if (false === StateMachine.beforeEvent(this, name, from, to, args)) + return StateMachine.Result.CANCELLED; + + if (from === to) { + StateMachine.afterEvent(this, name, from, to, args); + return StateMachine.Result.NOTRANSITION; + } + + // prepare a transition method for use EITHER lower down, or by caller if they want an async transition (indicated by an ASYNC return value from leaveState) + var fsm = this; + this.transition = function() { + fsm.transition = null; // this method should only ever be called once + fsm.current = to; + StateMachine.enterState( fsm, name, from, to, args); + StateMachine.changeState(fsm, name, from, to, args); + StateMachine.afterEvent( fsm, name, from, to, args); + return StateMachine.Result.SUCCEEDED; + }; + this.transition.cancel = function() { // provide a way for caller to cancel async transition if desired (issue #22) + fsm.transition = null; + StateMachine.afterEvent(fsm, name, from, to, args); + }; + + var leave = StateMachine.leaveState(this, name, from, to, args); + if (false === leave) { + this.transition = null; + return StateMachine.Result.CANCELLED; + } + else if (StateMachine.ASYNC === leave) { + return StateMachine.Result.PENDING; + } + else { + if (this.transition) // need to check in case user manually called transition() but forgot to return StateMachine.ASYNC + return this.transition(); + } + + }; + } + + }; // StateMachine + + //=========================================================================== + + //====== + // NODE + //====== + { + if ('object' !== 'undefined' && module.exports) { + exports = module.exports = StateMachine; + } + exports.StateMachine = StateMachine; + } + + }()); + }); + + var _extends = createCommonjsModule(function (module, exports) { + "use strict"; + + exports.__esModule = true; + + + + var _assign2 = _interopRequireDefault(assign); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + exports.default = _assign2.default || 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 getWeak = _meta.getWeak; + + + + + + + + var arrayFind = _arrayMethods(5); + var arrayFindIndex = _arrayMethods(6); + var id$1 = 0; + + // fallback for uncaught frozen keys + var uncaughtFrozenStore = function (that) { + return that._l || (that._l = new UncaughtFrozenStore()); + }; + var UncaughtFrozenStore = function () { + this.a = []; + }; + var findUncaughtFrozen = function (store, key) { + return arrayFind(store.a, function (it) { + return it[0] === key; + }); + }; + UncaughtFrozenStore.prototype = { + get: function (key) { + var entry = findUncaughtFrozen(this, key); + if (entry) return entry[1]; + }, + has: function (key) { + return !!findUncaughtFrozen(this, key); + }, + set: function (key, value) { + var entry = findUncaughtFrozen(this, key); + if (entry) entry[1] = value; + else this.a.push([key, value]); + }, + 'delete': function (key) { + var index = arrayFindIndex(this.a, function (it) { + return it[0] === key; + }); + if (~index) this.a.splice(index, 1); + return !!~index; + } + }; + + var _collectionWeak = { + getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { + var C = wrapper(function (that, iterable) { + _anInstance(that, C, NAME, '_i'); + that._t = NAME; // collection type + that._i = id$1++; // collection id + that._l = undefined; // leak store for uncaught frozen objects + if (iterable != undefined) _forOf(iterable, IS_MAP, that[ADDER], that); + }); + _redefineAll(C.prototype, { + // 23.3.3.2 WeakMap.prototype.delete(key) + // 23.4.3.3 WeakSet.prototype.delete(value) + 'delete': function (key) { + if (!_isObject(key)) return false; + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(_validateCollection(this, NAME))['delete'](key); + return data && _has(data, this._i) && delete data[this._i]; + }, + // 23.3.3.4 WeakMap.prototype.has(key) + // 23.4.3.4 WeakSet.prototype.has(value) + has: function has(key) { + if (!_isObject(key)) return false; + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(_validateCollection(this, NAME)).has(key); + return data && _has(data, this._i); + } + }); + return C; + }, + def: function (that, key, value) { + var data = getWeak(_anObject(key), true); + if (data === true) uncaughtFrozenStore(that).set(key, value); + else data[that._i] = value; + return that; + }, + ufstore: uncaughtFrozenStore + }; + + var es6_weakMap = createCommonjsModule(function (module) { + 'use strict'; + var each = _arrayMethods(0); + + + + + + + + var WEAK_MAP = 'WeakMap'; + var getWeak = _meta.getWeak; + var isExtensible = Object.isExtensible; + var uncaughtFrozenStore = _collectionWeak.ufstore; + var tmp = {}; + var InternalMap; + + var wrapper = function (get) { + return function WeakMap() { + return get(this, arguments.length > 0 ? arguments[0] : undefined); + }; + }; + + var methods = { + // 23.3.3.3 WeakMap.prototype.get(key) + get: function get(key) { + if (_isObject(key)) { + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(_validateCollection(this, WEAK_MAP)).get(key); + return data ? data[this._i] : undefined; + } + }, + // 23.3.3.5 WeakMap.prototype.set(key, value) + set: function set(key, value) { + return _collectionWeak.def(_validateCollection(this, WEAK_MAP), key, value); + } + }; + + // 23.3 WeakMap Objects + var $WeakMap = module.exports = _collection(WEAK_MAP, wrapper, methods, _collectionWeak, true, true); + + // IE11 WeakMap frozen keys fix + if (_fails(function () { return new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7; })) { + InternalMap = _collectionWeak.getConstructor(wrapper, WEAK_MAP); + _objectAssign(InternalMap.prototype, methods); + _meta.NEED = true; + each(['delete', 'has', 'get', 'set'], function (key) { + var proto = $WeakMap.prototype; + var method = proto[key]; + _redefine(proto, key, function (a, b) { + // store frozen objects on internal weakmap shim + if (_isObject(a) && !isExtensible(a)) { + if (!this._f) this._f = new InternalMap(); + var result = this._f[key](a, b); + return key == 'set' ? this : result; + // store all the rest on native weakmap + } return method.call(this, a, b); + }); + }); + } + }); + + // https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.of + _setCollectionOf('WeakMap'); + + // https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.from + _setCollectionFrom('WeakMap'); + + var weakMap$1 = _core.WeakMap; + + var weakMap = createCommonjsModule(function (module) { + module.exports = { "default": weakMap$1, __esModule: true }; + }); + + var _WeakMap = unwrapExports(weakMap); + + // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) + _export(_export.S + _export.F * !_descriptors, 'Object', { defineProperty: _objectDp.f }); + + var $Object$2 = _core.Object; + var defineProperty$4 = function defineProperty(it, key, desc) { + return $Object$2.defineProperty(it, key, desc); + }; + + var defineProperty$2 = createCommonjsModule(function (module) { + module.exports = { "default": defineProperty$4, __esModule: true }; + }); + + var defineProperty$1 = createCommonjsModule(function (module, exports) { + "use strict"; + + exports.__esModule = true; + + + + var _defineProperty2 = _interopRequireDefault(defineProperty$2); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + exports.default = function (obj, key, value) { + if (key in obj) { + (0, _defineProperty2.default)(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; + }; + }); + + var _defineProperty = unwrapExports(defineProperty$1); + + // 19.1.2.14 Object.keys(O) + + + + _objectSap('keys', function () { + return function keys(it) { + return _objectKeys(_toObject(it)); + }; + }); + + var keys$1 = _core.Object.keys; + + var keys = createCommonjsModule(function (module) { + module.exports = { "default": keys$1, __esModule: true }; + }); + + var _Object$keys = unwrapExports(keys); + + /** Detect free variable `global` from Node.js. */ + var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal; + + var _freeGlobal = freeGlobal; + + /** Detect free variable `self`. */ + var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + + /** Used as a reference to the global object. */ + var root = _freeGlobal || freeSelf || Function('return this')(); + + var _root = root; + + /** Built-in value references. */ + var Symbol$1 = _root.Symbol; + + var _Symbol$1 = Symbol$1; + + /** Used for built-in method references. */ + var objectProto$1 = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty$2 = objectProto$1.hasOwnProperty; + + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var nativeObjectToString = objectProto$1.toString; + + /** Built-in value references. */ + var symToStringTag$1 = _Symbol$1 ? _Symbol$1.toStringTag : undefined; + + /** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ + function getRawTag(value) { + var isOwn = hasOwnProperty$2.call(value, symToStringTag$1), + tag = value[symToStringTag$1]; + + try { + value[symToStringTag$1] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag$1] = tag; + } else { + delete value[symToStringTag$1]; + } + } + return result; + } + + var _getRawTag = getRawTag; + + /** Used for built-in method references. */ + var objectProto$2 = Object.prototype; + + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var nativeObjectToString$1 = objectProto$2.toString; + + /** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ + function objectToString(value) { + return nativeObjectToString$1.call(value); + } + + var _objectToString = objectToString; + + /** `Object#toString` result references. */ + var nullTag = '[object Null]'; + var undefinedTag = '[object Undefined]'; + + /** Built-in value references. */ + var symToStringTag = _Symbol$1 ? _Symbol$1.toStringTag : undefined; + + /** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + return (symToStringTag && symToStringTag in Object(value)) + ? _getRawTag(value) + : _objectToString(value); + } + + var _baseGetTag = baseGetTag; + + /** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ + function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; + } + + var _overArg = overArg; + + /** Built-in value references. */ + var getPrototype = _overArg(Object.getPrototypeOf, Object); + + var _getPrototype = getPrototype; + + /** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ + function isObjectLike(value) { + return value != null && typeof value == 'object'; + } + + var isObjectLike_1 = isObjectLike; + + /** `Object#toString` result references. */ + var objectTag = '[object Object]'; + + /** Used for built-in method references. */ + var funcProto = Function.prototype; + var objectProto = Object.prototype; + + /** Used to resolve the decompiled source of functions. */ + var funcToString = funcProto.toString; + + /** Used to check objects for own properties. */ + var hasOwnProperty$1 = objectProto.hasOwnProperty; + + /** Used to infer the `Object` constructor. */ + var objectCtorString = funcToString.call(Object); + + /** + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. + * + * @static + * @memberOf _ + * @since 0.8.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true + */ + function isPlainObject(value) { + if (!isObjectLike_1(value) || _baseGetTag(value) != objectTag) { + return false; + } + var proto = _getPrototype(value); + if (proto === null) { + return true; + } + var Ctor = hasOwnProperty$1.call(proto, 'constructor') && proto.constructor; + return typeof Ctor == 'function' && Ctor instanceof Ctor && + funcToString.call(Ctor) == objectCtorString; + } + + var isPlainObject_1 = isPlainObject; + + /* eslint-disable */ + var global$2 = typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : {}; + + var createClass = createCommonjsModule(function (module, exports) { + "use strict"; + + exports.__esModule = true; + + + + var _defineProperty2 = _interopRequireDefault(defineProperty$2); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + exports.default = 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; + (0, _defineProperty2.default)(target, descriptor.key, descriptor); + } + } + + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + }(); + }); + + var _createClass = unwrapExports(createClass); + + var EXPIRED = _Symbol('expired'); + var debug$5 = browser$1('LC:Expirable'); + + var Expirable = function () { + function Expirable(value, ttl) { + _classCallCheck(this, Expirable); + + this._value = value; + if (typeof ttl === 'number') { + this.expiredAt = Date.now() + ttl; + } + } + + _createClass(Expirable, [{ + key: 'value', + get: function get() { + var expired = this.expiredAt && this.expiredAt < Date.now(); + if (expired) debug$5('expired: ' + this._value); + return expired ? EXPIRED : this._value; + } + }]); + + return Expirable; + }(); + + Expirable.EXPIRED = EXPIRED; + + var debug$6 = browser$1('LC:Cache'); + + var Cache = function () { + function Cache() { + var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'anonymous'; + + _classCallCheck(this, Cache); + + this.name = name; + this._map = {}; + } + + Cache.prototype.get = function get(key) { + var cache = this._map[key]; + if (cache) { + var value = cache.value; + if (value !== Expirable.EXPIRED) { + debug$6('[%s] hit: %s %O', this.name, key, value); + return value; + } + delete this._map[key]; + } + debug$6('[' + this.name + '] missed: ' + key); + return null; + }; + + Cache.prototype.set = function set(key, value, ttl) { + debug$6('[%s] set: %s %O %d', this.name, key, value, ttl); + this._map[key] = new Expirable(value, ttl); + }; + + return Cache; + }(); + + var tryAll = function tryAll(promiseConstructors) { + var promise = new _Promise(promiseConstructors[0]); + if (promiseConstructors.length === 1) { + return promise; + } + return promise.catch(function () { + return tryAll(promiseConstructors.slice(1)); + }); + }; + + var tap = function tap(interceptor) { + return function (value) { + return interceptor(value), value; + }; + }; + + + + + + var isIE10 = global$2.navigator && global$2.navigator.userAgent && global$2.navigator.userAgent.indexOf('MSIE 10.') !== -1; + + /* eslint-disable no-proto */ + + /* eslint-enable no-proto */ + + + + + var map = new _WeakMap(); + + // protected property helper + var internal = function internal(object) { + if (!map.has(object)) { + map.set(object, {}); + } + return map.get(object); + }; + + // debug utility + var removeNull = function removeNull(obj) { + if (!isPlainObject_1(obj)) return obj; + var object = _Object$assign({}, obj); + // eslint-disable-next-line no-restricted-syntax + for (var prop in object) { + if ({}.hasOwnProperty.call(object, prop)) { + var value = object[prop]; + if (value === null) { + delete object[prop]; + } else { + object[prop] = removeNull(value); + } + } + } + return object; + }; + var trim$1 = function trim(message) { + return removeNull(JSON.parse(_JSON$stringify(message))); + }; + + var ensureArray = function ensureArray(target) { + if (Array.isArray(target)) { + return target; + } + if (target === undefined || target === null) { + return []; + } + return [target]; + }; + + + + // eslint-disable-next-line no-undef + var isWeapp = (typeof wx === 'undefined' ? 'undefined' : _typeof(wx)) === 'object' && typeof wx.connectSocket === 'function'; + + // throttle decorator + + var WebSocket = global$2.WebSocket || global$2.MozWebSocket; + + var _class; + + function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { + var desc = {}; + Object['ke' + 'ys'](descriptor).forEach(function (key) { + desc[key] = descriptor[key]; + }); + desc.enumerable = !!desc.enumerable; + desc.configurable = !!desc.configurable; + + if ('value' in desc || desc.initializer) { + desc.writable = true; + } + + desc = decorators.slice().reverse().reduce(function (desc, decorator) { + return decorator(target, property, desc) || desc; + }, desc); + + if (context && desc.initializer !== void 0) { + desc.value = desc.initializer ? desc.initializer.call(context) : void 0; + desc.initializer = undefined; + } + + if (desc.initializer === void 0) { + Object['define' + 'Property'](target, property, desc); + desc = null; + } + + return desc; + } + + // WebSocket with auto reconnecting feature, backup endpoint and EventEmitter interface. + + var debug$4 = browser$1('LC:WebSocketPlus'); + + var HEARTBEAT_TIME = 180000; + var TIMEOUT_TIME = 380000; + + var DEFAULT_RETRY_STRATEGY = function DEFAULT_RETRY_STRATEGY(attempt) { + return Math.min(1000 * Math.pow(2, attempt), 300000); + }; + + var requireConnected = function requireConnected(target, name, descriptor) { + return _Object$assign({}, descriptor, { + value: function requireConnectedWrapper() { + var _descriptor$value; + + if (!this.is('connected')) { + var currentState = this.current; + console.warn(name + ' should not be called when the connection is ' + currentState); + if (this.is('disconnected') || this.is('reconnecting')) { + console.warn('disconnect and reconnect event should be handled to avoid such calls.'); + } + throw new Error('Connection unavailable'); + } + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return (_descriptor$value = descriptor.value).call.apply(_descriptor$value, [this].concat(args)); + } + }); + }; + + var WebSocketPlus = (_class = function (_EventEmitter) { + _inherits(WebSocketPlus, _EventEmitter); + + function WebSocketPlus(getUrls, protocol) { + _classCallCheck(this, WebSocketPlus); + + if (typeof WebSocket === 'undefined') { + throw new Error('WebSocket is undefined. Polyfill is required in this runtime.'); + } + + var _this = _possibleConstructorReturn(this, _EventEmitter.call(this)); + + if (typeof getUrls !== 'function') { + _this._getUrls = function () { + return _Promise.resolve(getUrls); + }; + } else { + _this._getUrls = getUrls; + } + _this._protocol = protocol; + _this.init(); + _this._createWs(_this._getUrls, _this._protocol).then(function () { + _this.__postponeTimeoutTimer = _this._postponeTimeoutTimer.bind(_this); + if (global$2.addEventListener) { + _this.__pause = function () { + return _this.pause(); + }; + _this.__resume = function () { + return _this.resume(); + }; + global$2.addEventListener('offline', _this.__pause); + global$2.addEventListener('online', _this.__resume); + } + _this.open(); + }).catch(_this.throw.bind(_this)); + return _this; + } + + WebSocketPlus.prototype._createWs = function _createWs(getUrls, protocol) { + var _this2 = this; + + return getUrls().then(function (wsUrls) { + var urls = wsUrls; + if (!(urls instanceof Array)) { + urls = [urls]; + } + return tryAll(urls.map(function (url) { + return function (resolve, reject) { + debug$4('connect [' + url + '] ' + protocol); + var ws = protocol ? new WebSocket(url, protocol) : new WebSocket(url); + ws.binaryType = _this2.binaryType || 'arraybuffer'; + ws.onopen = function () { + return resolve(ws); + }; + ws.onerror = ws.onclose = function (error) { + if (error instanceof Error) { + return reject(error); + } + // in browser, error event is useless + return reject(new Error('Failed to connect [' + url + ']')); + }; + }; + })).then(function (ws) { + _this2._ws = ws; + _this2._ws.onclose = _this2._handleClose.bind(_this2); + _this2._ws.onmessage = _this2._handleMessage.bind(_this2); + return ws; + }); + }); + }; + + WebSocketPlus.prototype._destroyWs = function _destroyWs() { + var ws = this._ws; + if (!ws) return; + ws.onopen = ws.onclose = ws.onerror = ws.onmessage = null; + this._ws = null; + ws.close(); + }; + + // eslint-disable-next-line class-methods-use-this + + + WebSocketPlus.prototype.onbeforeevent = function onbeforeevent(event, from, to) { + for (var _len2 = arguments.length, payload = Array(_len2 > 3 ? _len2 - 3 : 0), _key2 = 3; _key2 < _len2; _key2++) { + payload[_key2 - 3] = arguments[_key2]; + } + + debug$4.apply(undefined, [event + ': ' + from + ' -> ' + to].concat(payload)); + }; + + WebSocketPlus.prototype.onopen = function onopen() { + this.emit('open'); + }; + + WebSocketPlus.prototype.onconnected = function onconnected() { + this._startConnectionKeeper(); + }; + + WebSocketPlus.prototype.onleaveconnected = function onleaveconnected(event, from, to) { + this._stopConnectionKeeper(); + this._destroyWs(); + if (to === 'offline' || to === 'disconnected') { + this.emit('disconnect'); + } + }; + + WebSocketPlus.prototype.onpause = function onpause() { + this.emit('offline'); + }; + + WebSocketPlus.prototype.onbeforeresume = function onbeforeresume() { + this.emit('online'); + }; + + WebSocketPlus.prototype.onreconnect = function onreconnect() { + this.emit('reconnect'); + }; + + WebSocketPlus.prototype.ondisconnected = function ondisconnected(event, from, to) { + var _this3 = this; + + var attempt = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0; + + var delay = DEFAULT_RETRY_STRATEGY.call(null, attempt); + debug$4('schedule attempt=' + attempt + ' delay=' + delay); + this.emit('schedule', attempt, delay); + if (this.__scheduledRetry) { + clearTimeout(this.__scheduledRetry); + } + this.__scheduledRetry = setTimeout(function () { + if (_this3.is('disconnected')) { + _this3.retry(attempt); + } + }, delay); + }; + + WebSocketPlus.prototype.onretry = function onretry(event, from, to) { + var _this4 = this; + + var attempt = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0; + + this.emit('retry', attempt); + this._createWs(this._getUrls, this._protocol).then(function () { + return _this4.can('reconnect') ? _this4.reconnect() : _this4._destroyWs(); + }, function () { + return _this4.can('fail') && _this4.fail(attempt + 1); + }); + }; + + WebSocketPlus.prototype.onerror = function onerror(event, from, to, error) { + this.emit('error', error); + }; + + WebSocketPlus.prototype.onclose = function onclose() { + if (global$2.removeEventListener) { + if (this.__pause) global$2.removeEventListener('offline', this.__pause); + if (this.__resume) global$2.removeEventListener('online', this.__resume); + } + }; + + // jsdoc-ignore-start + + + // jsdoc-ignore-end + WebSocketPlus.prototype._ping = function _ping() { + debug$4('ping'); + try { + this.ping(); + } catch (error) { + console.warn('websocket ping error: ' + error.message); + } + }; + + WebSocketPlus.prototype.ping = function ping() { + if (this._ws.ping) { + this._ws.ping(); + } else { + console.warn('The WebSocket implement does not support sending ping frame.\n Override ping method to use application defined ping/pong mechanism.'); + } + }; + + WebSocketPlus.prototype._postponeTimeoutTimer = function _postponeTimeoutTimer() { + var _this5 = this; + + debug$4('_postponeTimeoutTimer'); + this._clearTimeoutTimers(); + this._timeoutTimer = setTimeout(function () { + debug$4('timeout'); + _this5.disconnect(); + }, TIMEOUT_TIME); + }; + + WebSocketPlus.prototype._clearTimeoutTimers = function _clearTimeoutTimers() { + if (this._timeoutTimer) { + clearTimeout(this._timeoutTimer); + } + }; + + WebSocketPlus.prototype._startConnectionKeeper = function _startConnectionKeeper() { + debug$4('start connection keeper'); + this._heartbeatTimer = setInterval(this._ping.bind(this), HEARTBEAT_TIME); + var addListener = this._ws.addListener || this._ws.addEventListener; + addListener.call(this._ws, 'message', this.__postponeTimeoutTimer); + addListener.call(this._ws, 'pong', this.__postponeTimeoutTimer); + this._postponeTimeoutTimer(); + }; + + WebSocketPlus.prototype._stopConnectionKeeper = function _stopConnectionKeeper() { + debug$4('stop connection keeper'); + // websockets/ws#489 + var removeListener = this._ws.removeListener || this._ws.removeEventListener; + removeListener.call(this._ws, 'message', this.__postponeTimeoutTimer); + removeListener.call(this._ws, 'pong', this.__postponeTimeoutTimer); + this._clearTimeoutTimers(); + if (this._heartbeatTimer) { + clearInterval(this._heartbeatTimer); + } + }; + + WebSocketPlus.prototype._handleClose = function _handleClose(event) { + debug$4('ws closed [' + event.code + '] ' + event.reason); + // socket closed manually, ignore close event. + if (this.isFinished()) return; + this.handleClose(event); + }; + + WebSocketPlus.prototype.handleClose = function handleClose() { + // reconnect + this.disconnect(); + }; + + // jsdoc-ignore-start + + + // jsdoc-ignore-end + WebSocketPlus.prototype.send = function send(data) { + debug$4('send', data); + this._ws.send(data); + }; + + WebSocketPlus.prototype._handleMessage = function _handleMessage(event) { + debug$4('message', event.data); + this.handleMessage(event.data); + }; + + WebSocketPlus.prototype.handleMessage = function handleMessage(message) { + this.emit('message', message); + }; + + return WebSocketPlus; + }(eventemitter3), (_applyDecoratedDescriptor(_class.prototype, '_ping', [requireConnected], _Object$getOwnPropertyDescriptor(_class.prototype, '_ping'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'send', [requireConnected], _Object$getOwnPropertyDescriptor(_class.prototype, 'send'), _class.prototype)), _class); + + + stateMachine.create({ + target: WebSocketPlus.prototype, + initial: { + state: 'initialized', + event: 'init', + defer: true + }, + terminal: 'closed', + events: [{ + name: 'open', + from: 'initialized', + to: 'connected' + }, { + name: 'disconnect', + from: 'connected', + to: 'disconnected' + }, { + name: 'retry', + from: 'disconnected', + to: 'reconnecting' + }, { + name: 'fail', + from: 'reconnecting', + to: 'disconnected' + }, { + name: 'reconnect', + from: 'reconnecting', + to: 'connected' + }, { + name: 'pause', + from: ['connected', 'disconnected', 'reconnecting'], + to: 'offline' + }, {}, { + name: 'resume', + from: 'offline', + to: 'disconnected' + }, { + name: 'close', + from: ['connected', 'disconnected', 'reconnecting', 'offline'], + to: 'closed' + }, { + name: 'throw', + from: '*', + to: 'error' + }] + }); + + // 19.1.2.5 Object.freeze(O) + + var meta = _meta.onFreeze; + + _objectSap('freeze', function ($freeze) { + return function freeze(it) { + return $freeze && _isObject(it) ? $freeze(meta(it)) : it; + }; + }); + + var freeze$1 = _core.Object.freeze; + + var freeze = createCommonjsModule(function (module) { + module.exports = { "default": freeze$1, __esModule: true }; + }); + + var _Object$freeze = unwrapExports(freeze); + + var error$1 = _Object$freeze({ + 1000: { + name: 'CLOSE_NORMAL' + }, + 1006: { + name: 'CLOSE_ABNORMAL' + }, + 4100: { + name: 'APP_NOT_AVAILABLE', + message: 'App not exists or realtime message service is disabled.' + }, + 4103: { + name: 'INVALID_LOGIN', + message: 'Malformed clientId.' + }, + 4105: { + name: 'SESSION_REQUIRED', + message: 'Message sent before session opened. ' + }, + 4107: { + name: 'READ_TIMEOUT' + }, + 4108: { + name: 'LOGIN_TIMEOUT' + }, + 4109: { + name: 'FRAME_TOO_LONG' + }, + 4110: { + name: 'INVALID_ORIGIN', + message: 'Access denied by domain whitelist.' + }, + 4111: { + name: 'SESSION_CONFLICT' + }, + 4112: { + name: 'SESSION_TOKEN_EXPIRED' + }, + 4200: { + name: 'INTERNAL_ERROR', + message: 'Internal error, please contact LeanCloud for support.' + }, + 4201: { + name: 'SEND_MESSAGE_TIMEOUT' + }, + 4302: { + name: 'CONVERSATION_SIGNATURE_FAILED' + }, + 4303: { + name: 'CONVERSATION_NOT_FOUND' + }, + 4304: { + name: 'CONVERSATION_FULL' + }, + 4305: { + name: 'CONVERSATION_REJECTED_BY_APP' + }, + 4306: { + name: 'CONVERSATION_UPDATE_FAILED' + }, + 4307: { + name: 'CONVERSATION_READ_ONLY' + }, + 4308: { + name: 'CONVERSATION_NOT_ALLOWED' + }, + 4401: { + name: 'INVALID_MESSAGING_TARGET' + }, + 4402: { + name: 'MESSAGE_REJECTED_BY_APP' + } + }); + + var ErrorCode = _Object$freeze(_Object$keys(error$1).reduce(function (result, code) { + return _Object$assign(result, _defineProperty({}, error$1[code].name, Number(code))); + }, {})); + + var createError$3 = function createError(errorMessage) { + var code = errorMessage.code, + reason = errorMessage.reason, + appCode = errorMessage.appCode, + detail = errorMessage.detail; + + var message = reason || detail; + if (!message && error$1[code]) { + message = error$1[code].message || error$1[code].name; + } + if (!message) { + message = 'Unknow Error: ' + code; + } + var err = new Error(message); + return _Object$assign(err, { + code: code, appCode: appCode, detail: detail + }); + }; + + var debug$3 = browser$1('LC:Connection'); + + var COMMAND_TIMEOUT = 20000; + + var Connection = function (_WebSocketPlus) { + _inherits(Connection, _WebSocketPlus); + + function Connection(getUrl, _ref) { + var format = _ref.format, + version = _ref.version; + + _classCallCheck(this, Connection); + + debug$3('initializing Connection'); + var protocolString = 'lc.' + format + '.' + version; + if (!isWeapp) { + var _this = _possibleConstructorReturn(this, _WebSocketPlus.call(this, getUrl, protocolString)); + } else { + var _this = _possibleConstructorReturn(this, _WebSocketPlus.call(this, getUrl().then(function (urls) { + return urls.map(function (url) { + return '' + url + (url.indexOf('?') === -1 ? '?' : '&') + 'subprotocol=' + encodeURIComponent(protocolString); + }); + }))); + } + _this._protocalFormat = format; + _this._commands = {}; + _this._serialId = 0; + return _possibleConstructorReturn(_this); + } + + Connection.prototype.send = function send(command) { + var _this2 = this; + + var waitingForRespond = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + + var serialId = void 0; + if (waitingForRespond) { + this._serialId += 1; + serialId = this._serialId; + command.i = serialId; // eslint-disable-line no-param-reassign + } + debug$3('↑ %O sent', trim$1(command)); + + var message = void 0; + if (this._protocalFormat === 'proto2base64') { + message = command.toBase64(); + } else if (command.toArrayBuffer) { + message = command.toArrayBuffer(); + } + if (!message) { + throw new TypeError(command + ' is not a GenericCommand'); + } + + _WebSocketPlus.prototype.send.call(this, message); + + if (!waitingForRespond) { + return _Promise.resolve(); + } + return new _Promise(function (resolve, reject) { + _this2._commands[serialId] = { + resolve: resolve, + reject: reject + }; + setTimeout(function () { + if (_this2._commands[serialId]) { + debug$3('✗ %O timeout', trim$1(command)); + reject(new Error('Command Timeout.')); + delete _this2._commands[serialId]; + } + }, COMMAND_TIMEOUT); + }); + }; + + Connection.prototype.handleMessage = function handleMessage(msg) { + var message = void 0; + try { + message = GenericCommand.decode(msg); + debug$3('↓ %O received', trim$1(message)); + } catch (e) { + console.warn('Decode message failed', msg); + } + this.emit('allmessage', message); + var serialId = message.i; + if (serialId) { + if (this._commands[serialId]) { + if (message.cmd === CommandType.error) { + this._commands[serialId].reject(createError$3(message.errorMessage)); + } else { + this._commands[serialId].resolve(message); + } + delete this._commands[serialId]; + } else { + console.warn('Unexpected command received with serialId [' + serialId + '],\n which have timed out or never been requested.'); + } + } else if (message.cmd === CommandType.error) { + this.emit('error', createError$3(message.errorMessage)); + } else { + this.emit('message', message); + } + }; + + Connection.prototype.ping = function ping() { + return this.send(new GenericCommand({ + cmd: CommandType.echo + })).catch(function (error$$1) { + return debug$3('ping failed:', error$$1); + }); + }; + + return Connection; + }(WebSocketPlus); + + /* eslint-disable max-len */ + + /** + * 插件接口 + * + *

+ * 插件是由一个或多个扩展点组成的字典。SDK 的扩展点可以分为两类: + *

+ * 第一类扩展点是类实例化之后的回调,包括 RealtimeIMClientConversation。这些扩展点可以通过一个同步的 Decorator 进行扩展。Decorator 接受一个对应的实例并对其进行一些操作。 + * 特别的,由于注册自定义消息类这个需求特别的常用,额外定义一个 messageClasses 扩展点来做这件事情。 + *

+ * 第二类扩展点是在某些事件处理前、后可以注入逻辑的点。 + * 其中 beforeMessageParseafterMessageParse 可以通过一个异步的 Middleware 进行扩展。Middleware 接受一个对象,返回一个同类型对象或同类型对象的 Promise。 + * beforeMessageDispatch 可以通过返回一个 boolean 类型的 shouldDispatch 值来控制是否要继续派发收到的消息。 + *

+ * 如果使用了多个插件,这些 hook 会按照插件数组的顺序依次执行。前一个 Middleware 的返回值会作为参数传给后一个 Middleware。 + * + * @interface Plugin + * @since 3.1.0 + */ + + /* eslint-enable max-len */ + + /** + * 插件名称,用于在日志中显示异常的插件 + * + * @name Plugin.name + * @type string + */ + + /** + * 插件注册的消息类型 + * + * @name Plugin.messageClasses + * @type AVMessage[] + */ + + /** + * 在 Realtime 实例化后对其进行修饰。 + *

+ * 接受一个参数为 Realtime 实例。 + * + * @name Plugin.onRealtimeCreate + * @type Function + */ + + /** + * 在 IMClient 实例化后对其进行修饰。 + *

+ * 接受一个参数为 IMClient 实例。 + * + * @name Plugin.onIMClientCreate + * @type Function + */ + + /** + * 在 Conversation 实例化后对其进行修饰。 + *

+ * 接受一个参数为 Conversation 实例。 + * 需要注意的是,该扩展点并不是在 {@link IMClient#createConversation} 方法创建成功后调用的 hook, + * 而是所有的 Conversation 实例化的时候(包括但不限于 query 时)调用的 hook。 + * + * @name Plugin.onConversationCreate + * @type Function + */ + + /** + * 在对消息进行 parse 之前,对原始消息进行修改。 + *

+ * 接受一个参数为原始消息,是某个消息 JSON 化(message.toJSON())的返回值,一般是一个 JSON 对象。 + * 该方法需要返回一个 JSON 对象。如果这个结果是异步得到的,也可以返回一个 Promise(fulfilled with a JSON)。 + * + * @name Plugin.beforeMessageParse + * @type Function + */ + + /** + * 在对消息进行 parse 之后,对消息实例进行修改。 + *

+ * 接受一个参数为消息实例,一般是一个已注册的 Message 类或其子类的实例。 + * 该方法需要返回一个同类型的消息实例。如果这个结果是异步得到的,也可以返回一个 Promise。 + * + * @name Plugin.afterMessageParse + * @type Function + */ + + /** + * 在收到消息之后,派发消息之前,控制是否派发这条消息。 + *

+ * 接受参数为 message 与 conversation。 + * 该方法需要返回 boolean 类型的值,如果返回 false 则 SDK 不再派发这条消息,后续的 beforeMessageDispatch 也不会执行。 + * 如果这个结果是异步得到的,也可以返回一个 Promise。 + * + * @name Plugin.beforeMessageDispatch + * @type Function + * @since 3.4.0 + */ + + var applyDecorators = function applyDecorators(decorators, target) { + if (decorators) { + decorators.forEach(function (decorator) { + try { + decorator(target); + } catch (error) { + if (decorator._pluginName) { + error.message += '[' + decorator._pluginName + ']'; + } + throw error; + } + }); + } + }; + + + + var applyDispatcher = function applyDispatcher(dispatchers, payload) { + return ensureArray(dispatchers).reduce(function (resultPromise, dispatcher) { + return resultPromise.then(function (shouldDispatch) { + return shouldDispatch === false ? false : dispatcher.apply(undefined, _toConsumableArray(payload)); + }).catch(function (error) { + if (dispatcher._pluginName) { + // eslint-disable-next-line no-param-reassign + error.message += '[' + dispatcher._pluginName + ']'; + } + throw error; + }); + }, _Promise.resolve(true)); + }; + + var debug = browser$1('LC:Realtime'); + + var pushRouterCache = new Cache('push-router'); + + var Realtime = function (_EventEmitter) { + _inherits(Realtime, _EventEmitter); + + /** + * @extends EventEmitter + * @param {Object} options + * @param {String} options.appId + * @param {String} [options.region='cn'] 节点 id + * @param {Boolean} [options.pushOfflineMessages=false] 启用推送离线消息模式(默认为发送未读消息通知模式) + * @param {Boolean} [options.noBinary=false] 设置 WebSocket 使用字符串格式收发消息(默认为二进制格式)。 + * 适用于 WebSocket 实现不支持二进制数据格式的情况(如 React Native) + * @param {Boolean} [options.ssl=true] 使用 wss 进行连接 + * @param {Plugin[]} [options.plugins] 加载插件(since 3.1.0) + */ + function Realtime(options) { + _classCallCheck(this, Realtime); + + debug('initializing Realtime'); + + var _this = _possibleConstructorReturn(this, _EventEmitter.call(this)); + + if (typeof options.appId !== 'string') { + throw new TypeError('appId [' + options.appId + '] is not a string'); + } + _this._options = _Object$assign({ + appId: undefined, + region: 'cn', + pushOfflineMessages: false, + noBinary: isWeapp, + ssl: true, + server: process.env.SERVER + }, options); + _this._cache = new Cache('endpoints'); + internal(_this).clients = new _Set(); + _this._plugins = [].concat(_toConsumableArray(ensureArray(Realtime.__preRegisteredPlugins)), _toConsumableArray(ensureArray(options.plugins))).reduce(function (result, plugin) { + // eslint-disable-next-line no-restricted-syntax + for (var hook in plugin) { + if ({}.hasOwnProperty.call(plugin, hook) && hook !== 'name') { + if (plugin.name) { + ensureArray(plugin[hook]).forEach(function (value) { + // eslint-disable-next-line no-param-reassign + value._pluginName = plugin.name; + }); + } + // eslint-disable-next-line no-param-reassign + result[hook] = ensureArray(result[hook]).concat(plugin[hook]); + } + } + return result; + }, {}); + // onRealtimeCreate hook + applyDecorators(_this._plugins.onRealtimeCreate, _this); + return _this; + } + + Realtime.prototype._open = function _open() { + var _this2 = this; + + if (this._openPromise) return this._openPromise; + + var format = 'protobuf2'; + if (this._options.noBinary) { + // 不发送 binary data,fallback to base64 string + format = 'proto2base64'; + } + var version = 3; + if (this._options.pushOfflineMessages) { + // 不推送离线消息,而是发送对话的未读通知 + version = 1; + } + var protocol = { + format: format, + version: version + }; + this._openPromise = new _Promise(function (resolve, reject) { + debug('No connection established, create a new one.'); + var connection = new Connection(function () { + return _this2._getEndpoints(_this2._options); + }, protocol); + connection.on('open', function () { + return resolve(connection); + }); + connection.on('error', reject); + connection.on('message', _this2._dispatchCommand.bind(_this2)); + /** + * 连接断开。 + * 连接断开可能是因为 SDK 进入了离线状态(see {@link Realtime#event:offline}),或长时间没有收到服务器心跳。 + * 连接断开后所有的网络操作都会失败,请在连接断开后禁用相关的 UI 元素。 + * @event Realtime#disconnect + */ + /** + * 计划在一段时间后尝试重新连接 + * @event Realtime#schedule + * @param {Number} attempt 尝试重连的次数 + * @param {Number} delay 延迟的毫秒数 + */ + /** + * 正在尝试重新连接 + * @event Realtime#retry + * @param {Number} attempt 尝试重连的次数 + */ + /** + * 连接恢复正常。 + * 请重新启用在 {@link Realtime#event:disconnect} 事件中禁用的相关 UI 元素 + * @event Realtime#reconnect + */ + + /** + * 客户端连接断开 + * @event IMClient#disconnect + * @see Realtime#event:disconnect + * @since 3.2.0 + */ + /** + * 计划在一段时间后尝试重新连接 + * @event IMClient#schedule + * @param {Number} attempt 尝试重连的次数 + * @param {Number} delay 延迟的毫秒数 + * @since 3.2.0 + */ + /** + * 正在尝试重新连接 + * @event IMClient#retry + * @param {Number} attempt 尝试重连的次数 + * @since 3.2.0 + */ + + /** + * 客户端进入离线状态。 + * 这通常意味着网络已断开,或者 {@link Realtime#pause} 被调用 + * @event Realtime#offline + * @since 3.4.0 + */ + /** + * 客户端恢复在线状态 + * 这通常意味着网络已恢复,或者 {@link Realtime#resume} 被调用 + * @event Realtime#online + * @since 3.4.0 + */ + /** + * 进入离线状态。 + * 这通常意味着网络已断开,或者 {@link Realtime#pause} 被调用 + * @event IMClient#offline + * @since 3.4.0 + */ + /** + * 恢复在线状态 + * 这通常意味着网络已恢复,或者 {@link Realtime#resume} 被调用 + * @event IMClient#online + * @since 3.4.0 + */ + + // event proxy + ['disconnect', 'reconnect', 'retry', 'schedule', 'offline', 'online'].forEach(function (event) { + return connection.on(event, function () { + for (var _len = arguments.length, payload = Array(_len), _key = 0; _key < _len; _key++) { + payload[_key] = arguments[_key]; + } + + debug(event + ' event emitted. %O', payload); + _this2.emit.apply(_this2, [event].concat(payload)); + if (event !== 'reconnect') { + internal(_this2).clients.forEach(function (client) { + client.emit.apply(client, [event].concat(payload)); + }); + } + }); + }); + // override handleClose + connection.handleClose = function handleClose(event) { + var isFatal = [ErrorCode.APP_NOT_AVAILABLE, ErrorCode.INVALID_LOGIN, ErrorCode.INVALID_ORIGIN].some(function (errorCode) { + return errorCode === event.code; + }); + if (isFatal) { + // in these cases, SDK should throw. + this.throw(createError$3(event)); + } else { + // reconnect + this.disconnect(); + } + }; + internal(_this2).connection = connection; + }).catch(function (error$$1) { + delete _this2._openPromise; + throw error$$1; + }); + + return this._openPromise; + }; + + Realtime.prototype._getEndpoints = function _getEndpoints(options) { + var _this3 = this; + + return _Promise.resolve(this._cache.get('endpoints') || this.constructor._fetchEndpointsInfo(options).then(tap(function (info) { + return _this3._cache.set('endpoints', info, info.ttl * 1000); + }))).then(function (info) { + debug('endpoint info: %O', info); + return [info.server, info.secondary]; + }); + }; + + Realtime._fetchPushRouter = function _fetchPushRouter(_ref) { + var appId = _ref.appId, + region = _ref.region; + + debug('fetch router'); + switch (region) { + case 'cn': + { + var cachedPushRouter = pushRouterCache.get(appId); + if (cachedPushRouter) { + return _Promise.resolve(cachedPushRouter); + } + return axios.get('https://app-router.leancloud.cn/1/route', { + params: { + appId: appId + }, + timeout: 20000 + }).then(function (res) { + return res.data; + }).then(tap(debug)).then(function (route) { + var pushRouter = route.push_router_server; + if (!pushRouter) { + throw new Error('push router not exists'); + } + var ttl = route.ttl; + if (typeof ttl !== 'number') { + ttl = 3600; + } + pushRouterCache.set(appId, pushRouter, ttl * 1000); + return pushRouter; + }).catch(function () { + return 'router-g0-push.leancloud.cn'; + }); + } + case 'us': + return _Promise.resolve('router-a0-push.leancloud.cn'); + default: + throw new Error('Region [' + region + '] is not supported.'); + } + }; + + Realtime._fetchEndpointsInfo = function _fetchEndpointsInfo(_ref2) { + var appId = _ref2.appId, + region = _ref2.region, + ssl = _ref2.ssl, + server = _ref2.server; + + debug('fetch endpoint info'); + return this._fetchPushRouter({ appId: appId, region: region }).then(tap(debug)).then(function (router) { + return axios.get('https://' + router + '/v1/route', { + params: { + appId: appId, + secure: ssl, + features: isWeapp ? 'wechat' : undefined, + server: server, + _t: Date.now() + }, + timeout: 20000 + }).then(function (res) { + return res.data; + }).then(tap(debug)); + }); + }; + + Realtime.prototype._close = function _close() { + if (this._openPromise) { + this._openPromise.then(function (connection) { + return connection.close(); + }); + } + delete this._openPromise; + }; + + /** + * 手动进行重连。 + * SDK 在网络出现异常时会自动按照一定的时间间隔尝试重连,调用该方法会立即尝试重连并重置重连尝试计数器。 + * 只能在 `schedule` 事件之后,`retry` 事件之前调用,如果当前网络正常或者正在进行重连,调用该方法会抛异常。 + */ + + + Realtime.prototype.retry = function retry() { + var connection = internal(this).connection; + if (!connection) { + throw new Error('no connection established'); + } + if (connection.cannot('retry')) { + throw new Error('retrying not allowed when not disconnected. the connection is now ' + connection.current); + } + return connection.retry(); + }; + /** + * 暂停,使 SDK 进入离线状态。 + * 你可以在网络断开、应用进入后台等时刻调用该方法让 SDK 进入离线状态,离线状态下不会尝试重连。 + * 在浏览器中 SDK 会自动监听网络变化,因此无需手动调用该方法。 + * + * @since 3.4.0 + * @see Realtime#event:offline + */ + + + Realtime.prototype.pause = function pause() { + // 这个方法常常在网络断开、进入后台时被调用,此时 connection 可能没有建立或者已经 close。 + // 因此不像 retry,这个方法应该尽可能 loose + var connection = internal(this).connection; + if (!connection) return; + if (connection.can('pause')) connection.pause(); + }; + /** + * 恢复在线状态。 + * 你可以在网络恢复、应用回到前台等时刻调用该方法让 SDK 恢复在线状态,恢复在线状态后 SDK 会开始尝试重连。 + * + * @since 3.4.0 + * @see Realtime#event:online + */ + + + Realtime.prototype.resume = function resume() { + // 与 pause 一样,这个方法应该尽可能 loose + var connection = internal(this).connection; + if (!connection) return; + if (connection.can('resume')) connection.resume(); + }; + + Realtime.prototype._register = function _register(client) { + internal(this).clients.add(client); + }; + + Realtime.prototype._deregister = function _deregister(client) { + internal(this).clients.delete(client); + if (internal(this).clients.size === 0) { + this._close(); + } + }; + + Realtime.prototype._dispatchCommand = function _dispatchCommand(command) { + return applyDispatcher(this._plugins.beforeCommandDispatch, [command, this]).then(function (shouldDispatch) { + // no plugin handled this command + if (shouldDispatch) return debug('[WARN] Unexpected message received: %O', trim$1(command)); + return false; + }); + }; + + return Realtime; + }(eventemitter3); + + exports.Protocals = message; + exports.Promise = _Promise; + exports.EventEmitter = eventemitter3; + exports.Realtime = Realtime; + exports.ErrorCode = ErrorCode; + + Object.defineProperty(exports, '__esModule', { value: true }); + +}))); + +//# sourceMappingURL=realtime-core.browser.js.map \ No newline at end of file diff --git a/dist/realtime-core.browser.js.map b/dist/realtime-core.browser.js.map new file mode 100644 index 000000000..e74805f4f --- /dev/null +++ b/dist/realtime-core.browser.js.map @@ -0,0 +1 @@ +{"version":3,"file":null,"sources":["/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_to-integer.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_defined.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_string-at.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_library.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_global.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_core.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_a-function.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_ctx.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_is-object.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_an-object.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_fails.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_descriptors.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_dom-create.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_ie8-dom-define.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_to-primitive.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_object-dp.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_property-desc.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_hide.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_export.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_redefine.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_has.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_iterators.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_cof.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_iobject.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_to-iobject.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_to-length.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_to-absolute-index.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_array-includes.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_shared.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_uid.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_shared-key.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_object-keys-internal.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_enum-bug-keys.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_object-keys.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_object-dps.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_html.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_object-create.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_wks.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_set-to-string-tag.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_iter-create.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_to-object.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_object-gpo.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_iter-define.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es6.string.iterator.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_add-to-unscopables.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_iter-step.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es6.array.iterator.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/web.dom.iterable.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_classof.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_an-instance.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_iter-call.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_is-array-iter.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/core.get-iterator-method.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_for-of.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_species-constructor.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_invoke.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_task.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_microtask.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_new-promise-capability.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_perform.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_promise-resolve.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_redefine-all.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_set-species.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_iter-detect.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es6.promise.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es7.promise.finally.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es7.promise.try.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/fn/promise.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/core-js/promise.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/long/dist/long.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/bytebuffer/dist/bytebuffer.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/@leeyeh/rollup-plugin-node-resolve/src/empty.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/protobufjs/dist/protobuf-light.js","/home/travis/build/leancloud/js-realtime-sdk/proto/message-compiled.js","/home/travis/build/leancloud/js-realtime-sdk/proto/message.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/eventemitter3/index.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_create-property.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es6.array.from.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/fn/array/from.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/core-js/array/from.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/helpers/toConsumableArray.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_meta.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_validate-collection.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_collection-strong.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_is-array.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_array-species-constructor.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_array-species-create.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_array-methods.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_collection.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es6.set.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_array-from-iterable.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_collection-to-json.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es7.set.to-json.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_set-collection-of.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es7.set.of.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_set-collection-from.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es7.set.from.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/fn/set.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/core-js/set.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_object-gops.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_object-pie.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_object-assign.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es6.object.assign.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/fn/object/assign.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/core-js/object/assign.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/helpers/classCallCheck.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_wks-ext.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/fn/symbol/iterator.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/core-js/symbol/iterator.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_wks-define.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_enum-keys.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_object-gopn.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_object-gopn-ext.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_object-gopd.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es6.symbol.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es7.symbol.async-iterator.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es7.symbol.observable.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/fn/symbol/index.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/core-js/symbol.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/helpers/typeof.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/helpers/possibleConstructorReturn.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_set-proto.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es6.object.set-prototype-of.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/fn/object/set-prototype-of.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/core-js/object/set-prototype-of.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es6.object.create.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/fn/object/create.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/core-js/object/create.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/helpers/inherits.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/ms/index.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/debug/src/debug.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/debug/src/browser.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/helpers/bind.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/is-buffer/index.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/utils.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/fn/json/stringify.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/core-js/json/stringify.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/helpers/normalizeHeaderName.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/core/enhanceError.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/core/createError.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/core/settle.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/helpers/buildURL.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/helpers/parseHeaders.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/helpers/isURLSameOrigin.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/helpers/btoa.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/helpers/cookies.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/adapters/xhr.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/defaults.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/core/InterceptorManager.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/core/transformData.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/cancel/isCancel.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/core/dispatchRequest.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/helpers/isAbsoluteURL.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/helpers/combineURLs.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/core/Axios.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/cancel/Cancel.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/cancel/CancelToken.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/helpers/spread.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/axios.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/index.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_object-sap.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es6.object.get-own-property-descriptor.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/fn/object/get-own-property-descriptor.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/core-js/object/get-own-property-descriptor.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/javascript-state-machine/state-machine.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/helpers/extends.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_collection-weak.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es6.weak-map.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es7.weak-map.of.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es7.weak-map.from.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/fn/weak-map.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/core-js/weak-map.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es6.object.define-property.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/fn/object/define-property.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/core-js/object/define-property.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/helpers/defineProperty.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es6.object.keys.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/fn/object/keys.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/core-js/object/keys.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_freeGlobal.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_root.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_Symbol.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_getRawTag.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_objectToString.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_baseGetTag.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_overArg.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_getPrototype.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/isObjectLike.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/isPlainObject.js","/home/travis/build/leancloud/js-realtime-sdk/src/utils/global.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/helpers/createClass.js","/home/travis/build/leancloud/js-realtime-sdk/src/utils/expirable.js","/home/travis/build/leancloud/js-realtime-sdk/src/utils/cache.js","/home/travis/build/leancloud/js-realtime-sdk/src/utils/index.js","/home/travis/build/leancloud/js-realtime-sdk/src/polyfills/ws-browser.js","/home/travis/build/leancloud/js-realtime-sdk/src/websocket-plus.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es6.object.freeze.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/fn/object/freeze.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/core-js/object/freeze.js","/home/travis/build/leancloud/js-realtime-sdk/src/error.js","/home/travis/build/leancloud/js-realtime-sdk/src/connection.js","/home/travis/build/leancloud/js-realtime-sdk/src/plugin.js","/home/travis/build/leancloud/js-realtime-sdk/src/realtime.js"],"sourcesContent":["// 7.1.4 ToInteger\nvar ceil = Math.ceil;\nvar floor = Math.floor;\nmodule.exports = function (it) {\n return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);\n};\n","// 7.2.1 RequireObjectCoercible(argument)\nmodule.exports = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n","var toInteger = require('./_to-integer');\nvar defined = require('./_defined');\n// true -> String#at\n// false -> String#codePointAt\nmodule.exports = function (TO_STRING) {\n return function (that, pos) {\n var s = String(defined(that));\n var i = toInteger(pos);\n var l = s.length;\n var a, b;\n if (i < 0 || i >= l) return TO_STRING ? '' : undefined;\n a = s.charCodeAt(i);\n return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff\n ? TO_STRING ? s.charAt(i) : a\n : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;\n };\n};\n","module.exports = true;\n","// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nvar global = module.exports = typeof window != 'undefined' && window.Math == Math\n ? window : typeof self != 'undefined' && self.Math == Math ? self\n // eslint-disable-next-line no-new-func\n : Function('return this')();\nif (typeof __g == 'number') __g = global; // eslint-disable-line no-undef\n","var core = module.exports = { version: '2.5.1' };\nif (typeof __e == 'number') __e = core; // eslint-disable-line no-undef\n","module.exports = function (it) {\n if (typeof it != 'function') throw TypeError(it + ' is not a function!');\n return it;\n};\n","// optional / simple context binding\nvar aFunction = require('./_a-function');\nmodule.exports = function (fn, that, length) {\n aFunction(fn);\n if (that === undefined) return fn;\n switch (length) {\n case 1: return function (a) {\n return fn.call(that, a);\n };\n case 2: return function (a, b) {\n return fn.call(that, a, b);\n };\n case 3: return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n return function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n};\n","module.exports = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n","var isObject = require('./_is-object');\nmodule.exports = function (it) {\n if (!isObject(it)) throw TypeError(it + ' is not an object!');\n return it;\n};\n","module.exports = function (exec) {\n try {\n return !!exec();\n } catch (e) {\n return true;\n }\n};\n","// Thank's IE8 for his funny defineProperty\nmodule.exports = !require('./_fails')(function () {\n return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;\n});\n","var isObject = require('./_is-object');\nvar document = require('./_global').document;\n// typeof document.createElement is 'object' in old IE\nvar is = isObject(document) && isObject(document.createElement);\nmodule.exports = function (it) {\n return is ? document.createElement(it) : {};\n};\n","module.exports = !require('./_descriptors') && !require('./_fails')(function () {\n return Object.defineProperty(require('./_dom-create')('div'), 'a', { get: function () { return 7; } }).a != 7;\n});\n","// 7.1.1 ToPrimitive(input [, PreferredType])\nvar isObject = require('./_is-object');\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function (it, S) {\n if (!isObject(it)) return it;\n var fn, val;\n if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;\n if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n","var anObject = require('./_an-object');\nvar IE8_DOM_DEFINE = require('./_ie8-dom-define');\nvar toPrimitive = require('./_to-primitive');\nvar dP = Object.defineProperty;\n\nexports.f = require('./_descriptors') ? Object.defineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return dP(O, P, Attributes);\n } catch (e) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n","module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n","var dP = require('./_object-dp');\nvar createDesc = require('./_property-desc');\nmodule.exports = require('./_descriptors') ? function (object, key, value) {\n return dP.f(object, key, createDesc(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n","var global = require('./_global');\nvar core = require('./_core');\nvar ctx = require('./_ctx');\nvar hide = require('./_hide');\nvar PROTOTYPE = 'prototype';\n\nvar $export = function (type, name, source) {\n var IS_FORCED = type & $export.F;\n var IS_GLOBAL = type & $export.G;\n var IS_STATIC = type & $export.S;\n var IS_PROTO = type & $export.P;\n var IS_BIND = type & $export.B;\n var IS_WRAP = type & $export.W;\n var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});\n var expProto = exports[PROTOTYPE];\n var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE];\n var key, own, out;\n if (IS_GLOBAL) source = name;\n for (key in source) {\n // contains in native\n own = !IS_FORCED && target && target[key] !== undefined;\n if (own && key in exports) continue;\n // export native or passed\n out = own ? target[key] : source[key];\n // prevent global pollution for namespaces\n exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]\n // bind timers to global for call from export context\n : IS_BIND && own ? ctx(out, global)\n // wrap global constructors for prevent change them in library\n : IS_WRAP && target[key] == out ? (function (C) {\n var F = function (a, b, c) {\n if (this instanceof C) {\n switch (arguments.length) {\n case 0: return new C();\n case 1: return new C(a);\n case 2: return new C(a, b);\n } return new C(a, b, c);\n } return C.apply(this, arguments);\n };\n F[PROTOTYPE] = C[PROTOTYPE];\n return F;\n // make static versions for prototype methods\n })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;\n // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%\n if (IS_PROTO) {\n (exports.virtual || (exports.virtual = {}))[key] = out;\n // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%\n if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out);\n }\n }\n};\n// type bitmap\n$export.F = 1; // forced\n$export.G = 2; // global\n$export.S = 4; // static\n$export.P = 8; // proto\n$export.B = 16; // bind\n$export.W = 32; // wrap\n$export.U = 64; // safe\n$export.R = 128; // real proto method for `library`\nmodule.exports = $export;\n","module.exports = require('./_hide');\n","var hasOwnProperty = {}.hasOwnProperty;\nmodule.exports = function (it, key) {\n return hasOwnProperty.call(it, key);\n};\n","module.exports = {};\n","var toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};\n","// fallback for non-array-like ES3 and non-enumerable old V8 strings\nvar cof = require('./_cof');\n// eslint-disable-next-line no-prototype-builtins\nmodule.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {\n return cof(it) == 'String' ? it.split('') : Object(it);\n};\n","// to indexed object, toObject with fallback for non-array-like ES3 strings\nvar IObject = require('./_iobject');\nvar defined = require('./_defined');\nmodule.exports = function (it) {\n return IObject(defined(it));\n};\n","// 7.1.15 ToLength\nvar toInteger = require('./_to-integer');\nvar min = Math.min;\nmodule.exports = function (it) {\n return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991\n};\n","var toInteger = require('./_to-integer');\nvar max = Math.max;\nvar min = Math.min;\nmodule.exports = function (index, length) {\n index = toInteger(index);\n return index < 0 ? max(index + length, 0) : min(index, length);\n};\n","// false -> Array#indexOf\n// true -> Array#includes\nvar toIObject = require('./_to-iobject');\nvar toLength = require('./_to-length');\nvar toAbsoluteIndex = require('./_to-absolute-index');\nmodule.exports = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) if (IS_INCLUDES || index in O) {\n if (O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n","var global = require('./_global');\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || (global[SHARED] = {});\nmodule.exports = function (key) {\n return store[key] || (store[key] = {});\n};\n","var id = 0;\nvar px = Math.random();\nmodule.exports = function (key) {\n return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));\n};\n","var shared = require('./_shared')('keys');\nvar uid = require('./_uid');\nmodule.exports = function (key) {\n return shared[key] || (shared[key] = uid(key));\n};\n","var has = require('./_has');\nvar toIObject = require('./_to-iobject');\nvar arrayIndexOf = require('./_array-includes')(false);\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\n\nmodule.exports = function (object, names) {\n var O = toIObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (has(O, key = names[i++])) {\n ~arrayIndexOf(result, key) || result.push(key);\n }\n return result;\n};\n","// IE 8- don't enum bug keys\nmodule.exports = (\n 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'\n).split(',');\n","// 19.1.2.14 / 15.2.3.14 Object.keys(O)\nvar $keys = require('./_object-keys-internal');\nvar enumBugKeys = require('./_enum-bug-keys');\n\nmodule.exports = Object.keys || function keys(O) {\n return $keys(O, enumBugKeys);\n};\n","var dP = require('./_object-dp');\nvar anObject = require('./_an-object');\nvar getKeys = require('./_object-keys');\n\nmodule.exports = require('./_descriptors') ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var keys = getKeys(Properties);\n var length = keys.length;\n var i = 0;\n var P;\n while (length > i) dP.f(O, P = keys[i++], Properties[P]);\n return O;\n};\n","var document = require('./_global').document;\nmodule.exports = document && document.documentElement;\n","// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\nvar anObject = require('./_an-object');\nvar dPs = require('./_object-dps');\nvar enumBugKeys = require('./_enum-bug-keys');\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\nvar Empty = function () { /* empty */ };\nvar PROTOTYPE = 'prototype';\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar createDict = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = require('./_dom-create')('iframe');\n var i = enumBugKeys.length;\n var lt = '<';\n var gt = '>';\n var iframeDocument;\n iframe.style.display = 'none';\n require('./_html').appendChild(iframe);\n iframe.src = 'javascript:'; // eslint-disable-line no-script-url\n // createDict = iframe.contentWindow.Object;\n // html.removeChild(iframe);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);\n iframeDocument.close();\n createDict = iframeDocument.F;\n while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];\n return createDict();\n};\n\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n Empty[PROTOTYPE] = anObject(O);\n result = new Empty();\n Empty[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = createDict();\n return Properties === undefined ? result : dPs(result, Properties);\n};\n","var store = require('./_shared')('wks');\nvar uid = require('./_uid');\nvar Symbol = require('./_global').Symbol;\nvar USE_SYMBOL = typeof Symbol == 'function';\n\nvar $exports = module.exports = function (name) {\n return store[name] || (store[name] =\n USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));\n};\n\n$exports.store = store;\n","var def = require('./_object-dp').f;\nvar has = require('./_has');\nvar TAG = require('./_wks')('toStringTag');\n\nmodule.exports = function (it, tag, stat) {\n if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });\n};\n","'use strict';\nvar create = require('./_object-create');\nvar descriptor = require('./_property-desc');\nvar setToStringTag = require('./_set-to-string-tag');\nvar IteratorPrototype = {};\n\n// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()\nrequire('./_hide')(IteratorPrototype, require('./_wks')('iterator'), function () { return this; });\n\nmodule.exports = function (Constructor, NAME, next) {\n Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });\n setToStringTag(Constructor, NAME + ' Iterator');\n};\n","// 7.1.13 ToObject(argument)\nvar defined = require('./_defined');\nmodule.exports = function (it) {\n return Object(defined(it));\n};\n","// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)\nvar has = require('./_has');\nvar toObject = require('./_to-object');\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\nvar ObjectProto = Object.prototype;\n\nmodule.exports = Object.getPrototypeOf || function (O) {\n O = toObject(O);\n if (has(O, IE_PROTO)) return O[IE_PROTO];\n if (typeof O.constructor == 'function' && O instanceof O.constructor) {\n return O.constructor.prototype;\n } return O instanceof Object ? ObjectProto : null;\n};\n","'use strict';\nvar LIBRARY = require('./_library');\nvar $export = require('./_export');\nvar redefine = require('./_redefine');\nvar hide = require('./_hide');\nvar has = require('./_has');\nvar Iterators = require('./_iterators');\nvar $iterCreate = require('./_iter-create');\nvar setToStringTag = require('./_set-to-string-tag');\nvar getPrototypeOf = require('./_object-gpo');\nvar ITERATOR = require('./_wks')('iterator');\nvar BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`\nvar FF_ITERATOR = '@@iterator';\nvar KEYS = 'keys';\nvar VALUES = 'values';\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {\n $iterCreate(Constructor, NAME, next);\n var getMethod = function (kind) {\n if (!BUGGY && kind in proto) return proto[kind];\n switch (kind) {\n case KEYS: return function keys() { return new Constructor(this, kind); };\n case VALUES: return function values() { return new Constructor(this, kind); };\n } return function entries() { return new Constructor(this, kind); };\n };\n var TAG = NAME + ' Iterator';\n var DEF_VALUES = DEFAULT == VALUES;\n var VALUES_BUG = false;\n var proto = Base.prototype;\n var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];\n var $default = $native || getMethod(DEFAULT);\n var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;\n var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;\n var methods, key, IteratorPrototype;\n // Fix native\n if ($anyNative) {\n IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));\n if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {\n // Set @@toStringTag to native iterators\n setToStringTag(IteratorPrototype, TAG, true);\n // fix for some old engines\n if (!LIBRARY && !has(IteratorPrototype, ITERATOR)) hide(IteratorPrototype, ITERATOR, returnThis);\n }\n }\n // fix Array#{values, @@iterator}.name in V8 / FF\n if (DEF_VALUES && $native && $native.name !== VALUES) {\n VALUES_BUG = true;\n $default = function values() { return $native.call(this); };\n }\n // Define iterator\n if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {\n hide(proto, ITERATOR, $default);\n }\n // Plug for library\n Iterators[NAME] = $default;\n Iterators[TAG] = returnThis;\n if (DEFAULT) {\n methods = {\n values: DEF_VALUES ? $default : getMethod(VALUES),\n keys: IS_SET ? $default : getMethod(KEYS),\n entries: $entries\n };\n if (FORCED) for (key in methods) {\n if (!(key in proto)) redefine(proto, key, methods[key]);\n } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);\n }\n return methods;\n};\n","'use strict';\nvar $at = require('./_string-at')(true);\n\n// 21.1.3.27 String.prototype[@@iterator]()\nrequire('./_iter-define')(String, 'String', function (iterated) {\n this._t = String(iterated); // target\n this._i = 0; // next index\n// 21.1.5.2.1 %StringIteratorPrototype%.next()\n}, function () {\n var O = this._t;\n var index = this._i;\n var point;\n if (index >= O.length) return { value: undefined, done: true };\n point = $at(O, index);\n this._i += point.length;\n return { value: point, done: false };\n});\n","module.exports = function () { /* empty */ };\n","module.exports = function (done, value) {\n return { value: value, done: !!done };\n};\n","'use strict';\nvar addToUnscopables = require('./_add-to-unscopables');\nvar step = require('./_iter-step');\nvar Iterators = require('./_iterators');\nvar toIObject = require('./_to-iobject');\n\n// 22.1.3.4 Array.prototype.entries()\n// 22.1.3.13 Array.prototype.keys()\n// 22.1.3.29 Array.prototype.values()\n// 22.1.3.30 Array.prototype[@@iterator]()\nmodule.exports = require('./_iter-define')(Array, 'Array', function (iterated, kind) {\n this._t = toIObject(iterated); // target\n this._i = 0; // next index\n this._k = kind; // kind\n// 22.1.5.2.1 %ArrayIteratorPrototype%.next()\n}, function () {\n var O = this._t;\n var kind = this._k;\n var index = this._i++;\n if (!O || index >= O.length) {\n this._t = undefined;\n return step(1);\n }\n if (kind == 'keys') return step(0, index);\n if (kind == 'values') return step(0, O[index]);\n return step(0, [index, O[index]]);\n}, 'values');\n\n// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)\nIterators.Arguments = Iterators.Array;\n\naddToUnscopables('keys');\naddToUnscopables('values');\naddToUnscopables('entries');\n","require('./es6.array.iterator');\nvar global = require('./_global');\nvar hide = require('./_hide');\nvar Iterators = require('./_iterators');\nvar TO_STRING_TAG = require('./_wks')('toStringTag');\n\nvar DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' +\n 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' +\n 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' +\n 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' +\n 'TextTrackList,TouchList').split(',');\n\nfor (var i = 0; i < DOMIterables.length; i++) {\n var NAME = DOMIterables[i];\n var Collection = global[NAME];\n var proto = Collection && Collection.prototype;\n if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);\n Iterators[NAME] = Iterators.Array;\n}\n","// getting tag from 19.1.3.6 Object.prototype.toString()\nvar cof = require('./_cof');\nvar TAG = require('./_wks')('toStringTag');\n// ES3 wrong here\nvar ARG = cof(function () { return arguments; }()) == 'Arguments';\n\n// fallback for IE11 Script Access Denied error\nvar tryGet = function (it, key) {\n try {\n return it[key];\n } catch (e) { /* empty */ }\n};\n\nmodule.exports = function (it) {\n var O, T, B;\n return it === undefined ? 'Undefined' : it === null ? 'Null'\n // @@toStringTag case\n : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T\n // builtinTag case\n : ARG ? cof(O)\n // ES3 arguments fallback\n : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;\n};\n","module.exports = function (it, Constructor, name, forbiddenField) {\n if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) {\n throw TypeError(name + ': incorrect invocation!');\n } return it;\n};\n","// call something on iterator step with safe closing on error\nvar anObject = require('./_an-object');\nmodule.exports = function (iterator, fn, value, entries) {\n try {\n return entries ? fn(anObject(value)[0], value[1]) : fn(value);\n // 7.4.6 IteratorClose(iterator, completion)\n } catch (e) {\n var ret = iterator['return'];\n if (ret !== undefined) anObject(ret.call(iterator));\n throw e;\n }\n};\n","// check on default Array iterator\nvar Iterators = require('./_iterators');\nvar ITERATOR = require('./_wks')('iterator');\nvar ArrayProto = Array.prototype;\n\nmodule.exports = function (it) {\n return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);\n};\n","var classof = require('./_classof');\nvar ITERATOR = require('./_wks')('iterator');\nvar Iterators = require('./_iterators');\nmodule.exports = require('./_core').getIteratorMethod = function (it) {\n if (it != undefined) return it[ITERATOR]\n || it['@@iterator']\n || Iterators[classof(it)];\n};\n","var ctx = require('./_ctx');\nvar call = require('./_iter-call');\nvar isArrayIter = require('./_is-array-iter');\nvar anObject = require('./_an-object');\nvar toLength = require('./_to-length');\nvar getIterFn = require('./core.get-iterator-method');\nvar BREAK = {};\nvar RETURN = {};\nvar exports = module.exports = function (iterable, entries, fn, that, ITERATOR) {\n var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable);\n var f = ctx(fn, that, entries ? 2 : 1);\n var index = 0;\n var length, step, iterator, result;\n if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!');\n // fast case for arrays with default iterator\n if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) {\n result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);\n if (result === BREAK || result === RETURN) return result;\n } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) {\n result = call(iterator, f, step.value, entries);\n if (result === BREAK || result === RETURN) return result;\n }\n};\nexports.BREAK = BREAK;\nexports.RETURN = RETURN;\n","// 7.3.20 SpeciesConstructor(O, defaultConstructor)\nvar anObject = require('./_an-object');\nvar aFunction = require('./_a-function');\nvar SPECIES = require('./_wks')('species');\nmodule.exports = function (O, D) {\n var C = anObject(O).constructor;\n var S;\n return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S);\n};\n","// fast apply, http://jsperf.lnkit.com/fast-apply/5\nmodule.exports = function (fn, args, that) {\n var un = that === undefined;\n switch (args.length) {\n case 0: return un ? fn()\n : fn.call(that);\n case 1: return un ? fn(args[0])\n : fn.call(that, args[0]);\n case 2: return un ? fn(args[0], args[1])\n : fn.call(that, args[0], args[1]);\n case 3: return un ? fn(args[0], args[1], args[2])\n : fn.call(that, args[0], args[1], args[2]);\n case 4: return un ? fn(args[0], args[1], args[2], args[3])\n : fn.call(that, args[0], args[1], args[2], args[3]);\n } return fn.apply(that, args);\n};\n","var ctx = require('./_ctx');\nvar invoke = require('./_invoke');\nvar html = require('./_html');\nvar cel = require('./_dom-create');\nvar global = require('./_global');\nvar process = global.process;\nvar setTask = global.setImmediate;\nvar clearTask = global.clearImmediate;\nvar MessageChannel = global.MessageChannel;\nvar Dispatch = global.Dispatch;\nvar counter = 0;\nvar queue = {};\nvar ONREADYSTATECHANGE = 'onreadystatechange';\nvar defer, channel, port;\nvar run = function () {\n var id = +this;\n // eslint-disable-next-line no-prototype-builtins\n if (queue.hasOwnProperty(id)) {\n var fn = queue[id];\n delete queue[id];\n fn();\n }\n};\nvar listener = function (event) {\n run.call(event.data);\n};\n// Node.js 0.9+ & IE10+ has setImmediate, otherwise:\nif (!setTask || !clearTask) {\n setTask = function setImmediate(fn) {\n var args = [];\n var i = 1;\n while (arguments.length > i) args.push(arguments[i++]);\n queue[++counter] = function () {\n // eslint-disable-next-line no-new-func\n invoke(typeof fn == 'function' ? fn : Function(fn), args);\n };\n defer(counter);\n return counter;\n };\n clearTask = function clearImmediate(id) {\n delete queue[id];\n };\n // Node.js 0.8-\n if (require('./_cof')(process) == 'process') {\n defer = function (id) {\n process.nextTick(ctx(run, id, 1));\n };\n // Sphere (JS game engine) Dispatch API\n } else if (Dispatch && Dispatch.now) {\n defer = function (id) {\n Dispatch.now(ctx(run, id, 1));\n };\n // Browsers with MessageChannel, includes WebWorkers\n } else if (MessageChannel) {\n channel = new MessageChannel();\n port = channel.port2;\n channel.port1.onmessage = listener;\n defer = ctx(port.postMessage, port, 1);\n // Browsers with postMessage, skip WebWorkers\n // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'\n } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) {\n defer = function (id) {\n global.postMessage(id + '', '*');\n };\n global.addEventListener('message', listener, false);\n // IE8-\n } else if (ONREADYSTATECHANGE in cel('script')) {\n defer = function (id) {\n html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () {\n html.removeChild(this);\n run.call(id);\n };\n };\n // Rest old browsers\n } else {\n defer = function (id) {\n setTimeout(ctx(run, id, 1), 0);\n };\n }\n}\nmodule.exports = {\n set: setTask,\n clear: clearTask\n};\n","var global = require('./_global');\nvar macrotask = require('./_task').set;\nvar Observer = global.MutationObserver || global.WebKitMutationObserver;\nvar process = global.process;\nvar Promise = global.Promise;\nvar isNode = require('./_cof')(process) == 'process';\n\nmodule.exports = function () {\n var head, last, notify;\n\n var flush = function () {\n var parent, fn;\n if (isNode && (parent = process.domain)) parent.exit();\n while (head) {\n fn = head.fn;\n head = head.next;\n try {\n fn();\n } catch (e) {\n if (head) notify();\n else last = undefined;\n throw e;\n }\n } last = undefined;\n if (parent) parent.enter();\n };\n\n // Node.js\n if (isNode) {\n notify = function () {\n process.nextTick(flush);\n };\n // browsers with MutationObserver\n } else if (Observer) {\n var toggle = true;\n var node = document.createTextNode('');\n new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new\n notify = function () {\n node.data = toggle = !toggle;\n };\n // environments with maybe non-completely correct, but existent Promise\n } else if (Promise && Promise.resolve) {\n var promise = Promise.resolve();\n notify = function () {\n promise.then(flush);\n };\n // for other environments - macrotask based on:\n // - setImmediate\n // - MessageChannel\n // - window.postMessag\n // - onreadystatechange\n // - setTimeout\n } else {\n notify = function () {\n // strange IE + webpack dev server bug - use .call(global)\n macrotask.call(global, flush);\n };\n }\n\n return function (fn) {\n var task = { fn: fn, next: undefined };\n if (last) last.next = task;\n if (!head) {\n head = task;\n notify();\n } last = task;\n };\n};\n","'use strict';\n// 25.4.1.5 NewPromiseCapability(C)\nvar aFunction = require('./_a-function');\n\nfunction PromiseCapability(C) {\n var resolve, reject;\n this.promise = new C(function ($$resolve, $$reject) {\n if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');\n resolve = $$resolve;\n reject = $$reject;\n });\n this.resolve = aFunction(resolve);\n this.reject = aFunction(reject);\n}\n\nmodule.exports.f = function (C) {\n return new PromiseCapability(C);\n};\n","module.exports = function (exec) {\n try {\n return { e: false, v: exec() };\n } catch (e) {\n return { e: true, v: e };\n }\n};\n","var anObject = require('./_an-object');\nvar isObject = require('./_is-object');\nvar newPromiseCapability = require('./_new-promise-capability');\n\nmodule.exports = function (C, x) {\n anObject(C);\n if (isObject(x) && x.constructor === C) return x;\n var promiseCapability = newPromiseCapability.f(C);\n var resolve = promiseCapability.resolve;\n resolve(x);\n return promiseCapability.promise;\n};\n","var hide = require('./_hide');\nmodule.exports = function (target, src, safe) {\n for (var key in src) {\n if (safe && target[key]) target[key] = src[key];\n else hide(target, key, src[key]);\n } return target;\n};\n","'use strict';\nvar global = require('./_global');\nvar core = require('./_core');\nvar dP = require('./_object-dp');\nvar DESCRIPTORS = require('./_descriptors');\nvar SPECIES = require('./_wks')('species');\n\nmodule.exports = function (KEY) {\n var C = typeof core[KEY] == 'function' ? core[KEY] : global[KEY];\n if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, {\n configurable: true,\n get: function () { return this; }\n });\n};\n","var ITERATOR = require('./_wks')('iterator');\nvar SAFE_CLOSING = false;\n\ntry {\n var riter = [7][ITERATOR]();\n riter['return'] = function () { SAFE_CLOSING = true; };\n // eslint-disable-next-line no-throw-literal\n Array.from(riter, function () { throw 2; });\n} catch (e) { /* empty */ }\n\nmodule.exports = function (exec, skipClosing) {\n if (!skipClosing && !SAFE_CLOSING) return false;\n var safe = false;\n try {\n var arr = [7];\n var iter = arr[ITERATOR]();\n iter.next = function () { return { done: safe = true }; };\n arr[ITERATOR] = function () { return iter; };\n exec(arr);\n } catch (e) { /* empty */ }\n return safe;\n};\n","'use strict';\nvar LIBRARY = require('./_library');\nvar global = require('./_global');\nvar ctx = require('./_ctx');\nvar classof = require('./_classof');\nvar $export = require('./_export');\nvar isObject = require('./_is-object');\nvar aFunction = require('./_a-function');\nvar anInstance = require('./_an-instance');\nvar forOf = require('./_for-of');\nvar speciesConstructor = require('./_species-constructor');\nvar task = require('./_task').set;\nvar microtask = require('./_microtask')();\nvar newPromiseCapabilityModule = require('./_new-promise-capability');\nvar perform = require('./_perform');\nvar promiseResolve = require('./_promise-resolve');\nvar PROMISE = 'Promise';\nvar TypeError = global.TypeError;\nvar process = global.process;\nvar $Promise = global[PROMISE];\nvar isNode = classof(process) == 'process';\nvar empty = function () { /* empty */ };\nvar Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper;\nvar newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f;\n\nvar USE_NATIVE = !!function () {\n try {\n // correct subclassing with @@species support\n var promise = $Promise.resolve(1);\n var FakePromise = (promise.constructor = {})[require('./_wks')('species')] = function (exec) {\n exec(empty, empty);\n };\n // unhandled rejections tracking support, NodeJS Promise without it fails @@species test\n return (isNode || typeof PromiseRejectionEvent == 'function') && promise.then(empty) instanceof FakePromise;\n } catch (e) { /* empty */ }\n}();\n\n// helpers\nvar isThenable = function (it) {\n var then;\n return isObject(it) && typeof (then = it.then) == 'function' ? then : false;\n};\nvar notify = function (promise, isReject) {\n if (promise._n) return;\n promise._n = true;\n var chain = promise._c;\n microtask(function () {\n var value = promise._v;\n var ok = promise._s == 1;\n var i = 0;\n var run = function (reaction) {\n var handler = ok ? reaction.ok : reaction.fail;\n var resolve = reaction.resolve;\n var reject = reaction.reject;\n var domain = reaction.domain;\n var result, then;\n try {\n if (handler) {\n if (!ok) {\n if (promise._h == 2) onHandleUnhandled(promise);\n promise._h = 1;\n }\n if (handler === true) result = value;\n else {\n if (domain) domain.enter();\n result = handler(value);\n if (domain) domain.exit();\n }\n if (result === reaction.promise) {\n reject(TypeError('Promise-chain cycle'));\n } else if (then = isThenable(result)) {\n then.call(result, resolve, reject);\n } else resolve(result);\n } else reject(value);\n } catch (e) {\n reject(e);\n }\n };\n while (chain.length > i) run(chain[i++]); // variable length - can't use forEach\n promise._c = [];\n promise._n = false;\n if (isReject && !promise._h) onUnhandled(promise);\n });\n};\nvar onUnhandled = function (promise) {\n task.call(global, function () {\n var value = promise._v;\n var unhandled = isUnhandled(promise);\n var result, handler, console;\n if (unhandled) {\n result = perform(function () {\n if (isNode) {\n process.emit('unhandledRejection', value, promise);\n } else if (handler = global.onunhandledrejection) {\n handler({ promise: promise, reason: value });\n } else if ((console = global.console) && console.error) {\n console.error('Unhandled promise rejection', value);\n }\n });\n // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should\n promise._h = isNode || isUnhandled(promise) ? 2 : 1;\n } promise._a = undefined;\n if (unhandled && result.e) throw result.v;\n });\n};\nvar isUnhandled = function (promise) {\n if (promise._h == 1) return false;\n var chain = promise._a || promise._c;\n var i = 0;\n var reaction;\n while (chain.length > i) {\n reaction = chain[i++];\n if (reaction.fail || !isUnhandled(reaction.promise)) return false;\n } return true;\n};\nvar onHandleUnhandled = function (promise) {\n task.call(global, function () {\n var handler;\n if (isNode) {\n process.emit('rejectionHandled', promise);\n } else if (handler = global.onrejectionhandled) {\n handler({ promise: promise, reason: promise._v });\n }\n });\n};\nvar $reject = function (value) {\n var promise = this;\n if (promise._d) return;\n promise._d = true;\n promise = promise._w || promise; // unwrap\n promise._v = value;\n promise._s = 2;\n if (!promise._a) promise._a = promise._c.slice();\n notify(promise, true);\n};\nvar $resolve = function (value) {\n var promise = this;\n var then;\n if (promise._d) return;\n promise._d = true;\n promise = promise._w || promise; // unwrap\n try {\n if (promise === value) throw TypeError(\"Promise can't be resolved itself\");\n if (then = isThenable(value)) {\n microtask(function () {\n var wrapper = { _w: promise, _d: false }; // wrap\n try {\n then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1));\n } catch (e) {\n $reject.call(wrapper, e);\n }\n });\n } else {\n promise._v = value;\n promise._s = 1;\n notify(promise, false);\n }\n } catch (e) {\n $reject.call({ _w: promise, _d: false }, e); // wrap\n }\n};\n\n// constructor polyfill\nif (!USE_NATIVE) {\n // 25.4.3.1 Promise(executor)\n $Promise = function Promise(executor) {\n anInstance(this, $Promise, PROMISE, '_h');\n aFunction(executor);\n Internal.call(this);\n try {\n executor(ctx($resolve, this, 1), ctx($reject, this, 1));\n } catch (err) {\n $reject.call(this, err);\n }\n };\n // eslint-disable-next-line no-unused-vars\n Internal = function Promise(executor) {\n this._c = []; // <- awaiting reactions\n this._a = undefined; // <- checked in isUnhandled reactions\n this._s = 0; // <- state\n this._d = false; // <- done\n this._v = undefined; // <- value\n this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled\n this._n = false; // <- notify\n };\n Internal.prototype = require('./_redefine-all')($Promise.prototype, {\n // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected)\n then: function then(onFulfilled, onRejected) {\n var reaction = newPromiseCapability(speciesConstructor(this, $Promise));\n reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;\n reaction.fail = typeof onRejected == 'function' && onRejected;\n reaction.domain = isNode ? process.domain : undefined;\n this._c.push(reaction);\n if (this._a) this._a.push(reaction);\n if (this._s) notify(this, false);\n return reaction.promise;\n },\n // 25.4.5.1 Promise.prototype.catch(onRejected)\n 'catch': function (onRejected) {\n return this.then(undefined, onRejected);\n }\n });\n OwnPromiseCapability = function () {\n var promise = new Internal();\n this.promise = promise;\n this.resolve = ctx($resolve, promise, 1);\n this.reject = ctx($reject, promise, 1);\n };\n newPromiseCapabilityModule.f = newPromiseCapability = function (C) {\n return C === $Promise || C === Wrapper\n ? new OwnPromiseCapability(C)\n : newGenericPromiseCapability(C);\n };\n}\n\n$export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise });\nrequire('./_set-to-string-tag')($Promise, PROMISE);\nrequire('./_set-species')(PROMISE);\nWrapper = require('./_core')[PROMISE];\n\n// statics\n$export($export.S + $export.F * !USE_NATIVE, PROMISE, {\n // 25.4.4.5 Promise.reject(r)\n reject: function reject(r) {\n var capability = newPromiseCapability(this);\n var $$reject = capability.reject;\n $$reject(r);\n return capability.promise;\n }\n});\n$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, {\n // 25.4.4.6 Promise.resolve(x)\n resolve: function resolve(x) {\n return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x);\n }\n});\n$export($export.S + $export.F * !(USE_NATIVE && require('./_iter-detect')(function (iter) {\n $Promise.all(iter)['catch'](empty);\n})), PROMISE, {\n // 25.4.4.1 Promise.all(iterable)\n all: function all(iterable) {\n var C = this;\n var capability = newPromiseCapability(C);\n var resolve = capability.resolve;\n var reject = capability.reject;\n var result = perform(function () {\n var values = [];\n var index = 0;\n var remaining = 1;\n forOf(iterable, false, function (promise) {\n var $index = index++;\n var alreadyCalled = false;\n values.push(undefined);\n remaining++;\n C.resolve(promise).then(function (value) {\n if (alreadyCalled) return;\n alreadyCalled = true;\n values[$index] = value;\n --remaining || resolve(values);\n }, reject);\n });\n --remaining || resolve(values);\n });\n if (result.e) reject(result.v);\n return capability.promise;\n },\n // 25.4.4.4 Promise.race(iterable)\n race: function race(iterable) {\n var C = this;\n var capability = newPromiseCapability(C);\n var reject = capability.reject;\n var result = perform(function () {\n forOf(iterable, false, function (promise) {\n C.resolve(promise).then(capability.resolve, reject);\n });\n });\n if (result.e) reject(result.v);\n return capability.promise;\n }\n});\n","// https://github.com/tc39/proposal-promise-finally\n'use strict';\nvar $export = require('./_export');\nvar core = require('./_core');\nvar global = require('./_global');\nvar speciesConstructor = require('./_species-constructor');\nvar promiseResolve = require('./_promise-resolve');\n\n$export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) {\n var C = speciesConstructor(this, core.Promise || global.Promise);\n var isFunction = typeof onFinally == 'function';\n return this.then(\n isFunction ? function (x) {\n return promiseResolve(C, onFinally()).then(function () { return x; });\n } : onFinally,\n isFunction ? function (e) {\n return promiseResolve(C, onFinally()).then(function () { throw e; });\n } : onFinally\n );\n} });\n","'use strict';\n// https://github.com/tc39/proposal-promise-try\nvar $export = require('./_export');\nvar newPromiseCapability = require('./_new-promise-capability');\nvar perform = require('./_perform');\n\n$export($export.S, 'Promise', { 'try': function (callbackfn) {\n var promiseCapability = newPromiseCapability.f(this);\n var result = perform(callbackfn);\n (result.e ? promiseCapability.reject : promiseCapability.resolve)(result.v);\n return promiseCapability.promise;\n} });\n","require('../modules/es6.object.to-string');\nrequire('../modules/es6.string.iterator');\nrequire('../modules/web.dom.iterable');\nrequire('../modules/es6.promise');\nrequire('../modules/es7.promise.finally');\nrequire('../modules/es7.promise.try');\nmodule.exports = require('../modules/_core').Promise;\n","module.exports = { \"default\": require(\"core-js/library/fn/promise\"), __esModule: true };","/*\r\n Copyright 2013 Daniel Wirtz \r\n Copyright 2009 The Closure Library Authors. All Rights Reserved.\r\n\r\n Licensed under the Apache License, Version 2.0 (the \"License\");\r\n you may not use this file except in compliance with the License.\r\n You may obtain a copy of the License at\r\n\r\n http://www.apache.org/licenses/LICENSE-2.0\r\n\r\n Unless required by applicable law or agreed to in writing, software\r\n distributed under the License is distributed on an \"AS-IS\" BASIS,\r\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n See the License for the specific language governing permissions and\r\n limitations under the License.\r\n */\r\n\r\n/**\r\n * @license long.js (c) 2013 Daniel Wirtz \r\n * Released under the Apache License, Version 2.0\r\n * see: https://github.com/dcodeIO/long.js for details\r\n */\r\n(function(global, factory) {\r\n\r\n /* AMD */ if (typeof define === 'function' && define[\"amd\"])\r\n define([], factory);\r\n /* CommonJS */ else if (typeof require === 'function' && typeof module === \"object\" && module && module[\"exports\"])\r\n module[\"exports\"] = factory();\r\n /* Global */ else\r\n (global[\"dcodeIO\"] = global[\"dcodeIO\"] || {})[\"Long\"] = factory();\r\n\r\n})(this, function() {\r\n \"use strict\";\r\n\r\n /**\r\n * Constructs a 64 bit two's-complement integer, given its low and high 32 bit values as *signed* integers.\r\n * See the from* functions below for more convenient ways of constructing Longs.\r\n * @exports Long\r\n * @class A Long class for representing a 64 bit two's-complement integer value.\r\n * @param {number} low The low (signed) 32 bits of the long\r\n * @param {number} high The high (signed) 32 bits of the long\r\n * @param {boolean=} unsigned Whether unsigned or not, defaults to `false` for signed\r\n * @constructor\r\n */\r\n function Long(low, high, unsigned) {\r\n\r\n /**\r\n * The low 32 bits as a signed value.\r\n * @type {number}\r\n */\r\n this.low = low | 0;\r\n\r\n /**\r\n * The high 32 bits as a signed value.\r\n * @type {number}\r\n */\r\n this.high = high | 0;\r\n\r\n /**\r\n * Whether unsigned or not.\r\n * @type {boolean}\r\n */\r\n this.unsigned = !!unsigned;\r\n }\r\n\r\n // The internal representation of a long is the two given signed, 32-bit values.\r\n // We use 32-bit pieces because these are the size of integers on which\r\n // Javascript performs bit-operations. For operations like addition and\r\n // multiplication, we split each number into 16 bit pieces, which can easily be\r\n // multiplied within Javascript's floating-point representation without overflow\r\n // or change in sign.\r\n //\r\n // In the algorithms below, we frequently reduce the negative case to the\r\n // positive case by negating the input(s) and then post-processing the result.\r\n // Note that we must ALWAYS check specially whether those values are MIN_VALUE\r\n // (-2^63) because -MIN_VALUE == MIN_VALUE (since 2^63 cannot be represented as\r\n // a positive number, it overflows back into a negative). Not handling this\r\n // case would often result in infinite recursion.\r\n //\r\n // Common constant values ZERO, ONE, NEG_ONE, etc. are defined below the from*\r\n // methods on which they depend.\r\n\r\n /**\r\n * An indicator used to reliably determine if an object is a Long or not.\r\n * @type {boolean}\r\n * @const\r\n * @private\r\n */\r\n Long.prototype.__isLong__;\r\n\r\n Object.defineProperty(Long.prototype, \"__isLong__\", {\r\n value: true,\r\n enumerable: false,\r\n configurable: false\r\n });\r\n\r\n /**\r\n * @function\r\n * @param {*} obj Object\r\n * @returns {boolean}\r\n * @inner\r\n */\r\n function isLong(obj) {\r\n return (obj && obj[\"__isLong__\"]) === true;\r\n }\r\n\r\n /**\r\n * Tests if the specified object is a Long.\r\n * @function\r\n * @param {*} obj Object\r\n * @returns {boolean}\r\n */\r\n Long.isLong = isLong;\r\n\r\n /**\r\n * A cache of the Long representations of small integer values.\r\n * @type {!Object}\r\n * @inner\r\n */\r\n var INT_CACHE = {};\r\n\r\n /**\r\n * A cache of the Long representations of small unsigned integer values.\r\n * @type {!Object}\r\n * @inner\r\n */\r\n var UINT_CACHE = {};\r\n\r\n /**\r\n * @param {number} value\r\n * @param {boolean=} unsigned\r\n * @returns {!Long}\r\n * @inner\r\n */\r\n function fromInt(value, unsigned) {\r\n var obj, cachedObj, cache;\r\n if (unsigned) {\r\n value >>>= 0;\r\n if (cache = (0 <= value && value < 256)) {\r\n cachedObj = UINT_CACHE[value];\r\n if (cachedObj)\r\n return cachedObj;\r\n }\r\n obj = fromBits(value, (value | 0) < 0 ? -1 : 0, true);\r\n if (cache)\r\n UINT_CACHE[value] = obj;\r\n return obj;\r\n } else {\r\n value |= 0;\r\n if (cache = (-128 <= value && value < 128)) {\r\n cachedObj = INT_CACHE[value];\r\n if (cachedObj)\r\n return cachedObj;\r\n }\r\n obj = fromBits(value, value < 0 ? -1 : 0, false);\r\n if (cache)\r\n INT_CACHE[value] = obj;\r\n return obj;\r\n }\r\n }\r\n\r\n /**\r\n * Returns a Long representing the given 32 bit integer value.\r\n * @function\r\n * @param {number} value The 32 bit integer in question\r\n * @param {boolean=} unsigned Whether unsigned or not, defaults to `false` for signed\r\n * @returns {!Long} The corresponding Long value\r\n */\r\n Long.fromInt = fromInt;\r\n\r\n /**\r\n * @param {number} value\r\n * @param {boolean=} unsigned\r\n * @returns {!Long}\r\n * @inner\r\n */\r\n function fromNumber(value, unsigned) {\r\n if (isNaN(value) || !isFinite(value))\r\n return unsigned ? UZERO : ZERO;\r\n if (unsigned) {\r\n if (value < 0)\r\n return UZERO;\r\n if (value >= TWO_PWR_64_DBL)\r\n return MAX_UNSIGNED_VALUE;\r\n } else {\r\n if (value <= -TWO_PWR_63_DBL)\r\n return MIN_VALUE;\r\n if (value + 1 >= TWO_PWR_63_DBL)\r\n return MAX_VALUE;\r\n }\r\n if (value < 0)\r\n return fromNumber(-value, unsigned).neg();\r\n return fromBits((value % TWO_PWR_32_DBL) | 0, (value / TWO_PWR_32_DBL) | 0, unsigned);\r\n }\r\n\r\n /**\r\n * Returns a Long representing the given value, provided that it is a finite number. Otherwise, zero is returned.\r\n * @function\r\n * @param {number} value The number in question\r\n * @param {boolean=} unsigned Whether unsigned or not, defaults to `false` for signed\r\n * @returns {!Long} The corresponding Long value\r\n */\r\n Long.fromNumber = fromNumber;\r\n\r\n /**\r\n * @param {number} lowBits\r\n * @param {number} highBits\r\n * @param {boolean=} unsigned\r\n * @returns {!Long}\r\n * @inner\r\n */\r\n function fromBits(lowBits, highBits, unsigned) {\r\n return new Long(lowBits, highBits, unsigned);\r\n }\r\n\r\n /**\r\n * Returns a Long representing the 64 bit integer that comes by concatenating the given low and high bits. Each is\r\n * assumed to use 32 bits.\r\n * @function\r\n * @param {number} lowBits The low 32 bits\r\n * @param {number} highBits The high 32 bits\r\n * @param {boolean=} unsigned Whether unsigned or not, defaults to `false` for signed\r\n * @returns {!Long} The corresponding Long value\r\n */\r\n Long.fromBits = fromBits;\r\n\r\n /**\r\n * @function\r\n * @param {number} base\r\n * @param {number} exponent\r\n * @returns {number}\r\n * @inner\r\n */\r\n var pow_dbl = Math.pow; // Used 4 times (4*8 to 15+4)\r\n\r\n /**\r\n * @param {string} str\r\n * @param {(boolean|number)=} unsigned\r\n * @param {number=} radix\r\n * @returns {!Long}\r\n * @inner\r\n */\r\n function fromString(str, unsigned, radix) {\r\n if (str.length === 0)\r\n throw Error('empty string');\r\n if (str === \"NaN\" || str === \"Infinity\" || str === \"+Infinity\" || str === \"-Infinity\")\r\n return ZERO;\r\n if (typeof unsigned === 'number') {\r\n // For goog.math.long compatibility\r\n radix = unsigned,\r\n unsigned = false;\r\n } else {\r\n unsigned = !! unsigned;\r\n }\r\n radix = radix || 10;\r\n if (radix < 2 || 36 < radix)\r\n throw RangeError('radix');\r\n\r\n var p;\r\n if ((p = str.indexOf('-')) > 0)\r\n throw Error('interior hyphen');\r\n else if (p === 0) {\r\n return fromString(str.substring(1), unsigned, radix).neg();\r\n }\r\n\r\n // Do several (8) digits each time through the loop, so as to\r\n // minimize the calls to the very expensive emulated div.\r\n var radixToPower = fromNumber(pow_dbl(radix, 8));\r\n\r\n var result = ZERO;\r\n for (var i = 0; i < str.length; i += 8) {\r\n var size = Math.min(8, str.length - i),\r\n value = parseInt(str.substring(i, i + size), radix);\r\n if (size < 8) {\r\n var power = fromNumber(pow_dbl(radix, size));\r\n result = result.mul(power).add(fromNumber(value));\r\n } else {\r\n result = result.mul(radixToPower);\r\n result = result.add(fromNumber(value));\r\n }\r\n }\r\n result.unsigned = unsigned;\r\n return result;\r\n }\r\n\r\n /**\r\n * Returns a Long representation of the given string, written using the specified radix.\r\n * @function\r\n * @param {string} str The textual representation of the Long\r\n * @param {(boolean|number)=} unsigned Whether unsigned or not, defaults to `false` for signed\r\n * @param {number=} radix The radix in which the text is written (2-36), defaults to 10\r\n * @returns {!Long} The corresponding Long value\r\n */\r\n Long.fromString = fromString;\r\n\r\n /**\r\n * @function\r\n * @param {!Long|number|string|!{low: number, high: number, unsigned: boolean}} val\r\n * @returns {!Long}\r\n * @inner\r\n */\r\n function fromValue(val) {\r\n if (val /* is compatible */ instanceof Long)\r\n return val;\r\n if (typeof val === 'number')\r\n return fromNumber(val);\r\n if (typeof val === 'string')\r\n return fromString(val);\r\n // Throws for non-objects, converts non-instanceof Long:\r\n return fromBits(val.low, val.high, val.unsigned);\r\n }\r\n\r\n /**\r\n * Converts the specified value to a Long.\r\n * @function\r\n * @param {!Long|number|string|!{low: number, high: number, unsigned: boolean}} val Value\r\n * @returns {!Long}\r\n */\r\n Long.fromValue = fromValue;\r\n\r\n // NOTE: the compiler should inline these constant values below and then remove these variables, so there should be\r\n // no runtime penalty for these.\r\n\r\n /**\r\n * @type {number}\r\n * @const\r\n * @inner\r\n */\r\n var TWO_PWR_16_DBL = 1 << 16;\r\n\r\n /**\r\n * @type {number}\r\n * @const\r\n * @inner\r\n */\r\n var TWO_PWR_24_DBL = 1 << 24;\r\n\r\n /**\r\n * @type {number}\r\n * @const\r\n * @inner\r\n */\r\n var TWO_PWR_32_DBL = TWO_PWR_16_DBL * TWO_PWR_16_DBL;\r\n\r\n /**\r\n * @type {number}\r\n * @const\r\n * @inner\r\n */\r\n var TWO_PWR_64_DBL = TWO_PWR_32_DBL * TWO_PWR_32_DBL;\r\n\r\n /**\r\n * @type {number}\r\n * @const\r\n * @inner\r\n */\r\n var TWO_PWR_63_DBL = TWO_PWR_64_DBL / 2;\r\n\r\n /**\r\n * @type {!Long}\r\n * @const\r\n * @inner\r\n */\r\n var TWO_PWR_24 = fromInt(TWO_PWR_24_DBL);\r\n\r\n /**\r\n * @type {!Long}\r\n * @inner\r\n */\r\n var ZERO = fromInt(0);\r\n\r\n /**\r\n * Signed zero.\r\n * @type {!Long}\r\n */\r\n Long.ZERO = ZERO;\r\n\r\n /**\r\n * @type {!Long}\r\n * @inner\r\n */\r\n var UZERO = fromInt(0, true);\r\n\r\n /**\r\n * Unsigned zero.\r\n * @type {!Long}\r\n */\r\n Long.UZERO = UZERO;\r\n\r\n /**\r\n * @type {!Long}\r\n * @inner\r\n */\r\n var ONE = fromInt(1);\r\n\r\n /**\r\n * Signed one.\r\n * @type {!Long}\r\n */\r\n Long.ONE = ONE;\r\n\r\n /**\r\n * @type {!Long}\r\n * @inner\r\n */\r\n var UONE = fromInt(1, true);\r\n\r\n /**\r\n * Unsigned one.\r\n * @type {!Long}\r\n */\r\n Long.UONE = UONE;\r\n\r\n /**\r\n * @type {!Long}\r\n * @inner\r\n */\r\n var NEG_ONE = fromInt(-1);\r\n\r\n /**\r\n * Signed negative one.\r\n * @type {!Long}\r\n */\r\n Long.NEG_ONE = NEG_ONE;\r\n\r\n /**\r\n * @type {!Long}\r\n * @inner\r\n */\r\n var MAX_VALUE = fromBits(0xFFFFFFFF|0, 0x7FFFFFFF|0, false);\r\n\r\n /**\r\n * Maximum signed value.\r\n * @type {!Long}\r\n */\r\n Long.MAX_VALUE = MAX_VALUE;\r\n\r\n /**\r\n * @type {!Long}\r\n * @inner\r\n */\r\n var MAX_UNSIGNED_VALUE = fromBits(0xFFFFFFFF|0, 0xFFFFFFFF|0, true);\r\n\r\n /**\r\n * Maximum unsigned value.\r\n * @type {!Long}\r\n */\r\n Long.MAX_UNSIGNED_VALUE = MAX_UNSIGNED_VALUE;\r\n\r\n /**\r\n * @type {!Long}\r\n * @inner\r\n */\r\n var MIN_VALUE = fromBits(0, 0x80000000|0, false);\r\n\r\n /**\r\n * Minimum signed value.\r\n * @type {!Long}\r\n */\r\n Long.MIN_VALUE = MIN_VALUE;\r\n\r\n /**\r\n * @alias Long.prototype\r\n * @inner\r\n */\r\n var LongPrototype = Long.prototype;\r\n\r\n /**\r\n * Converts the Long to a 32 bit integer, assuming it is a 32 bit integer.\r\n * @returns {number}\r\n */\r\n LongPrototype.toInt = function toInt() {\r\n return this.unsigned ? this.low >>> 0 : this.low;\r\n };\r\n\r\n /**\r\n * Converts the Long to a the nearest floating-point representation of this value (double, 53 bit mantissa).\r\n * @returns {number}\r\n */\r\n LongPrototype.toNumber = function toNumber() {\r\n if (this.unsigned)\r\n return ((this.high >>> 0) * TWO_PWR_32_DBL) + (this.low >>> 0);\r\n return this.high * TWO_PWR_32_DBL + (this.low >>> 0);\r\n };\r\n\r\n /**\r\n * Converts the Long to a string written in the specified radix.\r\n * @param {number=} radix Radix (2-36), defaults to 10\r\n * @returns {string}\r\n * @override\r\n * @throws {RangeError} If `radix` is out of range\r\n */\r\n LongPrototype.toString = function toString(radix) {\r\n radix = radix || 10;\r\n if (radix < 2 || 36 < radix)\r\n throw RangeError('radix');\r\n if (this.isZero())\r\n return '0';\r\n if (this.isNegative()) { // Unsigned Longs are never negative\r\n if (this.eq(MIN_VALUE)) {\r\n // We need to change the Long value before it can be negated, so we remove\r\n // the bottom-most digit in this base and then recurse to do the rest.\r\n var radixLong = fromNumber(radix),\r\n div = this.div(radixLong),\r\n rem1 = div.mul(radixLong).sub(this);\r\n return div.toString(radix) + rem1.toInt().toString(radix);\r\n } else\r\n return '-' + this.neg().toString(radix);\r\n }\r\n\r\n // Do several (6) digits each time through the loop, so as to\r\n // minimize the calls to the very expensive emulated div.\r\n var radixToPower = fromNumber(pow_dbl(radix, 6), this.unsigned),\r\n rem = this;\r\n var result = '';\r\n while (true) {\r\n var remDiv = rem.div(radixToPower),\r\n intval = rem.sub(remDiv.mul(radixToPower)).toInt() >>> 0,\r\n digits = intval.toString(radix);\r\n rem = remDiv;\r\n if (rem.isZero())\r\n return digits + result;\r\n else {\r\n while (digits.length < 6)\r\n digits = '0' + digits;\r\n result = '' + digits + result;\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Gets the high 32 bits as a signed integer.\r\n * @returns {number} Signed high bits\r\n */\r\n LongPrototype.getHighBits = function getHighBits() {\r\n return this.high;\r\n };\r\n\r\n /**\r\n * Gets the high 32 bits as an unsigned integer.\r\n * @returns {number} Unsigned high bits\r\n */\r\n LongPrototype.getHighBitsUnsigned = function getHighBitsUnsigned() {\r\n return this.high >>> 0;\r\n };\r\n\r\n /**\r\n * Gets the low 32 bits as a signed integer.\r\n * @returns {number} Signed low bits\r\n */\r\n LongPrototype.getLowBits = function getLowBits() {\r\n return this.low;\r\n };\r\n\r\n /**\r\n * Gets the low 32 bits as an unsigned integer.\r\n * @returns {number} Unsigned low bits\r\n */\r\n LongPrototype.getLowBitsUnsigned = function getLowBitsUnsigned() {\r\n return this.low >>> 0;\r\n };\r\n\r\n /**\r\n * Gets the number of bits needed to represent the absolute value of this Long.\r\n * @returns {number}\r\n */\r\n LongPrototype.getNumBitsAbs = function getNumBitsAbs() {\r\n if (this.isNegative()) // Unsigned Longs are never negative\r\n return this.eq(MIN_VALUE) ? 64 : this.neg().getNumBitsAbs();\r\n var val = this.high != 0 ? this.high : this.low;\r\n for (var bit = 31; bit > 0; bit--)\r\n if ((val & (1 << bit)) != 0)\r\n break;\r\n return this.high != 0 ? bit + 33 : bit + 1;\r\n };\r\n\r\n /**\r\n * Tests if this Long's value equals zero.\r\n * @returns {boolean}\r\n */\r\n LongPrototype.isZero = function isZero() {\r\n return this.high === 0 && this.low === 0;\r\n };\r\n\r\n /**\r\n * Tests if this Long's value is negative.\r\n * @returns {boolean}\r\n */\r\n LongPrototype.isNegative = function isNegative() {\r\n return !this.unsigned && this.high < 0;\r\n };\r\n\r\n /**\r\n * Tests if this Long's value is positive.\r\n * @returns {boolean}\r\n */\r\n LongPrototype.isPositive = function isPositive() {\r\n return this.unsigned || this.high >= 0;\r\n };\r\n\r\n /**\r\n * Tests if this Long's value is odd.\r\n * @returns {boolean}\r\n */\r\n LongPrototype.isOdd = function isOdd() {\r\n return (this.low & 1) === 1;\r\n };\r\n\r\n /**\r\n * Tests if this Long's value is even.\r\n * @returns {boolean}\r\n */\r\n LongPrototype.isEven = function isEven() {\r\n return (this.low & 1) === 0;\r\n };\r\n\r\n /**\r\n * Tests if this Long's value equals the specified's.\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\n LongPrototype.equals = function equals(other) {\r\n if (!isLong(other))\r\n other = fromValue(other);\r\n if (this.unsigned !== other.unsigned && (this.high >>> 31) === 1 && (other.high >>> 31) === 1)\r\n return false;\r\n return this.high === other.high && this.low === other.low;\r\n };\r\n\r\n /**\r\n * Tests if this Long's value equals the specified's. This is an alias of {@link Long#equals}.\r\n * @function\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\n LongPrototype.eq = LongPrototype.equals;\r\n\r\n /**\r\n * Tests if this Long's value differs from the specified's.\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\n LongPrototype.notEquals = function notEquals(other) {\r\n return !this.eq(/* validates */ other);\r\n };\r\n\r\n /**\r\n * Tests if this Long's value differs from the specified's. This is an alias of {@link Long#notEquals}.\r\n * @function\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\n LongPrototype.neq = LongPrototype.notEquals;\r\n\r\n /**\r\n * Tests if this Long's value is less than the specified's.\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\n LongPrototype.lessThan = function lessThan(other) {\r\n return this.comp(/* validates */ other) < 0;\r\n };\r\n\r\n /**\r\n * Tests if this Long's value is less than the specified's. This is an alias of {@link Long#lessThan}.\r\n * @function\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\n LongPrototype.lt = LongPrototype.lessThan;\r\n\r\n /**\r\n * Tests if this Long's value is less than or equal the specified's.\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\n LongPrototype.lessThanOrEqual = function lessThanOrEqual(other) {\r\n return this.comp(/* validates */ other) <= 0;\r\n };\r\n\r\n /**\r\n * Tests if this Long's value is less than or equal the specified's. This is an alias of {@link Long#lessThanOrEqual}.\r\n * @function\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\n LongPrototype.lte = LongPrototype.lessThanOrEqual;\r\n\r\n /**\r\n * Tests if this Long's value is greater than the specified's.\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\n LongPrototype.greaterThan = function greaterThan(other) {\r\n return this.comp(/* validates */ other) > 0;\r\n };\r\n\r\n /**\r\n * Tests if this Long's value is greater than the specified's. This is an alias of {@link Long#greaterThan}.\r\n * @function\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\n LongPrototype.gt = LongPrototype.greaterThan;\r\n\r\n /**\r\n * Tests if this Long's value is greater than or equal the specified's.\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\n LongPrototype.greaterThanOrEqual = function greaterThanOrEqual(other) {\r\n return this.comp(/* validates */ other) >= 0;\r\n };\r\n\r\n /**\r\n * Tests if this Long's value is greater than or equal the specified's. This is an alias of {@link Long#greaterThanOrEqual}.\r\n * @function\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\n LongPrototype.gte = LongPrototype.greaterThanOrEqual;\r\n\r\n /**\r\n * Compares this Long's value with the specified's.\r\n * @param {!Long|number|string} other Other value\r\n * @returns {number} 0 if they are the same, 1 if the this is greater and -1\r\n * if the given one is greater\r\n */\r\n LongPrototype.compare = function compare(other) {\r\n if (!isLong(other))\r\n other = fromValue(other);\r\n if (this.eq(other))\r\n return 0;\r\n var thisNeg = this.isNegative(),\r\n otherNeg = other.isNegative();\r\n if (thisNeg && !otherNeg)\r\n return -1;\r\n if (!thisNeg && otherNeg)\r\n return 1;\r\n // At this point the sign bits are the same\r\n if (!this.unsigned)\r\n return this.sub(other).isNegative() ? -1 : 1;\r\n // Both are positive if at least one is unsigned\r\n return (other.high >>> 0) > (this.high >>> 0) || (other.high === this.high && (other.low >>> 0) > (this.low >>> 0)) ? -1 : 1;\r\n };\r\n\r\n /**\r\n * Compares this Long's value with the specified's. This is an alias of {@link Long#compare}.\r\n * @function\r\n * @param {!Long|number|string} other Other value\r\n * @returns {number} 0 if they are the same, 1 if the this is greater and -1\r\n * if the given one is greater\r\n */\r\n LongPrototype.comp = LongPrototype.compare;\r\n\r\n /**\r\n * Negates this Long's value.\r\n * @returns {!Long} Negated Long\r\n */\r\n LongPrototype.negate = function negate() {\r\n if (!this.unsigned && this.eq(MIN_VALUE))\r\n return MIN_VALUE;\r\n return this.not().add(ONE);\r\n };\r\n\r\n /**\r\n * Negates this Long's value. This is an alias of {@link Long#negate}.\r\n * @function\r\n * @returns {!Long} Negated Long\r\n */\r\n LongPrototype.neg = LongPrototype.negate;\r\n\r\n /**\r\n * Returns the sum of this and the specified Long.\r\n * @param {!Long|number|string} addend Addend\r\n * @returns {!Long} Sum\r\n */\r\n LongPrototype.add = function add(addend) {\r\n if (!isLong(addend))\r\n addend = fromValue(addend);\r\n\r\n // Divide each number into 4 chunks of 16 bits, and then sum the chunks.\r\n\r\n var a48 = this.high >>> 16;\r\n var a32 = this.high & 0xFFFF;\r\n var a16 = this.low >>> 16;\r\n var a00 = this.low & 0xFFFF;\r\n\r\n var b48 = addend.high >>> 16;\r\n var b32 = addend.high & 0xFFFF;\r\n var b16 = addend.low >>> 16;\r\n var b00 = addend.low & 0xFFFF;\r\n\r\n var c48 = 0, c32 = 0, c16 = 0, c00 = 0;\r\n c00 += a00 + b00;\r\n c16 += c00 >>> 16;\r\n c00 &= 0xFFFF;\r\n c16 += a16 + b16;\r\n c32 += c16 >>> 16;\r\n c16 &= 0xFFFF;\r\n c32 += a32 + b32;\r\n c48 += c32 >>> 16;\r\n c32 &= 0xFFFF;\r\n c48 += a48 + b48;\r\n c48 &= 0xFFFF;\r\n return fromBits((c16 << 16) | c00, (c48 << 16) | c32, this.unsigned);\r\n };\r\n\r\n /**\r\n * Returns the difference of this and the specified Long.\r\n * @param {!Long|number|string} subtrahend Subtrahend\r\n * @returns {!Long} Difference\r\n */\r\n LongPrototype.subtract = function subtract(subtrahend) {\r\n if (!isLong(subtrahend))\r\n subtrahend = fromValue(subtrahend);\r\n return this.add(subtrahend.neg());\r\n };\r\n\r\n /**\r\n * Returns the difference of this and the specified Long. This is an alias of {@link Long#subtract}.\r\n * @function\r\n * @param {!Long|number|string} subtrahend Subtrahend\r\n * @returns {!Long} Difference\r\n */\r\n LongPrototype.sub = LongPrototype.subtract;\r\n\r\n /**\r\n * Returns the product of this and the specified Long.\r\n * @param {!Long|number|string} multiplier Multiplier\r\n * @returns {!Long} Product\r\n */\r\n LongPrototype.multiply = function multiply(multiplier) {\r\n if (this.isZero())\r\n return ZERO;\r\n if (!isLong(multiplier))\r\n multiplier = fromValue(multiplier);\r\n if (multiplier.isZero())\r\n return ZERO;\r\n if (this.eq(MIN_VALUE))\r\n return multiplier.isOdd() ? MIN_VALUE : ZERO;\r\n if (multiplier.eq(MIN_VALUE))\r\n return this.isOdd() ? MIN_VALUE : ZERO;\r\n\r\n if (this.isNegative()) {\r\n if (multiplier.isNegative())\r\n return this.neg().mul(multiplier.neg());\r\n else\r\n return this.neg().mul(multiplier).neg();\r\n } else if (multiplier.isNegative())\r\n return this.mul(multiplier.neg()).neg();\r\n\r\n // If both longs are small, use float multiplication\r\n if (this.lt(TWO_PWR_24) && multiplier.lt(TWO_PWR_24))\r\n return fromNumber(this.toNumber() * multiplier.toNumber(), this.unsigned);\r\n\r\n // Divide each long into 4 chunks of 16 bits, and then add up 4x4 products.\r\n // We can skip products that would overflow.\r\n\r\n var a48 = this.high >>> 16;\r\n var a32 = this.high & 0xFFFF;\r\n var a16 = this.low >>> 16;\r\n var a00 = this.low & 0xFFFF;\r\n\r\n var b48 = multiplier.high >>> 16;\r\n var b32 = multiplier.high & 0xFFFF;\r\n var b16 = multiplier.low >>> 16;\r\n var b00 = multiplier.low & 0xFFFF;\r\n\r\n var c48 = 0, c32 = 0, c16 = 0, c00 = 0;\r\n c00 += a00 * b00;\r\n c16 += c00 >>> 16;\r\n c00 &= 0xFFFF;\r\n c16 += a16 * b00;\r\n c32 += c16 >>> 16;\r\n c16 &= 0xFFFF;\r\n c16 += a00 * b16;\r\n c32 += c16 >>> 16;\r\n c16 &= 0xFFFF;\r\n c32 += a32 * b00;\r\n c48 += c32 >>> 16;\r\n c32 &= 0xFFFF;\r\n c32 += a16 * b16;\r\n c48 += c32 >>> 16;\r\n c32 &= 0xFFFF;\r\n c32 += a00 * b32;\r\n c48 += c32 >>> 16;\r\n c32 &= 0xFFFF;\r\n c48 += a48 * b00 + a32 * b16 + a16 * b32 + a00 * b48;\r\n c48 &= 0xFFFF;\r\n return fromBits((c16 << 16) | c00, (c48 << 16) | c32, this.unsigned);\r\n };\r\n\r\n /**\r\n * Returns the product of this and the specified Long. This is an alias of {@link Long#multiply}.\r\n * @function\r\n * @param {!Long|number|string} multiplier Multiplier\r\n * @returns {!Long} Product\r\n */\r\n LongPrototype.mul = LongPrototype.multiply;\r\n\r\n /**\r\n * Returns this Long divided by the specified. The result is signed if this Long is signed or\r\n * unsigned if this Long is unsigned.\r\n * @param {!Long|number|string} divisor Divisor\r\n * @returns {!Long} Quotient\r\n */\r\n LongPrototype.divide = function divide(divisor) {\r\n if (!isLong(divisor))\r\n divisor = fromValue(divisor);\r\n if (divisor.isZero())\r\n throw Error('division by zero');\r\n if (this.isZero())\r\n return this.unsigned ? UZERO : ZERO;\r\n var approx, rem, res;\r\n if (!this.unsigned) {\r\n // This section is only relevant for signed longs and is derived from the\r\n // closure library as a whole.\r\n if (this.eq(MIN_VALUE)) {\r\n if (divisor.eq(ONE) || divisor.eq(NEG_ONE))\r\n return MIN_VALUE; // recall that -MIN_VALUE == MIN_VALUE\r\n else if (divisor.eq(MIN_VALUE))\r\n return ONE;\r\n else {\r\n // At this point, we have |other| >= 2, so |this/other| < |MIN_VALUE|.\r\n var halfThis = this.shr(1);\r\n approx = halfThis.div(divisor).shl(1);\r\n if (approx.eq(ZERO)) {\r\n return divisor.isNegative() ? ONE : NEG_ONE;\r\n } else {\r\n rem = this.sub(divisor.mul(approx));\r\n res = approx.add(rem.div(divisor));\r\n return res;\r\n }\r\n }\r\n } else if (divisor.eq(MIN_VALUE))\r\n return this.unsigned ? UZERO : ZERO;\r\n if (this.isNegative()) {\r\n if (divisor.isNegative())\r\n return this.neg().div(divisor.neg());\r\n return this.neg().div(divisor).neg();\r\n } else if (divisor.isNegative())\r\n return this.div(divisor.neg()).neg();\r\n res = ZERO;\r\n } else {\r\n // The algorithm below has not been made for unsigned longs. It's therefore\r\n // required to take special care of the MSB prior to running it.\r\n if (!divisor.unsigned)\r\n divisor = divisor.toUnsigned();\r\n if (divisor.gt(this))\r\n return UZERO;\r\n if (divisor.gt(this.shru(1))) // 15 >>> 1 = 7 ; with divisor = 8 ; true\r\n return UONE;\r\n res = UZERO;\r\n }\r\n\r\n // Repeat the following until the remainder is less than other: find a\r\n // floating-point that approximates remainder / other *from below*, add this\r\n // into the result, and subtract it from the remainder. It is critical that\r\n // the approximate value is less than or equal to the real value so that the\r\n // remainder never becomes negative.\r\n rem = this;\r\n while (rem.gte(divisor)) {\r\n // Approximate the result of division. This may be a little greater or\r\n // smaller than the actual value.\r\n approx = Math.max(1, Math.floor(rem.toNumber() / divisor.toNumber()));\r\n\r\n // We will tweak the approximate result by changing it in the 48-th digit or\r\n // the smallest non-fractional digit, whichever is larger.\r\n var log2 = Math.ceil(Math.log(approx) / Math.LN2),\r\n delta = (log2 <= 48) ? 1 : pow_dbl(2, log2 - 48),\r\n\r\n // Decrease the approximation until it is smaller than the remainder. Note\r\n // that if it is too large, the product overflows and is negative.\r\n approxRes = fromNumber(approx),\r\n approxRem = approxRes.mul(divisor);\r\n while (approxRem.isNegative() || approxRem.gt(rem)) {\r\n approx -= delta;\r\n approxRes = fromNumber(approx, this.unsigned);\r\n approxRem = approxRes.mul(divisor);\r\n }\r\n\r\n // We know the answer can't be zero... and actually, zero would cause\r\n // infinite recursion since we would make no progress.\r\n if (approxRes.isZero())\r\n approxRes = ONE;\r\n\r\n res = res.add(approxRes);\r\n rem = rem.sub(approxRem);\r\n }\r\n return res;\r\n };\r\n\r\n /**\r\n * Returns this Long divided by the specified. This is an alias of {@link Long#divide}.\r\n * @function\r\n * @param {!Long|number|string} divisor Divisor\r\n * @returns {!Long} Quotient\r\n */\r\n LongPrototype.div = LongPrototype.divide;\r\n\r\n /**\r\n * Returns this Long modulo the specified.\r\n * @param {!Long|number|string} divisor Divisor\r\n * @returns {!Long} Remainder\r\n */\r\n LongPrototype.modulo = function modulo(divisor) {\r\n if (!isLong(divisor))\r\n divisor = fromValue(divisor);\r\n return this.sub(this.div(divisor).mul(divisor));\r\n };\r\n\r\n /**\r\n * Returns this Long modulo the specified. This is an alias of {@link Long#modulo}.\r\n * @function\r\n * @param {!Long|number|string} divisor Divisor\r\n * @returns {!Long} Remainder\r\n */\r\n LongPrototype.mod = LongPrototype.modulo;\r\n\r\n /**\r\n * Returns the bitwise NOT of this Long.\r\n * @returns {!Long}\r\n */\r\n LongPrototype.not = function not() {\r\n return fromBits(~this.low, ~this.high, this.unsigned);\r\n };\r\n\r\n /**\r\n * Returns the bitwise AND of this Long and the specified.\r\n * @param {!Long|number|string} other Other Long\r\n * @returns {!Long}\r\n */\r\n LongPrototype.and = function and(other) {\r\n if (!isLong(other))\r\n other = fromValue(other);\r\n return fromBits(this.low & other.low, this.high & other.high, this.unsigned);\r\n };\r\n\r\n /**\r\n * Returns the bitwise OR of this Long and the specified.\r\n * @param {!Long|number|string} other Other Long\r\n * @returns {!Long}\r\n */\r\n LongPrototype.or = function or(other) {\r\n if (!isLong(other))\r\n other = fromValue(other);\r\n return fromBits(this.low | other.low, this.high | other.high, this.unsigned);\r\n };\r\n\r\n /**\r\n * Returns the bitwise XOR of this Long and the given one.\r\n * @param {!Long|number|string} other Other Long\r\n * @returns {!Long}\r\n */\r\n LongPrototype.xor = function xor(other) {\r\n if (!isLong(other))\r\n other = fromValue(other);\r\n return fromBits(this.low ^ other.low, this.high ^ other.high, this.unsigned);\r\n };\r\n\r\n /**\r\n * Returns this Long with bits shifted to the left by the given amount.\r\n * @param {number|!Long} numBits Number of bits\r\n * @returns {!Long} Shifted Long\r\n */\r\n LongPrototype.shiftLeft = function shiftLeft(numBits) {\r\n if (isLong(numBits))\r\n numBits = numBits.toInt();\r\n if ((numBits &= 63) === 0)\r\n return this;\r\n else if (numBits < 32)\r\n return fromBits(this.low << numBits, (this.high << numBits) | (this.low >>> (32 - numBits)), this.unsigned);\r\n else\r\n return fromBits(0, this.low << (numBits - 32), this.unsigned);\r\n };\r\n\r\n /**\r\n * Returns this Long with bits shifted to the left by the given amount. This is an alias of {@link Long#shiftLeft}.\r\n * @function\r\n * @param {number|!Long} numBits Number of bits\r\n * @returns {!Long} Shifted Long\r\n */\r\n LongPrototype.shl = LongPrototype.shiftLeft;\r\n\r\n /**\r\n * Returns this Long with bits arithmetically shifted to the right by the given amount.\r\n * @param {number|!Long} numBits Number of bits\r\n * @returns {!Long} Shifted Long\r\n */\r\n LongPrototype.shiftRight = function shiftRight(numBits) {\r\n if (isLong(numBits))\r\n numBits = numBits.toInt();\r\n if ((numBits &= 63) === 0)\r\n return this;\r\n else if (numBits < 32)\r\n return fromBits((this.low >>> numBits) | (this.high << (32 - numBits)), this.high >> numBits, this.unsigned);\r\n else\r\n return fromBits(this.high >> (numBits - 32), this.high >= 0 ? 0 : -1, this.unsigned);\r\n };\r\n\r\n /**\r\n * Returns this Long with bits arithmetically shifted to the right by the given amount. This is an alias of {@link Long#shiftRight}.\r\n * @function\r\n * @param {number|!Long} numBits Number of bits\r\n * @returns {!Long} Shifted Long\r\n */\r\n LongPrototype.shr = LongPrototype.shiftRight;\r\n\r\n /**\r\n * Returns this Long with bits logically shifted to the right by the given amount.\r\n * @param {number|!Long} numBits Number of bits\r\n * @returns {!Long} Shifted Long\r\n */\r\n LongPrototype.shiftRightUnsigned = function shiftRightUnsigned(numBits) {\r\n if (isLong(numBits))\r\n numBits = numBits.toInt();\r\n numBits &= 63;\r\n if (numBits === 0)\r\n return this;\r\n else {\r\n var high = this.high;\r\n if (numBits < 32) {\r\n var low = this.low;\r\n return fromBits((low >>> numBits) | (high << (32 - numBits)), high >>> numBits, this.unsigned);\r\n } else if (numBits === 32)\r\n return fromBits(high, 0, this.unsigned);\r\n else\r\n return fromBits(high >>> (numBits - 32), 0, this.unsigned);\r\n }\r\n };\r\n\r\n /**\r\n * Returns this Long with bits logically shifted to the right by the given amount. This is an alias of {@link Long#shiftRightUnsigned}.\r\n * @function\r\n * @param {number|!Long} numBits Number of bits\r\n * @returns {!Long} Shifted Long\r\n */\r\n LongPrototype.shru = LongPrototype.shiftRightUnsigned;\r\n\r\n /**\r\n * Converts this Long to signed.\r\n * @returns {!Long} Signed long\r\n */\r\n LongPrototype.toSigned = function toSigned() {\r\n if (!this.unsigned)\r\n return this;\r\n return fromBits(this.low, this.high, false);\r\n };\r\n\r\n /**\r\n * Converts this Long to unsigned.\r\n * @returns {!Long} Unsigned long\r\n */\r\n LongPrototype.toUnsigned = function toUnsigned() {\r\n if (this.unsigned)\r\n return this;\r\n return fromBits(this.low, this.high, true);\r\n };\r\n\r\n /**\r\n * Converts this Long to its byte representation.\r\n * @param {boolean=} le Whether little or big endian, defaults to big endian\r\n * @returns {!Array.} Byte representation\r\n */\r\n LongPrototype.toBytes = function(le) {\r\n return le ? this.toBytesLE() : this.toBytesBE();\r\n }\r\n\r\n /**\r\n * Converts this Long to its little endian byte representation.\r\n * @returns {!Array.} Little endian byte representation\r\n */\r\n LongPrototype.toBytesLE = function() {\r\n var hi = this.high,\r\n lo = this.low;\r\n return [\r\n lo & 0xff,\r\n (lo >>> 8) & 0xff,\r\n (lo >>> 16) & 0xff,\r\n (lo >>> 24) & 0xff,\r\n hi & 0xff,\r\n (hi >>> 8) & 0xff,\r\n (hi >>> 16) & 0xff,\r\n (hi >>> 24) & 0xff\r\n ];\r\n }\r\n\r\n /**\r\n * Converts this Long to its big endian byte representation.\r\n * @returns {!Array.} Big endian byte representation\r\n */\r\n LongPrototype.toBytesBE = function() {\r\n var hi = this.high,\r\n lo = this.low;\r\n return [\r\n (hi >>> 24) & 0xff,\r\n (hi >>> 16) & 0xff,\r\n (hi >>> 8) & 0xff,\r\n hi & 0xff,\r\n (lo >>> 24) & 0xff,\r\n (lo >>> 16) & 0xff,\r\n (lo >>> 8) & 0xff,\r\n lo & 0xff\r\n ];\r\n }\r\n\r\n return Long;\r\n});\r\n","/*\r\n Copyright 2013-2014 Daniel Wirtz \r\n\r\n Licensed under the Apache License, Version 2.0 (the \"License\");\r\n you may not use this file except in compliance with the License.\r\n You may obtain a copy of the License at\r\n\r\n http://www.apache.org/licenses/LICENSE-2.0\r\n\r\n Unless required by applicable law or agreed to in writing, software\r\n distributed under the License is distributed on an \"AS IS\" BASIS,\r\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n See the License for the specific language governing permissions and\r\n limitations under the License.\r\n */\r\n\r\n/**\r\n * @license bytebuffer.js (c) 2015 Daniel Wirtz \r\n * Backing buffer: ArrayBuffer, Accessor: Uint8Array\r\n * Released under the Apache License, Version 2.0\r\n * see: https://github.com/dcodeIO/bytebuffer.js for details\r\n */\r\n(function(global, factory) {\r\n\r\n /* AMD */ if (typeof define === 'function' && define[\"amd\"])\r\n define([\"long\"], factory);\r\n /* CommonJS */ else if (typeof require === 'function' && typeof module === \"object\" && module && module[\"exports\"])\r\n module['exports'] = (function() {\r\n var Long; try { Long = require(\"long\"); } catch (e) {}\r\n return factory(Long);\r\n })();\r\n /* Global */ else\r\n (global[\"dcodeIO\"] = global[\"dcodeIO\"] || {})[\"ByteBuffer\"] = factory(global[\"dcodeIO\"][\"Long\"]);\r\n\r\n})(this, function(Long) {\r\n \"use strict\";\r\n\r\n /**\r\n * Constructs a new ByteBuffer.\r\n * @class The swiss army knife for binary data in JavaScript.\r\n * @exports ByteBuffer\r\n * @constructor\r\n * @param {number=} capacity Initial capacity. Defaults to {@link ByteBuffer.DEFAULT_CAPACITY}.\r\n * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to\r\n * {@link ByteBuffer.DEFAULT_ENDIAN}.\r\n * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to\r\n * {@link ByteBuffer.DEFAULT_NOASSERT}.\r\n * @expose\r\n */\r\n var ByteBuffer = function(capacity, littleEndian, noAssert) {\r\n if (typeof capacity === 'undefined')\r\n capacity = ByteBuffer.DEFAULT_CAPACITY;\r\n if (typeof littleEndian === 'undefined')\r\n littleEndian = ByteBuffer.DEFAULT_ENDIAN;\r\n if (typeof noAssert === 'undefined')\r\n noAssert = ByteBuffer.DEFAULT_NOASSERT;\r\n if (!noAssert) {\r\n capacity = capacity | 0;\r\n if (capacity < 0)\r\n throw RangeError(\"Illegal capacity\");\r\n littleEndian = !!littleEndian;\r\n noAssert = !!noAssert;\r\n }\r\n\r\n /**\r\n * Backing ArrayBuffer.\r\n * @type {!ArrayBuffer}\r\n * @expose\r\n */\r\n this.buffer = capacity === 0 ? EMPTY_BUFFER : new ArrayBuffer(capacity);\r\n\r\n /**\r\n * Uint8Array utilized to manipulate the backing buffer. Becomes `null` if the backing buffer has a capacity of `0`.\r\n * @type {?Uint8Array}\r\n * @expose\r\n */\r\n this.view = capacity === 0 ? null : new Uint8Array(this.buffer);\r\n\r\n /**\r\n * Absolute read/write offset.\r\n * @type {number}\r\n * @expose\r\n * @see ByteBuffer#flip\r\n * @see ByteBuffer#clear\r\n */\r\n this.offset = 0;\r\n\r\n /**\r\n * Marked offset.\r\n * @type {number}\r\n * @expose\r\n * @see ByteBuffer#mark\r\n * @see ByteBuffer#reset\r\n */\r\n this.markedOffset = -1;\r\n\r\n /**\r\n * Absolute limit of the contained data. Set to the backing buffer's capacity upon allocation.\r\n * @type {number}\r\n * @expose\r\n * @see ByteBuffer#flip\r\n * @see ByteBuffer#clear\r\n */\r\n this.limit = capacity;\r\n\r\n /**\r\n * Whether to use little endian byte order, defaults to `false` for big endian.\r\n * @type {boolean}\r\n * @expose\r\n */\r\n this.littleEndian = littleEndian;\r\n\r\n /**\r\n * Whether to skip assertions of offsets and values, defaults to `false`.\r\n * @type {boolean}\r\n * @expose\r\n */\r\n this.noAssert = noAssert;\r\n };\r\n\r\n /**\r\n * ByteBuffer version.\r\n * @type {string}\r\n * @const\r\n * @expose\r\n */\r\n ByteBuffer.VERSION = \"5.0.1\";\r\n\r\n /**\r\n * Little endian constant that can be used instead of its boolean value. Evaluates to `true`.\r\n * @type {boolean}\r\n * @const\r\n * @expose\r\n */\r\n ByteBuffer.LITTLE_ENDIAN = true;\r\n\r\n /**\r\n * Big endian constant that can be used instead of its boolean value. Evaluates to `false`.\r\n * @type {boolean}\r\n * @const\r\n * @expose\r\n */\r\n ByteBuffer.BIG_ENDIAN = false;\r\n\r\n /**\r\n * Default initial capacity of `16`.\r\n * @type {number}\r\n * @expose\r\n */\r\n ByteBuffer.DEFAULT_CAPACITY = 16;\r\n\r\n /**\r\n * Default endianess of `false` for big endian.\r\n * @type {boolean}\r\n * @expose\r\n */\r\n ByteBuffer.DEFAULT_ENDIAN = ByteBuffer.BIG_ENDIAN;\r\n\r\n /**\r\n * Default no assertions flag of `false`.\r\n * @type {boolean}\r\n * @expose\r\n */\r\n ByteBuffer.DEFAULT_NOASSERT = false;\r\n\r\n /**\r\n * A `Long` class for representing a 64-bit two's-complement integer value. May be `null` if Long.js has not been loaded\r\n * and int64 support is not available.\r\n * @type {?Long}\r\n * @const\r\n * @see https://github.com/dcodeIO/long.js\r\n * @expose\r\n */\r\n ByteBuffer.Long = Long || null;\r\n\r\n /**\r\n * @alias ByteBuffer.prototype\r\n * @inner\r\n */\r\n var ByteBufferPrototype = ByteBuffer.prototype;\r\n\r\n /**\r\n * An indicator used to reliably determine if an object is a ByteBuffer or not.\r\n * @type {boolean}\r\n * @const\r\n * @expose\r\n * @private\r\n */\r\n ByteBufferPrototype.__isByteBuffer__;\r\n\r\n Object.defineProperty(ByteBufferPrototype, \"__isByteBuffer__\", {\r\n value: true,\r\n enumerable: false,\r\n configurable: false\r\n });\r\n\r\n // helpers\r\n\r\n /**\r\n * @type {!ArrayBuffer}\r\n * @inner\r\n */\r\n var EMPTY_BUFFER = new ArrayBuffer(0);\r\n\r\n /**\r\n * String.fromCharCode reference for compile-time renaming.\r\n * @type {function(...number):string}\r\n * @inner\r\n */\r\n var stringFromCharCode = String.fromCharCode;\r\n\r\n /**\r\n * Creates a source function for a string.\r\n * @param {string} s String to read from\r\n * @returns {function():number|null} Source function returning the next char code respectively `null` if there are\r\n * no more characters left.\r\n * @throws {TypeError} If the argument is invalid\r\n * @inner\r\n */\r\n function stringSource(s) {\r\n var i=0; return function() {\r\n return i < s.length ? s.charCodeAt(i++) : null;\r\n };\r\n }\r\n\r\n /**\r\n * Creates a destination function for a string.\r\n * @returns {function(number=):undefined|string} Destination function successively called with the next char code.\r\n * Returns the final string when called without arguments.\r\n * @inner\r\n */\r\n function stringDestination() {\r\n var cs = [], ps = []; return function() {\r\n if (arguments.length === 0)\r\n return ps.join('')+stringFromCharCode.apply(String, cs);\r\n if (cs.length + arguments.length > 1024)\r\n ps.push(stringFromCharCode.apply(String, cs)),\r\n cs.length = 0;\r\n Array.prototype.push.apply(cs, arguments);\r\n };\r\n }\r\n\r\n /**\r\n * Gets the accessor type.\r\n * @returns {Function} `Buffer` under node.js, `Uint8Array` respectively `DataView` in the browser (classes)\r\n * @expose\r\n */\r\n ByteBuffer.accessor = function() {\r\n return Uint8Array;\r\n };\r\n /**\r\n * Allocates a new ByteBuffer backed by a buffer of the specified capacity.\r\n * @param {number=} capacity Initial capacity. Defaults to {@link ByteBuffer.DEFAULT_CAPACITY}.\r\n * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to\r\n * {@link ByteBuffer.DEFAULT_ENDIAN}.\r\n * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to\r\n * {@link ByteBuffer.DEFAULT_NOASSERT}.\r\n * @returns {!ByteBuffer}\r\n * @expose\r\n */\r\n ByteBuffer.allocate = function(capacity, littleEndian, noAssert) {\r\n return new ByteBuffer(capacity, littleEndian, noAssert);\r\n };\r\n\r\n /**\r\n * Concatenates multiple ByteBuffers into one.\r\n * @param {!Array.} buffers Buffers to concatenate\r\n * @param {(string|boolean)=} encoding String encoding if `buffers` contains a string (\"base64\", \"hex\", \"binary\",\r\n * defaults to \"utf8\")\r\n * @param {boolean=} littleEndian Whether to use little or big endian byte order for the resulting ByteBuffer. Defaults\r\n * to {@link ByteBuffer.DEFAULT_ENDIAN}.\r\n * @param {boolean=} noAssert Whether to skip assertions of offsets and values for the resulting ByteBuffer. Defaults to\r\n * {@link ByteBuffer.DEFAULT_NOASSERT}.\r\n * @returns {!ByteBuffer} Concatenated ByteBuffer\r\n * @expose\r\n */\r\n ByteBuffer.concat = function(buffers, encoding, littleEndian, noAssert) {\r\n if (typeof encoding === 'boolean' || typeof encoding !== 'string') {\r\n noAssert = littleEndian;\r\n littleEndian = encoding;\r\n encoding = undefined;\r\n }\r\n var capacity = 0;\r\n for (var i=0, k=buffers.length, length; i 0) capacity += length;\r\n }\r\n if (capacity === 0)\r\n return new ByteBuffer(0, littleEndian, noAssert);\r\n var bb = new ByteBuffer(capacity, littleEndian, noAssert),\r\n bi;\r\n i=0; while (i} buffer Anything that can be wrapped\r\n * @param {(string|boolean)=} encoding String encoding if `buffer` is a string (\"base64\", \"hex\", \"binary\", defaults to\r\n * \"utf8\")\r\n * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to\r\n * {@link ByteBuffer.DEFAULT_ENDIAN}.\r\n * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to\r\n * {@link ByteBuffer.DEFAULT_NOASSERT}.\r\n * @returns {!ByteBuffer} A ByteBuffer wrapping `buffer`\r\n * @expose\r\n */\r\n ByteBuffer.wrap = function(buffer, encoding, littleEndian, noAssert) {\r\n if (typeof encoding !== 'string') {\r\n noAssert = littleEndian;\r\n littleEndian = encoding;\r\n encoding = undefined;\r\n }\r\n if (typeof buffer === 'string') {\r\n if (typeof encoding === 'undefined')\r\n encoding = \"utf8\";\r\n switch (encoding) {\r\n case \"base64\":\r\n return ByteBuffer.fromBase64(buffer, littleEndian);\r\n case \"hex\":\r\n return ByteBuffer.fromHex(buffer, littleEndian);\r\n case \"binary\":\r\n return ByteBuffer.fromBinary(buffer, littleEndian);\r\n case \"utf8\":\r\n return ByteBuffer.fromUTF8(buffer, littleEndian);\r\n case \"debug\":\r\n return ByteBuffer.fromDebug(buffer, littleEndian);\r\n default:\r\n throw Error(\"Unsupported encoding: \"+encoding);\r\n }\r\n }\r\n if (buffer === null || typeof buffer !== 'object')\r\n throw TypeError(\"Illegal buffer\");\r\n var bb;\r\n if (ByteBuffer.isByteBuffer(buffer)) {\r\n bb = ByteBufferPrototype.clone.call(buffer);\r\n bb.markedOffset = -1;\r\n return bb;\r\n }\r\n if (buffer instanceof Uint8Array) { // Extract ArrayBuffer from Uint8Array\r\n bb = new ByteBuffer(0, littleEndian, noAssert);\r\n if (buffer.length > 0) { // Avoid references to more than one EMPTY_BUFFER\r\n bb.buffer = buffer.buffer;\r\n bb.offset = buffer.byteOffset;\r\n bb.limit = buffer.byteOffset + buffer.byteLength;\r\n bb.view = new Uint8Array(buffer.buffer);\r\n }\r\n } else if (buffer instanceof ArrayBuffer) { // Reuse ArrayBuffer\r\n bb = new ByteBuffer(0, littleEndian, noAssert);\r\n if (buffer.byteLength > 0) {\r\n bb.buffer = buffer;\r\n bb.offset = 0;\r\n bb.limit = buffer.byteLength;\r\n bb.view = buffer.byteLength > 0 ? new Uint8Array(buffer) : null;\r\n }\r\n } else if (Object.prototype.toString.call(buffer) === \"[object Array]\") { // Create from octets\r\n bb = new ByteBuffer(buffer.length, littleEndian, noAssert);\r\n bb.limit = buffer.length;\r\n for (var i=0; i} value Array of booleans to write\r\n * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `length` if omitted.\r\n * @returns {!ByteBuffer}\r\n * @expose\r\n */\r\n ByteBufferPrototype.writeBitSet = function(value, offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (!(value instanceof Array))\r\n throw TypeError(\"Illegal BitSet: Not an array\");\r\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 0 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n }\r\n\r\n var start = offset,\r\n bits = value.length,\r\n bytes = (bits >> 3),\r\n bit = 0,\r\n k;\r\n\r\n offset += this.writeVarint32(bits,offset);\r\n\r\n while(bytes--) {\r\n k = (!!value[bit++] & 1) |\r\n ((!!value[bit++] & 1) << 1) |\r\n ((!!value[bit++] & 1) << 2) |\r\n ((!!value[bit++] & 1) << 3) |\r\n ((!!value[bit++] & 1) << 4) |\r\n ((!!value[bit++] & 1) << 5) |\r\n ((!!value[bit++] & 1) << 6) |\r\n ((!!value[bit++] & 1) << 7);\r\n this.writeByte(k,offset++);\r\n }\r\n\r\n if(bit < bits) {\r\n var m = 0; k = 0;\r\n while(bit < bits) k = k | ((!!value[bit++] & 1) << (m++));\r\n this.writeByte(k,offset++);\r\n }\r\n\r\n if (relative) {\r\n this.offset = offset;\r\n return this;\r\n }\r\n return offset - start;\r\n }\r\n\r\n /**\r\n * Reads a BitSet as an array of booleans.\r\n * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `length` if omitted.\r\n * @returns {Array\r\n * @expose\r\n */\r\n ByteBufferPrototype.readBitSet = function(offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n\r\n var ret = this.readVarint32(offset),\r\n bits = ret.value,\r\n bytes = (bits >> 3),\r\n bit = 0,\r\n value = [],\r\n k;\r\n\r\n offset += ret.length;\r\n\r\n while(bytes--) {\r\n k = this.readByte(offset++);\r\n value[bit++] = !!(k & 0x01);\r\n value[bit++] = !!(k & 0x02);\r\n value[bit++] = !!(k & 0x04);\r\n value[bit++] = !!(k & 0x08);\r\n value[bit++] = !!(k & 0x10);\r\n value[bit++] = !!(k & 0x20);\r\n value[bit++] = !!(k & 0x40);\r\n value[bit++] = !!(k & 0x80);\r\n }\r\n\r\n if(bit < bits) {\r\n var m = 0;\r\n k = this.readByte(offset++);\r\n while(bit < bits) value[bit++] = !!((k >> (m++)) & 1);\r\n }\r\n\r\n if (relative) {\r\n this.offset = offset;\r\n }\r\n return value;\r\n }\r\n /**\r\n * Reads the specified number of bytes.\r\n * @param {number} length Number of bytes to read\r\n * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `length` if omitted.\r\n * @returns {!ByteBuffer}\r\n * @expose\r\n */\r\n ByteBufferPrototype.readBytes = function(length, offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + length > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+length+\") <= \"+this.buffer.byteLength);\n }\r\n var slice = this.slice(offset, offset + length);\r\n if (relative) this.offset += length;\n return slice;\r\n };\r\n\r\n /**\r\n * Writes a payload of bytes. This is an alias of {@link ByteBuffer#append}.\r\n * @function\r\n * @param {!ByteBuffer|!ArrayBuffer|!Uint8Array|string} source Data to write. If `source` is a ByteBuffer, its offsets\r\n * will be modified according to the performed read operation.\r\n * @param {(string|number)=} encoding Encoding if `data` is a string (\"base64\", \"hex\", \"binary\", defaults to \"utf8\")\r\n * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes\r\n * written if omitted.\r\n * @returns {!ByteBuffer} this\r\n * @expose\r\n */\r\n ByteBufferPrototype.writeBytes = ByteBufferPrototype.append;\r\n\r\n // types/ints/int8\r\n\r\n /**\r\n * Writes an 8bit signed integer.\r\n * @param {number} value Value to write\r\n * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `1` if omitted.\r\n * @returns {!ByteBuffer} this\r\n * @expose\r\n */\r\n ByteBufferPrototype.writeInt8 = function(value, offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (typeof value !== 'number' || value % 1 !== 0)\n throw TypeError(\"Illegal value: \"+value+\" (not an integer)\");\n value |= 0;\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 0 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n }\r\n offset += 1;\n var capacity0 = this.buffer.byteLength;\n if (offset > capacity0)\n this.resize((capacity0 *= 2) > offset ? capacity0 : offset);\n offset -= 1;\n this.view[offset] = value;\r\n if (relative) this.offset += 1;\n return this;\r\n };\r\n\r\n /**\r\n * Writes an 8bit signed integer. This is an alias of {@link ByteBuffer#writeInt8}.\r\n * @function\r\n * @param {number} value Value to write\r\n * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `1` if omitted.\r\n * @returns {!ByteBuffer} this\r\n * @expose\r\n */\r\n ByteBufferPrototype.writeByte = ByteBufferPrototype.writeInt8;\r\n\r\n /**\r\n * Reads an 8bit signed integer.\r\n * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `1` if omitted.\r\n * @returns {number} Value read\r\n * @expose\r\n */\r\n ByteBufferPrototype.readInt8 = function(offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 1 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+1+\") <= \"+this.buffer.byteLength);\n }\r\n var value = this.view[offset];\r\n if ((value & 0x80) === 0x80) value = -(0xFF - value + 1); // Cast to signed\r\n if (relative) this.offset += 1;\n return value;\r\n };\r\n\r\n /**\r\n * Reads an 8bit signed integer. This is an alias of {@link ByteBuffer#readInt8}.\r\n * @function\r\n * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `1` if omitted.\r\n * @returns {number} Value read\r\n * @expose\r\n */\r\n ByteBufferPrototype.readByte = ByteBufferPrototype.readInt8;\r\n\r\n /**\r\n * Writes an 8bit unsigned integer.\r\n * @param {number} value Value to write\r\n * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `1` if omitted.\r\n * @returns {!ByteBuffer} this\r\n * @expose\r\n */\r\n ByteBufferPrototype.writeUint8 = function(value, offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (typeof value !== 'number' || value % 1 !== 0)\n throw TypeError(\"Illegal value: \"+value+\" (not an integer)\");\n value >>>= 0;\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 0 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n }\r\n offset += 1;\n var capacity1 = this.buffer.byteLength;\n if (offset > capacity1)\n this.resize((capacity1 *= 2) > offset ? capacity1 : offset);\n offset -= 1;\n this.view[offset] = value;\r\n if (relative) this.offset += 1;\n return this;\r\n };\r\n\r\n /**\r\n * Writes an 8bit unsigned integer. This is an alias of {@link ByteBuffer#writeUint8}.\r\n * @function\r\n * @param {number} value Value to write\r\n * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `1` if omitted.\r\n * @returns {!ByteBuffer} this\r\n * @expose\r\n */\r\n ByteBufferPrototype.writeUInt8 = ByteBufferPrototype.writeUint8;\r\n\r\n /**\r\n * Reads an 8bit unsigned integer.\r\n * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `1` if omitted.\r\n * @returns {number} Value read\r\n * @expose\r\n */\r\n ByteBufferPrototype.readUint8 = function(offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 1 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+1+\") <= \"+this.buffer.byteLength);\n }\r\n var value = this.view[offset];\r\n if (relative) this.offset += 1;\n return value;\r\n };\r\n\r\n /**\r\n * Reads an 8bit unsigned integer. This is an alias of {@link ByteBuffer#readUint8}.\r\n * @function\r\n * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `1` if omitted.\r\n * @returns {number} Value read\r\n * @expose\r\n */\r\n ByteBufferPrototype.readUInt8 = ByteBufferPrototype.readUint8;\r\n\r\n // types/ints/int16\r\n\r\n /**\r\n * Writes a 16bit signed integer.\r\n * @param {number} value Value to write\r\n * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `2` if omitted.\r\n * @throws {TypeError} If `offset` or `value` is not a valid number\r\n * @throws {RangeError} If `offset` is out of bounds\r\n * @expose\r\n */\r\n ByteBufferPrototype.writeInt16 = function(value, offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (typeof value !== 'number' || value % 1 !== 0)\n throw TypeError(\"Illegal value: \"+value+\" (not an integer)\");\n value |= 0;\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 0 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n }\r\n offset += 2;\n var capacity2 = this.buffer.byteLength;\n if (offset > capacity2)\n this.resize((capacity2 *= 2) > offset ? capacity2 : offset);\n offset -= 2;\n if (this.littleEndian) {\r\n this.view[offset+1] = (value & 0xFF00) >>> 8;\r\n this.view[offset ] = value & 0x00FF;\r\n } else {\r\n this.view[offset] = (value & 0xFF00) >>> 8;\r\n this.view[offset+1] = value & 0x00FF;\r\n }\r\n if (relative) this.offset += 2;\n return this;\r\n };\r\n\r\n /**\r\n * Writes a 16bit signed integer. This is an alias of {@link ByteBuffer#writeInt16}.\r\n * @function\r\n * @param {number} value Value to write\r\n * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `2` if omitted.\r\n * @throws {TypeError} If `offset` or `value` is not a valid number\r\n * @throws {RangeError} If `offset` is out of bounds\r\n * @expose\r\n */\r\n ByteBufferPrototype.writeShort = ByteBufferPrototype.writeInt16;\r\n\r\n /**\r\n * Reads a 16bit signed integer.\r\n * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `2` if omitted.\r\n * @returns {number} Value read\r\n * @throws {TypeError} If `offset` is not a valid number\r\n * @throws {RangeError} If `offset` is out of bounds\r\n * @expose\r\n */\r\n ByteBufferPrototype.readInt16 = function(offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 2 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+2+\") <= \"+this.buffer.byteLength);\n }\r\n var value = 0;\r\n if (this.littleEndian) {\r\n value = this.view[offset ];\r\n value |= this.view[offset+1] << 8;\r\n } else {\r\n value = this.view[offset ] << 8;\r\n value |= this.view[offset+1];\r\n }\r\n if ((value & 0x8000) === 0x8000) value = -(0xFFFF - value + 1); // Cast to signed\r\n if (relative) this.offset += 2;\n return value;\r\n };\r\n\r\n /**\r\n * Reads a 16bit signed integer. This is an alias of {@link ByteBuffer#readInt16}.\r\n * @function\r\n * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `2` if omitted.\r\n * @returns {number} Value read\r\n * @throws {TypeError} If `offset` is not a valid number\r\n * @throws {RangeError} If `offset` is out of bounds\r\n * @expose\r\n */\r\n ByteBufferPrototype.readShort = ByteBufferPrototype.readInt16;\r\n\r\n /**\r\n * Writes a 16bit unsigned integer.\r\n * @param {number} value Value to write\r\n * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `2` if omitted.\r\n * @throws {TypeError} If `offset` or `value` is not a valid number\r\n * @throws {RangeError} If `offset` is out of bounds\r\n * @expose\r\n */\r\n ByteBufferPrototype.writeUint16 = function(value, offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (typeof value !== 'number' || value % 1 !== 0)\n throw TypeError(\"Illegal value: \"+value+\" (not an integer)\");\n value >>>= 0;\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 0 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n }\r\n offset += 2;\n var capacity3 = this.buffer.byteLength;\n if (offset > capacity3)\n this.resize((capacity3 *= 2) > offset ? capacity3 : offset);\n offset -= 2;\n if (this.littleEndian) {\r\n this.view[offset+1] = (value & 0xFF00) >>> 8;\r\n this.view[offset ] = value & 0x00FF;\r\n } else {\r\n this.view[offset] = (value & 0xFF00) >>> 8;\r\n this.view[offset+1] = value & 0x00FF;\r\n }\r\n if (relative) this.offset += 2;\n return this;\r\n };\r\n\r\n /**\r\n * Writes a 16bit unsigned integer. This is an alias of {@link ByteBuffer#writeUint16}.\r\n * @function\r\n * @param {number} value Value to write\r\n * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `2` if omitted.\r\n * @throws {TypeError} If `offset` or `value` is not a valid number\r\n * @throws {RangeError} If `offset` is out of bounds\r\n * @expose\r\n */\r\n ByteBufferPrototype.writeUInt16 = ByteBufferPrototype.writeUint16;\r\n\r\n /**\r\n * Reads a 16bit unsigned integer.\r\n * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `2` if omitted.\r\n * @returns {number} Value read\r\n * @throws {TypeError} If `offset` is not a valid number\r\n * @throws {RangeError} If `offset` is out of bounds\r\n * @expose\r\n */\r\n ByteBufferPrototype.readUint16 = function(offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 2 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+2+\") <= \"+this.buffer.byteLength);\n }\r\n var value = 0;\r\n if (this.littleEndian) {\r\n value = this.view[offset ];\r\n value |= this.view[offset+1] << 8;\r\n } else {\r\n value = this.view[offset ] << 8;\r\n value |= this.view[offset+1];\r\n }\r\n if (relative) this.offset += 2;\n return value;\r\n };\r\n\r\n /**\r\n * Reads a 16bit unsigned integer. This is an alias of {@link ByteBuffer#readUint16}.\r\n * @function\r\n * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `2` if omitted.\r\n * @returns {number} Value read\r\n * @throws {TypeError} If `offset` is not a valid number\r\n * @throws {RangeError} If `offset` is out of bounds\r\n * @expose\r\n */\r\n ByteBufferPrototype.readUInt16 = ByteBufferPrototype.readUint16;\r\n\r\n // types/ints/int32\r\n\r\n /**\r\n * Writes a 32bit signed integer.\r\n * @param {number} value Value to write\r\n * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted.\r\n * @expose\r\n */\r\n ByteBufferPrototype.writeInt32 = function(value, offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (typeof value !== 'number' || value % 1 !== 0)\n throw TypeError(\"Illegal value: \"+value+\" (not an integer)\");\n value |= 0;\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 0 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n }\r\n offset += 4;\n var capacity4 = this.buffer.byteLength;\n if (offset > capacity4)\n this.resize((capacity4 *= 2) > offset ? capacity4 : offset);\n offset -= 4;\n if (this.littleEndian) {\n this.view[offset+3] = (value >>> 24) & 0xFF;\n this.view[offset+2] = (value >>> 16) & 0xFF;\n this.view[offset+1] = (value >>> 8) & 0xFF;\n this.view[offset ] = value & 0xFF;\n } else {\n this.view[offset ] = (value >>> 24) & 0xFF;\n this.view[offset+1] = (value >>> 16) & 0xFF;\n this.view[offset+2] = (value >>> 8) & 0xFF;\n this.view[offset+3] = value & 0xFF;\n }\n if (relative) this.offset += 4;\n return this;\r\n };\r\n\r\n /**\r\n * Writes a 32bit signed integer. This is an alias of {@link ByteBuffer#writeInt32}.\r\n * @param {number} value Value to write\r\n * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted.\r\n * @expose\r\n */\r\n ByteBufferPrototype.writeInt = ByteBufferPrototype.writeInt32;\r\n\r\n /**\r\n * Reads a 32bit signed integer.\r\n * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `4` if omitted.\r\n * @returns {number} Value read\r\n * @expose\r\n */\r\n ByteBufferPrototype.readInt32 = function(offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 4 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+4+\") <= \"+this.buffer.byteLength);\n }\r\n var value = 0;\r\n if (this.littleEndian) {\n value = this.view[offset+2] << 16;\n value |= this.view[offset+1] << 8;\n value |= this.view[offset ];\n value += this.view[offset+3] << 24 >>> 0;\n } else {\n value = this.view[offset+1] << 16;\n value |= this.view[offset+2] << 8;\n value |= this.view[offset+3];\n value += this.view[offset ] << 24 >>> 0;\n }\n value |= 0; // Cast to signed\r\n if (relative) this.offset += 4;\n return value;\r\n };\r\n\r\n /**\r\n * Reads a 32bit signed integer. This is an alias of {@link ByteBuffer#readInt32}.\r\n * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `4` if omitted.\r\n * @returns {number} Value read\r\n * @expose\r\n */\r\n ByteBufferPrototype.readInt = ByteBufferPrototype.readInt32;\r\n\r\n /**\r\n * Writes a 32bit unsigned integer.\r\n * @param {number} value Value to write\r\n * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted.\r\n * @expose\r\n */\r\n ByteBufferPrototype.writeUint32 = function(value, offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (typeof value !== 'number' || value % 1 !== 0)\n throw TypeError(\"Illegal value: \"+value+\" (not an integer)\");\n value >>>= 0;\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 0 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n }\r\n offset += 4;\n var capacity5 = this.buffer.byteLength;\n if (offset > capacity5)\n this.resize((capacity5 *= 2) > offset ? capacity5 : offset);\n offset -= 4;\n if (this.littleEndian) {\n this.view[offset+3] = (value >>> 24) & 0xFF;\n this.view[offset+2] = (value >>> 16) & 0xFF;\n this.view[offset+1] = (value >>> 8) & 0xFF;\n this.view[offset ] = value & 0xFF;\n } else {\n this.view[offset ] = (value >>> 24) & 0xFF;\n this.view[offset+1] = (value >>> 16) & 0xFF;\n this.view[offset+2] = (value >>> 8) & 0xFF;\n this.view[offset+3] = value & 0xFF;\n }\n if (relative) this.offset += 4;\n return this;\r\n };\r\n\r\n /**\r\n * Writes a 32bit unsigned integer. This is an alias of {@link ByteBuffer#writeUint32}.\r\n * @function\r\n * @param {number} value Value to write\r\n * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted.\r\n * @expose\r\n */\r\n ByteBufferPrototype.writeUInt32 = ByteBufferPrototype.writeUint32;\r\n\r\n /**\r\n * Reads a 32bit unsigned integer.\r\n * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `4` if omitted.\r\n * @returns {number} Value read\r\n * @expose\r\n */\r\n ByteBufferPrototype.readUint32 = function(offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 4 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+4+\") <= \"+this.buffer.byteLength);\n }\r\n var value = 0;\r\n if (this.littleEndian) {\n value = this.view[offset+2] << 16;\n value |= this.view[offset+1] << 8;\n value |= this.view[offset ];\n value += this.view[offset+3] << 24 >>> 0;\n } else {\n value = this.view[offset+1] << 16;\n value |= this.view[offset+2] << 8;\n value |= this.view[offset+3];\n value += this.view[offset ] << 24 >>> 0;\n }\n if (relative) this.offset += 4;\n return value;\r\n };\r\n\r\n /**\r\n * Reads a 32bit unsigned integer. This is an alias of {@link ByteBuffer#readUint32}.\r\n * @function\r\n * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `4` if omitted.\r\n * @returns {number} Value read\r\n * @expose\r\n */\r\n ByteBufferPrototype.readUInt32 = ByteBufferPrototype.readUint32;\r\n\r\n // types/ints/int64\r\n\r\n if (Long) {\r\n\r\n /**\r\n * Writes a 64bit signed integer.\r\n * @param {number|!Long} value Value to write\r\n * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted.\r\n * @returns {!ByteBuffer} this\r\n * @expose\r\n */\r\n ByteBufferPrototype.writeInt64 = function(value, offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (typeof value === 'number')\n value = Long.fromNumber(value);\n else if (typeof value === 'string')\n value = Long.fromString(value);\n else if (!(value && value instanceof Long))\n throw TypeError(\"Illegal value: \"+value+\" (not an integer or Long)\");\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 0 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n }\r\n if (typeof value === 'number')\n value = Long.fromNumber(value);\n else if (typeof value === 'string')\n value = Long.fromString(value);\n offset += 8;\n var capacity6 = this.buffer.byteLength;\n if (offset > capacity6)\n this.resize((capacity6 *= 2) > offset ? capacity6 : offset);\n offset -= 8;\n var lo = value.low,\r\n hi = value.high;\r\n if (this.littleEndian) {\r\n this.view[offset+3] = (lo >>> 24) & 0xFF;\n this.view[offset+2] = (lo >>> 16) & 0xFF;\n this.view[offset+1] = (lo >>> 8) & 0xFF;\n this.view[offset ] = lo & 0xFF;\n offset += 4;\r\n this.view[offset+3] = (hi >>> 24) & 0xFF;\n this.view[offset+2] = (hi >>> 16) & 0xFF;\n this.view[offset+1] = (hi >>> 8) & 0xFF;\n this.view[offset ] = hi & 0xFF;\n } else {\r\n this.view[offset ] = (hi >>> 24) & 0xFF;\n this.view[offset+1] = (hi >>> 16) & 0xFF;\n this.view[offset+2] = (hi >>> 8) & 0xFF;\n this.view[offset+3] = hi & 0xFF;\n offset += 4;\r\n this.view[offset ] = (lo >>> 24) & 0xFF;\n this.view[offset+1] = (lo >>> 16) & 0xFF;\n this.view[offset+2] = (lo >>> 8) & 0xFF;\n this.view[offset+3] = lo & 0xFF;\n }\r\n if (relative) this.offset += 8;\n return this;\r\n };\r\n\r\n /**\r\n * Writes a 64bit signed integer. This is an alias of {@link ByteBuffer#writeInt64}.\r\n * @param {number|!Long} value Value to write\r\n * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted.\r\n * @returns {!ByteBuffer} this\r\n * @expose\r\n */\r\n ByteBufferPrototype.writeLong = ByteBufferPrototype.writeInt64;\r\n\r\n /**\r\n * Reads a 64bit signed integer.\r\n * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted.\r\n * @returns {!Long}\r\n * @expose\r\n */\r\n ByteBufferPrototype.readInt64 = function(offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 8 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+8+\") <= \"+this.buffer.byteLength);\n }\r\n var lo = 0,\r\n hi = 0;\r\n if (this.littleEndian) {\r\n lo = this.view[offset+2] << 16;\n lo |= this.view[offset+1] << 8;\n lo |= this.view[offset ];\n lo += this.view[offset+3] << 24 >>> 0;\n offset += 4;\r\n hi = this.view[offset+2] << 16;\n hi |= this.view[offset+1] << 8;\n hi |= this.view[offset ];\n hi += this.view[offset+3] << 24 >>> 0;\n } else {\r\n hi = this.view[offset+1] << 16;\n hi |= this.view[offset+2] << 8;\n hi |= this.view[offset+3];\n hi += this.view[offset ] << 24 >>> 0;\n offset += 4;\r\n lo = this.view[offset+1] << 16;\n lo |= this.view[offset+2] << 8;\n lo |= this.view[offset+3];\n lo += this.view[offset ] << 24 >>> 0;\n }\r\n var value = new Long(lo, hi, false);\r\n if (relative) this.offset += 8;\n return value;\r\n };\r\n\r\n /**\r\n * Reads a 64bit signed integer. This is an alias of {@link ByteBuffer#readInt64}.\r\n * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted.\r\n * @returns {!Long}\r\n * @expose\r\n */\r\n ByteBufferPrototype.readLong = ByteBufferPrototype.readInt64;\r\n\r\n /**\r\n * Writes a 64bit unsigned integer.\r\n * @param {number|!Long} value Value to write\r\n * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted.\r\n * @returns {!ByteBuffer} this\r\n * @expose\r\n */\r\n ByteBufferPrototype.writeUint64 = function(value, offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (typeof value === 'number')\n value = Long.fromNumber(value);\n else if (typeof value === 'string')\n value = Long.fromString(value);\n else if (!(value && value instanceof Long))\n throw TypeError(\"Illegal value: \"+value+\" (not an integer or Long)\");\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 0 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n }\r\n if (typeof value === 'number')\n value = Long.fromNumber(value);\n else if (typeof value === 'string')\n value = Long.fromString(value);\n offset += 8;\n var capacity7 = this.buffer.byteLength;\n if (offset > capacity7)\n this.resize((capacity7 *= 2) > offset ? capacity7 : offset);\n offset -= 8;\n var lo = value.low,\r\n hi = value.high;\r\n if (this.littleEndian) {\r\n this.view[offset+3] = (lo >>> 24) & 0xFF;\n this.view[offset+2] = (lo >>> 16) & 0xFF;\n this.view[offset+1] = (lo >>> 8) & 0xFF;\n this.view[offset ] = lo & 0xFF;\n offset += 4;\r\n this.view[offset+3] = (hi >>> 24) & 0xFF;\n this.view[offset+2] = (hi >>> 16) & 0xFF;\n this.view[offset+1] = (hi >>> 8) & 0xFF;\n this.view[offset ] = hi & 0xFF;\n } else {\r\n this.view[offset ] = (hi >>> 24) & 0xFF;\n this.view[offset+1] = (hi >>> 16) & 0xFF;\n this.view[offset+2] = (hi >>> 8) & 0xFF;\n this.view[offset+3] = hi & 0xFF;\n offset += 4;\r\n this.view[offset ] = (lo >>> 24) & 0xFF;\n this.view[offset+1] = (lo >>> 16) & 0xFF;\n this.view[offset+2] = (lo >>> 8) & 0xFF;\n this.view[offset+3] = lo & 0xFF;\n }\r\n if (relative) this.offset += 8;\n return this;\r\n };\r\n\r\n /**\r\n * Writes a 64bit unsigned integer. This is an alias of {@link ByteBuffer#writeUint64}.\r\n * @function\r\n * @param {number|!Long} value Value to write\r\n * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted.\r\n * @returns {!ByteBuffer} this\r\n * @expose\r\n */\r\n ByteBufferPrototype.writeUInt64 = ByteBufferPrototype.writeUint64;\r\n\r\n /**\r\n * Reads a 64bit unsigned integer.\r\n * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted.\r\n * @returns {!Long}\r\n * @expose\r\n */\r\n ByteBufferPrototype.readUint64 = function(offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 8 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+8+\") <= \"+this.buffer.byteLength);\n }\r\n var lo = 0,\r\n hi = 0;\r\n if (this.littleEndian) {\r\n lo = this.view[offset+2] << 16;\n lo |= this.view[offset+1] << 8;\n lo |= this.view[offset ];\n lo += this.view[offset+3] << 24 >>> 0;\n offset += 4;\r\n hi = this.view[offset+2] << 16;\n hi |= this.view[offset+1] << 8;\n hi |= this.view[offset ];\n hi += this.view[offset+3] << 24 >>> 0;\n } else {\r\n hi = this.view[offset+1] << 16;\n hi |= this.view[offset+2] << 8;\n hi |= this.view[offset+3];\n hi += this.view[offset ] << 24 >>> 0;\n offset += 4;\r\n lo = this.view[offset+1] << 16;\n lo |= this.view[offset+2] << 8;\n lo |= this.view[offset+3];\n lo += this.view[offset ] << 24 >>> 0;\n }\r\n var value = new Long(lo, hi, true);\r\n if (relative) this.offset += 8;\n return value;\r\n };\r\n\r\n /**\r\n * Reads a 64bit unsigned integer. This is an alias of {@link ByteBuffer#readUint64}.\r\n * @function\r\n * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted.\r\n * @returns {!Long}\r\n * @expose\r\n */\r\n ByteBufferPrototype.readUInt64 = ByteBufferPrototype.readUint64;\r\n\r\n } // Long\r\n\r\n\r\n // types/floats/float32\r\n\r\n /*\r\n ieee754 - https://github.com/feross/ieee754\r\n\r\n The MIT License (MIT)\r\n\r\n Copyright (c) Feross Aboukhadijeh\r\n\r\n Permission is hereby granted, free of charge, to any person obtaining a copy\r\n of this software and associated documentation files (the \"Software\"), to deal\r\n in the Software without restriction, including without limitation the rights\r\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n copies of the Software, and to permit persons to whom the Software is\r\n furnished to do so, subject to the following conditions:\r\n\r\n The above copyright notice and this permission notice shall be included in\r\n all copies or substantial portions of the Software.\r\n\r\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n THE SOFTWARE.\r\n */\r\n\r\n /**\r\n * Reads an IEEE754 float from a byte array.\r\n * @param {!Array} buffer\r\n * @param {number} offset\r\n * @param {boolean} isLE\r\n * @param {number} mLen\r\n * @param {number} nBytes\r\n * @returns {number}\r\n * @inner\r\n */\r\n function ieee754_read(buffer, offset, isLE, mLen, nBytes) {\r\n var e, m,\r\n eLen = nBytes * 8 - mLen - 1,\r\n eMax = (1 << eLen) - 1,\r\n eBias = eMax >> 1,\r\n nBits = -7,\r\n i = isLE ? (nBytes - 1) : 0,\r\n d = isLE ? -1 : 1,\r\n s = buffer[offset + i];\r\n\r\n i += d;\r\n\r\n e = s & ((1 << (-nBits)) - 1);\r\n s >>= (-nBits);\r\n nBits += eLen;\r\n for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}\r\n\r\n m = e & ((1 << (-nBits)) - 1);\r\n e >>= (-nBits);\r\n nBits += mLen;\r\n for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}\r\n\r\n if (e === 0) {\r\n e = 1 - eBias;\r\n } else if (e === eMax) {\r\n return m ? NaN : ((s ? -1 : 1) * Infinity);\r\n } else {\r\n m = m + Math.pow(2, mLen);\r\n e = e - eBias;\r\n }\r\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen);\r\n }\r\n\r\n /**\r\n * Writes an IEEE754 float to a byte array.\r\n * @param {!Array} buffer\r\n * @param {number} value\r\n * @param {number} offset\r\n * @param {boolean} isLE\r\n * @param {number} mLen\r\n * @param {number} nBytes\r\n * @inner\r\n */\r\n function ieee754_write(buffer, value, offset, isLE, mLen, nBytes) {\r\n var e, m, c,\r\n eLen = nBytes * 8 - mLen - 1,\r\n eMax = (1 << eLen) - 1,\r\n eBias = eMax >> 1,\r\n rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0),\r\n i = isLE ? 0 : (nBytes - 1),\r\n d = isLE ? 1 : -1,\r\n s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0;\r\n\r\n value = Math.abs(value);\r\n\r\n if (isNaN(value) || value === Infinity) {\r\n m = isNaN(value) ? 1 : 0;\r\n e = eMax;\r\n } else {\r\n e = Math.floor(Math.log(value) / Math.LN2);\r\n if (value * (c = Math.pow(2, -e)) < 1) {\r\n e--;\r\n c *= 2;\r\n }\r\n if (e + eBias >= 1) {\r\n value += rt / c;\r\n } else {\r\n value += rt * Math.pow(2, 1 - eBias);\r\n }\r\n if (value * c >= 2) {\r\n e++;\r\n c /= 2;\r\n }\r\n\r\n if (e + eBias >= eMax) {\r\n m = 0;\r\n e = eMax;\r\n } else if (e + eBias >= 1) {\r\n m = (value * c - 1) * Math.pow(2, mLen);\r\n e = e + eBias;\r\n } else {\r\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);\r\n e = 0;\r\n }\r\n }\r\n\r\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\r\n\r\n e = (e << mLen) | m;\r\n eLen += mLen;\r\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\r\n\r\n buffer[offset + i - d] |= s * 128;\r\n }\r\n\r\n /**\r\n * Writes a 32bit float.\r\n * @param {number} value Value to write\r\n * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted.\r\n * @returns {!ByteBuffer} this\r\n * @expose\r\n */\r\n ByteBufferPrototype.writeFloat32 = function(value, offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (typeof value !== 'number')\r\n throw TypeError(\"Illegal value: \"+value+\" (not a number)\");\r\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 0 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n }\r\n offset += 4;\n var capacity8 = this.buffer.byteLength;\n if (offset > capacity8)\n this.resize((capacity8 *= 2) > offset ? capacity8 : offset);\n offset -= 4;\n ieee754_write(this.view, value, offset, this.littleEndian, 23, 4);\r\n if (relative) this.offset += 4;\n return this;\r\n };\r\n\r\n /**\r\n * Writes a 32bit float. This is an alias of {@link ByteBuffer#writeFloat32}.\r\n * @function\r\n * @param {number} value Value to write\r\n * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted.\r\n * @returns {!ByteBuffer} this\r\n * @expose\r\n */\r\n ByteBufferPrototype.writeFloat = ByteBufferPrototype.writeFloat32;\r\n\r\n /**\r\n * Reads a 32bit float.\r\n * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `4` if omitted.\r\n * @returns {number}\r\n * @expose\r\n */\r\n ByteBufferPrototype.readFloat32 = function(offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 4 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+4+\") <= \"+this.buffer.byteLength);\n }\r\n var value = ieee754_read(this.view, offset, this.littleEndian, 23, 4);\r\n if (relative) this.offset += 4;\n return value;\r\n };\r\n\r\n /**\r\n * Reads a 32bit float. This is an alias of {@link ByteBuffer#readFloat32}.\r\n * @function\r\n * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `4` if omitted.\r\n * @returns {number}\r\n * @expose\r\n */\r\n ByteBufferPrototype.readFloat = ByteBufferPrototype.readFloat32;\r\n\r\n // types/floats/float64\r\n\r\n /**\r\n * Writes a 64bit float.\r\n * @param {number} value Value to write\r\n * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted.\r\n * @returns {!ByteBuffer} this\r\n * @expose\r\n */\r\n ByteBufferPrototype.writeFloat64 = function(value, offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (typeof value !== 'number')\r\n throw TypeError(\"Illegal value: \"+value+\" (not a number)\");\r\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 0 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n }\r\n offset += 8;\n var capacity9 = this.buffer.byteLength;\n if (offset > capacity9)\n this.resize((capacity9 *= 2) > offset ? capacity9 : offset);\n offset -= 8;\n ieee754_write(this.view, value, offset, this.littleEndian, 52, 8);\r\n if (relative) this.offset += 8;\n return this;\r\n };\r\n\r\n /**\r\n * Writes a 64bit float. This is an alias of {@link ByteBuffer#writeFloat64}.\r\n * @function\r\n * @param {number} value Value to write\r\n * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted.\r\n * @returns {!ByteBuffer} this\r\n * @expose\r\n */\r\n ByteBufferPrototype.writeDouble = ByteBufferPrototype.writeFloat64;\r\n\r\n /**\r\n * Reads a 64bit float.\r\n * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted.\r\n * @returns {number}\r\n * @expose\r\n */\r\n ByteBufferPrototype.readFloat64 = function(offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 8 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+8+\") <= \"+this.buffer.byteLength);\n }\r\n var value = ieee754_read(this.view, offset, this.littleEndian, 52, 8);\r\n if (relative) this.offset += 8;\n return value;\r\n };\r\n\r\n /**\r\n * Reads a 64bit float. This is an alias of {@link ByteBuffer#readFloat64}.\r\n * @function\r\n * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted.\r\n * @returns {number}\r\n * @expose\r\n */\r\n ByteBufferPrototype.readDouble = ByteBufferPrototype.readFloat64;\r\n\r\n\r\n // types/varints/varint32\r\n\r\n /**\r\n * Maximum number of bytes required to store a 32bit base 128 variable-length integer.\r\n * @type {number}\r\n * @const\r\n * @expose\r\n */\r\n ByteBuffer.MAX_VARINT32_BYTES = 5;\r\n\r\n /**\r\n * Calculates the actual number of bytes required to store a 32bit base 128 variable-length integer.\r\n * @param {number} value Value to encode\r\n * @returns {number} Number of bytes required. Capped to {@link ByteBuffer.MAX_VARINT32_BYTES}\r\n * @expose\r\n */\r\n ByteBuffer.calculateVarint32 = function(value) {\r\n // ref: src/google/protobuf/io/coded_stream.cc\r\n value = value >>> 0;\r\n if (value < 1 << 7 ) return 1;\r\n else if (value < 1 << 14) return 2;\r\n else if (value < 1 << 21) return 3;\r\n else if (value < 1 << 28) return 4;\r\n else return 5;\r\n };\r\n\r\n /**\r\n * Zigzag encodes a signed 32bit integer so that it can be effectively used with varint encoding.\r\n * @param {number} n Signed 32bit integer\r\n * @returns {number} Unsigned zigzag encoded 32bit integer\r\n * @expose\r\n */\r\n ByteBuffer.zigZagEncode32 = function(n) {\r\n return (((n |= 0) << 1) ^ (n >> 31)) >>> 0; // ref: src/google/protobuf/wire_format_lite.h\r\n };\r\n\r\n /**\r\n * Decodes a zigzag encoded signed 32bit integer.\r\n * @param {number} n Unsigned zigzag encoded 32bit integer\r\n * @returns {number} Signed 32bit integer\r\n * @expose\r\n */\r\n ByteBuffer.zigZagDecode32 = function(n) {\r\n return ((n >>> 1) ^ -(n & 1)) | 0; // // ref: src/google/protobuf/wire_format_lite.h\r\n };\r\n\r\n /**\r\n * Writes a 32bit base 128 variable-length integer.\r\n * @param {number} value Value to write\r\n * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes\r\n * written if omitted.\r\n * @returns {!ByteBuffer|number} this if `offset` is omitted, else the actual number of bytes written\r\n * @expose\r\n */\r\n ByteBufferPrototype.writeVarint32 = function(value, offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (typeof value !== 'number' || value % 1 !== 0)\n throw TypeError(\"Illegal value: \"+value+\" (not an integer)\");\n value |= 0;\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 0 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n }\r\n var size = ByteBuffer.calculateVarint32(value),\r\n b;\r\n offset += size;\n var capacity10 = this.buffer.byteLength;\n if (offset > capacity10)\n this.resize((capacity10 *= 2) > offset ? capacity10 : offset);\n offset -= size;\n value >>>= 0;\r\n while (value >= 0x80) {\r\n b = (value & 0x7f) | 0x80;\r\n this.view[offset++] = b;\r\n value >>>= 7;\r\n }\r\n this.view[offset++] = value;\r\n if (relative) {\r\n this.offset = offset;\r\n return this;\r\n }\r\n return size;\r\n };\r\n\r\n /**\r\n * Writes a zig-zag encoded (signed) 32bit base 128 variable-length integer.\r\n * @param {number} value Value to write\r\n * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes\r\n * written if omitted.\r\n * @returns {!ByteBuffer|number} this if `offset` is omitted, else the actual number of bytes written\r\n * @expose\r\n */\r\n ByteBufferPrototype.writeVarint32ZigZag = function(value, offset) {\r\n return this.writeVarint32(ByteBuffer.zigZagEncode32(value), offset);\r\n };\r\n\r\n /**\r\n * Reads a 32bit base 128 variable-length integer.\r\n * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes\r\n * written if omitted.\r\n * @returns {number|!{value: number, length: number}} The value read if offset is omitted, else the value read\r\n * and the actual number of bytes read.\r\n * @throws {Error} If it's not a valid varint. Has a property `truncated = true` if there is not enough data available\r\n * to fully decode the varint.\r\n * @expose\r\n */\r\n ByteBufferPrototype.readVarint32 = function(offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 1 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+1+\") <= \"+this.buffer.byteLength);\n }\r\n var c = 0,\r\n value = 0 >>> 0,\r\n b;\r\n do {\r\n if (!this.noAssert && offset > this.limit) {\r\n var err = Error(\"Truncated\");\r\n err['truncated'] = true;\r\n throw err;\r\n }\r\n b = this.view[offset++];\r\n if (c < 5)\r\n value |= (b & 0x7f) << (7*c);\r\n ++c;\r\n } while ((b & 0x80) !== 0);\r\n value |= 0;\r\n if (relative) {\r\n this.offset = offset;\r\n return value;\r\n }\r\n return {\r\n \"value\": value,\r\n \"length\": c\r\n };\r\n };\r\n\r\n /**\r\n * Reads a zig-zag encoded (signed) 32bit base 128 variable-length integer.\r\n * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes\r\n * written if omitted.\r\n * @returns {number|!{value: number, length: number}} The value read if offset is omitted, else the value read\r\n * and the actual number of bytes read.\r\n * @throws {Error} If it's not a valid varint\r\n * @expose\r\n */\r\n ByteBufferPrototype.readVarint32ZigZag = function(offset) {\r\n var val = this.readVarint32(offset);\r\n if (typeof val === 'object')\r\n val[\"value\"] = ByteBuffer.zigZagDecode32(val[\"value\"]);\r\n else\r\n val = ByteBuffer.zigZagDecode32(val);\r\n return val;\r\n };\r\n\r\n // types/varints/varint64\r\n\r\n if (Long) {\r\n\r\n /**\r\n * Maximum number of bytes required to store a 64bit base 128 variable-length integer.\r\n * @type {number}\r\n * @const\r\n * @expose\r\n */\r\n ByteBuffer.MAX_VARINT64_BYTES = 10;\r\n\r\n /**\r\n * Calculates the actual number of bytes required to store a 64bit base 128 variable-length integer.\r\n * @param {number|!Long} value Value to encode\r\n * @returns {number} Number of bytes required. Capped to {@link ByteBuffer.MAX_VARINT64_BYTES}\r\n * @expose\r\n */\r\n ByteBuffer.calculateVarint64 = function(value) {\r\n if (typeof value === 'number')\n value = Long.fromNumber(value);\n else if (typeof value === 'string')\n value = Long.fromString(value);\n // ref: src/google/protobuf/io/coded_stream.cc\r\n var part0 = value.toInt() >>> 0,\r\n part1 = value.shiftRightUnsigned(28).toInt() >>> 0,\r\n part2 = value.shiftRightUnsigned(56).toInt() >>> 0;\r\n if (part2 == 0) {\r\n if (part1 == 0) {\r\n if (part0 < 1 << 14)\r\n return part0 < 1 << 7 ? 1 : 2;\r\n else\r\n return part0 < 1 << 21 ? 3 : 4;\r\n } else {\r\n if (part1 < 1 << 14)\r\n return part1 < 1 << 7 ? 5 : 6;\r\n else\r\n return part1 < 1 << 21 ? 7 : 8;\r\n }\r\n } else\r\n return part2 < 1 << 7 ? 9 : 10;\r\n };\r\n\r\n /**\r\n * Zigzag encodes a signed 64bit integer so that it can be effectively used with varint encoding.\r\n * @param {number|!Long} value Signed long\r\n * @returns {!Long} Unsigned zigzag encoded long\r\n * @expose\r\n */\r\n ByteBuffer.zigZagEncode64 = function(value) {\r\n if (typeof value === 'number')\n value = Long.fromNumber(value, false);\n else if (typeof value === 'string')\n value = Long.fromString(value, false);\n else if (value.unsigned !== false) value = value.toSigned();\n // ref: src/google/protobuf/wire_format_lite.h\r\n return value.shiftLeft(1).xor(value.shiftRight(63)).toUnsigned();\r\n };\r\n\r\n /**\r\n * Decodes a zigzag encoded signed 64bit integer.\r\n * @param {!Long|number} value Unsigned zigzag encoded long or JavaScript number\r\n * @returns {!Long} Signed long\r\n * @expose\r\n */\r\n ByteBuffer.zigZagDecode64 = function(value) {\r\n if (typeof value === 'number')\n value = Long.fromNumber(value, false);\n else if (typeof value === 'string')\n value = Long.fromString(value, false);\n else if (value.unsigned !== false) value = value.toSigned();\n // ref: src/google/protobuf/wire_format_lite.h\r\n return value.shiftRightUnsigned(1).xor(value.and(Long.ONE).toSigned().negate()).toSigned();\r\n };\r\n\r\n /**\r\n * Writes a 64bit base 128 variable-length integer.\r\n * @param {number|Long} value Value to write\r\n * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes\r\n * written if omitted.\r\n * @returns {!ByteBuffer|number} `this` if offset is omitted, else the actual number of bytes written.\r\n * @expose\r\n */\r\n ByteBufferPrototype.writeVarint64 = function(value, offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (typeof value === 'number')\n value = Long.fromNumber(value);\n else if (typeof value === 'string')\n value = Long.fromString(value);\n else if (!(value && value instanceof Long))\n throw TypeError(\"Illegal value: \"+value+\" (not an integer or Long)\");\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 0 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n }\r\n if (typeof value === 'number')\n value = Long.fromNumber(value, false);\n else if (typeof value === 'string')\n value = Long.fromString(value, false);\n else if (value.unsigned !== false) value = value.toSigned();\n var size = ByteBuffer.calculateVarint64(value),\r\n part0 = value.toInt() >>> 0,\r\n part1 = value.shiftRightUnsigned(28).toInt() >>> 0,\r\n part2 = value.shiftRightUnsigned(56).toInt() >>> 0;\r\n offset += size;\n var capacity11 = this.buffer.byteLength;\n if (offset > capacity11)\n this.resize((capacity11 *= 2) > offset ? capacity11 : offset);\n offset -= size;\n switch (size) {\r\n case 10: this.view[offset+9] = (part2 >>> 7) & 0x01;\r\n case 9 : this.view[offset+8] = size !== 9 ? (part2 ) | 0x80 : (part2 ) & 0x7F;\r\n case 8 : this.view[offset+7] = size !== 8 ? (part1 >>> 21) | 0x80 : (part1 >>> 21) & 0x7F;\r\n case 7 : this.view[offset+6] = size !== 7 ? (part1 >>> 14) | 0x80 : (part1 >>> 14) & 0x7F;\r\n case 6 : this.view[offset+5] = size !== 6 ? (part1 >>> 7) | 0x80 : (part1 >>> 7) & 0x7F;\r\n case 5 : this.view[offset+4] = size !== 5 ? (part1 ) | 0x80 : (part1 ) & 0x7F;\r\n case 4 : this.view[offset+3] = size !== 4 ? (part0 >>> 21) | 0x80 : (part0 >>> 21) & 0x7F;\r\n case 3 : this.view[offset+2] = size !== 3 ? (part0 >>> 14) | 0x80 : (part0 >>> 14) & 0x7F;\r\n case 2 : this.view[offset+1] = size !== 2 ? (part0 >>> 7) | 0x80 : (part0 >>> 7) & 0x7F;\r\n case 1 : this.view[offset ] = size !== 1 ? (part0 ) | 0x80 : (part0 ) & 0x7F;\r\n }\r\n if (relative) {\r\n this.offset += size;\r\n return this;\r\n } else {\r\n return size;\r\n }\r\n };\r\n\r\n /**\r\n * Writes a zig-zag encoded 64bit base 128 variable-length integer.\r\n * @param {number|Long} value Value to write\r\n * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes\r\n * written if omitted.\r\n * @returns {!ByteBuffer|number} `this` if offset is omitted, else the actual number of bytes written.\r\n * @expose\r\n */\r\n ByteBufferPrototype.writeVarint64ZigZag = function(value, offset) {\r\n return this.writeVarint64(ByteBuffer.zigZagEncode64(value), offset);\r\n };\r\n\r\n /**\r\n * Reads a 64bit base 128 variable-length integer. Requires Long.js.\r\n * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes\r\n * read if omitted.\r\n * @returns {!Long|!{value: Long, length: number}} The value read if offset is omitted, else the value read and\r\n * the actual number of bytes read.\r\n * @throws {Error} If it's not a valid varint\r\n * @expose\r\n */\r\n ByteBufferPrototype.readVarint64 = function(offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 1 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+1+\") <= \"+this.buffer.byteLength);\n }\r\n // ref: src/google/protobuf/io/coded_stream.cc\r\n var start = offset,\r\n part0 = 0,\r\n part1 = 0,\r\n part2 = 0,\r\n b = 0;\r\n b = this.view[offset++]; part0 = (b & 0x7F) ; if ( b & 0x80 ) {\r\n b = this.view[offset++]; part0 |= (b & 0x7F) << 7; if ((b & 0x80) || (this.noAssert && typeof b === 'undefined')) {\r\n b = this.view[offset++]; part0 |= (b & 0x7F) << 14; if ((b & 0x80) || (this.noAssert && typeof b === 'undefined')) {\r\n b = this.view[offset++]; part0 |= (b & 0x7F) << 21; if ((b & 0x80) || (this.noAssert && typeof b === 'undefined')) {\r\n b = this.view[offset++]; part1 = (b & 0x7F) ; if ((b & 0x80) || (this.noAssert && typeof b === 'undefined')) {\r\n b = this.view[offset++]; part1 |= (b & 0x7F) << 7; if ((b & 0x80) || (this.noAssert && typeof b === 'undefined')) {\r\n b = this.view[offset++]; part1 |= (b & 0x7F) << 14; if ((b & 0x80) || (this.noAssert && typeof b === 'undefined')) {\r\n b = this.view[offset++]; part1 |= (b & 0x7F) << 21; if ((b & 0x80) || (this.noAssert && typeof b === 'undefined')) {\r\n b = this.view[offset++]; part2 = (b & 0x7F) ; if ((b & 0x80) || (this.noAssert && typeof b === 'undefined')) {\r\n b = this.view[offset++]; part2 |= (b & 0x7F) << 7; if ((b & 0x80) || (this.noAssert && typeof b === 'undefined')) {\r\n throw Error(\"Buffer overrun\"); }}}}}}}}}}\r\n var value = Long.fromBits(part0 | (part1 << 28), (part1 >>> 4) | (part2) << 24, false);\r\n if (relative) {\r\n this.offset = offset;\r\n return value;\r\n } else {\r\n return {\r\n 'value': value,\r\n 'length': offset-start\r\n };\r\n }\r\n };\r\n\r\n /**\r\n * Reads a zig-zag encoded 64bit base 128 variable-length integer. Requires Long.js.\r\n * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes\r\n * read if omitted.\r\n * @returns {!Long|!{value: Long, length: number}} The value read if offset is omitted, else the value read and\r\n * the actual number of bytes read.\r\n * @throws {Error} If it's not a valid varint\r\n * @expose\r\n */\r\n ByteBufferPrototype.readVarint64ZigZag = function(offset) {\r\n var val = this.readVarint64(offset);\r\n if (val && val['value'] instanceof Long)\r\n val[\"value\"] = ByteBuffer.zigZagDecode64(val[\"value\"]);\r\n else\r\n val = ByteBuffer.zigZagDecode64(val);\r\n return val;\r\n };\r\n\r\n } // Long\r\n\r\n\r\n // types/strings/cstring\r\n\r\n /**\r\n * Writes a NULL-terminated UTF8 encoded string. For this to work the specified string must not contain any NULL\r\n * characters itself.\r\n * @param {string} str String to write\r\n * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes\r\n * contained in `str` + 1 if omitted.\r\n * @returns {!ByteBuffer|number} this if offset is omitted, else the actual number of bytes written\r\n * @expose\r\n */\r\n ByteBufferPrototype.writeCString = function(str, offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n var i,\r\n k = str.length;\r\n if (!this.noAssert) {\r\n if (typeof str !== 'string')\r\n throw TypeError(\"Illegal str: Not a string\");\r\n for (i=0; i>>= 0;\n if (offset < 0 || offset + 0 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n }\r\n // UTF8 strings do not contain zero bytes in between except for the zero character, so:\r\n k = utfx.calculateUTF16asUTF8(stringSource(str))[1];\r\n offset += k+1;\n var capacity12 = this.buffer.byteLength;\n if (offset > capacity12)\n this.resize((capacity12 *= 2) > offset ? capacity12 : offset);\n offset -= k+1;\n utfx.encodeUTF16toUTF8(stringSource(str), function(b) {\r\n this.view[offset++] = b;\r\n }.bind(this));\r\n this.view[offset++] = 0;\r\n if (relative) {\r\n this.offset = offset;\r\n return this;\r\n }\r\n return k;\r\n };\r\n\r\n /**\r\n * Reads a NULL-terminated UTF8 encoded string. For this to work the string read must not contain any NULL characters\r\n * itself.\r\n * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes\r\n * read if omitted.\r\n * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string\r\n * read and the actual number of bytes read.\r\n * @expose\r\n */\r\n ByteBufferPrototype.readCString = function(offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 1 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+1+\") <= \"+this.buffer.byteLength);\n }\r\n var start = offset,\r\n temp;\r\n // UTF8 strings do not contain zero bytes in between except for the zero character itself, so:\r\n var sd, b = -1;\r\n utfx.decodeUTF8toUTF16(function() {\r\n if (b === 0) return null;\r\n if (offset >= this.limit)\r\n throw RangeError(\"Illegal range: Truncated data, \"+offset+\" < \"+this.limit);\r\n b = this.view[offset++];\r\n return b === 0 ? null : b;\r\n }.bind(this), sd = stringDestination(), true);\r\n if (relative) {\r\n this.offset = offset;\r\n return sd();\r\n } else {\r\n return {\r\n \"string\": sd(),\r\n \"length\": offset - start\r\n };\r\n }\r\n };\r\n\r\n // types/strings/istring\r\n\r\n /**\r\n * Writes a length as uint32 prefixed UTF8 encoded string.\r\n * @param {string} str String to write\r\n * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes\r\n * written if omitted.\r\n * @returns {!ByteBuffer|number} `this` if `offset` is omitted, else the actual number of bytes written\r\n * @expose\r\n * @see ByteBuffer#writeVarint32\r\n */\r\n ByteBufferPrototype.writeIString = function(str, offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (typeof str !== 'string')\r\n throw TypeError(\"Illegal str: Not a string\");\r\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 0 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n }\r\n var start = offset,\r\n k;\r\n k = utfx.calculateUTF16asUTF8(stringSource(str), this.noAssert)[1];\r\n offset += 4+k;\n var capacity13 = this.buffer.byteLength;\n if (offset > capacity13)\n this.resize((capacity13 *= 2) > offset ? capacity13 : offset);\n offset -= 4+k;\n if (this.littleEndian) {\n this.view[offset+3] = (k >>> 24) & 0xFF;\n this.view[offset+2] = (k >>> 16) & 0xFF;\n this.view[offset+1] = (k >>> 8) & 0xFF;\n this.view[offset ] = k & 0xFF;\n } else {\n this.view[offset ] = (k >>> 24) & 0xFF;\n this.view[offset+1] = (k >>> 16) & 0xFF;\n this.view[offset+2] = (k >>> 8) & 0xFF;\n this.view[offset+3] = k & 0xFF;\n }\n offset += 4;\r\n utfx.encodeUTF16toUTF8(stringSource(str), function(b) {\r\n this.view[offset++] = b;\r\n }.bind(this));\r\n if (offset !== start + 4 + k)\r\n throw RangeError(\"Illegal range: Truncated data, \"+offset+\" == \"+(offset+4+k));\r\n if (relative) {\r\n this.offset = offset;\r\n return this;\r\n }\r\n return offset - start;\r\n };\r\n\r\n /**\r\n * Reads a length as uint32 prefixed UTF8 encoded string.\r\n * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes\r\n * read if omitted.\r\n * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string\r\n * read and the actual number of bytes read.\r\n * @expose\r\n * @see ByteBuffer#readVarint32\r\n */\r\n ByteBufferPrototype.readIString = function(offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 4 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+4+\") <= \"+this.buffer.byteLength);\n }\r\n var start = offset;\r\n var len = this.readUint32(offset);\r\n var str = this.readUTF8String(len, ByteBuffer.METRICS_BYTES, offset += 4);\r\n offset += str['length'];\r\n if (relative) {\r\n this.offset = offset;\r\n return str['string'];\r\n } else {\r\n return {\r\n 'string': str['string'],\r\n 'length': offset - start\r\n };\r\n }\r\n };\r\n\r\n // types/strings/utf8string\r\n\r\n /**\r\n * Metrics representing number of UTF8 characters. Evaluates to `c`.\r\n * @type {string}\r\n * @const\r\n * @expose\r\n */\r\n ByteBuffer.METRICS_CHARS = 'c';\r\n\r\n /**\r\n * Metrics representing number of bytes. Evaluates to `b`.\r\n * @type {string}\r\n * @const\r\n * @expose\r\n */\r\n ByteBuffer.METRICS_BYTES = 'b';\r\n\r\n /**\r\n * Writes an UTF8 encoded string.\r\n * @param {string} str String to write\r\n * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} if omitted.\r\n * @returns {!ByteBuffer|number} this if offset is omitted, else the actual number of bytes written.\r\n * @expose\r\n */\r\n ByteBufferPrototype.writeUTF8String = function(str, offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 0 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n }\r\n var k;\r\n var start = offset;\r\n k = utfx.calculateUTF16asUTF8(stringSource(str))[1];\r\n offset += k;\n var capacity14 = this.buffer.byteLength;\n if (offset > capacity14)\n this.resize((capacity14 *= 2) > offset ? capacity14 : offset);\n offset -= k;\n utfx.encodeUTF16toUTF8(stringSource(str), function(b) {\r\n this.view[offset++] = b;\r\n }.bind(this));\r\n if (relative) {\r\n this.offset = offset;\r\n return this;\r\n }\r\n return offset - start;\r\n };\r\n\r\n /**\r\n * Writes an UTF8 encoded string. This is an alias of {@link ByteBuffer#writeUTF8String}.\r\n * @function\r\n * @param {string} str String to write\r\n * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} if omitted.\r\n * @returns {!ByteBuffer|number} this if offset is omitted, else the actual number of bytes written.\r\n * @expose\r\n */\r\n ByteBufferPrototype.writeString = ByteBufferPrototype.writeUTF8String;\r\n\r\n /**\r\n * Calculates the number of UTF8 characters of a string. JavaScript itself uses UTF-16, so that a string's\r\n * `length` property does not reflect its actual UTF8 size if it contains code points larger than 0xFFFF.\r\n * @param {string} str String to calculate\r\n * @returns {number} Number of UTF8 characters\r\n * @expose\r\n */\r\n ByteBuffer.calculateUTF8Chars = function(str) {\r\n return utfx.calculateUTF16asUTF8(stringSource(str))[0];\r\n };\r\n\r\n /**\r\n * Calculates the number of UTF8 bytes of a string.\r\n * @param {string} str String to calculate\r\n * @returns {number} Number of UTF8 bytes\r\n * @expose\r\n */\r\n ByteBuffer.calculateUTF8Bytes = function(str) {\r\n return utfx.calculateUTF16asUTF8(stringSource(str))[1];\r\n };\r\n\r\n /**\r\n * Calculates the number of UTF8 bytes of a string. This is an alias of {@link ByteBuffer.calculateUTF8Bytes}.\r\n * @function\r\n * @param {string} str String to calculate\r\n * @returns {number} Number of UTF8 bytes\r\n * @expose\r\n */\r\n ByteBuffer.calculateString = ByteBuffer.calculateUTF8Bytes;\r\n\r\n /**\r\n * Reads an UTF8 encoded string.\r\n * @param {number} length Number of characters or bytes to read.\r\n * @param {string=} metrics Metrics specifying what `length` is meant to count. Defaults to\r\n * {@link ByteBuffer.METRICS_CHARS}.\r\n * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes\r\n * read if omitted.\r\n * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string\r\n * read and the actual number of bytes read.\r\n * @expose\r\n */\r\n ByteBufferPrototype.readUTF8String = function(length, metrics, offset) {\r\n if (typeof metrics === 'number') {\r\n offset = metrics;\r\n metrics = undefined;\r\n }\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (typeof metrics === 'undefined') metrics = ByteBuffer.METRICS_CHARS;\r\n if (!this.noAssert) {\r\n if (typeof length !== 'number' || length % 1 !== 0)\n throw TypeError(\"Illegal length: \"+length+\" (not an integer)\");\n length |= 0;\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 0 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n }\r\n var i = 0,\r\n start = offset,\r\n sd;\r\n if (metrics === ByteBuffer.METRICS_CHARS) { // The same for node and the browser\r\n sd = stringDestination();\r\n utfx.decodeUTF8(function() {\r\n return i < length && offset < this.limit ? this.view[offset++] : null;\r\n }.bind(this), function(cp) {\r\n ++i; utfx.UTF8toUTF16(cp, sd);\r\n });\r\n if (i !== length)\r\n throw RangeError(\"Illegal range: Truncated data, \"+i+\" == \"+length);\r\n if (relative) {\r\n this.offset = offset;\r\n return sd();\r\n } else {\r\n return {\r\n \"string\": sd(),\r\n \"length\": offset - start\r\n };\r\n }\r\n } else if (metrics === ByteBuffer.METRICS_BYTES) {\r\n if (!this.noAssert) {\r\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + length > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+length+\") <= \"+this.buffer.byteLength);\n }\r\n var k = offset + length;\r\n utfx.decodeUTF8toUTF16(function() {\r\n return offset < k ? this.view[offset++] : null;\r\n }.bind(this), sd = stringDestination(), this.noAssert);\r\n if (offset !== k)\r\n throw RangeError(\"Illegal range: Truncated data, \"+offset+\" == \"+k);\r\n if (relative) {\r\n this.offset = offset;\r\n return sd();\r\n } else {\r\n return {\r\n 'string': sd(),\r\n 'length': offset - start\r\n };\r\n }\r\n } else\r\n throw TypeError(\"Unsupported metrics: \"+metrics);\r\n };\r\n\r\n /**\r\n * Reads an UTF8 encoded string. This is an alias of {@link ByteBuffer#readUTF8String}.\r\n * @function\r\n * @param {number} length Number of characters or bytes to read\r\n * @param {number=} metrics Metrics specifying what `n` is meant to count. Defaults to\r\n * {@link ByteBuffer.METRICS_CHARS}.\r\n * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes\r\n * read if omitted.\r\n * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string\r\n * read and the actual number of bytes read.\r\n * @expose\r\n */\r\n ByteBufferPrototype.readString = ByteBufferPrototype.readUTF8String;\r\n\r\n // types/strings/vstring\r\n\r\n /**\r\n * Writes a length as varint32 prefixed UTF8 encoded string.\r\n * @param {string} str String to write\r\n * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes\r\n * written if omitted.\r\n * @returns {!ByteBuffer|number} `this` if `offset` is omitted, else the actual number of bytes written\r\n * @expose\r\n * @see ByteBuffer#writeVarint32\r\n */\r\n ByteBufferPrototype.writeVString = function(str, offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (typeof str !== 'string')\r\n throw TypeError(\"Illegal str: Not a string\");\r\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 0 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n }\r\n var start = offset,\r\n k, l;\r\n k = utfx.calculateUTF16asUTF8(stringSource(str), this.noAssert)[1];\r\n l = ByteBuffer.calculateVarint32(k);\r\n offset += l+k;\n var capacity15 = this.buffer.byteLength;\n if (offset > capacity15)\n this.resize((capacity15 *= 2) > offset ? capacity15 : offset);\n offset -= l+k;\n offset += this.writeVarint32(k, offset);\r\n utfx.encodeUTF16toUTF8(stringSource(str), function(b) {\r\n this.view[offset++] = b;\r\n }.bind(this));\r\n if (offset !== start+k+l)\r\n throw RangeError(\"Illegal range: Truncated data, \"+offset+\" == \"+(offset+k+l));\r\n if (relative) {\r\n this.offset = offset;\r\n return this;\r\n }\r\n return offset - start;\r\n };\r\n\r\n /**\r\n * Reads a length as varint32 prefixed UTF8 encoded string.\r\n * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes\r\n * read if omitted.\r\n * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string\r\n * read and the actual number of bytes read.\r\n * @expose\r\n * @see ByteBuffer#readVarint32\r\n */\r\n ByteBufferPrototype.readVString = function(offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 1 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+1+\") <= \"+this.buffer.byteLength);\n }\r\n var start = offset;\r\n var len = this.readVarint32(offset);\r\n var str = this.readUTF8String(len['value'], ByteBuffer.METRICS_BYTES, offset += len['length']);\r\n offset += str['length'];\r\n if (relative) {\r\n this.offset = offset;\r\n return str['string'];\r\n } else {\r\n return {\r\n 'string': str['string'],\r\n 'length': offset - start\r\n };\r\n }\r\n };\r\n\r\n\r\n /**\r\n * Appends some data to this ByteBuffer. This will overwrite any contents behind the specified offset up to the appended\r\n * data's length.\r\n * @param {!ByteBuffer|!ArrayBuffer|!Uint8Array|string} source Data to append. If `source` is a ByteBuffer, its offsets\r\n * will be modified according to the performed read operation.\r\n * @param {(string|number)=} encoding Encoding if `data` is a string (\"base64\", \"hex\", \"binary\", defaults to \"utf8\")\r\n * @param {number=} offset Offset to append at. Will use and increase {@link ByteBuffer#offset} by the number of bytes\r\n * written if omitted.\r\n * @returns {!ByteBuffer} this\r\n * @expose\r\n * @example A relative `<01 02>03.append(<04 05>)` will result in `<01 02 04 05>, 04 05|`\r\n * @example An absolute `<01 02>03.append(04 05>, 1)` will result in `<01 04>05, 04 05|`\r\n */\r\n ByteBufferPrototype.append = function(source, encoding, offset) {\r\n if (typeof encoding === 'number' || typeof encoding !== 'string') {\r\n offset = encoding;\r\n encoding = undefined;\r\n }\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 0 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n }\r\n if (!(source instanceof ByteBuffer))\r\n source = ByteBuffer.wrap(source, encoding);\r\n var length = source.limit - source.offset;\r\n if (length <= 0) return this; // Nothing to append\r\n offset += length;\n var capacity16 = this.buffer.byteLength;\n if (offset > capacity16)\n this.resize((capacity16 *= 2) > offset ? capacity16 : offset);\n offset -= length;\n this.view.set(source.view.subarray(source.offset, source.limit), offset);\r\n source.offset += length;\r\n if (relative) this.offset += length;\n return this;\r\n };\r\n\r\n /**\r\n * Appends this ByteBuffer's contents to another ByteBuffer. This will overwrite any contents at and after the\r\n specified offset up to the length of this ByteBuffer's data.\r\n * @param {!ByteBuffer} target Target ByteBuffer\r\n * @param {number=} offset Offset to append to. Will use and increase {@link ByteBuffer#offset} by the number of bytes\r\n * read if omitted.\r\n * @returns {!ByteBuffer} this\r\n * @expose\r\n * @see ByteBuffer#append\r\n */\r\n ByteBufferPrototype.appendTo = function(target, offset) {\r\n target.append(this, offset);\r\n return this;\r\n };\r\n\r\n /**\r\n * Enables or disables assertions of argument types and offsets. Assertions are enabled by default but you can opt to\r\n * disable them if your code already makes sure that everything is valid.\r\n * @param {boolean} assert `true` to enable assertions, otherwise `false`\r\n * @returns {!ByteBuffer} this\r\n * @expose\r\n */\r\n ByteBufferPrototype.assert = function(assert) {\r\n this.noAssert = !assert;\r\n return this;\r\n };\r\n\r\n /**\r\n * Gets the capacity of this ByteBuffer's backing buffer.\r\n * @returns {number} Capacity of the backing buffer\r\n * @expose\r\n */\r\n ByteBufferPrototype.capacity = function() {\r\n return this.buffer.byteLength;\r\n };\r\n /**\r\n * Clears this ByteBuffer's offsets by setting {@link ByteBuffer#offset} to `0` and {@link ByteBuffer#limit} to the\r\n * backing buffer's capacity. Discards {@link ByteBuffer#markedOffset}.\r\n * @returns {!ByteBuffer} this\r\n * @expose\r\n */\r\n ByteBufferPrototype.clear = function() {\r\n this.offset = 0;\r\n this.limit = this.buffer.byteLength;\r\n this.markedOffset = -1;\r\n return this;\r\n };\r\n\r\n /**\r\n * Creates a cloned instance of this ByteBuffer, preset with this ByteBuffer's values for {@link ByteBuffer#offset},\r\n * {@link ByteBuffer#markedOffset} and {@link ByteBuffer#limit}.\r\n * @param {boolean=} copy Whether to copy the backing buffer or to return another view on the same, defaults to `false`\r\n * @returns {!ByteBuffer} Cloned instance\r\n * @expose\r\n */\r\n ByteBufferPrototype.clone = function(copy) {\r\n var bb = new ByteBuffer(0, this.littleEndian, this.noAssert);\r\n if (copy) {\r\n bb.buffer = new ArrayBuffer(this.buffer.byteLength);\r\n bb.view = new Uint8Array(bb.buffer);\r\n } else {\r\n bb.buffer = this.buffer;\r\n bb.view = this.view;\r\n }\r\n bb.offset = this.offset;\r\n bb.markedOffset = this.markedOffset;\r\n bb.limit = this.limit;\r\n return bb;\r\n };\r\n\r\n /**\r\n * Compacts this ByteBuffer to be backed by a {@link ByteBuffer#buffer} of its contents' length. Contents are the bytes\r\n * between {@link ByteBuffer#offset} and {@link ByteBuffer#limit}. Will set `offset = 0` and `limit = capacity` and\r\n * adapt {@link ByteBuffer#markedOffset} to the same relative position if set.\r\n * @param {number=} begin Offset to start at, defaults to {@link ByteBuffer#offset}\r\n * @param {number=} end Offset to end at, defaults to {@link ByteBuffer#limit}\r\n * @returns {!ByteBuffer} this\r\n * @expose\r\n */\r\n ByteBufferPrototype.compact = function(begin, end) {\r\n if (typeof begin === 'undefined') begin = this.offset;\r\n if (typeof end === 'undefined') end = this.limit;\r\n if (!this.noAssert) {\r\n if (typeof begin !== 'number' || begin % 1 !== 0)\n throw TypeError(\"Illegal begin: Not an integer\");\n begin >>>= 0;\n if (typeof end !== 'number' || end % 1 !== 0)\n throw TypeError(\"Illegal end: Not an integer\");\n end >>>= 0;\n if (begin < 0 || begin > end || end > this.buffer.byteLength)\n throw RangeError(\"Illegal range: 0 <= \"+begin+\" <= \"+end+\" <= \"+this.buffer.byteLength);\n }\r\n if (begin === 0 && end === this.buffer.byteLength)\r\n return this; // Already compacted\r\n var len = end - begin;\r\n if (len === 0) {\r\n this.buffer = EMPTY_BUFFER;\r\n this.view = null;\r\n if (this.markedOffset >= 0) this.markedOffset -= begin;\r\n this.offset = 0;\r\n this.limit = 0;\r\n return this;\r\n }\r\n var buffer = new ArrayBuffer(len);\r\n var view = new Uint8Array(buffer);\r\n view.set(this.view.subarray(begin, end));\r\n this.buffer = buffer;\r\n this.view = view;\r\n if (this.markedOffset >= 0) this.markedOffset -= begin;\r\n this.offset = 0;\r\n this.limit = len;\r\n return this;\r\n };\r\n\r\n /**\r\n * Creates a copy of this ByteBuffer's contents. Contents are the bytes between {@link ByteBuffer#offset} and\r\n * {@link ByteBuffer#limit}.\r\n * @param {number=} begin Begin offset, defaults to {@link ByteBuffer#offset}.\r\n * @param {number=} end End offset, defaults to {@link ByteBuffer#limit}.\r\n * @returns {!ByteBuffer} Copy\r\n * @expose\r\n */\r\n ByteBufferPrototype.copy = function(begin, end) {\r\n if (typeof begin === 'undefined') begin = this.offset;\r\n if (typeof end === 'undefined') end = this.limit;\r\n if (!this.noAssert) {\r\n if (typeof begin !== 'number' || begin % 1 !== 0)\n throw TypeError(\"Illegal begin: Not an integer\");\n begin >>>= 0;\n if (typeof end !== 'number' || end % 1 !== 0)\n throw TypeError(\"Illegal end: Not an integer\");\n end >>>= 0;\n if (begin < 0 || begin > end || end > this.buffer.byteLength)\n throw RangeError(\"Illegal range: 0 <= \"+begin+\" <= \"+end+\" <= \"+this.buffer.byteLength);\n }\r\n if (begin === end)\r\n return new ByteBuffer(0, this.littleEndian, this.noAssert);\r\n var capacity = end - begin,\r\n bb = new ByteBuffer(capacity, this.littleEndian, this.noAssert);\r\n bb.offset = 0;\r\n bb.limit = capacity;\r\n if (bb.markedOffset >= 0) bb.markedOffset -= begin;\r\n this.copyTo(bb, 0, begin, end);\r\n return bb;\r\n };\r\n\r\n /**\r\n * Copies this ByteBuffer's contents to another ByteBuffer. Contents are the bytes between {@link ByteBuffer#offset} and\r\n * {@link ByteBuffer#limit}.\r\n * @param {!ByteBuffer} target Target ByteBuffer\r\n * @param {number=} targetOffset Offset to copy to. Will use and increase the target's {@link ByteBuffer#offset}\r\n * by the number of bytes copied if omitted.\r\n * @param {number=} sourceOffset Offset to start copying from. Will use and increase {@link ByteBuffer#offset} by the\r\n * number of bytes copied if omitted.\r\n * @param {number=} sourceLimit Offset to end copying from, defaults to {@link ByteBuffer#limit}\r\n * @returns {!ByteBuffer} this\r\n * @expose\r\n */\r\n ByteBufferPrototype.copyTo = function(target, targetOffset, sourceOffset, sourceLimit) {\r\n var relative,\r\n targetRelative;\r\n if (!this.noAssert) {\r\n if (!ByteBuffer.isByteBuffer(target))\r\n throw TypeError(\"Illegal target: Not a ByteBuffer\");\r\n }\r\n targetOffset = (targetRelative = typeof targetOffset === 'undefined') ? target.offset : targetOffset | 0;\r\n sourceOffset = (relative = typeof sourceOffset === 'undefined') ? this.offset : sourceOffset | 0;\r\n sourceLimit = typeof sourceLimit === 'undefined' ? this.limit : sourceLimit | 0;\r\n\r\n if (targetOffset < 0 || targetOffset > target.buffer.byteLength)\r\n throw RangeError(\"Illegal target range: 0 <= \"+targetOffset+\" <= \"+target.buffer.byteLength);\r\n if (sourceOffset < 0 || sourceLimit > this.buffer.byteLength)\r\n throw RangeError(\"Illegal source range: 0 <= \"+sourceOffset+\" <= \"+this.buffer.byteLength);\r\n\r\n var len = sourceLimit - sourceOffset;\r\n if (len === 0)\r\n return target; // Nothing to copy\r\n\r\n target.ensureCapacity(targetOffset + len);\r\n\r\n target.view.set(this.view.subarray(sourceOffset, sourceLimit), targetOffset);\r\n\r\n if (relative) this.offset += len;\r\n if (targetRelative) target.offset += len;\r\n\r\n return this;\r\n };\r\n\r\n /**\r\n * Makes sure that this ByteBuffer is backed by a {@link ByteBuffer#buffer} of at least the specified capacity. If the\r\n * current capacity is exceeded, it will be doubled. If double the current capacity is less than the required capacity,\r\n * the required capacity will be used instead.\r\n * @param {number} capacity Required capacity\r\n * @returns {!ByteBuffer} this\r\n * @expose\r\n */\r\n ByteBufferPrototype.ensureCapacity = function(capacity) {\r\n var current = this.buffer.byteLength;\r\n if (current < capacity)\r\n return this.resize((current *= 2) > capacity ? current : capacity);\r\n return this;\r\n };\r\n\r\n /**\r\n * Overwrites this ByteBuffer's contents with the specified value. Contents are the bytes between\r\n * {@link ByteBuffer#offset} and {@link ByteBuffer#limit}.\r\n * @param {number|string} value Byte value to fill with. If given as a string, the first character is used.\r\n * @param {number=} begin Begin offset. Will use and increase {@link ByteBuffer#offset} by the number of bytes\r\n * written if omitted. defaults to {@link ByteBuffer#offset}.\r\n * @param {number=} end End offset, defaults to {@link ByteBuffer#limit}.\r\n * @returns {!ByteBuffer} this\r\n * @expose\r\n * @example `someByteBuffer.clear().fill(0)` fills the entire backing buffer with zeroes\r\n */\r\n ByteBufferPrototype.fill = function(value, begin, end) {\r\n var relative = typeof begin === 'undefined';\n if (relative) begin = this.offset;\n if (typeof value === 'string' && value.length > 0)\r\n value = value.charCodeAt(0);\r\n if (typeof begin === 'undefined') begin = this.offset;\r\n if (typeof end === 'undefined') end = this.limit;\r\n if (!this.noAssert) {\r\n if (typeof value !== 'number' || value % 1 !== 0)\n throw TypeError(\"Illegal value: \"+value+\" (not an integer)\");\n value |= 0;\n if (typeof begin !== 'number' || begin % 1 !== 0)\n throw TypeError(\"Illegal begin: Not an integer\");\n begin >>>= 0;\n if (typeof end !== 'number' || end % 1 !== 0)\n throw TypeError(\"Illegal end: Not an integer\");\n end >>>= 0;\n if (begin < 0 || begin > end || end > this.buffer.byteLength)\n throw RangeError(\"Illegal range: 0 <= \"+begin+\" <= \"+end+\" <= \"+this.buffer.byteLength);\n }\r\n if (begin >= end)\r\n return this; // Nothing to fill\r\n while (begin < end) this.view[begin++] = value;\r\n if (relative) this.offset = begin;\r\n return this;\r\n };\r\n\r\n /**\r\n * Makes this ByteBuffer ready for a new sequence of write or relative read operations. Sets `limit = offset` and\r\n * `offset = 0`. Make sure always to flip a ByteBuffer when all relative read or write operations are complete.\r\n * @returns {!ByteBuffer} this\r\n * @expose\r\n */\r\n ByteBufferPrototype.flip = function() {\r\n this.limit = this.offset;\r\n this.offset = 0;\r\n return this;\r\n };\r\n /**\r\n * Marks an offset on this ByteBuffer to be used later.\r\n * @param {number=} offset Offset to mark. Defaults to {@link ByteBuffer#offset}.\r\n * @returns {!ByteBuffer} this\r\n * @throws {TypeError} If `offset` is not a valid number\r\n * @throws {RangeError} If `offset` is out of bounds\r\n * @see ByteBuffer#reset\r\n * @expose\r\n */\r\n ByteBufferPrototype.mark = function(offset) {\r\n offset = typeof offset === 'undefined' ? this.offset : offset;\r\n if (!this.noAssert) {\r\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 0 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n }\r\n this.markedOffset = offset;\r\n return this;\r\n };\r\n /**\r\n * Sets the byte order.\r\n * @param {boolean} littleEndian `true` for little endian byte order, `false` for big endian\r\n * @returns {!ByteBuffer} this\r\n * @expose\r\n */\r\n ByteBufferPrototype.order = function(littleEndian) {\r\n if (!this.noAssert) {\r\n if (typeof littleEndian !== 'boolean')\r\n throw TypeError(\"Illegal littleEndian: Not a boolean\");\r\n }\r\n this.littleEndian = !!littleEndian;\r\n return this;\r\n };\r\n\r\n /**\r\n * Switches (to) little endian byte order.\r\n * @param {boolean=} littleEndian Defaults to `true`, otherwise uses big endian\r\n * @returns {!ByteBuffer} this\r\n * @expose\r\n */\r\n ByteBufferPrototype.LE = function(littleEndian) {\r\n this.littleEndian = typeof littleEndian !== 'undefined' ? !!littleEndian : true;\r\n return this;\r\n };\r\n\r\n /**\r\n * Switches (to) big endian byte order.\r\n * @param {boolean=} bigEndian Defaults to `true`, otherwise uses little endian\r\n * @returns {!ByteBuffer} this\r\n * @expose\r\n */\r\n ByteBufferPrototype.BE = function(bigEndian) {\r\n this.littleEndian = typeof bigEndian !== 'undefined' ? !bigEndian : false;\r\n return this;\r\n };\r\n /**\r\n * Prepends some data to this ByteBuffer. This will overwrite any contents before the specified offset up to the\r\n * prepended data's length. If there is not enough space available before the specified `offset`, the backing buffer\r\n * will be resized and its contents moved accordingly.\r\n * @param {!ByteBuffer|string|!ArrayBuffer} source Data to prepend. If `source` is a ByteBuffer, its offset will be\r\n * modified according to the performed read operation.\r\n * @param {(string|number)=} encoding Encoding if `data` is a string (\"base64\", \"hex\", \"binary\", defaults to \"utf8\")\r\n * @param {number=} offset Offset to prepend at. Will use and decrease {@link ByteBuffer#offset} by the number of bytes\r\n * prepended if omitted.\r\n * @returns {!ByteBuffer} this\r\n * @expose\r\n * @example A relative `00<01 02 03>.prepend(<04 05>)` results in `<04 05 01 02 03>, 04 05|`\r\n * @example An absolute `00<01 02 03>.prepend(<04 05>, 2)` results in `04<05 02 03>, 04 05|`\r\n */\r\n ByteBufferPrototype.prepend = function(source, encoding, offset) {\r\n if (typeof encoding === 'number' || typeof encoding !== 'string') {\r\n offset = encoding;\r\n encoding = undefined;\r\n }\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 0 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n }\r\n if (!(source instanceof ByteBuffer))\r\n source = ByteBuffer.wrap(source, encoding);\r\n var len = source.limit - source.offset;\r\n if (len <= 0) return this; // Nothing to prepend\r\n var diff = len - offset;\r\n if (diff > 0) { // Not enough space before offset, so resize + move\r\n var buffer = new ArrayBuffer(this.buffer.byteLength + diff);\r\n var view = new Uint8Array(buffer);\r\n view.set(this.view.subarray(offset, this.buffer.byteLength), len);\r\n this.buffer = buffer;\r\n this.view = view;\r\n this.offset += diff;\r\n if (this.markedOffset >= 0) this.markedOffset += diff;\r\n this.limit += diff;\r\n offset += diff;\r\n } else {\r\n var arrayView = new Uint8Array(this.buffer);\r\n }\r\n this.view.set(source.view.subarray(source.offset, source.limit), offset - len);\r\n\r\n source.offset = source.limit;\r\n if (relative)\r\n this.offset -= len;\r\n return this;\r\n };\r\n\r\n /**\r\n * Prepends this ByteBuffer to another ByteBuffer. This will overwrite any contents before the specified offset up to the\r\n * prepended data's length. If there is not enough space available before the specified `offset`, the backing buffer\r\n * will be resized and its contents moved accordingly.\r\n * @param {!ByteBuffer} target Target ByteBuffer\r\n * @param {number=} offset Offset to prepend at. Will use and decrease {@link ByteBuffer#offset} by the number of bytes\r\n * prepended if omitted.\r\n * @returns {!ByteBuffer} this\r\n * @expose\r\n * @see ByteBuffer#prepend\r\n */\r\n ByteBufferPrototype.prependTo = function(target, offset) {\r\n target.prepend(this, offset);\r\n return this;\r\n };\r\n /**\r\n * Prints debug information about this ByteBuffer's contents.\r\n * @param {function(string)=} out Output function to call, defaults to console.log\r\n * @expose\r\n */\r\n ByteBufferPrototype.printDebug = function(out) {\r\n if (typeof out !== 'function') out = console.log.bind(console);\r\n out(\r\n this.toString()+\"\\n\"+\r\n \"-------------------------------------------------------------------\\n\"+\r\n this.toDebug(/* columns */ true)\r\n );\r\n };\r\n\r\n /**\r\n * Gets the number of remaining readable bytes. Contents are the bytes between {@link ByteBuffer#offset} and\r\n * {@link ByteBuffer#limit}, so this returns `limit - offset`.\r\n * @returns {number} Remaining readable bytes. May be negative if `offset > limit`.\r\n * @expose\r\n */\r\n ByteBufferPrototype.remaining = function() {\r\n return this.limit - this.offset;\r\n };\r\n /**\r\n * Resets this ByteBuffer's {@link ByteBuffer#offset}. If an offset has been marked through {@link ByteBuffer#mark}\r\n * before, `offset` will be set to {@link ByteBuffer#markedOffset}, which will then be discarded. If no offset has been\r\n * marked, sets `offset = 0`.\r\n * @returns {!ByteBuffer} this\r\n * @see ByteBuffer#mark\r\n * @expose\r\n */\r\n ByteBufferPrototype.reset = function() {\r\n if (this.markedOffset >= 0) {\r\n this.offset = this.markedOffset;\r\n this.markedOffset = -1;\r\n } else {\r\n this.offset = 0;\r\n }\r\n return this;\r\n };\r\n /**\r\n * Resizes this ByteBuffer to be backed by a buffer of at least the given capacity. Will do nothing if already that\r\n * large or larger.\r\n * @param {number} capacity Capacity required\r\n * @returns {!ByteBuffer} this\r\n * @throws {TypeError} If `capacity` is not a number\r\n * @throws {RangeError} If `capacity < 0`\r\n * @expose\r\n */\r\n ByteBufferPrototype.resize = function(capacity) {\r\n if (!this.noAssert) {\r\n if (typeof capacity !== 'number' || capacity % 1 !== 0)\n throw TypeError(\"Illegal capacity: \"+capacity+\" (not an integer)\");\n capacity |= 0;\n if (capacity < 0)\r\n throw RangeError(\"Illegal capacity: 0 <= \"+capacity);\r\n }\r\n if (this.buffer.byteLength < capacity) {\r\n var buffer = new ArrayBuffer(capacity);\r\n var view = new Uint8Array(buffer);\r\n view.set(this.view);\r\n this.buffer = buffer;\r\n this.view = view;\r\n }\r\n return this;\r\n };\r\n /**\r\n * Reverses this ByteBuffer's contents.\r\n * @param {number=} begin Offset to start at, defaults to {@link ByteBuffer#offset}\r\n * @param {number=} end Offset to end at, defaults to {@link ByteBuffer#limit}\r\n * @returns {!ByteBuffer} this\r\n * @expose\r\n */\r\n ByteBufferPrototype.reverse = function(begin, end) {\r\n if (typeof begin === 'undefined') begin = this.offset;\r\n if (typeof end === 'undefined') end = this.limit;\r\n if (!this.noAssert) {\r\n if (typeof begin !== 'number' || begin % 1 !== 0)\n throw TypeError(\"Illegal begin: Not an integer\");\n begin >>>= 0;\n if (typeof end !== 'number' || end % 1 !== 0)\n throw TypeError(\"Illegal end: Not an integer\");\n end >>>= 0;\n if (begin < 0 || begin > end || end > this.buffer.byteLength)\n throw RangeError(\"Illegal range: 0 <= \"+begin+\" <= \"+end+\" <= \"+this.buffer.byteLength);\n }\r\n if (begin === end)\r\n return this; // Nothing to reverse\r\n Array.prototype.reverse.call(this.view.subarray(begin, end));\r\n return this;\r\n };\r\n /**\r\n * Skips the next `length` bytes. This will just advance\r\n * @param {number} length Number of bytes to skip. May also be negative to move the offset back.\r\n * @returns {!ByteBuffer} this\r\n * @expose\r\n */\r\n ByteBufferPrototype.skip = function(length) {\r\n if (!this.noAssert) {\r\n if (typeof length !== 'number' || length % 1 !== 0)\n throw TypeError(\"Illegal length: \"+length+\" (not an integer)\");\n length |= 0;\n }\r\n var offset = this.offset + length;\r\n if (!this.noAssert) {\r\n if (offset < 0 || offset > this.buffer.byteLength)\r\n throw RangeError(\"Illegal length: 0 <= \"+this.offset+\" + \"+length+\" <= \"+this.buffer.byteLength);\r\n }\r\n this.offset = offset;\r\n return this;\r\n };\r\n\r\n /**\r\n * Slices this ByteBuffer by creating a cloned instance with `offset = begin` and `limit = end`.\r\n * @param {number=} begin Begin offset, defaults to {@link ByteBuffer#offset}.\r\n * @param {number=} end End offset, defaults to {@link ByteBuffer#limit}.\r\n * @returns {!ByteBuffer} Clone of this ByteBuffer with slicing applied, backed by the same {@link ByteBuffer#buffer}\r\n * @expose\r\n */\r\n ByteBufferPrototype.slice = function(begin, end) {\r\n if (typeof begin === 'undefined') begin = this.offset;\r\n if (typeof end === 'undefined') end = this.limit;\r\n if (!this.noAssert) {\r\n if (typeof begin !== 'number' || begin % 1 !== 0)\n throw TypeError(\"Illegal begin: Not an integer\");\n begin >>>= 0;\n if (typeof end !== 'number' || end % 1 !== 0)\n throw TypeError(\"Illegal end: Not an integer\");\n end >>>= 0;\n if (begin < 0 || begin > end || end > this.buffer.byteLength)\n throw RangeError(\"Illegal range: 0 <= \"+begin+\" <= \"+end+\" <= \"+this.buffer.byteLength);\n }\r\n var bb = this.clone();\r\n bb.offset = begin;\r\n bb.limit = end;\r\n return bb;\r\n };\r\n /**\r\n * Returns a copy of the backing buffer that contains this ByteBuffer's contents. Contents are the bytes between\r\n * {@link ByteBuffer#offset} and {@link ByteBuffer#limit}.\r\n * @param {boolean=} forceCopy If `true` returns a copy, otherwise returns a view referencing the same memory if\r\n * possible. Defaults to `false`\r\n * @returns {!ArrayBuffer} Contents as an ArrayBuffer\r\n * @expose\r\n */\r\n ByteBufferPrototype.toBuffer = function(forceCopy) {\r\n var offset = this.offset,\r\n limit = this.limit;\r\n if (!this.noAssert) {\r\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: Not an integer\");\n offset >>>= 0;\n if (typeof limit !== 'number' || limit % 1 !== 0)\n throw TypeError(\"Illegal limit: Not an integer\");\n limit >>>= 0;\n if (offset < 0 || offset > limit || limit > this.buffer.byteLength)\n throw RangeError(\"Illegal range: 0 <= \"+offset+\" <= \"+limit+\" <= \"+this.buffer.byteLength);\n }\r\n // NOTE: It's not possible to have another ArrayBuffer reference the same memory as the backing buffer. This is\r\n // possible with Uint8Array#subarray only, but we have to return an ArrayBuffer by contract. So:\r\n if (!forceCopy && offset === 0 && limit === this.buffer.byteLength)\r\n return this.buffer;\r\n if (offset === limit)\r\n return EMPTY_BUFFER;\r\n var buffer = new ArrayBuffer(limit - offset);\r\n new Uint8Array(buffer).set(new Uint8Array(this.buffer).subarray(offset, limit), 0);\r\n return buffer;\r\n };\r\n\r\n /**\r\n * Returns a raw buffer compacted to contain this ByteBuffer's contents. Contents are the bytes between\r\n * {@link ByteBuffer#offset} and {@link ByteBuffer#limit}. This is an alias of {@link ByteBuffer#toBuffer}.\r\n * @function\r\n * @param {boolean=} forceCopy If `true` returns a copy, otherwise returns a view referencing the same memory.\r\n * Defaults to `false`\r\n * @returns {!ArrayBuffer} Contents as an ArrayBuffer\r\n * @expose\r\n */\r\n ByteBufferPrototype.toArrayBuffer = ByteBufferPrototype.toBuffer;\r\n\r\n /**\r\n * Converts the ByteBuffer's contents to a string.\r\n * @param {string=} encoding Output encoding. Returns an informative string representation if omitted but also allows\r\n * direct conversion to \"utf8\", \"hex\", \"base64\" and \"binary\" encoding. \"debug\" returns a hex representation with\r\n * highlighted offsets.\r\n * @param {number=} begin Offset to begin at, defaults to {@link ByteBuffer#offset}\r\n * @param {number=} end Offset to end at, defaults to {@link ByteBuffer#limit}\r\n * @returns {string} String representation\r\n * @throws {Error} If `encoding` is invalid\r\n * @expose\r\n */\r\n ByteBufferPrototype.toString = function(encoding, begin, end) {\r\n if (typeof encoding === 'undefined')\r\n return \"ByteBufferAB(offset=\"+this.offset+\",markedOffset=\"+this.markedOffset+\",limit=\"+this.limit+\",capacity=\"+this.capacity()+\")\";\r\n if (typeof encoding === 'number')\r\n encoding = \"utf8\",\r\n begin = encoding,\r\n end = begin;\r\n switch (encoding) {\r\n case \"utf8\":\r\n return this.toUTF8(begin, end);\r\n case \"base64\":\r\n return this.toBase64(begin, end);\r\n case \"hex\":\r\n return this.toHex(begin, end);\r\n case \"binary\":\r\n return this.toBinary(begin, end);\r\n case \"debug\":\r\n return this.toDebug();\r\n case \"columns\":\r\n return this.toColumns();\r\n default:\r\n throw Error(\"Unsupported encoding: \"+encoding);\r\n }\r\n };\r\n\r\n // lxiv-embeddable\r\n\r\n /**\r\n * lxiv-embeddable (c) 2014 Daniel Wirtz \r\n * Released under the Apache License, Version 2.0\r\n * see: https://github.com/dcodeIO/lxiv for details\r\n */\r\n var lxiv = function() {\r\n \"use strict\";\r\n\r\n /**\r\n * lxiv namespace.\r\n * @type {!Object.}\r\n * @exports lxiv\r\n */\r\n var lxiv = {};\r\n\r\n /**\r\n * Character codes for output.\r\n * @type {!Array.}\r\n * @inner\r\n */\r\n var aout = [\r\n 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,\r\n 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 97, 98, 99, 100, 101, 102,\r\n 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,\r\n 119, 120, 121, 122, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 43, 47\r\n ];\r\n\r\n /**\r\n * Character codes for input.\r\n * @type {!Array.}\r\n * @inner\r\n */\r\n var ain = [];\r\n for (var i=0, k=aout.length; i>2)&0x3f]);\r\n t = (b&0x3)<<4;\r\n if ((b = src()) !== null) {\r\n t |= (b>>4)&0xf;\r\n dst(aout[(t|((b>>4)&0xf))&0x3f]);\r\n t = (b&0xf)<<2;\r\n if ((b = src()) !== null)\r\n dst(aout[(t|((b>>6)&0x3))&0x3f]),\r\n dst(aout[b&0x3f]);\r\n else\r\n dst(aout[t&0x3f]),\r\n dst(61);\r\n } else\r\n dst(aout[t&0x3f]),\r\n dst(61),\r\n dst(61);\r\n }\r\n };\r\n\r\n /**\r\n * Decodes base64 char codes to bytes.\r\n * @param {!function():number|null} src Characters source as a function returning the next char code respectively\r\n * `null` if there are no more characters left.\r\n * @param {!function(number)} dst Bytes destination as a function successively called with the next byte.\r\n * @throws {Error} If a character code is invalid\r\n */\r\n lxiv.decode = function(src, dst) {\r\n var c, t1, t2;\r\n function fail(c) {\r\n throw Error(\"Illegal character code: \"+c);\r\n }\r\n while ((c = src()) !== null) {\r\n t1 = ain[c];\r\n if (typeof t1 === 'undefined') fail(c);\r\n if ((c = src()) !== null) {\r\n t2 = ain[c];\r\n if (typeof t2 === 'undefined') fail(c);\r\n dst((t1<<2)>>>0|(t2&0x30)>>4);\r\n if ((c = src()) !== null) {\r\n t1 = ain[c];\r\n if (typeof t1 === 'undefined')\r\n if (c === 61) break; else fail(c);\r\n dst(((t2&0xf)<<4)>>>0|(t1&0x3c)>>2);\r\n if ((c = src()) !== null) {\r\n t2 = ain[c];\r\n if (typeof t2 === 'undefined')\r\n if (c === 61) break; else fail(c);\r\n dst(((t1&0x3)<<6)>>>0|t2);\r\n }\r\n }\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Tests if a string is valid base64.\r\n * @param {string} str String to test\r\n * @returns {boolean} `true` if valid, otherwise `false`\r\n */\r\n lxiv.test = function(str) {\r\n return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(str);\r\n };\r\n\r\n return lxiv;\r\n }();\r\n\r\n // encodings/base64\r\n\r\n /**\r\n * Encodes this ByteBuffer's contents to a base64 encoded string.\r\n * @param {number=} begin Offset to begin at, defaults to {@link ByteBuffer#offset}.\r\n * @param {number=} end Offset to end at, defaults to {@link ByteBuffer#limit}.\r\n * @returns {string} Base64 encoded string\r\n * @throws {RangeError} If `begin` or `end` is out of bounds\r\n * @expose\r\n */\r\n ByteBufferPrototype.toBase64 = function(begin, end) {\r\n if (typeof begin === 'undefined')\r\n begin = this.offset;\r\n if (typeof end === 'undefined')\r\n end = this.limit;\r\n begin = begin | 0; end = end | 0;\r\n if (begin < 0 || end > this.capacity || begin > end)\r\n throw RangeError(\"begin, end\");\r\n var sd; lxiv.encode(function() {\r\n return begin < end ? this.view[begin++] : null;\r\n }.bind(this), sd = stringDestination());\r\n return sd();\r\n };\r\n\r\n /**\r\n * Decodes a base64 encoded string to a ByteBuffer.\r\n * @param {string} str String to decode\r\n * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to\r\n * {@link ByteBuffer.DEFAULT_ENDIAN}.\r\n * @returns {!ByteBuffer} ByteBuffer\r\n * @expose\r\n */\r\n ByteBuffer.fromBase64 = function(str, littleEndian) {\r\n if (typeof str !== 'string')\r\n throw TypeError(\"str\");\r\n var bb = new ByteBuffer(str.length/4*3, littleEndian),\r\n i = 0;\r\n lxiv.decode(stringSource(str), function(b) {\r\n bb.view[i++] = b;\r\n });\r\n bb.limit = i;\r\n return bb;\r\n };\r\n\r\n /**\r\n * Encodes a binary string to base64 like `window.btoa` does.\r\n * @param {string} str Binary string\r\n * @returns {string} Base64 encoded string\r\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Window.btoa\r\n * @expose\r\n */\r\n ByteBuffer.btoa = function(str) {\r\n return ByteBuffer.fromBinary(str).toBase64();\r\n };\r\n\r\n /**\r\n * Decodes a base64 encoded string to binary like `window.atob` does.\r\n * @param {string} b64 Base64 encoded string\r\n * @returns {string} Binary string\r\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Window.atob\r\n * @expose\r\n */\r\n ByteBuffer.atob = function(b64) {\r\n return ByteBuffer.fromBase64(b64).toBinary();\r\n };\r\n\r\n // encodings/binary\r\n\r\n /**\r\n * Encodes this ByteBuffer to a binary encoded string, that is using only characters 0x00-0xFF as bytes.\r\n * @param {number=} begin Offset to begin at. Defaults to {@link ByteBuffer#offset}.\r\n * @param {number=} end Offset to end at. Defaults to {@link ByteBuffer#limit}.\r\n * @returns {string} Binary encoded string\r\n * @throws {RangeError} If `offset > limit`\r\n * @expose\r\n */\r\n ByteBufferPrototype.toBinary = function(begin, end) {\r\n if (typeof begin === 'undefined')\r\n begin = this.offset;\r\n if (typeof end === 'undefined')\r\n end = this.limit;\r\n begin |= 0; end |= 0;\r\n if (begin < 0 || end > this.capacity() || begin > end)\r\n throw RangeError(\"begin, end\");\r\n if (begin === end)\r\n return \"\";\r\n var chars = [],\r\n parts = [];\r\n while (begin < end) {\r\n chars.push(this.view[begin++]);\r\n if (chars.length >= 1024)\r\n parts.push(String.fromCharCode.apply(String, chars)),\r\n chars = [];\r\n }\r\n return parts.join('') + String.fromCharCode.apply(String, chars);\r\n };\r\n\r\n /**\r\n * Decodes a binary encoded string, that is using only characters 0x00-0xFF as bytes, to a ByteBuffer.\r\n * @param {string} str String to decode\r\n * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to\r\n * {@link ByteBuffer.DEFAULT_ENDIAN}.\r\n * @returns {!ByteBuffer} ByteBuffer\r\n * @expose\r\n */\r\n ByteBuffer.fromBinary = function(str, littleEndian) {\r\n if (typeof str !== 'string')\r\n throw TypeError(\"str\");\r\n var i = 0,\r\n k = str.length,\r\n charCode,\r\n bb = new ByteBuffer(k, littleEndian);\r\n while (i 0xff)\r\n throw RangeError(\"illegal char code: \"+charCode);\r\n bb.view[i++] = charCode;\r\n }\r\n bb.limit = k;\r\n return bb;\r\n };\r\n\r\n // encodings/debug\r\n\r\n /**\r\n * Encodes this ByteBuffer to a hex encoded string with marked offsets. Offset symbols are:\r\n * * `<` : offset,\r\n * * `'` : markedOffset,\r\n * * `>` : limit,\r\n * * `|` : offset and limit,\r\n * * `[` : offset and markedOffset,\r\n * * `]` : markedOffset and limit,\r\n * * `!` : offset, markedOffset and limit\r\n * @param {boolean=} columns If `true` returns two columns hex + ascii, defaults to `false`\r\n * @returns {string|!Array.} Debug string or array of lines if `asArray = true`\r\n * @expose\r\n * @example `>00'01 02<03` contains four bytes with `limit=0, markedOffset=1, offset=3`\r\n * @example `00[01 02 03>` contains four bytes with `offset=markedOffset=1, limit=4`\r\n * @example `00|01 02 03` contains four bytes with `offset=limit=1, markedOffset=-1`\r\n * @example `|` contains zero bytes with `offset=limit=0, markedOffset=-1`\r\n */\r\n ByteBufferPrototype.toDebug = function(columns) {\r\n var i = -1,\r\n k = this.buffer.byteLength,\r\n b,\r\n hex = \"\",\r\n asc = \"\",\r\n out = \"\";\r\n while (i 32 && b < 127 ? String.fromCharCode(b) : '.';\r\n }\r\n ++i;\r\n if (columns) {\r\n if (i > 0 && i % 16 === 0 && i !== k) {\r\n while (hex.length < 3*16+3) hex += \" \";\r\n out += hex+asc+\"\\n\";\r\n hex = asc = \"\";\r\n }\r\n }\r\n if (i === this.offset && i === this.limit)\r\n hex += i === this.markedOffset ? \"!\" : \"|\";\r\n else if (i === this.offset)\r\n hex += i === this.markedOffset ? \"[\" : \"<\";\r\n else if (i === this.limit)\r\n hex += i === this.markedOffset ? \"]\" : \">\";\r\n else\r\n hex += i === this.markedOffset ? \"'\" : (columns || (i !== 0 && i !== k) ? \" \" : \"\");\r\n }\r\n if (columns && hex !== \" \") {\r\n while (hex.length < 3*16+3)\r\n hex += \" \";\r\n out += hex + asc + \"\\n\";\r\n }\r\n return columns ? out : hex;\r\n };\r\n\r\n /**\r\n * Decodes a hex encoded string with marked offsets to a ByteBuffer.\r\n * @param {string} str Debug string to decode (not be generated with `columns = true`)\r\n * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to\r\n * {@link ByteBuffer.DEFAULT_ENDIAN}.\r\n * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to\r\n * {@link ByteBuffer.DEFAULT_NOASSERT}.\r\n * @returns {!ByteBuffer} ByteBuffer\r\n * @expose\r\n * @see ByteBuffer#toDebug\r\n */\r\n ByteBuffer.fromDebug = function(str, littleEndian, noAssert) {\r\n var k = str.length,\r\n bb = new ByteBuffer(((k+1)/3)|0, littleEndian, noAssert);\r\n var i = 0, j = 0, ch, b,\r\n rs = false, // Require symbol next\r\n ho = false, hm = false, hl = false, // Already has offset (ho), markedOffset (hm), limit (hl)?\r\n fail = false;\r\n while (i':\r\n if (!noAssert) {\r\n if (hl) {\r\n fail = true;\r\n break;\r\n }\r\n hl = true;\r\n }\r\n bb.limit = j;\r\n rs = false;\r\n break;\r\n case \"'\":\r\n if (!noAssert) {\r\n if (hm) {\r\n fail = true;\r\n break;\r\n }\r\n hm = true;\r\n }\r\n bb.markedOffset = j;\r\n rs = false;\r\n break;\r\n case ' ':\r\n rs = false;\r\n break;\r\n default:\r\n if (!noAssert) {\r\n if (rs) {\r\n fail = true;\r\n break;\r\n }\r\n }\r\n b = parseInt(ch+str.charAt(i++), 16);\r\n if (!noAssert) {\r\n if (isNaN(b) || b < 0 || b > 255)\r\n throw TypeError(\"Illegal str: Not a debug encoded string\");\r\n }\r\n bb.view[j++] = b;\r\n rs = true;\r\n }\r\n if (fail)\r\n throw TypeError(\"Illegal str: Invalid symbol at \"+i);\r\n }\r\n if (!noAssert) {\r\n if (!ho || !hl)\r\n throw TypeError(\"Illegal str: Missing offset or limit\");\r\n if (j>>= 0;\n if (typeof end !== 'number' || end % 1 !== 0)\n throw TypeError(\"Illegal end: Not an integer\");\n end >>>= 0;\n if (begin < 0 || begin > end || end > this.buffer.byteLength)\n throw RangeError(\"Illegal range: 0 <= \"+begin+\" <= \"+end+\" <= \"+this.buffer.byteLength);\n }\r\n var out = new Array(end - begin),\r\n b;\r\n while (begin < end) {\r\n b = this.view[begin++];\r\n if (b < 0x10)\r\n out.push(\"0\", b.toString(16));\r\n else out.push(b.toString(16));\r\n }\r\n return out.join('');\r\n };\r\n\r\n /**\r\n * Decodes a hex encoded string to a ByteBuffer.\r\n * @param {string} str String to decode\r\n * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to\r\n * {@link ByteBuffer.DEFAULT_ENDIAN}.\r\n * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to\r\n * {@link ByteBuffer.DEFAULT_NOASSERT}.\r\n * @returns {!ByteBuffer} ByteBuffer\r\n * @expose\r\n */\r\n ByteBuffer.fromHex = function(str, littleEndian, noAssert) {\r\n if (!noAssert) {\r\n if (typeof str !== 'string')\r\n throw TypeError(\"Illegal str: Not a string\");\r\n if (str.length % 2 !== 0)\r\n throw TypeError(\"Illegal str: Length not a multiple of 2\");\r\n }\r\n var k = str.length,\r\n bb = new ByteBuffer((k / 2) | 0, littleEndian),\r\n b;\r\n for (var i=0, j=0; i 255)\r\n throw TypeError(\"Illegal str: Contains non-hex characters\");\r\n bb.view[j++] = b;\r\n }\r\n bb.limit = j;\r\n return bb;\r\n };\r\n\r\n // utfx-embeddable\r\n\r\n /**\r\n * utfx-embeddable (c) 2014 Daniel Wirtz \r\n * Released under the Apache License, Version 2.0\r\n * see: https://github.com/dcodeIO/utfx for details\r\n */\r\n var utfx = function() {\r\n \"use strict\";\r\n\r\n /**\r\n * utfx namespace.\r\n * @inner\r\n * @type {!Object.}\r\n */\r\n var utfx = {};\r\n\r\n /**\r\n * Maximum valid code point.\r\n * @type {number}\r\n * @const\r\n */\r\n utfx.MAX_CODEPOINT = 0x10FFFF;\r\n\r\n /**\r\n * Encodes UTF8 code points to UTF8 bytes.\r\n * @param {(!function():number|null) | number} src Code points source, either as a function returning the next code point\r\n * respectively `null` if there are no more code points left or a single numeric code point.\r\n * @param {!function(number)} dst Bytes destination as a function successively called with the next byte\r\n */\r\n utfx.encodeUTF8 = function(src, dst) {\r\n var cp = null;\r\n if (typeof src === 'number')\r\n cp = src,\r\n src = function() { return null; };\r\n while (cp !== null || (cp = src()) !== null) {\r\n if (cp < 0x80)\r\n dst(cp&0x7F);\r\n else if (cp < 0x800)\r\n dst(((cp>>6)&0x1F)|0xC0),\r\n dst((cp&0x3F)|0x80);\r\n else if (cp < 0x10000)\r\n dst(((cp>>12)&0x0F)|0xE0),\r\n dst(((cp>>6)&0x3F)|0x80),\r\n dst((cp&0x3F)|0x80);\r\n else\r\n dst(((cp>>18)&0x07)|0xF0),\r\n dst(((cp>>12)&0x3F)|0x80),\r\n dst(((cp>>6)&0x3F)|0x80),\r\n dst((cp&0x3F)|0x80);\r\n cp = null;\r\n }\r\n };\r\n\r\n /**\r\n * Decodes UTF8 bytes to UTF8 code points.\r\n * @param {!function():number|null} src Bytes source as a function returning the next byte respectively `null` if there\r\n * are no more bytes left.\r\n * @param {!function(number)} dst Code points destination as a function successively called with each decoded code point.\r\n * @throws {RangeError} If a starting byte is invalid in UTF8\r\n * @throws {Error} If the last sequence is truncated. Has an array property `bytes` holding the\r\n * remaining bytes.\r\n */\r\n utfx.decodeUTF8 = function(src, dst) {\r\n var a, b, c, d, fail = function(b) {\r\n b = b.slice(0, b.indexOf(null));\r\n var err = Error(b.toString());\r\n err.name = \"TruncatedError\";\r\n err['bytes'] = b;\r\n throw err;\r\n };\r\n while ((a = src()) !== null) {\r\n if ((a&0x80) === 0)\r\n dst(a);\r\n else if ((a&0xE0) === 0xC0)\r\n ((b = src()) === null) && fail([a, b]),\r\n dst(((a&0x1F)<<6) | (b&0x3F));\r\n else if ((a&0xF0) === 0xE0)\r\n ((b=src()) === null || (c=src()) === null) && fail([a, b, c]),\r\n dst(((a&0x0F)<<12) | ((b&0x3F)<<6) | (c&0x3F));\r\n else if ((a&0xF8) === 0xF0)\r\n ((b=src()) === null || (c=src()) === null || (d=src()) === null) && fail([a, b, c ,d]),\r\n dst(((a&0x07)<<18) | ((b&0x3F)<<12) | ((c&0x3F)<<6) | (d&0x3F));\r\n else throw RangeError(\"Illegal starting byte: \"+a);\r\n }\r\n };\r\n\r\n /**\r\n * Converts UTF16 characters to UTF8 code points.\r\n * @param {!function():number|null} src Characters source as a function returning the next char code respectively\r\n * `null` if there are no more characters left.\r\n * @param {!function(number)} dst Code points destination as a function successively called with each converted code\r\n * point.\r\n */\r\n utfx.UTF16toUTF8 = function(src, dst) {\r\n var c1, c2 = null;\r\n while (true) {\r\n if ((c1 = c2 !== null ? c2 : src()) === null)\r\n break;\r\n if (c1 >= 0xD800 && c1 <= 0xDFFF) {\r\n if ((c2 = src()) !== null) {\r\n if (c2 >= 0xDC00 && c2 <= 0xDFFF) {\r\n dst((c1-0xD800)*0x400+c2-0xDC00+0x10000);\r\n c2 = null; continue;\r\n }\r\n }\r\n }\r\n dst(c1);\r\n }\r\n if (c2 !== null) dst(c2);\r\n };\r\n\r\n /**\r\n * Converts UTF8 code points to UTF16 characters.\r\n * @param {(!function():number|null) | number} src Code points source, either as a function returning the next code point\r\n * respectively `null` if there are no more code points left or a single numeric code point.\r\n * @param {!function(number)} dst Characters destination as a function successively called with each converted char code.\r\n * @throws {RangeError} If a code point is out of range\r\n */\r\n utfx.UTF8toUTF16 = function(src, dst) {\r\n var cp = null;\r\n if (typeof src === 'number')\r\n cp = src, src = function() { return null; };\r\n while (cp !== null || (cp = src()) !== null) {\r\n if (cp <= 0xFFFF)\r\n dst(cp);\r\n else\r\n cp -= 0x10000,\r\n dst((cp>>10)+0xD800),\r\n dst((cp%0x400)+0xDC00);\r\n cp = null;\r\n }\r\n };\r\n\r\n /**\r\n * Converts and encodes UTF16 characters to UTF8 bytes.\r\n * @param {!function():number|null} src Characters source as a function returning the next char code respectively `null`\r\n * if there are no more characters left.\r\n * @param {!function(number)} dst Bytes destination as a function successively called with the next byte.\r\n */\r\n utfx.encodeUTF16toUTF8 = function(src, dst) {\r\n utfx.UTF16toUTF8(src, function(cp) {\r\n utfx.encodeUTF8(cp, dst);\r\n });\r\n };\r\n\r\n /**\r\n * Decodes and converts UTF8 bytes to UTF16 characters.\r\n * @param {!function():number|null} src Bytes source as a function returning the next byte respectively `null` if there\r\n * are no more bytes left.\r\n * @param {!function(number)} dst Characters destination as a function successively called with each converted char code.\r\n * @throws {RangeError} If a starting byte is invalid in UTF8\r\n * @throws {Error} If the last sequence is truncated. Has an array property `bytes` holding the remaining bytes.\r\n */\r\n utfx.decodeUTF8toUTF16 = function(src, dst) {\r\n utfx.decodeUTF8(src, function(cp) {\r\n utfx.UTF8toUTF16(cp, dst);\r\n });\r\n };\r\n\r\n /**\r\n * Calculates the byte length of an UTF8 code point.\r\n * @param {number} cp UTF8 code point\r\n * @returns {number} Byte length\r\n */\r\n utfx.calculateCodePoint = function(cp) {\r\n return (cp < 0x80) ? 1 : (cp < 0x800) ? 2 : (cp < 0x10000) ? 3 : 4;\r\n };\r\n\r\n /**\r\n * Calculates the number of UTF8 bytes required to store UTF8 code points.\r\n * @param {(!function():number|null)} src Code points source as a function returning the next code point respectively\r\n * `null` if there are no more code points left.\r\n * @returns {number} The number of UTF8 bytes required\r\n */\r\n utfx.calculateUTF8 = function(src) {\r\n var cp, l=0;\r\n while ((cp = src()) !== null)\r\n l += (cp < 0x80) ? 1 : (cp < 0x800) ? 2 : (cp < 0x10000) ? 3 : 4;\r\n return l;\r\n };\r\n\r\n /**\r\n * Calculates the number of UTF8 code points respectively UTF8 bytes required to store UTF16 char codes.\r\n * @param {(!function():number|null)} src Characters source as a function returning the next char code respectively\r\n * `null` if there are no more characters left.\r\n * @returns {!Array.} The number of UTF8 code points at index 0 and the number of UTF8 bytes required at index 1.\r\n */\r\n utfx.calculateUTF16asUTF8 = function(src) {\r\n var n=0, l=0;\r\n utfx.UTF16toUTF8(src, function(cp) {\r\n ++n; l += (cp < 0x80) ? 1 : (cp < 0x800) ? 2 : (cp < 0x10000) ? 3 : 4;\r\n });\r\n return [n,l];\r\n };\r\n\r\n return utfx;\r\n }();\r\n\r\n // encodings/utf8\r\n\r\n /**\r\n * Encodes this ByteBuffer's contents between {@link ByteBuffer#offset} and {@link ByteBuffer#limit} to an UTF8 encoded\r\n * string.\r\n * @returns {string} Hex encoded string\r\n * @throws {RangeError} If `offset > limit`\r\n * @expose\r\n */\r\n ByteBufferPrototype.toUTF8 = function(begin, end) {\r\n if (typeof begin === 'undefined') begin = this.offset;\r\n if (typeof end === 'undefined') end = this.limit;\r\n if (!this.noAssert) {\r\n if (typeof begin !== 'number' || begin % 1 !== 0)\n throw TypeError(\"Illegal begin: Not an integer\");\n begin >>>= 0;\n if (typeof end !== 'number' || end % 1 !== 0)\n throw TypeError(\"Illegal end: Not an integer\");\n end >>>= 0;\n if (begin < 0 || begin > end || end > this.buffer.byteLength)\n throw RangeError(\"Illegal range: 0 <= \"+begin+\" <= \"+end+\" <= \"+this.buffer.byteLength);\n }\r\n var sd; try {\r\n utfx.decodeUTF8toUTF16(function() {\r\n return begin < end ? this.view[begin++] : null;\r\n }.bind(this), sd = stringDestination());\r\n } catch (e) {\r\n if (begin !== end)\r\n throw RangeError(\"Illegal range: Truncated data, \"+begin+\" != \"+end);\r\n }\r\n return sd();\r\n };\r\n\r\n /**\r\n * Decodes an UTF8 encoded string to a ByteBuffer.\r\n * @param {string} str String to decode\r\n * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to\r\n * {@link ByteBuffer.DEFAULT_ENDIAN}.\r\n * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to\r\n * {@link ByteBuffer.DEFAULT_NOASSERT}.\r\n * @returns {!ByteBuffer} ByteBuffer\r\n * @expose\r\n */\r\n ByteBuffer.fromUTF8 = function(str, littleEndian, noAssert) {\r\n if (!noAssert)\r\n if (typeof str !== 'string')\r\n throw TypeError(\"Illegal str: Not a string\");\r\n var bb = new ByteBuffer(utfx.calculateUTF16asUTF8(stringSource(str), true)[1], littleEndian, noAssert),\r\n i = 0;\r\n utfx.encodeUTF16toUTF8(stringSource(str), function(b) {\r\n bb.view[i++] = b;\r\n });\r\n bb.limit = i;\r\n return bb;\r\n };\r\n\r\n return ByteBuffer;\r\n});\r\n","export default {};\n","/*\r\n Copyright 2013 Daniel Wirtz \r\n\r\n Licensed under the Apache License, Version 2.0 (the \"License\");\r\n you may not use this file except in compliance with the License.\r\n You may obtain a copy of the License at\r\n\r\n http://www.apache.org/licenses/LICENSE-2.0\r\n\r\n Unless required by applicable law or agreed to in writing, software\r\n distributed under the License is distributed on an \"AS IS\" BASIS,\r\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n See the License for the specific language governing permissions and\r\n limitations under the License.\r\n */\r\n\r\n/**\r\n * @license protobuf.js (c) 2013 Daniel Wirtz \r\n * Released under the Apache License, Version 2.0\r\n * see: https://github.com/dcodeIO/protobuf.js for details\r\n */\r\n(function(global, factory) {\r\n\r\n /* AMD */ if (typeof define === 'function' && define[\"amd\"])\r\n define([\"bytebuffer\"], factory);\r\n /* CommonJS */ else if (typeof require === \"function\" && typeof module === \"object\" && module && module[\"exports\"])\r\n module[\"exports\"] = factory(require(\"bytebuffer\"), true);\r\n /* Global */ else\r\n (global[\"dcodeIO\"] = global[\"dcodeIO\"] || {})[\"ProtoBuf\"] = factory(global[\"dcodeIO\"][\"ByteBuffer\"]);\r\n\r\n})(this, function(ByteBuffer, isCommonJS) {\r\n \"use strict\";\r\n\r\n /**\r\n * The ProtoBuf namespace.\r\n * @exports ProtoBuf\r\n * @namespace\r\n * @expose\r\n */\r\n var ProtoBuf = {};\r\n\r\n /**\r\n * @type {!function(new: ByteBuffer, ...[*])}\r\n * @expose\r\n */\r\n ProtoBuf.ByteBuffer = ByteBuffer;\r\n\r\n /**\r\n * @type {?function(new: Long, ...[*])}\r\n * @expose\r\n */\r\n ProtoBuf.Long = ByteBuffer.Long || null;\r\n\r\n /**\r\n * ProtoBuf.js version.\r\n * @type {string}\r\n * @const\r\n * @expose\r\n */\r\n ProtoBuf.VERSION = \"5.0.2\";\r\n\r\n /**\r\n * Wire types.\r\n * @type {Object.}\r\n * @const\r\n * @expose\r\n */\r\n ProtoBuf.WIRE_TYPES = {};\r\n\r\n /**\r\n * Varint wire type.\r\n * @type {number}\r\n * @expose\r\n */\r\n ProtoBuf.WIRE_TYPES.VARINT = 0;\r\n\r\n /**\r\n * Fixed 64 bits wire type.\r\n * @type {number}\r\n * @const\r\n * @expose\r\n */\r\n ProtoBuf.WIRE_TYPES.BITS64 = 1;\r\n\r\n /**\r\n * Length delimited wire type.\r\n * @type {number}\r\n * @const\r\n * @expose\r\n */\r\n ProtoBuf.WIRE_TYPES.LDELIM = 2;\r\n\r\n /**\r\n * Start group wire type.\r\n * @type {number}\r\n * @const\r\n * @expose\r\n */\r\n ProtoBuf.WIRE_TYPES.STARTGROUP = 3;\r\n\r\n /**\r\n * End group wire type.\r\n * @type {number}\r\n * @const\r\n * @expose\r\n */\r\n ProtoBuf.WIRE_TYPES.ENDGROUP = 4;\r\n\r\n /**\r\n * Fixed 32 bits wire type.\r\n * @type {number}\r\n * @const\r\n * @expose\r\n */\r\n ProtoBuf.WIRE_TYPES.BITS32 = 5;\r\n\r\n /**\r\n * Packable wire types.\r\n * @type {!Array.}\r\n * @const\r\n * @expose\r\n */\r\n ProtoBuf.PACKABLE_WIRE_TYPES = [\r\n ProtoBuf.WIRE_TYPES.VARINT,\r\n ProtoBuf.WIRE_TYPES.BITS64,\r\n ProtoBuf.WIRE_TYPES.BITS32\r\n ];\r\n\r\n /**\r\n * Types.\r\n * @dict\r\n * @type {!Object.}\r\n * @const\r\n * @expose\r\n */\r\n ProtoBuf.TYPES = {\r\n // According to the protobuf spec.\r\n \"int32\": {\r\n name: \"int32\",\r\n wireType: ProtoBuf.WIRE_TYPES.VARINT,\r\n defaultValue: 0\r\n },\r\n \"uint32\": {\r\n name: \"uint32\",\r\n wireType: ProtoBuf.WIRE_TYPES.VARINT,\r\n defaultValue: 0\r\n },\r\n \"sint32\": {\r\n name: \"sint32\",\r\n wireType: ProtoBuf.WIRE_TYPES.VARINT,\r\n defaultValue: 0\r\n },\r\n \"int64\": {\r\n name: \"int64\",\r\n wireType: ProtoBuf.WIRE_TYPES.VARINT,\r\n defaultValue: ProtoBuf.Long ? ProtoBuf.Long.ZERO : undefined\r\n },\r\n \"uint64\": {\r\n name: \"uint64\",\r\n wireType: ProtoBuf.WIRE_TYPES.VARINT,\r\n defaultValue: ProtoBuf.Long ? ProtoBuf.Long.UZERO : undefined\r\n },\r\n \"sint64\": {\r\n name: \"sint64\",\r\n wireType: ProtoBuf.WIRE_TYPES.VARINT,\r\n defaultValue: ProtoBuf.Long ? ProtoBuf.Long.ZERO : undefined\r\n },\r\n \"bool\": {\r\n name: \"bool\",\r\n wireType: ProtoBuf.WIRE_TYPES.VARINT,\r\n defaultValue: false\r\n },\r\n \"double\": {\r\n name: \"double\",\r\n wireType: ProtoBuf.WIRE_TYPES.BITS64,\r\n defaultValue: 0\r\n },\r\n \"string\": {\r\n name: \"string\",\r\n wireType: ProtoBuf.WIRE_TYPES.LDELIM,\r\n defaultValue: \"\"\r\n },\r\n \"bytes\": {\r\n name: \"bytes\",\r\n wireType: ProtoBuf.WIRE_TYPES.LDELIM,\r\n defaultValue: null // overridden in the code, must be a unique instance\r\n },\r\n \"fixed32\": {\r\n name: \"fixed32\",\r\n wireType: ProtoBuf.WIRE_TYPES.BITS32,\r\n defaultValue: 0\r\n },\r\n \"sfixed32\": {\r\n name: \"sfixed32\",\r\n wireType: ProtoBuf.WIRE_TYPES.BITS32,\r\n defaultValue: 0\r\n },\r\n \"fixed64\": {\r\n name: \"fixed64\",\r\n wireType: ProtoBuf.WIRE_TYPES.BITS64,\r\n defaultValue: ProtoBuf.Long ? ProtoBuf.Long.UZERO : undefined\r\n },\r\n \"sfixed64\": {\r\n name: \"sfixed64\",\r\n wireType: ProtoBuf.WIRE_TYPES.BITS64,\r\n defaultValue: ProtoBuf.Long ? ProtoBuf.Long.ZERO : undefined\r\n },\r\n \"float\": {\r\n name: \"float\",\r\n wireType: ProtoBuf.WIRE_TYPES.BITS32,\r\n defaultValue: 0\r\n },\r\n \"enum\": {\r\n name: \"enum\",\r\n wireType: ProtoBuf.WIRE_TYPES.VARINT,\r\n defaultValue: 0\r\n },\r\n \"message\": {\r\n name: \"message\",\r\n wireType: ProtoBuf.WIRE_TYPES.LDELIM,\r\n defaultValue: null\r\n },\r\n \"group\": {\r\n name: \"group\",\r\n wireType: ProtoBuf.WIRE_TYPES.STARTGROUP,\r\n defaultValue: null\r\n }\r\n };\r\n\r\n /**\r\n * Valid map key types.\r\n * @type {!Array.>}\r\n * @const\r\n * @expose\r\n */\r\n ProtoBuf.MAP_KEY_TYPES = [\r\n ProtoBuf.TYPES[\"int32\"],\r\n ProtoBuf.TYPES[\"sint32\"],\r\n ProtoBuf.TYPES[\"sfixed32\"],\r\n ProtoBuf.TYPES[\"uint32\"],\r\n ProtoBuf.TYPES[\"fixed32\"],\r\n ProtoBuf.TYPES[\"int64\"],\r\n ProtoBuf.TYPES[\"sint64\"],\r\n ProtoBuf.TYPES[\"sfixed64\"],\r\n ProtoBuf.TYPES[\"uint64\"],\r\n ProtoBuf.TYPES[\"fixed64\"],\r\n ProtoBuf.TYPES[\"bool\"],\r\n ProtoBuf.TYPES[\"string\"],\r\n ProtoBuf.TYPES[\"bytes\"]\r\n ];\r\n\r\n /**\r\n * Minimum field id.\r\n * @type {number}\r\n * @const\r\n * @expose\r\n */\r\n ProtoBuf.ID_MIN = 1;\r\n\r\n /**\r\n * Maximum field id.\r\n * @type {number}\r\n * @const\r\n * @expose\r\n */\r\n ProtoBuf.ID_MAX = 0x1FFFFFFF;\r\n\r\n /**\r\n * If set to `true`, field names will be converted from underscore notation to camel case. Defaults to `false`.\r\n * Must be set prior to parsing.\r\n * @type {boolean}\r\n * @expose\r\n */\r\n ProtoBuf.convertFieldsToCamelCase = false;\r\n\r\n /**\r\n * By default, messages are populated with (setX, set_x) accessors for each field. This can be disabled by\r\n * setting this to `false` prior to building messages.\r\n * @type {boolean}\r\n * @expose\r\n */\r\n ProtoBuf.populateAccessors = true;\r\n\r\n /**\r\n * By default, messages are populated with default values if a field is not present on the wire. To disable\r\n * this behavior, set this setting to `false`.\r\n * @type {boolean}\r\n * @expose\r\n */\r\n ProtoBuf.populateDefaults = true;\r\n\r\n /**\r\n * @alias ProtoBuf.Util\r\n * @expose\r\n */\r\n ProtoBuf.Util = (function() {\r\n \"use strict\";\r\n\r\n /**\r\n * ProtoBuf utilities.\r\n * @exports ProtoBuf.Util\r\n * @namespace\r\n */\r\n var Util = {};\r\n\r\n /**\r\n * Flag if running in node or not.\r\n * @type {boolean}\r\n * @const\r\n * @expose\r\n */\r\n Util.IS_NODE = !!(\r\n typeof process === 'object' && process+'' === '[object process]' && !process['browser']\r\n );\r\n\r\n /**\r\n * Constructs a XMLHttpRequest object.\r\n * @return {XMLHttpRequest}\r\n * @throws {Error} If XMLHttpRequest is not supported\r\n * @expose\r\n */\r\n Util.XHR = function() {\r\n // No dependencies please, ref: http://www.quirksmode.org/js/xmlhttp.html\r\n var XMLHttpFactories = [\r\n function () {return new XMLHttpRequest()},\r\n function () {return new ActiveXObject(\"Msxml2.XMLHTTP\")},\r\n function () {return new ActiveXObject(\"Msxml3.XMLHTTP\")},\r\n function () {return new ActiveXObject(\"Microsoft.XMLHTTP\")}\r\n ];\r\n /** @type {?XMLHttpRequest} */\r\n var xhr = null;\r\n for (var i=0;i}\r\n * @expose\r\n */\r\n ProtoBuf.Lang = {\r\n\r\n // Characters always ending a statement\r\n DELIM: /[\\s\\{\\}=;:\\[\\],'\"\\(\\)<>]/g,\r\n\r\n // Field rules\r\n RULE: /^(?:required|optional|repeated|map)$/,\r\n\r\n // Field types\r\n TYPE: /^(?:double|float|int32|uint32|sint32|int64|uint64|sint64|fixed32|sfixed32|fixed64|sfixed64|bool|string|bytes)$/,\r\n\r\n // Names\r\n NAME: /^[a-zA-Z_][a-zA-Z_0-9]*$/,\r\n\r\n // Type definitions\r\n TYPEDEF: /^[a-zA-Z][a-zA-Z_0-9]*$/,\r\n\r\n // Type references\r\n TYPEREF: /^(?:\\.?[a-zA-Z_][a-zA-Z_0-9]*)+$/,\r\n\r\n // Fully qualified type references\r\n FQTYPEREF: /^(?:\\.[a-zA-Z][a-zA-Z_0-9]*)+$/,\r\n\r\n // All numbers\r\n NUMBER: /^-?(?:[1-9][0-9]*|0|0[xX][0-9a-fA-F]+|0[0-7]+|([0-9]*(\\.[0-9]*)?([Ee][+-]?[0-9]+)?)|inf|nan)$/,\r\n\r\n // Decimal numbers\r\n NUMBER_DEC: /^(?:[1-9][0-9]*|0)$/,\r\n\r\n // Hexadecimal numbers\r\n NUMBER_HEX: /^0[xX][0-9a-fA-F]+$/,\r\n\r\n // Octal numbers\r\n NUMBER_OCT: /^0[0-7]+$/,\r\n\r\n // Floating point numbers\r\n NUMBER_FLT: /^([0-9]*(\\.[0-9]*)?([Ee][+-]?[0-9]+)?|inf|nan)$/,\r\n\r\n // Booleans\r\n BOOL: /^(?:true|false)$/i,\r\n\r\n // Id numbers\r\n ID: /^(?:[1-9][0-9]*|0|0[xX][0-9a-fA-F]+|0[0-7]+)$/,\r\n\r\n // Negative id numbers (enum values)\r\n NEGID: /^\\-?(?:[1-9][0-9]*|0|0[xX][0-9a-fA-F]+|0[0-7]+)$/,\r\n\r\n // Whitespaces\r\n WHITESPACE: /\\s/,\r\n\r\n // All strings\r\n STRING: /(?:\"([^\"\\\\]*(?:\\\\.[^\"\\\\]*)*)\")|(?:'([^'\\\\]*(?:\\\\.[^'\\\\]*)*)')/g,\r\n\r\n // Double quoted strings\r\n STRING_DQ: /(?:\"([^\"\\\\]*(?:\\\\.[^\"\\\\]*)*)\")/g,\r\n\r\n // Single quoted strings\r\n STRING_SQ: /(?:'([^'\\\\]*(?:\\\\.[^'\\\\]*)*)')/g\r\n };\r\n\r\n\r\n /**\r\n * @alias ProtoBuf.Reflect\r\n * @expose\r\n */\r\n ProtoBuf.Reflect = (function(ProtoBuf) {\r\n \"use strict\";\r\n\r\n /**\r\n * Reflection types.\r\n * @exports ProtoBuf.Reflect\r\n * @namespace\r\n */\r\n var Reflect = {};\r\n\r\n /**\r\n * Constructs a Reflect base class.\r\n * @exports ProtoBuf.Reflect.T\r\n * @constructor\r\n * @abstract\r\n * @param {!ProtoBuf.Builder} builder Builder reference\r\n * @param {?ProtoBuf.Reflect.T} parent Parent object\r\n * @param {string} name Object name\r\n */\r\n var T = function(builder, parent, name) {\r\n\r\n /**\r\n * Builder reference.\r\n * @type {!ProtoBuf.Builder}\r\n * @expose\r\n */\r\n this.builder = builder;\r\n\r\n /**\r\n * Parent object.\r\n * @type {?ProtoBuf.Reflect.T}\r\n * @expose\r\n */\r\n this.parent = parent;\r\n\r\n /**\r\n * Object name in namespace.\r\n * @type {string}\r\n * @expose\r\n */\r\n this.name = name;\r\n\r\n /**\r\n * Fully qualified class name\r\n * @type {string}\r\n * @expose\r\n */\r\n this.className;\r\n };\r\n\r\n /**\r\n * @alias ProtoBuf.Reflect.T.prototype\r\n * @inner\r\n */\r\n var TPrototype = T.prototype;\r\n\r\n /**\r\n * Returns the fully qualified name of this object.\r\n * @returns {string} Fully qualified name as of \".PATH.TO.THIS\"\r\n * @expose\r\n */\r\n TPrototype.fqn = function() {\r\n var name = this.name,\r\n ptr = this;\r\n do {\r\n ptr = ptr.parent;\r\n if (ptr == null)\r\n break;\r\n name = ptr.name+\".\"+name;\r\n } while (true);\r\n return name;\r\n };\r\n\r\n /**\r\n * Returns a string representation of this Reflect object (its fully qualified name).\r\n * @param {boolean=} includeClass Set to true to include the class name. Defaults to false.\r\n * @return String representation\r\n * @expose\r\n */\r\n TPrototype.toString = function(includeClass) {\r\n return (includeClass ? this.className + \" \" : \"\") + this.fqn();\r\n };\r\n\r\n /**\r\n * Builds this type.\r\n * @throws {Error} If this type cannot be built directly\r\n * @expose\r\n */\r\n TPrototype.build = function() {\r\n throw Error(this.toString(true)+\" cannot be built directly\");\r\n };\r\n\r\n /**\r\n * @alias ProtoBuf.Reflect.T\r\n * @expose\r\n */\r\n Reflect.T = T;\r\n\r\n /**\r\n * Constructs a new Namespace.\r\n * @exports ProtoBuf.Reflect.Namespace\r\n * @param {!ProtoBuf.Builder} builder Builder reference\r\n * @param {?ProtoBuf.Reflect.Namespace} parent Namespace parent\r\n * @param {string} name Namespace name\r\n * @param {Object.=} options Namespace options\r\n * @param {string?} syntax The syntax level of this definition (e.g., proto3)\r\n * @constructor\r\n * @extends ProtoBuf.Reflect.T\r\n */\r\n var Namespace = function(builder, parent, name, options, syntax) {\r\n T.call(this, builder, parent, name);\r\n\r\n /**\r\n * @override\r\n */\r\n this.className = \"Namespace\";\r\n\r\n /**\r\n * Children inside the namespace.\r\n * @type {!Array.}\r\n */\r\n this.children = [];\r\n\r\n /**\r\n * Options.\r\n * @type {!Object.}\r\n */\r\n this.options = options || {};\r\n\r\n /**\r\n * Syntax level (e.g., proto2 or proto3).\r\n * @type {!string}\r\n */\r\n this.syntax = syntax || \"proto2\";\r\n };\r\n\r\n /**\r\n * @alias ProtoBuf.Reflect.Namespace.prototype\r\n * @inner\r\n */\r\n var NamespacePrototype = Namespace.prototype = Object.create(T.prototype);\r\n\r\n /**\r\n * Returns an array of the namespace's children.\r\n * @param {ProtoBuf.Reflect.T=} type Filter type (returns instances of this type only). Defaults to null (all children).\r\n * @return {Array.}\r\n * @expose\r\n */\r\n NamespacePrototype.getChildren = function(type) {\r\n type = type || null;\r\n if (type == null)\r\n return this.children.slice();\r\n var children = [];\r\n for (var i=0, k=this.children.length; i} qn Qualified name to resolve\r\n * @param {boolean=} excludeNonNamespace Excludes non-namespace types, defaults to `false`\r\n * @return {?ProtoBuf.Reflect.Namespace} The resolved type or null if not found\r\n * @expose\r\n */\r\n NamespacePrototype.resolve = function(qn, excludeNonNamespace) {\r\n var part = typeof qn === 'string' ? qn.split(\".\") : qn,\r\n ptr = this,\r\n i = 0;\r\n if (part[i] === \"\") { // Fully qualified name, e.g. \".My.Message'\r\n while (ptr.parent !== null)\r\n ptr = ptr.parent;\r\n i++;\r\n }\r\n var child;\r\n do {\r\n do {\r\n if (!(ptr instanceof Reflect.Namespace)) {\r\n ptr = null;\r\n break;\r\n }\r\n child = ptr.getChild(part[i]);\r\n if (!child || !(child instanceof Reflect.T) || (excludeNonNamespace && !(child instanceof Reflect.Namespace))) {\r\n ptr = null;\r\n break;\r\n }\r\n ptr = child; i++;\r\n } while (i < part.length);\r\n if (ptr != null)\r\n break; // Found\r\n // Else search the parent\r\n if (this.parent !== null)\r\n return this.parent.resolve(qn, excludeNonNamespace);\r\n } while (ptr != null);\r\n return ptr;\r\n };\r\n\r\n /**\r\n * Determines the shortest qualified name of the specified type, if any, relative to this namespace.\r\n * @param {!ProtoBuf.Reflect.T} t Reflection type\r\n * @returns {string} The shortest qualified name or, if there is none, the fqn\r\n * @expose\r\n */\r\n NamespacePrototype.qn = function(t) {\r\n var part = [], ptr = t;\r\n do {\r\n part.unshift(ptr.name);\r\n ptr = ptr.parent;\r\n } while (ptr !== null);\r\n for (var len=1; len <= part.length; len++) {\r\n var qn = part.slice(part.length-len);\r\n if (t === this.resolve(qn, t instanceof Reflect.Namespace))\r\n return qn.join(\".\");\r\n }\r\n return t.fqn();\r\n };\r\n\r\n /**\r\n * Builds the namespace and returns the runtime counterpart.\r\n * @return {Object.} Runtime namespace\r\n * @expose\r\n */\r\n NamespacePrototype.build = function() {\r\n /** @dict */\r\n var ns = {};\r\n var children = this.children;\r\n for (var i=0, k=children.length, child; i}\r\n */\r\n NamespacePrototype.buildOpt = function() {\r\n var opt = {},\r\n keys = Object.keys(this.options);\r\n for (var i=0, k=keys.length; i}null} Option value or NULL if there is no such option\r\n */\r\n NamespacePrototype.getOption = function(name) {\r\n if (typeof name === 'undefined')\r\n return this.options;\r\n return typeof this.options[name] !== 'undefined' ? this.options[name] : null;\r\n };\r\n\r\n /**\r\n * @alias ProtoBuf.Reflect.Namespace\r\n * @expose\r\n */\r\n Reflect.Namespace = Namespace;\r\n\r\n /**\r\n * Constructs a new Element implementation that checks and converts values for a\r\n * particular field type, as appropriate.\r\n *\r\n * An Element represents a single value: either the value of a singular field,\r\n * or a value contained in one entry of a repeated field or map field. This\r\n * class does not implement these higher-level concepts; it only encapsulates\r\n * the low-level typechecking and conversion.\r\n *\r\n * @exports ProtoBuf.Reflect.Element\r\n * @param {{name: string, wireType: number}} type Resolved data type\r\n * @param {ProtoBuf.Reflect.T|null} resolvedType Resolved type, if relevant\r\n * (e.g. submessage field).\r\n * @param {boolean} isMapKey Is this element a Map key? The value will be\r\n * converted to string form if so.\r\n * @param {string} syntax Syntax level of defining message type, e.g.,\r\n * proto2 or proto3.\r\n * @param {string} name Name of the field containing this element (for error\r\n * messages)\r\n * @constructor\r\n */\r\n var Element = function(type, resolvedType, isMapKey, syntax, name) {\r\n\r\n /**\r\n * Element type, as a string (e.g., int32).\r\n * @type {{name: string, wireType: number}}\r\n */\r\n this.type = type;\r\n\r\n /**\r\n * Element type reference to submessage or enum definition, if needed.\r\n * @type {ProtoBuf.Reflect.T|null}\r\n */\r\n this.resolvedType = resolvedType;\r\n\r\n /**\r\n * Element is a map key.\r\n * @type {boolean}\r\n */\r\n this.isMapKey = isMapKey;\r\n\r\n /**\r\n * Syntax level of defining message type, e.g., proto2 or proto3.\r\n * @type {string}\r\n */\r\n this.syntax = syntax;\r\n\r\n /**\r\n * Name of the field containing this element (for error messages)\r\n * @type {string}\r\n */\r\n this.name = name;\r\n\r\n if (isMapKey && ProtoBuf.MAP_KEY_TYPES.indexOf(type) < 0)\r\n throw Error(\"Invalid map key type: \" + type.name);\r\n };\r\n\r\n var ElementPrototype = Element.prototype;\r\n\r\n /**\r\n * Obtains a (new) default value for the specified type.\r\n * @param type {string|{name: string, wireType: number}} Field type\r\n * @returns {*} Default value\r\n * @inner\r\n */\r\n function mkDefault(type) {\r\n if (typeof type === 'string')\r\n type = ProtoBuf.TYPES[type];\r\n if (typeof type.defaultValue === 'undefined')\r\n throw Error(\"default value for type \"+type.name+\" is not supported\");\r\n if (type == ProtoBuf.TYPES[\"bytes\"])\r\n return new ByteBuffer(0);\r\n return type.defaultValue;\r\n }\r\n\r\n /**\r\n * Returns the default value for this field in proto3.\r\n * @function\r\n * @param type {string|{name: string, wireType: number}} the field type\r\n * @returns {*} Default value\r\n */\r\n Element.defaultFieldValue = mkDefault;\r\n\r\n /**\r\n * Makes a Long from a value.\r\n * @param {{low: number, high: number, unsigned: boolean}|string|number} value Value\r\n * @param {boolean=} unsigned Whether unsigned or not, defaults to reuse it from Long-like objects or to signed for\r\n * strings and numbers\r\n * @returns {!Long}\r\n * @throws {Error} If the value cannot be converted to a Long\r\n * @inner\r\n */\r\n function mkLong(value, unsigned) {\r\n if (value && typeof value.low === 'number' && typeof value.high === 'number' && typeof value.unsigned === 'boolean'\r\n && value.low === value.low && value.high === value.high)\r\n return new ProtoBuf.Long(value.low, value.high, typeof unsigned === 'undefined' ? value.unsigned : unsigned);\r\n if (typeof value === 'string')\r\n return ProtoBuf.Long.fromString(value, unsigned || false, 10);\r\n if (typeof value === 'number')\r\n return ProtoBuf.Long.fromNumber(value, unsigned || false);\r\n throw Error(\"not convertible to Long\");\r\n }\r\n\r\n ElementPrototype.toString = function() {\r\n return (this.name || '') + (this.isMapKey ? 'map' : 'value') + ' element';\r\n }\r\n\r\n /**\r\n * Checks if the given value can be set for an element of this type (singular\r\n * field or one element of a repeated field or map).\r\n * @param {*} value Value to check\r\n * @return {*} Verified, maybe adjusted, value\r\n * @throws {Error} If the value cannot be verified for this element slot\r\n * @expose\r\n */\r\n ElementPrototype.verifyValue = function(value) {\r\n var self = this;\r\n function fail(val, msg) {\r\n throw Error(\"Illegal value for \"+self.toString(true)+\" of type \"+self.type.name+\": \"+val+\" (\"+msg+\")\");\r\n }\r\n switch (this.type) {\r\n // Signed 32bit\r\n case ProtoBuf.TYPES[\"int32\"]:\r\n case ProtoBuf.TYPES[\"sint32\"]:\r\n case ProtoBuf.TYPES[\"sfixed32\"]:\r\n // Account for !NaN: value === value\r\n if (typeof value !== 'number' || (value === value && value % 1 !== 0))\r\n fail(typeof value, \"not an integer\");\r\n return value > 4294967295 ? value | 0 : value;\r\n\r\n // Unsigned 32bit\r\n case ProtoBuf.TYPES[\"uint32\"]:\r\n case ProtoBuf.TYPES[\"fixed32\"]:\r\n if (typeof value !== 'number' || (value === value && value % 1 !== 0))\r\n fail(typeof value, \"not an integer\");\r\n return value < 0 ? value >>> 0 : value;\r\n\r\n // Signed 64bit\r\n case ProtoBuf.TYPES[\"int64\"]:\r\n case ProtoBuf.TYPES[\"sint64\"]:\r\n case ProtoBuf.TYPES[\"sfixed64\"]: {\r\n if (ProtoBuf.Long)\r\n try {\r\n return mkLong(value, false);\r\n } catch (e) {\r\n fail(typeof value, e.message);\r\n }\r\n else\r\n fail(typeof value, \"requires Long.js\");\r\n }\r\n\r\n // Unsigned 64bit\r\n case ProtoBuf.TYPES[\"uint64\"]:\r\n case ProtoBuf.TYPES[\"fixed64\"]: {\r\n if (ProtoBuf.Long)\r\n try {\r\n return mkLong(value, true);\r\n } catch (e) {\r\n fail(typeof value, e.message);\r\n }\r\n else\r\n fail(typeof value, \"requires Long.js\");\r\n }\r\n\r\n // Bool\r\n case ProtoBuf.TYPES[\"bool\"]:\r\n if (typeof value !== 'boolean')\r\n fail(typeof value, \"not a boolean\");\r\n return value;\r\n\r\n // Float\r\n case ProtoBuf.TYPES[\"float\"]:\r\n case ProtoBuf.TYPES[\"double\"]:\r\n if (typeof value !== 'number')\r\n fail(typeof value, \"not a number\");\r\n return value;\r\n\r\n // Length-delimited string\r\n case ProtoBuf.TYPES[\"string\"]:\r\n if (typeof value !== 'string' && !(value && value instanceof String))\r\n fail(typeof value, \"not a string\");\r\n return \"\"+value; // Convert String object to string\r\n\r\n // Length-delimited bytes\r\n case ProtoBuf.TYPES[\"bytes\"]:\r\n if (ByteBuffer.isByteBuffer(value))\r\n return value;\r\n return ByteBuffer.wrap(value, \"base64\");\r\n\r\n // Constant enum value\r\n case ProtoBuf.TYPES[\"enum\"]: {\r\n var values = this.resolvedType.getChildren(ProtoBuf.Reflect.Enum.Value);\r\n for (i=0; i 4294967295 || value < 0)\r\n fail(typeof value, \"not in range for uint32\")\r\n return value;\r\n } else {\r\n // proto2 requires enum values to be valid.\r\n fail(value, \"not a valid enum value\");\r\n }\r\n }\r\n // Embedded message\r\n case ProtoBuf.TYPES[\"group\"]:\r\n case ProtoBuf.TYPES[\"message\"]: {\r\n if (!value || typeof value !== 'object')\r\n fail(typeof value, \"object expected\");\r\n if (value instanceof this.resolvedType.clazz)\r\n return value;\r\n if (value instanceof ProtoBuf.Builder.Message) {\r\n // Mismatched type: Convert to object (see: https://github.com/dcodeIO/ProtoBuf.js/issues/180)\r\n var obj = {};\r\n for (var i in value)\r\n if (value.hasOwnProperty(i))\r\n obj[i] = value[i];\r\n value = obj;\r\n }\r\n // Else let's try to construct one from a key-value object\r\n return new (this.resolvedType.clazz)(value); // May throw for a hundred of reasons\r\n }\r\n }\r\n\r\n // We should never end here\r\n throw Error(\"[INTERNAL] Illegal value for \"+this.toString(true)+\": \"+value+\" (undefined type \"+this.type+\")\");\r\n };\r\n\r\n /**\r\n * Calculates the byte length of an element on the wire.\r\n * @param {number} id Field number\r\n * @param {*} value Field value\r\n * @returns {number} Byte length\r\n * @throws {Error} If the value cannot be calculated\r\n * @expose\r\n */\r\n ElementPrototype.calculateLength = function(id, value) {\r\n if (value === null) return 0; // Nothing to encode\r\n // Tag has already been written\r\n var n;\r\n switch (this.type) {\r\n case ProtoBuf.TYPES[\"int32\"]:\r\n return value < 0 ? ByteBuffer.calculateVarint64(value) : ByteBuffer.calculateVarint32(value);\r\n case ProtoBuf.TYPES[\"uint32\"]:\r\n return ByteBuffer.calculateVarint32(value);\r\n case ProtoBuf.TYPES[\"sint32\"]:\r\n return ByteBuffer.calculateVarint32(ByteBuffer.zigZagEncode32(value));\r\n case ProtoBuf.TYPES[\"fixed32\"]:\r\n case ProtoBuf.TYPES[\"sfixed32\"]:\r\n case ProtoBuf.TYPES[\"float\"]:\r\n return 4;\r\n case ProtoBuf.TYPES[\"int64\"]:\r\n case ProtoBuf.TYPES[\"uint64\"]:\r\n return ByteBuffer.calculateVarint64(value);\r\n case ProtoBuf.TYPES[\"sint64\"]:\r\n return ByteBuffer.calculateVarint64(ByteBuffer.zigZagEncode64(value));\r\n case ProtoBuf.TYPES[\"fixed64\"]:\r\n case ProtoBuf.TYPES[\"sfixed64\"]:\r\n return 8;\r\n case ProtoBuf.TYPES[\"bool\"]:\r\n return 1;\r\n case ProtoBuf.TYPES[\"enum\"]:\r\n return ByteBuffer.calculateVarint32(value);\r\n case ProtoBuf.TYPES[\"double\"]:\r\n return 8;\r\n case ProtoBuf.TYPES[\"string\"]:\r\n n = ByteBuffer.calculateUTF8Bytes(value);\r\n return ByteBuffer.calculateVarint32(n) + n;\r\n case ProtoBuf.TYPES[\"bytes\"]:\r\n if (value.remaining() < 0)\r\n throw Error(\"Illegal value for \"+this.toString(true)+\": \"+value.remaining()+\" bytes remaining\");\r\n return ByteBuffer.calculateVarint32(value.remaining()) + value.remaining();\r\n case ProtoBuf.TYPES[\"message\"]:\r\n n = this.resolvedType.calculate(value);\r\n return ByteBuffer.calculateVarint32(n) + n;\r\n case ProtoBuf.TYPES[\"group\"]:\r\n n = this.resolvedType.calculate(value);\r\n return n + ByteBuffer.calculateVarint32((id << 3) | ProtoBuf.WIRE_TYPES.ENDGROUP);\r\n }\r\n // We should never end here\r\n throw Error(\"[INTERNAL] Illegal value to encode in \"+this.toString(true)+\": \"+value+\" (unknown type)\");\r\n };\r\n\r\n /**\r\n * Encodes a value to the specified buffer. Does not encode the key.\r\n * @param {number} id Field number\r\n * @param {*} value Field value\r\n * @param {ByteBuffer} buffer ByteBuffer to encode to\r\n * @return {ByteBuffer} The ByteBuffer for chaining\r\n * @throws {Error} If the value cannot be encoded\r\n * @expose\r\n */\r\n ElementPrototype.encodeValue = function(id, value, buffer) {\r\n if (value === null) return buffer; // Nothing to encode\r\n // Tag has already been written\r\n\r\n switch (this.type) {\r\n // 32bit signed varint\r\n case ProtoBuf.TYPES[\"int32\"]:\r\n // \"If you use int32 or int64 as the type for a negative number, the resulting varint is always ten bytes\r\n // long – it is, effectively, treated like a very large unsigned integer.\" (see #122)\r\n if (value < 0)\r\n buffer.writeVarint64(value);\r\n else\r\n buffer.writeVarint32(value);\r\n break;\r\n\r\n // 32bit unsigned varint\r\n case ProtoBuf.TYPES[\"uint32\"]:\r\n buffer.writeVarint32(value);\r\n break;\r\n\r\n // 32bit varint zig-zag\r\n case ProtoBuf.TYPES[\"sint32\"]:\r\n buffer.writeVarint32ZigZag(value);\r\n break;\r\n\r\n // Fixed unsigned 32bit\r\n case ProtoBuf.TYPES[\"fixed32\"]:\r\n buffer.writeUint32(value);\r\n break;\r\n\r\n // Fixed signed 32bit\r\n case ProtoBuf.TYPES[\"sfixed32\"]:\r\n buffer.writeInt32(value);\r\n break;\r\n\r\n // 64bit varint as-is\r\n case ProtoBuf.TYPES[\"int64\"]:\r\n case ProtoBuf.TYPES[\"uint64\"]:\r\n buffer.writeVarint64(value); // throws\r\n break;\r\n\r\n // 64bit varint zig-zag\r\n case ProtoBuf.TYPES[\"sint64\"]:\r\n buffer.writeVarint64ZigZag(value); // throws\r\n break;\r\n\r\n // Fixed unsigned 64bit\r\n case ProtoBuf.TYPES[\"fixed64\"]:\r\n buffer.writeUint64(value); // throws\r\n break;\r\n\r\n // Fixed signed 64bit\r\n case ProtoBuf.TYPES[\"sfixed64\"]:\r\n buffer.writeInt64(value); // throws\r\n break;\r\n\r\n // Bool\r\n case ProtoBuf.TYPES[\"bool\"]:\r\n if (typeof value === 'string')\r\n buffer.writeVarint32(value.toLowerCase() === 'false' ? 0 : !!value);\r\n else\r\n buffer.writeVarint32(value ? 1 : 0);\r\n break;\r\n\r\n // Constant enum value\r\n case ProtoBuf.TYPES[\"enum\"]:\r\n buffer.writeVarint32(value);\r\n break;\r\n\r\n // 32bit float\r\n case ProtoBuf.TYPES[\"float\"]:\r\n buffer.writeFloat32(value);\r\n break;\r\n\r\n // 64bit float\r\n case ProtoBuf.TYPES[\"double\"]:\r\n buffer.writeFloat64(value);\r\n break;\r\n\r\n // Length-delimited string\r\n case ProtoBuf.TYPES[\"string\"]:\r\n buffer.writeVString(value);\r\n break;\r\n\r\n // Length-delimited bytes\r\n case ProtoBuf.TYPES[\"bytes\"]:\r\n if (value.remaining() < 0)\r\n throw Error(\"Illegal value for \"+this.toString(true)+\": \"+value.remaining()+\" bytes remaining\");\r\n var prevOffset = value.offset;\r\n buffer.writeVarint32(value.remaining());\r\n buffer.append(value);\r\n value.offset = prevOffset;\r\n break;\r\n\r\n // Embedded message\r\n case ProtoBuf.TYPES[\"message\"]:\r\n var bb = new ByteBuffer().LE();\r\n this.resolvedType.encode(value, bb);\r\n buffer.writeVarint32(bb.offset);\r\n buffer.append(bb.flip());\r\n break;\r\n\r\n // Legacy group\r\n case ProtoBuf.TYPES[\"group\"]:\r\n this.resolvedType.encode(value, buffer);\r\n buffer.writeVarint32((id << 3) | ProtoBuf.WIRE_TYPES.ENDGROUP);\r\n break;\r\n\r\n default:\r\n // We should never end here\r\n throw Error(\"[INTERNAL] Illegal value to encode in \"+this.toString(true)+\": \"+value+\" (unknown type)\");\r\n }\r\n return buffer;\r\n };\r\n\r\n /**\r\n * Decode one element value from the specified buffer.\r\n * @param {ByteBuffer} buffer ByteBuffer to decode from\r\n * @param {number} wireType The field wire type\r\n * @param {number} id The field number\r\n * @return {*} Decoded value\r\n * @throws {Error} If the field cannot be decoded\r\n * @expose\r\n */\r\n ElementPrototype.decode = function(buffer, wireType, id) {\r\n if (wireType != this.type.wireType)\r\n throw Error(\"Unexpected wire type for element\");\r\n\r\n var value, nBytes;\r\n switch (this.type) {\r\n // 32bit signed varint\r\n case ProtoBuf.TYPES[\"int32\"]:\r\n return buffer.readVarint32() | 0;\r\n\r\n // 32bit unsigned varint\r\n case ProtoBuf.TYPES[\"uint32\"]:\r\n return buffer.readVarint32() >>> 0;\r\n\r\n // 32bit signed varint zig-zag\r\n case ProtoBuf.TYPES[\"sint32\"]:\r\n return buffer.readVarint32ZigZag() | 0;\r\n\r\n // Fixed 32bit unsigned\r\n case ProtoBuf.TYPES[\"fixed32\"]:\r\n return buffer.readUint32() >>> 0;\r\n\r\n case ProtoBuf.TYPES[\"sfixed32\"]:\r\n return buffer.readInt32() | 0;\r\n\r\n // 64bit signed varint\r\n case ProtoBuf.TYPES[\"int64\"]:\r\n return buffer.readVarint64();\r\n\r\n // 64bit unsigned varint\r\n case ProtoBuf.TYPES[\"uint64\"]:\r\n return buffer.readVarint64().toUnsigned();\r\n\r\n // 64bit signed varint zig-zag\r\n case ProtoBuf.TYPES[\"sint64\"]:\r\n return buffer.readVarint64ZigZag();\r\n\r\n // Fixed 64bit unsigned\r\n case ProtoBuf.TYPES[\"fixed64\"]:\r\n return buffer.readUint64();\r\n\r\n // Fixed 64bit signed\r\n case ProtoBuf.TYPES[\"sfixed64\"]:\r\n return buffer.readInt64();\r\n\r\n // Bool varint\r\n case ProtoBuf.TYPES[\"bool\"]:\r\n return !!buffer.readVarint32();\r\n\r\n // Constant enum value (varint)\r\n case ProtoBuf.TYPES[\"enum\"]:\r\n // The following Builder.Message#set will already throw\r\n return buffer.readVarint32();\r\n\r\n // 32bit float\r\n case ProtoBuf.TYPES[\"float\"]:\r\n return buffer.readFloat();\r\n\r\n // 64bit float\r\n case ProtoBuf.TYPES[\"double\"]:\r\n return buffer.readDouble();\r\n\r\n // Length-delimited string\r\n case ProtoBuf.TYPES[\"string\"]:\r\n return buffer.readVString();\r\n\r\n // Length-delimited bytes\r\n case ProtoBuf.TYPES[\"bytes\"]: {\r\n nBytes = buffer.readVarint32();\r\n if (buffer.remaining() < nBytes)\r\n throw Error(\"Illegal number of bytes for \"+this.toString(true)+\": \"+nBytes+\" required but got only \"+buffer.remaining());\r\n value = buffer.clone(); // Offset already set\r\n value.limit = value.offset+nBytes;\r\n buffer.offset += nBytes;\r\n return value;\r\n }\r\n\r\n // Length-delimited embedded message\r\n case ProtoBuf.TYPES[\"message\"]: {\r\n nBytes = buffer.readVarint32();\r\n return this.resolvedType.decode(buffer, nBytes);\r\n }\r\n\r\n // Legacy group\r\n case ProtoBuf.TYPES[\"group\"]:\r\n return this.resolvedType.decode(buffer, -1, id);\r\n }\r\n\r\n // We should never end here\r\n throw Error(\"[INTERNAL] Illegal decode type\");\r\n };\r\n\r\n /**\r\n * Converts a value from a string to the canonical element type.\r\n *\r\n * Legal only when isMapKey is true.\r\n *\r\n * @param {string} str The string value\r\n * @returns {*} The value\r\n */\r\n ElementPrototype.valueFromString = function(str) {\r\n if (!this.isMapKey) {\r\n throw Error(\"valueFromString() called on non-map-key element\");\r\n }\r\n\r\n switch (this.type) {\r\n case ProtoBuf.TYPES[\"int32\"]:\r\n case ProtoBuf.TYPES[\"sint32\"]:\r\n case ProtoBuf.TYPES[\"sfixed32\"]:\r\n case ProtoBuf.TYPES[\"uint32\"]:\r\n case ProtoBuf.TYPES[\"fixed32\"]:\r\n return this.verifyValue(parseInt(str));\r\n\r\n case ProtoBuf.TYPES[\"int64\"]:\r\n case ProtoBuf.TYPES[\"sint64\"]:\r\n case ProtoBuf.TYPES[\"sfixed64\"]:\r\n case ProtoBuf.TYPES[\"uint64\"]:\r\n case ProtoBuf.TYPES[\"fixed64\"]:\r\n // Long-based fields support conversions from string already.\r\n return this.verifyValue(str);\r\n\r\n case ProtoBuf.TYPES[\"bool\"]:\r\n return str === \"true\";\r\n\r\n case ProtoBuf.TYPES[\"string\"]:\r\n return this.verifyValue(str);\r\n\r\n case ProtoBuf.TYPES[\"bytes\"]:\r\n return ByteBuffer.fromBinary(str);\r\n }\r\n };\r\n\r\n /**\r\n * Converts a value from the canonical element type to a string.\r\n *\r\n * It should be the case that `valueFromString(valueToString(val))` returns\r\n * a value equivalent to `verifyValue(val)` for every legal value of `val`\r\n * according to this element type.\r\n *\r\n * This may be used when the element must be stored or used as a string,\r\n * e.g., as a map key on an Object.\r\n *\r\n * Legal only when isMapKey is true.\r\n *\r\n * @param {*} val The value\r\n * @returns {string} The string form of the value.\r\n */\r\n ElementPrototype.valueToString = function(value) {\r\n if (!this.isMapKey) {\r\n throw Error(\"valueToString() called on non-map-key element\");\r\n }\r\n\r\n if (this.type === ProtoBuf.TYPES[\"bytes\"]) {\r\n return value.toString(\"binary\");\r\n } else {\r\n return value.toString();\r\n }\r\n };\r\n\r\n /**\r\n * @alias ProtoBuf.Reflect.Element\r\n * @expose\r\n */\r\n Reflect.Element = Element;\r\n\r\n /**\r\n * Constructs a new Message.\r\n * @exports ProtoBuf.Reflect.Message\r\n * @param {!ProtoBuf.Builder} builder Builder reference\r\n * @param {!ProtoBuf.Reflect.Namespace} parent Parent message or namespace\r\n * @param {string} name Message name\r\n * @param {Object.=} options Message options\r\n * @param {boolean=} isGroup `true` if this is a legacy group\r\n * @param {string?} syntax The syntax level of this definition (e.g., proto3)\r\n * @constructor\r\n * @extends ProtoBuf.Reflect.Namespace\r\n */\r\n var Message = function(builder, parent, name, options, isGroup, syntax) {\r\n Namespace.call(this, builder, parent, name, options, syntax);\r\n\r\n /**\r\n * @override\r\n */\r\n this.className = \"Message\";\r\n\r\n /**\r\n * Extensions range.\r\n * @type {!Array.|undefined}\r\n * @expose\r\n */\r\n this.extensions = undefined;\r\n\r\n /**\r\n * Runtime message class.\r\n * @type {?function(new:ProtoBuf.Builder.Message)}\r\n * @expose\r\n */\r\n this.clazz = null;\r\n\r\n /**\r\n * Whether this is a legacy group or not.\r\n * @type {boolean}\r\n * @expose\r\n */\r\n this.isGroup = !!isGroup;\r\n\r\n // The following cached collections are used to efficiently iterate over or look up fields when decoding.\r\n\r\n /**\r\n * Cached fields.\r\n * @type {?Array.}\r\n * @private\r\n */\r\n this._fields = null;\r\n\r\n /**\r\n * Cached fields by id.\r\n * @type {?Object.}\r\n * @private\r\n */\r\n this._fieldsById = null;\r\n\r\n /**\r\n * Cached fields by name.\r\n * @type {?Object.}\r\n * @private\r\n */\r\n this._fieldsByName = null;\r\n };\r\n\r\n /**\r\n * @alias ProtoBuf.Reflect.Message.prototype\r\n * @inner\r\n */\r\n var MessagePrototype = Message.prototype = Object.create(Namespace.prototype);\r\n\r\n /**\r\n * Builds the message and returns the runtime counterpart, which is a fully functional class.\r\n * @see ProtoBuf.Builder.Message\r\n * @param {boolean=} rebuild Whether to rebuild or not, defaults to false\r\n * @return {ProtoBuf.Reflect.Message} Message class\r\n * @throws {Error} If the message cannot be built\r\n * @expose\r\n */\r\n MessagePrototype.build = function(rebuild) {\r\n if (this.clazz && !rebuild)\r\n return this.clazz;\r\n\r\n // Create the runtime Message class in its own scope\r\n var clazz = (function(ProtoBuf, T) {\r\n\r\n var fields = T.getChildren(ProtoBuf.Reflect.Message.Field),\r\n oneofs = T.getChildren(ProtoBuf.Reflect.Message.OneOf);\r\n\r\n /**\r\n * Constructs a new runtime Message.\r\n * @name ProtoBuf.Builder.Message\r\n * @class Barebone of all runtime messages.\r\n * @param {!Object.|string} values Preset values\r\n * @param {...string} var_args\r\n * @constructor\r\n * @throws {Error} If the message cannot be created\r\n */\r\n var Message = function(values, var_args) {\r\n ProtoBuf.Builder.Message.call(this);\r\n\r\n // Create virtual oneof properties\r\n for (var i=0, k=oneofs.length; i 0) {\r\n var value;\r\n // Set field values from a values object\r\n if (arguments.length === 1 && values !== null && typeof values === 'object' &&\r\n /* not _another_ Message */ (typeof values.encode !== 'function' || values instanceof Message) &&\r\n /* not a repeated field */ !Array.isArray(values) &&\r\n /* not a Map */ !(values instanceof ProtoBuf.Map) &&\r\n /* not a ByteBuffer */ !ByteBuffer.isByteBuffer(values) &&\r\n /* not an ArrayBuffer */ !(values instanceof ArrayBuffer) &&\r\n /* not a Long */ !(ProtoBuf.Long && values instanceof ProtoBuf.Long)) {\r\n this.$set(values);\r\n } else // Set field values from arguments, in declaration order\r\n for (i=0, k=arguments.length; i} keyOrObj String key or plain object holding multiple values\r\n * @param {(*|boolean)=} value Value to set if key is a string, otherwise omitted\r\n * @param {boolean=} noAssert Whether to not assert for an actual field / proper value type, defaults to `false`\r\n * @returns {!ProtoBuf.Builder.Message} this\r\n * @throws {Error} If the value cannot be set\r\n * @expose\r\n */\r\n MessagePrototype.set = function(keyOrObj, value, noAssert) {\r\n if (keyOrObj && typeof keyOrObj === 'object') {\r\n noAssert = value;\r\n for (var ikey in keyOrObj) {\r\n // Check if virtual oneof field - don't set these\r\n if (keyOrObj.hasOwnProperty(ikey) && typeof (value = keyOrObj[ikey]) !== 'undefined' && T._oneofsByName[ikey] === undefined)\r\n this.$set(ikey, value, noAssert);\r\n }\r\n return this;\r\n }\r\n var field = T._fieldsByName[keyOrObj];\r\n if (!noAssert) {\r\n if (!field)\r\n throw Error(this+\"#\"+keyOrObj+\" is not a field: undefined\");\r\n if (!(field instanceof ProtoBuf.Reflect.Message.Field))\r\n throw Error(this+\"#\"+keyOrObj+\" is not a field: \"+field.toString(true));\r\n this[field.name] = (value = field.verifyValue(value)); // May throw\r\n } else\r\n this[keyOrObj] = value;\r\n if (field && field.oneof) { // Field is part of an OneOf (not a virtual OneOf field)\r\n var currentField = this[field.oneof.name]; // Virtual field references currently set field\r\n if (value !== null) {\r\n if (currentField !== null && currentField !== field.name)\r\n this[currentField] = null; // Clear currently set field\r\n this[field.oneof.name] = field.name; // Point virtual field at this field\r\n } else if (/* value === null && */currentField === keyOrObj)\r\n this[field.oneof.name] = null; // Clear virtual field (current field explicitly cleared)\r\n }\r\n return this;\r\n };\r\n\r\n /**\r\n * Sets a field's value. This is an alias for [@link ProtoBuf.Builder.Message#set}.\r\n * @name ProtoBuf.Builder.Message#$set\r\n * @function\r\n * @param {string|!Object.} keyOrObj String key or plain object holding multiple values\r\n * @param {(*|boolean)=} value Value to set if key is a string, otherwise omitted\r\n * @param {boolean=} noAssert Whether to not assert the value, defaults to `false`\r\n * @throws {Error} If the value cannot be set\r\n * @expose\r\n */\r\n MessagePrototype.$set = MessagePrototype.set;\r\n\r\n /**\r\n * Gets a field's value.\r\n * @name ProtoBuf.Builder.Message#get\r\n * @function\r\n * @param {string} key Key\r\n * @param {boolean=} noAssert Whether to not assert for an actual field, defaults to `false`\r\n * @return {*} Value\r\n * @throws {Error} If there is no such field\r\n * @expose\r\n */\r\n MessagePrototype.get = function(key, noAssert) {\r\n if (noAssert)\r\n return this[key];\r\n var field = T._fieldsByName[key];\r\n if (!field || !(field instanceof ProtoBuf.Reflect.Message.Field))\r\n throw Error(this+\"#\"+key+\" is not a field: undefined\");\r\n if (!(field instanceof ProtoBuf.Reflect.Message.Field))\r\n throw Error(this+\"#\"+key+\" is not a field: \"+field.toString(true));\r\n return this[field.name];\r\n };\r\n\r\n /**\r\n * Gets a field's value. This is an alias for {@link ProtoBuf.Builder.Message#$get}.\r\n * @name ProtoBuf.Builder.Message#$get\r\n * @function\r\n * @param {string} key Key\r\n * @return {*} Value\r\n * @throws {Error} If there is no such field\r\n * @expose\r\n */\r\n MessagePrototype.$get = MessagePrototype.get;\r\n\r\n // Getters and setters\r\n\r\n for (var i=0; i} data Data payload\r\n * @param {(!ByteBuffer|boolean)=} buffer ByteBuffer to encode to. Will create a new one and flip it if omitted.\r\n * @param {boolean=} noVerify Whether to not verify field values, defaults to `false`\r\n * @return {!ByteBuffer} Encoded message as a ByteBuffer\r\n * @expose\r\n */\r\n Message.encode = function(data, buffer, noVerify) {\r\n return new Message(data).encode(buffer, noVerify);\r\n };\r\n\r\n /**\r\n * Calculates the byte length of the message.\r\n * @name ProtoBuf.Builder.Message#calculate\r\n * @function\r\n * @returns {number} Byte length\r\n * @throws {Error} If the message cannot be calculated or if required fields are missing.\r\n * @expose\r\n */\r\n MessagePrototype.calculate = function() {\r\n return T.calculate(this);\r\n };\r\n\r\n /**\r\n * Encodes the varint32 length-delimited message.\r\n * @name ProtoBuf.Builder.Message#encodeDelimited\r\n * @function\r\n * @param {(!ByteBuffer|boolean)=} buffer ByteBuffer to encode to. Will create a new one and flip it if omitted.\r\n * @param {boolean=} noVerify Whether to not verify field values, defaults to `false`\r\n * @return {!ByteBuffer} Encoded message as a ByteBuffer\r\n * @throws {Error} If the message cannot be encoded or if required fields are missing. The later still\r\n * returns the encoded ByteBuffer in the `encoded` property on the error.\r\n * @expose\r\n */\r\n MessagePrototype.encodeDelimited = function(buffer, noVerify) {\r\n var isNew = false;\r\n if (!buffer)\r\n buffer = new ByteBuffer(),\r\n isNew = true;\r\n var enc = new ByteBuffer().LE();\r\n T.encode(this, enc, noVerify).flip();\r\n buffer.writeVarint32(enc.remaining());\r\n buffer.append(enc);\r\n return isNew ? buffer.flip() : buffer;\r\n };\r\n\r\n /**\r\n * Directly encodes the message to an ArrayBuffer.\r\n * @name ProtoBuf.Builder.Message#encodeAB\r\n * @function\r\n * @return {ArrayBuffer} Encoded message as ArrayBuffer\r\n * @throws {Error} If the message cannot be encoded or if required fields are missing. The later still\r\n * returns the encoded ArrayBuffer in the `encoded` property on the error.\r\n * @expose\r\n */\r\n MessagePrototype.encodeAB = function() {\r\n try {\r\n return this.encode().toArrayBuffer();\r\n } catch (e) {\r\n if (e[\"encoded\"]) e[\"encoded\"] = e[\"encoded\"].toArrayBuffer();\r\n throw(e);\r\n }\r\n };\r\n\r\n /**\r\n * Returns the message as an ArrayBuffer. This is an alias for {@link ProtoBuf.Builder.Message#encodeAB}.\r\n * @name ProtoBuf.Builder.Message#toArrayBuffer\r\n * @function\r\n * @return {ArrayBuffer} Encoded message as ArrayBuffer\r\n * @throws {Error} If the message cannot be encoded or if required fields are missing. The later still\r\n * returns the encoded ArrayBuffer in the `encoded` property on the error.\r\n * @expose\r\n */\r\n MessagePrototype.toArrayBuffer = MessagePrototype.encodeAB;\r\n\r\n /**\r\n * Directly encodes the message to a node Buffer.\r\n * @name ProtoBuf.Builder.Message#encodeNB\r\n * @function\r\n * @return {!Buffer}\r\n * @throws {Error} If the message cannot be encoded, not running under node.js or if required fields are\r\n * missing. The later still returns the encoded node Buffer in the `encoded` property on the error.\r\n * @expose\r\n */\r\n MessagePrototype.encodeNB = function() {\r\n try {\r\n return this.encode().toBuffer();\r\n } catch (e) {\r\n if (e[\"encoded\"]) e[\"encoded\"] = e[\"encoded\"].toBuffer();\r\n throw(e);\r\n }\r\n };\r\n\r\n /**\r\n * Returns the message as a node Buffer. This is an alias for {@link ProtoBuf.Builder.Message#encodeNB}.\r\n * @name ProtoBuf.Builder.Message#toBuffer\r\n * @function\r\n * @return {!Buffer}\r\n * @throws {Error} If the message cannot be encoded or if required fields are missing. The later still\r\n * returns the encoded node Buffer in the `encoded` property on the error.\r\n * @expose\r\n */\r\n MessagePrototype.toBuffer = MessagePrototype.encodeNB;\r\n\r\n /**\r\n * Directly encodes the message to a base64 encoded string.\r\n * @name ProtoBuf.Builder.Message#encode64\r\n * @function\r\n * @return {string} Base64 encoded string\r\n * @throws {Error} If the underlying buffer cannot be encoded or if required fields are missing. The later\r\n * still returns the encoded base64 string in the `encoded` property on the error.\r\n * @expose\r\n */\r\n MessagePrototype.encode64 = function() {\r\n try {\r\n return this.encode().toBase64();\r\n } catch (e) {\r\n if (e[\"encoded\"]) e[\"encoded\"] = e[\"encoded\"].toBase64();\r\n throw(e);\r\n }\r\n };\r\n\r\n /**\r\n * Returns the message as a base64 encoded string. This is an alias for {@link ProtoBuf.Builder.Message#encode64}.\r\n * @name ProtoBuf.Builder.Message#toBase64\r\n * @function\r\n * @return {string} Base64 encoded string\r\n * @throws {Error} If the message cannot be encoded or if required fields are missing. The later still\r\n * returns the encoded base64 string in the `encoded` property on the error.\r\n * @expose\r\n */\r\n MessagePrototype.toBase64 = MessagePrototype.encode64;\r\n\r\n /**\r\n * Directly encodes the message to a hex encoded string.\r\n * @name ProtoBuf.Builder.Message#encodeHex\r\n * @function\r\n * @return {string} Hex encoded string\r\n * @throws {Error} If the underlying buffer cannot be encoded or if required fields are missing. The later\r\n * still returns the encoded hex string in the `encoded` property on the error.\r\n * @expose\r\n */\r\n MessagePrototype.encodeHex = function() {\r\n try {\r\n return this.encode().toHex();\r\n } catch (e) {\r\n if (e[\"encoded\"]) e[\"encoded\"] = e[\"encoded\"].toHex();\r\n throw(e);\r\n }\r\n };\r\n\r\n /**\r\n * Returns the message as a hex encoded string. This is an alias for {@link ProtoBuf.Builder.Message#encodeHex}.\r\n * @name ProtoBuf.Builder.Message#toHex\r\n * @function\r\n * @return {string} Hex encoded string\r\n * @throws {Error} If the message cannot be encoded or if required fields are missing. The later still\r\n * returns the encoded hex string in the `encoded` property on the error.\r\n * @expose\r\n */\r\n MessagePrototype.toHex = MessagePrototype.encodeHex;\r\n\r\n /**\r\n * Clones a message object or field value to a raw object.\r\n * @param {*} obj Object to clone\r\n * @param {boolean} binaryAsBase64 Whether to include binary data as base64 strings or as a buffer otherwise\r\n * @param {boolean} longsAsStrings Whether to encode longs as strings\r\n * @param {!ProtoBuf.Reflect.T=} resolvedType The resolved field type if a field\r\n * @returns {*} Cloned object\r\n * @inner\r\n */\r\n function cloneRaw(obj, binaryAsBase64, longsAsStrings, resolvedType) {\r\n if (obj === null || typeof obj !== 'object') {\r\n // Convert enum values to their respective names\r\n if (resolvedType && resolvedType instanceof ProtoBuf.Reflect.Enum) {\r\n var name = ProtoBuf.Reflect.Enum.getName(resolvedType.object, obj);\r\n if (name !== null)\r\n return name;\r\n }\r\n // Pass-through string, number, boolean, null...\r\n return obj;\r\n }\r\n // Convert ByteBuffers to raw buffer or strings\r\n if (ByteBuffer.isByteBuffer(obj))\r\n return binaryAsBase64 ? obj.toBase64() : obj.toBuffer();\r\n // Convert Longs to proper objects or strings\r\n if (ProtoBuf.Long.isLong(obj))\r\n return longsAsStrings ? obj.toString() : ProtoBuf.Long.fromValue(obj);\r\n var clone;\r\n // Clone arrays\r\n if (Array.isArray(obj)) {\r\n clone = [];\r\n obj.forEach(function(v, k) {\r\n clone[k] = cloneRaw(v, binaryAsBase64, longsAsStrings, resolvedType);\r\n });\r\n return clone;\r\n }\r\n clone = {};\r\n // Convert maps to objects\r\n if (obj instanceof ProtoBuf.Map) {\r\n var it = obj.entries();\r\n for (var e = it.next(); !e.done; e = it.next())\r\n clone[obj.keyElem.valueToString(e.value[0])] = cloneRaw(e.value[1], binaryAsBase64, longsAsStrings, obj.valueElem.resolvedType);\r\n return clone;\r\n }\r\n // Everything else is a non-null object\r\n var type = obj.$type,\r\n field = undefined;\r\n for (var i in obj)\r\n if (obj.hasOwnProperty(i)) {\r\n if (type && (field = type.getChild(i)))\r\n clone[i] = cloneRaw(obj[i], binaryAsBase64, longsAsStrings, field.resolvedType);\r\n else\r\n clone[i] = cloneRaw(obj[i], binaryAsBase64, longsAsStrings);\r\n }\r\n return clone;\r\n }\r\n\r\n /**\r\n * Returns the message's raw payload.\r\n * @param {boolean=} binaryAsBase64 Whether to include binary data as base64 strings instead of Buffers, defaults to `false`\r\n * @param {boolean} longsAsStrings Whether to encode longs as strings\r\n * @returns {Object.} Raw payload\r\n * @expose\r\n */\r\n MessagePrototype.toRaw = function(binaryAsBase64, longsAsStrings) {\r\n return cloneRaw(this, !!binaryAsBase64, !!longsAsStrings, this.$type);\r\n };\r\n\r\n /**\r\n * Encodes a message to JSON.\r\n * @returns {string} JSON string\r\n * @expose\r\n */\r\n MessagePrototype.encodeJSON = function() {\r\n return JSON.stringify(\r\n cloneRaw(this,\r\n /* binary-as-base64 */ true,\r\n /* longs-as-strings */ true,\r\n this.$type\r\n )\r\n );\r\n };\r\n\r\n /**\r\n * Decodes a message from the specified buffer or string.\r\n * @name ProtoBuf.Builder.Message.decode\r\n * @function\r\n * @param {!ByteBuffer|!ArrayBuffer|!Buffer|string} buffer Buffer to decode from\r\n * @param {(number|string)=} length Message length. Defaults to decode all the remainig data.\r\n * @param {string=} enc Encoding if buffer is a string: hex, utf8 (not recommended), defaults to base64\r\n * @return {!ProtoBuf.Builder.Message} Decoded message\r\n * @throws {Error} If the message cannot be decoded or if required fields are missing. The later still\r\n * returns the decoded message with missing fields in the `decoded` property on the error.\r\n * @expose\r\n * @see ProtoBuf.Builder.Message.decode64\r\n * @see ProtoBuf.Builder.Message.decodeHex\r\n */\r\n Message.decode = function(buffer, length, enc) {\r\n if (typeof length === 'string')\r\n enc = length,\r\n length = -1;\r\n if (typeof buffer === 'string')\r\n buffer = ByteBuffer.wrap(buffer, enc ? enc : \"base64\");\r\n else if (!ByteBuffer.isByteBuffer(buffer))\r\n buffer = ByteBuffer.wrap(buffer); // May throw\r\n var le = buffer.littleEndian;\r\n try {\r\n var msg = T.decode(buffer.LE(), length);\r\n buffer.LE(le);\r\n return msg;\r\n } catch (e) {\r\n buffer.LE(le);\r\n throw(e);\r\n }\r\n };\r\n\r\n /**\r\n * Decodes a varint32 length-delimited message from the specified buffer or string.\r\n * @name ProtoBuf.Builder.Message.decodeDelimited\r\n * @function\r\n * @param {!ByteBuffer|!ArrayBuffer|!Buffer|string} buffer Buffer to decode from\r\n * @param {string=} enc Encoding if buffer is a string: hex, utf8 (not recommended), defaults to base64\r\n * @return {ProtoBuf.Builder.Message} Decoded message or `null` if not enough bytes are available yet\r\n * @throws {Error} If the message cannot be decoded or if required fields are missing. The later still\r\n * returns the decoded message with missing fields in the `decoded` property on the error.\r\n * @expose\r\n */\r\n Message.decodeDelimited = function(buffer, enc) {\r\n if (typeof buffer === 'string')\r\n buffer = ByteBuffer.wrap(buffer, enc ? enc : \"base64\");\r\n else if (!ByteBuffer.isByteBuffer(buffer))\r\n buffer = ByteBuffer.wrap(buffer); // May throw\r\n if (buffer.remaining() < 1)\r\n return null;\r\n var off = buffer.offset,\r\n len = buffer.readVarint32();\r\n if (buffer.remaining() < len) {\r\n buffer.offset = off;\r\n return null;\r\n }\r\n try {\r\n var msg = T.decode(buffer.slice(buffer.offset, buffer.offset + len).LE());\r\n buffer.offset += len;\r\n return msg;\r\n } catch (err) {\r\n buffer.offset += len;\r\n throw err;\r\n }\r\n };\r\n\r\n /**\r\n * Decodes the message from the specified base64 encoded string.\r\n * @name ProtoBuf.Builder.Message.decode64\r\n * @function\r\n * @param {string} str String to decode from\r\n * @return {!ProtoBuf.Builder.Message} Decoded message\r\n * @throws {Error} If the message cannot be decoded or if required fields are missing. The later still\r\n * returns the decoded message with missing fields in the `decoded` property on the error.\r\n * @expose\r\n */\r\n Message.decode64 = function(str) {\r\n return Message.decode(str, \"base64\");\r\n };\r\n\r\n /**\r\n * Decodes the message from the specified hex encoded string.\r\n * @name ProtoBuf.Builder.Message.decodeHex\r\n * @function\r\n * @param {string} str String to decode from\r\n * @return {!ProtoBuf.Builder.Message} Decoded message\r\n * @throws {Error} If the message cannot be decoded or if required fields are missing. The later still\r\n * returns the decoded message with missing fields in the `decoded` property on the error.\r\n * @expose\r\n */\r\n Message.decodeHex = function(str) {\r\n return Message.decode(str, \"hex\");\r\n };\r\n\r\n /**\r\n * Decodes the message from a JSON string.\r\n * @name ProtoBuf.Builder.Message.decodeJSON\r\n * @function\r\n * @param {string} str String to decode from\r\n * @return {!ProtoBuf.Builder.Message} Decoded message\r\n * @throws {Error} If the message cannot be decoded or if required fields are\r\n * missing.\r\n * @expose\r\n */\r\n Message.decodeJSON = function(str) {\r\n return new Message(JSON.parse(str));\r\n };\r\n\r\n // Utility\r\n\r\n /**\r\n * Returns a string representation of this Message.\r\n * @name ProtoBuf.Builder.Message#toString\r\n * @function\r\n * @return {string} String representation as of \".Fully.Qualified.MessageName\"\r\n * @expose\r\n */\r\n MessagePrototype.toString = function() {\r\n return T.toString();\r\n };\r\n\r\n // Properties\r\n\r\n /**\r\n * Message options.\r\n * @name ProtoBuf.Builder.Message.$options\r\n * @type {Object.}\r\n * @expose\r\n */\r\n var $optionsS; // cc needs this\r\n\r\n /**\r\n * Message options.\r\n * @name ProtoBuf.Builder.Message#$options\r\n * @type {Object.}\r\n * @expose\r\n */\r\n var $options;\r\n\r\n /**\r\n * Reflection type.\r\n * @name ProtoBuf.Builder.Message.$type\r\n * @type {!ProtoBuf.Reflect.Message}\r\n * @expose\r\n */\r\n var $typeS;\r\n\r\n /**\r\n * Reflection type.\r\n * @name ProtoBuf.Builder.Message#$type\r\n * @type {!ProtoBuf.Reflect.Message}\r\n * @expose\r\n */\r\n var $type;\r\n\r\n if (Object.defineProperty)\r\n Object.defineProperty(Message, '$options', { \"value\": T.buildOpt() }),\r\n Object.defineProperty(MessagePrototype, \"$options\", { \"value\": Message[\"$options\"] }),\r\n Object.defineProperty(Message, \"$type\", { \"value\": T }),\r\n Object.defineProperty(MessagePrototype, \"$type\", { \"value\": T });\r\n\r\n return Message;\r\n\r\n })(ProtoBuf, this);\r\n\r\n // Static enums and prototyped sub-messages / cached collections\r\n this._fields = [];\r\n this._fieldsById = {};\r\n this._fieldsByName = {};\r\n this._oneofsByName = {};\r\n for (var i=0, k=this.children.length, child; i>> 3;\r\n switch (wireType) {\r\n case ProtoBuf.WIRE_TYPES.VARINT:\r\n do tag = buf.readUint8();\r\n while ((tag & 0x80) === 0x80);\r\n break;\r\n case ProtoBuf.WIRE_TYPES.BITS64:\r\n buf.offset += 8;\r\n break;\r\n case ProtoBuf.WIRE_TYPES.LDELIM:\r\n tag = buf.readVarint32(); // reads the varint\r\n buf.offset += tag; // skips n bytes\r\n break;\r\n case ProtoBuf.WIRE_TYPES.STARTGROUP:\r\n skipTillGroupEnd(id, buf);\r\n break;\r\n case ProtoBuf.WIRE_TYPES.ENDGROUP:\r\n if (id === expectedId)\r\n return false;\r\n else\r\n throw Error(\"Illegal GROUPEND after unknown group: \"+id+\" (\"+expectedId+\" expected)\");\r\n case ProtoBuf.WIRE_TYPES.BITS32:\r\n buf.offset += 4;\r\n break;\r\n default:\r\n throw Error(\"Illegal wire type in unknown group \"+expectedId+\": \"+wireType);\r\n }\r\n return true;\r\n }\r\n\r\n /**\r\n * Decodes an encoded message and returns the decoded message.\r\n * @param {ByteBuffer} buffer ByteBuffer to decode from\r\n * @param {number=} length Message length. Defaults to decode all remaining data.\r\n * @param {number=} expectedGroupEndId Expected GROUPEND id if this is a legacy group\r\n * @return {ProtoBuf.Builder.Message} Decoded message\r\n * @throws {Error} If the message cannot be decoded\r\n * @expose\r\n */\r\n MessagePrototype.decode = function(buffer, length, expectedGroupEndId) {\r\n if (typeof length !== 'number')\r\n length = -1;\r\n var start = buffer.offset,\r\n msg = new (this.clazz)(),\r\n tag, wireType, id, field;\r\n while (buffer.offset < start+length || (length === -1 && buffer.remaining() > 0)) {\r\n tag = buffer.readVarint32();\r\n wireType = tag & 0x07;\r\n id = tag >>> 3;\r\n if (wireType === ProtoBuf.WIRE_TYPES.ENDGROUP) {\r\n if (id !== expectedGroupEndId)\r\n throw Error(\"Illegal group end indicator for \"+this.toString(true)+\": \"+id+\" (\"+(expectedGroupEndId ? expectedGroupEndId+\" expected\" : \"not a group\")+\")\");\r\n break;\r\n }\r\n if (!(field = this._fieldsById[id])) {\r\n // \"messages created by your new code can be parsed by your old code: old binaries simply ignore the new field when parsing.\"\r\n switch (wireType) {\r\n case ProtoBuf.WIRE_TYPES.VARINT:\r\n buffer.readVarint32();\r\n break;\r\n case ProtoBuf.WIRE_TYPES.BITS32:\r\n buffer.offset += 4;\r\n break;\r\n case ProtoBuf.WIRE_TYPES.BITS64:\r\n buffer.offset += 8;\r\n break;\r\n case ProtoBuf.WIRE_TYPES.LDELIM:\r\n var len = buffer.readVarint32();\r\n buffer.offset += len;\r\n break;\r\n case ProtoBuf.WIRE_TYPES.STARTGROUP:\r\n while (skipTillGroupEnd(id, buffer)) {}\r\n break;\r\n default:\r\n throw Error(\"Illegal wire type for unknown field \"+id+\" in \"+this.toString(true)+\"#decode: \"+wireType);\r\n }\r\n continue;\r\n }\r\n if (field.repeated && !field.options[\"packed\"]) {\r\n msg[field.name].push(field.decode(wireType, buffer));\r\n } else if (field.map) {\r\n var keyval = field.decode(wireType, buffer);\r\n msg[field.name].set(keyval[0], keyval[1]);\r\n } else {\r\n msg[field.name] = field.decode(wireType, buffer);\r\n if (field.oneof) { // Field is part of an OneOf (not a virtual OneOf field)\r\n var currentField = msg[field.oneof.name]; // Virtual field references currently set field\r\n if (currentField !== null && currentField !== field.name)\r\n msg[currentField] = null; // Clear currently set field\r\n msg[field.oneof.name] = field.name; // Point virtual field at this field\r\n }\r\n }\r\n }\r\n\r\n // Check if all required fields are present and set default values for optional fields that are not\r\n for (var i=0, k=this._fields.length; i=} options Options\r\n * @param {!ProtoBuf.Reflect.Message.OneOf=} oneof Enclosing OneOf\r\n * @param {string?} syntax The syntax level of this definition (e.g., proto3)\r\n * @constructor\r\n * @extends ProtoBuf.Reflect.T\r\n */\r\n var Field = function(builder, message, rule, keytype, type, name, id, options, oneof, syntax) {\r\n T.call(this, builder, message, name);\r\n\r\n /**\r\n * @override\r\n */\r\n this.className = \"Message.Field\";\r\n\r\n /**\r\n * Message field required flag.\r\n * @type {boolean}\r\n * @expose\r\n */\r\n this.required = rule === \"required\";\r\n\r\n /**\r\n * Message field repeated flag.\r\n * @type {boolean}\r\n * @expose\r\n */\r\n this.repeated = rule === \"repeated\";\r\n\r\n /**\r\n * Message field map flag.\r\n * @type {boolean}\r\n * @expose\r\n */\r\n this.map = rule === \"map\";\r\n\r\n /**\r\n * Message field key type. Type reference string if unresolved, protobuf\r\n * type if resolved. Valid only if this.map === true, null otherwise.\r\n * @type {string|{name: string, wireType: number}|null}\r\n * @expose\r\n */\r\n this.keyType = keytype || null;\r\n\r\n /**\r\n * Message field type. Type reference string if unresolved, protobuf type if\r\n * resolved. In a map field, this is the value type.\r\n * @type {string|{name: string, wireType: number}}\r\n * @expose\r\n */\r\n this.type = type;\r\n\r\n /**\r\n * Resolved type reference inside the global namespace.\r\n * @type {ProtoBuf.Reflect.T|null}\r\n * @expose\r\n */\r\n this.resolvedType = null;\r\n\r\n /**\r\n * Unique message field id.\r\n * @type {number}\r\n * @expose\r\n */\r\n this.id = id;\r\n\r\n /**\r\n * Message field options.\r\n * @type {!Object.}\r\n * @dict\r\n * @expose\r\n */\r\n this.options = options || {};\r\n\r\n /**\r\n * Default value.\r\n * @type {*}\r\n * @expose\r\n */\r\n this.defaultValue = null;\r\n\r\n /**\r\n * Enclosing OneOf.\r\n * @type {?ProtoBuf.Reflect.Message.OneOf}\r\n * @expose\r\n */\r\n this.oneof = oneof || null;\r\n\r\n /**\r\n * Syntax level of this definition (e.g., proto3).\r\n * @type {string}\r\n * @expose\r\n */\r\n this.syntax = syntax || 'proto2';\r\n\r\n /**\r\n * Original field name.\r\n * @type {string}\r\n * @expose\r\n */\r\n this.originalName = this.name; // Used to revert camelcase transformation on naming collisions\r\n\r\n /**\r\n * Element implementation. Created in build() after types are resolved.\r\n * @type {ProtoBuf.Element}\r\n * @expose\r\n */\r\n this.element = null;\r\n\r\n /**\r\n * Key element implementation, for map fields. Created in build() after\r\n * types are resolved.\r\n * @type {ProtoBuf.Element}\r\n * @expose\r\n */\r\n this.keyElement = null;\r\n\r\n // Convert field names to camel case notation if the override is set\r\n if (this.builder.options['convertFieldsToCamelCase'] && !(this instanceof Message.ExtensionField))\r\n this.name = ProtoBuf.Util.toCamelCase(this.name);\r\n };\r\n\r\n /**\r\n * @alias ProtoBuf.Reflect.Message.Field.prototype\r\n * @inner\r\n */\r\n var FieldPrototype = Field.prototype = Object.create(T.prototype);\r\n\r\n /**\r\n * Builds the field.\r\n * @override\r\n * @expose\r\n */\r\n FieldPrototype.build = function() {\r\n this.element = new Element(this.type, this.resolvedType, false, this.syntax, this.name);\r\n if (this.map)\r\n this.keyElement = new Element(this.keyType, undefined, true, this.syntax, this.name);\r\n\r\n // In proto3, fields do not have field presence, and every field is set to\r\n // its type's default value (\"\", 0, 0.0, or false).\r\n if (this.syntax === 'proto3' && !this.repeated && !this.map)\r\n this.defaultValue = Element.defaultFieldValue(this.type);\r\n\r\n // Otherwise, default values are present when explicitly specified\r\n else if (typeof this.options['default'] !== 'undefined')\r\n this.defaultValue = this.verifyValue(this.options['default']);\r\n };\r\n\r\n /**\r\n * Checks if the given value can be set for this field.\r\n * @param {*} value Value to check\r\n * @param {boolean=} skipRepeated Whether to skip the repeated value check or not. Defaults to false.\r\n * @return {*} Verified, maybe adjusted, value\r\n * @throws {Error} If the value cannot be set for this field\r\n * @expose\r\n */\r\n FieldPrototype.verifyValue = function(value, skipRepeated) {\r\n skipRepeated = skipRepeated || false;\r\n var self = this;\r\n function fail(val, msg) {\r\n throw Error(\"Illegal value for \"+self.toString(true)+\" of type \"+self.type.name+\": \"+val+\" (\"+msg+\")\");\r\n }\r\n if (value === null) { // NULL values for optional fields\r\n if (this.required)\r\n fail(typeof value, \"required\");\r\n if (this.syntax === 'proto3' && this.type !== ProtoBuf.TYPES[\"message\"])\r\n fail(typeof value, \"proto3 field without field presence cannot be null\");\r\n return null;\r\n }\r\n var i;\r\n if (this.repeated && !skipRepeated) { // Repeated values as arrays\r\n if (!Array.isArray(value))\r\n value = [value];\r\n var res = [];\r\n for (i=0; i 0;\r\n\r\n case ProtoBuf.TYPES[\"bytes\"]:\r\n return value.remaining() > 0;\r\n\r\n case ProtoBuf.TYPES[\"enum\"]:\r\n return value !== 0;\r\n\r\n case ProtoBuf.TYPES[\"message\"]:\r\n return value !== null;\r\n default:\r\n return true;\r\n }\r\n };\r\n\r\n /**\r\n * Encodes the specified field value to the specified buffer.\r\n * @param {*} value Verified field value\r\n * @param {ByteBuffer} buffer ByteBuffer to encode to\r\n * @param {!ProtoBuf.Builder.Message} message Runtime message\r\n * @return {ByteBuffer} The ByteBuffer for chaining\r\n * @throws {Error} If the field cannot be encoded\r\n * @expose\r\n */\r\n FieldPrototype.encode = function(value, buffer, message) {\r\n if (this.type === null || typeof this.type !== 'object')\r\n throw Error(\"[INTERNAL] Unresolved type in \"+this.toString(true)+\": \"+this.type);\r\n if (value === null || (this.repeated && value.length == 0))\r\n return buffer; // Optional omitted\r\n try {\r\n if (this.repeated) {\r\n var i;\r\n // \"Only repeated fields of primitive numeric types (types which use the varint, 32-bit, or 64-bit wire\r\n // types) can be declared 'packed'.\"\r\n if (this.options[\"packed\"] && ProtoBuf.PACKABLE_WIRE_TYPES.indexOf(this.type.wireType) >= 0) {\r\n // \"All of the elements of the field are packed into a single key-value pair with wire type 2\r\n // (length-delimited). Each element is encoded the same way it would be normally, except without a\r\n // tag preceding it.\"\r\n buffer.writeVarint32((this.id << 3) | ProtoBuf.WIRE_TYPES.LDELIM);\r\n buffer.ensureCapacity(buffer.offset += 1); // We do not know the length yet, so let's assume a varint of length 1\r\n var start = buffer.offset; // Remember where the contents begin\r\n for (i=0; i 1) { // We need to move the contents\r\n var contents = buffer.slice(start, buffer.offset);\r\n start += varintLen-1;\r\n buffer.offset = start;\r\n buffer.append(contents);\r\n }\r\n buffer.writeVarint32(len, start-varintLen);\r\n } else {\r\n // \"If your message definition has repeated elements (without the [packed=true] option), the encoded\r\n // message has zero or more key-value pairs with the same tag number\"\r\n for (i=0; i= 0) {\r\n n += ByteBuffer.calculateVarint32((this.id << 3) | ProtoBuf.WIRE_TYPES.LDELIM);\r\n ni = 0;\r\n for (i=0; i= 0) {\r\n if (!skipRepeated) {\r\n nBytes = buffer.readVarint32();\r\n nBytes = buffer.offset + nBytes; // Limit\r\n var values = [];\r\n while (buffer.offset < nBytes)\r\n values.push(this.decode(this.type.wireType, buffer, true));\r\n return values;\r\n }\r\n // Read the next value otherwise...\r\n }\r\n\r\n // Handle maps.\r\n if (this.map) {\r\n // Read one (key, value) submessage, and return [key, value]\r\n var key = Element.defaultFieldValue(this.keyType);\r\n value = Element.defaultFieldValue(this.type);\r\n\r\n // Read the length\r\n nBytes = buffer.readVarint32();\r\n if (buffer.remaining() < nBytes)\r\n throw Error(\"Illegal number of bytes for \"+this.toString(true)+\": \"+nBytes+\" required but got only \"+buffer.remaining());\r\n\r\n // Get a sub-buffer of this key/value submessage\r\n var msgbuf = buffer.clone();\r\n msgbuf.limit = msgbuf.offset + nBytes;\r\n buffer.offset += nBytes;\r\n\r\n while (msgbuf.remaining() > 0) {\r\n var tag = msgbuf.readVarint32();\r\n wireType = tag & 0x07;\r\n var id = tag >>> 3;\r\n if (id === 1) {\r\n key = this.keyElement.decode(msgbuf, wireType, id);\r\n } else if (id === 2) {\r\n value = this.element.decode(msgbuf, wireType, id);\r\n } else {\r\n throw Error(\"Unexpected tag in map field key/value submessage\");\r\n }\r\n }\r\n\r\n return [key, value];\r\n }\r\n\r\n // Handle singular and non-packed repeated field values.\r\n return this.element.decode(buffer, wireType, this.id);\r\n };\r\n\r\n /**\r\n * @alias ProtoBuf.Reflect.Message.Field\r\n * @expose\r\n */\r\n Reflect.Message.Field = Field;\r\n\r\n /**\r\n * Constructs a new Message ExtensionField.\r\n * @exports ProtoBuf.Reflect.Message.ExtensionField\r\n * @param {!ProtoBuf.Builder} builder Builder reference\r\n * @param {!ProtoBuf.Reflect.Message} message Message reference\r\n * @param {string} rule Rule, one of requried, optional, repeated\r\n * @param {string} type Data type, e.g. int32\r\n * @param {string} name Field name\r\n * @param {number} id Unique field id\r\n * @param {!Object.=} options Options\r\n * @constructor\r\n * @extends ProtoBuf.Reflect.Message.Field\r\n */\r\n var ExtensionField = function(builder, message, rule, type, name, id, options) {\r\n Field.call(this, builder, message, rule, /* keytype = */ null, type, name, id, options);\r\n\r\n /**\r\n * Extension reference.\r\n * @type {!ProtoBuf.Reflect.Extension}\r\n * @expose\r\n */\r\n this.extension;\r\n };\r\n\r\n // Extends Field\r\n ExtensionField.prototype = Object.create(Field.prototype);\r\n\r\n /**\r\n * @alias ProtoBuf.Reflect.Message.ExtensionField\r\n * @expose\r\n */\r\n Reflect.Message.ExtensionField = ExtensionField;\r\n\r\n /**\r\n * Constructs a new Message OneOf.\r\n * @exports ProtoBuf.Reflect.Message.OneOf\r\n * @param {!ProtoBuf.Builder} builder Builder reference\r\n * @param {!ProtoBuf.Reflect.Message} message Message reference\r\n * @param {string} name OneOf name\r\n * @constructor\r\n * @extends ProtoBuf.Reflect.T\r\n */\r\n var OneOf = function(builder, message, name) {\r\n T.call(this, builder, message, name);\r\n\r\n /**\r\n * Enclosed fields.\r\n * @type {!Array.}\r\n * @expose\r\n */\r\n this.fields = [];\r\n };\r\n\r\n /**\r\n * @alias ProtoBuf.Reflect.Message.OneOf\r\n * @expose\r\n */\r\n Reflect.Message.OneOf = OneOf;\r\n\r\n /**\r\n * Constructs a new Enum.\r\n * @exports ProtoBuf.Reflect.Enum\r\n * @param {!ProtoBuf.Builder} builder Builder reference\r\n * @param {!ProtoBuf.Reflect.T} parent Parent Reflect object\r\n * @param {string} name Enum name\r\n * @param {Object.=} options Enum options\r\n * @param {string?} syntax The syntax level (e.g., proto3)\r\n * @constructor\r\n * @extends ProtoBuf.Reflect.Namespace\r\n */\r\n var Enum = function(builder, parent, name, options, syntax) {\r\n Namespace.call(this, builder, parent, name, options, syntax);\r\n\r\n /**\r\n * @override\r\n */\r\n this.className = \"Enum\";\r\n\r\n /**\r\n * Runtime enum object.\r\n * @type {Object.|null}\r\n * @expose\r\n */\r\n this.object = null;\r\n };\r\n\r\n /**\r\n * Gets the string name of an enum value.\r\n * @param {!ProtoBuf.Builder.Enum} enm Runtime enum\r\n * @param {number} value Enum value\r\n * @returns {?string} Name or `null` if not present\r\n * @expose\r\n */\r\n Enum.getName = function(enm, value) {\r\n var keys = Object.keys(enm);\r\n for (var i=0, key; i}\r\n * @expose\r\n */\r\n EnumPrototype.build = function(rebuild) {\r\n if (this.object && !rebuild)\r\n return this.object;\r\n var enm = new ProtoBuf.Builder.Enum(),\r\n values = this.getChildren(Enum.Value);\r\n for (var i=0, k=values.length; i=} options Options\r\n * @constructor\r\n * @extends ProtoBuf.Reflect.Namespace\r\n */\r\n var Service = function(builder, root, name, options) {\r\n Namespace.call(this, builder, root, name, options);\r\n\r\n /**\r\n * @override\r\n */\r\n this.className = \"Service\";\r\n\r\n /**\r\n * Built runtime service class.\r\n * @type {?function(new:ProtoBuf.Builder.Service)}\r\n */\r\n this.clazz = null;\r\n };\r\n\r\n /**\r\n * @alias ProtoBuf.Reflect.Service.prototype\r\n * @inner\r\n */\r\n var ServicePrototype = Service.prototype = Object.create(Namespace.prototype);\r\n\r\n /**\r\n * Builds the service and returns the runtime counterpart, which is a fully functional class.\r\n * @see ProtoBuf.Builder.Service\r\n * @param {boolean=} rebuild Whether to rebuild or not\r\n * @return {Function} Service class\r\n * @throws {Error} If the message cannot be built\r\n * @expose\r\n */\r\n ServicePrototype.build = function(rebuild) {\r\n if (this.clazz && !rebuild)\r\n return this.clazz;\r\n\r\n // Create the runtime Service class in its own scope\r\n return this.clazz = (function(ProtoBuf, T) {\r\n\r\n /**\r\n * Constructs a new runtime Service.\r\n * @name ProtoBuf.Builder.Service\r\n * @param {function(string, ProtoBuf.Builder.Message, function(Error, ProtoBuf.Builder.Message=))=} rpcImpl RPC implementation receiving the method name and the message\r\n * @class Barebone of all runtime services.\r\n * @constructor\r\n * @throws {Error} If the service cannot be created\r\n */\r\n var Service = function(rpcImpl) {\r\n ProtoBuf.Builder.Service.call(this);\r\n\r\n /**\r\n * Service implementation.\r\n * @name ProtoBuf.Builder.Service#rpcImpl\r\n * @type {!function(string, ProtoBuf.Builder.Message, function(Error, ProtoBuf.Builder.Message=))}\r\n * @expose\r\n */\r\n this.rpcImpl = rpcImpl || function(name, msg, callback) {\r\n // This is what a user has to implement: A function receiving the method name, the actual message to\r\n // send (type checked) and the callback that's either provided with the error as its first\r\n // argument or null and the actual response message.\r\n setTimeout(callback.bind(this, Error(\"Not implemented, see: https://github.com/dcodeIO/ProtoBuf.js/wiki/Services\")), 0); // Must be async!\r\n };\r\n };\r\n\r\n /**\r\n * @alias ProtoBuf.Builder.Service.prototype\r\n * @inner\r\n */\r\n var ServicePrototype = Service.prototype = Object.create(ProtoBuf.Builder.Service.prototype);\r\n\r\n /**\r\n * Asynchronously performs an RPC call using the given RPC implementation.\r\n * @name ProtoBuf.Builder.Service.[Method]\r\n * @function\r\n * @param {!function(string, ProtoBuf.Builder.Message, function(Error, ProtoBuf.Builder.Message=))} rpcImpl RPC implementation\r\n * @param {ProtoBuf.Builder.Message} req Request\r\n * @param {function(Error, (ProtoBuf.Builder.Message|ByteBuffer|Buffer|string)=)} callback Callback receiving\r\n * the error if any and the response either as a pre-parsed message or as its raw bytes\r\n * @abstract\r\n */\r\n\r\n /**\r\n * Asynchronously performs an RPC call using the instance's RPC implementation.\r\n * @name ProtoBuf.Builder.Service#[Method]\r\n * @function\r\n * @param {ProtoBuf.Builder.Message} req Request\r\n * @param {function(Error, (ProtoBuf.Builder.Message|ByteBuffer|Buffer|string)=)} callback Callback receiving\r\n * the error if any and the response either as a pre-parsed message or as its raw bytes\r\n * @abstract\r\n */\r\n\r\n var rpc = T.getChildren(ProtoBuf.Reflect.Service.RPCMethod);\r\n for (var i=0; i}\r\n * @expose\r\n */\r\n var $optionsS; // cc needs this\r\n\r\n /**\r\n * Service options.\r\n * @name ProtoBuf.Builder.Service#$options\r\n * @type {Object.}\r\n * @expose\r\n */\r\n var $options;\r\n\r\n /**\r\n * Reflection type.\r\n * @name ProtoBuf.Builder.Service.$type\r\n * @type {!ProtoBuf.Reflect.Service}\r\n * @expose\r\n */\r\n var $typeS;\r\n\r\n /**\r\n * Reflection type.\r\n * @name ProtoBuf.Builder.Service#$type\r\n * @type {!ProtoBuf.Reflect.Service}\r\n * @expose\r\n */\r\n var $type;\r\n\r\n if (Object.defineProperty)\r\n Object.defineProperty(Service, \"$options\", { \"value\": T.buildOpt() }),\r\n Object.defineProperty(ServicePrototype, \"$options\", { \"value\": Service[\"$options\"] }),\r\n Object.defineProperty(Service, \"$type\", { \"value\": T }),\r\n Object.defineProperty(ServicePrototype, \"$type\", { \"value\": T });\r\n\r\n return Service;\r\n\r\n })(ProtoBuf, this);\r\n };\r\n\r\n /**\r\n * @alias ProtoBuf.Reflect.Service\r\n * @expose\r\n */\r\n Reflect.Service = Service;\r\n\r\n /**\r\n * Abstract service method.\r\n * @exports ProtoBuf.Reflect.Service.Method\r\n * @param {!ProtoBuf.Builder} builder Builder reference\r\n * @param {!ProtoBuf.Reflect.Service} svc Service\r\n * @param {string} name Method name\r\n * @param {Object.=} options Options\r\n * @constructor\r\n * @extends ProtoBuf.Reflect.T\r\n */\r\n var Method = function(builder, svc, name, options) {\r\n T.call(this, builder, svc, name);\r\n\r\n /**\r\n * @override\r\n */\r\n this.className = \"Service.Method\";\r\n\r\n /**\r\n * Options.\r\n * @type {Object.}\r\n * @expose\r\n */\r\n this.options = options || {};\r\n };\r\n\r\n /**\r\n * @alias ProtoBuf.Reflect.Service.Method.prototype\r\n * @inner\r\n */\r\n var MethodPrototype = Method.prototype = Object.create(T.prototype);\r\n\r\n /**\r\n * Builds the method's '$options' property.\r\n * @name ProtoBuf.Reflect.Service.Method#buildOpt\r\n * @function\r\n * @return {Object.}\r\n */\r\n MethodPrototype.buildOpt = NamespacePrototype.buildOpt;\r\n\r\n /**\r\n * @alias ProtoBuf.Reflect.Service.Method\r\n * @expose\r\n */\r\n Reflect.Service.Method = Method;\r\n\r\n /**\r\n * RPC service method.\r\n * @exports ProtoBuf.Reflect.Service.RPCMethod\r\n * @param {!ProtoBuf.Builder} builder Builder reference\r\n * @param {!ProtoBuf.Reflect.Service} svc Service\r\n * @param {string} name Method name\r\n * @param {string} request Request message name\r\n * @param {string} response Response message name\r\n * @param {boolean} request_stream Whether requests are streamed\r\n * @param {boolean} response_stream Whether responses are streamed\r\n * @param {Object.=} options Options\r\n * @constructor\r\n * @extends ProtoBuf.Reflect.Service.Method\r\n */\r\n var RPCMethod = function(builder, svc, name, request, response, request_stream, response_stream, options) {\r\n Method.call(this, builder, svc, name, options);\r\n\r\n /**\r\n * @override\r\n */\r\n this.className = \"Service.RPCMethod\";\r\n\r\n /**\r\n * Request message name.\r\n * @type {string}\r\n * @expose\r\n */\r\n this.requestName = request;\r\n\r\n /**\r\n * Response message name.\r\n * @type {string}\r\n * @expose\r\n */\r\n this.responseName = response;\r\n\r\n /**\r\n * Whether requests are streamed\r\n * @type {bool}\r\n * @expose\r\n */\r\n this.requestStream = request_stream;\r\n\r\n /**\r\n * Whether responses are streamed\r\n * @type {bool}\r\n * @expose\r\n */\r\n this.responseStream = response_stream;\r\n\r\n /**\r\n * Resolved request message type.\r\n * @type {ProtoBuf.Reflect.Message}\r\n * @expose\r\n */\r\n this.resolvedRequestType = null;\r\n\r\n /**\r\n * Resolved response message type.\r\n * @type {ProtoBuf.Reflect.Message}\r\n * @expose\r\n */\r\n this.resolvedResponseType = null;\r\n };\r\n\r\n // Extends Method\r\n RPCMethod.prototype = Object.create(Method.prototype);\r\n\r\n /**\r\n * @alias ProtoBuf.Reflect.Service.RPCMethod\r\n * @expose\r\n */\r\n Reflect.Service.RPCMethod = RPCMethod;\r\n\r\n return Reflect;\r\n\r\n })(ProtoBuf);\r\n\r\n /**\r\n * @alias ProtoBuf.Builder\r\n * @expose\r\n */\r\n ProtoBuf.Builder = (function(ProtoBuf, Lang, Reflect) {\r\n \"use strict\";\r\n\r\n /**\r\n * Constructs a new Builder.\r\n * @exports ProtoBuf.Builder\r\n * @class Provides the functionality to build protocol messages.\r\n * @param {Object.=} options Options\r\n * @constructor\r\n */\r\n var Builder = function(options) {\r\n\r\n /**\r\n * Namespace.\r\n * @type {ProtoBuf.Reflect.Namespace}\r\n * @expose\r\n */\r\n this.ns = new Reflect.Namespace(this, null, \"\"); // Global namespace\r\n\r\n /**\r\n * Namespace pointer.\r\n * @type {ProtoBuf.Reflect.T}\r\n * @expose\r\n */\r\n this.ptr = this.ns;\r\n\r\n /**\r\n * Resolved flag.\r\n * @type {boolean}\r\n * @expose\r\n */\r\n this.resolved = false;\r\n\r\n /**\r\n * The current building result.\r\n * @type {Object.|null}\r\n * @expose\r\n */\r\n this.result = null;\r\n\r\n /**\r\n * Imported files.\r\n * @type {Array.}\r\n * @expose\r\n */\r\n this.files = {};\r\n\r\n /**\r\n * Import root override.\r\n * @type {?string}\r\n * @expose\r\n */\r\n this.importRoot = null;\r\n\r\n /**\r\n * Options.\r\n * @type {!Object.}\r\n * @expose\r\n */\r\n this.options = options || {};\r\n };\r\n\r\n /**\r\n * @alias ProtoBuf.Builder.prototype\r\n * @inner\r\n */\r\n var BuilderPrototype = Builder.prototype;\r\n\r\n // ----- Definition tests -----\r\n\r\n /**\r\n * Tests if a definition most likely describes a message.\r\n * @param {!Object} def\r\n * @returns {boolean}\r\n * @expose\r\n */\r\n Builder.isMessage = function(def) {\r\n // Messages require a string name\r\n if (typeof def[\"name\"] !== 'string')\r\n return false;\r\n // Messages do not contain values (enum) or rpc methods (service)\r\n if (typeof def[\"values\"] !== 'undefined' || typeof def[\"rpc\"] !== 'undefined')\r\n return false;\r\n return true;\r\n };\r\n\r\n /**\r\n * Tests if a definition most likely describes a message field.\r\n * @param {!Object} def\r\n * @returns {boolean}\r\n * @expose\r\n */\r\n Builder.isMessageField = function(def) {\r\n // Message fields require a string rule, name and type and an id\r\n if (typeof def[\"rule\"] !== 'string' || typeof def[\"name\"] !== 'string' || typeof def[\"type\"] !== 'string' || typeof def[\"id\"] === 'undefined')\r\n return false;\r\n return true;\r\n };\r\n\r\n /**\r\n * Tests if a definition most likely describes an enum.\r\n * @param {!Object} def\r\n * @returns {boolean}\r\n * @expose\r\n */\r\n Builder.isEnum = function(def) {\r\n // Enums require a string name\r\n if (typeof def[\"name\"] !== 'string')\r\n return false;\r\n // Enums require at least one value\r\n if (typeof def[\"values\"] === 'undefined' || !Array.isArray(def[\"values\"]) || def[\"values\"].length === 0)\r\n return false;\r\n return true;\r\n };\r\n\r\n /**\r\n * Tests if a definition most likely describes a service.\r\n * @param {!Object} def\r\n * @returns {boolean}\r\n * @expose\r\n */\r\n Builder.isService = function(def) {\r\n // Services require a string name and an rpc object\r\n if (typeof def[\"name\"] !== 'string' || typeof def[\"rpc\"] !== 'object' || !def[\"rpc\"])\r\n return false;\r\n return true;\r\n };\r\n\r\n /**\r\n * Tests if a definition most likely describes an extended message\r\n * @param {!Object} def\r\n * @returns {boolean}\r\n * @expose\r\n */\r\n Builder.isExtend = function(def) {\r\n // Extends rquire a string ref\r\n if (typeof def[\"ref\"] !== 'string')\r\n return false;\r\n return true;\r\n };\r\n\r\n // ----- Building -----\r\n\r\n /**\r\n * Resets the pointer to the root namespace.\r\n * @returns {!ProtoBuf.Builder} this\r\n * @expose\r\n */\r\n BuilderPrototype.reset = function() {\r\n this.ptr = this.ns;\r\n return this;\r\n };\r\n\r\n /**\r\n * Defines a namespace on top of the current pointer position and places the pointer on it.\r\n * @param {string} namespace\r\n * @return {!ProtoBuf.Builder} this\r\n * @expose\r\n */\r\n BuilderPrototype.define = function(namespace) {\r\n if (typeof namespace !== 'string' || !Lang.TYPEREF.test(namespace))\r\n throw Error(\"illegal namespace: \"+namespace);\r\n namespace.split(\".\").forEach(function(part) {\r\n var ns = this.ptr.getChild(part);\r\n if (ns === null) // Keep existing\r\n this.ptr.addChild(ns = new Reflect.Namespace(this, this.ptr, part));\r\n this.ptr = ns;\r\n }, this);\r\n return this;\r\n };\r\n\r\n /**\r\n * Creates the specified definitions at the current pointer position.\r\n * @param {!Array.} defs Messages, enums or services to create\r\n * @returns {!ProtoBuf.Builder} this\r\n * @throws {Error} If a message definition is invalid\r\n * @expose\r\n */\r\n BuilderPrototype.create = function(defs) {\r\n if (!defs)\r\n return this; // Nothing to create\r\n if (!Array.isArray(defs))\r\n defs = [defs];\r\n else {\r\n if (defs.length === 0)\r\n return this;\r\n defs = defs.slice();\r\n }\r\n\r\n // It's quite hard to keep track of scopes and memory here, so let's do this iteratively.\r\n var stack = [defs];\r\n while (stack.length > 0) {\r\n defs = stack.pop();\r\n\r\n if (!Array.isArray(defs)) // Stack always contains entire namespaces\r\n throw Error(\"not a valid namespace: \"+JSON.stringify(defs));\r\n\r\n while (defs.length > 0) {\r\n var def = defs.shift(); // Namespaces always contain an array of messages, enums and services\r\n\r\n if (Builder.isMessage(def)) {\r\n var obj = new Reflect.Message(this, this.ptr, def[\"name\"], def[\"options\"], def[\"isGroup\"], def[\"syntax\"]);\r\n\r\n // Create OneOfs\r\n var oneofs = {};\r\n if (def[\"oneofs\"])\r\n Object.keys(def[\"oneofs\"]).forEach(function(name) {\r\n obj.addChild(oneofs[name] = new Reflect.Message.OneOf(this, obj, name));\r\n }, this);\r\n\r\n // Create fields\r\n if (def[\"fields\"])\r\n def[\"fields\"].forEach(function(fld) {\r\n if (obj.getChild(fld[\"id\"]|0) !== null)\r\n throw Error(\"duplicate or invalid field id in \"+obj.name+\": \"+fld['id']);\r\n if (fld[\"options\"] && typeof fld[\"options\"] !== 'object')\r\n throw Error(\"illegal field options in \"+obj.name+\"#\"+fld[\"name\"]);\r\n var oneof = null;\r\n if (typeof fld[\"oneof\"] === 'string' && !(oneof = oneofs[fld[\"oneof\"]]))\r\n throw Error(\"illegal oneof in \"+obj.name+\"#\"+fld[\"name\"]+\": \"+fld[\"oneof\"]);\r\n fld = new Reflect.Message.Field(this, obj, fld[\"rule\"], fld[\"keytype\"], fld[\"type\"], fld[\"name\"], fld[\"id\"], fld[\"options\"], oneof, def[\"syntax\"]);\r\n if (oneof)\r\n oneof.fields.push(fld);\r\n obj.addChild(fld);\r\n }, this);\r\n\r\n // Push children to stack\r\n var subObj = [];\r\n if (def[\"enums\"])\r\n def[\"enums\"].forEach(function(enm) {\r\n subObj.push(enm);\r\n });\r\n if (def[\"messages\"])\r\n def[\"messages\"].forEach(function(msg) {\r\n subObj.push(msg);\r\n });\r\n if (def[\"services\"])\r\n def[\"services\"].forEach(function(svc) {\r\n subObj.push(svc);\r\n });\r\n\r\n // Set extension ranges\r\n if (def[\"extensions\"]) {\r\n if (typeof def[\"extensions\"][0] === 'number') // pre 5.0.1\r\n obj.extensions = [ def[\"extensions\"] ];\r\n else\r\n obj.extensions = def[\"extensions\"];\r\n }\r\n\r\n // Create on top of current namespace\r\n this.ptr.addChild(obj);\r\n if (subObj.length > 0) {\r\n stack.push(defs); // Push the current level back\r\n defs = subObj; // Continue processing sub level\r\n subObj = null;\r\n this.ptr = obj; // And move the pointer to this namespace\r\n obj = null;\r\n continue;\r\n }\r\n subObj = null;\r\n\r\n } else if (Builder.isEnum(def)) {\r\n\r\n obj = new Reflect.Enum(this, this.ptr, def[\"name\"], def[\"options\"], def[\"syntax\"]);\r\n def[\"values\"].forEach(function(val) {\r\n obj.addChild(new Reflect.Enum.Value(this, obj, val[\"name\"], val[\"id\"]));\r\n }, this);\r\n this.ptr.addChild(obj);\r\n\r\n } else if (Builder.isService(def)) {\r\n\r\n obj = new Reflect.Service(this, this.ptr, def[\"name\"], def[\"options\"]);\r\n Object.keys(def[\"rpc\"]).forEach(function(name) {\r\n var mtd = def[\"rpc\"][name];\r\n obj.addChild(new Reflect.Service.RPCMethod(this, obj, name, mtd[\"request\"], mtd[\"response\"], !!mtd[\"request_stream\"], !!mtd[\"response_stream\"], mtd[\"options\"]));\r\n }, this);\r\n this.ptr.addChild(obj);\r\n\r\n } else if (Builder.isExtend(def)) {\r\n\r\n obj = this.ptr.resolve(def[\"ref\"], true);\r\n if (obj) {\r\n def[\"fields\"].forEach(function(fld) {\r\n if (obj.getChild(fld['id']|0) !== null)\r\n throw Error(\"duplicate extended field id in \"+obj.name+\": \"+fld['id']);\r\n // Check if field id is allowed to be extended\r\n if (obj.extensions) {\r\n var valid = false;\r\n obj.extensions.forEach(function(range) {\r\n if (fld[\"id\"] >= range[0] && fld[\"id\"] <= range[1])\r\n valid = true;\r\n });\r\n if (!valid)\r\n throw Error(\"illegal extended field id in \"+obj.name+\": \"+fld['id']+\" (not within valid ranges)\");\r\n }\r\n // Convert extension field names to camel case notation if the override is set\r\n var name = fld[\"name\"];\r\n if (this.options['convertFieldsToCamelCase'])\r\n name = ProtoBuf.Util.toCamelCase(name);\r\n // see #161: Extensions use their fully qualified name as their runtime key and...\r\n var field = new Reflect.Message.ExtensionField(this, obj, fld[\"rule\"], fld[\"type\"], this.ptr.fqn()+'.'+name, fld[\"id\"], fld[\"options\"]);\r\n // ...are added on top of the current namespace as an extension which is used for\r\n // resolving their type later on (the extension always keeps the original name to\r\n // prevent naming collisions)\r\n var ext = new Reflect.Extension(this, this.ptr, fld[\"name\"], field);\r\n field.extension = ext;\r\n this.ptr.addChild(ext);\r\n obj.addChild(field);\r\n }, this);\r\n\r\n } else if (!/\\.?google\\.protobuf\\./.test(def[\"ref\"])) // Silently skip internal extensions\r\n throw Error(\"extended message \"+def[\"ref\"]+\" is not defined\");\r\n\r\n } else\r\n throw Error(\"not a valid definition: \"+JSON.stringify(def));\r\n\r\n def = null;\r\n obj = null;\r\n }\r\n // Break goes here\r\n defs = null;\r\n this.ptr = this.ptr.parent; // Namespace done, continue at parent\r\n }\r\n this.resolved = false; // Require re-resolve\r\n this.result = null; // Require re-build\r\n return this;\r\n };\r\n\r\n /**\r\n * Propagates syntax to all children.\r\n * @param {!Object} parent\r\n * @inner\r\n */\r\n function propagateSyntax(parent) {\r\n if (parent['messages']) {\r\n parent['messages'].forEach(function(child) {\r\n child[\"syntax\"] = parent[\"syntax\"];\r\n propagateSyntax(child);\r\n });\r\n }\r\n if (parent['enums']) {\r\n parent['enums'].forEach(function(child) {\r\n child[\"syntax\"] = parent[\"syntax\"];\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * Imports another definition into this builder.\r\n * @param {Object.} json Parsed import\r\n * @param {(string|{root: string, file: string})=} filename Imported file name\r\n * @returns {!ProtoBuf.Builder} this\r\n * @throws {Error} If the definition or file cannot be imported\r\n * @expose\r\n */\r\n BuilderPrototype[\"import\"] = function(json, filename) {\r\n var delim = '/';\r\n\r\n // Make sure to skip duplicate imports\r\n\r\n if (typeof filename === 'string') {\r\n\r\n if (ProtoBuf.Util.IS_NODE)\r\n filename = require(\"path\")['resolve'](filename);\r\n if (this.files[filename] === true)\r\n return this.reset();\r\n this.files[filename] = true;\r\n\r\n } else if (typeof filename === 'object') { // Object with root, file.\r\n\r\n var root = filename.root;\r\n if (ProtoBuf.Util.IS_NODE)\r\n root = require(\"path\")['resolve'](root);\r\n if (root.indexOf(\"\\\\\") >= 0 || filename.file.indexOf(\"\\\\\") >= 0)\r\n delim = '\\\\';\r\n var fname;\r\n if (ProtoBuf.Util.IS_NODE)\r\n fname = require(\"path\")['join'](root, filename.file);\r\n else\r\n fname = root + delim + filename.file;\r\n if (this.files[fname] === true)\r\n return this.reset();\r\n this.files[fname] = true;\r\n }\r\n\r\n // Import imports\r\n\r\n if (json['imports'] && json['imports'].length > 0) {\r\n var importRoot,\r\n resetRoot = false;\r\n\r\n if (typeof filename === 'object') { // If an import root is specified, override\r\n\r\n this.importRoot = filename[\"root\"]; resetRoot = true; // ... and reset afterwards\r\n importRoot = this.importRoot;\r\n filename = filename[\"file\"];\r\n if (importRoot.indexOf(\"\\\\\") >= 0 || filename.indexOf(\"\\\\\") >= 0)\r\n delim = '\\\\';\r\n\r\n } else if (typeof filename === 'string') {\r\n\r\n if (this.importRoot) // If import root is overridden, use it\r\n importRoot = this.importRoot;\r\n else { // Otherwise compute from filename\r\n if (filename.indexOf(\"/\") >= 0) { // Unix\r\n importRoot = filename.replace(/\\/[^\\/]*$/, \"\");\r\n if (/* /file.proto */ importRoot === \"\")\r\n importRoot = \"/\";\r\n } else if (filename.indexOf(\"\\\\\") >= 0) { // Windows\r\n importRoot = filename.replace(/\\\\[^\\\\]*$/, \"\");\r\n delim = '\\\\';\r\n } else\r\n importRoot = \".\";\r\n }\r\n\r\n } else\r\n importRoot = null;\r\n\r\n for (var i=0; i)=} path Specifies what to return. If omitted, the entire namespace will be returned.\r\n * @returns {!ProtoBuf.Builder.Message|!Object.}\r\n * @throws {Error} If a type could not be resolved\r\n * @expose\r\n */\r\n BuilderPrototype.build = function(path) {\r\n this.reset();\r\n if (!this.resolved)\r\n this.resolveAll(),\r\n this.resolved = true,\r\n this.result = null; // Require re-build\r\n if (this.result === null) // (Re-)Build\r\n this.result = this.ns.build();\r\n if (!path)\r\n return this.result;\r\n var part = typeof path === 'string' ? path.split(\".\") : path,\r\n ptr = this.result; // Build namespace pointer (no hasChild etc.)\r\n for (var i=0; i=} contents Initial contents\r\n * @constructor\r\n */\r\n var Map = function(field, contents) {\r\n if (!field.map)\r\n throw Error(\"field is not a map\");\r\n\r\n /**\r\n * The field corresponding to this map.\r\n * @type {!ProtoBuf.Reflect.Field}\r\n */\r\n this.field = field;\r\n\r\n /**\r\n * Element instance corresponding to key type.\r\n * @type {!ProtoBuf.Reflect.Element}\r\n */\r\n this.keyElem = new Reflect.Element(field.keyType, null, true, field.syntax);\r\n\r\n /**\r\n * Element instance corresponding to value type.\r\n * @type {!ProtoBuf.Reflect.Element}\r\n */\r\n this.valueElem = new Reflect.Element(field.type, field.resolvedType, false, field.syntax);\r\n\r\n /**\r\n * Internal map: stores mapping of (string form of key) -> (key, value)\r\n * pair.\r\n *\r\n * We provide map semantics for arbitrary key types, but we build on top\r\n * of an Object, which has only string keys. In order to avoid the need\r\n * to convert a string key back to its native type in many situations,\r\n * we store the native key value alongside the value. Thus, we only need\r\n * a one-way mapping from a key type to its string form that guarantees\r\n * uniqueness and equality (i.e., str(K1) === str(K2) if and only if K1\r\n * === K2).\r\n *\r\n * @type {!Object}\r\n */\r\n this.map = {};\r\n\r\n /**\r\n * Returns the number of elements in the map.\r\n */\r\n Object.defineProperty(this, \"size\", {\r\n get: function() { return Object.keys(this.map).length; }\r\n });\r\n\r\n // Fill initial contents from a raw object.\r\n if (contents) {\r\n var keys = Object.keys(contents);\r\n for (var i = 0; i < keys.length; i++) {\r\n var key = this.keyElem.valueFromString(keys[i]);\r\n var val = this.valueElem.verifyValue(contents[keys[i]]);\r\n this.map[this.keyElem.valueToString(key)] =\r\n { key: key, value: val };\r\n }\r\n }\r\n };\r\n\r\n var MapPrototype = Map.prototype;\r\n\r\n /**\r\n * Helper: return an iterator over an array.\r\n * @param {!Array<*>} arr the array\r\n * @returns {!Object} an iterator\r\n * @inner\r\n */\r\n function arrayIterator(arr) {\r\n var idx = 0;\r\n return {\r\n next: function() {\r\n if (idx < arr.length)\r\n return { done: false, value: arr[idx++] };\r\n return { done: true };\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Clears the map.\r\n */\r\n MapPrototype.clear = function() {\r\n this.map = {};\r\n };\r\n\r\n /**\r\n * Deletes a particular key from the map.\r\n * @returns {boolean} Whether any entry with this key was deleted.\r\n */\r\n MapPrototype[\"delete\"] = function(key) {\r\n var keyValue = this.keyElem.valueToString(this.keyElem.verifyValue(key));\r\n var hadKey = keyValue in this.map;\r\n delete this.map[keyValue];\r\n return hadKey;\r\n };\r\n\r\n /**\r\n * Returns an iterator over [key, value] pairs in the map.\r\n * @returns {Object} The iterator\r\n */\r\n MapPrototype.entries = function() {\r\n var entries = [];\r\n var strKeys = Object.keys(this.map);\r\n for (var i = 0, entry; i < strKeys.length; i++)\r\n entries.push([(entry=this.map[strKeys[i]]).key, entry.value]);\r\n return arrayIterator(entries);\r\n };\r\n\r\n /**\r\n * Returns an iterator over keys in the map.\r\n * @returns {Object} The iterator\r\n */\r\n MapPrototype.keys = function() {\r\n var keys = [];\r\n var strKeys = Object.keys(this.map);\r\n for (var i = 0; i < strKeys.length; i++)\r\n keys.push(this.map[strKeys[i]].key);\r\n return arrayIterator(keys);\r\n };\r\n\r\n /**\r\n * Returns an iterator over values in the map.\r\n * @returns {!Object} The iterator\r\n */\r\n MapPrototype.values = function() {\r\n var values = [];\r\n var strKeys = Object.keys(this.map);\r\n for (var i = 0; i < strKeys.length; i++)\r\n values.push(this.map[strKeys[i]].value);\r\n return arrayIterator(values);\r\n };\r\n\r\n /**\r\n * Iterates over entries in the map, calling a function on each.\r\n * @param {function(this:*, *, *, *)} cb The callback to invoke with value, key, and map arguments.\r\n * @param {Object=} thisArg The `this` value for the callback\r\n */\r\n MapPrototype.forEach = function(cb, thisArg) {\r\n var strKeys = Object.keys(this.map);\r\n for (var i = 0, entry; i < strKeys.length; i++)\r\n cb.call(thisArg, (entry=this.map[strKeys[i]]).value, entry.key, this);\r\n };\r\n\r\n /**\r\n * Sets a key in the map to the given value.\r\n * @param {*} key The key\r\n * @param {*} value The value\r\n * @returns {!ProtoBuf.Map} The map instance\r\n */\r\n MapPrototype.set = function(key, value) {\r\n var keyValue = this.keyElem.verifyValue(key);\r\n var valValue = this.valueElem.verifyValue(value);\r\n this.map[this.keyElem.valueToString(keyValue)] =\r\n { key: keyValue, value: valValue };\r\n return this;\r\n };\r\n\r\n /**\r\n * Gets the value corresponding to a key in the map.\r\n * @param {*} key The key\r\n * @returns {*|undefined} The value, or `undefined` if key not present\r\n */\r\n MapPrototype.get = function(key) {\r\n var keyValue = this.keyElem.valueToString(this.keyElem.verifyValue(key));\r\n if (!(keyValue in this.map))\r\n return undefined;\r\n return this.map[keyValue].value;\r\n };\r\n\r\n /**\r\n * Determines whether the given key is present in the map.\r\n * @param {*} key The key\r\n * @returns {boolean} `true` if the key is present\r\n */\r\n MapPrototype.has = function(key) {\r\n var keyValue = this.keyElem.valueToString(this.keyElem.verifyValue(key));\r\n return (keyValue in this.map);\r\n };\r\n\r\n return Map;\r\n })(ProtoBuf, ProtoBuf.Reflect);\r\n\r\n\r\n /**\r\n * Constructs a new empty Builder.\r\n * @param {Object.=} options Builder options, defaults to global options set on ProtoBuf\r\n * @return {!ProtoBuf.Builder} Builder\r\n * @expose\r\n */\r\n ProtoBuf.newBuilder = function(options) {\r\n options = options || {};\r\n if (typeof options['convertFieldsToCamelCase'] === 'undefined')\r\n options['convertFieldsToCamelCase'] = ProtoBuf.convertFieldsToCamelCase;\r\n if (typeof options['populateAccessors'] === 'undefined')\r\n options['populateAccessors'] = ProtoBuf.populateAccessors;\r\n return new ProtoBuf.Builder(options);\r\n };\r\n\r\n /**\r\n * Loads a .json definition and returns the Builder.\r\n * @param {!*|string} json JSON definition\r\n * @param {(ProtoBuf.Builder|string|{root: string, file: string})=} builder Builder to append to. Will create a new one if omitted.\r\n * @param {(string|{root: string, file: string})=} filename The corresponding file name if known. Must be specified for imports.\r\n * @return {ProtoBuf.Builder} Builder to create new messages\r\n * @throws {Error} If the definition cannot be parsed or built\r\n * @expose\r\n */\r\n ProtoBuf.loadJson = function(json, builder, filename) {\r\n if (typeof builder === 'string' || (builder && typeof builder[\"file\"] === 'string' && typeof builder[\"root\"] === 'string'))\r\n filename = builder,\r\n builder = null;\r\n if (!builder || typeof builder !== 'object')\r\n builder = ProtoBuf.newBuilder();\r\n if (typeof json === 'string')\r\n json = JSON.parse(json);\r\n builder[\"import\"](json, filename);\r\n builder.resolveAll();\r\n return builder;\r\n };\r\n\r\n /**\r\n * Loads a .json file and returns the Builder.\r\n * @param {string|!{root: string, file: string}} filename Path to json file or an object specifying 'file' with\r\n * an overridden 'root' path for all imported files.\r\n * @param {function(?Error, !ProtoBuf.Builder=)=} callback Callback that will receive `null` as the first and\r\n * the Builder as its second argument on success, otherwise the error as its first argument. If omitted, the\r\n * file will be read synchronously and this function will return the Builder.\r\n * @param {ProtoBuf.Builder=} builder Builder to append to. Will create a new one if omitted.\r\n * @return {?ProtoBuf.Builder|undefined} The Builder if synchronous (no callback specified, will be NULL if the\r\n * request has failed), else undefined\r\n * @expose\r\n */\r\n ProtoBuf.loadJsonFile = function(filename, callback, builder) {\r\n if (callback && typeof callback === 'object')\r\n builder = callback,\r\n callback = null;\r\n else if (!callback || typeof callback !== 'function')\r\n callback = null;\r\n if (callback)\r\n return ProtoBuf.Util.fetch(typeof filename === 'string' ? filename : filename[\"root\"]+\"/\"+filename[\"file\"], function(contents) {\r\n if (contents === null) {\r\n callback(Error(\"Failed to fetch file\"));\r\n return;\r\n }\r\n try {\r\n callback(null, ProtoBuf.loadJson(JSON.parse(contents), builder, filename));\r\n } catch (e) {\r\n callback(e);\r\n }\r\n });\r\n var contents = ProtoBuf.Util.fetch(typeof filename === 'object' ? filename[\"root\"]+\"/\"+filename[\"file\"] : filename);\r\n return contents === null ? null : ProtoBuf.loadJson(JSON.parse(contents), builder, filename);\r\n };\r\n\r\n return ProtoBuf;\r\n});\r\n","module.exports = require(\"protobufjs/dist/protobuf-light\").newBuilder({})['import']({\n \"package\": \"push_server.messages2\",\n \"syntax\": \"proto2\",\n \"options\": {\n \"objc_class_prefix\": \"AVIM\"\n },\n \"messages\": [\n {\n \"name\": \"JsonObjectMessage\",\n \"syntax\": \"proto2\",\n \"fields\": [\n {\n \"rule\": \"required\",\n \"type\": \"string\",\n \"name\": \"data\",\n \"id\": 1\n }\n ]\n },\n {\n \"name\": \"UnreadTuple\",\n \"syntax\": \"proto2\",\n \"fields\": [\n {\n \"rule\": \"required\",\n \"type\": \"string\",\n \"name\": \"cid\",\n \"id\": 1\n },\n {\n \"rule\": \"required\",\n \"type\": \"int32\",\n \"name\": \"unread\",\n \"id\": 2\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"mid\",\n \"id\": 3\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"timestamp\",\n \"id\": 4\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"from\",\n \"id\": 5\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"data\",\n \"id\": 6\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"patchTimestamp\",\n \"id\": 7\n }\n ]\n },\n {\n \"name\": \"LogItem\",\n \"syntax\": \"proto2\",\n \"fields\": [\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"from\",\n \"id\": 1\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"data\",\n \"id\": 2\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"timestamp\",\n \"id\": 3\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"msgId\",\n \"id\": 4\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"ackAt\",\n \"id\": 5\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"readAt\",\n \"id\": 6\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"patchTimestamp\",\n \"id\": 7\n }\n ]\n },\n {\n \"name\": \"DataCommand\",\n \"syntax\": \"proto2\",\n \"fields\": [\n {\n \"rule\": \"repeated\",\n \"type\": \"string\",\n \"name\": \"ids\",\n \"id\": 1\n },\n {\n \"rule\": \"repeated\",\n \"type\": \"JsonObjectMessage\",\n \"name\": \"msg\",\n \"id\": 2\n },\n {\n \"rule\": \"optional\",\n \"type\": \"bool\",\n \"name\": \"offline\",\n \"id\": 3\n }\n ]\n },\n {\n \"name\": \"SessionCommand\",\n \"syntax\": \"proto2\",\n \"fields\": [\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"t\",\n \"id\": 1\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"n\",\n \"id\": 2\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"s\",\n \"id\": 3\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"ua\",\n \"id\": 4\n },\n {\n \"rule\": \"optional\",\n \"type\": \"bool\",\n \"name\": \"r\",\n \"id\": 5\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"tag\",\n \"id\": 6\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"deviceId\",\n \"id\": 7\n },\n {\n \"rule\": \"repeated\",\n \"type\": \"string\",\n \"name\": \"sessionPeerIds\",\n \"id\": 8\n },\n {\n \"rule\": \"repeated\",\n \"type\": \"string\",\n \"name\": \"onlineSessionPeerIds\",\n \"id\": 9\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"st\",\n \"id\": 10\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int32\",\n \"name\": \"stTtl\",\n \"id\": 11\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int32\",\n \"name\": \"code\",\n \"id\": 12\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"reason\",\n \"id\": 13\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"deviceToken\",\n \"id\": 14\n },\n {\n \"rule\": \"optional\",\n \"type\": \"bool\",\n \"name\": \"sp\",\n \"id\": 15\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"detail\",\n \"id\": 16\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"lastUnreadNotifTime\",\n \"id\": 17\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"lastPatchTime\",\n \"id\": 18\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"configBitmap\",\n \"id\": 19\n }\n ]\n },\n {\n \"name\": \"ErrorCommand\",\n \"syntax\": \"proto2\",\n \"fields\": [\n {\n \"rule\": \"required\",\n \"type\": \"int32\",\n \"name\": \"code\",\n \"id\": 1\n },\n {\n \"rule\": \"required\",\n \"type\": \"string\",\n \"name\": \"reason\",\n \"id\": 2\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int32\",\n \"name\": \"appCode\",\n \"id\": 3\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"detail\",\n \"id\": 4\n }\n ]\n },\n {\n \"name\": \"DirectCommand\",\n \"syntax\": \"proto2\",\n \"fields\": [\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"msg\",\n \"id\": 1\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"uid\",\n \"id\": 2\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"fromPeerId\",\n \"id\": 3\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"timestamp\",\n \"id\": 4\n },\n {\n \"rule\": \"optional\",\n \"type\": \"bool\",\n \"name\": \"offline\",\n \"id\": 5\n },\n {\n \"rule\": \"optional\",\n \"type\": \"bool\",\n \"name\": \"hasMore\",\n \"id\": 6\n },\n {\n \"rule\": \"repeated\",\n \"type\": \"string\",\n \"name\": \"toPeerIds\",\n \"id\": 7\n },\n {\n \"rule\": \"optional\",\n \"type\": \"bool\",\n \"name\": \"r\",\n \"id\": 10\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"cid\",\n \"id\": 11\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"id\",\n \"id\": 12\n },\n {\n \"rule\": \"optional\",\n \"type\": \"bool\",\n \"name\": \"transient\",\n \"id\": 13\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"dt\",\n \"id\": 14\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"roomId\",\n \"id\": 15\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"pushData\",\n \"id\": 16\n },\n {\n \"rule\": \"optional\",\n \"type\": \"bool\",\n \"name\": \"will\",\n \"id\": 17\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"patchTimestamp\",\n \"id\": 18\n }\n ]\n },\n {\n \"name\": \"AckCommand\",\n \"syntax\": \"proto2\",\n \"fields\": [\n {\n \"rule\": \"optional\",\n \"type\": \"int32\",\n \"name\": \"code\",\n \"id\": 1\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"reason\",\n \"id\": 2\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"mid\",\n \"id\": 3\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"cid\",\n \"id\": 4\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"t\",\n \"id\": 5\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"uid\",\n \"id\": 6\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"fromts\",\n \"id\": 7\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"tots\",\n \"id\": 8\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"type\",\n \"id\": 9\n },\n {\n \"rule\": \"repeated\",\n \"type\": \"string\",\n \"name\": \"ids\",\n \"id\": 10\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int32\",\n \"name\": \"appCode\",\n \"id\": 11\n }\n ]\n },\n {\n \"name\": \"UnreadCommand\",\n \"syntax\": \"proto2\",\n \"fields\": [\n {\n \"rule\": \"repeated\",\n \"type\": \"UnreadTuple\",\n \"name\": \"convs\",\n \"id\": 1\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"notifTime\",\n \"id\": 2\n }\n ]\n },\n {\n \"name\": \"ConvCommand\",\n \"syntax\": \"proto2\",\n \"fields\": [\n {\n \"rule\": \"repeated\",\n \"type\": \"string\",\n \"name\": \"m\",\n \"id\": 1\n },\n {\n \"rule\": \"optional\",\n \"type\": \"bool\",\n \"name\": \"transient\",\n \"id\": 2\n },\n {\n \"rule\": \"optional\",\n \"type\": \"bool\",\n \"name\": \"unique\",\n \"id\": 3\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"cid\",\n \"id\": 4\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"cdate\",\n \"id\": 5\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"initBy\",\n \"id\": 6\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"sort\",\n \"id\": 7\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int32\",\n \"name\": \"limit\",\n \"id\": 8\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int32\",\n \"name\": \"skip\",\n \"id\": 9\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int32\",\n \"name\": \"flag\",\n \"id\": 10\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int32\",\n \"name\": \"count\",\n \"id\": 11\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"udate\",\n \"id\": 12\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"t\",\n \"id\": 13\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"n\",\n \"id\": 14\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"s\",\n \"id\": 15\n },\n {\n \"rule\": \"optional\",\n \"type\": \"bool\",\n \"name\": \"statusSub\",\n \"id\": 16\n },\n {\n \"rule\": \"optional\",\n \"type\": \"bool\",\n \"name\": \"statusPub\",\n \"id\": 17\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int32\",\n \"name\": \"statusTTL\",\n \"id\": 18\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"uniqueId\",\n \"id\": 19\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"targetClientId\",\n \"id\": 20\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"maxReadTimestamp\",\n \"id\": 21\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"maxAckTimestamp\",\n \"id\": 22\n },\n {\n \"rule\": \"optional\",\n \"type\": \"bool\",\n \"name\": \"queryAllMembers\",\n \"id\": 23\n },\n {\n \"rule\": \"repeated\",\n \"type\": \"MaxReadTuple\",\n \"name\": \"maxReadTuples\",\n \"id\": 24\n },\n {\n \"rule\": \"repeated\",\n \"type\": \"string\",\n \"name\": \"cids\",\n \"id\": 25\n },\n {\n \"rule\": \"optional\",\n \"type\": \"JsonObjectMessage\",\n \"name\": \"results\",\n \"id\": 100\n },\n {\n \"rule\": \"optional\",\n \"type\": \"JsonObjectMessage\",\n \"name\": \"where\",\n \"id\": 101\n },\n {\n \"rule\": \"optional\",\n \"type\": \"JsonObjectMessage\",\n \"name\": \"attr\",\n \"id\": 103\n }\n ]\n },\n {\n \"name\": \"RoomCommand\",\n \"syntax\": \"proto2\",\n \"fields\": [\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"roomId\",\n \"id\": 1\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"s\",\n \"id\": 2\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"t\",\n \"id\": 3\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"n\",\n \"id\": 4\n },\n {\n \"rule\": \"optional\",\n \"type\": \"bool\",\n \"name\": \"transient\",\n \"id\": 5\n },\n {\n \"rule\": \"repeated\",\n \"type\": \"string\",\n \"name\": \"roomPeerIds\",\n \"id\": 6\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"byPeerId\",\n \"id\": 7\n }\n ]\n },\n {\n \"name\": \"LogsCommand\",\n \"syntax\": \"proto2\",\n \"fields\": [\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"cid\",\n \"id\": 1\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int32\",\n \"name\": \"l\",\n \"id\": 2\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int32\",\n \"name\": \"limit\",\n \"id\": 3\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"t\",\n \"id\": 4\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"tt\",\n \"id\": 5\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"tmid\",\n \"id\": 6\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"mid\",\n \"id\": 7\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"checksum\",\n \"id\": 8\n },\n {\n \"rule\": \"optional\",\n \"type\": \"bool\",\n \"name\": \"stored\",\n \"id\": 9\n },\n {\n \"rule\": \"optional\",\n \"type\": \"bool\",\n \"name\": \"reversed\",\n \"id\": 10\n },\n {\n \"rule\": \"repeated\",\n \"type\": \"LogItem\",\n \"name\": \"logs\",\n \"id\": 105\n }\n ]\n },\n {\n \"name\": \"RcpCommand\",\n \"syntax\": \"proto2\",\n \"fields\": [\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"id\",\n \"id\": 1\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"cid\",\n \"id\": 2\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"t\",\n \"id\": 3\n },\n {\n \"rule\": \"optional\",\n \"type\": \"bool\",\n \"name\": \"read\",\n \"id\": 4\n }\n ]\n },\n {\n \"name\": \"ReadTuple\",\n \"syntax\": \"proto2\",\n \"fields\": [\n {\n \"rule\": \"required\",\n \"type\": \"string\",\n \"name\": \"cid\",\n \"id\": 1\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"timestamp\",\n \"id\": 2\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"mid\",\n \"id\": 3\n }\n ]\n },\n {\n \"name\": \"MaxReadTuple\",\n \"syntax\": \"proto2\",\n \"fields\": [\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"pid\",\n \"id\": 1\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"maxAckTimestamp\",\n \"id\": 2\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"maxReadTimestamp\",\n \"id\": 3\n }\n ]\n },\n {\n \"name\": \"ReadCommand\",\n \"syntax\": \"proto2\",\n \"fields\": [\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"cid\",\n \"id\": 1\n },\n {\n \"rule\": \"repeated\",\n \"type\": \"string\",\n \"name\": \"cids\",\n \"id\": 2\n },\n {\n \"rule\": \"repeated\",\n \"type\": \"ReadTuple\",\n \"name\": \"convs\",\n \"id\": 3\n }\n ]\n },\n {\n \"name\": \"PresenceCommand\",\n \"syntax\": \"proto2\",\n \"fields\": [\n {\n \"rule\": \"optional\",\n \"type\": \"StatusType\",\n \"name\": \"status\",\n \"id\": 1\n },\n {\n \"rule\": \"repeated\",\n \"type\": \"string\",\n \"name\": \"sessionPeerIds\",\n \"id\": 2\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"cid\",\n \"id\": 3\n }\n ]\n },\n {\n \"name\": \"ReportCommand\",\n \"syntax\": \"proto2\",\n \"fields\": [\n {\n \"rule\": \"optional\",\n \"type\": \"bool\",\n \"name\": \"initiative\",\n \"id\": 1\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"type\",\n \"id\": 2\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"data\",\n \"id\": 3\n }\n ]\n },\n {\n \"name\": \"PatchItem\",\n \"syntax\": \"proto2\",\n \"fields\": [\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"cid\",\n \"id\": 1\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"mid\",\n \"id\": 2\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"timestamp\",\n \"id\": 3\n },\n {\n \"rule\": \"optional\",\n \"type\": \"bool\",\n \"name\": \"recall\",\n \"id\": 4\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"data\",\n \"id\": 5\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"patchTimestamp\",\n \"id\": 6\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"from\",\n \"id\": 7\n }\n ]\n },\n {\n \"name\": \"PatchCommand\",\n \"syntax\": \"proto2\",\n \"fields\": [\n {\n \"rule\": \"repeated\",\n \"type\": \"PatchItem\",\n \"name\": \"patches\",\n \"id\": 1\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"lastPatchTime\",\n \"id\": 2\n }\n ]\n },\n {\n \"name\": \"GenericCommand\",\n \"syntax\": \"proto2\",\n \"fields\": [\n {\n \"rule\": \"optional\",\n \"type\": \"CommandType\",\n \"name\": \"cmd\",\n \"id\": 1\n },\n {\n \"rule\": \"optional\",\n \"type\": \"OpType\",\n \"name\": \"op\",\n \"id\": 2\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"appId\",\n \"id\": 3\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"peerId\",\n \"id\": 4\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int32\",\n \"name\": \"i\",\n \"id\": 5\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"installationId\",\n \"id\": 6\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int32\",\n \"name\": \"priority\",\n \"id\": 7\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int32\",\n \"name\": \"service\",\n \"id\": 8\n },\n {\n \"rule\": \"optional\",\n \"type\": \"DataCommand\",\n \"name\": \"dataMessage\",\n \"id\": 101\n },\n {\n \"rule\": \"optional\",\n \"type\": \"SessionCommand\",\n \"name\": \"sessionMessage\",\n \"id\": 102\n },\n {\n \"rule\": \"optional\",\n \"type\": \"ErrorCommand\",\n \"name\": \"errorMessage\",\n \"id\": 103\n },\n {\n \"rule\": \"optional\",\n \"type\": \"DirectCommand\",\n \"name\": \"directMessage\",\n \"id\": 104\n },\n {\n \"rule\": \"optional\",\n \"type\": \"AckCommand\",\n \"name\": \"ackMessage\",\n \"id\": 105\n },\n {\n \"rule\": \"optional\",\n \"type\": \"UnreadCommand\",\n \"name\": \"unreadMessage\",\n \"id\": 106\n },\n {\n \"rule\": \"optional\",\n \"type\": \"ReadCommand\",\n \"name\": \"readMessage\",\n \"id\": 107\n },\n {\n \"rule\": \"optional\",\n \"type\": \"RcpCommand\",\n \"name\": \"rcpMessage\",\n \"id\": 108\n },\n {\n \"rule\": \"optional\",\n \"type\": \"LogsCommand\",\n \"name\": \"logsMessage\",\n \"id\": 109\n },\n {\n \"rule\": \"optional\",\n \"type\": \"ConvCommand\",\n \"name\": \"convMessage\",\n \"id\": 110\n },\n {\n \"rule\": \"optional\",\n \"type\": \"RoomCommand\",\n \"name\": \"roomMessage\",\n \"id\": 111\n },\n {\n \"rule\": \"optional\",\n \"type\": \"PresenceCommand\",\n \"name\": \"presenceMessage\",\n \"id\": 112\n },\n {\n \"rule\": \"optional\",\n \"type\": \"ReportCommand\",\n \"name\": \"reportMessage\",\n \"id\": 113\n },\n {\n \"rule\": \"optional\",\n \"type\": \"PatchCommand\",\n \"name\": \"patchMessage\",\n \"id\": 114\n }\n ]\n }\n ],\n \"enums\": [\n {\n \"name\": \"CommandType\",\n \"syntax\": \"proto2\",\n \"values\": [\n {\n \"name\": \"session\",\n \"id\": 0\n },\n {\n \"name\": \"conv\",\n \"id\": 1\n },\n {\n \"name\": \"direct\",\n \"id\": 2\n },\n {\n \"name\": \"ack\",\n \"id\": 3\n },\n {\n \"name\": \"rcp\",\n \"id\": 4\n },\n {\n \"name\": \"unread\",\n \"id\": 5\n },\n {\n \"name\": \"logs\",\n \"id\": 6\n },\n {\n \"name\": \"error\",\n \"id\": 7\n },\n {\n \"name\": \"login\",\n \"id\": 8\n },\n {\n \"name\": \"data\",\n \"id\": 9\n },\n {\n \"name\": \"room\",\n \"id\": 10\n },\n {\n \"name\": \"read\",\n \"id\": 11\n },\n {\n \"name\": \"presence\",\n \"id\": 12\n },\n {\n \"name\": \"report\",\n \"id\": 13\n },\n {\n \"name\": \"echo\",\n \"id\": 14\n },\n {\n \"name\": \"loggedin\",\n \"id\": 15\n },\n {\n \"name\": \"logout\",\n \"id\": 16\n },\n {\n \"name\": \"loggedout\",\n \"id\": 17\n },\n {\n \"name\": \"patch\",\n \"id\": 18\n }\n ]\n },\n {\n \"name\": \"OpType\",\n \"syntax\": \"proto2\",\n \"values\": [\n {\n \"name\": \"open\",\n \"id\": 1\n },\n {\n \"name\": \"add\",\n \"id\": 2\n },\n {\n \"name\": \"remove\",\n \"id\": 3\n },\n {\n \"name\": \"close\",\n \"id\": 4\n },\n {\n \"name\": \"opened\",\n \"id\": 5\n },\n {\n \"name\": \"closed\",\n \"id\": 6\n },\n {\n \"name\": \"query\",\n \"id\": 7\n },\n {\n \"name\": \"query_result\",\n \"id\": 8\n },\n {\n \"name\": \"conflict\",\n \"id\": 9\n },\n {\n \"name\": \"added\",\n \"id\": 10\n },\n {\n \"name\": \"removed\",\n \"id\": 11\n },\n {\n \"name\": \"start\",\n \"id\": 30\n },\n {\n \"name\": \"started\",\n \"id\": 31\n },\n {\n \"name\": \"joined\",\n \"id\": 32\n },\n {\n \"name\": \"members_joined\",\n \"id\": 33\n },\n {\n \"name\": \"left\",\n \"id\": 39\n },\n {\n \"name\": \"members_left\",\n \"id\": 40\n },\n {\n \"name\": \"results\",\n \"id\": 42\n },\n {\n \"name\": \"count\",\n \"id\": 43\n },\n {\n \"name\": \"result\",\n \"id\": 44\n },\n {\n \"name\": \"update\",\n \"id\": 45\n },\n {\n \"name\": \"updated\",\n \"id\": 46\n },\n {\n \"name\": \"mute\",\n \"id\": 47\n },\n {\n \"name\": \"unmute\",\n \"id\": 48\n },\n {\n \"name\": \"status\",\n \"id\": 49\n },\n {\n \"name\": \"members\",\n \"id\": 50\n },\n {\n \"name\": \"max_read\",\n \"id\": 51\n },\n {\n \"name\": \"is_member\",\n \"id\": 52\n },\n {\n \"name\": \"join\",\n \"id\": 80\n },\n {\n \"name\": \"invite\",\n \"id\": 81\n },\n {\n \"name\": \"leave\",\n \"id\": 82\n },\n {\n \"name\": \"kick\",\n \"id\": 83\n },\n {\n \"name\": \"reject\",\n \"id\": 84\n },\n {\n \"name\": \"invited\",\n \"id\": 85\n },\n {\n \"name\": \"kicked\",\n \"id\": 86\n },\n {\n \"name\": \"upload\",\n \"id\": 100\n },\n {\n \"name\": \"uploaded\",\n \"id\": 101\n },\n {\n \"name\": \"modify\",\n \"id\": 150\n },\n {\n \"name\": \"modified\",\n \"id\": 151\n }\n ]\n },\n {\n \"name\": \"StatusType\",\n \"syntax\": \"proto2\",\n \"values\": [\n {\n \"name\": \"on\",\n \"id\": 1\n },\n {\n \"name\": \"off\",\n \"id\": 2\n }\n ]\n }\n ],\n \"isNamespace\": true\n}).build();\n","import messages from './message-compiled';\n\nconst {\n JsonObjectMessage,\n UnreadTuple,\n LogItem,\n DataCommand,\n SessionCommand,\n ErrorCommand,\n DirectCommand,\n AckCommand,\n UnreadCommand,\n ConvCommand,\n RoomCommand,\n LogsCommand,\n RcpCommand,\n ReadTuple,\n MaxReadTuple,\n ReadCommand,\n PresenceCommand,\n ReportCommand,\n GenericCommand,\n PatchCommand,\n PatchItem,\n CommandType,\n OpType,\n StatusType,\n} = messages.push_server.messages2;\n\nexport {\n JsonObjectMessage,\n UnreadTuple,\n LogItem,\n DataCommand,\n SessionCommand,\n ErrorCommand,\n DirectCommand,\n AckCommand,\n UnreadCommand,\n ConvCommand,\n RoomCommand,\n LogsCommand,\n RcpCommand,\n ReadTuple,\n MaxReadTuple,\n ReadCommand,\n PresenceCommand,\n ReportCommand,\n GenericCommand,\n PatchCommand,\n PatchItem,\n CommandType,\n OpType,\n StatusType,\n};\n","'use strict';\n\nvar has = Object.prototype.hasOwnProperty\n , prefix = '~';\n\n/**\n * Constructor to create a storage for our `EE` objects.\n * An `Events` instance is a plain object whose properties are event names.\n *\n * @constructor\n * @api private\n */\nfunction Events() {}\n\n//\n// We try to not inherit from `Object.prototype`. In some engines creating an\n// instance in this way is faster than calling `Object.create(null)` directly.\n// If `Object.create(null)` is not supported we prefix the event names with a\n// character to make sure that the built-in object properties are not\n// overridden or used as an attack vector.\n//\nif (Object.create) {\n Events.prototype = Object.create(null);\n\n //\n // This hack is needed because the `__proto__` property is still inherited in\n // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.\n //\n if (!new Events().__proto__) prefix = false;\n}\n\n/**\n * Representation of a single event listener.\n *\n * @param {Function} fn The listener function.\n * @param {Mixed} context The context to invoke the listener with.\n * @param {Boolean} [once=false] Specify if the listener is a one-time listener.\n * @constructor\n * @api private\n */\nfunction EE(fn, context, once) {\n this.fn = fn;\n this.context = context;\n this.once = once || false;\n}\n\n/**\n * Minimal `EventEmitter` interface that is molded against the Node.js\n * `EventEmitter` interface.\n *\n * @constructor\n * @api public\n */\nfunction EventEmitter() {\n this._events = new Events();\n this._eventsCount = 0;\n}\n\n/**\n * Return an array listing the events for which the emitter has registered\n * listeners.\n *\n * @returns {Array}\n * @api public\n */\nEventEmitter.prototype.eventNames = function eventNames() {\n var names = []\n , events\n , name;\n\n if (this._eventsCount === 0) return names;\n\n for (name in (events = this._events)) {\n if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);\n }\n\n if (Object.getOwnPropertySymbols) {\n return names.concat(Object.getOwnPropertySymbols(events));\n }\n\n return names;\n};\n\n/**\n * Return the listeners registered for a given event.\n *\n * @param {String|Symbol} event The event name.\n * @param {Boolean} exists Only check if there are listeners.\n * @returns {Array|Boolean}\n * @api public\n */\nEventEmitter.prototype.listeners = function listeners(event, exists) {\n var evt = prefix ? prefix + event : event\n , available = this._events[evt];\n\n if (exists) return !!available;\n if (!available) return [];\n if (available.fn) return [available.fn];\n\n for (var i = 0, l = available.length, ee = new Array(l); i < l; i++) {\n ee[i] = available[i].fn;\n }\n\n return ee;\n};\n\n/**\n * Calls each of the listeners registered for a given event.\n *\n * @param {String|Symbol} event The event name.\n * @returns {Boolean} `true` if the event had listeners, else `false`.\n * @api public\n */\nEventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return false;\n\n var listeners = this._events[evt]\n , len = arguments.length\n , args\n , i;\n\n if (listeners.fn) {\n if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);\n\n switch (len) {\n case 1: return listeners.fn.call(listeners.context), true;\n case 2: return listeners.fn.call(listeners.context, a1), true;\n case 3: return listeners.fn.call(listeners.context, a1, a2), true;\n case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;\n case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;\n case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;\n }\n\n for (i = 1, args = new Array(len -1); i < len; i++) {\n args[i - 1] = arguments[i];\n }\n\n listeners.fn.apply(listeners.context, args);\n } else {\n var length = listeners.length\n , j;\n\n for (i = 0; i < length; i++) {\n if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);\n\n switch (len) {\n case 1: listeners[i].fn.call(listeners[i].context); break;\n case 2: listeners[i].fn.call(listeners[i].context, a1); break;\n case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;\n case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;\n default:\n if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {\n args[j - 1] = arguments[j];\n }\n\n listeners[i].fn.apply(listeners[i].context, args);\n }\n }\n }\n\n return true;\n};\n\n/**\n * Add a listener for a given event.\n *\n * @param {String|Symbol} event The event name.\n * @param {Function} fn The listener function.\n * @param {Mixed} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @api public\n */\nEventEmitter.prototype.on = function on(event, fn, context) {\n var listener = new EE(fn, context || this)\n , evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) this._events[evt] = listener, this._eventsCount++;\n else if (!this._events[evt].fn) this._events[evt].push(listener);\n else this._events[evt] = [this._events[evt], listener];\n\n return this;\n};\n\n/**\n * Add a one-time listener for a given event.\n *\n * @param {String|Symbol} event The event name.\n * @param {Function} fn The listener function.\n * @param {Mixed} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @api public\n */\nEventEmitter.prototype.once = function once(event, fn, context) {\n var listener = new EE(fn, context || this, true)\n , evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) this._events[evt] = listener, this._eventsCount++;\n else if (!this._events[evt].fn) this._events[evt].push(listener);\n else this._events[evt] = [this._events[evt], listener];\n\n return this;\n};\n\n/**\n * Remove the listeners of a given event.\n *\n * @param {String|Symbol} event The event name.\n * @param {Function} fn Only remove the listeners that match this function.\n * @param {Mixed} context Only remove the listeners that have this context.\n * @param {Boolean} once Only remove one-time listeners.\n * @returns {EventEmitter} `this`.\n * @api public\n */\nEventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return this;\n if (!fn) {\n if (--this._eventsCount === 0) this._events = new Events();\n else delete this._events[evt];\n return this;\n }\n\n var listeners = this._events[evt];\n\n if (listeners.fn) {\n if (\n listeners.fn === fn\n && (!once || listeners.once)\n && (!context || listeners.context === context)\n ) {\n if (--this._eventsCount === 0) this._events = new Events();\n else delete this._events[evt];\n }\n } else {\n for (var i = 0, events = [], length = listeners.length; i < length; i++) {\n if (\n listeners[i].fn !== fn\n || (once && !listeners[i].once)\n || (context && listeners[i].context !== context)\n ) {\n events.push(listeners[i]);\n }\n }\n\n //\n // Reset the array, or remove it completely if we have no more listeners.\n //\n if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;\n else if (--this._eventsCount === 0) this._events = new Events();\n else delete this._events[evt];\n }\n\n return this;\n};\n\n/**\n * Remove all listeners, or those of the specified event.\n *\n * @param {String|Symbol} [event] The event name.\n * @returns {EventEmitter} `this`.\n * @api public\n */\nEventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {\n var evt;\n\n if (event) {\n evt = prefix ? prefix + event : event;\n if (this._events[evt]) {\n if (--this._eventsCount === 0) this._events = new Events();\n else delete this._events[evt];\n }\n } else {\n this._events = new Events();\n this._eventsCount = 0;\n }\n\n return this;\n};\n\n//\n// Alias methods names because people roll like that.\n//\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\nEventEmitter.prototype.addListener = EventEmitter.prototype.on;\n\n//\n// This function doesn't apply anymore.\n//\nEventEmitter.prototype.setMaxListeners = function setMaxListeners() {\n return this;\n};\n\n//\n// Expose the prefix.\n//\nEventEmitter.prefixed = prefix;\n\n//\n// Allow `EventEmitter` to be imported as module namespace.\n//\nEventEmitter.EventEmitter = EventEmitter;\n\n//\n// Expose the module.\n//\nif ('undefined' !== typeof module) {\n module.exports = EventEmitter;\n}\n","'use strict';\nvar $defineProperty = require('./_object-dp');\nvar createDesc = require('./_property-desc');\n\nmodule.exports = function (object, index, value) {\n if (index in object) $defineProperty.f(object, index, createDesc(0, value));\n else object[index] = value;\n};\n","'use strict';\nvar ctx = require('./_ctx');\nvar $export = require('./_export');\nvar toObject = require('./_to-object');\nvar call = require('./_iter-call');\nvar isArrayIter = require('./_is-array-iter');\nvar toLength = require('./_to-length');\nvar createProperty = require('./_create-property');\nvar getIterFn = require('./core.get-iterator-method');\n\n$export($export.S + $export.F * !require('./_iter-detect')(function (iter) { Array.from(iter); }), 'Array', {\n // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined)\n from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {\n var O = toObject(arrayLike);\n var C = typeof this == 'function' ? this : Array;\n var aLen = arguments.length;\n var mapfn = aLen > 1 ? arguments[1] : undefined;\n var mapping = mapfn !== undefined;\n var index = 0;\n var iterFn = getIterFn(O);\n var length, result, step, iterator;\n if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2);\n // if object isn't iterable or it's array with default iterator - use simple case\n if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) {\n for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) {\n createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value);\n }\n } else {\n length = toLength(O.length);\n for (result = new C(length); length > index; index++) {\n createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]);\n }\n }\n result.length = index;\n return result;\n }\n});\n","require('../../modules/es6.string.iterator');\nrequire('../../modules/es6.array.from');\nmodule.exports = require('../../modules/_core').Array.from;\n","module.exports = { \"default\": require(\"core-js/library/fn/array/from\"), __esModule: true };","\"use strict\";\n\nexports.__esModule = true;\n\nvar _from = require(\"../core-js/array/from\");\n\nvar _from2 = _interopRequireDefault(_from);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function (arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n } else {\n return (0, _from2.default)(arr);\n }\n};","var META = require('./_uid')('meta');\nvar isObject = require('./_is-object');\nvar has = require('./_has');\nvar setDesc = require('./_object-dp').f;\nvar id = 0;\nvar isExtensible = Object.isExtensible || function () {\n return true;\n};\nvar FREEZE = !require('./_fails')(function () {\n return isExtensible(Object.preventExtensions({}));\n});\nvar setMeta = function (it) {\n setDesc(it, META, { value: {\n i: 'O' + ++id, // object ID\n w: {} // weak collections IDs\n } });\n};\nvar fastKey = function (it, create) {\n // return primitive with prefix\n if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;\n if (!has(it, META)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return 'F';\n // not necessary to add metadata\n if (!create) return 'E';\n // add missing metadata\n setMeta(it);\n // return object ID\n } return it[META].i;\n};\nvar getWeak = function (it, create) {\n if (!has(it, META)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return true;\n // not necessary to add metadata\n if (!create) return false;\n // add missing metadata\n setMeta(it);\n // return hash weak collections IDs\n } return it[META].w;\n};\n// add metadata on freeze-family methods calling\nvar onFreeze = function (it) {\n if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it);\n return it;\n};\nvar meta = module.exports = {\n KEY: META,\n NEED: false,\n fastKey: fastKey,\n getWeak: getWeak,\n onFreeze: onFreeze\n};\n","var isObject = require('./_is-object');\nmodule.exports = function (it, TYPE) {\n if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!');\n return it;\n};\n","'use strict';\nvar dP = require('./_object-dp').f;\nvar create = require('./_object-create');\nvar redefineAll = require('./_redefine-all');\nvar ctx = require('./_ctx');\nvar anInstance = require('./_an-instance');\nvar forOf = require('./_for-of');\nvar $iterDefine = require('./_iter-define');\nvar step = require('./_iter-step');\nvar setSpecies = require('./_set-species');\nvar DESCRIPTORS = require('./_descriptors');\nvar fastKey = require('./_meta').fastKey;\nvar validate = require('./_validate-collection');\nvar SIZE = DESCRIPTORS ? '_s' : 'size';\n\nvar getEntry = function (that, key) {\n // fast case\n var index = fastKey(key);\n var entry;\n if (index !== 'F') return that._i[index];\n // frozen object case\n for (entry = that._f; entry; entry = entry.n) {\n if (entry.k == key) return entry;\n }\n};\n\nmodule.exports = {\n getConstructor: function (wrapper, NAME, IS_MAP, ADDER) {\n var C = wrapper(function (that, iterable) {\n anInstance(that, C, NAME, '_i');\n that._t = NAME; // collection type\n that._i = create(null); // index\n that._f = undefined; // first entry\n that._l = undefined; // last entry\n that[SIZE] = 0; // size\n if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);\n });\n redefineAll(C.prototype, {\n // 23.1.3.1 Map.prototype.clear()\n // 23.2.3.2 Set.prototype.clear()\n clear: function clear() {\n for (var that = validate(this, NAME), data = that._i, entry = that._f; entry; entry = entry.n) {\n entry.r = true;\n if (entry.p) entry.p = entry.p.n = undefined;\n delete data[entry.i];\n }\n that._f = that._l = undefined;\n that[SIZE] = 0;\n },\n // 23.1.3.3 Map.prototype.delete(key)\n // 23.2.3.4 Set.prototype.delete(value)\n 'delete': function (key) {\n var that = validate(this, NAME);\n var entry = getEntry(that, key);\n if (entry) {\n var next = entry.n;\n var prev = entry.p;\n delete that._i[entry.i];\n entry.r = true;\n if (prev) prev.n = next;\n if (next) next.p = prev;\n if (that._f == entry) that._f = next;\n if (that._l == entry) that._l = prev;\n that[SIZE]--;\n } return !!entry;\n },\n // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined)\n // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined)\n forEach: function forEach(callbackfn /* , that = undefined */) {\n validate(this, NAME);\n var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);\n var entry;\n while (entry = entry ? entry.n : this._f) {\n f(entry.v, entry.k, this);\n // revert to the last existing entry\n while (entry && entry.r) entry = entry.p;\n }\n },\n // 23.1.3.7 Map.prototype.has(key)\n // 23.2.3.7 Set.prototype.has(value)\n has: function has(key) {\n return !!getEntry(validate(this, NAME), key);\n }\n });\n if (DESCRIPTORS) dP(C.prototype, 'size', {\n get: function () {\n return validate(this, NAME)[SIZE];\n }\n });\n return C;\n },\n def: function (that, key, value) {\n var entry = getEntry(that, key);\n var prev, index;\n // change existing entry\n if (entry) {\n entry.v = value;\n // create new entry\n } else {\n that._l = entry = {\n i: index = fastKey(key, true), // <- index\n k: key, // <- key\n v: value, // <- value\n p: prev = that._l, // <- previous entry\n n: undefined, // <- next entry\n r: false // <- removed\n };\n if (!that._f) that._f = entry;\n if (prev) prev.n = entry;\n that[SIZE]++;\n // add to index\n if (index !== 'F') that._i[index] = entry;\n } return that;\n },\n getEntry: getEntry,\n setStrong: function (C, NAME, IS_MAP) {\n // add .keys, .values, .entries, [@@iterator]\n // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11\n $iterDefine(C, NAME, function (iterated, kind) {\n this._t = validate(iterated, NAME); // target\n this._k = kind; // kind\n this._l = undefined; // previous\n }, function () {\n var that = this;\n var kind = that._k;\n var entry = that._l;\n // revert to the last existing entry\n while (entry && entry.r) entry = entry.p;\n // get next entry\n if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) {\n // or finish the iteration\n that._t = undefined;\n return step(1);\n }\n // return step by kind\n if (kind == 'keys') return step(0, entry.k);\n if (kind == 'values') return step(0, entry.v);\n return step(0, [entry.k, entry.v]);\n }, IS_MAP ? 'entries' : 'values', !IS_MAP, true);\n\n // add [@@species], 23.1.2.2, 23.2.2.2\n setSpecies(NAME);\n }\n};\n","// 7.2.2 IsArray(argument)\nvar cof = require('./_cof');\nmodule.exports = Array.isArray || function isArray(arg) {\n return cof(arg) == 'Array';\n};\n","var isObject = require('./_is-object');\nvar isArray = require('./_is-array');\nvar SPECIES = require('./_wks')('species');\n\nmodule.exports = function (original) {\n var C;\n if (isArray(original)) {\n C = original.constructor;\n // cross-realm fallback\n if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;\n if (isObject(C)) {\n C = C[SPECIES];\n if (C === null) C = undefined;\n }\n } return C === undefined ? Array : C;\n};\n","// 9.4.2.3 ArraySpeciesCreate(originalArray, length)\nvar speciesConstructor = require('./_array-species-constructor');\n\nmodule.exports = function (original, length) {\n return new (speciesConstructor(original))(length);\n};\n","// 0 -> Array#forEach\n// 1 -> Array#map\n// 2 -> Array#filter\n// 3 -> Array#some\n// 4 -> Array#every\n// 5 -> Array#find\n// 6 -> Array#findIndex\nvar ctx = require('./_ctx');\nvar IObject = require('./_iobject');\nvar toObject = require('./_to-object');\nvar toLength = require('./_to-length');\nvar asc = require('./_array-species-create');\nmodule.exports = function (TYPE, $create) {\n var IS_MAP = TYPE == 1;\n var IS_FILTER = TYPE == 2;\n var IS_SOME = TYPE == 3;\n var IS_EVERY = TYPE == 4;\n var IS_FIND_INDEX = TYPE == 6;\n var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;\n var create = $create || asc;\n return function ($this, callbackfn, that) {\n var O = toObject($this);\n var self = IObject(O);\n var f = ctx(callbackfn, that, 3);\n var length = toLength(self.length);\n var index = 0;\n var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;\n var val, res;\n for (;length > index; index++) if (NO_HOLES || index in self) {\n val = self[index];\n res = f(val, index, O);\n if (TYPE) {\n if (IS_MAP) result[index] = res; // map\n else if (res) switch (TYPE) {\n case 3: return true; // some\n case 5: return val; // find\n case 6: return index; // findIndex\n case 2: result.push(val); // filter\n } else if (IS_EVERY) return false; // every\n }\n }\n return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result;\n };\n};\n","'use strict';\nvar global = require('./_global');\nvar $export = require('./_export');\nvar meta = require('./_meta');\nvar fails = require('./_fails');\nvar hide = require('./_hide');\nvar redefineAll = require('./_redefine-all');\nvar forOf = require('./_for-of');\nvar anInstance = require('./_an-instance');\nvar isObject = require('./_is-object');\nvar setToStringTag = require('./_set-to-string-tag');\nvar dP = require('./_object-dp').f;\nvar each = require('./_array-methods')(0);\nvar DESCRIPTORS = require('./_descriptors');\n\nmodule.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) {\n var Base = global[NAME];\n var C = Base;\n var ADDER = IS_MAP ? 'set' : 'add';\n var proto = C && C.prototype;\n var O = {};\n if (!DESCRIPTORS || typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function () {\n new C().entries().next();\n }))) {\n // create collection constructor\n C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER);\n redefineAll(C.prototype, methods);\n meta.NEED = true;\n } else {\n C = wrapper(function (target, iterable) {\n anInstance(target, C, NAME, '_c');\n target._c = new Base();\n if (iterable != undefined) forOf(iterable, IS_MAP, target[ADDER], target);\n });\n each('add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON'.split(','), function (KEY) {\n var IS_ADDER = KEY == 'add' || KEY == 'set';\n if (KEY in proto && !(IS_WEAK && KEY == 'clear')) hide(C.prototype, KEY, function (a, b) {\n anInstance(this, C, KEY);\n if (!IS_ADDER && IS_WEAK && !isObject(a)) return KEY == 'get' ? undefined : false;\n var result = this._c[KEY](a === 0 ? 0 : a, b);\n return IS_ADDER ? this : result;\n });\n });\n IS_WEAK || dP(C.prototype, 'size', {\n get: function () {\n return this._c.size;\n }\n });\n }\n\n setToStringTag(C, NAME);\n\n O[NAME] = C;\n $export($export.G + $export.W + $export.F, O);\n\n if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP);\n\n return C;\n};\n","'use strict';\nvar strong = require('./_collection-strong');\nvar validate = require('./_validate-collection');\nvar SET = 'Set';\n\n// 23.2 Set Objects\nmodule.exports = require('./_collection')(SET, function (get) {\n return function Set() { return get(this, arguments.length > 0 ? arguments[0] : undefined); };\n}, {\n // 23.2.3.1 Set.prototype.add(value)\n add: function add(value) {\n return strong.def(validate(this, SET), value = value === 0 ? 0 : value, value);\n }\n}, strong);\n","var forOf = require('./_for-of');\n\nmodule.exports = function (iter, ITERATOR) {\n var result = [];\n forOf(iter, false, result.push, result, ITERATOR);\n return result;\n};\n","// https://github.com/DavidBruant/Map-Set.prototype.toJSON\nvar classof = require('./_classof');\nvar from = require('./_array-from-iterable');\nmodule.exports = function (NAME) {\n return function toJSON() {\n if (classof(this) != NAME) throw TypeError(NAME + \"#toJSON isn't generic\");\n return from(this);\n };\n};\n","// https://github.com/DavidBruant/Map-Set.prototype.toJSON\nvar $export = require('./_export');\n\n$export($export.P + $export.R, 'Set', { toJSON: require('./_collection-to-json')('Set') });\n","'use strict';\n// https://tc39.github.io/proposal-setmap-offrom/\nvar $export = require('./_export');\n\nmodule.exports = function (COLLECTION) {\n $export($export.S, COLLECTION, { of: function of() {\n var length = arguments.length;\n var A = Array(length);\n while (length--) A[length] = arguments[length];\n return new this(A);\n } });\n};\n","// https://tc39.github.io/proposal-setmap-offrom/#sec-set.of\nrequire('./_set-collection-of')('Set');\n","'use strict';\n// https://tc39.github.io/proposal-setmap-offrom/\nvar $export = require('./_export');\nvar aFunction = require('./_a-function');\nvar ctx = require('./_ctx');\nvar forOf = require('./_for-of');\n\nmodule.exports = function (COLLECTION) {\n $export($export.S, COLLECTION, { from: function from(source /* , mapFn, thisArg */) {\n var mapFn = arguments[1];\n var mapping, A, n, cb;\n aFunction(this);\n mapping = mapFn !== undefined;\n if (mapping) aFunction(mapFn);\n if (source == undefined) return new this();\n A = [];\n if (mapping) {\n n = 0;\n cb = ctx(mapFn, arguments[2], 2);\n forOf(source, false, function (nextItem) {\n A.push(cb(nextItem, n++));\n });\n } else {\n forOf(source, false, A.push, A);\n }\n return new this(A);\n } });\n};\n","// https://tc39.github.io/proposal-setmap-offrom/#sec-set.from\nrequire('./_set-collection-from')('Set');\n","require('../modules/es6.object.to-string');\nrequire('../modules/es6.string.iterator');\nrequire('../modules/web.dom.iterable');\nrequire('../modules/es6.set');\nrequire('../modules/es7.set.to-json');\nrequire('../modules/es7.set.of');\nrequire('../modules/es7.set.from');\nmodule.exports = require('../modules/_core').Set;\n","module.exports = { \"default\": require(\"core-js/library/fn/set\"), __esModule: true };","exports.f = Object.getOwnPropertySymbols;\n","exports.f = {}.propertyIsEnumerable;\n","'use strict';\n// 19.1.2.1 Object.assign(target, source, ...)\nvar getKeys = require('./_object-keys');\nvar gOPS = require('./_object-gops');\nvar pIE = require('./_object-pie');\nvar toObject = require('./_to-object');\nvar IObject = require('./_iobject');\nvar $assign = Object.assign;\n\n// should work with symbols and should have deterministic property order (V8 bug)\nmodule.exports = !$assign || require('./_fails')(function () {\n var A = {};\n var B = {};\n // eslint-disable-next-line no-undef\n var S = Symbol();\n var K = 'abcdefghijklmnopqrst';\n A[S] = 7;\n K.split('').forEach(function (k) { B[k] = k; });\n return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;\n}) ? function assign(target, source) { // eslint-disable-line no-unused-vars\n var T = toObject(target);\n var aLen = arguments.length;\n var index = 1;\n var getSymbols = gOPS.f;\n var isEnum = pIE.f;\n while (aLen > index) {\n var S = IObject(arguments[index++]);\n var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S);\n var length = keys.length;\n var j = 0;\n var key;\n while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key];\n } return T;\n} : $assign;\n","// 19.1.3.1 Object.assign(target, source)\nvar $export = require('./_export');\n\n$export($export.S + $export.F, 'Object', { assign: require('./_object-assign') });\n","require('../../modules/es6.object.assign');\nmodule.exports = require('../../modules/_core').Object.assign;\n","module.exports = { \"default\": require(\"core-js/library/fn/object/assign\"), __esModule: true };","\"use strict\";\n\nexports.__esModule = true;\n\nexports.default = function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n};","exports.f = require('./_wks');\n","require('../../modules/es6.string.iterator');\nrequire('../../modules/web.dom.iterable');\nmodule.exports = require('../../modules/_wks-ext').f('iterator');\n","module.exports = { \"default\": require(\"core-js/library/fn/symbol/iterator\"), __esModule: true };","var global = require('./_global');\nvar core = require('./_core');\nvar LIBRARY = require('./_library');\nvar wksExt = require('./_wks-ext');\nvar defineProperty = require('./_object-dp').f;\nmodule.exports = function (name) {\n var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});\n if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) });\n};\n","// all enumerable object keys, includes symbols\nvar getKeys = require('./_object-keys');\nvar gOPS = require('./_object-gops');\nvar pIE = require('./_object-pie');\nmodule.exports = function (it) {\n var result = getKeys(it);\n var getSymbols = gOPS.f;\n if (getSymbols) {\n var symbols = getSymbols(it);\n var isEnum = pIE.f;\n var i = 0;\n var key;\n while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key);\n } return result;\n};\n","// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)\nvar $keys = require('./_object-keys-internal');\nvar hiddenKeys = require('./_enum-bug-keys').concat('length', 'prototype');\n\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return $keys(O, hiddenKeys);\n};\n","// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window\nvar toIObject = require('./_to-iobject');\nvar gOPN = require('./_object-gopn').f;\nvar toString = {}.toString;\n\nvar windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames\n ? Object.getOwnPropertyNames(window) : [];\n\nvar getWindowNames = function (it) {\n try {\n return gOPN(it);\n } catch (e) {\n return windowNames.slice();\n }\n};\n\nmodule.exports.f = function getOwnPropertyNames(it) {\n return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));\n};\n","var pIE = require('./_object-pie');\nvar createDesc = require('./_property-desc');\nvar toIObject = require('./_to-iobject');\nvar toPrimitive = require('./_to-primitive');\nvar has = require('./_has');\nvar IE8_DOM_DEFINE = require('./_ie8-dom-define');\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nexports.f = require('./_descriptors') ? gOPD : function getOwnPropertyDescriptor(O, P) {\n O = toIObject(O);\n P = toPrimitive(P, true);\n if (IE8_DOM_DEFINE) try {\n return gOPD(O, P);\n } catch (e) { /* empty */ }\n if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);\n};\n","'use strict';\n// ECMAScript 6 symbols shim\nvar global = require('./_global');\nvar has = require('./_has');\nvar DESCRIPTORS = require('./_descriptors');\nvar $export = require('./_export');\nvar redefine = require('./_redefine');\nvar META = require('./_meta').KEY;\nvar $fails = require('./_fails');\nvar shared = require('./_shared');\nvar setToStringTag = require('./_set-to-string-tag');\nvar uid = require('./_uid');\nvar wks = require('./_wks');\nvar wksExt = require('./_wks-ext');\nvar wksDefine = require('./_wks-define');\nvar enumKeys = require('./_enum-keys');\nvar isArray = require('./_is-array');\nvar anObject = require('./_an-object');\nvar toIObject = require('./_to-iobject');\nvar toPrimitive = require('./_to-primitive');\nvar createDesc = require('./_property-desc');\nvar _create = require('./_object-create');\nvar gOPNExt = require('./_object-gopn-ext');\nvar $GOPD = require('./_object-gopd');\nvar $DP = require('./_object-dp');\nvar $keys = require('./_object-keys');\nvar gOPD = $GOPD.f;\nvar dP = $DP.f;\nvar gOPN = gOPNExt.f;\nvar $Symbol = global.Symbol;\nvar $JSON = global.JSON;\nvar _stringify = $JSON && $JSON.stringify;\nvar PROTOTYPE = 'prototype';\nvar HIDDEN = wks('_hidden');\nvar TO_PRIMITIVE = wks('toPrimitive');\nvar isEnum = {}.propertyIsEnumerable;\nvar SymbolRegistry = shared('symbol-registry');\nvar AllSymbols = shared('symbols');\nvar OPSymbols = shared('op-symbols');\nvar ObjectProto = Object[PROTOTYPE];\nvar USE_NATIVE = typeof $Symbol == 'function';\nvar QObject = global.QObject;\n// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173\nvar setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;\n\n// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687\nvar setSymbolDesc = DESCRIPTORS && $fails(function () {\n return _create(dP({}, 'a', {\n get: function () { return dP(this, 'a', { value: 7 }).a; }\n })).a != 7;\n}) ? function (it, key, D) {\n var protoDesc = gOPD(ObjectProto, key);\n if (protoDesc) delete ObjectProto[key];\n dP(it, key, D);\n if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc);\n} : dP;\n\nvar wrap = function (tag) {\n var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);\n sym._k = tag;\n return sym;\n};\n\nvar isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) {\n return typeof it == 'symbol';\n} : function (it) {\n return it instanceof $Symbol;\n};\n\nvar $defineProperty = function defineProperty(it, key, D) {\n if (it === ObjectProto) $defineProperty(OPSymbols, key, D);\n anObject(it);\n key = toPrimitive(key, true);\n anObject(D);\n if (has(AllSymbols, key)) {\n if (!D.enumerable) {\n if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {}));\n it[HIDDEN][key] = true;\n } else {\n if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false;\n D = _create(D, { enumerable: createDesc(0, false) });\n } return setSymbolDesc(it, key, D);\n } return dP(it, key, D);\n};\nvar $defineProperties = function defineProperties(it, P) {\n anObject(it);\n var keys = enumKeys(P = toIObject(P));\n var i = 0;\n var l = keys.length;\n var key;\n while (l > i) $defineProperty(it, key = keys[i++], P[key]);\n return it;\n};\nvar $create = function create(it, P) {\n return P === undefined ? _create(it) : $defineProperties(_create(it), P);\n};\nvar $propertyIsEnumerable = function propertyIsEnumerable(key) {\n var E = isEnum.call(this, key = toPrimitive(key, true));\n if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false;\n return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;\n};\nvar $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) {\n it = toIObject(it);\n key = toPrimitive(key, true);\n if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return;\n var D = gOPD(it, key);\n if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true;\n return D;\n};\nvar $getOwnPropertyNames = function getOwnPropertyNames(it) {\n var names = gOPN(toIObject(it));\n var result = [];\n var i = 0;\n var key;\n while (names.length > i) {\n if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key);\n } return result;\n};\nvar $getOwnPropertySymbols = function getOwnPropertySymbols(it) {\n var IS_OP = it === ObjectProto;\n var names = gOPN(IS_OP ? OPSymbols : toIObject(it));\n var result = [];\n var i = 0;\n var key;\n while (names.length > i) {\n if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]);\n } return result;\n};\n\n// 19.4.1.1 Symbol([description])\nif (!USE_NATIVE) {\n $Symbol = function Symbol() {\n if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!');\n var tag = uid(arguments.length > 0 ? arguments[0] : undefined);\n var $set = function (value) {\n if (this === ObjectProto) $set.call(OPSymbols, value);\n if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;\n setSymbolDesc(this, tag, createDesc(1, value));\n };\n if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set });\n return wrap(tag);\n };\n redefine($Symbol[PROTOTYPE], 'toString', function toString() {\n return this._k;\n });\n\n $GOPD.f = $getOwnPropertyDescriptor;\n $DP.f = $defineProperty;\n require('./_object-gopn').f = gOPNExt.f = $getOwnPropertyNames;\n require('./_object-pie').f = $propertyIsEnumerable;\n require('./_object-gops').f = $getOwnPropertySymbols;\n\n if (DESCRIPTORS && !require('./_library')) {\n redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);\n }\n\n wksExt.f = function (name) {\n return wrap(wks(name));\n };\n}\n\n$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol });\n\nfor (var es6Symbols = (\n // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14\n 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'\n).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]);\n\nfor (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]);\n\n$export($export.S + $export.F * !USE_NATIVE, 'Symbol', {\n // 19.4.2.1 Symbol.for(key)\n 'for': function (key) {\n return has(SymbolRegistry, key += '')\n ? SymbolRegistry[key]\n : SymbolRegistry[key] = $Symbol(key);\n },\n // 19.4.2.5 Symbol.keyFor(sym)\n keyFor: function keyFor(sym) {\n if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!');\n for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key;\n },\n useSetter: function () { setter = true; },\n useSimple: function () { setter = false; }\n});\n\n$export($export.S + $export.F * !USE_NATIVE, 'Object', {\n // 19.1.2.2 Object.create(O [, Properties])\n create: $create,\n // 19.1.2.4 Object.defineProperty(O, P, Attributes)\n defineProperty: $defineProperty,\n // 19.1.2.3 Object.defineProperties(O, Properties)\n defineProperties: $defineProperties,\n // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)\n getOwnPropertyDescriptor: $getOwnPropertyDescriptor,\n // 19.1.2.7 Object.getOwnPropertyNames(O)\n getOwnPropertyNames: $getOwnPropertyNames,\n // 19.1.2.8 Object.getOwnPropertySymbols(O)\n getOwnPropertySymbols: $getOwnPropertySymbols\n});\n\n// 24.3.2 JSON.stringify(value [, replacer [, space]])\n$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () {\n var S = $Symbol();\n // MS Edge converts symbol values to JSON as {}\n // WebKit converts symbol values to JSON as null\n // V8 throws on boxed symbols\n return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}';\n})), 'JSON', {\n stringify: function stringify(it) {\n if (it === undefined || isSymbol(it)) return; // IE8 returns string on undefined\n var args = [it];\n var i = 1;\n var replacer, $replacer;\n while (arguments.length > i) args.push(arguments[i++]);\n replacer = args[1];\n if (typeof replacer == 'function') $replacer = replacer;\n if ($replacer || !isArray(replacer)) replacer = function (key, value) {\n if ($replacer) value = $replacer.call(this, key, value);\n if (!isSymbol(value)) return value;\n };\n args[1] = replacer;\n return _stringify.apply($JSON, args);\n }\n});\n\n// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)\n$Symbol[PROTOTYPE][TO_PRIMITIVE] || require('./_hide')($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);\n// 19.4.3.5 Symbol.prototype[@@toStringTag]\nsetToStringTag($Symbol, 'Symbol');\n// 20.2.1.9 Math[@@toStringTag]\nsetToStringTag(Math, 'Math', true);\n// 24.3.3 JSON[@@toStringTag]\nsetToStringTag(global.JSON, 'JSON', true);\n","require('./_wks-define')('asyncIterator');\n","require('./_wks-define')('observable');\n","require('../../modules/es6.symbol');\nrequire('../../modules/es6.object.to-string');\nrequire('../../modules/es7.symbol.async-iterator');\nrequire('../../modules/es7.symbol.observable');\nmodule.exports = require('../../modules/_core').Symbol;\n","module.exports = { \"default\": require(\"core-js/library/fn/symbol\"), __esModule: true };","\"use strict\";\n\nexports.__esModule = true;\n\nvar _iterator = require(\"../core-js/symbol/iterator\");\n\nvar _iterator2 = _interopRequireDefault(_iterator);\n\nvar _symbol = require(\"../core-js/symbol\");\n\nvar _symbol2 = _interopRequireDefault(_symbol);\n\nvar _typeof = typeof _symbol2.default === \"function\" && typeof _iterator2.default === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === \"function\" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? \"symbol\" : typeof obj; };\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = typeof _symbol2.default === \"function\" && _typeof(_iterator2.default) === \"symbol\" ? function (obj) {\n return typeof obj === \"undefined\" ? \"undefined\" : _typeof(obj);\n} : function (obj) {\n return obj && typeof _symbol2.default === \"function\" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? \"symbol\" : typeof obj === \"undefined\" ? \"undefined\" : _typeof(obj);\n};","\"use strict\";\n\nexports.__esModule = true;\n\nvar _typeof2 = require(\"../helpers/typeof\");\n\nvar _typeof3 = _interopRequireDefault(_typeof2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function (self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return call && ((typeof call === \"undefined\" ? \"undefined\" : (0, _typeof3.default)(call)) === \"object\" || typeof call === \"function\") ? call : self;\n};","// Works with __proto__ only. Old v8 can't work with null proto objects.\n/* eslint-disable no-proto */\nvar isObject = require('./_is-object');\nvar anObject = require('./_an-object');\nvar check = function (O, proto) {\n anObject(O);\n if (!isObject(proto) && proto !== null) throw TypeError(proto + \": can't set as prototype!\");\n};\nmodule.exports = {\n set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line\n function (test, buggy, set) {\n try {\n set = require('./_ctx')(Function.call, require('./_object-gopd').f(Object.prototype, '__proto__').set, 2);\n set(test, []);\n buggy = !(test instanceof Array);\n } catch (e) { buggy = true; }\n return function setPrototypeOf(O, proto) {\n check(O, proto);\n if (buggy) O.__proto__ = proto;\n else set(O, proto);\n return O;\n };\n }({}, false) : undefined),\n check: check\n};\n","// 19.1.3.19 Object.setPrototypeOf(O, proto)\nvar $export = require('./_export');\n$export($export.S, 'Object', { setPrototypeOf: require('./_set-proto').set });\n","require('../../modules/es6.object.set-prototype-of');\nmodule.exports = require('../../modules/_core').Object.setPrototypeOf;\n","module.exports = { \"default\": require(\"core-js/library/fn/object/set-prototype-of\"), __esModule: true };","var $export = require('./_export');\n// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\n$export($export.S, 'Object', { create: require('./_object-create') });\n","require('../../modules/es6.object.create');\nvar $Object = require('../../modules/_core').Object;\nmodule.exports = function create(P, D) {\n return $Object.create(P, D);\n};\n","module.exports = { \"default\": require(\"core-js/library/fn/object/create\"), __esModule: true };","\"use strict\";\n\nexports.__esModule = true;\n\nvar _setPrototypeOf = require(\"../core-js/object/set-prototype-of\");\n\nvar _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf);\n\nvar _create = require(\"../core-js/object/create\");\n\nvar _create2 = _interopRequireDefault(_create);\n\nvar _typeof2 = require(\"../helpers/typeof\");\n\nvar _typeof3 = _interopRequireDefault(_typeof2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function (subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + (typeof superClass === \"undefined\" ? \"undefined\" : (0, _typeof3.default)(superClass)));\n }\n\n subClass.prototype = (0, _create2.default)(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf2.default ? (0, _setPrototypeOf2.default)(subClass, superClass) : subClass.__proto__ = superClass;\n};","/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n * - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function(val, options) {\n options = options || {};\n var type = typeof val;\n if (type === 'string' && val.length > 0) {\n return parse(val);\n } else if (type === 'number' && isNaN(val) === false) {\n return options.long ? fmtLong(val) : fmtShort(val);\n }\n throw new Error(\n 'val is not a non-empty string or a valid number. val=' +\n JSON.stringify(val)\n );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n str = String(str);\n if (str.length > 100) {\n return;\n }\n var match = /^((?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(\n str\n );\n if (!match) {\n return;\n }\n var n = parseFloat(match[1]);\n var type = (match[2] || 'ms').toLowerCase();\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n default:\n return undefined;\n }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n if (ms >= d) {\n return Math.round(ms / d) + 'd';\n }\n if (ms >= h) {\n return Math.round(ms / h) + 'h';\n }\n if (ms >= m) {\n return Math.round(ms / m) + 'm';\n }\n if (ms >= s) {\n return Math.round(ms / s) + 's';\n }\n return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n return plural(ms, d, 'day') ||\n plural(ms, h, 'hour') ||\n plural(ms, m, 'minute') ||\n plural(ms, s, 'second') ||\n ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, n, name) {\n if (ms < n) {\n return;\n }\n if (ms < n * 1.5) {\n return Math.floor(ms / n) + ' ' + name;\n }\n return Math.ceil(ms / n) + ' ' + name + 's';\n}\n","\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n *\n * Expose `debug()` as the module.\n */\n\nexports = module.exports = createDebug.debug = createDebug['default'] = createDebug;\nexports.coerce = coerce;\nexports.disable = disable;\nexports.enable = enable;\nexports.enabled = enabled;\nexports.humanize = require('ms');\n\n/**\n * The currently active debug mode names, and names to skip.\n */\n\nexports.names = [];\nexports.skips = [];\n\n/**\n * Map of special \"%n\" handling functions, for the debug \"format\" argument.\n *\n * Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n */\n\nexports.formatters = {};\n\n/**\n * Previous log timestamp.\n */\n\nvar prevTime;\n\n/**\n * Select a color.\n * @param {String} namespace\n * @return {Number}\n * @api private\n */\n\nfunction selectColor(namespace) {\n var hash = 0, i;\n\n for (i in namespace) {\n hash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n hash |= 0; // Convert to 32bit integer\n }\n\n return exports.colors[Math.abs(hash) % exports.colors.length];\n}\n\n/**\n * Create a debugger with the given `namespace`.\n *\n * @param {String} namespace\n * @return {Function}\n * @api public\n */\n\nfunction createDebug(namespace) {\n\n function debug() {\n // disabled?\n if (!debug.enabled) return;\n\n var self = debug;\n\n // set `diff` timestamp\n var curr = +new Date();\n var ms = curr - (prevTime || curr);\n self.diff = ms;\n self.prev = prevTime;\n self.curr = curr;\n prevTime = curr;\n\n // turn the `arguments` into a proper Array\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n\n args[0] = exports.coerce(args[0]);\n\n if ('string' !== typeof args[0]) {\n // anything else let's inspect with %O\n args.unshift('%O');\n }\n\n // apply any `formatters` transformations\n var index = 0;\n args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) {\n // if we encounter an escaped % then don't increase the array index\n if (match === '%%') return match;\n index++;\n var formatter = exports.formatters[format];\n if ('function' === typeof formatter) {\n var val = args[index];\n match = formatter.call(self, val);\n\n // now we need to remove `args[index]` since it's inlined in the `format`\n args.splice(index, 1);\n index--;\n }\n return match;\n });\n\n // apply env-specific formatting (colors, etc.)\n exports.formatArgs.call(self, args);\n\n var logFn = debug.log || exports.log || console.log.bind(console);\n logFn.apply(self, args);\n }\n\n debug.namespace = namespace;\n debug.enabled = exports.enabled(namespace);\n debug.useColors = exports.useColors();\n debug.color = selectColor(namespace);\n\n // env-specific initialization logic for debug instances\n if ('function' === typeof exports.init) {\n exports.init(debug);\n }\n\n return debug;\n}\n\n/**\n * Enables a debug mode by namespaces. This can include modes\n * separated by a colon and wildcards.\n *\n * @param {String} namespaces\n * @api public\n */\n\nfunction enable(namespaces) {\n exports.save(namespaces);\n\n exports.names = [];\n exports.skips = [];\n\n var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n var len = split.length;\n\n for (var i = 0; i < len; i++) {\n if (!split[i]) continue; // ignore empty strings\n namespaces = split[i].replace(/\\*/g, '.*?');\n if (namespaces[0] === '-') {\n exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));\n } else {\n exports.names.push(new RegExp('^' + namespaces + '$'));\n }\n }\n}\n\n/**\n * Disable debug output.\n *\n * @api public\n */\n\nfunction disable() {\n exports.enable('');\n}\n\n/**\n * Returns true if the given mode name is enabled, false otherwise.\n *\n * @param {String} name\n * @return {Boolean}\n * @api public\n */\n\nfunction enabled(name) {\n var i, len;\n for (i = 0, len = exports.skips.length; i < len; i++) {\n if (exports.skips[i].test(name)) {\n return false;\n }\n }\n for (i = 0, len = exports.names.length; i < len; i++) {\n if (exports.names[i].test(name)) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * Coerce `val`.\n *\n * @param {Mixed} val\n * @return {Mixed}\n * @api private\n */\n\nfunction coerce(val) {\n if (val instanceof Error) return val.stack || val.message;\n return val;\n}\n","/**\n * This is the web browser implementation of `debug()`.\n *\n * Expose `debug()` as the module.\n */\n\nexports = module.exports = require('./debug');\nexports.log = log;\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = 'undefined' != typeof chrome\n && 'undefined' != typeof chrome.storage\n ? chrome.storage.local\n : localstorage();\n\n/**\n * Colors.\n */\n\nexports.colors = [\n 'lightseagreen',\n 'forestgreen',\n 'goldenrod',\n 'dodgerblue',\n 'darkorchid',\n 'crimson'\n];\n\n/**\n * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n * and the Firebug extension (any Firefox version) are known\n * to support \"%c\" CSS customizations.\n *\n * TODO: add a `localStorage` variable to explicitly enable/disable colors\n */\n\nfunction useColors() {\n // NB: In an Electron preload script, document will be defined but not fully\n // initialized. Since we know we're in Chrome, we'll just detect this case\n // explicitly\n if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') {\n return true;\n }\n\n // is webkit? http://stackoverflow.com/a/16459606/376773\n // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n // double check webkit in userAgent just in case we are in a worker\n (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nexports.formatters.j = function(v) {\n try {\n return JSON.stringify(v);\n } catch (err) {\n return '[UnexpectedJSONParseError]: ' + err.message;\n }\n};\n\n\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return;\n\n var c = 'color: ' + this.color;\n args.splice(1, 0, c, 'color: inherit')\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-zA-Z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n}\n\n/**\n * Invokes `console.log()` when available.\n * No-op when `console.log` is not a \"function\".\n *\n * @api public\n */\n\nfunction log() {\n // this hackery is required for IE8/9, where\n // the `console.log` function doesn't have 'apply'\n return 'object' === typeof console\n && console.log\n && Function.prototype.apply.call(console.log, console, arguments);\n}\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\n\nfunction save(namespaces) {\n try {\n if (null == namespaces) {\n exports.storage.removeItem('debug');\n } else {\n exports.storage.debug = namespaces;\n }\n } catch(e) {}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\n\nfunction load() {\n var r;\n try {\n r = exports.storage.debug;\n } catch(e) {}\n\n // If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n if (!r && typeof process !== 'undefined' && 'env' in process) {\n r = process.env.DEBUG;\n }\n\n return r;\n}\n\n/**\n * Enable namespaces listed in `localStorage.debug` initially.\n */\n\nexports.enable(load());\n\n/**\n * Localstorage attempts to return the localstorage.\n *\n * This is necessary because safari throws\n * when a user disables cookies/localstorage\n * and you attempt to access it.\n *\n * @return {LocalStorage}\n * @api private\n */\n\nfunction localstorage() {\n try {\n return window.localStorage;\n } catch (e) {}\n}\n","'use strict';\n\nmodule.exports = function bind(fn, thisArg) {\n return function wrap() {\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n return fn.apply(thisArg, args);\n };\n};\n","/*!\n * Determine if an object is a Buffer\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n\n// The _isBuffer check is for Safari 5-7 support, because it's missing\n// Object.prototype.constructor. Remove this eventually\nmodule.exports = function (obj) {\n return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer)\n}\n\nfunction isBuffer (obj) {\n return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)\n}\n\n// For Node v0.10 support. Remove this eventually.\nfunction isSlowBuffer (obj) {\n return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0))\n}\n","'use strict';\n\nvar bind = require('./helpers/bind');\nvar isBuffer = require('is-buffer');\n\n/*global toString:true*/\n\n// utils is a library of generic helper functions non-specific to axios\n\nvar toString = Object.prototype.toString;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\nfunction isArray(val) {\n return toString.call(val) === '[object Array]';\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nfunction isArrayBuffer(val) {\n return toString.call(val) === '[object ArrayBuffer]';\n}\n\n/**\n * Determine if a value is a FormData\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction isFormData(val) {\n return (typeof FormData !== 'undefined') && (val instanceof FormData);\n}\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n var result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a String, otherwise false\n */\nfunction isString(val) {\n return typeof val === 'string';\n}\n\n/**\n * Determine if a value is a Number\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Number, otherwise false\n */\nfunction isNumber(val) {\n return typeof val === 'number';\n}\n\n/**\n * Determine if a value is undefined\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nfunction isUndefined(val) {\n return typeof val === 'undefined';\n}\n\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\nfunction isObject(val) {\n return val !== null && typeof val === 'object';\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\nfunction isDate(val) {\n return toString.call(val) === '[object Date]';\n}\n\n/**\n * Determine if a value is a File\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nfunction isFile(val) {\n return toString.call(val) === '[object File]';\n}\n\n/**\n * Determine if a value is a Blob\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nfunction isBlob(val) {\n return toString.call(val) === '[object Blob]';\n}\n\n/**\n * Determine if a value is a Function\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nfunction isFunction(val) {\n return toString.call(val) === '[object Function]';\n}\n\n/**\n * Determine if a value is a Stream\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nfunction isStream(val) {\n return isObject(val) && isFunction(val.pipe);\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nfunction isURLSearchParams(val) {\n return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;\n}\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\nfunction trim(str) {\n return str.replace(/^\\s*/, '').replace(/\\s*$/, '');\n}\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n */\nfunction isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {\n return false;\n }\n return (\n typeof window !== 'undefined' &&\n typeof document !== 'undefined'\n );\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object' && !isArray(obj)) {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (var i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n fn.call(null, obj[key], key, obj);\n }\n }\n }\n}\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n var result = {};\n function assignValue(val, key) {\n if (typeof result[key] === 'object' && typeof val === 'object') {\n result[key] = merge(result[key], val);\n } else {\n result[key] = val;\n }\n }\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n * @return {Object} The resulting value of object a\n */\nfunction extend(a, b, thisArg) {\n forEach(b, function assignValue(val, key) {\n if (thisArg && typeof val === 'function') {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n });\n return a;\n}\n\nmodule.exports = {\n isArray: isArray,\n isArrayBuffer: isArrayBuffer,\n isBuffer: isBuffer,\n isFormData: isFormData,\n isArrayBufferView: isArrayBufferView,\n isString: isString,\n isNumber: isNumber,\n isObject: isObject,\n isUndefined: isUndefined,\n isDate: isDate,\n isFile: isFile,\n isBlob: isBlob,\n isFunction: isFunction,\n isStream: isStream,\n isURLSearchParams: isURLSearchParams,\n isStandardBrowserEnv: isStandardBrowserEnv,\n forEach: forEach,\n merge: merge,\n extend: extend,\n trim: trim\n};\n","var core = require('../../modules/_core');\nvar $JSON = core.JSON || (core.JSON = { stringify: JSON.stringify });\nmodule.exports = function stringify(it) { // eslint-disable-line no-unused-vars\n return $JSON.stringify.apply($JSON, arguments);\n};\n","module.exports = { \"default\": require(\"core-js/library/fn/json/stringify\"), __esModule: true };","'use strict';\n\nvar utils = require('../utils');\n\nmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n utils.forEach(headers, function processHeader(value, name) {\n if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n headers[normalizedName] = value;\n delete headers[name];\n }\n });\n};\n","'use strict';\n\n/**\n * Update an Error with the specified config, error code, and response.\n *\n * @param {Error} error The error to update.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The error.\n */\nmodule.exports = function enhanceError(error, config, code, request, response) {\n error.config = config;\n if (code) {\n error.code = code;\n }\n error.request = request;\n error.response = response;\n return error;\n};\n","'use strict';\n\nvar enhanceError = require('./enhanceError');\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The created error.\n */\nmodule.exports = function createError(message, config, code, request, response) {\n var error = new Error(message);\n return enhanceError(error, config, code, request, response);\n};\n","'use strict';\n\nvar createError = require('./createError');\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n */\nmodule.exports = function settle(resolve, reject, response) {\n var validateStatus = response.config.validateStatus;\n // Note: status is not exposed by XDomainRequest\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(createError(\n 'Request failed with status code ' + response.status,\n response.config,\n null,\n response.request,\n response\n ));\n }\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%40/gi, '@').\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @returns {string} The formatted url\n */\nmodule.exports = function buildURL(url, params, paramsSerializer) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n\n var serializedParams;\n if (paramsSerializer) {\n serializedParams = paramsSerializer(params);\n } else if (utils.isURLSearchParams(params)) {\n serializedParams = params.toString();\n } else {\n var parts = [];\n\n utils.forEach(params, function serialize(val, key) {\n if (val === null || typeof val === 'undefined') {\n return;\n }\n\n if (utils.isArray(val)) {\n key = key + '[]';\n }\n\n if (!utils.isArray(val)) {\n val = [val];\n }\n\n utils.forEach(val, function parseValue(v) {\n if (utils.isDate(v)) {\n v = v.toISOString();\n } else if (utils.isObject(v)) {\n v = JSON.stringify(v);\n }\n parts.push(encode(key) + '=' + encode(v));\n });\n });\n\n serializedParams = parts.join('&');\n }\n\n if (serializedParams) {\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n var parsed = {};\n var key;\n var val;\n var i;\n\n if (!headers) { return parsed; }\n\n utils.forEach(headers.split('\\n'), function parser(line) {\n i = line.indexOf(':');\n key = utils.trim(line.substr(0, i)).toLowerCase();\n val = utils.trim(line.substr(i + 1));\n\n if (key) {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs have full support of the APIs needed to test\n // whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n var msie = /(msie|trident)/i.test(navigator.userAgent);\n var urlParsingNode = document.createElement('a');\n var originURL;\n\n /**\n * Parse a URL to discover it's components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n var href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })()\n);\n","'use strict';\n\n// btoa polyfill for IE<10 courtesy https://github.com/davidchambers/Base64.js\n\nvar chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n\nfunction E() {\n this.message = 'String contains an invalid character';\n}\nE.prototype = new Error;\nE.prototype.code = 5;\nE.prototype.name = 'InvalidCharacterError';\n\nfunction btoa(input) {\n var str = String(input);\n var output = '';\n for (\n // initialize result and counter\n var block, charCode, idx = 0, map = chars;\n // if the next str index does not exist:\n // change the mapping table to \"=\"\n // check if d has no fractional digits\n str.charAt(idx | 0) || (map = '=', idx % 1);\n // \"8 - idx % 1 * 8\" generates the sequence 2, 4, 6, 8\n output += map.charAt(63 & block >> 8 - idx % 1 * 8)\n ) {\n charCode = str.charCodeAt(idx += 3 / 4);\n if (charCode > 0xFF) {\n throw new E();\n }\n block = block << 8 | charCode;\n }\n return output;\n}\n\nmodule.exports = btoa;\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs support document.cookie\n (function standardBrowserEnv() {\n return {\n write: function write(name, value, expires, path, domain, secure) {\n var cookie = [];\n cookie.push(name + '=' + encodeURIComponent(value));\n\n if (utils.isNumber(expires)) {\n cookie.push('expires=' + new Date(expires).toGMTString());\n }\n\n if (utils.isString(path)) {\n cookie.push('path=' + path);\n }\n\n if (utils.isString(domain)) {\n cookie.push('domain=' + domain);\n }\n\n if (secure === true) {\n cookie.push('secure');\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read: function read(name) {\n var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove: function remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n };\n })() :\n\n // Non standard browser env (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return {\n write: function write() {},\n read: function read() { return null; },\n remove: function remove() {}\n };\n })()\n);\n","'use strict';\n\nvar utils = require('./../utils');\nvar settle = require('./../core/settle');\nvar buildURL = require('./../helpers/buildURL');\nvar parseHeaders = require('./../helpers/parseHeaders');\nvar isURLSameOrigin = require('./../helpers/isURLSameOrigin');\nvar createError = require('../core/createError');\nvar btoa = (typeof window !== 'undefined' && window.btoa && window.btoa.bind(window)) || require('./../helpers/btoa');\n\nmodule.exports = function xhrAdapter(config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n var requestData = config.data;\n var requestHeaders = config.headers;\n\n if (utils.isFormData(requestData)) {\n delete requestHeaders['Content-Type']; // Let the browser set it\n }\n\n var request = new XMLHttpRequest();\n var loadEvent = 'onreadystatechange';\n var xDomain = false;\n\n // For IE 8/9 CORS support\n // Only supports POST and GET calls and doesn't returns the response headers.\n // DON'T do this for testing b/c XMLHttpRequest is mocked, not XDomainRequest.\n if (process.env.NODE_ENV !== 'test' &&\n typeof window !== 'undefined' &&\n window.XDomainRequest && !('withCredentials' in request) &&\n !isURLSameOrigin(config.url)) {\n request = new window.XDomainRequest();\n loadEvent = 'onload';\n xDomain = true;\n request.onprogress = function handleProgress() {};\n request.ontimeout = function handleTimeout() {};\n }\n\n // HTTP basic authentication\n if (config.auth) {\n var username = config.auth.username || '';\n var password = config.auth.password || '';\n requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n }\n\n request.open(config.method.toUpperCase(), buildURL(config.url, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n // Listen for ready state\n request[loadEvent] = function handleLoad() {\n if (!request || (request.readyState !== 4 && !xDomain)) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n\n // Prepare the response\n var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;\n var response = {\n data: responseData,\n // IE sends 1223 instead of 204 (https://github.com/mzabriskie/axios/issues/201)\n status: request.status === 1223 ? 204 : request.status,\n statusText: request.status === 1223 ? 'No Content' : request.statusText,\n headers: responseHeaders,\n config: config,\n request: request\n };\n\n settle(resolve, reject, response);\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(createError('Network Error', config, null, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED',\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if (utils.isStandardBrowserEnv()) {\n var cookies = require('./../helpers/cookies');\n\n // Add xsrf header\n var xsrfValue = (config.withCredentials || isURLSameOrigin(config.url)) && config.xsrfCookieName ?\n cookies.read(config.xsrfCookieName) :\n undefined;\n\n if (xsrfValue) {\n requestHeaders[config.xsrfHeaderName] = xsrfValue;\n }\n }\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n // Remove Content-Type if data is undefined\n delete requestHeaders[key];\n } else {\n // Otherwise add header to the request\n request.setRequestHeader(key, val);\n }\n });\n }\n\n // Add withCredentials to request if needed\n if (config.withCredentials) {\n request.withCredentials = true;\n }\n\n // Add responseType to request if needed\n if (config.responseType) {\n try {\n request.responseType = config.responseType;\n } catch (e) {\n // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2.\n // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function.\n if (config.responseType !== 'json') {\n throw e;\n }\n }\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', config.onDownloadProgress);\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', config.onUploadProgress);\n }\n\n if (config.cancelToken) {\n // Handle cancellation\n config.cancelToken.promise.then(function onCanceled(cancel) {\n if (!request) {\n return;\n }\n\n request.abort();\n reject(cancel);\n // Clean up request\n request = null;\n });\n }\n\n if (requestData === undefined) {\n requestData = null;\n }\n\n // Send the request\n request.send(requestData);\n });\n};\n","'use strict';\n\nvar utils = require('./utils');\nvar normalizeHeaderName = require('./helpers/normalizeHeaderName');\n\nvar DEFAULT_CONTENT_TYPE = {\n 'Content-Type': 'application/x-www-form-urlencoded'\n};\n\nfunction setContentTypeIfUnset(headers, value) {\n if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n headers['Content-Type'] = value;\n }\n}\n\nfunction getDefaultAdapter() {\n var adapter;\n if (typeof XMLHttpRequest !== 'undefined') {\n // For browsers use XHR adapter\n adapter = require('./adapters/xhr');\n } else if (typeof process !== 'undefined') {\n // For node use HTTP adapter\n adapter = require('./adapters/http');\n }\n return adapter;\n}\n\nvar defaults = {\n adapter: getDefaultAdapter(),\n\n transformRequest: [function transformRequest(data, headers) {\n normalizeHeaderName(headers, 'Content-Type');\n if (utils.isFormData(data) ||\n utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n return data.toString();\n }\n if (utils.isObject(data)) {\n setContentTypeIfUnset(headers, 'application/json;charset=utf-8');\n return JSON.stringify(data);\n }\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n /*eslint no-param-reassign:0*/\n if (typeof data === 'string') {\n try {\n data = JSON.parse(data);\n } catch (e) { /* Ignore */ }\n }\n return data;\n }],\n\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n }\n};\n\ndefaults.headers = {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n }\n};\n\nutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n defaults.headers[method] = {};\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n});\n\nmodule.exports = defaults;\n","'use strict';\n\nvar utils = require('./../utils');\n\nfunction InterceptorManager() {\n this.handlers = [];\n}\n\n/**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\nInterceptorManager.prototype.use = function use(fulfilled, rejected) {\n this.handlers.push({\n fulfilled: fulfilled,\n rejected: rejected\n });\n return this.handlers.length - 1;\n};\n\n/**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n */\nInterceptorManager.prototype.eject = function eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n};\n\n/**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n */\nInterceptorManager.prototype.forEach = function forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n};\n\nmodule.exports = InterceptorManager;\n","'use strict';\n\nvar utils = require('./../utils');\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n /*eslint no-param-reassign:0*/\n utils.forEach(fns, function transform(fn) {\n data = fn(data, headers);\n });\n\n return data;\n};\n","'use strict';\n\nmodule.exports = function isCancel(value) {\n return !!(value && value.__CANCEL__);\n};\n","'use strict';\n\nvar utils = require('./../utils');\nvar transformData = require('./transformData');\nvar isCancel = require('../cancel/isCancel');\nvar defaults = require('../defaults');\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n * @returns {Promise} The Promise to be fulfilled\n */\nmodule.exports = function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n // Ensure headers exist\n config.headers = config.headers || {};\n\n // Transform request data\n config.data = transformData(\n config.data,\n config.headers,\n config.transformRequest\n );\n\n // Flatten headers\n config.headers = utils.merge(\n config.headers.common || {},\n config.headers[config.method] || {},\n config.headers || {}\n );\n\n utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n function cleanHeaderConfig(method) {\n delete config.headers[method];\n }\n );\n\n var adapter = config.adapter || defaults.adapter;\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData(\n response.data,\n response.headers,\n config.transformResponse\n );\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData(\n reason.response.data,\n reason.response.headers,\n config.transformResponse\n );\n }\n }\n\n return Promise.reject(reason);\n });\n};\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nmodule.exports = function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d\\+\\-\\.]*:)?\\/\\//i.test(url);\n};\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n * @returns {string} The combined URL\n */\nmodule.exports = function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n};\n","'use strict';\n\nvar defaults = require('./../defaults');\nvar utils = require('./../utils');\nvar InterceptorManager = require('./InterceptorManager');\nvar dispatchRequest = require('./dispatchRequest');\nvar isAbsoluteURL = require('./../helpers/isAbsoluteURL');\nvar combineURLs = require('./../helpers/combineURLs');\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n */\nfunction Axios(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n}\n\n/**\n * Dispatch a request\n *\n * @param {Object} config The config specific for this request (merged with this.defaults)\n */\nAxios.prototype.request = function request(config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof config === 'string') {\n config = utils.merge({\n url: arguments[0]\n }, arguments[1]);\n }\n\n config = utils.merge(defaults, this.defaults, { method: 'get' }, config);\n config.method = config.method.toLowerCase();\n\n // Support baseURL config\n if (config.baseURL && !isAbsoluteURL(config.url)) {\n config.url = combineURLs(config.baseURL, config.url);\n }\n\n // Hook up interceptors middleware\n var chain = [dispatchRequest, undefined];\n var promise = Promise.resolve(config);\n\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n chain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n chain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n while (chain.length) {\n promise = promise.then(chain.shift(), chain.shift());\n }\n\n return promise;\n};\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(utils.merge(config || {}, {\n method: method,\n url: url\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, data, config) {\n return this.request(utils.merge(config || {}, {\n method: method,\n url: url,\n data: data\n }));\n };\n});\n\nmodule.exports = Axios;\n","'use strict';\n\n/**\n * A `Cancel` is an object that is thrown when an operation is canceled.\n *\n * @class\n * @param {string=} message The message.\n */\nfunction Cancel(message) {\n this.message = message;\n}\n\nCancel.prototype.toString = function toString() {\n return 'Cancel' + (this.message ? ': ' + this.message : '');\n};\n\nCancel.prototype.__CANCEL__ = true;\n\nmodule.exports = Cancel;\n","'use strict';\n\nvar Cancel = require('./Cancel');\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @class\n * @param {Function} executor The executor function.\n */\nfunction CancelToken(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n var resolvePromise;\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n var token = this;\n executor(function cancel(message) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new Cancel(message);\n resolvePromise(token.reason);\n });\n}\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n};\n\n/**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\nCancelToken.source = function source() {\n var cancel;\n var token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token: token,\n cancel: cancel\n };\n};\n\nmodule.exports = CancelToken;\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n * @returns {Function}\n */\nmodule.exports = function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n};\n","'use strict';\n\nvar utils = require('./utils');\nvar bind = require('./helpers/bind');\nvar Axios = require('./core/Axios');\nvar defaults = require('./defaults');\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n * @return {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n var context = new Axios(defaultConfig);\n var instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context);\n\n // Copy context to instance\n utils.extend(instance, context);\n\n return instance;\n}\n\n// Create the default instance to be exported\nvar axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Factory for creating new instances\naxios.create = function create(instanceConfig) {\n return createInstance(utils.merge(defaults, instanceConfig));\n};\n\n// Expose Cancel & CancelToken\naxios.Cancel = require('./cancel/Cancel');\naxios.CancelToken = require('./cancel/CancelToken');\naxios.isCancel = require('./cancel/isCancel');\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\naxios.spread = require('./helpers/spread');\n\nmodule.exports = axios;\n\n// Allow use of default import syntax in TypeScript\nmodule.exports.default = axios;\n","module.exports = require('./lib/axios');","// most Object methods by ES6 should accept primitives\nvar $export = require('./_export');\nvar core = require('./_core');\nvar fails = require('./_fails');\nmodule.exports = function (KEY, exec) {\n var fn = (core.Object || {})[KEY] || Object[KEY];\n var exp = {};\n exp[KEY] = exec(fn);\n $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp);\n};\n","// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)\nvar toIObject = require('./_to-iobject');\nvar $getOwnPropertyDescriptor = require('./_object-gopd').f;\n\nrequire('./_object-sap')('getOwnPropertyDescriptor', function () {\n return function getOwnPropertyDescriptor(it, key) {\n return $getOwnPropertyDescriptor(toIObject(it), key);\n };\n});\n","require('../../modules/es6.object.get-own-property-descriptor');\nvar $Object = require('../../modules/_core').Object;\nmodule.exports = function getOwnPropertyDescriptor(it, key) {\n return $Object.getOwnPropertyDescriptor(it, key);\n};\n","module.exports = { \"default\": require(\"core-js/library/fn/object/get-own-property-descriptor\"), __esModule: true };","/*\n\n Javascript State Machine Library - https://github.com/jakesgordon/javascript-state-machine\n\n Copyright (c) 2012, 2013, 2014, 2015, Jake Gordon and contributors\n Released under the MIT license - https://github.com/jakesgordon/javascript-state-machine/blob/master/LICENSE\n\n*/\n\n(function () {\n\n var StateMachine = {\n\n //---------------------------------------------------------------------------\n\n VERSION: \"2.4.0\",\n\n //---------------------------------------------------------------------------\n\n Result: {\n SUCCEEDED: 1, // the event transitioned successfully from one state to another\n NOTRANSITION: 2, // the event was successfull but no state transition was necessary\n CANCELLED: 3, // the event was cancelled by the caller in a beforeEvent callback\n PENDING: 4 // the event is asynchronous and the caller is in control of when the transition occurs\n },\n\n Error: {\n INVALID_TRANSITION: 100, // caller tried to fire an event that was innapropriate in the current state\n PENDING_TRANSITION: 200, // caller tried to fire an event while an async transition was still pending\n INVALID_CALLBACK: 300 // caller provided callback function threw an exception\n },\n\n WILDCARD: '*',\n ASYNC: 'async',\n\n //---------------------------------------------------------------------------\n\n create: function(cfg, target) {\n\n var initial = (typeof cfg.initial == 'string') ? { state: cfg.initial } : cfg.initial; // allow for a simple string, or an object with { state: 'foo', event: 'setup', defer: true|false }\n var terminal = cfg.terminal || cfg['final'];\n var fsm = target || cfg.target || {};\n var events = cfg.events || [];\n var callbacks = cfg.callbacks || {};\n var map = {}; // track state transitions allowed for an event { event: { from: [ to ] } }\n var transitions = {}; // track events allowed from a state { state: [ event ] }\n\n var add = function(e) {\n var from = Array.isArray(e.from) ? e.from : (e.from ? [e.from] : [StateMachine.WILDCARD]); // allow 'wildcard' transition if 'from' is not specified\n map[e.name] = map[e.name] || {};\n for (var n = 0 ; n < from.length ; n++) {\n transitions[from[n]] = transitions[from[n]] || [];\n transitions[from[n]].push(e.name);\n\n map[e.name][from[n]] = e.to || from[n]; // allow no-op transition if 'to' is not specified\n }\n if (e.to)\n transitions[e.to] = transitions[e.to] || [];\n };\n\n if (initial) {\n initial.event = initial.event || 'startup';\n add({ name: initial.event, from: 'none', to: initial.state });\n }\n\n for(var n = 0 ; n < events.length ; n++)\n add(events[n]);\n\n for(var name in map) {\n if (map.hasOwnProperty(name))\n fsm[name] = StateMachine.buildEvent(name, map[name]);\n }\n\n for(var name in callbacks) {\n if (callbacks.hasOwnProperty(name))\n fsm[name] = callbacks[name]\n }\n\n fsm.current = 'none';\n fsm.is = function(state) { return Array.isArray(state) ? (state.indexOf(this.current) >= 0) : (this.current === state); };\n fsm.can = function(event) { return !this.transition && (map[event] !== undefined) && (map[event].hasOwnProperty(this.current) || map[event].hasOwnProperty(StateMachine.WILDCARD)); }\n fsm.cannot = function(event) { return !this.can(event); };\n fsm.transitions = function() { return (transitions[this.current] || []).concat(transitions[StateMachine.WILDCARD] || []); };\n fsm.isFinished = function() { return this.is(terminal); };\n fsm.error = cfg.error || function(name, from, to, args, error, msg, e) { throw e || msg; }; // default behavior when something unexpected happens is to throw an exception, but caller can override this behavior if desired (see github issue #3 and #17)\n fsm.states = function() { return Object.keys(transitions).sort() };\n\n if (initial && !initial.defer)\n fsm[initial.event]();\n\n return fsm;\n\n },\n\n //===========================================================================\n\n doCallback: function(fsm, func, name, from, to, args) {\n if (func) {\n try {\n return func.apply(fsm, [name, from, to].concat(args));\n }\n catch(e) {\n return fsm.error(name, from, to, args, StateMachine.Error.INVALID_CALLBACK, \"an exception occurred in a caller-provided callback function\", e);\n }\n }\n },\n\n beforeAnyEvent: function(fsm, name, from, to, args) { return StateMachine.doCallback(fsm, fsm['onbeforeevent'], name, from, to, args); },\n afterAnyEvent: function(fsm, name, from, to, args) { return StateMachine.doCallback(fsm, fsm['onafterevent'] || fsm['onevent'], name, from, to, args); },\n leaveAnyState: function(fsm, name, from, to, args) { return StateMachine.doCallback(fsm, fsm['onleavestate'], name, from, to, args); },\n enterAnyState: function(fsm, name, from, to, args) { return StateMachine.doCallback(fsm, fsm['onenterstate'] || fsm['onstate'], name, from, to, args); },\n changeState: function(fsm, name, from, to, args) { return StateMachine.doCallback(fsm, fsm['onchangestate'], name, from, to, args); },\n\n beforeThisEvent: function(fsm, name, from, to, args) { return StateMachine.doCallback(fsm, fsm['onbefore' + name], name, from, to, args); },\n afterThisEvent: function(fsm, name, from, to, args) { return StateMachine.doCallback(fsm, fsm['onafter' + name] || fsm['on' + name], name, from, to, args); },\n leaveThisState: function(fsm, name, from, to, args) { return StateMachine.doCallback(fsm, fsm['onleave' + from], name, from, to, args); },\n enterThisState: function(fsm, name, from, to, args) { return StateMachine.doCallback(fsm, fsm['onenter' + to] || fsm['on' + to], name, from, to, args); },\n\n beforeEvent: function(fsm, name, from, to, args) {\n if ((false === StateMachine.beforeThisEvent(fsm, name, from, to, args)) ||\n (false === StateMachine.beforeAnyEvent( fsm, name, from, to, args)))\n return false;\n },\n\n afterEvent: function(fsm, name, from, to, args) {\n StateMachine.afterThisEvent(fsm, name, from, to, args);\n StateMachine.afterAnyEvent( fsm, name, from, to, args);\n },\n\n leaveState: function(fsm, name, from, to, args) {\n var specific = StateMachine.leaveThisState(fsm, name, from, to, args),\n general = StateMachine.leaveAnyState( fsm, name, from, to, args);\n if ((false === specific) || (false === general))\n return false;\n else if ((StateMachine.ASYNC === specific) || (StateMachine.ASYNC === general))\n return StateMachine.ASYNC;\n },\n\n enterState: function(fsm, name, from, to, args) {\n StateMachine.enterThisState(fsm, name, from, to, args);\n StateMachine.enterAnyState( fsm, name, from, to, args);\n },\n\n //===========================================================================\n\n buildEvent: function(name, map) {\n return function() {\n\n var from = this.current;\n var to = map[from] || (map[StateMachine.WILDCARD] != StateMachine.WILDCARD ? map[StateMachine.WILDCARD] : from) || from;\n var args = Array.prototype.slice.call(arguments); // turn arguments into pure array\n\n if (this.transition)\n return this.error(name, from, to, args, StateMachine.Error.PENDING_TRANSITION, \"event \" + name + \" inappropriate because previous transition did not complete\");\n\n if (this.cannot(name))\n return this.error(name, from, to, args, StateMachine.Error.INVALID_TRANSITION, \"event \" + name + \" inappropriate in current state \" + this.current);\n\n if (false === StateMachine.beforeEvent(this, name, from, to, args))\n return StateMachine.Result.CANCELLED;\n\n if (from === to) {\n StateMachine.afterEvent(this, name, from, to, args);\n return StateMachine.Result.NOTRANSITION;\n }\n\n // prepare a transition method for use EITHER lower down, or by caller if they want an async transition (indicated by an ASYNC return value from leaveState)\n var fsm = this;\n this.transition = function() {\n fsm.transition = null; // this method should only ever be called once\n fsm.current = to;\n StateMachine.enterState( fsm, name, from, to, args);\n StateMachine.changeState(fsm, name, from, to, args);\n StateMachine.afterEvent( fsm, name, from, to, args);\n return StateMachine.Result.SUCCEEDED;\n };\n this.transition.cancel = function() { // provide a way for caller to cancel async transition if desired (issue #22)\n fsm.transition = null;\n StateMachine.afterEvent(fsm, name, from, to, args);\n }\n\n var leave = StateMachine.leaveState(this, name, from, to, args);\n if (false === leave) {\n this.transition = null;\n return StateMachine.Result.CANCELLED;\n }\n else if (StateMachine.ASYNC === leave) {\n return StateMachine.Result.PENDING;\n }\n else {\n if (this.transition) // need to check in case user manually called transition() but forgot to return StateMachine.ASYNC\n return this.transition();\n }\n\n };\n }\n\n }; // StateMachine\n\n //===========================================================================\n\n //======\n // NODE\n //======\n if (typeof exports !== 'undefined') {\n if (typeof module !== 'undefined' && module.exports) {\n exports = module.exports = StateMachine;\n }\n exports.StateMachine = StateMachine;\n }\n //============\n // AMD/REQUIRE\n //============\n else if (typeof define === 'function' && define.amd) {\n define(function(require) { return StateMachine; });\n }\n //========\n // BROWSER\n //========\n else if (typeof window !== 'undefined') {\n window.StateMachine = StateMachine;\n }\n //===========\n // WEB WORKER\n //===========\n else if (typeof self !== 'undefined') {\n self.StateMachine = StateMachine;\n }\n\n}());\n","\"use strict\";\n\nexports.__esModule = true;\n\nvar _assign = require(\"../core-js/object/assign\");\n\nvar _assign2 = _interopRequireDefault(_assign);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _assign2.default || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n};","'use strict';\nvar redefineAll = require('./_redefine-all');\nvar getWeak = require('./_meta').getWeak;\nvar anObject = require('./_an-object');\nvar isObject = require('./_is-object');\nvar anInstance = require('./_an-instance');\nvar forOf = require('./_for-of');\nvar createArrayMethod = require('./_array-methods');\nvar $has = require('./_has');\nvar validate = require('./_validate-collection');\nvar arrayFind = createArrayMethod(5);\nvar arrayFindIndex = createArrayMethod(6);\nvar id = 0;\n\n// fallback for uncaught frozen keys\nvar uncaughtFrozenStore = function (that) {\n return that._l || (that._l = new UncaughtFrozenStore());\n};\nvar UncaughtFrozenStore = function () {\n this.a = [];\n};\nvar findUncaughtFrozen = function (store, key) {\n return arrayFind(store.a, function (it) {\n return it[0] === key;\n });\n};\nUncaughtFrozenStore.prototype = {\n get: function (key) {\n var entry = findUncaughtFrozen(this, key);\n if (entry) return entry[1];\n },\n has: function (key) {\n return !!findUncaughtFrozen(this, key);\n },\n set: function (key, value) {\n var entry = findUncaughtFrozen(this, key);\n if (entry) entry[1] = value;\n else this.a.push([key, value]);\n },\n 'delete': function (key) {\n var index = arrayFindIndex(this.a, function (it) {\n return it[0] === key;\n });\n if (~index) this.a.splice(index, 1);\n return !!~index;\n }\n};\n\nmodule.exports = {\n getConstructor: function (wrapper, NAME, IS_MAP, ADDER) {\n var C = wrapper(function (that, iterable) {\n anInstance(that, C, NAME, '_i');\n that._t = NAME; // collection type\n that._i = id++; // collection id\n that._l = undefined; // leak store for uncaught frozen objects\n if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);\n });\n redefineAll(C.prototype, {\n // 23.3.3.2 WeakMap.prototype.delete(key)\n // 23.4.3.3 WeakSet.prototype.delete(value)\n 'delete': function (key) {\n if (!isObject(key)) return false;\n var data = getWeak(key);\n if (data === true) return uncaughtFrozenStore(validate(this, NAME))['delete'](key);\n return data && $has(data, this._i) && delete data[this._i];\n },\n // 23.3.3.4 WeakMap.prototype.has(key)\n // 23.4.3.4 WeakSet.prototype.has(value)\n has: function has(key) {\n if (!isObject(key)) return false;\n var data = getWeak(key);\n if (data === true) return uncaughtFrozenStore(validate(this, NAME)).has(key);\n return data && $has(data, this._i);\n }\n });\n return C;\n },\n def: function (that, key, value) {\n var data = getWeak(anObject(key), true);\n if (data === true) uncaughtFrozenStore(that).set(key, value);\n else data[that._i] = value;\n return that;\n },\n ufstore: uncaughtFrozenStore\n};\n","'use strict';\nvar each = require('./_array-methods')(0);\nvar redefine = require('./_redefine');\nvar meta = require('./_meta');\nvar assign = require('./_object-assign');\nvar weak = require('./_collection-weak');\nvar isObject = require('./_is-object');\nvar fails = require('./_fails');\nvar validate = require('./_validate-collection');\nvar WEAK_MAP = 'WeakMap';\nvar getWeak = meta.getWeak;\nvar isExtensible = Object.isExtensible;\nvar uncaughtFrozenStore = weak.ufstore;\nvar tmp = {};\nvar InternalMap;\n\nvar wrapper = function (get) {\n return function WeakMap() {\n return get(this, arguments.length > 0 ? arguments[0] : undefined);\n };\n};\n\nvar methods = {\n // 23.3.3.3 WeakMap.prototype.get(key)\n get: function get(key) {\n if (isObject(key)) {\n var data = getWeak(key);\n if (data === true) return uncaughtFrozenStore(validate(this, WEAK_MAP)).get(key);\n return data ? data[this._i] : undefined;\n }\n },\n // 23.3.3.5 WeakMap.prototype.set(key, value)\n set: function set(key, value) {\n return weak.def(validate(this, WEAK_MAP), key, value);\n }\n};\n\n// 23.3 WeakMap Objects\nvar $WeakMap = module.exports = require('./_collection')(WEAK_MAP, wrapper, methods, weak, true, true);\n\n// IE11 WeakMap frozen keys fix\nif (fails(function () { return new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7; })) {\n InternalMap = weak.getConstructor(wrapper, WEAK_MAP);\n assign(InternalMap.prototype, methods);\n meta.NEED = true;\n each(['delete', 'has', 'get', 'set'], function (key) {\n var proto = $WeakMap.prototype;\n var method = proto[key];\n redefine(proto, key, function (a, b) {\n // store frozen objects on internal weakmap shim\n if (isObject(a) && !isExtensible(a)) {\n if (!this._f) this._f = new InternalMap();\n var result = this._f[key](a, b);\n return key == 'set' ? this : result;\n // store all the rest on native weakmap\n } return method.call(this, a, b);\n });\n });\n}\n","// https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.of\nrequire('./_set-collection-of')('WeakMap');\n","// https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.from\nrequire('./_set-collection-from')('WeakMap');\n","require('../modules/es6.object.to-string');\nrequire('../modules/web.dom.iterable');\nrequire('../modules/es6.weak-map');\nrequire('../modules/es7.weak-map.of');\nrequire('../modules/es7.weak-map.from');\nmodule.exports = require('../modules/_core').WeakMap;\n","module.exports = { \"default\": require(\"core-js/library/fn/weak-map\"), __esModule: true };","var $export = require('./_export');\n// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)\n$export($export.S + $export.F * !require('./_descriptors'), 'Object', { defineProperty: require('./_object-dp').f });\n","require('../../modules/es6.object.define-property');\nvar $Object = require('../../modules/_core').Object;\nmodule.exports = function defineProperty(it, key, desc) {\n return $Object.defineProperty(it, key, desc);\n};\n","module.exports = { \"default\": require(\"core-js/library/fn/object/define-property\"), __esModule: true };","\"use strict\";\n\nexports.__esModule = true;\n\nvar _defineProperty = require(\"../core-js/object/define-property\");\n\nvar _defineProperty2 = _interopRequireDefault(_defineProperty);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function (obj, key, value) {\n if (key in obj) {\n (0, _defineProperty2.default)(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n};","// 19.1.2.14 Object.keys(O)\nvar toObject = require('./_to-object');\nvar $keys = require('./_object-keys');\n\nrequire('./_object-sap')('keys', function () {\n return function keys(it) {\n return $keys(toObject(it));\n };\n});\n","require('../../modules/es6.object.keys');\nmodule.exports = require('../../modules/_core').Object.keys;\n","module.exports = { \"default\": require(\"core-js/library/fn/object/keys\"), __esModule: true };","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseGetTag = require('./_baseGetTag'),\n getPrototype = require('./_getPrototype'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n}\n\nmodule.exports = isPlainObject;\n","/* eslint-disable */\nexport default typeof global !== 'undefined' ? global :\n typeof window !== 'undefined' ? window : {};\n","\"use strict\";\n\nexports.__esModule = true;\n\nvar _defineProperty = require(\"../core-js/object/define-property\");\n\nvar _defineProperty2 = _interopRequireDefault(_defineProperty);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n (0, _defineProperty2.default)(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();","import d from 'debug';\n\nconst EXPIRED = Symbol('expired');\nconst debug = d('LC:Expirable');\nexport default class Expirable {\n constructor(value, ttl) {\n this._value = value;\n if (typeof ttl === 'number') {\n this.expiredAt = Date.now() + ttl;\n }\n }\n\n get value() {\n const expired = this.expiredAt && this.expiredAt < Date.now();\n if (expired) debug(`expired: ${this._value}`);\n return expired ? EXPIRED : this._value;\n }\n}\nExpirable.EXPIRED = EXPIRED;\n","import d from 'debug';\nimport Expirable from './expirable';\n\nconst debug = d('LC:Cache');\nexport default class Cache {\n constructor(name = 'anonymous') {\n this.name = name;\n this._map = {};\n }\n\n get(key) {\n const cache = this._map[key];\n if (cache) {\n const value = cache.value;\n if (value !== Expirable.EXPIRED) {\n debug('[%s] hit: %s %O', this.name, key, value);\n return value;\n }\n delete this._map[key];\n }\n debug(`[${this.name}] missed: ${key}`);\n return null;\n }\n\n set(key, value, ttl) {\n debug('[%s] set: %s %O %d', this.name, key, value, ttl);\n this._map[key] = new Expirable(value, ttl);\n }\n}\n","import isPlainObject from 'lodash/isPlainObject';\nimport global from './global';\n\nexport { global };\n\nexport const tryAll = (promiseConstructors) => {\n const promise = new Promise(promiseConstructors[0]);\n if (promiseConstructors.length === 1) {\n return promise;\n }\n return promise.catch(() => tryAll(promiseConstructors.slice(1)));\n};\n\nexport const tap = interceptor => value => ((interceptor(value), value));\n\nexport { default as Expirable } from './expirable';\nexport { default as Cache } from './cache';\n\nexport const decodeDate = (date) => {\n if (!date) return date;\n if (typeof date === 'string') {\n return new Date(date);\n }\n if (date.__type === 'Date' && date.iso) {\n return new Date(date.iso);\n }\n // Long\n if (typeof date.toNumber === 'function') {\n return new Date(date.toNumber());\n }\n return date;\n};\n\nexport const keyRemap = (keymap, obj) =>\n Object.keys(obj).reduce((newObj, key) => {\n const newKey = keymap[key] || key;\n return Object.assign(newObj, {\n [newKey]: obj[key],\n });\n }, {});\n\nexport const isIE10 = (\n global.navigator &&\n global.navigator.userAgent &&\n global.navigator.userAgent.indexOf('MSIE 10.') !== -1\n);\n\n/* eslint-disable no-proto */\nexport const getStaticProperty = (klass, property) =>\n (klass[property] || (klass.__proto__ ? getStaticProperty(klass.__proto__, property) : undefined));\n/* eslint-enable no-proto */\n\nexport const union = (a, b) => Array.from(new Set([...a, ...b]));\nexport const difference = (a, b) => Array.from(\n (bSet => new Set(a.filter(x => !bSet.has(x))))(new Set(b))\n);\n\nconst map = new WeakMap();\n\n// protected property helper\nexport const internal = (object) => {\n if (!map.has(object)) {\n map.set(object, {});\n }\n return map.get(object);\n};\n\n// debug utility\nconst removeNull = (obj) => {\n if (!isPlainObject(obj)) return obj;\n const object = Object.assign({}, obj);\n // eslint-disable-next-line no-restricted-syntax\n for (const prop in object) {\n if ({}.hasOwnProperty.call(object, prop)) {\n const value = object[prop];\n if (value === null) {\n delete object[prop];\n } else {\n object[prop] = removeNull(value);\n }\n }\n }\n return object;\n};\nexport const trim = message => removeNull(JSON.parse(JSON.stringify(message)));\n\nexport const ensureArray = (target) => {\n if (Array.isArray(target)) {\n return target;\n }\n if (target === undefined || target === null) {\n return [];\n }\n return [target];\n};\n\nexport const setValue = (target, key, value) => {\n // '.' is not allowed in Class keys, escaping is not in concern now.\n const segs = key.split('.');\n const lastSeg = segs.pop();\n let currentTarget = target;\n segs.forEach((seg) => {\n if (currentTarget[seg] === undefined) currentTarget[seg] = {};\n currentTarget = currentTarget[seg];\n });\n currentTarget[lastSeg] = value;\n return target;\n};\n\n// eslint-disable-next-line no-undef\nexport const isWeapp = typeof wx === 'object' && typeof wx.connectSocket === 'function';\n\n// throttle decorator\nexport const throttle = wait => (target, property, descriptor) => {\n const callback = descriptor.value;\n // very naive, internal use only\n if (callback.length) {\n throw new Error('throttled function should not accept any arguments');\n }\n return {\n ...descriptor,\n value() {\n let {\n throttleMeta,\n } = internal(this);\n if (!throttleMeta) throttleMeta = internal(this).throttleMeta = {};\n let {\n [property]: propertyMeta,\n } = throttleMeta;\n if (!propertyMeta) propertyMeta = throttleMeta[property] = {};\n const {\n previouseTimestamp = 0,\n timeout,\n } = propertyMeta;\n const now = Date.now();\n const remainingTime = wait - (now - previouseTimestamp);\n if (remainingTime <= 0) {\n throttleMeta[property].previouseTimestamp = now;\n callback.apply(this);\n } else if (!timeout) {\n propertyMeta.timeout = setTimeout(() => {\n propertyMeta.previouseTimestamp = Date.now();\n delete propertyMeta.timeout;\n callback.apply(this);\n }, remainingTime);\n }\n },\n };\n};\n","import { global } from '../utils';\n\nconst WebSocket = global.WebSocket || global.MozWebSocket;\nexport default WebSocket;\n","// WebSocket with auto reconnecting feature, backup endpoint and EventEmitter interface.\n\nimport d from 'debug';\nimport EventEmitter from 'eventemitter3';\nimport StateMachine from 'javascript-state-machine';\n\nimport WebSocket from 'ws';\n\nimport { tryAll, global } from './utils';\n\nconst debug = d('LC:WebSocketPlus');\n\nconst HEARTBEAT_TIME = 180000;\nconst TIMEOUT_TIME = 380000;\n\nconst DEFAULT_RETRY_STRATEGY = attempt => Math.min(1000 * Math.pow(2, attempt), 300000);\n\nconst requireConnected = (target, name, descriptor) =>\n Object.assign({}, descriptor, {\n value: function requireConnectedWrapper(...args) {\n if (!this.is('connected')) {\n const currentState = this.current;\n console.warn(`${name} should not be called when the connection is ${currentState}`);\n if (this.is('disconnected') || this.is('reconnecting')) {\n console.warn('disconnect and reconnect event should be handled to avoid such calls.');\n }\n throw new Error('Connection unavailable');\n }\n return descriptor.value.call(this, ...args);\n },\n });\n\nclass WebSocketPlus extends EventEmitter {\n constructor(getUrls, protocol) {\n if (typeof WebSocket === 'undefined') {\n throw new Error('WebSocket is undefined. Polyfill is required in this runtime.');\n }\n super();\n if (typeof getUrls !== 'function') {\n this._getUrls = () => Promise.resolve(getUrls);\n } else {\n this._getUrls = getUrls;\n }\n this._protocol = protocol;\n this.init();\n this._createWs(this._getUrls, this._protocol).then(\n () => {\n this.__postponeTimeoutTimer = this._postponeTimeoutTimer.bind(this);\n if (global.addEventListener) {\n this.__pause = () => this.pause();\n this.__resume = () => this.resume();\n global.addEventListener('offline', this.__pause);\n global.addEventListener('online', this.__resume);\n }\n this.open();\n }\n ).catch(this.throw.bind(this));\n }\n\n _createWs(getUrls, protocol) {\n return getUrls().then((wsUrls) => {\n let urls = wsUrls;\n if (!(urls instanceof Array)) {\n urls = [urls];\n }\n return tryAll(\n urls.map(url => (resolve, reject) => {\n debug(`connect [${url}] ${protocol}`);\n const ws = protocol ? new WebSocket(\n url, protocol\n ) : new WebSocket(url);\n ws.binaryType = this.binaryType || 'arraybuffer';\n ws.onopen = () => resolve(ws);\n ws.onerror = ws.onclose = (error) => {\n if (error instanceof Error) {\n return reject(error);\n }\n // in browser, error event is useless\n return reject(new Error(`Failed to connect [${url}]`));\n };\n })\n ).then((ws) => {\n this._ws = ws;\n this._ws.onclose = this._handleClose.bind(this);\n this._ws.onmessage = this._handleMessage.bind(this);\n return ws;\n });\n });\n }\n _destroyWs() {\n const ws = this._ws;\n if (!ws) return;\n ws.onopen = ws.onclose = ws.onerror = ws.onmessage = null;\n this._ws = null;\n ws.close();\n }\n\n // eslint-disable-next-line class-methods-use-this\n onbeforeevent(event, from, to, ...payload) {\n debug(`${event}: ${from} -> ${to}`, ...payload);\n }\n onopen() {\n this.emit('open');\n }\n onconnected() {\n this._startConnectionKeeper();\n }\n onleaveconnected(event, from, to) {\n this._stopConnectionKeeper();\n this._destroyWs();\n if (to === 'offline' || to === 'disconnected') {\n this.emit('disconnect');\n }\n }\n onpause() {\n this.emit('offline');\n }\n onbeforeresume() {\n this.emit('online');\n }\n onreconnect() {\n this.emit('reconnect');\n }\n ondisconnected(event, from, to, attempt = 0) {\n const delay = DEFAULT_RETRY_STRATEGY.call(null, attempt);\n debug(`schedule attempt=${attempt} delay=${delay}`);\n this.emit('schedule', attempt, delay);\n if (this.__scheduledRetry) {\n clearTimeout(this.__scheduledRetry);\n }\n this.__scheduledRetry = setTimeout(() => {\n if (this.is('disconnected')) {\n this.retry(attempt);\n }\n }, delay);\n }\n onretry(event, from, to, attempt = 0) {\n this.emit('retry', attempt);\n this._createWs(this._getUrls, this._protocol).then(\n () => (this.can('reconnect') ? this.reconnect() : this._destroyWs()),\n () => this.can('fail') && this.fail(attempt + 1)\n );\n }\n onerror(event, from, to, error) {\n this.emit('error', error);\n }\n onclose() {\n if (global.removeEventListener) {\n if (this.__pause) global.removeEventListener('offline', this.__pause);\n if (this.__resume) global.removeEventListener('online', this.__resume);\n }\n }\n\n // jsdoc-ignore-start\n @requireConnected\n // jsdoc-ignore-end\n _ping() {\n debug('ping');\n try {\n this.ping();\n } catch (error) {\n console.warn(`websocket ping error: ${error.message}`);\n }\n }\n ping() {\n if (this._ws.ping) {\n this._ws.ping();\n } else {\n console.warn(`The WebSocket implement does not support sending ping frame.\n Override ping method to use application defined ping/pong mechanism.`);\n }\n }\n\n _postponeTimeoutTimer() {\n debug('_postponeTimeoutTimer');\n this._clearTimeoutTimers();\n this._timeoutTimer = setTimeout(() => {\n debug('timeout');\n this.disconnect();\n }, TIMEOUT_TIME);\n }\n _clearTimeoutTimers() {\n if (this._timeoutTimer) {\n clearTimeout(this._timeoutTimer);\n }\n }\n _startConnectionKeeper() {\n debug('start connection keeper');\n this._heartbeatTimer = setInterval(this._ping.bind(this), HEARTBEAT_TIME);\n const addListener = this._ws.addListener || this._ws.addEventListener;\n addListener.call(this._ws, 'message', this.__postponeTimeoutTimer);\n addListener.call(this._ws, 'pong', this.__postponeTimeoutTimer);\n this._postponeTimeoutTimer();\n }\n _stopConnectionKeeper() {\n debug('stop connection keeper');\n // websockets/ws#489\n const removeListener = this._ws.removeListener || this._ws.removeEventListener;\n removeListener.call(this._ws, 'message', this.__postponeTimeoutTimer);\n removeListener.call(this._ws, 'pong', this.__postponeTimeoutTimer);\n this._clearTimeoutTimers();\n if (this._heartbeatTimer) {\n clearInterval(this._heartbeatTimer);\n }\n }\n\n _handleClose(event) {\n debug(`ws closed [${event.code}] ${event.reason}`);\n // socket closed manually, ignore close event.\n if (this.isFinished()) return;\n this.handleClose(event);\n }\n handleClose() {\n // reconnect\n this.disconnect();\n }\n\n // jsdoc-ignore-start\n @requireConnected\n // jsdoc-ignore-end\n send(data) {\n debug('send', data);\n this._ws.send(data);\n }\n\n _handleMessage(event) {\n debug('message', event.data);\n this.handleMessage(event.data);\n }\n handleMessage(message) {\n this.emit('message', message);\n }\n}\n\nStateMachine.create({\n target: WebSocketPlus.prototype,\n initial: {\n state: 'initialized',\n event: 'init',\n defer: true,\n },\n terminal: 'closed',\n events: [{\n name: 'open',\n from: 'initialized',\n to: 'connected',\n }, {\n name: 'disconnect',\n from: 'connected',\n to: 'disconnected',\n }, {\n name: 'retry',\n from: 'disconnected',\n to: 'reconnecting',\n }, {\n name: 'fail',\n from: 'reconnecting',\n to: 'disconnected',\n }, {\n name: 'reconnect',\n from: 'reconnecting',\n to: 'connected',\n }, {\n name: 'pause',\n from: ['connected', 'disconnected', 'reconnecting'],\n to: 'offline',\n }, {\n }, {\n name: 'resume',\n from: 'offline',\n to: 'disconnected',\n }, {\n name: 'close',\n from: ['connected', 'disconnected', 'reconnecting', 'offline'],\n to: 'closed',\n }, {\n name: 'throw',\n from: '*',\n to: 'error',\n }],\n});\n\nexport default WebSocketPlus;\n","// 19.1.2.5 Object.freeze(O)\nvar isObject = require('./_is-object');\nvar meta = require('./_meta').onFreeze;\n\nrequire('./_object-sap')('freeze', function ($freeze) {\n return function freeze(it) {\n return $freeze && isObject(it) ? $freeze(meta(it)) : it;\n };\n});\n","require('../../modules/es6.object.freeze');\nmodule.exports = require('../../modules/_core').Object.freeze;\n","module.exports = { \"default\": require(\"core-js/library/fn/object/freeze\"), __esModule: true };","export const error = Object.freeze({\n 1000: {\n name: 'CLOSE_NORMAL',\n },\n 1006: {\n name: 'CLOSE_ABNORMAL',\n },\n 4100: {\n name: 'APP_NOT_AVAILABLE',\n message: 'App not exists or realtime message service is disabled.',\n },\n 4103: {\n name: 'INVALID_LOGIN',\n message: 'Malformed clientId.',\n },\n 4105: {\n name: 'SESSION_REQUIRED',\n message: 'Message sent before session opened. ',\n },\n 4107: {\n name: 'READ_TIMEOUT',\n },\n 4108: {\n name: 'LOGIN_TIMEOUT',\n },\n 4109: {\n name: 'FRAME_TOO_LONG',\n },\n 4110: {\n name: 'INVALID_ORIGIN',\n message: 'Access denied by domain whitelist.',\n },\n 4111: {\n name: 'SESSION_CONFLICT',\n },\n 4112: {\n name: 'SESSION_TOKEN_EXPIRED',\n },\n 4200: {\n name: 'INTERNAL_ERROR',\n message: 'Internal error, please contact LeanCloud for support.',\n },\n 4201: {\n name: 'SEND_MESSAGE_TIMEOUT',\n },\n 4302: {\n name: 'CONVERSATION_SIGNATURE_FAILED',\n },\n 4303: {\n name: 'CONVERSATION_NOT_FOUND',\n },\n 4304: {\n name: 'CONVERSATION_FULL',\n },\n 4305: {\n name: 'CONVERSATION_REJECTED_BY_APP',\n },\n 4306: {\n name: 'CONVERSATION_UPDATE_FAILED',\n },\n 4307: {\n name: 'CONVERSATION_READ_ONLY',\n },\n 4308: {\n name: 'CONVERSATION_NOT_ALLOWED',\n },\n 4401: {\n name: 'INVALID_MESSAGING_TARGET',\n },\n 4402: {\n name: 'MESSAGE_REJECTED_BY_APP',\n },\n});\n\nexport const ErrorCode = Object.freeze(\n Object.keys(error).reduce((result, code) => Object.assign(result, {\n [error[code].name]: Number(code),\n }), {})\n);\n\nexport const createError = (errorMessage) => {\n const {\n code, reason, appCode, detail,\n } = errorMessage;\n let message = reason || detail;\n if (!message && error[code]) {\n message = error[code].message || error[code].name;\n }\n if (!message) {\n message = `Unknow Error: ${code}`;\n }\n const err = new Error(message);\n return Object.assign(err, {\n code, appCode, detail,\n });\n};\n","import d from 'debug';\nimport WebSocketPlus from './websocket-plus';\nimport { createError } from './error';\nimport { GenericCommand, CommandType } from '../proto/message';\nimport { trim, isWeapp } from './utils';\n\nconst debug = d('LC:Connection');\n\nconst COMMAND_TIMEOUT = 20000;\n\nexport default class Connection extends WebSocketPlus {\n constructor(getUrl, { format, version }) {\n debug('initializing Connection');\n const protocolString = `lc.${format}.${version}`;\n if (!isWeapp) {\n super(getUrl, protocolString);\n } else {\n super(getUrl().then(urls => urls.map(url =>\n `${url}${url.indexOf('?') === -1 ? '?' : '&'}subprotocol=${encodeURIComponent(protocolString)}`\n )));\n }\n this._protocalFormat = format;\n this._commands = {};\n this._serialId = 0;\n }\n\n send(command, waitingForRespond = true) {\n let serialId;\n if (waitingForRespond) {\n this._serialId += 1;\n serialId = this._serialId;\n command.i = serialId; // eslint-disable-line no-param-reassign\n }\n debug('↑ %O sent', trim(command));\n\n let message;\n if (this._protocalFormat === 'proto2base64') {\n message = command.toBase64();\n } else if (command.toArrayBuffer) {\n message = command.toArrayBuffer();\n }\n if (!message) {\n throw new TypeError(`${command} is not a GenericCommand`);\n }\n\n super.send(message);\n\n if (!waitingForRespond) {\n return Promise.resolve();\n }\n return new Promise((resolve, reject) => {\n this._commands[serialId] = {\n resolve,\n reject,\n };\n setTimeout(\n () => {\n if (this._commands[serialId]) {\n debug('✗ %O timeout', trim(command));\n reject(new Error('Command Timeout.'));\n delete this._commands[serialId];\n }\n },\n COMMAND_TIMEOUT\n );\n });\n }\n\n handleMessage(msg) {\n let message;\n try {\n message = GenericCommand.decode(msg);\n debug('↓ %O received', trim(message));\n } catch (e) {\n console.warn('Decode message failed', msg);\n }\n this.emit('allmessage', message);\n const serialId = message.i;\n if (serialId) {\n if (this._commands[serialId]) {\n if (message.cmd === CommandType.error) {\n this\n ._commands[serialId]\n .reject(createError(message.errorMessage));\n } else {\n this\n ._commands[serialId]\n .resolve(message);\n }\n delete this._commands[serialId];\n } else {\n console.warn(`Unexpected command received with serialId [${serialId}],\n which have timed out or never been requested.`);\n }\n } else if (message.cmd === CommandType.error) {\n this.emit('error', createError(message.errorMessage));\n } else {\n this.emit('message', message);\n }\n }\n\n ping() {\n return this.send(new GenericCommand({\n cmd: CommandType.echo,\n })).catch(error => debug('ping failed:', error));\n }\n}\n","/* eslint-disable max-len */\n\n/**\n * 插件接口\n *\n *

\n * 插件是由一个或多个扩展点组成的字典。SDK 的扩展点可以分为两类:\n *

\n * 第一类扩展点是类实例化之后的回调,包括 RealtimeIMClientConversation。这些扩展点可以通过一个同步的 Decorator 进行扩展。Decorator 接受一个对应的实例并对其进行一些操作。\n * 特别的,由于注册自定义消息类这个需求特别的常用,额外定义一个 messageClasses 扩展点来做这件事情。\n *

\n * 第二类扩展点是在某些事件处理前、后可以注入逻辑的点。\n * 其中 beforeMessageParseafterMessageParse 可以通过一个异步的 Middleware 进行扩展。Middleware 接受一个对象,返回一个同类型对象或同类型对象的 Promise。\n * beforeMessageDispatch 可以通过返回一个 boolean 类型的 shouldDispatch 值来控制是否要继续派发收到的消息。\n *

\n * 如果使用了多个插件,这些 hook 会按照插件数组的顺序依次执行。前一个 Middleware 的返回值会作为参数传给后一个 Middleware。\n *\n * @interface Plugin\n * @since 3.1.0\n */\n\n/* eslint-enable max-len */\n\n/**\n * 插件名称,用于在日志中显示异常的插件\n *\n * @name Plugin.name\n * @type string\n */\n\n/**\n * 插件注册的消息类型\n *\n * @name Plugin.messageClasses\n * @type AVMessage[]\n */\n\n/**\n * 在 Realtime 实例化后对其进行修饰。\n *

\n * 接受一个参数为 Realtime 实例。\n *\n * @name Plugin.onRealtimeCreate\n * @type Function\n */\n\n/**\n * 在 IMClient 实例化后对其进行修饰。\n *

\n * 接受一个参数为 IMClient 实例。\n *\n * @name Plugin.onIMClientCreate\n * @type Function\n */\n\n/**\n * 在 Conversation 实例化后对其进行修饰。\n *

\n * 接受一个参数为 Conversation 实例。\n * 需要注意的是,该扩展点并不是在 {@link IMClient#createConversation} 方法创建成功后调用的 hook,\n * 而是所有的 Conversation 实例化的时候(包括但不限于 query 时)调用的 hook。\n *\n * @name Plugin.onConversationCreate\n * @type Function\n */\n\n/**\n * 在对消息进行 parse 之前,对原始消息进行修改。\n *

\n * 接受一个参数为原始消息,是某个消息 JSON 化(message.toJSON())的返回值,一般是一个 JSON 对象。\n * 该方法需要返回一个 JSON 对象。如果这个结果是异步得到的,也可以返回一个 Promise(fulfilled with a JSON)。\n *\n * @name Plugin.beforeMessageParse\n * @type Function\n */\n\n/**\n * 在对消息进行 parse 之后,对消息实例进行修改。\n *

\n * 接受一个参数为消息实例,一般是一个已注册的 Message 类或其子类的实例。\n * 该方法需要返回一个同类型的消息实例。如果这个结果是异步得到的,也可以返回一个 Promise。\n *\n * @name Plugin.afterMessageParse\n * @type Function\n */\n\n/**\n * 在收到消息之后,派发消息之前,控制是否派发这条消息。\n *

\n * 接受参数为 message 与 conversation。\n * 该方法需要返回 boolean 类型的值,如果返回 false 则 SDK 不再派发这条消息,后续的 beforeMessageDispatch 也不会执行。\n * 如果这个结果是异步得到的,也可以返回一个 Promise。\n *\n * @name Plugin.beforeMessageDispatch\n * @type Function\n * @since 3.4.0\n */\n\nimport { ensureArray, tap } from './utils';\n\nconst checkType = middleware => (param) => {\n const { constructor } = param;\n return Promise.resolve(param).then(middleware).then(tap((result) => {\n if (result === undefined || result === null) {\n // eslint-disable-next-line max-len\n return console.warn(`Middleware[${middleware._pluginName || 'anonymous plugin'}:${middleware.name || 'anonymous middleware'}] param/return types not match. It returns ${result} while a ${param.constructor.name} expected.`);\n }\n if (!(result instanceof constructor)) {\n // eslint-disable-next-line max-len\n return console.warn(`Middleware[${middleware._pluginName || 'anonymous plugin'}:${middleware.name || 'anonymous middleware'}] param/return types not match. It returns a ${result.constructor.name} while a ${param.constructor.name} expected.`);\n }\n return 0;\n }));\n};\n\nexport const applyDecorators = (decorators, target) => {\n if (decorators) {\n decorators.forEach((decorator) => {\n try {\n decorator(target);\n } catch (error) {\n if (decorator._pluginName) {\n error.message += `[${decorator._pluginName}]`;\n }\n throw error;\n }\n });\n }\n};\n\nexport const applyMiddlewares = middlewares => target =>\n ensureArray(middlewares).reduce(\n (previousPromise, middleware) => previousPromise\n .then(checkType(middleware))\n .catch((error) => {\n if (middleware._pluginName) {\n // eslint-disable-next-line no-param-reassign\n error.message += `[${middleware._pluginName}]`;\n }\n throw error;\n }),\n Promise.resolve(target)\n );\n\nexport const applyDispatcher = (dispatchers, payload) =>\n ensureArray(dispatchers).reduce(\n (resultPromise, dispatcher) => resultPromise.then(shouldDispatch =>\n (shouldDispatch === false ? false : dispatcher(...payload))\n ).catch((error) => {\n if (dispatcher._pluginName) {\n // eslint-disable-next-line no-param-reassign\n error.message += `[${dispatcher._pluginName}]`;\n }\n throw error;\n }), Promise.resolve(true)\n );\n","import d from 'debug';\nimport EventEmitter from 'eventemitter3';\nimport axios from 'axios';\nimport Connection from './connection';\nimport { ErrorCode, createError } from './error';\nimport { tap, Cache, trim, internal, ensureArray, isWeapp } from './utils';\nimport { applyDecorators, applyDispatcher } from './plugin';\n\nconst debug = d('LC:Realtime');\n\nconst pushRouterCache = new Cache('push-router');\n\nexport default class Realtime extends EventEmitter {\n /**\n * @extends EventEmitter\n * @param {Object} options\n * @param {String} options.appId\n * @param {String} [options.region='cn'] 节点 id\n * @param {Boolean} [options.pushOfflineMessages=false] 启用推送离线消息模式(默认为发送未读消息通知模式)\n * @param {Boolean} [options.noBinary=false] 设置 WebSocket 使用字符串格式收发消息(默认为二进制格式)。\n * 适用于 WebSocket 实现不支持二进制数据格式的情况(如 React Native)\n * @param {Boolean} [options.ssl=true] 使用 wss 进行连接\n * @param {Plugin[]} [options.plugins] 加载插件(since 3.1.0)\n */\n constructor(options) {\n debug('initializing Realtime');\n super();\n if (typeof options.appId !== 'string') {\n throw new TypeError(`appId [${options.appId}] is not a string`);\n }\n this._options = Object.assign({\n appId: undefined,\n region: 'cn',\n pushOfflineMessages: false,\n noBinary: isWeapp,\n ssl: true,\n server: process.env.SERVER,\n }, options);\n this._cache = new Cache('endpoints');\n internal(this).clients = new Set();\n this._plugins = [\n ...ensureArray(Realtime.__preRegisteredPlugins),\n ...ensureArray(options.plugins),\n ].reduce(\n (result, plugin) => {\n // eslint-disable-next-line no-restricted-syntax\n for (const hook in plugin) {\n if ({}.hasOwnProperty.call(plugin, hook) && hook !== 'name') {\n if (plugin.name) {\n ensureArray(plugin[hook]).forEach((value) => {\n // eslint-disable-next-line no-param-reassign\n value._pluginName = plugin.name;\n });\n }\n // eslint-disable-next-line no-param-reassign\n result[hook] = ensureArray(result[hook]).concat(plugin[hook]);\n }\n }\n return result;\n },\n {}\n );\n // onRealtimeCreate hook\n applyDecorators(this._plugins.onRealtimeCreate, this);\n }\n\n _open() {\n if (this._openPromise) return this._openPromise;\n\n let format = 'protobuf2';\n if (this._options.noBinary) {\n // 不发送 binary data,fallback to base64 string\n format = 'proto2base64';\n }\n let version = 3;\n if (this._options.pushOfflineMessages) {\n // 不推送离线消息,而是发送对话的未读通知\n version = 1;\n }\n const protocol = {\n format,\n version,\n };\n this._openPromise = new Promise((resolve, reject) => {\n debug('No connection established, create a new one.');\n const connection = new Connection(\n () => this._getEndpoints(this._options),\n protocol\n );\n connection.on('open', () => resolve(connection));\n connection.on('error', reject);\n connection.on('message', this._dispatchCommand.bind(this));\n /**\n * 连接断开。\n * 连接断开可能是因为 SDK 进入了离线状态(see {@link Realtime#event:offline}),或长时间没有收到服务器心跳。\n * 连接断开后所有的网络操作都会失败,请在连接断开后禁用相关的 UI 元素。\n * @event Realtime#disconnect\n */\n /**\n * 计划在一段时间后尝试重新连接\n * @event Realtime#schedule\n * @param {Number} attempt 尝试重连的次数\n * @param {Number} delay 延迟的毫秒数\n */\n /**\n * 正在尝试重新连接\n * @event Realtime#retry\n * @param {Number} attempt 尝试重连的次数\n */\n /**\n * 连接恢复正常。\n * 请重新启用在 {@link Realtime#event:disconnect} 事件中禁用的相关 UI 元素\n * @event Realtime#reconnect\n */\n\n /**\n * 客户端连接断开\n * @event IMClient#disconnect\n * @see Realtime#event:disconnect\n * @since 3.2.0\n */\n /**\n * 计划在一段时间后尝试重新连接\n * @event IMClient#schedule\n * @param {Number} attempt 尝试重连的次数\n * @param {Number} delay 延迟的毫秒数\n * @since 3.2.0\n */\n /**\n * 正在尝试重新连接\n * @event IMClient#retry\n * @param {Number} attempt 尝试重连的次数\n * @since 3.2.0\n */\n\n /**\n * 客户端进入离线状态。\n * 这通常意味着网络已断开,或者 {@link Realtime#pause} 被调用\n * @event Realtime#offline\n * @since 3.4.0\n */\n /**\n * 客户端恢复在线状态\n * 这通常意味着网络已恢复,或者 {@link Realtime#resume} 被调用\n * @event Realtime#online\n * @since 3.4.0\n */\n /**\n * 进入离线状态。\n * 这通常意味着网络已断开,或者 {@link Realtime#pause} 被调用\n * @event IMClient#offline\n * @since 3.4.0\n */\n /**\n * 恢复在线状态\n * 这通常意味着网络已恢复,或者 {@link Realtime#resume} 被调用\n * @event IMClient#online\n * @since 3.4.0\n */\n\n // event proxy\n ['disconnect', 'reconnect', 'retry', 'schedule', 'offline', 'online'].forEach(\n event => connection.on(event, (...payload) => {\n debug(`${event} event emitted. %O`, payload);\n this.emit(event, ...payload);\n if (event !== 'reconnect') {\n internal(this).clients.forEach((client) => {\n client.emit(event, ...payload);\n });\n }\n })\n );\n // override handleClose\n connection.handleClose = function handleClose(event) {\n const isFatal = [\n ErrorCode.APP_NOT_AVAILABLE,\n ErrorCode.INVALID_LOGIN,\n ErrorCode.INVALID_ORIGIN,\n ].some(errorCode => errorCode === event.code);\n if (isFatal) {\n // in these cases, SDK should throw.\n this.throw(createError(event));\n } else {\n // reconnect\n this.disconnect();\n }\n };\n internal(this).connection = connection;\n }).catch((error) => {\n delete this._openPromise;\n throw error;\n });\n\n return this._openPromise;\n }\n\n _getEndpoints(options) {\n return Promise.resolve(\n this._cache.get('endpoints') ||\n this\n .constructor\n ._fetchEndpointsInfo(options)\n .then(\n tap(info => this._cache.set('endpoints', info, info.ttl * 1000))\n )\n ).then((info) => {\n debug('endpoint info: %O', info);\n return [info.server, info.secondary];\n });\n }\n\n static _fetchPushRouter({ appId, region }) {\n debug('fetch router');\n switch (region) {\n case 'cn': {\n const cachedPushRouter = pushRouterCache.get(appId);\n if (cachedPushRouter) {\n return Promise.resolve(cachedPushRouter);\n }\n return axios\n .get('https://app-router.leancloud.cn/1/route', {\n params: {\n appId,\n },\n timeout: 20000,\n })\n .then(\n res => res.data\n )\n .then(tap(debug))\n .then(\n (route) => {\n const pushRouter = route.push_router_server;\n if (!pushRouter) {\n throw new Error('push router not exists');\n }\n let ttl = route.ttl;\n if (typeof ttl !== 'number') {\n ttl = 3600;\n }\n pushRouterCache.set(appId, pushRouter, ttl * 1000);\n return pushRouter;\n }\n )\n .catch(() => 'router-g0-push.leancloud.cn');\n }\n case 'us':\n return Promise.resolve('router-a0-push.leancloud.cn');\n default:\n throw new Error(`Region [${region}] is not supported.`);\n }\n }\n\n static _fetchEndpointsInfo({ appId, region, ssl, server }) {\n debug('fetch endpoint info');\n return this._fetchPushRouter({ appId, region })\n .then(tap(debug))\n .then(router =>\n axios.get(`https://${router}/v1/route`, {\n params: {\n appId,\n secure: ssl,\n features: isWeapp ? 'wechat' : undefined,\n server,\n _t: Date.now(),\n },\n timeout: 20000,\n }).then(\n res => res.data\n ).then(tap(debug))\n );\n }\n\n _close() {\n if (this._openPromise) {\n this._openPromise.then(connection => connection.close());\n }\n delete this._openPromise;\n }\n\n /**\n * 手动进行重连。\n * SDK 在网络出现异常时会自动按照一定的时间间隔尝试重连,调用该方法会立即尝试重连并重置重连尝试计数器。\n * 只能在 `schedule` 事件之后,`retry` 事件之前调用,如果当前网络正常或者正在进行重连,调用该方法会抛异常。\n */\n retry() {\n const connection = internal(this).connection;\n if (!connection) {\n throw new Error('no connection established');\n }\n if (connection.cannot('retry')) {\n throw new Error(\n `retrying not allowed when not disconnected. the connection is now ${connection.current}`\n );\n }\n return connection.retry();\n }\n /**\n * 暂停,使 SDK 进入离线状态。\n * 你可以在网络断开、应用进入后台等时刻调用该方法让 SDK 进入离线状态,离线状态下不会尝试重连。\n * 在浏览器中 SDK 会自动监听网络变化,因此无需手动调用该方法。\n *\n * @since 3.4.0\n * @see Realtime#event:offline\n */\n pause() {\n // 这个方法常常在网络断开、进入后台时被调用,此时 connection 可能没有建立或者已经 close。\n // 因此不像 retry,这个方法应该尽可能 loose\n const connection = internal(this).connection;\n if (!connection) return;\n if (connection.can('pause')) connection.pause();\n }\n /**\n * 恢复在线状态。\n * 你可以在网络恢复、应用回到前台等时刻调用该方法让 SDK 恢复在线状态,恢复在线状态后 SDK 会开始尝试重连。\n *\n * @since 3.4.0\n * @see Realtime#event:online\n */\n resume() {\n // 与 pause 一样,这个方法应该尽可能 loose\n const connection = internal(this).connection;\n if (!connection) return;\n if (connection.can('resume')) connection.resume();\n }\n\n _register(client) {\n internal(this).clients.add(client);\n }\n\n _deregister(client) {\n internal(this).clients.delete(client);\n if (internal(this).clients.size === 0) {\n this._close();\n }\n }\n\n _dispatchCommand(command) {\n return applyDispatcher(this._plugins.beforeCommandDispatch, [command, this])\n .then((shouldDispatch) => {\n // no plugin handled this command\n if (shouldDispatch) return debug('[WARN] Unexpected message received: %O', trim(command));\n return false;\n });\n }\n}\n"],"names":["defined","toInteger","aFunction","isObject","require$$0","document","require$$1","require$$2","anObject","toPrimitive","IE8_DOM_DEFINE","dP","createDesc","core","global","ctx","hide","cof","IObject","min","toIObject","toLength","toAbsoluteIndex","uid","IE_PROTO","has","$keys","enumBugKeys","getKeys","PROTOTYPE","dPs","create","descriptor","setToStringTag","toObject","$iterCreate","getPrototypeOf","LIBRARY","Iterators","redefine","$export","step","addToUnscopables","TAG","ITERATOR","classof","getIterFn","isArrayIter","call","process","invoke","cel","html","isNode","newPromiseCapability","SPECIES","DESCRIPTORS","TypeError","newPromiseCapabilityModule","perform","anInstance","require$$3","speciesConstructor","require$$4","require$$5","require$$6","promiseResolve","require$$7","forOf","define","require","this","newBuilder","build","messages","push_server","messages2","JsonObjectMessage","UnreadTuple","LogItem","DataCommand","SessionCommand","ErrorCommand","DirectCommand","AckCommand","UnreadCommand","ConvCommand","RoomCommand","LogsCommand","RcpCommand","ReadTuple","MaxReadTuple","ReadCommand","PresenceCommand","ReportCommand","GenericCommand","PatchCommand","PatchItem","CommandType","OpType","StatusType","$defineProperty","createProperty","_from","redefineAll","validate","$iterDefine","setSpecies","isArray","asc","fails","meta","strong","from","gOPS","pIE","wksExt","gOPN","toString","gOPD","$GOPD","$DP","gOPNExt","wks","shared","ObjectProto","USE_NATIVE","$fails","_create","enumKeys","wksDefine","_iterator","_symbol","_typeof2","_setPrototypeOf","d","ms","bind","fn","thisArg","wrap","args","Array","arguments","length","i","apply","Object","prototype","val","isArrayBuffer","isFormData","FormData","isArrayBufferView","result","ArrayBuffer","isView","buffer","isString","isNumber","isUndefined","isDate","isFile","isBlob","isFunction","isStream","pipe","isURLSearchParams","URLSearchParams","trim","str","replace","isStandardBrowserEnv","navigator","product","window","forEach","obj","l","key","hasOwnProperty","merge","assignValue","extend","a","b","isBuffer","$JSON","normalizeHeaderName","headers","normalizedName","utils","processHeader","value","name","toUpperCase","enhanceError","error","config","code","request","response","createError","message","Error","settle","resolve","reject","validateStatus","status","encode","encodeURIComponent","buildURL","url","params","paramsSerializer","serializedParams","parts","serialize","parseValue","v","toISOString","push","join","indexOf","parseHeaders","parsed","split","parser","line","substr","toLowerCase","standardBrowserEnv","msie","test","userAgent","urlParsingNode","createElement","originURL","resolveURL","href","setAttribute","protocol","host","search","hash","hostname","port","pathname","charAt","location","isURLSameOrigin","requestURL","nonStandardBrowserEnv","chars","E","btoa","input","String","output","block","charCode","idx","map","charCodeAt","write","expires","path","domain","secure","cookie","Date","toGMTString","read","match","RegExp","decodeURIComponent","remove","now","xhrAdapter","dispatchXhrRequest","requestData","data","requestHeaders","XMLHttpRequest","loadEvent","xDomain","env","NODE_ENV","XDomainRequest","onprogress","handleProgress","ontimeout","handleTimeout","auth","username","password","Authorization","open","method","timeout","handleLoad","readyState","responseURL","responseHeaders","getAllResponseHeaders","responseData","responseType","responseText","statusText","onerror","handleError","cookies","xsrfValue","withCredentials","xsrfCookieName","undefined","xsrfHeaderName","setRequestHeader","e","onDownloadProgress","addEventListener","onUploadProgress","upload","cancelToken","promise","then","onCanceled","cancel","abort","send","DEFAULT_CONTENT_TYPE","setContentTypeIfUnset","getDefaultAdapter","adapter","defaults","transformRequest","transformResponse","JSON","parse","maxContentLength","common","forEachMethodNoData","forEachMethodWithData","InterceptorManager","handlers","use","fulfilled","rejected","eject","id","forEachHandler","h","transformData","fns","transform","isCancel","__CANCEL__","throwIfCancellationRequested","throwIfRequested","dispatchRequest","cleanHeaderConfig","onAdapterResolution","onAdapterRejection","reason","isAbsoluteURL","combineURLs","baseURL","relativeURL","Axios","instanceConfig","interceptors","chain","unshiftRequestInterceptors","interceptor","unshift","pushResponseInterceptors","shift","Cancel","CancelToken","executor","resolvePromise","promiseExecutor","token","source","c","spread","callback","arr","createInstance","defaultConfig","context","instance","axios","all","promises","$getOwnPropertyDescriptor","$Object","_assign","createArrayMethod","$has","weak","assign","_defineProperty","freeGlobal","Symbol","root","objectProto","symToStringTag","nativeObjectToString","getRawTag","objectToString","overArg","isObjectLike","baseGetTag","getPrototype","EXPIRED","debug","Expirable","ttl","_value","expiredAt","expired","Cache","_map","get","cache","set","tryAll","promiseConstructors","catch","slice","tap","isIE10","internal","object","removeNull","isPlainObject","prop","ensureArray","target","isWeapp","wx","connectSocket","WebSocket","MozWebSocket","HEARTBEAT_TIME","TIMEOUT_TIME","DEFAULT_RETRY_STRATEGY","Math","pow","attempt","requireConnected","requireConnectedWrapper","is","currentState","current","console","warn","WebSocketPlus","getUrls","_getUrls","_protocol","init","_createWs","__postponeTimeoutTimer","_postponeTimeoutTimer","__pause","pause","__resume","resume","throw","wsUrls","urls","ws","binaryType","onopen","onclose","_ws","_handleClose","onmessage","_handleMessage","_destroyWs","close","onbeforeevent","event","to","payload","emit","onconnected","_startConnectionKeeper","onleaveconnected","_stopConnectionKeeper","onpause","onbeforeresume","onreconnect","ondisconnected","delay","__scheduledRetry","clearTimeout","setTimeout","retry","onretry","can","reconnect","fail","removeEventListener","_ping","ping","_clearTimeoutTimers","_timeoutTimer","disconnect","_heartbeatTimer","setInterval","addListener","removeListener","clearInterval","isFinished","handleClose","handleMessage","EventEmitter","StateMachine","initial","state","defer","terminal","events","ErrorCode","reduce","Number","errorMessage","appCode","detail","err","COMMAND_TIMEOUT","Connection","getUrl","format","version","protocolString","_protocalFormat","_commands","_serialId","command","waitingForRespond","serialId","toBase64","toArrayBuffer","msg","decode","cmd","echo","applyDecorators","decorators","decorator","_pluginName","applyDispatcher","dispatchers","resultPromise","dispatcher","shouldDispatch","pushRouterCache","Realtime","options","appId","_options","region","pushOfflineMessages","noBinary","ssl","server","SERVER","_cache","clients","_plugins","__preRegisteredPlugins","plugins","plugin","hook","concat","onRealtimeCreate","_open","_openPromise","connection","_getEndpoints","on","_dispatchCommand","client","isFatal","APP_NOT_AVAILABLE","INVALID_LOGIN","INVALID_ORIGIN","some","errorCode","constructor","_fetchEndpointsInfo","info","secondary","_fetchPushRouter","cachedPushRouter","res","route","pushRouter","push_router_server","router","features","_t","_close","cannot","_register","add","_deregister","delete","size","beforeCommandDispatch"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAA;AACA,KAAI,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;AACrB,KAAI,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;AACvB,eAAc,GAAG,UAAU,EAAE,EAAE;GAC7B,OAAO,KAAK,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,GAAG,KAAK,GAAG,IAAI,EAAE,EAAE,CAAC,CAAC;EAC1D,CAAC;;CCLF;AACA,aAAc,GAAG,UAAU,EAAE,EAAE;GAC7B,IAAI,EAAE,IAAI,SAAS,EAAE,MAAM,SAAS,CAAC,wBAAwB,GAAG,EAAE,CAAC,CAAC;GACpE,OAAO,EAAE,CAAC;EACX,CAAC;;CCFF;;AAEA,cAAc,GAAG,UAAU,SAAS,EAAE;GACpC,OAAO,UAAU,IAAI,EAAE,GAAG,EAAE;KAC1B,IAAI,CAAC,GAAG,MAAM,CAACA,QAAO,CAA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CAAA;;sBAED2I,+BAAUtB,QAAQ;AAChBzJ,CAAAA,aAAS,IAAT,EAAe2I,OAAf,CAAuBqC,GAAvB,CAA2BvB,MAA3B;AACD,CAAA;;sBAEDwB,mCAAYxB,QAAQ;AAClBzJ,CAAAA,aAAS,IAAT,EAAe2I,OAAf,CAAuBuC,MAAvB,CAA8BzB,MAA9B;AACA,CAAA,QAAIzJ,SAAS,IAAT,EAAe2I,OAAf,CAAuBwC,IAAvB,KAAgC,CAApC,EAAuC;AACrC,CAAA,WAAKN,MAAL;AACD,CAAA;AACF,CAAA;;sBAEDrB,6CAAiB3C,SAAS;AACxB,CAAA,WAAOa,gBAAgB,KAAKkB,QAAL,CAAcwC,qBAA9B,EAAqD,CAACvE,OAAD,EAAU,IAAV,CAArD,EACJzN,IADI,CACC,UAAC0O,cAAD,EAAoB;AACxB,CAAA;AACA,CAAA,UAAIA,cAAJ,EAAoB,OAAO/I,MAAM,wCAAN,EAAgDxP,OAAKsX,OAAL,CAAhD,CAAP;AACpB,CAAA,aAAO,KAAP;AACD,CAAA,KALI,CAAP;AAMD,CAAA;;;GA5UmCvB;;;;;;;;;;"} \ No newline at end of file diff --git a/dist/realtime-core.js b/dist/realtime-core.js new file mode 100644 index 000000000..f62a1759d --- /dev/null +++ b/dist/realtime-core.js @@ -0,0 +1,2406 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } + +var _Promise = _interopDefault(require('babel-runtime/core-js/promise')); +var protobufLight = _interopDefault(require('protobufjs/dist/protobuf-light')); +var EventEmitter = _interopDefault(require('eventemitter3')); +var _toConsumableArray = _interopDefault(require('babel-runtime/helpers/toConsumableArray')); +var _Set = _interopDefault(require('babel-runtime/core-js/set')); +var _Object$assign = _interopDefault(require('babel-runtime/core-js/object/assign')); +var _classCallCheck = _interopDefault(require('babel-runtime/helpers/classCallCheck')); +var _possibleConstructorReturn = _interopDefault(require('babel-runtime/helpers/possibleConstructorReturn')); +var _inherits = _interopDefault(require('babel-runtime/helpers/inherits')); +var d = _interopDefault(require('debug')); +var axios = _interopDefault(require('axios')); +var _Object$getOwnPropertyDescriptor = _interopDefault(require('babel-runtime/core-js/object/get-own-property-descriptor')); +var StateMachine = _interopDefault(require('javascript-state-machine')); +var WebSocket = _interopDefault(require('ws')); +var _extends = _interopDefault(require('babel-runtime/helpers/extends')); +var _typeof = _interopDefault(require('babel-runtime/helpers/typeof')); +var _JSON$stringify = _interopDefault(require('babel-runtime/core-js/json/stringify')); +var _WeakMap = _interopDefault(require('babel-runtime/core-js/weak-map')); +var _Array$from = _interopDefault(require('babel-runtime/core-js/array/from')); +var _defineProperty = _interopDefault(require('babel-runtime/helpers/defineProperty')); +var _Object$keys = _interopDefault(require('babel-runtime/core-js/object/keys')); +var isPlainObject = _interopDefault(require('lodash/isPlainObject')); +var _createClass = _interopDefault(require('babel-runtime/helpers/createClass')); +var _Symbol = _interopDefault(require('babel-runtime/core-js/symbol')); +var _Object$freeze = _interopDefault(require('babel-runtime/core-js/object/freeze')); + +var messageCompiled = protobufLight.newBuilder({})['import']({ + "package": "push_server.messages2", + "syntax": "proto2", + "options": { + "objc_class_prefix": "AVIM" + }, + "messages": [{ + "name": "JsonObjectMessage", + "syntax": "proto2", + "fields": [{ + "rule": "required", + "type": "string", + "name": "data", + "id": 1 + }] + }, { + "name": "UnreadTuple", + "syntax": "proto2", + "fields": [{ + "rule": "required", + "type": "string", + "name": "cid", + "id": 1 + }, { + "rule": "required", + "type": "int32", + "name": "unread", + "id": 2 + }, { + "rule": "optional", + "type": "string", + "name": "mid", + "id": 3 + }, { + "rule": "optional", + "type": "int64", + "name": "timestamp", + "id": 4 + }, { + "rule": "optional", + "type": "string", + "name": "from", + "id": 5 + }, { + "rule": "optional", + "type": "string", + "name": "data", + "id": 6 + }, { + "rule": "optional", + "type": "int64", + "name": "patchTimestamp", + "id": 7 + }] + }, { + "name": "LogItem", + "syntax": "proto2", + "fields": [{ + "rule": "optional", + "type": "string", + "name": "from", + "id": 1 + }, { + "rule": "optional", + "type": "string", + "name": "data", + "id": 2 + }, { + "rule": "optional", + "type": "int64", + "name": "timestamp", + "id": 3 + }, { + "rule": "optional", + "type": "string", + "name": "msgId", + "id": 4 + }, { + "rule": "optional", + "type": "int64", + "name": "ackAt", + "id": 5 + }, { + "rule": "optional", + "type": "int64", + "name": "readAt", + "id": 6 + }, { + "rule": "optional", + "type": "int64", + "name": "patchTimestamp", + "id": 7 + }] + }, { + "name": "DataCommand", + "syntax": "proto2", + "fields": [{ + "rule": "repeated", + "type": "string", + "name": "ids", + "id": 1 + }, { + "rule": "repeated", + "type": "JsonObjectMessage", + "name": "msg", + "id": 2 + }, { + "rule": "optional", + "type": "bool", + "name": "offline", + "id": 3 + }] + }, { + "name": "SessionCommand", + "syntax": "proto2", + "fields": [{ + "rule": "optional", + "type": "int64", + "name": "t", + "id": 1 + }, { + "rule": "optional", + "type": "string", + "name": "n", + "id": 2 + }, { + "rule": "optional", + "type": "string", + "name": "s", + "id": 3 + }, { + "rule": "optional", + "type": "string", + "name": "ua", + "id": 4 + }, { + "rule": "optional", + "type": "bool", + "name": "r", + "id": 5 + }, { + "rule": "optional", + "type": "string", + "name": "tag", + "id": 6 + }, { + "rule": "optional", + "type": "string", + "name": "deviceId", + "id": 7 + }, { + "rule": "repeated", + "type": "string", + "name": "sessionPeerIds", + "id": 8 + }, { + "rule": "repeated", + "type": "string", + "name": "onlineSessionPeerIds", + "id": 9 + }, { + "rule": "optional", + "type": "string", + "name": "st", + "id": 10 + }, { + "rule": "optional", + "type": "int32", + "name": "stTtl", + "id": 11 + }, { + "rule": "optional", + "type": "int32", + "name": "code", + "id": 12 + }, { + "rule": "optional", + "type": "string", + "name": "reason", + "id": 13 + }, { + "rule": "optional", + "type": "string", + "name": "deviceToken", + "id": 14 + }, { + "rule": "optional", + "type": "bool", + "name": "sp", + "id": 15 + }, { + "rule": "optional", + "type": "string", + "name": "detail", + "id": 16 + }, { + "rule": "optional", + "type": "int64", + "name": "lastUnreadNotifTime", + "id": 17 + }, { + "rule": "optional", + "type": "int64", + "name": "lastPatchTime", + "id": 18 + }, { + "rule": "optional", + "type": "int64", + "name": "configBitmap", + "id": 19 + }] + }, { + "name": "ErrorCommand", + "syntax": "proto2", + "fields": [{ + "rule": "required", + "type": "int32", + "name": "code", + "id": 1 + }, { + "rule": "required", + "type": "string", + "name": "reason", + "id": 2 + }, { + "rule": "optional", + "type": "int32", + "name": "appCode", + "id": 3 + }, { + "rule": "optional", + "type": "string", + "name": "detail", + "id": 4 + }] + }, { + "name": "DirectCommand", + "syntax": "proto2", + "fields": [{ + "rule": "optional", + "type": "string", + "name": "msg", + "id": 1 + }, { + "rule": "optional", + "type": "string", + "name": "uid", + "id": 2 + }, { + "rule": "optional", + "type": "string", + "name": "fromPeerId", + "id": 3 + }, { + "rule": "optional", + "type": "int64", + "name": "timestamp", + "id": 4 + }, { + "rule": "optional", + "type": "bool", + "name": "offline", + "id": 5 + }, { + "rule": "optional", + "type": "bool", + "name": "hasMore", + "id": 6 + }, { + "rule": "repeated", + "type": "string", + "name": "toPeerIds", + "id": 7 + }, { + "rule": "optional", + "type": "bool", + "name": "r", + "id": 10 + }, { + "rule": "optional", + "type": "string", + "name": "cid", + "id": 11 + }, { + "rule": "optional", + "type": "string", + "name": "id", + "id": 12 + }, { + "rule": "optional", + "type": "bool", + "name": "transient", + "id": 13 + }, { + "rule": "optional", + "type": "string", + "name": "dt", + "id": 14 + }, { + "rule": "optional", + "type": "string", + "name": "roomId", + "id": 15 + }, { + "rule": "optional", + "type": "string", + "name": "pushData", + "id": 16 + }, { + "rule": "optional", + "type": "bool", + "name": "will", + "id": 17 + }, { + "rule": "optional", + "type": "int64", + "name": "patchTimestamp", + "id": 18 + }] + }, { + "name": "AckCommand", + "syntax": "proto2", + "fields": [{ + "rule": "optional", + "type": "int32", + "name": "code", + "id": 1 + }, { + "rule": "optional", + "type": "string", + "name": "reason", + "id": 2 + }, { + "rule": "optional", + "type": "string", + "name": "mid", + "id": 3 + }, { + "rule": "optional", + "type": "string", + "name": "cid", + "id": 4 + }, { + "rule": "optional", + "type": "int64", + "name": "t", + "id": 5 + }, { + "rule": "optional", + "type": "string", + "name": "uid", + "id": 6 + }, { + "rule": "optional", + "type": "int64", + "name": "fromts", + "id": 7 + }, { + "rule": "optional", + "type": "int64", + "name": "tots", + "id": 8 + }, { + "rule": "optional", + "type": "string", + "name": "type", + "id": 9 + }, { + "rule": "repeated", + "type": "string", + "name": "ids", + "id": 10 + }, { + "rule": "optional", + "type": "int32", + "name": "appCode", + "id": 11 + }] + }, { + "name": "UnreadCommand", + "syntax": "proto2", + "fields": [{ + "rule": "repeated", + "type": "UnreadTuple", + "name": "convs", + "id": 1 + }, { + "rule": "optional", + "type": "int64", + "name": "notifTime", + "id": 2 + }] + }, { + "name": "ConvCommand", + "syntax": "proto2", + "fields": [{ + "rule": "repeated", + "type": "string", + "name": "m", + "id": 1 + }, { + "rule": "optional", + "type": "bool", + "name": "transient", + "id": 2 + }, { + "rule": "optional", + "type": "bool", + "name": "unique", + "id": 3 + }, { + "rule": "optional", + "type": "string", + "name": "cid", + "id": 4 + }, { + "rule": "optional", + "type": "string", + "name": "cdate", + "id": 5 + }, { + "rule": "optional", + "type": "string", + "name": "initBy", + "id": 6 + }, { + "rule": "optional", + "type": "string", + "name": "sort", + "id": 7 + }, { + "rule": "optional", + "type": "int32", + "name": "limit", + "id": 8 + }, { + "rule": "optional", + "type": "int32", + "name": "skip", + "id": 9 + }, { + "rule": "optional", + "type": "int32", + "name": "flag", + "id": 10 + }, { + "rule": "optional", + "type": "int32", + "name": "count", + "id": 11 + }, { + "rule": "optional", + "type": "string", + "name": "udate", + "id": 12 + }, { + "rule": "optional", + "type": "int64", + "name": "t", + "id": 13 + }, { + "rule": "optional", + "type": "string", + "name": "n", + "id": 14 + }, { + "rule": "optional", + "type": "string", + "name": "s", + "id": 15 + }, { + "rule": "optional", + "type": "bool", + "name": "statusSub", + "id": 16 + }, { + "rule": "optional", + "type": "bool", + "name": "statusPub", + "id": 17 + }, { + "rule": "optional", + "type": "int32", + "name": "statusTTL", + "id": 18 + }, { + "rule": "optional", + "type": "string", + "name": "uniqueId", + "id": 19 + }, { + "rule": "optional", + "type": "string", + "name": "targetClientId", + "id": 20 + }, { + "rule": "optional", + "type": "int64", + "name": "maxReadTimestamp", + "id": 21 + }, { + "rule": "optional", + "type": "int64", + "name": "maxAckTimestamp", + "id": 22 + }, { + "rule": "optional", + "type": "bool", + "name": "queryAllMembers", + "id": 23 + }, { + "rule": "repeated", + "type": "MaxReadTuple", + "name": "maxReadTuples", + "id": 24 + }, { + "rule": "repeated", + "type": "string", + "name": "cids", + "id": 25 + }, { + "rule": "optional", + "type": "JsonObjectMessage", + "name": "results", + "id": 100 + }, { + "rule": "optional", + "type": "JsonObjectMessage", + "name": "where", + "id": 101 + }, { + "rule": "optional", + "type": "JsonObjectMessage", + "name": "attr", + "id": 103 + }] + }, { + "name": "RoomCommand", + "syntax": "proto2", + "fields": [{ + "rule": "optional", + "type": "string", + "name": "roomId", + "id": 1 + }, { + "rule": "optional", + "type": "string", + "name": "s", + "id": 2 + }, { + "rule": "optional", + "type": "int64", + "name": "t", + "id": 3 + }, { + "rule": "optional", + "type": "string", + "name": "n", + "id": 4 + }, { + "rule": "optional", + "type": "bool", + "name": "transient", + "id": 5 + }, { + "rule": "repeated", + "type": "string", + "name": "roomPeerIds", + "id": 6 + }, { + "rule": "optional", + "type": "string", + "name": "byPeerId", + "id": 7 + }] + }, { + "name": "LogsCommand", + "syntax": "proto2", + "fields": [{ + "rule": "optional", + "type": "string", + "name": "cid", + "id": 1 + }, { + "rule": "optional", + "type": "int32", + "name": "l", + "id": 2 + }, { + "rule": "optional", + "type": "int32", + "name": "limit", + "id": 3 + }, { + "rule": "optional", + "type": "int64", + "name": "t", + "id": 4 + }, { + "rule": "optional", + "type": "int64", + "name": "tt", + "id": 5 + }, { + "rule": "optional", + "type": "string", + "name": "tmid", + "id": 6 + }, { + "rule": "optional", + "type": "string", + "name": "mid", + "id": 7 + }, { + "rule": "optional", + "type": "string", + "name": "checksum", + "id": 8 + }, { + "rule": "optional", + "type": "bool", + "name": "stored", + "id": 9 + }, { + "rule": "optional", + "type": "bool", + "name": "reversed", + "id": 10 + }, { + "rule": "repeated", + "type": "LogItem", + "name": "logs", + "id": 105 + }] + }, { + "name": "RcpCommand", + "syntax": "proto2", + "fields": [{ + "rule": "optional", + "type": "string", + "name": "id", + "id": 1 + }, { + "rule": "optional", + "type": "string", + "name": "cid", + "id": 2 + }, { + "rule": "optional", + "type": "int64", + "name": "t", + "id": 3 + }, { + "rule": "optional", + "type": "bool", + "name": "read", + "id": 4 + }] + }, { + "name": "ReadTuple", + "syntax": "proto2", + "fields": [{ + "rule": "required", + "type": "string", + "name": "cid", + "id": 1 + }, { + "rule": "optional", + "type": "int64", + "name": "timestamp", + "id": 2 + }, { + "rule": "optional", + "type": "string", + "name": "mid", + "id": 3 + }] + }, { + "name": "MaxReadTuple", + "syntax": "proto2", + "fields": [{ + "rule": "optional", + "type": "string", + "name": "pid", + "id": 1 + }, { + "rule": "optional", + "type": "int64", + "name": "maxAckTimestamp", + "id": 2 + }, { + "rule": "optional", + "type": "int64", + "name": "maxReadTimestamp", + "id": 3 + }] + }, { + "name": "ReadCommand", + "syntax": "proto2", + "fields": [{ + "rule": "optional", + "type": "string", + "name": "cid", + "id": 1 + }, { + "rule": "repeated", + "type": "string", + "name": "cids", + "id": 2 + }, { + "rule": "repeated", + "type": "ReadTuple", + "name": "convs", + "id": 3 + }] + }, { + "name": "PresenceCommand", + "syntax": "proto2", + "fields": [{ + "rule": "optional", + "type": "StatusType", + "name": "status", + "id": 1 + }, { + "rule": "repeated", + "type": "string", + "name": "sessionPeerIds", + "id": 2 + }, { + "rule": "optional", + "type": "string", + "name": "cid", + "id": 3 + }] + }, { + "name": "ReportCommand", + "syntax": "proto2", + "fields": [{ + "rule": "optional", + "type": "bool", + "name": "initiative", + "id": 1 + }, { + "rule": "optional", + "type": "string", + "name": "type", + "id": 2 + }, { + "rule": "optional", + "type": "string", + "name": "data", + "id": 3 + }] + }, { + "name": "PatchItem", + "syntax": "proto2", + "fields": [{ + "rule": "optional", + "type": "string", + "name": "cid", + "id": 1 + }, { + "rule": "optional", + "type": "string", + "name": "mid", + "id": 2 + }, { + "rule": "optional", + "type": "int64", + "name": "timestamp", + "id": 3 + }, { + "rule": "optional", + "type": "bool", + "name": "recall", + "id": 4 + }, { + "rule": "optional", + "type": "string", + "name": "data", + "id": 5 + }, { + "rule": "optional", + "type": "int64", + "name": "patchTimestamp", + "id": 6 + }, { + "rule": "optional", + "type": "string", + "name": "from", + "id": 7 + }] + }, { + "name": "PatchCommand", + "syntax": "proto2", + "fields": [{ + "rule": "repeated", + "type": "PatchItem", + "name": "patches", + "id": 1 + }, { + "rule": "optional", + "type": "int64", + "name": "lastPatchTime", + "id": 2 + }] + }, { + "name": "GenericCommand", + "syntax": "proto2", + "fields": [{ + "rule": "optional", + "type": "CommandType", + "name": "cmd", + "id": 1 + }, { + "rule": "optional", + "type": "OpType", + "name": "op", + "id": 2 + }, { + "rule": "optional", + "type": "string", + "name": "appId", + "id": 3 + }, { + "rule": "optional", + "type": "string", + "name": "peerId", + "id": 4 + }, { + "rule": "optional", + "type": "int32", + "name": "i", + "id": 5 + }, { + "rule": "optional", + "type": "string", + "name": "installationId", + "id": 6 + }, { + "rule": "optional", + "type": "int32", + "name": "priority", + "id": 7 + }, { + "rule": "optional", + "type": "int32", + "name": "service", + "id": 8 + }, { + "rule": "optional", + "type": "DataCommand", + "name": "dataMessage", + "id": 101 + }, { + "rule": "optional", + "type": "SessionCommand", + "name": "sessionMessage", + "id": 102 + }, { + "rule": "optional", + "type": "ErrorCommand", + "name": "errorMessage", + "id": 103 + }, { + "rule": "optional", + "type": "DirectCommand", + "name": "directMessage", + "id": 104 + }, { + "rule": "optional", + "type": "AckCommand", + "name": "ackMessage", + "id": 105 + }, { + "rule": "optional", + "type": "UnreadCommand", + "name": "unreadMessage", + "id": 106 + }, { + "rule": "optional", + "type": "ReadCommand", + "name": "readMessage", + "id": 107 + }, { + "rule": "optional", + "type": "RcpCommand", + "name": "rcpMessage", + "id": 108 + }, { + "rule": "optional", + "type": "LogsCommand", + "name": "logsMessage", + "id": 109 + }, { + "rule": "optional", + "type": "ConvCommand", + "name": "convMessage", + "id": 110 + }, { + "rule": "optional", + "type": "RoomCommand", + "name": "roomMessage", + "id": 111 + }, { + "rule": "optional", + "type": "PresenceCommand", + "name": "presenceMessage", + "id": 112 + }, { + "rule": "optional", + "type": "ReportCommand", + "name": "reportMessage", + "id": 113 + }, { + "rule": "optional", + "type": "PatchCommand", + "name": "patchMessage", + "id": 114 + }] + }], + "enums": [{ + "name": "CommandType", + "syntax": "proto2", + "values": [{ + "name": "session", + "id": 0 + }, { + "name": "conv", + "id": 1 + }, { + "name": "direct", + "id": 2 + }, { + "name": "ack", + "id": 3 + }, { + "name": "rcp", + "id": 4 + }, { + "name": "unread", + "id": 5 + }, { + "name": "logs", + "id": 6 + }, { + "name": "error", + "id": 7 + }, { + "name": "login", + "id": 8 + }, { + "name": "data", + "id": 9 + }, { + "name": "room", + "id": 10 + }, { + "name": "read", + "id": 11 + }, { + "name": "presence", + "id": 12 + }, { + "name": "report", + "id": 13 + }, { + "name": "echo", + "id": 14 + }, { + "name": "loggedin", + "id": 15 + }, { + "name": "logout", + "id": 16 + }, { + "name": "loggedout", + "id": 17 + }, { + "name": "patch", + "id": 18 + }] + }, { + "name": "OpType", + "syntax": "proto2", + "values": [{ + "name": "open", + "id": 1 + }, { + "name": "add", + "id": 2 + }, { + "name": "remove", + "id": 3 + }, { + "name": "close", + "id": 4 + }, { + "name": "opened", + "id": 5 + }, { + "name": "closed", + "id": 6 + }, { + "name": "query", + "id": 7 + }, { + "name": "query_result", + "id": 8 + }, { + "name": "conflict", + "id": 9 + }, { + "name": "added", + "id": 10 + }, { + "name": "removed", + "id": 11 + }, { + "name": "start", + "id": 30 + }, { + "name": "started", + "id": 31 + }, { + "name": "joined", + "id": 32 + }, { + "name": "members_joined", + "id": 33 + }, { + "name": "left", + "id": 39 + }, { + "name": "members_left", + "id": 40 + }, { + "name": "results", + "id": 42 + }, { + "name": "count", + "id": 43 + }, { + "name": "result", + "id": 44 + }, { + "name": "update", + "id": 45 + }, { + "name": "updated", + "id": 46 + }, { + "name": "mute", + "id": 47 + }, { + "name": "unmute", + "id": 48 + }, { + "name": "status", + "id": 49 + }, { + "name": "members", + "id": 50 + }, { + "name": "max_read", + "id": 51 + }, { + "name": "is_member", + "id": 52 + }, { + "name": "join", + "id": 80 + }, { + "name": "invite", + "id": 81 + }, { + "name": "leave", + "id": 82 + }, { + "name": "kick", + "id": 83 + }, { + "name": "reject", + "id": 84 + }, { + "name": "invited", + "id": 85 + }, { + "name": "kicked", + "id": 86 + }, { + "name": "upload", + "id": 100 + }, { + "name": "uploaded", + "id": 101 + }, { + "name": "modify", + "id": 150 + }, { + "name": "modified", + "id": 151 + }] + }, { + "name": "StatusType", + "syntax": "proto2", + "values": [{ + "name": "on", + "id": 1 + }, { + "name": "off", + "id": 2 + }] + }], + "isNamespace": true +}).build(); + +var _messages$push_server = messageCompiled.push_server.messages2; +var JsonObjectMessage = _messages$push_server.JsonObjectMessage; +var UnreadTuple = _messages$push_server.UnreadTuple; +var LogItem = _messages$push_server.LogItem; +var DataCommand = _messages$push_server.DataCommand; +var SessionCommand = _messages$push_server.SessionCommand; +var ErrorCommand = _messages$push_server.ErrorCommand; +var DirectCommand = _messages$push_server.DirectCommand; +var AckCommand = _messages$push_server.AckCommand; +var UnreadCommand = _messages$push_server.UnreadCommand; +var ConvCommand = _messages$push_server.ConvCommand; +var RoomCommand = _messages$push_server.RoomCommand; +var LogsCommand = _messages$push_server.LogsCommand; +var RcpCommand = _messages$push_server.RcpCommand; +var ReadTuple = _messages$push_server.ReadTuple; +var MaxReadTuple = _messages$push_server.MaxReadTuple; +var ReadCommand = _messages$push_server.ReadCommand; +var PresenceCommand = _messages$push_server.PresenceCommand; +var ReportCommand = _messages$push_server.ReportCommand; +var GenericCommand = _messages$push_server.GenericCommand; +var PatchCommand = _messages$push_server.PatchCommand; +var PatchItem = _messages$push_server.PatchItem; +var CommandType = _messages$push_server.CommandType; +var OpType = _messages$push_server.OpType; +var StatusType = _messages$push_server.StatusType; + + + + +var message = Object.freeze({ + JsonObjectMessage: JsonObjectMessage, + UnreadTuple: UnreadTuple, + LogItem: LogItem, + DataCommand: DataCommand, + SessionCommand: SessionCommand, + ErrorCommand: ErrorCommand, + DirectCommand: DirectCommand, + AckCommand: AckCommand, + UnreadCommand: UnreadCommand, + ConvCommand: ConvCommand, + RoomCommand: RoomCommand, + LogsCommand: LogsCommand, + RcpCommand: RcpCommand, + ReadTuple: ReadTuple, + MaxReadTuple: MaxReadTuple, + ReadCommand: ReadCommand, + PresenceCommand: PresenceCommand, + ReportCommand: ReportCommand, + GenericCommand: GenericCommand, + PatchCommand: PatchCommand, + PatchItem: PatchItem, + CommandType: CommandType, + OpType: OpType, + StatusType: StatusType +}); + +/* eslint-disable */ +var global$1 = typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : {}; + +var EXPIRED = _Symbol('expired'); +var debug$3 = d('LC:Expirable'); + +var Expirable = function () { + function Expirable(value, ttl) { + _classCallCheck(this, Expirable); + + this._value = value; + if (typeof ttl === 'number') { + this.expiredAt = Date.now() + ttl; + } + } + + _createClass(Expirable, [{ + key: 'value', + get: function get() { + var expired = this.expiredAt && this.expiredAt < Date.now(); + if (expired) debug$3('expired: ' + this._value); + return expired ? EXPIRED : this._value; + } + }]); + + return Expirable; +}(); + +Expirable.EXPIRED = EXPIRED; + +var debug$4 = d('LC:Cache'); + +var Cache = function () { + function Cache() { + var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'anonymous'; + + _classCallCheck(this, Cache); + + this.name = name; + this._map = {}; + } + + Cache.prototype.get = function get(key) { + var cache = this._map[key]; + if (cache) { + var value = cache.value; + if (value !== Expirable.EXPIRED) { + debug$4('[%s] hit: %s %O', this.name, key, value); + return value; + } + delete this._map[key]; + } + debug$4('[' + this.name + '] missed: ' + key); + return null; + }; + + Cache.prototype.set = function set(key, value, ttl) { + debug$4('[%s] set: %s %O %d', this.name, key, value, ttl); + this._map[key] = new Expirable(value, ttl); + }; + + return Cache; +}(); + +var tryAll = function tryAll(promiseConstructors) { + var promise = new _Promise(promiseConstructors[0]); + if (promiseConstructors.length === 1) { + return promise; + } + return promise.catch(function () { + return tryAll(promiseConstructors.slice(1)); + }); +}; + +var tap = function tap(interceptor) { + return function (value) { + return interceptor(value), value; + }; +}; + + + + + +var isIE10 = global$1.navigator && global$1.navigator.userAgent && global$1.navigator.userAgent.indexOf('MSIE 10.') !== -1; + +/* eslint-disable no-proto */ + +/* eslint-enable no-proto */ + + + + +var map = new _WeakMap(); + +// protected property helper +var internal = function internal(object) { + if (!map.has(object)) { + map.set(object, {}); + } + return map.get(object); +}; + +// debug utility +var removeNull = function removeNull(obj) { + if (!isPlainObject(obj)) return obj; + var object = _Object$assign({}, obj); + // eslint-disable-next-line no-restricted-syntax + for (var prop in object) { + if ({}.hasOwnProperty.call(object, prop)) { + var value = object[prop]; + if (value === null) { + delete object[prop]; + } else { + object[prop] = removeNull(value); + } + } + } + return object; +}; +var trim = function trim(message) { + return removeNull(JSON.parse(_JSON$stringify(message))); +}; + +var ensureArray = function ensureArray(target) { + if (Array.isArray(target)) { + return target; + } + if (target === undefined || target === null) { + return []; + } + return [target]; +}; + + + +// eslint-disable-next-line no-undef +var isWeapp = (typeof wx === 'undefined' ? 'undefined' : _typeof(wx)) === 'object' && typeof wx.connectSocket === 'function'; + +// throttle decorator + +var _class; + +function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { + var desc = {}; + Object['ke' + 'ys'](descriptor).forEach(function (key) { + desc[key] = descriptor[key]; + }); + desc.enumerable = !!desc.enumerable; + desc.configurable = !!desc.configurable; + + if ('value' in desc || desc.initializer) { + desc.writable = true; + } + + desc = decorators.slice().reverse().reduce(function (desc, decorator) { + return decorator(target, property, desc) || desc; + }, desc); + + if (context && desc.initializer !== void 0) { + desc.value = desc.initializer ? desc.initializer.call(context) : void 0; + desc.initializer = undefined; + } + + if (desc.initializer === void 0) { + Object['define' + 'Property'](target, property, desc); + desc = null; + } + + return desc; +} + +// WebSocket with auto reconnecting feature, backup endpoint and EventEmitter interface. + +var debug$2 = d('LC:WebSocketPlus'); + +var HEARTBEAT_TIME = 180000; +var TIMEOUT_TIME = 380000; + +var DEFAULT_RETRY_STRATEGY = function DEFAULT_RETRY_STRATEGY(attempt) { + return Math.min(1000 * Math.pow(2, attempt), 300000); +}; + +var requireConnected = function requireConnected(target, name, descriptor) { + return _Object$assign({}, descriptor, { + value: function requireConnectedWrapper() { + var _descriptor$value; + + if (!this.is('connected')) { + var currentState = this.current; + console.warn(name + ' should not be called when the connection is ' + currentState); + if (this.is('disconnected') || this.is('reconnecting')) { + console.warn('disconnect and reconnect event should be handled to avoid such calls.'); + } + throw new Error('Connection unavailable'); + } + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return (_descriptor$value = descriptor.value).call.apply(_descriptor$value, [this].concat(args)); + } + }); +}; + +var WebSocketPlus = (_class = function (_EventEmitter) { + _inherits(WebSocketPlus, _EventEmitter); + + function WebSocketPlus(getUrls, protocol) { + _classCallCheck(this, WebSocketPlus); + + if (typeof WebSocket === 'undefined') { + throw new Error('WebSocket is undefined. Polyfill is required in this runtime.'); + } + + var _this = _possibleConstructorReturn(this, _EventEmitter.call(this)); + + if (typeof getUrls !== 'function') { + _this._getUrls = function () { + return _Promise.resolve(getUrls); + }; + } else { + _this._getUrls = getUrls; + } + _this._protocol = protocol; + _this.init(); + _this._createWs(_this._getUrls, _this._protocol).then(function () { + _this.__postponeTimeoutTimer = _this._postponeTimeoutTimer.bind(_this); + if (global$1.addEventListener) { + _this.__pause = function () { + return _this.pause(); + }; + _this.__resume = function () { + return _this.resume(); + }; + global$1.addEventListener('offline', _this.__pause); + global$1.addEventListener('online', _this.__resume); + } + _this.open(); + }).catch(_this.throw.bind(_this)); + return _this; + } + + WebSocketPlus.prototype._createWs = function _createWs(getUrls, protocol) { + var _this2 = this; + + return getUrls().then(function (wsUrls) { + var urls = wsUrls; + if (!(urls instanceof Array)) { + urls = [urls]; + } + return tryAll(urls.map(function (url) { + return function (resolve, reject) { + debug$2('connect [' + url + '] ' + protocol); + var ws = protocol ? new WebSocket(url, protocol) : new WebSocket(url); + ws.binaryType = _this2.binaryType || 'arraybuffer'; + ws.onopen = function () { + return resolve(ws); + }; + ws.onerror = ws.onclose = function (error) { + if (error instanceof Error) { + return reject(error); + } + // in browser, error event is useless + return reject(new Error('Failed to connect [' + url + ']')); + }; + }; + })).then(function (ws) { + _this2._ws = ws; + _this2._ws.onclose = _this2._handleClose.bind(_this2); + _this2._ws.onmessage = _this2._handleMessage.bind(_this2); + return ws; + }); + }); + }; + + WebSocketPlus.prototype._destroyWs = function _destroyWs() { + var ws = this._ws; + if (!ws) return; + ws.onopen = ws.onclose = ws.onerror = ws.onmessage = null; + this._ws = null; + ws.close(); + }; + + // eslint-disable-next-line class-methods-use-this + + + WebSocketPlus.prototype.onbeforeevent = function onbeforeevent(event, from, to) { + for (var _len2 = arguments.length, payload = Array(_len2 > 3 ? _len2 - 3 : 0), _key2 = 3; _key2 < _len2; _key2++) { + payload[_key2 - 3] = arguments[_key2]; + } + + debug$2.apply(undefined, [event + ': ' + from + ' -> ' + to].concat(payload)); + }; + + WebSocketPlus.prototype.onopen = function onopen() { + this.emit('open'); + }; + + WebSocketPlus.prototype.onconnected = function onconnected() { + this._startConnectionKeeper(); + }; + + WebSocketPlus.prototype.onleaveconnected = function onleaveconnected(event, from, to) { + this._stopConnectionKeeper(); + this._destroyWs(); + if (to === 'offline' || to === 'disconnected') { + this.emit('disconnect'); + } + }; + + WebSocketPlus.prototype.onpause = function onpause() { + this.emit('offline'); + }; + + WebSocketPlus.prototype.onbeforeresume = function onbeforeresume() { + this.emit('online'); + }; + + WebSocketPlus.prototype.onreconnect = function onreconnect() { + this.emit('reconnect'); + }; + + WebSocketPlus.prototype.ondisconnected = function ondisconnected(event, from, to) { + var _this3 = this; + + var attempt = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0; + + var delay = DEFAULT_RETRY_STRATEGY.call(null, attempt); + debug$2('schedule attempt=' + attempt + ' delay=' + delay); + this.emit('schedule', attempt, delay); + if (this.__scheduledRetry) { + clearTimeout(this.__scheduledRetry); + } + this.__scheduledRetry = setTimeout(function () { + if (_this3.is('disconnected')) { + _this3.retry(attempt); + } + }, delay); + }; + + WebSocketPlus.prototype.onretry = function onretry(event, from, to) { + var _this4 = this; + + var attempt = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0; + + this.emit('retry', attempt); + this._createWs(this._getUrls, this._protocol).then(function () { + return _this4.can('reconnect') ? _this4.reconnect() : _this4._destroyWs(); + }, function () { + return _this4.can('fail') && _this4.fail(attempt + 1); + }); + }; + + WebSocketPlus.prototype.onerror = function onerror(event, from, to, error) { + this.emit('error', error); + }; + + WebSocketPlus.prototype.onclose = function onclose() { + if (global$1.removeEventListener) { + if (this.__pause) global$1.removeEventListener('offline', this.__pause); + if (this.__resume) global$1.removeEventListener('online', this.__resume); + } + }; + + // jsdoc-ignore-start + + + // jsdoc-ignore-end + WebSocketPlus.prototype._ping = function _ping() { + debug$2('ping'); + try { + this.ping(); + } catch (error) { + console.warn('websocket ping error: ' + error.message); + } + }; + + WebSocketPlus.prototype.ping = function ping() { + if (this._ws.ping) { + this._ws.ping(); + } else { + console.warn('The WebSocket implement does not support sending ping frame.\n Override ping method to use application defined ping/pong mechanism.'); + } + }; + + WebSocketPlus.prototype._postponeTimeoutTimer = function _postponeTimeoutTimer() { + var _this5 = this; + + debug$2('_postponeTimeoutTimer'); + this._clearTimeoutTimers(); + this._timeoutTimer = setTimeout(function () { + debug$2('timeout'); + _this5.disconnect(); + }, TIMEOUT_TIME); + }; + + WebSocketPlus.prototype._clearTimeoutTimers = function _clearTimeoutTimers() { + if (this._timeoutTimer) { + clearTimeout(this._timeoutTimer); + } + }; + + WebSocketPlus.prototype._startConnectionKeeper = function _startConnectionKeeper() { + debug$2('start connection keeper'); + this._heartbeatTimer = setInterval(this._ping.bind(this), HEARTBEAT_TIME); + var addListener = this._ws.addListener || this._ws.addEventListener; + addListener.call(this._ws, 'message', this.__postponeTimeoutTimer); + addListener.call(this._ws, 'pong', this.__postponeTimeoutTimer); + this._postponeTimeoutTimer(); + }; + + WebSocketPlus.prototype._stopConnectionKeeper = function _stopConnectionKeeper() { + debug$2('stop connection keeper'); + // websockets/ws#489 + var removeListener = this._ws.removeListener || this._ws.removeEventListener; + removeListener.call(this._ws, 'message', this.__postponeTimeoutTimer); + removeListener.call(this._ws, 'pong', this.__postponeTimeoutTimer); + this._clearTimeoutTimers(); + if (this._heartbeatTimer) { + clearInterval(this._heartbeatTimer); + } + }; + + WebSocketPlus.prototype._handleClose = function _handleClose(event) { + debug$2('ws closed [' + event.code + '] ' + event.reason); + // socket closed manually, ignore close event. + if (this.isFinished()) return; + this.handleClose(event); + }; + + WebSocketPlus.prototype.handleClose = function handleClose() { + // reconnect + this.disconnect(); + }; + + // jsdoc-ignore-start + + + // jsdoc-ignore-end + WebSocketPlus.prototype.send = function send(data) { + debug$2('send', data); + this._ws.send(data); + }; + + WebSocketPlus.prototype._handleMessage = function _handleMessage(event) { + debug$2('message', event.data); + this.handleMessage(event.data); + }; + + WebSocketPlus.prototype.handleMessage = function handleMessage(message) { + this.emit('message', message); + }; + + return WebSocketPlus; +}(EventEmitter), (_applyDecoratedDescriptor(_class.prototype, '_ping', [requireConnected], _Object$getOwnPropertyDescriptor(_class.prototype, '_ping'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'send', [requireConnected], _Object$getOwnPropertyDescriptor(_class.prototype, 'send'), _class.prototype)), _class); + + +StateMachine.create({ + target: WebSocketPlus.prototype, + initial: { + state: 'initialized', + event: 'init', + defer: true + }, + terminal: 'closed', + events: [{ + name: 'open', + from: 'initialized', + to: 'connected' + }, { + name: 'disconnect', + from: 'connected', + to: 'disconnected' + }, { + name: 'retry', + from: 'disconnected', + to: 'reconnecting' + }, { + name: 'fail', + from: 'reconnecting', + to: 'disconnected' + }, { + name: 'reconnect', + from: 'reconnecting', + to: 'connected' + }, { + name: 'pause', + from: ['connected', 'disconnected', 'reconnecting'], + to: 'offline' + }, {}, { + name: 'resume', + from: 'offline', + to: 'disconnected' + }, { + name: 'close', + from: ['connected', 'disconnected', 'reconnecting', 'offline'], + to: 'closed' + }, { + name: 'throw', + from: '*', + to: 'error' + }] +}); + +var error$1 = _Object$freeze({ + 1000: { + name: 'CLOSE_NORMAL' + }, + 1006: { + name: 'CLOSE_ABNORMAL' + }, + 4100: { + name: 'APP_NOT_AVAILABLE', + message: 'App not exists or realtime message service is disabled.' + }, + 4103: { + name: 'INVALID_LOGIN', + message: 'Malformed clientId.' + }, + 4105: { + name: 'SESSION_REQUIRED', + message: 'Message sent before session opened. ' + }, + 4107: { + name: 'READ_TIMEOUT' + }, + 4108: { + name: 'LOGIN_TIMEOUT' + }, + 4109: { + name: 'FRAME_TOO_LONG' + }, + 4110: { + name: 'INVALID_ORIGIN', + message: 'Access denied by domain whitelist.' + }, + 4111: { + name: 'SESSION_CONFLICT' + }, + 4112: { + name: 'SESSION_TOKEN_EXPIRED' + }, + 4200: { + name: 'INTERNAL_ERROR', + message: 'Internal error, please contact LeanCloud for support.' + }, + 4201: { + name: 'SEND_MESSAGE_TIMEOUT' + }, + 4302: { + name: 'CONVERSATION_SIGNATURE_FAILED' + }, + 4303: { + name: 'CONVERSATION_NOT_FOUND' + }, + 4304: { + name: 'CONVERSATION_FULL' + }, + 4305: { + name: 'CONVERSATION_REJECTED_BY_APP' + }, + 4306: { + name: 'CONVERSATION_UPDATE_FAILED' + }, + 4307: { + name: 'CONVERSATION_READ_ONLY' + }, + 4308: { + name: 'CONVERSATION_NOT_ALLOWED' + }, + 4401: { + name: 'INVALID_MESSAGING_TARGET' + }, + 4402: { + name: 'MESSAGE_REJECTED_BY_APP' + } +}); + +var ErrorCode = _Object$freeze(_Object$keys(error$1).reduce(function (result, code) { + return _Object$assign(result, _defineProperty({}, error$1[code].name, Number(code))); +}, {})); + +var createError = function createError(errorMessage) { + var code = errorMessage.code, + reason = errorMessage.reason, + appCode = errorMessage.appCode, + detail = errorMessage.detail; + + var message = reason || detail; + if (!message && error$1[code]) { + message = error$1[code].message || error$1[code].name; + } + if (!message) { + message = 'Unknow Error: ' + code; + } + var err = new Error(message); + return _Object$assign(err, { + code: code, appCode: appCode, detail: detail + }); +}; + +var debug$1 = d('LC:Connection'); + +var COMMAND_TIMEOUT = 20000; + +var Connection = function (_WebSocketPlus) { + _inherits(Connection, _WebSocketPlus); + + function Connection(getUrl, _ref) { + var format = _ref.format, + version = _ref.version; + + _classCallCheck(this, Connection); + + debug$1('initializing Connection'); + var protocolString = 'lc.' + format + '.' + version; + if (!isWeapp) { + var _this = _possibleConstructorReturn(this, _WebSocketPlus.call(this, getUrl, protocolString)); + } else { + var _this = _possibleConstructorReturn(this, _WebSocketPlus.call(this, getUrl().then(function (urls) { + return urls.map(function (url) { + return '' + url + (url.indexOf('?') === -1 ? '?' : '&') + 'subprotocol=' + encodeURIComponent(protocolString); + }); + }))); + } + _this._protocalFormat = format; + _this._commands = {}; + _this._serialId = 0; + return _possibleConstructorReturn(_this); + } + + Connection.prototype.send = function send(command) { + var _this2 = this; + + var waitingForRespond = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + + var serialId = void 0; + if (waitingForRespond) { + this._serialId += 1; + serialId = this._serialId; + command.i = serialId; // eslint-disable-line no-param-reassign + } + debug$1('↑ %O sent', trim(command)); + + var message = void 0; + if (this._protocalFormat === 'proto2base64') { + message = command.toBase64(); + } else if (command.toArrayBuffer) { + message = command.toArrayBuffer(); + } + if (!message) { + throw new TypeError(command + ' is not a GenericCommand'); + } + + _WebSocketPlus.prototype.send.call(this, message); + + if (!waitingForRespond) { + return _Promise.resolve(); + } + return new _Promise(function (resolve, reject) { + _this2._commands[serialId] = { + resolve: resolve, + reject: reject + }; + setTimeout(function () { + if (_this2._commands[serialId]) { + debug$1('✗ %O timeout', trim(command)); + reject(new Error('Command Timeout.')); + delete _this2._commands[serialId]; + } + }, COMMAND_TIMEOUT); + }); + }; + + Connection.prototype.handleMessage = function handleMessage(msg) { + var message = void 0; + try { + message = GenericCommand.decode(msg); + debug$1('↓ %O received', trim(message)); + } catch (e) { + console.warn('Decode message failed', msg); + } + this.emit('allmessage', message); + var serialId = message.i; + if (serialId) { + if (this._commands[serialId]) { + if (message.cmd === CommandType.error) { + this._commands[serialId].reject(createError(message.errorMessage)); + } else { + this._commands[serialId].resolve(message); + } + delete this._commands[serialId]; + } else { + console.warn('Unexpected command received with serialId [' + serialId + '],\n which have timed out or never been requested.'); + } + } else if (message.cmd === CommandType.error) { + this.emit('error', createError(message.errorMessage)); + } else { + this.emit('message', message); + } + }; + + Connection.prototype.ping = function ping() { + return this.send(new GenericCommand({ + cmd: CommandType.echo + })).catch(function (error$$1) { + return debug$1('ping failed:', error$$1); + }); + }; + + return Connection; +}(WebSocketPlus); + +/* eslint-disable max-len */ + +/** + * 插件接口 + * + *

+ * 插件是由一个或多个扩展点组成的字典。SDK 的扩展点可以分为两类: + *

+ * 第一类扩展点是类实例化之后的回调,包括 RealtimeIMClientConversation。这些扩展点可以通过一个同步的 Decorator 进行扩展。Decorator 接受一个对应的实例并对其进行一些操作。 + * 特别的,由于注册自定义消息类这个需求特别的常用,额外定义一个 messageClasses 扩展点来做这件事情。 + *

+ * 第二类扩展点是在某些事件处理前、后可以注入逻辑的点。 + * 其中 beforeMessageParseafterMessageParse 可以通过一个异步的 Middleware 进行扩展。Middleware 接受一个对象,返回一个同类型对象或同类型对象的 Promise。 + * beforeMessageDispatch 可以通过返回一个 boolean 类型的 shouldDispatch 值来控制是否要继续派发收到的消息。 + *

+ * 如果使用了多个插件,这些 hook 会按照插件数组的顺序依次执行。前一个 Middleware 的返回值会作为参数传给后一个 Middleware。 + * + * @interface Plugin + * @since 3.1.0 + */ + +/* eslint-enable max-len */ + +/** + * 插件名称,用于在日志中显示异常的插件 + * + * @name Plugin.name + * @type string + */ + +/** + * 插件注册的消息类型 + * + * @name Plugin.messageClasses + * @type AVMessage[] + */ + +/** + * 在 Realtime 实例化后对其进行修饰。 + *

+ * 接受一个参数为 Realtime 实例。 + * + * @name Plugin.onRealtimeCreate + * @type Function + */ + +/** + * 在 IMClient 实例化后对其进行修饰。 + *

+ * 接受一个参数为 IMClient 实例。 + * + * @name Plugin.onIMClientCreate + * @type Function + */ + +/** + * 在 Conversation 实例化后对其进行修饰。 + *

+ * 接受一个参数为 Conversation 实例。 + * 需要注意的是,该扩展点并不是在 {@link IMClient#createConversation} 方法创建成功后调用的 hook, + * 而是所有的 Conversation 实例化的时候(包括但不限于 query 时)调用的 hook。 + * + * @name Plugin.onConversationCreate + * @type Function + */ + +/** + * 在对消息进行 parse 之前,对原始消息进行修改。 + *

+ * 接受一个参数为原始消息,是某个消息 JSON 化(message.toJSON())的返回值,一般是一个 JSON 对象。 + * 该方法需要返回一个 JSON 对象。如果这个结果是异步得到的,也可以返回一个 Promise(fulfilled with a JSON)。 + * + * @name Plugin.beforeMessageParse + * @type Function + */ + +/** + * 在对消息进行 parse 之后,对消息实例进行修改。 + *

+ * 接受一个参数为消息实例,一般是一个已注册的 Message 类或其子类的实例。 + * 该方法需要返回一个同类型的消息实例。如果这个结果是异步得到的,也可以返回一个 Promise。 + * + * @name Plugin.afterMessageParse + * @type Function + */ + +/** + * 在收到消息之后,派发消息之前,控制是否派发这条消息。 + *

+ * 接受参数为 message 与 conversation。 + * 该方法需要返回 boolean 类型的值,如果返回 false 则 SDK 不再派发这条消息,后续的 beforeMessageDispatch 也不会执行。 + * 如果这个结果是异步得到的,也可以返回一个 Promise。 + * + * @name Plugin.beforeMessageDispatch + * @type Function + * @since 3.4.0 + */ + +var applyDecorators = function applyDecorators(decorators, target) { + if (decorators) { + decorators.forEach(function (decorator) { + try { + decorator(target); + } catch (error) { + if (decorator._pluginName) { + error.message += '[' + decorator._pluginName + ']'; + } + throw error; + } + }); + } +}; + + + +var applyDispatcher = function applyDispatcher(dispatchers, payload) { + return ensureArray(dispatchers).reduce(function (resultPromise, dispatcher) { + return resultPromise.then(function (shouldDispatch) { + return shouldDispatch === false ? false : dispatcher.apply(undefined, _toConsumableArray(payload)); + }).catch(function (error) { + if (dispatcher._pluginName) { + // eslint-disable-next-line no-param-reassign + error.message += '[' + dispatcher._pluginName + ']'; + } + throw error; + }); + }, _Promise.resolve(true)); +}; + +var debug = d('LC:Realtime'); + +var pushRouterCache = new Cache('push-router'); + +var Realtime = function (_EventEmitter) { + _inherits(Realtime, _EventEmitter); + + /** + * @extends EventEmitter + * @param {Object} options + * @param {String} options.appId + * @param {String} [options.region='cn'] 节点 id + * @param {Boolean} [options.pushOfflineMessages=false] 启用推送离线消息模式(默认为发送未读消息通知模式) + * @param {Boolean} [options.noBinary=false] 设置 WebSocket 使用字符串格式收发消息(默认为二进制格式)。 + * 适用于 WebSocket 实现不支持二进制数据格式的情况(如 React Native) + * @param {Boolean} [options.ssl=true] 使用 wss 进行连接 + * @param {Plugin[]} [options.plugins] 加载插件(since 3.1.0) + */ + function Realtime(options) { + _classCallCheck(this, Realtime); + + debug('initializing Realtime'); + + var _this = _possibleConstructorReturn(this, _EventEmitter.call(this)); + + if (typeof options.appId !== 'string') { + throw new TypeError('appId [' + options.appId + '] is not a string'); + } + _this._options = _Object$assign({ + appId: undefined, + region: 'cn', + pushOfflineMessages: false, + noBinary: isWeapp, + ssl: true, + server: process.env.SERVER + }, options); + _this._cache = new Cache('endpoints'); + internal(_this).clients = new _Set(); + _this._plugins = [].concat(_toConsumableArray(ensureArray(Realtime.__preRegisteredPlugins)), _toConsumableArray(ensureArray(options.plugins))).reduce(function (result, plugin) { + // eslint-disable-next-line no-restricted-syntax + for (var hook in plugin) { + if ({}.hasOwnProperty.call(plugin, hook) && hook !== 'name') { + if (plugin.name) { + ensureArray(plugin[hook]).forEach(function (value) { + // eslint-disable-next-line no-param-reassign + value._pluginName = plugin.name; + }); + } + // eslint-disable-next-line no-param-reassign + result[hook] = ensureArray(result[hook]).concat(plugin[hook]); + } + } + return result; + }, {}); + // onRealtimeCreate hook + applyDecorators(_this._plugins.onRealtimeCreate, _this); + return _this; + } + + Realtime.prototype._open = function _open() { + var _this2 = this; + + if (this._openPromise) return this._openPromise; + + var format = 'protobuf2'; + if (this._options.noBinary) { + // 不发送 binary data,fallback to base64 string + format = 'proto2base64'; + } + var version = 3; + if (this._options.pushOfflineMessages) { + // 不推送离线消息,而是发送对话的未读通知 + version = 1; + } + var protocol = { + format: format, + version: version + }; + this._openPromise = new _Promise(function (resolve, reject) { + debug('No connection established, create a new one.'); + var connection = new Connection(function () { + return _this2._getEndpoints(_this2._options); + }, protocol); + connection.on('open', function () { + return resolve(connection); + }); + connection.on('error', reject); + connection.on('message', _this2._dispatchCommand.bind(_this2)); + /** + * 连接断开。 + * 连接断开可能是因为 SDK 进入了离线状态(see {@link Realtime#event:offline}),或长时间没有收到服务器心跳。 + * 连接断开后所有的网络操作都会失败,请在连接断开后禁用相关的 UI 元素。 + * @event Realtime#disconnect + */ + /** + * 计划在一段时间后尝试重新连接 + * @event Realtime#schedule + * @param {Number} attempt 尝试重连的次数 + * @param {Number} delay 延迟的毫秒数 + */ + /** + * 正在尝试重新连接 + * @event Realtime#retry + * @param {Number} attempt 尝试重连的次数 + */ + /** + * 连接恢复正常。 + * 请重新启用在 {@link Realtime#event:disconnect} 事件中禁用的相关 UI 元素 + * @event Realtime#reconnect + */ + + /** + * 客户端连接断开 + * @event IMClient#disconnect + * @see Realtime#event:disconnect + * @since 3.2.0 + */ + /** + * 计划在一段时间后尝试重新连接 + * @event IMClient#schedule + * @param {Number} attempt 尝试重连的次数 + * @param {Number} delay 延迟的毫秒数 + * @since 3.2.0 + */ + /** + * 正在尝试重新连接 + * @event IMClient#retry + * @param {Number} attempt 尝试重连的次数 + * @since 3.2.0 + */ + + /** + * 客户端进入离线状态。 + * 这通常意味着网络已断开,或者 {@link Realtime#pause} 被调用 + * @event Realtime#offline + * @since 3.4.0 + */ + /** + * 客户端恢复在线状态 + * 这通常意味着网络已恢复,或者 {@link Realtime#resume} 被调用 + * @event Realtime#online + * @since 3.4.0 + */ + /** + * 进入离线状态。 + * 这通常意味着网络已断开,或者 {@link Realtime#pause} 被调用 + * @event IMClient#offline + * @since 3.4.0 + */ + /** + * 恢复在线状态 + * 这通常意味着网络已恢复,或者 {@link Realtime#resume} 被调用 + * @event IMClient#online + * @since 3.4.0 + */ + + // event proxy + ['disconnect', 'reconnect', 'retry', 'schedule', 'offline', 'online'].forEach(function (event) { + return connection.on(event, function () { + for (var _len = arguments.length, payload = Array(_len), _key = 0; _key < _len; _key++) { + payload[_key] = arguments[_key]; + } + + debug(event + ' event emitted. %O', payload); + _this2.emit.apply(_this2, [event].concat(payload)); + if (event !== 'reconnect') { + internal(_this2).clients.forEach(function (client) { + client.emit.apply(client, [event].concat(payload)); + }); + } + }); + }); + // override handleClose + connection.handleClose = function handleClose(event) { + var isFatal = [ErrorCode.APP_NOT_AVAILABLE, ErrorCode.INVALID_LOGIN, ErrorCode.INVALID_ORIGIN].some(function (errorCode) { + return errorCode === event.code; + }); + if (isFatal) { + // in these cases, SDK should throw. + this.throw(createError(event)); + } else { + // reconnect + this.disconnect(); + } + }; + internal(_this2).connection = connection; + }).catch(function (error$$1) { + delete _this2._openPromise; + throw error$$1; + }); + + return this._openPromise; + }; + + Realtime.prototype._getEndpoints = function _getEndpoints(options) { + var _this3 = this; + + return _Promise.resolve(this._cache.get('endpoints') || this.constructor._fetchEndpointsInfo(options).then(tap(function (info) { + return _this3._cache.set('endpoints', info, info.ttl * 1000); + }))).then(function (info) { + debug('endpoint info: %O', info); + return [info.server, info.secondary]; + }); + }; + + Realtime._fetchPushRouter = function _fetchPushRouter(_ref) { + var appId = _ref.appId, + region = _ref.region; + + debug('fetch router'); + switch (region) { + case 'cn': + { + var cachedPushRouter = pushRouterCache.get(appId); + if (cachedPushRouter) { + return _Promise.resolve(cachedPushRouter); + } + return axios.get('https://app-router.leancloud.cn/1/route', { + params: { + appId: appId + }, + timeout: 20000 + }).then(function (res) { + return res.data; + }).then(tap(debug)).then(function (route) { + var pushRouter = route.push_router_server; + if (!pushRouter) { + throw new Error('push router not exists'); + } + var ttl = route.ttl; + if (typeof ttl !== 'number') { + ttl = 3600; + } + pushRouterCache.set(appId, pushRouter, ttl * 1000); + return pushRouter; + }).catch(function () { + return 'router-g0-push.leancloud.cn'; + }); + } + case 'us': + return _Promise.resolve('router-a0-push.leancloud.cn'); + default: + throw new Error('Region [' + region + '] is not supported.'); + } + }; + + Realtime._fetchEndpointsInfo = function _fetchEndpointsInfo(_ref2) { + var appId = _ref2.appId, + region = _ref2.region, + ssl = _ref2.ssl, + server = _ref2.server; + + debug('fetch endpoint info'); + return this._fetchPushRouter({ appId: appId, region: region }).then(tap(debug)).then(function (router) { + return axios.get('https://' + router + '/v1/route', { + params: { + appId: appId, + secure: ssl, + features: isWeapp ? 'wechat' : undefined, + server: server, + _t: Date.now() + }, + timeout: 20000 + }).then(function (res) { + return res.data; + }).then(tap(debug)); + }); + }; + + Realtime.prototype._close = function _close() { + if (this._openPromise) { + this._openPromise.then(function (connection) { + return connection.close(); + }); + } + delete this._openPromise; + }; + + /** + * 手动进行重连。 + * SDK 在网络出现异常时会自动按照一定的时间间隔尝试重连,调用该方法会立即尝试重连并重置重连尝试计数器。 + * 只能在 `schedule` 事件之后,`retry` 事件之前调用,如果当前网络正常或者正在进行重连,调用该方法会抛异常。 + */ + + + Realtime.prototype.retry = function retry() { + var connection = internal(this).connection; + if (!connection) { + throw new Error('no connection established'); + } + if (connection.cannot('retry')) { + throw new Error('retrying not allowed when not disconnected. the connection is now ' + connection.current); + } + return connection.retry(); + }; + /** + * 暂停,使 SDK 进入离线状态。 + * 你可以在网络断开、应用进入后台等时刻调用该方法让 SDK 进入离线状态,离线状态下不会尝试重连。 + * 在浏览器中 SDK 会自动监听网络变化,因此无需手动调用该方法。 + * + * @since 3.4.0 + * @see Realtime#event:offline + */ + + + Realtime.prototype.pause = function pause() { + // 这个方法常常在网络断开、进入后台时被调用,此时 connection 可能没有建立或者已经 close。 + // 因此不像 retry,这个方法应该尽可能 loose + var connection = internal(this).connection; + if (!connection) return; + if (connection.can('pause')) connection.pause(); + }; + /** + * 恢复在线状态。 + * 你可以在网络恢复、应用回到前台等时刻调用该方法让 SDK 恢复在线状态,恢复在线状态后 SDK 会开始尝试重连。 + * + * @since 3.4.0 + * @see Realtime#event:online + */ + + + Realtime.prototype.resume = function resume() { + // 与 pause 一样,这个方法应该尽可能 loose + var connection = internal(this).connection; + if (!connection) return; + if (connection.can('resume')) connection.resume(); + }; + + Realtime.prototype._register = function _register(client) { + internal(this).clients.add(client); + }; + + Realtime.prototype._deregister = function _deregister(client) { + internal(this).clients.delete(client); + if (internal(this).clients.size === 0) { + this._close(); + } + }; + + Realtime.prototype._dispatchCommand = function _dispatchCommand(command) { + return applyDispatcher(this._plugins.beforeCommandDispatch, [command, this]).then(function (shouldDispatch) { + // no plugin handled this command + if (shouldDispatch) return debug('[WARN] Unexpected message received: %O', trim(command)); + return false; + }); + }; + + return Realtime; +}(EventEmitter); + +exports.Protocals = message; +exports.Promise = _Promise; +exports.EventEmitter = EventEmitter; +exports.Realtime = Realtime; +exports.ErrorCode = ErrorCode; + +//# sourceMappingURL=realtime-core.js.map \ No newline at end of file diff --git a/dist/realtime-core.js.map b/dist/realtime-core.js.map new file mode 100644 index 000000000..3f39f3873 --- /dev/null +++ b/dist/realtime-core.js.map @@ -0,0 +1 @@ +{"version":3,"file":null,"sources":["/home/travis/build/leancloud/js-realtime-sdk/proto/message-compiled.js","/home/travis/build/leancloud/js-realtime-sdk/proto/message.js","/home/travis/build/leancloud/js-realtime-sdk/src/utils/global.js","/home/travis/build/leancloud/js-realtime-sdk/src/utils/expirable.js","/home/travis/build/leancloud/js-realtime-sdk/src/utils/cache.js","/home/travis/build/leancloud/js-realtime-sdk/src/utils/index.js","/home/travis/build/leancloud/js-realtime-sdk/src/websocket-plus.js","/home/travis/build/leancloud/js-realtime-sdk/src/error.js","/home/travis/build/leancloud/js-realtime-sdk/src/connection.js","/home/travis/build/leancloud/js-realtime-sdk/src/plugin.js","/home/travis/build/leancloud/js-realtime-sdk/src/realtime.js"],"sourcesContent":["module.exports = require(\"protobufjs/dist/protobuf-light\").newBuilder({})['import']({\n \"package\": \"push_server.messages2\",\n \"syntax\": \"proto2\",\n \"options\": {\n \"objc_class_prefix\": \"AVIM\"\n },\n \"messages\": [\n {\n \"name\": \"JsonObjectMessage\",\n \"syntax\": \"proto2\",\n \"fields\": [\n {\n \"rule\": \"required\",\n \"type\": \"string\",\n \"name\": \"data\",\n \"id\": 1\n }\n ]\n },\n {\n \"name\": \"UnreadTuple\",\n \"syntax\": \"proto2\",\n \"fields\": [\n {\n \"rule\": \"required\",\n \"type\": \"string\",\n \"name\": \"cid\",\n \"id\": 1\n },\n {\n \"rule\": \"required\",\n \"type\": \"int32\",\n \"name\": \"unread\",\n \"id\": 2\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"mid\",\n \"id\": 3\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"timestamp\",\n \"id\": 4\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"from\",\n \"id\": 5\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"data\",\n \"id\": 6\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"patchTimestamp\",\n \"id\": 7\n }\n ]\n },\n {\n \"name\": \"LogItem\",\n \"syntax\": \"proto2\",\n \"fields\": [\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"from\",\n \"id\": 1\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"data\",\n \"id\": 2\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"timestamp\",\n \"id\": 3\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"msgId\",\n \"id\": 4\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"ackAt\",\n \"id\": 5\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"readAt\",\n \"id\": 6\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"patchTimestamp\",\n \"id\": 7\n }\n ]\n },\n {\n \"name\": \"DataCommand\",\n \"syntax\": \"proto2\",\n \"fields\": [\n {\n \"rule\": \"repeated\",\n \"type\": \"string\",\n \"name\": \"ids\",\n \"id\": 1\n },\n {\n \"rule\": \"repeated\",\n \"type\": \"JsonObjectMessage\",\n \"name\": \"msg\",\n \"id\": 2\n },\n {\n \"rule\": \"optional\",\n \"type\": \"bool\",\n \"name\": \"offline\",\n \"id\": 3\n }\n ]\n },\n {\n \"name\": \"SessionCommand\",\n \"syntax\": \"proto2\",\n \"fields\": [\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"t\",\n \"id\": 1\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"n\",\n \"id\": 2\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"s\",\n \"id\": 3\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"ua\",\n \"id\": 4\n },\n {\n \"rule\": \"optional\",\n \"type\": \"bool\",\n \"name\": \"r\",\n \"id\": 5\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"tag\",\n \"id\": 6\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"deviceId\",\n \"id\": 7\n },\n {\n \"rule\": \"repeated\",\n \"type\": \"string\",\n \"name\": \"sessionPeerIds\",\n \"id\": 8\n },\n {\n \"rule\": \"repeated\",\n \"type\": \"string\",\n \"name\": \"onlineSessionPeerIds\",\n \"id\": 9\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"st\",\n \"id\": 10\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int32\",\n \"name\": \"stTtl\",\n \"id\": 11\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int32\",\n \"name\": \"code\",\n \"id\": 12\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"reason\",\n \"id\": 13\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"deviceToken\",\n \"id\": 14\n },\n {\n \"rule\": \"optional\",\n \"type\": \"bool\",\n \"name\": \"sp\",\n \"id\": 15\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"detail\",\n \"id\": 16\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"lastUnreadNotifTime\",\n \"id\": 17\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"lastPatchTime\",\n \"id\": 18\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"configBitmap\",\n \"id\": 19\n }\n ]\n },\n {\n \"name\": \"ErrorCommand\",\n \"syntax\": \"proto2\",\n \"fields\": [\n {\n \"rule\": \"required\",\n \"type\": \"int32\",\n \"name\": \"code\",\n \"id\": 1\n },\n {\n \"rule\": \"required\",\n \"type\": \"string\",\n \"name\": \"reason\",\n \"id\": 2\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int32\",\n \"name\": \"appCode\",\n \"id\": 3\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"detail\",\n \"id\": 4\n }\n ]\n },\n {\n \"name\": \"DirectCommand\",\n \"syntax\": \"proto2\",\n \"fields\": [\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"msg\",\n \"id\": 1\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"uid\",\n \"id\": 2\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"fromPeerId\",\n \"id\": 3\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"timestamp\",\n \"id\": 4\n },\n {\n \"rule\": \"optional\",\n \"type\": \"bool\",\n \"name\": \"offline\",\n \"id\": 5\n },\n {\n \"rule\": \"optional\",\n \"type\": \"bool\",\n \"name\": \"hasMore\",\n \"id\": 6\n },\n {\n \"rule\": \"repeated\",\n \"type\": \"string\",\n \"name\": \"toPeerIds\",\n \"id\": 7\n },\n {\n \"rule\": \"optional\",\n \"type\": \"bool\",\n \"name\": \"r\",\n \"id\": 10\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"cid\",\n \"id\": 11\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"id\",\n \"id\": 12\n },\n {\n \"rule\": \"optional\",\n \"type\": \"bool\",\n \"name\": \"transient\",\n \"id\": 13\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"dt\",\n \"id\": 14\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"roomId\",\n \"id\": 15\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"pushData\",\n \"id\": 16\n },\n {\n \"rule\": \"optional\",\n \"type\": \"bool\",\n \"name\": \"will\",\n \"id\": 17\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"patchTimestamp\",\n \"id\": 18\n }\n ]\n },\n {\n \"name\": \"AckCommand\",\n \"syntax\": \"proto2\",\n \"fields\": [\n {\n \"rule\": \"optional\",\n \"type\": \"int32\",\n \"name\": \"code\",\n \"id\": 1\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"reason\",\n \"id\": 2\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"mid\",\n \"id\": 3\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"cid\",\n \"id\": 4\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"t\",\n \"id\": 5\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"uid\",\n \"id\": 6\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"fromts\",\n \"id\": 7\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"tots\",\n \"id\": 8\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"type\",\n \"id\": 9\n },\n {\n \"rule\": \"repeated\",\n \"type\": \"string\",\n \"name\": \"ids\",\n \"id\": 10\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int32\",\n \"name\": \"appCode\",\n \"id\": 11\n }\n ]\n },\n {\n \"name\": \"UnreadCommand\",\n \"syntax\": \"proto2\",\n \"fields\": [\n {\n \"rule\": \"repeated\",\n \"type\": \"UnreadTuple\",\n \"name\": \"convs\",\n \"id\": 1\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"notifTime\",\n \"id\": 2\n }\n ]\n },\n {\n \"name\": \"ConvCommand\",\n \"syntax\": \"proto2\",\n \"fields\": [\n {\n \"rule\": \"repeated\",\n \"type\": \"string\",\n \"name\": \"m\",\n \"id\": 1\n },\n {\n \"rule\": \"optional\",\n \"type\": \"bool\",\n \"name\": \"transient\",\n \"id\": 2\n },\n {\n \"rule\": \"optional\",\n \"type\": \"bool\",\n \"name\": \"unique\",\n \"id\": 3\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"cid\",\n \"id\": 4\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"cdate\",\n \"id\": 5\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"initBy\",\n \"id\": 6\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"sort\",\n \"id\": 7\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int32\",\n \"name\": \"limit\",\n \"id\": 8\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int32\",\n \"name\": \"skip\",\n \"id\": 9\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int32\",\n \"name\": \"flag\",\n \"id\": 10\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int32\",\n \"name\": \"count\",\n \"id\": 11\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"udate\",\n \"id\": 12\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"t\",\n \"id\": 13\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"n\",\n \"id\": 14\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"s\",\n \"id\": 15\n },\n {\n \"rule\": \"optional\",\n \"type\": \"bool\",\n \"name\": \"statusSub\",\n \"id\": 16\n },\n {\n \"rule\": \"optional\",\n \"type\": \"bool\",\n \"name\": \"statusPub\",\n \"id\": 17\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int32\",\n \"name\": \"statusTTL\",\n \"id\": 18\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"uniqueId\",\n \"id\": 19\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"targetClientId\",\n \"id\": 20\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"maxReadTimestamp\",\n \"id\": 21\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"maxAckTimestamp\",\n \"id\": 22\n },\n {\n \"rule\": \"optional\",\n \"type\": \"bool\",\n \"name\": \"queryAllMembers\",\n \"id\": 23\n },\n {\n \"rule\": \"repeated\",\n \"type\": \"MaxReadTuple\",\n \"name\": \"maxReadTuples\",\n \"id\": 24\n },\n {\n \"rule\": \"repeated\",\n \"type\": \"string\",\n \"name\": \"cids\",\n \"id\": 25\n },\n {\n \"rule\": \"optional\",\n \"type\": \"JsonObjectMessage\",\n \"name\": \"results\",\n \"id\": 100\n },\n {\n \"rule\": \"optional\",\n \"type\": \"JsonObjectMessage\",\n \"name\": \"where\",\n \"id\": 101\n },\n {\n \"rule\": \"optional\",\n \"type\": \"JsonObjectMessage\",\n \"name\": \"attr\",\n \"id\": 103\n }\n ]\n },\n {\n \"name\": \"RoomCommand\",\n \"syntax\": \"proto2\",\n \"fields\": [\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"roomId\",\n \"id\": 1\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"s\",\n \"id\": 2\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"t\",\n \"id\": 3\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"n\",\n \"id\": 4\n },\n {\n \"rule\": \"optional\",\n \"type\": \"bool\",\n \"name\": \"transient\",\n \"id\": 5\n },\n {\n \"rule\": \"repeated\",\n \"type\": \"string\",\n \"name\": \"roomPeerIds\",\n \"id\": 6\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"byPeerId\",\n \"id\": 7\n }\n ]\n },\n {\n \"name\": \"LogsCommand\",\n \"syntax\": \"proto2\",\n \"fields\": [\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"cid\",\n \"id\": 1\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int32\",\n \"name\": \"l\",\n \"id\": 2\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int32\",\n \"name\": \"limit\",\n \"id\": 3\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"t\",\n \"id\": 4\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"tt\",\n \"id\": 5\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"tmid\",\n \"id\": 6\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"mid\",\n \"id\": 7\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"checksum\",\n \"id\": 8\n },\n {\n \"rule\": \"optional\",\n \"type\": \"bool\",\n \"name\": \"stored\",\n \"id\": 9\n },\n {\n \"rule\": \"optional\",\n \"type\": \"bool\",\n \"name\": \"reversed\",\n \"id\": 10\n },\n {\n \"rule\": \"repeated\",\n \"type\": \"LogItem\",\n \"name\": \"logs\",\n \"id\": 105\n }\n ]\n },\n {\n \"name\": \"RcpCommand\",\n \"syntax\": \"proto2\",\n \"fields\": [\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"id\",\n \"id\": 1\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"cid\",\n \"id\": 2\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"t\",\n \"id\": 3\n },\n {\n \"rule\": \"optional\",\n \"type\": \"bool\",\n \"name\": \"read\",\n \"id\": 4\n }\n ]\n },\n {\n \"name\": \"ReadTuple\",\n \"syntax\": \"proto2\",\n \"fields\": [\n {\n \"rule\": \"required\",\n \"type\": \"string\",\n \"name\": \"cid\",\n \"id\": 1\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"timestamp\",\n \"id\": 2\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"mid\",\n \"id\": 3\n }\n ]\n },\n {\n \"name\": \"MaxReadTuple\",\n \"syntax\": \"proto2\",\n \"fields\": [\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"pid\",\n \"id\": 1\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"maxAckTimestamp\",\n \"id\": 2\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"maxReadTimestamp\",\n \"id\": 3\n }\n ]\n },\n {\n \"name\": \"ReadCommand\",\n \"syntax\": \"proto2\",\n \"fields\": [\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"cid\",\n \"id\": 1\n },\n {\n \"rule\": \"repeated\",\n \"type\": \"string\",\n \"name\": \"cids\",\n \"id\": 2\n },\n {\n \"rule\": \"repeated\",\n \"type\": \"ReadTuple\",\n \"name\": \"convs\",\n \"id\": 3\n }\n ]\n },\n {\n \"name\": \"PresenceCommand\",\n \"syntax\": \"proto2\",\n \"fields\": [\n {\n \"rule\": \"optional\",\n \"type\": \"StatusType\",\n \"name\": \"status\",\n \"id\": 1\n },\n {\n \"rule\": \"repeated\",\n \"type\": \"string\",\n \"name\": \"sessionPeerIds\",\n \"id\": 2\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"cid\",\n \"id\": 3\n }\n ]\n },\n {\n \"name\": \"ReportCommand\",\n \"syntax\": \"proto2\",\n \"fields\": [\n {\n \"rule\": \"optional\",\n \"type\": \"bool\",\n \"name\": \"initiative\",\n \"id\": 1\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"type\",\n \"id\": 2\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"data\",\n \"id\": 3\n }\n ]\n },\n {\n \"name\": \"PatchItem\",\n \"syntax\": \"proto2\",\n \"fields\": [\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"cid\",\n \"id\": 1\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"mid\",\n \"id\": 2\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"timestamp\",\n \"id\": 3\n },\n {\n \"rule\": \"optional\",\n \"type\": \"bool\",\n \"name\": \"recall\",\n \"id\": 4\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"data\",\n \"id\": 5\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"patchTimestamp\",\n \"id\": 6\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"from\",\n \"id\": 7\n }\n ]\n },\n {\n \"name\": \"PatchCommand\",\n \"syntax\": \"proto2\",\n \"fields\": [\n {\n \"rule\": \"repeated\",\n \"type\": \"PatchItem\",\n \"name\": \"patches\",\n \"id\": 1\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"lastPatchTime\",\n \"id\": 2\n }\n ]\n },\n {\n \"name\": \"GenericCommand\",\n \"syntax\": \"proto2\",\n \"fields\": [\n {\n \"rule\": \"optional\",\n \"type\": \"CommandType\",\n \"name\": \"cmd\",\n \"id\": 1\n },\n {\n \"rule\": \"optional\",\n \"type\": \"OpType\",\n \"name\": \"op\",\n \"id\": 2\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"appId\",\n \"id\": 3\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"peerId\",\n \"id\": 4\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int32\",\n \"name\": \"i\",\n \"id\": 5\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"installationId\",\n \"id\": 6\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int32\",\n \"name\": \"priority\",\n \"id\": 7\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int32\",\n \"name\": \"service\",\n \"id\": 8\n },\n {\n \"rule\": \"optional\",\n \"type\": \"DataCommand\",\n \"name\": \"dataMessage\",\n \"id\": 101\n },\n {\n \"rule\": \"optional\",\n \"type\": \"SessionCommand\",\n \"name\": \"sessionMessage\",\n \"id\": 102\n },\n {\n \"rule\": \"optional\",\n \"type\": \"ErrorCommand\",\n \"name\": \"errorMessage\",\n \"id\": 103\n },\n {\n \"rule\": \"optional\",\n \"type\": \"DirectCommand\",\n \"name\": \"directMessage\",\n \"id\": 104\n },\n {\n \"rule\": \"optional\",\n \"type\": \"AckCommand\",\n \"name\": \"ackMessage\",\n \"id\": 105\n },\n {\n \"rule\": \"optional\",\n \"type\": \"UnreadCommand\",\n \"name\": \"unreadMessage\",\n \"id\": 106\n },\n {\n \"rule\": \"optional\",\n \"type\": \"ReadCommand\",\n \"name\": \"readMessage\",\n \"id\": 107\n },\n {\n \"rule\": \"optional\",\n \"type\": \"RcpCommand\",\n \"name\": \"rcpMessage\",\n \"id\": 108\n },\n {\n \"rule\": \"optional\",\n \"type\": \"LogsCommand\",\n \"name\": \"logsMessage\",\n \"id\": 109\n },\n {\n \"rule\": \"optional\",\n \"type\": \"ConvCommand\",\n \"name\": \"convMessage\",\n \"id\": 110\n },\n {\n \"rule\": \"optional\",\n \"type\": \"RoomCommand\",\n \"name\": \"roomMessage\",\n \"id\": 111\n },\n {\n \"rule\": \"optional\",\n \"type\": \"PresenceCommand\",\n \"name\": \"presenceMessage\",\n \"id\": 112\n },\n {\n \"rule\": \"optional\",\n \"type\": \"ReportCommand\",\n \"name\": \"reportMessage\",\n \"id\": 113\n },\n {\n \"rule\": \"optional\",\n \"type\": \"PatchCommand\",\n \"name\": \"patchMessage\",\n \"id\": 114\n }\n ]\n }\n ],\n \"enums\": [\n {\n \"name\": \"CommandType\",\n \"syntax\": \"proto2\",\n \"values\": [\n {\n \"name\": \"session\",\n \"id\": 0\n },\n {\n \"name\": \"conv\",\n \"id\": 1\n },\n {\n \"name\": \"direct\",\n \"id\": 2\n },\n {\n \"name\": \"ack\",\n \"id\": 3\n },\n {\n \"name\": \"rcp\",\n \"id\": 4\n },\n {\n \"name\": \"unread\",\n \"id\": 5\n },\n {\n \"name\": \"logs\",\n \"id\": 6\n },\n {\n \"name\": \"error\",\n \"id\": 7\n },\n {\n \"name\": \"login\",\n \"id\": 8\n },\n {\n \"name\": \"data\",\n \"id\": 9\n },\n {\n \"name\": \"room\",\n \"id\": 10\n },\n {\n \"name\": \"read\",\n \"id\": 11\n },\n {\n \"name\": \"presence\",\n \"id\": 12\n },\n {\n \"name\": \"report\",\n \"id\": 13\n },\n {\n \"name\": \"echo\",\n \"id\": 14\n },\n {\n \"name\": \"loggedin\",\n \"id\": 15\n },\n {\n \"name\": \"logout\",\n \"id\": 16\n },\n {\n \"name\": \"loggedout\",\n \"id\": 17\n },\n {\n \"name\": \"patch\",\n \"id\": 18\n }\n ]\n },\n {\n \"name\": \"OpType\",\n \"syntax\": \"proto2\",\n \"values\": [\n {\n \"name\": \"open\",\n \"id\": 1\n },\n {\n \"name\": \"add\",\n \"id\": 2\n },\n {\n \"name\": \"remove\",\n \"id\": 3\n },\n {\n \"name\": \"close\",\n \"id\": 4\n },\n {\n \"name\": \"opened\",\n \"id\": 5\n },\n {\n \"name\": \"closed\",\n \"id\": 6\n },\n {\n \"name\": \"query\",\n \"id\": 7\n },\n {\n \"name\": \"query_result\",\n \"id\": 8\n },\n {\n \"name\": \"conflict\",\n \"id\": 9\n },\n {\n \"name\": \"added\",\n \"id\": 10\n },\n {\n \"name\": \"removed\",\n \"id\": 11\n },\n {\n \"name\": \"start\",\n \"id\": 30\n },\n {\n \"name\": \"started\",\n \"id\": 31\n },\n {\n \"name\": \"joined\",\n \"id\": 32\n },\n {\n \"name\": \"members_joined\",\n \"id\": 33\n },\n {\n \"name\": \"left\",\n \"id\": 39\n },\n {\n \"name\": \"members_left\",\n \"id\": 40\n },\n {\n \"name\": \"results\",\n \"id\": 42\n },\n {\n \"name\": \"count\",\n \"id\": 43\n },\n {\n \"name\": \"result\",\n \"id\": 44\n },\n {\n \"name\": \"update\",\n \"id\": 45\n },\n {\n \"name\": \"updated\",\n \"id\": 46\n },\n {\n \"name\": \"mute\",\n \"id\": 47\n },\n {\n \"name\": \"unmute\",\n \"id\": 48\n },\n {\n \"name\": \"status\",\n \"id\": 49\n },\n {\n \"name\": \"members\",\n \"id\": 50\n },\n {\n \"name\": \"max_read\",\n \"id\": 51\n },\n {\n \"name\": \"is_member\",\n \"id\": 52\n },\n {\n \"name\": \"join\",\n \"id\": 80\n },\n {\n \"name\": \"invite\",\n \"id\": 81\n },\n {\n \"name\": \"leave\",\n \"id\": 82\n },\n {\n \"name\": \"kick\",\n \"id\": 83\n },\n {\n \"name\": \"reject\",\n \"id\": 84\n },\n {\n \"name\": \"invited\",\n \"id\": 85\n },\n {\n \"name\": \"kicked\",\n \"id\": 86\n },\n {\n \"name\": \"upload\",\n \"id\": 100\n },\n {\n \"name\": \"uploaded\",\n \"id\": 101\n },\n {\n \"name\": \"modify\",\n \"id\": 150\n },\n {\n \"name\": \"modified\",\n \"id\": 151\n }\n ]\n },\n {\n \"name\": \"StatusType\",\n \"syntax\": \"proto2\",\n \"values\": [\n {\n \"name\": \"on\",\n \"id\": 1\n },\n {\n \"name\": \"off\",\n \"id\": 2\n }\n ]\n }\n ],\n \"isNamespace\": true\n}).build();\n","import messages from './message-compiled';\n\nconst {\n JsonObjectMessage,\n UnreadTuple,\n LogItem,\n DataCommand,\n SessionCommand,\n ErrorCommand,\n DirectCommand,\n AckCommand,\n UnreadCommand,\n ConvCommand,\n RoomCommand,\n LogsCommand,\n RcpCommand,\n ReadTuple,\n MaxReadTuple,\n ReadCommand,\n PresenceCommand,\n ReportCommand,\n GenericCommand,\n PatchCommand,\n PatchItem,\n CommandType,\n OpType,\n StatusType,\n} = messages.push_server.messages2;\n\nexport {\n JsonObjectMessage,\n UnreadTuple,\n LogItem,\n DataCommand,\n SessionCommand,\n ErrorCommand,\n DirectCommand,\n AckCommand,\n UnreadCommand,\n ConvCommand,\n RoomCommand,\n LogsCommand,\n RcpCommand,\n ReadTuple,\n MaxReadTuple,\n ReadCommand,\n PresenceCommand,\n ReportCommand,\n GenericCommand,\n PatchCommand,\n PatchItem,\n CommandType,\n OpType,\n StatusType,\n};\n","/* eslint-disable */\nexport default typeof global !== 'undefined' ? global :\n typeof window !== 'undefined' ? window : {};\n","import d from 'debug';\n\nconst EXPIRED = Symbol('expired');\nconst debug = d('LC:Expirable');\nexport default class Expirable {\n constructor(value, ttl) {\n this._value = value;\n if (typeof ttl === 'number') {\n this.expiredAt = Date.now() + ttl;\n }\n }\n\n get value() {\n const expired = this.expiredAt && this.expiredAt < Date.now();\n if (expired) debug(`expired: ${this._value}`);\n return expired ? EXPIRED : this._value;\n }\n}\nExpirable.EXPIRED = EXPIRED;\n","import d from 'debug';\nimport Expirable from './expirable';\n\nconst debug = d('LC:Cache');\nexport default class Cache {\n constructor(name = 'anonymous') {\n this.name = name;\n this._map = {};\n }\n\n get(key) {\n const cache = this._map[key];\n if (cache) {\n const value = cache.value;\n if (value !== Expirable.EXPIRED) {\n debug('[%s] hit: %s %O', this.name, key, value);\n return value;\n }\n delete this._map[key];\n }\n debug(`[${this.name}] missed: ${key}`);\n return null;\n }\n\n set(key, value, ttl) {\n debug('[%s] set: %s %O %d', this.name, key, value, ttl);\n this._map[key] = new Expirable(value, ttl);\n }\n}\n","import isPlainObject from 'lodash/isPlainObject';\nimport global from './global';\n\nexport { global };\n\nexport const tryAll = (promiseConstructors) => {\n const promise = new Promise(promiseConstructors[0]);\n if (promiseConstructors.length === 1) {\n return promise;\n }\n return promise.catch(() => tryAll(promiseConstructors.slice(1)));\n};\n\nexport const tap = interceptor => value => ((interceptor(value), value));\n\nexport { default as Expirable } from './expirable';\nexport { default as Cache } from './cache';\n\nexport const decodeDate = (date) => {\n if (!date) return date;\n if (typeof date === 'string') {\n return new Date(date);\n }\n if (date.__type === 'Date' && date.iso) {\n return new Date(date.iso);\n }\n // Long\n if (typeof date.toNumber === 'function') {\n return new Date(date.toNumber());\n }\n return date;\n};\n\nexport const keyRemap = (keymap, obj) =>\n Object.keys(obj).reduce((newObj, key) => {\n const newKey = keymap[key] || key;\n return Object.assign(newObj, {\n [newKey]: obj[key],\n });\n }, {});\n\nexport const isIE10 = (\n global.navigator &&\n global.navigator.userAgent &&\n global.navigator.userAgent.indexOf('MSIE 10.') !== -1\n);\n\n/* eslint-disable no-proto */\nexport const getStaticProperty = (klass, property) =>\n (klass[property] || (klass.__proto__ ? getStaticProperty(klass.__proto__, property) : undefined));\n/* eslint-enable no-proto */\n\nexport const union = (a, b) => Array.from(new Set([...a, ...b]));\nexport const difference = (a, b) => Array.from(\n (bSet => new Set(a.filter(x => !bSet.has(x))))(new Set(b))\n);\n\nconst map = new WeakMap();\n\n// protected property helper\nexport const internal = (object) => {\n if (!map.has(object)) {\n map.set(object, {});\n }\n return map.get(object);\n};\n\n// debug utility\nconst removeNull = (obj) => {\n if (!isPlainObject(obj)) return obj;\n const object = Object.assign({}, obj);\n // eslint-disable-next-line no-restricted-syntax\n for (const prop in object) {\n if ({}.hasOwnProperty.call(object, prop)) {\n const value = object[prop];\n if (value === null) {\n delete object[prop];\n } else {\n object[prop] = removeNull(value);\n }\n }\n }\n return object;\n};\nexport const trim = message => removeNull(JSON.parse(JSON.stringify(message)));\n\nexport const ensureArray = (target) => {\n if (Array.isArray(target)) {\n return target;\n }\n if (target === undefined || target === null) {\n return [];\n }\n return [target];\n};\n\nexport const setValue = (target, key, value) => {\n // '.' is not allowed in Class keys, escaping is not in concern now.\n const segs = key.split('.');\n const lastSeg = segs.pop();\n let currentTarget = target;\n segs.forEach((seg) => {\n if (currentTarget[seg] === undefined) currentTarget[seg] = {};\n currentTarget = currentTarget[seg];\n });\n currentTarget[lastSeg] = value;\n return target;\n};\n\n// eslint-disable-next-line no-undef\nexport const isWeapp = typeof wx === 'object' && typeof wx.connectSocket === 'function';\n\n// throttle decorator\nexport const throttle = wait => (target, property, descriptor) => {\n const callback = descriptor.value;\n // very naive, internal use only\n if (callback.length) {\n throw new Error('throttled function should not accept any arguments');\n }\n return {\n ...descriptor,\n value() {\n let {\n throttleMeta,\n } = internal(this);\n if (!throttleMeta) throttleMeta = internal(this).throttleMeta = {};\n let {\n [property]: propertyMeta,\n } = throttleMeta;\n if (!propertyMeta) propertyMeta = throttleMeta[property] = {};\n const {\n previouseTimestamp = 0,\n timeout,\n } = propertyMeta;\n const now = Date.now();\n const remainingTime = wait - (now - previouseTimestamp);\n if (remainingTime <= 0) {\n throttleMeta[property].previouseTimestamp = now;\n callback.apply(this);\n } else if (!timeout) {\n propertyMeta.timeout = setTimeout(() => {\n propertyMeta.previouseTimestamp = Date.now();\n delete propertyMeta.timeout;\n callback.apply(this);\n }, remainingTime);\n }\n },\n };\n};\n","// WebSocket with auto reconnecting feature, backup endpoint and EventEmitter interface.\n\nimport d from 'debug';\nimport EventEmitter from 'eventemitter3';\nimport StateMachine from 'javascript-state-machine';\n\nimport WebSocket from 'ws';\n\nimport { tryAll, global } from './utils';\n\nconst debug = d('LC:WebSocketPlus');\n\nconst HEARTBEAT_TIME = 180000;\nconst TIMEOUT_TIME = 380000;\n\nconst DEFAULT_RETRY_STRATEGY = attempt => Math.min(1000 * Math.pow(2, attempt), 300000);\n\nconst requireConnected = (target, name, descriptor) =>\n Object.assign({}, descriptor, {\n value: function requireConnectedWrapper(...args) {\n if (!this.is('connected')) {\n const currentState = this.current;\n console.warn(`${name} should not be called when the connection is ${currentState}`);\n if (this.is('disconnected') || this.is('reconnecting')) {\n console.warn('disconnect and reconnect event should be handled to avoid such calls.');\n }\n throw new Error('Connection unavailable');\n }\n return descriptor.value.call(this, ...args);\n },\n });\n\nclass WebSocketPlus extends EventEmitter {\n constructor(getUrls, protocol) {\n if (typeof WebSocket === 'undefined') {\n throw new Error('WebSocket is undefined. Polyfill is required in this runtime.');\n }\n super();\n if (typeof getUrls !== 'function') {\n this._getUrls = () => Promise.resolve(getUrls);\n } else {\n this._getUrls = getUrls;\n }\n this._protocol = protocol;\n this.init();\n this._createWs(this._getUrls, this._protocol).then(\n () => {\n this.__postponeTimeoutTimer = this._postponeTimeoutTimer.bind(this);\n if (global.addEventListener) {\n this.__pause = () => this.pause();\n this.__resume = () => this.resume();\n global.addEventListener('offline', this.__pause);\n global.addEventListener('online', this.__resume);\n }\n this.open();\n }\n ).catch(this.throw.bind(this));\n }\n\n _createWs(getUrls, protocol) {\n return getUrls().then((wsUrls) => {\n let urls = wsUrls;\n if (!(urls instanceof Array)) {\n urls = [urls];\n }\n return tryAll(\n urls.map(url => (resolve, reject) => {\n debug(`connect [${url}] ${protocol}`);\n const ws = protocol ? new WebSocket(\n url, protocol\n ) : new WebSocket(url);\n ws.binaryType = this.binaryType || 'arraybuffer';\n ws.onopen = () => resolve(ws);\n ws.onerror = ws.onclose = (error) => {\n if (error instanceof Error) {\n return reject(error);\n }\n // in browser, error event is useless\n return reject(new Error(`Failed to connect [${url}]`));\n };\n })\n ).then((ws) => {\n this._ws = ws;\n this._ws.onclose = this._handleClose.bind(this);\n this._ws.onmessage = this._handleMessage.bind(this);\n return ws;\n });\n });\n }\n _destroyWs() {\n const ws = this._ws;\n if (!ws) return;\n ws.onopen = ws.onclose = ws.onerror = ws.onmessage = null;\n this._ws = null;\n ws.close();\n }\n\n // eslint-disable-next-line class-methods-use-this\n onbeforeevent(event, from, to, ...payload) {\n debug(`${event}: ${from} -> ${to}`, ...payload);\n }\n onopen() {\n this.emit('open');\n }\n onconnected() {\n this._startConnectionKeeper();\n }\n onleaveconnected(event, from, to) {\n this._stopConnectionKeeper();\n this._destroyWs();\n if (to === 'offline' || to === 'disconnected') {\n this.emit('disconnect');\n }\n }\n onpause() {\n this.emit('offline');\n }\n onbeforeresume() {\n this.emit('online');\n }\n onreconnect() {\n this.emit('reconnect');\n }\n ondisconnected(event, from, to, attempt = 0) {\n const delay = DEFAULT_RETRY_STRATEGY.call(null, attempt);\n debug(`schedule attempt=${attempt} delay=${delay}`);\n this.emit('schedule', attempt, delay);\n if (this.__scheduledRetry) {\n clearTimeout(this.__scheduledRetry);\n }\n this.__scheduledRetry = setTimeout(() => {\n if (this.is('disconnected')) {\n this.retry(attempt);\n }\n }, delay);\n }\n onretry(event, from, to, attempt = 0) {\n this.emit('retry', attempt);\n this._createWs(this._getUrls, this._protocol).then(\n () => (this.can('reconnect') ? this.reconnect() : this._destroyWs()),\n () => this.can('fail') && this.fail(attempt + 1)\n );\n }\n onerror(event, from, to, error) {\n this.emit('error', error);\n }\n onclose() {\n if (global.removeEventListener) {\n if (this.__pause) global.removeEventListener('offline', this.__pause);\n if (this.__resume) global.removeEventListener('online', this.__resume);\n }\n }\n\n // jsdoc-ignore-start\n @requireConnected\n // jsdoc-ignore-end\n _ping() {\n debug('ping');\n try {\n this.ping();\n } catch (error) {\n console.warn(`websocket ping error: ${error.message}`);\n }\n }\n ping() {\n if (this._ws.ping) {\n this._ws.ping();\n } else {\n console.warn(`The WebSocket implement does not support sending ping frame.\n Override ping method to use application defined ping/pong mechanism.`);\n }\n }\n\n _postponeTimeoutTimer() {\n debug('_postponeTimeoutTimer');\n this._clearTimeoutTimers();\n this._timeoutTimer = setTimeout(() => {\n debug('timeout');\n this.disconnect();\n }, TIMEOUT_TIME);\n }\n _clearTimeoutTimers() {\n if (this._timeoutTimer) {\n clearTimeout(this._timeoutTimer);\n }\n }\n _startConnectionKeeper() {\n debug('start connection keeper');\n this._heartbeatTimer = setInterval(this._ping.bind(this), HEARTBEAT_TIME);\n const addListener = this._ws.addListener || this._ws.addEventListener;\n addListener.call(this._ws, 'message', this.__postponeTimeoutTimer);\n addListener.call(this._ws, 'pong', this.__postponeTimeoutTimer);\n this._postponeTimeoutTimer();\n }\n _stopConnectionKeeper() {\n debug('stop connection keeper');\n // websockets/ws#489\n const removeListener = this._ws.removeListener || this._ws.removeEventListener;\n removeListener.call(this._ws, 'message', this.__postponeTimeoutTimer);\n removeListener.call(this._ws, 'pong', this.__postponeTimeoutTimer);\n this._clearTimeoutTimers();\n if (this._heartbeatTimer) {\n clearInterval(this._heartbeatTimer);\n }\n }\n\n _handleClose(event) {\n debug(`ws closed [${event.code}] ${event.reason}`);\n // socket closed manually, ignore close event.\n if (this.isFinished()) return;\n this.handleClose(event);\n }\n handleClose() {\n // reconnect\n this.disconnect();\n }\n\n // jsdoc-ignore-start\n @requireConnected\n // jsdoc-ignore-end\n send(data) {\n debug('send', data);\n this._ws.send(data);\n }\n\n _handleMessage(event) {\n debug('message', event.data);\n this.handleMessage(event.data);\n }\n handleMessage(message) {\n this.emit('message', message);\n }\n}\n\nStateMachine.create({\n target: WebSocketPlus.prototype,\n initial: {\n state: 'initialized',\n event: 'init',\n defer: true,\n },\n terminal: 'closed',\n events: [{\n name: 'open',\n from: 'initialized',\n to: 'connected',\n }, {\n name: 'disconnect',\n from: 'connected',\n to: 'disconnected',\n }, {\n name: 'retry',\n from: 'disconnected',\n to: 'reconnecting',\n }, {\n name: 'fail',\n from: 'reconnecting',\n to: 'disconnected',\n }, {\n name: 'reconnect',\n from: 'reconnecting',\n to: 'connected',\n }, {\n name: 'pause',\n from: ['connected', 'disconnected', 'reconnecting'],\n to: 'offline',\n }, {\n }, {\n name: 'resume',\n from: 'offline',\n to: 'disconnected',\n }, {\n name: 'close',\n from: ['connected', 'disconnected', 'reconnecting', 'offline'],\n to: 'closed',\n }, {\n name: 'throw',\n from: '*',\n to: 'error',\n }],\n});\n\nexport default WebSocketPlus;\n","export const error = Object.freeze({\n 1000: {\n name: 'CLOSE_NORMAL',\n },\n 1006: {\n name: 'CLOSE_ABNORMAL',\n },\n 4100: {\n name: 'APP_NOT_AVAILABLE',\n message: 'App not exists or realtime message service is disabled.',\n },\n 4103: {\n name: 'INVALID_LOGIN',\n message: 'Malformed clientId.',\n },\n 4105: {\n name: 'SESSION_REQUIRED',\n message: 'Message sent before session opened. ',\n },\n 4107: {\n name: 'READ_TIMEOUT',\n },\n 4108: {\n name: 'LOGIN_TIMEOUT',\n },\n 4109: {\n name: 'FRAME_TOO_LONG',\n },\n 4110: {\n name: 'INVALID_ORIGIN',\n message: 'Access denied by domain whitelist.',\n },\n 4111: {\n name: 'SESSION_CONFLICT',\n },\n 4112: {\n name: 'SESSION_TOKEN_EXPIRED',\n },\n 4200: {\n name: 'INTERNAL_ERROR',\n message: 'Internal error, please contact LeanCloud for support.',\n },\n 4201: {\n name: 'SEND_MESSAGE_TIMEOUT',\n },\n 4302: {\n name: 'CONVERSATION_SIGNATURE_FAILED',\n },\n 4303: {\n name: 'CONVERSATION_NOT_FOUND',\n },\n 4304: {\n name: 'CONVERSATION_FULL',\n },\n 4305: {\n name: 'CONVERSATION_REJECTED_BY_APP',\n },\n 4306: {\n name: 'CONVERSATION_UPDATE_FAILED',\n },\n 4307: {\n name: 'CONVERSATION_READ_ONLY',\n },\n 4308: {\n name: 'CONVERSATION_NOT_ALLOWED',\n },\n 4401: {\n name: 'INVALID_MESSAGING_TARGET',\n },\n 4402: {\n name: 'MESSAGE_REJECTED_BY_APP',\n },\n});\n\nexport const ErrorCode = Object.freeze(\n Object.keys(error).reduce((result, code) => Object.assign(result, {\n [error[code].name]: Number(code),\n }), {})\n);\n\nexport const createError = (errorMessage) => {\n const {\n code, reason, appCode, detail,\n } = errorMessage;\n let message = reason || detail;\n if (!message && error[code]) {\n message = error[code].message || error[code].name;\n }\n if (!message) {\n message = `Unknow Error: ${code}`;\n }\n const err = new Error(message);\n return Object.assign(err, {\n code, appCode, detail,\n });\n};\n","import d from 'debug';\nimport WebSocketPlus from './websocket-plus';\nimport { createError } from './error';\nimport { GenericCommand, CommandType } from '../proto/message';\nimport { trim, isWeapp } from './utils';\n\nconst debug = d('LC:Connection');\n\nconst COMMAND_TIMEOUT = 20000;\n\nexport default class Connection extends WebSocketPlus {\n constructor(getUrl, { format, version }) {\n debug('initializing Connection');\n const protocolString = `lc.${format}.${version}`;\n if (!isWeapp) {\n super(getUrl, protocolString);\n } else {\n super(getUrl().then(urls => urls.map(url =>\n `${url}${url.indexOf('?') === -1 ? '?' : '&'}subprotocol=${encodeURIComponent(protocolString)}`\n )));\n }\n this._protocalFormat = format;\n this._commands = {};\n this._serialId = 0;\n }\n\n send(command, waitingForRespond = true) {\n let serialId;\n if (waitingForRespond) {\n this._serialId += 1;\n serialId = this._serialId;\n command.i = serialId; // eslint-disable-line no-param-reassign\n }\n debug('↑ %O sent', trim(command));\n\n let message;\n if (this._protocalFormat === 'proto2base64') {\n message = command.toBase64();\n } else if (command.toArrayBuffer) {\n message = command.toArrayBuffer();\n }\n if (!message) {\n throw new TypeError(`${command} is not a GenericCommand`);\n }\n\n super.send(message);\n\n if (!waitingForRespond) {\n return Promise.resolve();\n }\n return new Promise((resolve, reject) => {\n this._commands[serialId] = {\n resolve,\n reject,\n };\n setTimeout(\n () => {\n if (this._commands[serialId]) {\n debug('✗ %O timeout', trim(command));\n reject(new Error('Command Timeout.'));\n delete this._commands[serialId];\n }\n },\n COMMAND_TIMEOUT\n );\n });\n }\n\n handleMessage(msg) {\n let message;\n try {\n message = GenericCommand.decode(msg);\n debug('↓ %O received', trim(message));\n } catch (e) {\n console.warn('Decode message failed', msg);\n }\n this.emit('allmessage', message);\n const serialId = message.i;\n if (serialId) {\n if (this._commands[serialId]) {\n if (message.cmd === CommandType.error) {\n this\n ._commands[serialId]\n .reject(createError(message.errorMessage));\n } else {\n this\n ._commands[serialId]\n .resolve(message);\n }\n delete this._commands[serialId];\n } else {\n console.warn(`Unexpected command received with serialId [${serialId}],\n which have timed out or never been requested.`);\n }\n } else if (message.cmd === CommandType.error) {\n this.emit('error', createError(message.errorMessage));\n } else {\n this.emit('message', message);\n }\n }\n\n ping() {\n return this.send(new GenericCommand({\n cmd: CommandType.echo,\n })).catch(error => debug('ping failed:', error));\n }\n}\n","/* eslint-disable max-len */\n\n/**\n * 插件接口\n *\n *

\n * 插件是由一个或多个扩展点组成的字典。SDK 的扩展点可以分为两类:\n *

\n * 第一类扩展点是类实例化之后的回调,包括 RealtimeIMClientConversation。这些扩展点可以通过一个同步的 Decorator 进行扩展。Decorator 接受一个对应的实例并对其进行一些操作。\n * 特别的,由于注册自定义消息类这个需求特别的常用,额外定义一个 messageClasses 扩展点来做这件事情。\n *

\n * 第二类扩展点是在某些事件处理前、后可以注入逻辑的点。\n * 其中 beforeMessageParseafterMessageParse 可以通过一个异步的 Middleware 进行扩展。Middleware 接受一个对象,返回一个同类型对象或同类型对象的 Promise。\n * beforeMessageDispatch 可以通过返回一个 boolean 类型的 shouldDispatch 值来控制是否要继续派发收到的消息。\n *

\n * 如果使用了多个插件,这些 hook 会按照插件数组的顺序依次执行。前一个 Middleware 的返回值会作为参数传给后一个 Middleware。\n *\n * @interface Plugin\n * @since 3.1.0\n */\n\n/* eslint-enable max-len */\n\n/**\n * 插件名称,用于在日志中显示异常的插件\n *\n * @name Plugin.name\n * @type string\n */\n\n/**\n * 插件注册的消息类型\n *\n * @name Plugin.messageClasses\n * @type AVMessage[]\n */\n\n/**\n * 在 Realtime 实例化后对其进行修饰。\n *

\n * 接受一个参数为 Realtime 实例。\n *\n * @name Plugin.onRealtimeCreate\n * @type Function\n */\n\n/**\n * 在 IMClient 实例化后对其进行修饰。\n *

\n * 接受一个参数为 IMClient 实例。\n *\n * @name Plugin.onIMClientCreate\n * @type Function\n */\n\n/**\n * 在 Conversation 实例化后对其进行修饰。\n *

\n * 接受一个参数为 Conversation 实例。\n * 需要注意的是,该扩展点并不是在 {@link IMClient#createConversation} 方法创建成功后调用的 hook,\n * 而是所有的 Conversation 实例化的时候(包括但不限于 query 时)调用的 hook。\n *\n * @name Plugin.onConversationCreate\n * @type Function\n */\n\n/**\n * 在对消息进行 parse 之前,对原始消息进行修改。\n *

\n * 接受一个参数为原始消息,是某个消息 JSON 化(message.toJSON())的返回值,一般是一个 JSON 对象。\n * 该方法需要返回一个 JSON 对象。如果这个结果是异步得到的,也可以返回一个 Promise(fulfilled with a JSON)。\n *\n * @name Plugin.beforeMessageParse\n * @type Function\n */\n\n/**\n * 在对消息进行 parse 之后,对消息实例进行修改。\n *

\n * 接受一个参数为消息实例,一般是一个已注册的 Message 类或其子类的实例。\n * 该方法需要返回一个同类型的消息实例。如果这个结果是异步得到的,也可以返回一个 Promise。\n *\n * @name Plugin.afterMessageParse\n * @type Function\n */\n\n/**\n * 在收到消息之后,派发消息之前,控制是否派发这条消息。\n *

\n * 接受参数为 message 与 conversation。\n * 该方法需要返回 boolean 类型的值,如果返回 false 则 SDK 不再派发这条消息,后续的 beforeMessageDispatch 也不会执行。\n * 如果这个结果是异步得到的,也可以返回一个 Promise。\n *\n * @name Plugin.beforeMessageDispatch\n * @type Function\n * @since 3.4.0\n */\n\nimport { ensureArray, tap } from './utils';\n\nconst checkType = middleware => (param) => {\n const { constructor } = param;\n return Promise.resolve(param).then(middleware).then(tap((result) => {\n if (result === undefined || result === null) {\n // eslint-disable-next-line max-len\n return console.warn(`Middleware[${middleware._pluginName || 'anonymous plugin'}:${middleware.name || 'anonymous middleware'}] param/return types not match. It returns ${result} while a ${param.constructor.name} expected.`);\n }\n if (!(result instanceof constructor)) {\n // eslint-disable-next-line max-len\n return console.warn(`Middleware[${middleware._pluginName || 'anonymous plugin'}:${middleware.name || 'anonymous middleware'}] param/return types not match. It returns a ${result.constructor.name} while a ${param.constructor.name} expected.`);\n }\n return 0;\n }));\n};\n\nexport const applyDecorators = (decorators, target) => {\n if (decorators) {\n decorators.forEach((decorator) => {\n try {\n decorator(target);\n } catch (error) {\n if (decorator._pluginName) {\n error.message += `[${decorator._pluginName}]`;\n }\n throw error;\n }\n });\n }\n};\n\nexport const applyMiddlewares = middlewares => target =>\n ensureArray(middlewares).reduce(\n (previousPromise, middleware) => previousPromise\n .then(checkType(middleware))\n .catch((error) => {\n if (middleware._pluginName) {\n // eslint-disable-next-line no-param-reassign\n error.message += `[${middleware._pluginName}]`;\n }\n throw error;\n }),\n Promise.resolve(target)\n );\n\nexport const applyDispatcher = (dispatchers, payload) =>\n ensureArray(dispatchers).reduce(\n (resultPromise, dispatcher) => resultPromise.then(shouldDispatch =>\n (shouldDispatch === false ? false : dispatcher(...payload))\n ).catch((error) => {\n if (dispatcher._pluginName) {\n // eslint-disable-next-line no-param-reassign\n error.message += `[${dispatcher._pluginName}]`;\n }\n throw error;\n }), Promise.resolve(true)\n );\n","import d from 'debug';\nimport EventEmitter from 'eventemitter3';\nimport axios from 'axios';\nimport Connection from './connection';\nimport { ErrorCode, createError } from './error';\nimport { tap, Cache, trim, internal, ensureArray, isWeapp } from './utils';\nimport { applyDecorators, applyDispatcher } from './plugin';\n\nconst debug = d('LC:Realtime');\n\nconst pushRouterCache = new Cache('push-router');\n\nexport default class Realtime extends EventEmitter {\n /**\n * @extends EventEmitter\n * @param {Object} options\n * @param {String} options.appId\n * @param {String} [options.region='cn'] 节点 id\n * @param {Boolean} [options.pushOfflineMessages=false] 启用推送离线消息模式(默认为发送未读消息通知模式)\n * @param {Boolean} [options.noBinary=false] 设置 WebSocket 使用字符串格式收发消息(默认为二进制格式)。\n * 适用于 WebSocket 实现不支持二进制数据格式的情况(如 React Native)\n * @param {Boolean} [options.ssl=true] 使用 wss 进行连接\n * @param {Plugin[]} [options.plugins] 加载插件(since 3.1.0)\n */\n constructor(options) {\n debug('initializing Realtime');\n super();\n if (typeof options.appId !== 'string') {\n throw new TypeError(`appId [${options.appId}] is not a string`);\n }\n this._options = Object.assign({\n appId: undefined,\n region: 'cn',\n pushOfflineMessages: false,\n noBinary: isWeapp,\n ssl: true,\n server: process.env.SERVER,\n }, options);\n this._cache = new Cache('endpoints');\n internal(this).clients = new Set();\n this._plugins = [\n ...ensureArray(Realtime.__preRegisteredPlugins),\n ...ensureArray(options.plugins),\n ].reduce(\n (result, plugin) => {\n // eslint-disable-next-line no-restricted-syntax\n for (const hook in plugin) {\n if ({}.hasOwnProperty.call(plugin, hook) && hook !== 'name') {\n if (plugin.name) {\n ensureArray(plugin[hook]).forEach((value) => {\n // eslint-disable-next-line no-param-reassign\n value._pluginName = plugin.name;\n });\n }\n // eslint-disable-next-line no-param-reassign\n result[hook] = ensureArray(result[hook]).concat(plugin[hook]);\n }\n }\n return result;\n },\n {}\n );\n // onRealtimeCreate hook\n applyDecorators(this._plugins.onRealtimeCreate, this);\n }\n\n _open() {\n if (this._openPromise) return this._openPromise;\n\n let format = 'protobuf2';\n if (this._options.noBinary) {\n // 不发送 binary data,fallback to base64 string\n format = 'proto2base64';\n }\n let version = 3;\n if (this._options.pushOfflineMessages) {\n // 不推送离线消息,而是发送对话的未读通知\n version = 1;\n }\n const protocol = {\n format,\n version,\n };\n this._openPromise = new Promise((resolve, reject) => {\n debug('No connection established, create a new one.');\n const connection = new Connection(\n () => this._getEndpoints(this._options),\n protocol\n );\n connection.on('open', () => resolve(connection));\n connection.on('error', reject);\n connection.on('message', this._dispatchCommand.bind(this));\n /**\n * 连接断开。\n * 连接断开可能是因为 SDK 进入了离线状态(see {@link Realtime#event:offline}),或长时间没有收到服务器心跳。\n * 连接断开后所有的网络操作都会失败,请在连接断开后禁用相关的 UI 元素。\n * @event Realtime#disconnect\n */\n /**\n * 计划在一段时间后尝试重新连接\n * @event Realtime#schedule\n * @param {Number} attempt 尝试重连的次数\n * @param {Number} delay 延迟的毫秒数\n */\n /**\n * 正在尝试重新连接\n * @event Realtime#retry\n * @param {Number} attempt 尝试重连的次数\n */\n /**\n * 连接恢复正常。\n * 请重新启用在 {@link Realtime#event:disconnect} 事件中禁用的相关 UI 元素\n * @event Realtime#reconnect\n */\n\n /**\n * 客户端连接断开\n * @event IMClient#disconnect\n * @see Realtime#event:disconnect\n * @since 3.2.0\n */\n /**\n * 计划在一段时间后尝试重新连接\n * @event IMClient#schedule\n * @param {Number} attempt 尝试重连的次数\n * @param {Number} delay 延迟的毫秒数\n * @since 3.2.0\n */\n /**\n * 正在尝试重新连接\n * @event IMClient#retry\n * @param {Number} attempt 尝试重连的次数\n * @since 3.2.0\n */\n\n /**\n * 客户端进入离线状态。\n * 这通常意味着网络已断开,或者 {@link Realtime#pause} 被调用\n * @event Realtime#offline\n * @since 3.4.0\n */\n /**\n * 客户端恢复在线状态\n * 这通常意味着网络已恢复,或者 {@link Realtime#resume} 被调用\n * @event Realtime#online\n * @since 3.4.0\n */\n /**\n * 进入离线状态。\n * 这通常意味着网络已断开,或者 {@link Realtime#pause} 被调用\n * @event IMClient#offline\n * @since 3.4.0\n */\n /**\n * 恢复在线状态\n * 这通常意味着网络已恢复,或者 {@link Realtime#resume} 被调用\n * @event IMClient#online\n * @since 3.4.0\n */\n\n // event proxy\n ['disconnect', 'reconnect', 'retry', 'schedule', 'offline', 'online'].forEach(\n event => connection.on(event, (...payload) => {\n debug(`${event} event emitted. %O`, payload);\n this.emit(event, ...payload);\n if (event !== 'reconnect') {\n internal(this).clients.forEach((client) => {\n client.emit(event, ...payload);\n });\n }\n })\n );\n // override handleClose\n connection.handleClose = function handleClose(event) {\n const isFatal = [\n ErrorCode.APP_NOT_AVAILABLE,\n ErrorCode.INVALID_LOGIN,\n ErrorCode.INVALID_ORIGIN,\n ].some(errorCode => errorCode === event.code);\n if (isFatal) {\n // in these cases, SDK should throw.\n this.throw(createError(event));\n } else {\n // reconnect\n this.disconnect();\n }\n };\n internal(this).connection = connection;\n }).catch((error) => {\n delete this._openPromise;\n throw error;\n });\n\n return this._openPromise;\n }\n\n _getEndpoints(options) {\n return Promise.resolve(\n this._cache.get('endpoints') ||\n this\n .constructor\n ._fetchEndpointsInfo(options)\n .then(\n tap(info => this._cache.set('endpoints', info, info.ttl * 1000))\n )\n ).then((info) => {\n debug('endpoint info: %O', info);\n return [info.server, info.secondary];\n });\n }\n\n static _fetchPushRouter({ appId, region }) {\n debug('fetch router');\n switch (region) {\n case 'cn': {\n const cachedPushRouter = pushRouterCache.get(appId);\n if (cachedPushRouter) {\n return Promise.resolve(cachedPushRouter);\n }\n return axios\n .get('https://app-router.leancloud.cn/1/route', {\n params: {\n appId,\n },\n timeout: 20000,\n })\n .then(\n res => res.data\n )\n .then(tap(debug))\n .then(\n (route) => {\n const pushRouter = route.push_router_server;\n if (!pushRouter) {\n throw new Error('push router not exists');\n }\n let ttl = route.ttl;\n if (typeof ttl !== 'number') {\n ttl = 3600;\n }\n pushRouterCache.set(appId, pushRouter, ttl * 1000);\n return pushRouter;\n }\n )\n .catch(() => 'router-g0-push.leancloud.cn');\n }\n case 'us':\n return Promise.resolve('router-a0-push.leancloud.cn');\n default:\n throw new Error(`Region [${region}] is not supported.`);\n }\n }\n\n static _fetchEndpointsInfo({ appId, region, ssl, server }) {\n debug('fetch endpoint info');\n return this._fetchPushRouter({ appId, region })\n .then(tap(debug))\n .then(router =>\n axios.get(`https://${router}/v1/route`, {\n params: {\n appId,\n secure: ssl,\n features: isWeapp ? 'wechat' : undefined,\n server,\n _t: Date.now(),\n },\n timeout: 20000,\n }).then(\n res => res.data\n ).then(tap(debug))\n );\n }\n\n _close() {\n if (this._openPromise) {\n this._openPromise.then(connection => connection.close());\n }\n delete this._openPromise;\n }\n\n /**\n * 手动进行重连。\n * SDK 在网络出现异常时会自动按照一定的时间间隔尝试重连,调用该方法会立即尝试重连并重置重连尝试计数器。\n * 只能在 `schedule` 事件之后,`retry` 事件之前调用,如果当前网络正常或者正在进行重连,调用该方法会抛异常。\n */\n retry() {\n const connection = internal(this).connection;\n if (!connection) {\n throw new Error('no connection established');\n }\n if (connection.cannot('retry')) {\n throw new Error(\n `retrying not allowed when not disconnected. the connection is now ${connection.current}`\n );\n }\n return connection.retry();\n }\n /**\n * 暂停,使 SDK 进入离线状态。\n * 你可以在网络断开、应用进入后台等时刻调用该方法让 SDK 进入离线状态,离线状态下不会尝试重连。\n * 在浏览器中 SDK 会自动监听网络变化,因此无需手动调用该方法。\n *\n * @since 3.4.0\n * @see Realtime#event:offline\n */\n pause() {\n // 这个方法常常在网络断开、进入后台时被调用,此时 connection 可能没有建立或者已经 close。\n // 因此不像 retry,这个方法应该尽可能 loose\n const connection = internal(this).connection;\n if (!connection) return;\n if (connection.can('pause')) connection.pause();\n }\n /**\n * 恢复在线状态。\n * 你可以在网络恢复、应用回到前台等时刻调用该方法让 SDK 恢复在线状态,恢复在线状态后 SDK 会开始尝试重连。\n *\n * @since 3.4.0\n * @see Realtime#event:online\n */\n resume() {\n // 与 pause 一样,这个方法应该尽可能 loose\n const connection = internal(this).connection;\n if (!connection) return;\n if (connection.can('resume')) connection.resume();\n }\n\n _register(client) {\n internal(this).clients.add(client);\n }\n\n _deregister(client) {\n internal(this).clients.delete(client);\n if (internal(this).clients.size === 0) {\n this._close();\n }\n }\n\n _dispatchCommand(command) {\n return applyDispatcher(this._plugins.beforeCommandDispatch, [command, this])\n .then((shouldDispatch) => {\n // no plugin handled this command\n if (shouldDispatch) return debug('[WARN] Unexpected message received: %O', trim(command));\n return false;\n });\n }\n}\n"],"names":["module","require","newBuilder","build","messages","push_server","messages2","JsonObjectMessage","UnreadTuple","LogItem","DataCommand","SessionCommand","ErrorCommand","DirectCommand","AckCommand","UnreadCommand","ConvCommand","RoomCommand","LogsCommand","RcpCommand","ReadTuple","MaxReadTuple","ReadCommand","PresenceCommand","ReportCommand","GenericCommand","PatchCommand","PatchItem","CommandType","OpType","StatusType","global","window","EXPIRED","debug","d","Expirable","value","ttl","_value","expiredAt","Date","now","expired","Cache","name","_map","get","key","cache","set","tryAll","promiseConstructors","promise","length","catch","slice","tap","interceptor","isIE10","navigator","userAgent","indexOf","map","internal","object","has","removeNull","obj","isPlainObject","prop","hasOwnProperty","call","trim","JSON","parse","message","ensureArray","target","Array","isArray","undefined","isWeapp","wx","connectSocket","HEARTBEAT_TIME","TIMEOUT_TIME","DEFAULT_RETRY_STRATEGY","Math","min","pow","attempt","requireConnected","descriptor","requireConnectedWrapper","is","currentState","current","warn","Error","args","WebSocketPlus","getUrls","protocol","WebSocket","_getUrls","resolve","_protocol","init","_createWs","then","__postponeTimeoutTimer","_postponeTimeoutTimer","bind","addEventListener","__pause","pause","__resume","resume","open","throw","wsUrls","urls","reject","url","ws","binaryType","onopen","onerror","onclose","error","_ws","_handleClose","onmessage","_handleMessage","_destroyWs","close","onbeforeevent","event","from","to","payload","emit","onconnected","_startConnectionKeeper","onleaveconnected","_stopConnectionKeeper","onpause","onbeforeresume","onreconnect","ondisconnected","delay","__scheduledRetry","setTimeout","retry","onretry","can","reconnect","fail","removeEventListener","_ping","ping","_clearTimeoutTimers","_timeoutTimer","disconnect","_heartbeatTimer","setInterval","addListener","removeListener","code","reason","isFinished","handleClose","send","data","handleMessage","EventEmitter","StateMachine","create","prototype","ErrorCode","reduce","result","Number","createError","errorMessage","appCode","detail","err","COMMAND_TIMEOUT","Connection","getUrl","format","version","protocolString","encodeURIComponent","_protocalFormat","_commands","_serialId","command","waitingForRespond","serialId","i","toBase64","toArrayBuffer","TypeError","msg","decode","e","cmd","echo","applyDecorators","decorators","forEach","decorator","_pluginName","applyDispatcher","dispatchers","resultPromise","dispatcher","shouldDispatch","pushRouterCache","Realtime","options","appId","_options","process","env","SERVER","_cache","clients","_plugins","__preRegisteredPlugins","plugins","plugin","hook","concat","onRealtimeCreate","_open","_openPromise","noBinary","pushOfflineMessages","connection","_getEndpoints","on","_dispatchCommand","client","isFatal","APP_NOT_AVAILABLE","INVALID_LOGIN","INVALID_ORIGIN","some","errorCode","constructor","_fetchEndpointsInfo","info","server","secondary","_fetchPushRouter","region","cachedPushRouter","axios","res","route","pushRouter","push_router_server","ssl","router","_close","cannot","_register","add","_deregister","delete","size","beforeCommandDispatch"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAAA,mBAAA,GAAiBC,cAA0CC,UAA1C,CAAqD,EAArD,EAAyD,QAAzD,EAAmE;eACrE,uBADqE;cAEtE,QAFsE;eAGrE;6BACc;KAJuD;gBAMpE,CACR;gBACY,mBADZ;kBAEc,QAFd;kBAGc,CACN;oBACY,UADZ;oBAEY,QAFZ;oBAGY,MAHZ;kBAIU;SALJ;KAJN,EAaR;gBACY,aADZ;kBAEc,QAFd;kBAGc,CACN;oBACY,UADZ;oBAEY,QAFZ;oBAGY,KAHZ;kBAIU;SALJ,EAON;oBACY,UADZ;oBAEY,OAFZ;oBAGY,QAHZ;kBAIU;SAXJ,EAaN;oBACY,UADZ;oBAEY,QAFZ;oBAGY,KAHZ;kBAIU;SAjBJ,EAmBN;oBACY,UADZ;oBAEY,OAFZ;oBAGY,WAHZ;kBAIU;SAvBJ,EAyBN;oBACY,UADZ;oBAEY,QAFZ;oBAGY,MAHZ;kBAIU;SA7BJ,EA+BN;oBACY,UADZ;oBAEY,QAFZ;oBAGY,MAHZ;kBAIU;SAnCJ,EAqCN;oBACY,UADZ;oBAEY,OAFZ;oBAGY,gBAHZ;kBAIU;SAzCJ;KAhBN,EA6DR;gBACY,SADZ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T,IAAT,EAAehB,OAAf,CAAuB2C,MAAvB,CAA8B3B,MAA9B;QACItL,SAAS,IAAT,EAAesK,OAAf,CAAuB4C,IAAvB,KAAgC,CAApC,EAAuC;WAChCN,MAAL;;;;qBAIJvB,6CAAiB9C,SAAS;WACjBiB,gBAAgB,KAAKe,QAAL,CAAc4C,qBAA9B,EAAqD,CAAC5E,OAAD,EAAU,IAAV,CAArD,EACJzF,IADI,CACC,UAAC8G,cAAD,EAAoB;;UAEpBA,cAAJ,EAAoB,OAAO1L,MAAM,wCAAN,EAAgDuC,KAAK8H,OAAL,CAAhD,CAAP;aACb,KAAP;KAJG,CAAP;;;;EAtUkCvB;;;;;;"} \ No newline at end of file diff --git a/dist/realtime-core.weapp.js b/dist/realtime-core.weapp.js new file mode 100644 index 000000000..8cf2cba96 --- /dev/null +++ b/dist/realtime-core.weapp.js @@ -0,0 +1,17820 @@ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define('leancloud-realtime', ['exports'], factory) : + (factory((global.AV = global.AV || {}))); +}(this, (function (exports) { 'use strict'; + + var define = undefined; + var require = require || function(id) {throw new Error('Unexpected required ' + id)}; + + + + var process = (window && window.process) || {}; + process.env = process.env || {}; + + var commonjsGlobal = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; + + function commonjsRequire () { + throw new Error('Dynamic requires are not currently supported by rollup-plugin-commonjs'); + } + + function unwrapExports (x) { + return x && x.__esModule ? x['default'] : x; + } + + function createCommonjsModule(fn, module) { + return module = { exports: {} }, fn(module, module.exports), module.exports; + } + + // 7.1.4 ToInteger + var ceil = Math.ceil; + var floor = Math.floor; + var _toInteger = function (it) { + return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); + }; + + // 7.2.1 RequireObjectCoercible(argument) + var _defined = function (it) { + if (it == undefined) throw TypeError("Can't call method on " + it); + return it; + }; + + // true -> String#at + // false -> String#codePointAt + var _stringAt = function (TO_STRING) { + return function (that, pos) { + var s = String(_defined(that)); + var i = _toInteger(pos); + var l = s.length; + var a, b; + if (i < 0 || i >= l) return TO_STRING ? '' : undefined; + a = s.charCodeAt(i); + return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff + ? TO_STRING ? s.charAt(i) : a + : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; + }; + }; + + var _library = true; + + var _global = createCommonjsModule(function (module) { + // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 + var global = module.exports = typeof window != 'undefined' && window.Math == Math + ? window : typeof self != 'undefined' && self.Math == Math ? self + // eslint-disable-next-line no-new-func + : Function('return this')(); + if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef + }); + + var _core = createCommonjsModule(function (module) { + var core = module.exports = { version: '2.5.1' }; + if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef + }); + + var _aFunction = function (it) { + if (typeof it != 'function') throw TypeError(it + ' is not a function!'); + return it; + }; + + // optional / simple context binding + + var _ctx = function (fn, that, length) { + _aFunction(fn); + if (that === undefined) return fn; + switch (length) { + case 1: return function (a) { + return fn.call(that, a); + }; + case 2: return function (a, b) { + return fn.call(that, a, b); + }; + case 3: return function (a, b, c) { + return fn.call(that, a, b, c); + }; + } + return function (/* ...args */) { + return fn.apply(that, arguments); + }; + }; + + var _isObject = function (it) { + return typeof it === 'object' ? it !== null : typeof it === 'function'; + }; + + var _anObject = function (it) { + if (!_isObject(it)) throw TypeError(it + ' is not an object!'); + return it; + }; + + var _fails = function (exec) { + try { + return !!exec(); + } catch (e) { + return true; + } + }; + + // Thank's IE8 for his funny defineProperty + var _descriptors = !_fails(function () { + return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; + }); + + var document$1 = _global.document; + // typeof document.createElement is 'object' in old IE + var is = _isObject(document$1) && _isObject(document$1.createElement); + var _domCreate = function (it) { + return is ? document$1.createElement(it) : {}; + }; + + var _ie8DomDefine = !_descriptors && !_fails(function () { + return Object.defineProperty(_domCreate('div'), 'a', { get: function () { return 7; } }).a != 7; + }); + + // 7.1.1 ToPrimitive(input [, PreferredType]) + + // instead of the ES6 spec version, we didn't implement @@toPrimitive case + // and the second argument - flag - preferred type is a string + var _toPrimitive = function (it, S) { + if (!_isObject(it)) return it; + var fn, val; + if (S && typeof (fn = it.toString) == 'function' && !_isObject(val = fn.call(it))) return val; + if (typeof (fn = it.valueOf) == 'function' && !_isObject(val = fn.call(it))) return val; + if (!S && typeof (fn = it.toString) == 'function' && !_isObject(val = fn.call(it))) return val; + throw TypeError("Can't convert object to primitive value"); + }; + + var dP = Object.defineProperty; + + var f = _descriptors ? Object.defineProperty : function defineProperty(O, P, Attributes) { + _anObject(O); + P = _toPrimitive(P, true); + _anObject(Attributes); + if (_ie8DomDefine) try { + return dP(O, P, Attributes); + } catch (e) { /* empty */ } + if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); + if ('value' in Attributes) O[P] = Attributes.value; + return O; + }; + + var _objectDp = { + f: f + }; + + var _propertyDesc = function (bitmap, value) { + return { + enumerable: !(bitmap & 1), + configurable: !(bitmap & 2), + writable: !(bitmap & 4), + value: value + }; + }; + + var _hide = _descriptors ? function (object, key, value) { + return _objectDp.f(object, key, _propertyDesc(1, value)); + } : function (object, key, value) { + object[key] = value; + return object; + }; + + var PROTOTYPE = 'prototype'; + + var $export = function (type, name, source) { + var IS_FORCED = type & $export.F; + var IS_GLOBAL = type & $export.G; + var IS_STATIC = type & $export.S; + var IS_PROTO = type & $export.P; + var IS_BIND = type & $export.B; + var IS_WRAP = type & $export.W; + var exports = IS_GLOBAL ? _core : _core[name] || (_core[name] = {}); + var expProto = exports[PROTOTYPE]; + var target = IS_GLOBAL ? _global : IS_STATIC ? _global[name] : (_global[name] || {})[PROTOTYPE]; + var key, own, out; + if (IS_GLOBAL) source = name; + for (key in source) { + // contains in native + own = !IS_FORCED && target && target[key] !== undefined; + if (own && key in exports) continue; + // export native or passed + out = own ? target[key] : source[key]; + // prevent global pollution for namespaces + exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] + // bind timers to global for call from export context + : IS_BIND && own ? _ctx(out, _global) + // wrap global constructors for prevent change them in library + : IS_WRAP && target[key] == out ? (function (C) { + var F = function (a, b, c) { + if (this instanceof C) { + switch (arguments.length) { + case 0: return new C(); + case 1: return new C(a); + case 2: return new C(a, b); + } return new C(a, b, c); + } return C.apply(this, arguments); + }; + F[PROTOTYPE] = C[PROTOTYPE]; + return F; + // make static versions for prototype methods + })(out) : IS_PROTO && typeof out == 'function' ? _ctx(Function.call, out) : out; + // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% + if (IS_PROTO) { + (exports.virtual || (exports.virtual = {}))[key] = out; + // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% + if (type & $export.R && expProto && !expProto[key]) _hide(expProto, key, out); + } + } + }; + // type bitmap + $export.F = 1; // forced + $export.G = 2; // global + $export.S = 4; // static + $export.P = 8; // proto + $export.B = 16; // bind + $export.W = 32; // wrap + $export.U = 64; // safe + $export.R = 128; // real proto method for `library` + var _export = $export; + + var _redefine = _hide; + + var hasOwnProperty = {}.hasOwnProperty; + var _has = function (it, key) { + return hasOwnProperty.call(it, key); + }; + + var _iterators = {}; + + var toString = {}.toString; + + var _cof = function (it) { + return toString.call(it).slice(8, -1); + }; + + // fallback for non-array-like ES3 and non-enumerable old V8 strings + + // eslint-disable-next-line no-prototype-builtins + var _iobject = Object('z').propertyIsEnumerable(0) ? Object : function (it) { + return _cof(it) == 'String' ? it.split('') : Object(it); + }; + + // to indexed object, toObject with fallback for non-array-like ES3 strings + + + var _toIobject = function (it) { + return _iobject(_defined(it)); + }; + + // 7.1.15 ToLength + + var min = Math.min; + var _toLength = function (it) { + return it > 0 ? min(_toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 + }; + + var max = Math.max; + var min$1 = Math.min; + var _toAbsoluteIndex = function (index, length) { + index = _toInteger(index); + return index < 0 ? max(index + length, 0) : min$1(index, length); + }; + + // false -> Array#indexOf + // true -> Array#includes + + + + var _arrayIncludes = function (IS_INCLUDES) { + return function ($this, el, fromIndex) { + var O = _toIobject($this); + var length = _toLength(O.length); + var index = _toAbsoluteIndex(fromIndex, length); + var value; + // Array#includes uses SameValueZero equality algorithm + // eslint-disable-next-line no-self-compare + if (IS_INCLUDES && el != el) while (length > index) { + value = O[index++]; + // eslint-disable-next-line no-self-compare + if (value != value) return true; + // Array#indexOf ignores holes, Array#includes - not + } else for (;length > index; index++) if (IS_INCLUDES || index in O) { + if (O[index] === el) return IS_INCLUDES || index || 0; + } return !IS_INCLUDES && -1; + }; + }; + + var SHARED = '__core-js_shared__'; + var store = _global[SHARED] || (_global[SHARED] = {}); + var _shared = function (key) { + return store[key] || (store[key] = {}); + }; + + var id = 0; + var px = Math.random(); + var _uid = function (key) { + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); + }; + + var shared = _shared('keys'); + + var _sharedKey = function (key) { + return shared[key] || (shared[key] = _uid(key)); + }; + + var arrayIndexOf = _arrayIncludes(false); + var IE_PROTO$1 = _sharedKey('IE_PROTO'); + + var _objectKeysInternal = function (object, names) { + var O = _toIobject(object); + var i = 0; + var result = []; + var key; + for (key in O) if (key != IE_PROTO$1) _has(O, key) && result.push(key); + // Don't enum bug & hidden keys + while (names.length > i) if (_has(O, key = names[i++])) { + ~arrayIndexOf(result, key) || result.push(key); + } + return result; + }; + + // IE 8- don't enum bug keys + var _enumBugKeys = ( + 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' + ).split(','); + + // 19.1.2.14 / 15.2.3.14 Object.keys(O) + + + + var _objectKeys = Object.keys || function keys(O) { + return _objectKeysInternal(O, _enumBugKeys); + }; + + var _objectDps = _descriptors ? Object.defineProperties : function defineProperties(O, Properties) { + _anObject(O); + var keys = _objectKeys(Properties); + var length = keys.length; + var i = 0; + var P; + while (length > i) _objectDp.f(O, P = keys[i++], Properties[P]); + return O; + }; + + var document$2 = _global.document; + var _html = document$2 && document$2.documentElement; + + // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) + + + + var IE_PROTO = _sharedKey('IE_PROTO'); + var Empty = function () { /* empty */ }; + var PROTOTYPE$1 = 'prototype'; + + // Create object with fake `null` prototype: use iframe Object with cleared prototype + var createDict = function () { + // Thrash, waste and sodomy: IE GC bug + var iframe = _domCreate('iframe'); + var i = _enumBugKeys.length; + var lt = '<'; + var gt = '>'; + var iframeDocument; + iframe.style.display = 'none'; + _html.appendChild(iframe); + iframe.src = 'javascript:'; // eslint-disable-line no-script-url + // createDict = iframe.contentWindow.Object; + // html.removeChild(iframe); + iframeDocument = iframe.contentWindow.document; + iframeDocument.open(); + iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); + iframeDocument.close(); + createDict = iframeDocument.F; + while (i--) delete createDict[PROTOTYPE$1][_enumBugKeys[i]]; + return createDict(); + }; + + var _objectCreate = Object.create || function create(O, Properties) { + var result; + if (O !== null) { + Empty[PROTOTYPE$1] = _anObject(O); + result = new Empty(); + Empty[PROTOTYPE$1] = null; + // add "__proto__" for Object.getPrototypeOf polyfill + result[IE_PROTO] = O; + } else result = createDict(); + return Properties === undefined ? result : _objectDps(result, Properties); + }; + + var _wks = createCommonjsModule(function (module) { + var store = _shared('wks'); + + var Symbol = _global.Symbol; + var USE_SYMBOL = typeof Symbol == 'function'; + + var $exports = module.exports = function (name) { + return store[name] || (store[name] = + USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : _uid)('Symbol.' + name)); + }; + + $exports.store = store; + }); + + var def = _objectDp.f; + + var TAG = _wks('toStringTag'); + + var _setToStringTag = function (it, tag, stat) { + if (it && !_has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }); + }; + + var IteratorPrototype = {}; + + // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() + _hide(IteratorPrototype, _wks('iterator'), function () { return this; }); + + var _iterCreate = function (Constructor, NAME, next) { + Constructor.prototype = _objectCreate(IteratorPrototype, { next: _propertyDesc(1, next) }); + _setToStringTag(Constructor, NAME + ' Iterator'); + }; + + // 7.1.13 ToObject(argument) + + var _toObject = function (it) { + return Object(_defined(it)); + }; + + // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) + + + var IE_PROTO$2 = _sharedKey('IE_PROTO'); + var ObjectProto = Object.prototype; + + var _objectGpo = Object.getPrototypeOf || function (O) { + O = _toObject(O); + if (_has(O, IE_PROTO$2)) return O[IE_PROTO$2]; + if (typeof O.constructor == 'function' && O instanceof O.constructor) { + return O.constructor.prototype; + } return O instanceof Object ? ObjectProto : null; + }; + + var ITERATOR = _wks('iterator'); + var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` + var FF_ITERATOR = '@@iterator'; + var KEYS = 'keys'; + var VALUES = 'values'; + + var returnThis = function () { return this; }; + + var _iterDefine = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { + _iterCreate(Constructor, NAME, next); + var getMethod = function (kind) { + if (!BUGGY && kind in proto) return proto[kind]; + switch (kind) { + case KEYS: return function keys() { return new Constructor(this, kind); }; + case VALUES: return function values() { return new Constructor(this, kind); }; + } return function entries() { return new Constructor(this, kind); }; + }; + var TAG = NAME + ' Iterator'; + var DEF_VALUES = DEFAULT == VALUES; + var VALUES_BUG = false; + var proto = Base.prototype; + var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; + var $default = $native || getMethod(DEFAULT); + var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined; + var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; + var methods, key, IteratorPrototype; + // Fix native + if ($anyNative) { + IteratorPrototype = _objectGpo($anyNative.call(new Base())); + if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { + // Set @@toStringTag to native iterators + _setToStringTag(IteratorPrototype, TAG, true); + // fix for some old engines + if (!_library && !_has(IteratorPrototype, ITERATOR)) _hide(IteratorPrototype, ITERATOR, returnThis); + } + } + // fix Array#{values, @@iterator}.name in V8 / FF + if (DEF_VALUES && $native && $native.name !== VALUES) { + VALUES_BUG = true; + $default = function values() { return $native.call(this); }; + } + // Define iterator + if ((!_library || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { + _hide(proto, ITERATOR, $default); + } + // Plug for library + _iterators[NAME] = $default; + _iterators[TAG] = returnThis; + if (DEFAULT) { + methods = { + values: DEF_VALUES ? $default : getMethod(VALUES), + keys: IS_SET ? $default : getMethod(KEYS), + entries: $entries + }; + if (FORCED) for (key in methods) { + if (!(key in proto)) _redefine(proto, key, methods[key]); + } else _export(_export.P + _export.F * (BUGGY || VALUES_BUG), NAME, methods); + } + return methods; + }; + + var $at = _stringAt(true); + + // 21.1.3.27 String.prototype[@@iterator]() + _iterDefine(String, 'String', function (iterated) { + this._t = String(iterated); // target + this._i = 0; // next index + // 21.1.5.2.1 %StringIteratorPrototype%.next() + }, function () { + var O = this._t; + var index = this._i; + var point; + if (index >= O.length) return { value: undefined, done: true }; + point = $at(O, index); + this._i += point.length; + return { value: point, done: false }; + }); + + var _addToUnscopables = function () { /* empty */ }; + + var _iterStep = function (done, value) { + return { value: value, done: !!done }; + }; + + // 22.1.3.4 Array.prototype.entries() + // 22.1.3.13 Array.prototype.keys() + // 22.1.3.29 Array.prototype.values() + // 22.1.3.30 Array.prototype[@@iterator]() + var es6_array_iterator = _iterDefine(Array, 'Array', function (iterated, kind) { + this._t = _toIobject(iterated); // target + this._i = 0; // next index + this._k = kind; // kind + // 22.1.5.2.1 %ArrayIteratorPrototype%.next() + }, function () { + var O = this._t; + var kind = this._k; + var index = this._i++; + if (!O || index >= O.length) { + this._t = undefined; + return _iterStep(1); + } + if (kind == 'keys') return _iterStep(0, index); + if (kind == 'values') return _iterStep(0, O[index]); + return _iterStep(0, [index, O[index]]); + }, 'values'); + + // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) + _iterators.Arguments = _iterators.Array; + + _addToUnscopables('keys'); + _addToUnscopables('values'); + _addToUnscopables('entries'); + + var TO_STRING_TAG = _wks('toStringTag'); + + var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' + + 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' + + 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' + + 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' + + 'TextTrackList,TouchList').split(','); + + for (var i = 0; i < DOMIterables.length; i++) { + var NAME = DOMIterables[i]; + var Collection = _global[NAME]; + var proto = Collection && Collection.prototype; + if (proto && !proto[TO_STRING_TAG]) _hide(proto, TO_STRING_TAG, NAME); + _iterators[NAME] = _iterators.Array; + } + + // getting tag from 19.1.3.6 Object.prototype.toString() + + var TAG$1 = _wks('toStringTag'); + // ES3 wrong here + var ARG = _cof(function () { return arguments; }()) == 'Arguments'; + + // fallback for IE11 Script Access Denied error + var tryGet = function (it, key) { + try { + return it[key]; + } catch (e) { /* empty */ } + }; + + var _classof = function (it) { + var O, T, B; + return it === undefined ? 'Undefined' : it === null ? 'Null' + // @@toStringTag case + : typeof (T = tryGet(O = Object(it), TAG$1)) == 'string' ? T + // builtinTag case + : ARG ? _cof(O) + // ES3 arguments fallback + : (B = _cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; + }; + + var _anInstance = function (it, Constructor, name, forbiddenField) { + if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) { + throw TypeError(name + ': incorrect invocation!'); + } return it; + }; + + // call something on iterator step with safe closing on error + + var _iterCall = function (iterator, fn, value, entries) { + try { + return entries ? fn(_anObject(value)[0], value[1]) : fn(value); + // 7.4.6 IteratorClose(iterator, completion) + } catch (e) { + var ret = iterator['return']; + if (ret !== undefined) _anObject(ret.call(iterator)); + throw e; + } + }; + + // check on default Array iterator + + var ITERATOR$1 = _wks('iterator'); + var ArrayProto = Array.prototype; + + var _isArrayIter = function (it) { + return it !== undefined && (_iterators.Array === it || ArrayProto[ITERATOR$1] === it); + }; + + var ITERATOR$2 = _wks('iterator'); + + var core_getIteratorMethod = _core.getIteratorMethod = function (it) { + if (it != undefined) return it[ITERATOR$2] + || it['@@iterator'] + || _iterators[_classof(it)]; + }; + + var _forOf = createCommonjsModule(function (module) { + var BREAK = {}; + var RETURN = {}; + var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) { + var iterFn = ITERATOR ? function () { return iterable; } : core_getIteratorMethod(iterable); + var f = _ctx(fn, that, entries ? 2 : 1); + var index = 0; + var length, step, iterator, result; + if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!'); + // fast case for arrays with default iterator + if (_isArrayIter(iterFn)) for (length = _toLength(iterable.length); length > index; index++) { + result = entries ? f(_anObject(step = iterable[index])[0], step[1]) : f(iterable[index]); + if (result === BREAK || result === RETURN) return result; + } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) { + result = _iterCall(iterator, f, step.value, entries); + if (result === BREAK || result === RETURN) return result; + } + }; + exports.BREAK = BREAK; + exports.RETURN = RETURN; + }); + + // 7.3.20 SpeciesConstructor(O, defaultConstructor) + + + var SPECIES = _wks('species'); + var _speciesConstructor = function (O, D) { + var C = _anObject(O).constructor; + var S; + return C === undefined || (S = _anObject(C)[SPECIES]) == undefined ? D : _aFunction(S); + }; + + // fast apply, http://jsperf.lnkit.com/fast-apply/5 + var _invoke = function (fn, args, that) { + var un = that === undefined; + switch (args.length) { + case 0: return un ? fn() + : fn.call(that); + case 1: return un ? fn(args[0]) + : fn.call(that, args[0]); + case 2: return un ? fn(args[0], args[1]) + : fn.call(that, args[0], args[1]); + case 3: return un ? fn(args[0], args[1], args[2]) + : fn.call(that, args[0], args[1], args[2]); + case 4: return un ? fn(args[0], args[1], args[2], args[3]) + : fn.call(that, args[0], args[1], args[2], args[3]); + } return fn.apply(that, args); + }; + + var process$2 = _global.process; + var setTask = _global.setImmediate; + var clearTask = _global.clearImmediate; + var MessageChannel = _global.MessageChannel; + var Dispatch = _global.Dispatch; + var counter = 0; + var queue = {}; + var ONREADYSTATECHANGE = 'onreadystatechange'; + var defer; + var channel; + var port; + var run = function () { + var id = +this; + // eslint-disable-next-line no-prototype-builtins + if (queue.hasOwnProperty(id)) { + var fn = queue[id]; + delete queue[id]; + fn(); + } + }; + var listener = function (event) { + run.call(event.data); + }; + // Node.js 0.9+ & IE10+ has setImmediate, otherwise: + if (!setTask || !clearTask) { + setTask = function setImmediate(fn) { + var args = []; + var i = 1; + while (arguments.length > i) args.push(arguments[i++]); + queue[++counter] = function () { + // eslint-disable-next-line no-new-func + _invoke(typeof fn == 'function' ? fn : Function(fn), args); + }; + defer(counter); + return counter; + }; + clearTask = function clearImmediate(id) { + delete queue[id]; + }; + // Node.js 0.8- + if (_cof(process$2) == 'process') { + defer = function (id) { + process$2.nextTick(_ctx(run, id, 1)); + }; + // Sphere (JS game engine) Dispatch API + } else if (Dispatch && Dispatch.now) { + defer = function (id) { + Dispatch.now(_ctx(run, id, 1)); + }; + // Browsers with MessageChannel, includes WebWorkers + } else if (MessageChannel) { + channel = new MessageChannel(); + port = channel.port2; + channel.port1.onmessage = listener; + defer = _ctx(port.postMessage, port, 1); + // Browsers with postMessage, skip WebWorkers + // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' + } else if (_global.addEventListener && typeof postMessage == 'function' && !_global.importScripts) { + defer = function (id) { + _global.postMessage(id + '', '*'); + }; + _global.addEventListener('message', listener, false); + // IE8- + } else if (ONREADYSTATECHANGE in _domCreate('script')) { + defer = function (id) { + _html.appendChild(_domCreate('script'))[ONREADYSTATECHANGE] = function () { + _html.removeChild(this); + run.call(id); + }; + }; + // Rest old browsers + } else { + defer = function (id) { + setTimeout(_ctx(run, id, 1), 0); + }; + } + } + var _task = { + set: setTask, + clear: clearTask + }; + + var macrotask = _task.set; + var Observer = _global.MutationObserver || _global.WebKitMutationObserver; + var process$3 = _global.process; + var Promise = _global.Promise; + var isNode$1 = _cof(process$3) == 'process'; + + var _microtask = function () { + var head, last, notify; + + var flush = function () { + var parent, fn; + if (isNode$1 && (parent = process$3.domain)) parent.exit(); + while (head) { + fn = head.fn; + head = head.next; + try { + fn(); + } catch (e) { + if (head) notify(); + else last = undefined; + throw e; + } + } last = undefined; + if (parent) parent.enter(); + }; + + // Node.js + if (isNode$1) { + notify = function () { + process$3.nextTick(flush); + }; + // browsers with MutationObserver + } else if (Observer) { + var toggle = true; + var node = document.createTextNode(''); + new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new + notify = function () { + node.data = toggle = !toggle; + }; + // environments with maybe non-completely correct, but existent Promise + } else if (Promise && Promise.resolve) { + var promise = Promise.resolve(); + notify = function () { + promise.then(flush); + }; + // for other environments - macrotask based on: + // - setImmediate + // - MessageChannel + // - window.postMessag + // - onreadystatechange + // - setTimeout + } else { + notify = function () { + // strange IE + webpack dev server bug - use .call(global) + macrotask.call(_global, flush); + }; + } + + return function (fn) { + var task = { fn: fn, next: undefined }; + if (last) last.next = task; + if (!head) { + head = task; + notify(); + } last = task; + }; + }; + + // 25.4.1.5 NewPromiseCapability(C) + + + function PromiseCapability(C) { + var resolve, reject; + this.promise = new C(function ($$resolve, $$reject) { + if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor'); + resolve = $$resolve; + reject = $$reject; + }); + this.resolve = _aFunction(resolve); + this.reject = _aFunction(reject); + } + + var f$1 = function (C) { + return new PromiseCapability(C); + }; + + var _newPromiseCapability = { + f: f$1 + }; + + var _perform = function (exec) { + try { + return { e: false, v: exec() }; + } catch (e) { + return { e: true, v: e }; + } + }; + + var _promiseResolve = function (C, x) { + _anObject(C); + if (_isObject(x) && x.constructor === C) return x; + var promiseCapability = _newPromiseCapability.f(C); + var resolve = promiseCapability.resolve; + resolve(x); + return promiseCapability.promise; + }; + + var _redefineAll = function (target, src, safe) { + for (var key in src) { + if (safe && target[key]) target[key] = src[key]; + else _hide(target, key, src[key]); + } return target; + }; + + var SPECIES$1 = _wks('species'); + + var _setSpecies = function (KEY) { + var C = typeof _core[KEY] == 'function' ? _core[KEY] : _global[KEY]; + if (_descriptors && C && !C[SPECIES$1]) _objectDp.f(C, SPECIES$1, { + configurable: true, + get: function () { return this; } + }); + }; + + var ITERATOR$3 = _wks('iterator'); + var SAFE_CLOSING = false; + + try { + var riter = [7][ITERATOR$3](); + riter['return'] = function () { SAFE_CLOSING = true; }; + // eslint-disable-next-line no-throw-literal + Array.from(riter, function () { throw 2; }); + } catch (e) { /* empty */ } + + var _iterDetect = function (exec, skipClosing) { + if (!skipClosing && !SAFE_CLOSING) return false; + var safe = false; + try { + var arr = [7]; + var iter = arr[ITERATOR$3](); + iter.next = function () { return { done: safe = true }; }; + arr[ITERATOR$3] = function () { return iter; }; + exec(arr); + } catch (e) { /* empty */ } + return safe; + }; + + var task = _task.set; + var microtask = _microtask(); + + + + var PROMISE = 'Promise'; + var TypeError$1 = _global.TypeError; + var process$1 = _global.process; + var $Promise = _global[PROMISE]; + var isNode = _classof(process$1) == 'process'; + var empty = function () { /* empty */ }; + var Internal; + var newGenericPromiseCapability; + var OwnPromiseCapability; + var Wrapper; + var newPromiseCapability = newGenericPromiseCapability = _newPromiseCapability.f; + + var USE_NATIVE = !!function () { + try { + // correct subclassing with @@species support + var promise = $Promise.resolve(1); + var FakePromise = (promise.constructor = {})[_wks('species')] = function (exec) { + exec(empty, empty); + }; + // unhandled rejections tracking support, NodeJS Promise without it fails @@species test + return (isNode || typeof PromiseRejectionEvent == 'function') && promise.then(empty) instanceof FakePromise; + } catch (e) { /* empty */ } + }(); + + // helpers + var isThenable = function (it) { + var then; + return _isObject(it) && typeof (then = it.then) == 'function' ? then : false; + }; + var notify = function (promise, isReject) { + if (promise._n) return; + promise._n = true; + var chain = promise._c; + microtask(function () { + var value = promise._v; + var ok = promise._s == 1; + var i = 0; + var run = function (reaction) { + var handler = ok ? reaction.ok : reaction.fail; + var resolve = reaction.resolve; + var reject = reaction.reject; + var domain = reaction.domain; + var result, then; + try { + if (handler) { + if (!ok) { + if (promise._h == 2) onHandleUnhandled(promise); + promise._h = 1; + } + if (handler === true) result = value; + else { + if (domain) domain.enter(); + result = handler(value); + if (domain) domain.exit(); + } + if (result === reaction.promise) { + reject(TypeError$1('Promise-chain cycle')); + } else if (then = isThenable(result)) { + then.call(result, resolve, reject); + } else resolve(result); + } else reject(value); + } catch (e) { + reject(e); + } + }; + while (chain.length > i) run(chain[i++]); // variable length - can't use forEach + promise._c = []; + promise._n = false; + if (isReject && !promise._h) onUnhandled(promise); + }); + }; + var onUnhandled = function (promise) { + task.call(_global, function () { + var value = promise._v; + var unhandled = isUnhandled(promise); + var result, handler, console; + if (unhandled) { + result = _perform(function () { + if (isNode) { + process$1.emit('unhandledRejection', value, promise); + } else if (handler = _global.onunhandledrejection) { + handler({ promise: promise, reason: value }); + } else if ((console = _global.console) && console.error) { + console.error('Unhandled promise rejection', value); + } + }); + // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should + promise._h = isNode || isUnhandled(promise) ? 2 : 1; + } promise._a = undefined; + if (unhandled && result.e) throw result.v; + }); + }; + var isUnhandled = function (promise) { + if (promise._h == 1) return false; + var chain = promise._a || promise._c; + var i = 0; + var reaction; + while (chain.length > i) { + reaction = chain[i++]; + if (reaction.fail || !isUnhandled(reaction.promise)) return false; + } return true; + }; + var onHandleUnhandled = function (promise) { + task.call(_global, function () { + var handler; + if (isNode) { + process$1.emit('rejectionHandled', promise); + } else if (handler = _global.onrejectionhandled) { + handler({ promise: promise, reason: promise._v }); + } + }); + }; + var $reject = function (value) { + var promise = this; + if (promise._d) return; + promise._d = true; + promise = promise._w || promise; // unwrap + promise._v = value; + promise._s = 2; + if (!promise._a) promise._a = promise._c.slice(); + notify(promise, true); + }; + var $resolve = function (value) { + var promise = this; + var then; + if (promise._d) return; + promise._d = true; + promise = promise._w || promise; // unwrap + try { + if (promise === value) throw TypeError$1("Promise can't be resolved itself"); + if (then = isThenable(value)) { + microtask(function () { + var wrapper = { _w: promise, _d: false }; // wrap + try { + then.call(value, _ctx($resolve, wrapper, 1), _ctx($reject, wrapper, 1)); + } catch (e) { + $reject.call(wrapper, e); + } + }); + } else { + promise._v = value; + promise._s = 1; + notify(promise, false); + } + } catch (e) { + $reject.call({ _w: promise, _d: false }, e); // wrap + } + }; + + // constructor polyfill + if (!USE_NATIVE) { + // 25.4.3.1 Promise(executor) + $Promise = function Promise(executor) { + _anInstance(this, $Promise, PROMISE, '_h'); + _aFunction(executor); + Internal.call(this); + try { + executor(_ctx($resolve, this, 1), _ctx($reject, this, 1)); + } catch (err) { + $reject.call(this, err); + } + }; + // eslint-disable-next-line no-unused-vars + Internal = function Promise(executor) { + this._c = []; // <- awaiting reactions + this._a = undefined; // <- checked in isUnhandled reactions + this._s = 0; // <- state + this._d = false; // <- done + this._v = undefined; // <- value + this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled + this._n = false; // <- notify + }; + Internal.prototype = _redefineAll($Promise.prototype, { + // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected) + then: function then(onFulfilled, onRejected) { + var reaction = newPromiseCapability(_speciesConstructor(this, $Promise)); + reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true; + reaction.fail = typeof onRejected == 'function' && onRejected; + reaction.domain = isNode ? process$1.domain : undefined; + this._c.push(reaction); + if (this._a) this._a.push(reaction); + if (this._s) notify(this, false); + return reaction.promise; + }, + // 25.4.5.1 Promise.prototype.catch(onRejected) + 'catch': function (onRejected) { + return this.then(undefined, onRejected); + } + }); + OwnPromiseCapability = function () { + var promise = new Internal(); + this.promise = promise; + this.resolve = _ctx($resolve, promise, 1); + this.reject = _ctx($reject, promise, 1); + }; + _newPromiseCapability.f = newPromiseCapability = function (C) { + return C === $Promise || C === Wrapper + ? new OwnPromiseCapability(C) + : newGenericPromiseCapability(C); + }; + } + + _export(_export.G + _export.W + _export.F * !USE_NATIVE, { Promise: $Promise }); + _setToStringTag($Promise, PROMISE); + _setSpecies(PROMISE); + Wrapper = _core[PROMISE]; + + // statics + _export(_export.S + _export.F * !USE_NATIVE, PROMISE, { + // 25.4.4.5 Promise.reject(r) + reject: function reject(r) { + var capability = newPromiseCapability(this); + var $$reject = capability.reject; + $$reject(r); + return capability.promise; + } + }); + _export(_export.S + _export.F * (_library || !USE_NATIVE), PROMISE, { + // 25.4.4.6 Promise.resolve(x) + resolve: function resolve(x) { + return _promiseResolve(_library && this === Wrapper ? $Promise : this, x); + } + }); + _export(_export.S + _export.F * !(USE_NATIVE && _iterDetect(function (iter) { + $Promise.all(iter)['catch'](empty); + })), PROMISE, { + // 25.4.4.1 Promise.all(iterable) + all: function all(iterable) { + var C = this; + var capability = newPromiseCapability(C); + var resolve = capability.resolve; + var reject = capability.reject; + var result = _perform(function () { + var values = []; + var index = 0; + var remaining = 1; + _forOf(iterable, false, function (promise) { + var $index = index++; + var alreadyCalled = false; + values.push(undefined); + remaining++; + C.resolve(promise).then(function (value) { + if (alreadyCalled) return; + alreadyCalled = true; + values[$index] = value; + --remaining || resolve(values); + }, reject); + }); + --remaining || resolve(values); + }); + if (result.e) reject(result.v); + return capability.promise; + }, + // 25.4.4.4 Promise.race(iterable) + race: function race(iterable) { + var C = this; + var capability = newPromiseCapability(C); + var reject = capability.reject; + var result = _perform(function () { + _forOf(iterable, false, function (promise) { + C.resolve(promise).then(capability.resolve, reject); + }); + }); + if (result.e) reject(result.v); + return capability.promise; + } + }); + + _export(_export.P + _export.R, 'Promise', { 'finally': function (onFinally) { + var C = _speciesConstructor(this, _core.Promise || _global.Promise); + var isFunction = typeof onFinally == 'function'; + return this.then( + isFunction ? function (x) { + return _promiseResolve(C, onFinally()).then(function () { return x; }); + } : onFinally, + isFunction ? function (e) { + return _promiseResolve(C, onFinally()).then(function () { throw e; }); + } : onFinally + ); + } }); + + // https://github.com/tc39/proposal-promise-try + + + + + _export(_export.S, 'Promise', { 'try': function (callbackfn) { + var promiseCapability = _newPromiseCapability.f(this); + var result = _perform(callbackfn); + (result.e ? promiseCapability.reject : promiseCapability.resolve)(result.v); + return promiseCapability.promise; + } }); + + var promise$1 = _core.Promise; + + var promise = createCommonjsModule(function (module) { + module.exports = { "default": promise$1, __esModule: true }; + }); + + var _Promise = unwrapExports(promise); + + var f$2 = _wks; + + var _wksExt = { + f: f$2 + }; + + var iterator$2 = _wksExt.f('iterator'); + + var iterator = createCommonjsModule(function (module) { + module.exports = { "default": iterator$2, __esModule: true }; + }); + + var _meta = createCommonjsModule(function (module) { + var META = _uid('meta'); + + + var setDesc = _objectDp.f; + var id = 0; + var isExtensible = Object.isExtensible || function () { + return true; + }; + var FREEZE = !_fails(function () { + return isExtensible(Object.preventExtensions({})); + }); + var setMeta = function (it) { + setDesc(it, META, { value: { + i: 'O' + ++id, // object ID + w: {} // weak collections IDs + } }); + }; + var fastKey = function (it, create) { + // return primitive with prefix + if (!_isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; + if (!_has(it, META)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return 'F'; + // not necessary to add metadata + if (!create) return 'E'; + // add missing metadata + setMeta(it); + // return object ID + } return it[META].i; + }; + var getWeak = function (it, create) { + if (!_has(it, META)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return true; + // not necessary to add metadata + if (!create) return false; + // add missing metadata + setMeta(it); + // return hash weak collections IDs + } return it[META].w; + }; + // add metadata on freeze-family methods calling + var onFreeze = function (it) { + if (FREEZE && meta.NEED && isExtensible(it) && !_has(it, META)) setMeta(it); + return it; + }; + var meta = module.exports = { + KEY: META, + NEED: false, + fastKey: fastKey, + getWeak: getWeak, + onFreeze: onFreeze + }; + }); + + var defineProperty = _objectDp.f; + var _wksDefine = function (name) { + var $Symbol = _core.Symbol || (_core.Symbol = _library ? {} : _global.Symbol || {}); + if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: _wksExt.f(name) }); + }; + + var f$3 = Object.getOwnPropertySymbols; + + var _objectGops = { + f: f$3 + }; + + var f$4 = {}.propertyIsEnumerable; + + var _objectPie = { + f: f$4 + }; + + // all enumerable object keys, includes symbols + + + + var _enumKeys = function (it) { + var result = _objectKeys(it); + var getSymbols = _objectGops.f; + if (getSymbols) { + var symbols = getSymbols(it); + var isEnum = _objectPie.f; + var i = 0; + var key; + while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key); + } return result; + }; + + // 7.2.2 IsArray(argument) + + var _isArray = Array.isArray || function isArray(arg) { + return _cof(arg) == 'Array'; + }; + + // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) + + var hiddenKeys = _enumBugKeys.concat('length', 'prototype'); + + var f$6 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { + return _objectKeysInternal(O, hiddenKeys); + }; + + var _objectGopn = { + f: f$6 + }; + + // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window + + var gOPN$1 = _objectGopn.f; + var toString$1 = {}.toString; + + var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames + ? Object.getOwnPropertyNames(window) : []; + + var getWindowNames = function (it) { + try { + return gOPN$1(it); + } catch (e) { + return windowNames.slice(); + } + }; + + var f$5 = function getOwnPropertyNames(it) { + return windowNames && toString$1.call(it) == '[object Window]' ? getWindowNames(it) : gOPN$1(_toIobject(it)); + }; + + var _objectGopnExt = { + f: f$5 + }; + + var gOPD$1 = Object.getOwnPropertyDescriptor; + + var f$7 = _descriptors ? gOPD$1 : function getOwnPropertyDescriptor(O, P) { + O = _toIobject(O); + P = _toPrimitive(P, true); + if (_ie8DomDefine) try { + return gOPD$1(O, P); + } catch (e) { /* empty */ } + if (_has(O, P)) return _propertyDesc(!_objectPie.f.call(O, P), O[P]); + }; + + var _objectGopd = { + f: f$7 + }; + + // ECMAScript 6 symbols shim + + + + + + var META = _meta.KEY; + + + + + + + + + + + + + + + + + + + var gOPD = _objectGopd.f; + var dP$1 = _objectDp.f; + var gOPN = _objectGopnExt.f; + var $Symbol = _global.Symbol; + var $JSON = _global.JSON; + var _stringify = $JSON && $JSON.stringify; + var PROTOTYPE$2 = 'prototype'; + var HIDDEN = _wks('_hidden'); + var TO_PRIMITIVE = _wks('toPrimitive'); + var isEnum = {}.propertyIsEnumerable; + var SymbolRegistry = _shared('symbol-registry'); + var AllSymbols = _shared('symbols'); + var OPSymbols = _shared('op-symbols'); + var ObjectProto$1 = Object[PROTOTYPE$2]; + var USE_NATIVE$1 = typeof $Symbol == 'function'; + var QObject = _global.QObject; + // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 + var setter = !QObject || !QObject[PROTOTYPE$2] || !QObject[PROTOTYPE$2].findChild; + + // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 + var setSymbolDesc = _descriptors && _fails(function () { + return _objectCreate(dP$1({}, 'a', { + get: function () { return dP$1(this, 'a', { value: 7 }).a; } + })).a != 7; + }) ? function (it, key, D) { + var protoDesc = gOPD(ObjectProto$1, key); + if (protoDesc) delete ObjectProto$1[key]; + dP$1(it, key, D); + if (protoDesc && it !== ObjectProto$1) dP$1(ObjectProto$1, key, protoDesc); + } : dP$1; + + var wrap = function (tag) { + var sym = AllSymbols[tag] = _objectCreate($Symbol[PROTOTYPE$2]); + sym._k = tag; + return sym; + }; + + var isSymbol = USE_NATIVE$1 && typeof $Symbol.iterator == 'symbol' ? function (it) { + return typeof it == 'symbol'; + } : function (it) { + return it instanceof $Symbol; + }; + + var $defineProperty = function defineProperty(it, key, D) { + if (it === ObjectProto$1) $defineProperty(OPSymbols, key, D); + _anObject(it); + key = _toPrimitive(key, true); + _anObject(D); + if (_has(AllSymbols, key)) { + if (!D.enumerable) { + if (!_has(it, HIDDEN)) dP$1(it, HIDDEN, _propertyDesc(1, {})); + it[HIDDEN][key] = true; + } else { + if (_has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false; + D = _objectCreate(D, { enumerable: _propertyDesc(0, false) }); + } return setSymbolDesc(it, key, D); + } return dP$1(it, key, D); + }; + var $defineProperties = function defineProperties(it, P) { + _anObject(it); + var keys = _enumKeys(P = _toIobject(P)); + var i = 0; + var l = keys.length; + var key; + while (l > i) $defineProperty(it, key = keys[i++], P[key]); + return it; + }; + var $create = function create(it, P) { + return P === undefined ? _objectCreate(it) : $defineProperties(_objectCreate(it), P); + }; + var $propertyIsEnumerable = function propertyIsEnumerable(key) { + var E = isEnum.call(this, key = _toPrimitive(key, true)); + if (this === ObjectProto$1 && _has(AllSymbols, key) && !_has(OPSymbols, key)) return false; + return E || !_has(this, key) || !_has(AllSymbols, key) || _has(this, HIDDEN) && this[HIDDEN][key] ? E : true; + }; + var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) { + it = _toIobject(it); + key = _toPrimitive(key, true); + if (it === ObjectProto$1 && _has(AllSymbols, key) && !_has(OPSymbols, key)) return; + var D = gOPD(it, key); + if (D && _has(AllSymbols, key) && !(_has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true; + return D; + }; + var $getOwnPropertyNames = function getOwnPropertyNames(it) { + var names = gOPN(_toIobject(it)); + var result = []; + var i = 0; + var key; + while (names.length > i) { + if (!_has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key); + } return result; + }; + var $getOwnPropertySymbols = function getOwnPropertySymbols(it) { + var IS_OP = it === ObjectProto$1; + var names = gOPN(IS_OP ? OPSymbols : _toIobject(it)); + var result = []; + var i = 0; + var key; + while (names.length > i) { + if (_has(AllSymbols, key = names[i++]) && (IS_OP ? _has(ObjectProto$1, key) : true)) result.push(AllSymbols[key]); + } return result; + }; + + // 19.4.1.1 Symbol([description]) + if (!USE_NATIVE$1) { + $Symbol = function Symbol() { + if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!'); + var tag = _uid(arguments.length > 0 ? arguments[0] : undefined); + var $set = function (value) { + if (this === ObjectProto$1) $set.call(OPSymbols, value); + if (_has(this, HIDDEN) && _has(this[HIDDEN], tag)) this[HIDDEN][tag] = false; + setSymbolDesc(this, tag, _propertyDesc(1, value)); + }; + if (_descriptors && setter) setSymbolDesc(ObjectProto$1, tag, { configurable: true, set: $set }); + return wrap(tag); + }; + _redefine($Symbol[PROTOTYPE$2], 'toString', function toString() { + return this._k; + }); + + _objectGopd.f = $getOwnPropertyDescriptor; + _objectDp.f = $defineProperty; + _objectGopn.f = _objectGopnExt.f = $getOwnPropertyNames; + _objectPie.f = $propertyIsEnumerable; + _objectGops.f = $getOwnPropertySymbols; + + if (_descriptors && !_library) { + _redefine(ObjectProto$1, 'propertyIsEnumerable', $propertyIsEnumerable, true); + } + + _wksExt.f = function (name) { + return wrap(_wks(name)); + }; + } + + _export(_export.G + _export.W + _export.F * !USE_NATIVE$1, { Symbol: $Symbol }); + + for (var es6Symbols = ( + // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 + 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables' + ).split(','), j = 0; es6Symbols.length > j;)_wks(es6Symbols[j++]); + + for (var wellKnownSymbols = _objectKeys(_wks.store), k = 0; wellKnownSymbols.length > k;) _wksDefine(wellKnownSymbols[k++]); + + _export(_export.S + _export.F * !USE_NATIVE$1, 'Symbol', { + // 19.4.2.1 Symbol.for(key) + 'for': function (key) { + return _has(SymbolRegistry, key += '') + ? SymbolRegistry[key] + : SymbolRegistry[key] = $Symbol(key); + }, + // 19.4.2.5 Symbol.keyFor(sym) + keyFor: function keyFor(sym) { + if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!'); + for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key; + }, + useSetter: function () { setter = true; }, + useSimple: function () { setter = false; } + }); + + _export(_export.S + _export.F * !USE_NATIVE$1, 'Object', { + // 19.1.2.2 Object.create(O [, Properties]) + create: $create, + // 19.1.2.4 Object.defineProperty(O, P, Attributes) + defineProperty: $defineProperty, + // 19.1.2.3 Object.defineProperties(O, Properties) + defineProperties: $defineProperties, + // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) + getOwnPropertyDescriptor: $getOwnPropertyDescriptor, + // 19.1.2.7 Object.getOwnPropertyNames(O) + getOwnPropertyNames: $getOwnPropertyNames, + // 19.1.2.8 Object.getOwnPropertySymbols(O) + getOwnPropertySymbols: $getOwnPropertySymbols + }); + + // 24.3.2 JSON.stringify(value [, replacer [, space]]) + $JSON && _export(_export.S + _export.F * (!USE_NATIVE$1 || _fails(function () { + var S = $Symbol(); + // MS Edge converts symbol values to JSON as {} + // WebKit converts symbol values to JSON as null + // V8 throws on boxed symbols + return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}'; + })), 'JSON', { + stringify: function stringify(it) { + if (it === undefined || isSymbol(it)) return; // IE8 returns string on undefined + var args = [it]; + var i = 1; + var replacer, $replacer; + while (arguments.length > i) args.push(arguments[i++]); + replacer = args[1]; + if (typeof replacer == 'function') $replacer = replacer; + if ($replacer || !_isArray(replacer)) replacer = function (key, value) { + if ($replacer) value = $replacer.call(this, key, value); + if (!isSymbol(value)) return value; + }; + args[1] = replacer; + return _stringify.apply($JSON, args); + } + }); + + // 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) + $Symbol[PROTOTYPE$2][TO_PRIMITIVE] || _hide($Symbol[PROTOTYPE$2], TO_PRIMITIVE, $Symbol[PROTOTYPE$2].valueOf); + // 19.4.3.5 Symbol.prototype[@@toStringTag] + _setToStringTag($Symbol, 'Symbol'); + // 20.2.1.9 Math[@@toStringTag] + _setToStringTag(Math, 'Math', true); + // 24.3.3 JSON[@@toStringTag] + _setToStringTag(_global.JSON, 'JSON', true); + + _wksDefine('asyncIterator'); + + _wksDefine('observable'); + + var symbol$1 = _core.Symbol; + + var symbol = createCommonjsModule(function (module) { + module.exports = { "default": symbol$1, __esModule: true }; + }); + + var _Symbol = unwrapExports(symbol); + + var _typeof_1 = createCommonjsModule(function (module, exports) { + "use strict"; + + exports.__esModule = true; + + + + var _iterator2 = _interopRequireDefault(iterator); + + + + var _symbol2 = _interopRequireDefault(symbol); + + var _typeof = typeof _symbol2.default === "function" && typeof _iterator2.default === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj; }; + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + exports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.default) === "symbol" ? function (obj) { + return typeof obj === "undefined" ? "undefined" : _typeof(obj); + } : function (obj) { + return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof(obj); + }; + }); + + var _typeof = unwrapExports(_typeof_1); + + var classCallCheck = createCommonjsModule(function (module, exports) { + "use strict"; + + exports.__esModule = true; + + exports.default = function (instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } + }; + }); + + var _classCallCheck = unwrapExports(classCallCheck); + + var Storage = function () { + function Storage() { + _classCallCheck(this, Storage); + } + + Storage.prototype.getItem = function getItem(key) { + return wx.getStorageSync(key); + }; + + Storage.prototype.setItem = function setItem(key, value) { + return wx.setStorageSync(key, value); + }; + + Storage.prototype.removeItem = function removeItem(key) { + return this.setItem(key, ''); + }; + + Storage.prototype.clear = function clear() { + return wx.clearStorageSync(); + }; + + return Storage; + }(); + + var localstorage = new Storage(); + + // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) + _export(_export.S + _export.F * !_descriptors, 'Object', { defineProperty: _objectDp.f }); + + var $Object = _core.Object; + var defineProperty$4 = function defineProperty(it, key, desc) { + return $Object.defineProperty(it, key, desc); + }; + + var defineProperty$2 = createCommonjsModule(function (module) { + module.exports = { "default": defineProperty$4, __esModule: true }; + }); + + var defineProperty$1 = createCommonjsModule(function (module, exports) { + "use strict"; + + exports.__esModule = true; + + + + var _defineProperty2 = _interopRequireDefault(defineProperty$2); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + exports.default = function (obj, key, value) { + if (key in obj) { + (0, _defineProperty2.default)(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; + }; + }); + + var _defineProperty = unwrapExports(defineProperty$1); + + var possibleConstructorReturn = createCommonjsModule(function (module, exports) { + "use strict"; + + exports.__esModule = true; + + + + var _typeof3 = _interopRequireDefault(_typeof_1); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + exports.default = function (self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return call && ((typeof call === "undefined" ? "undefined" : (0, _typeof3.default)(call)) === "object" || typeof call === "function") ? call : self; + }; + }); + + var _possibleConstructorReturn = unwrapExports(possibleConstructorReturn); + + // Works with __proto__ only. Old v8 can't work with null proto objects. + /* eslint-disable no-proto */ + + + var check = function (O, proto) { + _anObject(O); + if (!_isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!"); + }; + var _setProto = { + set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line + function (test, buggy, set) { + try { + set = _ctx(Function.call, _objectGopd.f(Object.prototype, '__proto__').set, 2); + set(test, []); + buggy = !(test instanceof Array); + } catch (e) { buggy = true; } + return function setPrototypeOf(O, proto) { + check(O, proto); + if (buggy) O.__proto__ = proto; + else set(O, proto); + return O; + }; + }({}, false) : undefined), + check: check + }; + + // 19.1.3.19 Object.setPrototypeOf(O, proto) + + _export(_export.S, 'Object', { setPrototypeOf: _setProto.set }); + + var setPrototypeOf$2 = _core.Object.setPrototypeOf; + + var setPrototypeOf = createCommonjsModule(function (module) { + module.exports = { "default": setPrototypeOf$2, __esModule: true }; + }); + + // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) + _export(_export.S, 'Object', { create: _objectCreate }); + + var $Object$1 = _core.Object; + var create$3 = function create(P, D) { + return $Object$1.create(P, D); + }; + + var create$1 = createCommonjsModule(function (module) { + module.exports = { "default": create$3, __esModule: true }; + }); + + var inherits = createCommonjsModule(function (module, exports) { + "use strict"; + + exports.__esModule = true; + + + + var _setPrototypeOf2 = _interopRequireDefault(setPrototypeOf); + + + + var _create2 = _interopRequireDefault(create$1); + + + + var _typeof3 = _interopRequireDefault(_typeof_1); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + exports.default = function (subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === "undefined" ? "undefined" : (0, _typeof3.default)(superClass))); + } + + subClass.prototype = (0, _create2.default)(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true + } + }); + if (superClass) _setPrototypeOf2.default ? (0, _setPrototypeOf2.default)(subClass, superClass) : subClass.__proto__ = superClass; + }; + }); + + var _inherits = unwrapExports(inherits); + + var $JSON$1 = _core.JSON || (_core.JSON = { stringify: JSON.stringify }); + var stringify$1 = function stringify(it) { // eslint-disable-line no-unused-vars + return $JSON$1.stringify.apply($JSON$1, arguments); + }; + + var stringify = createCommonjsModule(function (module) { + module.exports = { "default": stringify$1, __esModule: true }; + }); + + var _JSON$stringify = unwrapExports(stringify); + + /* + object-assign + (c) Sindre Sorhus + @license MIT + */ + + /* eslint-disable no-unused-vars */ + var getOwnPropertySymbols = Object.getOwnPropertySymbols; + var hasOwnProperty$1 = Object.prototype.hasOwnProperty; + var propIsEnumerable = Object.prototype.propertyIsEnumerable; + + function toObject$1(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; + } + + // Detect buggy property enumeration order in older V8 versions. + + // https://bugs.chromium.org/p/v8/issues/detail?id=4118 + var test1 = new String('abc'); // eslint-disable-line no-new-wrappers + test1[5] = 'de'; + if (Object.getOwnPropertyNames(test1)[0] === '5') { + return false; + } + + // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + 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; + } + + // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + var test3 = {}; + 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { + test3[letter] = letter; + }); + if (Object.keys(Object.assign({}, test3)).join('') !== + 'abcdefghijklmnopqrst') { + return false; + } + + return true; + } catch (err) { + // We don't expect any of the above to throw, but better to be safe. + return false; + } + } + + var objectAssign = shouldUseNative() ? Object.assign : function (target, source) { + var from; + var to = toObject$1(target); + var symbols; + + for (var s = 1; s < arguments.length; s++) { + from = Object(arguments[s]); + + for (var key in from) { + if (hasOwnProperty$1.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; + }; + + var commons = createCommonjsModule(function (module, exports) { + /** + * @author Toru Nagashima + * @copyright 2015 Toru Nagashima. All rights reserved. + * See LICENSE file in root directory for full license. + */ + + "use strict"; + + /** + * Creates a unique key. + * + * @param {string} name - A name to create. + * @returns {symbol|string} + * @private + */ + var createUniqueKey = exports.createUniqueKey = (typeof Symbol !== "undefined" ? + Symbol : + function createUniqueKey(name) { + return "[[" + name + "_" + Math.random().toFixed(8).slice(2) + "]]"; + }); + + /** + * The key of listeners. + * + * @type {symbol|string} + * @private + */ + exports.LISTENERS = createUniqueKey("listeners"); + + /** + * A value of kind for listeners which are registered in the capturing phase. + * + * @type {number} + * @private + */ + exports.CAPTURE = 1; + + /** + * A value of kind for listeners which are registered in the bubbling phase. + * + * @type {number} + * @private + */ + exports.BUBBLE = 2; + + /** + * A value of kind for listeners which are registered as an attribute. + * + * @type {number} + * @private + */ + exports.ATTRIBUTE = 3; + + /** + * @typedef object ListenerNode + * @property {function} listener - A listener function. + * @property {number} kind - The kind of the listener. + * @property {ListenerNode|null} next - The next node. + * If this node is the last, this is `null`. + */ + + /** + * Creates a node of singly linked list for a list of listeners. + * + * @param {function} listener - A listener function. + * @param {number} kind - The kind of the listener. + * @returns {ListenerNode} The created listener node. + */ + exports.newNode = function newNode(listener, kind) { + return {listener: listener, kind: kind, next: null}; + }; + }); + + //----------------------------------------------------------------------------- + // Requirements + //----------------------------------------------------------------------------- + + + var LISTENERS = commons.LISTENERS; + var ATTRIBUTE = commons.ATTRIBUTE; + var newNode = commons.newNode; + + //----------------------------------------------------------------------------- + // Helpers + //----------------------------------------------------------------------------- + + /** + * Gets a specified attribute listener from a given EventTarget object. + * + * @param {EventTarget} eventTarget - An EventTarget object to get. + * @param {string} type - An event type to get. + * @returns {function|null} The found attribute listener. + */ + function getAttributeListener(eventTarget, type) { + var node = eventTarget[LISTENERS][type]; + while (node != null) { + if (node.kind === ATTRIBUTE) { + return node.listener; + } + node = node.next; + } + return null; + } + + /** + * Sets a specified attribute listener to a given EventTarget object. + * + * @param {EventTarget} eventTarget - An EventTarget object to set. + * @param {string} type - An event type to set. + * @param {function|null} listener - A listener to be set. + * @returns {void} + */ + function setAttributeListener(eventTarget, type, listener) { + if (typeof listener !== "function" && typeof listener !== "object") { + listener = null; // eslint-disable-line no-param-reassign + } + + var prev = null; + var node = eventTarget[LISTENERS][type]; + while (node != null) { + if (node.kind === ATTRIBUTE) { + // Remove old value. + if (prev == null) { + eventTarget[LISTENERS][type] = node.next; + } + else { + prev.next = node.next; + } + } + else { + prev = node; + } + + node = node.next; + } + + // Add new value. + if (listener != null) { + if (prev == null) { + eventTarget[LISTENERS][type] = newNode(listener, ATTRIBUTE); + } + else { + prev.next = newNode(listener, ATTRIBUTE); + } + } + } + + //----------------------------------------------------------------------------- + // Public Interface + //----------------------------------------------------------------------------- + + /** + * Defines an `EventTarget` implementation which has `onfoobar` attributes. + * + * @param {EventTarget} EventTargetBase - A base implementation of EventTarget. + * @param {string[]} types - A list of event types which are defined as attribute listeners. + * @returns {EventTarget} The defined `EventTarget` implementation which has attribute listeners. + */ + var 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() { return getAttributeListener(this, type); }, + set: function(listener) { setAttributeListener(this, type, listener); }, + configurable: true, + enumerable: true + }; + }); + + EventTarget.prototype = Object.create(EventTargetBase.prototype, descripter); + + return EventTarget; + }; + + var customEventTarget = { + defineCustomEventTarget: defineCustomEventTarget + }; + + //----------------------------------------------------------------------------- + // Requirements + //----------------------------------------------------------------------------- + + var createUniqueKey = commons.createUniqueKey; + + //----------------------------------------------------------------------------- + // Constsnts + //----------------------------------------------------------------------------- + + /** + * The key of the flag which is turned on by `stopImmediatePropagation` method. + * + * @type {symbol|string} + * @private + */ + var STOP_IMMEDIATE_PROPAGATION_FLAG = + createUniqueKey("stop_immediate_propagation_flag"); + + /** + * The key of the flag which is turned on by `preventDefault` method. + * + * @type {symbol|string} + * @private + */ + var CANCELED_FLAG = createUniqueKey("canceled_flag"); + + /** + * The key of the original event object. + * + * @type {symbol|string} + * @private + */ + var ORIGINAL_EVENT = createUniqueKey("original_event"); + + /** + * Method definitions for the event wrapper. + * + * @type {object} + * @private + */ + 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 + }) + }); + + //----------------------------------------------------------------------------- + // Public Interface + //----------------------------------------------------------------------------- + + var STOP_IMMEDIATE_PROPAGATION_FLAG_1 = STOP_IMMEDIATE_PROPAGATION_FLAG; + + /** + * Creates an event wrapper. + * + * We cannot modify several properties of `Event` object, so we need to create the wrapper. + * Plus, this wrapper supports non `Event` objects. + * + * @param {Event|{type: string}} event - An original event to create the wrapper. + * @param {EventTarget} eventTarget - The event target of the event. + * @returns {Event} The created wrapper. This object is implemented `Event` interface. + * @private + */ + var 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}; + + // For CustomEvent. + if (typeof event.detail !== "undefined") { + propertyDefinition.detail = {value: event.detail, enumerable: true}; + } + + return Object.create( + Object.create(event, wrapperPrototypeDefinition), + propertyDefinition + ); + }; + + var eventWrapper = { + STOP_IMMEDIATE_PROPAGATION_FLAG: STOP_IMMEDIATE_PROPAGATION_FLAG_1, + createEventWrapper: createEventWrapper + }; + + var eventTarget = createCommonjsModule(function (module) { + /** + * @author Toru Nagashima + * @copyright 2015 Toru Nagashima. All rights reserved. + * See LICENSE file in root directory for full license. + */ + + "use strict"; + + //----------------------------------------------------------------------------- + // Requirements + //----------------------------------------------------------------------------- + + + + + 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; + + //----------------------------------------------------------------------------- + // Constants + //----------------------------------------------------------------------------- + + /** + * A flag which shows there is the native `EventTarget` interface object. + * + * @type {boolean} + * @private + */ + var HAS_EVENTTARGET_INTERFACE = ( + typeof window !== "undefined" && + typeof window.EventTarget !== "undefined" + ); + + //----------------------------------------------------------------------------- + // Public Interface + //----------------------------------------------------------------------------- + + /** + * An implementation for `EventTarget` interface. + * + * @constructor + * @public + */ + var EventTarget = module.exports = function EventTarget() { + if (this instanceof EventTarget) { + // this[LISTENERS] is a Map. + // Its key is event type. + // Its value is ListenerNode object or null. + // + // interface ListenerNode { + // var listener: Function + // var kind: CAPTURE|BUBBLE|ATTRIBUTE + // var next: ListenerNode|null + // } + 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]; + } + + // To use to extend with attribute listener properties. + // e.g. + // class MyCustomObject extends EventTarget("message", "error") { + // //... + // } + 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) { + // Should ignore a duplicated listener. + 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) { + // If listeners aren't registered, terminate. + var node = this[LISTENERS][event.type]; + if (node == null) { + return true; + } + + // Since we cannot rewrite several properties, so wrap object. + var wrapped = createEventWrapper(event, this); + + // This doesn't process capturing phase and bubbling phase. + // This isn't participating in a tree. + 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 + } + } + ); + }); + + var FormData$1 = function () { + function FormData() { + _classCallCheck(this, FormData); + + this._entries = []; + } + + FormData.prototype.append = function append(name, value) { + if (typeof name !== 'string') { + throw new TypeError('FormData name must be a string'); + } + if (typeof value !== 'string') { + if ((typeof value === 'undefined' ? 'undefined' : _typeof(value)) !== 'object' || typeof value.uri !== 'string') { + throw new TypeError('FormData value must be a string or { uri: tempFilePath }'); + } + } + this._entries.push([name, value]); + }; + + FormData.prototype.set = function set(name, value) { + var entry = this.get(name); + if (entry) { + entry[1] = value; + } else { + this.append(name, value); + } + }; + + FormData.prototype.delete = function _delete(name) { + this._entries = this._entries.filter(function (entry) { + return entry[0] !== name; + }); + }; + + FormData.prototype.entries = function entries() { + return this._entries; + }; + + FormData.prototype.get = function get(name) { + return this._entries.find(function (entry) { + return entry[0] === name; + }); + }; + + FormData.prototype.getAll = function getAll(name) { + return this._entries.filter(function (entry) { + return entry[0] === name; + }); + }; + + FormData.prototype.has = function has(name) { + return this._entries.some(function (entry) { + return entry[0] === name; + }); + }; + + FormData.prototype.keys = function keys() { + return this._entries.map(function (entry) { + return entry[0]; + }); + }; + + FormData.prototype.values = function values() { + return this._entries.map(function (entry) { + return entry[1]; + }); + }; + + return FormData; + }(); + + var formdata = FormData$1; + + var UNSENT = 0; + var OPENED = 1; + var HEADERS_RECEIVED = 2; + var LOADING = 3; + var DONE = 4; + + var REQUEST_EVENTS = ['abort', 'error', 'load', 'loadstart', 'progress', 'timeout', 'loadend', 'readystatechange']; + + function successCallback(response) { + this.status = response.statusCode; + this.statusText = response.statusCode; + var text = response.data; + if (typeof text !== 'string') { + text = _JSON$stringify(text); + } + this.responseText = this.response = text; + this.readyState = DONE; + this.dispatchEvent({ type: 'readystatechange' }); + } + + var XMLHttpRequest$1 = function (_EventTarget) { + _inherits(XMLHttpRequest, _EventTarget); + + function XMLHttpRequest() { + _classCallCheck(this, XMLHttpRequest); + + var _this = _possibleConstructorReturn(this, _EventTarget.call(this)); + + _this.readyState = UNSENT; + _this._headers = {}; + return _this; + } + + XMLHttpRequest.prototype.abort = function abort() { + throw new Error('not supported in weapp'); + }; + + XMLHttpRequest.prototype.getAllResponseHeaders = function getAllResponseHeaders() { + console.warn('getAllResponseHeaders always returns \'\''); + return ''; + }; + + XMLHttpRequest.prototype.getResponseHeader = function getResponseHeader(key) { + if (key === 'content-type') { + console.warn('get content-type always returns \'application/json\''); + return 'application/json'; + } + console.warn('getResponseHeader always returns \'\''); + return ''; + }; + + XMLHttpRequest.prototype.overrideMimeType = function overrideMimeType() { + throw new Error('not supported in weapp'); + }; + + XMLHttpRequest.prototype.open = function open(method, url) { + var async = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; + + if (this.readyState !== UNSENT) { + throw new Error('request is already opened'); + } + if (!async) { + throw new Error('sync request is not supported'); + } + this._method = method; + this._url = url; + this.readyState = OPENED; + this.dispatchEvent({ type: 'readystatechange' }); + }; + + XMLHttpRequest.prototype.setRequestHeader = function setRequestHeader(header, value) { + if (this.readyState !== OPENED) { + throw new Error('request is not opened'); + } + this._headers[header.toLowerCase()] = value; + }; + + XMLHttpRequest.prototype.send = function send(data) { + var _this2 = this; + + if (this.readyState !== OPENED) { + throw new Error('request is not opened'); + } + if (data instanceof formdata) { + var entries = data.entries(); + var blobs = entries.filter(function (entry) { + return typeof entry[1] !== 'string'; + }); + if (blobs.length === 0) { + throw new Error('Must specify a Blob field in FormData'); + } + if (blobs.length > 1) { + console.warn('Only the first Blob will be send in Weapp'); + } + var restData = entries.filter(function (entry) { + return typeof entry[1] === 'string'; + }).reduce(function (result, entry) { + return objectAssign(result, _defineProperty({}, entry[0], entry[1])); + }, {}); + wx.uploadFile({ + url: this._url, + name: blobs[0][0], + filePath: blobs[0][1].uri, + formData: restData, + header: this._headers, + success: successCallback.bind(this), + fail: function fail(error) { + _this2.status = 0; + _this2.readyState = DONE; + _this2.dispatchEvent({ type: 'readystatechange' }); + _this2.dispatchEvent({ type: 'error' }); + } + }); + } else { + wx.request({ + url: this._url, + data: data || '', + // method 的 value 居然必须为大写 + method: this._method.toUpperCase(), + header: this._headers, + success: successCallback.bind(this), + fail: function fail(error) { + _this2.status = 0; + _this2.readyState = DONE; + _this2.dispatchEvent({ type: 'readystatechange' }); + _this2.dispatchEvent({ type: 'error' }); + } + }); + } + }; + + return XMLHttpRequest; + }(eventTarget(REQUEST_EVENTS)); + + objectAssign(XMLHttpRequest$1, { + UNSENT: UNSENT, + OPENED: OPENED, + HEADERS_RECEIVED: HEADERS_RECEIVED, + LOADING: LOADING, + DONE: DONE + }); + + var xmlhttprequest = XMLHttpRequest$1; + + var createClass = createCommonjsModule(function (module, exports) { + "use strict"; + + exports.__esModule = true; + + + + var _defineProperty2 = _interopRequireDefault(defineProperty$2); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + exports.default = 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; + (0, _defineProperty2.default)(target, descriptor.key, descriptor); + } + } + + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + }(); + }); + + var _createClass = unwrapExports(createClass); + + var CONNECTING = 0; + var OPEN = 1; + var CLOSING = 2; + var CLOSED = 3; + + var EVENTS = ['open', 'error', 'message', 'close']; + + var instance = void 0; + + function errorHandler(event) { + // 安卓小程序会诡异地触发 onSocketError 回调 + // 通过比较 message 过滤掉 + if (event.message === "") return; + if (instance) { + instance._readyState = CLOSED; + instance.dispatchEvent({ + type: 'error', + message: event.errMsg + }); + } + } + + var WebSocket$1 = function (_EventTarget) { + _inherits(WebSocket, _EventTarget); + + function WebSocket(url, protocal) { + _classCallCheck(this, WebSocket); + + if (!url) { + throw new TypeError('Failed to construct \'WebSocket\': url required'); + } + if (protocal) { + throw new Error('subprotocal not supported in weapp'); + } + + var _this = _possibleConstructorReturn(this, _EventTarget.call(this)); + + _this._url = url; + _this._protocal = ''; // default value according to specs + _this._readyState = CONNECTING; + if (instance) { + instance.dispatchEvent({ + type: 'close' + }); + } + instance = _this; + + wx.onSocketOpen(function (event) { + if (instance) { + instance._readyState = OPEN; + instance.dispatchEvent({ + type: 'open' + }); + } + }); + wx.onSocketError(errorHandler); + wx.onSocketMessage(function (event) { + if (instance) { + var data = event.data, + origin = event.origin, + ports = event.ports, + source = event.source; + + instance.dispatchEvent({ + data: data, + origin: origin, + ports: ports, + source: source, + type: 'message' + }); + } + }); + wx.onSocketClose(function (event) { + if (instance) { + instance._readyState = CLOSED; + var code = event.code, + reason = event.reason, + wasClean = event.wasClean; + + instance.dispatchEvent({ + code: code, + reason: reason, + wasClean: wasClean, + type: 'close' + }); + instance = null; + } + }); + + wx.connectSocket({ + url: url, + fail: function fail(error) { + return setTimeout(function () { + return errorHandler(error); + }, 0); + } + }); + return _this; + } + + WebSocket.prototype.close = function close() { + if (this.readyState === CONNECTING) { + console.warn('close WebSocket which is connecting might not work'); + } + wx.closeSocket(); + }; + + WebSocket.prototype.send = function send(data) { + if (this.readyState !== OPEN) { + throw new Error('INVALID_STATE_ERR'); + } + + if (typeof data !== 'string') { + throw new TypeError('only string typed data are supported'); + } + + wx.sendSocketMessage({ + data: data + }); + }; + + _createClass(WebSocket, [{ + key: 'url', + get: function get() { + return this._url; + } + }, { + key: 'protocal', + get: function get() { + return this._protocal; + } + }, { + key: 'readyState', + get: function get() { + return this._readyState; + } + }]); + + return WebSocket; + }(eventTarget(EVENTS)); + + objectAssign(WebSocket$1, { + CONNECTING: CONNECTING, + OPEN: OPEN, + CLOSING: CLOSING, + CLOSED: CLOSED + }); + + var websocket = WebSocket$1; + + var navigator$1 = {}; + + var weappPolyfill = { + polyfill: function polyfill() { + var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : commonjsGlobal || window; + + if ((typeof target === 'undefined' ? 'undefined' : _typeof(target)) !== 'object') { + throw new Error('polyfill target is not an Object'); + } + var polyfills = { + localStorage: localstorage, + XMLHttpRequest: xmlhttprequest, + FormData: formdata, + WebSocket: websocket, + Object: Object, + navigator: navigator$1 + }; + for (var k in polyfills) { + if (!target[k]) target[k] = polyfills[k]; + } + }, + + localStorage: localstorage, + XMLHttpRequest: xmlhttprequest, + FormData: formdata, + WebSocket: websocket + }; + + var polyfill = weappPolyfill.polyfill; + window = window || {}; + polyfill(); + polyfill(window); + try { + localStorage = localStorage || localstorage; + } catch (e) {} + try { + XMLHttpRequest = XMLHttpRequest || xmlhttprequest; + } catch (e) {} + try { + FormData = FormData || formdata; + } catch (e) {} + try { + WebSocket = WebSocket || websocket; + } catch (e) {} + try { + navigator = navigator || navigator$1; + } catch (e) {} + + // eslint-disable-next-line import/no-extraneous-dependencies + + var long_1 = createCommonjsModule(function (module) { + /* + Copyright 2013 Daniel Wirtz + Copyright 2009 The Closure Library Authors. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS-IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + + /** + * @license long.js (c) 2013 Daniel Wirtz + * Released under the Apache License, Version 2.0 + * see: https://github.com/dcodeIO/long.js for details + */ + (function(global, factory) { + + /* AMD */ if (typeof undefined === 'function' && undefined["amd"]) + undefined([], factory); + /* CommonJS */ else if (typeof commonjsRequire === 'function' && 'object' === "object" && module && module["exports"]) + module["exports"] = factory(); + /* Global */ else + (global["dcodeIO"] = global["dcodeIO"] || {})["Long"] = factory(); + + })(commonjsGlobal, function() { + "use strict"; + + /** + * Constructs a 64 bit two's-complement integer, given its low and high 32 bit values as *signed* integers. + * See the from* functions below for more convenient ways of constructing Longs. + * @exports Long + * @class A Long class for representing a 64 bit two's-complement integer value. + * @param {number} low The low (signed) 32 bits of the long + * @param {number} high The high (signed) 32 bits of the long + * @param {boolean=} unsigned Whether unsigned or not, defaults to `false` for signed + * @constructor + */ + function Long(low, high, unsigned) { + + /** + * The low 32 bits as a signed value. + * @type {number} + */ + this.low = low | 0; + + /** + * The high 32 bits as a signed value. + * @type {number} + */ + this.high = high | 0; + + /** + * Whether unsigned or not. + * @type {boolean} + */ + this.unsigned = !!unsigned; + } + + // The internal representation of a long is the two given signed, 32-bit values. + // We use 32-bit pieces because these are the size of integers on which + // Javascript performs bit-operations. For operations like addition and + // multiplication, we split each number into 16 bit pieces, which can easily be + // multiplied within Javascript's floating-point representation without overflow + // or change in sign. + // + // In the algorithms below, we frequently reduce the negative case to the + // positive case by negating the input(s) and then post-processing the result. + // Note that we must ALWAYS check specially whether those values are MIN_VALUE + // (-2^63) because -MIN_VALUE == MIN_VALUE (since 2^63 cannot be represented as + // a positive number, it overflows back into a negative). Not handling this + // case would often result in infinite recursion. + // + // Common constant values ZERO, ONE, NEG_ONE, etc. are defined below the from* + // methods on which they depend. + + /** + * An indicator used to reliably determine if an object is a Long or not. + * @type {boolean} + * @const + * @private + */ + Long.prototype.__isLong__; + + Object.defineProperty(Long.prototype, "__isLong__", { + value: true, + enumerable: false, + configurable: false + }); + + /** + * @function + * @param {*} obj Object + * @returns {boolean} + * @inner + */ + function isLong(obj) { + return (obj && obj["__isLong__"]) === true; + } + + /** + * Tests if the specified object is a Long. + * @function + * @param {*} obj Object + * @returns {boolean} + */ + Long.isLong = isLong; + + /** + * A cache of the Long representations of small integer values. + * @type {!Object} + * @inner + */ + var INT_CACHE = {}; + + /** + * A cache of the Long representations of small unsigned integer values. + * @type {!Object} + * @inner + */ + var UINT_CACHE = {}; + + /** + * @param {number} value + * @param {boolean=} unsigned + * @returns {!Long} + * @inner + */ + function fromInt(value, unsigned) { + var obj, cachedObj, cache; + if (unsigned) { + value >>>= 0; + if (cache = (0 <= value && value < 256)) { + cachedObj = UINT_CACHE[value]; + if (cachedObj) + return cachedObj; + } + obj = fromBits(value, (value | 0) < 0 ? -1 : 0, true); + if (cache) + UINT_CACHE[value] = obj; + return obj; + } else { + value |= 0; + if (cache = (-128 <= value && value < 128)) { + cachedObj = INT_CACHE[value]; + if (cachedObj) + return cachedObj; + } + obj = fromBits(value, value < 0 ? -1 : 0, false); + if (cache) + INT_CACHE[value] = obj; + return obj; + } + } + + /** + * Returns a Long representing the given 32 bit integer value. + * @function + * @param {number} value The 32 bit integer in question + * @param {boolean=} unsigned Whether unsigned or not, defaults to `false` for signed + * @returns {!Long} The corresponding Long value + */ + Long.fromInt = fromInt; + + /** + * @param {number} value + * @param {boolean=} unsigned + * @returns {!Long} + * @inner + */ + function fromNumber(value, unsigned) { + if (isNaN(value) || !isFinite(value)) + return unsigned ? UZERO : ZERO; + if (unsigned) { + if (value < 0) + return UZERO; + if (value >= TWO_PWR_64_DBL) + return MAX_UNSIGNED_VALUE; + } else { + if (value <= -TWO_PWR_63_DBL) + return MIN_VALUE; + if (value + 1 >= TWO_PWR_63_DBL) + return MAX_VALUE; + } + if (value < 0) + return fromNumber(-value, unsigned).neg(); + return fromBits((value % TWO_PWR_32_DBL) | 0, (value / TWO_PWR_32_DBL) | 0, unsigned); + } + + /** + * Returns a Long representing the given value, provided that it is a finite number. Otherwise, zero is returned. + * @function + * @param {number} value The number in question + * @param {boolean=} unsigned Whether unsigned or not, defaults to `false` for signed + * @returns {!Long} The corresponding Long value + */ + Long.fromNumber = fromNumber; + + /** + * @param {number} lowBits + * @param {number} highBits + * @param {boolean=} unsigned + * @returns {!Long} + * @inner + */ + function fromBits(lowBits, highBits, unsigned) { + return new Long(lowBits, highBits, unsigned); + } + + /** + * Returns a Long representing the 64 bit integer that comes by concatenating the given low and high bits. Each is + * assumed to use 32 bits. + * @function + * @param {number} lowBits The low 32 bits + * @param {number} highBits The high 32 bits + * @param {boolean=} unsigned Whether unsigned or not, defaults to `false` for signed + * @returns {!Long} The corresponding Long value + */ + Long.fromBits = fromBits; + + /** + * @function + * @param {number} base + * @param {number} exponent + * @returns {number} + * @inner + */ + var pow_dbl = Math.pow; // Used 4 times (4*8 to 15+4) + + /** + * @param {string} str + * @param {(boolean|number)=} unsigned + * @param {number=} radix + * @returns {!Long} + * @inner + */ + function fromString(str, unsigned, radix) { + if (str.length === 0) + throw Error('empty string'); + if (str === "NaN" || str === "Infinity" || str === "+Infinity" || str === "-Infinity") + return ZERO; + if (typeof unsigned === 'number') { + // For goog.math.long compatibility + radix = unsigned, + unsigned = false; + } else { + unsigned = !! unsigned; + } + radix = radix || 10; + if (radix < 2 || 36 < radix) + throw RangeError('radix'); + + var p; + if ((p = str.indexOf('-')) > 0) + throw Error('interior hyphen'); + else if (p === 0) { + return fromString(str.substring(1), unsigned, radix).neg(); + } + + // Do several (8) digits each time through the loop, so as to + // minimize the calls to the very expensive emulated div. + var radixToPower = fromNumber(pow_dbl(radix, 8)); + + var result = ZERO; + for (var i = 0; i < str.length; i += 8) { + var size = Math.min(8, str.length - i), + value = parseInt(str.substring(i, i + size), radix); + if (size < 8) { + var power = fromNumber(pow_dbl(radix, size)); + result = result.mul(power).add(fromNumber(value)); + } else { + result = result.mul(radixToPower); + result = result.add(fromNumber(value)); + } + } + result.unsigned = unsigned; + return result; + } + + /** + * Returns a Long representation of the given string, written using the specified radix. + * @function + * @param {string} str The textual representation of the Long + * @param {(boolean|number)=} unsigned Whether unsigned or not, defaults to `false` for signed + * @param {number=} radix The radix in which the text is written (2-36), defaults to 10 + * @returns {!Long} The corresponding Long value + */ + Long.fromString = fromString; + + /** + * @function + * @param {!Long|number|string|!{low: number, high: number, unsigned: boolean}} val + * @returns {!Long} + * @inner + */ + function fromValue(val) { + if (val /* is compatible */ instanceof Long) + return val; + if (typeof val === 'number') + return fromNumber(val); + if (typeof val === 'string') + return fromString(val); + // Throws for non-objects, converts non-instanceof Long: + return fromBits(val.low, val.high, val.unsigned); + } + + /** + * Converts the specified value to a Long. + * @function + * @param {!Long|number|string|!{low: number, high: number, unsigned: boolean}} val Value + * @returns {!Long} + */ + Long.fromValue = fromValue; + + // NOTE: the compiler should inline these constant values below and then remove these variables, so there should be + // no runtime penalty for these. + + /** + * @type {number} + * @const + * @inner + */ + var TWO_PWR_16_DBL = 1 << 16; + + /** + * @type {number} + * @const + * @inner + */ + var TWO_PWR_24_DBL = 1 << 24; + + /** + * @type {number} + * @const + * @inner + */ + var TWO_PWR_32_DBL = TWO_PWR_16_DBL * TWO_PWR_16_DBL; + + /** + * @type {number} + * @const + * @inner + */ + var TWO_PWR_64_DBL = TWO_PWR_32_DBL * TWO_PWR_32_DBL; + + /** + * @type {number} + * @const + * @inner + */ + var TWO_PWR_63_DBL = TWO_PWR_64_DBL / 2; + + /** + * @type {!Long} + * @const + * @inner + */ + var TWO_PWR_24 = fromInt(TWO_PWR_24_DBL); + + /** + * @type {!Long} + * @inner + */ + var ZERO = fromInt(0); + + /** + * Signed zero. + * @type {!Long} + */ + Long.ZERO = ZERO; + + /** + * @type {!Long} + * @inner + */ + var UZERO = fromInt(0, true); + + /** + * Unsigned zero. + * @type {!Long} + */ + Long.UZERO = UZERO; + + /** + * @type {!Long} + * @inner + */ + var ONE = fromInt(1); + + /** + * Signed one. + * @type {!Long} + */ + Long.ONE = ONE; + + /** + * @type {!Long} + * @inner + */ + var UONE = fromInt(1, true); + + /** + * Unsigned one. + * @type {!Long} + */ + Long.UONE = UONE; + + /** + * @type {!Long} + * @inner + */ + var NEG_ONE = fromInt(-1); + + /** + * Signed negative one. + * @type {!Long} + */ + Long.NEG_ONE = NEG_ONE; + + /** + * @type {!Long} + * @inner + */ + var MAX_VALUE = fromBits(0xFFFFFFFF|0, 0x7FFFFFFF|0, false); + + /** + * Maximum signed value. + * @type {!Long} + */ + Long.MAX_VALUE = MAX_VALUE; + + /** + * @type {!Long} + * @inner + */ + var MAX_UNSIGNED_VALUE = fromBits(0xFFFFFFFF|0, 0xFFFFFFFF|0, true); + + /** + * Maximum unsigned value. + * @type {!Long} + */ + Long.MAX_UNSIGNED_VALUE = MAX_UNSIGNED_VALUE; + + /** + * @type {!Long} + * @inner + */ + var MIN_VALUE = fromBits(0, 0x80000000|0, false); + + /** + * Minimum signed value. + * @type {!Long} + */ + Long.MIN_VALUE = MIN_VALUE; + + /** + * @alias Long.prototype + * @inner + */ + var LongPrototype = Long.prototype; + + /** + * Converts the Long to a 32 bit integer, assuming it is a 32 bit integer. + * @returns {number} + */ + LongPrototype.toInt = function toInt() { + return this.unsigned ? this.low >>> 0 : this.low; + }; + + /** + * Converts the Long to a the nearest floating-point representation of this value (double, 53 bit mantissa). + * @returns {number} + */ + LongPrototype.toNumber = function toNumber() { + if (this.unsigned) + return ((this.high >>> 0) * TWO_PWR_32_DBL) + (this.low >>> 0); + return this.high * TWO_PWR_32_DBL + (this.low >>> 0); + }; + + /** + * Converts the Long to a string written in the specified radix. + * @param {number=} radix Radix (2-36), defaults to 10 + * @returns {string} + * @override + * @throws {RangeError} If `radix` is out of range + */ + LongPrototype.toString = function toString(radix) { + radix = radix || 10; + if (radix < 2 || 36 < radix) + throw RangeError('radix'); + if (this.isZero()) + return '0'; + if (this.isNegative()) { // Unsigned Longs are never negative + if (this.eq(MIN_VALUE)) { + // We need to change the Long value before it can be negated, so we remove + // the bottom-most digit in this base and then recurse to do the rest. + var radixLong = fromNumber(radix), + div = this.div(radixLong), + rem1 = div.mul(radixLong).sub(this); + return div.toString(radix) + rem1.toInt().toString(radix); + } else + return '-' + this.neg().toString(radix); + } + + // Do several (6) digits each time through the loop, so as to + // minimize the calls to the very expensive emulated div. + var radixToPower = fromNumber(pow_dbl(radix, 6), this.unsigned), + rem = this; + var result = ''; + while (true) { + var remDiv = rem.div(radixToPower), + intval = rem.sub(remDiv.mul(radixToPower)).toInt() >>> 0, + digits = intval.toString(radix); + rem = remDiv; + if (rem.isZero()) + return digits + result; + else { + while (digits.length < 6) + digits = '0' + digits; + result = '' + digits + result; + } + } + }; + + /** + * Gets the high 32 bits as a signed integer. + * @returns {number} Signed high bits + */ + LongPrototype.getHighBits = function getHighBits() { + return this.high; + }; + + /** + * Gets the high 32 bits as an unsigned integer. + * @returns {number} Unsigned high bits + */ + LongPrototype.getHighBitsUnsigned = function getHighBitsUnsigned() { + return this.high >>> 0; + }; + + /** + * Gets the low 32 bits as a signed integer. + * @returns {number} Signed low bits + */ + LongPrototype.getLowBits = function getLowBits() { + return this.low; + }; + + /** + * Gets the low 32 bits as an unsigned integer. + * @returns {number} Unsigned low bits + */ + LongPrototype.getLowBitsUnsigned = function getLowBitsUnsigned() { + return this.low >>> 0; + }; + + /** + * Gets the number of bits needed to represent the absolute value of this Long. + * @returns {number} + */ + LongPrototype.getNumBitsAbs = function getNumBitsAbs() { + if (this.isNegative()) // Unsigned Longs are never negative + return this.eq(MIN_VALUE) ? 64 : this.neg().getNumBitsAbs(); + var val = this.high != 0 ? this.high : this.low; + for (var bit = 31; bit > 0; bit--) + if ((val & (1 << bit)) != 0) + break; + return this.high != 0 ? bit + 33 : bit + 1; + }; + + /** + * Tests if this Long's value equals zero. + * @returns {boolean} + */ + LongPrototype.isZero = function isZero() { + return this.high === 0 && this.low === 0; + }; + + /** + * Tests if this Long's value is negative. + * @returns {boolean} + */ + LongPrototype.isNegative = function isNegative() { + return !this.unsigned && this.high < 0; + }; + + /** + * Tests if this Long's value is positive. + * @returns {boolean} + */ + LongPrototype.isPositive = function isPositive() { + return this.unsigned || this.high >= 0; + }; + + /** + * Tests if this Long's value is odd. + * @returns {boolean} + */ + LongPrototype.isOdd = function isOdd() { + return (this.low & 1) === 1; + }; + + /** + * Tests if this Long's value is even. + * @returns {boolean} + */ + LongPrototype.isEven = function isEven() { + return (this.low & 1) === 0; + }; + + /** + * Tests if this Long's value equals the specified's. + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ + LongPrototype.equals = function equals(other) { + if (!isLong(other)) + other = fromValue(other); + if (this.unsigned !== other.unsigned && (this.high >>> 31) === 1 && (other.high >>> 31) === 1) + return false; + return this.high === other.high && this.low === other.low; + }; + + /** + * Tests if this Long's value equals the specified's. This is an alias of {@link Long#equals}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ + LongPrototype.eq = LongPrototype.equals; + + /** + * Tests if this Long's value differs from the specified's. + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ + LongPrototype.notEquals = function notEquals(other) { + return !this.eq(/* validates */ other); + }; + + /** + * Tests if this Long's value differs from the specified's. This is an alias of {@link Long#notEquals}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ + LongPrototype.neq = LongPrototype.notEquals; + + /** + * Tests if this Long's value is less than the specified's. + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ + LongPrototype.lessThan = function lessThan(other) { + return this.comp(/* validates */ other) < 0; + }; + + /** + * Tests if this Long's value is less than the specified's. This is an alias of {@link Long#lessThan}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ + LongPrototype.lt = LongPrototype.lessThan; + + /** + * Tests if this Long's value is less than or equal the specified's. + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ + LongPrototype.lessThanOrEqual = function lessThanOrEqual(other) { + return this.comp(/* validates */ other) <= 0; + }; + + /** + * Tests if this Long's value is less than or equal the specified's. This is an alias of {@link Long#lessThanOrEqual}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ + LongPrototype.lte = LongPrototype.lessThanOrEqual; + + /** + * Tests if this Long's value is greater than the specified's. + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ + LongPrototype.greaterThan = function greaterThan(other) { + return this.comp(/* validates */ other) > 0; + }; + + /** + * Tests if this Long's value is greater than the specified's. This is an alias of {@link Long#greaterThan}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ + LongPrototype.gt = LongPrototype.greaterThan; + + /** + * Tests if this Long's value is greater than or equal the specified's. + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ + LongPrototype.greaterThanOrEqual = function greaterThanOrEqual(other) { + return this.comp(/* validates */ other) >= 0; + }; + + /** + * Tests if this Long's value is greater than or equal the specified's. This is an alias of {@link Long#greaterThanOrEqual}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ + LongPrototype.gte = LongPrototype.greaterThanOrEqual; + + /** + * Compares this Long's value with the specified's. + * @param {!Long|number|string} other Other value + * @returns {number} 0 if they are the same, 1 if the this is greater and -1 + * if the given one is greater + */ + LongPrototype.compare = function compare(other) { + if (!isLong(other)) + other = fromValue(other); + if (this.eq(other)) + return 0; + var thisNeg = this.isNegative(), + otherNeg = other.isNegative(); + if (thisNeg && !otherNeg) + return -1; + if (!thisNeg && otherNeg) + return 1; + // At this point the sign bits are the same + if (!this.unsigned) + return this.sub(other).isNegative() ? -1 : 1; + // Both are positive if at least one is unsigned + return (other.high >>> 0) > (this.high >>> 0) || (other.high === this.high && (other.low >>> 0) > (this.low >>> 0)) ? -1 : 1; + }; + + /** + * Compares this Long's value with the specified's. This is an alias of {@link Long#compare}. + * @function + * @param {!Long|number|string} other Other value + * @returns {number} 0 if they are the same, 1 if the this is greater and -1 + * if the given one is greater + */ + LongPrototype.comp = LongPrototype.compare; + + /** + * Negates this Long's value. + * @returns {!Long} Negated Long + */ + LongPrototype.negate = function negate() { + if (!this.unsigned && this.eq(MIN_VALUE)) + return MIN_VALUE; + return this.not().add(ONE); + }; + + /** + * Negates this Long's value. This is an alias of {@link Long#negate}. + * @function + * @returns {!Long} Negated Long + */ + LongPrototype.neg = LongPrototype.negate; + + /** + * Returns the sum of this and the specified Long. + * @param {!Long|number|string} addend Addend + * @returns {!Long} Sum + */ + LongPrototype.add = function add(addend) { + if (!isLong(addend)) + addend = fromValue(addend); + + // Divide each number into 4 chunks of 16 bits, and then sum the chunks. + + var a48 = this.high >>> 16; + var a32 = this.high & 0xFFFF; + var a16 = this.low >>> 16; + var a00 = this.low & 0xFFFF; + + var b48 = addend.high >>> 16; + var b32 = addend.high & 0xFFFF; + var b16 = addend.low >>> 16; + var b00 = addend.low & 0xFFFF; + + var c48 = 0, c32 = 0, c16 = 0, c00 = 0; + c00 += a00 + b00; + c16 += c00 >>> 16; + c00 &= 0xFFFF; + c16 += a16 + b16; + c32 += c16 >>> 16; + c16 &= 0xFFFF; + c32 += a32 + b32; + c48 += c32 >>> 16; + c32 &= 0xFFFF; + c48 += a48 + b48; + c48 &= 0xFFFF; + return fromBits((c16 << 16) | c00, (c48 << 16) | c32, this.unsigned); + }; + + /** + * Returns the difference of this and the specified Long. + * @param {!Long|number|string} subtrahend Subtrahend + * @returns {!Long} Difference + */ + LongPrototype.subtract = function subtract(subtrahend) { + if (!isLong(subtrahend)) + subtrahend = fromValue(subtrahend); + return this.add(subtrahend.neg()); + }; + + /** + * Returns the difference of this and the specified Long. This is an alias of {@link Long#subtract}. + * @function + * @param {!Long|number|string} subtrahend Subtrahend + * @returns {!Long} Difference + */ + LongPrototype.sub = LongPrototype.subtract; + + /** + * Returns the product of this and the specified Long. + * @param {!Long|number|string} multiplier Multiplier + * @returns {!Long} Product + */ + LongPrototype.multiply = function multiply(multiplier) { + if (this.isZero()) + return ZERO; + if (!isLong(multiplier)) + multiplier = fromValue(multiplier); + if (multiplier.isZero()) + return ZERO; + if (this.eq(MIN_VALUE)) + return multiplier.isOdd() ? MIN_VALUE : ZERO; + if (multiplier.eq(MIN_VALUE)) + return this.isOdd() ? MIN_VALUE : ZERO; + + if (this.isNegative()) { + if (multiplier.isNegative()) + return this.neg().mul(multiplier.neg()); + else + return this.neg().mul(multiplier).neg(); + } else if (multiplier.isNegative()) + return this.mul(multiplier.neg()).neg(); + + // If both longs are small, use float multiplication + if (this.lt(TWO_PWR_24) && multiplier.lt(TWO_PWR_24)) + return fromNumber(this.toNumber() * multiplier.toNumber(), this.unsigned); + + // Divide each long into 4 chunks of 16 bits, and then add up 4x4 products. + // We can skip products that would overflow. + + var a48 = this.high >>> 16; + var a32 = this.high & 0xFFFF; + var a16 = this.low >>> 16; + var a00 = this.low & 0xFFFF; + + var b48 = multiplier.high >>> 16; + var b32 = multiplier.high & 0xFFFF; + var b16 = multiplier.low >>> 16; + var b00 = multiplier.low & 0xFFFF; + + var c48 = 0, c32 = 0, c16 = 0, c00 = 0; + c00 += a00 * b00; + c16 += c00 >>> 16; + c00 &= 0xFFFF; + c16 += a16 * b00; + c32 += c16 >>> 16; + c16 &= 0xFFFF; + c16 += a00 * b16; + c32 += c16 >>> 16; + c16 &= 0xFFFF; + c32 += a32 * b00; + c48 += c32 >>> 16; + c32 &= 0xFFFF; + c32 += a16 * b16; + c48 += c32 >>> 16; + c32 &= 0xFFFF; + c32 += a00 * b32; + c48 += c32 >>> 16; + c32 &= 0xFFFF; + c48 += a48 * b00 + a32 * b16 + a16 * b32 + a00 * b48; + c48 &= 0xFFFF; + return fromBits((c16 << 16) | c00, (c48 << 16) | c32, this.unsigned); + }; + + /** + * Returns the product of this and the specified Long. This is an alias of {@link Long#multiply}. + * @function + * @param {!Long|number|string} multiplier Multiplier + * @returns {!Long} Product + */ + LongPrototype.mul = LongPrototype.multiply; + + /** + * Returns this Long divided by the specified. The result is signed if this Long is signed or + * unsigned if this Long is unsigned. + * @param {!Long|number|string} divisor Divisor + * @returns {!Long} Quotient + */ + LongPrototype.divide = function divide(divisor) { + if (!isLong(divisor)) + divisor = fromValue(divisor); + if (divisor.isZero()) + throw Error('division by zero'); + if (this.isZero()) + return this.unsigned ? UZERO : ZERO; + var approx, rem, res; + if (!this.unsigned) { + // This section is only relevant for signed longs and is derived from the + // closure library as a whole. + if (this.eq(MIN_VALUE)) { + if (divisor.eq(ONE) || divisor.eq(NEG_ONE)) + return MIN_VALUE; // recall that -MIN_VALUE == MIN_VALUE + else if (divisor.eq(MIN_VALUE)) + return ONE; + else { + // At this point, we have |other| >= 2, so |this/other| < |MIN_VALUE|. + var halfThis = this.shr(1); + approx = halfThis.div(divisor).shl(1); + if (approx.eq(ZERO)) { + return divisor.isNegative() ? ONE : NEG_ONE; + } else { + rem = this.sub(divisor.mul(approx)); + res = approx.add(rem.div(divisor)); + return res; + } + } + } else if (divisor.eq(MIN_VALUE)) + return this.unsigned ? UZERO : ZERO; + if (this.isNegative()) { + if (divisor.isNegative()) + return this.neg().div(divisor.neg()); + return this.neg().div(divisor).neg(); + } else if (divisor.isNegative()) + return this.div(divisor.neg()).neg(); + res = ZERO; + } else { + // The algorithm below has not been made for unsigned longs. It's therefore + // required to take special care of the MSB prior to running it. + if (!divisor.unsigned) + divisor = divisor.toUnsigned(); + if (divisor.gt(this)) + return UZERO; + if (divisor.gt(this.shru(1))) // 15 >>> 1 = 7 ; with divisor = 8 ; true + return UONE; + res = UZERO; + } + + // Repeat the following until the remainder is less than other: find a + // floating-point that approximates remainder / other *from below*, add this + // into the result, and subtract it from the remainder. It is critical that + // the approximate value is less than or equal to the real value so that the + // remainder never becomes negative. + rem = this; + while (rem.gte(divisor)) { + // Approximate the result of division. This may be a little greater or + // smaller than the actual value. + approx = Math.max(1, Math.floor(rem.toNumber() / divisor.toNumber())); + + // We will tweak the approximate result by changing it in the 48-th digit or + // the smallest non-fractional digit, whichever is larger. + var log2 = Math.ceil(Math.log(approx) / Math.LN2), + delta = (log2 <= 48) ? 1 : pow_dbl(2, log2 - 48), + + // Decrease the approximation until it is smaller than the remainder. Note + // that if it is too large, the product overflows and is negative. + approxRes = fromNumber(approx), + approxRem = approxRes.mul(divisor); + while (approxRem.isNegative() || approxRem.gt(rem)) { + approx -= delta; + approxRes = fromNumber(approx, this.unsigned); + approxRem = approxRes.mul(divisor); + } + + // We know the answer can't be zero... and actually, zero would cause + // infinite recursion since we would make no progress. + if (approxRes.isZero()) + approxRes = ONE; + + res = res.add(approxRes); + rem = rem.sub(approxRem); + } + return res; + }; + + /** + * Returns this Long divided by the specified. This is an alias of {@link Long#divide}. + * @function + * @param {!Long|number|string} divisor Divisor + * @returns {!Long} Quotient + */ + LongPrototype.div = LongPrototype.divide; + + /** + * Returns this Long modulo the specified. + * @param {!Long|number|string} divisor Divisor + * @returns {!Long} Remainder + */ + LongPrototype.modulo = function modulo(divisor) { + if (!isLong(divisor)) + divisor = fromValue(divisor); + return this.sub(this.div(divisor).mul(divisor)); + }; + + /** + * Returns this Long modulo the specified. This is an alias of {@link Long#modulo}. + * @function + * @param {!Long|number|string} divisor Divisor + * @returns {!Long} Remainder + */ + LongPrototype.mod = LongPrototype.modulo; + + /** + * Returns the bitwise NOT of this Long. + * @returns {!Long} + */ + LongPrototype.not = function not() { + return fromBits(~this.low, ~this.high, this.unsigned); + }; + + /** + * Returns the bitwise AND of this Long and the specified. + * @param {!Long|number|string} other Other Long + * @returns {!Long} + */ + LongPrototype.and = function and(other) { + if (!isLong(other)) + other = fromValue(other); + return fromBits(this.low & other.low, this.high & other.high, this.unsigned); + }; + + /** + * Returns the bitwise OR of this Long and the specified. + * @param {!Long|number|string} other Other Long + * @returns {!Long} + */ + LongPrototype.or = function or(other) { + if (!isLong(other)) + other = fromValue(other); + return fromBits(this.low | other.low, this.high | other.high, this.unsigned); + }; + + /** + * Returns the bitwise XOR of this Long and the given one. + * @param {!Long|number|string} other Other Long + * @returns {!Long} + */ + LongPrototype.xor = function xor(other) { + if (!isLong(other)) + other = fromValue(other); + return fromBits(this.low ^ other.low, this.high ^ other.high, this.unsigned); + }; + + /** + * Returns this Long with bits shifted to the left by the given amount. + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long + */ + LongPrototype.shiftLeft = function shiftLeft(numBits) { + if (isLong(numBits)) + numBits = numBits.toInt(); + if ((numBits &= 63) === 0) + return this; + else if (numBits < 32) + return fromBits(this.low << numBits, (this.high << numBits) | (this.low >>> (32 - numBits)), this.unsigned); + else + return fromBits(0, this.low << (numBits - 32), this.unsigned); + }; + + /** + * Returns this Long with bits shifted to the left by the given amount. This is an alias of {@link Long#shiftLeft}. + * @function + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long + */ + LongPrototype.shl = LongPrototype.shiftLeft; + + /** + * Returns this Long with bits arithmetically shifted to the right by the given amount. + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long + */ + LongPrototype.shiftRight = function shiftRight(numBits) { + if (isLong(numBits)) + numBits = numBits.toInt(); + if ((numBits &= 63) === 0) + return this; + else if (numBits < 32) + return fromBits((this.low >>> numBits) | (this.high << (32 - numBits)), this.high >> numBits, this.unsigned); + else + return fromBits(this.high >> (numBits - 32), this.high >= 0 ? 0 : -1, this.unsigned); + }; + + /** + * Returns this Long with bits arithmetically shifted to the right by the given amount. This is an alias of {@link Long#shiftRight}. + * @function + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long + */ + LongPrototype.shr = LongPrototype.shiftRight; + + /** + * Returns this Long with bits logically shifted to the right by the given amount. + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long + */ + LongPrototype.shiftRightUnsigned = function shiftRightUnsigned(numBits) { + if (isLong(numBits)) + numBits = numBits.toInt(); + numBits &= 63; + if (numBits === 0) + return this; + else { + var high = this.high; + if (numBits < 32) { + var low = this.low; + return fromBits((low >>> numBits) | (high << (32 - numBits)), high >>> numBits, this.unsigned); + } else if (numBits === 32) + return fromBits(high, 0, this.unsigned); + else + return fromBits(high >>> (numBits - 32), 0, this.unsigned); + } + }; + + /** + * Returns this Long with bits logically shifted to the right by the given amount. This is an alias of {@link Long#shiftRightUnsigned}. + * @function + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long + */ + LongPrototype.shru = LongPrototype.shiftRightUnsigned; + + /** + * Converts this Long to signed. + * @returns {!Long} Signed long + */ + LongPrototype.toSigned = function toSigned() { + if (!this.unsigned) + return this; + return fromBits(this.low, this.high, false); + }; + + /** + * Converts this Long to unsigned. + * @returns {!Long} Unsigned long + */ + LongPrototype.toUnsigned = function toUnsigned() { + if (this.unsigned) + return this; + return fromBits(this.low, this.high, true); + }; + + /** + * Converts this Long to its byte representation. + * @param {boolean=} le Whether little or big endian, defaults to big endian + * @returns {!Array.} Byte representation + */ + LongPrototype.toBytes = function(le) { + return le ? this.toBytesLE() : this.toBytesBE(); + }; + + /** + * Converts this Long to its little endian byte representation. + * @returns {!Array.} Little endian byte representation + */ + LongPrototype.toBytesLE = function() { + var hi = this.high, + lo = this.low; + return [ + lo & 0xff, + (lo >>> 8) & 0xff, + (lo >>> 16) & 0xff, + (lo >>> 24) & 0xff, + hi & 0xff, + (hi >>> 8) & 0xff, + (hi >>> 16) & 0xff, + (hi >>> 24) & 0xff + ]; + }; + + /** + * Converts this Long to its big endian byte representation. + * @returns {!Array.} Big endian byte representation + */ + LongPrototype.toBytesBE = function() { + var hi = this.high, + lo = this.low; + return [ + (hi >>> 24) & 0xff, + (hi >>> 16) & 0xff, + (hi >>> 8) & 0xff, + hi & 0xff, + (lo >>> 24) & 0xff, + (lo >>> 16) & 0xff, + (lo >>> 8) & 0xff, + lo & 0xff + ]; + }; + + return Long; + }); + }); + + var bytebuffer = createCommonjsModule(function (module) { + /* + Copyright 2013-2014 Daniel Wirtz + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + + /** + * @license bytebuffer.js (c) 2015 Daniel Wirtz + * Backing buffer: ArrayBuffer, Accessor: Uint8Array + * Released under the Apache License, Version 2.0 + * see: https://github.com/dcodeIO/bytebuffer.js for details + */ + (function(global, factory) { + + /* AMD */ if (typeof undefined === 'function' && undefined["amd"]) + undefined(["long"], factory); + /* CommonJS */ else if (typeof commonjsRequire === 'function' && 'object' === "object" && module && module["exports"]) + module['exports'] = (function() { + var Long; try { Long = long_1; } catch (e) {} + return factory(Long); + })(); + /* Global */ else + (global["dcodeIO"] = global["dcodeIO"] || {})["ByteBuffer"] = factory(global["dcodeIO"]["Long"]); + + })(commonjsGlobal, function(Long) { + "use strict"; + + /** + * Constructs a new ByteBuffer. + * @class The swiss army knife for binary data in JavaScript. + * @exports ByteBuffer + * @constructor + * @param {number=} capacity Initial capacity. Defaults to {@link ByteBuffer.DEFAULT_CAPACITY}. + * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to + * {@link ByteBuffer.DEFAULT_ENDIAN}. + * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to + * {@link ByteBuffer.DEFAULT_NOASSERT}. + * @expose + */ + var ByteBuffer = function(capacity, littleEndian, noAssert) { + if (typeof capacity === 'undefined') + capacity = ByteBuffer.DEFAULT_CAPACITY; + if (typeof littleEndian === 'undefined') + littleEndian = ByteBuffer.DEFAULT_ENDIAN; + if (typeof noAssert === 'undefined') + noAssert = ByteBuffer.DEFAULT_NOASSERT; + if (!noAssert) { + capacity = capacity | 0; + if (capacity < 0) + throw RangeError("Illegal capacity"); + littleEndian = !!littleEndian; + noAssert = !!noAssert; + } + + /** + * Backing ArrayBuffer. + * @type {!ArrayBuffer} + * @expose + */ + this.buffer = capacity === 0 ? EMPTY_BUFFER : new ArrayBuffer(capacity); + + /** + * Uint8Array utilized to manipulate the backing buffer. Becomes `null` if the backing buffer has a capacity of `0`. + * @type {?Uint8Array} + * @expose + */ + this.view = capacity === 0 ? null : new Uint8Array(this.buffer); + + /** + * Absolute read/write offset. + * @type {number} + * @expose + * @see ByteBuffer#flip + * @see ByteBuffer#clear + */ + this.offset = 0; + + /** + * Marked offset. + * @type {number} + * @expose + * @see ByteBuffer#mark + * @see ByteBuffer#reset + */ + this.markedOffset = -1; + + /** + * Absolute limit of the contained data. Set to the backing buffer's capacity upon allocation. + * @type {number} + * @expose + * @see ByteBuffer#flip + * @see ByteBuffer#clear + */ + this.limit = capacity; + + /** + * Whether to use little endian byte order, defaults to `false` for big endian. + * @type {boolean} + * @expose + */ + this.littleEndian = littleEndian; + + /** + * Whether to skip assertions of offsets and values, defaults to `false`. + * @type {boolean} + * @expose + */ + this.noAssert = noAssert; + }; + + /** + * ByteBuffer version. + * @type {string} + * @const + * @expose + */ + ByteBuffer.VERSION = "5.0.1"; + + /** + * Little endian constant that can be used instead of its boolean value. Evaluates to `true`. + * @type {boolean} + * @const + * @expose + */ + ByteBuffer.LITTLE_ENDIAN = true; + + /** + * Big endian constant that can be used instead of its boolean value. Evaluates to `false`. + * @type {boolean} + * @const + * @expose + */ + ByteBuffer.BIG_ENDIAN = false; + + /** + * Default initial capacity of `16`. + * @type {number} + * @expose + */ + ByteBuffer.DEFAULT_CAPACITY = 16; + + /** + * Default endianess of `false` for big endian. + * @type {boolean} + * @expose + */ + ByteBuffer.DEFAULT_ENDIAN = ByteBuffer.BIG_ENDIAN; + + /** + * Default no assertions flag of `false`. + * @type {boolean} + * @expose + */ + ByteBuffer.DEFAULT_NOASSERT = false; + + /** + * A `Long` class for representing a 64-bit two's-complement integer value. May be `null` if Long.js has not been loaded + * and int64 support is not available. + * @type {?Long} + * @const + * @see https://github.com/dcodeIO/long.js + * @expose + */ + ByteBuffer.Long = Long || null; + + /** + * @alias ByteBuffer.prototype + * @inner + */ + var ByteBufferPrototype = ByteBuffer.prototype; + + /** + * An indicator used to reliably determine if an object is a ByteBuffer or not. + * @type {boolean} + * @const + * @expose + * @private + */ + ByteBufferPrototype.__isByteBuffer__; + + Object.defineProperty(ByteBufferPrototype, "__isByteBuffer__", { + value: true, + enumerable: false, + configurable: false + }); + + // helpers + + /** + * @type {!ArrayBuffer} + * @inner + */ + var EMPTY_BUFFER = new ArrayBuffer(0); + + /** + * String.fromCharCode reference for compile-time renaming. + * @type {function(...number):string} + * @inner + */ + var stringFromCharCode = String.fromCharCode; + + /** + * Creates a source function for a string. + * @param {string} s String to read from + * @returns {function():number|null} Source function returning the next char code respectively `null` if there are + * no more characters left. + * @throws {TypeError} If the argument is invalid + * @inner + */ + function stringSource(s) { + var i=0; return function() { + return i < s.length ? s.charCodeAt(i++) : null; + }; + } + + /** + * Creates a destination function for a string. + * @returns {function(number=):undefined|string} Destination function successively called with the next char code. + * Returns the final string when called without arguments. + * @inner + */ + function stringDestination() { + var cs = [], ps = []; return function() { + if (arguments.length === 0) + return ps.join('')+stringFromCharCode.apply(String, cs); + if (cs.length + arguments.length > 1024) + ps.push(stringFromCharCode.apply(String, cs)), + cs.length = 0; + Array.prototype.push.apply(cs, arguments); + }; + } + + /** + * Gets the accessor type. + * @returns {Function} `Buffer` under node.js, `Uint8Array` respectively `DataView` in the browser (classes) + * @expose + */ + ByteBuffer.accessor = function() { + return Uint8Array; + }; + /** + * Allocates a new ByteBuffer backed by a buffer of the specified capacity. + * @param {number=} capacity Initial capacity. Defaults to {@link ByteBuffer.DEFAULT_CAPACITY}. + * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to + * {@link ByteBuffer.DEFAULT_ENDIAN}. + * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to + * {@link ByteBuffer.DEFAULT_NOASSERT}. + * @returns {!ByteBuffer} + * @expose + */ + ByteBuffer.allocate = function(capacity, littleEndian, noAssert) { + return new ByteBuffer(capacity, littleEndian, noAssert); + }; + + /** + * Concatenates multiple ByteBuffers into one. + * @param {!Array.} buffers Buffers to concatenate + * @param {(string|boolean)=} encoding String encoding if `buffers` contains a string ("base64", "hex", "binary", + * defaults to "utf8") + * @param {boolean=} littleEndian Whether to use little or big endian byte order for the resulting ByteBuffer. Defaults + * to {@link ByteBuffer.DEFAULT_ENDIAN}. + * @param {boolean=} noAssert Whether to skip assertions of offsets and values for the resulting ByteBuffer. Defaults to + * {@link ByteBuffer.DEFAULT_NOASSERT}. + * @returns {!ByteBuffer} Concatenated ByteBuffer + * @expose + */ + ByteBuffer.concat = function(buffers, encoding, littleEndian, noAssert) { + if (typeof encoding === 'boolean' || typeof encoding !== 'string') { + noAssert = littleEndian; + littleEndian = encoding; + encoding = undefined; + } + var capacity = 0; + for (var i=0, k=buffers.length, length; i 0) capacity += length; + } + if (capacity === 0) + return new ByteBuffer(0, littleEndian, noAssert); + var bb = new ByteBuffer(capacity, littleEndian, noAssert), + bi; + i=0; while (i} buffer Anything that can be wrapped + * @param {(string|boolean)=} encoding String encoding if `buffer` is a string ("base64", "hex", "binary", defaults to + * "utf8") + * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to + * {@link ByteBuffer.DEFAULT_ENDIAN}. + * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to + * {@link ByteBuffer.DEFAULT_NOASSERT}. + * @returns {!ByteBuffer} A ByteBuffer wrapping `buffer` + * @expose + */ + ByteBuffer.wrap = function(buffer, encoding, littleEndian, noAssert) { + if (typeof encoding !== 'string') { + noAssert = littleEndian; + littleEndian = encoding; + encoding = undefined; + } + if (typeof buffer === 'string') { + if (typeof encoding === 'undefined') + encoding = "utf8"; + switch (encoding) { + case "base64": + return ByteBuffer.fromBase64(buffer, littleEndian); + case "hex": + return ByteBuffer.fromHex(buffer, littleEndian); + case "binary": + return ByteBuffer.fromBinary(buffer, littleEndian); + case "utf8": + return ByteBuffer.fromUTF8(buffer, littleEndian); + case "debug": + return ByteBuffer.fromDebug(buffer, littleEndian); + default: + throw Error("Unsupported encoding: "+encoding); + } + } + if (buffer === null || typeof buffer !== 'object') + throw TypeError("Illegal buffer"); + var bb; + if (ByteBuffer.isByteBuffer(buffer)) { + bb = ByteBufferPrototype.clone.call(buffer); + bb.markedOffset = -1; + return bb; + } + if (buffer instanceof Uint8Array) { // Extract ArrayBuffer from Uint8Array + bb = new ByteBuffer(0, littleEndian, noAssert); + if (buffer.length > 0) { // Avoid references to more than one EMPTY_BUFFER + bb.buffer = buffer.buffer; + bb.offset = buffer.byteOffset; + bb.limit = buffer.byteOffset + buffer.byteLength; + bb.view = new Uint8Array(buffer.buffer); + } + } else if (buffer instanceof ArrayBuffer) { // Reuse ArrayBuffer + bb = new ByteBuffer(0, littleEndian, noAssert); + if (buffer.byteLength > 0) { + bb.buffer = buffer; + bb.offset = 0; + bb.limit = buffer.byteLength; + bb.view = buffer.byteLength > 0 ? new Uint8Array(buffer) : null; + } + } else if (Object.prototype.toString.call(buffer) === "[object Array]") { // Create from octets + bb = new ByteBuffer(buffer.length, littleEndian, noAssert); + bb.limit = buffer.length; + for (var i=0; i} value Array of booleans to write + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `length` if omitted. + * @returns {!ByteBuffer} + * @expose + */ + ByteBufferPrototype.writeBitSet = function(value, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (!(value instanceof Array)) + throw TypeError("Illegal BitSet: Not an array"); + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + + var start = offset, + bits = value.length, + bytes = (bits >> 3), + bit = 0, + k; + + offset += this.writeVarint32(bits,offset); + + while(bytes--) { + k = (!!value[bit++] & 1) | + ((!!value[bit++] & 1) << 1) | + ((!!value[bit++] & 1) << 2) | + ((!!value[bit++] & 1) << 3) | + ((!!value[bit++] & 1) << 4) | + ((!!value[bit++] & 1) << 5) | + ((!!value[bit++] & 1) << 6) | + ((!!value[bit++] & 1) << 7); + this.writeByte(k,offset++); + } + + if(bit < bits) { + var m = 0; k = 0; + while(bit < bits) k = k | ((!!value[bit++] & 1) << (m++)); + this.writeByte(k,offset++); + } + + if (relative) { + this.offset = offset; + return this; + } + return offset - start; + }; + + /** + * Reads a BitSet as an array of booleans. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `length` if omitted. + * @returns {Array + * @expose + */ + ByteBufferPrototype.readBitSet = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + + var ret = this.readVarint32(offset), + bits = ret.value, + bytes = (bits >> 3), + bit = 0, + value = [], + k; + + offset += ret.length; + + while(bytes--) { + k = this.readByte(offset++); + value[bit++] = !!(k & 0x01); + value[bit++] = !!(k & 0x02); + value[bit++] = !!(k & 0x04); + value[bit++] = !!(k & 0x08); + value[bit++] = !!(k & 0x10); + value[bit++] = !!(k & 0x20); + value[bit++] = !!(k & 0x40); + value[bit++] = !!(k & 0x80); + } + + if(bit < bits) { + var m = 0; + k = this.readByte(offset++); + while(bit < bits) value[bit++] = !!((k >> (m++)) & 1); + } + + if (relative) { + this.offset = offset; + } + return value; + }; + /** + * Reads the specified number of bytes. + * @param {number} length Number of bytes to read + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `length` if omitted. + * @returns {!ByteBuffer} + * @expose + */ + ByteBufferPrototype.readBytes = function(length, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + length > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+length+") <= "+this.buffer.byteLength); + } + var slice = this.slice(offset, offset + length); + if (relative) this.offset += length; + return slice; + }; + + /** + * Writes a payload of bytes. This is an alias of {@link ByteBuffer#append}. + * @function + * @param {!ByteBuffer|!ArrayBuffer|!Uint8Array|string} source Data to write. If `source` is a ByteBuffer, its offsets + * will be modified according to the performed read operation. + * @param {(string|number)=} encoding Encoding if `data` is a string ("base64", "hex", "binary", defaults to "utf8") + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.writeBytes = ByteBufferPrototype.append; + + // types/ints/int8 + + /** + * Writes an 8bit signed integer. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.writeInt8 = function(value, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof value !== 'number' || value % 1 !== 0) + throw TypeError("Illegal value: "+value+" (not an integer)"); + value |= 0; + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + offset += 1; + var capacity0 = this.buffer.byteLength; + if (offset > capacity0) + this.resize((capacity0 *= 2) > offset ? capacity0 : offset); + offset -= 1; + this.view[offset] = value; + if (relative) this.offset += 1; + return this; + }; + + /** + * Writes an 8bit signed integer. This is an alias of {@link ByteBuffer#writeInt8}. + * @function + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.writeByte = ByteBufferPrototype.writeInt8; + + /** + * Reads an 8bit signed integer. + * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. + * @returns {number} Value read + * @expose + */ + ByteBufferPrototype.readInt8 = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 1 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+1+") <= "+this.buffer.byteLength); + } + var value = this.view[offset]; + if ((value & 0x80) === 0x80) value = -(0xFF - value + 1); // Cast to signed + if (relative) this.offset += 1; + return value; + }; + + /** + * Reads an 8bit signed integer. This is an alias of {@link ByteBuffer#readInt8}. + * @function + * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. + * @returns {number} Value read + * @expose + */ + ByteBufferPrototype.readByte = ByteBufferPrototype.readInt8; + + /** + * Writes an 8bit unsigned integer. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.writeUint8 = function(value, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof value !== 'number' || value % 1 !== 0) + throw TypeError("Illegal value: "+value+" (not an integer)"); + value >>>= 0; + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + offset += 1; + var capacity1 = this.buffer.byteLength; + if (offset > capacity1) + this.resize((capacity1 *= 2) > offset ? capacity1 : offset); + offset -= 1; + this.view[offset] = value; + if (relative) this.offset += 1; + return this; + }; + + /** + * Writes an 8bit unsigned integer. This is an alias of {@link ByteBuffer#writeUint8}. + * @function + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.writeUInt8 = ByteBufferPrototype.writeUint8; + + /** + * Reads an 8bit unsigned integer. + * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. + * @returns {number} Value read + * @expose + */ + ByteBufferPrototype.readUint8 = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 1 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+1+") <= "+this.buffer.byteLength); + } + var value = this.view[offset]; + if (relative) this.offset += 1; + return value; + }; + + /** + * Reads an 8bit unsigned integer. This is an alias of {@link ByteBuffer#readUint8}. + * @function + * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. + * @returns {number} Value read + * @expose + */ + ByteBufferPrototype.readUInt8 = ByteBufferPrototype.readUint8; + + // types/ints/int16 + + /** + * Writes a 16bit signed integer. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. + * @throws {TypeError} If `offset` or `value` is not a valid number + * @throws {RangeError} If `offset` is out of bounds + * @expose + */ + ByteBufferPrototype.writeInt16 = function(value, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof value !== 'number' || value % 1 !== 0) + throw TypeError("Illegal value: "+value+" (not an integer)"); + value |= 0; + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + offset += 2; + var capacity2 = this.buffer.byteLength; + if (offset > capacity2) + this.resize((capacity2 *= 2) > offset ? capacity2 : offset); + offset -= 2; + if (this.littleEndian) { + this.view[offset+1] = (value & 0xFF00) >>> 8; + this.view[offset ] = value & 0x00FF; + } else { + this.view[offset] = (value & 0xFF00) >>> 8; + this.view[offset+1] = value & 0x00FF; + } + if (relative) this.offset += 2; + return this; + }; + + /** + * Writes a 16bit signed integer. This is an alias of {@link ByteBuffer#writeInt16}. + * @function + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. + * @throws {TypeError} If `offset` or `value` is not a valid number + * @throws {RangeError} If `offset` is out of bounds + * @expose + */ + ByteBufferPrototype.writeShort = ByteBufferPrototype.writeInt16; + + /** + * Reads a 16bit signed integer. + * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. + * @returns {number} Value read + * @throws {TypeError} If `offset` is not a valid number + * @throws {RangeError} If `offset` is out of bounds + * @expose + */ + ByteBufferPrototype.readInt16 = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 2 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+2+") <= "+this.buffer.byteLength); + } + var value = 0; + if (this.littleEndian) { + value = this.view[offset ]; + value |= this.view[offset+1] << 8; + } else { + value = this.view[offset ] << 8; + value |= this.view[offset+1]; + } + if ((value & 0x8000) === 0x8000) value = -(0xFFFF - value + 1); // Cast to signed + if (relative) this.offset += 2; + return value; + }; + + /** + * Reads a 16bit signed integer. This is an alias of {@link ByteBuffer#readInt16}. + * @function + * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. + * @returns {number} Value read + * @throws {TypeError} If `offset` is not a valid number + * @throws {RangeError} If `offset` is out of bounds + * @expose + */ + ByteBufferPrototype.readShort = ByteBufferPrototype.readInt16; + + /** + * Writes a 16bit unsigned integer. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. + * @throws {TypeError} If `offset` or `value` is not a valid number + * @throws {RangeError} If `offset` is out of bounds + * @expose + */ + ByteBufferPrototype.writeUint16 = function(value, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof value !== 'number' || value % 1 !== 0) + throw TypeError("Illegal value: "+value+" (not an integer)"); + value >>>= 0; + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + offset += 2; + var capacity3 = this.buffer.byteLength; + if (offset > capacity3) + this.resize((capacity3 *= 2) > offset ? capacity3 : offset); + offset -= 2; + if (this.littleEndian) { + this.view[offset+1] = (value & 0xFF00) >>> 8; + this.view[offset ] = value & 0x00FF; + } else { + this.view[offset] = (value & 0xFF00) >>> 8; + this.view[offset+1] = value & 0x00FF; + } + if (relative) this.offset += 2; + return this; + }; + + /** + * Writes a 16bit unsigned integer. This is an alias of {@link ByteBuffer#writeUint16}. + * @function + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. + * @throws {TypeError} If `offset` or `value` is not a valid number + * @throws {RangeError} If `offset` is out of bounds + * @expose + */ + ByteBufferPrototype.writeUInt16 = ByteBufferPrototype.writeUint16; + + /** + * Reads a 16bit unsigned integer. + * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. + * @returns {number} Value read + * @throws {TypeError} If `offset` is not a valid number + * @throws {RangeError} If `offset` is out of bounds + * @expose + */ + ByteBufferPrototype.readUint16 = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 2 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+2+") <= "+this.buffer.byteLength); + } + var value = 0; + if (this.littleEndian) { + value = this.view[offset ]; + value |= this.view[offset+1] << 8; + } else { + value = this.view[offset ] << 8; + value |= this.view[offset+1]; + } + if (relative) this.offset += 2; + return value; + }; + + /** + * Reads a 16bit unsigned integer. This is an alias of {@link ByteBuffer#readUint16}. + * @function + * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. + * @returns {number} Value read + * @throws {TypeError} If `offset` is not a valid number + * @throws {RangeError} If `offset` is out of bounds + * @expose + */ + ByteBufferPrototype.readUInt16 = ByteBufferPrototype.readUint16; + + // types/ints/int32 + + /** + * Writes a 32bit signed integer. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @expose + */ + ByteBufferPrototype.writeInt32 = function(value, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof value !== 'number' || value % 1 !== 0) + throw TypeError("Illegal value: "+value+" (not an integer)"); + value |= 0; + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + offset += 4; + var capacity4 = this.buffer.byteLength; + if (offset > capacity4) + this.resize((capacity4 *= 2) > offset ? capacity4 : offset); + offset -= 4; + if (this.littleEndian) { + this.view[offset+3] = (value >>> 24) & 0xFF; + this.view[offset+2] = (value >>> 16) & 0xFF; + this.view[offset+1] = (value >>> 8) & 0xFF; + this.view[offset ] = value & 0xFF; + } else { + this.view[offset ] = (value >>> 24) & 0xFF; + this.view[offset+1] = (value >>> 16) & 0xFF; + this.view[offset+2] = (value >>> 8) & 0xFF; + this.view[offset+3] = value & 0xFF; + } + if (relative) this.offset += 4; + return this; + }; + + /** + * Writes a 32bit signed integer. This is an alias of {@link ByteBuffer#writeInt32}. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @expose + */ + ByteBufferPrototype.writeInt = ByteBufferPrototype.writeInt32; + + /** + * Reads a 32bit signed integer. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @returns {number} Value read + * @expose + */ + ByteBufferPrototype.readInt32 = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 4 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+4+") <= "+this.buffer.byteLength); + } + var value = 0; + if (this.littleEndian) { + value = this.view[offset+2] << 16; + value |= this.view[offset+1] << 8; + value |= this.view[offset ]; + value += this.view[offset+3] << 24 >>> 0; + } else { + value = this.view[offset+1] << 16; + value |= this.view[offset+2] << 8; + value |= this.view[offset+3]; + value += this.view[offset ] << 24 >>> 0; + } + value |= 0; // Cast to signed + if (relative) this.offset += 4; + return value; + }; + + /** + * Reads a 32bit signed integer. This is an alias of {@link ByteBuffer#readInt32}. + * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `4` if omitted. + * @returns {number} Value read + * @expose + */ + ByteBufferPrototype.readInt = ByteBufferPrototype.readInt32; + + /** + * Writes a 32bit unsigned integer. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @expose + */ + ByteBufferPrototype.writeUint32 = function(value, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof value !== 'number' || value % 1 !== 0) + throw TypeError("Illegal value: "+value+" (not an integer)"); + value >>>= 0; + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + offset += 4; + var capacity5 = this.buffer.byteLength; + if (offset > capacity5) + this.resize((capacity5 *= 2) > offset ? capacity5 : offset); + offset -= 4; + if (this.littleEndian) { + this.view[offset+3] = (value >>> 24) & 0xFF; + this.view[offset+2] = (value >>> 16) & 0xFF; + this.view[offset+1] = (value >>> 8) & 0xFF; + this.view[offset ] = value & 0xFF; + } else { + this.view[offset ] = (value >>> 24) & 0xFF; + this.view[offset+1] = (value >>> 16) & 0xFF; + this.view[offset+2] = (value >>> 8) & 0xFF; + this.view[offset+3] = value & 0xFF; + } + if (relative) this.offset += 4; + return this; + }; + + /** + * Writes a 32bit unsigned integer. This is an alias of {@link ByteBuffer#writeUint32}. + * @function + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @expose + */ + ByteBufferPrototype.writeUInt32 = ByteBufferPrototype.writeUint32; + + /** + * Reads a 32bit unsigned integer. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @returns {number} Value read + * @expose + */ + ByteBufferPrototype.readUint32 = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 4 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+4+") <= "+this.buffer.byteLength); + } + var value = 0; + if (this.littleEndian) { + value = this.view[offset+2] << 16; + value |= this.view[offset+1] << 8; + value |= this.view[offset ]; + value += this.view[offset+3] << 24 >>> 0; + } else { + value = this.view[offset+1] << 16; + value |= this.view[offset+2] << 8; + value |= this.view[offset+3]; + value += this.view[offset ] << 24 >>> 0; + } + if (relative) this.offset += 4; + return value; + }; + + /** + * Reads a 32bit unsigned integer. This is an alias of {@link ByteBuffer#readUint32}. + * @function + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @returns {number} Value read + * @expose + */ + ByteBufferPrototype.readUInt32 = ByteBufferPrototype.readUint32; + + // types/ints/int64 + + if (Long) { + + /** + * Writes a 64bit signed integer. + * @param {number|!Long} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.writeInt64 = function(value, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof value === 'number') + value = Long.fromNumber(value); + else if (typeof value === 'string') + value = Long.fromString(value); + else if (!(value && value instanceof Long)) + throw TypeError("Illegal value: "+value+" (not an integer or Long)"); + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + if (typeof value === 'number') + value = Long.fromNumber(value); + else if (typeof value === 'string') + value = Long.fromString(value); + offset += 8; + var capacity6 = this.buffer.byteLength; + if (offset > capacity6) + this.resize((capacity6 *= 2) > offset ? capacity6 : offset); + offset -= 8; + var lo = value.low, + hi = value.high; + if (this.littleEndian) { + this.view[offset+3] = (lo >>> 24) & 0xFF; + this.view[offset+2] = (lo >>> 16) & 0xFF; + this.view[offset+1] = (lo >>> 8) & 0xFF; + this.view[offset ] = lo & 0xFF; + offset += 4; + this.view[offset+3] = (hi >>> 24) & 0xFF; + this.view[offset+2] = (hi >>> 16) & 0xFF; + this.view[offset+1] = (hi >>> 8) & 0xFF; + this.view[offset ] = hi & 0xFF; + } else { + this.view[offset ] = (hi >>> 24) & 0xFF; + this.view[offset+1] = (hi >>> 16) & 0xFF; + this.view[offset+2] = (hi >>> 8) & 0xFF; + this.view[offset+3] = hi & 0xFF; + offset += 4; + this.view[offset ] = (lo >>> 24) & 0xFF; + this.view[offset+1] = (lo >>> 16) & 0xFF; + this.view[offset+2] = (lo >>> 8) & 0xFF; + this.view[offset+3] = lo & 0xFF; + } + if (relative) this.offset += 8; + return this; + }; + + /** + * Writes a 64bit signed integer. This is an alias of {@link ByteBuffer#writeInt64}. + * @param {number|!Long} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.writeLong = ByteBufferPrototype.writeInt64; + + /** + * Reads a 64bit signed integer. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {!Long} + * @expose + */ + ByteBufferPrototype.readInt64 = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 8 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+8+") <= "+this.buffer.byteLength); + } + var lo = 0, + hi = 0; + if (this.littleEndian) { + lo = this.view[offset+2] << 16; + lo |= this.view[offset+1] << 8; + lo |= this.view[offset ]; + lo += this.view[offset+3] << 24 >>> 0; + offset += 4; + hi = this.view[offset+2] << 16; + hi |= this.view[offset+1] << 8; + hi |= this.view[offset ]; + hi += this.view[offset+3] << 24 >>> 0; + } else { + hi = this.view[offset+1] << 16; + hi |= this.view[offset+2] << 8; + hi |= this.view[offset+3]; + hi += this.view[offset ] << 24 >>> 0; + offset += 4; + lo = this.view[offset+1] << 16; + lo |= this.view[offset+2] << 8; + lo |= this.view[offset+3]; + lo += this.view[offset ] << 24 >>> 0; + } + var value = new Long(lo, hi, false); + if (relative) this.offset += 8; + return value; + }; + + /** + * Reads a 64bit signed integer. This is an alias of {@link ByteBuffer#readInt64}. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {!Long} + * @expose + */ + ByteBufferPrototype.readLong = ByteBufferPrototype.readInt64; + + /** + * Writes a 64bit unsigned integer. + * @param {number|!Long} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.writeUint64 = function(value, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof value === 'number') + value = Long.fromNumber(value); + else if (typeof value === 'string') + value = Long.fromString(value); + else if (!(value && value instanceof Long)) + throw TypeError("Illegal value: "+value+" (not an integer or Long)"); + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + if (typeof value === 'number') + value = Long.fromNumber(value); + else if (typeof value === 'string') + value = Long.fromString(value); + offset += 8; + var capacity7 = this.buffer.byteLength; + if (offset > capacity7) + this.resize((capacity7 *= 2) > offset ? capacity7 : offset); + offset -= 8; + var lo = value.low, + hi = value.high; + if (this.littleEndian) { + this.view[offset+3] = (lo >>> 24) & 0xFF; + this.view[offset+2] = (lo >>> 16) & 0xFF; + this.view[offset+1] = (lo >>> 8) & 0xFF; + this.view[offset ] = lo & 0xFF; + offset += 4; + this.view[offset+3] = (hi >>> 24) & 0xFF; + this.view[offset+2] = (hi >>> 16) & 0xFF; + this.view[offset+1] = (hi >>> 8) & 0xFF; + this.view[offset ] = hi & 0xFF; + } else { + this.view[offset ] = (hi >>> 24) & 0xFF; + this.view[offset+1] = (hi >>> 16) & 0xFF; + this.view[offset+2] = (hi >>> 8) & 0xFF; + this.view[offset+3] = hi & 0xFF; + offset += 4; + this.view[offset ] = (lo >>> 24) & 0xFF; + this.view[offset+1] = (lo >>> 16) & 0xFF; + this.view[offset+2] = (lo >>> 8) & 0xFF; + this.view[offset+3] = lo & 0xFF; + } + if (relative) this.offset += 8; + return this; + }; + + /** + * Writes a 64bit unsigned integer. This is an alias of {@link ByteBuffer#writeUint64}. + * @function + * @param {number|!Long} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.writeUInt64 = ByteBufferPrototype.writeUint64; + + /** + * Reads a 64bit unsigned integer. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {!Long} + * @expose + */ + ByteBufferPrototype.readUint64 = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 8 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+8+") <= "+this.buffer.byteLength); + } + var lo = 0, + hi = 0; + if (this.littleEndian) { + lo = this.view[offset+2] << 16; + lo |= this.view[offset+1] << 8; + lo |= this.view[offset ]; + lo += this.view[offset+3] << 24 >>> 0; + offset += 4; + hi = this.view[offset+2] << 16; + hi |= this.view[offset+1] << 8; + hi |= this.view[offset ]; + hi += this.view[offset+3] << 24 >>> 0; + } else { + hi = this.view[offset+1] << 16; + hi |= this.view[offset+2] << 8; + hi |= this.view[offset+3]; + hi += this.view[offset ] << 24 >>> 0; + offset += 4; + lo = this.view[offset+1] << 16; + lo |= this.view[offset+2] << 8; + lo |= this.view[offset+3]; + lo += this.view[offset ] << 24 >>> 0; + } + var value = new Long(lo, hi, true); + if (relative) this.offset += 8; + return value; + }; + + /** + * Reads a 64bit unsigned integer. This is an alias of {@link ByteBuffer#readUint64}. + * @function + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {!Long} + * @expose + */ + ByteBufferPrototype.readUInt64 = ByteBufferPrototype.readUint64; + + } // Long + + + // types/floats/float32 + + /* + ieee754 - https://github.com/feross/ieee754 + + The MIT License (MIT) + + Copyright (c) Feross Aboukhadijeh + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + + /** + * Reads an IEEE754 float from a byte array. + * @param {!Array} buffer + * @param {number} offset + * @param {boolean} isLE + * @param {number} mLen + * @param {number} nBytes + * @returns {number} + * @inner + */ + function ieee754_read(buffer, offset, isLE, mLen, nBytes) { + var e, m, + eLen = nBytes * 8 - mLen - 1, + eMax = (1 << eLen) - 1, + eBias = eMax >> 1, + nBits = -7, + i = isLE ? (nBytes - 1) : 0, + d = isLE ? -1 : 1, + s = buffer[offset + i]; + + i += d; + + e = s & ((1 << (-nBits)) - 1); + s >>= (-nBits); + nBits += eLen; + for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {} + + m = e & ((1 << (-nBits)) - 1); + e >>= (-nBits); + nBits += mLen; + for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {} + + if (e === 0) { + e = 1 - eBias; + } else if (e === eMax) { + return m ? NaN : ((s ? -1 : 1) * Infinity); + } else { + m = m + Math.pow(2, mLen); + e = e - eBias; + } + return (s ? -1 : 1) * m * Math.pow(2, e - mLen); + } + + /** + * Writes an IEEE754 float to a byte array. + * @param {!Array} buffer + * @param {number} value + * @param {number} offset + * @param {boolean} isLE + * @param {number} mLen + * @param {number} nBytes + * @inner + */ + function ieee754_write(buffer, value, offset, isLE, mLen, nBytes) { + var e, m, c, + eLen = nBytes * 8 - mLen - 1, + eMax = (1 << eLen) - 1, + eBias = eMax >> 1, + rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0), + i = isLE ? 0 : (nBytes - 1), + d = isLE ? 1 : -1, + s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0; + + value = Math.abs(value); + + if (isNaN(value) || value === Infinity) { + m = isNaN(value) ? 1 : 0; + e = eMax; + } else { + e = Math.floor(Math.log(value) / Math.LN2); + if (value * (c = Math.pow(2, -e)) < 1) { + e--; + c *= 2; + } + if (e + eBias >= 1) { + value += rt / c; + } else { + value += rt * Math.pow(2, 1 - eBias); + } + if (value * c >= 2) { + e++; + c /= 2; + } + + if (e + eBias >= eMax) { + m = 0; + e = eMax; + } else if (e + eBias >= 1) { + m = (value * c - 1) * Math.pow(2, mLen); + e = e + eBias; + } else { + m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen); + e = 0; + } + } + + for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} + + e = (e << mLen) | m; + eLen += mLen; + for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} + + buffer[offset + i - d] |= s * 128; + } + + /** + * Writes a 32bit float. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.writeFloat32 = function(value, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof value !== 'number') + throw TypeError("Illegal value: "+value+" (not a number)"); + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + offset += 4; + var capacity8 = this.buffer.byteLength; + if (offset > capacity8) + this.resize((capacity8 *= 2) > offset ? capacity8 : offset); + offset -= 4; + ieee754_write(this.view, value, offset, this.littleEndian, 23, 4); + if (relative) this.offset += 4; + return this; + }; + + /** + * Writes a 32bit float. This is an alias of {@link ByteBuffer#writeFloat32}. + * @function + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.writeFloat = ByteBufferPrototype.writeFloat32; + + /** + * Reads a 32bit float. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @returns {number} + * @expose + */ + ByteBufferPrototype.readFloat32 = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 4 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+4+") <= "+this.buffer.byteLength); + } + var value = ieee754_read(this.view, offset, this.littleEndian, 23, 4); + if (relative) this.offset += 4; + return value; + }; + + /** + * Reads a 32bit float. This is an alias of {@link ByteBuffer#readFloat32}. + * @function + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @returns {number} + * @expose + */ + ByteBufferPrototype.readFloat = ByteBufferPrototype.readFloat32; + + // types/floats/float64 + + /** + * Writes a 64bit float. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.writeFloat64 = function(value, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof value !== 'number') + throw TypeError("Illegal value: "+value+" (not a number)"); + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + offset += 8; + var capacity9 = this.buffer.byteLength; + if (offset > capacity9) + this.resize((capacity9 *= 2) > offset ? capacity9 : offset); + offset -= 8; + ieee754_write(this.view, value, offset, this.littleEndian, 52, 8); + if (relative) this.offset += 8; + return this; + }; + + /** + * Writes a 64bit float. This is an alias of {@link ByteBuffer#writeFloat64}. + * @function + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.writeDouble = ByteBufferPrototype.writeFloat64; + + /** + * Reads a 64bit float. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {number} + * @expose + */ + ByteBufferPrototype.readFloat64 = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 8 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+8+") <= "+this.buffer.byteLength); + } + var value = ieee754_read(this.view, offset, this.littleEndian, 52, 8); + if (relative) this.offset += 8; + return value; + }; + + /** + * Reads a 64bit float. This is an alias of {@link ByteBuffer#readFloat64}. + * @function + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {number} + * @expose + */ + ByteBufferPrototype.readDouble = ByteBufferPrototype.readFloat64; + + + // types/varints/varint32 + + /** + * Maximum number of bytes required to store a 32bit base 128 variable-length integer. + * @type {number} + * @const + * @expose + */ + ByteBuffer.MAX_VARINT32_BYTES = 5; + + /** + * Calculates the actual number of bytes required to store a 32bit base 128 variable-length integer. + * @param {number} value Value to encode + * @returns {number} Number of bytes required. Capped to {@link ByteBuffer.MAX_VARINT32_BYTES} + * @expose + */ + ByteBuffer.calculateVarint32 = function(value) { + // ref: src/google/protobuf/io/coded_stream.cc + value = value >>> 0; + if (value < 1 << 7 ) return 1; + else if (value < 1 << 14) return 2; + else if (value < 1 << 21) return 3; + else if (value < 1 << 28) return 4; + else return 5; + }; + + /** + * Zigzag encodes a signed 32bit integer so that it can be effectively used with varint encoding. + * @param {number} n Signed 32bit integer + * @returns {number} Unsigned zigzag encoded 32bit integer + * @expose + */ + ByteBuffer.zigZagEncode32 = function(n) { + return (((n |= 0) << 1) ^ (n >> 31)) >>> 0; // ref: src/google/protobuf/wire_format_lite.h + }; + + /** + * Decodes a zigzag encoded signed 32bit integer. + * @param {number} n Unsigned zigzag encoded 32bit integer + * @returns {number} Signed 32bit integer + * @expose + */ + ByteBuffer.zigZagDecode32 = function(n) { + return ((n >>> 1) ^ -(n & 1)) | 0; // // ref: src/google/protobuf/wire_format_lite.h + }; + + /** + * Writes a 32bit base 128 variable-length integer. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. + * @returns {!ByteBuffer|number} this if `offset` is omitted, else the actual number of bytes written + * @expose + */ + ByteBufferPrototype.writeVarint32 = function(value, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof value !== 'number' || value % 1 !== 0) + throw TypeError("Illegal value: "+value+" (not an integer)"); + value |= 0; + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + var size = ByteBuffer.calculateVarint32(value), + b; + offset += size; + var capacity10 = this.buffer.byteLength; + if (offset > capacity10) + this.resize((capacity10 *= 2) > offset ? capacity10 : offset); + offset -= size; + value >>>= 0; + while (value >= 0x80) { + b = (value & 0x7f) | 0x80; + this.view[offset++] = b; + value >>>= 7; + } + this.view[offset++] = value; + if (relative) { + this.offset = offset; + return this; + } + return size; + }; + + /** + * Writes a zig-zag encoded (signed) 32bit base 128 variable-length integer. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. + * @returns {!ByteBuffer|number} this if `offset` is omitted, else the actual number of bytes written + * @expose + */ + ByteBufferPrototype.writeVarint32ZigZag = function(value, offset) { + return this.writeVarint32(ByteBuffer.zigZagEncode32(value), offset); + }; + + /** + * Reads a 32bit base 128 variable-length integer. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. + * @returns {number|!{value: number, length: number}} The value read if offset is omitted, else the value read + * and the actual number of bytes read. + * @throws {Error} If it's not a valid varint. Has a property `truncated = true` if there is not enough data available + * to fully decode the varint. + * @expose + */ + ByteBufferPrototype.readVarint32 = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 1 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+1+") <= "+this.buffer.byteLength); + } + var c = 0, + value = 0 >>> 0, + b; + do { + if (!this.noAssert && offset > this.limit) { + var err = Error("Truncated"); + err['truncated'] = true; + throw err; + } + b = this.view[offset++]; + if (c < 5) + value |= (b & 0x7f) << (7*c); + ++c; + } while ((b & 0x80) !== 0); + value |= 0; + if (relative) { + this.offset = offset; + return value; + } + return { + "value": value, + "length": c + }; + }; + + /** + * Reads a zig-zag encoded (signed) 32bit base 128 variable-length integer. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. + * @returns {number|!{value: number, length: number}} The value read if offset is omitted, else the value read + * and the actual number of bytes read. + * @throws {Error} If it's not a valid varint + * @expose + */ + ByteBufferPrototype.readVarint32ZigZag = function(offset) { + var val = this.readVarint32(offset); + if (typeof val === 'object') + val["value"] = ByteBuffer.zigZagDecode32(val["value"]); + else + val = ByteBuffer.zigZagDecode32(val); + return val; + }; + + // types/varints/varint64 + + if (Long) { + + /** + * Maximum number of bytes required to store a 64bit base 128 variable-length integer. + * @type {number} + * @const + * @expose + */ + ByteBuffer.MAX_VARINT64_BYTES = 10; + + /** + * Calculates the actual number of bytes required to store a 64bit base 128 variable-length integer. + * @param {number|!Long} value Value to encode + * @returns {number} Number of bytes required. Capped to {@link ByteBuffer.MAX_VARINT64_BYTES} + * @expose + */ + ByteBuffer.calculateVarint64 = function(value) { + if (typeof value === 'number') + value = Long.fromNumber(value); + else if (typeof value === 'string') + value = Long.fromString(value); + // ref: src/google/protobuf/io/coded_stream.cc + var part0 = value.toInt() >>> 0, + part1 = value.shiftRightUnsigned(28).toInt() >>> 0, + part2 = value.shiftRightUnsigned(56).toInt() >>> 0; + if (part2 == 0) { + if (part1 == 0) { + if (part0 < 1 << 14) + return part0 < 1 << 7 ? 1 : 2; + else + return part0 < 1 << 21 ? 3 : 4; + } else { + if (part1 < 1 << 14) + return part1 < 1 << 7 ? 5 : 6; + else + return part1 < 1 << 21 ? 7 : 8; + } + } else + return part2 < 1 << 7 ? 9 : 10; + }; + + /** + * Zigzag encodes a signed 64bit integer so that it can be effectively used with varint encoding. + * @param {number|!Long} value Signed long + * @returns {!Long} Unsigned zigzag encoded long + * @expose + */ + ByteBuffer.zigZagEncode64 = function(value) { + if (typeof value === 'number') + value = Long.fromNumber(value, false); + else if (typeof value === 'string') + value = Long.fromString(value, false); + else if (value.unsigned !== false) value = value.toSigned(); + // ref: src/google/protobuf/wire_format_lite.h + return value.shiftLeft(1).xor(value.shiftRight(63)).toUnsigned(); + }; + + /** + * Decodes a zigzag encoded signed 64bit integer. + * @param {!Long|number} value Unsigned zigzag encoded long or JavaScript number + * @returns {!Long} Signed long + * @expose + */ + ByteBuffer.zigZagDecode64 = function(value) { + if (typeof value === 'number') + value = Long.fromNumber(value, false); + else if (typeof value === 'string') + value = Long.fromString(value, false); + else if (value.unsigned !== false) value = value.toSigned(); + // ref: src/google/protobuf/wire_format_lite.h + return value.shiftRightUnsigned(1).xor(value.and(Long.ONE).toSigned().negate()).toSigned(); + }; + + /** + * Writes a 64bit base 128 variable-length integer. + * @param {number|Long} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. + * @returns {!ByteBuffer|number} `this` if offset is omitted, else the actual number of bytes written. + * @expose + */ + ByteBufferPrototype.writeVarint64 = function(value, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof value === 'number') + value = Long.fromNumber(value); + else if (typeof value === 'string') + value = Long.fromString(value); + else if (!(value && value instanceof Long)) + throw TypeError("Illegal value: "+value+" (not an integer or Long)"); + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + if (typeof value === 'number') + value = Long.fromNumber(value, false); + else if (typeof value === 'string') + value = Long.fromString(value, false); + else if (value.unsigned !== false) value = value.toSigned(); + var size = ByteBuffer.calculateVarint64(value), + part0 = value.toInt() >>> 0, + part1 = value.shiftRightUnsigned(28).toInt() >>> 0, + part2 = value.shiftRightUnsigned(56).toInt() >>> 0; + offset += size; + var capacity11 = this.buffer.byteLength; + if (offset > capacity11) + this.resize((capacity11 *= 2) > offset ? capacity11 : offset); + offset -= size; + switch (size) { + case 10: this.view[offset+9] = (part2 >>> 7) & 0x01; + case 9 : this.view[offset+8] = size !== 9 ? (part2 ) | 0x80 : (part2 ) & 0x7F; + case 8 : this.view[offset+7] = size !== 8 ? (part1 >>> 21) | 0x80 : (part1 >>> 21) & 0x7F; + case 7 : this.view[offset+6] = size !== 7 ? (part1 >>> 14) | 0x80 : (part1 >>> 14) & 0x7F; + case 6 : this.view[offset+5] = size !== 6 ? (part1 >>> 7) | 0x80 : (part1 >>> 7) & 0x7F; + case 5 : this.view[offset+4] = size !== 5 ? (part1 ) | 0x80 : (part1 ) & 0x7F; + case 4 : this.view[offset+3] = size !== 4 ? (part0 >>> 21) | 0x80 : (part0 >>> 21) & 0x7F; + case 3 : this.view[offset+2] = size !== 3 ? (part0 >>> 14) | 0x80 : (part0 >>> 14) & 0x7F; + case 2 : this.view[offset+1] = size !== 2 ? (part0 >>> 7) | 0x80 : (part0 >>> 7) & 0x7F; + case 1 : this.view[offset ] = size !== 1 ? (part0 ) | 0x80 : (part0 ) & 0x7F; + } + if (relative) { + this.offset += size; + return this; + } else { + return size; + } + }; + + /** + * Writes a zig-zag encoded 64bit base 128 variable-length integer. + * @param {number|Long} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. + * @returns {!ByteBuffer|number} `this` if offset is omitted, else the actual number of bytes written. + * @expose + */ + ByteBufferPrototype.writeVarint64ZigZag = function(value, offset) { + return this.writeVarint64(ByteBuffer.zigZagEncode64(value), offset); + }; + + /** + * Reads a 64bit base 128 variable-length integer. Requires Long.js. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * read if omitted. + * @returns {!Long|!{value: Long, length: number}} The value read if offset is omitted, else the value read and + * the actual number of bytes read. + * @throws {Error} If it's not a valid varint + * @expose + */ + ByteBufferPrototype.readVarint64 = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 1 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+1+") <= "+this.buffer.byteLength); + } + // ref: src/google/protobuf/io/coded_stream.cc + var start = offset, + part0 = 0, + part1 = 0, + part2 = 0, + b = 0; + b = this.view[offset++]; part0 = (b & 0x7F) ; if ( b & 0x80 ) { + b = this.view[offset++]; part0 |= (b & 0x7F) << 7; if ((b & 0x80) || (this.noAssert && typeof b === 'undefined')) { + b = this.view[offset++]; part0 |= (b & 0x7F) << 14; if ((b & 0x80) || (this.noAssert && typeof b === 'undefined')) { + b = this.view[offset++]; part0 |= (b & 0x7F) << 21; if ((b & 0x80) || (this.noAssert && typeof b === 'undefined')) { + b = this.view[offset++]; part1 = (b & 0x7F) ; if ((b & 0x80) || (this.noAssert && typeof b === 'undefined')) { + b = this.view[offset++]; part1 |= (b & 0x7F) << 7; if ((b & 0x80) || (this.noAssert && typeof b === 'undefined')) { + b = this.view[offset++]; part1 |= (b & 0x7F) << 14; if ((b & 0x80) || (this.noAssert && typeof b === 'undefined')) { + b = this.view[offset++]; part1 |= (b & 0x7F) << 21; if ((b & 0x80) || (this.noAssert && typeof b === 'undefined')) { + b = this.view[offset++]; part2 = (b & 0x7F) ; if ((b & 0x80) || (this.noAssert && typeof b === 'undefined')) { + b = this.view[offset++]; part2 |= (b & 0x7F) << 7; if ((b & 0x80) || (this.noAssert && typeof b === 'undefined')) { + throw Error("Buffer overrun"); }}}}}}}}}} + var value = Long.fromBits(part0 | (part1 << 28), (part1 >>> 4) | (part2) << 24, false); + if (relative) { + this.offset = offset; + return value; + } else { + return { + 'value': value, + 'length': offset-start + }; + } + }; + + /** + * Reads a zig-zag encoded 64bit base 128 variable-length integer. Requires Long.js. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * read if omitted. + * @returns {!Long|!{value: Long, length: number}} The value read if offset is omitted, else the value read and + * the actual number of bytes read. + * @throws {Error} If it's not a valid varint + * @expose + */ + ByteBufferPrototype.readVarint64ZigZag = function(offset) { + var val = this.readVarint64(offset); + if (val && val['value'] instanceof Long) + val["value"] = ByteBuffer.zigZagDecode64(val["value"]); + else + val = ByteBuffer.zigZagDecode64(val); + return val; + }; + + } // Long + + + // types/strings/cstring + + /** + * Writes a NULL-terminated UTF8 encoded string. For this to work the specified string must not contain any NULL + * characters itself. + * @param {string} str String to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * contained in `str` + 1 if omitted. + * @returns {!ByteBuffer|number} this if offset is omitted, else the actual number of bytes written + * @expose + */ + ByteBufferPrototype.writeCString = function(str, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + var i, + k = str.length; + if (!this.noAssert) { + if (typeof str !== 'string') + throw TypeError("Illegal str: Not a string"); + for (i=0; i>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + // UTF8 strings do not contain zero bytes in between except for the zero character, so: + k = utfx.calculateUTF16asUTF8(stringSource(str))[1]; + offset += k+1; + var capacity12 = this.buffer.byteLength; + if (offset > capacity12) + this.resize((capacity12 *= 2) > offset ? capacity12 : offset); + offset -= k+1; + utfx.encodeUTF16toUTF8(stringSource(str), function(b) { + this.view[offset++] = b; + }.bind(this)); + this.view[offset++] = 0; + if (relative) { + this.offset = offset; + return this; + } + return k; + }; + + /** + * Reads a NULL-terminated UTF8 encoded string. For this to work the string read must not contain any NULL characters + * itself. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * read if omitted. + * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string + * read and the actual number of bytes read. + * @expose + */ + ByteBufferPrototype.readCString = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 1 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+1+") <= "+this.buffer.byteLength); + } + var start = offset, + temp; + // UTF8 strings do not contain zero bytes in between except for the zero character itself, so: + var sd, b = -1; + utfx.decodeUTF8toUTF16(function() { + if (b === 0) return null; + if (offset >= this.limit) + throw RangeError("Illegal range: Truncated data, "+offset+" < "+this.limit); + b = this.view[offset++]; + return b === 0 ? null : b; + }.bind(this), sd = stringDestination(), true); + if (relative) { + this.offset = offset; + return sd(); + } else { + return { + "string": sd(), + "length": offset - start + }; + } + }; + + // types/strings/istring + + /** + * Writes a length as uint32 prefixed UTF8 encoded string. + * @param {string} str String to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. + * @returns {!ByteBuffer|number} `this` if `offset` is omitted, else the actual number of bytes written + * @expose + * @see ByteBuffer#writeVarint32 + */ + ByteBufferPrototype.writeIString = function(str, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof str !== 'string') + throw TypeError("Illegal str: Not a string"); + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + var start = offset, + k; + k = utfx.calculateUTF16asUTF8(stringSource(str), this.noAssert)[1]; + offset += 4+k; + var capacity13 = this.buffer.byteLength; + if (offset > capacity13) + this.resize((capacity13 *= 2) > offset ? capacity13 : offset); + offset -= 4+k; + if (this.littleEndian) { + this.view[offset+3] = (k >>> 24) & 0xFF; + this.view[offset+2] = (k >>> 16) & 0xFF; + this.view[offset+1] = (k >>> 8) & 0xFF; + this.view[offset ] = k & 0xFF; + } else { + this.view[offset ] = (k >>> 24) & 0xFF; + this.view[offset+1] = (k >>> 16) & 0xFF; + this.view[offset+2] = (k >>> 8) & 0xFF; + this.view[offset+3] = k & 0xFF; + } + offset += 4; + utfx.encodeUTF16toUTF8(stringSource(str), function(b) { + this.view[offset++] = b; + }.bind(this)); + if (offset !== start + 4 + k) + throw RangeError("Illegal range: Truncated data, "+offset+" == "+(offset+4+k)); + if (relative) { + this.offset = offset; + return this; + } + return offset - start; + }; + + /** + * Reads a length as uint32 prefixed UTF8 encoded string. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * read if omitted. + * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string + * read and the actual number of bytes read. + * @expose + * @see ByteBuffer#readVarint32 + */ + ByteBufferPrototype.readIString = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 4 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+4+") <= "+this.buffer.byteLength); + } + var start = offset; + var len = this.readUint32(offset); + var str = this.readUTF8String(len, ByteBuffer.METRICS_BYTES, offset += 4); + offset += str['length']; + if (relative) { + this.offset = offset; + return str['string']; + } else { + return { + 'string': str['string'], + 'length': offset - start + }; + } + }; + + // types/strings/utf8string + + /** + * Metrics representing number of UTF8 characters. Evaluates to `c`. + * @type {string} + * @const + * @expose + */ + ByteBuffer.METRICS_CHARS = 'c'; + + /** + * Metrics representing number of bytes. Evaluates to `b`. + * @type {string} + * @const + * @expose + */ + ByteBuffer.METRICS_BYTES = 'b'; + + /** + * Writes an UTF8 encoded string. + * @param {string} str String to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} if omitted. + * @returns {!ByteBuffer|number} this if offset is omitted, else the actual number of bytes written. + * @expose + */ + ByteBufferPrototype.writeUTF8String = function(str, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + var k; + var start = offset; + k = utfx.calculateUTF16asUTF8(stringSource(str))[1]; + offset += k; + var capacity14 = this.buffer.byteLength; + if (offset > capacity14) + this.resize((capacity14 *= 2) > offset ? capacity14 : offset); + offset -= k; + utfx.encodeUTF16toUTF8(stringSource(str), function(b) { + this.view[offset++] = b; + }.bind(this)); + if (relative) { + this.offset = offset; + return this; + } + return offset - start; + }; + + /** + * Writes an UTF8 encoded string. This is an alias of {@link ByteBuffer#writeUTF8String}. + * @function + * @param {string} str String to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} if omitted. + * @returns {!ByteBuffer|number} this if offset is omitted, else the actual number of bytes written. + * @expose + */ + ByteBufferPrototype.writeString = ByteBufferPrototype.writeUTF8String; + + /** + * Calculates the number of UTF8 characters of a string. JavaScript itself uses UTF-16, so that a string's + * `length` property does not reflect its actual UTF8 size if it contains code points larger than 0xFFFF. + * @param {string} str String to calculate + * @returns {number} Number of UTF8 characters + * @expose + */ + ByteBuffer.calculateUTF8Chars = function(str) { + return utfx.calculateUTF16asUTF8(stringSource(str))[0]; + }; + + /** + * Calculates the number of UTF8 bytes of a string. + * @param {string} str String to calculate + * @returns {number} Number of UTF8 bytes + * @expose + */ + ByteBuffer.calculateUTF8Bytes = function(str) { + return utfx.calculateUTF16asUTF8(stringSource(str))[1]; + }; + + /** + * Calculates the number of UTF8 bytes of a string. This is an alias of {@link ByteBuffer.calculateUTF8Bytes}. + * @function + * @param {string} str String to calculate + * @returns {number} Number of UTF8 bytes + * @expose + */ + ByteBuffer.calculateString = ByteBuffer.calculateUTF8Bytes; + + /** + * Reads an UTF8 encoded string. + * @param {number} length Number of characters or bytes to read. + * @param {string=} metrics Metrics specifying what `length` is meant to count. Defaults to + * {@link ByteBuffer.METRICS_CHARS}. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * read if omitted. + * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string + * read and the actual number of bytes read. + * @expose + */ + ByteBufferPrototype.readUTF8String = function(length, metrics, offset) { + if (typeof metrics === 'number') { + offset = metrics; + metrics = undefined; + } + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (typeof metrics === 'undefined') metrics = ByteBuffer.METRICS_CHARS; + if (!this.noAssert) { + if (typeof length !== 'number' || length % 1 !== 0) + throw TypeError("Illegal length: "+length+" (not an integer)"); + length |= 0; + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + var i = 0, + start = offset, + sd; + if (metrics === ByteBuffer.METRICS_CHARS) { // The same for node and the browser + sd = stringDestination(); + utfx.decodeUTF8(function() { + return i < length && offset < this.limit ? this.view[offset++] : null; + }.bind(this), function(cp) { + ++i; utfx.UTF8toUTF16(cp, sd); + }); + if (i !== length) + throw RangeError("Illegal range: Truncated data, "+i+" == "+length); + if (relative) { + this.offset = offset; + return sd(); + } else { + return { + "string": sd(), + "length": offset - start + }; + } + } else if (metrics === ByteBuffer.METRICS_BYTES) { + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + length > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+length+") <= "+this.buffer.byteLength); + } + var k = offset + length; + utfx.decodeUTF8toUTF16(function() { + return offset < k ? this.view[offset++] : null; + }.bind(this), sd = stringDestination(), this.noAssert); + if (offset !== k) + throw RangeError("Illegal range: Truncated data, "+offset+" == "+k); + if (relative) { + this.offset = offset; + return sd(); + } else { + return { + 'string': sd(), + 'length': offset - start + }; + } + } else + throw TypeError("Unsupported metrics: "+metrics); + }; + + /** + * Reads an UTF8 encoded string. This is an alias of {@link ByteBuffer#readUTF8String}. + * @function + * @param {number} length Number of characters or bytes to read + * @param {number=} metrics Metrics specifying what `n` is meant to count. Defaults to + * {@link ByteBuffer.METRICS_CHARS}. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * read if omitted. + * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string + * read and the actual number of bytes read. + * @expose + */ + ByteBufferPrototype.readString = ByteBufferPrototype.readUTF8String; + + // types/strings/vstring + + /** + * Writes a length as varint32 prefixed UTF8 encoded string. + * @param {string} str String to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. + * @returns {!ByteBuffer|number} `this` if `offset` is omitted, else the actual number of bytes written + * @expose + * @see ByteBuffer#writeVarint32 + */ + ByteBufferPrototype.writeVString = function(str, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof str !== 'string') + throw TypeError("Illegal str: Not a string"); + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + var start = offset, + k, l; + k = utfx.calculateUTF16asUTF8(stringSource(str), this.noAssert)[1]; + l = ByteBuffer.calculateVarint32(k); + offset += l+k; + var capacity15 = this.buffer.byteLength; + if (offset > capacity15) + this.resize((capacity15 *= 2) > offset ? capacity15 : offset); + offset -= l+k; + offset += this.writeVarint32(k, offset); + utfx.encodeUTF16toUTF8(stringSource(str), function(b) { + this.view[offset++] = b; + }.bind(this)); + if (offset !== start+k+l) + throw RangeError("Illegal range: Truncated data, "+offset+" == "+(offset+k+l)); + if (relative) { + this.offset = offset; + return this; + } + return offset - start; + }; + + /** + * Reads a length as varint32 prefixed UTF8 encoded string. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * read if omitted. + * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string + * read and the actual number of bytes read. + * @expose + * @see ByteBuffer#readVarint32 + */ + ByteBufferPrototype.readVString = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 1 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+1+") <= "+this.buffer.byteLength); + } + var start = offset; + var len = this.readVarint32(offset); + var str = this.readUTF8String(len['value'], ByteBuffer.METRICS_BYTES, offset += len['length']); + offset += str['length']; + if (relative) { + this.offset = offset; + return str['string']; + } else { + return { + 'string': str['string'], + 'length': offset - start + }; + } + }; + + + /** + * Appends some data to this ByteBuffer. This will overwrite any contents behind the specified offset up to the appended + * data's length. + * @param {!ByteBuffer|!ArrayBuffer|!Uint8Array|string} source Data to append. If `source` is a ByteBuffer, its offsets + * will be modified according to the performed read operation. + * @param {(string|number)=} encoding Encoding if `data` is a string ("base64", "hex", "binary", defaults to "utf8") + * @param {number=} offset Offset to append at. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. + * @returns {!ByteBuffer} this + * @expose + * @example A relative `<01 02>03.append(<04 05>)` will result in `<01 02 04 05>, 04 05|` + * @example An absolute `<01 02>03.append(04 05>, 1)` will result in `<01 04>05, 04 05|` + */ + ByteBufferPrototype.append = function(source, encoding, offset) { + if (typeof encoding === 'number' || typeof encoding !== 'string') { + offset = encoding; + encoding = undefined; + } + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + if (!(source instanceof ByteBuffer)) + source = ByteBuffer.wrap(source, encoding); + var length = source.limit - source.offset; + if (length <= 0) return this; // Nothing to append + offset += length; + var capacity16 = this.buffer.byteLength; + if (offset > capacity16) + this.resize((capacity16 *= 2) > offset ? capacity16 : offset); + offset -= length; + this.view.set(source.view.subarray(source.offset, source.limit), offset); + source.offset += length; + if (relative) this.offset += length; + return this; + }; + + /** + * Appends this ByteBuffer's contents to another ByteBuffer. This will overwrite any contents at and after the + specified offset up to the length of this ByteBuffer's data. + * @param {!ByteBuffer} target Target ByteBuffer + * @param {number=} offset Offset to append to. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * read if omitted. + * @returns {!ByteBuffer} this + * @expose + * @see ByteBuffer#append + */ + ByteBufferPrototype.appendTo = function(target, offset) { + target.append(this, offset); + return this; + }; + + /** + * Enables or disables assertions of argument types and offsets. Assertions are enabled by default but you can opt to + * disable them if your code already makes sure that everything is valid. + * @param {boolean} assert `true` to enable assertions, otherwise `false` + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.assert = function(assert) { + this.noAssert = !assert; + return this; + }; + + /** + * Gets the capacity of this ByteBuffer's backing buffer. + * @returns {number} Capacity of the backing buffer + * @expose + */ + ByteBufferPrototype.capacity = function() { + return this.buffer.byteLength; + }; + /** + * Clears this ByteBuffer's offsets by setting {@link ByteBuffer#offset} to `0` and {@link ByteBuffer#limit} to the + * backing buffer's capacity. Discards {@link ByteBuffer#markedOffset}. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.clear = function() { + this.offset = 0; + this.limit = this.buffer.byteLength; + this.markedOffset = -1; + return this; + }; + + /** + * Creates a cloned instance of this ByteBuffer, preset with this ByteBuffer's values for {@link ByteBuffer#offset}, + * {@link ByteBuffer#markedOffset} and {@link ByteBuffer#limit}. + * @param {boolean=} copy Whether to copy the backing buffer or to return another view on the same, defaults to `false` + * @returns {!ByteBuffer} Cloned instance + * @expose + */ + ByteBufferPrototype.clone = function(copy) { + var bb = new ByteBuffer(0, this.littleEndian, this.noAssert); + if (copy) { + bb.buffer = new ArrayBuffer(this.buffer.byteLength); + bb.view = new Uint8Array(bb.buffer); + } else { + bb.buffer = this.buffer; + bb.view = this.view; + } + bb.offset = this.offset; + bb.markedOffset = this.markedOffset; + bb.limit = this.limit; + return bb; + }; + + /** + * Compacts this ByteBuffer to be backed by a {@link ByteBuffer#buffer} of its contents' length. Contents are the bytes + * between {@link ByteBuffer#offset} and {@link ByteBuffer#limit}. Will set `offset = 0` and `limit = capacity` and + * adapt {@link ByteBuffer#markedOffset} to the same relative position if set. + * @param {number=} begin Offset to start at, defaults to {@link ByteBuffer#offset} + * @param {number=} end Offset to end at, defaults to {@link ByteBuffer#limit} + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.compact = function(begin, end) { + if (typeof begin === 'undefined') begin = this.offset; + if (typeof end === 'undefined') end = this.limit; + if (!this.noAssert) { + if (typeof begin !== 'number' || begin % 1 !== 0) + throw TypeError("Illegal begin: Not an integer"); + begin >>>= 0; + if (typeof end !== 'number' || end % 1 !== 0) + throw TypeError("Illegal end: Not an integer"); + end >>>= 0; + if (begin < 0 || begin > end || end > this.buffer.byteLength) + throw RangeError("Illegal range: 0 <= "+begin+" <= "+end+" <= "+this.buffer.byteLength); + } + if (begin === 0 && end === this.buffer.byteLength) + return this; // Already compacted + var len = end - begin; + if (len === 0) { + this.buffer = EMPTY_BUFFER; + this.view = null; + if (this.markedOffset >= 0) this.markedOffset -= begin; + this.offset = 0; + this.limit = 0; + return this; + } + var buffer = new ArrayBuffer(len); + var view = new Uint8Array(buffer); + view.set(this.view.subarray(begin, end)); + this.buffer = buffer; + this.view = view; + if (this.markedOffset >= 0) this.markedOffset -= begin; + this.offset = 0; + this.limit = len; + return this; + }; + + /** + * Creates a copy of this ByteBuffer's contents. Contents are the bytes between {@link ByteBuffer#offset} and + * {@link ByteBuffer#limit}. + * @param {number=} begin Begin offset, defaults to {@link ByteBuffer#offset}. + * @param {number=} end End offset, defaults to {@link ByteBuffer#limit}. + * @returns {!ByteBuffer} Copy + * @expose + */ + ByteBufferPrototype.copy = function(begin, end) { + if (typeof begin === 'undefined') begin = this.offset; + if (typeof end === 'undefined') end = this.limit; + if (!this.noAssert) { + if (typeof begin !== 'number' || begin % 1 !== 0) + throw TypeError("Illegal begin: Not an integer"); + begin >>>= 0; + if (typeof end !== 'number' || end % 1 !== 0) + throw TypeError("Illegal end: Not an integer"); + end >>>= 0; + if (begin < 0 || begin > end || end > this.buffer.byteLength) + throw RangeError("Illegal range: 0 <= "+begin+" <= "+end+" <= "+this.buffer.byteLength); + } + if (begin === end) + return new ByteBuffer(0, this.littleEndian, this.noAssert); + var capacity = end - begin, + bb = new ByteBuffer(capacity, this.littleEndian, this.noAssert); + bb.offset = 0; + bb.limit = capacity; + if (bb.markedOffset >= 0) bb.markedOffset -= begin; + this.copyTo(bb, 0, begin, end); + return bb; + }; + + /** + * Copies this ByteBuffer's contents to another ByteBuffer. Contents are the bytes between {@link ByteBuffer#offset} and + * {@link ByteBuffer#limit}. + * @param {!ByteBuffer} target Target ByteBuffer + * @param {number=} targetOffset Offset to copy to. Will use and increase the target's {@link ByteBuffer#offset} + * by the number of bytes copied if omitted. + * @param {number=} sourceOffset Offset to start copying from. Will use and increase {@link ByteBuffer#offset} by the + * number of bytes copied if omitted. + * @param {number=} sourceLimit Offset to end copying from, defaults to {@link ByteBuffer#limit} + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.copyTo = function(target, targetOffset, sourceOffset, sourceLimit) { + var relative, + targetRelative; + if (!this.noAssert) { + if (!ByteBuffer.isByteBuffer(target)) + throw TypeError("Illegal target: Not a ByteBuffer"); + } + targetOffset = (targetRelative = typeof targetOffset === 'undefined') ? target.offset : targetOffset | 0; + sourceOffset = (relative = typeof sourceOffset === 'undefined') ? this.offset : sourceOffset | 0; + sourceLimit = typeof sourceLimit === 'undefined' ? this.limit : sourceLimit | 0; + + if (targetOffset < 0 || targetOffset > target.buffer.byteLength) + throw RangeError("Illegal target range: 0 <= "+targetOffset+" <= "+target.buffer.byteLength); + if (sourceOffset < 0 || sourceLimit > this.buffer.byteLength) + throw RangeError("Illegal source range: 0 <= "+sourceOffset+" <= "+this.buffer.byteLength); + + var len = sourceLimit - sourceOffset; + if (len === 0) + return target; // Nothing to copy + + target.ensureCapacity(targetOffset + len); + + target.view.set(this.view.subarray(sourceOffset, sourceLimit), targetOffset); + + if (relative) this.offset += len; + if (targetRelative) target.offset += len; + + return this; + }; + + /** + * Makes sure that this ByteBuffer is backed by a {@link ByteBuffer#buffer} of at least the specified capacity. If the + * current capacity is exceeded, it will be doubled. If double the current capacity is less than the required capacity, + * the required capacity will be used instead. + * @param {number} capacity Required capacity + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.ensureCapacity = function(capacity) { + var current = this.buffer.byteLength; + if (current < capacity) + return this.resize((current *= 2) > capacity ? current : capacity); + return this; + }; + + /** + * Overwrites this ByteBuffer's contents with the specified value. Contents are the bytes between + * {@link ByteBuffer#offset} and {@link ByteBuffer#limit}. + * @param {number|string} value Byte value to fill with. If given as a string, the first character is used. + * @param {number=} begin Begin offset. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. defaults to {@link ByteBuffer#offset}. + * @param {number=} end End offset, defaults to {@link ByteBuffer#limit}. + * @returns {!ByteBuffer} this + * @expose + * @example `someByteBuffer.clear().fill(0)` fills the entire backing buffer with zeroes + */ + ByteBufferPrototype.fill = function(value, begin, end) { + var relative = typeof begin === 'undefined'; + if (relative) begin = this.offset; + if (typeof value === 'string' && value.length > 0) + value = value.charCodeAt(0); + if (typeof begin === 'undefined') begin = this.offset; + if (typeof end === 'undefined') end = this.limit; + if (!this.noAssert) { + if (typeof value !== 'number' || value % 1 !== 0) + throw TypeError("Illegal value: "+value+" (not an integer)"); + value |= 0; + if (typeof begin !== 'number' || begin % 1 !== 0) + throw TypeError("Illegal begin: Not an integer"); + begin >>>= 0; + if (typeof end !== 'number' || end % 1 !== 0) + throw TypeError("Illegal end: Not an integer"); + end >>>= 0; + if (begin < 0 || begin > end || end > this.buffer.byteLength) + throw RangeError("Illegal range: 0 <= "+begin+" <= "+end+" <= "+this.buffer.byteLength); + } + if (begin >= end) + return this; // Nothing to fill + while (begin < end) this.view[begin++] = value; + if (relative) this.offset = begin; + return this; + }; + + /** + * Makes this ByteBuffer ready for a new sequence of write or relative read operations. Sets `limit = offset` and + * `offset = 0`. Make sure always to flip a ByteBuffer when all relative read or write operations are complete. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.flip = function() { + this.limit = this.offset; + this.offset = 0; + return this; + }; + /** + * Marks an offset on this ByteBuffer to be used later. + * @param {number=} offset Offset to mark. Defaults to {@link ByteBuffer#offset}. + * @returns {!ByteBuffer} this + * @throws {TypeError} If `offset` is not a valid number + * @throws {RangeError} If `offset` is out of bounds + * @see ByteBuffer#reset + * @expose + */ + ByteBufferPrototype.mark = function(offset) { + offset = typeof offset === 'undefined' ? this.offset : offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + this.markedOffset = offset; + return this; + }; + /** + * Sets the byte order. + * @param {boolean} littleEndian `true` for little endian byte order, `false` for big endian + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.order = function(littleEndian) { + if (!this.noAssert) { + if (typeof littleEndian !== 'boolean') + throw TypeError("Illegal littleEndian: Not a boolean"); + } + this.littleEndian = !!littleEndian; + return this; + }; + + /** + * Switches (to) little endian byte order. + * @param {boolean=} littleEndian Defaults to `true`, otherwise uses big endian + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.LE = function(littleEndian) { + this.littleEndian = typeof littleEndian !== 'undefined' ? !!littleEndian : true; + return this; + }; + + /** + * Switches (to) big endian byte order. + * @param {boolean=} bigEndian Defaults to `true`, otherwise uses little endian + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.BE = function(bigEndian) { + this.littleEndian = typeof bigEndian !== 'undefined' ? !bigEndian : false; + return this; + }; + /** + * Prepends some data to this ByteBuffer. This will overwrite any contents before the specified offset up to the + * prepended data's length. If there is not enough space available before the specified `offset`, the backing buffer + * will be resized and its contents moved accordingly. + * @param {!ByteBuffer|string|!ArrayBuffer} source Data to prepend. If `source` is a ByteBuffer, its offset will be + * modified according to the performed read operation. + * @param {(string|number)=} encoding Encoding if `data` is a string ("base64", "hex", "binary", defaults to "utf8") + * @param {number=} offset Offset to prepend at. Will use and decrease {@link ByteBuffer#offset} by the number of bytes + * prepended if omitted. + * @returns {!ByteBuffer} this + * @expose + * @example A relative `00<01 02 03>.prepend(<04 05>)` results in `<04 05 01 02 03>, 04 05|` + * @example An absolute `00<01 02 03>.prepend(<04 05>, 2)` results in `04<05 02 03>, 04 05|` + */ + ByteBufferPrototype.prepend = function(source, encoding, offset) { + if (typeof encoding === 'number' || typeof encoding !== 'string') { + offset = encoding; + encoding = undefined; + } + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + if (!(source instanceof ByteBuffer)) + source = ByteBuffer.wrap(source, encoding); + var len = source.limit - source.offset; + if (len <= 0) return this; // Nothing to prepend + var diff = len - offset; + if (diff > 0) { // Not enough space before offset, so resize + move + var buffer = new ArrayBuffer(this.buffer.byteLength + diff); + var view = new Uint8Array(buffer); + view.set(this.view.subarray(offset, this.buffer.byteLength), len); + this.buffer = buffer; + this.view = view; + this.offset += diff; + if (this.markedOffset >= 0) this.markedOffset += diff; + this.limit += diff; + offset += diff; + } else { + var arrayView = new Uint8Array(this.buffer); + } + this.view.set(source.view.subarray(source.offset, source.limit), offset - len); + + source.offset = source.limit; + if (relative) + this.offset -= len; + return this; + }; + + /** + * Prepends this ByteBuffer to another ByteBuffer. This will overwrite any contents before the specified offset up to the + * prepended data's length. If there is not enough space available before the specified `offset`, the backing buffer + * will be resized and its contents moved accordingly. + * @param {!ByteBuffer} target Target ByteBuffer + * @param {number=} offset Offset to prepend at. Will use and decrease {@link ByteBuffer#offset} by the number of bytes + * prepended if omitted. + * @returns {!ByteBuffer} this + * @expose + * @see ByteBuffer#prepend + */ + ByteBufferPrototype.prependTo = function(target, offset) { + target.prepend(this, offset); + return this; + }; + /** + * Prints debug information about this ByteBuffer's contents. + * @param {function(string)=} out Output function to call, defaults to console.log + * @expose + */ + ByteBufferPrototype.printDebug = function(out) { + if (typeof out !== 'function') out = console.log.bind(console); + out( + this.toString()+"\n"+ + "-------------------------------------------------------------------\n"+ + this.toDebug(/* columns */ true) + ); + }; + + /** + * Gets the number of remaining readable bytes. Contents are the bytes between {@link ByteBuffer#offset} and + * {@link ByteBuffer#limit}, so this returns `limit - offset`. + * @returns {number} Remaining readable bytes. May be negative if `offset > limit`. + * @expose + */ + ByteBufferPrototype.remaining = function() { + return this.limit - this.offset; + }; + /** + * Resets this ByteBuffer's {@link ByteBuffer#offset}. If an offset has been marked through {@link ByteBuffer#mark} + * before, `offset` will be set to {@link ByteBuffer#markedOffset}, which will then be discarded. If no offset has been + * marked, sets `offset = 0`. + * @returns {!ByteBuffer} this + * @see ByteBuffer#mark + * @expose + */ + ByteBufferPrototype.reset = function() { + if (this.markedOffset >= 0) { + this.offset = this.markedOffset; + this.markedOffset = -1; + } else { + this.offset = 0; + } + return this; + }; + /** + * Resizes this ByteBuffer to be backed by a buffer of at least the given capacity. Will do nothing if already that + * large or larger. + * @param {number} capacity Capacity required + * @returns {!ByteBuffer} this + * @throws {TypeError} If `capacity` is not a number + * @throws {RangeError} If `capacity < 0` + * @expose + */ + ByteBufferPrototype.resize = function(capacity) { + if (!this.noAssert) { + if (typeof capacity !== 'number' || capacity % 1 !== 0) + throw TypeError("Illegal capacity: "+capacity+" (not an integer)"); + capacity |= 0; + if (capacity < 0) + throw RangeError("Illegal capacity: 0 <= "+capacity); + } + if (this.buffer.byteLength < capacity) { + var buffer = new ArrayBuffer(capacity); + var view = new Uint8Array(buffer); + view.set(this.view); + this.buffer = buffer; + this.view = view; + } + return this; + }; + /** + * Reverses this ByteBuffer's contents. + * @param {number=} begin Offset to start at, defaults to {@link ByteBuffer#offset} + * @param {number=} end Offset to end at, defaults to {@link ByteBuffer#limit} + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.reverse = function(begin, end) { + if (typeof begin === 'undefined') begin = this.offset; + if (typeof end === 'undefined') end = this.limit; + if (!this.noAssert) { + if (typeof begin !== 'number' || begin % 1 !== 0) + throw TypeError("Illegal begin: Not an integer"); + begin >>>= 0; + if (typeof end !== 'number' || end % 1 !== 0) + throw TypeError("Illegal end: Not an integer"); + end >>>= 0; + if (begin < 0 || begin > end || end > this.buffer.byteLength) + throw RangeError("Illegal range: 0 <= "+begin+" <= "+end+" <= "+this.buffer.byteLength); + } + if (begin === end) + return this; // Nothing to reverse + Array.prototype.reverse.call(this.view.subarray(begin, end)); + return this; + }; + /** + * Skips the next `length` bytes. This will just advance + * @param {number} length Number of bytes to skip. May also be negative to move the offset back. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.skip = function(length) { + if (!this.noAssert) { + if (typeof length !== 'number' || length % 1 !== 0) + throw TypeError("Illegal length: "+length+" (not an integer)"); + length |= 0; + } + var offset = this.offset + length; + if (!this.noAssert) { + if (offset < 0 || offset > this.buffer.byteLength) + throw RangeError("Illegal length: 0 <= "+this.offset+" + "+length+" <= "+this.buffer.byteLength); + } + this.offset = offset; + return this; + }; + + /** + * Slices this ByteBuffer by creating a cloned instance with `offset = begin` and `limit = end`. + * @param {number=} begin Begin offset, defaults to {@link ByteBuffer#offset}. + * @param {number=} end End offset, defaults to {@link ByteBuffer#limit}. + * @returns {!ByteBuffer} Clone of this ByteBuffer with slicing applied, backed by the same {@link ByteBuffer#buffer} + * @expose + */ + ByteBufferPrototype.slice = function(begin, end) { + if (typeof begin === 'undefined') begin = this.offset; + if (typeof end === 'undefined') end = this.limit; + if (!this.noAssert) { + if (typeof begin !== 'number' || begin % 1 !== 0) + throw TypeError("Illegal begin: Not an integer"); + begin >>>= 0; + if (typeof end !== 'number' || end % 1 !== 0) + throw TypeError("Illegal end: Not an integer"); + end >>>= 0; + if (begin < 0 || begin > end || end > this.buffer.byteLength) + throw RangeError("Illegal range: 0 <= "+begin+" <= "+end+" <= "+this.buffer.byteLength); + } + var bb = this.clone(); + bb.offset = begin; + bb.limit = end; + return bb; + }; + /** + * Returns a copy of the backing buffer that contains this ByteBuffer's contents. Contents are the bytes between + * {@link ByteBuffer#offset} and {@link ByteBuffer#limit}. + * @param {boolean=} forceCopy If `true` returns a copy, otherwise returns a view referencing the same memory if + * possible. Defaults to `false` + * @returns {!ArrayBuffer} Contents as an ArrayBuffer + * @expose + */ + ByteBufferPrototype.toBuffer = function(forceCopy) { + var offset = this.offset, + limit = this.limit; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: Not an integer"); + offset >>>= 0; + if (typeof limit !== 'number' || limit % 1 !== 0) + throw TypeError("Illegal limit: Not an integer"); + limit >>>= 0; + if (offset < 0 || offset > limit || limit > this.buffer.byteLength) + throw RangeError("Illegal range: 0 <= "+offset+" <= "+limit+" <= "+this.buffer.byteLength); + } + // NOTE: It's not possible to have another ArrayBuffer reference the same memory as the backing buffer. This is + // possible with Uint8Array#subarray only, but we have to return an ArrayBuffer by contract. So: + if (!forceCopy && offset === 0 && limit === this.buffer.byteLength) + return this.buffer; + if (offset === limit) + return EMPTY_BUFFER; + var buffer = new ArrayBuffer(limit - offset); + new Uint8Array(buffer).set(new Uint8Array(this.buffer).subarray(offset, limit), 0); + return buffer; + }; + + /** + * Returns a raw buffer compacted to contain this ByteBuffer's contents. Contents are the bytes between + * {@link ByteBuffer#offset} and {@link ByteBuffer#limit}. This is an alias of {@link ByteBuffer#toBuffer}. + * @function + * @param {boolean=} forceCopy If `true` returns a copy, otherwise returns a view referencing the same memory. + * Defaults to `false` + * @returns {!ArrayBuffer} Contents as an ArrayBuffer + * @expose + */ + ByteBufferPrototype.toArrayBuffer = ByteBufferPrototype.toBuffer; + + /** + * Converts the ByteBuffer's contents to a string. + * @param {string=} encoding Output encoding. Returns an informative string representation if omitted but also allows + * direct conversion to "utf8", "hex", "base64" and "binary" encoding. "debug" returns a hex representation with + * highlighted offsets. + * @param {number=} begin Offset to begin at, defaults to {@link ByteBuffer#offset} + * @param {number=} end Offset to end at, defaults to {@link ByteBuffer#limit} + * @returns {string} String representation + * @throws {Error} If `encoding` is invalid + * @expose + */ + ByteBufferPrototype.toString = function(encoding, begin, end) { + if (typeof encoding === 'undefined') + return "ByteBufferAB(offset="+this.offset+",markedOffset="+this.markedOffset+",limit="+this.limit+",capacity="+this.capacity()+")"; + if (typeof encoding === 'number') + encoding = "utf8", + begin = encoding, + end = begin; + switch (encoding) { + case "utf8": + return this.toUTF8(begin, end); + case "base64": + return this.toBase64(begin, end); + case "hex": + return this.toHex(begin, end); + case "binary": + return this.toBinary(begin, end); + case "debug": + return this.toDebug(); + case "columns": + return this.toColumns(); + default: + throw Error("Unsupported encoding: "+encoding); + } + }; + + // lxiv-embeddable + + /** + * lxiv-embeddable (c) 2014 Daniel Wirtz + * Released under the Apache License, Version 2.0 + * see: https://github.com/dcodeIO/lxiv for details + */ + var lxiv = function() { + "use strict"; + + /** + * lxiv namespace. + * @type {!Object.} + * @exports lxiv + */ + var lxiv = {}; + + /** + * Character codes for output. + * @type {!Array.} + * @inner + */ + var aout = [ + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, + 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 97, 98, 99, 100, 101, 102, + 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, + 119, 120, 121, 122, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 43, 47 + ]; + + /** + * Character codes for input. + * @type {!Array.} + * @inner + */ + var ain = []; + for (var i=0, k=aout.length; i>2)&0x3f]); + t = (b&0x3)<<4; + if ((b = src()) !== null) { + t |= (b>>4)&0xf; + dst(aout[(t|((b>>4)&0xf))&0x3f]); + t = (b&0xf)<<2; + if ((b = src()) !== null) + dst(aout[(t|((b>>6)&0x3))&0x3f]), + dst(aout[b&0x3f]); + else + dst(aout[t&0x3f]), + dst(61); + } else + dst(aout[t&0x3f]), + dst(61), + dst(61); + } + }; + + /** + * Decodes base64 char codes to bytes. + * @param {!function():number|null} src Characters source as a function returning the next char code respectively + * `null` if there are no more characters left. + * @param {!function(number)} dst Bytes destination as a function successively called with the next byte. + * @throws {Error} If a character code is invalid + */ + lxiv.decode = function(src, dst) { + var c, t1, t2; + function fail(c) { + throw Error("Illegal character code: "+c); + } + while ((c = src()) !== null) { + t1 = ain[c]; + if (typeof t1 === 'undefined') fail(c); + if ((c = src()) !== null) { + t2 = ain[c]; + if (typeof t2 === 'undefined') fail(c); + dst((t1<<2)>>>0|(t2&0x30)>>4); + if ((c = src()) !== null) { + t1 = ain[c]; + if (typeof t1 === 'undefined') + if (c === 61) break; else fail(c); + dst(((t2&0xf)<<4)>>>0|(t1&0x3c)>>2); + if ((c = src()) !== null) { + t2 = ain[c]; + if (typeof t2 === 'undefined') + if (c === 61) break; else fail(c); + dst(((t1&0x3)<<6)>>>0|t2); + } + } + } + } + }; + + /** + * Tests if a string is valid base64. + * @param {string} str String to test + * @returns {boolean} `true` if valid, otherwise `false` + */ + lxiv.test = function(str) { + return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(str); + }; + + return lxiv; + }(); + + // encodings/base64 + + /** + * Encodes this ByteBuffer's contents to a base64 encoded string. + * @param {number=} begin Offset to begin at, defaults to {@link ByteBuffer#offset}. + * @param {number=} end Offset to end at, defaults to {@link ByteBuffer#limit}. + * @returns {string} Base64 encoded string + * @throws {RangeError} If `begin` or `end` is out of bounds + * @expose + */ + ByteBufferPrototype.toBase64 = function(begin, end) { + if (typeof begin === 'undefined') + begin = this.offset; + if (typeof end === 'undefined') + end = this.limit; + begin = begin | 0; end = end | 0; + if (begin < 0 || end > this.capacity || begin > end) + throw RangeError("begin, end"); + var sd; lxiv.encode(function() { + return begin < end ? this.view[begin++] : null; + }.bind(this), sd = stringDestination()); + return sd(); + }; + + /** + * Decodes a base64 encoded string to a ByteBuffer. + * @param {string} str String to decode + * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to + * {@link ByteBuffer.DEFAULT_ENDIAN}. + * @returns {!ByteBuffer} ByteBuffer + * @expose + */ + ByteBuffer.fromBase64 = function(str, littleEndian) { + if (typeof str !== 'string') + throw TypeError("str"); + var bb = new ByteBuffer(str.length/4*3, littleEndian), + i = 0; + lxiv.decode(stringSource(str), function(b) { + bb.view[i++] = b; + }); + bb.limit = i; + return bb; + }; + + /** + * Encodes a binary string to base64 like `window.btoa` does. + * @param {string} str Binary string + * @returns {string} Base64 encoded string + * @see https://developer.mozilla.org/en-US/docs/Web/API/Window.btoa + * @expose + */ + ByteBuffer.btoa = function(str) { + return ByteBuffer.fromBinary(str).toBase64(); + }; + + /** + * Decodes a base64 encoded string to binary like `window.atob` does. + * @param {string} b64 Base64 encoded string + * @returns {string} Binary string + * @see https://developer.mozilla.org/en-US/docs/Web/API/Window.atob + * @expose + */ + ByteBuffer.atob = function(b64) { + return ByteBuffer.fromBase64(b64).toBinary(); + }; + + // encodings/binary + + /** + * Encodes this ByteBuffer to a binary encoded string, that is using only characters 0x00-0xFF as bytes. + * @param {number=} begin Offset to begin at. Defaults to {@link ByteBuffer#offset}. + * @param {number=} end Offset to end at. Defaults to {@link ByteBuffer#limit}. + * @returns {string} Binary encoded string + * @throws {RangeError} If `offset > limit` + * @expose + */ + ByteBufferPrototype.toBinary = function(begin, end) { + if (typeof begin === 'undefined') + begin = this.offset; + if (typeof end === 'undefined') + end = this.limit; + begin |= 0; end |= 0; + if (begin < 0 || end > this.capacity() || begin > end) + throw RangeError("begin, end"); + if (begin === end) + return ""; + var chars = [], + parts = []; + while (begin < end) { + chars.push(this.view[begin++]); + if (chars.length >= 1024) + parts.push(String.fromCharCode.apply(String, chars)), + chars = []; + } + return parts.join('') + String.fromCharCode.apply(String, chars); + }; + + /** + * Decodes a binary encoded string, that is using only characters 0x00-0xFF as bytes, to a ByteBuffer. + * @param {string} str String to decode + * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to + * {@link ByteBuffer.DEFAULT_ENDIAN}. + * @returns {!ByteBuffer} ByteBuffer + * @expose + */ + ByteBuffer.fromBinary = function(str, littleEndian) { + if (typeof str !== 'string') + throw TypeError("str"); + var i = 0, + k = str.length, + charCode, + bb = new ByteBuffer(k, littleEndian); + while (i 0xff) + throw RangeError("illegal char code: "+charCode); + bb.view[i++] = charCode; + } + bb.limit = k; + return bb; + }; + + // encodings/debug + + /** + * Encodes this ByteBuffer to a hex encoded string with marked offsets. Offset symbols are: + * * `<` : offset, + * * `'` : markedOffset, + * * `>` : limit, + * * `|` : offset and limit, + * * `[` : offset and markedOffset, + * * `]` : markedOffset and limit, + * * `!` : offset, markedOffset and limit + * @param {boolean=} columns If `true` returns two columns hex + ascii, defaults to `false` + * @returns {string|!Array.} Debug string or array of lines if `asArray = true` + * @expose + * @example `>00'01 02<03` contains four bytes with `limit=0, markedOffset=1, offset=3` + * @example `00[01 02 03>` contains four bytes with `offset=markedOffset=1, limit=4` + * @example `00|01 02 03` contains four bytes with `offset=limit=1, markedOffset=-1` + * @example `|` contains zero bytes with `offset=limit=0, markedOffset=-1` + */ + ByteBufferPrototype.toDebug = function(columns) { + var i = -1, + k = this.buffer.byteLength, + b, + hex = "", + asc = "", + out = ""; + while (i 32 && b < 127 ? String.fromCharCode(b) : '.'; + } + ++i; + if (columns) { + if (i > 0 && i % 16 === 0 && i !== k) { + while (hex.length < 3*16+3) hex += " "; + out += hex+asc+"\n"; + hex = asc = ""; + } + } + if (i === this.offset && i === this.limit) + hex += i === this.markedOffset ? "!" : "|"; + else if (i === this.offset) + hex += i === this.markedOffset ? "[" : "<"; + else if (i === this.limit) + hex += i === this.markedOffset ? "]" : ">"; + else + hex += i === this.markedOffset ? "'" : (columns || (i !== 0 && i !== k) ? " " : ""); + } + if (columns && hex !== " ") { + while (hex.length < 3*16+3) + hex += " "; + out += hex + asc + "\n"; + } + return columns ? out : hex; + }; + + /** + * Decodes a hex encoded string with marked offsets to a ByteBuffer. + * @param {string} str Debug string to decode (not be generated with `columns = true`) + * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to + * {@link ByteBuffer.DEFAULT_ENDIAN}. + * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to + * {@link ByteBuffer.DEFAULT_NOASSERT}. + * @returns {!ByteBuffer} ByteBuffer + * @expose + * @see ByteBuffer#toDebug + */ + ByteBuffer.fromDebug = function(str, littleEndian, noAssert) { + var k = str.length, + bb = new ByteBuffer(((k+1)/3)|0, littleEndian, noAssert); + var i = 0, j = 0, ch, b, + rs = false, // Require symbol next + ho = false, hm = false, hl = false, // Already has offset (ho), markedOffset (hm), limit (hl)? + fail = false; + while (i': + if (!noAssert) { + if (hl) { + fail = true; + break; + } + hl = true; + } + bb.limit = j; + rs = false; + break; + case "'": + if (!noAssert) { + if (hm) { + fail = true; + break; + } + hm = true; + } + bb.markedOffset = j; + rs = false; + break; + case ' ': + rs = false; + break; + default: + if (!noAssert) { + if (rs) { + fail = true; + break; + } + } + b = parseInt(ch+str.charAt(i++), 16); + if (!noAssert) { + if (isNaN(b) || b < 0 || b > 255) + throw TypeError("Illegal str: Not a debug encoded string"); + } + bb.view[j++] = b; + rs = true; + } + if (fail) + throw TypeError("Illegal str: Invalid symbol at "+i); + } + if (!noAssert) { + if (!ho || !hl) + throw TypeError("Illegal str: Missing offset or limit"); + if (j>>= 0; + if (typeof end !== 'number' || end % 1 !== 0) + throw TypeError("Illegal end: Not an integer"); + end >>>= 0; + if (begin < 0 || begin > end || end > this.buffer.byteLength) + throw RangeError("Illegal range: 0 <= "+begin+" <= "+end+" <= "+this.buffer.byteLength); + } + var out = new Array(end - begin), + b; + while (begin < end) { + b = this.view[begin++]; + if (b < 0x10) + out.push("0", b.toString(16)); + else out.push(b.toString(16)); + } + return out.join(''); + }; + + /** + * Decodes a hex encoded string to a ByteBuffer. + * @param {string} str String to decode + * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to + * {@link ByteBuffer.DEFAULT_ENDIAN}. + * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to + * {@link ByteBuffer.DEFAULT_NOASSERT}. + * @returns {!ByteBuffer} ByteBuffer + * @expose + */ + ByteBuffer.fromHex = function(str, littleEndian, noAssert) { + if (!noAssert) { + if (typeof str !== 'string') + throw TypeError("Illegal str: Not a string"); + if (str.length % 2 !== 0) + throw TypeError("Illegal str: Length not a multiple of 2"); + } + var k = str.length, + bb = new ByteBuffer((k / 2) | 0, littleEndian), + b; + for (var i=0, j=0; i 255) + throw TypeError("Illegal str: Contains non-hex characters"); + bb.view[j++] = b; + } + bb.limit = j; + return bb; + }; + + // utfx-embeddable + + /** + * utfx-embeddable (c) 2014 Daniel Wirtz + * Released under the Apache License, Version 2.0 + * see: https://github.com/dcodeIO/utfx for details + */ + var utfx = function() { + "use strict"; + + /** + * utfx namespace. + * @inner + * @type {!Object.} + */ + var utfx = {}; + + /** + * Maximum valid code point. + * @type {number} + * @const + */ + utfx.MAX_CODEPOINT = 0x10FFFF; + + /** + * Encodes UTF8 code points to UTF8 bytes. + * @param {(!function():number|null) | number} src Code points source, either as a function returning the next code point + * respectively `null` if there are no more code points left or a single numeric code point. + * @param {!function(number)} dst Bytes destination as a function successively called with the next byte + */ + utfx.encodeUTF8 = function(src, dst) { + var cp = null; + if (typeof src === 'number') + cp = src, + src = function() { return null; }; + while (cp !== null || (cp = src()) !== null) { + if (cp < 0x80) + dst(cp&0x7F); + else if (cp < 0x800) + dst(((cp>>6)&0x1F)|0xC0), + dst((cp&0x3F)|0x80); + else if (cp < 0x10000) + dst(((cp>>12)&0x0F)|0xE0), + dst(((cp>>6)&0x3F)|0x80), + dst((cp&0x3F)|0x80); + else + dst(((cp>>18)&0x07)|0xF0), + dst(((cp>>12)&0x3F)|0x80), + dst(((cp>>6)&0x3F)|0x80), + dst((cp&0x3F)|0x80); + cp = null; + } + }; + + /** + * Decodes UTF8 bytes to UTF8 code points. + * @param {!function():number|null} src Bytes source as a function returning the next byte respectively `null` if there + * are no more bytes left. + * @param {!function(number)} dst Code points destination as a function successively called with each decoded code point. + * @throws {RangeError} If a starting byte is invalid in UTF8 + * @throws {Error} If the last sequence is truncated. Has an array property `bytes` holding the + * remaining bytes. + */ + utfx.decodeUTF8 = function(src, dst) { + var a, b, c, d, fail = function(b) { + b = b.slice(0, b.indexOf(null)); + var err = Error(b.toString()); + err.name = "TruncatedError"; + err['bytes'] = b; + throw err; + }; + while ((a = src()) !== null) { + if ((a&0x80) === 0) + dst(a); + else if ((a&0xE0) === 0xC0) + ((b = src()) === null) && fail([a, b]), + dst(((a&0x1F)<<6) | (b&0x3F)); + else if ((a&0xF0) === 0xE0) + ((b=src()) === null || (c=src()) === null) && fail([a, b, c]), + dst(((a&0x0F)<<12) | ((b&0x3F)<<6) | (c&0x3F)); + else if ((a&0xF8) === 0xF0) + ((b=src()) === null || (c=src()) === null || (d=src()) === null) && fail([a, b, c ,d]), + dst(((a&0x07)<<18) | ((b&0x3F)<<12) | ((c&0x3F)<<6) | (d&0x3F)); + else throw RangeError("Illegal starting byte: "+a); + } + }; + + /** + * Converts UTF16 characters to UTF8 code points. + * @param {!function():number|null} src Characters source as a function returning the next char code respectively + * `null` if there are no more characters left. + * @param {!function(number)} dst Code points destination as a function successively called with each converted code + * point. + */ + utfx.UTF16toUTF8 = function(src, dst) { + var c1, c2 = null; + while (true) { + if ((c1 = c2 !== null ? c2 : src()) === null) + break; + if (c1 >= 0xD800 && c1 <= 0xDFFF) { + if ((c2 = src()) !== null) { + if (c2 >= 0xDC00 && c2 <= 0xDFFF) { + dst((c1-0xD800)*0x400+c2-0xDC00+0x10000); + c2 = null; continue; + } + } + } + dst(c1); + } + if (c2 !== null) dst(c2); + }; + + /** + * Converts UTF8 code points to UTF16 characters. + * @param {(!function():number|null) | number} src Code points source, either as a function returning the next code point + * respectively `null` if there are no more code points left or a single numeric code point. + * @param {!function(number)} dst Characters destination as a function successively called with each converted char code. + * @throws {RangeError} If a code point is out of range + */ + utfx.UTF8toUTF16 = function(src, dst) { + var cp = null; + if (typeof src === 'number') + cp = src, src = function() { return null; }; + while (cp !== null || (cp = src()) !== null) { + if (cp <= 0xFFFF) + dst(cp); + else + cp -= 0x10000, + dst((cp>>10)+0xD800), + dst((cp%0x400)+0xDC00); + cp = null; + } + }; + + /** + * Converts and encodes UTF16 characters to UTF8 bytes. + * @param {!function():number|null} src Characters source as a function returning the next char code respectively `null` + * if there are no more characters left. + * @param {!function(number)} dst Bytes destination as a function successively called with the next byte. + */ + utfx.encodeUTF16toUTF8 = function(src, dst) { + utfx.UTF16toUTF8(src, function(cp) { + utfx.encodeUTF8(cp, dst); + }); + }; + + /** + * Decodes and converts UTF8 bytes to UTF16 characters. + * @param {!function():number|null} src Bytes source as a function returning the next byte respectively `null` if there + * are no more bytes left. + * @param {!function(number)} dst Characters destination as a function successively called with each converted char code. + * @throws {RangeError} If a starting byte is invalid in UTF8 + * @throws {Error} If the last sequence is truncated. Has an array property `bytes` holding the remaining bytes. + */ + utfx.decodeUTF8toUTF16 = function(src, dst) { + utfx.decodeUTF8(src, function(cp) { + utfx.UTF8toUTF16(cp, dst); + }); + }; + + /** + * Calculates the byte length of an UTF8 code point. + * @param {number} cp UTF8 code point + * @returns {number} Byte length + */ + utfx.calculateCodePoint = function(cp) { + return (cp < 0x80) ? 1 : (cp < 0x800) ? 2 : (cp < 0x10000) ? 3 : 4; + }; + + /** + * Calculates the number of UTF8 bytes required to store UTF8 code points. + * @param {(!function():number|null)} src Code points source as a function returning the next code point respectively + * `null` if there are no more code points left. + * @returns {number} The number of UTF8 bytes required + */ + utfx.calculateUTF8 = function(src) { + var cp, l=0; + while ((cp = src()) !== null) + l += (cp < 0x80) ? 1 : (cp < 0x800) ? 2 : (cp < 0x10000) ? 3 : 4; + return l; + }; + + /** + * Calculates the number of UTF8 code points respectively UTF8 bytes required to store UTF16 char codes. + * @param {(!function():number|null)} src Characters source as a function returning the next char code respectively + * `null` if there are no more characters left. + * @returns {!Array.} The number of UTF8 code points at index 0 and the number of UTF8 bytes required at index 1. + */ + utfx.calculateUTF16asUTF8 = function(src) { + var n=0, l=0; + utfx.UTF16toUTF8(src, function(cp) { + ++n; l += (cp < 0x80) ? 1 : (cp < 0x800) ? 2 : (cp < 0x10000) ? 3 : 4; + }); + return [n,l]; + }; + + return utfx; + }(); + + // encodings/utf8 + + /** + * Encodes this ByteBuffer's contents between {@link ByteBuffer#offset} and {@link ByteBuffer#limit} to an UTF8 encoded + * string. + * @returns {string} Hex encoded string + * @throws {RangeError} If `offset > limit` + * @expose + */ + ByteBufferPrototype.toUTF8 = function(begin, end) { + if (typeof begin === 'undefined') begin = this.offset; + if (typeof end === 'undefined') end = this.limit; + if (!this.noAssert) { + if (typeof begin !== 'number' || begin % 1 !== 0) + throw TypeError("Illegal begin: Not an integer"); + begin >>>= 0; + if (typeof end !== 'number' || end % 1 !== 0) + throw TypeError("Illegal end: Not an integer"); + end >>>= 0; + if (begin < 0 || begin > end || end > this.buffer.byteLength) + throw RangeError("Illegal range: 0 <= "+begin+" <= "+end+" <= "+this.buffer.byteLength); + } + var sd; try { + utfx.decodeUTF8toUTF16(function() { + return begin < end ? this.view[begin++] : null; + }.bind(this), sd = stringDestination()); + } catch (e) { + if (begin !== end) + throw RangeError("Illegal range: Truncated data, "+begin+" != "+end); + } + return sd(); + }; + + /** + * Decodes an UTF8 encoded string to a ByteBuffer. + * @param {string} str String to decode + * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to + * {@link ByteBuffer.DEFAULT_ENDIAN}. + * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to + * {@link ByteBuffer.DEFAULT_NOASSERT}. + * @returns {!ByteBuffer} ByteBuffer + * @expose + */ + ByteBuffer.fromUTF8 = function(str, littleEndian, noAssert) { + if (!noAssert) + if (typeof str !== 'string') + throw TypeError("Illegal str: Not a string"); + var bb = new ByteBuffer(utfx.calculateUTF16asUTF8(stringSource(str), true)[1], littleEndian, noAssert), + i = 0; + utfx.encodeUTF16toUTF8(stringSource(str), function(b) { + bb.view[i++] = b; + }); + bb.limit = i; + return bb; + }; + + return ByteBuffer; + }); + }); + + var empty$1 = {}; + + + var empty$2 = Object.freeze({ + default: empty$1 + }); + + var require$$2 = ( empty$2 && empty$1 ) || empty$2; + + var protobufLight = createCommonjsModule(function (module) { + /* + Copyright 2013 Daniel Wirtz + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + + /** + * @license protobuf.js (c) 2013 Daniel Wirtz + * Released under the Apache License, Version 2.0 + * see: https://github.com/dcodeIO/protobuf.js for details + */ + (function(global, factory) { + + /* AMD */ if (typeof undefined === 'function' && undefined["amd"]) + undefined(["bytebuffer"], factory); + /* CommonJS */ else if (typeof commonjsRequire === "function" && 'object' === "object" && module && module["exports"]) + module["exports"] = factory(bytebuffer, true); + /* Global */ else + (global["dcodeIO"] = global["dcodeIO"] || {})["ProtoBuf"] = factory(global["dcodeIO"]["ByteBuffer"]); + + })(commonjsGlobal, function(ByteBuffer, isCommonJS) { + "use strict"; + + /** + * The ProtoBuf namespace. + * @exports ProtoBuf + * @namespace + * @expose + */ + var ProtoBuf = {}; + + /** + * @type {!function(new: ByteBuffer, ...[*])} + * @expose + */ + ProtoBuf.ByteBuffer = ByteBuffer; + + /** + * @type {?function(new: Long, ...[*])} + * @expose + */ + ProtoBuf.Long = ByteBuffer.Long || null; + + /** + * ProtoBuf.js version. + * @type {string} + * @const + * @expose + */ + ProtoBuf.VERSION = "5.0.2"; + + /** + * Wire types. + * @type {Object.} + * @const + * @expose + */ + ProtoBuf.WIRE_TYPES = {}; + + /** + * Varint wire type. + * @type {number} + * @expose + */ + ProtoBuf.WIRE_TYPES.VARINT = 0; + + /** + * Fixed 64 bits wire type. + * @type {number} + * @const + * @expose + */ + ProtoBuf.WIRE_TYPES.BITS64 = 1; + + /** + * Length delimited wire type. + * @type {number} + * @const + * @expose + */ + ProtoBuf.WIRE_TYPES.LDELIM = 2; + + /** + * Start group wire type. + * @type {number} + * @const + * @expose + */ + ProtoBuf.WIRE_TYPES.STARTGROUP = 3; + + /** + * End group wire type. + * @type {number} + * @const + * @expose + */ + ProtoBuf.WIRE_TYPES.ENDGROUP = 4; + + /** + * Fixed 32 bits wire type. + * @type {number} + * @const + * @expose + */ + ProtoBuf.WIRE_TYPES.BITS32 = 5; + + /** + * Packable wire types. + * @type {!Array.} + * @const + * @expose + */ + ProtoBuf.PACKABLE_WIRE_TYPES = [ + ProtoBuf.WIRE_TYPES.VARINT, + ProtoBuf.WIRE_TYPES.BITS64, + ProtoBuf.WIRE_TYPES.BITS32 + ]; + + /** + * Types. + * @dict + * @type {!Object.} + * @const + * @expose + */ + ProtoBuf.TYPES = { + // According to the protobuf spec. + "int32": { + name: "int32", + wireType: ProtoBuf.WIRE_TYPES.VARINT, + defaultValue: 0 + }, + "uint32": { + name: "uint32", + wireType: ProtoBuf.WIRE_TYPES.VARINT, + defaultValue: 0 + }, + "sint32": { + name: "sint32", + wireType: ProtoBuf.WIRE_TYPES.VARINT, + defaultValue: 0 + }, + "int64": { + name: "int64", + wireType: ProtoBuf.WIRE_TYPES.VARINT, + defaultValue: ProtoBuf.Long ? ProtoBuf.Long.ZERO : undefined + }, + "uint64": { + name: "uint64", + wireType: ProtoBuf.WIRE_TYPES.VARINT, + defaultValue: ProtoBuf.Long ? ProtoBuf.Long.UZERO : undefined + }, + "sint64": { + name: "sint64", + wireType: ProtoBuf.WIRE_TYPES.VARINT, + defaultValue: ProtoBuf.Long ? ProtoBuf.Long.ZERO : undefined + }, + "bool": { + name: "bool", + wireType: ProtoBuf.WIRE_TYPES.VARINT, + defaultValue: false + }, + "double": { + name: "double", + wireType: ProtoBuf.WIRE_TYPES.BITS64, + defaultValue: 0 + }, + "string": { + name: "string", + wireType: ProtoBuf.WIRE_TYPES.LDELIM, + defaultValue: "" + }, + "bytes": { + name: "bytes", + wireType: ProtoBuf.WIRE_TYPES.LDELIM, + defaultValue: null // overridden in the code, must be a unique instance + }, + "fixed32": { + name: "fixed32", + wireType: ProtoBuf.WIRE_TYPES.BITS32, + defaultValue: 0 + }, + "sfixed32": { + name: "sfixed32", + wireType: ProtoBuf.WIRE_TYPES.BITS32, + defaultValue: 0 + }, + "fixed64": { + name: "fixed64", + wireType: ProtoBuf.WIRE_TYPES.BITS64, + defaultValue: ProtoBuf.Long ? ProtoBuf.Long.UZERO : undefined + }, + "sfixed64": { + name: "sfixed64", + wireType: ProtoBuf.WIRE_TYPES.BITS64, + defaultValue: ProtoBuf.Long ? ProtoBuf.Long.ZERO : undefined + }, + "float": { + name: "float", + wireType: ProtoBuf.WIRE_TYPES.BITS32, + defaultValue: 0 + }, + "enum": { + name: "enum", + wireType: ProtoBuf.WIRE_TYPES.VARINT, + defaultValue: 0 + }, + "message": { + name: "message", + wireType: ProtoBuf.WIRE_TYPES.LDELIM, + defaultValue: null + }, + "group": { + name: "group", + wireType: ProtoBuf.WIRE_TYPES.STARTGROUP, + defaultValue: null + } + }; + + /** + * Valid map key types. + * @type {!Array.>} + * @const + * @expose + */ + ProtoBuf.MAP_KEY_TYPES = [ + ProtoBuf.TYPES["int32"], + ProtoBuf.TYPES["sint32"], + ProtoBuf.TYPES["sfixed32"], + ProtoBuf.TYPES["uint32"], + ProtoBuf.TYPES["fixed32"], + ProtoBuf.TYPES["int64"], + ProtoBuf.TYPES["sint64"], + ProtoBuf.TYPES["sfixed64"], + ProtoBuf.TYPES["uint64"], + ProtoBuf.TYPES["fixed64"], + ProtoBuf.TYPES["bool"], + ProtoBuf.TYPES["string"], + ProtoBuf.TYPES["bytes"] + ]; + + /** + * Minimum field id. + * @type {number} + * @const + * @expose + */ + ProtoBuf.ID_MIN = 1; + + /** + * Maximum field id. + * @type {number} + * @const + * @expose + */ + ProtoBuf.ID_MAX = 0x1FFFFFFF; + + /** + * If set to `true`, field names will be converted from underscore notation to camel case. Defaults to `false`. + * Must be set prior to parsing. + * @type {boolean} + * @expose + */ + ProtoBuf.convertFieldsToCamelCase = false; + + /** + * By default, messages are populated with (setX, set_x) accessors for each field. This can be disabled by + * setting this to `false` prior to building messages. + * @type {boolean} + * @expose + */ + ProtoBuf.populateAccessors = true; + + /** + * By default, messages are populated with default values if a field is not present on the wire. To disable + * this behavior, set this setting to `false`. + * @type {boolean} + * @expose + */ + ProtoBuf.populateDefaults = true; + + /** + * @alias ProtoBuf.Util + * @expose + */ + ProtoBuf.Util = (function() { + "use strict"; + + /** + * ProtoBuf utilities. + * @exports ProtoBuf.Util + * @namespace + */ + var Util = {}; + + /** + * Flag if running in node or not. + * @type {boolean} + * @const + * @expose + */ + Util.IS_NODE = !!( + typeof process === 'object' && process+'' === '[object process]' && !process['browser'] + ); + + /** + * Constructs a XMLHttpRequest object. + * @return {XMLHttpRequest} + * @throws {Error} If XMLHttpRequest is not supported + * @expose + */ + Util.XHR = function() { + // No dependencies please, ref: http://www.quirksmode.org/js/xmlhttp.html + var XMLHttpFactories = [ + function () {return new XMLHttpRequest()}, + function () {return new ActiveXObject("Msxml2.XMLHTTP")}, + function () {return new ActiveXObject("Msxml3.XMLHTTP")}, + function () {return new ActiveXObject("Microsoft.XMLHTTP")} + ]; + /** @type {?XMLHttpRequest} */ + var xhr = null; + for (var i=0;i} + * @expose + */ + ProtoBuf.Lang = { + + // Characters always ending a statement + DELIM: /[\s\{\}=;:\[\],'"\(\)<>]/g, + + // Field rules + RULE: /^(?:required|optional|repeated|map)$/, + + // Field types + TYPE: /^(?:double|float|int32|uint32|sint32|int64|uint64|sint64|fixed32|sfixed32|fixed64|sfixed64|bool|string|bytes)$/, + + // Names + NAME: /^[a-zA-Z_][a-zA-Z_0-9]*$/, + + // Type definitions + TYPEDEF: /^[a-zA-Z][a-zA-Z_0-9]*$/, + + // Type references + TYPEREF: /^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)+$/, + + // Fully qualified type references + FQTYPEREF: /^(?:\.[a-zA-Z][a-zA-Z_0-9]*)+$/, + + // All numbers + NUMBER: /^-?(?:[1-9][0-9]*|0|0[xX][0-9a-fA-F]+|0[0-7]+|([0-9]*(\.[0-9]*)?([Ee][+-]?[0-9]+)?)|inf|nan)$/, + + // Decimal numbers + NUMBER_DEC: /^(?:[1-9][0-9]*|0)$/, + + // Hexadecimal numbers + NUMBER_HEX: /^0[xX][0-9a-fA-F]+$/, + + // Octal numbers + NUMBER_OCT: /^0[0-7]+$/, + + // Floating point numbers + NUMBER_FLT: /^([0-9]*(\.[0-9]*)?([Ee][+-]?[0-9]+)?|inf|nan)$/, + + // Booleans + BOOL: /^(?:true|false)$/i, + + // Id numbers + ID: /^(?:[1-9][0-9]*|0|0[xX][0-9a-fA-F]+|0[0-7]+)$/, + + // Negative id numbers (enum values) + NEGID: /^\-?(?:[1-9][0-9]*|0|0[xX][0-9a-fA-F]+|0[0-7]+)$/, + + // Whitespaces + WHITESPACE: /\s/, + + // All strings + STRING: /(?:"([^"\\]*(?:\\.[^"\\]*)*)")|(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g, + + // Double quoted strings + STRING_DQ: /(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g, + + // Single quoted strings + STRING_SQ: /(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g + }; + + + /** + * @alias ProtoBuf.Reflect + * @expose + */ + ProtoBuf.Reflect = (function(ProtoBuf) { + "use strict"; + + /** + * Reflection types. + * @exports ProtoBuf.Reflect + * @namespace + */ + var Reflect = {}; + + /** + * Constructs a Reflect base class. + * @exports ProtoBuf.Reflect.T + * @constructor + * @abstract + * @param {!ProtoBuf.Builder} builder Builder reference + * @param {?ProtoBuf.Reflect.T} parent Parent object + * @param {string} name Object name + */ + var T = function(builder, parent, name) { + + /** + * Builder reference. + * @type {!ProtoBuf.Builder} + * @expose + */ + this.builder = builder; + + /** + * Parent object. + * @type {?ProtoBuf.Reflect.T} + * @expose + */ + this.parent = parent; + + /** + * Object name in namespace. + * @type {string} + * @expose + */ + this.name = name; + + /** + * Fully qualified class name + * @type {string} + * @expose + */ + this.className; + }; + + /** + * @alias ProtoBuf.Reflect.T.prototype + * @inner + */ + var TPrototype = T.prototype; + + /** + * Returns the fully qualified name of this object. + * @returns {string} Fully qualified name as of ".PATH.TO.THIS" + * @expose + */ + TPrototype.fqn = function() { + var name = this.name, + ptr = this; + do { + ptr = ptr.parent; + if (ptr == null) + break; + name = ptr.name+"."+name; + } while (true); + return name; + }; + + /** + * Returns a string representation of this Reflect object (its fully qualified name). + * @param {boolean=} includeClass Set to true to include the class name. Defaults to false. + * @return String representation + * @expose + */ + TPrototype.toString = function(includeClass) { + return (includeClass ? this.className + " " : "") + this.fqn(); + }; + + /** + * Builds this type. + * @throws {Error} If this type cannot be built directly + * @expose + */ + TPrototype.build = function() { + throw Error(this.toString(true)+" cannot be built directly"); + }; + + /** + * @alias ProtoBuf.Reflect.T + * @expose + */ + Reflect.T = T; + + /** + * Constructs a new Namespace. + * @exports ProtoBuf.Reflect.Namespace + * @param {!ProtoBuf.Builder} builder Builder reference + * @param {?ProtoBuf.Reflect.Namespace} parent Namespace parent + * @param {string} name Namespace name + * @param {Object.=} options Namespace options + * @param {string?} syntax The syntax level of this definition (e.g., proto3) + * @constructor + * @extends ProtoBuf.Reflect.T + */ + var Namespace = function(builder, parent, name, options, syntax) { + T.call(this, builder, parent, name); + + /** + * @override + */ + this.className = "Namespace"; + + /** + * Children inside the namespace. + * @type {!Array.} + */ + this.children = []; + + /** + * Options. + * @type {!Object.} + */ + this.options = options || {}; + + /** + * Syntax level (e.g., proto2 or proto3). + * @type {!string} + */ + this.syntax = syntax || "proto2"; + }; + + /** + * @alias ProtoBuf.Reflect.Namespace.prototype + * @inner + */ + var NamespacePrototype = Namespace.prototype = Object.create(T.prototype); + + /** + * Returns an array of the namespace's children. + * @param {ProtoBuf.Reflect.T=} type Filter type (returns instances of this type only). Defaults to null (all children). + * @return {Array.} + * @expose + */ + NamespacePrototype.getChildren = function(type) { + type = type || null; + if (type == null) + return this.children.slice(); + var children = []; + for (var i=0, k=this.children.length; i} qn Qualified name to resolve + * @param {boolean=} excludeNonNamespace Excludes non-namespace types, defaults to `false` + * @return {?ProtoBuf.Reflect.Namespace} The resolved type or null if not found + * @expose + */ + NamespacePrototype.resolve = function(qn, excludeNonNamespace) { + var part = typeof qn === 'string' ? qn.split(".") : qn, + ptr = this, + i = 0; + if (part[i] === "") { // Fully qualified name, e.g. ".My.Message' + while (ptr.parent !== null) + ptr = ptr.parent; + i++; + } + var child; + do { + do { + if (!(ptr instanceof Reflect.Namespace)) { + ptr = null; + break; + } + child = ptr.getChild(part[i]); + if (!child || !(child instanceof Reflect.T) || (excludeNonNamespace && !(child instanceof Reflect.Namespace))) { + ptr = null; + break; + } + ptr = child; i++; + } while (i < part.length); + if (ptr != null) + break; // Found + // Else search the parent + if (this.parent !== null) + return this.parent.resolve(qn, excludeNonNamespace); + } while (ptr != null); + return ptr; + }; + + /** + * Determines the shortest qualified name of the specified type, if any, relative to this namespace. + * @param {!ProtoBuf.Reflect.T} t Reflection type + * @returns {string} The shortest qualified name or, if there is none, the fqn + * @expose + */ + NamespacePrototype.qn = function(t) { + var part = [], ptr = t; + do { + part.unshift(ptr.name); + ptr = ptr.parent; + } while (ptr !== null); + for (var len=1; len <= part.length; len++) { + var qn = part.slice(part.length-len); + if (t === this.resolve(qn, t instanceof Reflect.Namespace)) + return qn.join("."); + } + return t.fqn(); + }; + + /** + * Builds the namespace and returns the runtime counterpart. + * @return {Object.} Runtime namespace + * @expose + */ + NamespacePrototype.build = function() { + /** @dict */ + var ns = {}; + var children = this.children; + for (var i=0, k=children.length, child; i} + */ + NamespacePrototype.buildOpt = function() { + var opt = {}, + keys = Object.keys(this.options); + for (var i=0, k=keys.length; i}null} Option value or NULL if there is no such option + */ + NamespacePrototype.getOption = function(name) { + if (typeof name === 'undefined') + return this.options; + return typeof this.options[name] !== 'undefined' ? this.options[name] : null; + }; + + /** + * @alias ProtoBuf.Reflect.Namespace + * @expose + */ + Reflect.Namespace = Namespace; + + /** + * Constructs a new Element implementation that checks and converts values for a + * particular field type, as appropriate. + * + * An Element represents a single value: either the value of a singular field, + * or a value contained in one entry of a repeated field or map field. This + * class does not implement these higher-level concepts; it only encapsulates + * the low-level typechecking and conversion. + * + * @exports ProtoBuf.Reflect.Element + * @param {{name: string, wireType: number}} type Resolved data type + * @param {ProtoBuf.Reflect.T|null} resolvedType Resolved type, if relevant + * (e.g. submessage field). + * @param {boolean} isMapKey Is this element a Map key? The value will be + * converted to string form if so. + * @param {string} syntax Syntax level of defining message type, e.g., + * proto2 or proto3. + * @param {string} name Name of the field containing this element (for error + * messages) + * @constructor + */ + var Element = function(type, resolvedType, isMapKey, syntax, name) { + + /** + * Element type, as a string (e.g., int32). + * @type {{name: string, wireType: number}} + */ + this.type = type; + + /** + * Element type reference to submessage or enum definition, if needed. + * @type {ProtoBuf.Reflect.T|null} + */ + this.resolvedType = resolvedType; + + /** + * Element is a map key. + * @type {boolean} + */ + this.isMapKey = isMapKey; + + /** + * Syntax level of defining message type, e.g., proto2 or proto3. + * @type {string} + */ + this.syntax = syntax; + + /** + * Name of the field containing this element (for error messages) + * @type {string} + */ + this.name = name; + + if (isMapKey && ProtoBuf.MAP_KEY_TYPES.indexOf(type) < 0) + throw Error("Invalid map key type: " + type.name); + }; + + var ElementPrototype = Element.prototype; + + /** + * Obtains a (new) default value for the specified type. + * @param type {string|{name: string, wireType: number}} Field type + * @returns {*} Default value + * @inner + */ + function mkDefault(type) { + if (typeof type === 'string') + type = ProtoBuf.TYPES[type]; + if (typeof type.defaultValue === 'undefined') + throw Error("default value for type "+type.name+" is not supported"); + if (type == ProtoBuf.TYPES["bytes"]) + return new ByteBuffer(0); + return type.defaultValue; + } + + /** + * Returns the default value for this field in proto3. + * @function + * @param type {string|{name: string, wireType: number}} the field type + * @returns {*} Default value + */ + Element.defaultFieldValue = mkDefault; + + /** + * Makes a Long from a value. + * @param {{low: number, high: number, unsigned: boolean}|string|number} value Value + * @param {boolean=} unsigned Whether unsigned or not, defaults to reuse it from Long-like objects or to signed for + * strings and numbers + * @returns {!Long} + * @throws {Error} If the value cannot be converted to a Long + * @inner + */ + function mkLong(value, unsigned) { + if (value && typeof value.low === 'number' && typeof value.high === 'number' && typeof value.unsigned === 'boolean' + && value.low === value.low && value.high === value.high) + return new ProtoBuf.Long(value.low, value.high, typeof unsigned === 'undefined' ? value.unsigned : unsigned); + if (typeof value === 'string') + return ProtoBuf.Long.fromString(value, unsigned || false, 10); + if (typeof value === 'number') + return ProtoBuf.Long.fromNumber(value, unsigned || false); + throw Error("not convertible to Long"); + } + + ElementPrototype.toString = function() { + return (this.name || '') + (this.isMapKey ? 'map' : 'value') + ' element'; + }; + + /** + * Checks if the given value can be set for an element of this type (singular + * field or one element of a repeated field or map). + * @param {*} value Value to check + * @return {*} Verified, maybe adjusted, value + * @throws {Error} If the value cannot be verified for this element slot + * @expose + */ + ElementPrototype.verifyValue = function(value) { + var self = this; + function fail(val, msg) { + throw Error("Illegal value for "+self.toString(true)+" of type "+self.type.name+": "+val+" ("+msg+")"); + } + switch (this.type) { + // Signed 32bit + case ProtoBuf.TYPES["int32"]: + case ProtoBuf.TYPES["sint32"]: + case ProtoBuf.TYPES["sfixed32"]: + // Account for !NaN: value === value + if (typeof value !== 'number' || (value === value && value % 1 !== 0)) + fail(typeof value, "not an integer"); + return value > 4294967295 ? value | 0 : value; + + // Unsigned 32bit + case ProtoBuf.TYPES["uint32"]: + case ProtoBuf.TYPES["fixed32"]: + if (typeof value !== 'number' || (value === value && value % 1 !== 0)) + fail(typeof value, "not an integer"); + return value < 0 ? value >>> 0 : value; + + // Signed 64bit + case ProtoBuf.TYPES["int64"]: + case ProtoBuf.TYPES["sint64"]: + case ProtoBuf.TYPES["sfixed64"]: { + if (ProtoBuf.Long) + try { + return mkLong(value, false); + } catch (e) { + fail(typeof value, e.message); + } + else + fail(typeof value, "requires Long.js"); + } + + // Unsigned 64bit + case ProtoBuf.TYPES["uint64"]: + case ProtoBuf.TYPES["fixed64"]: { + if (ProtoBuf.Long) + try { + return mkLong(value, true); + } catch (e) { + fail(typeof value, e.message); + } + else + fail(typeof value, "requires Long.js"); + } + + // Bool + case ProtoBuf.TYPES["bool"]: + if (typeof value !== 'boolean') + fail(typeof value, "not a boolean"); + return value; + + // Float + case ProtoBuf.TYPES["float"]: + case ProtoBuf.TYPES["double"]: + if (typeof value !== 'number') + fail(typeof value, "not a number"); + return value; + + // Length-delimited string + case ProtoBuf.TYPES["string"]: + if (typeof value !== 'string' && !(value && value instanceof String)) + fail(typeof value, "not a string"); + return ""+value; // Convert String object to string + + // Length-delimited bytes + case ProtoBuf.TYPES["bytes"]: + if (ByteBuffer.isByteBuffer(value)) + return value; + return ByteBuffer.wrap(value, "base64"); + + // Constant enum value + case ProtoBuf.TYPES["enum"]: { + var values = this.resolvedType.getChildren(ProtoBuf.Reflect.Enum.Value); + for (i=0; i 4294967295 || value < 0) + fail(typeof value, "not in range for uint32"); + return value; + } else { + // proto2 requires enum values to be valid. + fail(value, "not a valid enum value"); + } + } + // Embedded message + case ProtoBuf.TYPES["group"]: + case ProtoBuf.TYPES["message"]: { + if (!value || typeof value !== 'object') + fail(typeof value, "object expected"); + if (value instanceof this.resolvedType.clazz) + return value; + if (value instanceof ProtoBuf.Builder.Message) { + // Mismatched type: Convert to object (see: https://github.com/dcodeIO/ProtoBuf.js/issues/180) + var obj = {}; + for (var i in value) + if (value.hasOwnProperty(i)) + obj[i] = value[i]; + value = obj; + } + // Else let's try to construct one from a key-value object + return new (this.resolvedType.clazz)(value); // May throw for a hundred of reasons + } + } + + // We should never end here + throw Error("[INTERNAL] Illegal value for "+this.toString(true)+": "+value+" (undefined type "+this.type+")"); + }; + + /** + * Calculates the byte length of an element on the wire. + * @param {number} id Field number + * @param {*} value Field value + * @returns {number} Byte length + * @throws {Error} If the value cannot be calculated + * @expose + */ + ElementPrototype.calculateLength = function(id, value) { + if (value === null) return 0; // Nothing to encode + // Tag has already been written + var n; + switch (this.type) { + case ProtoBuf.TYPES["int32"]: + return value < 0 ? ByteBuffer.calculateVarint64(value) : ByteBuffer.calculateVarint32(value); + case ProtoBuf.TYPES["uint32"]: + return ByteBuffer.calculateVarint32(value); + case ProtoBuf.TYPES["sint32"]: + return ByteBuffer.calculateVarint32(ByteBuffer.zigZagEncode32(value)); + case ProtoBuf.TYPES["fixed32"]: + case ProtoBuf.TYPES["sfixed32"]: + case ProtoBuf.TYPES["float"]: + return 4; + case ProtoBuf.TYPES["int64"]: + case ProtoBuf.TYPES["uint64"]: + return ByteBuffer.calculateVarint64(value); + case ProtoBuf.TYPES["sint64"]: + return ByteBuffer.calculateVarint64(ByteBuffer.zigZagEncode64(value)); + case ProtoBuf.TYPES["fixed64"]: + case ProtoBuf.TYPES["sfixed64"]: + return 8; + case ProtoBuf.TYPES["bool"]: + return 1; + case ProtoBuf.TYPES["enum"]: + return ByteBuffer.calculateVarint32(value); + case ProtoBuf.TYPES["double"]: + return 8; + case ProtoBuf.TYPES["string"]: + n = ByteBuffer.calculateUTF8Bytes(value); + return ByteBuffer.calculateVarint32(n) + n; + case ProtoBuf.TYPES["bytes"]: + if (value.remaining() < 0) + throw Error("Illegal value for "+this.toString(true)+": "+value.remaining()+" bytes remaining"); + return ByteBuffer.calculateVarint32(value.remaining()) + value.remaining(); + case ProtoBuf.TYPES["message"]: + n = this.resolvedType.calculate(value); + return ByteBuffer.calculateVarint32(n) + n; + case ProtoBuf.TYPES["group"]: + n = this.resolvedType.calculate(value); + return n + ByteBuffer.calculateVarint32((id << 3) | ProtoBuf.WIRE_TYPES.ENDGROUP); + } + // We should never end here + throw Error("[INTERNAL] Illegal value to encode in "+this.toString(true)+": "+value+" (unknown type)"); + }; + + /** + * Encodes a value to the specified buffer. Does not encode the key. + * @param {number} id Field number + * @param {*} value Field value + * @param {ByteBuffer} buffer ByteBuffer to encode to + * @return {ByteBuffer} The ByteBuffer for chaining + * @throws {Error} If the value cannot be encoded + * @expose + */ + ElementPrototype.encodeValue = function(id, value, buffer) { + if (value === null) return buffer; // Nothing to encode + // Tag has already been written + + switch (this.type) { + // 32bit signed varint + case ProtoBuf.TYPES["int32"]: + // "If you use int32 or int64 as the type for a negative number, the resulting varint is always ten bytes + // long – it is, effectively, treated like a very large unsigned integer." (see #122) + if (value < 0) + buffer.writeVarint64(value); + else + buffer.writeVarint32(value); + break; + + // 32bit unsigned varint + case ProtoBuf.TYPES["uint32"]: + buffer.writeVarint32(value); + break; + + // 32bit varint zig-zag + case ProtoBuf.TYPES["sint32"]: + buffer.writeVarint32ZigZag(value); + break; + + // Fixed unsigned 32bit + case ProtoBuf.TYPES["fixed32"]: + buffer.writeUint32(value); + break; + + // Fixed signed 32bit + case ProtoBuf.TYPES["sfixed32"]: + buffer.writeInt32(value); + break; + + // 64bit varint as-is + case ProtoBuf.TYPES["int64"]: + case ProtoBuf.TYPES["uint64"]: + buffer.writeVarint64(value); // throws + break; + + // 64bit varint zig-zag + case ProtoBuf.TYPES["sint64"]: + buffer.writeVarint64ZigZag(value); // throws + break; + + // Fixed unsigned 64bit + case ProtoBuf.TYPES["fixed64"]: + buffer.writeUint64(value); // throws + break; + + // Fixed signed 64bit + case ProtoBuf.TYPES["sfixed64"]: + buffer.writeInt64(value); // throws + break; + + // Bool + case ProtoBuf.TYPES["bool"]: + if (typeof value === 'string') + buffer.writeVarint32(value.toLowerCase() === 'false' ? 0 : !!value); + else + buffer.writeVarint32(value ? 1 : 0); + break; + + // Constant enum value + case ProtoBuf.TYPES["enum"]: + buffer.writeVarint32(value); + break; + + // 32bit float + case ProtoBuf.TYPES["float"]: + buffer.writeFloat32(value); + break; + + // 64bit float + case ProtoBuf.TYPES["double"]: + buffer.writeFloat64(value); + break; + + // Length-delimited string + case ProtoBuf.TYPES["string"]: + buffer.writeVString(value); + break; + + // Length-delimited bytes + case ProtoBuf.TYPES["bytes"]: + if (value.remaining() < 0) + throw Error("Illegal value for "+this.toString(true)+": "+value.remaining()+" bytes remaining"); + var prevOffset = value.offset; + buffer.writeVarint32(value.remaining()); + buffer.append(value); + value.offset = prevOffset; + break; + + // Embedded message + case ProtoBuf.TYPES["message"]: + var bb = new ByteBuffer().LE(); + this.resolvedType.encode(value, bb); + buffer.writeVarint32(bb.offset); + buffer.append(bb.flip()); + break; + + // Legacy group + case ProtoBuf.TYPES["group"]: + this.resolvedType.encode(value, buffer); + buffer.writeVarint32((id << 3) | ProtoBuf.WIRE_TYPES.ENDGROUP); + break; + + default: + // We should never end here + throw Error("[INTERNAL] Illegal value to encode in "+this.toString(true)+": "+value+" (unknown type)"); + } + return buffer; + }; + + /** + * Decode one element value from the specified buffer. + * @param {ByteBuffer} buffer ByteBuffer to decode from + * @param {number} wireType The field wire type + * @param {number} id The field number + * @return {*} Decoded value + * @throws {Error} If the field cannot be decoded + * @expose + */ + ElementPrototype.decode = function(buffer, wireType, id) { + if (wireType != this.type.wireType) + throw Error("Unexpected wire type for element"); + + var value, nBytes; + switch (this.type) { + // 32bit signed varint + case ProtoBuf.TYPES["int32"]: + return buffer.readVarint32() | 0; + + // 32bit unsigned varint + case ProtoBuf.TYPES["uint32"]: + return buffer.readVarint32() >>> 0; + + // 32bit signed varint zig-zag + case ProtoBuf.TYPES["sint32"]: + return buffer.readVarint32ZigZag() | 0; + + // Fixed 32bit unsigned + case ProtoBuf.TYPES["fixed32"]: + return buffer.readUint32() >>> 0; + + case ProtoBuf.TYPES["sfixed32"]: + return buffer.readInt32() | 0; + + // 64bit signed varint + case ProtoBuf.TYPES["int64"]: + return buffer.readVarint64(); + + // 64bit unsigned varint + case ProtoBuf.TYPES["uint64"]: + return buffer.readVarint64().toUnsigned(); + + // 64bit signed varint zig-zag + case ProtoBuf.TYPES["sint64"]: + return buffer.readVarint64ZigZag(); + + // Fixed 64bit unsigned + case ProtoBuf.TYPES["fixed64"]: + return buffer.readUint64(); + + // Fixed 64bit signed + case ProtoBuf.TYPES["sfixed64"]: + return buffer.readInt64(); + + // Bool varint + case ProtoBuf.TYPES["bool"]: + return !!buffer.readVarint32(); + + // Constant enum value (varint) + case ProtoBuf.TYPES["enum"]: + // The following Builder.Message#set will already throw + return buffer.readVarint32(); + + // 32bit float + case ProtoBuf.TYPES["float"]: + return buffer.readFloat(); + + // 64bit float + case ProtoBuf.TYPES["double"]: + return buffer.readDouble(); + + // Length-delimited string + case ProtoBuf.TYPES["string"]: + return buffer.readVString(); + + // Length-delimited bytes + case ProtoBuf.TYPES["bytes"]: { + nBytes = buffer.readVarint32(); + if (buffer.remaining() < nBytes) + throw Error("Illegal number of bytes for "+this.toString(true)+": "+nBytes+" required but got only "+buffer.remaining()); + value = buffer.clone(); // Offset already set + value.limit = value.offset+nBytes; + buffer.offset += nBytes; + return value; + } + + // Length-delimited embedded message + case ProtoBuf.TYPES["message"]: { + nBytes = buffer.readVarint32(); + return this.resolvedType.decode(buffer, nBytes); + } + + // Legacy group + case ProtoBuf.TYPES["group"]: + return this.resolvedType.decode(buffer, -1, id); + } + + // We should never end here + throw Error("[INTERNAL] Illegal decode type"); + }; + + /** + * Converts a value from a string to the canonical element type. + * + * Legal only when isMapKey is true. + * + * @param {string} str The string value + * @returns {*} The value + */ + ElementPrototype.valueFromString = function(str) { + if (!this.isMapKey) { + throw Error("valueFromString() called on non-map-key element"); + } + + switch (this.type) { + case ProtoBuf.TYPES["int32"]: + case ProtoBuf.TYPES["sint32"]: + case ProtoBuf.TYPES["sfixed32"]: + case ProtoBuf.TYPES["uint32"]: + case ProtoBuf.TYPES["fixed32"]: + return this.verifyValue(parseInt(str)); + + case ProtoBuf.TYPES["int64"]: + case ProtoBuf.TYPES["sint64"]: + case ProtoBuf.TYPES["sfixed64"]: + case ProtoBuf.TYPES["uint64"]: + case ProtoBuf.TYPES["fixed64"]: + // Long-based fields support conversions from string already. + return this.verifyValue(str); + + case ProtoBuf.TYPES["bool"]: + return str === "true"; + + case ProtoBuf.TYPES["string"]: + return this.verifyValue(str); + + case ProtoBuf.TYPES["bytes"]: + return ByteBuffer.fromBinary(str); + } + }; + + /** + * Converts a value from the canonical element type to a string. + * + * It should be the case that `valueFromString(valueToString(val))` returns + * a value equivalent to `verifyValue(val)` for every legal value of `val` + * according to this element type. + * + * This may be used when the element must be stored or used as a string, + * e.g., as a map key on an Object. + * + * Legal only when isMapKey is true. + * + * @param {*} val The value + * @returns {string} The string form of the value. + */ + ElementPrototype.valueToString = function(value) { + if (!this.isMapKey) { + throw Error("valueToString() called on non-map-key element"); + } + + if (this.type === ProtoBuf.TYPES["bytes"]) { + return value.toString("binary"); + } else { + return value.toString(); + } + }; + + /** + * @alias ProtoBuf.Reflect.Element + * @expose + */ + Reflect.Element = Element; + + /** + * Constructs a new Message. + * @exports ProtoBuf.Reflect.Message + * @param {!ProtoBuf.Builder} builder Builder reference + * @param {!ProtoBuf.Reflect.Namespace} parent Parent message or namespace + * @param {string} name Message name + * @param {Object.=} options Message options + * @param {boolean=} isGroup `true` if this is a legacy group + * @param {string?} syntax The syntax level of this definition (e.g., proto3) + * @constructor + * @extends ProtoBuf.Reflect.Namespace + */ + var Message = function(builder, parent, name, options, isGroup, syntax) { + Namespace.call(this, builder, parent, name, options, syntax); + + /** + * @override + */ + this.className = "Message"; + + /** + * Extensions range. + * @type {!Array.|undefined} + * @expose + */ + this.extensions = undefined; + + /** + * Runtime message class. + * @type {?function(new:ProtoBuf.Builder.Message)} + * @expose + */ + this.clazz = null; + + /** + * Whether this is a legacy group or not. + * @type {boolean} + * @expose + */ + this.isGroup = !!isGroup; + + // The following cached collections are used to efficiently iterate over or look up fields when decoding. + + /** + * Cached fields. + * @type {?Array.} + * @private + */ + this._fields = null; + + /** + * Cached fields by id. + * @type {?Object.} + * @private + */ + this._fieldsById = null; + + /** + * Cached fields by name. + * @type {?Object.} + * @private + */ + this._fieldsByName = null; + }; + + /** + * @alias ProtoBuf.Reflect.Message.prototype + * @inner + */ + var MessagePrototype = Message.prototype = Object.create(Namespace.prototype); + + /** + * Builds the message and returns the runtime counterpart, which is a fully functional class. + * @see ProtoBuf.Builder.Message + * @param {boolean=} rebuild Whether to rebuild or not, defaults to false + * @return {ProtoBuf.Reflect.Message} Message class + * @throws {Error} If the message cannot be built + * @expose + */ + MessagePrototype.build = function(rebuild) { + if (this.clazz && !rebuild) + return this.clazz; + + // Create the runtime Message class in its own scope + var clazz = (function(ProtoBuf, T) { + + var fields = T.getChildren(ProtoBuf.Reflect.Message.Field), + oneofs = T.getChildren(ProtoBuf.Reflect.Message.OneOf); + + /** + * Constructs a new runtime Message. + * @name ProtoBuf.Builder.Message + * @class Barebone of all runtime messages. + * @param {!Object.|string} values Preset values + * @param {...string} var_args + * @constructor + * @throws {Error} If the message cannot be created + */ + var Message = function(values, var_args) { + ProtoBuf.Builder.Message.call(this); + + // Create virtual oneof properties + for (var i=0, k=oneofs.length; i 0) { + var value; + // Set field values from a values object + if (arguments.length === 1 && values !== null && typeof values === 'object' && + /* not _another_ Message */ (typeof values.encode !== 'function' || values instanceof Message) && + /* not a repeated field */ !Array.isArray(values) && + /* not a Map */ !(values instanceof ProtoBuf.Map) && + /* not a ByteBuffer */ !ByteBuffer.isByteBuffer(values) && + /* not an ArrayBuffer */ !(values instanceof ArrayBuffer) && + /* not a Long */ !(ProtoBuf.Long && values instanceof ProtoBuf.Long)) { + this.$set(values); + } else // Set field values from arguments, in declaration order + for (i=0, k=arguments.length; i} keyOrObj String key or plain object holding multiple values + * @param {(*|boolean)=} value Value to set if key is a string, otherwise omitted + * @param {boolean=} noAssert Whether to not assert for an actual field / proper value type, defaults to `false` + * @returns {!ProtoBuf.Builder.Message} this + * @throws {Error} If the value cannot be set + * @expose + */ + MessagePrototype.set = function(keyOrObj, value, noAssert) { + if (keyOrObj && typeof keyOrObj === 'object') { + noAssert = value; + for (var ikey in keyOrObj) { + // Check if virtual oneof field - don't set these + if (keyOrObj.hasOwnProperty(ikey) && typeof (value = keyOrObj[ikey]) !== 'undefined' && T._oneofsByName[ikey] === undefined) + this.$set(ikey, value, noAssert); + } + return this; + } + var field = T._fieldsByName[keyOrObj]; + if (!noAssert) { + if (!field) + throw Error(this+"#"+keyOrObj+" is not a field: undefined"); + if (!(field instanceof ProtoBuf.Reflect.Message.Field)) + throw Error(this+"#"+keyOrObj+" is not a field: "+field.toString(true)); + this[field.name] = (value = field.verifyValue(value)); // May throw + } else + this[keyOrObj] = value; + if (field && field.oneof) { // Field is part of an OneOf (not a virtual OneOf field) + var currentField = this[field.oneof.name]; // Virtual field references currently set field + if (value !== null) { + if (currentField !== null && currentField !== field.name) + this[currentField] = null; // Clear currently set field + this[field.oneof.name] = field.name; // Point virtual field at this field + } else if (/* value === null && */currentField === keyOrObj) + this[field.oneof.name] = null; // Clear virtual field (current field explicitly cleared) + } + return this; + }; + + /** + * Sets a field's value. This is an alias for [@link ProtoBuf.Builder.Message#set}. + * @name ProtoBuf.Builder.Message#$set + * @function + * @param {string|!Object.} keyOrObj String key or plain object holding multiple values + * @param {(*|boolean)=} value Value to set if key is a string, otherwise omitted + * @param {boolean=} noAssert Whether to not assert the value, defaults to `false` + * @throws {Error} If the value cannot be set + * @expose + */ + MessagePrototype.$set = MessagePrototype.set; + + /** + * Gets a field's value. + * @name ProtoBuf.Builder.Message#get + * @function + * @param {string} key Key + * @param {boolean=} noAssert Whether to not assert for an actual field, defaults to `false` + * @return {*} Value + * @throws {Error} If there is no such field + * @expose + */ + MessagePrototype.get = function(key, noAssert) { + if (noAssert) + return this[key]; + var field = T._fieldsByName[key]; + if (!field || !(field instanceof ProtoBuf.Reflect.Message.Field)) + throw Error(this+"#"+key+" is not a field: undefined"); + if (!(field instanceof ProtoBuf.Reflect.Message.Field)) + throw Error(this+"#"+key+" is not a field: "+field.toString(true)); + return this[field.name]; + }; + + /** + * Gets a field's value. This is an alias for {@link ProtoBuf.Builder.Message#$get}. + * @name ProtoBuf.Builder.Message#$get + * @function + * @param {string} key Key + * @return {*} Value + * @throws {Error} If there is no such field + * @expose + */ + MessagePrototype.$get = MessagePrototype.get; + + // Getters and setters + + for (var i=0; i} data Data payload + * @param {(!ByteBuffer|boolean)=} buffer ByteBuffer to encode to. Will create a new one and flip it if omitted. + * @param {boolean=} noVerify Whether to not verify field values, defaults to `false` + * @return {!ByteBuffer} Encoded message as a ByteBuffer + * @expose + */ + Message.encode = function(data, buffer, noVerify) { + return new Message(data).encode(buffer, noVerify); + }; + + /** + * Calculates the byte length of the message. + * @name ProtoBuf.Builder.Message#calculate + * @function + * @returns {number} Byte length + * @throws {Error} If the message cannot be calculated or if required fields are missing. + * @expose + */ + MessagePrototype.calculate = function() { + return T.calculate(this); + }; + + /** + * Encodes the varint32 length-delimited message. + * @name ProtoBuf.Builder.Message#encodeDelimited + * @function + * @param {(!ByteBuffer|boolean)=} buffer ByteBuffer to encode to. Will create a new one and flip it if omitted. + * @param {boolean=} noVerify Whether to not verify field values, defaults to `false` + * @return {!ByteBuffer} Encoded message as a ByteBuffer + * @throws {Error} If the message cannot be encoded or if required fields are missing. The later still + * returns the encoded ByteBuffer in the `encoded` property on the error. + * @expose + */ + MessagePrototype.encodeDelimited = function(buffer, noVerify) { + var isNew = false; + if (!buffer) + buffer = new ByteBuffer(), + isNew = true; + var enc = new ByteBuffer().LE(); + T.encode(this, enc, noVerify).flip(); + buffer.writeVarint32(enc.remaining()); + buffer.append(enc); + return isNew ? buffer.flip() : buffer; + }; + + /** + * Directly encodes the message to an ArrayBuffer. + * @name ProtoBuf.Builder.Message#encodeAB + * @function + * @return {ArrayBuffer} Encoded message as ArrayBuffer + * @throws {Error} If the message cannot be encoded or if required fields are missing. The later still + * returns the encoded ArrayBuffer in the `encoded` property on the error. + * @expose + */ + MessagePrototype.encodeAB = function() { + try { + return this.encode().toArrayBuffer(); + } catch (e) { + if (e["encoded"]) e["encoded"] = e["encoded"].toArrayBuffer(); + throw(e); + } + }; + + /** + * Returns the message as an ArrayBuffer. This is an alias for {@link ProtoBuf.Builder.Message#encodeAB}. + * @name ProtoBuf.Builder.Message#toArrayBuffer + * @function + * @return {ArrayBuffer} Encoded message as ArrayBuffer + * @throws {Error} If the message cannot be encoded or if required fields are missing. The later still + * returns the encoded ArrayBuffer in the `encoded` property on the error. + * @expose + */ + MessagePrototype.toArrayBuffer = MessagePrototype.encodeAB; + + /** + * Directly encodes the message to a node Buffer. + * @name ProtoBuf.Builder.Message#encodeNB + * @function + * @return {!Buffer} + * @throws {Error} If the message cannot be encoded, not running under node.js or if required fields are + * missing. The later still returns the encoded node Buffer in the `encoded` property on the error. + * @expose + */ + MessagePrototype.encodeNB = function() { + try { + return this.encode().toBuffer(); + } catch (e) { + if (e["encoded"]) e["encoded"] = e["encoded"].toBuffer(); + throw(e); + } + }; + + /** + * Returns the message as a node Buffer. This is an alias for {@link ProtoBuf.Builder.Message#encodeNB}. + * @name ProtoBuf.Builder.Message#toBuffer + * @function + * @return {!Buffer} + * @throws {Error} If the message cannot be encoded or if required fields are missing. The later still + * returns the encoded node Buffer in the `encoded` property on the error. + * @expose + */ + MessagePrototype.toBuffer = MessagePrototype.encodeNB; + + /** + * Directly encodes the message to a base64 encoded string. + * @name ProtoBuf.Builder.Message#encode64 + * @function + * @return {string} Base64 encoded string + * @throws {Error} If the underlying buffer cannot be encoded or if required fields are missing. The later + * still returns the encoded base64 string in the `encoded` property on the error. + * @expose + */ + MessagePrototype.encode64 = function() { + try { + return this.encode().toBase64(); + } catch (e) { + if (e["encoded"]) e["encoded"] = e["encoded"].toBase64(); + throw(e); + } + }; + + /** + * Returns the message as a base64 encoded string. This is an alias for {@link ProtoBuf.Builder.Message#encode64}. + * @name ProtoBuf.Builder.Message#toBase64 + * @function + * @return {string} Base64 encoded string + * @throws {Error} If the message cannot be encoded or if required fields are missing. The later still + * returns the encoded base64 string in the `encoded` property on the error. + * @expose + */ + MessagePrototype.toBase64 = MessagePrototype.encode64; + + /** + * Directly encodes the message to a hex encoded string. + * @name ProtoBuf.Builder.Message#encodeHex + * @function + * @return {string} Hex encoded string + * @throws {Error} If the underlying buffer cannot be encoded or if required fields are missing. The later + * still returns the encoded hex string in the `encoded` property on the error. + * @expose + */ + MessagePrototype.encodeHex = function() { + try { + return this.encode().toHex(); + } catch (e) { + if (e["encoded"]) e["encoded"] = e["encoded"].toHex(); + throw(e); + } + }; + + /** + * Returns the message as a hex encoded string. This is an alias for {@link ProtoBuf.Builder.Message#encodeHex}. + * @name ProtoBuf.Builder.Message#toHex + * @function + * @return {string} Hex encoded string + * @throws {Error} If the message cannot be encoded or if required fields are missing. The later still + * returns the encoded hex string in the `encoded` property on the error. + * @expose + */ + MessagePrototype.toHex = MessagePrototype.encodeHex; + + /** + * Clones a message object or field value to a raw object. + * @param {*} obj Object to clone + * @param {boolean} binaryAsBase64 Whether to include binary data as base64 strings or as a buffer otherwise + * @param {boolean} longsAsStrings Whether to encode longs as strings + * @param {!ProtoBuf.Reflect.T=} resolvedType The resolved field type if a field + * @returns {*} Cloned object + * @inner + */ + function cloneRaw(obj, binaryAsBase64, longsAsStrings, resolvedType) { + if (obj === null || typeof obj !== 'object') { + // Convert enum values to their respective names + if (resolvedType && resolvedType instanceof ProtoBuf.Reflect.Enum) { + var name = ProtoBuf.Reflect.Enum.getName(resolvedType.object, obj); + if (name !== null) + return name; + } + // Pass-through string, number, boolean, null... + return obj; + } + // Convert ByteBuffers to raw buffer or strings + if (ByteBuffer.isByteBuffer(obj)) + return binaryAsBase64 ? obj.toBase64() : obj.toBuffer(); + // Convert Longs to proper objects or strings + if (ProtoBuf.Long.isLong(obj)) + return longsAsStrings ? obj.toString() : ProtoBuf.Long.fromValue(obj); + var clone; + // Clone arrays + if (Array.isArray(obj)) { + clone = []; + obj.forEach(function(v, k) { + clone[k] = cloneRaw(v, binaryAsBase64, longsAsStrings, resolvedType); + }); + return clone; + } + clone = {}; + // Convert maps to objects + if (obj instanceof ProtoBuf.Map) { + var it = obj.entries(); + for (var e = it.next(); !e.done; e = it.next()) + clone[obj.keyElem.valueToString(e.value[0])] = cloneRaw(e.value[1], binaryAsBase64, longsAsStrings, obj.valueElem.resolvedType); + return clone; + } + // Everything else is a non-null object + var type = obj.$type, + field = undefined; + for (var i in obj) + if (obj.hasOwnProperty(i)) { + if (type && (field = type.getChild(i))) + clone[i] = cloneRaw(obj[i], binaryAsBase64, longsAsStrings, field.resolvedType); + else + clone[i] = cloneRaw(obj[i], binaryAsBase64, longsAsStrings); + } + return clone; + } + + /** + * Returns the message's raw payload. + * @param {boolean=} binaryAsBase64 Whether to include binary data as base64 strings instead of Buffers, defaults to `false` + * @param {boolean} longsAsStrings Whether to encode longs as strings + * @returns {Object.} Raw payload + * @expose + */ + MessagePrototype.toRaw = function(binaryAsBase64, longsAsStrings) { + return cloneRaw(this, !!binaryAsBase64, !!longsAsStrings, this.$type); + }; + + /** + * Encodes a message to JSON. + * @returns {string} JSON string + * @expose + */ + MessagePrototype.encodeJSON = function() { + return JSON.stringify( + cloneRaw(this, + /* binary-as-base64 */ true, + /* longs-as-strings */ true, + this.$type + ) + ); + }; + + /** + * Decodes a message from the specified buffer or string. + * @name ProtoBuf.Builder.Message.decode + * @function + * @param {!ByteBuffer|!ArrayBuffer|!Buffer|string} buffer Buffer to decode from + * @param {(number|string)=} length Message length. Defaults to decode all the remainig data. + * @param {string=} enc Encoding if buffer is a string: hex, utf8 (not recommended), defaults to base64 + * @return {!ProtoBuf.Builder.Message} Decoded message + * @throws {Error} If the message cannot be decoded or if required fields are missing. The later still + * returns the decoded message with missing fields in the `decoded` property on the error. + * @expose + * @see ProtoBuf.Builder.Message.decode64 + * @see ProtoBuf.Builder.Message.decodeHex + */ + Message.decode = function(buffer, length, enc) { + if (typeof length === 'string') + enc = length, + length = -1; + if (typeof buffer === 'string') + buffer = ByteBuffer.wrap(buffer, enc ? enc : "base64"); + else if (!ByteBuffer.isByteBuffer(buffer)) + buffer = ByteBuffer.wrap(buffer); // May throw + var le = buffer.littleEndian; + try { + var msg = T.decode(buffer.LE(), length); + buffer.LE(le); + return msg; + } catch (e) { + buffer.LE(le); + throw(e); + } + }; + + /** + * Decodes a varint32 length-delimited message from the specified buffer or string. + * @name ProtoBuf.Builder.Message.decodeDelimited + * @function + * @param {!ByteBuffer|!ArrayBuffer|!Buffer|string} buffer Buffer to decode from + * @param {string=} enc Encoding if buffer is a string: hex, utf8 (not recommended), defaults to base64 + * @return {ProtoBuf.Builder.Message} Decoded message or `null` if not enough bytes are available yet + * @throws {Error} If the message cannot be decoded or if required fields are missing. The later still + * returns the decoded message with missing fields in the `decoded` property on the error. + * @expose + */ + Message.decodeDelimited = function(buffer, enc) { + if (typeof buffer === 'string') + buffer = ByteBuffer.wrap(buffer, enc ? enc : "base64"); + else if (!ByteBuffer.isByteBuffer(buffer)) + buffer = ByteBuffer.wrap(buffer); // May throw + if (buffer.remaining() < 1) + return null; + var off = buffer.offset, + len = buffer.readVarint32(); + if (buffer.remaining() < len) { + buffer.offset = off; + return null; + } + try { + var msg = T.decode(buffer.slice(buffer.offset, buffer.offset + len).LE()); + buffer.offset += len; + return msg; + } catch (err) { + buffer.offset += len; + throw err; + } + }; + + /** + * Decodes the message from the specified base64 encoded string. + * @name ProtoBuf.Builder.Message.decode64 + * @function + * @param {string} str String to decode from + * @return {!ProtoBuf.Builder.Message} Decoded message + * @throws {Error} If the message cannot be decoded or if required fields are missing. The later still + * returns the decoded message with missing fields in the `decoded` property on the error. + * @expose + */ + Message.decode64 = function(str) { + return Message.decode(str, "base64"); + }; + + /** + * Decodes the message from the specified hex encoded string. + * @name ProtoBuf.Builder.Message.decodeHex + * @function + * @param {string} str String to decode from + * @return {!ProtoBuf.Builder.Message} Decoded message + * @throws {Error} If the message cannot be decoded or if required fields are missing. The later still + * returns the decoded message with missing fields in the `decoded` property on the error. + * @expose + */ + Message.decodeHex = function(str) { + return Message.decode(str, "hex"); + }; + + /** + * Decodes the message from a JSON string. + * @name ProtoBuf.Builder.Message.decodeJSON + * @function + * @param {string} str String to decode from + * @return {!ProtoBuf.Builder.Message} Decoded message + * @throws {Error} If the message cannot be decoded or if required fields are + * missing. + * @expose + */ + Message.decodeJSON = function(str) { + return new Message(JSON.parse(str)); + }; + + // Utility + + /** + * Returns a string representation of this Message. + * @name ProtoBuf.Builder.Message#toString + * @function + * @return {string} String representation as of ".Fully.Qualified.MessageName" + * @expose + */ + MessagePrototype.toString = function() { + return T.toString(); + }; + + // Properties + + /** + * Message options. + * @name ProtoBuf.Builder.Message.$options + * @type {Object.} + * @expose + */ + var $optionsS; // cc needs this + + /** + * Message options. + * @name ProtoBuf.Builder.Message#$options + * @type {Object.} + * @expose + */ + var $options; + + /** + * Reflection type. + * @name ProtoBuf.Builder.Message.$type + * @type {!ProtoBuf.Reflect.Message} + * @expose + */ + var $typeS; + + /** + * Reflection type. + * @name ProtoBuf.Builder.Message#$type + * @type {!ProtoBuf.Reflect.Message} + * @expose + */ + var $type; + + if (Object.defineProperty) + Object.defineProperty(Message, '$options', { "value": T.buildOpt() }), + Object.defineProperty(MessagePrototype, "$options", { "value": Message["$options"] }), + Object.defineProperty(Message, "$type", { "value": T }), + Object.defineProperty(MessagePrototype, "$type", { "value": T }); + + return Message; + + })(ProtoBuf, this); + + // Static enums and prototyped sub-messages / cached collections + this._fields = []; + this._fieldsById = {}; + this._fieldsByName = {}; + this._oneofsByName = {}; + for (var i=0, k=this.children.length, child; i>> 3; + switch (wireType) { + case ProtoBuf.WIRE_TYPES.VARINT: + do tag = buf.readUint8(); + while ((tag & 0x80) === 0x80); + break; + case ProtoBuf.WIRE_TYPES.BITS64: + buf.offset += 8; + break; + case ProtoBuf.WIRE_TYPES.LDELIM: + tag = buf.readVarint32(); // reads the varint + buf.offset += tag; // skips n bytes + break; + case ProtoBuf.WIRE_TYPES.STARTGROUP: + skipTillGroupEnd(id, buf); + break; + case ProtoBuf.WIRE_TYPES.ENDGROUP: + if (id === expectedId) + return false; + else + throw Error("Illegal GROUPEND after unknown group: "+id+" ("+expectedId+" expected)"); + case ProtoBuf.WIRE_TYPES.BITS32: + buf.offset += 4; + break; + default: + throw Error("Illegal wire type in unknown group "+expectedId+": "+wireType); + } + return true; + } + + /** + * Decodes an encoded message and returns the decoded message. + * @param {ByteBuffer} buffer ByteBuffer to decode from + * @param {number=} length Message length. Defaults to decode all remaining data. + * @param {number=} expectedGroupEndId Expected GROUPEND id if this is a legacy group + * @return {ProtoBuf.Builder.Message} Decoded message + * @throws {Error} If the message cannot be decoded + * @expose + */ + MessagePrototype.decode = function(buffer, length, expectedGroupEndId) { + if (typeof length !== 'number') + length = -1; + var start = buffer.offset, + msg = new (this.clazz)(), + tag, wireType, id, field; + while (buffer.offset < start+length || (length === -1 && buffer.remaining() > 0)) { + tag = buffer.readVarint32(); + wireType = tag & 0x07; + id = tag >>> 3; + if (wireType === ProtoBuf.WIRE_TYPES.ENDGROUP) { + if (id !== expectedGroupEndId) + throw Error("Illegal group end indicator for "+this.toString(true)+": "+id+" ("+(expectedGroupEndId ? expectedGroupEndId+" expected" : "not a group")+")"); + break; + } + if (!(field = this._fieldsById[id])) { + // "messages created by your new code can be parsed by your old code: old binaries simply ignore the new field when parsing." + switch (wireType) { + case ProtoBuf.WIRE_TYPES.VARINT: + buffer.readVarint32(); + break; + case ProtoBuf.WIRE_TYPES.BITS32: + buffer.offset += 4; + break; + case ProtoBuf.WIRE_TYPES.BITS64: + buffer.offset += 8; + break; + case ProtoBuf.WIRE_TYPES.LDELIM: + var len = buffer.readVarint32(); + buffer.offset += len; + break; + case ProtoBuf.WIRE_TYPES.STARTGROUP: + while (skipTillGroupEnd(id, buffer)) {} + break; + default: + throw Error("Illegal wire type for unknown field "+id+" in "+this.toString(true)+"#decode: "+wireType); + } + continue; + } + if (field.repeated && !field.options["packed"]) { + msg[field.name].push(field.decode(wireType, buffer)); + } else if (field.map) { + var keyval = field.decode(wireType, buffer); + msg[field.name].set(keyval[0], keyval[1]); + } else { + msg[field.name] = field.decode(wireType, buffer); + if (field.oneof) { // Field is part of an OneOf (not a virtual OneOf field) + var currentField = msg[field.oneof.name]; // Virtual field references currently set field + if (currentField !== null && currentField !== field.name) + msg[currentField] = null; // Clear currently set field + msg[field.oneof.name] = field.name; // Point virtual field at this field + } + } + } + + // Check if all required fields are present and set default values for optional fields that are not + for (var i=0, k=this._fields.length; i=} options Options + * @param {!ProtoBuf.Reflect.Message.OneOf=} oneof Enclosing OneOf + * @param {string?} syntax The syntax level of this definition (e.g., proto3) + * @constructor + * @extends ProtoBuf.Reflect.T + */ + var Field = function(builder, message, rule, keytype, type, name, id, options, oneof, syntax) { + T.call(this, builder, message, name); + + /** + * @override + */ + this.className = "Message.Field"; + + /** + * Message field required flag. + * @type {boolean} + * @expose + */ + this.required = rule === "required"; + + /** + * Message field repeated flag. + * @type {boolean} + * @expose + */ + this.repeated = rule === "repeated"; + + /** + * Message field map flag. + * @type {boolean} + * @expose + */ + this.map = rule === "map"; + + /** + * Message field key type. Type reference string if unresolved, protobuf + * type if resolved. Valid only if this.map === true, null otherwise. + * @type {string|{name: string, wireType: number}|null} + * @expose + */ + this.keyType = keytype || null; + + /** + * Message field type. Type reference string if unresolved, protobuf type if + * resolved. In a map field, this is the value type. + * @type {string|{name: string, wireType: number}} + * @expose + */ + this.type = type; + + /** + * Resolved type reference inside the global namespace. + * @type {ProtoBuf.Reflect.T|null} + * @expose + */ + this.resolvedType = null; + + /** + * Unique message field id. + * @type {number} + * @expose + */ + this.id = id; + + /** + * Message field options. + * @type {!Object.} + * @dict + * @expose + */ + this.options = options || {}; + + /** + * Default value. + * @type {*} + * @expose + */ + this.defaultValue = null; + + /** + * Enclosing OneOf. + * @type {?ProtoBuf.Reflect.Message.OneOf} + * @expose + */ + this.oneof = oneof || null; + + /** + * Syntax level of this definition (e.g., proto3). + * @type {string} + * @expose + */ + this.syntax = syntax || 'proto2'; + + /** + * Original field name. + * @type {string} + * @expose + */ + this.originalName = this.name; // Used to revert camelcase transformation on naming collisions + + /** + * Element implementation. Created in build() after types are resolved. + * @type {ProtoBuf.Element} + * @expose + */ + this.element = null; + + /** + * Key element implementation, for map fields. Created in build() after + * types are resolved. + * @type {ProtoBuf.Element} + * @expose + */ + this.keyElement = null; + + // Convert field names to camel case notation if the override is set + if (this.builder.options['convertFieldsToCamelCase'] && !(this instanceof Message.ExtensionField)) + this.name = ProtoBuf.Util.toCamelCase(this.name); + }; + + /** + * @alias ProtoBuf.Reflect.Message.Field.prototype + * @inner + */ + var FieldPrototype = Field.prototype = Object.create(T.prototype); + + /** + * Builds the field. + * @override + * @expose + */ + FieldPrototype.build = function() { + this.element = new Element(this.type, this.resolvedType, false, this.syntax, this.name); + if (this.map) + this.keyElement = new Element(this.keyType, undefined, true, this.syntax, this.name); + + // In proto3, fields do not have field presence, and every field is set to + // its type's default value ("", 0, 0.0, or false). + if (this.syntax === 'proto3' && !this.repeated && !this.map) + this.defaultValue = Element.defaultFieldValue(this.type); + + // Otherwise, default values are present when explicitly specified + else if (typeof this.options['default'] !== 'undefined') + this.defaultValue = this.verifyValue(this.options['default']); + }; + + /** + * Checks if the given value can be set for this field. + * @param {*} value Value to check + * @param {boolean=} skipRepeated Whether to skip the repeated value check or not. Defaults to false. + * @return {*} Verified, maybe adjusted, value + * @throws {Error} If the value cannot be set for this field + * @expose + */ + FieldPrototype.verifyValue = function(value, skipRepeated) { + skipRepeated = skipRepeated || false; + var self = this; + function fail(val, msg) { + throw Error("Illegal value for "+self.toString(true)+" of type "+self.type.name+": "+val+" ("+msg+")"); + } + if (value === null) { // NULL values for optional fields + if (this.required) + fail(typeof value, "required"); + if (this.syntax === 'proto3' && this.type !== ProtoBuf.TYPES["message"]) + fail(typeof value, "proto3 field without field presence cannot be null"); + return null; + } + var i; + if (this.repeated && !skipRepeated) { // Repeated values as arrays + if (!Array.isArray(value)) + value = [value]; + var res = []; + for (i=0; i 0; + + case ProtoBuf.TYPES["bytes"]: + return value.remaining() > 0; + + case ProtoBuf.TYPES["enum"]: + return value !== 0; + + case ProtoBuf.TYPES["message"]: + return value !== null; + default: + return true; + } + }; + + /** + * Encodes the specified field value to the specified buffer. + * @param {*} value Verified field value + * @param {ByteBuffer} buffer ByteBuffer to encode to + * @param {!ProtoBuf.Builder.Message} message Runtime message + * @return {ByteBuffer} The ByteBuffer for chaining + * @throws {Error} If the field cannot be encoded + * @expose + */ + FieldPrototype.encode = function(value, buffer, message) { + if (this.type === null || typeof this.type !== 'object') + throw Error("[INTERNAL] Unresolved type in "+this.toString(true)+": "+this.type); + if (value === null || (this.repeated && value.length == 0)) + return buffer; // Optional omitted + try { + if (this.repeated) { + var i; + // "Only repeated fields of primitive numeric types (types which use the varint, 32-bit, or 64-bit wire + // types) can be declared 'packed'." + if (this.options["packed"] && ProtoBuf.PACKABLE_WIRE_TYPES.indexOf(this.type.wireType) >= 0) { + // "All of the elements of the field are packed into a single key-value pair with wire type 2 + // (length-delimited). Each element is encoded the same way it would be normally, except without a + // tag preceding it." + buffer.writeVarint32((this.id << 3) | ProtoBuf.WIRE_TYPES.LDELIM); + buffer.ensureCapacity(buffer.offset += 1); // We do not know the length yet, so let's assume a varint of length 1 + var start = buffer.offset; // Remember where the contents begin + for (i=0; i 1) { // We need to move the contents + var contents = buffer.slice(start, buffer.offset); + start += varintLen-1; + buffer.offset = start; + buffer.append(contents); + } + buffer.writeVarint32(len, start-varintLen); + } else { + // "If your message definition has repeated elements (without the [packed=true] option), the encoded + // message has zero or more key-value pairs with the same tag number" + for (i=0; i= 0) { + n += ByteBuffer.calculateVarint32((this.id << 3) | ProtoBuf.WIRE_TYPES.LDELIM); + ni = 0; + for (i=0; i= 0) { + if (!skipRepeated) { + nBytes = buffer.readVarint32(); + nBytes = buffer.offset + nBytes; // Limit + var values = []; + while (buffer.offset < nBytes) + values.push(this.decode(this.type.wireType, buffer, true)); + return values; + } + // Read the next value otherwise... + } + + // Handle maps. + if (this.map) { + // Read one (key, value) submessage, and return [key, value] + var key = Element.defaultFieldValue(this.keyType); + value = Element.defaultFieldValue(this.type); + + // Read the length + nBytes = buffer.readVarint32(); + if (buffer.remaining() < nBytes) + throw Error("Illegal number of bytes for "+this.toString(true)+": "+nBytes+" required but got only "+buffer.remaining()); + + // Get a sub-buffer of this key/value submessage + var msgbuf = buffer.clone(); + msgbuf.limit = msgbuf.offset + nBytes; + buffer.offset += nBytes; + + while (msgbuf.remaining() > 0) { + var tag = msgbuf.readVarint32(); + wireType = tag & 0x07; + var id = tag >>> 3; + if (id === 1) { + key = this.keyElement.decode(msgbuf, wireType, id); + } else if (id === 2) { + value = this.element.decode(msgbuf, wireType, id); + } else { + throw Error("Unexpected tag in map field key/value submessage"); + } + } + + return [key, value]; + } + + // Handle singular and non-packed repeated field values. + return this.element.decode(buffer, wireType, this.id); + }; + + /** + * @alias ProtoBuf.Reflect.Message.Field + * @expose + */ + Reflect.Message.Field = Field; + + /** + * Constructs a new Message ExtensionField. + * @exports ProtoBuf.Reflect.Message.ExtensionField + * @param {!ProtoBuf.Builder} builder Builder reference + * @param {!ProtoBuf.Reflect.Message} message Message reference + * @param {string} rule Rule, one of requried, optional, repeated + * @param {string} type Data type, e.g. int32 + * @param {string} name Field name + * @param {number} id Unique field id + * @param {!Object.=} options Options + * @constructor + * @extends ProtoBuf.Reflect.Message.Field + */ + var ExtensionField = function(builder, message, rule, type, name, id, options) { + Field.call(this, builder, message, rule, /* keytype = */ null, type, name, id, options); + + /** + * Extension reference. + * @type {!ProtoBuf.Reflect.Extension} + * @expose + */ + this.extension; + }; + + // Extends Field + ExtensionField.prototype = Object.create(Field.prototype); + + /** + * @alias ProtoBuf.Reflect.Message.ExtensionField + * @expose + */ + Reflect.Message.ExtensionField = ExtensionField; + + /** + * Constructs a new Message OneOf. + * @exports ProtoBuf.Reflect.Message.OneOf + * @param {!ProtoBuf.Builder} builder Builder reference + * @param {!ProtoBuf.Reflect.Message} message Message reference + * @param {string} name OneOf name + * @constructor + * @extends ProtoBuf.Reflect.T + */ + var OneOf = function(builder, message, name) { + T.call(this, builder, message, name); + + /** + * Enclosed fields. + * @type {!Array.} + * @expose + */ + this.fields = []; + }; + + /** + * @alias ProtoBuf.Reflect.Message.OneOf + * @expose + */ + Reflect.Message.OneOf = OneOf; + + /** + * Constructs a new Enum. + * @exports ProtoBuf.Reflect.Enum + * @param {!ProtoBuf.Builder} builder Builder reference + * @param {!ProtoBuf.Reflect.T} parent Parent Reflect object + * @param {string} name Enum name + * @param {Object.=} options Enum options + * @param {string?} syntax The syntax level (e.g., proto3) + * @constructor + * @extends ProtoBuf.Reflect.Namespace + */ + var Enum = function(builder, parent, name, options, syntax) { + Namespace.call(this, builder, parent, name, options, syntax); + + /** + * @override + */ + this.className = "Enum"; + + /** + * Runtime enum object. + * @type {Object.|null} + * @expose + */ + this.object = null; + }; + + /** + * Gets the string name of an enum value. + * @param {!ProtoBuf.Builder.Enum} enm Runtime enum + * @param {number} value Enum value + * @returns {?string} Name or `null` if not present + * @expose + */ + Enum.getName = function(enm, value) { + var keys = Object.keys(enm); + for (var i=0, key; i} + * @expose + */ + EnumPrototype.build = function(rebuild) { + if (this.object && !rebuild) + return this.object; + var enm = new ProtoBuf.Builder.Enum(), + values = this.getChildren(Enum.Value); + for (var i=0, k=values.length; i=} options Options + * @constructor + * @extends ProtoBuf.Reflect.Namespace + */ + var Service = function(builder, root, name, options) { + Namespace.call(this, builder, root, name, options); + + /** + * @override + */ + this.className = "Service"; + + /** + * Built runtime service class. + * @type {?function(new:ProtoBuf.Builder.Service)} + */ + this.clazz = null; + }; + + /** + * @alias ProtoBuf.Reflect.Service.prototype + * @inner + */ + var ServicePrototype = Service.prototype = Object.create(Namespace.prototype); + + /** + * Builds the service and returns the runtime counterpart, which is a fully functional class. + * @see ProtoBuf.Builder.Service + * @param {boolean=} rebuild Whether to rebuild or not + * @return {Function} Service class + * @throws {Error} If the message cannot be built + * @expose + */ + ServicePrototype.build = function(rebuild) { + if (this.clazz && !rebuild) + return this.clazz; + + // Create the runtime Service class in its own scope + return this.clazz = (function(ProtoBuf, T) { + + /** + * Constructs a new runtime Service. + * @name ProtoBuf.Builder.Service + * @param {function(string, ProtoBuf.Builder.Message, function(Error, ProtoBuf.Builder.Message=))=} rpcImpl RPC implementation receiving the method name and the message + * @class Barebone of all runtime services. + * @constructor + * @throws {Error} If the service cannot be created + */ + var Service = function(rpcImpl) { + ProtoBuf.Builder.Service.call(this); + + /** + * Service implementation. + * @name ProtoBuf.Builder.Service#rpcImpl + * @type {!function(string, ProtoBuf.Builder.Message, function(Error, ProtoBuf.Builder.Message=))} + * @expose + */ + this.rpcImpl = rpcImpl || function(name, msg, callback) { + // This is what a user has to implement: A function receiving the method name, the actual message to + // send (type checked) and the callback that's either provided with the error as its first + // argument or null and the actual response message. + setTimeout(callback.bind(this, Error("Not implemented, see: https://github.com/dcodeIO/ProtoBuf.js/wiki/Services")), 0); // Must be async! + }; + }; + + /** + * @alias ProtoBuf.Builder.Service.prototype + * @inner + */ + var ServicePrototype = Service.prototype = Object.create(ProtoBuf.Builder.Service.prototype); + + /** + * Asynchronously performs an RPC call using the given RPC implementation. + * @name ProtoBuf.Builder.Service.[Method] + * @function + * @param {!function(string, ProtoBuf.Builder.Message, function(Error, ProtoBuf.Builder.Message=))} rpcImpl RPC implementation + * @param {ProtoBuf.Builder.Message} req Request + * @param {function(Error, (ProtoBuf.Builder.Message|ByteBuffer|Buffer|string)=)} callback Callback receiving + * the error if any and the response either as a pre-parsed message or as its raw bytes + * @abstract + */ + + /** + * Asynchronously performs an RPC call using the instance's RPC implementation. + * @name ProtoBuf.Builder.Service#[Method] + * @function + * @param {ProtoBuf.Builder.Message} req Request + * @param {function(Error, (ProtoBuf.Builder.Message|ByteBuffer|Buffer|string)=)} callback Callback receiving + * the error if any and the response either as a pre-parsed message or as its raw bytes + * @abstract + */ + + var rpc = T.getChildren(ProtoBuf.Reflect.Service.RPCMethod); + for (var i=0; i} + * @expose + */ + var $optionsS; // cc needs this + + /** + * Service options. + * @name ProtoBuf.Builder.Service#$options + * @type {Object.} + * @expose + */ + var $options; + + /** + * Reflection type. + * @name ProtoBuf.Builder.Service.$type + * @type {!ProtoBuf.Reflect.Service} + * @expose + */ + var $typeS; + + /** + * Reflection type. + * @name ProtoBuf.Builder.Service#$type + * @type {!ProtoBuf.Reflect.Service} + * @expose + */ + var $type; + + if (Object.defineProperty) + Object.defineProperty(Service, "$options", { "value": T.buildOpt() }), + Object.defineProperty(ServicePrototype, "$options", { "value": Service["$options"] }), + Object.defineProperty(Service, "$type", { "value": T }), + Object.defineProperty(ServicePrototype, "$type", { "value": T }); + + return Service; + + })(ProtoBuf, this); + }; + + /** + * @alias ProtoBuf.Reflect.Service + * @expose + */ + Reflect.Service = Service; + + /** + * Abstract service method. + * @exports ProtoBuf.Reflect.Service.Method + * @param {!ProtoBuf.Builder} builder Builder reference + * @param {!ProtoBuf.Reflect.Service} svc Service + * @param {string} name Method name + * @param {Object.=} options Options + * @constructor + * @extends ProtoBuf.Reflect.T + */ + var Method = function(builder, svc, name, options) { + T.call(this, builder, svc, name); + + /** + * @override + */ + this.className = "Service.Method"; + + /** + * Options. + * @type {Object.} + * @expose + */ + this.options = options || {}; + }; + + /** + * @alias ProtoBuf.Reflect.Service.Method.prototype + * @inner + */ + var MethodPrototype = Method.prototype = Object.create(T.prototype); + + /** + * Builds the method's '$options' property. + * @name ProtoBuf.Reflect.Service.Method#buildOpt + * @function + * @return {Object.} + */ + MethodPrototype.buildOpt = NamespacePrototype.buildOpt; + + /** + * @alias ProtoBuf.Reflect.Service.Method + * @expose + */ + Reflect.Service.Method = Method; + + /** + * RPC service method. + * @exports ProtoBuf.Reflect.Service.RPCMethod + * @param {!ProtoBuf.Builder} builder Builder reference + * @param {!ProtoBuf.Reflect.Service} svc Service + * @param {string} name Method name + * @param {string} request Request message name + * @param {string} response Response message name + * @param {boolean} request_stream Whether requests are streamed + * @param {boolean} response_stream Whether responses are streamed + * @param {Object.=} options Options + * @constructor + * @extends ProtoBuf.Reflect.Service.Method + */ + var RPCMethod = function(builder, svc, name, request, response, request_stream, response_stream, options) { + Method.call(this, builder, svc, name, options); + + /** + * @override + */ + this.className = "Service.RPCMethod"; + + /** + * Request message name. + * @type {string} + * @expose + */ + this.requestName = request; + + /** + * Response message name. + * @type {string} + * @expose + */ + this.responseName = response; + + /** + * Whether requests are streamed + * @type {bool} + * @expose + */ + this.requestStream = request_stream; + + /** + * Whether responses are streamed + * @type {bool} + * @expose + */ + this.responseStream = response_stream; + + /** + * Resolved request message type. + * @type {ProtoBuf.Reflect.Message} + * @expose + */ + this.resolvedRequestType = null; + + /** + * Resolved response message type. + * @type {ProtoBuf.Reflect.Message} + * @expose + */ + this.resolvedResponseType = null; + }; + + // Extends Method + RPCMethod.prototype = Object.create(Method.prototype); + + /** + * @alias ProtoBuf.Reflect.Service.RPCMethod + * @expose + */ + Reflect.Service.RPCMethod = RPCMethod; + + return Reflect; + + })(ProtoBuf); + + /** + * @alias ProtoBuf.Builder + * @expose + */ + ProtoBuf.Builder = (function(ProtoBuf, Lang, Reflect) { + "use strict"; + + /** + * Constructs a new Builder. + * @exports ProtoBuf.Builder + * @class Provides the functionality to build protocol messages. + * @param {Object.=} options Options + * @constructor + */ + var Builder = function(options) { + + /** + * Namespace. + * @type {ProtoBuf.Reflect.Namespace} + * @expose + */ + this.ns = new Reflect.Namespace(this, null, ""); // Global namespace + + /** + * Namespace pointer. + * @type {ProtoBuf.Reflect.T} + * @expose + */ + this.ptr = this.ns; + + /** + * Resolved flag. + * @type {boolean} + * @expose + */ + this.resolved = false; + + /** + * The current building result. + * @type {Object.|null} + * @expose + */ + this.result = null; + + /** + * Imported files. + * @type {Array.} + * @expose + */ + this.files = {}; + + /** + * Import root override. + * @type {?string} + * @expose + */ + this.importRoot = null; + + /** + * Options. + * @type {!Object.} + * @expose + */ + this.options = options || {}; + }; + + /** + * @alias ProtoBuf.Builder.prototype + * @inner + */ + var BuilderPrototype = Builder.prototype; + + // ----- Definition tests ----- + + /** + * Tests if a definition most likely describes a message. + * @param {!Object} def + * @returns {boolean} + * @expose + */ + Builder.isMessage = function(def) { + // Messages require a string name + if (typeof def["name"] !== 'string') + return false; + // Messages do not contain values (enum) or rpc methods (service) + if (typeof def["values"] !== 'undefined' || typeof def["rpc"] !== 'undefined') + return false; + return true; + }; + + /** + * Tests if a definition most likely describes a message field. + * @param {!Object} def + * @returns {boolean} + * @expose + */ + Builder.isMessageField = function(def) { + // Message fields require a string rule, name and type and an id + if (typeof def["rule"] !== 'string' || typeof def["name"] !== 'string' || typeof def["type"] !== 'string' || typeof def["id"] === 'undefined') + return false; + return true; + }; + + /** + * Tests if a definition most likely describes an enum. + * @param {!Object} def + * @returns {boolean} + * @expose + */ + Builder.isEnum = function(def) { + // Enums require a string name + if (typeof def["name"] !== 'string') + return false; + // Enums require at least one value + if (typeof def["values"] === 'undefined' || !Array.isArray(def["values"]) || def["values"].length === 0) + return false; + return true; + }; + + /** + * Tests if a definition most likely describes a service. + * @param {!Object} def + * @returns {boolean} + * @expose + */ + Builder.isService = function(def) { + // Services require a string name and an rpc object + if (typeof def["name"] !== 'string' || typeof def["rpc"] !== 'object' || !def["rpc"]) + return false; + return true; + }; + + /** + * Tests if a definition most likely describes an extended message + * @param {!Object} def + * @returns {boolean} + * @expose + */ + Builder.isExtend = function(def) { + // Extends rquire a string ref + if (typeof def["ref"] !== 'string') + return false; + return true; + }; + + // ----- Building ----- + + /** + * Resets the pointer to the root namespace. + * @returns {!ProtoBuf.Builder} this + * @expose + */ + BuilderPrototype.reset = function() { + this.ptr = this.ns; + return this; + }; + + /** + * Defines a namespace on top of the current pointer position and places the pointer on it. + * @param {string} namespace + * @return {!ProtoBuf.Builder} this + * @expose + */ + BuilderPrototype.define = function(namespace) { + if (typeof namespace !== 'string' || !Lang.TYPEREF.test(namespace)) + throw Error("illegal namespace: "+namespace); + namespace.split(".").forEach(function(part) { + var ns = this.ptr.getChild(part); + if (ns === null) // Keep existing + this.ptr.addChild(ns = new Reflect.Namespace(this, this.ptr, part)); + this.ptr = ns; + }, this); + return this; + }; + + /** + * Creates the specified definitions at the current pointer position. + * @param {!Array.} defs Messages, enums or services to create + * @returns {!ProtoBuf.Builder} this + * @throws {Error} If a message definition is invalid + * @expose + */ + BuilderPrototype.create = function(defs) { + if (!defs) + return this; // Nothing to create + if (!Array.isArray(defs)) + defs = [defs]; + else { + if (defs.length === 0) + return this; + defs = defs.slice(); + } + + // It's quite hard to keep track of scopes and memory here, so let's do this iteratively. + var stack = [defs]; + while (stack.length > 0) { + defs = stack.pop(); + + if (!Array.isArray(defs)) // Stack always contains entire namespaces + throw Error("not a valid namespace: "+JSON.stringify(defs)); + + while (defs.length > 0) { + var def = defs.shift(); // Namespaces always contain an array of messages, enums and services + + if (Builder.isMessage(def)) { + var obj = new Reflect.Message(this, this.ptr, def["name"], def["options"], def["isGroup"], def["syntax"]); + + // Create OneOfs + var oneofs = {}; + if (def["oneofs"]) + Object.keys(def["oneofs"]).forEach(function(name) { + obj.addChild(oneofs[name] = new Reflect.Message.OneOf(this, obj, name)); + }, this); + + // Create fields + if (def["fields"]) + def["fields"].forEach(function(fld) { + if (obj.getChild(fld["id"]|0) !== null) + throw Error("duplicate or invalid field id in "+obj.name+": "+fld['id']); + if (fld["options"] && typeof fld["options"] !== 'object') + throw Error("illegal field options in "+obj.name+"#"+fld["name"]); + var oneof = null; + if (typeof fld["oneof"] === 'string' && !(oneof = oneofs[fld["oneof"]])) + throw Error("illegal oneof in "+obj.name+"#"+fld["name"]+": "+fld["oneof"]); + fld = new Reflect.Message.Field(this, obj, fld["rule"], fld["keytype"], fld["type"], fld["name"], fld["id"], fld["options"], oneof, def["syntax"]); + if (oneof) + oneof.fields.push(fld); + obj.addChild(fld); + }, this); + + // Push children to stack + var subObj = []; + if (def["enums"]) + def["enums"].forEach(function(enm) { + subObj.push(enm); + }); + if (def["messages"]) + def["messages"].forEach(function(msg) { + subObj.push(msg); + }); + if (def["services"]) + def["services"].forEach(function(svc) { + subObj.push(svc); + }); + + // Set extension ranges + if (def["extensions"]) { + if (typeof def["extensions"][0] === 'number') // pre 5.0.1 + obj.extensions = [ def["extensions"] ]; + else + obj.extensions = def["extensions"]; + } + + // Create on top of current namespace + this.ptr.addChild(obj); + if (subObj.length > 0) { + stack.push(defs); // Push the current level back + defs = subObj; // Continue processing sub level + subObj = null; + this.ptr = obj; // And move the pointer to this namespace + obj = null; + continue; + } + subObj = null; + + } else if (Builder.isEnum(def)) { + + obj = new Reflect.Enum(this, this.ptr, def["name"], def["options"], def["syntax"]); + def["values"].forEach(function(val) { + obj.addChild(new Reflect.Enum.Value(this, obj, val["name"], val["id"])); + }, this); + this.ptr.addChild(obj); + + } else if (Builder.isService(def)) { + + obj = new Reflect.Service(this, this.ptr, def["name"], def["options"]); + Object.keys(def["rpc"]).forEach(function(name) { + var mtd = def["rpc"][name]; + obj.addChild(new Reflect.Service.RPCMethod(this, obj, name, mtd["request"], mtd["response"], !!mtd["request_stream"], !!mtd["response_stream"], mtd["options"])); + }, this); + this.ptr.addChild(obj); + + } else if (Builder.isExtend(def)) { + + obj = this.ptr.resolve(def["ref"], true); + if (obj) { + def["fields"].forEach(function(fld) { + if (obj.getChild(fld['id']|0) !== null) + throw Error("duplicate extended field id in "+obj.name+": "+fld['id']); + // Check if field id is allowed to be extended + if (obj.extensions) { + var valid = false; + obj.extensions.forEach(function(range) { + if (fld["id"] >= range[0] && fld["id"] <= range[1]) + valid = true; + }); + if (!valid) + throw Error("illegal extended field id in "+obj.name+": "+fld['id']+" (not within valid ranges)"); + } + // Convert extension field names to camel case notation if the override is set + var name = fld["name"]; + if (this.options['convertFieldsToCamelCase']) + name = ProtoBuf.Util.toCamelCase(name); + // see #161: Extensions use their fully qualified name as their runtime key and... + var field = new Reflect.Message.ExtensionField(this, obj, fld["rule"], fld["type"], this.ptr.fqn()+'.'+name, fld["id"], fld["options"]); + // ...are added on top of the current namespace as an extension which is used for + // resolving their type later on (the extension always keeps the original name to + // prevent naming collisions) + var ext = new Reflect.Extension(this, this.ptr, fld["name"], field); + field.extension = ext; + this.ptr.addChild(ext); + obj.addChild(field); + }, this); + + } else if (!/\.?google\.protobuf\./.test(def["ref"])) // Silently skip internal extensions + throw Error("extended message "+def["ref"]+" is not defined"); + + } else + throw Error("not a valid definition: "+JSON.stringify(def)); + + def = null; + obj = null; + } + // Break goes here + defs = null; + this.ptr = this.ptr.parent; // Namespace done, continue at parent + } + this.resolved = false; // Require re-resolve + this.result = null; // Require re-build + return this; + }; + + /** + * Propagates syntax to all children. + * @param {!Object} parent + * @inner + */ + function propagateSyntax(parent) { + if (parent['messages']) { + parent['messages'].forEach(function(child) { + child["syntax"] = parent["syntax"]; + propagateSyntax(child); + }); + } + if (parent['enums']) { + parent['enums'].forEach(function(child) { + child["syntax"] = parent["syntax"]; + }); + } + } + + /** + * Imports another definition into this builder. + * @param {Object.} json Parsed import + * @param {(string|{root: string, file: string})=} filename Imported file name + * @returns {!ProtoBuf.Builder} this + * @throws {Error} If the definition or file cannot be imported + * @expose + */ + BuilderPrototype["import"] = function(json, filename) { + var delim = '/'; + + // Make sure to skip duplicate imports + + if (typeof filename === 'string') { + + if (ProtoBuf.Util.IS_NODE) + filename = require$$2['resolve'](filename); + if (this.files[filename] === true) + return this.reset(); + this.files[filename] = true; + + } else if (typeof filename === 'object') { // Object with root, file. + + var root = filename.root; + if (ProtoBuf.Util.IS_NODE) + root = require$$2['resolve'](root); + if (root.indexOf("\\") >= 0 || filename.file.indexOf("\\") >= 0) + delim = '\\'; + var fname; + if (ProtoBuf.Util.IS_NODE) + fname = require$$2['join'](root, filename.file); + else + fname = root + delim + filename.file; + if (this.files[fname] === true) + return this.reset(); + this.files[fname] = true; + } + + // Import imports + + if (json['imports'] && json['imports'].length > 0) { + var importRoot, + resetRoot = false; + + if (typeof filename === 'object') { // If an import root is specified, override + + this.importRoot = filename["root"]; resetRoot = true; // ... and reset afterwards + importRoot = this.importRoot; + filename = filename["file"]; + if (importRoot.indexOf("\\") >= 0 || filename.indexOf("\\") >= 0) + delim = '\\'; + + } else if (typeof filename === 'string') { + + if (this.importRoot) // If import root is overridden, use it + importRoot = this.importRoot; + else { // Otherwise compute from filename + if (filename.indexOf("/") >= 0) { // Unix + importRoot = filename.replace(/\/[^\/]*$/, ""); + if (/* /file.proto */ importRoot === "") + importRoot = "/"; + } else if (filename.indexOf("\\") >= 0) { // Windows + importRoot = filename.replace(/\\[^\\]*$/, ""); + delim = '\\'; + } else + importRoot = "."; + } + + } else + importRoot = null; + + for (var i=0; i)=} path Specifies what to return. If omitted, the entire namespace will be returned. + * @returns {!ProtoBuf.Builder.Message|!Object.} + * @throws {Error} If a type could not be resolved + * @expose + */ + BuilderPrototype.build = function(path) { + this.reset(); + if (!this.resolved) + this.resolveAll(), + this.resolved = true, + this.result = null; // Require re-build + if (this.result === null) // (Re-)Build + this.result = this.ns.build(); + if (!path) + return this.result; + var part = typeof path === 'string' ? path.split(".") : path, + ptr = this.result; // Build namespace pointer (no hasChild etc.) + for (var i=0; i=} contents Initial contents + * @constructor + */ + var Map = function(field, contents) { + if (!field.map) + throw Error("field is not a map"); + + /** + * The field corresponding to this map. + * @type {!ProtoBuf.Reflect.Field} + */ + this.field = field; + + /** + * Element instance corresponding to key type. + * @type {!ProtoBuf.Reflect.Element} + */ + this.keyElem = new Reflect.Element(field.keyType, null, true, field.syntax); + + /** + * Element instance corresponding to value type. + * @type {!ProtoBuf.Reflect.Element} + */ + this.valueElem = new Reflect.Element(field.type, field.resolvedType, false, field.syntax); + + /** + * Internal map: stores mapping of (string form of key) -> (key, value) + * pair. + * + * We provide map semantics for arbitrary key types, but we build on top + * of an Object, which has only string keys. In order to avoid the need + * to convert a string key back to its native type in many situations, + * we store the native key value alongside the value. Thus, we only need + * a one-way mapping from a key type to its string form that guarantees + * uniqueness and equality (i.e., str(K1) === str(K2) if and only if K1 + * === K2). + * + * @type {!Object} + */ + this.map = {}; + + /** + * Returns the number of elements in the map. + */ + Object.defineProperty(this, "size", { + get: function() { return Object.keys(this.map).length; } + }); + + // Fill initial contents from a raw object. + if (contents) { + var keys = Object.keys(contents); + for (var i = 0; i < keys.length; i++) { + var key = this.keyElem.valueFromString(keys[i]); + var val = this.valueElem.verifyValue(contents[keys[i]]); + this.map[this.keyElem.valueToString(key)] = + { key: key, value: val }; + } + } + }; + + var MapPrototype = Map.prototype; + + /** + * Helper: return an iterator over an array. + * @param {!Array<*>} arr the array + * @returns {!Object} an iterator + * @inner + */ + function arrayIterator(arr) { + var idx = 0; + return { + next: function() { + if (idx < arr.length) + return { done: false, value: arr[idx++] }; + return { done: true }; + } + } + } + + /** + * Clears the map. + */ + MapPrototype.clear = function() { + this.map = {}; + }; + + /** + * Deletes a particular key from the map. + * @returns {boolean} Whether any entry with this key was deleted. + */ + MapPrototype["delete"] = function(key) { + var keyValue = this.keyElem.valueToString(this.keyElem.verifyValue(key)); + var hadKey = keyValue in this.map; + delete this.map[keyValue]; + return hadKey; + }; + + /** + * Returns an iterator over [key, value] pairs in the map. + * @returns {Object} The iterator + */ + MapPrototype.entries = function() { + var entries = []; + var strKeys = Object.keys(this.map); + for (var i = 0, entry; i < strKeys.length; i++) + entries.push([(entry=this.map[strKeys[i]]).key, entry.value]); + return arrayIterator(entries); + }; + + /** + * Returns an iterator over keys in the map. + * @returns {Object} The iterator + */ + MapPrototype.keys = function() { + var keys = []; + var strKeys = Object.keys(this.map); + for (var i = 0; i < strKeys.length; i++) + keys.push(this.map[strKeys[i]].key); + return arrayIterator(keys); + }; + + /** + * Returns an iterator over values in the map. + * @returns {!Object} The iterator + */ + MapPrototype.values = function() { + var values = []; + var strKeys = Object.keys(this.map); + for (var i = 0; i < strKeys.length; i++) + values.push(this.map[strKeys[i]].value); + return arrayIterator(values); + }; + + /** + * Iterates over entries in the map, calling a function on each. + * @param {function(this:*, *, *, *)} cb The callback to invoke with value, key, and map arguments. + * @param {Object=} thisArg The `this` value for the callback + */ + MapPrototype.forEach = function(cb, thisArg) { + var strKeys = Object.keys(this.map); + for (var i = 0, entry; i < strKeys.length; i++) + cb.call(thisArg, (entry=this.map[strKeys[i]]).value, entry.key, this); + }; + + /** + * Sets a key in the map to the given value. + * @param {*} key The key + * @param {*} value The value + * @returns {!ProtoBuf.Map} The map instance + */ + MapPrototype.set = function(key, value) { + var keyValue = this.keyElem.verifyValue(key); + var valValue = this.valueElem.verifyValue(value); + this.map[this.keyElem.valueToString(keyValue)] = + { key: keyValue, value: valValue }; + return this; + }; + + /** + * Gets the value corresponding to a key in the map. + * @param {*} key The key + * @returns {*|undefined} The value, or `undefined` if key not present + */ + MapPrototype.get = function(key) { + var keyValue = this.keyElem.valueToString(this.keyElem.verifyValue(key)); + if (!(keyValue in this.map)) + return undefined; + return this.map[keyValue].value; + }; + + /** + * Determines whether the given key is present in the map. + * @param {*} key The key + * @returns {boolean} `true` if the key is present + */ + MapPrototype.has = function(key) { + var keyValue = this.keyElem.valueToString(this.keyElem.verifyValue(key)); + return (keyValue in this.map); + }; + + return Map; + })(ProtoBuf, ProtoBuf.Reflect); + + + /** + * Constructs a new empty Builder. + * @param {Object.=} options Builder options, defaults to global options set on ProtoBuf + * @return {!ProtoBuf.Builder} Builder + * @expose + */ + ProtoBuf.newBuilder = function(options) { + options = options || {}; + if (typeof options['convertFieldsToCamelCase'] === 'undefined') + options['convertFieldsToCamelCase'] = ProtoBuf.convertFieldsToCamelCase; + if (typeof options['populateAccessors'] === 'undefined') + options['populateAccessors'] = ProtoBuf.populateAccessors; + return new ProtoBuf.Builder(options); + }; + + /** + * Loads a .json definition and returns the Builder. + * @param {!*|string} json JSON definition + * @param {(ProtoBuf.Builder|string|{root: string, file: string})=} builder Builder to append to. Will create a new one if omitted. + * @param {(string|{root: string, file: string})=} filename The corresponding file name if known. Must be specified for imports. + * @return {ProtoBuf.Builder} Builder to create new messages + * @throws {Error} If the definition cannot be parsed or built + * @expose + */ + ProtoBuf.loadJson = function(json, builder, filename) { + if (typeof builder === 'string' || (builder && typeof builder["file"] === 'string' && typeof builder["root"] === 'string')) + filename = builder, + builder = null; + if (!builder || typeof builder !== 'object') + builder = ProtoBuf.newBuilder(); + if (typeof json === 'string') + json = JSON.parse(json); + builder["import"](json, filename); + builder.resolveAll(); + return builder; + }; + + /** + * Loads a .json file and returns the Builder. + * @param {string|!{root: string, file: string}} filename Path to json file or an object specifying 'file' with + * an overridden 'root' path for all imported files. + * @param {function(?Error, !ProtoBuf.Builder=)=} callback Callback that will receive `null` as the first and + * the Builder as its second argument on success, otherwise the error as its first argument. If omitted, the + * file will be read synchronously and this function will return the Builder. + * @param {ProtoBuf.Builder=} builder Builder to append to. Will create a new one if omitted. + * @return {?ProtoBuf.Builder|undefined} The Builder if synchronous (no callback specified, will be NULL if the + * request has failed), else undefined + * @expose + */ + ProtoBuf.loadJsonFile = function(filename, callback, builder) { + if (callback && typeof callback === 'object') + builder = callback, + callback = null; + else if (!callback || typeof callback !== 'function') + callback = null; + if (callback) + return ProtoBuf.Util.fetch(typeof filename === 'string' ? filename : filename["root"]+"/"+filename["file"], function(contents) { + if (contents === null) { + callback(Error("Failed to fetch file")); + return; + } + try { + callback(null, ProtoBuf.loadJson(JSON.parse(contents), builder, filename)); + } catch (e) { + callback(e); + } + }); + var contents = ProtoBuf.Util.fetch(typeof filename === 'object' ? filename["root"]+"/"+filename["file"] : filename); + return contents === null ? null : ProtoBuf.loadJson(JSON.parse(contents), builder, filename); + }; + + return ProtoBuf; + }); + }); + + var messageCompiled = protobufLight.newBuilder({})['import']({ + "package": "push_server.messages2", + "syntax": "proto2", + "options": { + "objc_class_prefix": "AVIM" + }, + "messages": [{ + "name": "JsonObjectMessage", + "syntax": "proto2", + "fields": [{ + "rule": "required", + "type": "string", + "name": "data", + "id": 1 + }] + }, { + "name": "UnreadTuple", + "syntax": "proto2", + "fields": [{ + "rule": "required", + "type": "string", + "name": "cid", + "id": 1 + }, { + "rule": "required", + "type": "int32", + "name": "unread", + "id": 2 + }, { + "rule": "optional", + "type": "string", + "name": "mid", + "id": 3 + }, { + "rule": "optional", + "type": "int64", + "name": "timestamp", + "id": 4 + }, { + "rule": "optional", + "type": "string", + "name": "from", + "id": 5 + }, { + "rule": "optional", + "type": "string", + "name": "data", + "id": 6 + }, { + "rule": "optional", + "type": "int64", + "name": "patchTimestamp", + "id": 7 + }] + }, { + "name": "LogItem", + "syntax": "proto2", + "fields": [{ + "rule": "optional", + "type": "string", + "name": "from", + "id": 1 + }, { + "rule": "optional", + "type": "string", + "name": "data", + "id": 2 + }, { + "rule": "optional", + "type": "int64", + "name": "timestamp", + "id": 3 + }, { + "rule": "optional", + "type": "string", + "name": "msgId", + "id": 4 + }, { + "rule": "optional", + "type": "int64", + "name": "ackAt", + "id": 5 + }, { + "rule": "optional", + "type": "int64", + "name": "readAt", + "id": 6 + }, { + "rule": "optional", + "type": "int64", + "name": "patchTimestamp", + "id": 7 + }] + }, { + "name": "DataCommand", + "syntax": "proto2", + "fields": [{ + "rule": "repeated", + "type": "string", + "name": "ids", + "id": 1 + }, { + "rule": "repeated", + "type": "JsonObjectMessage", + "name": "msg", + "id": 2 + }, { + "rule": "optional", + "type": "bool", + "name": "offline", + "id": 3 + }] + }, { + "name": "SessionCommand", + "syntax": "proto2", + "fields": [{ + "rule": "optional", + "type": "int64", + "name": "t", + "id": 1 + }, { + "rule": "optional", + "type": "string", + "name": "n", + "id": 2 + }, { + "rule": "optional", + "type": "string", + "name": "s", + "id": 3 + }, { + "rule": "optional", + "type": "string", + "name": "ua", + "id": 4 + }, { + "rule": "optional", + "type": "bool", + "name": "r", + "id": 5 + }, { + "rule": "optional", + "type": "string", + "name": "tag", + "id": 6 + }, { + "rule": "optional", + "type": "string", + "name": "deviceId", + "id": 7 + }, { + "rule": "repeated", + "type": "string", + "name": "sessionPeerIds", + "id": 8 + }, { + "rule": "repeated", + "type": "string", + "name": "onlineSessionPeerIds", + "id": 9 + }, { + "rule": "optional", + "type": "string", + "name": "st", + "id": 10 + }, { + "rule": "optional", + "type": "int32", + "name": "stTtl", + "id": 11 + }, { + "rule": "optional", + "type": "int32", + "name": "code", + "id": 12 + }, { + "rule": "optional", + "type": "string", + "name": "reason", + "id": 13 + }, { + "rule": "optional", + "type": "string", + "name": "deviceToken", + "id": 14 + }, { + "rule": "optional", + "type": "bool", + "name": "sp", + "id": 15 + }, { + "rule": "optional", + "type": "string", + "name": "detail", + "id": 16 + }, { + "rule": "optional", + "type": "int64", + "name": "lastUnreadNotifTime", + "id": 17 + }, { + "rule": "optional", + "type": "int64", + "name": "lastPatchTime", + "id": 18 + }, { + "rule": "optional", + "type": "int64", + "name": "configBitmap", + "id": 19 + }] + }, { + "name": "ErrorCommand", + "syntax": "proto2", + "fields": [{ + "rule": "required", + "type": "int32", + "name": "code", + "id": 1 + }, { + "rule": "required", + "type": "string", + "name": "reason", + "id": 2 + }, { + "rule": "optional", + "type": "int32", + "name": "appCode", + "id": 3 + }, { + "rule": "optional", + "type": "string", + "name": "detail", + "id": 4 + }] + }, { + "name": "DirectCommand", + "syntax": "proto2", + "fields": [{ + "rule": "optional", + "type": "string", + "name": "msg", + "id": 1 + }, { + "rule": "optional", + "type": "string", + "name": "uid", + "id": 2 + }, { + "rule": "optional", + "type": "string", + "name": "fromPeerId", + "id": 3 + }, { + "rule": "optional", + "type": "int64", + "name": "timestamp", + "id": 4 + }, { + "rule": "optional", + "type": "bool", + "name": "offline", + "id": 5 + }, { + "rule": "optional", + "type": "bool", + "name": "hasMore", + "id": 6 + }, { + "rule": "repeated", + "type": "string", + "name": "toPeerIds", + "id": 7 + }, { + "rule": "optional", + "type": "bool", + "name": "r", + "id": 10 + }, { + "rule": "optional", + "type": "string", + "name": "cid", + "id": 11 + }, { + "rule": "optional", + "type": "string", + "name": "id", + "id": 12 + }, { + "rule": "optional", + "type": "bool", + "name": "transient", + "id": 13 + }, { + "rule": "optional", + "type": "string", + "name": "dt", + "id": 14 + }, { + "rule": "optional", + "type": "string", + "name": "roomId", + "id": 15 + }, { + "rule": "optional", + "type": "string", + "name": "pushData", + "id": 16 + }, { + "rule": "optional", + "type": "bool", + "name": "will", + "id": 17 + }, { + "rule": "optional", + "type": "int64", + "name": "patchTimestamp", + "id": 18 + }] + }, { + "name": "AckCommand", + "syntax": "proto2", + "fields": [{ + "rule": "optional", + "type": "int32", + "name": "code", + "id": 1 + }, { + "rule": "optional", + "type": "string", + "name": "reason", + "id": 2 + }, { + "rule": "optional", + "type": "string", + "name": "mid", + "id": 3 + }, { + "rule": "optional", + "type": "string", + "name": "cid", + "id": 4 + }, { + "rule": "optional", + "type": "int64", + "name": "t", + "id": 5 + }, { + "rule": "optional", + "type": "string", + "name": "uid", + "id": 6 + }, { + "rule": "optional", + "type": "int64", + "name": "fromts", + "id": 7 + }, { + "rule": "optional", + "type": "int64", + "name": "tots", + "id": 8 + }, { + "rule": "optional", + "type": "string", + "name": "type", + "id": 9 + }, { + "rule": "repeated", + "type": "string", + "name": "ids", + "id": 10 + }, { + "rule": "optional", + "type": "int32", + "name": "appCode", + "id": 11 + }] + }, { + "name": "UnreadCommand", + "syntax": "proto2", + "fields": [{ + "rule": "repeated", + "type": "UnreadTuple", + "name": "convs", + "id": 1 + }, { + "rule": "optional", + "type": "int64", + "name": "notifTime", + "id": 2 + }] + }, { + "name": "ConvCommand", + "syntax": "proto2", + "fields": [{ + "rule": "repeated", + "type": "string", + "name": "m", + "id": 1 + }, { + "rule": "optional", + "type": "bool", + "name": "transient", + "id": 2 + }, { + "rule": "optional", + "type": "bool", + "name": "unique", + "id": 3 + }, { + "rule": "optional", + "type": "string", + "name": "cid", + "id": 4 + }, { + "rule": "optional", + "type": "string", + "name": "cdate", + "id": 5 + }, { + "rule": "optional", + "type": "string", + "name": "initBy", + "id": 6 + }, { + "rule": "optional", + "type": "string", + "name": "sort", + "id": 7 + }, { + "rule": "optional", + "type": "int32", + "name": "limit", + "id": 8 + }, { + "rule": "optional", + "type": "int32", + "name": "skip", + "id": 9 + }, { + "rule": "optional", + "type": "int32", + "name": "flag", + "id": 10 + }, { + "rule": "optional", + "type": "int32", + "name": "count", + "id": 11 + }, { + "rule": "optional", + "type": "string", + "name": "udate", + "id": 12 + }, { + "rule": "optional", + "type": "int64", + "name": "t", + "id": 13 + }, { + "rule": "optional", + "type": "string", + "name": "n", + "id": 14 + }, { + "rule": "optional", + "type": "string", + "name": "s", + "id": 15 + }, { + "rule": "optional", + "type": "bool", + "name": "statusSub", + "id": 16 + }, { + "rule": "optional", + "type": "bool", + "name": "statusPub", + "id": 17 + }, { + "rule": "optional", + "type": "int32", + "name": "statusTTL", + "id": 18 + }, { + "rule": "optional", + "type": "string", + "name": "uniqueId", + "id": 19 + }, { + "rule": "optional", + "type": "string", + "name": "targetClientId", + "id": 20 + }, { + "rule": "optional", + "type": "int64", + "name": "maxReadTimestamp", + "id": 21 + }, { + "rule": "optional", + "type": "int64", + "name": "maxAckTimestamp", + "id": 22 + }, { + "rule": "optional", + "type": "bool", + "name": "queryAllMembers", + "id": 23 + }, { + "rule": "repeated", + "type": "MaxReadTuple", + "name": "maxReadTuples", + "id": 24 + }, { + "rule": "repeated", + "type": "string", + "name": "cids", + "id": 25 + }, { + "rule": "optional", + "type": "JsonObjectMessage", + "name": "results", + "id": 100 + }, { + "rule": "optional", + "type": "JsonObjectMessage", + "name": "where", + "id": 101 + }, { + "rule": "optional", + "type": "JsonObjectMessage", + "name": "attr", + "id": 103 + }] + }, { + "name": "RoomCommand", + "syntax": "proto2", + "fields": [{ + "rule": "optional", + "type": "string", + "name": "roomId", + "id": 1 + }, { + "rule": "optional", + "type": "string", + "name": "s", + "id": 2 + }, { + "rule": "optional", + "type": "int64", + "name": "t", + "id": 3 + }, { + "rule": "optional", + "type": "string", + "name": "n", + "id": 4 + }, { + "rule": "optional", + "type": "bool", + "name": "transient", + "id": 5 + }, { + "rule": "repeated", + "type": "string", + "name": "roomPeerIds", + "id": 6 + }, { + "rule": "optional", + "type": "string", + "name": "byPeerId", + "id": 7 + }] + }, { + "name": "LogsCommand", + "syntax": "proto2", + "fields": [{ + "rule": "optional", + "type": "string", + "name": "cid", + "id": 1 + }, { + "rule": "optional", + "type": "int32", + "name": "l", + "id": 2 + }, { + "rule": "optional", + "type": "int32", + "name": "limit", + "id": 3 + }, { + "rule": "optional", + "type": "int64", + "name": "t", + "id": 4 + }, { + "rule": "optional", + "type": "int64", + "name": "tt", + "id": 5 + }, { + "rule": "optional", + "type": "string", + "name": "tmid", + "id": 6 + }, { + "rule": "optional", + "type": "string", + "name": "mid", + "id": 7 + }, { + "rule": "optional", + "type": "string", + "name": "checksum", + "id": 8 + }, { + "rule": "optional", + "type": "bool", + "name": "stored", + "id": 9 + }, { + "rule": "optional", + "type": "bool", + "name": "reversed", + "id": 10 + }, { + "rule": "repeated", + "type": "LogItem", + "name": "logs", + "id": 105 + }] + }, { + "name": "RcpCommand", + "syntax": "proto2", + "fields": [{ + "rule": "optional", + "type": "string", + "name": "id", + "id": 1 + }, { + "rule": "optional", + "type": "string", + "name": "cid", + "id": 2 + }, { + "rule": "optional", + "type": "int64", + "name": "t", + "id": 3 + }, { + "rule": "optional", + "type": "bool", + "name": "read", + "id": 4 + }] + }, { + "name": "ReadTuple", + "syntax": "proto2", + "fields": [{ + "rule": "required", + "type": "string", + "name": "cid", + "id": 1 + }, { + "rule": "optional", + "type": "int64", + "name": "timestamp", + "id": 2 + }, { + "rule": "optional", + "type": "string", + "name": "mid", + "id": 3 + }] + }, { + "name": "MaxReadTuple", + "syntax": "proto2", + "fields": [{ + "rule": "optional", + "type": "string", + "name": "pid", + "id": 1 + }, { + "rule": "optional", + "type": "int64", + "name": "maxAckTimestamp", + "id": 2 + }, { + "rule": "optional", + "type": "int64", + "name": "maxReadTimestamp", + "id": 3 + }] + }, { + "name": "ReadCommand", + "syntax": "proto2", + "fields": [{ + "rule": "optional", + "type": "string", + "name": "cid", + "id": 1 + }, { + "rule": "repeated", + "type": "string", + "name": "cids", + "id": 2 + }, { + "rule": "repeated", + "type": "ReadTuple", + "name": "convs", + "id": 3 + }] + }, { + "name": "PresenceCommand", + "syntax": "proto2", + "fields": [{ + "rule": "optional", + "type": "StatusType", + "name": "status", + "id": 1 + }, { + "rule": "repeated", + "type": "string", + "name": "sessionPeerIds", + "id": 2 + }, { + "rule": "optional", + "type": "string", + "name": "cid", + "id": 3 + }] + }, { + "name": "ReportCommand", + "syntax": "proto2", + "fields": [{ + "rule": "optional", + "type": "bool", + "name": "initiative", + "id": 1 + }, { + "rule": "optional", + "type": "string", + "name": "type", + "id": 2 + }, { + "rule": "optional", + "type": "string", + "name": "data", + "id": 3 + }] + }, { + "name": "PatchItem", + "syntax": "proto2", + "fields": [{ + "rule": "optional", + "type": "string", + "name": "cid", + "id": 1 + }, { + "rule": "optional", + "type": "string", + "name": "mid", + "id": 2 + }, { + "rule": "optional", + "type": "int64", + "name": "timestamp", + "id": 3 + }, { + "rule": "optional", + "type": "bool", + "name": "recall", + "id": 4 + }, { + "rule": "optional", + "type": "string", + "name": "data", + "id": 5 + }, { + "rule": "optional", + "type": "int64", + "name": "patchTimestamp", + "id": 6 + }, { + "rule": "optional", + "type": "string", + "name": "from", + "id": 7 + }] + }, { + "name": "PatchCommand", + "syntax": "proto2", + "fields": [{ + "rule": "repeated", + "type": "PatchItem", + "name": "patches", + "id": 1 + }, { + "rule": "optional", + "type": "int64", + "name": "lastPatchTime", + "id": 2 + }] + }, { + "name": "GenericCommand", + "syntax": "proto2", + "fields": [{ + "rule": "optional", + "type": "CommandType", + "name": "cmd", + "id": 1 + }, { + "rule": "optional", + "type": "OpType", + "name": "op", + "id": 2 + }, { + "rule": "optional", + "type": "string", + "name": "appId", + "id": 3 + }, { + "rule": "optional", + "type": "string", + "name": "peerId", + "id": 4 + }, { + "rule": "optional", + "type": "int32", + "name": "i", + "id": 5 + }, { + "rule": "optional", + "type": "string", + "name": "installationId", + "id": 6 + }, { + "rule": "optional", + "type": "int32", + "name": "priority", + "id": 7 + }, { + "rule": "optional", + "type": "int32", + "name": "service", + "id": 8 + }, { + "rule": "optional", + "type": "DataCommand", + "name": "dataMessage", + "id": 101 + }, { + "rule": "optional", + "type": "SessionCommand", + "name": "sessionMessage", + "id": 102 + }, { + "rule": "optional", + "type": "ErrorCommand", + "name": "errorMessage", + "id": 103 + }, { + "rule": "optional", + "type": "DirectCommand", + "name": "directMessage", + "id": 104 + }, { + "rule": "optional", + "type": "AckCommand", + "name": "ackMessage", + "id": 105 + }, { + "rule": "optional", + "type": "UnreadCommand", + "name": "unreadMessage", + "id": 106 + }, { + "rule": "optional", + "type": "ReadCommand", + "name": "readMessage", + "id": 107 + }, { + "rule": "optional", + "type": "RcpCommand", + "name": "rcpMessage", + "id": 108 + }, { + "rule": "optional", + "type": "LogsCommand", + "name": "logsMessage", + "id": 109 + }, { + "rule": "optional", + "type": "ConvCommand", + "name": "convMessage", + "id": 110 + }, { + "rule": "optional", + "type": "RoomCommand", + "name": "roomMessage", + "id": 111 + }, { + "rule": "optional", + "type": "PresenceCommand", + "name": "presenceMessage", + "id": 112 + }, { + "rule": "optional", + "type": "ReportCommand", + "name": "reportMessage", + "id": 113 + }, { + "rule": "optional", + "type": "PatchCommand", + "name": "patchMessage", + "id": 114 + }] + }], + "enums": [{ + "name": "CommandType", + "syntax": "proto2", + "values": [{ + "name": "session", + "id": 0 + }, { + "name": "conv", + "id": 1 + }, { + "name": "direct", + "id": 2 + }, { + "name": "ack", + "id": 3 + }, { + "name": "rcp", + "id": 4 + }, { + "name": "unread", + "id": 5 + }, { + "name": "logs", + "id": 6 + }, { + "name": "error", + "id": 7 + }, { + "name": "login", + "id": 8 + }, { + "name": "data", + "id": 9 + }, { + "name": "room", + "id": 10 + }, { + "name": "read", + "id": 11 + }, { + "name": "presence", + "id": 12 + }, { + "name": "report", + "id": 13 + }, { + "name": "echo", + "id": 14 + }, { + "name": "loggedin", + "id": 15 + }, { + "name": "logout", + "id": 16 + }, { + "name": "loggedout", + "id": 17 + }, { + "name": "patch", + "id": 18 + }] + }, { + "name": "OpType", + "syntax": "proto2", + "values": [{ + "name": "open", + "id": 1 + }, { + "name": "add", + "id": 2 + }, { + "name": "remove", + "id": 3 + }, { + "name": "close", + "id": 4 + }, { + "name": "opened", + "id": 5 + }, { + "name": "closed", + "id": 6 + }, { + "name": "query", + "id": 7 + }, { + "name": "query_result", + "id": 8 + }, { + "name": "conflict", + "id": 9 + }, { + "name": "added", + "id": 10 + }, { + "name": "removed", + "id": 11 + }, { + "name": "start", + "id": 30 + }, { + "name": "started", + "id": 31 + }, { + "name": "joined", + "id": 32 + }, { + "name": "members_joined", + "id": 33 + }, { + "name": "left", + "id": 39 + }, { + "name": "members_left", + "id": 40 + }, { + "name": "results", + "id": 42 + }, { + "name": "count", + "id": 43 + }, { + "name": "result", + "id": 44 + }, { + "name": "update", + "id": 45 + }, { + "name": "updated", + "id": 46 + }, { + "name": "mute", + "id": 47 + }, { + "name": "unmute", + "id": 48 + }, { + "name": "status", + "id": 49 + }, { + "name": "members", + "id": 50 + }, { + "name": "max_read", + "id": 51 + }, { + "name": "is_member", + "id": 52 + }, { + "name": "join", + "id": 80 + }, { + "name": "invite", + "id": 81 + }, { + "name": "leave", + "id": 82 + }, { + "name": "kick", + "id": 83 + }, { + "name": "reject", + "id": 84 + }, { + "name": "invited", + "id": 85 + }, { + "name": "kicked", + "id": 86 + }, { + "name": "upload", + "id": 100 + }, { + "name": "uploaded", + "id": 101 + }, { + "name": "modify", + "id": 150 + }, { + "name": "modified", + "id": 151 + }] + }, { + "name": "StatusType", + "syntax": "proto2", + "values": [{ + "name": "on", + "id": 1 + }, { + "name": "off", + "id": 2 + }] + }], + "isNamespace": true + }).build(); + + var _messages$push_server = messageCompiled.push_server.messages2; + var JsonObjectMessage = _messages$push_server.JsonObjectMessage; + var UnreadTuple = _messages$push_server.UnreadTuple; + var LogItem = _messages$push_server.LogItem; + var DataCommand = _messages$push_server.DataCommand; + var SessionCommand = _messages$push_server.SessionCommand; + var ErrorCommand = _messages$push_server.ErrorCommand; + var DirectCommand = _messages$push_server.DirectCommand; + var AckCommand = _messages$push_server.AckCommand; + var UnreadCommand = _messages$push_server.UnreadCommand; + var ConvCommand = _messages$push_server.ConvCommand; + var RoomCommand = _messages$push_server.RoomCommand; + var LogsCommand = _messages$push_server.LogsCommand; + var RcpCommand = _messages$push_server.RcpCommand; + var ReadTuple = _messages$push_server.ReadTuple; + var MaxReadTuple = _messages$push_server.MaxReadTuple; + var ReadCommand = _messages$push_server.ReadCommand; + var PresenceCommand = _messages$push_server.PresenceCommand; + var ReportCommand = _messages$push_server.ReportCommand; + var GenericCommand = _messages$push_server.GenericCommand; + var PatchCommand = _messages$push_server.PatchCommand; + var PatchItem = _messages$push_server.PatchItem; + var CommandType = _messages$push_server.CommandType; + var OpType = _messages$push_server.OpType; + var StatusType = _messages$push_server.StatusType; + + + + + var message = Object.freeze({ + JsonObjectMessage: JsonObjectMessage, + UnreadTuple: UnreadTuple, + LogItem: LogItem, + DataCommand: DataCommand, + SessionCommand: SessionCommand, + ErrorCommand: ErrorCommand, + DirectCommand: DirectCommand, + AckCommand: AckCommand, + UnreadCommand: UnreadCommand, + ConvCommand: ConvCommand, + RoomCommand: RoomCommand, + LogsCommand: LogsCommand, + RcpCommand: RcpCommand, + ReadTuple: ReadTuple, + MaxReadTuple: MaxReadTuple, + ReadCommand: ReadCommand, + PresenceCommand: PresenceCommand, + ReportCommand: ReportCommand, + GenericCommand: GenericCommand, + PatchCommand: PatchCommand, + PatchItem: PatchItem, + CommandType: CommandType, + OpType: OpType, + StatusType: StatusType + }); + + var eventemitter3 = createCommonjsModule(function (module) { + 'use strict'; + + var has = Object.prototype.hasOwnProperty + , prefix = '~'; + + /** + * Constructor to create a storage for our `EE` objects. + * An `Events` instance is a plain object whose properties are event names. + * + * @constructor + * @api private + */ + function Events() {} + + // + // We try to not inherit from `Object.prototype`. In some engines creating an + // instance in this way is faster than calling `Object.create(null)` directly. + // If `Object.create(null)` is not supported we prefix the event names with a + // character to make sure that the built-in object properties are not + // overridden or used as an attack vector. + // + if (Object.create) { + Events.prototype = Object.create(null); + + // + // This hack is needed because the `__proto__` property is still inherited in + // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5. + // + if (!new Events().__proto__) prefix = false; + } + + /** + * Representation of a single event listener. + * + * @param {Function} fn The listener function. + * @param {Mixed} context The context to invoke the listener with. + * @param {Boolean} [once=false] Specify if the listener is a one-time listener. + * @constructor + * @api private + */ + function EE(fn, context, once) { + this.fn = fn; + this.context = context; + this.once = once || false; + } + + /** + * Minimal `EventEmitter` interface that is molded against the Node.js + * `EventEmitter` interface. + * + * @constructor + * @api public + */ + function EventEmitter() { + this._events = new Events(); + this._eventsCount = 0; + } + + /** + * Return an array listing the events for which the emitter has registered + * listeners. + * + * @returns {Array} + * @api public + */ + EventEmitter.prototype.eventNames = function eventNames() { + var names = [] + , events + , name; + + if (this._eventsCount === 0) return names; + + for (name in (events = this._events)) { + if (has.call(events, name)) names.push(prefix ? name.slice(1) : name); + } + + if (Object.getOwnPropertySymbols) { + return names.concat(Object.getOwnPropertySymbols(events)); + } + + return names; + }; + + /** + * Return the listeners registered for a given event. + * + * @param {String|Symbol} event The event name. + * @param {Boolean} exists Only check if there are listeners. + * @returns {Array|Boolean} + * @api public + */ + EventEmitter.prototype.listeners = function listeners(event, exists) { + var evt = prefix ? prefix + event : event + , available = this._events[evt]; + + if (exists) return !!available; + if (!available) return []; + if (available.fn) return [available.fn]; + + for (var i = 0, l = available.length, ee = new Array(l); i < l; i++) { + ee[i] = available[i].fn; + } + + return ee; + }; + + /** + * Calls each of the listeners registered for a given event. + * + * @param {String|Symbol} event The event name. + * @returns {Boolean} `true` if the event had listeners, else `false`. + * @api public + */ + EventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) { + var evt = prefix ? prefix + event : event; + + if (!this._events[evt]) return false; + + var listeners = this._events[evt] + , len = arguments.length + , args + , i; + + if (listeners.fn) { + if (listeners.once) this.removeListener(event, listeners.fn, undefined, true); + + switch (len) { + case 1: return listeners.fn.call(listeners.context), true; + case 2: return listeners.fn.call(listeners.context, a1), true; + case 3: return listeners.fn.call(listeners.context, a1, a2), true; + case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true; + case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true; + case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true; + } + + for (i = 1, args = new Array(len -1); i < len; i++) { + args[i - 1] = arguments[i]; + } + + listeners.fn.apply(listeners.context, args); + } else { + var length = listeners.length + , j; + + for (i = 0; i < length; i++) { + if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true); + + switch (len) { + case 1: listeners[i].fn.call(listeners[i].context); break; + case 2: listeners[i].fn.call(listeners[i].context, a1); break; + case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break; + case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break; + default: + if (!args) for (j = 1, args = new Array(len -1); j < len; j++) { + args[j - 1] = arguments[j]; + } + + listeners[i].fn.apply(listeners[i].context, args); + } + } + } + + return true; + }; + + /** + * Add a listener for a given event. + * + * @param {String|Symbol} event The event name. + * @param {Function} fn The listener function. + * @param {Mixed} [context=this] The context to invoke the listener with. + * @returns {EventEmitter} `this`. + * @api public + */ + EventEmitter.prototype.on = function on(event, fn, context) { + var listener = new EE(fn, context || this) + , evt = prefix ? prefix + event : event; + + if (!this._events[evt]) this._events[evt] = listener, this._eventsCount++; + else if (!this._events[evt].fn) this._events[evt].push(listener); + else this._events[evt] = [this._events[evt], listener]; + + return this; + }; + + /** + * Add a one-time listener for a given event. + * + * @param {String|Symbol} event The event name. + * @param {Function} fn The listener function. + * @param {Mixed} [context=this] The context to invoke the listener with. + * @returns {EventEmitter} `this`. + * @api public + */ + EventEmitter.prototype.once = function once(event, fn, context) { + var listener = new EE(fn, context || this, true) + , evt = prefix ? prefix + event : event; + + if (!this._events[evt]) this._events[evt] = listener, this._eventsCount++; + else if (!this._events[evt].fn) this._events[evt].push(listener); + else this._events[evt] = [this._events[evt], listener]; + + return this; + }; + + /** + * Remove the listeners of a given event. + * + * @param {String|Symbol} event The event name. + * @param {Function} fn Only remove the listeners that match this function. + * @param {Mixed} context Only remove the listeners that have this context. + * @param {Boolean} once Only remove one-time listeners. + * @returns {EventEmitter} `this`. + * @api public + */ + EventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) { + var evt = prefix ? prefix + event : event; + + if (!this._events[evt]) return this; + if (!fn) { + if (--this._eventsCount === 0) this._events = new Events(); + else delete this._events[evt]; + return this; + } + + var listeners = this._events[evt]; + + if (listeners.fn) { + if ( + listeners.fn === fn + && (!once || listeners.once) + && (!context || listeners.context === context) + ) { + if (--this._eventsCount === 0) this._events = new Events(); + else delete this._events[evt]; + } + } else { + for (var i = 0, events = [], length = listeners.length; i < length; i++) { + if ( + listeners[i].fn !== fn + || (once && !listeners[i].once) + || (context && listeners[i].context !== context) + ) { + events.push(listeners[i]); + } + } + + // + // Reset the array, or remove it completely if we have no more listeners. + // + if (events.length) this._events[evt] = events.length === 1 ? events[0] : events; + else if (--this._eventsCount === 0) this._events = new Events(); + else delete this._events[evt]; + } + + return this; + }; + + /** + * Remove all listeners, or those of the specified event. + * + * @param {String|Symbol} [event] The event name. + * @returns {EventEmitter} `this`. + * @api public + */ + EventEmitter.prototype.removeAllListeners = function removeAllListeners(event) { + var evt; + + if (event) { + evt = prefix ? prefix + event : event; + if (this._events[evt]) { + if (--this._eventsCount === 0) this._events = new Events(); + else delete this._events[evt]; + } + } else { + this._events = new Events(); + this._eventsCount = 0; + } + + return this; + }; + + // + // Alias methods names because people roll like that. + // + EventEmitter.prototype.off = EventEmitter.prototype.removeListener; + EventEmitter.prototype.addListener = EventEmitter.prototype.on; + + // + // This function doesn't apply anymore. + // + EventEmitter.prototype.setMaxListeners = function setMaxListeners() { + return this; + }; + + // + // Expose the prefix. + // + EventEmitter.prefixed = prefix; + + // + // Allow `EventEmitter` to be imported as module namespace. + // + EventEmitter.EventEmitter = EventEmitter; + + // + // Expose the module. + // + { + module.exports = EventEmitter; + } + }); + + var _createProperty = function (object, index, value) { + if (index in object) _objectDp.f(object, index, _propertyDesc(0, value)); + else object[index] = value; + }; + + _export(_export.S + _export.F * !_iterDetect(function (iter) { Array.from(iter); }), 'Array', { + // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) + from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) { + var O = _toObject(arrayLike); + var C = typeof this == 'function' ? this : Array; + var aLen = arguments.length; + var mapfn = aLen > 1 ? arguments[1] : undefined; + var mapping = mapfn !== undefined; + var index = 0; + var iterFn = core_getIteratorMethod(O); + var length, result, step, iterator; + if (mapping) mapfn = _ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2); + // if object isn't iterable or it's array with default iterator - use simple case + if (iterFn != undefined && !(C == Array && _isArrayIter(iterFn))) { + for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) { + _createProperty(result, index, mapping ? _iterCall(iterator, mapfn, [step.value, index], true) : step.value); + } + } else { + length = _toLength(O.length); + for (result = new C(length); length > index; index++) { + _createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); + } + } + result.length = index; + return result; + } + }); + + var from$1 = _core.Array.from; + + var from = createCommonjsModule(function (module) { + module.exports = { "default": from$1, __esModule: true }; + }); + + var toConsumableArray = createCommonjsModule(function (module, exports) { + "use strict"; + + exports.__esModule = true; + + + + var _from2 = _interopRequireDefault(from); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + exports.default = 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 (0, _from2.default)(arr); + } + }; + }); + + var _toConsumableArray = unwrapExports(toConsumableArray); + + var _validateCollection = function (it, TYPE) { + if (!_isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!'); + return it; + }; + + var dP$2 = _objectDp.f; + + + + + + + + + + var fastKey = _meta.fastKey; + + var SIZE = _descriptors ? '_s' : 'size'; + + var getEntry = function (that, key) { + // fast case + var index = fastKey(key); + var entry; + if (index !== 'F') return that._i[index]; + // frozen object case + for (entry = that._f; entry; entry = entry.n) { + if (entry.k == key) return entry; + } + }; + + var _collectionStrong = { + getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { + var C = wrapper(function (that, iterable) { + _anInstance(that, C, NAME, '_i'); + that._t = NAME; // collection type + that._i = _objectCreate(null); // index + that._f = undefined; // first entry + that._l = undefined; // last entry + that[SIZE] = 0; // size + if (iterable != undefined) _forOf(iterable, IS_MAP, that[ADDER], that); + }); + _redefineAll(C.prototype, { + // 23.1.3.1 Map.prototype.clear() + // 23.2.3.2 Set.prototype.clear() + clear: function clear() { + for (var that = _validateCollection(this, NAME), data = that._i, entry = that._f; entry; entry = entry.n) { + entry.r = true; + if (entry.p) entry.p = entry.p.n = undefined; + delete data[entry.i]; + } + that._f = that._l = undefined; + that[SIZE] = 0; + }, + // 23.1.3.3 Map.prototype.delete(key) + // 23.2.3.4 Set.prototype.delete(value) + 'delete': function (key) { + var that = _validateCollection(this, NAME); + var entry = getEntry(that, key); + if (entry) { + var next = entry.n; + var prev = entry.p; + delete that._i[entry.i]; + entry.r = true; + if (prev) prev.n = next; + if (next) next.p = prev; + if (that._f == entry) that._f = next; + if (that._l == entry) that._l = prev; + that[SIZE]--; + } return !!entry; + }, + // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined) + // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined) + forEach: function forEach(callbackfn /* , that = undefined */) { + _validateCollection(this, NAME); + var f = _ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3); + var entry; + while (entry = entry ? entry.n : this._f) { + f(entry.v, entry.k, this); + // revert to the last existing entry + while (entry && entry.r) entry = entry.p; + } + }, + // 23.1.3.7 Map.prototype.has(key) + // 23.2.3.7 Set.prototype.has(value) + has: function has(key) { + return !!getEntry(_validateCollection(this, NAME), key); + } + }); + if (_descriptors) dP$2(C.prototype, 'size', { + get: function () { + return _validateCollection(this, NAME)[SIZE]; + } + }); + return C; + }, + def: function (that, key, value) { + var entry = getEntry(that, key); + var prev, index; + // change existing entry + if (entry) { + entry.v = value; + // create new entry + } else { + that._l = entry = { + i: index = fastKey(key, true), // <- index + k: key, // <- key + v: value, // <- value + p: prev = that._l, // <- previous entry + n: undefined, // <- next entry + r: false // <- removed + }; + if (!that._f) that._f = entry; + if (prev) prev.n = entry; + that[SIZE]++; + // add to index + if (index !== 'F') that._i[index] = entry; + } return that; + }, + getEntry: getEntry, + setStrong: function (C, NAME, IS_MAP) { + // add .keys, .values, .entries, [@@iterator] + // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11 + _iterDefine(C, NAME, function (iterated, kind) { + this._t = _validateCollection(iterated, NAME); // target + this._k = kind; // kind + this._l = undefined; // previous + }, function () { + var that = this; + var kind = that._k; + var entry = that._l; + // revert to the last existing entry + while (entry && entry.r) entry = entry.p; + // get next entry + if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) { + // or finish the iteration + that._t = undefined; + return _iterStep(1); + } + // return step by kind + if (kind == 'keys') return _iterStep(0, entry.k); + if (kind == 'values') return _iterStep(0, entry.v); + return _iterStep(0, [entry.k, entry.v]); + }, IS_MAP ? 'entries' : 'values', !IS_MAP, true); + + // add [@@species], 23.1.2.2, 23.2.2.2 + _setSpecies(NAME); + } + }; + + var SPECIES$2 = _wks('species'); + + var _arraySpeciesConstructor = function (original) { + var C; + if (_isArray(original)) { + C = original.constructor; + // cross-realm fallback + if (typeof C == 'function' && (C === Array || _isArray(C.prototype))) C = undefined; + if (_isObject(C)) { + C = C[SPECIES$2]; + if (C === null) C = undefined; + } + } return C === undefined ? Array : C; + }; + + // 9.4.2.3 ArraySpeciesCreate(originalArray, length) + + + var _arraySpeciesCreate = function (original, length) { + return new (_arraySpeciesConstructor(original))(length); + }; + + // 0 -> Array#forEach + // 1 -> Array#map + // 2 -> Array#filter + // 3 -> Array#some + // 4 -> Array#every + // 5 -> Array#find + // 6 -> Array#findIndex + + + + + + var _arrayMethods = function (TYPE, $create) { + var IS_MAP = TYPE == 1; + var IS_FILTER = TYPE == 2; + var IS_SOME = TYPE == 3; + var IS_EVERY = TYPE == 4; + var IS_FIND_INDEX = TYPE == 6; + var NO_HOLES = TYPE == 5 || IS_FIND_INDEX; + var create = $create || _arraySpeciesCreate; + return function ($this, callbackfn, that) { + var O = _toObject($this); + var self = _iobject(O); + var f = _ctx(callbackfn, that, 3); + var length = _toLength(self.length); + var index = 0; + var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined; + var val, res; + for (;length > index; index++) if (NO_HOLES || index in self) { + val = self[index]; + res = f(val, index, O); + if (TYPE) { + if (IS_MAP) result[index] = res; // map + else if (res) switch (TYPE) { + case 3: return true; // some + case 5: return val; // find + case 6: return index; // findIndex + case 2: result.push(val); // filter + } else if (IS_EVERY) return false; // every + } + } + return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result; + }; + }; + + var dP$3 = _objectDp.f; + var each = _arrayMethods(0); + + + var _collection = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) { + var Base = _global[NAME]; + var C = Base; + var ADDER = IS_MAP ? 'set' : 'add'; + var proto = C && C.prototype; + var O = {}; + if (!_descriptors || typeof C != 'function' || !(IS_WEAK || proto.forEach && !_fails(function () { + new C().entries().next(); + }))) { + // create collection constructor + C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER); + _redefineAll(C.prototype, methods); + _meta.NEED = true; + } else { + C = wrapper(function (target, iterable) { + _anInstance(target, C, NAME, '_c'); + target._c = new Base(); + if (iterable != undefined) _forOf(iterable, IS_MAP, target[ADDER], target); + }); + each('add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON'.split(','), function (KEY) { + var IS_ADDER = KEY == 'add' || KEY == 'set'; + if (KEY in proto && !(IS_WEAK && KEY == 'clear')) _hide(C.prototype, KEY, function (a, b) { + _anInstance(this, C, KEY); + if (!IS_ADDER && IS_WEAK && !_isObject(a)) return KEY == 'get' ? undefined : false; + var result = this._c[KEY](a === 0 ? 0 : a, b); + return IS_ADDER ? this : result; + }); + }); + IS_WEAK || dP$3(C.prototype, 'size', { + get: function () { + return this._c.size; + } + }); + } + + _setToStringTag(C, NAME); + + O[NAME] = C; + _export(_export.G + _export.W + _export.F, O); + + if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP); + + return C; + }; + + var SET = 'Set'; + + // 23.2 Set Objects + var es6_set = _collection(SET, function (get) { + return function Set() { return get(this, arguments.length > 0 ? arguments[0] : undefined); }; + }, { + // 23.2.3.1 Set.prototype.add(value) + add: function add(value) { + return _collectionStrong.def(_validateCollection(this, SET), value = value === 0 ? 0 : value, value); + } + }, _collectionStrong); + + var _arrayFromIterable = function (iter, ITERATOR) { + var result = []; + _forOf(iter, false, result.push, result, ITERATOR); + return result; + }; + + // https://github.com/DavidBruant/Map-Set.prototype.toJSON + + + var _collectionToJson = function (NAME) { + return function toJSON() { + if (_classof(this) != NAME) throw TypeError(NAME + "#toJSON isn't generic"); + return _arrayFromIterable(this); + }; + }; + + // https://github.com/DavidBruant/Map-Set.prototype.toJSON + + + _export(_export.P + _export.R, 'Set', { toJSON: _collectionToJson('Set') }); + + // https://tc39.github.io/proposal-setmap-offrom/ + + + var _setCollectionOf = function (COLLECTION) { + _export(_export.S, COLLECTION, { of: function of() { + var length = arguments.length; + var A = Array(length); + while (length--) A[length] = arguments[length]; + return new this(A); + } }); + }; + + // https://tc39.github.io/proposal-setmap-offrom/#sec-set.of + _setCollectionOf('Set'); + + // https://tc39.github.io/proposal-setmap-offrom/ + + + + + + var _setCollectionFrom = function (COLLECTION) { + _export(_export.S, COLLECTION, { from: function from(source /* , mapFn, thisArg */) { + var mapFn = arguments[1]; + var mapping, A, n, cb; + _aFunction(this); + mapping = mapFn !== undefined; + if (mapping) _aFunction(mapFn); + if (source == undefined) return new this(); + A = []; + if (mapping) { + n = 0; + cb = _ctx(mapFn, arguments[2], 2); + _forOf(source, false, function (nextItem) { + A.push(cb(nextItem, n++)); + }); + } else { + _forOf(source, false, A.push, A); + } + return new this(A); + } }); + }; + + // https://tc39.github.io/proposal-setmap-offrom/#sec-set.from + _setCollectionFrom('Set'); + + var set$1 = _core.Set; + + var set = createCommonjsModule(function (module) { + module.exports = { "default": set$1, __esModule: true }; + }); + + var _Set = unwrapExports(set); + + // 19.1.2.1 Object.assign(target, source, ...) + + + + + + var $assign = Object.assign; + + // should work with symbols and should have deterministic property order (V8 bug) + var _objectAssign = !$assign || _fails(function () { + var A = {}; + var B = {}; + // eslint-disable-next-line no-undef + var S = Symbol(); + var K = 'abcdefghijklmnopqrst'; + A[S] = 7; + K.split('').forEach(function (k) { B[k] = k; }); + return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; + }) ? function assign(target, source) { // eslint-disable-line no-unused-vars + var T = _toObject(target); + var aLen = arguments.length; + var index = 1; + var getSymbols = _objectGops.f; + var isEnum = _objectPie.f; + while (aLen > index) { + var S = _iobject(arguments[index++]); + var keys = getSymbols ? _objectKeys(S).concat(getSymbols(S)) : _objectKeys(S); + var length = keys.length; + var j = 0; + var key; + while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key]; + } return T; + } : $assign; + + // 19.1.3.1 Object.assign(target, source) + + + _export(_export.S + _export.F, 'Object', { assign: _objectAssign }); + + var assign$2 = _core.Object.assign; + + var assign$1 = createCommonjsModule(function (module) { + module.exports = { "default": assign$2, __esModule: true }; + }); + + var _Object$assign = unwrapExports(assign$1); + + /** + * Helpers. + */ + + var s = 1000; + var m = s * 60; + var h = m * 60; + var d$1 = h * 24; + var y = d$1 * 365.25; + + /** + * Parse or format the given `val`. + * + * Options: + * + * - `long` verbose formatting [false] + * + * @param {String|Number} val + * @param {Object} [options] + * @throws {Error} throw an error if val is not a non-empty string or a number + * @return {String|Number} + * @api public + */ + + var ms = function(val, options) { + options = options || {}; + var type = typeof val; + if (type === 'string' && val.length > 0) { + return parse(val); + } else if (type === 'number' && isNaN(val) === false) { + return options.long ? fmtLong(val) : fmtShort(val); + } + throw new Error( + 'val is not a non-empty string or a valid number. val=' + + JSON.stringify(val) + ); + }; + + /** + * Parse the given `str` and return milliseconds. + * + * @param {String} str + * @return {Number} + * @api private + */ + + function parse(str) { + str = String(str); + if (str.length > 100) { + return; + } + var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec( + str + ); + if (!match) { + return; + } + var n = parseFloat(match[1]); + var type = (match[2] || 'ms').toLowerCase(); + switch (type) { + case 'years': + case 'year': + case 'yrs': + case 'yr': + case 'y': + return n * y; + case 'days': + case 'day': + case 'd': + return n * d$1; + case 'hours': + case 'hour': + case 'hrs': + case 'hr': + case 'h': + return n * h; + case 'minutes': + case 'minute': + case 'mins': + case 'min': + case 'm': + return n * m; + case 'seconds': + case 'second': + case 'secs': + case 'sec': + case 's': + return n * s; + case 'milliseconds': + case 'millisecond': + case 'msecs': + case 'msec': + case 'ms': + return n; + default: + return undefined; + } + } + + /** + * Short format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + + function fmtShort(ms) { + if (ms >= d$1) { + return Math.round(ms / d$1) + 'd'; + } + if (ms >= h) { + return Math.round(ms / h) + 'h'; + } + if (ms >= m) { + return Math.round(ms / m) + 'm'; + } + if (ms >= s) { + return Math.round(ms / s) + 's'; + } + return ms + 'ms'; + } + + /** + * Long format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + + function fmtLong(ms) { + return plural(ms, d$1, 'day') || + plural(ms, h, 'hour') || + plural(ms, m, 'minute') || + plural(ms, s, 'second') || + ms + ' ms'; + } + + /** + * Pluralization helper. + */ + + function plural(ms, n, name) { + if (ms < n) { + return; + } + if (ms < n * 1.5) { + return Math.floor(ms / n) + ' ' + name; + } + return Math.ceil(ms / n) + ' ' + name + 's'; + } + + var debug$1 = createCommonjsModule(function (module, exports) { + /** + * This is the common logic for both the Node.js and web browser + * implementations of `debug()`. + * + * Expose `debug()` as the module. + */ + + exports = module.exports = createDebug.debug = createDebug['default'] = createDebug; + exports.coerce = coerce; + exports.disable = disable; + exports.enable = enable; + exports.enabled = enabled; + exports.humanize = ms; + + /** + * The currently active debug mode names, and names to skip. + */ + + exports.names = []; + exports.skips = []; + + /** + * Map of special "%n" handling functions, for the debug "format" argument. + * + * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". + */ + + exports.formatters = {}; + + /** + * Previous log timestamp. + */ + + var prevTime; + + /** + * Select a color. + * @param {String} namespace + * @return {Number} + * @api private + */ + + function selectColor(namespace) { + var hash = 0, i; + + for (i in namespace) { + hash = ((hash << 5) - hash) + namespace.charCodeAt(i); + hash |= 0; // Convert to 32bit integer + } + + return exports.colors[Math.abs(hash) % exports.colors.length]; + } + + /** + * Create a debugger with the given `namespace`. + * + * @param {String} namespace + * @return {Function} + * @api public + */ + + function createDebug(namespace) { + + function debug() { + // disabled? + if (!debug.enabled) return; + + var self = debug; + + // set `diff` timestamp + var curr = +new Date(); + var ms$$1 = curr - (prevTime || curr); + self.diff = ms$$1; + self.prev = prevTime; + self.curr = curr; + prevTime = curr; + + // turn the `arguments` into a proper Array + var args = new Array(arguments.length); + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i]; + } + + args[0] = exports.coerce(args[0]); + + if ('string' !== typeof args[0]) { + // anything else let's inspect with %O + args.unshift('%O'); + } + + // apply any `formatters` transformations + var index = 0; + args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) { + // if we encounter an escaped % then don't increase the array index + if (match === '%%') return match; + index++; + var formatter = exports.formatters[format]; + if ('function' === typeof formatter) { + var val = args[index]; + match = formatter.call(self, val); + + // now we need to remove `args[index]` since it's inlined in the `format` + args.splice(index, 1); + index--; + } + return match; + }); + + // apply env-specific formatting (colors, etc.) + exports.formatArgs.call(self, args); + + var logFn = debug.log || exports.log || console.log.bind(console); + logFn.apply(self, args); + } + + debug.namespace = namespace; + debug.enabled = exports.enabled(namespace); + debug.useColors = exports.useColors(); + debug.color = selectColor(namespace); + + // env-specific initialization logic for debug instances + if ('function' === typeof exports.init) { + exports.init(debug); + } + + return debug; + } + + /** + * Enables a debug mode by namespaces. This can include modes + * separated by a colon and wildcards. + * + * @param {String} namespaces + * @api public + */ + + function enable(namespaces) { + exports.save(namespaces); + + exports.names = []; + exports.skips = []; + + var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); + var len = split.length; + + for (var i = 0; i < len; i++) { + if (!split[i]) continue; // ignore empty strings + namespaces = split[i].replace(/\*/g, '.*?'); + if (namespaces[0] === '-') { + exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); + } else { + exports.names.push(new RegExp('^' + namespaces + '$')); + } + } + } + + /** + * Disable debug output. + * + * @api public + */ + + function disable() { + exports.enable(''); + } + + /** + * Returns true if the given mode name is enabled, false otherwise. + * + * @param {String} name + * @return {Boolean} + * @api public + */ + + function enabled(name) { + var i, len; + for (i = 0, len = exports.skips.length; i < len; i++) { + if (exports.skips[i].test(name)) { + return false; + } + } + for (i = 0, len = exports.names.length; i < len; i++) { + if (exports.names[i].test(name)) { + return true; + } + } + return false; + } + + /** + * Coerce `val`. + * + * @param {Mixed} val + * @return {Mixed} + * @api private + */ + + function coerce(val) { + if (val instanceof Error) return val.stack || val.message; + return val; + } + }); + + var browser$1 = createCommonjsModule(function (module, exports) { + /** + * This is the web browser implementation of `debug()`. + * + * Expose `debug()` as the module. + */ + + exports = module.exports = debug$1; + exports.log = log; + exports.formatArgs = formatArgs; + exports.save = save; + exports.load = load; + exports.useColors = useColors; + exports.storage = 'undefined' != typeof chrome + && 'undefined' != typeof chrome.storage + ? chrome.storage.local + : localstorage(); + + /** + * Colors. + */ + + exports.colors = [ + 'lightseagreen', + 'forestgreen', + 'goldenrod', + 'dodgerblue', + 'darkorchid', + 'crimson' + ]; + + /** + * Currently only WebKit-based Web Inspectors, Firefox >= v31, + * and the Firebug extension (any Firefox version) are known + * to support "%c" CSS customizations. + * + * TODO: add a `localStorage` variable to explicitly enable/disable colors + */ + + function useColors() { + // NB: In an Electron preload script, document will be defined but not fully + // initialized. Since we know we're in Chrome, we'll just detect this case + // explicitly + if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') { + return true; + } + + // is webkit? http://stackoverflow.com/a/16459606/376773 + // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 + return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) || + // is firebug? http://stackoverflow.com/a/398120/376773 + (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) || + // is firefox >= v31? + // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages + (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) || + // double check webkit in userAgent just in case we are in a worker + (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); + } + + /** + * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. + */ + + exports.formatters.j = function(v) { + try { + return JSON.stringify(v); + } catch (err) { + return '[UnexpectedJSONParseError]: ' + err.message; + } + }; + + + /** + * Colorize log arguments if enabled. + * + * @api public + */ + + function formatArgs(args) { + var useColors = this.useColors; + + args[0] = (useColors ? '%c' : '') + + this.namespace + + (useColors ? ' %c' : ' ') + + args[0] + + (useColors ? '%c ' : ' ') + + '+' + exports.humanize(this.diff); + + if (!useColors) return; + + var c = 'color: ' + this.color; + args.splice(1, 0, c, 'color: inherit'); + + // the final "%c" is somewhat tricky, because there could be other + // arguments passed either before or after the %c, so we need to + // figure out the correct index to insert the CSS into + var index = 0; + var lastC = 0; + args[0].replace(/%[a-zA-Z%]/g, function(match) { + if ('%%' === match) return; + index++; + if ('%c' === match) { + // we only are interested in the *last* %c + // (the user may have provided their own) + lastC = index; + } + }); + + args.splice(lastC, 0, c); + } + + /** + * Invokes `console.log()` when available. + * No-op when `console.log` is not a "function". + * + * @api public + */ + + function log() { + // this hackery is required for IE8/9, where + // the `console.log` function doesn't have 'apply' + return 'object' === typeof console + && console.log + && Function.prototype.apply.call(console.log, console, arguments); + } + + /** + * Save `namespaces`. + * + * @param {String} namespaces + * @api private + */ + + function save(namespaces) { + try { + if (null == namespaces) { + exports.storage.removeItem('debug'); + } else { + exports.storage.debug = namespaces; + } + } catch(e) {} + } + + /** + * Load `namespaces`. + * + * @return {String} returns the previously persisted debug modes + * @api private + */ + + function load() { + var r; + try { + r = exports.storage.debug; + } catch(e) {} + + // If debug isn't set in LS, and we're in Electron, try to load $DEBUG + if (!r && typeof process !== 'undefined' && 'env' in process) { + r = process.env.DEBUG; + } + + return r; + } + + /** + * Enable namespaces listed in `localStorage.debug` initially. + */ + + exports.enable(load()); + + /** + * Localstorage attempts to return the localstorage. + * + * This is necessary because safari throws + * when a user disables cookies/localstorage + * and you attempt to access it. + * + * @return {LocalStorage} + * @api private + */ + + function localstorage() { + try { + return window.localStorage; + } catch (e) {} + } + }); + + var bind = function bind(fn, thisArg) { + return function wrap() { + var args = new Array(arguments.length); + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i]; + } + return fn.apply(thisArg, args); + }; + }; + + /*! + * Determine if an object is a Buffer + * + * @author Feross Aboukhadijeh + * @license MIT + */ + + // The _isBuffer check is for Safari 5-7 support, because it's missing + // Object.prototype.constructor. Remove this eventually + var isBuffer_1 = function (obj) { + return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer) + }; + + function isBuffer (obj) { + return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj) + } + + // For Node v0.10 support. Remove this eventually. + function isSlowBuffer (obj) { + return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0)) + } + + /*global toString:true*/ + + // utils is a library of generic helper functions non-specific to axios + + var toString$2 = Object.prototype.toString; + + /** + * Determine if a value is an Array + * + * @param {Object} val The value to test + * @returns {boolean} True if value is an Array, otherwise false + */ + function isArray$1(val) { + return toString$2.call(val) === '[object Array]'; + } + + /** + * Determine if a value is an ArrayBuffer + * + * @param {Object} val The value to test + * @returns {boolean} True if value is an ArrayBuffer, otherwise false + */ + function isArrayBuffer(val) { + return toString$2.call(val) === '[object ArrayBuffer]'; + } + + /** + * Determine if a value is a FormData + * + * @param {Object} val The value to test + * @returns {boolean} True if value is an FormData, otherwise false + */ + function isFormData(val) { + return typeof FormData !== 'undefined' && val instanceof FormData; + } + + /** + * Determine if a value is a view on an ArrayBuffer + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false + */ + function isArrayBufferView(val) { + var result; + if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) { + result = ArrayBuffer.isView(val); + } else { + result = val && val.buffer && val.buffer instanceof ArrayBuffer; + } + return result; + } + + /** + * Determine if a value is a String + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a String, otherwise false + */ + function isString(val) { + return typeof val === 'string'; + } + + /** + * Determine if a value is a Number + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Number, otherwise false + */ + function isNumber(val) { + return typeof val === 'number'; + } + + /** + * Determine if a value is undefined + * + * @param {Object} val The value to test + * @returns {boolean} True if the value is undefined, otherwise false + */ + function isUndefined(val) { + return typeof val === 'undefined'; + } + + /** + * Determine if a value is an Object + * + * @param {Object} val The value to test + * @returns {boolean} True if value is an Object, otherwise false + */ + function isObject$1(val) { + return val !== null && (typeof val === 'undefined' ? 'undefined' : _typeof(val)) === 'object'; + } + + /** + * Determine if a value is a Date + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Date, otherwise false + */ + function isDate(val) { + return toString$2.call(val) === '[object Date]'; + } + + /** + * Determine if a value is a File + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a File, otherwise false + */ + function isFile(val) { + return toString$2.call(val) === '[object File]'; + } + + /** + * Determine if a value is a Blob + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Blob, otherwise false + */ + function isBlob(val) { + return toString$2.call(val) === '[object Blob]'; + } + + /** + * Determine if a value is a Function + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Function, otherwise false + */ + function isFunction(val) { + return toString$2.call(val) === '[object Function]'; + } + + /** + * Determine if a value is a Stream + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Stream, otherwise false + */ + function isStream(val) { + return isObject$1(val) && isFunction(val.pipe); + } + + /** + * Determine if a value is a URLSearchParams object + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a URLSearchParams object, otherwise false + */ + function isURLSearchParams(val) { + return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams; + } + + /** + * Trim excess whitespace off the beginning and end of a string + * + * @param {String} str The String to trim + * @returns {String} The String freed of excess whitespace + */ + function trim(str) { + return str.replace(/^\s*/, '').replace(/\s*$/, ''); + } + + /** + * Determine if we're running in a standard browser environment + * + * This allows axios to run in a web worker, and react-native. + * Both environments support XMLHttpRequest, but not fully standard globals. + * + * web workers: + * typeof window -> undefined + * typeof document -> undefined + * + * react-native: + * navigator.product -> 'ReactNative' + */ + function isStandardBrowserEnv() { + if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') { + return false; + } + return typeof window !== 'undefined' && typeof document !== 'undefined'; + } + + /** + * Iterate over an Array or an Object invoking a function for each item. + * + * If `obj` is an Array callback will be called passing + * the value, index, and complete array for each item. + * + * If 'obj' is an Object callback will be called passing + * the value, key, and complete object for each property. + * + * @param {Object|Array} obj The object to iterate + * @param {Function} fn The callback to invoke for each item + */ + function forEach(obj, fn) { + // Don't bother if no value provided + if (obj === null || typeof obj === 'undefined') { + return; + } + + // Force an array if not already something iterable + if ((typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) !== 'object' && !isArray$1(obj)) { + /*eslint no-param-reassign:0*/ + obj = [obj]; + } + + if (isArray$1(obj)) { + // Iterate over array values + for (var i = 0, l = obj.length; i < l; i++) { + fn.call(null, obj[i], i, obj); + } + } else { + // Iterate over object keys + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + fn.call(null, obj[key], key, obj); + } + } + } + } + + /** + * Accepts varargs expecting each argument to be an object, then + * immutably merges the properties of each object and returns result. + * + * When multiple objects contain the same key the later object in + * the arguments list will take precedence. + * + * Example: + * + * ```js + * var result = merge({foo: 123}, {foo: 456}); + * console.log(result.foo); // outputs 456 + * ``` + * + * @param {Object} obj1 Object to merge + * @returns {Object} Result of all merge properties + */ + function merge() /* obj1, obj2, obj3, ... */{ + var result = {}; + function assignValue(val, key) { + if (_typeof(result[key]) === 'object' && (typeof val === 'undefined' ? 'undefined' : _typeof(val)) === 'object') { + result[key] = merge(result[key], val); + } else { + result[key] = val; + } + } + + for (var i = 0, l = arguments.length; i < l; i++) { + forEach(arguments[i], assignValue); + } + return result; + } + + /** + * Extends object a by mutably adding to it the properties of object b. + * + * @param {Object} a The object to be extended + * @param {Object} b The object to copy properties from + * @param {Object} thisArg The object to bind function to + * @return {Object} The resulting value of object a + */ + function extend(a, b, thisArg) { + forEach(b, function assignValue(val, key) { + if (thisArg && typeof val === 'function') { + a[key] = bind(val, thisArg); + } else { + a[key] = val; + } + }); + return a; + } + + var utils = { + isArray: isArray$1, + isArrayBuffer: isArrayBuffer, + isBuffer: isBuffer_1, + isFormData: isFormData, + isArrayBufferView: isArrayBufferView, + isString: isString, + isNumber: isNumber, + isObject: isObject$1, + isUndefined: isUndefined, + isDate: isDate, + isFile: isFile, + isBlob: isBlob, + isFunction: isFunction, + isStream: isStream, + isURLSearchParams: isURLSearchParams, + isStandardBrowserEnv: isStandardBrowserEnv, + forEach: forEach, + merge: merge, + extend: extend, + trim: trim + }; + + var normalizeHeaderName = function normalizeHeaderName(headers, normalizedName) { + utils.forEach(headers, function processHeader(value, name) { + if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) { + headers[normalizedName] = value; + delete headers[name]; + } + }); + }; + + /** + * Update an Error with the specified config, error code, and response. + * + * @param {Error} error The error to update. + * @param {Object} config The config. + * @param {string} [code] The error code (for example, 'ECONNABORTED'). + * @param {Object} [request] The request. + * @param {Object} [response] The response. + * @returns {Error} The error. + */ + + var enhanceError = function enhanceError(error, config, code, request, response) { + error.config = config; + if (code) { + error.code = code; + } + error.request = request; + error.response = response; + return error; + }; + + /** + * Create an Error with the specified message, config, error code, request and response. + * + * @param {string} message The error message. + * @param {Object} config The config. + * @param {string} [code] The error code (for example, 'ECONNABORTED'). + * @param {Object} [request] The request. + * @param {Object} [response] The response. + * @returns {Error} The created error. + */ + var createError = function createError(message, config, code, request, response) { + var error = new Error(message); + return enhanceError(error, config, code, request, response); + }; + + /** + * Resolve or reject a Promise based on response status. + * + * @param {Function} resolve A function that resolves the promise. + * @param {Function} reject A function that rejects the promise. + * @param {object} response The response. + */ + var settle = function settle(resolve, reject, response) { + var validateStatus = response.config.validateStatus; + // Note: status is not exposed by XDomainRequest + if (!response.status || !validateStatus || validateStatus(response.status)) { + resolve(response); + } else { + reject(createError('Request failed with status code ' + response.status, response.config, null, response.request, response)); + } + }; + + function encode(val) { + return encodeURIComponent(val).replace(/%40/gi, '@').replace(/%3A/gi, ':').replace(/%24/g, '$').replace(/%2C/gi, ',').replace(/%20/g, '+').replace(/%5B/gi, '[').replace(/%5D/gi, ']'); + } + + /** + * Build a URL by appending params to the end + * + * @param {string} url The base of the url (e.g., http://www.google.com) + * @param {object} [params] The params to be appended + * @returns {string} The formatted url + */ + var buildURL = function buildURL(url, params, paramsSerializer) { + /*eslint no-param-reassign:0*/ + if (!params) { + return url; + } + + var serializedParams; + if (paramsSerializer) { + serializedParams = paramsSerializer(params); + } else if (utils.isURLSearchParams(params)) { + serializedParams = params.toString(); + } else { + var parts = []; + + utils.forEach(params, function serialize(val, key) { + if (val === null || typeof val === 'undefined') { + return; + } + + if (utils.isArray(val)) { + key = key + '[]'; + } + + if (!utils.isArray(val)) { + val = [val]; + } + + utils.forEach(val, function parseValue(v) { + if (utils.isDate(v)) { + v = v.toISOString(); + } else if (utils.isObject(v)) { + v = _JSON$stringify(v); + } + parts.push(encode(key) + '=' + encode(v)); + }); + }); + + serializedParams = parts.join('&'); + } + + if (serializedParams) { + url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams; + } + + return url; + }; + + /** + * Parse headers into an object + * + * ``` + * Date: Wed, 27 Aug 2014 08:58:49 GMT + * Content-Type: application/json + * Connection: keep-alive + * Transfer-Encoding: chunked + * ``` + * + * @param {String} headers Headers needing to be parsed + * @returns {Object} Headers parsed into an object + */ + var parseHeaders = function parseHeaders(headers) { + var parsed = {}; + var key; + var val; + var i; + + if (!headers) { + return parsed; + } + + utils.forEach(headers.split('\n'), function parser(line) { + i = line.indexOf(':'); + key = utils.trim(line.substr(0, i)).toLowerCase(); + val = utils.trim(line.substr(i + 1)); + + if (key) { + parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val; + } + }); + + return parsed; + }; + + var isURLSameOrigin = utils.isStandardBrowserEnv() ? + + // Standard browser envs have full support of the APIs needed to test + // whether the request URL is of the same origin as current location. + function standardBrowserEnv() { + var msie = /(msie|trident)/i.test(navigator.userAgent); + var urlParsingNode = document.createElement('a'); + var originURL; + + /** + * Parse a URL to discover it's components + * + * @param {String} url The URL to be parsed + * @returns {Object} + */ + function resolveURL(url) { + var href = url; + + if (msie) { + // IE needs attribute set twice to normalize properties + urlParsingNode.setAttribute('href', href); + href = urlParsingNode.href; + } + + urlParsingNode.setAttribute('href', href); + + // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils + return { + href: urlParsingNode.href, + protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '', + host: urlParsingNode.host, + search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '', + hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '', + hostname: urlParsingNode.hostname, + port: urlParsingNode.port, + pathname: urlParsingNode.pathname.charAt(0) === '/' ? urlParsingNode.pathname : '/' + urlParsingNode.pathname + }; + } + + originURL = resolveURL(window.location.href); + + /** + * Determine if a URL shares the same origin as the current location + * + * @param {String} requestURL The URL to test + * @returns {boolean} True if URL shares the same origin, otherwise false + */ + return function isURLSameOrigin(requestURL) { + var parsed = utils.isString(requestURL) ? resolveURL(requestURL) : requestURL; + return parsed.protocol === originURL.protocol && parsed.host === originURL.host; + }; + }() : + + // Non standard browser envs (web workers, react-native) lack needed support. + function nonStandardBrowserEnv() { + return function isURLSameOrigin() { + return true; + }; + }(); + + // btoa polyfill for IE<10 courtesy https://github.com/davidchambers/Base64.js + + var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; + + function E() { + this.message = 'String contains an invalid character'; + } + E.prototype = new Error(); + E.prototype.code = 5; + E.prototype.name = 'InvalidCharacterError'; + + function btoa$1(input) { + var str = String(input); + var output = ''; + for ( + // initialize result and counter + var block, charCode, idx = 0, map = chars; + // if the next str index does not exist: + // change the mapping table to "=" + // check if d has no fractional digits + str.charAt(idx | 0) || (map = '=', idx % 1); + // "8 - idx % 1 * 8" generates the sequence 2, 4, 6, 8 + output += map.charAt(63 & block >> 8 - idx % 1 * 8)) { + charCode = str.charCodeAt(idx += 3 / 4); + if (charCode > 0xFF) { + throw new E(); + } + block = block << 8 | charCode; + } + return output; + } + + var btoa_1 = btoa$1; + + var cookies = utils.isStandardBrowserEnv() ? + + // Standard browser envs support document.cookie + function standardBrowserEnv() { + return { + write: function write(name, value, expires, path, domain, secure) { + var cookie = []; + cookie.push(name + '=' + encodeURIComponent(value)); + + if (utils.isNumber(expires)) { + cookie.push('expires=' + new Date(expires).toGMTString()); + } + + if (utils.isString(path)) { + cookie.push('path=' + path); + } + + if (utils.isString(domain)) { + cookie.push('domain=' + domain); + } + + if (secure === true) { + cookie.push('secure'); + } + + document.cookie = cookie.join('; '); + }, + + read: function read(name) { + var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)')); + return match ? decodeURIComponent(match[3]) : null; + }, + + remove: function remove(name) { + this.write(name, '', Date.now() - 86400000); + } + }; + }() : + + // Non standard browser env (web workers, react-native) lack needed support. + function nonStandardBrowserEnv() { + return { + write: function write() {}, + read: function read() { + return null; + }, + remove: function remove() {} + }; + }(); + + var btoa = typeof window !== 'undefined' && window.btoa && window.btoa.bind(window) || btoa_1; + + var xhr = function xhrAdapter(config) { + return new _Promise(function dispatchXhrRequest(resolve, reject) { + var requestData = config.data; + var requestHeaders = config.headers; + + if (utils.isFormData(requestData)) { + delete requestHeaders['Content-Type']; // Let the browser set it + } + + var request = new XMLHttpRequest(); + var loadEvent = 'onreadystatechange'; + var xDomain = false; + + // For IE 8/9 CORS support + // Only supports POST and GET calls and doesn't returns the response headers. + // DON'T do this for testing b/c XMLHttpRequest is mocked, not XDomainRequest. + if (process.env.NODE_ENV !== 'test' && typeof window !== 'undefined' && window.XDomainRequest && !('withCredentials' in request) && !isURLSameOrigin(config.url)) { + request = new window.XDomainRequest(); + loadEvent = 'onload'; + xDomain = true; + request.onprogress = function handleProgress() {}; + request.ontimeout = function handleTimeout() {}; + } + + // HTTP basic authentication + if (config.auth) { + var username = config.auth.username || ''; + var password = config.auth.password || ''; + requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password); + } + + request.open(config.method.toUpperCase(), buildURL(config.url, config.params, config.paramsSerializer), true); + + // Set the request timeout in MS + request.timeout = config.timeout; + + // Listen for ready state + request[loadEvent] = function handleLoad() { + if (!request || request.readyState !== 4 && !xDomain) { + return; + } + + // The request errored out and we didn't get a response, this will be + // handled by onerror instead + // With one exception: request that using file: protocol, most browsers + // will return status as 0 even though it's a successful request + if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) { + return; + } + + // Prepare the response + var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null; + var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response; + var response = { + data: responseData, + // IE sends 1223 instead of 204 (https://github.com/mzabriskie/axios/issues/201) + status: request.status === 1223 ? 204 : request.status, + statusText: request.status === 1223 ? 'No Content' : request.statusText, + headers: responseHeaders, + config: config, + request: request + }; + + settle(resolve, reject, response); + + // Clean up request + request = null; + }; + + // Handle low level network errors + request.onerror = function handleError() { + // Real errors are hidden from us by the browser + // onerror should only fire if it's a network error + reject(createError('Network Error', config, null, request)); + + // Clean up request + request = null; + }; + + // Handle timeout + request.ontimeout = function handleTimeout() { + reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED', request)); + + // Clean up request + request = null; + }; + + // Add xsrf header + // This is only done if running in a standard browser environment. + // Specifically not if we're in a web worker, or react-native. + if (utils.isStandardBrowserEnv()) { + var cookies$$1 = cookies; + + // Add xsrf header + var xsrfValue = (config.withCredentials || isURLSameOrigin(config.url)) && config.xsrfCookieName ? cookies$$1.read(config.xsrfCookieName) : undefined; + + if (xsrfValue) { + requestHeaders[config.xsrfHeaderName] = xsrfValue; + } + } + + // Add headers to the request + if ('setRequestHeader' in request) { + utils.forEach(requestHeaders, function setRequestHeader(val, key) { + if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') { + // Remove Content-Type if data is undefined + delete requestHeaders[key]; + } else { + // Otherwise add header to the request + request.setRequestHeader(key, val); + } + }); + } + + // Add withCredentials to request if needed + if (config.withCredentials) { + request.withCredentials = true; + } + + // Add responseType to request if needed + if (config.responseType) { + try { + request.responseType = config.responseType; + } catch (e) { + // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2. + // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function. + if (config.responseType !== 'json') { + throw e; + } + } + } + + // Handle progress if needed + if (typeof config.onDownloadProgress === 'function') { + request.addEventListener('progress', config.onDownloadProgress); + } + + // Not all browsers support upload events + if (typeof config.onUploadProgress === 'function' && request.upload) { + request.upload.addEventListener('progress', config.onUploadProgress); + } + + if (config.cancelToken) { + // Handle cancellation + config.cancelToken.promise.then(function onCanceled(cancel) { + if (!request) { + return; + } + + request.abort(); + reject(cancel); + // Clean up request + request = null; + }); + } + + if (requestData === undefined) { + requestData = null; + } + + // Send the request + request.send(requestData); + }); + }; + + var DEFAULT_CONTENT_TYPE = { + 'Content-Type': 'application/x-www-form-urlencoded' + }; + + function setContentTypeIfUnset(headers, value) { + if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) { + headers['Content-Type'] = value; + } + } + + function getDefaultAdapter() { + var adapter; + if (typeof XMLHttpRequest !== 'undefined') { + // For browsers use XHR adapter + adapter = xhr; + } else if (typeof process !== 'undefined') { + // For node use HTTP adapter + adapter = xhr; + } + return adapter; + } + + var defaults = { + adapter: getDefaultAdapter(), + + transformRequest: [function transformRequest(data, headers) { + normalizeHeaderName(headers, 'Content-Type'); + if (utils.isFormData(data) || utils.isArrayBuffer(data) || utils.isBuffer(data) || utils.isStream(data) || utils.isFile(data) || utils.isBlob(data)) { + return data; + } + if (utils.isArrayBufferView(data)) { + return data.buffer; + } + if (utils.isURLSearchParams(data)) { + setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8'); + return data.toString(); + } + if (utils.isObject(data)) { + setContentTypeIfUnset(headers, 'application/json;charset=utf-8'); + return _JSON$stringify(data); + } + return data; + }], + + transformResponse: [function transformResponse(data) { + /*eslint no-param-reassign:0*/ + if (typeof data === 'string') { + try { + data = JSON.parse(data); + } catch (e) {/* Ignore */} + } + return data; + }], + + timeout: 0, + + xsrfCookieName: 'XSRF-TOKEN', + xsrfHeaderName: 'X-XSRF-TOKEN', + + maxContentLength: -1, + + validateStatus: function validateStatus(status) { + return status >= 200 && status < 300; + } + }; + + defaults.headers = { + common: { + 'Accept': 'application/json, text/plain, */*' + } + }; + + utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) { + defaults.headers[method] = {}; + }); + + utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { + defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE); + }); + + var defaults_1 = defaults; + + function InterceptorManager() { + this.handlers = []; + } + + /** + * Add a new interceptor to the stack + * + * @param {Function} fulfilled The function to handle `then` for a `Promise` + * @param {Function} rejected The function to handle `reject` for a `Promise` + * + * @return {Number} An ID used to remove interceptor later + */ + InterceptorManager.prototype.use = function use(fulfilled, rejected) { + this.handlers.push({ + fulfilled: fulfilled, + rejected: rejected + }); + return this.handlers.length - 1; + }; + + /** + * Remove an interceptor from the stack + * + * @param {Number} id The ID that was returned by `use` + */ + InterceptorManager.prototype.eject = function eject(id) { + if (this.handlers[id]) { + this.handlers[id] = null; + } + }; + + /** + * Iterate over all the registered interceptors + * + * This method is particularly useful for skipping over any + * interceptors that may have become `null` calling `eject`. + * + * @param {Function} fn The function to call for each interceptor + */ + InterceptorManager.prototype.forEach = function forEach(fn) { + utils.forEach(this.handlers, function forEachHandler(h) { + if (h !== null) { + fn(h); + } + }); + }; + + var InterceptorManager_1 = InterceptorManager; + + /** + * Transform the data for a request or a response + * + * @param {Object|String} data The data to be transformed + * @param {Array} headers The headers for the request or response + * @param {Array|Function} fns A single function or Array of functions + * @returns {*} The resulting transformed data + */ + var transformData = function transformData(data, headers, fns) { + /*eslint no-param-reassign:0*/ + utils.forEach(fns, function transform(fn) { + data = fn(data, headers); + }); + + return data; + }; + + var isCancel = function isCancel(value) { + return !!(value && value.__CANCEL__); + }; + + /** + * Throws a `Cancel` if cancellation has been requested. + */ + function throwIfCancellationRequested(config) { + if (config.cancelToken) { + config.cancelToken.throwIfRequested(); + } + } + + /** + * Dispatch a request to the server using the configured adapter. + * + * @param {object} config The config that is to be used for the request + * @returns {Promise} The Promise to be fulfilled + */ + var dispatchRequest = function dispatchRequest(config) { + throwIfCancellationRequested(config); + + // Ensure headers exist + config.headers = config.headers || {}; + + // Transform request data + config.data = transformData(config.data, config.headers, config.transformRequest); + + // Flatten headers + config.headers = utils.merge(config.headers.common || {}, config.headers[config.method] || {}, config.headers || {}); + + utils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], function cleanHeaderConfig(method) { + delete config.headers[method]; + }); + + var adapter = config.adapter || defaults_1.adapter; + + return adapter(config).then(function onAdapterResolution(response) { + throwIfCancellationRequested(config); + + // Transform response data + response.data = transformData(response.data, response.headers, config.transformResponse); + + return response; + }, function onAdapterRejection(reason) { + if (!isCancel(reason)) { + throwIfCancellationRequested(config); + + // Transform response data + if (reason && reason.response) { + reason.response.data = transformData(reason.response.data, reason.response.headers, config.transformResponse); + } + } + + return _Promise.reject(reason); + }); + }; + + /** + * Determines whether the specified URL is absolute + * + * @param {string} url The URL to test + * @returns {boolean} True if the specified URL is absolute, otherwise false + */ + + var isAbsoluteURL = function isAbsoluteURL(url) { + // A URL is considered absolute if it begins with "://" or "//" (protocol-relative URL). + // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed + // by any combination of letters, digits, plus, period, or hyphen. + return (/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url) + ); + }; + + /** + * Creates a new URL by combining the specified URLs + * + * @param {string} baseURL The base URL + * @param {string} relativeURL The relative URL + * @returns {string} The combined URL + */ + + var combineURLs = function combineURLs(baseURL, relativeURL) { + return relativeURL ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '') : baseURL; + }; + + /** + * Create a new instance of Axios + * + * @param {Object} instanceConfig The default config for the instance + */ + function Axios(instanceConfig) { + this.defaults = instanceConfig; + this.interceptors = { + request: new InterceptorManager_1(), + response: new InterceptorManager_1() + }; + } + + /** + * Dispatch a request + * + * @param {Object} config The config specific for this request (merged with this.defaults) + */ + Axios.prototype.request = function request(config) { + /*eslint no-param-reassign:0*/ + // Allow for axios('example/url'[, config]) a la fetch API + if (typeof config === 'string') { + config = utils.merge({ + url: arguments[0] + }, arguments[1]); + } + + config = utils.merge(defaults_1, this.defaults, { method: 'get' }, config); + config.method = config.method.toLowerCase(); + + // Support baseURL config + if (config.baseURL && !isAbsoluteURL(config.url)) { + config.url = combineURLs(config.baseURL, config.url); + } + + // Hook up interceptors middleware + var chain = [dispatchRequest, undefined]; + var promise = _Promise.resolve(config); + + this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) { + chain.unshift(interceptor.fulfilled, interceptor.rejected); + }); + + this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) { + chain.push(interceptor.fulfilled, interceptor.rejected); + }); + + while (chain.length) { + promise = promise.then(chain.shift(), chain.shift()); + } + + return promise; + }; + + // Provide aliases for supported request methods + utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) { + /*eslint func-names:0*/ + Axios.prototype[method] = function (url, config) { + return this.request(utils.merge(config || {}, { + method: method, + url: url + })); + }; + }); + + utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { + /*eslint func-names:0*/ + Axios.prototype[method] = function (url, data, config) { + return this.request(utils.merge(config || {}, { + method: method, + url: url, + data: data + })); + }; + }); + + var Axios_1 = Axios; + + /** + * A `Cancel` is an object that is thrown when an operation is canceled. + * + * @class + * @param {string=} message The message. + */ + + function Cancel(message) { + this.message = message; + } + + Cancel.prototype.toString = function toString() { + return 'Cancel' + (this.message ? ': ' + this.message : ''); + }; + + Cancel.prototype.__CANCEL__ = true; + + var Cancel_1 = Cancel; + + /** + * A `CancelToken` is an object that can be used to request cancellation of an operation. + * + * @class + * @param {Function} executor The executor function. + */ + function CancelToken(executor) { + if (typeof executor !== 'function') { + throw new TypeError('executor must be a function.'); + } + + var resolvePromise; + this.promise = new _Promise(function promiseExecutor(resolve) { + resolvePromise = resolve; + }); + + var token = this; + executor(function cancel(message) { + if (token.reason) { + // Cancellation has already been requested + return; + } + + token.reason = new Cancel_1(message); + resolvePromise(token.reason); + }); + } + + /** + * Throws a `Cancel` if cancellation has been requested. + */ + CancelToken.prototype.throwIfRequested = function throwIfRequested() { + if (this.reason) { + throw this.reason; + } + }; + + /** + * Returns an object that contains a new `CancelToken` and a function that, when called, + * cancels the `CancelToken`. + */ + CancelToken.source = function source() { + var cancel; + var token = new CancelToken(function executor(c) { + cancel = c; + }); + return { + token: token, + cancel: cancel + }; + }; + + var CancelToken_1 = CancelToken; + + /** + * Syntactic sugar for invoking a function and expanding an array for arguments. + * + * Common use case would be to use `Function.prototype.apply`. + * + * ```js + * function f(x, y, z) {} + * var args = [1, 2, 3]; + * f.apply(null, args); + * ``` + * + * With `spread` this example can be re-written. + * + * ```js + * spread(function(x, y, z) {})([1, 2, 3]); + * ``` + * + * @param {Function} callback + * @returns {Function} + */ + + var spread = function spread(callback) { + return function wrap(arr) { + return callback.apply(null, arr); + }; + }; + + /** + * Create an instance of Axios + * + * @param {Object} defaultConfig The default config for the instance + * @return {Axios} A new instance of Axios + */ + function createInstance(defaultConfig) { + var context = new Axios_1(defaultConfig); + var instance = bind(Axios_1.prototype.request, context); + + // Copy axios.prototype to instance + utils.extend(instance, Axios_1.prototype, context); + + // Copy context to instance + utils.extend(instance, context); + + return instance; + } + + // Create the default instance to be exported + var axios$2 = createInstance(defaults_1); + + // Expose Axios class to allow class inheritance + axios$2.Axios = Axios_1; + + // Factory for creating new instances + axios$2.create = function create(instanceConfig) { + return createInstance(utils.merge(defaults_1, instanceConfig)); + }; + + // Expose Cancel & CancelToken + axios$2.Cancel = Cancel_1; + axios$2.CancelToken = CancelToken_1; + axios$2.isCancel = isCancel; + + // Expose all/spread + axios$2.all = function all(promises) { + return _Promise.all(promises); + }; + axios$2.spread = spread; + + var axios_1 = axios$2; + + // Allow use of default import syntax in TypeScript + var default_1 = axios$2; + + axios_1.default = default_1; + + var axios = axios_1; + + // most Object methods by ES6 should accept primitives + + + + var _objectSap = function (KEY, exec) { + var fn = (_core.Object || {})[KEY] || Object[KEY]; + var exp = {}; + exp[KEY] = exec(fn); + _export(_export.S + _export.F * _fails(function () { fn(1); }), 'Object', exp); + }; + + // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) + + var $getOwnPropertyDescriptor$1 = _objectGopd.f; + + _objectSap('getOwnPropertyDescriptor', function () { + return function getOwnPropertyDescriptor(it, key) { + return $getOwnPropertyDescriptor$1(_toIobject(it), key); + }; + }); + + var $Object$2 = _core.Object; + var getOwnPropertyDescriptor$1 = function getOwnPropertyDescriptor(it, key) { + return $Object$2.getOwnPropertyDescriptor(it, key); + }; + + var getOwnPropertyDescriptor = createCommonjsModule(function (module) { + module.exports = { "default": getOwnPropertyDescriptor$1, __esModule: true }; + }); + + var _Object$getOwnPropertyDescriptor = unwrapExports(getOwnPropertyDescriptor); + + var stateMachine = createCommonjsModule(function (module, exports) { + /* + + Javascript State Machine Library - https://github.com/jakesgordon/javascript-state-machine + + Copyright (c) 2012, 2013, 2014, 2015, Jake Gordon and contributors + Released under the MIT license - https://github.com/jakesgordon/javascript-state-machine/blob/master/LICENSE + + */ + + (function () { + + var StateMachine = { + + //--------------------------------------------------------------------------- + + VERSION: "2.4.0", + + //--------------------------------------------------------------------------- + + Result: { + SUCCEEDED: 1, // the event transitioned successfully from one state to another + NOTRANSITION: 2, // the event was successfull but no state transition was necessary + CANCELLED: 3, // the event was cancelled by the caller in a beforeEvent callback + PENDING: 4 // the event is asynchronous and the caller is in control of when the transition occurs + }, + + Error: { + INVALID_TRANSITION: 100, // caller tried to fire an event that was innapropriate in the current state + PENDING_TRANSITION: 200, // caller tried to fire an event while an async transition was still pending + INVALID_CALLBACK: 300 // caller provided callback function threw an exception + }, + + WILDCARD: '*', + ASYNC: 'async', + + //--------------------------------------------------------------------------- + + create: function(cfg, target) { + + var initial = (typeof cfg.initial == 'string') ? { state: cfg.initial } : cfg.initial; // allow for a simple string, or an object with { state: 'foo', event: 'setup', defer: true|false } + var terminal = cfg.terminal || cfg['final']; + var fsm = target || cfg.target || {}; + var events = cfg.events || []; + var callbacks = cfg.callbacks || {}; + var map = {}; // track state transitions allowed for an event { event: { from: [ to ] } } + var transitions = {}; // track events allowed from a state { state: [ event ] } + + var add = function(e) { + var from = Array.isArray(e.from) ? e.from : (e.from ? [e.from] : [StateMachine.WILDCARD]); // allow 'wildcard' transition if 'from' is not specified + map[e.name] = map[e.name] || {}; + for (var n = 0 ; n < from.length ; n++) { + transitions[from[n]] = transitions[from[n]] || []; + transitions[from[n]].push(e.name); + + map[e.name][from[n]] = e.to || from[n]; // allow no-op transition if 'to' is not specified + } + if (e.to) + transitions[e.to] = transitions[e.to] || []; + }; + + if (initial) { + initial.event = initial.event || 'startup'; + add({ name: initial.event, from: 'none', to: initial.state }); + } + + for(var n = 0 ; n < events.length ; n++) + add(events[n]); + + for(var name in map) { + if (map.hasOwnProperty(name)) + fsm[name] = StateMachine.buildEvent(name, map[name]); + } + + for(var name in callbacks) { + if (callbacks.hasOwnProperty(name)) + fsm[name] = callbacks[name]; + } + + fsm.current = 'none'; + fsm.is = function(state) { return Array.isArray(state) ? (state.indexOf(this.current) >= 0) : (this.current === state); }; + fsm.can = function(event) { return !this.transition && (map[event] !== undefined) && (map[event].hasOwnProperty(this.current) || map[event].hasOwnProperty(StateMachine.WILDCARD)); }; + fsm.cannot = function(event) { return !this.can(event); }; + fsm.transitions = function() { return (transitions[this.current] || []).concat(transitions[StateMachine.WILDCARD] || []); }; + fsm.isFinished = function() { return this.is(terminal); }; + fsm.error = cfg.error || function(name, from, to, args, error, msg, e) { throw e || msg; }; // default behavior when something unexpected happens is to throw an exception, but caller can override this behavior if desired (see github issue #3 and #17) + fsm.states = function() { return Object.keys(transitions).sort() }; + + if (initial && !initial.defer) + fsm[initial.event](); + + return fsm; + + }, + + //=========================================================================== + + doCallback: function(fsm, func, name, from, to, args) { + if (func) { + try { + return func.apply(fsm, [name, from, to].concat(args)); + } + catch(e) { + return fsm.error(name, from, to, args, StateMachine.Error.INVALID_CALLBACK, "an exception occurred in a caller-provided callback function", e); + } + } + }, + + beforeAnyEvent: function(fsm, name, from, to, args) { return StateMachine.doCallback(fsm, fsm['onbeforeevent'], name, from, to, args); }, + afterAnyEvent: function(fsm, name, from, to, args) { return StateMachine.doCallback(fsm, fsm['onafterevent'] || fsm['onevent'], name, from, to, args); }, + leaveAnyState: function(fsm, name, from, to, args) { return StateMachine.doCallback(fsm, fsm['onleavestate'], name, from, to, args); }, + enterAnyState: function(fsm, name, from, to, args) { return StateMachine.doCallback(fsm, fsm['onenterstate'] || fsm['onstate'], name, from, to, args); }, + changeState: function(fsm, name, from, to, args) { return StateMachine.doCallback(fsm, fsm['onchangestate'], name, from, to, args); }, + + beforeThisEvent: function(fsm, name, from, to, args) { return StateMachine.doCallback(fsm, fsm['onbefore' + name], name, from, to, args); }, + afterThisEvent: function(fsm, name, from, to, args) { return StateMachine.doCallback(fsm, fsm['onafter' + name] || fsm['on' + name], name, from, to, args); }, + leaveThisState: function(fsm, name, from, to, args) { return StateMachine.doCallback(fsm, fsm['onleave' + from], name, from, to, args); }, + enterThisState: function(fsm, name, from, to, args) { return StateMachine.doCallback(fsm, fsm['onenter' + to] || fsm['on' + to], name, from, to, args); }, + + beforeEvent: function(fsm, name, from, to, args) { + if ((false === StateMachine.beforeThisEvent(fsm, name, from, to, args)) || + (false === StateMachine.beforeAnyEvent( fsm, name, from, to, args))) + return false; + }, + + afterEvent: function(fsm, name, from, to, args) { + StateMachine.afterThisEvent(fsm, name, from, to, args); + StateMachine.afterAnyEvent( fsm, name, from, to, args); + }, + + leaveState: function(fsm, name, from, to, args) { + var specific = StateMachine.leaveThisState(fsm, name, from, to, args), + general = StateMachine.leaveAnyState( fsm, name, from, to, args); + if ((false === specific) || (false === general)) + return false; + else if ((StateMachine.ASYNC === specific) || (StateMachine.ASYNC === general)) + return StateMachine.ASYNC; + }, + + enterState: function(fsm, name, from, to, args) { + StateMachine.enterThisState(fsm, name, from, to, args); + StateMachine.enterAnyState( fsm, name, from, to, args); + }, + + //=========================================================================== + + buildEvent: function(name, map) { + return function() { + + var from = this.current; + var to = map[from] || (map[StateMachine.WILDCARD] != StateMachine.WILDCARD ? map[StateMachine.WILDCARD] : from) || from; + var args = Array.prototype.slice.call(arguments); // turn arguments into pure array + + if (this.transition) + return this.error(name, from, to, args, StateMachine.Error.PENDING_TRANSITION, "event " + name + " inappropriate because previous transition did not complete"); + + if (this.cannot(name)) + return this.error(name, from, to, args, StateMachine.Error.INVALID_TRANSITION, "event " + name + " inappropriate in current state " + this.current); + + if (false === StateMachine.beforeEvent(this, name, from, to, args)) + return StateMachine.Result.CANCELLED; + + if (from === to) { + StateMachine.afterEvent(this, name, from, to, args); + return StateMachine.Result.NOTRANSITION; + } + + // prepare a transition method for use EITHER lower down, or by caller if they want an async transition (indicated by an ASYNC return value from leaveState) + var fsm = this; + this.transition = function() { + fsm.transition = null; // this method should only ever be called once + fsm.current = to; + StateMachine.enterState( fsm, name, from, to, args); + StateMachine.changeState(fsm, name, from, to, args); + StateMachine.afterEvent( fsm, name, from, to, args); + return StateMachine.Result.SUCCEEDED; + }; + this.transition.cancel = function() { // provide a way for caller to cancel async transition if desired (issue #22) + fsm.transition = null; + StateMachine.afterEvent(fsm, name, from, to, args); + }; + + var leave = StateMachine.leaveState(this, name, from, to, args); + if (false === leave) { + this.transition = null; + return StateMachine.Result.CANCELLED; + } + else if (StateMachine.ASYNC === leave) { + return StateMachine.Result.PENDING; + } + else { + if (this.transition) // need to check in case user manually called transition() but forgot to return StateMachine.ASYNC + return this.transition(); + } + + }; + } + + }; // StateMachine + + //=========================================================================== + + //====== + // NODE + //====== + { + if ('object' !== 'undefined' && module.exports) { + exports = module.exports = StateMachine; + } + exports.StateMachine = StateMachine; + } + + }()); + }); + + var _extends = createCommonjsModule(function (module, exports) { + "use strict"; + + exports.__esModule = true; + + + + var _assign2 = _interopRequireDefault(assign$1); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + exports.default = _assign2.default || 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 getWeak = _meta.getWeak; + + + + + + + + var arrayFind = _arrayMethods(5); + var arrayFindIndex = _arrayMethods(6); + var id$1 = 0; + + // fallback for uncaught frozen keys + var uncaughtFrozenStore = function (that) { + return that._l || (that._l = new UncaughtFrozenStore()); + }; + var UncaughtFrozenStore = function () { + this.a = []; + }; + var findUncaughtFrozen = function (store, key) { + return arrayFind(store.a, function (it) { + return it[0] === key; + }); + }; + UncaughtFrozenStore.prototype = { + get: function (key) { + var entry = findUncaughtFrozen(this, key); + if (entry) return entry[1]; + }, + has: function (key) { + return !!findUncaughtFrozen(this, key); + }, + set: function (key, value) { + var entry = findUncaughtFrozen(this, key); + if (entry) entry[1] = value; + else this.a.push([key, value]); + }, + 'delete': function (key) { + var index = arrayFindIndex(this.a, function (it) { + return it[0] === key; + }); + if (~index) this.a.splice(index, 1); + return !!~index; + } + }; + + var _collectionWeak = { + getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { + var C = wrapper(function (that, iterable) { + _anInstance(that, C, NAME, '_i'); + that._t = NAME; // collection type + that._i = id$1++; // collection id + that._l = undefined; // leak store for uncaught frozen objects + if (iterable != undefined) _forOf(iterable, IS_MAP, that[ADDER], that); + }); + _redefineAll(C.prototype, { + // 23.3.3.2 WeakMap.prototype.delete(key) + // 23.4.3.3 WeakSet.prototype.delete(value) + 'delete': function (key) { + if (!_isObject(key)) return false; + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(_validateCollection(this, NAME))['delete'](key); + return data && _has(data, this._i) && delete data[this._i]; + }, + // 23.3.3.4 WeakMap.prototype.has(key) + // 23.4.3.4 WeakSet.prototype.has(value) + has: function has(key) { + if (!_isObject(key)) return false; + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(_validateCollection(this, NAME)).has(key); + return data && _has(data, this._i); + } + }); + return C; + }, + def: function (that, key, value) { + var data = getWeak(_anObject(key), true); + if (data === true) uncaughtFrozenStore(that).set(key, value); + else data[that._i] = value; + return that; + }, + ufstore: uncaughtFrozenStore + }; + + var es6_weakMap = createCommonjsModule(function (module) { + 'use strict'; + var each = _arrayMethods(0); + + + + + + + + var WEAK_MAP = 'WeakMap'; + var getWeak = _meta.getWeak; + var isExtensible = Object.isExtensible; + var uncaughtFrozenStore = _collectionWeak.ufstore; + var tmp = {}; + var InternalMap; + + var wrapper = function (get) { + return function WeakMap() { + return get(this, arguments.length > 0 ? arguments[0] : undefined); + }; + }; + + var methods = { + // 23.3.3.3 WeakMap.prototype.get(key) + get: function get(key) { + if (_isObject(key)) { + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(_validateCollection(this, WEAK_MAP)).get(key); + return data ? data[this._i] : undefined; + } + }, + // 23.3.3.5 WeakMap.prototype.set(key, value) + set: function set(key, value) { + return _collectionWeak.def(_validateCollection(this, WEAK_MAP), key, value); + } + }; + + // 23.3 WeakMap Objects + var $WeakMap = module.exports = _collection(WEAK_MAP, wrapper, methods, _collectionWeak, true, true); + + // IE11 WeakMap frozen keys fix + if (_fails(function () { return new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7; })) { + InternalMap = _collectionWeak.getConstructor(wrapper, WEAK_MAP); + _objectAssign(InternalMap.prototype, methods); + _meta.NEED = true; + each(['delete', 'has', 'get', 'set'], function (key) { + var proto = $WeakMap.prototype; + var method = proto[key]; + _redefine(proto, key, function (a, b) { + // store frozen objects on internal weakmap shim + if (_isObject(a) && !isExtensible(a)) { + if (!this._f) this._f = new InternalMap(); + var result = this._f[key](a, b); + return key == 'set' ? this : result; + // store all the rest on native weakmap + } return method.call(this, a, b); + }); + }); + } + }); + + // https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.of + _setCollectionOf('WeakMap'); + + // https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.from + _setCollectionFrom('WeakMap'); + + var weakMap$1 = _core.WeakMap; + + var weakMap = createCommonjsModule(function (module) { + module.exports = { "default": weakMap$1, __esModule: true }; + }); + + var _WeakMap = unwrapExports(weakMap); + + // 19.1.2.14 Object.keys(O) + + + + _objectSap('keys', function () { + return function keys(it) { + return _objectKeys(_toObject(it)); + }; + }); + + var keys$1 = _core.Object.keys; + + var keys = createCommonjsModule(function (module) { + module.exports = { "default": keys$1, __esModule: true }; + }); + + var _Object$keys = unwrapExports(keys); + + /** Detect free variable `global` from Node.js. */ + var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal; + + var _freeGlobal = freeGlobal; + + /** Detect free variable `self`. */ + var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + + /** Used as a reference to the global object. */ + var root = _freeGlobal || freeSelf || Function('return this')(); + + var _root = root; + + /** Built-in value references. */ + var Symbol$1 = _root.Symbol; + + var _Symbol$1 = Symbol$1; + + /** Used for built-in method references. */ + var objectProto$1 = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty$3 = objectProto$1.hasOwnProperty; + + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var nativeObjectToString = objectProto$1.toString; + + /** Built-in value references. */ + var symToStringTag$1 = _Symbol$1 ? _Symbol$1.toStringTag : undefined; + + /** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ + function getRawTag(value) { + var isOwn = hasOwnProperty$3.call(value, symToStringTag$1), + tag = value[symToStringTag$1]; + + try { + value[symToStringTag$1] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag$1] = tag; + } else { + delete value[symToStringTag$1]; + } + } + return result; + } + + var _getRawTag = getRawTag; + + /** Used for built-in method references. */ + var objectProto$2 = Object.prototype; + + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var nativeObjectToString$1 = objectProto$2.toString; + + /** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ + function objectToString(value) { + return nativeObjectToString$1.call(value); + } + + var _objectToString = objectToString; + + /** `Object#toString` result references. */ + var nullTag = '[object Null]'; + var undefinedTag = '[object Undefined]'; + + /** Built-in value references. */ + var symToStringTag = _Symbol$1 ? _Symbol$1.toStringTag : undefined; + + /** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + return (symToStringTag && symToStringTag in Object(value)) + ? _getRawTag(value) + : _objectToString(value); + } + + var _baseGetTag = baseGetTag; + + /** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ + function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; + } + + var _overArg = overArg; + + /** Built-in value references. */ + var getPrototype = _overArg(Object.getPrototypeOf, Object); + + var _getPrototype = getPrototype; + + /** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ + function isObjectLike(value) { + return value != null && typeof value == 'object'; + } + + var isObjectLike_1 = isObjectLike; + + /** `Object#toString` result references. */ + var objectTag = '[object Object]'; + + /** Used for built-in method references. */ + var funcProto = Function.prototype; + var objectProto = Object.prototype; + + /** Used to resolve the decompiled source of functions. */ + var funcToString = funcProto.toString; + + /** Used to check objects for own properties. */ + var hasOwnProperty$2 = objectProto.hasOwnProperty; + + /** Used to infer the `Object` constructor. */ + var objectCtorString = funcToString.call(Object); + + /** + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. + * + * @static + * @memberOf _ + * @since 0.8.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true + */ + function isPlainObject(value) { + if (!isObjectLike_1(value) || _baseGetTag(value) != objectTag) { + return false; + } + var proto = _getPrototype(value); + if (proto === null) { + return true; + } + var Ctor = hasOwnProperty$2.call(proto, 'constructor') && proto.constructor; + return typeof Ctor == 'function' && Ctor instanceof Ctor && + funcToString.call(Ctor) == objectCtorString; + } + + var isPlainObject_1 = isPlainObject; + + /* eslint-disable */ + var global$2 = typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : {}; + + var EXPIRED = _Symbol('expired'); + var debug$5 = browser$1('LC:Expirable'); + + var Expirable = function () { + function Expirable(value, ttl) { + _classCallCheck(this, Expirable); + + this._value = value; + if (typeof ttl === 'number') { + this.expiredAt = Date.now() + ttl; + } + } + + _createClass(Expirable, [{ + key: 'value', + get: function get() { + var expired = this.expiredAt && this.expiredAt < Date.now(); + if (expired) debug$5('expired: ' + this._value); + return expired ? EXPIRED : this._value; + } + }]); + + return Expirable; + }(); + + Expirable.EXPIRED = EXPIRED; + + var debug$6 = browser$1('LC:Cache'); + + var Cache = function () { + function Cache() { + var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'anonymous'; + + _classCallCheck(this, Cache); + + this.name = name; + this._map = {}; + } + + Cache.prototype.get = function get(key) { + var cache = this._map[key]; + if (cache) { + var value = cache.value; + if (value !== Expirable.EXPIRED) { + debug$6('[%s] hit: %s %O', this.name, key, value); + return value; + } + delete this._map[key]; + } + debug$6('[' + this.name + '] missed: ' + key); + return null; + }; + + Cache.prototype.set = function set(key, value, ttl) { + debug$6('[%s] set: %s %O %d', this.name, key, value, ttl); + this._map[key] = new Expirable(value, ttl); + }; + + return Cache; + }(); + + var tryAll = function tryAll(promiseConstructors) { + var promise = new _Promise(promiseConstructors[0]); + if (promiseConstructors.length === 1) { + return promise; + } + return promise.catch(function () { + return tryAll(promiseConstructors.slice(1)); + }); + }; + + var tap = function tap(interceptor) { + return function (value) { + return interceptor(value), value; + }; + }; + + + + + + var isIE10 = global$2.navigator && global$2.navigator.userAgent && global$2.navigator.userAgent.indexOf('MSIE 10.') !== -1; + + /* eslint-disable no-proto */ + + /* eslint-enable no-proto */ + + + + + var map = new _WeakMap(); + + // protected property helper + var internal = function internal(object) { + if (!map.has(object)) { + map.set(object, {}); + } + return map.get(object); + }; + + // debug utility + var removeNull = function removeNull(obj) { + if (!isPlainObject_1(obj)) return obj; + var object = _Object$assign({}, obj); + // eslint-disable-next-line no-restricted-syntax + for (var prop in object) { + if ({}.hasOwnProperty.call(object, prop)) { + var value = object[prop]; + if (value === null) { + delete object[prop]; + } else { + object[prop] = removeNull(value); + } + } + } + return object; + }; + var trim$1 = function trim(message) { + return removeNull(JSON.parse(_JSON$stringify(message))); + }; + + var ensureArray = function ensureArray(target) { + if (Array.isArray(target)) { + return target; + } + if (target === undefined || target === null) { + return []; + } + return [target]; + }; + + + + // eslint-disable-next-line no-undef + var isWeapp = (typeof wx === 'undefined' ? 'undefined' : _typeof(wx)) === 'object' && typeof wx.connectSocket === 'function'; + + // throttle decorator + + var WebSocket$3 = global$2.WebSocket || global$2.MozWebSocket; + + var _class; + + function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { + var desc = {}; + Object['ke' + 'ys'](descriptor).forEach(function (key) { + desc[key] = descriptor[key]; + }); + desc.enumerable = !!desc.enumerable; + desc.configurable = !!desc.configurable; + + if ('value' in desc || desc.initializer) { + desc.writable = true; + } + + desc = decorators.slice().reverse().reduce(function (desc, decorator) { + return decorator(target, property, desc) || desc; + }, desc); + + if (context && desc.initializer !== void 0) { + desc.value = desc.initializer ? desc.initializer.call(context) : void 0; + desc.initializer = undefined; + } + + if (desc.initializer === void 0) { + Object['define' + 'Property'](target, property, desc); + desc = null; + } + + return desc; + } + + // WebSocket with auto reconnecting feature, backup endpoint and EventEmitter interface. + + var debug$4 = browser$1('LC:WebSocketPlus'); + + var HEARTBEAT_TIME = 180000; + var TIMEOUT_TIME = 380000; + + var DEFAULT_RETRY_STRATEGY = function DEFAULT_RETRY_STRATEGY(attempt) { + return Math.min(1000 * Math.pow(2, attempt), 300000); + }; + + var requireConnected = function requireConnected(target, name, descriptor) { + return _Object$assign({}, descriptor, { + value: function requireConnectedWrapper() { + var _descriptor$value; + + if (!this.is('connected')) { + var currentState = this.current; + console.warn(name + ' should not be called when the connection is ' + currentState); + if (this.is('disconnected') || this.is('reconnecting')) { + console.warn('disconnect and reconnect event should be handled to avoid such calls.'); + } + throw new Error('Connection unavailable'); + } + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return (_descriptor$value = descriptor.value).call.apply(_descriptor$value, [this].concat(args)); + } + }); + }; + + var WebSocketPlus = (_class = function (_EventEmitter) { + _inherits(WebSocketPlus, _EventEmitter); + + function WebSocketPlus(getUrls, protocol) { + _classCallCheck(this, WebSocketPlus); + + if (typeof WebSocket$3 === 'undefined') { + throw new Error('WebSocket is undefined. Polyfill is required in this runtime.'); + } + + var _this = _possibleConstructorReturn(this, _EventEmitter.call(this)); + + if (typeof getUrls !== 'function') { + _this._getUrls = function () { + return _Promise.resolve(getUrls); + }; + } else { + _this._getUrls = getUrls; + } + _this._protocol = protocol; + _this.init(); + _this._createWs(_this._getUrls, _this._protocol).then(function () { + _this.__postponeTimeoutTimer = _this._postponeTimeoutTimer.bind(_this); + if (global$2.addEventListener) { + _this.__pause = function () { + return _this.pause(); + }; + _this.__resume = function () { + return _this.resume(); + }; + global$2.addEventListener('offline', _this.__pause); + global$2.addEventListener('online', _this.__resume); + } + _this.open(); + }).catch(_this.throw.bind(_this)); + return _this; + } + + WebSocketPlus.prototype._createWs = function _createWs(getUrls, protocol) { + var _this2 = this; + + return getUrls().then(function (wsUrls) { + var urls = wsUrls; + if (!(urls instanceof Array)) { + urls = [urls]; + } + return tryAll(urls.map(function (url) { + return function (resolve, reject) { + debug$4('connect [' + url + '] ' + protocol); + var ws = protocol ? new WebSocket$3(url, protocol) : new WebSocket$3(url); + ws.binaryType = _this2.binaryType || 'arraybuffer'; + ws.onopen = function () { + return resolve(ws); + }; + ws.onerror = ws.onclose = function (error) { + if (error instanceof Error) { + return reject(error); + } + // in browser, error event is useless + return reject(new Error('Failed to connect [' + url + ']')); + }; + }; + })).then(function (ws) { + _this2._ws = ws; + _this2._ws.onclose = _this2._handleClose.bind(_this2); + _this2._ws.onmessage = _this2._handleMessage.bind(_this2); + return ws; + }); + }); + }; + + WebSocketPlus.prototype._destroyWs = function _destroyWs() { + var ws = this._ws; + if (!ws) return; + ws.onopen = ws.onclose = ws.onerror = ws.onmessage = null; + this._ws = null; + ws.close(); + }; + + // eslint-disable-next-line class-methods-use-this + + + WebSocketPlus.prototype.onbeforeevent = function onbeforeevent(event, from, to) { + for (var _len2 = arguments.length, payload = Array(_len2 > 3 ? _len2 - 3 : 0), _key2 = 3; _key2 < _len2; _key2++) { + payload[_key2 - 3] = arguments[_key2]; + } + + debug$4.apply(undefined, [event + ': ' + from + ' -> ' + to].concat(payload)); + }; + + WebSocketPlus.prototype.onopen = function onopen() { + this.emit('open'); + }; + + WebSocketPlus.prototype.onconnected = function onconnected() { + this._startConnectionKeeper(); + }; + + WebSocketPlus.prototype.onleaveconnected = function onleaveconnected(event, from, to) { + this._stopConnectionKeeper(); + this._destroyWs(); + if (to === 'offline' || to === 'disconnected') { + this.emit('disconnect'); + } + }; + + WebSocketPlus.prototype.onpause = function onpause() { + this.emit('offline'); + }; + + WebSocketPlus.prototype.onbeforeresume = function onbeforeresume() { + this.emit('online'); + }; + + WebSocketPlus.prototype.onreconnect = function onreconnect() { + this.emit('reconnect'); + }; + + WebSocketPlus.prototype.ondisconnected = function ondisconnected(event, from, to) { + var _this3 = this; + + var attempt = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0; + + var delay = DEFAULT_RETRY_STRATEGY.call(null, attempt); + debug$4('schedule attempt=' + attempt + ' delay=' + delay); + this.emit('schedule', attempt, delay); + if (this.__scheduledRetry) { + clearTimeout(this.__scheduledRetry); + } + this.__scheduledRetry = setTimeout(function () { + if (_this3.is('disconnected')) { + _this3.retry(attempt); + } + }, delay); + }; + + WebSocketPlus.prototype.onretry = function onretry(event, from, to) { + var _this4 = this; + + var attempt = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0; + + this.emit('retry', attempt); + this._createWs(this._getUrls, this._protocol).then(function () { + return _this4.can('reconnect') ? _this4.reconnect() : _this4._destroyWs(); + }, function () { + return _this4.can('fail') && _this4.fail(attempt + 1); + }); + }; + + WebSocketPlus.prototype.onerror = function onerror(event, from, to, error) { + this.emit('error', error); + }; + + WebSocketPlus.prototype.onclose = function onclose() { + if (global$2.removeEventListener) { + if (this.__pause) global$2.removeEventListener('offline', this.__pause); + if (this.__resume) global$2.removeEventListener('online', this.__resume); + } + }; + + // jsdoc-ignore-start + + + // jsdoc-ignore-end + WebSocketPlus.prototype._ping = function _ping() { + debug$4('ping'); + try { + this.ping(); + } catch (error) { + console.warn('websocket ping error: ' + error.message); + } + }; + + WebSocketPlus.prototype.ping = function ping() { + if (this._ws.ping) { + this._ws.ping(); + } else { + console.warn('The WebSocket implement does not support sending ping frame.\n Override ping method to use application defined ping/pong mechanism.'); + } + }; + + WebSocketPlus.prototype._postponeTimeoutTimer = function _postponeTimeoutTimer() { + var _this5 = this; + + debug$4('_postponeTimeoutTimer'); + this._clearTimeoutTimers(); + this._timeoutTimer = setTimeout(function () { + debug$4('timeout'); + _this5.disconnect(); + }, TIMEOUT_TIME); + }; + + WebSocketPlus.prototype._clearTimeoutTimers = function _clearTimeoutTimers() { + if (this._timeoutTimer) { + clearTimeout(this._timeoutTimer); + } + }; + + WebSocketPlus.prototype._startConnectionKeeper = function _startConnectionKeeper() { + debug$4('start connection keeper'); + this._heartbeatTimer = setInterval(this._ping.bind(this), HEARTBEAT_TIME); + var addListener = this._ws.addListener || this._ws.addEventListener; + addListener.call(this._ws, 'message', this.__postponeTimeoutTimer); + addListener.call(this._ws, 'pong', this.__postponeTimeoutTimer); + this._postponeTimeoutTimer(); + }; + + WebSocketPlus.prototype._stopConnectionKeeper = function _stopConnectionKeeper() { + debug$4('stop connection keeper'); + // websockets/ws#489 + var removeListener = this._ws.removeListener || this._ws.removeEventListener; + removeListener.call(this._ws, 'message', this.__postponeTimeoutTimer); + removeListener.call(this._ws, 'pong', this.__postponeTimeoutTimer); + this._clearTimeoutTimers(); + if (this._heartbeatTimer) { + clearInterval(this._heartbeatTimer); + } + }; + + WebSocketPlus.prototype._handleClose = function _handleClose(event) { + debug$4('ws closed [' + event.code + '] ' + event.reason); + // socket closed manually, ignore close event. + if (this.isFinished()) return; + this.handleClose(event); + }; + + WebSocketPlus.prototype.handleClose = function handleClose() { + // reconnect + this.disconnect(); + }; + + // jsdoc-ignore-start + + + // jsdoc-ignore-end + WebSocketPlus.prototype.send = function send(data) { + debug$4('send', data); + this._ws.send(data); + }; + + WebSocketPlus.prototype._handleMessage = function _handleMessage(event) { + debug$4('message', event.data); + this.handleMessage(event.data); + }; + + WebSocketPlus.prototype.handleMessage = function handleMessage(message) { + this.emit('message', message); + }; + + return WebSocketPlus; + }(eventemitter3), (_applyDecoratedDescriptor(_class.prototype, '_ping', [requireConnected], _Object$getOwnPropertyDescriptor(_class.prototype, '_ping'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'send', [requireConnected], _Object$getOwnPropertyDescriptor(_class.prototype, 'send'), _class.prototype)), _class); + + + stateMachine.create({ + target: WebSocketPlus.prototype, + initial: { + state: 'initialized', + event: 'init', + defer: true + }, + terminal: 'closed', + events: [{ + name: 'open', + from: 'initialized', + to: 'connected' + }, { + name: 'disconnect', + from: 'connected', + to: 'disconnected' + }, { + name: 'retry', + from: 'disconnected', + to: 'reconnecting' + }, { + name: 'fail', + from: 'reconnecting', + to: 'disconnected' + }, { + name: 'reconnect', + from: 'reconnecting', + to: 'connected' + }, { + name: 'pause', + from: ['connected', 'disconnected', 'reconnecting'], + to: 'offline' + }, {}, { + name: 'resume', + from: 'offline', + to: 'disconnected' + }, { + name: 'close', + from: ['connected', 'disconnected', 'reconnecting', 'offline'], + to: 'closed' + }, { + name: 'throw', + from: '*', + to: 'error' + }] + }); + + // 19.1.2.5 Object.freeze(O) + + var meta = _meta.onFreeze; + + _objectSap('freeze', function ($freeze) { + return function freeze(it) { + return $freeze && _isObject(it) ? $freeze(meta(it)) : it; + }; + }); + + var freeze$1 = _core.Object.freeze; + + var freeze = createCommonjsModule(function (module) { + module.exports = { "default": freeze$1, __esModule: true }; + }); + + var _Object$freeze = unwrapExports(freeze); + + var error$1 = _Object$freeze({ + 1000: { + name: 'CLOSE_NORMAL' + }, + 1006: { + name: 'CLOSE_ABNORMAL' + }, + 4100: { + name: 'APP_NOT_AVAILABLE', + message: 'App not exists or realtime message service is disabled.' + }, + 4103: { + name: 'INVALID_LOGIN', + message: 'Malformed clientId.' + }, + 4105: { + name: 'SESSION_REQUIRED', + message: 'Message sent before session opened. ' + }, + 4107: { + name: 'READ_TIMEOUT' + }, + 4108: { + name: 'LOGIN_TIMEOUT' + }, + 4109: { + name: 'FRAME_TOO_LONG' + }, + 4110: { + name: 'INVALID_ORIGIN', + message: 'Access denied by domain whitelist.' + }, + 4111: { + name: 'SESSION_CONFLICT' + }, + 4112: { + name: 'SESSION_TOKEN_EXPIRED' + }, + 4200: { + name: 'INTERNAL_ERROR', + message: 'Internal error, please contact LeanCloud for support.' + }, + 4201: { + name: 'SEND_MESSAGE_TIMEOUT' + }, + 4302: { + name: 'CONVERSATION_SIGNATURE_FAILED' + }, + 4303: { + name: 'CONVERSATION_NOT_FOUND' + }, + 4304: { + name: 'CONVERSATION_FULL' + }, + 4305: { + name: 'CONVERSATION_REJECTED_BY_APP' + }, + 4306: { + name: 'CONVERSATION_UPDATE_FAILED' + }, + 4307: { + name: 'CONVERSATION_READ_ONLY' + }, + 4308: { + name: 'CONVERSATION_NOT_ALLOWED' + }, + 4401: { + name: 'INVALID_MESSAGING_TARGET' + }, + 4402: { + name: 'MESSAGE_REJECTED_BY_APP' + } + }); + + var ErrorCode = _Object$freeze(_Object$keys(error$1).reduce(function (result, code) { + return _Object$assign(result, _defineProperty({}, error$1[code].name, Number(code))); + }, {})); + + var createError$3 = function createError(errorMessage) { + var code = errorMessage.code, + reason = errorMessage.reason, + appCode = errorMessage.appCode, + detail = errorMessage.detail; + + var message = reason || detail; + if (!message && error$1[code]) { + message = error$1[code].message || error$1[code].name; + } + if (!message) { + message = 'Unknow Error: ' + code; + } + var err = new Error(message); + return _Object$assign(err, { + code: code, appCode: appCode, detail: detail + }); + }; + + var debug$3 = browser$1('LC:Connection'); + + var COMMAND_TIMEOUT = 20000; + + var Connection = function (_WebSocketPlus) { + _inherits(Connection, _WebSocketPlus); + + function Connection(getUrl, _ref) { + var format = _ref.format, + version = _ref.version; + + _classCallCheck(this, Connection); + + debug$3('initializing Connection'); + var protocolString = 'lc.' + format + '.' + version; + if (!isWeapp) { + var _this = _possibleConstructorReturn(this, _WebSocketPlus.call(this, getUrl, protocolString)); + } else { + var _this = _possibleConstructorReturn(this, _WebSocketPlus.call(this, getUrl().then(function (urls) { + return urls.map(function (url) { + return '' + url + (url.indexOf('?') === -1 ? '?' : '&') + 'subprotocol=' + encodeURIComponent(protocolString); + }); + }))); + } + _this._protocalFormat = format; + _this._commands = {}; + _this._serialId = 0; + return _possibleConstructorReturn(_this); + } + + Connection.prototype.send = function send(command) { + var _this2 = this; + + var waitingForRespond = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + + var serialId = void 0; + if (waitingForRespond) { + this._serialId += 1; + serialId = this._serialId; + command.i = serialId; // eslint-disable-line no-param-reassign + } + debug$3('↑ %O sent', trim$1(command)); + + var message = void 0; + if (this._protocalFormat === 'proto2base64') { + message = command.toBase64(); + } else if (command.toArrayBuffer) { + message = command.toArrayBuffer(); + } + if (!message) { + throw new TypeError(command + ' is not a GenericCommand'); + } + + _WebSocketPlus.prototype.send.call(this, message); + + if (!waitingForRespond) { + return _Promise.resolve(); + } + return new _Promise(function (resolve, reject) { + _this2._commands[serialId] = { + resolve: resolve, + reject: reject + }; + setTimeout(function () { + if (_this2._commands[serialId]) { + debug$3('✗ %O timeout', trim$1(command)); + reject(new Error('Command Timeout.')); + delete _this2._commands[serialId]; + } + }, COMMAND_TIMEOUT); + }); + }; + + Connection.prototype.handleMessage = function handleMessage(msg) { + var message = void 0; + try { + message = GenericCommand.decode(msg); + debug$3('↓ %O received', trim$1(message)); + } catch (e) { + console.warn('Decode message failed', msg); + } + this.emit('allmessage', message); + var serialId = message.i; + if (serialId) { + if (this._commands[serialId]) { + if (message.cmd === CommandType.error) { + this._commands[serialId].reject(createError$3(message.errorMessage)); + } else { + this._commands[serialId].resolve(message); + } + delete this._commands[serialId]; + } else { + console.warn('Unexpected command received with serialId [' + serialId + '],\n which have timed out or never been requested.'); + } + } else if (message.cmd === CommandType.error) { + this.emit('error', createError$3(message.errorMessage)); + } else { + this.emit('message', message); + } + }; + + Connection.prototype.ping = function ping() { + return this.send(new GenericCommand({ + cmd: CommandType.echo + })).catch(function (error$$1) { + return debug$3('ping failed:', error$$1); + }); + }; + + return Connection; + }(WebSocketPlus); + + /* eslint-disable max-len */ + + /** + * 插件接口 + * + *

+ * 插件是由一个或多个扩展点组成的字典。SDK 的扩展点可以分为两类: + *

+ * 第一类扩展点是类实例化之后的回调,包括 RealtimeIMClientConversation。这些扩展点可以通过一个同步的 Decorator 进行扩展。Decorator 接受一个对应的实例并对其进行一些操作。 + * 特别的,由于注册自定义消息类这个需求特别的常用,额外定义一个 messageClasses 扩展点来做这件事情。 + *

+ * 第二类扩展点是在某些事件处理前、后可以注入逻辑的点。 + * 其中 beforeMessageParseafterMessageParse 可以通过一个异步的 Middleware 进行扩展。Middleware 接受一个对象,返回一个同类型对象或同类型对象的 Promise。 + * beforeMessageDispatch 可以通过返回一个 boolean 类型的 shouldDispatch 值来控制是否要继续派发收到的消息。 + *

+ * 如果使用了多个插件,这些 hook 会按照插件数组的顺序依次执行。前一个 Middleware 的返回值会作为参数传给后一个 Middleware。 + * + * @interface Plugin + * @since 3.1.0 + */ + + /* eslint-enable max-len */ + + /** + * 插件名称,用于在日志中显示异常的插件 + * + * @name Plugin.name + * @type string + */ + + /** + * 插件注册的消息类型 + * + * @name Plugin.messageClasses + * @type AVMessage[] + */ + + /** + * 在 Realtime 实例化后对其进行修饰。 + *

+ * 接受一个参数为 Realtime 实例。 + * + * @name Plugin.onRealtimeCreate + * @type Function + */ + + /** + * 在 IMClient 实例化后对其进行修饰。 + *

+ * 接受一个参数为 IMClient 实例。 + * + * @name Plugin.onIMClientCreate + * @type Function + */ + + /** + * 在 Conversation 实例化后对其进行修饰。 + *

+ * 接受一个参数为 Conversation 实例。 + * 需要注意的是,该扩展点并不是在 {@link IMClient#createConversation} 方法创建成功后调用的 hook, + * 而是所有的 Conversation 实例化的时候(包括但不限于 query 时)调用的 hook。 + * + * @name Plugin.onConversationCreate + * @type Function + */ + + /** + * 在对消息进行 parse 之前,对原始消息进行修改。 + *

+ * 接受一个参数为原始消息,是某个消息 JSON 化(message.toJSON())的返回值,一般是一个 JSON 对象。 + * 该方法需要返回一个 JSON 对象。如果这个结果是异步得到的,也可以返回一个 Promise(fulfilled with a JSON)。 + * + * @name Plugin.beforeMessageParse + * @type Function + */ + + /** + * 在对消息进行 parse 之后,对消息实例进行修改。 + *

+ * 接受一个参数为消息实例,一般是一个已注册的 Message 类或其子类的实例。 + * 该方法需要返回一个同类型的消息实例。如果这个结果是异步得到的,也可以返回一个 Promise。 + * + * @name Plugin.afterMessageParse + * @type Function + */ + + /** + * 在收到消息之后,派发消息之前,控制是否派发这条消息。 + *

+ * 接受参数为 message 与 conversation。 + * 该方法需要返回 boolean 类型的值,如果返回 false 则 SDK 不再派发这条消息,后续的 beforeMessageDispatch 也不会执行。 + * 如果这个结果是异步得到的,也可以返回一个 Promise。 + * + * @name Plugin.beforeMessageDispatch + * @type Function + * @since 3.4.0 + */ + + var applyDecorators = function applyDecorators(decorators, target) { + if (decorators) { + decorators.forEach(function (decorator) { + try { + decorator(target); + } catch (error) { + if (decorator._pluginName) { + error.message += '[' + decorator._pluginName + ']'; + } + throw error; + } + }); + } + }; + + + + var applyDispatcher = function applyDispatcher(dispatchers, payload) { + return ensureArray(dispatchers).reduce(function (resultPromise, dispatcher) { + return resultPromise.then(function (shouldDispatch) { + return shouldDispatch === false ? false : dispatcher.apply(undefined, _toConsumableArray(payload)); + }).catch(function (error) { + if (dispatcher._pluginName) { + // eslint-disable-next-line no-param-reassign + error.message += '[' + dispatcher._pluginName + ']'; + } + throw error; + }); + }, _Promise.resolve(true)); + }; + + var debug = browser$1('LC:Realtime'); + + var pushRouterCache = new Cache('push-router'); + + var Realtime = function (_EventEmitter) { + _inherits(Realtime, _EventEmitter); + + /** + * @extends EventEmitter + * @param {Object} options + * @param {String} options.appId + * @param {String} [options.region='cn'] 节点 id + * @param {Boolean} [options.pushOfflineMessages=false] 启用推送离线消息模式(默认为发送未读消息通知模式) + * @param {Boolean} [options.noBinary=false] 设置 WebSocket 使用字符串格式收发消息(默认为二进制格式)。 + * 适用于 WebSocket 实现不支持二进制数据格式的情况(如 React Native) + * @param {Boolean} [options.ssl=true] 使用 wss 进行连接 + * @param {Plugin[]} [options.plugins] 加载插件(since 3.1.0) + */ + function Realtime(options) { + _classCallCheck(this, Realtime); + + debug('initializing Realtime'); + + var _this = _possibleConstructorReturn(this, _EventEmitter.call(this)); + + if (typeof options.appId !== 'string') { + throw new TypeError('appId [' + options.appId + '] is not a string'); + } + _this._options = _Object$assign({ + appId: undefined, + region: 'cn', + pushOfflineMessages: false, + noBinary: isWeapp, + ssl: true, + server: process.env.SERVER + }, options); + _this._cache = new Cache('endpoints'); + internal(_this).clients = new _Set(); + _this._plugins = [].concat(_toConsumableArray(ensureArray(Realtime.__preRegisteredPlugins)), _toConsumableArray(ensureArray(options.plugins))).reduce(function (result, plugin) { + // eslint-disable-next-line no-restricted-syntax + for (var hook in plugin) { + if ({}.hasOwnProperty.call(plugin, hook) && hook !== 'name') { + if (plugin.name) { + ensureArray(plugin[hook]).forEach(function (value) { + // eslint-disable-next-line no-param-reassign + value._pluginName = plugin.name; + }); + } + // eslint-disable-next-line no-param-reassign + result[hook] = ensureArray(result[hook]).concat(plugin[hook]); + } + } + return result; + }, {}); + // onRealtimeCreate hook + applyDecorators(_this._plugins.onRealtimeCreate, _this); + return _this; + } + + Realtime.prototype._open = function _open() { + var _this2 = this; + + if (this._openPromise) return this._openPromise; + + var format = 'protobuf2'; + if (this._options.noBinary) { + // 不发送 binary data,fallback to base64 string + format = 'proto2base64'; + } + var version = 3; + if (this._options.pushOfflineMessages) { + // 不推送离线消息,而是发送对话的未读通知 + version = 1; + } + var protocol = { + format: format, + version: version + }; + this._openPromise = new _Promise(function (resolve, reject) { + debug('No connection established, create a new one.'); + var connection = new Connection(function () { + return _this2._getEndpoints(_this2._options); + }, protocol); + connection.on('open', function () { + return resolve(connection); + }); + connection.on('error', reject); + connection.on('message', _this2._dispatchCommand.bind(_this2)); + /** + * 连接断开。 + * 连接断开可能是因为 SDK 进入了离线状态(see {@link Realtime#event:offline}),或长时间没有收到服务器心跳。 + * 连接断开后所有的网络操作都会失败,请在连接断开后禁用相关的 UI 元素。 + * @event Realtime#disconnect + */ + /** + * 计划在一段时间后尝试重新连接 + * @event Realtime#schedule + * @param {Number} attempt 尝试重连的次数 + * @param {Number} delay 延迟的毫秒数 + */ + /** + * 正在尝试重新连接 + * @event Realtime#retry + * @param {Number} attempt 尝试重连的次数 + */ + /** + * 连接恢复正常。 + * 请重新启用在 {@link Realtime#event:disconnect} 事件中禁用的相关 UI 元素 + * @event Realtime#reconnect + */ + + /** + * 客户端连接断开 + * @event IMClient#disconnect + * @see Realtime#event:disconnect + * @since 3.2.0 + */ + /** + * 计划在一段时间后尝试重新连接 + * @event IMClient#schedule + * @param {Number} attempt 尝试重连的次数 + * @param {Number} delay 延迟的毫秒数 + * @since 3.2.0 + */ + /** + * 正在尝试重新连接 + * @event IMClient#retry + * @param {Number} attempt 尝试重连的次数 + * @since 3.2.0 + */ + + /** + * 客户端进入离线状态。 + * 这通常意味着网络已断开,或者 {@link Realtime#pause} 被调用 + * @event Realtime#offline + * @since 3.4.0 + */ + /** + * 客户端恢复在线状态 + * 这通常意味着网络已恢复,或者 {@link Realtime#resume} 被调用 + * @event Realtime#online + * @since 3.4.0 + */ + /** + * 进入离线状态。 + * 这通常意味着网络已断开,或者 {@link Realtime#pause} 被调用 + * @event IMClient#offline + * @since 3.4.0 + */ + /** + * 恢复在线状态 + * 这通常意味着网络已恢复,或者 {@link Realtime#resume} 被调用 + * @event IMClient#online + * @since 3.4.0 + */ + + // event proxy + ['disconnect', 'reconnect', 'retry', 'schedule', 'offline', 'online'].forEach(function (event) { + return connection.on(event, function () { + for (var _len = arguments.length, payload = Array(_len), _key = 0; _key < _len; _key++) { + payload[_key] = arguments[_key]; + } + + debug(event + ' event emitted. %O', payload); + _this2.emit.apply(_this2, [event].concat(payload)); + if (event !== 'reconnect') { + internal(_this2).clients.forEach(function (client) { + client.emit.apply(client, [event].concat(payload)); + }); + } + }); + }); + // override handleClose + connection.handleClose = function handleClose(event) { + var isFatal = [ErrorCode.APP_NOT_AVAILABLE, ErrorCode.INVALID_LOGIN, ErrorCode.INVALID_ORIGIN].some(function (errorCode) { + return errorCode === event.code; + }); + if (isFatal) { + // in these cases, SDK should throw. + this.throw(createError$3(event)); + } else { + // reconnect + this.disconnect(); + } + }; + internal(_this2).connection = connection; + }).catch(function (error$$1) { + delete _this2._openPromise; + throw error$$1; + }); + + return this._openPromise; + }; + + Realtime.prototype._getEndpoints = function _getEndpoints(options) { + var _this3 = this; + + return _Promise.resolve(this._cache.get('endpoints') || this.constructor._fetchEndpointsInfo(options).then(tap(function (info) { + return _this3._cache.set('endpoints', info, info.ttl * 1000); + }))).then(function (info) { + debug('endpoint info: %O', info); + return [info.server, info.secondary]; + }); + }; + + Realtime._fetchPushRouter = function _fetchPushRouter(_ref) { + var appId = _ref.appId, + region = _ref.region; + + debug('fetch router'); + switch (region) { + case 'cn': + { + var cachedPushRouter = pushRouterCache.get(appId); + if (cachedPushRouter) { + return _Promise.resolve(cachedPushRouter); + } + return axios.get('https://app-router.leancloud.cn/1/route', { + params: { + appId: appId + }, + timeout: 20000 + }).then(function (res) { + return res.data; + }).then(tap(debug)).then(function (route) { + var pushRouter = route.push_router_server; + if (!pushRouter) { + throw new Error('push router not exists'); + } + var ttl = route.ttl; + if (typeof ttl !== 'number') { + ttl = 3600; + } + pushRouterCache.set(appId, pushRouter, ttl * 1000); + return pushRouter; + }).catch(function () { + return 'router-g0-push.leancloud.cn'; + }); + } + case 'us': + return _Promise.resolve('router-a0-push.leancloud.cn'); + default: + throw new Error('Region [' + region + '] is not supported.'); + } + }; + + Realtime._fetchEndpointsInfo = function _fetchEndpointsInfo(_ref2) { + var appId = _ref2.appId, + region = _ref2.region, + ssl = _ref2.ssl, + server = _ref2.server; + + debug('fetch endpoint info'); + return this._fetchPushRouter({ appId: appId, region: region }).then(tap(debug)).then(function (router) { + return axios.get('https://' + router + '/v1/route', { + params: { + appId: appId, + secure: ssl, + features: isWeapp ? 'wechat' : undefined, + server: server, + _t: Date.now() + }, + timeout: 20000 + }).then(function (res) { + return res.data; + }).then(tap(debug)); + }); + }; + + Realtime.prototype._close = function _close() { + if (this._openPromise) { + this._openPromise.then(function (connection) { + return connection.close(); + }); + } + delete this._openPromise; + }; + + /** + * 手动进行重连。 + * SDK 在网络出现异常时会自动按照一定的时间间隔尝试重连,调用该方法会立即尝试重连并重置重连尝试计数器。 + * 只能在 `schedule` 事件之后,`retry` 事件之前调用,如果当前网络正常或者正在进行重连,调用该方法会抛异常。 + */ + + + Realtime.prototype.retry = function retry() { + var connection = internal(this).connection; + if (!connection) { + throw new Error('no connection established'); + } + if (connection.cannot('retry')) { + throw new Error('retrying not allowed when not disconnected. the connection is now ' + connection.current); + } + return connection.retry(); + }; + /** + * 暂停,使 SDK 进入离线状态。 + * 你可以在网络断开、应用进入后台等时刻调用该方法让 SDK 进入离线状态,离线状态下不会尝试重连。 + * 在浏览器中 SDK 会自动监听网络变化,因此无需手动调用该方法。 + * + * @since 3.4.0 + * @see Realtime#event:offline + */ + + + Realtime.prototype.pause = function pause() { + // 这个方法常常在网络断开、进入后台时被调用,此时 connection 可能没有建立或者已经 close。 + // 因此不像 retry,这个方法应该尽可能 loose + var connection = internal(this).connection; + if (!connection) return; + if (connection.can('pause')) connection.pause(); + }; + /** + * 恢复在线状态。 + * 你可以在网络恢复、应用回到前台等时刻调用该方法让 SDK 恢复在线状态,恢复在线状态后 SDK 会开始尝试重连。 + * + * @since 3.4.0 + * @see Realtime#event:online + */ + + + Realtime.prototype.resume = function resume() { + // 与 pause 一样,这个方法应该尽可能 loose + var connection = internal(this).connection; + if (!connection) return; + if (connection.can('resume')) connection.resume(); + }; + + Realtime.prototype._register = function _register(client) { + internal(this).clients.add(client); + }; + + Realtime.prototype._deregister = function _deregister(client) { + internal(this).clients.delete(client); + if (internal(this).clients.size === 0) { + this._close(); + } + }; + + Realtime.prototype._dispatchCommand = function _dispatchCommand(command) { + return applyDispatcher(this._plugins.beforeCommandDispatch, [command, this]).then(function (shouldDispatch) { + // no plugin handled this command + if (shouldDispatch) return debug('[WARN] Unexpected message received: %O', trim$1(command)); + return false; + }); + }; + + return Realtime; + }(eventemitter3); + + exports.Protocals = message; + exports.Promise = _Promise; + exports.EventEmitter = eventemitter3; + exports.Realtime = Realtime; + exports.ErrorCode = ErrorCode; + + Object.defineProperty(exports, '__esModule', { value: true }); + +}))); + +//# sourceMappingURL=realtime-core.weapp.js.map \ No newline at end of file diff --git a/dist/realtime-core.weapp.js.map b/dist/realtime-core.weapp.js.map new file mode 100644 index 000000000..b2a6cee2e --- /dev/null +++ b/dist/realtime-core.weapp.js.map @@ -0,0 +1 @@ +{"version":3,"file":null,"sources":["/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_to-integer.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_defined.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_string-at.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_library.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_global.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_core.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_a-function.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_ctx.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_is-object.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_an-object.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_fails.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_descriptors.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_dom-create.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_ie8-dom-define.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_to-primitive.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_object-dp.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_property-desc.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_hide.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_export.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_redefine.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_has.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_iterators.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_cof.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_iobject.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_to-iobject.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_to-length.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_to-absolute-index.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_array-includes.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_shared.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_uid.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_shared-key.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_object-keys-internal.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_enum-bug-keys.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_object-keys.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_object-dps.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_html.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_object-create.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_wks.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_set-to-string-tag.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_iter-create.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_to-object.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_object-gpo.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_iter-define.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es6.string.iterator.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_add-to-unscopables.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_iter-step.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es6.array.iterator.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/web.dom.iterable.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_classof.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_an-instance.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_iter-call.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_is-array-iter.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/core.get-iterator-method.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_for-of.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_species-constructor.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_invoke.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_task.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_microtask.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_new-promise-capability.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_perform.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_promise-resolve.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_redefine-all.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_set-species.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_iter-detect.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es6.promise.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es7.promise.finally.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es7.promise.try.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/fn/promise.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/core-js/promise.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_wks-ext.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/fn/symbol/iterator.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/core-js/symbol/iterator.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_meta.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_wks-define.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_object-gops.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_object-pie.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_enum-keys.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_is-array.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_object-gopn.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_object-gopn-ext.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_object-gopd.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es6.symbol.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es7.symbol.async-iterator.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es7.symbol.observable.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/fn/symbol/index.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/core-js/symbol.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/helpers/typeof.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/helpers/classCallCheck.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/weapp-polyfill/localstorage.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es6.object.define-property.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/fn/object/define-property.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/core-js/object/define-property.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/helpers/defineProperty.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/helpers/possibleConstructorReturn.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_set-proto.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es6.object.set-prototype-of.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/fn/object/set-prototype-of.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/core-js/object/set-prototype-of.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es6.object.create.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/fn/object/create.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/core-js/object/create.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/helpers/inherits.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/fn/json/stringify.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/core-js/json/stringify.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/object-assign/index.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/event-target-shim/lib/commons.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/event-target-shim/lib/custom-event-target.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/event-target-shim/lib/event-wrapper.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/event-target-shim/lib/event-target.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/weapp-polyfill/formdata.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/weapp-polyfill/xmlhttprequest.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/helpers/createClass.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/weapp-polyfill/websocket.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/weapp-polyfill/navigator.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/weapp-polyfill/index.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/weapp-polyfill/auto-polyfill.js","/home/travis/build/leancloud/js-realtime-sdk/src/polyfills/polyfills-weapp.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/long/dist/long.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/bytebuffer/dist/bytebuffer.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/@leeyeh/rollup-plugin-node-resolve/src/empty.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/protobufjs/dist/protobuf-light.js","/home/travis/build/leancloud/js-realtime-sdk/proto/message-compiled.js","/home/travis/build/leancloud/js-realtime-sdk/proto/message.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/eventemitter3/index.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_create-property.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es6.array.from.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/fn/array/from.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/core-js/array/from.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/helpers/toConsumableArray.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_validate-collection.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_collection-strong.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_array-species-constructor.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_array-species-create.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_array-methods.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_collection.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es6.set.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_array-from-iterable.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_collection-to-json.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es7.set.to-json.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_set-collection-of.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es7.set.of.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_set-collection-from.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es7.set.from.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/fn/set.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/core-js/set.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_object-assign.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es6.object.assign.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/fn/object/assign.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/core-js/object/assign.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/ms/index.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/debug/src/debug.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/debug/src/browser.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/helpers/bind.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/is-buffer/index.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/utils.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/helpers/normalizeHeaderName.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/core/enhanceError.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/core/createError.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/core/settle.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/helpers/buildURL.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/helpers/parseHeaders.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/helpers/isURLSameOrigin.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/helpers/btoa.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/helpers/cookies.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/adapters/xhr.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/defaults.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/core/InterceptorManager.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/core/transformData.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/cancel/isCancel.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/core/dispatchRequest.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/helpers/isAbsoluteURL.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/helpers/combineURLs.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/core/Axios.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/cancel/Cancel.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/cancel/CancelToken.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/helpers/spread.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/axios.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/index.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_object-sap.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es6.object.get-own-property-descriptor.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/fn/object/get-own-property-descriptor.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/core-js/object/get-own-property-descriptor.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/javascript-state-machine/state-machine.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/helpers/extends.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_collection-weak.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es6.weak-map.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es7.weak-map.of.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es7.weak-map.from.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/fn/weak-map.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/core-js/weak-map.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es6.object.keys.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/fn/object/keys.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/core-js/object/keys.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_freeGlobal.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_root.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_Symbol.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_getRawTag.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_objectToString.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_baseGetTag.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_overArg.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_getPrototype.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/isObjectLike.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/isPlainObject.js","/home/travis/build/leancloud/js-realtime-sdk/src/utils/global.js","/home/travis/build/leancloud/js-realtime-sdk/src/utils/expirable.js","/home/travis/build/leancloud/js-realtime-sdk/src/utils/cache.js","/home/travis/build/leancloud/js-realtime-sdk/src/utils/index.js","/home/travis/build/leancloud/js-realtime-sdk/src/polyfills/ws-browser.js","/home/travis/build/leancloud/js-realtime-sdk/src/websocket-plus.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es6.object.freeze.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/fn/object/freeze.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/core-js/object/freeze.js","/home/travis/build/leancloud/js-realtime-sdk/src/error.js","/home/travis/build/leancloud/js-realtime-sdk/src/connection.js","/home/travis/build/leancloud/js-realtime-sdk/src/plugin.js","/home/travis/build/leancloud/js-realtime-sdk/src/realtime.js"],"sourcesContent":["// 7.1.4 ToInteger\nvar ceil = Math.ceil;\nvar floor = Math.floor;\nmodule.exports = function (it) {\n return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);\n};\n","// 7.2.1 RequireObjectCoercible(argument)\nmodule.exports = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n","var toInteger = require('./_to-integer');\nvar defined = require('./_defined');\n// true -> String#at\n// false -> String#codePointAt\nmodule.exports = function (TO_STRING) {\n return function (that, pos) {\n var s = String(defined(that));\n var i = toInteger(pos);\n var l = s.length;\n var a, b;\n if (i < 0 || i >= l) return TO_STRING ? '' : undefined;\n a = s.charCodeAt(i);\n return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff\n ? TO_STRING ? s.charAt(i) : a\n : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;\n };\n};\n","module.exports = true;\n","// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nvar global = module.exports = typeof window != 'undefined' && window.Math == Math\n ? window : typeof self != 'undefined' && self.Math == Math ? self\n // eslint-disable-next-line no-new-func\n : Function('return this')();\nif (typeof __g == 'number') __g = global; // eslint-disable-line no-undef\n","var core = module.exports = { version: '2.5.1' };\nif (typeof __e == 'number') __e = core; // eslint-disable-line no-undef\n","module.exports = function (it) {\n if (typeof it != 'function') throw TypeError(it + ' is not a function!');\n return it;\n};\n","// optional / simple context binding\nvar aFunction = require('./_a-function');\nmodule.exports = function (fn, that, length) {\n aFunction(fn);\n if (that === undefined) return fn;\n switch (length) {\n case 1: return function (a) {\n return fn.call(that, a);\n };\n case 2: return function (a, b) {\n return fn.call(that, a, b);\n };\n case 3: return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n return function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n};\n","module.exports = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n","var isObject = require('./_is-object');\nmodule.exports = function (it) {\n if (!isObject(it)) throw TypeError(it + ' is not an object!');\n return it;\n};\n","module.exports = function (exec) {\n try {\n return !!exec();\n } catch (e) {\n return true;\n }\n};\n","// Thank's IE8 for his funny defineProperty\nmodule.exports = !require('./_fails')(function () {\n return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;\n});\n","var isObject = require('./_is-object');\nvar document = require('./_global').document;\n// typeof document.createElement is 'object' in old IE\nvar is = isObject(document) && isObject(document.createElement);\nmodule.exports = function (it) {\n return is ? document.createElement(it) : {};\n};\n","module.exports = !require('./_descriptors') && !require('./_fails')(function () {\n return Object.defineProperty(require('./_dom-create')('div'), 'a', { get: function () { return 7; } }).a != 7;\n});\n","// 7.1.1 ToPrimitive(input [, PreferredType])\nvar isObject = require('./_is-object');\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function (it, S) {\n if (!isObject(it)) return it;\n var fn, val;\n if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;\n if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n","var anObject = require('./_an-object');\nvar IE8_DOM_DEFINE = require('./_ie8-dom-define');\nvar toPrimitive = require('./_to-primitive');\nvar dP = Object.defineProperty;\n\nexports.f = require('./_descriptors') ? Object.defineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return dP(O, P, Attributes);\n } catch (e) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n","module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n","var dP = require('./_object-dp');\nvar createDesc = require('./_property-desc');\nmodule.exports = require('./_descriptors') ? function (object, key, value) {\n return dP.f(object, key, createDesc(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n","var global = require('./_global');\nvar core = require('./_core');\nvar ctx = require('./_ctx');\nvar hide = require('./_hide');\nvar PROTOTYPE = 'prototype';\n\nvar $export = function (type, name, source) {\n var IS_FORCED = type & $export.F;\n var IS_GLOBAL = type & $export.G;\n var IS_STATIC = type & $export.S;\n var IS_PROTO = type & $export.P;\n var IS_BIND = type & $export.B;\n var IS_WRAP = type & $export.W;\n var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});\n var expProto = exports[PROTOTYPE];\n var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE];\n var key, own, out;\n if (IS_GLOBAL) source = name;\n for (key in source) {\n // contains in native\n own = !IS_FORCED && target && target[key] !== undefined;\n if (own && key in exports) continue;\n // export native or passed\n out = own ? target[key] : source[key];\n // prevent global pollution for namespaces\n exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]\n // bind timers to global for call from export context\n : IS_BIND && own ? ctx(out, global)\n // wrap global constructors for prevent change them in library\n : IS_WRAP && target[key] == out ? (function (C) {\n var F = function (a, b, c) {\n if (this instanceof C) {\n switch (arguments.length) {\n case 0: return new C();\n case 1: return new C(a);\n case 2: return new C(a, b);\n } return new C(a, b, c);\n } return C.apply(this, arguments);\n };\n F[PROTOTYPE] = C[PROTOTYPE];\n return F;\n // make static versions for prototype methods\n })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;\n // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%\n if (IS_PROTO) {\n (exports.virtual || (exports.virtual = {}))[key] = out;\n // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%\n if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out);\n }\n }\n};\n// type bitmap\n$export.F = 1; // forced\n$export.G = 2; // global\n$export.S = 4; // static\n$export.P = 8; // proto\n$export.B = 16; // bind\n$export.W = 32; // wrap\n$export.U = 64; // safe\n$export.R = 128; // real proto method for `library`\nmodule.exports = $export;\n","module.exports = require('./_hide');\n","var hasOwnProperty = {}.hasOwnProperty;\nmodule.exports = function (it, key) {\n return hasOwnProperty.call(it, key);\n};\n","module.exports = {};\n","var toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};\n","// fallback for non-array-like ES3 and non-enumerable old V8 strings\nvar cof = require('./_cof');\n// eslint-disable-next-line no-prototype-builtins\nmodule.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {\n return cof(it) == 'String' ? it.split('') : Object(it);\n};\n","// to indexed object, toObject with fallback for non-array-like ES3 strings\nvar IObject = require('./_iobject');\nvar defined = require('./_defined');\nmodule.exports = function (it) {\n return IObject(defined(it));\n};\n","// 7.1.15 ToLength\nvar toInteger = require('./_to-integer');\nvar min = Math.min;\nmodule.exports = function (it) {\n return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991\n};\n","var toInteger = require('./_to-integer');\nvar max = Math.max;\nvar min = Math.min;\nmodule.exports = function (index, length) {\n index = toInteger(index);\n return index < 0 ? max(index + length, 0) : min(index, length);\n};\n","// false -> Array#indexOf\n// true -> Array#includes\nvar toIObject = require('./_to-iobject');\nvar toLength = require('./_to-length');\nvar toAbsoluteIndex = require('./_to-absolute-index');\nmodule.exports = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) if (IS_INCLUDES || index in O) {\n if (O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n","var global = require('./_global');\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || (global[SHARED] = {});\nmodule.exports = function (key) {\n return store[key] || (store[key] = {});\n};\n","var id = 0;\nvar px = Math.random();\nmodule.exports = function (key) {\n return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));\n};\n","var shared = require('./_shared')('keys');\nvar uid = require('./_uid');\nmodule.exports = function (key) {\n return shared[key] || (shared[key] = uid(key));\n};\n","var has = require('./_has');\nvar toIObject = require('./_to-iobject');\nvar arrayIndexOf = require('./_array-includes')(false);\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\n\nmodule.exports = function (object, names) {\n var O = toIObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (has(O, key = names[i++])) {\n ~arrayIndexOf(result, key) || result.push(key);\n }\n return result;\n};\n","// IE 8- don't enum bug keys\nmodule.exports = (\n 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'\n).split(',');\n","// 19.1.2.14 / 15.2.3.14 Object.keys(O)\nvar $keys = require('./_object-keys-internal');\nvar enumBugKeys = require('./_enum-bug-keys');\n\nmodule.exports = Object.keys || function keys(O) {\n return $keys(O, enumBugKeys);\n};\n","var dP = require('./_object-dp');\nvar anObject = require('./_an-object');\nvar getKeys = require('./_object-keys');\n\nmodule.exports = require('./_descriptors') ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var keys = getKeys(Properties);\n var length = keys.length;\n var i = 0;\n var P;\n while (length > i) dP.f(O, P = keys[i++], Properties[P]);\n return O;\n};\n","var document = require('./_global').document;\nmodule.exports = document && document.documentElement;\n","// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\nvar anObject = require('./_an-object');\nvar dPs = require('./_object-dps');\nvar enumBugKeys = require('./_enum-bug-keys');\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\nvar Empty = function () { /* empty */ };\nvar PROTOTYPE = 'prototype';\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar createDict = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = require('./_dom-create')('iframe');\n var i = enumBugKeys.length;\n var lt = '<';\n var gt = '>';\n var iframeDocument;\n iframe.style.display = 'none';\n require('./_html').appendChild(iframe);\n iframe.src = 'javascript:'; // eslint-disable-line no-script-url\n // createDict = iframe.contentWindow.Object;\n // html.removeChild(iframe);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);\n iframeDocument.close();\n createDict = iframeDocument.F;\n while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];\n return createDict();\n};\n\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n Empty[PROTOTYPE] = anObject(O);\n result = new Empty();\n Empty[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = createDict();\n return Properties === undefined ? result : dPs(result, Properties);\n};\n","var store = require('./_shared')('wks');\nvar uid = require('./_uid');\nvar Symbol = require('./_global').Symbol;\nvar USE_SYMBOL = typeof Symbol == 'function';\n\nvar $exports = module.exports = function (name) {\n return store[name] || (store[name] =\n USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));\n};\n\n$exports.store = store;\n","var def = require('./_object-dp').f;\nvar has = require('./_has');\nvar TAG = require('./_wks')('toStringTag');\n\nmodule.exports = function (it, tag, stat) {\n if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });\n};\n","'use strict';\nvar create = require('./_object-create');\nvar descriptor = require('./_property-desc');\nvar setToStringTag = require('./_set-to-string-tag');\nvar IteratorPrototype = {};\n\n// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()\nrequire('./_hide')(IteratorPrototype, require('./_wks')('iterator'), function () { return this; });\n\nmodule.exports = function (Constructor, NAME, next) {\n Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });\n setToStringTag(Constructor, NAME + ' Iterator');\n};\n","// 7.1.13 ToObject(argument)\nvar defined = require('./_defined');\nmodule.exports = function (it) {\n return Object(defined(it));\n};\n","// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)\nvar has = require('./_has');\nvar toObject = require('./_to-object');\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\nvar ObjectProto = Object.prototype;\n\nmodule.exports = Object.getPrototypeOf || function (O) {\n O = toObject(O);\n if (has(O, IE_PROTO)) return O[IE_PROTO];\n if (typeof O.constructor == 'function' && O instanceof O.constructor) {\n return O.constructor.prototype;\n } return O instanceof Object ? ObjectProto : null;\n};\n","'use strict';\nvar LIBRARY = require('./_library');\nvar $export = require('./_export');\nvar redefine = require('./_redefine');\nvar hide = require('./_hide');\nvar has = require('./_has');\nvar Iterators = require('./_iterators');\nvar $iterCreate = require('./_iter-create');\nvar setToStringTag = require('./_set-to-string-tag');\nvar getPrototypeOf = require('./_object-gpo');\nvar ITERATOR = require('./_wks')('iterator');\nvar BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`\nvar FF_ITERATOR = '@@iterator';\nvar KEYS = 'keys';\nvar VALUES = 'values';\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {\n $iterCreate(Constructor, NAME, next);\n var getMethod = function (kind) {\n if (!BUGGY && kind in proto) return proto[kind];\n switch (kind) {\n case KEYS: return function keys() { return new Constructor(this, kind); };\n case VALUES: return function values() { return new Constructor(this, kind); };\n } return function entries() { return new Constructor(this, kind); };\n };\n var TAG = NAME + ' Iterator';\n var DEF_VALUES = DEFAULT == VALUES;\n var VALUES_BUG = false;\n var proto = Base.prototype;\n var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];\n var $default = $native || getMethod(DEFAULT);\n var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;\n var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;\n var methods, key, IteratorPrototype;\n // Fix native\n if ($anyNative) {\n IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));\n if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {\n // Set @@toStringTag to native iterators\n setToStringTag(IteratorPrototype, TAG, true);\n // fix for some old engines\n if (!LIBRARY && !has(IteratorPrototype, ITERATOR)) hide(IteratorPrototype, ITERATOR, returnThis);\n }\n }\n // fix Array#{values, @@iterator}.name in V8 / FF\n if (DEF_VALUES && $native && $native.name !== VALUES) {\n VALUES_BUG = true;\n $default = function values() { return $native.call(this); };\n }\n // Define iterator\n if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {\n hide(proto, ITERATOR, $default);\n }\n // Plug for library\n Iterators[NAME] = $default;\n Iterators[TAG] = returnThis;\n if (DEFAULT) {\n methods = {\n values: DEF_VALUES ? $default : getMethod(VALUES),\n keys: IS_SET ? $default : getMethod(KEYS),\n entries: $entries\n };\n if (FORCED) for (key in methods) {\n if (!(key in proto)) redefine(proto, key, methods[key]);\n } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);\n }\n return methods;\n};\n","'use strict';\nvar $at = require('./_string-at')(true);\n\n// 21.1.3.27 String.prototype[@@iterator]()\nrequire('./_iter-define')(String, 'String', function (iterated) {\n this._t = String(iterated); // target\n this._i = 0; // next index\n// 21.1.5.2.1 %StringIteratorPrototype%.next()\n}, function () {\n var O = this._t;\n var index = this._i;\n var point;\n if (index >= O.length) return { value: undefined, done: true };\n point = $at(O, index);\n this._i += point.length;\n return { value: point, done: false };\n});\n","module.exports = function () { /* empty */ };\n","module.exports = function (done, value) {\n return { value: value, done: !!done };\n};\n","'use strict';\nvar addToUnscopables = require('./_add-to-unscopables');\nvar step = require('./_iter-step');\nvar Iterators = require('./_iterators');\nvar toIObject = require('./_to-iobject');\n\n// 22.1.3.4 Array.prototype.entries()\n// 22.1.3.13 Array.prototype.keys()\n// 22.1.3.29 Array.prototype.values()\n// 22.1.3.30 Array.prototype[@@iterator]()\nmodule.exports = require('./_iter-define')(Array, 'Array', function (iterated, kind) {\n this._t = toIObject(iterated); // target\n this._i = 0; // next index\n this._k = kind; // kind\n// 22.1.5.2.1 %ArrayIteratorPrototype%.next()\n}, function () {\n var O = this._t;\n var kind = this._k;\n var index = this._i++;\n if (!O || index >= O.length) {\n this._t = undefined;\n return step(1);\n }\n if (kind == 'keys') return step(0, index);\n if (kind == 'values') return step(0, O[index]);\n return step(0, [index, O[index]]);\n}, 'values');\n\n// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)\nIterators.Arguments = Iterators.Array;\n\naddToUnscopables('keys');\naddToUnscopables('values');\naddToUnscopables('entries');\n","require('./es6.array.iterator');\nvar global = require('./_global');\nvar hide = require('./_hide');\nvar Iterators = require('./_iterators');\nvar TO_STRING_TAG = require('./_wks')('toStringTag');\n\nvar DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' +\n 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' +\n 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' +\n 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' +\n 'TextTrackList,TouchList').split(',');\n\nfor (var i = 0; i < DOMIterables.length; i++) {\n var NAME = DOMIterables[i];\n var Collection = global[NAME];\n var proto = Collection && Collection.prototype;\n if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);\n Iterators[NAME] = Iterators.Array;\n}\n","// getting tag from 19.1.3.6 Object.prototype.toString()\nvar cof = require('./_cof');\nvar TAG = require('./_wks')('toStringTag');\n// ES3 wrong here\nvar ARG = cof(function () { return arguments; }()) == 'Arguments';\n\n// fallback for IE11 Script Access Denied error\nvar tryGet = function (it, key) {\n try {\n return it[key];\n } catch (e) { /* empty */ }\n};\n\nmodule.exports = function (it) {\n var O, T, B;\n return it === undefined ? 'Undefined' : it === null ? 'Null'\n // @@toStringTag case\n : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T\n // builtinTag case\n : ARG ? cof(O)\n // ES3 arguments fallback\n : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;\n};\n","module.exports = function (it, Constructor, name, forbiddenField) {\n if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) {\n throw TypeError(name + ': incorrect invocation!');\n } return it;\n};\n","// call something on iterator step with safe closing on error\nvar anObject = require('./_an-object');\nmodule.exports = function (iterator, fn, value, entries) {\n try {\n return entries ? fn(anObject(value)[0], value[1]) : fn(value);\n // 7.4.6 IteratorClose(iterator, completion)\n } catch (e) {\n var ret = iterator['return'];\n if (ret !== undefined) anObject(ret.call(iterator));\n throw e;\n }\n};\n","// check on default Array iterator\nvar Iterators = require('./_iterators');\nvar ITERATOR = require('./_wks')('iterator');\nvar ArrayProto = Array.prototype;\n\nmodule.exports = function (it) {\n return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);\n};\n","var classof = require('./_classof');\nvar ITERATOR = require('./_wks')('iterator');\nvar Iterators = require('./_iterators');\nmodule.exports = require('./_core').getIteratorMethod = function (it) {\n if (it != undefined) return it[ITERATOR]\n || it['@@iterator']\n || Iterators[classof(it)];\n};\n","var ctx = require('./_ctx');\nvar call = require('./_iter-call');\nvar isArrayIter = require('./_is-array-iter');\nvar anObject = require('./_an-object');\nvar toLength = require('./_to-length');\nvar getIterFn = require('./core.get-iterator-method');\nvar BREAK = {};\nvar RETURN = {};\nvar exports = module.exports = function (iterable, entries, fn, that, ITERATOR) {\n var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable);\n var f = ctx(fn, that, entries ? 2 : 1);\n var index = 0;\n var length, step, iterator, result;\n if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!');\n // fast case for arrays with default iterator\n if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) {\n result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);\n if (result === BREAK || result === RETURN) return result;\n } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) {\n result = call(iterator, f, step.value, entries);\n if (result === BREAK || result === RETURN) return result;\n }\n};\nexports.BREAK = BREAK;\nexports.RETURN = RETURN;\n","// 7.3.20 SpeciesConstructor(O, defaultConstructor)\nvar anObject = require('./_an-object');\nvar aFunction = require('./_a-function');\nvar SPECIES = require('./_wks')('species');\nmodule.exports = function (O, D) {\n var C = anObject(O).constructor;\n var S;\n return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S);\n};\n","// fast apply, http://jsperf.lnkit.com/fast-apply/5\nmodule.exports = function (fn, args, that) {\n var un = that === undefined;\n switch (args.length) {\n case 0: return un ? fn()\n : fn.call(that);\n case 1: return un ? fn(args[0])\n : fn.call(that, args[0]);\n case 2: return un ? fn(args[0], args[1])\n : fn.call(that, args[0], args[1]);\n case 3: return un ? fn(args[0], args[1], args[2])\n : fn.call(that, args[0], args[1], args[2]);\n case 4: return un ? fn(args[0], args[1], args[2], args[3])\n : fn.call(that, args[0], args[1], args[2], args[3]);\n } return fn.apply(that, args);\n};\n","var ctx = require('./_ctx');\nvar invoke = require('./_invoke');\nvar html = require('./_html');\nvar cel = require('./_dom-create');\nvar global = require('./_global');\nvar process = global.process;\nvar setTask = global.setImmediate;\nvar clearTask = global.clearImmediate;\nvar MessageChannel = global.MessageChannel;\nvar Dispatch = global.Dispatch;\nvar counter = 0;\nvar queue = {};\nvar ONREADYSTATECHANGE = 'onreadystatechange';\nvar defer, channel, port;\nvar run = function () {\n var id = +this;\n // eslint-disable-next-line no-prototype-builtins\n if (queue.hasOwnProperty(id)) {\n var fn = queue[id];\n delete queue[id];\n fn();\n }\n};\nvar listener = function (event) {\n run.call(event.data);\n};\n// Node.js 0.9+ & IE10+ has setImmediate, otherwise:\nif (!setTask || !clearTask) {\n setTask = function setImmediate(fn) {\n var args = [];\n var i = 1;\n while (arguments.length > i) args.push(arguments[i++]);\n queue[++counter] = function () {\n // eslint-disable-next-line no-new-func\n invoke(typeof fn == 'function' ? fn : Function(fn), args);\n };\n defer(counter);\n return counter;\n };\n clearTask = function clearImmediate(id) {\n delete queue[id];\n };\n // Node.js 0.8-\n if (require('./_cof')(process) == 'process') {\n defer = function (id) {\n process.nextTick(ctx(run, id, 1));\n };\n // Sphere (JS game engine) Dispatch API\n } else if (Dispatch && Dispatch.now) {\n defer = function (id) {\n Dispatch.now(ctx(run, id, 1));\n };\n // Browsers with MessageChannel, includes WebWorkers\n } else if (MessageChannel) {\n channel = new MessageChannel();\n port = channel.port2;\n channel.port1.onmessage = listener;\n defer = ctx(port.postMessage, port, 1);\n // Browsers with postMessage, skip WebWorkers\n // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'\n } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) {\n defer = function (id) {\n global.postMessage(id + '', '*');\n };\n global.addEventListener('message', listener, false);\n // IE8-\n } else if (ONREADYSTATECHANGE in cel('script')) {\n defer = function (id) {\n html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () {\n html.removeChild(this);\n run.call(id);\n };\n };\n // Rest old browsers\n } else {\n defer = function (id) {\n setTimeout(ctx(run, id, 1), 0);\n };\n }\n}\nmodule.exports = {\n set: setTask,\n clear: clearTask\n};\n","var global = require('./_global');\nvar macrotask = require('./_task').set;\nvar Observer = global.MutationObserver || global.WebKitMutationObserver;\nvar process = global.process;\nvar Promise = global.Promise;\nvar isNode = require('./_cof')(process) == 'process';\n\nmodule.exports = function () {\n var head, last, notify;\n\n var flush = function () {\n var parent, fn;\n if (isNode && (parent = process.domain)) parent.exit();\n while (head) {\n fn = head.fn;\n head = head.next;\n try {\n fn();\n } catch (e) {\n if (head) notify();\n else last = undefined;\n throw e;\n }\n } last = undefined;\n if (parent) parent.enter();\n };\n\n // Node.js\n if (isNode) {\n notify = function () {\n process.nextTick(flush);\n };\n // browsers with MutationObserver\n } else if (Observer) {\n var toggle = true;\n var node = document.createTextNode('');\n new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new\n notify = function () {\n node.data = toggle = !toggle;\n };\n // environments with maybe non-completely correct, but existent Promise\n } else if (Promise && Promise.resolve) {\n var promise = Promise.resolve();\n notify = function () {\n promise.then(flush);\n };\n // for other environments - macrotask based on:\n // - setImmediate\n // - MessageChannel\n // - window.postMessag\n // - onreadystatechange\n // - setTimeout\n } else {\n notify = function () {\n // strange IE + webpack dev server bug - use .call(global)\n macrotask.call(global, flush);\n };\n }\n\n return function (fn) {\n var task = { fn: fn, next: undefined };\n if (last) last.next = task;\n if (!head) {\n head = task;\n notify();\n } last = task;\n };\n};\n","'use strict';\n// 25.4.1.5 NewPromiseCapability(C)\nvar aFunction = require('./_a-function');\n\nfunction PromiseCapability(C) {\n var resolve, reject;\n this.promise = new C(function ($$resolve, $$reject) {\n if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');\n resolve = $$resolve;\n reject = $$reject;\n });\n this.resolve = aFunction(resolve);\n this.reject = aFunction(reject);\n}\n\nmodule.exports.f = function (C) {\n return new PromiseCapability(C);\n};\n","module.exports = function (exec) {\n try {\n return { e: false, v: exec() };\n } catch (e) {\n return { e: true, v: e };\n }\n};\n","var anObject = require('./_an-object');\nvar isObject = require('./_is-object');\nvar newPromiseCapability = require('./_new-promise-capability');\n\nmodule.exports = function (C, x) {\n anObject(C);\n if (isObject(x) && x.constructor === C) return x;\n var promiseCapability = newPromiseCapability.f(C);\n var resolve = promiseCapability.resolve;\n resolve(x);\n return promiseCapability.promise;\n};\n","var hide = require('./_hide');\nmodule.exports = function (target, src, safe) {\n for (var key in src) {\n if (safe && target[key]) target[key] = src[key];\n else hide(target, key, src[key]);\n } return target;\n};\n","'use strict';\nvar global = require('./_global');\nvar core = require('./_core');\nvar dP = require('./_object-dp');\nvar DESCRIPTORS = require('./_descriptors');\nvar SPECIES = require('./_wks')('species');\n\nmodule.exports = function (KEY) {\n var C = typeof core[KEY] == 'function' ? core[KEY] : global[KEY];\n if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, {\n configurable: true,\n get: function () { return this; }\n });\n};\n","var ITERATOR = require('./_wks')('iterator');\nvar SAFE_CLOSING = false;\n\ntry {\n var riter = [7][ITERATOR]();\n riter['return'] = function () { SAFE_CLOSING = true; };\n // eslint-disable-next-line no-throw-literal\n Array.from(riter, function () { throw 2; });\n} catch (e) { /* empty */ }\n\nmodule.exports = function (exec, skipClosing) {\n if (!skipClosing && !SAFE_CLOSING) return false;\n var safe = false;\n try {\n var arr = [7];\n var iter = arr[ITERATOR]();\n iter.next = function () { return { done: safe = true }; };\n arr[ITERATOR] = function () { return iter; };\n exec(arr);\n } catch (e) { /* empty */ }\n return safe;\n};\n","'use strict';\nvar LIBRARY = require('./_library');\nvar global = require('./_global');\nvar ctx = require('./_ctx');\nvar classof = require('./_classof');\nvar $export = require('./_export');\nvar isObject = require('./_is-object');\nvar aFunction = require('./_a-function');\nvar anInstance = require('./_an-instance');\nvar forOf = require('./_for-of');\nvar speciesConstructor = require('./_species-constructor');\nvar task = require('./_task').set;\nvar microtask = require('./_microtask')();\nvar newPromiseCapabilityModule = require('./_new-promise-capability');\nvar perform = require('./_perform');\nvar promiseResolve = require('./_promise-resolve');\nvar PROMISE = 'Promise';\nvar TypeError = global.TypeError;\nvar process = global.process;\nvar $Promise = global[PROMISE];\nvar isNode = classof(process) == 'process';\nvar empty = function () { /* empty */ };\nvar Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper;\nvar newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f;\n\nvar USE_NATIVE = !!function () {\n try {\n // correct subclassing with @@species support\n var promise = $Promise.resolve(1);\n var FakePromise = (promise.constructor = {})[require('./_wks')('species')] = function (exec) {\n exec(empty, empty);\n };\n // unhandled rejections tracking support, NodeJS Promise without it fails @@species test\n return (isNode || typeof PromiseRejectionEvent == 'function') && promise.then(empty) instanceof FakePromise;\n } catch (e) { /* empty */ }\n}();\n\n// helpers\nvar isThenable = function (it) {\n var then;\n return isObject(it) && typeof (then = it.then) == 'function' ? then : false;\n};\nvar notify = function (promise, isReject) {\n if (promise._n) return;\n promise._n = true;\n var chain = promise._c;\n microtask(function () {\n var value = promise._v;\n var ok = promise._s == 1;\n var i = 0;\n var run = function (reaction) {\n var handler = ok ? reaction.ok : reaction.fail;\n var resolve = reaction.resolve;\n var reject = reaction.reject;\n var domain = reaction.domain;\n var result, then;\n try {\n if (handler) {\n if (!ok) {\n if (promise._h == 2) onHandleUnhandled(promise);\n promise._h = 1;\n }\n if (handler === true) result = value;\n else {\n if (domain) domain.enter();\n result = handler(value);\n if (domain) domain.exit();\n }\n if (result === reaction.promise) {\n reject(TypeError('Promise-chain cycle'));\n } else if (then = isThenable(result)) {\n then.call(result, resolve, reject);\n } else resolve(result);\n } else reject(value);\n } catch (e) {\n reject(e);\n }\n };\n while (chain.length > i) run(chain[i++]); // variable length - can't use forEach\n promise._c = [];\n promise._n = false;\n if (isReject && !promise._h) onUnhandled(promise);\n });\n};\nvar onUnhandled = function (promise) {\n task.call(global, function () {\n var value = promise._v;\n var unhandled = isUnhandled(promise);\n var result, handler, console;\n if (unhandled) {\n result = perform(function () {\n if (isNode) {\n process.emit('unhandledRejection', value, promise);\n } else if (handler = global.onunhandledrejection) {\n handler({ promise: promise, reason: value });\n } else if ((console = global.console) && console.error) {\n console.error('Unhandled promise rejection', value);\n }\n });\n // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should\n promise._h = isNode || isUnhandled(promise) ? 2 : 1;\n } promise._a = undefined;\n if (unhandled && result.e) throw result.v;\n });\n};\nvar isUnhandled = function (promise) {\n if (promise._h == 1) return false;\n var chain = promise._a || promise._c;\n var i = 0;\n var reaction;\n while (chain.length > i) {\n reaction = chain[i++];\n if (reaction.fail || !isUnhandled(reaction.promise)) return false;\n } return true;\n};\nvar onHandleUnhandled = function (promise) {\n task.call(global, function () {\n var handler;\n if (isNode) {\n process.emit('rejectionHandled', promise);\n } else if (handler = global.onrejectionhandled) {\n handler({ promise: promise, reason: promise._v });\n }\n });\n};\nvar $reject = function (value) {\n var promise = this;\n if (promise._d) return;\n promise._d = true;\n promise = promise._w || promise; // unwrap\n promise._v = value;\n promise._s = 2;\n if (!promise._a) promise._a = promise._c.slice();\n notify(promise, true);\n};\nvar $resolve = function (value) {\n var promise = this;\n var then;\n if (promise._d) return;\n promise._d = true;\n promise = promise._w || promise; // unwrap\n try {\n if (promise === value) throw TypeError(\"Promise can't be resolved itself\");\n if (then = isThenable(value)) {\n microtask(function () {\n var wrapper = { _w: promise, _d: false }; // wrap\n try {\n then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1));\n } catch (e) {\n $reject.call(wrapper, e);\n }\n });\n } else {\n promise._v = value;\n promise._s = 1;\n notify(promise, false);\n }\n } catch (e) {\n $reject.call({ _w: promise, _d: false }, e); // wrap\n }\n};\n\n// constructor polyfill\nif (!USE_NATIVE) {\n // 25.4.3.1 Promise(executor)\n $Promise = function Promise(executor) {\n anInstance(this, $Promise, PROMISE, '_h');\n aFunction(executor);\n Internal.call(this);\n try {\n executor(ctx($resolve, this, 1), ctx($reject, this, 1));\n } catch (err) {\n $reject.call(this, err);\n }\n };\n // eslint-disable-next-line no-unused-vars\n Internal = function Promise(executor) {\n this._c = []; // <- awaiting reactions\n this._a = undefined; // <- checked in isUnhandled reactions\n this._s = 0; // <- state\n this._d = false; // <- done\n this._v = undefined; // <- value\n this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled\n this._n = false; // <- notify\n };\n Internal.prototype = require('./_redefine-all')($Promise.prototype, {\n // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected)\n then: function then(onFulfilled, onRejected) {\n var reaction = newPromiseCapability(speciesConstructor(this, $Promise));\n reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;\n reaction.fail = typeof onRejected == 'function' && onRejected;\n reaction.domain = isNode ? process.domain : undefined;\n this._c.push(reaction);\n if (this._a) this._a.push(reaction);\n if (this._s) notify(this, false);\n return reaction.promise;\n },\n // 25.4.5.1 Promise.prototype.catch(onRejected)\n 'catch': function (onRejected) {\n return this.then(undefined, onRejected);\n }\n });\n OwnPromiseCapability = function () {\n var promise = new Internal();\n this.promise = promise;\n this.resolve = ctx($resolve, promise, 1);\n this.reject = ctx($reject, promise, 1);\n };\n newPromiseCapabilityModule.f = newPromiseCapability = function (C) {\n return C === $Promise || C === Wrapper\n ? new OwnPromiseCapability(C)\n : newGenericPromiseCapability(C);\n };\n}\n\n$export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise });\nrequire('./_set-to-string-tag')($Promise, PROMISE);\nrequire('./_set-species')(PROMISE);\nWrapper = require('./_core')[PROMISE];\n\n// statics\n$export($export.S + $export.F * !USE_NATIVE, PROMISE, {\n // 25.4.4.5 Promise.reject(r)\n reject: function reject(r) {\n var capability = newPromiseCapability(this);\n var $$reject = capability.reject;\n $$reject(r);\n return capability.promise;\n }\n});\n$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, {\n // 25.4.4.6 Promise.resolve(x)\n resolve: function resolve(x) {\n return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x);\n }\n});\n$export($export.S + $export.F * !(USE_NATIVE && require('./_iter-detect')(function (iter) {\n $Promise.all(iter)['catch'](empty);\n})), PROMISE, {\n // 25.4.4.1 Promise.all(iterable)\n all: function all(iterable) {\n var C = this;\n var capability = newPromiseCapability(C);\n var resolve = capability.resolve;\n var reject = capability.reject;\n var result = perform(function () {\n var values = [];\n var index = 0;\n var remaining = 1;\n forOf(iterable, false, function (promise) {\n var $index = index++;\n var alreadyCalled = false;\n values.push(undefined);\n remaining++;\n C.resolve(promise).then(function (value) {\n if (alreadyCalled) return;\n alreadyCalled = true;\n values[$index] = value;\n --remaining || resolve(values);\n }, reject);\n });\n --remaining || resolve(values);\n });\n if (result.e) reject(result.v);\n return capability.promise;\n },\n // 25.4.4.4 Promise.race(iterable)\n race: function race(iterable) {\n var C = this;\n var capability = newPromiseCapability(C);\n var reject = capability.reject;\n var result = perform(function () {\n forOf(iterable, false, function (promise) {\n C.resolve(promise).then(capability.resolve, reject);\n });\n });\n if (result.e) reject(result.v);\n return capability.promise;\n }\n});\n","// https://github.com/tc39/proposal-promise-finally\n'use strict';\nvar $export = require('./_export');\nvar core = require('./_core');\nvar global = require('./_global');\nvar speciesConstructor = require('./_species-constructor');\nvar promiseResolve = require('./_promise-resolve');\n\n$export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) {\n var C = speciesConstructor(this, core.Promise || global.Promise);\n var isFunction = typeof onFinally == 'function';\n return this.then(\n isFunction ? function (x) {\n return promiseResolve(C, onFinally()).then(function () { return x; });\n } : onFinally,\n isFunction ? function (e) {\n return promiseResolve(C, onFinally()).then(function () { throw e; });\n } : onFinally\n );\n} });\n","'use strict';\n// https://github.com/tc39/proposal-promise-try\nvar $export = require('./_export');\nvar newPromiseCapability = require('./_new-promise-capability');\nvar perform = require('./_perform');\n\n$export($export.S, 'Promise', { 'try': function (callbackfn) {\n var promiseCapability = newPromiseCapability.f(this);\n var result = perform(callbackfn);\n (result.e ? promiseCapability.reject : promiseCapability.resolve)(result.v);\n return promiseCapability.promise;\n} });\n","require('../modules/es6.object.to-string');\nrequire('../modules/es6.string.iterator');\nrequire('../modules/web.dom.iterable');\nrequire('../modules/es6.promise');\nrequire('../modules/es7.promise.finally');\nrequire('../modules/es7.promise.try');\nmodule.exports = require('../modules/_core').Promise;\n","module.exports = { \"default\": require(\"core-js/library/fn/promise\"), __esModule: true };","exports.f = require('./_wks');\n","require('../../modules/es6.string.iterator');\nrequire('../../modules/web.dom.iterable');\nmodule.exports = require('../../modules/_wks-ext').f('iterator');\n","module.exports = { \"default\": require(\"core-js/library/fn/symbol/iterator\"), __esModule: true };","var META = require('./_uid')('meta');\nvar isObject = require('./_is-object');\nvar has = require('./_has');\nvar setDesc = require('./_object-dp').f;\nvar id = 0;\nvar isExtensible = Object.isExtensible || function () {\n return true;\n};\nvar FREEZE = !require('./_fails')(function () {\n return isExtensible(Object.preventExtensions({}));\n});\nvar setMeta = function (it) {\n setDesc(it, META, { value: {\n i: 'O' + ++id, // object ID\n w: {} // weak collections IDs\n } });\n};\nvar fastKey = function (it, create) {\n // return primitive with prefix\n if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;\n if (!has(it, META)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return 'F';\n // not necessary to add metadata\n if (!create) return 'E';\n // add missing metadata\n setMeta(it);\n // return object ID\n } return it[META].i;\n};\nvar getWeak = function (it, create) {\n if (!has(it, META)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return true;\n // not necessary to add metadata\n if (!create) return false;\n // add missing metadata\n setMeta(it);\n // return hash weak collections IDs\n } return it[META].w;\n};\n// add metadata on freeze-family methods calling\nvar onFreeze = function (it) {\n if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it);\n return it;\n};\nvar meta = module.exports = {\n KEY: META,\n NEED: false,\n fastKey: fastKey,\n getWeak: getWeak,\n onFreeze: onFreeze\n};\n","var global = require('./_global');\nvar core = require('./_core');\nvar LIBRARY = require('./_library');\nvar wksExt = require('./_wks-ext');\nvar defineProperty = require('./_object-dp').f;\nmodule.exports = function (name) {\n var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});\n if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) });\n};\n","exports.f = Object.getOwnPropertySymbols;\n","exports.f = {}.propertyIsEnumerable;\n","// all enumerable object keys, includes symbols\nvar getKeys = require('./_object-keys');\nvar gOPS = require('./_object-gops');\nvar pIE = require('./_object-pie');\nmodule.exports = function (it) {\n var result = getKeys(it);\n var getSymbols = gOPS.f;\n if (getSymbols) {\n var symbols = getSymbols(it);\n var isEnum = pIE.f;\n var i = 0;\n var key;\n while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key);\n } return result;\n};\n","// 7.2.2 IsArray(argument)\nvar cof = require('./_cof');\nmodule.exports = Array.isArray || function isArray(arg) {\n return cof(arg) == 'Array';\n};\n","// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)\nvar $keys = require('./_object-keys-internal');\nvar hiddenKeys = require('./_enum-bug-keys').concat('length', 'prototype');\n\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return $keys(O, hiddenKeys);\n};\n","// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window\nvar toIObject = require('./_to-iobject');\nvar gOPN = require('./_object-gopn').f;\nvar toString = {}.toString;\n\nvar windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames\n ? Object.getOwnPropertyNames(window) : [];\n\nvar getWindowNames = function (it) {\n try {\n return gOPN(it);\n } catch (e) {\n return windowNames.slice();\n }\n};\n\nmodule.exports.f = function getOwnPropertyNames(it) {\n return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));\n};\n","var pIE = require('./_object-pie');\nvar createDesc = require('./_property-desc');\nvar toIObject = require('./_to-iobject');\nvar toPrimitive = require('./_to-primitive');\nvar has = require('./_has');\nvar IE8_DOM_DEFINE = require('./_ie8-dom-define');\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nexports.f = require('./_descriptors') ? gOPD : function getOwnPropertyDescriptor(O, P) {\n O = toIObject(O);\n P = toPrimitive(P, true);\n if (IE8_DOM_DEFINE) try {\n return gOPD(O, P);\n } catch (e) { /* empty */ }\n if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);\n};\n","'use strict';\n// ECMAScript 6 symbols shim\nvar global = require('./_global');\nvar has = require('./_has');\nvar DESCRIPTORS = require('./_descriptors');\nvar $export = require('./_export');\nvar redefine = require('./_redefine');\nvar META = require('./_meta').KEY;\nvar $fails = require('./_fails');\nvar shared = require('./_shared');\nvar setToStringTag = require('./_set-to-string-tag');\nvar uid = require('./_uid');\nvar wks = require('./_wks');\nvar wksExt = require('./_wks-ext');\nvar wksDefine = require('./_wks-define');\nvar enumKeys = require('./_enum-keys');\nvar isArray = require('./_is-array');\nvar anObject = require('./_an-object');\nvar toIObject = require('./_to-iobject');\nvar toPrimitive = require('./_to-primitive');\nvar createDesc = require('./_property-desc');\nvar _create = require('./_object-create');\nvar gOPNExt = require('./_object-gopn-ext');\nvar $GOPD = require('./_object-gopd');\nvar $DP = require('./_object-dp');\nvar $keys = require('./_object-keys');\nvar gOPD = $GOPD.f;\nvar dP = $DP.f;\nvar gOPN = gOPNExt.f;\nvar $Symbol = global.Symbol;\nvar $JSON = global.JSON;\nvar _stringify = $JSON && $JSON.stringify;\nvar PROTOTYPE = 'prototype';\nvar HIDDEN = wks('_hidden');\nvar TO_PRIMITIVE = wks('toPrimitive');\nvar isEnum = {}.propertyIsEnumerable;\nvar SymbolRegistry = shared('symbol-registry');\nvar AllSymbols = shared('symbols');\nvar OPSymbols = shared('op-symbols');\nvar ObjectProto = Object[PROTOTYPE];\nvar USE_NATIVE = typeof $Symbol == 'function';\nvar QObject = global.QObject;\n// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173\nvar setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;\n\n// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687\nvar setSymbolDesc = DESCRIPTORS && $fails(function () {\n return _create(dP({}, 'a', {\n get: function () { return dP(this, 'a', { value: 7 }).a; }\n })).a != 7;\n}) ? function (it, key, D) {\n var protoDesc = gOPD(ObjectProto, key);\n if (protoDesc) delete ObjectProto[key];\n dP(it, key, D);\n if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc);\n} : dP;\n\nvar wrap = function (tag) {\n var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);\n sym._k = tag;\n return sym;\n};\n\nvar isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) {\n return typeof it == 'symbol';\n} : function (it) {\n return it instanceof $Symbol;\n};\n\nvar $defineProperty = function defineProperty(it, key, D) {\n if (it === ObjectProto) $defineProperty(OPSymbols, key, D);\n anObject(it);\n key = toPrimitive(key, true);\n anObject(D);\n if (has(AllSymbols, key)) {\n if (!D.enumerable) {\n if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {}));\n it[HIDDEN][key] = true;\n } else {\n if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false;\n D = _create(D, { enumerable: createDesc(0, false) });\n } return setSymbolDesc(it, key, D);\n } return dP(it, key, D);\n};\nvar $defineProperties = function defineProperties(it, P) {\n anObject(it);\n var keys = enumKeys(P = toIObject(P));\n var i = 0;\n var l = keys.length;\n var key;\n while (l > i) $defineProperty(it, key = keys[i++], P[key]);\n return it;\n};\nvar $create = function create(it, P) {\n return P === undefined ? _create(it) : $defineProperties(_create(it), P);\n};\nvar $propertyIsEnumerable = function propertyIsEnumerable(key) {\n var E = isEnum.call(this, key = toPrimitive(key, true));\n if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false;\n return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;\n};\nvar $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) {\n it = toIObject(it);\n key = toPrimitive(key, true);\n if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return;\n var D = gOPD(it, key);\n if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true;\n return D;\n};\nvar $getOwnPropertyNames = function getOwnPropertyNames(it) {\n var names = gOPN(toIObject(it));\n var result = [];\n var i = 0;\n var key;\n while (names.length > i) {\n if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key);\n } return result;\n};\nvar $getOwnPropertySymbols = function getOwnPropertySymbols(it) {\n var IS_OP = it === ObjectProto;\n var names = gOPN(IS_OP ? OPSymbols : toIObject(it));\n var result = [];\n var i = 0;\n var key;\n while (names.length > i) {\n if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]);\n } return result;\n};\n\n// 19.4.1.1 Symbol([description])\nif (!USE_NATIVE) {\n $Symbol = function Symbol() {\n if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!');\n var tag = uid(arguments.length > 0 ? arguments[0] : undefined);\n var $set = function (value) {\n if (this === ObjectProto) $set.call(OPSymbols, value);\n if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;\n setSymbolDesc(this, tag, createDesc(1, value));\n };\n if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set });\n return wrap(tag);\n };\n redefine($Symbol[PROTOTYPE], 'toString', function toString() {\n return this._k;\n });\n\n $GOPD.f = $getOwnPropertyDescriptor;\n $DP.f = $defineProperty;\n require('./_object-gopn').f = gOPNExt.f = $getOwnPropertyNames;\n require('./_object-pie').f = $propertyIsEnumerable;\n require('./_object-gops').f = $getOwnPropertySymbols;\n\n if (DESCRIPTORS && !require('./_library')) {\n redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);\n }\n\n wksExt.f = function (name) {\n return wrap(wks(name));\n };\n}\n\n$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol });\n\nfor (var es6Symbols = (\n // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14\n 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'\n).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]);\n\nfor (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]);\n\n$export($export.S + $export.F * !USE_NATIVE, 'Symbol', {\n // 19.4.2.1 Symbol.for(key)\n 'for': function (key) {\n return has(SymbolRegistry, key += '')\n ? SymbolRegistry[key]\n : SymbolRegistry[key] = $Symbol(key);\n },\n // 19.4.2.5 Symbol.keyFor(sym)\n keyFor: function keyFor(sym) {\n if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!');\n for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key;\n },\n useSetter: function () { setter = true; },\n useSimple: function () { setter = false; }\n});\n\n$export($export.S + $export.F * !USE_NATIVE, 'Object', {\n // 19.1.2.2 Object.create(O [, Properties])\n create: $create,\n // 19.1.2.4 Object.defineProperty(O, P, Attributes)\n defineProperty: $defineProperty,\n // 19.1.2.3 Object.defineProperties(O, Properties)\n defineProperties: $defineProperties,\n // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)\n getOwnPropertyDescriptor: $getOwnPropertyDescriptor,\n // 19.1.2.7 Object.getOwnPropertyNames(O)\n getOwnPropertyNames: $getOwnPropertyNames,\n // 19.1.2.8 Object.getOwnPropertySymbols(O)\n getOwnPropertySymbols: $getOwnPropertySymbols\n});\n\n// 24.3.2 JSON.stringify(value [, replacer [, space]])\n$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () {\n var S = $Symbol();\n // MS Edge converts symbol values to JSON as {}\n // WebKit converts symbol values to JSON as null\n // V8 throws on boxed symbols\n return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}';\n})), 'JSON', {\n stringify: function stringify(it) {\n if (it === undefined || isSymbol(it)) return; // IE8 returns string on undefined\n var args = [it];\n var i = 1;\n var replacer, $replacer;\n while (arguments.length > i) args.push(arguments[i++]);\n replacer = args[1];\n if (typeof replacer == 'function') $replacer = replacer;\n if ($replacer || !isArray(replacer)) replacer = function (key, value) {\n if ($replacer) value = $replacer.call(this, key, value);\n if (!isSymbol(value)) return value;\n };\n args[1] = replacer;\n return _stringify.apply($JSON, args);\n }\n});\n\n// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)\n$Symbol[PROTOTYPE][TO_PRIMITIVE] || require('./_hide')($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);\n// 19.4.3.5 Symbol.prototype[@@toStringTag]\nsetToStringTag($Symbol, 'Symbol');\n// 20.2.1.9 Math[@@toStringTag]\nsetToStringTag(Math, 'Math', true);\n// 24.3.3 JSON[@@toStringTag]\nsetToStringTag(global.JSON, 'JSON', true);\n","require('./_wks-define')('asyncIterator');\n","require('./_wks-define')('observable');\n","require('../../modules/es6.symbol');\nrequire('../../modules/es6.object.to-string');\nrequire('../../modules/es7.symbol.async-iterator');\nrequire('../../modules/es7.symbol.observable');\nmodule.exports = require('../../modules/_core').Symbol;\n","module.exports = { \"default\": require(\"core-js/library/fn/symbol\"), __esModule: true };","\"use strict\";\n\nexports.__esModule = true;\n\nvar _iterator = require(\"../core-js/symbol/iterator\");\n\nvar _iterator2 = _interopRequireDefault(_iterator);\n\nvar _symbol = require(\"../core-js/symbol\");\n\nvar _symbol2 = _interopRequireDefault(_symbol);\n\nvar _typeof = typeof _symbol2.default === \"function\" && typeof _iterator2.default === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === \"function\" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? \"symbol\" : typeof obj; };\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = typeof _symbol2.default === \"function\" && _typeof(_iterator2.default) === \"symbol\" ? function (obj) {\n return typeof obj === \"undefined\" ? \"undefined\" : _typeof(obj);\n} : function (obj) {\n return obj && typeof _symbol2.default === \"function\" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? \"symbol\" : typeof obj === \"undefined\" ? \"undefined\" : _typeof(obj);\n};","\"use strict\";\n\nexports.__esModule = true;\n\nexports.default = function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n};","class Storage {\n getItem(key) {\n return wx.getStorageSync(key);\n }\n\n setItem(key, value) {\n return wx.setStorageSync(key, value);\n }\n\n removeItem(key) {\n return this.setItem(key, '');\n }\n\n clear() {\n return wx.clearStorageSync();\n }\n}\n\nmodule.exports = new Storage();\n","var $export = require('./_export');\n// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)\n$export($export.S + $export.F * !require('./_descriptors'), 'Object', { defineProperty: require('./_object-dp').f });\n","require('../../modules/es6.object.define-property');\nvar $Object = require('../../modules/_core').Object;\nmodule.exports = function defineProperty(it, key, desc) {\n return $Object.defineProperty(it, key, desc);\n};\n","module.exports = { \"default\": require(\"core-js/library/fn/object/define-property\"), __esModule: true };","\"use strict\";\n\nexports.__esModule = true;\n\nvar _defineProperty = require(\"../core-js/object/define-property\");\n\nvar _defineProperty2 = _interopRequireDefault(_defineProperty);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function (obj, key, value) {\n if (key in obj) {\n (0, _defineProperty2.default)(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n};","\"use strict\";\n\nexports.__esModule = true;\n\nvar _typeof2 = require(\"../helpers/typeof\");\n\nvar _typeof3 = _interopRequireDefault(_typeof2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function (self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return call && ((typeof call === \"undefined\" ? \"undefined\" : (0, _typeof3.default)(call)) === \"object\" || typeof call === \"function\") ? call : self;\n};","// Works with __proto__ only. Old v8 can't work with null proto objects.\n/* eslint-disable no-proto */\nvar isObject = require('./_is-object');\nvar anObject = require('./_an-object');\nvar check = function (O, proto) {\n anObject(O);\n if (!isObject(proto) && proto !== null) throw TypeError(proto + \": can't set as prototype!\");\n};\nmodule.exports = {\n set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line\n function (test, buggy, set) {\n try {\n set = require('./_ctx')(Function.call, require('./_object-gopd').f(Object.prototype, '__proto__').set, 2);\n set(test, []);\n buggy = !(test instanceof Array);\n } catch (e) { buggy = true; }\n return function setPrototypeOf(O, proto) {\n check(O, proto);\n if (buggy) O.__proto__ = proto;\n else set(O, proto);\n return O;\n };\n }({}, false) : undefined),\n check: check\n};\n","// 19.1.3.19 Object.setPrototypeOf(O, proto)\nvar $export = require('./_export');\n$export($export.S, 'Object', { setPrototypeOf: require('./_set-proto').set });\n","require('../../modules/es6.object.set-prototype-of');\nmodule.exports = require('../../modules/_core').Object.setPrototypeOf;\n","module.exports = { \"default\": require(\"core-js/library/fn/object/set-prototype-of\"), __esModule: true };","var $export = require('./_export');\n// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\n$export($export.S, 'Object', { create: require('./_object-create') });\n","require('../../modules/es6.object.create');\nvar $Object = require('../../modules/_core').Object;\nmodule.exports = function create(P, D) {\n return $Object.create(P, D);\n};\n","module.exports = { \"default\": require(\"core-js/library/fn/object/create\"), __esModule: true };","\"use strict\";\n\nexports.__esModule = true;\n\nvar _setPrototypeOf = require(\"../core-js/object/set-prototype-of\");\n\nvar _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf);\n\nvar _create = require(\"../core-js/object/create\");\n\nvar _create2 = _interopRequireDefault(_create);\n\nvar _typeof2 = require(\"../helpers/typeof\");\n\nvar _typeof3 = _interopRequireDefault(_typeof2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function (subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + (typeof superClass === \"undefined\" ? \"undefined\" : (0, _typeof3.default)(superClass)));\n }\n\n subClass.prototype = (0, _create2.default)(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf2.default ? (0, _setPrototypeOf2.default)(subClass, superClass) : subClass.__proto__ = superClass;\n};","var core = require('../../modules/_core');\nvar $JSON = core.JSON || (core.JSON = { stringify: JSON.stringify });\nmodule.exports = function stringify(it) { // eslint-disable-line no-unused-vars\n return $JSON.stringify.apply($JSON, arguments);\n};\n","module.exports = { \"default\": require(\"core-js/library/fn/json/stringify\"), __esModule: true };","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n","/**\n * @author Toru Nagashima\n * @copyright 2015 Toru Nagashima. All rights reserved.\n * See LICENSE file in root directory for full license.\n */\n\n\"use strict\";\n\n/**\n * Creates a unique key.\n *\n * @param {string} name - A name to create.\n * @returns {symbol|string}\n * @private\n */\nvar createUniqueKey = exports.createUniqueKey = (typeof Symbol !== \"undefined\" ?\n Symbol :\n function createUniqueKey(name) {\n return \"[[\" + name + \"_\" + Math.random().toFixed(8).slice(2) + \"]]\";\n });\n\n/**\n * The key of listeners.\n *\n * @type {symbol|string}\n * @private\n */\nexports.LISTENERS = createUniqueKey(\"listeners\");\n\n/**\n * A value of kind for listeners which are registered in the capturing phase.\n *\n * @type {number}\n * @private\n */\nexports.CAPTURE = 1;\n\n/**\n * A value of kind for listeners which are registered in the bubbling phase.\n *\n * @type {number}\n * @private\n */\nexports.BUBBLE = 2;\n\n/**\n * A value of kind for listeners which are registered as an attribute.\n *\n * @type {number}\n * @private\n */\nexports.ATTRIBUTE = 3;\n\n/**\n * @typedef object ListenerNode\n * @property {function} listener - A listener function.\n * @property {number} kind - The kind of the listener.\n * @property {ListenerNode|null} next - The next node.\n * If this node is the last, this is `null`.\n */\n\n/**\n * Creates a node of singly linked list for a list of listeners.\n *\n * @param {function} listener - A listener function.\n * @param {number} kind - The kind of the listener.\n * @returns {ListenerNode} The created listener node.\n */\nexports.newNode = function newNode(listener, kind) {\n return {listener: listener, kind: kind, next: null};\n};\n","/**\n * @author Toru Nagashima\n * @copyright 2015 Toru Nagashima. All rights reserved.\n * See LICENSE file in root directory for full license.\n */\n\n\"use strict\";\n\n//-----------------------------------------------------------------------------\n// Requirements\n//-----------------------------------------------------------------------------\n\nvar Commons = require(\"./commons\");\nvar LISTENERS = Commons.LISTENERS;\nvar ATTRIBUTE = Commons.ATTRIBUTE;\nvar newNode = Commons.newNode;\n\n//-----------------------------------------------------------------------------\n// Helpers\n//-----------------------------------------------------------------------------\n\n/**\n * Gets a specified attribute listener from a given EventTarget object.\n *\n * @param {EventTarget} eventTarget - An EventTarget object to get.\n * @param {string} type - An event type to get.\n * @returns {function|null} The found attribute listener.\n */\nfunction getAttributeListener(eventTarget, type) {\n var node = eventTarget[LISTENERS][type];\n while (node != null) {\n if (node.kind === ATTRIBUTE) {\n return node.listener;\n }\n node = node.next;\n }\n return null;\n}\n\n/**\n * Sets a specified attribute listener to a given EventTarget object.\n *\n * @param {EventTarget} eventTarget - An EventTarget object to set.\n * @param {string} type - An event type to set.\n * @param {function|null} listener - A listener to be set.\n * @returns {void}\n */\nfunction setAttributeListener(eventTarget, type, listener) {\n if (typeof listener !== \"function\" && typeof listener !== \"object\") {\n listener = null; // eslint-disable-line no-param-reassign\n }\n\n var prev = null;\n var node = eventTarget[LISTENERS][type];\n while (node != null) {\n if (node.kind === ATTRIBUTE) {\n // Remove old value.\n if (prev == null) {\n eventTarget[LISTENERS][type] = node.next;\n }\n else {\n prev.next = node.next;\n }\n }\n else {\n prev = node;\n }\n\n node = node.next;\n }\n\n // Add new value.\n if (listener != null) {\n if (prev == null) {\n eventTarget[LISTENERS][type] = newNode(listener, ATTRIBUTE);\n }\n else {\n prev.next = newNode(listener, ATTRIBUTE);\n }\n }\n}\n\n//-----------------------------------------------------------------------------\n// Public Interface\n//-----------------------------------------------------------------------------\n\n/**\n * Defines an `EventTarget` implementation which has `onfoobar` attributes.\n *\n * @param {EventTarget} EventTargetBase - A base implementation of EventTarget.\n * @param {string[]} types - A list of event types which are defined as attribute listeners.\n * @returns {EventTarget} The defined `EventTarget` implementation which has attribute listeners.\n */\nexports.defineCustomEventTarget = function(EventTargetBase, types) {\n function EventTarget() {\n EventTargetBase.call(this);\n }\n\n var descripter = {\n constructor: {\n value: EventTarget,\n configurable: true,\n writable: true\n }\n };\n\n types.forEach(function(type) {\n descripter[\"on\" + type] = {\n get: function() { return getAttributeListener(this, type); },\n set: function(listener) { setAttributeListener(this, type, listener); },\n configurable: true,\n enumerable: true\n };\n });\n\n EventTarget.prototype = Object.create(EventTargetBase.prototype, descripter);\n\n return EventTarget;\n};\n","/**\n * @author Toru Nagashima\n * @copyright 2015 Toru Nagashima. All rights reserved.\n * See LICENSE file in root directory for full license.\n */\n\n\"use strict\";\n\n//-----------------------------------------------------------------------------\n// Requirements\n//-----------------------------------------------------------------------------\n\nvar createUniqueKey = require(\"./commons\").createUniqueKey;\n\n//-----------------------------------------------------------------------------\n// Constsnts\n//-----------------------------------------------------------------------------\n\n/**\n * The key of the flag which is turned on by `stopImmediatePropagation` method.\n *\n * @type {symbol|string}\n * @private\n */\nvar STOP_IMMEDIATE_PROPAGATION_FLAG =\n createUniqueKey(\"stop_immediate_propagation_flag\");\n\n/**\n * The key of the flag which is turned on by `preventDefault` method.\n *\n * @type {symbol|string}\n * @private\n */\nvar CANCELED_FLAG = createUniqueKey(\"canceled_flag\");\n\n/**\n * The key of the original event object.\n *\n * @type {symbol|string}\n * @private\n */\nvar ORIGINAL_EVENT = createUniqueKey(\"original_event\");\n\n/**\n * Method definitions for the event wrapper.\n *\n * @type {object}\n * @private\n */\nvar wrapperPrototypeDefinition = Object.freeze({\n stopPropagation: Object.freeze({\n value: function stopPropagation() {\n var e = this[ORIGINAL_EVENT];\n if (typeof e.stopPropagation === \"function\") {\n e.stopPropagation();\n }\n },\n writable: true,\n configurable: true\n }),\n\n stopImmediatePropagation: Object.freeze({\n value: function stopImmediatePropagation() {\n this[STOP_IMMEDIATE_PROPAGATION_FLAG] = true;\n\n var e = this[ORIGINAL_EVENT];\n if (typeof e.stopImmediatePropagation === \"function\") {\n e.stopImmediatePropagation();\n }\n },\n writable: true,\n configurable: true\n }),\n\n preventDefault: Object.freeze({\n value: function preventDefault() {\n if (this.cancelable === true) {\n this[CANCELED_FLAG] = true;\n }\n\n var e = this[ORIGINAL_EVENT];\n if (typeof e.preventDefault === \"function\") {\n e.preventDefault();\n }\n },\n writable: true,\n configurable: true\n }),\n\n defaultPrevented: Object.freeze({\n get: function defaultPrevented() { return this[CANCELED_FLAG]; },\n enumerable: true,\n configurable: true\n })\n});\n\n//-----------------------------------------------------------------------------\n// Public Interface\n//-----------------------------------------------------------------------------\n\nexports.STOP_IMMEDIATE_PROPAGATION_FLAG = STOP_IMMEDIATE_PROPAGATION_FLAG;\n\n/**\n * Creates an event wrapper.\n *\n * We cannot modify several properties of `Event` object, so we need to create the wrapper.\n * Plus, this wrapper supports non `Event` objects.\n *\n * @param {Event|{type: string}} event - An original event to create the wrapper.\n * @param {EventTarget} eventTarget - The event target of the event.\n * @returns {Event} The created wrapper. This object is implemented `Event` interface.\n * @private\n */\nexports.createEventWrapper = function createEventWrapper(event, eventTarget) {\n var timeStamp = (\n typeof event.timeStamp === \"number\" ? event.timeStamp : Date.now()\n );\n var propertyDefinition = {\n type: {value: event.type, enumerable: true},\n target: {value: eventTarget, enumerable: true},\n currentTarget: {value: eventTarget, enumerable: true},\n eventPhase: {value: 2, enumerable: true},\n bubbles: {value: Boolean(event.bubbles), enumerable: true},\n cancelable: {value: Boolean(event.cancelable), enumerable: true},\n timeStamp: {value: timeStamp, enumerable: true},\n isTrusted: {value: false, enumerable: true}\n };\n propertyDefinition[STOP_IMMEDIATE_PROPAGATION_FLAG] = {value: false, writable: true};\n propertyDefinition[CANCELED_FLAG] = {value: false, writable: true};\n propertyDefinition[ORIGINAL_EVENT] = {value: event};\n\n // For CustomEvent.\n if (typeof event.detail !== \"undefined\") {\n propertyDefinition.detail = {value: event.detail, enumerable: true};\n }\n\n return Object.create(\n Object.create(event, wrapperPrototypeDefinition),\n propertyDefinition\n );\n};\n","/**\n * @author Toru Nagashima\n * @copyright 2015 Toru Nagashima. All rights reserved.\n * See LICENSE file in root directory for full license.\n */\n\n\"use strict\";\n\n//-----------------------------------------------------------------------------\n// Requirements\n//-----------------------------------------------------------------------------\n\nvar Commons = require(\"./commons\");\nvar CustomEventTarget = require(\"./custom-event-target\");\nvar EventWrapper = require(\"./event-wrapper\");\nvar LISTENERS = Commons.LISTENERS;\nvar CAPTURE = Commons.CAPTURE;\nvar BUBBLE = Commons.BUBBLE;\nvar ATTRIBUTE = Commons.ATTRIBUTE;\nvar newNode = Commons.newNode;\nvar defineCustomEventTarget = CustomEventTarget.defineCustomEventTarget;\nvar createEventWrapper = EventWrapper.createEventWrapper;\nvar STOP_IMMEDIATE_PROPAGATION_FLAG =\n EventWrapper.STOP_IMMEDIATE_PROPAGATION_FLAG;\n\n//-----------------------------------------------------------------------------\n// Constants\n//-----------------------------------------------------------------------------\n\n/**\n * A flag which shows there is the native `EventTarget` interface object.\n *\n * @type {boolean}\n * @private\n */\nvar HAS_EVENTTARGET_INTERFACE = (\n typeof window !== \"undefined\" &&\n typeof window.EventTarget !== \"undefined\"\n);\n\n//-----------------------------------------------------------------------------\n// Public Interface\n//-----------------------------------------------------------------------------\n\n/**\n * An implementation for `EventTarget` interface.\n *\n * @constructor\n * @public\n */\nvar EventTarget = module.exports = function EventTarget() {\n if (this instanceof EventTarget) {\n // this[LISTENERS] is a Map.\n // Its key is event type.\n // Its value is ListenerNode object or null.\n //\n // interface ListenerNode {\n // var listener: Function\n // var kind: CAPTURE|BUBBLE|ATTRIBUTE\n // var next: ListenerNode|null\n // }\n Object.defineProperty(this, LISTENERS, {value: Object.create(null)});\n }\n else if (arguments.length === 1 && Array.isArray(arguments[0])) {\n return defineCustomEventTarget(EventTarget, arguments[0]);\n }\n else if (arguments.length > 0) {\n var types = Array(arguments.length);\n for (var i = 0; i < arguments.length; ++i) {\n types[i] = arguments[i];\n }\n\n // To use to extend with attribute listener properties.\n // e.g.\n // class MyCustomObject extends EventTarget(\"message\", \"error\") {\n // //...\n // }\n return defineCustomEventTarget(EventTarget, types);\n }\n else {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n};\n\nEventTarget.prototype = Object.create(\n (HAS_EVENTTARGET_INTERFACE ? window.EventTarget : Object).prototype,\n {\n constructor: {\n value: EventTarget,\n writable: true,\n configurable: true\n },\n\n addEventListener: {\n value: function addEventListener(type, listener, capture) {\n if (listener == null) {\n return false;\n }\n if (typeof listener !== \"function\" && typeof listener !== \"object\") {\n throw new TypeError(\"\\\"listener\\\" is not an object.\");\n }\n\n var kind = (capture ? CAPTURE : BUBBLE);\n var node = this[LISTENERS][type];\n if (node == null) {\n this[LISTENERS][type] = newNode(listener, kind);\n return true;\n }\n\n var prev = null;\n while (node != null) {\n if (node.listener === listener && node.kind === kind) {\n // Should ignore a duplicated listener.\n return false;\n }\n prev = node;\n node = node.next;\n }\n\n prev.next = newNode(listener, kind);\n return true;\n },\n configurable: true,\n writable: true\n },\n\n removeEventListener: {\n value: function removeEventListener(type, listener, capture) {\n if (listener == null) {\n return false;\n }\n\n var kind = (capture ? CAPTURE : BUBBLE);\n var prev = null;\n var node = this[LISTENERS][type];\n while (node != null) {\n if (node.listener === listener && node.kind === kind) {\n if (prev == null) {\n this[LISTENERS][type] = node.next;\n }\n else {\n prev.next = node.next;\n }\n return true;\n }\n\n prev = node;\n node = node.next;\n }\n\n return false;\n },\n configurable: true,\n writable: true\n },\n\n dispatchEvent: {\n value: function dispatchEvent(event) {\n // If listeners aren't registered, terminate.\n var node = this[LISTENERS][event.type];\n if (node == null) {\n return true;\n }\n\n // Since we cannot rewrite several properties, so wrap object.\n var wrapped = createEventWrapper(event, this);\n\n // This doesn't process capturing phase and bubbling phase.\n // This isn't participating in a tree.\n while (node != null) {\n if (typeof node.listener === \"function\") {\n node.listener.call(this, wrapped);\n }\n else if (node.kind !== ATTRIBUTE && typeof node.listener.handleEvent === \"function\") {\n node.listener.handleEvent(wrapped);\n }\n\n if (wrapped[STOP_IMMEDIATE_PROPAGATION_FLAG]) {\n break;\n }\n node = node.next;\n }\n\n return !wrapped.defaultPrevented;\n },\n configurable: true,\n writable: true\n }\n }\n);\n","class FormData {\n constructor() {\n this._entries = [];\n }\n\n append(name, value) {\n if (typeof name !== 'string') {\n throw new TypeError('FormData name must be a string');\n }\n if (typeof value !== 'string') {\n if (typeof value !== 'object' || typeof value.uri !== 'string') {\n throw new TypeError('FormData value must be a string or { uri: tempFilePath }')\n }\n }\n this._entries.push([name, value]);\n }\n\n set(name, value) {\n const entry = this.get(name);\n if (entry) {\n entry[1] = value;\n } else {\n this.append(name, value);\n }\n }\n\n delete(name) {\n this._entries = this._entries.filter(entry => entry[0] !== name);\n }\n\n entries() {\n return this._entries;\n }\n\n get(name) {\n return this._entries.find(entry => entry[0] === name);\n }\n\n getAll(name) {\n return this._entries.filter(entry => entry[0] === name);\n }\n\n has(name) {\n return this._entries.some(entry => entry[0] === name);\n }\n\n keys() {\n return this._entries.map(entry => entry[0]);\n }\n\n values() {\n return this._entries.map(entry => entry[1]);\n }\n}\n\nmodule.exports = FormData;\n","const assign = require('object-assign');\nconst EventTarget = require('event-target-shim');\nconst FormData = require('./formdata.js');\n\nconst UNSENT = 0;\nconst OPENED = 1;\nconst HEADERS_RECEIVED = 2;\nconst LOADING = 3;\nconst DONE = 4;\n\nconst REQUEST_EVENTS = [\n 'abort',\n 'error',\n 'load',\n 'loadstart',\n 'progress',\n 'timeout',\n 'loadend',\n 'readystatechange'\n];\n\nfunction successCallback(response) {\n this.status = response.statusCode;\n this.statusText = response.statusCode;\n let text = response.data;\n if (typeof text !== 'string') {\n text = JSON.stringify(text);\n }\n this.responseText = this.response = text;\n this.readyState = DONE;\n this.dispatchEvent({ type: 'readystatechange' });\n}\n\nclass XMLHttpRequest extends EventTarget(REQUEST_EVENTS) {\n\n constructor() {\n super();\n this.readyState = UNSENT;\n this._headers = {};\n }\n\n abort() {\n throw new Error('not supported in weapp');\n }\n getAllResponseHeaders() {\n console.warn('getAllResponseHeaders always returns \\'\\'');\n return '';\n }\n getResponseHeader(key) {\n if (key === 'content-type') {\n console.warn('get content-type always returns \\'application/json\\'');\n return 'application/json';\n }\n console.warn('getResponseHeader always returns \\'\\'');\n return '';\n }\n overrideMimeType() {\n throw new Error('not supported in weapp');\n }\n open(method, url, async = true) {\n if (this.readyState !== UNSENT) {\n throw new Error('request is already opened');\n }\n if (!async) {\n throw new Error('sync request is not supported');\n }\n this._method = method;\n this._url = url;\n this.readyState = OPENED;\n this.dispatchEvent({ type: 'readystatechange' });\n }\n setRequestHeader(header, value) {\n if (this.readyState !== OPENED) {\n throw new Error('request is not opened');\n }\n this._headers[header.toLowerCase()] = value;\n }\n send(data) {\n if (this.readyState !== OPENED) {\n throw new Error('request is not opened');\n }\n if (data instanceof FormData) {\n const entries = data.entries();\n const blobs = entries.filter(entry => typeof entry[1] !== 'string');\n if (blobs.length === 0) {\n throw new Error('Must specify a Blob field in FormData');\n }\n if (blobs.length > 1) {\n console.warn('Only the first Blob will be send in Weapp');\n }\n const restData = entries\n .filter(entry => typeof entry[1] === 'string')\n .reduce((result, entry) => assign(result, { [entry[0]]: entry[1] }), {});\n wx.uploadFile({\n url: this._url,\n name: blobs[0][0],\n filePath: blobs[0][1].uri,\n formData: restData,\n header: this._headers,\n success: successCallback.bind(this),\n fail: (error) => {\n this.status = 0;\n this.readyState = DONE;\n this.dispatchEvent({ type: 'readystatechange' });\n this.dispatchEvent({ type: 'error' });\n }\n })\n } else {\n wx.request({\n url: this._url,\n data: data || '',\n // method 的 value 居然必须为大写\n method: this._method.toUpperCase(),\n header: this._headers,\n success: successCallback.bind(this),\n fail: (error) => {\n this.status = 0;\n this.readyState = DONE;\n this.dispatchEvent({ type: 'readystatechange' });\n this.dispatchEvent({ type: 'error' });\n }\n });\n }\n }\n}\n\nassign(XMLHttpRequest, {\n UNSENT,\n OPENED,\n HEADERS_RECEIVED,\n LOADING,\n DONE,\n});\n\nmodule.exports = XMLHttpRequest;\n","\"use strict\";\n\nexports.__esModule = true;\n\nvar _defineProperty = require(\"../core-js/object/define-property\");\n\nvar _defineProperty2 = _interopRequireDefault(_defineProperty);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n (0, _defineProperty2.default)(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();","const assign = require('object-assign');\nconst EventTarget = require('event-target-shim');\n\nconst CONNECTING = 0;\nconst OPEN = 1;\nconst CLOSING = 2;\nconst CLOSED = 3;\n\nconst EVENTS = [\n 'open',\n 'error',\n 'message',\n 'close',\n];\n\nlet instance;\n\nfunction errorHandler(event) {\n // 安卓小程序会诡异地触发 onSocketError 回调\n // 通过比较 message 过滤掉\n if (event.message === \"\") return;\n if (instance) {\n instance._readyState = CLOSED;\n instance.dispatchEvent({\n type: 'error',\n message: event.errMsg,\n });\n }\n}\n\nclass WebSocket extends EventTarget(EVENTS) {\n constructor(url, protocal) {\n if (!url) {\n throw new TypeError('Failed to construct \\'WebSocket\\': url required');\n }\n if (protocal) {\n throw new Error('subprotocal not supported in weapp');\n }\n super();\n this._url = url;\n this._protocal = ''; // default value according to specs\n this._readyState = CONNECTING;\n if (instance) {\n instance.dispatchEvent({\n type: 'close'\n });\n }\n instance = this;\n \n wx.onSocketOpen(function (event) {\n if (instance) {\n instance._readyState = OPEN;\n instance.dispatchEvent({\n type: 'open'\n });\n }\n });\n wx.onSocketError(errorHandler);\n wx.onSocketMessage(function (event) {\n if (instance) {\n var {\n data,\n origin,\n ports,\n source,\n } = event;\n instance.dispatchEvent({\n data,\n origin,\n ports,\n source,\n type: 'message',\n });\n }\n });\n wx.onSocketClose(function (event) {\n if (instance) {\n instance._readyState = CLOSED;\n var {\n code,\n reason,\n wasClean,\n } = event;\n instance.dispatchEvent({\n code,\n reason,\n wasClean,\n type: 'close',\n });\n instance = null;\n }\n });\n \n wx.connectSocket({\n url,\n fail: (error) => setTimeout(() => errorHandler(error), 0),\n });\n }\n\n get url() {\n return this._url;\n }\n get protocal() {\n return this._protocal;\n }\n get readyState() {\n return this._readyState;\n }\n\n close() {\n if (this.readyState === CONNECTING) {\n console.warn('close WebSocket which is connecting might not work');\n }\n wx.closeSocket();\n }\n\n send(data) {\n if (this.readyState !== OPEN) {\n throw new Error('INVALID_STATE_ERR');\n }\n\n if (typeof data !== 'string') {\n throw new TypeError('only string typed data are supported');\n }\n\n wx.sendSocketMessage({\n data\n });\n }\n\n}\n\nassign(WebSocket, {\n CONNECTING,\n OPEN,\n CLOSING,\n CLOSED,\n});\n\nmodule.exports = WebSocket;\n","module.exports = {};\n","var localStorage = require('./localstorage.js');\nvar XMLHttpRequest = require('./xmlhttprequest.js');\nvar FormData = require('./formdata.js');\nvar WebSocket = require('./websocket.js');\nvar navigator = require('./navigator');\n\nmodule.exports = {\n polyfill(target = global || window) {\n if (typeof target !== 'object') {\n throw new Error('polyfill target is not an Object');\n }\n const polyfills = {\n localStorage,\n XMLHttpRequest,\n FormData,\n WebSocket,\n Object,\n navigator,\n };\n for (let k in polyfills) {\n if (!target[k]) target[k] = polyfills[k];\n }\n },\n localStorage,\n XMLHttpRequest,\n FormData,\n WebSocket,\n}\n","var polyfill = require('./index.js').polyfill;\nwindow = window || {};\npolyfill();\npolyfill(window);\ntry {\n localStorage = localStorage || require('./localstorage.js');\n} catch (e) {}\ntry {\n XMLHttpRequest = XMLHttpRequest || require('./xmlhttprequest.js');\n} catch (e) {}\ntry {\n FormData = FormData || require('./formdata.js');\n} catch (e) {}\ntry {\n WebSocket = WebSocket || require('./websocket.js');\n} catch (e) {}\ntry {\n navigator = navigator || require('./navigator.js');\n} catch (e) {}\n","// eslint-disable-next-line import/no-extraneous-dependencies\nimport 'weapp-polyfill/auto-polyfill';\n","/*\r\n Copyright 2013 Daniel Wirtz \r\n Copyright 2009 The Closure Library Authors. All Rights Reserved.\r\n\r\n Licensed under the Apache License, Version 2.0 (the \"License\");\r\n you may not use this file except in compliance with the License.\r\n You may obtain a copy of the License at\r\n\r\n http://www.apache.org/licenses/LICENSE-2.0\r\n\r\n Unless required by applicable law or agreed to in writing, software\r\n distributed under the License is distributed on an \"AS-IS\" BASIS,\r\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n See the License for the specific language governing permissions and\r\n limitations under the License.\r\n */\r\n\r\n/**\r\n * @license long.js (c) 2013 Daniel Wirtz \r\n * Released under the Apache License, Version 2.0\r\n * see: https://github.com/dcodeIO/long.js for details\r\n */\r\n(function(global, factory) {\r\n\r\n /* AMD */ if (typeof define === 'function' && define[\"amd\"])\r\n define([], factory);\r\n /* CommonJS */ else if (typeof require === 'function' && typeof module === \"object\" && module && module[\"exports\"])\r\n module[\"exports\"] = factory();\r\n /* Global */ else\r\n (global[\"dcodeIO\"] = global[\"dcodeIO\"] || {})[\"Long\"] = factory();\r\n\r\n})(this, function() {\r\n \"use strict\";\r\n\r\n /**\r\n * Constructs a 64 bit two's-complement integer, given its low and high 32 bit values as *signed* integers.\r\n * See the from* functions below for more convenient ways of constructing Longs.\r\n * @exports Long\r\n * @class A Long class for representing a 64 bit two's-complement integer value.\r\n * @param {number} low The low (signed) 32 bits of the long\r\n * @param {number} high The high (signed) 32 bits of the long\r\n * @param {boolean=} unsigned Whether unsigned or not, defaults to `false` for signed\r\n * @constructor\r\n */\r\n function Long(low, high, unsigned) {\r\n\r\n /**\r\n * The low 32 bits as a signed value.\r\n * @type {number}\r\n */\r\n this.low = low | 0;\r\n\r\n /**\r\n * The high 32 bits as a signed value.\r\n * @type {number}\r\n */\r\n this.high = high | 0;\r\n\r\n /**\r\n * Whether unsigned or not.\r\n * @type {boolean}\r\n */\r\n this.unsigned = !!unsigned;\r\n }\r\n\r\n // The internal representation of a long is the two given signed, 32-bit values.\r\n // We use 32-bit pieces because these are the size of integers on which\r\n // Javascript performs bit-operations. For operations like addition and\r\n // multiplication, we split each number into 16 bit pieces, which can easily be\r\n // multiplied within Javascript's floating-point representation without overflow\r\n // or change in sign.\r\n //\r\n // In the algorithms below, we frequently reduce the negative case to the\r\n // positive case by negating the input(s) and then post-processing the result.\r\n // Note that we must ALWAYS check specially whether those values are MIN_VALUE\r\n // (-2^63) because -MIN_VALUE == MIN_VALUE (since 2^63 cannot be represented as\r\n // a positive number, it overflows back into a negative). Not handling this\r\n // case would often result in infinite recursion.\r\n //\r\n // Common constant values ZERO, ONE, NEG_ONE, etc. are defined below the from*\r\n // methods on which they depend.\r\n\r\n /**\r\n * An indicator used to reliably determine if an object is a Long or not.\r\n * @type {boolean}\r\n * @const\r\n * @private\r\n */\r\n Long.prototype.__isLong__;\r\n\r\n Object.defineProperty(Long.prototype, \"__isLong__\", {\r\n value: true,\r\n enumerable: false,\r\n configurable: false\r\n });\r\n\r\n /**\r\n * @function\r\n * @param {*} obj Object\r\n * @returns {boolean}\r\n * @inner\r\n */\r\n function isLong(obj) {\r\n return (obj && obj[\"__isLong__\"]) === true;\r\n }\r\n\r\n /**\r\n * Tests if the specified object is a Long.\r\n * @function\r\n * @param {*} obj Object\r\n * @returns {boolean}\r\n */\r\n Long.isLong = isLong;\r\n\r\n /**\r\n * A cache of the Long representations of small integer values.\r\n * @type {!Object}\r\n * @inner\r\n */\r\n var INT_CACHE = {};\r\n\r\n /**\r\n * A cache of the Long representations of small unsigned integer values.\r\n * @type {!Object}\r\n * @inner\r\n */\r\n var UINT_CACHE = {};\r\n\r\n /**\r\n * @param {number} value\r\n * @param {boolean=} unsigned\r\n * @returns {!Long}\r\n * @inner\r\n */\r\n function fromInt(value, unsigned) {\r\n var obj, cachedObj, cache;\r\n if (unsigned) {\r\n value >>>= 0;\r\n if (cache = (0 <= value && value < 256)) {\r\n cachedObj = UINT_CACHE[value];\r\n if (cachedObj)\r\n return cachedObj;\r\n }\r\n obj = fromBits(value, (value | 0) < 0 ? -1 : 0, true);\r\n if (cache)\r\n UINT_CACHE[value] = obj;\r\n return obj;\r\n } else {\r\n value |= 0;\r\n if (cache = (-128 <= value && value < 128)) {\r\n cachedObj = INT_CACHE[value];\r\n if (cachedObj)\r\n return cachedObj;\r\n }\r\n obj = fromBits(value, value < 0 ? -1 : 0, false);\r\n if (cache)\r\n INT_CACHE[value] = obj;\r\n return obj;\r\n }\r\n }\r\n\r\n /**\r\n * Returns a Long representing the given 32 bit integer value.\r\n * @function\r\n * @param {number} value The 32 bit integer in question\r\n * @param {boolean=} unsigned Whether unsigned or not, defaults to `false` for signed\r\n * @returns {!Long} The corresponding Long value\r\n */\r\n Long.fromInt = fromInt;\r\n\r\n /**\r\n * @param {number} value\r\n * @param {boolean=} unsigned\r\n * @returns {!Long}\r\n * @inner\r\n */\r\n function fromNumber(value, unsigned) {\r\n if (isNaN(value) || !isFinite(value))\r\n return unsigned ? UZERO : ZERO;\r\n if (unsigned) {\r\n if (value < 0)\r\n return UZERO;\r\n if (value >= TWO_PWR_64_DBL)\r\n return MAX_UNSIGNED_VALUE;\r\n } else {\r\n if (value <= -TWO_PWR_63_DBL)\r\n return MIN_VALUE;\r\n if (value + 1 >= TWO_PWR_63_DBL)\r\n return MAX_VALUE;\r\n }\r\n if (value < 0)\r\n return fromNumber(-value, unsigned).neg();\r\n return fromBits((value % TWO_PWR_32_DBL) | 0, (value / TWO_PWR_32_DBL) | 0, unsigned);\r\n }\r\n\r\n /**\r\n * Returns a Long representing the given value, provided that it is a finite number. Otherwise, zero is returned.\r\n * @function\r\n * @param {number} value The number in question\r\n * @param {boolean=} unsigned Whether unsigned or not, defaults to `false` for signed\r\n * @returns {!Long} The corresponding Long value\r\n */\r\n Long.fromNumber = fromNumber;\r\n\r\n /**\r\n * @param {number} lowBits\r\n * @param {number} highBits\r\n * @param {boolean=} unsigned\r\n * @returns {!Long}\r\n * @inner\r\n */\r\n function fromBits(lowBits, highBits, unsigned) {\r\n return new Long(lowBits, highBits, unsigned);\r\n }\r\n\r\n /**\r\n * Returns a Long representing the 64 bit integer that comes by concatenating the given low and high bits. Each is\r\n * assumed to use 32 bits.\r\n * @function\r\n * @param {number} lowBits The low 32 bits\r\n * @param {number} highBits The high 32 bits\r\n * @param {boolean=} unsigned Whether unsigned or not, defaults to `false` for signed\r\n * @returns {!Long} The corresponding Long value\r\n */\r\n Long.fromBits = fromBits;\r\n\r\n /**\r\n * @function\r\n * @param {number} base\r\n * @param {number} exponent\r\n * @returns {number}\r\n * @inner\r\n */\r\n var pow_dbl = Math.pow; // Used 4 times (4*8 to 15+4)\r\n\r\n /**\r\n * @param {string} str\r\n * @param {(boolean|number)=} unsigned\r\n * @param {number=} radix\r\n * @returns {!Long}\r\n * @inner\r\n */\r\n function fromString(str, unsigned, radix) {\r\n if (str.length === 0)\r\n throw Error('empty string');\r\n if (str === \"NaN\" || str === \"Infinity\" || str === \"+Infinity\" || str === \"-Infinity\")\r\n return ZERO;\r\n if (typeof unsigned === 'number') {\r\n // For goog.math.long compatibility\r\n radix = unsigned,\r\n unsigned = false;\r\n } else {\r\n unsigned = !! unsigned;\r\n }\r\n radix = radix || 10;\r\n if (radix < 2 || 36 < radix)\r\n throw RangeError('radix');\r\n\r\n var p;\r\n if ((p = str.indexOf('-')) > 0)\r\n throw Error('interior hyphen');\r\n else if (p === 0) {\r\n return fromString(str.substring(1), unsigned, radix).neg();\r\n }\r\n\r\n // Do several (8) digits each time through the loop, so as to\r\n // minimize the calls to the very expensive emulated div.\r\n var radixToPower = fromNumber(pow_dbl(radix, 8));\r\n\r\n var result = ZERO;\r\n for (var i = 0; i < str.length; i += 8) {\r\n var size = Math.min(8, str.length - i),\r\n value = parseInt(str.substring(i, i + size), radix);\r\n if (size < 8) {\r\n var power = fromNumber(pow_dbl(radix, size));\r\n result = result.mul(power).add(fromNumber(value));\r\n } else {\r\n result = result.mul(radixToPower);\r\n result = result.add(fromNumber(value));\r\n }\r\n }\r\n result.unsigned = unsigned;\r\n return result;\r\n }\r\n\r\n /**\r\n * Returns a Long representation of the given string, written using the specified radix.\r\n * @function\r\n * @param {string} str The textual representation of the Long\r\n * @param {(boolean|number)=} unsigned Whether unsigned or not, defaults to `false` for signed\r\n * @param {number=} radix The radix in which the text is written (2-36), defaults to 10\r\n * @returns {!Long} The corresponding Long value\r\n */\r\n Long.fromString = fromString;\r\n\r\n /**\r\n * @function\r\n * @param {!Long|number|string|!{low: number, high: number, unsigned: boolean}} val\r\n * @returns {!Long}\r\n * @inner\r\n */\r\n function fromValue(val) {\r\n if (val /* is compatible */ instanceof Long)\r\n return val;\r\n if (typeof val === 'number')\r\n return fromNumber(val);\r\n if (typeof val === 'string')\r\n return fromString(val);\r\n // Throws for non-objects, converts non-instanceof Long:\r\n return fromBits(val.low, val.high, val.unsigned);\r\n }\r\n\r\n /**\r\n * Converts the specified value to a Long.\r\n * @function\r\n * @param {!Long|number|string|!{low: number, high: number, unsigned: boolean}} val Value\r\n * @returns {!Long}\r\n */\r\n Long.fromValue = fromValue;\r\n\r\n // NOTE: the compiler should inline these constant values below and then remove these variables, so there should be\r\n // no runtime penalty for these.\r\n\r\n /**\r\n * @type {number}\r\n * @const\r\n * @inner\r\n */\r\n var TWO_PWR_16_DBL = 1 << 16;\r\n\r\n /**\r\n * @type {number}\r\n * @const\r\n * @inner\r\n */\r\n var TWO_PWR_24_DBL = 1 << 24;\r\n\r\n /**\r\n * @type {number}\r\n * @const\r\n * @inner\r\n */\r\n var TWO_PWR_32_DBL = TWO_PWR_16_DBL * TWO_PWR_16_DBL;\r\n\r\n /**\r\n * @type {number}\r\n * @const\r\n * @inner\r\n */\r\n var TWO_PWR_64_DBL = TWO_PWR_32_DBL * TWO_PWR_32_DBL;\r\n\r\n /**\r\n * @type {number}\r\n * @const\r\n * @inner\r\n */\r\n var TWO_PWR_63_DBL = TWO_PWR_64_DBL / 2;\r\n\r\n /**\r\n * @type {!Long}\r\n * @const\r\n * @inner\r\n */\r\n var TWO_PWR_24 = fromInt(TWO_PWR_24_DBL);\r\n\r\n /**\r\n * @type {!Long}\r\n * @inner\r\n */\r\n var ZERO = fromInt(0);\r\n\r\n /**\r\n * Signed zero.\r\n * @type {!Long}\r\n */\r\n Long.ZERO = ZERO;\r\n\r\n /**\r\n * @type {!Long}\r\n * @inner\r\n */\r\n var UZERO = fromInt(0, true);\r\n\r\n /**\r\n * Unsigned zero.\r\n * @type {!Long}\r\n */\r\n Long.UZERO = UZERO;\r\n\r\n /**\r\n * @type {!Long}\r\n * @inner\r\n */\r\n var ONE = fromInt(1);\r\n\r\n /**\r\n * Signed one.\r\n * @type {!Long}\r\n */\r\n Long.ONE = ONE;\r\n\r\n /**\r\n * @type {!Long}\r\n * @inner\r\n */\r\n var UONE = fromInt(1, true);\r\n\r\n /**\r\n * Unsigned one.\r\n * @type {!Long}\r\n */\r\n Long.UONE = UONE;\r\n\r\n /**\r\n * @type {!Long}\r\n * @inner\r\n */\r\n var NEG_ONE = fromInt(-1);\r\n\r\n /**\r\n * Signed negative one.\r\n * @type {!Long}\r\n */\r\n Long.NEG_ONE = NEG_ONE;\r\n\r\n /**\r\n * @type {!Long}\r\n * @inner\r\n */\r\n var MAX_VALUE = fromBits(0xFFFFFFFF|0, 0x7FFFFFFF|0, false);\r\n\r\n /**\r\n * Maximum signed value.\r\n * @type {!Long}\r\n */\r\n Long.MAX_VALUE = MAX_VALUE;\r\n\r\n /**\r\n * @type {!Long}\r\n * @inner\r\n */\r\n var MAX_UNSIGNED_VALUE = fromBits(0xFFFFFFFF|0, 0xFFFFFFFF|0, true);\r\n\r\n /**\r\n * Maximum unsigned value.\r\n * @type {!Long}\r\n */\r\n Long.MAX_UNSIGNED_VALUE = MAX_UNSIGNED_VALUE;\r\n\r\n /**\r\n * @type {!Long}\r\n * @inner\r\n */\r\n var MIN_VALUE = fromBits(0, 0x80000000|0, false);\r\n\r\n /**\r\n * Minimum signed value.\r\n * @type {!Long}\r\n */\r\n Long.MIN_VALUE = MIN_VALUE;\r\n\r\n /**\r\n * @alias Long.prototype\r\n * @inner\r\n */\r\n var LongPrototype = Long.prototype;\r\n\r\n /**\r\n * Converts the Long to a 32 bit integer, assuming it is a 32 bit integer.\r\n * @returns {number}\r\n */\r\n LongPrototype.toInt = function toInt() {\r\n return this.unsigned ? this.low >>> 0 : this.low;\r\n };\r\n\r\n /**\r\n * Converts the Long to a the nearest floating-point representation of this value (double, 53 bit mantissa).\r\n * @returns {number}\r\n */\r\n LongPrototype.toNumber = function toNumber() {\r\n if (this.unsigned)\r\n return ((this.high >>> 0) * TWO_PWR_32_DBL) + (this.low >>> 0);\r\n return this.high * TWO_PWR_32_DBL + (this.low >>> 0);\r\n };\r\n\r\n /**\r\n * Converts the Long to a string written in the specified radix.\r\n * @param {number=} radix Radix (2-36), defaults to 10\r\n * @returns {string}\r\n * @override\r\n * @throws {RangeError} If `radix` is out of range\r\n */\r\n LongPrototype.toString = function toString(radix) {\r\n radix = radix || 10;\r\n if (radix < 2 || 36 < radix)\r\n throw RangeError('radix');\r\n if (this.isZero())\r\n return '0';\r\n if (this.isNegative()) { // Unsigned Longs are never negative\r\n if (this.eq(MIN_VALUE)) {\r\n // We need to change the Long value before it can be negated, so we remove\r\n // the bottom-most digit in this base and then recurse to do the rest.\r\n var radixLong = fromNumber(radix),\r\n div = this.div(radixLong),\r\n rem1 = div.mul(radixLong).sub(this);\r\n return div.toString(radix) + rem1.toInt().toString(radix);\r\n } else\r\n return '-' + this.neg().toString(radix);\r\n }\r\n\r\n // Do several (6) digits each time through the loop, so as to\r\n // minimize the calls to the very expensive emulated div.\r\n var radixToPower = fromNumber(pow_dbl(radix, 6), this.unsigned),\r\n rem = this;\r\n var result = '';\r\n while (true) {\r\n var remDiv = rem.div(radixToPower),\r\n intval = rem.sub(remDiv.mul(radixToPower)).toInt() >>> 0,\r\n digits = intval.toString(radix);\r\n rem = remDiv;\r\n if (rem.isZero())\r\n return digits + result;\r\n else {\r\n while (digits.length < 6)\r\n digits = '0' + digits;\r\n result = '' + digits + result;\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Gets the high 32 bits as a signed integer.\r\n * @returns {number} Signed high bits\r\n */\r\n LongPrototype.getHighBits = function getHighBits() {\r\n return this.high;\r\n };\r\n\r\n /**\r\n * Gets the high 32 bits as an unsigned integer.\r\n * @returns {number} Unsigned high bits\r\n */\r\n LongPrototype.getHighBitsUnsigned = function getHighBitsUnsigned() {\r\n return this.high >>> 0;\r\n };\r\n\r\n /**\r\n * Gets the low 32 bits as a signed integer.\r\n * @returns {number} Signed low bits\r\n */\r\n LongPrototype.getLowBits = function getLowBits() {\r\n return this.low;\r\n };\r\n\r\n /**\r\n * Gets the low 32 bits as an unsigned integer.\r\n * @returns {number} Unsigned low bits\r\n */\r\n LongPrototype.getLowBitsUnsigned = function getLowBitsUnsigned() {\r\n return this.low >>> 0;\r\n };\r\n\r\n /**\r\n * Gets the number of bits needed to represent the absolute value of this Long.\r\n * @returns {number}\r\n */\r\n LongPrototype.getNumBitsAbs = function getNumBitsAbs() {\r\n if (this.isNegative()) // Unsigned Longs are never negative\r\n return this.eq(MIN_VALUE) ? 64 : this.neg().getNumBitsAbs();\r\n var val = this.high != 0 ? this.high : this.low;\r\n for (var bit = 31; bit > 0; bit--)\r\n if ((val & (1 << bit)) != 0)\r\n break;\r\n return this.high != 0 ? bit + 33 : bit + 1;\r\n };\r\n\r\n /**\r\n * Tests if this Long's value equals zero.\r\n * @returns {boolean}\r\n */\r\n LongPrototype.isZero = function isZero() {\r\n return this.high === 0 && this.low === 0;\r\n };\r\n\r\n /**\r\n * Tests if this Long's value is negative.\r\n * @returns {boolean}\r\n */\r\n LongPrototype.isNegative = function isNegative() {\r\n return !this.unsigned && this.high < 0;\r\n };\r\n\r\n /**\r\n * Tests if this Long's value is positive.\r\n * @returns {boolean}\r\n */\r\n LongPrototype.isPositive = function isPositive() {\r\n return this.unsigned || this.high >= 0;\r\n };\r\n\r\n /**\r\n * Tests if this Long's value is odd.\r\n * @returns {boolean}\r\n */\r\n LongPrototype.isOdd = function isOdd() {\r\n return (this.low & 1) === 1;\r\n };\r\n\r\n /**\r\n * Tests if this Long's value is even.\r\n * @returns {boolean}\r\n */\r\n LongPrototype.isEven = function isEven() {\r\n return (this.low & 1) === 0;\r\n };\r\n\r\n /**\r\n * Tests if this Long's value equals the specified's.\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\n LongPrototype.equals = function equals(other) {\r\n if (!isLong(other))\r\n other = fromValue(other);\r\n if (this.unsigned !== other.unsigned && (this.high >>> 31) === 1 && (other.high >>> 31) === 1)\r\n return false;\r\n return this.high === other.high && this.low === other.low;\r\n };\r\n\r\n /**\r\n * Tests if this Long's value equals the specified's. This is an alias of {@link Long#equals}.\r\n * @function\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\n LongPrototype.eq = LongPrototype.equals;\r\n\r\n /**\r\n * Tests if this Long's value differs from the specified's.\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\n LongPrototype.notEquals = function notEquals(other) {\r\n return !this.eq(/* validates */ other);\r\n };\r\n\r\n /**\r\n * Tests if this Long's value differs from the specified's. This is an alias of {@link Long#notEquals}.\r\n * @function\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\n LongPrototype.neq = LongPrototype.notEquals;\r\n\r\n /**\r\n * Tests if this Long's value is less than the specified's.\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\n LongPrototype.lessThan = function lessThan(other) {\r\n return this.comp(/* validates */ other) < 0;\r\n };\r\n\r\n /**\r\n * Tests if this Long's value is less than the specified's. This is an alias of {@link Long#lessThan}.\r\n * @function\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\n LongPrototype.lt = LongPrototype.lessThan;\r\n\r\n /**\r\n * Tests if this Long's value is less than or equal the specified's.\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\n LongPrototype.lessThanOrEqual = function lessThanOrEqual(other) {\r\n return this.comp(/* validates */ other) <= 0;\r\n };\r\n\r\n /**\r\n * Tests if this Long's value is less than or equal the specified's. This is an alias of {@link Long#lessThanOrEqual}.\r\n * @function\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\n LongPrototype.lte = LongPrototype.lessThanOrEqual;\r\n\r\n /**\r\n * Tests if this Long's value is greater than the specified's.\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\n LongPrototype.greaterThan = function greaterThan(other) {\r\n return this.comp(/* validates */ other) > 0;\r\n };\r\n\r\n /**\r\n * Tests if this Long's value is greater than the specified's. This is an alias of {@link Long#greaterThan}.\r\n * @function\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\n LongPrototype.gt = LongPrototype.greaterThan;\r\n\r\n /**\r\n * Tests if this Long's value is greater than or equal the specified's.\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\n LongPrototype.greaterThanOrEqual = function greaterThanOrEqual(other) {\r\n return this.comp(/* validates */ other) >= 0;\r\n };\r\n\r\n /**\r\n * Tests if this Long's value is greater than or equal the specified's. This is an alias of {@link Long#greaterThanOrEqual}.\r\n * @function\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\n LongPrototype.gte = LongPrototype.greaterThanOrEqual;\r\n\r\n /**\r\n * Compares this Long's value with the specified's.\r\n * @param {!Long|number|string} other Other value\r\n * @returns {number} 0 if they are the same, 1 if the this is greater and -1\r\n * if the given one is greater\r\n */\r\n LongPrototype.compare = function compare(other) {\r\n if (!isLong(other))\r\n other = fromValue(other);\r\n if (this.eq(other))\r\n return 0;\r\n var thisNeg = this.isNegative(),\r\n otherNeg = other.isNegative();\r\n if (thisNeg && !otherNeg)\r\n return -1;\r\n if (!thisNeg && otherNeg)\r\n return 1;\r\n // At this point the sign bits are the same\r\n if (!this.unsigned)\r\n return this.sub(other).isNegative() ? -1 : 1;\r\n // Both are positive if at least one is unsigned\r\n return (other.high >>> 0) > (this.high >>> 0) || (other.high === this.high && (other.low >>> 0) > (this.low >>> 0)) ? -1 : 1;\r\n };\r\n\r\n /**\r\n * Compares this Long's value with the specified's. This is an alias of {@link Long#compare}.\r\n * @function\r\n * @param {!Long|number|string} other Other value\r\n * @returns {number} 0 if they are the same, 1 if the this is greater and -1\r\n * if the given one is greater\r\n */\r\n LongPrototype.comp = LongPrototype.compare;\r\n\r\n /**\r\n * Negates this Long's value.\r\n * @returns {!Long} Negated Long\r\n */\r\n LongPrototype.negate = function negate() {\r\n if (!this.unsigned && this.eq(MIN_VALUE))\r\n return MIN_VALUE;\r\n return this.not().add(ONE);\r\n };\r\n\r\n /**\r\n * Negates this Long's value. This is an alias of {@link Long#negate}.\r\n * @function\r\n * @returns {!Long} Negated Long\r\n */\r\n LongPrototype.neg = LongPrototype.negate;\r\n\r\n /**\r\n * Returns the sum of this and the specified Long.\r\n * @param {!Long|number|string} addend Addend\r\n * @returns {!Long} Sum\r\n */\r\n LongPrototype.add = function add(addend) {\r\n if (!isLong(addend))\r\n addend = fromValue(addend);\r\n\r\n // Divide each number into 4 chunks of 16 bits, and then sum the chunks.\r\n\r\n var a48 = this.high >>> 16;\r\n var a32 = this.high & 0xFFFF;\r\n var a16 = this.low >>> 16;\r\n var a00 = this.low & 0xFFFF;\r\n\r\n var b48 = addend.high >>> 16;\r\n var b32 = addend.high & 0xFFFF;\r\n var b16 = addend.low >>> 16;\r\n var b00 = addend.low & 0xFFFF;\r\n\r\n var c48 = 0, c32 = 0, c16 = 0, c00 = 0;\r\n c00 += a00 + b00;\r\n c16 += c00 >>> 16;\r\n c00 &= 0xFFFF;\r\n c16 += a16 + b16;\r\n c32 += c16 >>> 16;\r\n c16 &= 0xFFFF;\r\n c32 += a32 + b32;\r\n c48 += c32 >>> 16;\r\n c32 &= 0xFFFF;\r\n c48 += a48 + b48;\r\n c48 &= 0xFFFF;\r\n return fromBits((c16 << 16) | c00, (c48 << 16) | c32, this.unsigned);\r\n };\r\n\r\n /**\r\n * Returns the difference of this and the specified Long.\r\n * @param {!Long|number|string} subtrahend Subtrahend\r\n * @returns {!Long} Difference\r\n */\r\n LongPrototype.subtract = function subtract(subtrahend) {\r\n if (!isLong(subtrahend))\r\n subtrahend = fromValue(subtrahend);\r\n return this.add(subtrahend.neg());\r\n };\r\n\r\n /**\r\n * Returns the difference of this and the specified Long. This is an alias of {@link Long#subtract}.\r\n * @function\r\n * @param {!Long|number|string} subtrahend Subtrahend\r\n * @returns {!Long} Difference\r\n */\r\n LongPrototype.sub = LongPrototype.subtract;\r\n\r\n /**\r\n * Returns the product of this and the specified Long.\r\n * @param {!Long|number|string} multiplier Multiplier\r\n * @returns {!Long} Product\r\n */\r\n LongPrototype.multiply = function multiply(multiplier) {\r\n if (this.isZero())\r\n return ZERO;\r\n if (!isLong(multiplier))\r\n multiplier = fromValue(multiplier);\r\n if (multiplier.isZero())\r\n return ZERO;\r\n if (this.eq(MIN_VALUE))\r\n return multiplier.isOdd() ? MIN_VALUE : ZERO;\r\n if (multiplier.eq(MIN_VALUE))\r\n return this.isOdd() ? MIN_VALUE : ZERO;\r\n\r\n if (this.isNegative()) {\r\n if (multiplier.isNegative())\r\n return this.neg().mul(multiplier.neg());\r\n else\r\n return this.neg().mul(multiplier).neg();\r\n } else if (multiplier.isNegative())\r\n return this.mul(multiplier.neg()).neg();\r\n\r\n // If both longs are small, use float multiplication\r\n if (this.lt(TWO_PWR_24) && multiplier.lt(TWO_PWR_24))\r\n return fromNumber(this.toNumber() * multiplier.toNumber(), this.unsigned);\r\n\r\n // Divide each long into 4 chunks of 16 bits, and then add up 4x4 products.\r\n // We can skip products that would overflow.\r\n\r\n var a48 = this.high >>> 16;\r\n var a32 = this.high & 0xFFFF;\r\n var a16 = this.low >>> 16;\r\n var a00 = this.low & 0xFFFF;\r\n\r\n var b48 = multiplier.high >>> 16;\r\n var b32 = multiplier.high & 0xFFFF;\r\n var b16 = multiplier.low >>> 16;\r\n var b00 = multiplier.low & 0xFFFF;\r\n\r\n var c48 = 0, c32 = 0, c16 = 0, c00 = 0;\r\n c00 += a00 * b00;\r\n c16 += c00 >>> 16;\r\n c00 &= 0xFFFF;\r\n c16 += a16 * b00;\r\n c32 += c16 >>> 16;\r\n c16 &= 0xFFFF;\r\n c16 += a00 * b16;\r\n c32 += c16 >>> 16;\r\n c16 &= 0xFFFF;\r\n c32 += a32 * b00;\r\n c48 += c32 >>> 16;\r\n c32 &= 0xFFFF;\r\n c32 += a16 * b16;\r\n c48 += c32 >>> 16;\r\n c32 &= 0xFFFF;\r\n c32 += a00 * b32;\r\n c48 += c32 >>> 16;\r\n c32 &= 0xFFFF;\r\n c48 += a48 * b00 + a32 * b16 + a16 * b32 + a00 * b48;\r\n c48 &= 0xFFFF;\r\n return fromBits((c16 << 16) | c00, (c48 << 16) | c32, this.unsigned);\r\n };\r\n\r\n /**\r\n * Returns the product of this and the specified Long. This is an alias of {@link Long#multiply}.\r\n * @function\r\n * @param {!Long|number|string} multiplier Multiplier\r\n * @returns {!Long} Product\r\n */\r\n LongPrototype.mul = LongPrototype.multiply;\r\n\r\n /**\r\n * Returns this Long divided by the specified. The result is signed if this Long is signed or\r\n * unsigned if this Long is unsigned.\r\n * @param {!Long|number|string} divisor Divisor\r\n * @returns {!Long} Quotient\r\n */\r\n LongPrototype.divide = function divide(divisor) {\r\n if (!isLong(divisor))\r\n divisor = fromValue(divisor);\r\n if (divisor.isZero())\r\n throw Error('division by zero');\r\n if (this.isZero())\r\n return this.unsigned ? UZERO : ZERO;\r\n var approx, rem, res;\r\n if (!this.unsigned) {\r\n // This section is only relevant for signed longs and is derived from the\r\n // closure library as a whole.\r\n if (this.eq(MIN_VALUE)) {\r\n if (divisor.eq(ONE) || divisor.eq(NEG_ONE))\r\n return MIN_VALUE; // recall that -MIN_VALUE == MIN_VALUE\r\n else if (divisor.eq(MIN_VALUE))\r\n return ONE;\r\n else {\r\n // At this point, we have |other| >= 2, so |this/other| < |MIN_VALUE|.\r\n var halfThis = this.shr(1);\r\n approx = halfThis.div(divisor).shl(1);\r\n if (approx.eq(ZERO)) {\r\n return divisor.isNegative() ? ONE : NEG_ONE;\r\n } else {\r\n rem = this.sub(divisor.mul(approx));\r\n res = approx.add(rem.div(divisor));\r\n return res;\r\n }\r\n }\r\n } else if (divisor.eq(MIN_VALUE))\r\n return this.unsigned ? UZERO : ZERO;\r\n if (this.isNegative()) {\r\n if (divisor.isNegative())\r\n return this.neg().div(divisor.neg());\r\n return this.neg().div(divisor).neg();\r\n } else if (divisor.isNegative())\r\n return this.div(divisor.neg()).neg();\r\n res = ZERO;\r\n } else {\r\n // The algorithm below has not been made for unsigned longs. It's therefore\r\n // required to take special care of the MSB prior to running it.\r\n if (!divisor.unsigned)\r\n divisor = divisor.toUnsigned();\r\n if (divisor.gt(this))\r\n return UZERO;\r\n if (divisor.gt(this.shru(1))) // 15 >>> 1 = 7 ; with divisor = 8 ; true\r\n return UONE;\r\n res = UZERO;\r\n }\r\n\r\n // Repeat the following until the remainder is less than other: find a\r\n // floating-point that approximates remainder / other *from below*, add this\r\n // into the result, and subtract it from the remainder. It is critical that\r\n // the approximate value is less than or equal to the real value so that the\r\n // remainder never becomes negative.\r\n rem = this;\r\n while (rem.gte(divisor)) {\r\n // Approximate the result of division. This may be a little greater or\r\n // smaller than the actual value.\r\n approx = Math.max(1, Math.floor(rem.toNumber() / divisor.toNumber()));\r\n\r\n // We will tweak the approximate result by changing it in the 48-th digit or\r\n // the smallest non-fractional digit, whichever is larger.\r\n var log2 = Math.ceil(Math.log(approx) / Math.LN2),\r\n delta = (log2 <= 48) ? 1 : pow_dbl(2, log2 - 48),\r\n\r\n // Decrease the approximation until it is smaller than the remainder. Note\r\n // that if it is too large, the product overflows and is negative.\r\n approxRes = fromNumber(approx),\r\n approxRem = approxRes.mul(divisor);\r\n while (approxRem.isNegative() || approxRem.gt(rem)) {\r\n approx -= delta;\r\n approxRes = fromNumber(approx, this.unsigned);\r\n approxRem = approxRes.mul(divisor);\r\n }\r\n\r\n // We know the answer can't be zero... and actually, zero would cause\r\n // infinite recursion since we would make no progress.\r\n if (approxRes.isZero())\r\n approxRes = ONE;\r\n\r\n res = res.add(approxRes);\r\n rem = rem.sub(approxRem);\r\n }\r\n return res;\r\n };\r\n\r\n /**\r\n * Returns this Long divided by the specified. This is an alias of {@link Long#divide}.\r\n * @function\r\n * @param {!Long|number|string} divisor Divisor\r\n * @returns {!Long} Quotient\r\n */\r\n LongPrototype.div = LongPrototype.divide;\r\n\r\n /**\r\n * Returns this Long modulo the specified.\r\n * @param {!Long|number|string} divisor Divisor\r\n * @returns {!Long} Remainder\r\n */\r\n LongPrototype.modulo = function modulo(divisor) {\r\n if (!isLong(divisor))\r\n divisor = fromValue(divisor);\r\n return this.sub(this.div(divisor).mul(divisor));\r\n };\r\n\r\n /**\r\n * Returns this Long modulo the specified. This is an alias of {@link Long#modulo}.\r\n * @function\r\n * @param {!Long|number|string} divisor Divisor\r\n * @returns {!Long} Remainder\r\n */\r\n LongPrototype.mod = LongPrototype.modulo;\r\n\r\n /**\r\n * Returns the bitwise NOT of this Long.\r\n * @returns {!Long}\r\n */\r\n LongPrototype.not = function not() {\r\n return fromBits(~this.low, ~this.high, this.unsigned);\r\n };\r\n\r\n /**\r\n * Returns the bitwise AND of this Long and the specified.\r\n * @param {!Long|number|string} other Other Long\r\n * @returns {!Long}\r\n */\r\n LongPrototype.and = function and(other) {\r\n if (!isLong(other))\r\n other = fromValue(other);\r\n return fromBits(this.low & other.low, this.high & other.high, this.unsigned);\r\n };\r\n\r\n /**\r\n * Returns the bitwise OR of this Long and the specified.\r\n * @param {!Long|number|string} other Other Long\r\n * @returns {!Long}\r\n */\r\n LongPrototype.or = function or(other) {\r\n if (!isLong(other))\r\n other = fromValue(other);\r\n return fromBits(this.low | other.low, this.high | other.high, this.unsigned);\r\n };\r\n\r\n /**\r\n * Returns the bitwise XOR of this Long and the given one.\r\n * @param {!Long|number|string} other Other Long\r\n * @returns {!Long}\r\n */\r\n LongPrototype.xor = function xor(other) {\r\n if (!isLong(other))\r\n other = fromValue(other);\r\n return fromBits(this.low ^ other.low, this.high ^ other.high, this.unsigned);\r\n };\r\n\r\n /**\r\n * Returns this Long with bits shifted to the left by the given amount.\r\n * @param {number|!Long} numBits Number of bits\r\n * @returns {!Long} Shifted Long\r\n */\r\n LongPrototype.shiftLeft = function shiftLeft(numBits) {\r\n if (isLong(numBits))\r\n numBits = numBits.toInt();\r\n if ((numBits &= 63) === 0)\r\n return this;\r\n else if (numBits < 32)\r\n return fromBits(this.low << numBits, (this.high << numBits) | (this.low >>> (32 - numBits)), this.unsigned);\r\n else\r\n return fromBits(0, this.low << (numBits - 32), this.unsigned);\r\n };\r\n\r\n /**\r\n * Returns this Long with bits shifted to the left by the given amount. This is an alias of {@link Long#shiftLeft}.\r\n * @function\r\n * @param {number|!Long} numBits Number of bits\r\n * @returns {!Long} Shifted Long\r\n */\r\n LongPrototype.shl = LongPrototype.shiftLeft;\r\n\r\n /**\r\n * Returns this Long with bits arithmetically shifted to the right by the given amount.\r\n * @param {number|!Long} numBits Number of bits\r\n * @returns {!Long} Shifted Long\r\n */\r\n LongPrototype.shiftRight = function shiftRight(numBits) {\r\n if (isLong(numBits))\r\n numBits = numBits.toInt();\r\n if ((numBits &= 63) === 0)\r\n return this;\r\n else if (numBits < 32)\r\n return fromBits((this.low >>> numBits) | (this.high << (32 - numBits)), this.high >> numBits, this.unsigned);\r\n else\r\n return fromBits(this.high >> (numBits - 32), this.high >= 0 ? 0 : -1, this.unsigned);\r\n };\r\n\r\n /**\r\n * Returns this Long with bits arithmetically shifted to the right by the given amount. This is an alias of {@link Long#shiftRight}.\r\n * @function\r\n * @param {number|!Long} numBits Number of bits\r\n * @returns {!Long} Shifted Long\r\n */\r\n LongPrototype.shr = LongPrototype.shiftRight;\r\n\r\n /**\r\n * Returns this Long with bits logically shifted to the right by the given amount.\r\n * @param {number|!Long} numBits Number of bits\r\n * @returns {!Long} Shifted Long\r\n */\r\n LongPrototype.shiftRightUnsigned = function shiftRightUnsigned(numBits) {\r\n if (isLong(numBits))\r\n numBits = numBits.toInt();\r\n numBits &= 63;\r\n if (numBits === 0)\r\n return this;\r\n else {\r\n var high = this.high;\r\n if (numBits < 32) {\r\n var low = this.low;\r\n return fromBits((low >>> numBits) | (high << (32 - numBits)), high >>> numBits, this.unsigned);\r\n } else if (numBits === 32)\r\n return fromBits(high, 0, this.unsigned);\r\n else\r\n return fromBits(high >>> (numBits - 32), 0, this.unsigned);\r\n }\r\n };\r\n\r\n /**\r\n * Returns this Long with bits logically shifted to the right by the given amount. This is an alias of {@link Long#shiftRightUnsigned}.\r\n * @function\r\n * @param {number|!Long} numBits Number of bits\r\n * @returns {!Long} Shifted Long\r\n */\r\n LongPrototype.shru = LongPrototype.shiftRightUnsigned;\r\n\r\n /**\r\n * Converts this Long to signed.\r\n * @returns {!Long} Signed long\r\n */\r\n LongPrototype.toSigned = function toSigned() {\r\n if (!this.unsigned)\r\n return this;\r\n return fromBits(this.low, this.high, false);\r\n };\r\n\r\n /**\r\n * Converts this Long to unsigned.\r\n * @returns {!Long} Unsigned long\r\n */\r\n LongPrototype.toUnsigned = function toUnsigned() {\r\n if (this.unsigned)\r\n return this;\r\n return fromBits(this.low, this.high, true);\r\n };\r\n\r\n /**\r\n * Converts this Long to its byte representation.\r\n * @param {boolean=} le Whether little or big endian, defaults to big endian\r\n * @returns {!Array.} Byte representation\r\n */\r\n LongPrototype.toBytes = function(le) {\r\n return le ? this.toBytesLE() : this.toBytesBE();\r\n }\r\n\r\n /**\r\n * Converts this Long to its little endian byte representation.\r\n * @returns {!Array.} Little endian byte representation\r\n */\r\n LongPrototype.toBytesLE = function() {\r\n var hi = this.high,\r\n lo = this.low;\r\n return [\r\n lo & 0xff,\r\n (lo >>> 8) & 0xff,\r\n (lo >>> 16) & 0xff,\r\n (lo >>> 24) & 0xff,\r\n hi & 0xff,\r\n (hi >>> 8) & 0xff,\r\n (hi >>> 16) & 0xff,\r\n (hi >>> 24) & 0xff\r\n ];\r\n }\r\n\r\n /**\r\n * Converts this Long to its big endian byte representation.\r\n * @returns {!Array.} Big endian byte representation\r\n */\r\n LongPrototype.toBytesBE = function() {\r\n var hi = this.high,\r\n lo = this.low;\r\n return [\r\n (hi >>> 24) & 0xff,\r\n (hi >>> 16) & 0xff,\r\n (hi >>> 8) & 0xff,\r\n hi & 0xff,\r\n (lo >>> 24) & 0xff,\r\n (lo >>> 16) & 0xff,\r\n (lo >>> 8) & 0xff,\r\n lo & 0xff\r\n ];\r\n }\r\n\r\n return Long;\r\n});\r\n","/*\r\n Copyright 2013-2014 Daniel Wirtz \r\n\r\n Licensed under the Apache License, Version 2.0 (the \"License\");\r\n you may not use this file except in compliance with the License.\r\n You may obtain a copy of the License at\r\n\r\n http://www.apache.org/licenses/LICENSE-2.0\r\n\r\n Unless required by applicable law or agreed to in writing, software\r\n distributed under the License is distributed on an \"AS IS\" BASIS,\r\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n See the License for the specific language governing permissions and\r\n limitations under the License.\r\n */\r\n\r\n/**\r\n * @license bytebuffer.js (c) 2015 Daniel Wirtz \r\n * Backing buffer: ArrayBuffer, Accessor: Uint8Array\r\n * Released under the Apache License, Version 2.0\r\n * see: https://github.com/dcodeIO/bytebuffer.js for details\r\n */\r\n(function(global, factory) {\r\n\r\n /* AMD */ if (typeof define === 'function' && define[\"amd\"])\r\n define([\"long\"], factory);\r\n /* CommonJS */ else if (typeof require === 'function' && typeof module === \"object\" && module && module[\"exports\"])\r\n module['exports'] = (function() {\r\n var Long; try { Long = require(\"long\"); } catch (e) {}\r\n return factory(Long);\r\n })();\r\n /* Global */ else\r\n (global[\"dcodeIO\"] = global[\"dcodeIO\"] || {})[\"ByteBuffer\"] = factory(global[\"dcodeIO\"][\"Long\"]);\r\n\r\n})(this, function(Long) {\r\n \"use strict\";\r\n\r\n /**\r\n * Constructs a new ByteBuffer.\r\n * @class The swiss army knife for binary data in JavaScript.\r\n * @exports ByteBuffer\r\n * @constructor\r\n * @param {number=} capacity Initial capacity. Defaults to {@link ByteBuffer.DEFAULT_CAPACITY}.\r\n * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to\r\n * {@link ByteBuffer.DEFAULT_ENDIAN}.\r\n * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to\r\n * {@link ByteBuffer.DEFAULT_NOASSERT}.\r\n * @expose\r\n */\r\n var ByteBuffer = function(capacity, littleEndian, noAssert) {\r\n if (typeof capacity === 'undefined')\r\n capacity = ByteBuffer.DEFAULT_CAPACITY;\r\n if (typeof littleEndian === 'undefined')\r\n littleEndian = ByteBuffer.DEFAULT_ENDIAN;\r\n if (typeof noAssert === 'undefined')\r\n noAssert = ByteBuffer.DEFAULT_NOASSERT;\r\n if (!noAssert) {\r\n capacity = capacity | 0;\r\n if (capacity < 0)\r\n throw RangeError(\"Illegal capacity\");\r\n littleEndian = !!littleEndian;\r\n noAssert = !!noAssert;\r\n }\r\n\r\n /**\r\n * Backing ArrayBuffer.\r\n * @type {!ArrayBuffer}\r\n * @expose\r\n */\r\n this.buffer = capacity === 0 ? EMPTY_BUFFER : new ArrayBuffer(capacity);\r\n\r\n /**\r\n * Uint8Array utilized to manipulate the backing buffer. Becomes `null` if the backing buffer has a capacity of `0`.\r\n * @type {?Uint8Array}\r\n * @expose\r\n */\r\n this.view = capacity === 0 ? null : new Uint8Array(this.buffer);\r\n\r\n /**\r\n * Absolute read/write offset.\r\n * @type {number}\r\n * @expose\r\n * @see ByteBuffer#flip\r\n * @see ByteBuffer#clear\r\n */\r\n this.offset = 0;\r\n\r\n /**\r\n * Marked offset.\r\n * @type {number}\r\n * @expose\r\n * @see ByteBuffer#mark\r\n * @see ByteBuffer#reset\r\n */\r\n this.markedOffset = -1;\r\n\r\n /**\r\n * Absolute limit of the contained data. Set to the backing buffer's capacity upon allocation.\r\n * @type {number}\r\n * @expose\r\n * @see ByteBuffer#flip\r\n * @see ByteBuffer#clear\r\n */\r\n this.limit = capacity;\r\n\r\n /**\r\n * Whether to use little endian byte order, defaults to `false` for big endian.\r\n * @type {boolean}\r\n * @expose\r\n */\r\n this.littleEndian = littleEndian;\r\n\r\n /**\r\n * Whether to skip assertions of offsets and values, defaults to `false`.\r\n * @type {boolean}\r\n * @expose\r\n */\r\n this.noAssert = noAssert;\r\n };\r\n\r\n /**\r\n * ByteBuffer version.\r\n * @type {string}\r\n * @const\r\n * @expose\r\n */\r\n ByteBuffer.VERSION = \"5.0.1\";\r\n\r\n /**\r\n * Little endian constant that can be used instead of its boolean value. Evaluates to `true`.\r\n * @type {boolean}\r\n * @const\r\n * @expose\r\n */\r\n ByteBuffer.LITTLE_ENDIAN = true;\r\n\r\n /**\r\n * Big endian constant that can be used instead of its boolean value. Evaluates to `false`.\r\n * @type {boolean}\r\n * @const\r\n * @expose\r\n */\r\n ByteBuffer.BIG_ENDIAN = false;\r\n\r\n /**\r\n * Default initial capacity of `16`.\r\n * @type {number}\r\n * @expose\r\n */\r\n ByteBuffer.DEFAULT_CAPACITY = 16;\r\n\r\n /**\r\n * Default endianess of `false` for big endian.\r\n * @type {boolean}\r\n * @expose\r\n */\r\n ByteBuffer.DEFAULT_ENDIAN = ByteBuffer.BIG_ENDIAN;\r\n\r\n /**\r\n * Default no assertions flag of `false`.\r\n * @type {boolean}\r\n * @expose\r\n */\r\n ByteBuffer.DEFAULT_NOASSERT = false;\r\n\r\n /**\r\n * A `Long` class for representing a 64-bit two's-complement integer value. May be `null` if Long.js has not been loaded\r\n * and int64 support is not available.\r\n * @type {?Long}\r\n * @const\r\n * @see https://github.com/dcodeIO/long.js\r\n * @expose\r\n */\r\n ByteBuffer.Long = Long || null;\r\n\r\n /**\r\n * @alias ByteBuffer.prototype\r\n * @inner\r\n */\r\n var ByteBufferPrototype = ByteBuffer.prototype;\r\n\r\n /**\r\n * An indicator used to reliably determine if an object is a ByteBuffer or not.\r\n * @type {boolean}\r\n * @const\r\n * @expose\r\n * @private\r\n */\r\n ByteBufferPrototype.__isByteBuffer__;\r\n\r\n Object.defineProperty(ByteBufferPrototype, \"__isByteBuffer__\", {\r\n value: true,\r\n enumerable: false,\r\n configurable: false\r\n });\r\n\r\n // helpers\r\n\r\n /**\r\n * @type {!ArrayBuffer}\r\n * @inner\r\n */\r\n var EMPTY_BUFFER = new ArrayBuffer(0);\r\n\r\n /**\r\n * String.fromCharCode reference for compile-time renaming.\r\n * @type {function(...number):string}\r\n * @inner\r\n */\r\n var stringFromCharCode = String.fromCharCode;\r\n\r\n /**\r\n * Creates a source function for a string.\r\n * @param {string} s String to read from\r\n * @returns {function():number|null} Source function returning the next char code respectively `null` if there are\r\n * no more characters left.\r\n * @throws {TypeError} If the argument is invalid\r\n * @inner\r\n */\r\n function stringSource(s) {\r\n var i=0; return function() {\r\n return i < s.length ? s.charCodeAt(i++) : null;\r\n };\r\n }\r\n\r\n /**\r\n * Creates a destination function for a string.\r\n * @returns {function(number=):undefined|string} Destination function successively called with the next char code.\r\n * Returns the final string when called without arguments.\r\n * @inner\r\n */\r\n function stringDestination() {\r\n var cs = [], ps = []; return function() {\r\n if (arguments.length === 0)\r\n return ps.join('')+stringFromCharCode.apply(String, cs);\r\n if (cs.length + arguments.length > 1024)\r\n ps.push(stringFromCharCode.apply(String, cs)),\r\n cs.length = 0;\r\n Array.prototype.push.apply(cs, arguments);\r\n };\r\n }\r\n\r\n /**\r\n * Gets the accessor type.\r\n * @returns {Function} `Buffer` under node.js, `Uint8Array` respectively `DataView` in the browser (classes)\r\n * @expose\r\n */\r\n ByteBuffer.accessor = function() {\r\n return Uint8Array;\r\n };\r\n /**\r\n * Allocates a new ByteBuffer backed by a buffer of the specified capacity.\r\n * @param {number=} capacity Initial capacity. Defaults to {@link ByteBuffer.DEFAULT_CAPACITY}.\r\n * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to\r\n * {@link ByteBuffer.DEFAULT_ENDIAN}.\r\n * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to\r\n * {@link ByteBuffer.DEFAULT_NOASSERT}.\r\n * @returns {!ByteBuffer}\r\n * @expose\r\n */\r\n ByteBuffer.allocate = function(capacity, littleEndian, noAssert) {\r\n return new ByteBuffer(capacity, littleEndian, noAssert);\r\n };\r\n\r\n /**\r\n * Concatenates multiple ByteBuffers into one.\r\n * @param {!Array.} buffers Buffers to concatenate\r\n * @param {(string|boolean)=} encoding String encoding if `buffers` contains a string (\"base64\", \"hex\", \"binary\",\r\n * defaults to \"utf8\")\r\n * @param {boolean=} littleEndian Whether to use little or big endian byte order for the resulting ByteBuffer. Defaults\r\n * to {@link ByteBuffer.DEFAULT_ENDIAN}.\r\n * @param {boolean=} noAssert Whether to skip assertions of offsets and values for the resulting ByteBuffer. Defaults to\r\n * {@link ByteBuffer.DEFAULT_NOASSERT}.\r\n * @returns {!ByteBuffer} Concatenated ByteBuffer\r\n * @expose\r\n */\r\n ByteBuffer.concat = function(buffers, encoding, littleEndian, noAssert) {\r\n if (typeof encoding === 'boolean' || typeof encoding !== 'string') {\r\n noAssert = littleEndian;\r\n littleEndian = encoding;\r\n encoding = undefined;\r\n }\r\n var capacity = 0;\r\n for (var i=0, k=buffers.length, length; i 0) capacity += length;\r\n }\r\n if (capacity === 0)\r\n return new ByteBuffer(0, littleEndian, noAssert);\r\n var bb = new ByteBuffer(capacity, littleEndian, noAssert),\r\n bi;\r\n i=0; while (i} buffer Anything that can be wrapped\r\n * @param {(string|boolean)=} encoding String encoding if `buffer` is a string (\"base64\", \"hex\", \"binary\", defaults to\r\n * \"utf8\")\r\n * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to\r\n * {@link ByteBuffer.DEFAULT_ENDIAN}.\r\n * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to\r\n * {@link ByteBuffer.DEFAULT_NOASSERT}.\r\n * @returns {!ByteBuffer} A ByteBuffer wrapping `buffer`\r\n * @expose\r\n */\r\n ByteBuffer.wrap = function(buffer, encoding, littleEndian, noAssert) {\r\n if (typeof encoding !== 'string') {\r\n noAssert = littleEndian;\r\n littleEndian = encoding;\r\n encoding = undefined;\r\n }\r\n if (typeof buffer === 'string') {\r\n if (typeof encoding === 'undefined')\r\n encoding = \"utf8\";\r\n switch (encoding) {\r\n case \"base64\":\r\n return ByteBuffer.fromBase64(buffer, littleEndian);\r\n case \"hex\":\r\n return ByteBuffer.fromHex(buffer, littleEndian);\r\n case \"binary\":\r\n return ByteBuffer.fromBinary(buffer, littleEndian);\r\n case \"utf8\":\r\n return ByteBuffer.fromUTF8(buffer, littleEndian);\r\n case \"debug\":\r\n return ByteBuffer.fromDebug(buffer, littleEndian);\r\n default:\r\n throw Error(\"Unsupported encoding: \"+encoding);\r\n }\r\n }\r\n if (buffer === null || typeof buffer !== 'object')\r\n throw TypeError(\"Illegal buffer\");\r\n var bb;\r\n if (ByteBuffer.isByteBuffer(buffer)) {\r\n bb = ByteBufferPrototype.clone.call(buffer);\r\n bb.markedOffset = -1;\r\n return bb;\r\n }\r\n if (buffer instanceof Uint8Array) { // Extract ArrayBuffer from Uint8Array\r\n bb = new ByteBuffer(0, littleEndian, noAssert);\r\n if (buffer.length > 0) { // Avoid references to more than one EMPTY_BUFFER\r\n bb.buffer = buffer.buffer;\r\n bb.offset = buffer.byteOffset;\r\n bb.limit = buffer.byteOffset + buffer.byteLength;\r\n bb.view = new Uint8Array(buffer.buffer);\r\n }\r\n } else if (buffer instanceof ArrayBuffer) { // Reuse ArrayBuffer\r\n bb = new ByteBuffer(0, littleEndian, noAssert);\r\n if (buffer.byteLength > 0) {\r\n bb.buffer = buffer;\r\n bb.offset = 0;\r\n bb.limit = buffer.byteLength;\r\n bb.view = buffer.byteLength > 0 ? new Uint8Array(buffer) : null;\r\n }\r\n } else if (Object.prototype.toString.call(buffer) === \"[object Array]\") { // Create from octets\r\n bb = new ByteBuffer(buffer.length, littleEndian, noAssert);\r\n bb.limit = buffer.length;\r\n for (var i=0; i} value Array of booleans to write\r\n * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `length` if omitted.\r\n * @returns {!ByteBuffer}\r\n * @expose\r\n */\r\n ByteBufferPrototype.writeBitSet = function(value, offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (!(value instanceof Array))\r\n throw TypeError(\"Illegal BitSet: Not an array\");\r\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 0 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n }\r\n\r\n var start = offset,\r\n bits = value.length,\r\n bytes = (bits >> 3),\r\n bit = 0,\r\n k;\r\n\r\n offset += this.writeVarint32(bits,offset);\r\n\r\n while(bytes--) {\r\n k = (!!value[bit++] & 1) |\r\n ((!!value[bit++] & 1) << 1) |\r\n ((!!value[bit++] & 1) << 2) |\r\n ((!!value[bit++] & 1) << 3) |\r\n ((!!value[bit++] & 1) << 4) |\r\n ((!!value[bit++] & 1) << 5) |\r\n ((!!value[bit++] & 1) << 6) |\r\n ((!!value[bit++] & 1) << 7);\r\n this.writeByte(k,offset++);\r\n }\r\n\r\n if(bit < bits) {\r\n var m = 0; k = 0;\r\n while(bit < bits) k = k | ((!!value[bit++] & 1) << (m++));\r\n this.writeByte(k,offset++);\r\n }\r\n\r\n if (relative) {\r\n this.offset = offset;\r\n return this;\r\n }\r\n return offset - start;\r\n }\r\n\r\n /**\r\n * Reads a BitSet as an array of booleans.\r\n * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `length` if omitted.\r\n * @returns {Array\r\n * @expose\r\n */\r\n ByteBufferPrototype.readBitSet = function(offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n\r\n var ret = this.readVarint32(offset),\r\n bits = ret.value,\r\n bytes = (bits >> 3),\r\n bit = 0,\r\n value = [],\r\n k;\r\n\r\n offset += ret.length;\r\n\r\n while(bytes--) {\r\n k = this.readByte(offset++);\r\n value[bit++] = !!(k & 0x01);\r\n value[bit++] = !!(k & 0x02);\r\n value[bit++] = !!(k & 0x04);\r\n value[bit++] = !!(k & 0x08);\r\n value[bit++] = !!(k & 0x10);\r\n value[bit++] = !!(k & 0x20);\r\n value[bit++] = !!(k & 0x40);\r\n value[bit++] = !!(k & 0x80);\r\n }\r\n\r\n if(bit < bits) {\r\n var m = 0;\r\n k = this.readByte(offset++);\r\n while(bit < bits) value[bit++] = !!((k >> (m++)) & 1);\r\n }\r\n\r\n if (relative) {\r\n this.offset = offset;\r\n }\r\n return value;\r\n }\r\n /**\r\n * Reads the specified number of bytes.\r\n * @param {number} length Number of bytes to read\r\n * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `length` if omitted.\r\n * @returns {!ByteBuffer}\r\n * @expose\r\n */\r\n ByteBufferPrototype.readBytes = function(length, offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + length > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+length+\") <= \"+this.buffer.byteLength);\n }\r\n var slice = this.slice(offset, offset + length);\r\n if (relative) this.offset += length;\n return slice;\r\n };\r\n\r\n /**\r\n * Writes a payload of bytes. This is an alias of {@link ByteBuffer#append}.\r\n * @function\r\n * @param {!ByteBuffer|!ArrayBuffer|!Uint8Array|string} source Data to write. If `source` is a ByteBuffer, its offsets\r\n * will be modified according to the performed read operation.\r\n * @param {(string|number)=} encoding Encoding if `data` is a string (\"base64\", \"hex\", \"binary\", defaults to \"utf8\")\r\n * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes\r\n * written if omitted.\r\n * @returns {!ByteBuffer} this\r\n * @expose\r\n */\r\n ByteBufferPrototype.writeBytes = ByteBufferPrototype.append;\r\n\r\n // types/ints/int8\r\n\r\n /**\r\n * Writes an 8bit signed integer.\r\n * @param {number} value Value to write\r\n * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `1` if omitted.\r\n * @returns {!ByteBuffer} this\r\n * @expose\r\n */\r\n ByteBufferPrototype.writeInt8 = function(value, offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (typeof value !== 'number' || value % 1 !== 0)\n throw TypeError(\"Illegal value: \"+value+\" (not an integer)\");\n value |= 0;\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 0 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n }\r\n offset += 1;\n var capacity0 = this.buffer.byteLength;\n if (offset > capacity0)\n this.resize((capacity0 *= 2) > offset ? capacity0 : offset);\n offset -= 1;\n this.view[offset] = value;\r\n if (relative) this.offset += 1;\n return this;\r\n };\r\n\r\n /**\r\n * Writes an 8bit signed integer. This is an alias of {@link ByteBuffer#writeInt8}.\r\n * @function\r\n * @param {number} value Value to write\r\n * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `1` if omitted.\r\n * @returns {!ByteBuffer} this\r\n * @expose\r\n */\r\n ByteBufferPrototype.writeByte = ByteBufferPrototype.writeInt8;\r\n\r\n /**\r\n * Reads an 8bit signed integer.\r\n * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `1` if omitted.\r\n * @returns {number} Value read\r\n * @expose\r\n */\r\n ByteBufferPrototype.readInt8 = function(offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 1 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+1+\") <= \"+this.buffer.byteLength);\n }\r\n var value = this.view[offset];\r\n if ((value & 0x80) === 0x80) value = -(0xFF - value + 1); // Cast to signed\r\n if (relative) this.offset += 1;\n return value;\r\n };\r\n\r\n /**\r\n * Reads an 8bit signed integer. This is an alias of {@link ByteBuffer#readInt8}.\r\n * @function\r\n * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `1` if omitted.\r\n * @returns {number} Value read\r\n * @expose\r\n */\r\n ByteBufferPrototype.readByte = ByteBufferPrototype.readInt8;\r\n\r\n /**\r\n * Writes an 8bit unsigned integer.\r\n * @param {number} value Value to write\r\n * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `1` if omitted.\r\n * @returns {!ByteBuffer} this\r\n * @expose\r\n */\r\n ByteBufferPrototype.writeUint8 = function(value, offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (typeof value !== 'number' || value % 1 !== 0)\n throw TypeError(\"Illegal value: \"+value+\" (not an integer)\");\n value >>>= 0;\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 0 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n }\r\n offset += 1;\n var capacity1 = this.buffer.byteLength;\n if (offset > capacity1)\n this.resize((capacity1 *= 2) > offset ? capacity1 : offset);\n offset -= 1;\n this.view[offset] = value;\r\n if (relative) this.offset += 1;\n return this;\r\n };\r\n\r\n /**\r\n * Writes an 8bit unsigned integer. This is an alias of {@link ByteBuffer#writeUint8}.\r\n * @function\r\n * @param {number} value Value to write\r\n * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `1` if omitted.\r\n * @returns {!ByteBuffer} this\r\n * @expose\r\n */\r\n ByteBufferPrototype.writeUInt8 = ByteBufferPrototype.writeUint8;\r\n\r\n /**\r\n * Reads an 8bit unsigned integer.\r\n * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `1` if omitted.\r\n * @returns {number} Value read\r\n * @expose\r\n */\r\n ByteBufferPrototype.readUint8 = function(offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 1 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+1+\") <= \"+this.buffer.byteLength);\n }\r\n var value = this.view[offset];\r\n if (relative) this.offset += 1;\n return value;\r\n };\r\n\r\n /**\r\n * Reads an 8bit unsigned integer. This is an alias of {@link ByteBuffer#readUint8}.\r\n * @function\r\n * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `1` if omitted.\r\n * @returns {number} Value read\r\n * @expose\r\n */\r\n ByteBufferPrototype.readUInt8 = ByteBufferPrototype.readUint8;\r\n\r\n // types/ints/int16\r\n\r\n /**\r\n * Writes a 16bit signed integer.\r\n * @param {number} value Value to write\r\n * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `2` if omitted.\r\n * @throws {TypeError} If `offset` or `value` is not a valid number\r\n * @throws {RangeError} If `offset` is out of bounds\r\n * @expose\r\n */\r\n ByteBufferPrototype.writeInt16 = function(value, offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (typeof value !== 'number' || value % 1 !== 0)\n throw TypeError(\"Illegal value: \"+value+\" (not an integer)\");\n value |= 0;\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 0 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n }\r\n offset += 2;\n var capacity2 = this.buffer.byteLength;\n if (offset > capacity2)\n this.resize((capacity2 *= 2) > offset ? capacity2 : offset);\n offset -= 2;\n if (this.littleEndian) {\r\n this.view[offset+1] = (value & 0xFF00) >>> 8;\r\n this.view[offset ] = value & 0x00FF;\r\n } else {\r\n this.view[offset] = (value & 0xFF00) >>> 8;\r\n this.view[offset+1] = value & 0x00FF;\r\n }\r\n if (relative) this.offset += 2;\n return this;\r\n };\r\n\r\n /**\r\n * Writes a 16bit signed integer. This is an alias of {@link ByteBuffer#writeInt16}.\r\n * @function\r\n * @param {number} value Value to write\r\n * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `2` if omitted.\r\n * @throws {TypeError} If `offset` or `value` is not a valid number\r\n * @throws {RangeError} If `offset` is out of bounds\r\n * @expose\r\n */\r\n ByteBufferPrototype.writeShort = ByteBufferPrototype.writeInt16;\r\n\r\n /**\r\n * Reads a 16bit signed integer.\r\n * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `2` if omitted.\r\n * @returns {number} Value read\r\n * @throws {TypeError} If `offset` is not a valid number\r\n * @throws {RangeError} If `offset` is out of bounds\r\n * @expose\r\n */\r\n ByteBufferPrototype.readInt16 = function(offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 2 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+2+\") <= \"+this.buffer.byteLength);\n }\r\n var value = 0;\r\n if (this.littleEndian) {\r\n value = this.view[offset ];\r\n value |= this.view[offset+1] << 8;\r\n } else {\r\n value = this.view[offset ] << 8;\r\n value |= this.view[offset+1];\r\n }\r\n if ((value & 0x8000) === 0x8000) value = -(0xFFFF - value + 1); // Cast to signed\r\n if (relative) this.offset += 2;\n return value;\r\n };\r\n\r\n /**\r\n * Reads a 16bit signed integer. This is an alias of {@link ByteBuffer#readInt16}.\r\n * @function\r\n * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `2` if omitted.\r\n * @returns {number} Value read\r\n * @throws {TypeError} If `offset` is not a valid number\r\n * @throws {RangeError} If `offset` is out of bounds\r\n * @expose\r\n */\r\n ByteBufferPrototype.readShort = ByteBufferPrototype.readInt16;\r\n\r\n /**\r\n * Writes a 16bit unsigned integer.\r\n * @param {number} value Value to write\r\n * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `2` if omitted.\r\n * @throws {TypeError} If `offset` or `value` is not a valid number\r\n * @throws {RangeError} If `offset` is out of bounds\r\n * @expose\r\n */\r\n ByteBufferPrototype.writeUint16 = function(value, offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (typeof value !== 'number' || value % 1 !== 0)\n throw TypeError(\"Illegal value: \"+value+\" (not an integer)\");\n value >>>= 0;\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 0 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n }\r\n offset += 2;\n var capacity3 = this.buffer.byteLength;\n if (offset > capacity3)\n this.resize((capacity3 *= 2) > offset ? capacity3 : offset);\n offset -= 2;\n if (this.littleEndian) {\r\n this.view[offset+1] = (value & 0xFF00) >>> 8;\r\n this.view[offset ] = value & 0x00FF;\r\n } else {\r\n this.view[offset] = (value & 0xFF00) >>> 8;\r\n this.view[offset+1] = value & 0x00FF;\r\n }\r\n if (relative) this.offset += 2;\n return this;\r\n };\r\n\r\n /**\r\n * Writes a 16bit unsigned integer. This is an alias of {@link ByteBuffer#writeUint16}.\r\n * @function\r\n * @param {number} value Value to write\r\n * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `2` if omitted.\r\n * @throws {TypeError} If `offset` or `value` is not a valid number\r\n * @throws {RangeError} If `offset` is out of bounds\r\n * @expose\r\n */\r\n ByteBufferPrototype.writeUInt16 = ByteBufferPrototype.writeUint16;\r\n\r\n /**\r\n * Reads a 16bit unsigned integer.\r\n * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `2` if omitted.\r\n * @returns {number} Value read\r\n * @throws {TypeError} If `offset` is not a valid number\r\n * @throws {RangeError} If `offset` is out of bounds\r\n * @expose\r\n */\r\n ByteBufferPrototype.readUint16 = function(offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 2 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+2+\") <= \"+this.buffer.byteLength);\n }\r\n var value = 0;\r\n if (this.littleEndian) {\r\n value = this.view[offset ];\r\n value |= this.view[offset+1] << 8;\r\n } else {\r\n value = this.view[offset ] << 8;\r\n value |= this.view[offset+1];\r\n }\r\n if (relative) this.offset += 2;\n return value;\r\n };\r\n\r\n /**\r\n * Reads a 16bit unsigned integer. This is an alias of {@link ByteBuffer#readUint16}.\r\n * @function\r\n * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `2` if omitted.\r\n * @returns {number} Value read\r\n * @throws {TypeError} If `offset` is not a valid number\r\n * @throws {RangeError} If `offset` is out of bounds\r\n * @expose\r\n */\r\n ByteBufferPrototype.readUInt16 = ByteBufferPrototype.readUint16;\r\n\r\n // types/ints/int32\r\n\r\n /**\r\n * Writes a 32bit signed integer.\r\n * @param {number} value Value to write\r\n * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted.\r\n * @expose\r\n */\r\n ByteBufferPrototype.writeInt32 = function(value, offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (typeof value !== 'number' || value % 1 !== 0)\n throw TypeError(\"Illegal value: \"+value+\" (not an integer)\");\n value |= 0;\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 0 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n }\r\n offset += 4;\n var capacity4 = this.buffer.byteLength;\n if (offset > capacity4)\n this.resize((capacity4 *= 2) > offset ? capacity4 : offset);\n offset -= 4;\n if (this.littleEndian) {\n this.view[offset+3] = (value >>> 24) & 0xFF;\n this.view[offset+2] = (value >>> 16) & 0xFF;\n this.view[offset+1] = (value >>> 8) & 0xFF;\n this.view[offset ] = value & 0xFF;\n } else {\n this.view[offset ] = (value >>> 24) & 0xFF;\n this.view[offset+1] = (value >>> 16) & 0xFF;\n this.view[offset+2] = (value >>> 8) & 0xFF;\n this.view[offset+3] = value & 0xFF;\n }\n if (relative) this.offset += 4;\n return this;\r\n };\r\n\r\n /**\r\n * Writes a 32bit signed integer. This is an alias of {@link ByteBuffer#writeInt32}.\r\n * @param {number} value Value to write\r\n * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted.\r\n * @expose\r\n */\r\n ByteBufferPrototype.writeInt = ByteBufferPrototype.writeInt32;\r\n\r\n /**\r\n * Reads a 32bit signed integer.\r\n * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `4` if omitted.\r\n * @returns {number} Value read\r\n * @expose\r\n */\r\n ByteBufferPrototype.readInt32 = function(offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 4 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+4+\") <= \"+this.buffer.byteLength);\n }\r\n var value = 0;\r\n if (this.littleEndian) {\n value = this.view[offset+2] << 16;\n value |= this.view[offset+1] << 8;\n value |= this.view[offset ];\n value += this.view[offset+3] << 24 >>> 0;\n } else {\n value = this.view[offset+1] << 16;\n value |= this.view[offset+2] << 8;\n value |= this.view[offset+3];\n value += this.view[offset ] << 24 >>> 0;\n }\n value |= 0; // Cast to signed\r\n if (relative) this.offset += 4;\n return value;\r\n };\r\n\r\n /**\r\n * Reads a 32bit signed integer. This is an alias of {@link ByteBuffer#readInt32}.\r\n * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `4` if omitted.\r\n * @returns {number} Value read\r\n * @expose\r\n */\r\n ByteBufferPrototype.readInt = ByteBufferPrototype.readInt32;\r\n\r\n /**\r\n * Writes a 32bit unsigned integer.\r\n * @param {number} value Value to write\r\n * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted.\r\n * @expose\r\n */\r\n ByteBufferPrototype.writeUint32 = function(value, offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (typeof value !== 'number' || value % 1 !== 0)\n throw TypeError(\"Illegal value: \"+value+\" (not an integer)\");\n value >>>= 0;\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 0 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n }\r\n offset += 4;\n var capacity5 = this.buffer.byteLength;\n if (offset > capacity5)\n this.resize((capacity5 *= 2) > offset ? capacity5 : offset);\n offset -= 4;\n if (this.littleEndian) {\n this.view[offset+3] = (value >>> 24) & 0xFF;\n this.view[offset+2] = (value >>> 16) & 0xFF;\n this.view[offset+1] = (value >>> 8) & 0xFF;\n this.view[offset ] = value & 0xFF;\n } else {\n this.view[offset ] = (value >>> 24) & 0xFF;\n this.view[offset+1] = (value >>> 16) & 0xFF;\n this.view[offset+2] = (value >>> 8) & 0xFF;\n this.view[offset+3] = value & 0xFF;\n }\n if (relative) this.offset += 4;\n return this;\r\n };\r\n\r\n /**\r\n * Writes a 32bit unsigned integer. This is an alias of {@link ByteBuffer#writeUint32}.\r\n * @function\r\n * @param {number} value Value to write\r\n * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted.\r\n * @expose\r\n */\r\n ByteBufferPrototype.writeUInt32 = ByteBufferPrototype.writeUint32;\r\n\r\n /**\r\n * Reads a 32bit unsigned integer.\r\n * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `4` if omitted.\r\n * @returns {number} Value read\r\n * @expose\r\n */\r\n ByteBufferPrototype.readUint32 = function(offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 4 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+4+\") <= \"+this.buffer.byteLength);\n }\r\n var value = 0;\r\n if (this.littleEndian) {\n value = this.view[offset+2] << 16;\n value |= this.view[offset+1] << 8;\n value |= this.view[offset ];\n value += this.view[offset+3] << 24 >>> 0;\n } else {\n value = this.view[offset+1] << 16;\n value |= this.view[offset+2] << 8;\n value |= this.view[offset+3];\n value += this.view[offset ] << 24 >>> 0;\n }\n if (relative) this.offset += 4;\n return value;\r\n };\r\n\r\n /**\r\n * Reads a 32bit unsigned integer. This is an alias of {@link ByteBuffer#readUint32}.\r\n * @function\r\n * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `4` if omitted.\r\n * @returns {number} Value read\r\n * @expose\r\n */\r\n ByteBufferPrototype.readUInt32 = ByteBufferPrototype.readUint32;\r\n\r\n // types/ints/int64\r\n\r\n if (Long) {\r\n\r\n /**\r\n * Writes a 64bit signed integer.\r\n * @param {number|!Long} value Value to write\r\n * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted.\r\n * @returns {!ByteBuffer} this\r\n * @expose\r\n */\r\n ByteBufferPrototype.writeInt64 = function(value, offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (typeof value === 'number')\n value = Long.fromNumber(value);\n else if (typeof value === 'string')\n value = Long.fromString(value);\n else if (!(value && value instanceof Long))\n throw TypeError(\"Illegal value: \"+value+\" (not an integer or Long)\");\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 0 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n }\r\n if (typeof value === 'number')\n value = Long.fromNumber(value);\n else if (typeof value === 'string')\n value = Long.fromString(value);\n offset += 8;\n var capacity6 = this.buffer.byteLength;\n if (offset > capacity6)\n this.resize((capacity6 *= 2) > offset ? capacity6 : offset);\n offset -= 8;\n var lo = value.low,\r\n hi = value.high;\r\n if (this.littleEndian) {\r\n this.view[offset+3] = (lo >>> 24) & 0xFF;\n this.view[offset+2] = (lo >>> 16) & 0xFF;\n this.view[offset+1] = (lo >>> 8) & 0xFF;\n this.view[offset ] = lo & 0xFF;\n offset += 4;\r\n this.view[offset+3] = (hi >>> 24) & 0xFF;\n this.view[offset+2] = (hi >>> 16) & 0xFF;\n this.view[offset+1] = (hi >>> 8) & 0xFF;\n this.view[offset ] = hi & 0xFF;\n } else {\r\n this.view[offset ] = (hi >>> 24) & 0xFF;\n this.view[offset+1] = (hi >>> 16) & 0xFF;\n this.view[offset+2] = (hi >>> 8) & 0xFF;\n this.view[offset+3] = hi & 0xFF;\n offset += 4;\r\n this.view[offset ] = (lo >>> 24) & 0xFF;\n this.view[offset+1] = (lo >>> 16) & 0xFF;\n this.view[offset+2] = (lo >>> 8) & 0xFF;\n this.view[offset+3] = lo & 0xFF;\n }\r\n if (relative) this.offset += 8;\n return this;\r\n };\r\n\r\n /**\r\n * Writes a 64bit signed integer. This is an alias of {@link ByteBuffer#writeInt64}.\r\n * @param {number|!Long} value Value to write\r\n * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted.\r\n * @returns {!ByteBuffer} this\r\n * @expose\r\n */\r\n ByteBufferPrototype.writeLong = ByteBufferPrototype.writeInt64;\r\n\r\n /**\r\n * Reads a 64bit signed integer.\r\n * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted.\r\n * @returns {!Long}\r\n * @expose\r\n */\r\n ByteBufferPrototype.readInt64 = function(offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 8 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+8+\") <= \"+this.buffer.byteLength);\n }\r\n var lo = 0,\r\n hi = 0;\r\n if (this.littleEndian) {\r\n lo = this.view[offset+2] << 16;\n lo |= this.view[offset+1] << 8;\n lo |= this.view[offset ];\n lo += this.view[offset+3] << 24 >>> 0;\n offset += 4;\r\n hi = this.view[offset+2] << 16;\n hi |= this.view[offset+1] << 8;\n hi |= this.view[offset ];\n hi += this.view[offset+3] << 24 >>> 0;\n } else {\r\n hi = this.view[offset+1] << 16;\n hi |= this.view[offset+2] << 8;\n hi |= this.view[offset+3];\n hi += this.view[offset ] << 24 >>> 0;\n offset += 4;\r\n lo = this.view[offset+1] << 16;\n lo |= this.view[offset+2] << 8;\n lo |= this.view[offset+3];\n lo += this.view[offset ] << 24 >>> 0;\n }\r\n var value = new Long(lo, hi, false);\r\n if (relative) this.offset += 8;\n return value;\r\n };\r\n\r\n /**\r\n * Reads a 64bit signed integer. This is an alias of {@link ByteBuffer#readInt64}.\r\n * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted.\r\n * @returns {!Long}\r\n * @expose\r\n */\r\n ByteBufferPrototype.readLong = ByteBufferPrototype.readInt64;\r\n\r\n /**\r\n * Writes a 64bit unsigned integer.\r\n * @param {number|!Long} value Value to write\r\n * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted.\r\n * @returns {!ByteBuffer} this\r\n * @expose\r\n */\r\n ByteBufferPrototype.writeUint64 = function(value, offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (typeof value === 'number')\n value = Long.fromNumber(value);\n else if (typeof value === 'string')\n value = Long.fromString(value);\n else if (!(value && value instanceof Long))\n throw TypeError(\"Illegal value: \"+value+\" (not an integer or Long)\");\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 0 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n }\r\n if (typeof value === 'number')\n value = Long.fromNumber(value);\n else if (typeof value === 'string')\n value = Long.fromString(value);\n offset += 8;\n var capacity7 = this.buffer.byteLength;\n if (offset > capacity7)\n this.resize((capacity7 *= 2) > offset ? capacity7 : offset);\n offset -= 8;\n var lo = value.low,\r\n hi = value.high;\r\n if (this.littleEndian) {\r\n this.view[offset+3] = (lo >>> 24) & 0xFF;\n this.view[offset+2] = (lo >>> 16) & 0xFF;\n this.view[offset+1] = (lo >>> 8) & 0xFF;\n this.view[offset ] = lo & 0xFF;\n offset += 4;\r\n this.view[offset+3] = (hi >>> 24) & 0xFF;\n this.view[offset+2] = (hi >>> 16) & 0xFF;\n this.view[offset+1] = (hi >>> 8) & 0xFF;\n this.view[offset ] = hi & 0xFF;\n } else {\r\n this.view[offset ] = (hi >>> 24) & 0xFF;\n this.view[offset+1] = (hi >>> 16) & 0xFF;\n this.view[offset+2] = (hi >>> 8) & 0xFF;\n this.view[offset+3] = hi & 0xFF;\n offset += 4;\r\n this.view[offset ] = (lo >>> 24) & 0xFF;\n this.view[offset+1] = (lo >>> 16) & 0xFF;\n this.view[offset+2] = (lo >>> 8) & 0xFF;\n this.view[offset+3] = lo & 0xFF;\n }\r\n if (relative) this.offset += 8;\n return this;\r\n };\r\n\r\n /**\r\n * Writes a 64bit unsigned integer. This is an alias of {@link ByteBuffer#writeUint64}.\r\n * @function\r\n * @param {number|!Long} value Value to write\r\n * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted.\r\n * @returns {!ByteBuffer} this\r\n * @expose\r\n */\r\n ByteBufferPrototype.writeUInt64 = ByteBufferPrototype.writeUint64;\r\n\r\n /**\r\n * Reads a 64bit unsigned integer.\r\n * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted.\r\n * @returns {!Long}\r\n * @expose\r\n */\r\n ByteBufferPrototype.readUint64 = function(offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 8 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+8+\") <= \"+this.buffer.byteLength);\n }\r\n var lo = 0,\r\n hi = 0;\r\n if (this.littleEndian) {\r\n lo = this.view[offset+2] << 16;\n lo |= this.view[offset+1] << 8;\n lo |= this.view[offset ];\n lo += this.view[offset+3] << 24 >>> 0;\n offset += 4;\r\n hi = this.view[offset+2] << 16;\n hi |= this.view[offset+1] << 8;\n hi |= this.view[offset ];\n hi += this.view[offset+3] << 24 >>> 0;\n } else {\r\n hi = this.view[offset+1] << 16;\n hi |= this.view[offset+2] << 8;\n hi |= this.view[offset+3];\n hi += this.view[offset ] << 24 >>> 0;\n offset += 4;\r\n lo = this.view[offset+1] << 16;\n lo |= this.view[offset+2] << 8;\n lo |= this.view[offset+3];\n lo += this.view[offset ] << 24 >>> 0;\n }\r\n var value = new Long(lo, hi, true);\r\n if (relative) this.offset += 8;\n return value;\r\n };\r\n\r\n /**\r\n * Reads a 64bit unsigned integer. This is an alias of {@link ByteBuffer#readUint64}.\r\n * @function\r\n * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted.\r\n * @returns {!Long}\r\n * @expose\r\n */\r\n ByteBufferPrototype.readUInt64 = ByteBufferPrototype.readUint64;\r\n\r\n } // Long\r\n\r\n\r\n // types/floats/float32\r\n\r\n /*\r\n ieee754 - https://github.com/feross/ieee754\r\n\r\n The MIT License (MIT)\r\n\r\n Copyright (c) Feross Aboukhadijeh\r\n\r\n Permission is hereby granted, free of charge, to any person obtaining a copy\r\n of this software and associated documentation files (the \"Software\"), to deal\r\n in the Software without restriction, including without limitation the rights\r\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n copies of the Software, and to permit persons to whom the Software is\r\n furnished to do so, subject to the following conditions:\r\n\r\n The above copyright notice and this permission notice shall be included in\r\n all copies or substantial portions of the Software.\r\n\r\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n THE SOFTWARE.\r\n */\r\n\r\n /**\r\n * Reads an IEEE754 float from a byte array.\r\n * @param {!Array} buffer\r\n * @param {number} offset\r\n * @param {boolean} isLE\r\n * @param {number} mLen\r\n * @param {number} nBytes\r\n * @returns {number}\r\n * @inner\r\n */\r\n function ieee754_read(buffer, offset, isLE, mLen, nBytes) {\r\n var e, m,\r\n eLen = nBytes * 8 - mLen - 1,\r\n eMax = (1 << eLen) - 1,\r\n eBias = eMax >> 1,\r\n nBits = -7,\r\n i = isLE ? (nBytes - 1) : 0,\r\n d = isLE ? -1 : 1,\r\n s = buffer[offset + i];\r\n\r\n i += d;\r\n\r\n e = s & ((1 << (-nBits)) - 1);\r\n s >>= (-nBits);\r\n nBits += eLen;\r\n for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}\r\n\r\n m = e & ((1 << (-nBits)) - 1);\r\n e >>= (-nBits);\r\n nBits += mLen;\r\n for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}\r\n\r\n if (e === 0) {\r\n e = 1 - eBias;\r\n } else if (e === eMax) {\r\n return m ? NaN : ((s ? -1 : 1) * Infinity);\r\n } else {\r\n m = m + Math.pow(2, mLen);\r\n e = e - eBias;\r\n }\r\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen);\r\n }\r\n\r\n /**\r\n * Writes an IEEE754 float to a byte array.\r\n * @param {!Array} buffer\r\n * @param {number} value\r\n * @param {number} offset\r\n * @param {boolean} isLE\r\n * @param {number} mLen\r\n * @param {number} nBytes\r\n * @inner\r\n */\r\n function ieee754_write(buffer, value, offset, isLE, mLen, nBytes) {\r\n var e, m, c,\r\n eLen = nBytes * 8 - mLen - 1,\r\n eMax = (1 << eLen) - 1,\r\n eBias = eMax >> 1,\r\n rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0),\r\n i = isLE ? 0 : (nBytes - 1),\r\n d = isLE ? 1 : -1,\r\n s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0;\r\n\r\n value = Math.abs(value);\r\n\r\n if (isNaN(value) || value === Infinity) {\r\n m = isNaN(value) ? 1 : 0;\r\n e = eMax;\r\n } else {\r\n e = Math.floor(Math.log(value) / Math.LN2);\r\n if (value * (c = Math.pow(2, -e)) < 1) {\r\n e--;\r\n c *= 2;\r\n }\r\n if (e + eBias >= 1) {\r\n value += rt / c;\r\n } else {\r\n value += rt * Math.pow(2, 1 - eBias);\r\n }\r\n if (value * c >= 2) {\r\n e++;\r\n c /= 2;\r\n }\r\n\r\n if (e + eBias >= eMax) {\r\n m = 0;\r\n e = eMax;\r\n } else if (e + eBias >= 1) {\r\n m = (value * c - 1) * Math.pow(2, mLen);\r\n e = e + eBias;\r\n } else {\r\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);\r\n e = 0;\r\n }\r\n }\r\n\r\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\r\n\r\n e = (e << mLen) | m;\r\n eLen += mLen;\r\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\r\n\r\n buffer[offset + i - d] |= s * 128;\r\n }\r\n\r\n /**\r\n * Writes a 32bit float.\r\n * @param {number} value Value to write\r\n * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted.\r\n * @returns {!ByteBuffer} this\r\n * @expose\r\n */\r\n ByteBufferPrototype.writeFloat32 = function(value, offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (typeof value !== 'number')\r\n throw TypeError(\"Illegal value: \"+value+\" (not a number)\");\r\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 0 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n }\r\n offset += 4;\n var capacity8 = this.buffer.byteLength;\n if (offset > capacity8)\n this.resize((capacity8 *= 2) > offset ? capacity8 : offset);\n offset -= 4;\n ieee754_write(this.view, value, offset, this.littleEndian, 23, 4);\r\n if (relative) this.offset += 4;\n return this;\r\n };\r\n\r\n /**\r\n * Writes a 32bit float. This is an alias of {@link ByteBuffer#writeFloat32}.\r\n * @function\r\n * @param {number} value Value to write\r\n * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted.\r\n * @returns {!ByteBuffer} this\r\n * @expose\r\n */\r\n ByteBufferPrototype.writeFloat = ByteBufferPrototype.writeFloat32;\r\n\r\n /**\r\n * Reads a 32bit float.\r\n * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `4` if omitted.\r\n * @returns {number}\r\n * @expose\r\n */\r\n ByteBufferPrototype.readFloat32 = function(offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 4 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+4+\") <= \"+this.buffer.byteLength);\n }\r\n var value = ieee754_read(this.view, offset, this.littleEndian, 23, 4);\r\n if (relative) this.offset += 4;\n return value;\r\n };\r\n\r\n /**\r\n * Reads a 32bit float. This is an alias of {@link ByteBuffer#readFloat32}.\r\n * @function\r\n * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `4` if omitted.\r\n * @returns {number}\r\n * @expose\r\n */\r\n ByteBufferPrototype.readFloat = ByteBufferPrototype.readFloat32;\r\n\r\n // types/floats/float64\r\n\r\n /**\r\n * Writes a 64bit float.\r\n * @param {number} value Value to write\r\n * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted.\r\n * @returns {!ByteBuffer} this\r\n * @expose\r\n */\r\n ByteBufferPrototype.writeFloat64 = function(value, offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (typeof value !== 'number')\r\n throw TypeError(\"Illegal value: \"+value+\" (not a number)\");\r\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 0 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n }\r\n offset += 8;\n var capacity9 = this.buffer.byteLength;\n if (offset > capacity9)\n this.resize((capacity9 *= 2) > offset ? capacity9 : offset);\n offset -= 8;\n ieee754_write(this.view, value, offset, this.littleEndian, 52, 8);\r\n if (relative) this.offset += 8;\n return this;\r\n };\r\n\r\n /**\r\n * Writes a 64bit float. This is an alias of {@link ByteBuffer#writeFloat64}.\r\n * @function\r\n * @param {number} value Value to write\r\n * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted.\r\n * @returns {!ByteBuffer} this\r\n * @expose\r\n */\r\n ByteBufferPrototype.writeDouble = ByteBufferPrototype.writeFloat64;\r\n\r\n /**\r\n * Reads a 64bit float.\r\n * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted.\r\n * @returns {number}\r\n * @expose\r\n */\r\n ByteBufferPrototype.readFloat64 = function(offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 8 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+8+\") <= \"+this.buffer.byteLength);\n }\r\n var value = ieee754_read(this.view, offset, this.littleEndian, 52, 8);\r\n if (relative) this.offset += 8;\n return value;\r\n };\r\n\r\n /**\r\n * Reads a 64bit float. This is an alias of {@link ByteBuffer#readFloat64}.\r\n * @function\r\n * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted.\r\n * @returns {number}\r\n * @expose\r\n */\r\n ByteBufferPrototype.readDouble = ByteBufferPrototype.readFloat64;\r\n\r\n\r\n // types/varints/varint32\r\n\r\n /**\r\n * Maximum number of bytes required to store a 32bit base 128 variable-length integer.\r\n * @type {number}\r\n * @const\r\n * @expose\r\n */\r\n ByteBuffer.MAX_VARINT32_BYTES = 5;\r\n\r\n /**\r\n * Calculates the actual number of bytes required to store a 32bit base 128 variable-length integer.\r\n * @param {number} value Value to encode\r\n * @returns {number} Number of bytes required. Capped to {@link ByteBuffer.MAX_VARINT32_BYTES}\r\n * @expose\r\n */\r\n ByteBuffer.calculateVarint32 = function(value) {\r\n // ref: src/google/protobuf/io/coded_stream.cc\r\n value = value >>> 0;\r\n if (value < 1 << 7 ) return 1;\r\n else if (value < 1 << 14) return 2;\r\n else if (value < 1 << 21) return 3;\r\n else if (value < 1 << 28) return 4;\r\n else return 5;\r\n };\r\n\r\n /**\r\n * Zigzag encodes a signed 32bit integer so that it can be effectively used with varint encoding.\r\n * @param {number} n Signed 32bit integer\r\n * @returns {number} Unsigned zigzag encoded 32bit integer\r\n * @expose\r\n */\r\n ByteBuffer.zigZagEncode32 = function(n) {\r\n return (((n |= 0) << 1) ^ (n >> 31)) >>> 0; // ref: src/google/protobuf/wire_format_lite.h\r\n };\r\n\r\n /**\r\n * Decodes a zigzag encoded signed 32bit integer.\r\n * @param {number} n Unsigned zigzag encoded 32bit integer\r\n * @returns {number} Signed 32bit integer\r\n * @expose\r\n */\r\n ByteBuffer.zigZagDecode32 = function(n) {\r\n return ((n >>> 1) ^ -(n & 1)) | 0; // // ref: src/google/protobuf/wire_format_lite.h\r\n };\r\n\r\n /**\r\n * Writes a 32bit base 128 variable-length integer.\r\n * @param {number} value Value to write\r\n * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes\r\n * written if omitted.\r\n * @returns {!ByteBuffer|number} this if `offset` is omitted, else the actual number of bytes written\r\n * @expose\r\n */\r\n ByteBufferPrototype.writeVarint32 = function(value, offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (typeof value !== 'number' || value % 1 !== 0)\n throw TypeError(\"Illegal value: \"+value+\" (not an integer)\");\n value |= 0;\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 0 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n }\r\n var size = ByteBuffer.calculateVarint32(value),\r\n b;\r\n offset += size;\n var capacity10 = this.buffer.byteLength;\n if (offset > capacity10)\n this.resize((capacity10 *= 2) > offset ? capacity10 : offset);\n offset -= size;\n value >>>= 0;\r\n while (value >= 0x80) {\r\n b = (value & 0x7f) | 0x80;\r\n this.view[offset++] = b;\r\n value >>>= 7;\r\n }\r\n this.view[offset++] = value;\r\n if (relative) {\r\n this.offset = offset;\r\n return this;\r\n }\r\n return size;\r\n };\r\n\r\n /**\r\n * Writes a zig-zag encoded (signed) 32bit base 128 variable-length integer.\r\n * @param {number} value Value to write\r\n * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes\r\n * written if omitted.\r\n * @returns {!ByteBuffer|number} this if `offset` is omitted, else the actual number of bytes written\r\n * @expose\r\n */\r\n ByteBufferPrototype.writeVarint32ZigZag = function(value, offset) {\r\n return this.writeVarint32(ByteBuffer.zigZagEncode32(value), offset);\r\n };\r\n\r\n /**\r\n * Reads a 32bit base 128 variable-length integer.\r\n * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes\r\n * written if omitted.\r\n * @returns {number|!{value: number, length: number}} The value read if offset is omitted, else the value read\r\n * and the actual number of bytes read.\r\n * @throws {Error} If it's not a valid varint. Has a property `truncated = true` if there is not enough data available\r\n * to fully decode the varint.\r\n * @expose\r\n */\r\n ByteBufferPrototype.readVarint32 = function(offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 1 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+1+\") <= \"+this.buffer.byteLength);\n }\r\n var c = 0,\r\n value = 0 >>> 0,\r\n b;\r\n do {\r\n if (!this.noAssert && offset > this.limit) {\r\n var err = Error(\"Truncated\");\r\n err['truncated'] = true;\r\n throw err;\r\n }\r\n b = this.view[offset++];\r\n if (c < 5)\r\n value |= (b & 0x7f) << (7*c);\r\n ++c;\r\n } while ((b & 0x80) !== 0);\r\n value |= 0;\r\n if (relative) {\r\n this.offset = offset;\r\n return value;\r\n }\r\n return {\r\n \"value\": value,\r\n \"length\": c\r\n };\r\n };\r\n\r\n /**\r\n * Reads a zig-zag encoded (signed) 32bit base 128 variable-length integer.\r\n * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes\r\n * written if omitted.\r\n * @returns {number|!{value: number, length: number}} The value read if offset is omitted, else the value read\r\n * and the actual number of bytes read.\r\n * @throws {Error} If it's not a valid varint\r\n * @expose\r\n */\r\n ByteBufferPrototype.readVarint32ZigZag = function(offset) {\r\n var val = this.readVarint32(offset);\r\n if (typeof val === 'object')\r\n val[\"value\"] = ByteBuffer.zigZagDecode32(val[\"value\"]);\r\n else\r\n val = ByteBuffer.zigZagDecode32(val);\r\n return val;\r\n };\r\n\r\n // types/varints/varint64\r\n\r\n if (Long) {\r\n\r\n /**\r\n * Maximum number of bytes required to store a 64bit base 128 variable-length integer.\r\n * @type {number}\r\n * @const\r\n * @expose\r\n */\r\n ByteBuffer.MAX_VARINT64_BYTES = 10;\r\n\r\n /**\r\n * Calculates the actual number of bytes required to store a 64bit base 128 variable-length integer.\r\n * @param {number|!Long} value Value to encode\r\n * @returns {number} Number of bytes required. Capped to {@link ByteBuffer.MAX_VARINT64_BYTES}\r\n * @expose\r\n */\r\n ByteBuffer.calculateVarint64 = function(value) {\r\n if (typeof value === 'number')\n value = Long.fromNumber(value);\n else if (typeof value === 'string')\n value = Long.fromString(value);\n // ref: src/google/protobuf/io/coded_stream.cc\r\n var part0 = value.toInt() >>> 0,\r\n part1 = value.shiftRightUnsigned(28).toInt() >>> 0,\r\n part2 = value.shiftRightUnsigned(56).toInt() >>> 0;\r\n if (part2 == 0) {\r\n if (part1 == 0) {\r\n if (part0 < 1 << 14)\r\n return part0 < 1 << 7 ? 1 : 2;\r\n else\r\n return part0 < 1 << 21 ? 3 : 4;\r\n } else {\r\n if (part1 < 1 << 14)\r\n return part1 < 1 << 7 ? 5 : 6;\r\n else\r\n return part1 < 1 << 21 ? 7 : 8;\r\n }\r\n } else\r\n return part2 < 1 << 7 ? 9 : 10;\r\n };\r\n\r\n /**\r\n * Zigzag encodes a signed 64bit integer so that it can be effectively used with varint encoding.\r\n * @param {number|!Long} value Signed long\r\n * @returns {!Long} Unsigned zigzag encoded long\r\n * @expose\r\n */\r\n ByteBuffer.zigZagEncode64 = function(value) {\r\n if (typeof value === 'number')\n value = Long.fromNumber(value, false);\n else if (typeof value === 'string')\n value = Long.fromString(value, false);\n else if (value.unsigned !== false) value = value.toSigned();\n // ref: src/google/protobuf/wire_format_lite.h\r\n return value.shiftLeft(1).xor(value.shiftRight(63)).toUnsigned();\r\n };\r\n\r\n /**\r\n * Decodes a zigzag encoded signed 64bit integer.\r\n * @param {!Long|number} value Unsigned zigzag encoded long or JavaScript number\r\n * @returns {!Long} Signed long\r\n * @expose\r\n */\r\n ByteBuffer.zigZagDecode64 = function(value) {\r\n if (typeof value === 'number')\n value = Long.fromNumber(value, false);\n else if (typeof value === 'string')\n value = Long.fromString(value, false);\n else if (value.unsigned !== false) value = value.toSigned();\n // ref: src/google/protobuf/wire_format_lite.h\r\n return value.shiftRightUnsigned(1).xor(value.and(Long.ONE).toSigned().negate()).toSigned();\r\n };\r\n\r\n /**\r\n * Writes a 64bit base 128 variable-length integer.\r\n * @param {number|Long} value Value to write\r\n * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes\r\n * written if omitted.\r\n * @returns {!ByteBuffer|number} `this` if offset is omitted, else the actual number of bytes written.\r\n * @expose\r\n */\r\n ByteBufferPrototype.writeVarint64 = function(value, offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (typeof value === 'number')\n value = Long.fromNumber(value);\n else if (typeof value === 'string')\n value = Long.fromString(value);\n else if (!(value && value instanceof Long))\n throw TypeError(\"Illegal value: \"+value+\" (not an integer or Long)\");\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 0 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n }\r\n if (typeof value === 'number')\n value = Long.fromNumber(value, false);\n else if (typeof value === 'string')\n value = Long.fromString(value, false);\n else if (value.unsigned !== false) value = value.toSigned();\n var size = ByteBuffer.calculateVarint64(value),\r\n part0 = value.toInt() >>> 0,\r\n part1 = value.shiftRightUnsigned(28).toInt() >>> 0,\r\n part2 = value.shiftRightUnsigned(56).toInt() >>> 0;\r\n offset += size;\n var capacity11 = this.buffer.byteLength;\n if (offset > capacity11)\n this.resize((capacity11 *= 2) > offset ? capacity11 : offset);\n offset -= size;\n switch (size) {\r\n case 10: this.view[offset+9] = (part2 >>> 7) & 0x01;\r\n case 9 : this.view[offset+8] = size !== 9 ? (part2 ) | 0x80 : (part2 ) & 0x7F;\r\n case 8 : this.view[offset+7] = size !== 8 ? (part1 >>> 21) | 0x80 : (part1 >>> 21) & 0x7F;\r\n case 7 : this.view[offset+6] = size !== 7 ? (part1 >>> 14) | 0x80 : (part1 >>> 14) & 0x7F;\r\n case 6 : this.view[offset+5] = size !== 6 ? (part1 >>> 7) | 0x80 : (part1 >>> 7) & 0x7F;\r\n case 5 : this.view[offset+4] = size !== 5 ? (part1 ) | 0x80 : (part1 ) & 0x7F;\r\n case 4 : this.view[offset+3] = size !== 4 ? (part0 >>> 21) | 0x80 : (part0 >>> 21) & 0x7F;\r\n case 3 : this.view[offset+2] = size !== 3 ? (part0 >>> 14) | 0x80 : (part0 >>> 14) & 0x7F;\r\n case 2 : this.view[offset+1] = size !== 2 ? (part0 >>> 7) | 0x80 : (part0 >>> 7) & 0x7F;\r\n case 1 : this.view[offset ] = size !== 1 ? (part0 ) | 0x80 : (part0 ) & 0x7F;\r\n }\r\n if (relative) {\r\n this.offset += size;\r\n return this;\r\n } else {\r\n return size;\r\n }\r\n };\r\n\r\n /**\r\n * Writes a zig-zag encoded 64bit base 128 variable-length integer.\r\n * @param {number|Long} value Value to write\r\n * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes\r\n * written if omitted.\r\n * @returns {!ByteBuffer|number} `this` if offset is omitted, else the actual number of bytes written.\r\n * @expose\r\n */\r\n ByteBufferPrototype.writeVarint64ZigZag = function(value, offset) {\r\n return this.writeVarint64(ByteBuffer.zigZagEncode64(value), offset);\r\n };\r\n\r\n /**\r\n * Reads a 64bit base 128 variable-length integer. Requires Long.js.\r\n * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes\r\n * read if omitted.\r\n * @returns {!Long|!{value: Long, length: number}} The value read if offset is omitted, else the value read and\r\n * the actual number of bytes read.\r\n * @throws {Error} If it's not a valid varint\r\n * @expose\r\n */\r\n ByteBufferPrototype.readVarint64 = function(offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 1 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+1+\") <= \"+this.buffer.byteLength);\n }\r\n // ref: src/google/protobuf/io/coded_stream.cc\r\n var start = offset,\r\n part0 = 0,\r\n part1 = 0,\r\n part2 = 0,\r\n b = 0;\r\n b = this.view[offset++]; part0 = (b & 0x7F) ; if ( b & 0x80 ) {\r\n b = this.view[offset++]; part0 |= (b & 0x7F) << 7; if ((b & 0x80) || (this.noAssert && typeof b === 'undefined')) {\r\n b = this.view[offset++]; part0 |= (b & 0x7F) << 14; if ((b & 0x80) || (this.noAssert && typeof b === 'undefined')) {\r\n b = this.view[offset++]; part0 |= (b & 0x7F) << 21; if ((b & 0x80) || (this.noAssert && typeof b === 'undefined')) {\r\n b = this.view[offset++]; part1 = (b & 0x7F) ; if ((b & 0x80) || (this.noAssert && typeof b === 'undefined')) {\r\n b = this.view[offset++]; part1 |= (b & 0x7F) << 7; if ((b & 0x80) || (this.noAssert && typeof b === 'undefined')) {\r\n b = this.view[offset++]; part1 |= (b & 0x7F) << 14; if ((b & 0x80) || (this.noAssert && typeof b === 'undefined')) {\r\n b = this.view[offset++]; part1 |= (b & 0x7F) << 21; if ((b & 0x80) || (this.noAssert && typeof b === 'undefined')) {\r\n b = this.view[offset++]; part2 = (b & 0x7F) ; if ((b & 0x80) || (this.noAssert && typeof b === 'undefined')) {\r\n b = this.view[offset++]; part2 |= (b & 0x7F) << 7; if ((b & 0x80) || (this.noAssert && typeof b === 'undefined')) {\r\n throw Error(\"Buffer overrun\"); }}}}}}}}}}\r\n var value = Long.fromBits(part0 | (part1 << 28), (part1 >>> 4) | (part2) << 24, false);\r\n if (relative) {\r\n this.offset = offset;\r\n return value;\r\n } else {\r\n return {\r\n 'value': value,\r\n 'length': offset-start\r\n };\r\n }\r\n };\r\n\r\n /**\r\n * Reads a zig-zag encoded 64bit base 128 variable-length integer. Requires Long.js.\r\n * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes\r\n * read if omitted.\r\n * @returns {!Long|!{value: Long, length: number}} The value read if offset is omitted, else the value read and\r\n * the actual number of bytes read.\r\n * @throws {Error} If it's not a valid varint\r\n * @expose\r\n */\r\n ByteBufferPrototype.readVarint64ZigZag = function(offset) {\r\n var val = this.readVarint64(offset);\r\n if (val && val['value'] instanceof Long)\r\n val[\"value\"] = ByteBuffer.zigZagDecode64(val[\"value\"]);\r\n else\r\n val = ByteBuffer.zigZagDecode64(val);\r\n return val;\r\n };\r\n\r\n } // Long\r\n\r\n\r\n // types/strings/cstring\r\n\r\n /**\r\n * Writes a NULL-terminated UTF8 encoded string. For this to work the specified string must not contain any NULL\r\n * characters itself.\r\n * @param {string} str String to write\r\n * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes\r\n * contained in `str` + 1 if omitted.\r\n * @returns {!ByteBuffer|number} this if offset is omitted, else the actual number of bytes written\r\n * @expose\r\n */\r\n ByteBufferPrototype.writeCString = function(str, offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n var i,\r\n k = str.length;\r\n if (!this.noAssert) {\r\n if (typeof str !== 'string')\r\n throw TypeError(\"Illegal str: Not a string\");\r\n for (i=0; i>>= 0;\n if (offset < 0 || offset + 0 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n }\r\n // UTF8 strings do not contain zero bytes in between except for the zero character, so:\r\n k = utfx.calculateUTF16asUTF8(stringSource(str))[1];\r\n offset += k+1;\n var capacity12 = this.buffer.byteLength;\n if (offset > capacity12)\n this.resize((capacity12 *= 2) > offset ? capacity12 : offset);\n offset -= k+1;\n utfx.encodeUTF16toUTF8(stringSource(str), function(b) {\r\n this.view[offset++] = b;\r\n }.bind(this));\r\n this.view[offset++] = 0;\r\n if (relative) {\r\n this.offset = offset;\r\n return this;\r\n }\r\n return k;\r\n };\r\n\r\n /**\r\n * Reads a NULL-terminated UTF8 encoded string. For this to work the string read must not contain any NULL characters\r\n * itself.\r\n * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes\r\n * read if omitted.\r\n * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string\r\n * read and the actual number of bytes read.\r\n * @expose\r\n */\r\n ByteBufferPrototype.readCString = function(offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 1 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+1+\") <= \"+this.buffer.byteLength);\n }\r\n var start = offset,\r\n temp;\r\n // UTF8 strings do not contain zero bytes in between except for the zero character itself, so:\r\n var sd, b = -1;\r\n utfx.decodeUTF8toUTF16(function() {\r\n if (b === 0) return null;\r\n if (offset >= this.limit)\r\n throw RangeError(\"Illegal range: Truncated data, \"+offset+\" < \"+this.limit);\r\n b = this.view[offset++];\r\n return b === 0 ? null : b;\r\n }.bind(this), sd = stringDestination(), true);\r\n if (relative) {\r\n this.offset = offset;\r\n return sd();\r\n } else {\r\n return {\r\n \"string\": sd(),\r\n \"length\": offset - start\r\n };\r\n }\r\n };\r\n\r\n // types/strings/istring\r\n\r\n /**\r\n * Writes a length as uint32 prefixed UTF8 encoded string.\r\n * @param {string} str String to write\r\n * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes\r\n * written if omitted.\r\n * @returns {!ByteBuffer|number} `this` if `offset` is omitted, else the actual number of bytes written\r\n * @expose\r\n * @see ByteBuffer#writeVarint32\r\n */\r\n ByteBufferPrototype.writeIString = function(str, offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (typeof str !== 'string')\r\n throw TypeError(\"Illegal str: Not a string\");\r\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 0 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n }\r\n var start = offset,\r\n k;\r\n k = utfx.calculateUTF16asUTF8(stringSource(str), this.noAssert)[1];\r\n offset += 4+k;\n var capacity13 = this.buffer.byteLength;\n if (offset > capacity13)\n this.resize((capacity13 *= 2) > offset ? capacity13 : offset);\n offset -= 4+k;\n if (this.littleEndian) {\n this.view[offset+3] = (k >>> 24) & 0xFF;\n this.view[offset+2] = (k >>> 16) & 0xFF;\n this.view[offset+1] = (k >>> 8) & 0xFF;\n this.view[offset ] = k & 0xFF;\n } else {\n this.view[offset ] = (k >>> 24) & 0xFF;\n this.view[offset+1] = (k >>> 16) & 0xFF;\n this.view[offset+2] = (k >>> 8) & 0xFF;\n this.view[offset+3] = k & 0xFF;\n }\n offset += 4;\r\n utfx.encodeUTF16toUTF8(stringSource(str), function(b) {\r\n this.view[offset++] = b;\r\n }.bind(this));\r\n if (offset !== start + 4 + k)\r\n throw RangeError(\"Illegal range: Truncated data, \"+offset+\" == \"+(offset+4+k));\r\n if (relative) {\r\n this.offset = offset;\r\n return this;\r\n }\r\n return offset - start;\r\n };\r\n\r\n /**\r\n * Reads a length as uint32 prefixed UTF8 encoded string.\r\n * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes\r\n * read if omitted.\r\n * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string\r\n * read and the actual number of bytes read.\r\n * @expose\r\n * @see ByteBuffer#readVarint32\r\n */\r\n ByteBufferPrototype.readIString = function(offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 4 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+4+\") <= \"+this.buffer.byteLength);\n }\r\n var start = offset;\r\n var len = this.readUint32(offset);\r\n var str = this.readUTF8String(len, ByteBuffer.METRICS_BYTES, offset += 4);\r\n offset += str['length'];\r\n if (relative) {\r\n this.offset = offset;\r\n return str['string'];\r\n } else {\r\n return {\r\n 'string': str['string'],\r\n 'length': offset - start\r\n };\r\n }\r\n };\r\n\r\n // types/strings/utf8string\r\n\r\n /**\r\n * Metrics representing number of UTF8 characters. Evaluates to `c`.\r\n * @type {string}\r\n * @const\r\n * @expose\r\n */\r\n ByteBuffer.METRICS_CHARS = 'c';\r\n\r\n /**\r\n * Metrics representing number of bytes. Evaluates to `b`.\r\n * @type {string}\r\n * @const\r\n * @expose\r\n */\r\n ByteBuffer.METRICS_BYTES = 'b';\r\n\r\n /**\r\n * Writes an UTF8 encoded string.\r\n * @param {string} str String to write\r\n * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} if omitted.\r\n * @returns {!ByteBuffer|number} this if offset is omitted, else the actual number of bytes written.\r\n * @expose\r\n */\r\n ByteBufferPrototype.writeUTF8String = function(str, offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 0 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n }\r\n var k;\r\n var start = offset;\r\n k = utfx.calculateUTF16asUTF8(stringSource(str))[1];\r\n offset += k;\n var capacity14 = this.buffer.byteLength;\n if (offset > capacity14)\n this.resize((capacity14 *= 2) > offset ? capacity14 : offset);\n offset -= k;\n utfx.encodeUTF16toUTF8(stringSource(str), function(b) {\r\n this.view[offset++] = b;\r\n }.bind(this));\r\n if (relative) {\r\n this.offset = offset;\r\n return this;\r\n }\r\n return offset - start;\r\n };\r\n\r\n /**\r\n * Writes an UTF8 encoded string. This is an alias of {@link ByteBuffer#writeUTF8String}.\r\n * @function\r\n * @param {string} str String to write\r\n * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} if omitted.\r\n * @returns {!ByteBuffer|number} this if offset is omitted, else the actual number of bytes written.\r\n * @expose\r\n */\r\n ByteBufferPrototype.writeString = ByteBufferPrototype.writeUTF8String;\r\n\r\n /**\r\n * Calculates the number of UTF8 characters of a string. JavaScript itself uses UTF-16, so that a string's\r\n * `length` property does not reflect its actual UTF8 size if it contains code points larger than 0xFFFF.\r\n * @param {string} str String to calculate\r\n * @returns {number} Number of UTF8 characters\r\n * @expose\r\n */\r\n ByteBuffer.calculateUTF8Chars = function(str) {\r\n return utfx.calculateUTF16asUTF8(stringSource(str))[0];\r\n };\r\n\r\n /**\r\n * Calculates the number of UTF8 bytes of a string.\r\n * @param {string} str String to calculate\r\n * @returns {number} Number of UTF8 bytes\r\n * @expose\r\n */\r\n ByteBuffer.calculateUTF8Bytes = function(str) {\r\n return utfx.calculateUTF16asUTF8(stringSource(str))[1];\r\n };\r\n\r\n /**\r\n * Calculates the number of UTF8 bytes of a string. This is an alias of {@link ByteBuffer.calculateUTF8Bytes}.\r\n * @function\r\n * @param {string} str String to calculate\r\n * @returns {number} Number of UTF8 bytes\r\n * @expose\r\n */\r\n ByteBuffer.calculateString = ByteBuffer.calculateUTF8Bytes;\r\n\r\n /**\r\n * Reads an UTF8 encoded string.\r\n * @param {number} length Number of characters or bytes to read.\r\n * @param {string=} metrics Metrics specifying what `length` is meant to count. Defaults to\r\n * {@link ByteBuffer.METRICS_CHARS}.\r\n * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes\r\n * read if omitted.\r\n * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string\r\n * read and the actual number of bytes read.\r\n * @expose\r\n */\r\n ByteBufferPrototype.readUTF8String = function(length, metrics, offset) {\r\n if (typeof metrics === 'number') {\r\n offset = metrics;\r\n metrics = undefined;\r\n }\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (typeof metrics === 'undefined') metrics = ByteBuffer.METRICS_CHARS;\r\n if (!this.noAssert) {\r\n if (typeof length !== 'number' || length % 1 !== 0)\n throw TypeError(\"Illegal length: \"+length+\" (not an integer)\");\n length |= 0;\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 0 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n }\r\n var i = 0,\r\n start = offset,\r\n sd;\r\n if (metrics === ByteBuffer.METRICS_CHARS) { // The same for node and the browser\r\n sd = stringDestination();\r\n utfx.decodeUTF8(function() {\r\n return i < length && offset < this.limit ? this.view[offset++] : null;\r\n }.bind(this), function(cp) {\r\n ++i; utfx.UTF8toUTF16(cp, sd);\r\n });\r\n if (i !== length)\r\n throw RangeError(\"Illegal range: Truncated data, \"+i+\" == \"+length);\r\n if (relative) {\r\n this.offset = offset;\r\n return sd();\r\n } else {\r\n return {\r\n \"string\": sd(),\r\n \"length\": offset - start\r\n };\r\n }\r\n } else if (metrics === ByteBuffer.METRICS_BYTES) {\r\n if (!this.noAssert) {\r\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + length > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+length+\") <= \"+this.buffer.byteLength);\n }\r\n var k = offset + length;\r\n utfx.decodeUTF8toUTF16(function() {\r\n return offset < k ? this.view[offset++] : null;\r\n }.bind(this), sd = stringDestination(), this.noAssert);\r\n if (offset !== k)\r\n throw RangeError(\"Illegal range: Truncated data, \"+offset+\" == \"+k);\r\n if (relative) {\r\n this.offset = offset;\r\n return sd();\r\n } else {\r\n return {\r\n 'string': sd(),\r\n 'length': offset - start\r\n };\r\n }\r\n } else\r\n throw TypeError(\"Unsupported metrics: \"+metrics);\r\n };\r\n\r\n /**\r\n * Reads an UTF8 encoded string. This is an alias of {@link ByteBuffer#readUTF8String}.\r\n * @function\r\n * @param {number} length Number of characters or bytes to read\r\n * @param {number=} metrics Metrics specifying what `n` is meant to count. Defaults to\r\n * {@link ByteBuffer.METRICS_CHARS}.\r\n * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes\r\n * read if omitted.\r\n * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string\r\n * read and the actual number of bytes read.\r\n * @expose\r\n */\r\n ByteBufferPrototype.readString = ByteBufferPrototype.readUTF8String;\r\n\r\n // types/strings/vstring\r\n\r\n /**\r\n * Writes a length as varint32 prefixed UTF8 encoded string.\r\n * @param {string} str String to write\r\n * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes\r\n * written if omitted.\r\n * @returns {!ByteBuffer|number} `this` if `offset` is omitted, else the actual number of bytes written\r\n * @expose\r\n * @see ByteBuffer#writeVarint32\r\n */\r\n ByteBufferPrototype.writeVString = function(str, offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (typeof str !== 'string')\r\n throw TypeError(\"Illegal str: Not a string\");\r\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 0 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n }\r\n var start = offset,\r\n k, l;\r\n k = utfx.calculateUTF16asUTF8(stringSource(str), this.noAssert)[1];\r\n l = ByteBuffer.calculateVarint32(k);\r\n offset += l+k;\n var capacity15 = this.buffer.byteLength;\n if (offset > capacity15)\n this.resize((capacity15 *= 2) > offset ? capacity15 : offset);\n offset -= l+k;\n offset += this.writeVarint32(k, offset);\r\n utfx.encodeUTF16toUTF8(stringSource(str), function(b) {\r\n this.view[offset++] = b;\r\n }.bind(this));\r\n if (offset !== start+k+l)\r\n throw RangeError(\"Illegal range: Truncated data, \"+offset+\" == \"+(offset+k+l));\r\n if (relative) {\r\n this.offset = offset;\r\n return this;\r\n }\r\n return offset - start;\r\n };\r\n\r\n /**\r\n * Reads a length as varint32 prefixed UTF8 encoded string.\r\n * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes\r\n * read if omitted.\r\n * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string\r\n * read and the actual number of bytes read.\r\n * @expose\r\n * @see ByteBuffer#readVarint32\r\n */\r\n ByteBufferPrototype.readVString = function(offset) {\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 1 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+1+\") <= \"+this.buffer.byteLength);\n }\r\n var start = offset;\r\n var len = this.readVarint32(offset);\r\n var str = this.readUTF8String(len['value'], ByteBuffer.METRICS_BYTES, offset += len['length']);\r\n offset += str['length'];\r\n if (relative) {\r\n this.offset = offset;\r\n return str['string'];\r\n } else {\r\n return {\r\n 'string': str['string'],\r\n 'length': offset - start\r\n };\r\n }\r\n };\r\n\r\n\r\n /**\r\n * Appends some data to this ByteBuffer. This will overwrite any contents behind the specified offset up to the appended\r\n * data's length.\r\n * @param {!ByteBuffer|!ArrayBuffer|!Uint8Array|string} source Data to append. If `source` is a ByteBuffer, its offsets\r\n * will be modified according to the performed read operation.\r\n * @param {(string|number)=} encoding Encoding if `data` is a string (\"base64\", \"hex\", \"binary\", defaults to \"utf8\")\r\n * @param {number=} offset Offset to append at. Will use and increase {@link ByteBuffer#offset} by the number of bytes\r\n * written if omitted.\r\n * @returns {!ByteBuffer} this\r\n * @expose\r\n * @example A relative `<01 02>03.append(<04 05>)` will result in `<01 02 04 05>, 04 05|`\r\n * @example An absolute `<01 02>03.append(04 05>, 1)` will result in `<01 04>05, 04 05|`\r\n */\r\n ByteBufferPrototype.append = function(source, encoding, offset) {\r\n if (typeof encoding === 'number' || typeof encoding !== 'string') {\r\n offset = encoding;\r\n encoding = undefined;\r\n }\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 0 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n }\r\n if (!(source instanceof ByteBuffer))\r\n source = ByteBuffer.wrap(source, encoding);\r\n var length = source.limit - source.offset;\r\n if (length <= 0) return this; // Nothing to append\r\n offset += length;\n var capacity16 = this.buffer.byteLength;\n if (offset > capacity16)\n this.resize((capacity16 *= 2) > offset ? capacity16 : offset);\n offset -= length;\n this.view.set(source.view.subarray(source.offset, source.limit), offset);\r\n source.offset += length;\r\n if (relative) this.offset += length;\n return this;\r\n };\r\n\r\n /**\r\n * Appends this ByteBuffer's contents to another ByteBuffer. This will overwrite any contents at and after the\r\n specified offset up to the length of this ByteBuffer's data.\r\n * @param {!ByteBuffer} target Target ByteBuffer\r\n * @param {number=} offset Offset to append to. Will use and increase {@link ByteBuffer#offset} by the number of bytes\r\n * read if omitted.\r\n * @returns {!ByteBuffer} this\r\n * @expose\r\n * @see ByteBuffer#append\r\n */\r\n ByteBufferPrototype.appendTo = function(target, offset) {\r\n target.append(this, offset);\r\n return this;\r\n };\r\n\r\n /**\r\n * Enables or disables assertions of argument types and offsets. Assertions are enabled by default but you can opt to\r\n * disable them if your code already makes sure that everything is valid.\r\n * @param {boolean} assert `true` to enable assertions, otherwise `false`\r\n * @returns {!ByteBuffer} this\r\n * @expose\r\n */\r\n ByteBufferPrototype.assert = function(assert) {\r\n this.noAssert = !assert;\r\n return this;\r\n };\r\n\r\n /**\r\n * Gets the capacity of this ByteBuffer's backing buffer.\r\n * @returns {number} Capacity of the backing buffer\r\n * @expose\r\n */\r\n ByteBufferPrototype.capacity = function() {\r\n return this.buffer.byteLength;\r\n };\r\n /**\r\n * Clears this ByteBuffer's offsets by setting {@link ByteBuffer#offset} to `0` and {@link ByteBuffer#limit} to the\r\n * backing buffer's capacity. Discards {@link ByteBuffer#markedOffset}.\r\n * @returns {!ByteBuffer} this\r\n * @expose\r\n */\r\n ByteBufferPrototype.clear = function() {\r\n this.offset = 0;\r\n this.limit = this.buffer.byteLength;\r\n this.markedOffset = -1;\r\n return this;\r\n };\r\n\r\n /**\r\n * Creates a cloned instance of this ByteBuffer, preset with this ByteBuffer's values for {@link ByteBuffer#offset},\r\n * {@link ByteBuffer#markedOffset} and {@link ByteBuffer#limit}.\r\n * @param {boolean=} copy Whether to copy the backing buffer or to return another view on the same, defaults to `false`\r\n * @returns {!ByteBuffer} Cloned instance\r\n * @expose\r\n */\r\n ByteBufferPrototype.clone = function(copy) {\r\n var bb = new ByteBuffer(0, this.littleEndian, this.noAssert);\r\n if (copy) {\r\n bb.buffer = new ArrayBuffer(this.buffer.byteLength);\r\n bb.view = new Uint8Array(bb.buffer);\r\n } else {\r\n bb.buffer = this.buffer;\r\n bb.view = this.view;\r\n }\r\n bb.offset = this.offset;\r\n bb.markedOffset = this.markedOffset;\r\n bb.limit = this.limit;\r\n return bb;\r\n };\r\n\r\n /**\r\n * Compacts this ByteBuffer to be backed by a {@link ByteBuffer#buffer} of its contents' length. Contents are the bytes\r\n * between {@link ByteBuffer#offset} and {@link ByteBuffer#limit}. Will set `offset = 0` and `limit = capacity` and\r\n * adapt {@link ByteBuffer#markedOffset} to the same relative position if set.\r\n * @param {number=} begin Offset to start at, defaults to {@link ByteBuffer#offset}\r\n * @param {number=} end Offset to end at, defaults to {@link ByteBuffer#limit}\r\n * @returns {!ByteBuffer} this\r\n * @expose\r\n */\r\n ByteBufferPrototype.compact = function(begin, end) {\r\n if (typeof begin === 'undefined') begin = this.offset;\r\n if (typeof end === 'undefined') end = this.limit;\r\n if (!this.noAssert) {\r\n if (typeof begin !== 'number' || begin % 1 !== 0)\n throw TypeError(\"Illegal begin: Not an integer\");\n begin >>>= 0;\n if (typeof end !== 'number' || end % 1 !== 0)\n throw TypeError(\"Illegal end: Not an integer\");\n end >>>= 0;\n if (begin < 0 || begin > end || end > this.buffer.byteLength)\n throw RangeError(\"Illegal range: 0 <= \"+begin+\" <= \"+end+\" <= \"+this.buffer.byteLength);\n }\r\n if (begin === 0 && end === this.buffer.byteLength)\r\n return this; // Already compacted\r\n var len = end - begin;\r\n if (len === 0) {\r\n this.buffer = EMPTY_BUFFER;\r\n this.view = null;\r\n if (this.markedOffset >= 0) this.markedOffset -= begin;\r\n this.offset = 0;\r\n this.limit = 0;\r\n return this;\r\n }\r\n var buffer = new ArrayBuffer(len);\r\n var view = new Uint8Array(buffer);\r\n view.set(this.view.subarray(begin, end));\r\n this.buffer = buffer;\r\n this.view = view;\r\n if (this.markedOffset >= 0) this.markedOffset -= begin;\r\n this.offset = 0;\r\n this.limit = len;\r\n return this;\r\n };\r\n\r\n /**\r\n * Creates a copy of this ByteBuffer's contents. Contents are the bytes between {@link ByteBuffer#offset} and\r\n * {@link ByteBuffer#limit}.\r\n * @param {number=} begin Begin offset, defaults to {@link ByteBuffer#offset}.\r\n * @param {number=} end End offset, defaults to {@link ByteBuffer#limit}.\r\n * @returns {!ByteBuffer} Copy\r\n * @expose\r\n */\r\n ByteBufferPrototype.copy = function(begin, end) {\r\n if (typeof begin === 'undefined') begin = this.offset;\r\n if (typeof end === 'undefined') end = this.limit;\r\n if (!this.noAssert) {\r\n if (typeof begin !== 'number' || begin % 1 !== 0)\n throw TypeError(\"Illegal begin: Not an integer\");\n begin >>>= 0;\n if (typeof end !== 'number' || end % 1 !== 0)\n throw TypeError(\"Illegal end: Not an integer\");\n end >>>= 0;\n if (begin < 0 || begin > end || end > this.buffer.byteLength)\n throw RangeError(\"Illegal range: 0 <= \"+begin+\" <= \"+end+\" <= \"+this.buffer.byteLength);\n }\r\n if (begin === end)\r\n return new ByteBuffer(0, this.littleEndian, this.noAssert);\r\n var capacity = end - begin,\r\n bb = new ByteBuffer(capacity, this.littleEndian, this.noAssert);\r\n bb.offset = 0;\r\n bb.limit = capacity;\r\n if (bb.markedOffset >= 0) bb.markedOffset -= begin;\r\n this.copyTo(bb, 0, begin, end);\r\n return bb;\r\n };\r\n\r\n /**\r\n * Copies this ByteBuffer's contents to another ByteBuffer. Contents are the bytes between {@link ByteBuffer#offset} and\r\n * {@link ByteBuffer#limit}.\r\n * @param {!ByteBuffer} target Target ByteBuffer\r\n * @param {number=} targetOffset Offset to copy to. Will use and increase the target's {@link ByteBuffer#offset}\r\n * by the number of bytes copied if omitted.\r\n * @param {number=} sourceOffset Offset to start copying from. Will use and increase {@link ByteBuffer#offset} by the\r\n * number of bytes copied if omitted.\r\n * @param {number=} sourceLimit Offset to end copying from, defaults to {@link ByteBuffer#limit}\r\n * @returns {!ByteBuffer} this\r\n * @expose\r\n */\r\n ByteBufferPrototype.copyTo = function(target, targetOffset, sourceOffset, sourceLimit) {\r\n var relative,\r\n targetRelative;\r\n if (!this.noAssert) {\r\n if (!ByteBuffer.isByteBuffer(target))\r\n throw TypeError(\"Illegal target: Not a ByteBuffer\");\r\n }\r\n targetOffset = (targetRelative = typeof targetOffset === 'undefined') ? target.offset : targetOffset | 0;\r\n sourceOffset = (relative = typeof sourceOffset === 'undefined') ? this.offset : sourceOffset | 0;\r\n sourceLimit = typeof sourceLimit === 'undefined' ? this.limit : sourceLimit | 0;\r\n\r\n if (targetOffset < 0 || targetOffset > target.buffer.byteLength)\r\n throw RangeError(\"Illegal target range: 0 <= \"+targetOffset+\" <= \"+target.buffer.byteLength);\r\n if (sourceOffset < 0 || sourceLimit > this.buffer.byteLength)\r\n throw RangeError(\"Illegal source range: 0 <= \"+sourceOffset+\" <= \"+this.buffer.byteLength);\r\n\r\n var len = sourceLimit - sourceOffset;\r\n if (len === 0)\r\n return target; // Nothing to copy\r\n\r\n target.ensureCapacity(targetOffset + len);\r\n\r\n target.view.set(this.view.subarray(sourceOffset, sourceLimit), targetOffset);\r\n\r\n if (relative) this.offset += len;\r\n if (targetRelative) target.offset += len;\r\n\r\n return this;\r\n };\r\n\r\n /**\r\n * Makes sure that this ByteBuffer is backed by a {@link ByteBuffer#buffer} of at least the specified capacity. If the\r\n * current capacity is exceeded, it will be doubled. If double the current capacity is less than the required capacity,\r\n * the required capacity will be used instead.\r\n * @param {number} capacity Required capacity\r\n * @returns {!ByteBuffer} this\r\n * @expose\r\n */\r\n ByteBufferPrototype.ensureCapacity = function(capacity) {\r\n var current = this.buffer.byteLength;\r\n if (current < capacity)\r\n return this.resize((current *= 2) > capacity ? current : capacity);\r\n return this;\r\n };\r\n\r\n /**\r\n * Overwrites this ByteBuffer's contents with the specified value. Contents are the bytes between\r\n * {@link ByteBuffer#offset} and {@link ByteBuffer#limit}.\r\n * @param {number|string} value Byte value to fill with. If given as a string, the first character is used.\r\n * @param {number=} begin Begin offset. Will use and increase {@link ByteBuffer#offset} by the number of bytes\r\n * written if omitted. defaults to {@link ByteBuffer#offset}.\r\n * @param {number=} end End offset, defaults to {@link ByteBuffer#limit}.\r\n * @returns {!ByteBuffer} this\r\n * @expose\r\n * @example `someByteBuffer.clear().fill(0)` fills the entire backing buffer with zeroes\r\n */\r\n ByteBufferPrototype.fill = function(value, begin, end) {\r\n var relative = typeof begin === 'undefined';\n if (relative) begin = this.offset;\n if (typeof value === 'string' && value.length > 0)\r\n value = value.charCodeAt(0);\r\n if (typeof begin === 'undefined') begin = this.offset;\r\n if (typeof end === 'undefined') end = this.limit;\r\n if (!this.noAssert) {\r\n if (typeof value !== 'number' || value % 1 !== 0)\n throw TypeError(\"Illegal value: \"+value+\" (not an integer)\");\n value |= 0;\n if (typeof begin !== 'number' || begin % 1 !== 0)\n throw TypeError(\"Illegal begin: Not an integer\");\n begin >>>= 0;\n if (typeof end !== 'number' || end % 1 !== 0)\n throw TypeError(\"Illegal end: Not an integer\");\n end >>>= 0;\n if (begin < 0 || begin > end || end > this.buffer.byteLength)\n throw RangeError(\"Illegal range: 0 <= \"+begin+\" <= \"+end+\" <= \"+this.buffer.byteLength);\n }\r\n if (begin >= end)\r\n return this; // Nothing to fill\r\n while (begin < end) this.view[begin++] = value;\r\n if (relative) this.offset = begin;\r\n return this;\r\n };\r\n\r\n /**\r\n * Makes this ByteBuffer ready for a new sequence of write or relative read operations. Sets `limit = offset` and\r\n * `offset = 0`. Make sure always to flip a ByteBuffer when all relative read or write operations are complete.\r\n * @returns {!ByteBuffer} this\r\n * @expose\r\n */\r\n ByteBufferPrototype.flip = function() {\r\n this.limit = this.offset;\r\n this.offset = 0;\r\n return this;\r\n };\r\n /**\r\n * Marks an offset on this ByteBuffer to be used later.\r\n * @param {number=} offset Offset to mark. Defaults to {@link ByteBuffer#offset}.\r\n * @returns {!ByteBuffer} this\r\n * @throws {TypeError} If `offset` is not a valid number\r\n * @throws {RangeError} If `offset` is out of bounds\r\n * @see ByteBuffer#reset\r\n * @expose\r\n */\r\n ByteBufferPrototype.mark = function(offset) {\r\n offset = typeof offset === 'undefined' ? this.offset : offset;\r\n if (!this.noAssert) {\r\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 0 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n }\r\n this.markedOffset = offset;\r\n return this;\r\n };\r\n /**\r\n * Sets the byte order.\r\n * @param {boolean} littleEndian `true` for little endian byte order, `false` for big endian\r\n * @returns {!ByteBuffer} this\r\n * @expose\r\n */\r\n ByteBufferPrototype.order = function(littleEndian) {\r\n if (!this.noAssert) {\r\n if (typeof littleEndian !== 'boolean')\r\n throw TypeError(\"Illegal littleEndian: Not a boolean\");\r\n }\r\n this.littleEndian = !!littleEndian;\r\n return this;\r\n };\r\n\r\n /**\r\n * Switches (to) little endian byte order.\r\n * @param {boolean=} littleEndian Defaults to `true`, otherwise uses big endian\r\n * @returns {!ByteBuffer} this\r\n * @expose\r\n */\r\n ByteBufferPrototype.LE = function(littleEndian) {\r\n this.littleEndian = typeof littleEndian !== 'undefined' ? !!littleEndian : true;\r\n return this;\r\n };\r\n\r\n /**\r\n * Switches (to) big endian byte order.\r\n * @param {boolean=} bigEndian Defaults to `true`, otherwise uses little endian\r\n * @returns {!ByteBuffer} this\r\n * @expose\r\n */\r\n ByteBufferPrototype.BE = function(bigEndian) {\r\n this.littleEndian = typeof bigEndian !== 'undefined' ? !bigEndian : false;\r\n return this;\r\n };\r\n /**\r\n * Prepends some data to this ByteBuffer. This will overwrite any contents before the specified offset up to the\r\n * prepended data's length. If there is not enough space available before the specified `offset`, the backing buffer\r\n * will be resized and its contents moved accordingly.\r\n * @param {!ByteBuffer|string|!ArrayBuffer} source Data to prepend. If `source` is a ByteBuffer, its offset will be\r\n * modified according to the performed read operation.\r\n * @param {(string|number)=} encoding Encoding if `data` is a string (\"base64\", \"hex\", \"binary\", defaults to \"utf8\")\r\n * @param {number=} offset Offset to prepend at. Will use and decrease {@link ByteBuffer#offset} by the number of bytes\r\n * prepended if omitted.\r\n * @returns {!ByteBuffer} this\r\n * @expose\r\n * @example A relative `00<01 02 03>.prepend(<04 05>)` results in `<04 05 01 02 03>, 04 05|`\r\n * @example An absolute `00<01 02 03>.prepend(<04 05>, 2)` results in `04<05 02 03>, 04 05|`\r\n */\r\n ByteBufferPrototype.prepend = function(source, encoding, offset) {\r\n if (typeof encoding === 'number' || typeof encoding !== 'string') {\r\n offset = encoding;\r\n encoding = undefined;\r\n }\r\n var relative = typeof offset === 'undefined';\n if (relative) offset = this.offset;\n if (!this.noAssert) {\r\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n offset >>>= 0;\n if (offset < 0 || offset + 0 > this.buffer.byteLength)\n throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n }\r\n if (!(source instanceof ByteBuffer))\r\n source = ByteBuffer.wrap(source, encoding);\r\n var len = source.limit - source.offset;\r\n if (len <= 0) return this; // Nothing to prepend\r\n var diff = len - offset;\r\n if (diff > 0) { // Not enough space before offset, so resize + move\r\n var buffer = new ArrayBuffer(this.buffer.byteLength + diff);\r\n var view = new Uint8Array(buffer);\r\n view.set(this.view.subarray(offset, this.buffer.byteLength), len);\r\n this.buffer = buffer;\r\n this.view = view;\r\n this.offset += diff;\r\n if (this.markedOffset >= 0) this.markedOffset += diff;\r\n this.limit += diff;\r\n offset += diff;\r\n } else {\r\n var arrayView = new Uint8Array(this.buffer);\r\n }\r\n this.view.set(source.view.subarray(source.offset, source.limit), offset - len);\r\n\r\n source.offset = source.limit;\r\n if (relative)\r\n this.offset -= len;\r\n return this;\r\n };\r\n\r\n /**\r\n * Prepends this ByteBuffer to another ByteBuffer. This will overwrite any contents before the specified offset up to the\r\n * prepended data's length. If there is not enough space available before the specified `offset`, the backing buffer\r\n * will be resized and its contents moved accordingly.\r\n * @param {!ByteBuffer} target Target ByteBuffer\r\n * @param {number=} offset Offset to prepend at. Will use and decrease {@link ByteBuffer#offset} by the number of bytes\r\n * prepended if omitted.\r\n * @returns {!ByteBuffer} this\r\n * @expose\r\n * @see ByteBuffer#prepend\r\n */\r\n ByteBufferPrototype.prependTo = function(target, offset) {\r\n target.prepend(this, offset);\r\n return this;\r\n };\r\n /**\r\n * Prints debug information about this ByteBuffer's contents.\r\n * @param {function(string)=} out Output function to call, defaults to console.log\r\n * @expose\r\n */\r\n ByteBufferPrototype.printDebug = function(out) {\r\n if (typeof out !== 'function') out = console.log.bind(console);\r\n out(\r\n this.toString()+\"\\n\"+\r\n \"-------------------------------------------------------------------\\n\"+\r\n this.toDebug(/* columns */ true)\r\n );\r\n };\r\n\r\n /**\r\n * Gets the number of remaining readable bytes. Contents are the bytes between {@link ByteBuffer#offset} and\r\n * {@link ByteBuffer#limit}, so this returns `limit - offset`.\r\n * @returns {number} Remaining readable bytes. May be negative if `offset > limit`.\r\n * @expose\r\n */\r\n ByteBufferPrototype.remaining = function() {\r\n return this.limit - this.offset;\r\n };\r\n /**\r\n * Resets this ByteBuffer's {@link ByteBuffer#offset}. If an offset has been marked through {@link ByteBuffer#mark}\r\n * before, `offset` will be set to {@link ByteBuffer#markedOffset}, which will then be discarded. If no offset has been\r\n * marked, sets `offset = 0`.\r\n * @returns {!ByteBuffer} this\r\n * @see ByteBuffer#mark\r\n * @expose\r\n */\r\n ByteBufferPrototype.reset = function() {\r\n if (this.markedOffset >= 0) {\r\n this.offset = this.markedOffset;\r\n this.markedOffset = -1;\r\n } else {\r\n this.offset = 0;\r\n }\r\n return this;\r\n };\r\n /**\r\n * Resizes this ByteBuffer to be backed by a buffer of at least the given capacity. Will do nothing if already that\r\n * large or larger.\r\n * @param {number} capacity Capacity required\r\n * @returns {!ByteBuffer} this\r\n * @throws {TypeError} If `capacity` is not a number\r\n * @throws {RangeError} If `capacity < 0`\r\n * @expose\r\n */\r\n ByteBufferPrototype.resize = function(capacity) {\r\n if (!this.noAssert) {\r\n if (typeof capacity !== 'number' || capacity % 1 !== 0)\n throw TypeError(\"Illegal capacity: \"+capacity+\" (not an integer)\");\n capacity |= 0;\n if (capacity < 0)\r\n throw RangeError(\"Illegal capacity: 0 <= \"+capacity);\r\n }\r\n if (this.buffer.byteLength < capacity) {\r\n var buffer = new ArrayBuffer(capacity);\r\n var view = new Uint8Array(buffer);\r\n view.set(this.view);\r\n this.buffer = buffer;\r\n this.view = view;\r\n }\r\n return this;\r\n };\r\n /**\r\n * Reverses this ByteBuffer's contents.\r\n * @param {number=} begin Offset to start at, defaults to {@link ByteBuffer#offset}\r\n * @param {number=} end Offset to end at, defaults to {@link ByteBuffer#limit}\r\n * @returns {!ByteBuffer} this\r\n * @expose\r\n */\r\n ByteBufferPrototype.reverse = function(begin, end) {\r\n if (typeof begin === 'undefined') begin = this.offset;\r\n if (typeof end === 'undefined') end = this.limit;\r\n if (!this.noAssert) {\r\n if (typeof begin !== 'number' || begin % 1 !== 0)\n throw TypeError(\"Illegal begin: Not an integer\");\n begin >>>= 0;\n if (typeof end !== 'number' || end % 1 !== 0)\n throw TypeError(\"Illegal end: Not an integer\");\n end >>>= 0;\n if (begin < 0 || begin > end || end > this.buffer.byteLength)\n throw RangeError(\"Illegal range: 0 <= \"+begin+\" <= \"+end+\" <= \"+this.buffer.byteLength);\n }\r\n if (begin === end)\r\n return this; // Nothing to reverse\r\n Array.prototype.reverse.call(this.view.subarray(begin, end));\r\n return this;\r\n };\r\n /**\r\n * Skips the next `length` bytes. This will just advance\r\n * @param {number} length Number of bytes to skip. May also be negative to move the offset back.\r\n * @returns {!ByteBuffer} this\r\n * @expose\r\n */\r\n ByteBufferPrototype.skip = function(length) {\r\n if (!this.noAssert) {\r\n if (typeof length !== 'number' || length % 1 !== 0)\n throw TypeError(\"Illegal length: \"+length+\" (not an integer)\");\n length |= 0;\n }\r\n var offset = this.offset + length;\r\n if (!this.noAssert) {\r\n if (offset < 0 || offset > this.buffer.byteLength)\r\n throw RangeError(\"Illegal length: 0 <= \"+this.offset+\" + \"+length+\" <= \"+this.buffer.byteLength);\r\n }\r\n this.offset = offset;\r\n return this;\r\n };\r\n\r\n /**\r\n * Slices this ByteBuffer by creating a cloned instance with `offset = begin` and `limit = end`.\r\n * @param {number=} begin Begin offset, defaults to {@link ByteBuffer#offset}.\r\n * @param {number=} end End offset, defaults to {@link ByteBuffer#limit}.\r\n * @returns {!ByteBuffer} Clone of this ByteBuffer with slicing applied, backed by the same {@link ByteBuffer#buffer}\r\n * @expose\r\n */\r\n ByteBufferPrototype.slice = function(begin, end) {\r\n if (typeof begin === 'undefined') begin = this.offset;\r\n if (typeof end === 'undefined') end = this.limit;\r\n if (!this.noAssert) {\r\n if (typeof begin !== 'number' || begin % 1 !== 0)\n throw TypeError(\"Illegal begin: Not an integer\");\n begin >>>= 0;\n if (typeof end !== 'number' || end % 1 !== 0)\n throw TypeError(\"Illegal end: Not an integer\");\n end >>>= 0;\n if (begin < 0 || begin > end || end > this.buffer.byteLength)\n throw RangeError(\"Illegal range: 0 <= \"+begin+\" <= \"+end+\" <= \"+this.buffer.byteLength);\n }\r\n var bb = this.clone();\r\n bb.offset = begin;\r\n bb.limit = end;\r\n return bb;\r\n };\r\n /**\r\n * Returns a copy of the backing buffer that contains this ByteBuffer's contents. Contents are the bytes between\r\n * {@link ByteBuffer#offset} and {@link ByteBuffer#limit}.\r\n * @param {boolean=} forceCopy If `true` returns a copy, otherwise returns a view referencing the same memory if\r\n * possible. Defaults to `false`\r\n * @returns {!ArrayBuffer} Contents as an ArrayBuffer\r\n * @expose\r\n */\r\n ByteBufferPrototype.toBuffer = function(forceCopy) {\r\n var offset = this.offset,\r\n limit = this.limit;\r\n if (!this.noAssert) {\r\n if (typeof offset !== 'number' || offset % 1 !== 0)\n throw TypeError(\"Illegal offset: Not an integer\");\n offset >>>= 0;\n if (typeof limit !== 'number' || limit % 1 !== 0)\n throw TypeError(\"Illegal limit: Not an integer\");\n limit >>>= 0;\n if (offset < 0 || offset > limit || limit > this.buffer.byteLength)\n throw RangeError(\"Illegal range: 0 <= \"+offset+\" <= \"+limit+\" <= \"+this.buffer.byteLength);\n }\r\n // NOTE: It's not possible to have another ArrayBuffer reference the same memory as the backing buffer. This is\r\n // possible with Uint8Array#subarray only, but we have to return an ArrayBuffer by contract. So:\r\n if (!forceCopy && offset === 0 && limit === this.buffer.byteLength)\r\n return this.buffer;\r\n if (offset === limit)\r\n return EMPTY_BUFFER;\r\n var buffer = new ArrayBuffer(limit - offset);\r\n new Uint8Array(buffer).set(new Uint8Array(this.buffer).subarray(offset, limit), 0);\r\n return buffer;\r\n };\r\n\r\n /**\r\n * Returns a raw buffer compacted to contain this ByteBuffer's contents. Contents are the bytes between\r\n * {@link ByteBuffer#offset} and {@link ByteBuffer#limit}. This is an alias of {@link ByteBuffer#toBuffer}.\r\n * @function\r\n * @param {boolean=} forceCopy If `true` returns a copy, otherwise returns a view referencing the same memory.\r\n * Defaults to `false`\r\n * @returns {!ArrayBuffer} Contents as an ArrayBuffer\r\n * @expose\r\n */\r\n ByteBufferPrototype.toArrayBuffer = ByteBufferPrototype.toBuffer;\r\n\r\n /**\r\n * Converts the ByteBuffer's contents to a string.\r\n * @param {string=} encoding Output encoding. Returns an informative string representation if omitted but also allows\r\n * direct conversion to \"utf8\", \"hex\", \"base64\" and \"binary\" encoding. \"debug\" returns a hex representation with\r\n * highlighted offsets.\r\n * @param {number=} begin Offset to begin at, defaults to {@link ByteBuffer#offset}\r\n * @param {number=} end Offset to end at, defaults to {@link ByteBuffer#limit}\r\n * @returns {string} String representation\r\n * @throws {Error} If `encoding` is invalid\r\n * @expose\r\n */\r\n ByteBufferPrototype.toString = function(encoding, begin, end) {\r\n if (typeof encoding === 'undefined')\r\n return \"ByteBufferAB(offset=\"+this.offset+\",markedOffset=\"+this.markedOffset+\",limit=\"+this.limit+\",capacity=\"+this.capacity()+\")\";\r\n if (typeof encoding === 'number')\r\n encoding = \"utf8\",\r\n begin = encoding,\r\n end = begin;\r\n switch (encoding) {\r\n case \"utf8\":\r\n return this.toUTF8(begin, end);\r\n case \"base64\":\r\n return this.toBase64(begin, end);\r\n case \"hex\":\r\n return this.toHex(begin, end);\r\n case \"binary\":\r\n return this.toBinary(begin, end);\r\n case \"debug\":\r\n return this.toDebug();\r\n case \"columns\":\r\n return this.toColumns();\r\n default:\r\n throw Error(\"Unsupported encoding: \"+encoding);\r\n }\r\n };\r\n\r\n // lxiv-embeddable\r\n\r\n /**\r\n * lxiv-embeddable (c) 2014 Daniel Wirtz \r\n * Released under the Apache License, Version 2.0\r\n * see: https://github.com/dcodeIO/lxiv for details\r\n */\r\n var lxiv = function() {\r\n \"use strict\";\r\n\r\n /**\r\n * lxiv namespace.\r\n * @type {!Object.}\r\n * @exports lxiv\r\n */\r\n var lxiv = {};\r\n\r\n /**\r\n * Character codes for output.\r\n * @type {!Array.}\r\n * @inner\r\n */\r\n var aout = [\r\n 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,\r\n 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 97, 98, 99, 100, 101, 102,\r\n 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,\r\n 119, 120, 121, 122, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 43, 47\r\n ];\r\n\r\n /**\r\n * Character codes for input.\r\n * @type {!Array.}\r\n * @inner\r\n */\r\n var ain = [];\r\n for (var i=0, k=aout.length; i>2)&0x3f]);\r\n t = (b&0x3)<<4;\r\n if ((b = src()) !== null) {\r\n t |= (b>>4)&0xf;\r\n dst(aout[(t|((b>>4)&0xf))&0x3f]);\r\n t = (b&0xf)<<2;\r\n if ((b = src()) !== null)\r\n dst(aout[(t|((b>>6)&0x3))&0x3f]),\r\n dst(aout[b&0x3f]);\r\n else\r\n dst(aout[t&0x3f]),\r\n dst(61);\r\n } else\r\n dst(aout[t&0x3f]),\r\n dst(61),\r\n dst(61);\r\n }\r\n };\r\n\r\n /**\r\n * Decodes base64 char codes to bytes.\r\n * @param {!function():number|null} src Characters source as a function returning the next char code respectively\r\n * `null` if there are no more characters left.\r\n * @param {!function(number)} dst Bytes destination as a function successively called with the next byte.\r\n * @throws {Error} If a character code is invalid\r\n */\r\n lxiv.decode = function(src, dst) {\r\n var c, t1, t2;\r\n function fail(c) {\r\n throw Error(\"Illegal character code: \"+c);\r\n }\r\n while ((c = src()) !== null) {\r\n t1 = ain[c];\r\n if (typeof t1 === 'undefined') fail(c);\r\n if ((c = src()) !== null) {\r\n t2 = ain[c];\r\n if (typeof t2 === 'undefined') fail(c);\r\n dst((t1<<2)>>>0|(t2&0x30)>>4);\r\n if ((c = src()) !== null) {\r\n t1 = ain[c];\r\n if (typeof t1 === 'undefined')\r\n if (c === 61) break; else fail(c);\r\n dst(((t2&0xf)<<4)>>>0|(t1&0x3c)>>2);\r\n if ((c = src()) !== null) {\r\n t2 = ain[c];\r\n if (typeof t2 === 'undefined')\r\n if (c === 61) break; else fail(c);\r\n dst(((t1&0x3)<<6)>>>0|t2);\r\n }\r\n }\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Tests if a string is valid base64.\r\n * @param {string} str String to test\r\n * @returns {boolean} `true` if valid, otherwise `false`\r\n */\r\n lxiv.test = function(str) {\r\n return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(str);\r\n };\r\n\r\n return lxiv;\r\n }();\r\n\r\n // encodings/base64\r\n\r\n /**\r\n * Encodes this ByteBuffer's contents to a base64 encoded string.\r\n * @param {number=} begin Offset to begin at, defaults to {@link ByteBuffer#offset}.\r\n * @param {number=} end Offset to end at, defaults to {@link ByteBuffer#limit}.\r\n * @returns {string} Base64 encoded string\r\n * @throws {RangeError} If `begin` or `end` is out of bounds\r\n * @expose\r\n */\r\n ByteBufferPrototype.toBase64 = function(begin, end) {\r\n if (typeof begin === 'undefined')\r\n begin = this.offset;\r\n if (typeof end === 'undefined')\r\n end = this.limit;\r\n begin = begin | 0; end = end | 0;\r\n if (begin < 0 || end > this.capacity || begin > end)\r\n throw RangeError(\"begin, end\");\r\n var sd; lxiv.encode(function() {\r\n return begin < end ? this.view[begin++] : null;\r\n }.bind(this), sd = stringDestination());\r\n return sd();\r\n };\r\n\r\n /**\r\n * Decodes a base64 encoded string to a ByteBuffer.\r\n * @param {string} str String to decode\r\n * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to\r\n * {@link ByteBuffer.DEFAULT_ENDIAN}.\r\n * @returns {!ByteBuffer} ByteBuffer\r\n * @expose\r\n */\r\n ByteBuffer.fromBase64 = function(str, littleEndian) {\r\n if (typeof str !== 'string')\r\n throw TypeError(\"str\");\r\n var bb = new ByteBuffer(str.length/4*3, littleEndian),\r\n i = 0;\r\n lxiv.decode(stringSource(str), function(b) {\r\n bb.view[i++] = b;\r\n });\r\n bb.limit = i;\r\n return bb;\r\n };\r\n\r\n /**\r\n * Encodes a binary string to base64 like `window.btoa` does.\r\n * @param {string} str Binary string\r\n * @returns {string} Base64 encoded string\r\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Window.btoa\r\n * @expose\r\n */\r\n ByteBuffer.btoa = function(str) {\r\n return ByteBuffer.fromBinary(str).toBase64();\r\n };\r\n\r\n /**\r\n * Decodes a base64 encoded string to binary like `window.atob` does.\r\n * @param {string} b64 Base64 encoded string\r\n * @returns {string} Binary string\r\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Window.atob\r\n * @expose\r\n */\r\n ByteBuffer.atob = function(b64) {\r\n return ByteBuffer.fromBase64(b64).toBinary();\r\n };\r\n\r\n // encodings/binary\r\n\r\n /**\r\n * Encodes this ByteBuffer to a binary encoded string, that is using only characters 0x00-0xFF as bytes.\r\n * @param {number=} begin Offset to begin at. Defaults to {@link ByteBuffer#offset}.\r\n * @param {number=} end Offset to end at. Defaults to {@link ByteBuffer#limit}.\r\n * @returns {string} Binary encoded string\r\n * @throws {RangeError} If `offset > limit`\r\n * @expose\r\n */\r\n ByteBufferPrototype.toBinary = function(begin, end) {\r\n if (typeof begin === 'undefined')\r\n begin = this.offset;\r\n if (typeof end === 'undefined')\r\n end = this.limit;\r\n begin |= 0; end |= 0;\r\n if (begin < 0 || end > this.capacity() || begin > end)\r\n throw RangeError(\"begin, end\");\r\n if (begin === end)\r\n return \"\";\r\n var chars = [],\r\n parts = [];\r\n while (begin < end) {\r\n chars.push(this.view[begin++]);\r\n if (chars.length >= 1024)\r\n parts.push(String.fromCharCode.apply(String, chars)),\r\n chars = [];\r\n }\r\n return parts.join('') + String.fromCharCode.apply(String, chars);\r\n };\r\n\r\n /**\r\n * Decodes a binary encoded string, that is using only characters 0x00-0xFF as bytes, to a ByteBuffer.\r\n * @param {string} str String to decode\r\n * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to\r\n * {@link ByteBuffer.DEFAULT_ENDIAN}.\r\n * @returns {!ByteBuffer} ByteBuffer\r\n * @expose\r\n */\r\n ByteBuffer.fromBinary = function(str, littleEndian) {\r\n if (typeof str !== 'string')\r\n throw TypeError(\"str\");\r\n var i = 0,\r\n k = str.length,\r\n charCode,\r\n bb = new ByteBuffer(k, littleEndian);\r\n while (i 0xff)\r\n throw RangeError(\"illegal char code: \"+charCode);\r\n bb.view[i++] = charCode;\r\n }\r\n bb.limit = k;\r\n return bb;\r\n };\r\n\r\n // encodings/debug\r\n\r\n /**\r\n * Encodes this ByteBuffer to a hex encoded string with marked offsets. Offset symbols are:\r\n * * `<` : offset,\r\n * * `'` : markedOffset,\r\n * * `>` : limit,\r\n * * `|` : offset and limit,\r\n * * `[` : offset and markedOffset,\r\n * * `]` : markedOffset and limit,\r\n * * `!` : offset, markedOffset and limit\r\n * @param {boolean=} columns If `true` returns two columns hex + ascii, defaults to `false`\r\n * @returns {string|!Array.} Debug string or array of lines if `asArray = true`\r\n * @expose\r\n * @example `>00'01 02<03` contains four bytes with `limit=0, markedOffset=1, offset=3`\r\n * @example `00[01 02 03>` contains four bytes with `offset=markedOffset=1, limit=4`\r\n * @example `00|01 02 03` contains four bytes with `offset=limit=1, markedOffset=-1`\r\n * @example `|` contains zero bytes with `offset=limit=0, markedOffset=-1`\r\n */\r\n ByteBufferPrototype.toDebug = function(columns) {\r\n var i = -1,\r\n k = this.buffer.byteLength,\r\n b,\r\n hex = \"\",\r\n asc = \"\",\r\n out = \"\";\r\n while (i 32 && b < 127 ? String.fromCharCode(b) : '.';\r\n }\r\n ++i;\r\n if (columns) {\r\n if (i > 0 && i % 16 === 0 && i !== k) {\r\n while (hex.length < 3*16+3) hex += \" \";\r\n out += hex+asc+\"\\n\";\r\n hex = asc = \"\";\r\n }\r\n }\r\n if (i === this.offset && i === this.limit)\r\n hex += i === this.markedOffset ? \"!\" : \"|\";\r\n else if (i === this.offset)\r\n hex += i === this.markedOffset ? \"[\" : \"<\";\r\n else if (i === this.limit)\r\n hex += i === this.markedOffset ? \"]\" : \">\";\r\n else\r\n hex += i === this.markedOffset ? \"'\" : (columns || (i !== 0 && i !== k) ? \" \" : \"\");\r\n }\r\n if (columns && hex !== \" \") {\r\n while (hex.length < 3*16+3)\r\n hex += \" \";\r\n out += hex + asc + \"\\n\";\r\n }\r\n return columns ? out : hex;\r\n };\r\n\r\n /**\r\n * Decodes a hex encoded string with marked offsets to a ByteBuffer.\r\n * @param {string} str Debug string to decode (not be generated with `columns = true`)\r\n * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to\r\n * {@link ByteBuffer.DEFAULT_ENDIAN}.\r\n * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to\r\n * {@link ByteBuffer.DEFAULT_NOASSERT}.\r\n * @returns {!ByteBuffer} ByteBuffer\r\n * @expose\r\n * @see ByteBuffer#toDebug\r\n */\r\n ByteBuffer.fromDebug = function(str, littleEndian, noAssert) {\r\n var k = str.length,\r\n bb = new ByteBuffer(((k+1)/3)|0, littleEndian, noAssert);\r\n var i = 0, j = 0, ch, b,\r\n rs = false, // Require symbol next\r\n ho = false, hm = false, hl = false, // Already has offset (ho), markedOffset (hm), limit (hl)?\r\n fail = false;\r\n while (i':\r\n if (!noAssert) {\r\n if (hl) {\r\n fail = true;\r\n break;\r\n }\r\n hl = true;\r\n }\r\n bb.limit = j;\r\n rs = false;\r\n break;\r\n case \"'\":\r\n if (!noAssert) {\r\n if (hm) {\r\n fail = true;\r\n break;\r\n }\r\n hm = true;\r\n }\r\n bb.markedOffset = j;\r\n rs = false;\r\n break;\r\n case ' ':\r\n rs = false;\r\n break;\r\n default:\r\n if (!noAssert) {\r\n if (rs) {\r\n fail = true;\r\n break;\r\n }\r\n }\r\n b = parseInt(ch+str.charAt(i++), 16);\r\n if (!noAssert) {\r\n if (isNaN(b) || b < 0 || b > 255)\r\n throw TypeError(\"Illegal str: Not a debug encoded string\");\r\n }\r\n bb.view[j++] = b;\r\n rs = true;\r\n }\r\n if (fail)\r\n throw TypeError(\"Illegal str: Invalid symbol at \"+i);\r\n }\r\n if (!noAssert) {\r\n if (!ho || !hl)\r\n throw TypeError(\"Illegal str: Missing offset or limit\");\r\n if (j>>= 0;\n if (typeof end !== 'number' || end % 1 !== 0)\n throw TypeError(\"Illegal end: Not an integer\");\n end >>>= 0;\n if (begin < 0 || begin > end || end > this.buffer.byteLength)\n throw RangeError(\"Illegal range: 0 <= \"+begin+\" <= \"+end+\" <= \"+this.buffer.byteLength);\n }\r\n var out = new Array(end - begin),\r\n b;\r\n while (begin < end) {\r\n b = this.view[begin++];\r\n if (b < 0x10)\r\n out.push(\"0\", b.toString(16));\r\n else out.push(b.toString(16));\r\n }\r\n return out.join('');\r\n };\r\n\r\n /**\r\n * Decodes a hex encoded string to a ByteBuffer.\r\n * @param {string} str String to decode\r\n * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to\r\n * {@link ByteBuffer.DEFAULT_ENDIAN}.\r\n * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to\r\n * {@link ByteBuffer.DEFAULT_NOASSERT}.\r\n * @returns {!ByteBuffer} ByteBuffer\r\n * @expose\r\n */\r\n ByteBuffer.fromHex = function(str, littleEndian, noAssert) {\r\n if (!noAssert) {\r\n if (typeof str !== 'string')\r\n throw TypeError(\"Illegal str: Not a string\");\r\n if (str.length % 2 !== 0)\r\n throw TypeError(\"Illegal str: Length not a multiple of 2\");\r\n }\r\n var k = str.length,\r\n bb = new ByteBuffer((k / 2) | 0, littleEndian),\r\n b;\r\n for (var i=0, j=0; i 255)\r\n throw TypeError(\"Illegal str: Contains non-hex characters\");\r\n bb.view[j++] = b;\r\n }\r\n bb.limit = j;\r\n return bb;\r\n };\r\n\r\n // utfx-embeddable\r\n\r\n /**\r\n * utfx-embeddable (c) 2014 Daniel Wirtz \r\n * Released under the Apache License, Version 2.0\r\n * see: https://github.com/dcodeIO/utfx for details\r\n */\r\n var utfx = function() {\r\n \"use strict\";\r\n\r\n /**\r\n * utfx namespace.\r\n * @inner\r\n * @type {!Object.}\r\n */\r\n var utfx = {};\r\n\r\n /**\r\n * Maximum valid code point.\r\n * @type {number}\r\n * @const\r\n */\r\n utfx.MAX_CODEPOINT = 0x10FFFF;\r\n\r\n /**\r\n * Encodes UTF8 code points to UTF8 bytes.\r\n * @param {(!function():number|null) | number} src Code points source, either as a function returning the next code point\r\n * respectively `null` if there are no more code points left or a single numeric code point.\r\n * @param {!function(number)} dst Bytes destination as a function successively called with the next byte\r\n */\r\n utfx.encodeUTF8 = function(src, dst) {\r\n var cp = null;\r\n if (typeof src === 'number')\r\n cp = src,\r\n src = function() { return null; };\r\n while (cp !== null || (cp = src()) !== null) {\r\n if (cp < 0x80)\r\n dst(cp&0x7F);\r\n else if (cp < 0x800)\r\n dst(((cp>>6)&0x1F)|0xC0),\r\n dst((cp&0x3F)|0x80);\r\n else if (cp < 0x10000)\r\n dst(((cp>>12)&0x0F)|0xE0),\r\n dst(((cp>>6)&0x3F)|0x80),\r\n dst((cp&0x3F)|0x80);\r\n else\r\n dst(((cp>>18)&0x07)|0xF0),\r\n dst(((cp>>12)&0x3F)|0x80),\r\n dst(((cp>>6)&0x3F)|0x80),\r\n dst((cp&0x3F)|0x80);\r\n cp = null;\r\n }\r\n };\r\n\r\n /**\r\n * Decodes UTF8 bytes to UTF8 code points.\r\n * @param {!function():number|null} src Bytes source as a function returning the next byte respectively `null` if there\r\n * are no more bytes left.\r\n * @param {!function(number)} dst Code points destination as a function successively called with each decoded code point.\r\n * @throws {RangeError} If a starting byte is invalid in UTF8\r\n * @throws {Error} If the last sequence is truncated. Has an array property `bytes` holding the\r\n * remaining bytes.\r\n */\r\n utfx.decodeUTF8 = function(src, dst) {\r\n var a, b, c, d, fail = function(b) {\r\n b = b.slice(0, b.indexOf(null));\r\n var err = Error(b.toString());\r\n err.name = \"TruncatedError\";\r\n err['bytes'] = b;\r\n throw err;\r\n };\r\n while ((a = src()) !== null) {\r\n if ((a&0x80) === 0)\r\n dst(a);\r\n else if ((a&0xE0) === 0xC0)\r\n ((b = src()) === null) && fail([a, b]),\r\n dst(((a&0x1F)<<6) | (b&0x3F));\r\n else if ((a&0xF0) === 0xE0)\r\n ((b=src()) === null || (c=src()) === null) && fail([a, b, c]),\r\n dst(((a&0x0F)<<12) | ((b&0x3F)<<6) | (c&0x3F));\r\n else if ((a&0xF8) === 0xF0)\r\n ((b=src()) === null || (c=src()) === null || (d=src()) === null) && fail([a, b, c ,d]),\r\n dst(((a&0x07)<<18) | ((b&0x3F)<<12) | ((c&0x3F)<<6) | (d&0x3F));\r\n else throw RangeError(\"Illegal starting byte: \"+a);\r\n }\r\n };\r\n\r\n /**\r\n * Converts UTF16 characters to UTF8 code points.\r\n * @param {!function():number|null} src Characters source as a function returning the next char code respectively\r\n * `null` if there are no more characters left.\r\n * @param {!function(number)} dst Code points destination as a function successively called with each converted code\r\n * point.\r\n */\r\n utfx.UTF16toUTF8 = function(src, dst) {\r\n var c1, c2 = null;\r\n while (true) {\r\n if ((c1 = c2 !== null ? c2 : src()) === null)\r\n break;\r\n if (c1 >= 0xD800 && c1 <= 0xDFFF) {\r\n if ((c2 = src()) !== null) {\r\n if (c2 >= 0xDC00 && c2 <= 0xDFFF) {\r\n dst((c1-0xD800)*0x400+c2-0xDC00+0x10000);\r\n c2 = null; continue;\r\n }\r\n }\r\n }\r\n dst(c1);\r\n }\r\n if (c2 !== null) dst(c2);\r\n };\r\n\r\n /**\r\n * Converts UTF8 code points to UTF16 characters.\r\n * @param {(!function():number|null) | number} src Code points source, either as a function returning the next code point\r\n * respectively `null` if there are no more code points left or a single numeric code point.\r\n * @param {!function(number)} dst Characters destination as a function successively called with each converted char code.\r\n * @throws {RangeError} If a code point is out of range\r\n */\r\n utfx.UTF8toUTF16 = function(src, dst) {\r\n var cp = null;\r\n if (typeof src === 'number')\r\n cp = src, src = function() { return null; };\r\n while (cp !== null || (cp = src()) !== null) {\r\n if (cp <= 0xFFFF)\r\n dst(cp);\r\n else\r\n cp -= 0x10000,\r\n dst((cp>>10)+0xD800),\r\n dst((cp%0x400)+0xDC00);\r\n cp = null;\r\n }\r\n };\r\n\r\n /**\r\n * Converts and encodes UTF16 characters to UTF8 bytes.\r\n * @param {!function():number|null} src Characters source as a function returning the next char code respectively `null`\r\n * if there are no more characters left.\r\n * @param {!function(number)} dst Bytes destination as a function successively called with the next byte.\r\n */\r\n utfx.encodeUTF16toUTF8 = function(src, dst) {\r\n utfx.UTF16toUTF8(src, function(cp) {\r\n utfx.encodeUTF8(cp, dst);\r\n });\r\n };\r\n\r\n /**\r\n * Decodes and converts UTF8 bytes to UTF16 characters.\r\n * @param {!function():number|null} src Bytes source as a function returning the next byte respectively `null` if there\r\n * are no more bytes left.\r\n * @param {!function(number)} dst Characters destination as a function successively called with each converted char code.\r\n * @throws {RangeError} If a starting byte is invalid in UTF8\r\n * @throws {Error} If the last sequence is truncated. Has an array property `bytes` holding the remaining bytes.\r\n */\r\n utfx.decodeUTF8toUTF16 = function(src, dst) {\r\n utfx.decodeUTF8(src, function(cp) {\r\n utfx.UTF8toUTF16(cp, dst);\r\n });\r\n };\r\n\r\n /**\r\n * Calculates the byte length of an UTF8 code point.\r\n * @param {number} cp UTF8 code point\r\n * @returns {number} Byte length\r\n */\r\n utfx.calculateCodePoint = function(cp) {\r\n return (cp < 0x80) ? 1 : (cp < 0x800) ? 2 : (cp < 0x10000) ? 3 : 4;\r\n };\r\n\r\n /**\r\n * Calculates the number of UTF8 bytes required to store UTF8 code points.\r\n * @param {(!function():number|null)} src Code points source as a function returning the next code point respectively\r\n * `null` if there are no more code points left.\r\n * @returns {number} The number of UTF8 bytes required\r\n */\r\n utfx.calculateUTF8 = function(src) {\r\n var cp, l=0;\r\n while ((cp = src()) !== null)\r\n l += (cp < 0x80) ? 1 : (cp < 0x800) ? 2 : (cp < 0x10000) ? 3 : 4;\r\n return l;\r\n };\r\n\r\n /**\r\n * Calculates the number of UTF8 code points respectively UTF8 bytes required to store UTF16 char codes.\r\n * @param {(!function():number|null)} src Characters source as a function returning the next char code respectively\r\n * `null` if there are no more characters left.\r\n * @returns {!Array.} The number of UTF8 code points at index 0 and the number of UTF8 bytes required at index 1.\r\n */\r\n utfx.calculateUTF16asUTF8 = function(src) {\r\n var n=0, l=0;\r\n utfx.UTF16toUTF8(src, function(cp) {\r\n ++n; l += (cp < 0x80) ? 1 : (cp < 0x800) ? 2 : (cp < 0x10000) ? 3 : 4;\r\n });\r\n return [n,l];\r\n };\r\n\r\n return utfx;\r\n }();\r\n\r\n // encodings/utf8\r\n\r\n /**\r\n * Encodes this ByteBuffer's contents between {@link ByteBuffer#offset} and {@link ByteBuffer#limit} to an UTF8 encoded\r\n * string.\r\n * @returns {string} Hex encoded string\r\n * @throws {RangeError} If `offset > limit`\r\n * @expose\r\n */\r\n ByteBufferPrototype.toUTF8 = function(begin, end) {\r\n if (typeof begin === 'undefined') begin = this.offset;\r\n if (typeof end === 'undefined') end = this.limit;\r\n if (!this.noAssert) {\r\n if (typeof begin !== 'number' || begin % 1 !== 0)\n throw TypeError(\"Illegal begin: Not an integer\");\n begin >>>= 0;\n if (typeof end !== 'number' || end % 1 !== 0)\n throw TypeError(\"Illegal end: Not an integer\");\n end >>>= 0;\n if (begin < 0 || begin > end || end > this.buffer.byteLength)\n throw RangeError(\"Illegal range: 0 <= \"+begin+\" <= \"+end+\" <= \"+this.buffer.byteLength);\n }\r\n var sd; try {\r\n utfx.decodeUTF8toUTF16(function() {\r\n return begin < end ? this.view[begin++] : null;\r\n }.bind(this), sd = stringDestination());\r\n } catch (e) {\r\n if (begin !== end)\r\n throw RangeError(\"Illegal range: Truncated data, \"+begin+\" != \"+end);\r\n }\r\n return sd();\r\n };\r\n\r\n /**\r\n * Decodes an UTF8 encoded string to a ByteBuffer.\r\n * @param {string} str String to decode\r\n * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to\r\n * {@link ByteBuffer.DEFAULT_ENDIAN}.\r\n * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to\r\n * {@link ByteBuffer.DEFAULT_NOASSERT}.\r\n * @returns {!ByteBuffer} ByteBuffer\r\n * @expose\r\n */\r\n ByteBuffer.fromUTF8 = function(str, littleEndian, noAssert) {\r\n if (!noAssert)\r\n if (typeof str !== 'string')\r\n throw TypeError(\"Illegal str: Not a string\");\r\n var bb = new ByteBuffer(utfx.calculateUTF16asUTF8(stringSource(str), true)[1], littleEndian, noAssert),\r\n i = 0;\r\n utfx.encodeUTF16toUTF8(stringSource(str), function(b) {\r\n bb.view[i++] = b;\r\n });\r\n bb.limit = i;\r\n return bb;\r\n };\r\n\r\n return ByteBuffer;\r\n});\r\n","export default {};\n","/*\r\n Copyright 2013 Daniel Wirtz \r\n\r\n Licensed under the Apache License, Version 2.0 (the \"License\");\r\n you may not use this file except in compliance with the License.\r\n You may obtain a copy of the License at\r\n\r\n http://www.apache.org/licenses/LICENSE-2.0\r\n\r\n Unless required by applicable law or agreed to in writing, software\r\n distributed under the License is distributed on an \"AS IS\" BASIS,\r\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n See the License for the specific language governing permissions and\r\n limitations under the License.\r\n */\r\n\r\n/**\r\n * @license protobuf.js (c) 2013 Daniel Wirtz \r\n * Released under the Apache License, Version 2.0\r\n * see: https://github.com/dcodeIO/protobuf.js for details\r\n */\r\n(function(global, factory) {\r\n\r\n /* AMD */ if (typeof define === 'function' && define[\"amd\"])\r\n define([\"bytebuffer\"], factory);\r\n /* CommonJS */ else if (typeof require === \"function\" && typeof module === \"object\" && module && module[\"exports\"])\r\n module[\"exports\"] = factory(require(\"bytebuffer\"), true);\r\n /* Global */ else\r\n (global[\"dcodeIO\"] = global[\"dcodeIO\"] || {})[\"ProtoBuf\"] = factory(global[\"dcodeIO\"][\"ByteBuffer\"]);\r\n\r\n})(this, function(ByteBuffer, isCommonJS) {\r\n \"use strict\";\r\n\r\n /**\r\n * The ProtoBuf namespace.\r\n * @exports ProtoBuf\r\n * @namespace\r\n * @expose\r\n */\r\n var ProtoBuf = {};\r\n\r\n /**\r\n * @type {!function(new: ByteBuffer, ...[*])}\r\n * @expose\r\n */\r\n ProtoBuf.ByteBuffer = ByteBuffer;\r\n\r\n /**\r\n * @type {?function(new: Long, ...[*])}\r\n * @expose\r\n */\r\n ProtoBuf.Long = ByteBuffer.Long || null;\r\n\r\n /**\r\n * ProtoBuf.js version.\r\n * @type {string}\r\n * @const\r\n * @expose\r\n */\r\n ProtoBuf.VERSION = \"5.0.2\";\r\n\r\n /**\r\n * Wire types.\r\n * @type {Object.}\r\n * @const\r\n * @expose\r\n */\r\n ProtoBuf.WIRE_TYPES = {};\r\n\r\n /**\r\n * Varint wire type.\r\n * @type {number}\r\n * @expose\r\n */\r\n ProtoBuf.WIRE_TYPES.VARINT = 0;\r\n\r\n /**\r\n * Fixed 64 bits wire type.\r\n * @type {number}\r\n * @const\r\n * @expose\r\n */\r\n ProtoBuf.WIRE_TYPES.BITS64 = 1;\r\n\r\n /**\r\n * Length delimited wire type.\r\n * @type {number}\r\n * @const\r\n * @expose\r\n */\r\n ProtoBuf.WIRE_TYPES.LDELIM = 2;\r\n\r\n /**\r\n * Start group wire type.\r\n * @type {number}\r\n * @const\r\n * @expose\r\n */\r\n ProtoBuf.WIRE_TYPES.STARTGROUP = 3;\r\n\r\n /**\r\n * End group wire type.\r\n * @type {number}\r\n * @const\r\n * @expose\r\n */\r\n ProtoBuf.WIRE_TYPES.ENDGROUP = 4;\r\n\r\n /**\r\n * Fixed 32 bits wire type.\r\n * @type {number}\r\n * @const\r\n * @expose\r\n */\r\n ProtoBuf.WIRE_TYPES.BITS32 = 5;\r\n\r\n /**\r\n * Packable wire types.\r\n * @type {!Array.}\r\n * @const\r\n * @expose\r\n */\r\n ProtoBuf.PACKABLE_WIRE_TYPES = [\r\n ProtoBuf.WIRE_TYPES.VARINT,\r\n ProtoBuf.WIRE_TYPES.BITS64,\r\n ProtoBuf.WIRE_TYPES.BITS32\r\n ];\r\n\r\n /**\r\n * Types.\r\n * @dict\r\n * @type {!Object.}\r\n * @const\r\n * @expose\r\n */\r\n ProtoBuf.TYPES = {\r\n // According to the protobuf spec.\r\n \"int32\": {\r\n name: \"int32\",\r\n wireType: ProtoBuf.WIRE_TYPES.VARINT,\r\n defaultValue: 0\r\n },\r\n \"uint32\": {\r\n name: \"uint32\",\r\n wireType: ProtoBuf.WIRE_TYPES.VARINT,\r\n defaultValue: 0\r\n },\r\n \"sint32\": {\r\n name: \"sint32\",\r\n wireType: ProtoBuf.WIRE_TYPES.VARINT,\r\n defaultValue: 0\r\n },\r\n \"int64\": {\r\n name: \"int64\",\r\n wireType: ProtoBuf.WIRE_TYPES.VARINT,\r\n defaultValue: ProtoBuf.Long ? ProtoBuf.Long.ZERO : undefined\r\n },\r\n \"uint64\": {\r\n name: \"uint64\",\r\n wireType: ProtoBuf.WIRE_TYPES.VARINT,\r\n defaultValue: ProtoBuf.Long ? ProtoBuf.Long.UZERO : undefined\r\n },\r\n \"sint64\": {\r\n name: \"sint64\",\r\n wireType: ProtoBuf.WIRE_TYPES.VARINT,\r\n defaultValue: ProtoBuf.Long ? ProtoBuf.Long.ZERO : undefined\r\n },\r\n \"bool\": {\r\n name: \"bool\",\r\n wireType: ProtoBuf.WIRE_TYPES.VARINT,\r\n defaultValue: false\r\n },\r\n \"double\": {\r\n name: \"double\",\r\n wireType: ProtoBuf.WIRE_TYPES.BITS64,\r\n defaultValue: 0\r\n },\r\n \"string\": {\r\n name: \"string\",\r\n wireType: ProtoBuf.WIRE_TYPES.LDELIM,\r\n defaultValue: \"\"\r\n },\r\n \"bytes\": {\r\n name: \"bytes\",\r\n wireType: ProtoBuf.WIRE_TYPES.LDELIM,\r\n defaultValue: null // overridden in the code, must be a unique instance\r\n },\r\n \"fixed32\": {\r\n name: \"fixed32\",\r\n wireType: ProtoBuf.WIRE_TYPES.BITS32,\r\n defaultValue: 0\r\n },\r\n \"sfixed32\": {\r\n name: \"sfixed32\",\r\n wireType: ProtoBuf.WIRE_TYPES.BITS32,\r\n defaultValue: 0\r\n },\r\n \"fixed64\": {\r\n name: \"fixed64\",\r\n wireType: ProtoBuf.WIRE_TYPES.BITS64,\r\n defaultValue: ProtoBuf.Long ? ProtoBuf.Long.UZERO : undefined\r\n },\r\n \"sfixed64\": {\r\n name: \"sfixed64\",\r\n wireType: ProtoBuf.WIRE_TYPES.BITS64,\r\n defaultValue: ProtoBuf.Long ? ProtoBuf.Long.ZERO : undefined\r\n },\r\n \"float\": {\r\n name: \"float\",\r\n wireType: ProtoBuf.WIRE_TYPES.BITS32,\r\n defaultValue: 0\r\n },\r\n \"enum\": {\r\n name: \"enum\",\r\n wireType: ProtoBuf.WIRE_TYPES.VARINT,\r\n defaultValue: 0\r\n },\r\n \"message\": {\r\n name: \"message\",\r\n wireType: ProtoBuf.WIRE_TYPES.LDELIM,\r\n defaultValue: null\r\n },\r\n \"group\": {\r\n name: \"group\",\r\n wireType: ProtoBuf.WIRE_TYPES.STARTGROUP,\r\n defaultValue: null\r\n }\r\n };\r\n\r\n /**\r\n * Valid map key types.\r\n * @type {!Array.>}\r\n * @const\r\n * @expose\r\n */\r\n ProtoBuf.MAP_KEY_TYPES = [\r\n ProtoBuf.TYPES[\"int32\"],\r\n ProtoBuf.TYPES[\"sint32\"],\r\n ProtoBuf.TYPES[\"sfixed32\"],\r\n ProtoBuf.TYPES[\"uint32\"],\r\n ProtoBuf.TYPES[\"fixed32\"],\r\n ProtoBuf.TYPES[\"int64\"],\r\n ProtoBuf.TYPES[\"sint64\"],\r\n ProtoBuf.TYPES[\"sfixed64\"],\r\n ProtoBuf.TYPES[\"uint64\"],\r\n ProtoBuf.TYPES[\"fixed64\"],\r\n ProtoBuf.TYPES[\"bool\"],\r\n ProtoBuf.TYPES[\"string\"],\r\n ProtoBuf.TYPES[\"bytes\"]\r\n ];\r\n\r\n /**\r\n * Minimum field id.\r\n * @type {number}\r\n * @const\r\n * @expose\r\n */\r\n ProtoBuf.ID_MIN = 1;\r\n\r\n /**\r\n * Maximum field id.\r\n * @type {number}\r\n * @const\r\n * @expose\r\n */\r\n ProtoBuf.ID_MAX = 0x1FFFFFFF;\r\n\r\n /**\r\n * If set to `true`, field names will be converted from underscore notation to camel case. Defaults to `false`.\r\n * Must be set prior to parsing.\r\n * @type {boolean}\r\n * @expose\r\n */\r\n ProtoBuf.convertFieldsToCamelCase = false;\r\n\r\n /**\r\n * By default, messages are populated with (setX, set_x) accessors for each field. This can be disabled by\r\n * setting this to `false` prior to building messages.\r\n * @type {boolean}\r\n * @expose\r\n */\r\n ProtoBuf.populateAccessors = true;\r\n\r\n /**\r\n * By default, messages are populated with default values if a field is not present on the wire. To disable\r\n * this behavior, set this setting to `false`.\r\n * @type {boolean}\r\n * @expose\r\n */\r\n ProtoBuf.populateDefaults = true;\r\n\r\n /**\r\n * @alias ProtoBuf.Util\r\n * @expose\r\n */\r\n ProtoBuf.Util = (function() {\r\n \"use strict\";\r\n\r\n /**\r\n * ProtoBuf utilities.\r\n * @exports ProtoBuf.Util\r\n * @namespace\r\n */\r\n var Util = {};\r\n\r\n /**\r\n * Flag if running in node or not.\r\n * @type {boolean}\r\n * @const\r\n * @expose\r\n */\r\n Util.IS_NODE = !!(\r\n typeof process === 'object' && process+'' === '[object process]' && !process['browser']\r\n );\r\n\r\n /**\r\n * Constructs a XMLHttpRequest object.\r\n * @return {XMLHttpRequest}\r\n * @throws {Error} If XMLHttpRequest is not supported\r\n * @expose\r\n */\r\n Util.XHR = function() {\r\n // No dependencies please, ref: http://www.quirksmode.org/js/xmlhttp.html\r\n var XMLHttpFactories = [\r\n function () {return new XMLHttpRequest()},\r\n function () {return new ActiveXObject(\"Msxml2.XMLHTTP\")},\r\n function () {return new ActiveXObject(\"Msxml3.XMLHTTP\")},\r\n function () {return new ActiveXObject(\"Microsoft.XMLHTTP\")}\r\n ];\r\n /** @type {?XMLHttpRequest} */\r\n var xhr = null;\r\n for (var i=0;i}\r\n * @expose\r\n */\r\n ProtoBuf.Lang = {\r\n\r\n // Characters always ending a statement\r\n DELIM: /[\\s\\{\\}=;:\\[\\],'\"\\(\\)<>]/g,\r\n\r\n // Field rules\r\n RULE: /^(?:required|optional|repeated|map)$/,\r\n\r\n // Field types\r\n TYPE: /^(?:double|float|int32|uint32|sint32|int64|uint64|sint64|fixed32|sfixed32|fixed64|sfixed64|bool|string|bytes)$/,\r\n\r\n // Names\r\n NAME: /^[a-zA-Z_][a-zA-Z_0-9]*$/,\r\n\r\n // Type definitions\r\n TYPEDEF: /^[a-zA-Z][a-zA-Z_0-9]*$/,\r\n\r\n // Type references\r\n TYPEREF: /^(?:\\.?[a-zA-Z_][a-zA-Z_0-9]*)+$/,\r\n\r\n // Fully qualified type references\r\n FQTYPEREF: /^(?:\\.[a-zA-Z][a-zA-Z_0-9]*)+$/,\r\n\r\n // All numbers\r\n NUMBER: /^-?(?:[1-9][0-9]*|0|0[xX][0-9a-fA-F]+|0[0-7]+|([0-9]*(\\.[0-9]*)?([Ee][+-]?[0-9]+)?)|inf|nan)$/,\r\n\r\n // Decimal numbers\r\n NUMBER_DEC: /^(?:[1-9][0-9]*|0)$/,\r\n\r\n // Hexadecimal numbers\r\n NUMBER_HEX: /^0[xX][0-9a-fA-F]+$/,\r\n\r\n // Octal numbers\r\n NUMBER_OCT: /^0[0-7]+$/,\r\n\r\n // Floating point numbers\r\n NUMBER_FLT: /^([0-9]*(\\.[0-9]*)?([Ee][+-]?[0-9]+)?|inf|nan)$/,\r\n\r\n // Booleans\r\n BOOL: /^(?:true|false)$/i,\r\n\r\n // Id numbers\r\n ID: /^(?:[1-9][0-9]*|0|0[xX][0-9a-fA-F]+|0[0-7]+)$/,\r\n\r\n // Negative id numbers (enum values)\r\n NEGID: /^\\-?(?:[1-9][0-9]*|0|0[xX][0-9a-fA-F]+|0[0-7]+)$/,\r\n\r\n // Whitespaces\r\n WHITESPACE: /\\s/,\r\n\r\n // All strings\r\n STRING: /(?:\"([^\"\\\\]*(?:\\\\.[^\"\\\\]*)*)\")|(?:'([^'\\\\]*(?:\\\\.[^'\\\\]*)*)')/g,\r\n\r\n // Double quoted strings\r\n STRING_DQ: /(?:\"([^\"\\\\]*(?:\\\\.[^\"\\\\]*)*)\")/g,\r\n\r\n // Single quoted strings\r\n STRING_SQ: /(?:'([^'\\\\]*(?:\\\\.[^'\\\\]*)*)')/g\r\n };\r\n\r\n\r\n /**\r\n * @alias ProtoBuf.Reflect\r\n * @expose\r\n */\r\n ProtoBuf.Reflect = (function(ProtoBuf) {\r\n \"use strict\";\r\n\r\n /**\r\n * Reflection types.\r\n * @exports ProtoBuf.Reflect\r\n * @namespace\r\n */\r\n var Reflect = {};\r\n\r\n /**\r\n * Constructs a Reflect base class.\r\n * @exports ProtoBuf.Reflect.T\r\n * @constructor\r\n * @abstract\r\n * @param {!ProtoBuf.Builder} builder Builder reference\r\n * @param {?ProtoBuf.Reflect.T} parent Parent object\r\n * @param {string} name Object name\r\n */\r\n var T = function(builder, parent, name) {\r\n\r\n /**\r\n * Builder reference.\r\n * @type {!ProtoBuf.Builder}\r\n * @expose\r\n */\r\n this.builder = builder;\r\n\r\n /**\r\n * Parent object.\r\n * @type {?ProtoBuf.Reflect.T}\r\n * @expose\r\n */\r\n this.parent = parent;\r\n\r\n /**\r\n * Object name in namespace.\r\n * @type {string}\r\n * @expose\r\n */\r\n this.name = name;\r\n\r\n /**\r\n * Fully qualified class name\r\n * @type {string}\r\n * @expose\r\n */\r\n this.className;\r\n };\r\n\r\n /**\r\n * @alias ProtoBuf.Reflect.T.prototype\r\n * @inner\r\n */\r\n var TPrototype = T.prototype;\r\n\r\n /**\r\n * Returns the fully qualified name of this object.\r\n * @returns {string} Fully qualified name as of \".PATH.TO.THIS\"\r\n * @expose\r\n */\r\n TPrototype.fqn = function() {\r\n var name = this.name,\r\n ptr = this;\r\n do {\r\n ptr = ptr.parent;\r\n if (ptr == null)\r\n break;\r\n name = ptr.name+\".\"+name;\r\n } while (true);\r\n return name;\r\n };\r\n\r\n /**\r\n * Returns a string representation of this Reflect object (its fully qualified name).\r\n * @param {boolean=} includeClass Set to true to include the class name. Defaults to false.\r\n * @return String representation\r\n * @expose\r\n */\r\n TPrototype.toString = function(includeClass) {\r\n return (includeClass ? this.className + \" \" : \"\") + this.fqn();\r\n };\r\n\r\n /**\r\n * Builds this type.\r\n * @throws {Error} If this type cannot be built directly\r\n * @expose\r\n */\r\n TPrototype.build = function() {\r\n throw Error(this.toString(true)+\" cannot be built directly\");\r\n };\r\n\r\n /**\r\n * @alias ProtoBuf.Reflect.T\r\n * @expose\r\n */\r\n Reflect.T = T;\r\n\r\n /**\r\n * Constructs a new Namespace.\r\n * @exports ProtoBuf.Reflect.Namespace\r\n * @param {!ProtoBuf.Builder} builder Builder reference\r\n * @param {?ProtoBuf.Reflect.Namespace} parent Namespace parent\r\n * @param {string} name Namespace name\r\n * @param {Object.=} options Namespace options\r\n * @param {string?} syntax The syntax level of this definition (e.g., proto3)\r\n * @constructor\r\n * @extends ProtoBuf.Reflect.T\r\n */\r\n var Namespace = function(builder, parent, name, options, syntax) {\r\n T.call(this, builder, parent, name);\r\n\r\n /**\r\n * @override\r\n */\r\n this.className = \"Namespace\";\r\n\r\n /**\r\n * Children inside the namespace.\r\n * @type {!Array.}\r\n */\r\n this.children = [];\r\n\r\n /**\r\n * Options.\r\n * @type {!Object.}\r\n */\r\n this.options = options || {};\r\n\r\n /**\r\n * Syntax level (e.g., proto2 or proto3).\r\n * @type {!string}\r\n */\r\n this.syntax = syntax || \"proto2\";\r\n };\r\n\r\n /**\r\n * @alias ProtoBuf.Reflect.Namespace.prototype\r\n * @inner\r\n */\r\n var NamespacePrototype = Namespace.prototype = Object.create(T.prototype);\r\n\r\n /**\r\n * Returns an array of the namespace's children.\r\n * @param {ProtoBuf.Reflect.T=} type Filter type (returns instances of this type only). Defaults to null (all children).\r\n * @return {Array.}\r\n * @expose\r\n */\r\n NamespacePrototype.getChildren = function(type) {\r\n type = type || null;\r\n if (type == null)\r\n return this.children.slice();\r\n var children = [];\r\n for (var i=0, k=this.children.length; i} qn Qualified name to resolve\r\n * @param {boolean=} excludeNonNamespace Excludes non-namespace types, defaults to `false`\r\n * @return {?ProtoBuf.Reflect.Namespace} The resolved type or null if not found\r\n * @expose\r\n */\r\n NamespacePrototype.resolve = function(qn, excludeNonNamespace) {\r\n var part = typeof qn === 'string' ? qn.split(\".\") : qn,\r\n ptr = this,\r\n i = 0;\r\n if (part[i] === \"\") { // Fully qualified name, e.g. \".My.Message'\r\n while (ptr.parent !== null)\r\n ptr = ptr.parent;\r\n i++;\r\n }\r\n var child;\r\n do {\r\n do {\r\n if (!(ptr instanceof Reflect.Namespace)) {\r\n ptr = null;\r\n break;\r\n }\r\n child = ptr.getChild(part[i]);\r\n if (!child || !(child instanceof Reflect.T) || (excludeNonNamespace && !(child instanceof Reflect.Namespace))) {\r\n ptr = null;\r\n break;\r\n }\r\n ptr = child; i++;\r\n } while (i < part.length);\r\n if (ptr != null)\r\n break; // Found\r\n // Else search the parent\r\n if (this.parent !== null)\r\n return this.parent.resolve(qn, excludeNonNamespace);\r\n } while (ptr != null);\r\n return ptr;\r\n };\r\n\r\n /**\r\n * Determines the shortest qualified name of the specified type, if any, relative to this namespace.\r\n * @param {!ProtoBuf.Reflect.T} t Reflection type\r\n * @returns {string} The shortest qualified name or, if there is none, the fqn\r\n * @expose\r\n */\r\n NamespacePrototype.qn = function(t) {\r\n var part = [], ptr = t;\r\n do {\r\n part.unshift(ptr.name);\r\n ptr = ptr.parent;\r\n } while (ptr !== null);\r\n for (var len=1; len <= part.length; len++) {\r\n var qn = part.slice(part.length-len);\r\n if (t === this.resolve(qn, t instanceof Reflect.Namespace))\r\n return qn.join(\".\");\r\n }\r\n return t.fqn();\r\n };\r\n\r\n /**\r\n * Builds the namespace and returns the runtime counterpart.\r\n * @return {Object.} Runtime namespace\r\n * @expose\r\n */\r\n NamespacePrototype.build = function() {\r\n /** @dict */\r\n var ns = {};\r\n var children = this.children;\r\n for (var i=0, k=children.length, child; i}\r\n */\r\n NamespacePrototype.buildOpt = function() {\r\n var opt = {},\r\n keys = Object.keys(this.options);\r\n for (var i=0, k=keys.length; i}null} Option value or NULL if there is no such option\r\n */\r\n NamespacePrototype.getOption = function(name) {\r\n if (typeof name === 'undefined')\r\n return this.options;\r\n return typeof this.options[name] !== 'undefined' ? this.options[name] : null;\r\n };\r\n\r\n /**\r\n * @alias ProtoBuf.Reflect.Namespace\r\n * @expose\r\n */\r\n Reflect.Namespace = Namespace;\r\n\r\n /**\r\n * Constructs a new Element implementation that checks and converts values for a\r\n * particular field type, as appropriate.\r\n *\r\n * An Element represents a single value: either the value of a singular field,\r\n * or a value contained in one entry of a repeated field or map field. This\r\n * class does not implement these higher-level concepts; it only encapsulates\r\n * the low-level typechecking and conversion.\r\n *\r\n * @exports ProtoBuf.Reflect.Element\r\n * @param {{name: string, wireType: number}} type Resolved data type\r\n * @param {ProtoBuf.Reflect.T|null} resolvedType Resolved type, if relevant\r\n * (e.g. submessage field).\r\n * @param {boolean} isMapKey Is this element a Map key? The value will be\r\n * converted to string form if so.\r\n * @param {string} syntax Syntax level of defining message type, e.g.,\r\n * proto2 or proto3.\r\n * @param {string} name Name of the field containing this element (for error\r\n * messages)\r\n * @constructor\r\n */\r\n var Element = function(type, resolvedType, isMapKey, syntax, name) {\r\n\r\n /**\r\n * Element type, as a string (e.g., int32).\r\n * @type {{name: string, wireType: number}}\r\n */\r\n this.type = type;\r\n\r\n /**\r\n * Element type reference to submessage or enum definition, if needed.\r\n * @type {ProtoBuf.Reflect.T|null}\r\n */\r\n this.resolvedType = resolvedType;\r\n\r\n /**\r\n * Element is a map key.\r\n * @type {boolean}\r\n */\r\n this.isMapKey = isMapKey;\r\n\r\n /**\r\n * Syntax level of defining message type, e.g., proto2 or proto3.\r\n * @type {string}\r\n */\r\n this.syntax = syntax;\r\n\r\n /**\r\n * Name of the field containing this element (for error messages)\r\n * @type {string}\r\n */\r\n this.name = name;\r\n\r\n if (isMapKey && ProtoBuf.MAP_KEY_TYPES.indexOf(type) < 0)\r\n throw Error(\"Invalid map key type: \" + type.name);\r\n };\r\n\r\n var ElementPrototype = Element.prototype;\r\n\r\n /**\r\n * Obtains a (new) default value for the specified type.\r\n * @param type {string|{name: string, wireType: number}} Field type\r\n * @returns {*} Default value\r\n * @inner\r\n */\r\n function mkDefault(type) {\r\n if (typeof type === 'string')\r\n type = ProtoBuf.TYPES[type];\r\n if (typeof type.defaultValue === 'undefined')\r\n throw Error(\"default value for type \"+type.name+\" is not supported\");\r\n if (type == ProtoBuf.TYPES[\"bytes\"])\r\n return new ByteBuffer(0);\r\n return type.defaultValue;\r\n }\r\n\r\n /**\r\n * Returns the default value for this field in proto3.\r\n * @function\r\n * @param type {string|{name: string, wireType: number}} the field type\r\n * @returns {*} Default value\r\n */\r\n Element.defaultFieldValue = mkDefault;\r\n\r\n /**\r\n * Makes a Long from a value.\r\n * @param {{low: number, high: number, unsigned: boolean}|string|number} value Value\r\n * @param {boolean=} unsigned Whether unsigned or not, defaults to reuse it from Long-like objects or to signed for\r\n * strings and numbers\r\n * @returns {!Long}\r\n * @throws {Error} If the value cannot be converted to a Long\r\n * @inner\r\n */\r\n function mkLong(value, unsigned) {\r\n if (value && typeof value.low === 'number' && typeof value.high === 'number' && typeof value.unsigned === 'boolean'\r\n && value.low === value.low && value.high === value.high)\r\n return new ProtoBuf.Long(value.low, value.high, typeof unsigned === 'undefined' ? value.unsigned : unsigned);\r\n if (typeof value === 'string')\r\n return ProtoBuf.Long.fromString(value, unsigned || false, 10);\r\n if (typeof value === 'number')\r\n return ProtoBuf.Long.fromNumber(value, unsigned || false);\r\n throw Error(\"not convertible to Long\");\r\n }\r\n\r\n ElementPrototype.toString = function() {\r\n return (this.name || '') + (this.isMapKey ? 'map' : 'value') + ' element';\r\n }\r\n\r\n /**\r\n * Checks if the given value can be set for an element of this type (singular\r\n * field or one element of a repeated field or map).\r\n * @param {*} value Value to check\r\n * @return {*} Verified, maybe adjusted, value\r\n * @throws {Error} If the value cannot be verified for this element slot\r\n * @expose\r\n */\r\n ElementPrototype.verifyValue = function(value) {\r\n var self = this;\r\n function fail(val, msg) {\r\n throw Error(\"Illegal value for \"+self.toString(true)+\" of type \"+self.type.name+\": \"+val+\" (\"+msg+\")\");\r\n }\r\n switch (this.type) {\r\n // Signed 32bit\r\n case ProtoBuf.TYPES[\"int32\"]:\r\n case ProtoBuf.TYPES[\"sint32\"]:\r\n case ProtoBuf.TYPES[\"sfixed32\"]:\r\n // Account for !NaN: value === value\r\n if (typeof value !== 'number' || (value === value && value % 1 !== 0))\r\n fail(typeof value, \"not an integer\");\r\n return value > 4294967295 ? value | 0 : value;\r\n\r\n // Unsigned 32bit\r\n case ProtoBuf.TYPES[\"uint32\"]:\r\n case ProtoBuf.TYPES[\"fixed32\"]:\r\n if (typeof value !== 'number' || (value === value && value % 1 !== 0))\r\n fail(typeof value, \"not an integer\");\r\n return value < 0 ? value >>> 0 : value;\r\n\r\n // Signed 64bit\r\n case ProtoBuf.TYPES[\"int64\"]:\r\n case ProtoBuf.TYPES[\"sint64\"]:\r\n case ProtoBuf.TYPES[\"sfixed64\"]: {\r\n if (ProtoBuf.Long)\r\n try {\r\n return mkLong(value, false);\r\n } catch (e) {\r\n fail(typeof value, e.message);\r\n }\r\n else\r\n fail(typeof value, \"requires Long.js\");\r\n }\r\n\r\n // Unsigned 64bit\r\n case ProtoBuf.TYPES[\"uint64\"]:\r\n case ProtoBuf.TYPES[\"fixed64\"]: {\r\n if (ProtoBuf.Long)\r\n try {\r\n return mkLong(value, true);\r\n } catch (e) {\r\n fail(typeof value, e.message);\r\n }\r\n else\r\n fail(typeof value, \"requires Long.js\");\r\n }\r\n\r\n // Bool\r\n case ProtoBuf.TYPES[\"bool\"]:\r\n if (typeof value !== 'boolean')\r\n fail(typeof value, \"not a boolean\");\r\n return value;\r\n\r\n // Float\r\n case ProtoBuf.TYPES[\"float\"]:\r\n case ProtoBuf.TYPES[\"double\"]:\r\n if (typeof value !== 'number')\r\n fail(typeof value, \"not a number\");\r\n return value;\r\n\r\n // Length-delimited string\r\n case ProtoBuf.TYPES[\"string\"]:\r\n if (typeof value !== 'string' && !(value && value instanceof String))\r\n fail(typeof value, \"not a string\");\r\n return \"\"+value; // Convert String object to string\r\n\r\n // Length-delimited bytes\r\n case ProtoBuf.TYPES[\"bytes\"]:\r\n if (ByteBuffer.isByteBuffer(value))\r\n return value;\r\n return ByteBuffer.wrap(value, \"base64\");\r\n\r\n // Constant enum value\r\n case ProtoBuf.TYPES[\"enum\"]: {\r\n var values = this.resolvedType.getChildren(ProtoBuf.Reflect.Enum.Value);\r\n for (i=0; i 4294967295 || value < 0)\r\n fail(typeof value, \"not in range for uint32\")\r\n return value;\r\n } else {\r\n // proto2 requires enum values to be valid.\r\n fail(value, \"not a valid enum value\");\r\n }\r\n }\r\n // Embedded message\r\n case ProtoBuf.TYPES[\"group\"]:\r\n case ProtoBuf.TYPES[\"message\"]: {\r\n if (!value || typeof value !== 'object')\r\n fail(typeof value, \"object expected\");\r\n if (value instanceof this.resolvedType.clazz)\r\n return value;\r\n if (value instanceof ProtoBuf.Builder.Message) {\r\n // Mismatched type: Convert to object (see: https://github.com/dcodeIO/ProtoBuf.js/issues/180)\r\n var obj = {};\r\n for (var i in value)\r\n if (value.hasOwnProperty(i))\r\n obj[i] = value[i];\r\n value = obj;\r\n }\r\n // Else let's try to construct one from a key-value object\r\n return new (this.resolvedType.clazz)(value); // May throw for a hundred of reasons\r\n }\r\n }\r\n\r\n // We should never end here\r\n throw Error(\"[INTERNAL] Illegal value for \"+this.toString(true)+\": \"+value+\" (undefined type \"+this.type+\")\");\r\n };\r\n\r\n /**\r\n * Calculates the byte length of an element on the wire.\r\n * @param {number} id Field number\r\n * @param {*} value Field value\r\n * @returns {number} Byte length\r\n * @throws {Error} If the value cannot be calculated\r\n * @expose\r\n */\r\n ElementPrototype.calculateLength = function(id, value) {\r\n if (value === null) return 0; // Nothing to encode\r\n // Tag has already been written\r\n var n;\r\n switch (this.type) {\r\n case ProtoBuf.TYPES[\"int32\"]:\r\n return value < 0 ? ByteBuffer.calculateVarint64(value) : ByteBuffer.calculateVarint32(value);\r\n case ProtoBuf.TYPES[\"uint32\"]:\r\n return ByteBuffer.calculateVarint32(value);\r\n case ProtoBuf.TYPES[\"sint32\"]:\r\n return ByteBuffer.calculateVarint32(ByteBuffer.zigZagEncode32(value));\r\n case ProtoBuf.TYPES[\"fixed32\"]:\r\n case ProtoBuf.TYPES[\"sfixed32\"]:\r\n case ProtoBuf.TYPES[\"float\"]:\r\n return 4;\r\n case ProtoBuf.TYPES[\"int64\"]:\r\n case ProtoBuf.TYPES[\"uint64\"]:\r\n return ByteBuffer.calculateVarint64(value);\r\n case ProtoBuf.TYPES[\"sint64\"]:\r\n return ByteBuffer.calculateVarint64(ByteBuffer.zigZagEncode64(value));\r\n case ProtoBuf.TYPES[\"fixed64\"]:\r\n case ProtoBuf.TYPES[\"sfixed64\"]:\r\n return 8;\r\n case ProtoBuf.TYPES[\"bool\"]:\r\n return 1;\r\n case ProtoBuf.TYPES[\"enum\"]:\r\n return ByteBuffer.calculateVarint32(value);\r\n case ProtoBuf.TYPES[\"double\"]:\r\n return 8;\r\n case ProtoBuf.TYPES[\"string\"]:\r\n n = ByteBuffer.calculateUTF8Bytes(value);\r\n return ByteBuffer.calculateVarint32(n) + n;\r\n case ProtoBuf.TYPES[\"bytes\"]:\r\n if (value.remaining() < 0)\r\n throw Error(\"Illegal value for \"+this.toString(true)+\": \"+value.remaining()+\" bytes remaining\");\r\n return ByteBuffer.calculateVarint32(value.remaining()) + value.remaining();\r\n case ProtoBuf.TYPES[\"message\"]:\r\n n = this.resolvedType.calculate(value);\r\n return ByteBuffer.calculateVarint32(n) + n;\r\n case ProtoBuf.TYPES[\"group\"]:\r\n n = this.resolvedType.calculate(value);\r\n return n + ByteBuffer.calculateVarint32((id << 3) | ProtoBuf.WIRE_TYPES.ENDGROUP);\r\n }\r\n // We should never end here\r\n throw Error(\"[INTERNAL] Illegal value to encode in \"+this.toString(true)+\": \"+value+\" (unknown type)\");\r\n };\r\n\r\n /**\r\n * Encodes a value to the specified buffer. Does not encode the key.\r\n * @param {number} id Field number\r\n * @param {*} value Field value\r\n * @param {ByteBuffer} buffer ByteBuffer to encode to\r\n * @return {ByteBuffer} The ByteBuffer for chaining\r\n * @throws {Error} If the value cannot be encoded\r\n * @expose\r\n */\r\n ElementPrototype.encodeValue = function(id, value, buffer) {\r\n if (value === null) return buffer; // Nothing to encode\r\n // Tag has already been written\r\n\r\n switch (this.type) {\r\n // 32bit signed varint\r\n case ProtoBuf.TYPES[\"int32\"]:\r\n // \"If you use int32 or int64 as the type for a negative number, the resulting varint is always ten bytes\r\n // long – it is, effectively, treated like a very large unsigned integer.\" (see #122)\r\n if (value < 0)\r\n buffer.writeVarint64(value);\r\n else\r\n buffer.writeVarint32(value);\r\n break;\r\n\r\n // 32bit unsigned varint\r\n case ProtoBuf.TYPES[\"uint32\"]:\r\n buffer.writeVarint32(value);\r\n break;\r\n\r\n // 32bit varint zig-zag\r\n case ProtoBuf.TYPES[\"sint32\"]:\r\n buffer.writeVarint32ZigZag(value);\r\n break;\r\n\r\n // Fixed unsigned 32bit\r\n case ProtoBuf.TYPES[\"fixed32\"]:\r\n buffer.writeUint32(value);\r\n break;\r\n\r\n // Fixed signed 32bit\r\n case ProtoBuf.TYPES[\"sfixed32\"]:\r\n buffer.writeInt32(value);\r\n break;\r\n\r\n // 64bit varint as-is\r\n case ProtoBuf.TYPES[\"int64\"]:\r\n case ProtoBuf.TYPES[\"uint64\"]:\r\n buffer.writeVarint64(value); // throws\r\n break;\r\n\r\n // 64bit varint zig-zag\r\n case ProtoBuf.TYPES[\"sint64\"]:\r\n buffer.writeVarint64ZigZag(value); // throws\r\n break;\r\n\r\n // Fixed unsigned 64bit\r\n case ProtoBuf.TYPES[\"fixed64\"]:\r\n buffer.writeUint64(value); // throws\r\n break;\r\n\r\n // Fixed signed 64bit\r\n case ProtoBuf.TYPES[\"sfixed64\"]:\r\n buffer.writeInt64(value); // throws\r\n break;\r\n\r\n // Bool\r\n case ProtoBuf.TYPES[\"bool\"]:\r\n if (typeof value === 'string')\r\n buffer.writeVarint32(value.toLowerCase() === 'false' ? 0 : !!value);\r\n else\r\n buffer.writeVarint32(value ? 1 : 0);\r\n break;\r\n\r\n // Constant enum value\r\n case ProtoBuf.TYPES[\"enum\"]:\r\n buffer.writeVarint32(value);\r\n break;\r\n\r\n // 32bit float\r\n case ProtoBuf.TYPES[\"float\"]:\r\n buffer.writeFloat32(value);\r\n break;\r\n\r\n // 64bit float\r\n case ProtoBuf.TYPES[\"double\"]:\r\n buffer.writeFloat64(value);\r\n break;\r\n\r\n // Length-delimited string\r\n case ProtoBuf.TYPES[\"string\"]:\r\n buffer.writeVString(value);\r\n break;\r\n\r\n // Length-delimited bytes\r\n case ProtoBuf.TYPES[\"bytes\"]:\r\n if (value.remaining() < 0)\r\n throw Error(\"Illegal value for \"+this.toString(true)+\": \"+value.remaining()+\" bytes remaining\");\r\n var prevOffset = value.offset;\r\n buffer.writeVarint32(value.remaining());\r\n buffer.append(value);\r\n value.offset = prevOffset;\r\n break;\r\n\r\n // Embedded message\r\n case ProtoBuf.TYPES[\"message\"]:\r\n var bb = new ByteBuffer().LE();\r\n this.resolvedType.encode(value, bb);\r\n buffer.writeVarint32(bb.offset);\r\n buffer.append(bb.flip());\r\n break;\r\n\r\n // Legacy group\r\n case ProtoBuf.TYPES[\"group\"]:\r\n this.resolvedType.encode(value, buffer);\r\n buffer.writeVarint32((id << 3) | ProtoBuf.WIRE_TYPES.ENDGROUP);\r\n break;\r\n\r\n default:\r\n // We should never end here\r\n throw Error(\"[INTERNAL] Illegal value to encode in \"+this.toString(true)+\": \"+value+\" (unknown type)\");\r\n }\r\n return buffer;\r\n };\r\n\r\n /**\r\n * Decode one element value from the specified buffer.\r\n * @param {ByteBuffer} buffer ByteBuffer to decode from\r\n * @param {number} wireType The field wire type\r\n * @param {number} id The field number\r\n * @return {*} Decoded value\r\n * @throws {Error} If the field cannot be decoded\r\n * @expose\r\n */\r\n ElementPrototype.decode = function(buffer, wireType, id) {\r\n if (wireType != this.type.wireType)\r\n throw Error(\"Unexpected wire type for element\");\r\n\r\n var value, nBytes;\r\n switch (this.type) {\r\n // 32bit signed varint\r\n case ProtoBuf.TYPES[\"int32\"]:\r\n return buffer.readVarint32() | 0;\r\n\r\n // 32bit unsigned varint\r\n case ProtoBuf.TYPES[\"uint32\"]:\r\n return buffer.readVarint32() >>> 0;\r\n\r\n // 32bit signed varint zig-zag\r\n case ProtoBuf.TYPES[\"sint32\"]:\r\n return buffer.readVarint32ZigZag() | 0;\r\n\r\n // Fixed 32bit unsigned\r\n case ProtoBuf.TYPES[\"fixed32\"]:\r\n return buffer.readUint32() >>> 0;\r\n\r\n case ProtoBuf.TYPES[\"sfixed32\"]:\r\n return buffer.readInt32() | 0;\r\n\r\n // 64bit signed varint\r\n case ProtoBuf.TYPES[\"int64\"]:\r\n return buffer.readVarint64();\r\n\r\n // 64bit unsigned varint\r\n case ProtoBuf.TYPES[\"uint64\"]:\r\n return buffer.readVarint64().toUnsigned();\r\n\r\n // 64bit signed varint zig-zag\r\n case ProtoBuf.TYPES[\"sint64\"]:\r\n return buffer.readVarint64ZigZag();\r\n\r\n // Fixed 64bit unsigned\r\n case ProtoBuf.TYPES[\"fixed64\"]:\r\n return buffer.readUint64();\r\n\r\n // Fixed 64bit signed\r\n case ProtoBuf.TYPES[\"sfixed64\"]:\r\n return buffer.readInt64();\r\n\r\n // Bool varint\r\n case ProtoBuf.TYPES[\"bool\"]:\r\n return !!buffer.readVarint32();\r\n\r\n // Constant enum value (varint)\r\n case ProtoBuf.TYPES[\"enum\"]:\r\n // The following Builder.Message#set will already throw\r\n return buffer.readVarint32();\r\n\r\n // 32bit float\r\n case ProtoBuf.TYPES[\"float\"]:\r\n return buffer.readFloat();\r\n\r\n // 64bit float\r\n case ProtoBuf.TYPES[\"double\"]:\r\n return buffer.readDouble();\r\n\r\n // Length-delimited string\r\n case ProtoBuf.TYPES[\"string\"]:\r\n return buffer.readVString();\r\n\r\n // Length-delimited bytes\r\n case ProtoBuf.TYPES[\"bytes\"]: {\r\n nBytes = buffer.readVarint32();\r\n if (buffer.remaining() < nBytes)\r\n throw Error(\"Illegal number of bytes for \"+this.toString(true)+\": \"+nBytes+\" required but got only \"+buffer.remaining());\r\n value = buffer.clone(); // Offset already set\r\n value.limit = value.offset+nBytes;\r\n buffer.offset += nBytes;\r\n return value;\r\n }\r\n\r\n // Length-delimited embedded message\r\n case ProtoBuf.TYPES[\"message\"]: {\r\n nBytes = buffer.readVarint32();\r\n return this.resolvedType.decode(buffer, nBytes);\r\n }\r\n\r\n // Legacy group\r\n case ProtoBuf.TYPES[\"group\"]:\r\n return this.resolvedType.decode(buffer, -1, id);\r\n }\r\n\r\n // We should never end here\r\n throw Error(\"[INTERNAL] Illegal decode type\");\r\n };\r\n\r\n /**\r\n * Converts a value from a string to the canonical element type.\r\n *\r\n * Legal only when isMapKey is true.\r\n *\r\n * @param {string} str The string value\r\n * @returns {*} The value\r\n */\r\n ElementPrototype.valueFromString = function(str) {\r\n if (!this.isMapKey) {\r\n throw Error(\"valueFromString() called on non-map-key element\");\r\n }\r\n\r\n switch (this.type) {\r\n case ProtoBuf.TYPES[\"int32\"]:\r\n case ProtoBuf.TYPES[\"sint32\"]:\r\n case ProtoBuf.TYPES[\"sfixed32\"]:\r\n case ProtoBuf.TYPES[\"uint32\"]:\r\n case ProtoBuf.TYPES[\"fixed32\"]:\r\n return this.verifyValue(parseInt(str));\r\n\r\n case ProtoBuf.TYPES[\"int64\"]:\r\n case ProtoBuf.TYPES[\"sint64\"]:\r\n case ProtoBuf.TYPES[\"sfixed64\"]:\r\n case ProtoBuf.TYPES[\"uint64\"]:\r\n case ProtoBuf.TYPES[\"fixed64\"]:\r\n // Long-based fields support conversions from string already.\r\n return this.verifyValue(str);\r\n\r\n case ProtoBuf.TYPES[\"bool\"]:\r\n return str === \"true\";\r\n\r\n case ProtoBuf.TYPES[\"string\"]:\r\n return this.verifyValue(str);\r\n\r\n case ProtoBuf.TYPES[\"bytes\"]:\r\n return ByteBuffer.fromBinary(str);\r\n }\r\n };\r\n\r\n /**\r\n * Converts a value from the canonical element type to a string.\r\n *\r\n * It should be the case that `valueFromString(valueToString(val))` returns\r\n * a value equivalent to `verifyValue(val)` for every legal value of `val`\r\n * according to this element type.\r\n *\r\n * This may be used when the element must be stored or used as a string,\r\n * e.g., as a map key on an Object.\r\n *\r\n * Legal only when isMapKey is true.\r\n *\r\n * @param {*} val The value\r\n * @returns {string} The string form of the value.\r\n */\r\n ElementPrototype.valueToString = function(value) {\r\n if (!this.isMapKey) {\r\n throw Error(\"valueToString() called on non-map-key element\");\r\n }\r\n\r\n if (this.type === ProtoBuf.TYPES[\"bytes\"]) {\r\n return value.toString(\"binary\");\r\n } else {\r\n return value.toString();\r\n }\r\n };\r\n\r\n /**\r\n * @alias ProtoBuf.Reflect.Element\r\n * @expose\r\n */\r\n Reflect.Element = Element;\r\n\r\n /**\r\n * Constructs a new Message.\r\n * @exports ProtoBuf.Reflect.Message\r\n * @param {!ProtoBuf.Builder} builder Builder reference\r\n * @param {!ProtoBuf.Reflect.Namespace} parent Parent message or namespace\r\n * @param {string} name Message name\r\n * @param {Object.=} options Message options\r\n * @param {boolean=} isGroup `true` if this is a legacy group\r\n * @param {string?} syntax The syntax level of this definition (e.g., proto3)\r\n * @constructor\r\n * @extends ProtoBuf.Reflect.Namespace\r\n */\r\n var Message = function(builder, parent, name, options, isGroup, syntax) {\r\n Namespace.call(this, builder, parent, name, options, syntax);\r\n\r\n /**\r\n * @override\r\n */\r\n this.className = \"Message\";\r\n\r\n /**\r\n * Extensions range.\r\n * @type {!Array.|undefined}\r\n * @expose\r\n */\r\n this.extensions = undefined;\r\n\r\n /**\r\n * Runtime message class.\r\n * @type {?function(new:ProtoBuf.Builder.Message)}\r\n * @expose\r\n */\r\n this.clazz = null;\r\n\r\n /**\r\n * Whether this is a legacy group or not.\r\n * @type {boolean}\r\n * @expose\r\n */\r\n this.isGroup = !!isGroup;\r\n\r\n // The following cached collections are used to efficiently iterate over or look up fields when decoding.\r\n\r\n /**\r\n * Cached fields.\r\n * @type {?Array.}\r\n * @private\r\n */\r\n this._fields = null;\r\n\r\n /**\r\n * Cached fields by id.\r\n * @type {?Object.}\r\n * @private\r\n */\r\n this._fieldsById = null;\r\n\r\n /**\r\n * Cached fields by name.\r\n * @type {?Object.}\r\n * @private\r\n */\r\n this._fieldsByName = null;\r\n };\r\n\r\n /**\r\n * @alias ProtoBuf.Reflect.Message.prototype\r\n * @inner\r\n */\r\n var MessagePrototype = Message.prototype = Object.create(Namespace.prototype);\r\n\r\n /**\r\n * Builds the message and returns the runtime counterpart, which is a fully functional class.\r\n * @see ProtoBuf.Builder.Message\r\n * @param {boolean=} rebuild Whether to rebuild or not, defaults to false\r\n * @return {ProtoBuf.Reflect.Message} Message class\r\n * @throws {Error} If the message cannot be built\r\n * @expose\r\n */\r\n MessagePrototype.build = function(rebuild) {\r\n if (this.clazz && !rebuild)\r\n return this.clazz;\r\n\r\n // Create the runtime Message class in its own scope\r\n var clazz = (function(ProtoBuf, T) {\r\n\r\n var fields = T.getChildren(ProtoBuf.Reflect.Message.Field),\r\n oneofs = T.getChildren(ProtoBuf.Reflect.Message.OneOf);\r\n\r\n /**\r\n * Constructs a new runtime Message.\r\n * @name ProtoBuf.Builder.Message\r\n * @class Barebone of all runtime messages.\r\n * @param {!Object.|string} values Preset values\r\n * @param {...string} var_args\r\n * @constructor\r\n * @throws {Error} If the message cannot be created\r\n */\r\n var Message = function(values, var_args) {\r\n ProtoBuf.Builder.Message.call(this);\r\n\r\n // Create virtual oneof properties\r\n for (var i=0, k=oneofs.length; i 0) {\r\n var value;\r\n // Set field values from a values object\r\n if (arguments.length === 1 && values !== null && typeof values === 'object' &&\r\n /* not _another_ Message */ (typeof values.encode !== 'function' || values instanceof Message) &&\r\n /* not a repeated field */ !Array.isArray(values) &&\r\n /* not a Map */ !(values instanceof ProtoBuf.Map) &&\r\n /* not a ByteBuffer */ !ByteBuffer.isByteBuffer(values) &&\r\n /* not an ArrayBuffer */ !(values instanceof ArrayBuffer) &&\r\n /* not a Long */ !(ProtoBuf.Long && values instanceof ProtoBuf.Long)) {\r\n this.$set(values);\r\n } else // Set field values from arguments, in declaration order\r\n for (i=0, k=arguments.length; i} keyOrObj String key or plain object holding multiple values\r\n * @param {(*|boolean)=} value Value to set if key is a string, otherwise omitted\r\n * @param {boolean=} noAssert Whether to not assert for an actual field / proper value type, defaults to `false`\r\n * @returns {!ProtoBuf.Builder.Message} this\r\n * @throws {Error} If the value cannot be set\r\n * @expose\r\n */\r\n MessagePrototype.set = function(keyOrObj, value, noAssert) {\r\n if (keyOrObj && typeof keyOrObj === 'object') {\r\n noAssert = value;\r\n for (var ikey in keyOrObj) {\r\n // Check if virtual oneof field - don't set these\r\n if (keyOrObj.hasOwnProperty(ikey) && typeof (value = keyOrObj[ikey]) !== 'undefined' && T._oneofsByName[ikey] === undefined)\r\n this.$set(ikey, value, noAssert);\r\n }\r\n return this;\r\n }\r\n var field = T._fieldsByName[keyOrObj];\r\n if (!noAssert) {\r\n if (!field)\r\n throw Error(this+\"#\"+keyOrObj+\" is not a field: undefined\");\r\n if (!(field instanceof ProtoBuf.Reflect.Message.Field))\r\n throw Error(this+\"#\"+keyOrObj+\" is not a field: \"+field.toString(true));\r\n this[field.name] = (value = field.verifyValue(value)); // May throw\r\n } else\r\n this[keyOrObj] = value;\r\n if (field && field.oneof) { // Field is part of an OneOf (not a virtual OneOf field)\r\n var currentField = this[field.oneof.name]; // Virtual field references currently set field\r\n if (value !== null) {\r\n if (currentField !== null && currentField !== field.name)\r\n this[currentField] = null; // Clear currently set field\r\n this[field.oneof.name] = field.name; // Point virtual field at this field\r\n } else if (/* value === null && */currentField === keyOrObj)\r\n this[field.oneof.name] = null; // Clear virtual field (current field explicitly cleared)\r\n }\r\n return this;\r\n };\r\n\r\n /**\r\n * Sets a field's value. This is an alias for [@link ProtoBuf.Builder.Message#set}.\r\n * @name ProtoBuf.Builder.Message#$set\r\n * @function\r\n * @param {string|!Object.} keyOrObj String key or plain object holding multiple values\r\n * @param {(*|boolean)=} value Value to set if key is a string, otherwise omitted\r\n * @param {boolean=} noAssert Whether to not assert the value, defaults to `false`\r\n * @throws {Error} If the value cannot be set\r\n * @expose\r\n */\r\n MessagePrototype.$set = MessagePrototype.set;\r\n\r\n /**\r\n * Gets a field's value.\r\n * @name ProtoBuf.Builder.Message#get\r\n * @function\r\n * @param {string} key Key\r\n * @param {boolean=} noAssert Whether to not assert for an actual field, defaults to `false`\r\n * @return {*} Value\r\n * @throws {Error} If there is no such field\r\n * @expose\r\n */\r\n MessagePrototype.get = function(key, noAssert) {\r\n if (noAssert)\r\n return this[key];\r\n var field = T._fieldsByName[key];\r\n if (!field || !(field instanceof ProtoBuf.Reflect.Message.Field))\r\n throw Error(this+\"#\"+key+\" is not a field: undefined\");\r\n if (!(field instanceof ProtoBuf.Reflect.Message.Field))\r\n throw Error(this+\"#\"+key+\" is not a field: \"+field.toString(true));\r\n return this[field.name];\r\n };\r\n\r\n /**\r\n * Gets a field's value. This is an alias for {@link ProtoBuf.Builder.Message#$get}.\r\n * @name ProtoBuf.Builder.Message#$get\r\n * @function\r\n * @param {string} key Key\r\n * @return {*} Value\r\n * @throws {Error} If there is no such field\r\n * @expose\r\n */\r\n MessagePrototype.$get = MessagePrototype.get;\r\n\r\n // Getters and setters\r\n\r\n for (var i=0; i} data Data payload\r\n * @param {(!ByteBuffer|boolean)=} buffer ByteBuffer to encode to. Will create a new one and flip it if omitted.\r\n * @param {boolean=} noVerify Whether to not verify field values, defaults to `false`\r\n * @return {!ByteBuffer} Encoded message as a ByteBuffer\r\n * @expose\r\n */\r\n Message.encode = function(data, buffer, noVerify) {\r\n return new Message(data).encode(buffer, noVerify);\r\n };\r\n\r\n /**\r\n * Calculates the byte length of the message.\r\n * @name ProtoBuf.Builder.Message#calculate\r\n * @function\r\n * @returns {number} Byte length\r\n * @throws {Error} If the message cannot be calculated or if required fields are missing.\r\n * @expose\r\n */\r\n MessagePrototype.calculate = function() {\r\n return T.calculate(this);\r\n };\r\n\r\n /**\r\n * Encodes the varint32 length-delimited message.\r\n * @name ProtoBuf.Builder.Message#encodeDelimited\r\n * @function\r\n * @param {(!ByteBuffer|boolean)=} buffer ByteBuffer to encode to. Will create a new one and flip it if omitted.\r\n * @param {boolean=} noVerify Whether to not verify field values, defaults to `false`\r\n * @return {!ByteBuffer} Encoded message as a ByteBuffer\r\n * @throws {Error} If the message cannot be encoded or if required fields are missing. The later still\r\n * returns the encoded ByteBuffer in the `encoded` property on the error.\r\n * @expose\r\n */\r\n MessagePrototype.encodeDelimited = function(buffer, noVerify) {\r\n var isNew = false;\r\n if (!buffer)\r\n buffer = new ByteBuffer(),\r\n isNew = true;\r\n var enc = new ByteBuffer().LE();\r\n T.encode(this, enc, noVerify).flip();\r\n buffer.writeVarint32(enc.remaining());\r\n buffer.append(enc);\r\n return isNew ? buffer.flip() : buffer;\r\n };\r\n\r\n /**\r\n * Directly encodes the message to an ArrayBuffer.\r\n * @name ProtoBuf.Builder.Message#encodeAB\r\n * @function\r\n * @return {ArrayBuffer} Encoded message as ArrayBuffer\r\n * @throws {Error} If the message cannot be encoded or if required fields are missing. The later still\r\n * returns the encoded ArrayBuffer in the `encoded` property on the error.\r\n * @expose\r\n */\r\n MessagePrototype.encodeAB = function() {\r\n try {\r\n return this.encode().toArrayBuffer();\r\n } catch (e) {\r\n if (e[\"encoded\"]) e[\"encoded\"] = e[\"encoded\"].toArrayBuffer();\r\n throw(e);\r\n }\r\n };\r\n\r\n /**\r\n * Returns the message as an ArrayBuffer. This is an alias for {@link ProtoBuf.Builder.Message#encodeAB}.\r\n * @name ProtoBuf.Builder.Message#toArrayBuffer\r\n * @function\r\n * @return {ArrayBuffer} Encoded message as ArrayBuffer\r\n * @throws {Error} If the message cannot be encoded or if required fields are missing. The later still\r\n * returns the encoded ArrayBuffer in the `encoded` property on the error.\r\n * @expose\r\n */\r\n MessagePrototype.toArrayBuffer = MessagePrototype.encodeAB;\r\n\r\n /**\r\n * Directly encodes the message to a node Buffer.\r\n * @name ProtoBuf.Builder.Message#encodeNB\r\n * @function\r\n * @return {!Buffer}\r\n * @throws {Error} If the message cannot be encoded, not running under node.js or if required fields are\r\n * missing. The later still returns the encoded node Buffer in the `encoded` property on the error.\r\n * @expose\r\n */\r\n MessagePrototype.encodeNB = function() {\r\n try {\r\n return this.encode().toBuffer();\r\n } catch (e) {\r\n if (e[\"encoded\"]) e[\"encoded\"] = e[\"encoded\"].toBuffer();\r\n throw(e);\r\n }\r\n };\r\n\r\n /**\r\n * Returns the message as a node Buffer. This is an alias for {@link ProtoBuf.Builder.Message#encodeNB}.\r\n * @name ProtoBuf.Builder.Message#toBuffer\r\n * @function\r\n * @return {!Buffer}\r\n * @throws {Error} If the message cannot be encoded or if required fields are missing. The later still\r\n * returns the encoded node Buffer in the `encoded` property on the error.\r\n * @expose\r\n */\r\n MessagePrototype.toBuffer = MessagePrototype.encodeNB;\r\n\r\n /**\r\n * Directly encodes the message to a base64 encoded string.\r\n * @name ProtoBuf.Builder.Message#encode64\r\n * @function\r\n * @return {string} Base64 encoded string\r\n * @throws {Error} If the underlying buffer cannot be encoded or if required fields are missing. The later\r\n * still returns the encoded base64 string in the `encoded` property on the error.\r\n * @expose\r\n */\r\n MessagePrototype.encode64 = function() {\r\n try {\r\n return this.encode().toBase64();\r\n } catch (e) {\r\n if (e[\"encoded\"]) e[\"encoded\"] = e[\"encoded\"].toBase64();\r\n throw(e);\r\n }\r\n };\r\n\r\n /**\r\n * Returns the message as a base64 encoded string. This is an alias for {@link ProtoBuf.Builder.Message#encode64}.\r\n * @name ProtoBuf.Builder.Message#toBase64\r\n * @function\r\n * @return {string} Base64 encoded string\r\n * @throws {Error} If the message cannot be encoded or if required fields are missing. The later still\r\n * returns the encoded base64 string in the `encoded` property on the error.\r\n * @expose\r\n */\r\n MessagePrototype.toBase64 = MessagePrototype.encode64;\r\n\r\n /**\r\n * Directly encodes the message to a hex encoded string.\r\n * @name ProtoBuf.Builder.Message#encodeHex\r\n * @function\r\n * @return {string} Hex encoded string\r\n * @throws {Error} If the underlying buffer cannot be encoded or if required fields are missing. The later\r\n * still returns the encoded hex string in the `encoded` property on the error.\r\n * @expose\r\n */\r\n MessagePrototype.encodeHex = function() {\r\n try {\r\n return this.encode().toHex();\r\n } catch (e) {\r\n if (e[\"encoded\"]) e[\"encoded\"] = e[\"encoded\"].toHex();\r\n throw(e);\r\n }\r\n };\r\n\r\n /**\r\n * Returns the message as a hex encoded string. This is an alias for {@link ProtoBuf.Builder.Message#encodeHex}.\r\n * @name ProtoBuf.Builder.Message#toHex\r\n * @function\r\n * @return {string} Hex encoded string\r\n * @throws {Error} If the message cannot be encoded or if required fields are missing. The later still\r\n * returns the encoded hex string in the `encoded` property on the error.\r\n * @expose\r\n */\r\n MessagePrototype.toHex = MessagePrototype.encodeHex;\r\n\r\n /**\r\n * Clones a message object or field value to a raw object.\r\n * @param {*} obj Object to clone\r\n * @param {boolean} binaryAsBase64 Whether to include binary data as base64 strings or as a buffer otherwise\r\n * @param {boolean} longsAsStrings Whether to encode longs as strings\r\n * @param {!ProtoBuf.Reflect.T=} resolvedType The resolved field type if a field\r\n * @returns {*} Cloned object\r\n * @inner\r\n */\r\n function cloneRaw(obj, binaryAsBase64, longsAsStrings, resolvedType) {\r\n if (obj === null || typeof obj !== 'object') {\r\n // Convert enum values to their respective names\r\n if (resolvedType && resolvedType instanceof ProtoBuf.Reflect.Enum) {\r\n var name = ProtoBuf.Reflect.Enum.getName(resolvedType.object, obj);\r\n if (name !== null)\r\n return name;\r\n }\r\n // Pass-through string, number, boolean, null...\r\n return obj;\r\n }\r\n // Convert ByteBuffers to raw buffer or strings\r\n if (ByteBuffer.isByteBuffer(obj))\r\n return binaryAsBase64 ? obj.toBase64() : obj.toBuffer();\r\n // Convert Longs to proper objects or strings\r\n if (ProtoBuf.Long.isLong(obj))\r\n return longsAsStrings ? obj.toString() : ProtoBuf.Long.fromValue(obj);\r\n var clone;\r\n // Clone arrays\r\n if (Array.isArray(obj)) {\r\n clone = [];\r\n obj.forEach(function(v, k) {\r\n clone[k] = cloneRaw(v, binaryAsBase64, longsAsStrings, resolvedType);\r\n });\r\n return clone;\r\n }\r\n clone = {};\r\n // Convert maps to objects\r\n if (obj instanceof ProtoBuf.Map) {\r\n var it = obj.entries();\r\n for (var e = it.next(); !e.done; e = it.next())\r\n clone[obj.keyElem.valueToString(e.value[0])] = cloneRaw(e.value[1], binaryAsBase64, longsAsStrings, obj.valueElem.resolvedType);\r\n return clone;\r\n }\r\n // Everything else is a non-null object\r\n var type = obj.$type,\r\n field = undefined;\r\n for (var i in obj)\r\n if (obj.hasOwnProperty(i)) {\r\n if (type && (field = type.getChild(i)))\r\n clone[i] = cloneRaw(obj[i], binaryAsBase64, longsAsStrings, field.resolvedType);\r\n else\r\n clone[i] = cloneRaw(obj[i], binaryAsBase64, longsAsStrings);\r\n }\r\n return clone;\r\n }\r\n\r\n /**\r\n * Returns the message's raw payload.\r\n * @param {boolean=} binaryAsBase64 Whether to include binary data as base64 strings instead of Buffers, defaults to `false`\r\n * @param {boolean} longsAsStrings Whether to encode longs as strings\r\n * @returns {Object.} Raw payload\r\n * @expose\r\n */\r\n MessagePrototype.toRaw = function(binaryAsBase64, longsAsStrings) {\r\n return cloneRaw(this, !!binaryAsBase64, !!longsAsStrings, this.$type);\r\n };\r\n\r\n /**\r\n * Encodes a message to JSON.\r\n * @returns {string} JSON string\r\n * @expose\r\n */\r\n MessagePrototype.encodeJSON = function() {\r\n return JSON.stringify(\r\n cloneRaw(this,\r\n /* binary-as-base64 */ true,\r\n /* longs-as-strings */ true,\r\n this.$type\r\n )\r\n );\r\n };\r\n\r\n /**\r\n * Decodes a message from the specified buffer or string.\r\n * @name ProtoBuf.Builder.Message.decode\r\n * @function\r\n * @param {!ByteBuffer|!ArrayBuffer|!Buffer|string} buffer Buffer to decode from\r\n * @param {(number|string)=} length Message length. Defaults to decode all the remainig data.\r\n * @param {string=} enc Encoding if buffer is a string: hex, utf8 (not recommended), defaults to base64\r\n * @return {!ProtoBuf.Builder.Message} Decoded message\r\n * @throws {Error} If the message cannot be decoded or if required fields are missing. The later still\r\n * returns the decoded message with missing fields in the `decoded` property on the error.\r\n * @expose\r\n * @see ProtoBuf.Builder.Message.decode64\r\n * @see ProtoBuf.Builder.Message.decodeHex\r\n */\r\n Message.decode = function(buffer, length, enc) {\r\n if (typeof length === 'string')\r\n enc = length,\r\n length = -1;\r\n if (typeof buffer === 'string')\r\n buffer = ByteBuffer.wrap(buffer, enc ? enc : \"base64\");\r\n else if (!ByteBuffer.isByteBuffer(buffer))\r\n buffer = ByteBuffer.wrap(buffer); // May throw\r\n var le = buffer.littleEndian;\r\n try {\r\n var msg = T.decode(buffer.LE(), length);\r\n buffer.LE(le);\r\n return msg;\r\n } catch (e) {\r\n buffer.LE(le);\r\n throw(e);\r\n }\r\n };\r\n\r\n /**\r\n * Decodes a varint32 length-delimited message from the specified buffer or string.\r\n * @name ProtoBuf.Builder.Message.decodeDelimited\r\n * @function\r\n * @param {!ByteBuffer|!ArrayBuffer|!Buffer|string} buffer Buffer to decode from\r\n * @param {string=} enc Encoding if buffer is a string: hex, utf8 (not recommended), defaults to base64\r\n * @return {ProtoBuf.Builder.Message} Decoded message or `null` if not enough bytes are available yet\r\n * @throws {Error} If the message cannot be decoded or if required fields are missing. The later still\r\n * returns the decoded message with missing fields in the `decoded` property on the error.\r\n * @expose\r\n */\r\n Message.decodeDelimited = function(buffer, enc) {\r\n if (typeof buffer === 'string')\r\n buffer = ByteBuffer.wrap(buffer, enc ? enc : \"base64\");\r\n else if (!ByteBuffer.isByteBuffer(buffer))\r\n buffer = ByteBuffer.wrap(buffer); // May throw\r\n if (buffer.remaining() < 1)\r\n return null;\r\n var off = buffer.offset,\r\n len = buffer.readVarint32();\r\n if (buffer.remaining() < len) {\r\n buffer.offset = off;\r\n return null;\r\n }\r\n try {\r\n var msg = T.decode(buffer.slice(buffer.offset, buffer.offset + len).LE());\r\n buffer.offset += len;\r\n return msg;\r\n } catch (err) {\r\n buffer.offset += len;\r\n throw err;\r\n }\r\n };\r\n\r\n /**\r\n * Decodes the message from the specified base64 encoded string.\r\n * @name ProtoBuf.Builder.Message.decode64\r\n * @function\r\n * @param {string} str String to decode from\r\n * @return {!ProtoBuf.Builder.Message} Decoded message\r\n * @throws {Error} If the message cannot be decoded or if required fields are missing. The later still\r\n * returns the decoded message with missing fields in the `decoded` property on the error.\r\n * @expose\r\n */\r\n Message.decode64 = function(str) {\r\n return Message.decode(str, \"base64\");\r\n };\r\n\r\n /**\r\n * Decodes the message from the specified hex encoded string.\r\n * @name ProtoBuf.Builder.Message.decodeHex\r\n * @function\r\n * @param {string} str String to decode from\r\n * @return {!ProtoBuf.Builder.Message} Decoded message\r\n * @throws {Error} If the message cannot be decoded or if required fields are missing. The later still\r\n * returns the decoded message with missing fields in the `decoded` property on the error.\r\n * @expose\r\n */\r\n Message.decodeHex = function(str) {\r\n return Message.decode(str, \"hex\");\r\n };\r\n\r\n /**\r\n * Decodes the message from a JSON string.\r\n * @name ProtoBuf.Builder.Message.decodeJSON\r\n * @function\r\n * @param {string} str String to decode from\r\n * @return {!ProtoBuf.Builder.Message} Decoded message\r\n * @throws {Error} If the message cannot be decoded or if required fields are\r\n * missing.\r\n * @expose\r\n */\r\n Message.decodeJSON = function(str) {\r\n return new Message(JSON.parse(str));\r\n };\r\n\r\n // Utility\r\n\r\n /**\r\n * Returns a string representation of this Message.\r\n * @name ProtoBuf.Builder.Message#toString\r\n * @function\r\n * @return {string} String representation as of \".Fully.Qualified.MessageName\"\r\n * @expose\r\n */\r\n MessagePrototype.toString = function() {\r\n return T.toString();\r\n };\r\n\r\n // Properties\r\n\r\n /**\r\n * Message options.\r\n * @name ProtoBuf.Builder.Message.$options\r\n * @type {Object.}\r\n * @expose\r\n */\r\n var $optionsS; // cc needs this\r\n\r\n /**\r\n * Message options.\r\n * @name ProtoBuf.Builder.Message#$options\r\n * @type {Object.}\r\n * @expose\r\n */\r\n var $options;\r\n\r\n /**\r\n * Reflection type.\r\n * @name ProtoBuf.Builder.Message.$type\r\n * @type {!ProtoBuf.Reflect.Message}\r\n * @expose\r\n */\r\n var $typeS;\r\n\r\n /**\r\n * Reflection type.\r\n * @name ProtoBuf.Builder.Message#$type\r\n * @type {!ProtoBuf.Reflect.Message}\r\n * @expose\r\n */\r\n var $type;\r\n\r\n if (Object.defineProperty)\r\n Object.defineProperty(Message, '$options', { \"value\": T.buildOpt() }),\r\n Object.defineProperty(MessagePrototype, \"$options\", { \"value\": Message[\"$options\"] }),\r\n Object.defineProperty(Message, \"$type\", { \"value\": T }),\r\n Object.defineProperty(MessagePrototype, \"$type\", { \"value\": T });\r\n\r\n return Message;\r\n\r\n })(ProtoBuf, this);\r\n\r\n // Static enums and prototyped sub-messages / cached collections\r\n this._fields = [];\r\n this._fieldsById = {};\r\n this._fieldsByName = {};\r\n this._oneofsByName = {};\r\n for (var i=0, k=this.children.length, child; i>> 3;\r\n switch (wireType) {\r\n case ProtoBuf.WIRE_TYPES.VARINT:\r\n do tag = buf.readUint8();\r\n while ((tag & 0x80) === 0x80);\r\n break;\r\n case ProtoBuf.WIRE_TYPES.BITS64:\r\n buf.offset += 8;\r\n break;\r\n case ProtoBuf.WIRE_TYPES.LDELIM:\r\n tag = buf.readVarint32(); // reads the varint\r\n buf.offset += tag; // skips n bytes\r\n break;\r\n case ProtoBuf.WIRE_TYPES.STARTGROUP:\r\n skipTillGroupEnd(id, buf);\r\n break;\r\n case ProtoBuf.WIRE_TYPES.ENDGROUP:\r\n if (id === expectedId)\r\n return false;\r\n else\r\n throw Error(\"Illegal GROUPEND after unknown group: \"+id+\" (\"+expectedId+\" expected)\");\r\n case ProtoBuf.WIRE_TYPES.BITS32:\r\n buf.offset += 4;\r\n break;\r\n default:\r\n throw Error(\"Illegal wire type in unknown group \"+expectedId+\": \"+wireType);\r\n }\r\n return true;\r\n }\r\n\r\n /**\r\n * Decodes an encoded message and returns the decoded message.\r\n * @param {ByteBuffer} buffer ByteBuffer to decode from\r\n * @param {number=} length Message length. Defaults to decode all remaining data.\r\n * @param {number=} expectedGroupEndId Expected GROUPEND id if this is a legacy group\r\n * @return {ProtoBuf.Builder.Message} Decoded message\r\n * @throws {Error} If the message cannot be decoded\r\n * @expose\r\n */\r\n MessagePrototype.decode = function(buffer, length, expectedGroupEndId) {\r\n if (typeof length !== 'number')\r\n length = -1;\r\n var start = buffer.offset,\r\n msg = new (this.clazz)(),\r\n tag, wireType, id, field;\r\n while (buffer.offset < start+length || (length === -1 && buffer.remaining() > 0)) {\r\n tag = buffer.readVarint32();\r\n wireType = tag & 0x07;\r\n id = tag >>> 3;\r\n if (wireType === ProtoBuf.WIRE_TYPES.ENDGROUP) {\r\n if (id !== expectedGroupEndId)\r\n throw Error(\"Illegal group end indicator for \"+this.toString(true)+\": \"+id+\" (\"+(expectedGroupEndId ? expectedGroupEndId+\" expected\" : \"not a group\")+\")\");\r\n break;\r\n }\r\n if (!(field = this._fieldsById[id])) {\r\n // \"messages created by your new code can be parsed by your old code: old binaries simply ignore the new field when parsing.\"\r\n switch (wireType) {\r\n case ProtoBuf.WIRE_TYPES.VARINT:\r\n buffer.readVarint32();\r\n break;\r\n case ProtoBuf.WIRE_TYPES.BITS32:\r\n buffer.offset += 4;\r\n break;\r\n case ProtoBuf.WIRE_TYPES.BITS64:\r\n buffer.offset += 8;\r\n break;\r\n case ProtoBuf.WIRE_TYPES.LDELIM:\r\n var len = buffer.readVarint32();\r\n buffer.offset += len;\r\n break;\r\n case ProtoBuf.WIRE_TYPES.STARTGROUP:\r\n while (skipTillGroupEnd(id, buffer)) {}\r\n break;\r\n default:\r\n throw Error(\"Illegal wire type for unknown field \"+id+\" in \"+this.toString(true)+\"#decode: \"+wireType);\r\n }\r\n continue;\r\n }\r\n if (field.repeated && !field.options[\"packed\"]) {\r\n msg[field.name].push(field.decode(wireType, buffer));\r\n } else if (field.map) {\r\n var keyval = field.decode(wireType, buffer);\r\n msg[field.name].set(keyval[0], keyval[1]);\r\n } else {\r\n msg[field.name] = field.decode(wireType, buffer);\r\n if (field.oneof) { // Field is part of an OneOf (not a virtual OneOf field)\r\n var currentField = msg[field.oneof.name]; // Virtual field references currently set field\r\n if (currentField !== null && currentField !== field.name)\r\n msg[currentField] = null; // Clear currently set field\r\n msg[field.oneof.name] = field.name; // Point virtual field at this field\r\n }\r\n }\r\n }\r\n\r\n // Check if all required fields are present and set default values for optional fields that are not\r\n for (var i=0, k=this._fields.length; i=} options Options\r\n * @param {!ProtoBuf.Reflect.Message.OneOf=} oneof Enclosing OneOf\r\n * @param {string?} syntax The syntax level of this definition (e.g., proto3)\r\n * @constructor\r\n * @extends ProtoBuf.Reflect.T\r\n */\r\n var Field = function(builder, message, rule, keytype, type, name, id, options, oneof, syntax) {\r\n T.call(this, builder, message, name);\r\n\r\n /**\r\n * @override\r\n */\r\n this.className = \"Message.Field\";\r\n\r\n /**\r\n * Message field required flag.\r\n * @type {boolean}\r\n * @expose\r\n */\r\n this.required = rule === \"required\";\r\n\r\n /**\r\n * Message field repeated flag.\r\n * @type {boolean}\r\n * @expose\r\n */\r\n this.repeated = rule === \"repeated\";\r\n\r\n /**\r\n * Message field map flag.\r\n * @type {boolean}\r\n * @expose\r\n */\r\n this.map = rule === \"map\";\r\n\r\n /**\r\n * Message field key type. Type reference string if unresolved, protobuf\r\n * type if resolved. Valid only if this.map === true, null otherwise.\r\n * @type {string|{name: string, wireType: number}|null}\r\n * @expose\r\n */\r\n this.keyType = keytype || null;\r\n\r\n /**\r\n * Message field type. Type reference string if unresolved, protobuf type if\r\n * resolved. In a map field, this is the value type.\r\n * @type {string|{name: string, wireType: number}}\r\n * @expose\r\n */\r\n this.type = type;\r\n\r\n /**\r\n * Resolved type reference inside the global namespace.\r\n * @type {ProtoBuf.Reflect.T|null}\r\n * @expose\r\n */\r\n this.resolvedType = null;\r\n\r\n /**\r\n * Unique message field id.\r\n * @type {number}\r\n * @expose\r\n */\r\n this.id = id;\r\n\r\n /**\r\n * Message field options.\r\n * @type {!Object.}\r\n * @dict\r\n * @expose\r\n */\r\n this.options = options || {};\r\n\r\n /**\r\n * Default value.\r\n * @type {*}\r\n * @expose\r\n */\r\n this.defaultValue = null;\r\n\r\n /**\r\n * Enclosing OneOf.\r\n * @type {?ProtoBuf.Reflect.Message.OneOf}\r\n * @expose\r\n */\r\n this.oneof = oneof || null;\r\n\r\n /**\r\n * Syntax level of this definition (e.g., proto3).\r\n * @type {string}\r\n * @expose\r\n */\r\n this.syntax = syntax || 'proto2';\r\n\r\n /**\r\n * Original field name.\r\n * @type {string}\r\n * @expose\r\n */\r\n this.originalName = this.name; // Used to revert camelcase transformation on naming collisions\r\n\r\n /**\r\n * Element implementation. Created in build() after types are resolved.\r\n * @type {ProtoBuf.Element}\r\n * @expose\r\n */\r\n this.element = null;\r\n\r\n /**\r\n * Key element implementation, for map fields. Created in build() after\r\n * types are resolved.\r\n * @type {ProtoBuf.Element}\r\n * @expose\r\n */\r\n this.keyElement = null;\r\n\r\n // Convert field names to camel case notation if the override is set\r\n if (this.builder.options['convertFieldsToCamelCase'] && !(this instanceof Message.ExtensionField))\r\n this.name = ProtoBuf.Util.toCamelCase(this.name);\r\n };\r\n\r\n /**\r\n * @alias ProtoBuf.Reflect.Message.Field.prototype\r\n * @inner\r\n */\r\n var FieldPrototype = Field.prototype = Object.create(T.prototype);\r\n\r\n /**\r\n * Builds the field.\r\n * @override\r\n * @expose\r\n */\r\n FieldPrototype.build = function() {\r\n this.element = new Element(this.type, this.resolvedType, false, this.syntax, this.name);\r\n if (this.map)\r\n this.keyElement = new Element(this.keyType, undefined, true, this.syntax, this.name);\r\n\r\n // In proto3, fields do not have field presence, and every field is set to\r\n // its type's default value (\"\", 0, 0.0, or false).\r\n if (this.syntax === 'proto3' && !this.repeated && !this.map)\r\n this.defaultValue = Element.defaultFieldValue(this.type);\r\n\r\n // Otherwise, default values are present when explicitly specified\r\n else if (typeof this.options['default'] !== 'undefined')\r\n this.defaultValue = this.verifyValue(this.options['default']);\r\n };\r\n\r\n /**\r\n * Checks if the given value can be set for this field.\r\n * @param {*} value Value to check\r\n * @param {boolean=} skipRepeated Whether to skip the repeated value check or not. Defaults to false.\r\n * @return {*} Verified, maybe adjusted, value\r\n * @throws {Error} If the value cannot be set for this field\r\n * @expose\r\n */\r\n FieldPrototype.verifyValue = function(value, skipRepeated) {\r\n skipRepeated = skipRepeated || false;\r\n var self = this;\r\n function fail(val, msg) {\r\n throw Error(\"Illegal value for \"+self.toString(true)+\" of type \"+self.type.name+\": \"+val+\" (\"+msg+\")\");\r\n }\r\n if (value === null) { // NULL values for optional fields\r\n if (this.required)\r\n fail(typeof value, \"required\");\r\n if (this.syntax === 'proto3' && this.type !== ProtoBuf.TYPES[\"message\"])\r\n fail(typeof value, \"proto3 field without field presence cannot be null\");\r\n return null;\r\n }\r\n var i;\r\n if (this.repeated && !skipRepeated) { // Repeated values as arrays\r\n if (!Array.isArray(value))\r\n value = [value];\r\n var res = [];\r\n for (i=0; i 0;\r\n\r\n case ProtoBuf.TYPES[\"bytes\"]:\r\n return value.remaining() > 0;\r\n\r\n case ProtoBuf.TYPES[\"enum\"]:\r\n return value !== 0;\r\n\r\n case ProtoBuf.TYPES[\"message\"]:\r\n return value !== null;\r\n default:\r\n return true;\r\n }\r\n };\r\n\r\n /**\r\n * Encodes the specified field value to the specified buffer.\r\n * @param {*} value Verified field value\r\n * @param {ByteBuffer} buffer ByteBuffer to encode to\r\n * @param {!ProtoBuf.Builder.Message} message Runtime message\r\n * @return {ByteBuffer} The ByteBuffer for chaining\r\n * @throws {Error} If the field cannot be encoded\r\n * @expose\r\n */\r\n FieldPrototype.encode = function(value, buffer, message) {\r\n if (this.type === null || typeof this.type !== 'object')\r\n throw Error(\"[INTERNAL] Unresolved type in \"+this.toString(true)+\": \"+this.type);\r\n if (value === null || (this.repeated && value.length == 0))\r\n return buffer; // Optional omitted\r\n try {\r\n if (this.repeated) {\r\n var i;\r\n // \"Only repeated fields of primitive numeric types (types which use the varint, 32-bit, or 64-bit wire\r\n // types) can be declared 'packed'.\"\r\n if (this.options[\"packed\"] && ProtoBuf.PACKABLE_WIRE_TYPES.indexOf(this.type.wireType) >= 0) {\r\n // \"All of the elements of the field are packed into a single key-value pair with wire type 2\r\n // (length-delimited). Each element is encoded the same way it would be normally, except without a\r\n // tag preceding it.\"\r\n buffer.writeVarint32((this.id << 3) | ProtoBuf.WIRE_TYPES.LDELIM);\r\n buffer.ensureCapacity(buffer.offset += 1); // We do not know the length yet, so let's assume a varint of length 1\r\n var start = buffer.offset; // Remember where the contents begin\r\n for (i=0; i 1) { // We need to move the contents\r\n var contents = buffer.slice(start, buffer.offset);\r\n start += varintLen-1;\r\n buffer.offset = start;\r\n buffer.append(contents);\r\n }\r\n buffer.writeVarint32(len, start-varintLen);\r\n } else {\r\n // \"If your message definition has repeated elements (without the [packed=true] option), the encoded\r\n // message has zero or more key-value pairs with the same tag number\"\r\n for (i=0; i= 0) {\r\n n += ByteBuffer.calculateVarint32((this.id << 3) | ProtoBuf.WIRE_TYPES.LDELIM);\r\n ni = 0;\r\n for (i=0; i= 0) {\r\n if (!skipRepeated) {\r\n nBytes = buffer.readVarint32();\r\n nBytes = buffer.offset + nBytes; // Limit\r\n var values = [];\r\n while (buffer.offset < nBytes)\r\n values.push(this.decode(this.type.wireType, buffer, true));\r\n return values;\r\n }\r\n // Read the next value otherwise...\r\n }\r\n\r\n // Handle maps.\r\n if (this.map) {\r\n // Read one (key, value) submessage, and return [key, value]\r\n var key = Element.defaultFieldValue(this.keyType);\r\n value = Element.defaultFieldValue(this.type);\r\n\r\n // Read the length\r\n nBytes = buffer.readVarint32();\r\n if (buffer.remaining() < nBytes)\r\n throw Error(\"Illegal number of bytes for \"+this.toString(true)+\": \"+nBytes+\" required but got only \"+buffer.remaining());\r\n\r\n // Get a sub-buffer of this key/value submessage\r\n var msgbuf = buffer.clone();\r\n msgbuf.limit = msgbuf.offset + nBytes;\r\n buffer.offset += nBytes;\r\n\r\n while (msgbuf.remaining() > 0) {\r\n var tag = msgbuf.readVarint32();\r\n wireType = tag & 0x07;\r\n var id = tag >>> 3;\r\n if (id === 1) {\r\n key = this.keyElement.decode(msgbuf, wireType, id);\r\n } else if (id === 2) {\r\n value = this.element.decode(msgbuf, wireType, id);\r\n } else {\r\n throw Error(\"Unexpected tag in map field key/value submessage\");\r\n }\r\n }\r\n\r\n return [key, value];\r\n }\r\n\r\n // Handle singular and non-packed repeated field values.\r\n return this.element.decode(buffer, wireType, this.id);\r\n };\r\n\r\n /**\r\n * @alias ProtoBuf.Reflect.Message.Field\r\n * @expose\r\n */\r\n Reflect.Message.Field = Field;\r\n\r\n /**\r\n * Constructs a new Message ExtensionField.\r\n * @exports ProtoBuf.Reflect.Message.ExtensionField\r\n * @param {!ProtoBuf.Builder} builder Builder reference\r\n * @param {!ProtoBuf.Reflect.Message} message Message reference\r\n * @param {string} rule Rule, one of requried, optional, repeated\r\n * @param {string} type Data type, e.g. int32\r\n * @param {string} name Field name\r\n * @param {number} id Unique field id\r\n * @param {!Object.=} options Options\r\n * @constructor\r\n * @extends ProtoBuf.Reflect.Message.Field\r\n */\r\n var ExtensionField = function(builder, message, rule, type, name, id, options) {\r\n Field.call(this, builder, message, rule, /* keytype = */ null, type, name, id, options);\r\n\r\n /**\r\n * Extension reference.\r\n * @type {!ProtoBuf.Reflect.Extension}\r\n * @expose\r\n */\r\n this.extension;\r\n };\r\n\r\n // Extends Field\r\n ExtensionField.prototype = Object.create(Field.prototype);\r\n\r\n /**\r\n * @alias ProtoBuf.Reflect.Message.ExtensionField\r\n * @expose\r\n */\r\n Reflect.Message.ExtensionField = ExtensionField;\r\n\r\n /**\r\n * Constructs a new Message OneOf.\r\n * @exports ProtoBuf.Reflect.Message.OneOf\r\n * @param {!ProtoBuf.Builder} builder Builder reference\r\n * @param {!ProtoBuf.Reflect.Message} message Message reference\r\n * @param {string} name OneOf name\r\n * @constructor\r\n * @extends ProtoBuf.Reflect.T\r\n */\r\n var OneOf = function(builder, message, name) {\r\n T.call(this, builder, message, name);\r\n\r\n /**\r\n * Enclosed fields.\r\n * @type {!Array.}\r\n * @expose\r\n */\r\n this.fields = [];\r\n };\r\n\r\n /**\r\n * @alias ProtoBuf.Reflect.Message.OneOf\r\n * @expose\r\n */\r\n Reflect.Message.OneOf = OneOf;\r\n\r\n /**\r\n * Constructs a new Enum.\r\n * @exports ProtoBuf.Reflect.Enum\r\n * @param {!ProtoBuf.Builder} builder Builder reference\r\n * @param {!ProtoBuf.Reflect.T} parent Parent Reflect object\r\n * @param {string} name Enum name\r\n * @param {Object.=} options Enum options\r\n * @param {string?} syntax The syntax level (e.g., proto3)\r\n * @constructor\r\n * @extends ProtoBuf.Reflect.Namespace\r\n */\r\n var Enum = function(builder, parent, name, options, syntax) {\r\n Namespace.call(this, builder, parent, name, options, syntax);\r\n\r\n /**\r\n * @override\r\n */\r\n this.className = \"Enum\";\r\n\r\n /**\r\n * Runtime enum object.\r\n * @type {Object.|null}\r\n * @expose\r\n */\r\n this.object = null;\r\n };\r\n\r\n /**\r\n * Gets the string name of an enum value.\r\n * @param {!ProtoBuf.Builder.Enum} enm Runtime enum\r\n * @param {number} value Enum value\r\n * @returns {?string} Name or `null` if not present\r\n * @expose\r\n */\r\n Enum.getName = function(enm, value) {\r\n var keys = Object.keys(enm);\r\n for (var i=0, key; i}\r\n * @expose\r\n */\r\n EnumPrototype.build = function(rebuild) {\r\n if (this.object && !rebuild)\r\n return this.object;\r\n var enm = new ProtoBuf.Builder.Enum(),\r\n values = this.getChildren(Enum.Value);\r\n for (var i=0, k=values.length; i=} options Options\r\n * @constructor\r\n * @extends ProtoBuf.Reflect.Namespace\r\n */\r\n var Service = function(builder, root, name, options) {\r\n Namespace.call(this, builder, root, name, options);\r\n\r\n /**\r\n * @override\r\n */\r\n this.className = \"Service\";\r\n\r\n /**\r\n * Built runtime service class.\r\n * @type {?function(new:ProtoBuf.Builder.Service)}\r\n */\r\n this.clazz = null;\r\n };\r\n\r\n /**\r\n * @alias ProtoBuf.Reflect.Service.prototype\r\n * @inner\r\n */\r\n var ServicePrototype = Service.prototype = Object.create(Namespace.prototype);\r\n\r\n /**\r\n * Builds the service and returns the runtime counterpart, which is a fully functional class.\r\n * @see ProtoBuf.Builder.Service\r\n * @param {boolean=} rebuild Whether to rebuild or not\r\n * @return {Function} Service class\r\n * @throws {Error} If the message cannot be built\r\n * @expose\r\n */\r\n ServicePrototype.build = function(rebuild) {\r\n if (this.clazz && !rebuild)\r\n return this.clazz;\r\n\r\n // Create the runtime Service class in its own scope\r\n return this.clazz = (function(ProtoBuf, T) {\r\n\r\n /**\r\n * Constructs a new runtime Service.\r\n * @name ProtoBuf.Builder.Service\r\n * @param {function(string, ProtoBuf.Builder.Message, function(Error, ProtoBuf.Builder.Message=))=} rpcImpl RPC implementation receiving the method name and the message\r\n * @class Barebone of all runtime services.\r\n * @constructor\r\n * @throws {Error} If the service cannot be created\r\n */\r\n var Service = function(rpcImpl) {\r\n ProtoBuf.Builder.Service.call(this);\r\n\r\n /**\r\n * Service implementation.\r\n * @name ProtoBuf.Builder.Service#rpcImpl\r\n * @type {!function(string, ProtoBuf.Builder.Message, function(Error, ProtoBuf.Builder.Message=))}\r\n * @expose\r\n */\r\n this.rpcImpl = rpcImpl || function(name, msg, callback) {\r\n // This is what a user has to implement: A function receiving the method name, the actual message to\r\n // send (type checked) and the callback that's either provided with the error as its first\r\n // argument or null and the actual response message.\r\n setTimeout(callback.bind(this, Error(\"Not implemented, see: https://github.com/dcodeIO/ProtoBuf.js/wiki/Services\")), 0); // Must be async!\r\n };\r\n };\r\n\r\n /**\r\n * @alias ProtoBuf.Builder.Service.prototype\r\n * @inner\r\n */\r\n var ServicePrototype = Service.prototype = Object.create(ProtoBuf.Builder.Service.prototype);\r\n\r\n /**\r\n * Asynchronously performs an RPC call using the given RPC implementation.\r\n * @name ProtoBuf.Builder.Service.[Method]\r\n * @function\r\n * @param {!function(string, ProtoBuf.Builder.Message, function(Error, ProtoBuf.Builder.Message=))} rpcImpl RPC implementation\r\n * @param {ProtoBuf.Builder.Message} req Request\r\n * @param {function(Error, (ProtoBuf.Builder.Message|ByteBuffer|Buffer|string)=)} callback Callback receiving\r\n * the error if any and the response either as a pre-parsed message or as its raw bytes\r\n * @abstract\r\n */\r\n\r\n /**\r\n * Asynchronously performs an RPC call using the instance's RPC implementation.\r\n * @name ProtoBuf.Builder.Service#[Method]\r\n * @function\r\n * @param {ProtoBuf.Builder.Message} req Request\r\n * @param {function(Error, (ProtoBuf.Builder.Message|ByteBuffer|Buffer|string)=)} callback Callback receiving\r\n * the error if any and the response either as a pre-parsed message or as its raw bytes\r\n * @abstract\r\n */\r\n\r\n var rpc = T.getChildren(ProtoBuf.Reflect.Service.RPCMethod);\r\n for (var i=0; i}\r\n * @expose\r\n */\r\n var $optionsS; // cc needs this\r\n\r\n /**\r\n * Service options.\r\n * @name ProtoBuf.Builder.Service#$options\r\n * @type {Object.}\r\n * @expose\r\n */\r\n var $options;\r\n\r\n /**\r\n * Reflection type.\r\n * @name ProtoBuf.Builder.Service.$type\r\n * @type {!ProtoBuf.Reflect.Service}\r\n * @expose\r\n */\r\n var $typeS;\r\n\r\n /**\r\n * Reflection type.\r\n * @name ProtoBuf.Builder.Service#$type\r\n * @type {!ProtoBuf.Reflect.Service}\r\n * @expose\r\n */\r\n var $type;\r\n\r\n if (Object.defineProperty)\r\n Object.defineProperty(Service, \"$options\", { \"value\": T.buildOpt() }),\r\n Object.defineProperty(ServicePrototype, \"$options\", { \"value\": Service[\"$options\"] }),\r\n Object.defineProperty(Service, \"$type\", { \"value\": T }),\r\n Object.defineProperty(ServicePrototype, \"$type\", { \"value\": T });\r\n\r\n return Service;\r\n\r\n })(ProtoBuf, this);\r\n };\r\n\r\n /**\r\n * @alias ProtoBuf.Reflect.Service\r\n * @expose\r\n */\r\n Reflect.Service = Service;\r\n\r\n /**\r\n * Abstract service method.\r\n * @exports ProtoBuf.Reflect.Service.Method\r\n * @param {!ProtoBuf.Builder} builder Builder reference\r\n * @param {!ProtoBuf.Reflect.Service} svc Service\r\n * @param {string} name Method name\r\n * @param {Object.=} options Options\r\n * @constructor\r\n * @extends ProtoBuf.Reflect.T\r\n */\r\n var Method = function(builder, svc, name, options) {\r\n T.call(this, builder, svc, name);\r\n\r\n /**\r\n * @override\r\n */\r\n this.className = \"Service.Method\";\r\n\r\n /**\r\n * Options.\r\n * @type {Object.}\r\n * @expose\r\n */\r\n this.options = options || {};\r\n };\r\n\r\n /**\r\n * @alias ProtoBuf.Reflect.Service.Method.prototype\r\n * @inner\r\n */\r\n var MethodPrototype = Method.prototype = Object.create(T.prototype);\r\n\r\n /**\r\n * Builds the method's '$options' property.\r\n * @name ProtoBuf.Reflect.Service.Method#buildOpt\r\n * @function\r\n * @return {Object.}\r\n */\r\n MethodPrototype.buildOpt = NamespacePrototype.buildOpt;\r\n\r\n /**\r\n * @alias ProtoBuf.Reflect.Service.Method\r\n * @expose\r\n */\r\n Reflect.Service.Method = Method;\r\n\r\n /**\r\n * RPC service method.\r\n * @exports ProtoBuf.Reflect.Service.RPCMethod\r\n * @param {!ProtoBuf.Builder} builder Builder reference\r\n * @param {!ProtoBuf.Reflect.Service} svc Service\r\n * @param {string} name Method name\r\n * @param {string} request Request message name\r\n * @param {string} response Response message name\r\n * @param {boolean} request_stream Whether requests are streamed\r\n * @param {boolean} response_stream Whether responses are streamed\r\n * @param {Object.=} options Options\r\n * @constructor\r\n * @extends ProtoBuf.Reflect.Service.Method\r\n */\r\n var RPCMethod = function(builder, svc, name, request, response, request_stream, response_stream, options) {\r\n Method.call(this, builder, svc, name, options);\r\n\r\n /**\r\n * @override\r\n */\r\n this.className = \"Service.RPCMethod\";\r\n\r\n /**\r\n * Request message name.\r\n * @type {string}\r\n * @expose\r\n */\r\n this.requestName = request;\r\n\r\n /**\r\n * Response message name.\r\n * @type {string}\r\n * @expose\r\n */\r\n this.responseName = response;\r\n\r\n /**\r\n * Whether requests are streamed\r\n * @type {bool}\r\n * @expose\r\n */\r\n this.requestStream = request_stream;\r\n\r\n /**\r\n * Whether responses are streamed\r\n * @type {bool}\r\n * @expose\r\n */\r\n this.responseStream = response_stream;\r\n\r\n /**\r\n * Resolved request message type.\r\n * @type {ProtoBuf.Reflect.Message}\r\n * @expose\r\n */\r\n this.resolvedRequestType = null;\r\n\r\n /**\r\n * Resolved response message type.\r\n * @type {ProtoBuf.Reflect.Message}\r\n * @expose\r\n */\r\n this.resolvedResponseType = null;\r\n };\r\n\r\n // Extends Method\r\n RPCMethod.prototype = Object.create(Method.prototype);\r\n\r\n /**\r\n * @alias ProtoBuf.Reflect.Service.RPCMethod\r\n * @expose\r\n */\r\n Reflect.Service.RPCMethod = RPCMethod;\r\n\r\n return Reflect;\r\n\r\n })(ProtoBuf);\r\n\r\n /**\r\n * @alias ProtoBuf.Builder\r\n * @expose\r\n */\r\n ProtoBuf.Builder = (function(ProtoBuf, Lang, Reflect) {\r\n \"use strict\";\r\n\r\n /**\r\n * Constructs a new Builder.\r\n * @exports ProtoBuf.Builder\r\n * @class Provides the functionality to build protocol messages.\r\n * @param {Object.=} options Options\r\n * @constructor\r\n */\r\n var Builder = function(options) {\r\n\r\n /**\r\n * Namespace.\r\n * @type {ProtoBuf.Reflect.Namespace}\r\n * @expose\r\n */\r\n this.ns = new Reflect.Namespace(this, null, \"\"); // Global namespace\r\n\r\n /**\r\n * Namespace pointer.\r\n * @type {ProtoBuf.Reflect.T}\r\n * @expose\r\n */\r\n this.ptr = this.ns;\r\n\r\n /**\r\n * Resolved flag.\r\n * @type {boolean}\r\n * @expose\r\n */\r\n this.resolved = false;\r\n\r\n /**\r\n * The current building result.\r\n * @type {Object.|null}\r\n * @expose\r\n */\r\n this.result = null;\r\n\r\n /**\r\n * Imported files.\r\n * @type {Array.}\r\n * @expose\r\n */\r\n this.files = {};\r\n\r\n /**\r\n * Import root override.\r\n * @type {?string}\r\n * @expose\r\n */\r\n this.importRoot = null;\r\n\r\n /**\r\n * Options.\r\n * @type {!Object.}\r\n * @expose\r\n */\r\n this.options = options || {};\r\n };\r\n\r\n /**\r\n * @alias ProtoBuf.Builder.prototype\r\n * @inner\r\n */\r\n var BuilderPrototype = Builder.prototype;\r\n\r\n // ----- Definition tests -----\r\n\r\n /**\r\n * Tests if a definition most likely describes a message.\r\n * @param {!Object} def\r\n * @returns {boolean}\r\n * @expose\r\n */\r\n Builder.isMessage = function(def) {\r\n // Messages require a string name\r\n if (typeof def[\"name\"] !== 'string')\r\n return false;\r\n // Messages do not contain values (enum) or rpc methods (service)\r\n if (typeof def[\"values\"] !== 'undefined' || typeof def[\"rpc\"] !== 'undefined')\r\n return false;\r\n return true;\r\n };\r\n\r\n /**\r\n * Tests if a definition most likely describes a message field.\r\n * @param {!Object} def\r\n * @returns {boolean}\r\n * @expose\r\n */\r\n Builder.isMessageField = function(def) {\r\n // Message fields require a string rule, name and type and an id\r\n if (typeof def[\"rule\"] !== 'string' || typeof def[\"name\"] !== 'string' || typeof def[\"type\"] !== 'string' || typeof def[\"id\"] === 'undefined')\r\n return false;\r\n return true;\r\n };\r\n\r\n /**\r\n * Tests if a definition most likely describes an enum.\r\n * @param {!Object} def\r\n * @returns {boolean}\r\n * @expose\r\n */\r\n Builder.isEnum = function(def) {\r\n // Enums require a string name\r\n if (typeof def[\"name\"] !== 'string')\r\n return false;\r\n // Enums require at least one value\r\n if (typeof def[\"values\"] === 'undefined' || !Array.isArray(def[\"values\"]) || def[\"values\"].length === 0)\r\n return false;\r\n return true;\r\n };\r\n\r\n /**\r\n * Tests if a definition most likely describes a service.\r\n * @param {!Object} def\r\n * @returns {boolean}\r\n * @expose\r\n */\r\n Builder.isService = function(def) {\r\n // Services require a string name and an rpc object\r\n if (typeof def[\"name\"] !== 'string' || typeof def[\"rpc\"] !== 'object' || !def[\"rpc\"])\r\n return false;\r\n return true;\r\n };\r\n\r\n /**\r\n * Tests if a definition most likely describes an extended message\r\n * @param {!Object} def\r\n * @returns {boolean}\r\n * @expose\r\n */\r\n Builder.isExtend = function(def) {\r\n // Extends rquire a string ref\r\n if (typeof def[\"ref\"] !== 'string')\r\n return false;\r\n return true;\r\n };\r\n\r\n // ----- Building -----\r\n\r\n /**\r\n * Resets the pointer to the root namespace.\r\n * @returns {!ProtoBuf.Builder} this\r\n * @expose\r\n */\r\n BuilderPrototype.reset = function() {\r\n this.ptr = this.ns;\r\n return this;\r\n };\r\n\r\n /**\r\n * Defines a namespace on top of the current pointer position and places the pointer on it.\r\n * @param {string} namespace\r\n * @return {!ProtoBuf.Builder} this\r\n * @expose\r\n */\r\n BuilderPrototype.define = function(namespace) {\r\n if (typeof namespace !== 'string' || !Lang.TYPEREF.test(namespace))\r\n throw Error(\"illegal namespace: \"+namespace);\r\n namespace.split(\".\").forEach(function(part) {\r\n var ns = this.ptr.getChild(part);\r\n if (ns === null) // Keep existing\r\n this.ptr.addChild(ns = new Reflect.Namespace(this, this.ptr, part));\r\n this.ptr = ns;\r\n }, this);\r\n return this;\r\n };\r\n\r\n /**\r\n * Creates the specified definitions at the current pointer position.\r\n * @param {!Array.} defs Messages, enums or services to create\r\n * @returns {!ProtoBuf.Builder} this\r\n * @throws {Error} If a message definition is invalid\r\n * @expose\r\n */\r\n BuilderPrototype.create = function(defs) {\r\n if (!defs)\r\n return this; // Nothing to create\r\n if (!Array.isArray(defs))\r\n defs = [defs];\r\n else {\r\n if (defs.length === 0)\r\n return this;\r\n defs = defs.slice();\r\n }\r\n\r\n // It's quite hard to keep track of scopes and memory here, so let's do this iteratively.\r\n var stack = [defs];\r\n while (stack.length > 0) {\r\n defs = stack.pop();\r\n\r\n if (!Array.isArray(defs)) // Stack always contains entire namespaces\r\n throw Error(\"not a valid namespace: \"+JSON.stringify(defs));\r\n\r\n while (defs.length > 0) {\r\n var def = defs.shift(); // Namespaces always contain an array of messages, enums and services\r\n\r\n if (Builder.isMessage(def)) {\r\n var obj = new Reflect.Message(this, this.ptr, def[\"name\"], def[\"options\"], def[\"isGroup\"], def[\"syntax\"]);\r\n\r\n // Create OneOfs\r\n var oneofs = {};\r\n if (def[\"oneofs\"])\r\n Object.keys(def[\"oneofs\"]).forEach(function(name) {\r\n obj.addChild(oneofs[name] = new Reflect.Message.OneOf(this, obj, name));\r\n }, this);\r\n\r\n // Create fields\r\n if (def[\"fields\"])\r\n def[\"fields\"].forEach(function(fld) {\r\n if (obj.getChild(fld[\"id\"]|0) !== null)\r\n throw Error(\"duplicate or invalid field id in \"+obj.name+\": \"+fld['id']);\r\n if (fld[\"options\"] && typeof fld[\"options\"] !== 'object')\r\n throw Error(\"illegal field options in \"+obj.name+\"#\"+fld[\"name\"]);\r\n var oneof = null;\r\n if (typeof fld[\"oneof\"] === 'string' && !(oneof = oneofs[fld[\"oneof\"]]))\r\n throw Error(\"illegal oneof in \"+obj.name+\"#\"+fld[\"name\"]+\": \"+fld[\"oneof\"]);\r\n fld = new Reflect.Message.Field(this, obj, fld[\"rule\"], fld[\"keytype\"], fld[\"type\"], fld[\"name\"], fld[\"id\"], fld[\"options\"], oneof, def[\"syntax\"]);\r\n if (oneof)\r\n oneof.fields.push(fld);\r\n obj.addChild(fld);\r\n }, this);\r\n\r\n // Push children to stack\r\n var subObj = [];\r\n if (def[\"enums\"])\r\n def[\"enums\"].forEach(function(enm) {\r\n subObj.push(enm);\r\n });\r\n if (def[\"messages\"])\r\n def[\"messages\"].forEach(function(msg) {\r\n subObj.push(msg);\r\n });\r\n if (def[\"services\"])\r\n def[\"services\"].forEach(function(svc) {\r\n subObj.push(svc);\r\n });\r\n\r\n // Set extension ranges\r\n if (def[\"extensions\"]) {\r\n if (typeof def[\"extensions\"][0] === 'number') // pre 5.0.1\r\n obj.extensions = [ def[\"extensions\"] ];\r\n else\r\n obj.extensions = def[\"extensions\"];\r\n }\r\n\r\n // Create on top of current namespace\r\n this.ptr.addChild(obj);\r\n if (subObj.length > 0) {\r\n stack.push(defs); // Push the current level back\r\n defs = subObj; // Continue processing sub level\r\n subObj = null;\r\n this.ptr = obj; // And move the pointer to this namespace\r\n obj = null;\r\n continue;\r\n }\r\n subObj = null;\r\n\r\n } else if (Builder.isEnum(def)) {\r\n\r\n obj = new Reflect.Enum(this, this.ptr, def[\"name\"], def[\"options\"], def[\"syntax\"]);\r\n def[\"values\"].forEach(function(val) {\r\n obj.addChild(new Reflect.Enum.Value(this, obj, val[\"name\"], val[\"id\"]));\r\n }, this);\r\n this.ptr.addChild(obj);\r\n\r\n } else if (Builder.isService(def)) {\r\n\r\n obj = new Reflect.Service(this, this.ptr, def[\"name\"], def[\"options\"]);\r\n Object.keys(def[\"rpc\"]).forEach(function(name) {\r\n var mtd = def[\"rpc\"][name];\r\n obj.addChild(new Reflect.Service.RPCMethod(this, obj, name, mtd[\"request\"], mtd[\"response\"], !!mtd[\"request_stream\"], !!mtd[\"response_stream\"], mtd[\"options\"]));\r\n }, this);\r\n this.ptr.addChild(obj);\r\n\r\n } else if (Builder.isExtend(def)) {\r\n\r\n obj = this.ptr.resolve(def[\"ref\"], true);\r\n if (obj) {\r\n def[\"fields\"].forEach(function(fld) {\r\n if (obj.getChild(fld['id']|0) !== null)\r\n throw Error(\"duplicate extended field id in \"+obj.name+\": \"+fld['id']);\r\n // Check if field id is allowed to be extended\r\n if (obj.extensions) {\r\n var valid = false;\r\n obj.extensions.forEach(function(range) {\r\n if (fld[\"id\"] >= range[0] && fld[\"id\"] <= range[1])\r\n valid = true;\r\n });\r\n if (!valid)\r\n throw Error(\"illegal extended field id in \"+obj.name+\": \"+fld['id']+\" (not within valid ranges)\");\r\n }\r\n // Convert extension field names to camel case notation if the override is set\r\n var name = fld[\"name\"];\r\n if (this.options['convertFieldsToCamelCase'])\r\n name = ProtoBuf.Util.toCamelCase(name);\r\n // see #161: Extensions use their fully qualified name as their runtime key and...\r\n var field = new Reflect.Message.ExtensionField(this, obj, fld[\"rule\"], fld[\"type\"], this.ptr.fqn()+'.'+name, fld[\"id\"], fld[\"options\"]);\r\n // ...are added on top of the current namespace as an extension which is used for\r\n // resolving their type later on (the extension always keeps the original name to\r\n // prevent naming collisions)\r\n var ext = new Reflect.Extension(this, this.ptr, fld[\"name\"], field);\r\n field.extension = ext;\r\n this.ptr.addChild(ext);\r\n obj.addChild(field);\r\n }, this);\r\n\r\n } else if (!/\\.?google\\.protobuf\\./.test(def[\"ref\"])) // Silently skip internal extensions\r\n throw Error(\"extended message \"+def[\"ref\"]+\" is not defined\");\r\n\r\n } else\r\n throw Error(\"not a valid definition: \"+JSON.stringify(def));\r\n\r\n def = null;\r\n obj = null;\r\n }\r\n // Break goes here\r\n defs = null;\r\n this.ptr = this.ptr.parent; // Namespace done, continue at parent\r\n }\r\n this.resolved = false; // Require re-resolve\r\n this.result = null; // Require re-build\r\n return this;\r\n };\r\n\r\n /**\r\n * Propagates syntax to all children.\r\n * @param {!Object} parent\r\n * @inner\r\n */\r\n function propagateSyntax(parent) {\r\n if (parent['messages']) {\r\n parent['messages'].forEach(function(child) {\r\n child[\"syntax\"] = parent[\"syntax\"];\r\n propagateSyntax(child);\r\n });\r\n }\r\n if (parent['enums']) {\r\n parent['enums'].forEach(function(child) {\r\n child[\"syntax\"] = parent[\"syntax\"];\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * Imports another definition into this builder.\r\n * @param {Object.} json Parsed import\r\n * @param {(string|{root: string, file: string})=} filename Imported file name\r\n * @returns {!ProtoBuf.Builder} this\r\n * @throws {Error} If the definition or file cannot be imported\r\n * @expose\r\n */\r\n BuilderPrototype[\"import\"] = function(json, filename) {\r\n var delim = '/';\r\n\r\n // Make sure to skip duplicate imports\r\n\r\n if (typeof filename === 'string') {\r\n\r\n if (ProtoBuf.Util.IS_NODE)\r\n filename = require(\"path\")['resolve'](filename);\r\n if (this.files[filename] === true)\r\n return this.reset();\r\n this.files[filename] = true;\r\n\r\n } else if (typeof filename === 'object') { // Object with root, file.\r\n\r\n var root = filename.root;\r\n if (ProtoBuf.Util.IS_NODE)\r\n root = require(\"path\")['resolve'](root);\r\n if (root.indexOf(\"\\\\\") >= 0 || filename.file.indexOf(\"\\\\\") >= 0)\r\n delim = '\\\\';\r\n var fname;\r\n if (ProtoBuf.Util.IS_NODE)\r\n fname = require(\"path\")['join'](root, filename.file);\r\n else\r\n fname = root + delim + filename.file;\r\n if (this.files[fname] === true)\r\n return this.reset();\r\n this.files[fname] = true;\r\n }\r\n\r\n // Import imports\r\n\r\n if (json['imports'] && json['imports'].length > 0) {\r\n var importRoot,\r\n resetRoot = false;\r\n\r\n if (typeof filename === 'object') { // If an import root is specified, override\r\n\r\n this.importRoot = filename[\"root\"]; resetRoot = true; // ... and reset afterwards\r\n importRoot = this.importRoot;\r\n filename = filename[\"file\"];\r\n if (importRoot.indexOf(\"\\\\\") >= 0 || filename.indexOf(\"\\\\\") >= 0)\r\n delim = '\\\\';\r\n\r\n } else if (typeof filename === 'string') {\r\n\r\n if (this.importRoot) // If import root is overridden, use it\r\n importRoot = this.importRoot;\r\n else { // Otherwise compute from filename\r\n if (filename.indexOf(\"/\") >= 0) { // Unix\r\n importRoot = filename.replace(/\\/[^\\/]*$/, \"\");\r\n if (/* /file.proto */ importRoot === \"\")\r\n importRoot = \"/\";\r\n } else if (filename.indexOf(\"\\\\\") >= 0) { // Windows\r\n importRoot = filename.replace(/\\\\[^\\\\]*$/, \"\");\r\n delim = '\\\\';\r\n } else\r\n importRoot = \".\";\r\n }\r\n\r\n } else\r\n importRoot = null;\r\n\r\n for (var i=0; i)=} path Specifies what to return. If omitted, the entire namespace will be returned.\r\n * @returns {!ProtoBuf.Builder.Message|!Object.}\r\n * @throws {Error} If a type could not be resolved\r\n * @expose\r\n */\r\n BuilderPrototype.build = function(path) {\r\n this.reset();\r\n if (!this.resolved)\r\n this.resolveAll(),\r\n this.resolved = true,\r\n this.result = null; // Require re-build\r\n if (this.result === null) // (Re-)Build\r\n this.result = this.ns.build();\r\n if (!path)\r\n return this.result;\r\n var part = typeof path === 'string' ? path.split(\".\") : path,\r\n ptr = this.result; // Build namespace pointer (no hasChild etc.)\r\n for (var i=0; i=} contents Initial contents\r\n * @constructor\r\n */\r\n var Map = function(field, contents) {\r\n if (!field.map)\r\n throw Error(\"field is not a map\");\r\n\r\n /**\r\n * The field corresponding to this map.\r\n * @type {!ProtoBuf.Reflect.Field}\r\n */\r\n this.field = field;\r\n\r\n /**\r\n * Element instance corresponding to key type.\r\n * @type {!ProtoBuf.Reflect.Element}\r\n */\r\n this.keyElem = new Reflect.Element(field.keyType, null, true, field.syntax);\r\n\r\n /**\r\n * Element instance corresponding to value type.\r\n * @type {!ProtoBuf.Reflect.Element}\r\n */\r\n this.valueElem = new Reflect.Element(field.type, field.resolvedType, false, field.syntax);\r\n\r\n /**\r\n * Internal map: stores mapping of (string form of key) -> (key, value)\r\n * pair.\r\n *\r\n * We provide map semantics for arbitrary key types, but we build on top\r\n * of an Object, which has only string keys. In order to avoid the need\r\n * to convert a string key back to its native type in many situations,\r\n * we store the native key value alongside the value. Thus, we only need\r\n * a one-way mapping from a key type to its string form that guarantees\r\n * uniqueness and equality (i.e., str(K1) === str(K2) if and only if K1\r\n * === K2).\r\n *\r\n * @type {!Object}\r\n */\r\n this.map = {};\r\n\r\n /**\r\n * Returns the number of elements in the map.\r\n */\r\n Object.defineProperty(this, \"size\", {\r\n get: function() { return Object.keys(this.map).length; }\r\n });\r\n\r\n // Fill initial contents from a raw object.\r\n if (contents) {\r\n var keys = Object.keys(contents);\r\n for (var i = 0; i < keys.length; i++) {\r\n var key = this.keyElem.valueFromString(keys[i]);\r\n var val = this.valueElem.verifyValue(contents[keys[i]]);\r\n this.map[this.keyElem.valueToString(key)] =\r\n { key: key, value: val };\r\n }\r\n }\r\n };\r\n\r\n var MapPrototype = Map.prototype;\r\n\r\n /**\r\n * Helper: return an iterator over an array.\r\n * @param {!Array<*>} arr the array\r\n * @returns {!Object} an iterator\r\n * @inner\r\n */\r\n function arrayIterator(arr) {\r\n var idx = 0;\r\n return {\r\n next: function() {\r\n if (idx < arr.length)\r\n return { done: false, value: arr[idx++] };\r\n return { done: true };\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Clears the map.\r\n */\r\n MapPrototype.clear = function() {\r\n this.map = {};\r\n };\r\n\r\n /**\r\n * Deletes a particular key from the map.\r\n * @returns {boolean} Whether any entry with this key was deleted.\r\n */\r\n MapPrototype[\"delete\"] = function(key) {\r\n var keyValue = this.keyElem.valueToString(this.keyElem.verifyValue(key));\r\n var hadKey = keyValue in this.map;\r\n delete this.map[keyValue];\r\n return hadKey;\r\n };\r\n\r\n /**\r\n * Returns an iterator over [key, value] pairs in the map.\r\n * @returns {Object} The iterator\r\n */\r\n MapPrototype.entries = function() {\r\n var entries = [];\r\n var strKeys = Object.keys(this.map);\r\n for (var i = 0, entry; i < strKeys.length; i++)\r\n entries.push([(entry=this.map[strKeys[i]]).key, entry.value]);\r\n return arrayIterator(entries);\r\n };\r\n\r\n /**\r\n * Returns an iterator over keys in the map.\r\n * @returns {Object} The iterator\r\n */\r\n MapPrototype.keys = function() {\r\n var keys = [];\r\n var strKeys = Object.keys(this.map);\r\n for (var i = 0; i < strKeys.length; i++)\r\n keys.push(this.map[strKeys[i]].key);\r\n return arrayIterator(keys);\r\n };\r\n\r\n /**\r\n * Returns an iterator over values in the map.\r\n * @returns {!Object} The iterator\r\n */\r\n MapPrototype.values = function() {\r\n var values = [];\r\n var strKeys = Object.keys(this.map);\r\n for (var i = 0; i < strKeys.length; i++)\r\n values.push(this.map[strKeys[i]].value);\r\n return arrayIterator(values);\r\n };\r\n\r\n /**\r\n * Iterates over entries in the map, calling a function on each.\r\n * @param {function(this:*, *, *, *)} cb The callback to invoke with value, key, and map arguments.\r\n * @param {Object=} thisArg The `this` value for the callback\r\n */\r\n MapPrototype.forEach = function(cb, thisArg) {\r\n var strKeys = Object.keys(this.map);\r\n for (var i = 0, entry; i < strKeys.length; i++)\r\n cb.call(thisArg, (entry=this.map[strKeys[i]]).value, entry.key, this);\r\n };\r\n\r\n /**\r\n * Sets a key in the map to the given value.\r\n * @param {*} key The key\r\n * @param {*} value The value\r\n * @returns {!ProtoBuf.Map} The map instance\r\n */\r\n MapPrototype.set = function(key, value) {\r\n var keyValue = this.keyElem.verifyValue(key);\r\n var valValue = this.valueElem.verifyValue(value);\r\n this.map[this.keyElem.valueToString(keyValue)] =\r\n { key: keyValue, value: valValue };\r\n return this;\r\n };\r\n\r\n /**\r\n * Gets the value corresponding to a key in the map.\r\n * @param {*} key The key\r\n * @returns {*|undefined} The value, or `undefined` if key not present\r\n */\r\n MapPrototype.get = function(key) {\r\n var keyValue = this.keyElem.valueToString(this.keyElem.verifyValue(key));\r\n if (!(keyValue in this.map))\r\n return undefined;\r\n return this.map[keyValue].value;\r\n };\r\n\r\n /**\r\n * Determines whether the given key is present in the map.\r\n * @param {*} key The key\r\n * @returns {boolean} `true` if the key is present\r\n */\r\n MapPrototype.has = function(key) {\r\n var keyValue = this.keyElem.valueToString(this.keyElem.verifyValue(key));\r\n return (keyValue in this.map);\r\n };\r\n\r\n return Map;\r\n })(ProtoBuf, ProtoBuf.Reflect);\r\n\r\n\r\n /**\r\n * Constructs a new empty Builder.\r\n * @param {Object.=} options Builder options, defaults to global options set on ProtoBuf\r\n * @return {!ProtoBuf.Builder} Builder\r\n * @expose\r\n */\r\n ProtoBuf.newBuilder = function(options) {\r\n options = options || {};\r\n if (typeof options['convertFieldsToCamelCase'] === 'undefined')\r\n options['convertFieldsToCamelCase'] = ProtoBuf.convertFieldsToCamelCase;\r\n if (typeof options['populateAccessors'] === 'undefined')\r\n options['populateAccessors'] = ProtoBuf.populateAccessors;\r\n return new ProtoBuf.Builder(options);\r\n };\r\n\r\n /**\r\n * Loads a .json definition and returns the Builder.\r\n * @param {!*|string} json JSON definition\r\n * @param {(ProtoBuf.Builder|string|{root: string, file: string})=} builder Builder to append to. Will create a new one if omitted.\r\n * @param {(string|{root: string, file: string})=} filename The corresponding file name if known. Must be specified for imports.\r\n * @return {ProtoBuf.Builder} Builder to create new messages\r\n * @throws {Error} If the definition cannot be parsed or built\r\n * @expose\r\n */\r\n ProtoBuf.loadJson = function(json, builder, filename) {\r\n if (typeof builder === 'string' || (builder && typeof builder[\"file\"] === 'string' && typeof builder[\"root\"] === 'string'))\r\n filename = builder,\r\n builder = null;\r\n if (!builder || typeof builder !== 'object')\r\n builder = ProtoBuf.newBuilder();\r\n if (typeof json === 'string')\r\n json = JSON.parse(json);\r\n builder[\"import\"](json, filename);\r\n builder.resolveAll();\r\n return builder;\r\n };\r\n\r\n /**\r\n * Loads a .json file and returns the Builder.\r\n * @param {string|!{root: string, file: string}} filename Path to json file or an object specifying 'file' with\r\n * an overridden 'root' path for all imported files.\r\n * @param {function(?Error, !ProtoBuf.Builder=)=} callback Callback that will receive `null` as the first and\r\n * the Builder as its second argument on success, otherwise the error as its first argument. If omitted, the\r\n * file will be read synchronously and this function will return the Builder.\r\n * @param {ProtoBuf.Builder=} builder Builder to append to. Will create a new one if omitted.\r\n * @return {?ProtoBuf.Builder|undefined} The Builder if synchronous (no callback specified, will be NULL if the\r\n * request has failed), else undefined\r\n * @expose\r\n */\r\n ProtoBuf.loadJsonFile = function(filename, callback, builder) {\r\n if (callback && typeof callback === 'object')\r\n builder = callback,\r\n callback = null;\r\n else if (!callback || typeof callback !== 'function')\r\n callback = null;\r\n if (callback)\r\n return ProtoBuf.Util.fetch(typeof filename === 'string' ? filename : filename[\"root\"]+\"/\"+filename[\"file\"], function(contents) {\r\n if (contents === null) {\r\n callback(Error(\"Failed to fetch file\"));\r\n return;\r\n }\r\n try {\r\n callback(null, ProtoBuf.loadJson(JSON.parse(contents), builder, filename));\r\n } catch (e) {\r\n callback(e);\r\n }\r\n });\r\n var contents = ProtoBuf.Util.fetch(typeof filename === 'object' ? filename[\"root\"]+\"/\"+filename[\"file\"] : filename);\r\n return contents === null ? null : ProtoBuf.loadJson(JSON.parse(contents), builder, filename);\r\n };\r\n\r\n return ProtoBuf;\r\n});\r\n","module.exports = require(\"protobufjs/dist/protobuf-light\").newBuilder({})['import']({\n \"package\": \"push_server.messages2\",\n \"syntax\": \"proto2\",\n \"options\": {\n \"objc_class_prefix\": \"AVIM\"\n },\n \"messages\": [\n {\n \"name\": \"JsonObjectMessage\",\n \"syntax\": \"proto2\",\n \"fields\": [\n {\n \"rule\": \"required\",\n \"type\": \"string\",\n \"name\": \"data\",\n \"id\": 1\n }\n ]\n },\n {\n \"name\": \"UnreadTuple\",\n \"syntax\": \"proto2\",\n \"fields\": [\n {\n \"rule\": \"required\",\n \"type\": \"string\",\n \"name\": \"cid\",\n \"id\": 1\n },\n {\n \"rule\": \"required\",\n \"type\": \"int32\",\n \"name\": \"unread\",\n \"id\": 2\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"mid\",\n \"id\": 3\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"timestamp\",\n \"id\": 4\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"from\",\n \"id\": 5\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"data\",\n \"id\": 6\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"patchTimestamp\",\n \"id\": 7\n }\n ]\n },\n {\n \"name\": \"LogItem\",\n \"syntax\": \"proto2\",\n \"fields\": [\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"from\",\n \"id\": 1\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"data\",\n \"id\": 2\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"timestamp\",\n \"id\": 3\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"msgId\",\n \"id\": 4\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"ackAt\",\n \"id\": 5\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"readAt\",\n \"id\": 6\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"patchTimestamp\",\n \"id\": 7\n }\n ]\n },\n {\n \"name\": \"DataCommand\",\n \"syntax\": \"proto2\",\n \"fields\": [\n {\n \"rule\": \"repeated\",\n \"type\": \"string\",\n \"name\": \"ids\",\n \"id\": 1\n },\n {\n \"rule\": \"repeated\",\n \"type\": \"JsonObjectMessage\",\n \"name\": \"msg\",\n \"id\": 2\n },\n {\n \"rule\": \"optional\",\n \"type\": \"bool\",\n \"name\": \"offline\",\n \"id\": 3\n }\n ]\n },\n {\n \"name\": \"SessionCommand\",\n \"syntax\": \"proto2\",\n \"fields\": [\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"t\",\n \"id\": 1\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"n\",\n \"id\": 2\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"s\",\n \"id\": 3\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"ua\",\n \"id\": 4\n },\n {\n \"rule\": \"optional\",\n \"type\": \"bool\",\n \"name\": \"r\",\n \"id\": 5\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"tag\",\n \"id\": 6\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"deviceId\",\n \"id\": 7\n },\n {\n \"rule\": \"repeated\",\n \"type\": \"string\",\n \"name\": \"sessionPeerIds\",\n \"id\": 8\n },\n {\n \"rule\": \"repeated\",\n \"type\": \"string\",\n \"name\": \"onlineSessionPeerIds\",\n \"id\": 9\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"st\",\n \"id\": 10\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int32\",\n \"name\": \"stTtl\",\n \"id\": 11\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int32\",\n \"name\": \"code\",\n \"id\": 12\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"reason\",\n \"id\": 13\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"deviceToken\",\n \"id\": 14\n },\n {\n \"rule\": \"optional\",\n \"type\": \"bool\",\n \"name\": \"sp\",\n \"id\": 15\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"detail\",\n \"id\": 16\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"lastUnreadNotifTime\",\n \"id\": 17\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"lastPatchTime\",\n \"id\": 18\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"configBitmap\",\n \"id\": 19\n }\n ]\n },\n {\n \"name\": \"ErrorCommand\",\n \"syntax\": \"proto2\",\n \"fields\": [\n {\n \"rule\": \"required\",\n \"type\": \"int32\",\n \"name\": \"code\",\n \"id\": 1\n },\n {\n \"rule\": \"required\",\n \"type\": \"string\",\n \"name\": \"reason\",\n \"id\": 2\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int32\",\n \"name\": \"appCode\",\n \"id\": 3\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"detail\",\n \"id\": 4\n }\n ]\n },\n {\n \"name\": \"DirectCommand\",\n \"syntax\": \"proto2\",\n \"fields\": [\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"msg\",\n \"id\": 1\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"uid\",\n \"id\": 2\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"fromPeerId\",\n \"id\": 3\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"timestamp\",\n \"id\": 4\n },\n {\n \"rule\": \"optional\",\n \"type\": \"bool\",\n \"name\": \"offline\",\n \"id\": 5\n },\n {\n \"rule\": \"optional\",\n \"type\": \"bool\",\n \"name\": \"hasMore\",\n \"id\": 6\n },\n {\n \"rule\": \"repeated\",\n \"type\": \"string\",\n \"name\": \"toPeerIds\",\n \"id\": 7\n },\n {\n \"rule\": \"optional\",\n \"type\": \"bool\",\n \"name\": \"r\",\n \"id\": 10\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"cid\",\n \"id\": 11\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"id\",\n \"id\": 12\n },\n {\n \"rule\": \"optional\",\n \"type\": \"bool\",\n \"name\": \"transient\",\n \"id\": 13\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"dt\",\n \"id\": 14\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"roomId\",\n \"id\": 15\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"pushData\",\n \"id\": 16\n },\n {\n \"rule\": \"optional\",\n \"type\": \"bool\",\n \"name\": \"will\",\n \"id\": 17\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"patchTimestamp\",\n \"id\": 18\n }\n ]\n },\n {\n \"name\": \"AckCommand\",\n \"syntax\": \"proto2\",\n \"fields\": [\n {\n \"rule\": \"optional\",\n \"type\": \"int32\",\n \"name\": \"code\",\n \"id\": 1\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"reason\",\n \"id\": 2\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"mid\",\n \"id\": 3\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"cid\",\n \"id\": 4\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"t\",\n \"id\": 5\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"uid\",\n \"id\": 6\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"fromts\",\n \"id\": 7\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"tots\",\n \"id\": 8\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"type\",\n \"id\": 9\n },\n {\n \"rule\": \"repeated\",\n \"type\": \"string\",\n \"name\": \"ids\",\n \"id\": 10\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int32\",\n \"name\": \"appCode\",\n \"id\": 11\n }\n ]\n },\n {\n \"name\": \"UnreadCommand\",\n \"syntax\": \"proto2\",\n \"fields\": [\n {\n \"rule\": \"repeated\",\n \"type\": \"UnreadTuple\",\n \"name\": \"convs\",\n \"id\": 1\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"notifTime\",\n \"id\": 2\n }\n ]\n },\n {\n \"name\": \"ConvCommand\",\n \"syntax\": \"proto2\",\n \"fields\": [\n {\n \"rule\": \"repeated\",\n \"type\": \"string\",\n \"name\": \"m\",\n \"id\": 1\n },\n {\n \"rule\": \"optional\",\n \"type\": \"bool\",\n \"name\": \"transient\",\n \"id\": 2\n },\n {\n \"rule\": \"optional\",\n \"type\": \"bool\",\n \"name\": \"unique\",\n \"id\": 3\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"cid\",\n \"id\": 4\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"cdate\",\n \"id\": 5\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"initBy\",\n \"id\": 6\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"sort\",\n \"id\": 7\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int32\",\n \"name\": \"limit\",\n \"id\": 8\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int32\",\n \"name\": \"skip\",\n \"id\": 9\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int32\",\n \"name\": \"flag\",\n \"id\": 10\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int32\",\n \"name\": \"count\",\n \"id\": 11\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"udate\",\n \"id\": 12\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"t\",\n \"id\": 13\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"n\",\n \"id\": 14\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"s\",\n \"id\": 15\n },\n {\n \"rule\": \"optional\",\n \"type\": \"bool\",\n \"name\": \"statusSub\",\n \"id\": 16\n },\n {\n \"rule\": \"optional\",\n \"type\": \"bool\",\n \"name\": \"statusPub\",\n \"id\": 17\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int32\",\n \"name\": \"statusTTL\",\n \"id\": 18\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"uniqueId\",\n \"id\": 19\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"targetClientId\",\n \"id\": 20\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"maxReadTimestamp\",\n \"id\": 21\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"maxAckTimestamp\",\n \"id\": 22\n },\n {\n \"rule\": \"optional\",\n \"type\": \"bool\",\n \"name\": \"queryAllMembers\",\n \"id\": 23\n },\n {\n \"rule\": \"repeated\",\n \"type\": \"MaxReadTuple\",\n \"name\": \"maxReadTuples\",\n \"id\": 24\n },\n {\n \"rule\": \"repeated\",\n \"type\": \"string\",\n \"name\": \"cids\",\n \"id\": 25\n },\n {\n \"rule\": \"optional\",\n \"type\": \"JsonObjectMessage\",\n \"name\": \"results\",\n \"id\": 100\n },\n {\n \"rule\": \"optional\",\n \"type\": \"JsonObjectMessage\",\n \"name\": \"where\",\n \"id\": 101\n },\n {\n \"rule\": \"optional\",\n \"type\": \"JsonObjectMessage\",\n \"name\": \"attr\",\n \"id\": 103\n }\n ]\n },\n {\n \"name\": \"RoomCommand\",\n \"syntax\": \"proto2\",\n \"fields\": [\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"roomId\",\n \"id\": 1\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"s\",\n \"id\": 2\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"t\",\n \"id\": 3\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"n\",\n \"id\": 4\n },\n {\n \"rule\": \"optional\",\n \"type\": \"bool\",\n \"name\": \"transient\",\n \"id\": 5\n },\n {\n \"rule\": \"repeated\",\n \"type\": \"string\",\n \"name\": \"roomPeerIds\",\n \"id\": 6\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"byPeerId\",\n \"id\": 7\n }\n ]\n },\n {\n \"name\": \"LogsCommand\",\n \"syntax\": \"proto2\",\n \"fields\": [\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"cid\",\n \"id\": 1\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int32\",\n \"name\": \"l\",\n \"id\": 2\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int32\",\n \"name\": \"limit\",\n \"id\": 3\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"t\",\n \"id\": 4\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"tt\",\n \"id\": 5\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"tmid\",\n \"id\": 6\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"mid\",\n \"id\": 7\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"checksum\",\n \"id\": 8\n },\n {\n \"rule\": \"optional\",\n \"type\": \"bool\",\n \"name\": \"stored\",\n \"id\": 9\n },\n {\n \"rule\": \"optional\",\n \"type\": \"bool\",\n \"name\": \"reversed\",\n \"id\": 10\n },\n {\n \"rule\": \"repeated\",\n \"type\": \"LogItem\",\n \"name\": \"logs\",\n \"id\": 105\n }\n ]\n },\n {\n \"name\": \"RcpCommand\",\n \"syntax\": \"proto2\",\n \"fields\": [\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"id\",\n \"id\": 1\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"cid\",\n \"id\": 2\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"t\",\n \"id\": 3\n },\n {\n \"rule\": \"optional\",\n \"type\": \"bool\",\n \"name\": \"read\",\n \"id\": 4\n }\n ]\n },\n {\n \"name\": \"ReadTuple\",\n \"syntax\": \"proto2\",\n \"fields\": [\n {\n \"rule\": \"required\",\n \"type\": \"string\",\n \"name\": \"cid\",\n \"id\": 1\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"timestamp\",\n \"id\": 2\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"mid\",\n \"id\": 3\n }\n ]\n },\n {\n \"name\": \"MaxReadTuple\",\n \"syntax\": \"proto2\",\n \"fields\": [\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"pid\",\n \"id\": 1\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"maxAckTimestamp\",\n \"id\": 2\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"maxReadTimestamp\",\n \"id\": 3\n }\n ]\n },\n {\n \"name\": \"ReadCommand\",\n \"syntax\": \"proto2\",\n \"fields\": [\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"cid\",\n \"id\": 1\n },\n {\n \"rule\": \"repeated\",\n \"type\": \"string\",\n \"name\": \"cids\",\n \"id\": 2\n },\n {\n \"rule\": \"repeated\",\n \"type\": \"ReadTuple\",\n \"name\": \"convs\",\n \"id\": 3\n }\n ]\n },\n {\n \"name\": \"PresenceCommand\",\n \"syntax\": \"proto2\",\n \"fields\": [\n {\n \"rule\": \"optional\",\n \"type\": \"StatusType\",\n \"name\": \"status\",\n \"id\": 1\n },\n {\n \"rule\": \"repeated\",\n \"type\": \"string\",\n \"name\": \"sessionPeerIds\",\n \"id\": 2\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"cid\",\n \"id\": 3\n }\n ]\n },\n {\n \"name\": \"ReportCommand\",\n \"syntax\": \"proto2\",\n \"fields\": [\n {\n \"rule\": \"optional\",\n \"type\": \"bool\",\n \"name\": \"initiative\",\n \"id\": 1\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"type\",\n \"id\": 2\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"data\",\n \"id\": 3\n }\n ]\n },\n {\n \"name\": \"PatchItem\",\n \"syntax\": \"proto2\",\n \"fields\": [\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"cid\",\n \"id\": 1\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"mid\",\n \"id\": 2\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"timestamp\",\n \"id\": 3\n },\n {\n \"rule\": \"optional\",\n \"type\": \"bool\",\n \"name\": \"recall\",\n \"id\": 4\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"data\",\n \"id\": 5\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"patchTimestamp\",\n \"id\": 6\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"from\",\n \"id\": 7\n }\n ]\n },\n {\n \"name\": \"PatchCommand\",\n \"syntax\": \"proto2\",\n \"fields\": [\n {\n \"rule\": \"repeated\",\n \"type\": \"PatchItem\",\n \"name\": \"patches\",\n \"id\": 1\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int64\",\n \"name\": \"lastPatchTime\",\n \"id\": 2\n }\n ]\n },\n {\n \"name\": \"GenericCommand\",\n \"syntax\": \"proto2\",\n \"fields\": [\n {\n \"rule\": \"optional\",\n \"type\": \"CommandType\",\n \"name\": \"cmd\",\n \"id\": 1\n },\n {\n \"rule\": \"optional\",\n \"type\": \"OpType\",\n \"name\": \"op\",\n \"id\": 2\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"appId\",\n \"id\": 3\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"peerId\",\n \"id\": 4\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int32\",\n \"name\": \"i\",\n \"id\": 5\n },\n {\n \"rule\": \"optional\",\n \"type\": \"string\",\n \"name\": \"installationId\",\n \"id\": 6\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int32\",\n \"name\": \"priority\",\n \"id\": 7\n },\n {\n \"rule\": \"optional\",\n \"type\": \"int32\",\n \"name\": \"service\",\n \"id\": 8\n },\n {\n \"rule\": \"optional\",\n \"type\": \"DataCommand\",\n \"name\": \"dataMessage\",\n \"id\": 101\n },\n {\n \"rule\": \"optional\",\n \"type\": \"SessionCommand\",\n \"name\": \"sessionMessage\",\n \"id\": 102\n },\n {\n \"rule\": \"optional\",\n \"type\": \"ErrorCommand\",\n \"name\": \"errorMessage\",\n \"id\": 103\n },\n {\n \"rule\": \"optional\",\n \"type\": \"DirectCommand\",\n \"name\": \"directMessage\",\n \"id\": 104\n },\n {\n \"rule\": \"optional\",\n \"type\": \"AckCommand\",\n \"name\": \"ackMessage\",\n \"id\": 105\n },\n {\n \"rule\": \"optional\",\n \"type\": \"UnreadCommand\",\n \"name\": \"unreadMessage\",\n \"id\": 106\n },\n {\n \"rule\": \"optional\",\n \"type\": \"ReadCommand\",\n \"name\": \"readMessage\",\n \"id\": 107\n },\n {\n \"rule\": \"optional\",\n \"type\": \"RcpCommand\",\n \"name\": \"rcpMessage\",\n \"id\": 108\n },\n {\n \"rule\": \"optional\",\n \"type\": \"LogsCommand\",\n \"name\": \"logsMessage\",\n \"id\": 109\n },\n {\n \"rule\": \"optional\",\n \"type\": \"ConvCommand\",\n \"name\": \"convMessage\",\n \"id\": 110\n },\n {\n \"rule\": \"optional\",\n \"type\": \"RoomCommand\",\n \"name\": \"roomMessage\",\n \"id\": 111\n },\n {\n \"rule\": \"optional\",\n \"type\": \"PresenceCommand\",\n \"name\": \"presenceMessage\",\n \"id\": 112\n },\n {\n \"rule\": \"optional\",\n \"type\": \"ReportCommand\",\n \"name\": \"reportMessage\",\n \"id\": 113\n },\n {\n \"rule\": \"optional\",\n \"type\": \"PatchCommand\",\n \"name\": \"patchMessage\",\n \"id\": 114\n }\n ]\n }\n ],\n \"enums\": [\n {\n \"name\": \"CommandType\",\n \"syntax\": \"proto2\",\n \"values\": [\n {\n \"name\": \"session\",\n \"id\": 0\n },\n {\n \"name\": \"conv\",\n \"id\": 1\n },\n {\n \"name\": \"direct\",\n \"id\": 2\n },\n {\n \"name\": \"ack\",\n \"id\": 3\n },\n {\n \"name\": \"rcp\",\n \"id\": 4\n },\n {\n \"name\": \"unread\",\n \"id\": 5\n },\n {\n \"name\": \"logs\",\n \"id\": 6\n },\n {\n \"name\": \"error\",\n \"id\": 7\n },\n {\n \"name\": \"login\",\n \"id\": 8\n },\n {\n \"name\": \"data\",\n \"id\": 9\n },\n {\n \"name\": \"room\",\n \"id\": 10\n },\n {\n \"name\": \"read\",\n \"id\": 11\n },\n {\n \"name\": \"presence\",\n \"id\": 12\n },\n {\n \"name\": \"report\",\n \"id\": 13\n },\n {\n \"name\": \"echo\",\n \"id\": 14\n },\n {\n \"name\": \"loggedin\",\n \"id\": 15\n },\n {\n \"name\": \"logout\",\n \"id\": 16\n },\n {\n \"name\": \"loggedout\",\n \"id\": 17\n },\n {\n \"name\": \"patch\",\n \"id\": 18\n }\n ]\n },\n {\n \"name\": \"OpType\",\n \"syntax\": \"proto2\",\n \"values\": [\n {\n \"name\": \"open\",\n \"id\": 1\n },\n {\n \"name\": \"add\",\n \"id\": 2\n },\n {\n \"name\": \"remove\",\n \"id\": 3\n },\n {\n \"name\": \"close\",\n \"id\": 4\n },\n {\n \"name\": \"opened\",\n \"id\": 5\n },\n {\n \"name\": \"closed\",\n \"id\": 6\n },\n {\n \"name\": \"query\",\n \"id\": 7\n },\n {\n \"name\": \"query_result\",\n \"id\": 8\n },\n {\n \"name\": \"conflict\",\n \"id\": 9\n },\n {\n \"name\": \"added\",\n \"id\": 10\n },\n {\n \"name\": \"removed\",\n \"id\": 11\n },\n {\n \"name\": \"start\",\n \"id\": 30\n },\n {\n \"name\": \"started\",\n \"id\": 31\n },\n {\n \"name\": \"joined\",\n \"id\": 32\n },\n {\n \"name\": \"members_joined\",\n \"id\": 33\n },\n {\n \"name\": \"left\",\n \"id\": 39\n },\n {\n \"name\": \"members_left\",\n \"id\": 40\n },\n {\n \"name\": \"results\",\n \"id\": 42\n },\n {\n \"name\": \"count\",\n \"id\": 43\n },\n {\n \"name\": \"result\",\n \"id\": 44\n },\n {\n \"name\": \"update\",\n \"id\": 45\n },\n {\n \"name\": \"updated\",\n \"id\": 46\n },\n {\n \"name\": \"mute\",\n \"id\": 47\n },\n {\n \"name\": \"unmute\",\n \"id\": 48\n },\n {\n \"name\": \"status\",\n \"id\": 49\n },\n {\n \"name\": \"members\",\n \"id\": 50\n },\n {\n \"name\": \"max_read\",\n \"id\": 51\n },\n {\n \"name\": \"is_member\",\n \"id\": 52\n },\n {\n \"name\": \"join\",\n \"id\": 80\n },\n {\n \"name\": \"invite\",\n \"id\": 81\n },\n {\n \"name\": \"leave\",\n \"id\": 82\n },\n {\n \"name\": \"kick\",\n \"id\": 83\n },\n {\n \"name\": \"reject\",\n \"id\": 84\n },\n {\n \"name\": \"invited\",\n \"id\": 85\n },\n {\n \"name\": \"kicked\",\n \"id\": 86\n },\n {\n \"name\": \"upload\",\n \"id\": 100\n },\n {\n \"name\": \"uploaded\",\n \"id\": 101\n },\n {\n \"name\": \"modify\",\n \"id\": 150\n },\n {\n \"name\": \"modified\",\n \"id\": 151\n }\n ]\n },\n {\n \"name\": \"StatusType\",\n \"syntax\": \"proto2\",\n \"values\": [\n {\n \"name\": \"on\",\n \"id\": 1\n },\n {\n \"name\": \"off\",\n \"id\": 2\n }\n ]\n }\n ],\n \"isNamespace\": true\n}).build();\n","import messages from './message-compiled';\n\nconst {\n JsonObjectMessage,\n UnreadTuple,\n LogItem,\n DataCommand,\n SessionCommand,\n ErrorCommand,\n DirectCommand,\n AckCommand,\n UnreadCommand,\n ConvCommand,\n RoomCommand,\n LogsCommand,\n RcpCommand,\n ReadTuple,\n MaxReadTuple,\n ReadCommand,\n PresenceCommand,\n ReportCommand,\n GenericCommand,\n PatchCommand,\n PatchItem,\n CommandType,\n OpType,\n StatusType,\n} = messages.push_server.messages2;\n\nexport {\n JsonObjectMessage,\n UnreadTuple,\n LogItem,\n DataCommand,\n SessionCommand,\n ErrorCommand,\n DirectCommand,\n AckCommand,\n UnreadCommand,\n ConvCommand,\n RoomCommand,\n LogsCommand,\n RcpCommand,\n ReadTuple,\n MaxReadTuple,\n ReadCommand,\n PresenceCommand,\n ReportCommand,\n GenericCommand,\n PatchCommand,\n PatchItem,\n CommandType,\n OpType,\n StatusType,\n};\n","'use strict';\n\nvar has = Object.prototype.hasOwnProperty\n , prefix = '~';\n\n/**\n * Constructor to create a storage for our `EE` objects.\n * An `Events` instance is a plain object whose properties are event names.\n *\n * @constructor\n * @api private\n */\nfunction Events() {}\n\n//\n// We try to not inherit from `Object.prototype`. In some engines creating an\n// instance in this way is faster than calling `Object.create(null)` directly.\n// If `Object.create(null)` is not supported we prefix the event names with a\n// character to make sure that the built-in object properties are not\n// overridden or used as an attack vector.\n//\nif (Object.create) {\n Events.prototype = Object.create(null);\n\n //\n // This hack is needed because the `__proto__` property is still inherited in\n // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.\n //\n if (!new Events().__proto__) prefix = false;\n}\n\n/**\n * Representation of a single event listener.\n *\n * @param {Function} fn The listener function.\n * @param {Mixed} context The context to invoke the listener with.\n * @param {Boolean} [once=false] Specify if the listener is a one-time listener.\n * @constructor\n * @api private\n */\nfunction EE(fn, context, once) {\n this.fn = fn;\n this.context = context;\n this.once = once || false;\n}\n\n/**\n * Minimal `EventEmitter` interface that is molded against the Node.js\n * `EventEmitter` interface.\n *\n * @constructor\n * @api public\n */\nfunction EventEmitter() {\n this._events = new Events();\n this._eventsCount = 0;\n}\n\n/**\n * Return an array listing the events for which the emitter has registered\n * listeners.\n *\n * @returns {Array}\n * @api public\n */\nEventEmitter.prototype.eventNames = function eventNames() {\n var names = []\n , events\n , name;\n\n if (this._eventsCount === 0) return names;\n\n for (name in (events = this._events)) {\n if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);\n }\n\n if (Object.getOwnPropertySymbols) {\n return names.concat(Object.getOwnPropertySymbols(events));\n }\n\n return names;\n};\n\n/**\n * Return the listeners registered for a given event.\n *\n * @param {String|Symbol} event The event name.\n * @param {Boolean} exists Only check if there are listeners.\n * @returns {Array|Boolean}\n * @api public\n */\nEventEmitter.prototype.listeners = function listeners(event, exists) {\n var evt = prefix ? prefix + event : event\n , available = this._events[evt];\n\n if (exists) return !!available;\n if (!available) return [];\n if (available.fn) return [available.fn];\n\n for (var i = 0, l = available.length, ee = new Array(l); i < l; i++) {\n ee[i] = available[i].fn;\n }\n\n return ee;\n};\n\n/**\n * Calls each of the listeners registered for a given event.\n *\n * @param {String|Symbol} event The event name.\n * @returns {Boolean} `true` if the event had listeners, else `false`.\n * @api public\n */\nEventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return false;\n\n var listeners = this._events[evt]\n , len = arguments.length\n , args\n , i;\n\n if (listeners.fn) {\n if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);\n\n switch (len) {\n case 1: return listeners.fn.call(listeners.context), true;\n case 2: return listeners.fn.call(listeners.context, a1), true;\n case 3: return listeners.fn.call(listeners.context, a1, a2), true;\n case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;\n case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;\n case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;\n }\n\n for (i = 1, args = new Array(len -1); i < len; i++) {\n args[i - 1] = arguments[i];\n }\n\n listeners.fn.apply(listeners.context, args);\n } else {\n var length = listeners.length\n , j;\n\n for (i = 0; i < length; i++) {\n if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);\n\n switch (len) {\n case 1: listeners[i].fn.call(listeners[i].context); break;\n case 2: listeners[i].fn.call(listeners[i].context, a1); break;\n case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;\n case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;\n default:\n if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {\n args[j - 1] = arguments[j];\n }\n\n listeners[i].fn.apply(listeners[i].context, args);\n }\n }\n }\n\n return true;\n};\n\n/**\n * Add a listener for a given event.\n *\n * @param {String|Symbol} event The event name.\n * @param {Function} fn The listener function.\n * @param {Mixed} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @api public\n */\nEventEmitter.prototype.on = function on(event, fn, context) {\n var listener = new EE(fn, context || this)\n , evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) this._events[evt] = listener, this._eventsCount++;\n else if (!this._events[evt].fn) this._events[evt].push(listener);\n else this._events[evt] = [this._events[evt], listener];\n\n return this;\n};\n\n/**\n * Add a one-time listener for a given event.\n *\n * @param {String|Symbol} event The event name.\n * @param {Function} fn The listener function.\n * @param {Mixed} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @api public\n */\nEventEmitter.prototype.once = function once(event, fn, context) {\n var listener = new EE(fn, context || this, true)\n , evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) this._events[evt] = listener, this._eventsCount++;\n else if (!this._events[evt].fn) this._events[evt].push(listener);\n else this._events[evt] = [this._events[evt], listener];\n\n return this;\n};\n\n/**\n * Remove the listeners of a given event.\n *\n * @param {String|Symbol} event The event name.\n * @param {Function} fn Only remove the listeners that match this function.\n * @param {Mixed} context Only remove the listeners that have this context.\n * @param {Boolean} once Only remove one-time listeners.\n * @returns {EventEmitter} `this`.\n * @api public\n */\nEventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return this;\n if (!fn) {\n if (--this._eventsCount === 0) this._events = new Events();\n else delete this._events[evt];\n return this;\n }\n\n var listeners = this._events[evt];\n\n if (listeners.fn) {\n if (\n listeners.fn === fn\n && (!once || listeners.once)\n && (!context || listeners.context === context)\n ) {\n if (--this._eventsCount === 0) this._events = new Events();\n else delete this._events[evt];\n }\n } else {\n for (var i = 0, events = [], length = listeners.length; i < length; i++) {\n if (\n listeners[i].fn !== fn\n || (once && !listeners[i].once)\n || (context && listeners[i].context !== context)\n ) {\n events.push(listeners[i]);\n }\n }\n\n //\n // Reset the array, or remove it completely if we have no more listeners.\n //\n if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;\n else if (--this._eventsCount === 0) this._events = new Events();\n else delete this._events[evt];\n }\n\n return this;\n};\n\n/**\n * Remove all listeners, or those of the specified event.\n *\n * @param {String|Symbol} [event] The event name.\n * @returns {EventEmitter} `this`.\n * @api public\n */\nEventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {\n var evt;\n\n if (event) {\n evt = prefix ? prefix + event : event;\n if (this._events[evt]) {\n if (--this._eventsCount === 0) this._events = new Events();\n else delete this._events[evt];\n }\n } else {\n this._events = new Events();\n this._eventsCount = 0;\n }\n\n return this;\n};\n\n//\n// Alias methods names because people roll like that.\n//\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\nEventEmitter.prototype.addListener = EventEmitter.prototype.on;\n\n//\n// This function doesn't apply anymore.\n//\nEventEmitter.prototype.setMaxListeners = function setMaxListeners() {\n return this;\n};\n\n//\n// Expose the prefix.\n//\nEventEmitter.prefixed = prefix;\n\n//\n// Allow `EventEmitter` to be imported as module namespace.\n//\nEventEmitter.EventEmitter = EventEmitter;\n\n//\n// Expose the module.\n//\nif ('undefined' !== typeof module) {\n module.exports = EventEmitter;\n}\n","'use strict';\nvar $defineProperty = require('./_object-dp');\nvar createDesc = require('./_property-desc');\n\nmodule.exports = function (object, index, value) {\n if (index in object) $defineProperty.f(object, index, createDesc(0, value));\n else object[index] = value;\n};\n","'use strict';\nvar ctx = require('./_ctx');\nvar $export = require('./_export');\nvar toObject = require('./_to-object');\nvar call = require('./_iter-call');\nvar isArrayIter = require('./_is-array-iter');\nvar toLength = require('./_to-length');\nvar createProperty = require('./_create-property');\nvar getIterFn = require('./core.get-iterator-method');\n\n$export($export.S + $export.F * !require('./_iter-detect')(function (iter) { Array.from(iter); }), 'Array', {\n // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined)\n from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {\n var O = toObject(arrayLike);\n var C = typeof this == 'function' ? this : Array;\n var aLen = arguments.length;\n var mapfn = aLen > 1 ? arguments[1] : undefined;\n var mapping = mapfn !== undefined;\n var index = 0;\n var iterFn = getIterFn(O);\n var length, result, step, iterator;\n if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2);\n // if object isn't iterable or it's array with default iterator - use simple case\n if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) {\n for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) {\n createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value);\n }\n } else {\n length = toLength(O.length);\n for (result = new C(length); length > index; index++) {\n createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]);\n }\n }\n result.length = index;\n return result;\n }\n});\n","require('../../modules/es6.string.iterator');\nrequire('../../modules/es6.array.from');\nmodule.exports = require('../../modules/_core').Array.from;\n","module.exports = { \"default\": require(\"core-js/library/fn/array/from\"), __esModule: true };","\"use strict\";\n\nexports.__esModule = true;\n\nvar _from = require(\"../core-js/array/from\");\n\nvar _from2 = _interopRequireDefault(_from);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function (arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n } else {\n return (0, _from2.default)(arr);\n }\n};","var isObject = require('./_is-object');\nmodule.exports = function (it, TYPE) {\n if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!');\n return it;\n};\n","'use strict';\nvar dP = require('./_object-dp').f;\nvar create = require('./_object-create');\nvar redefineAll = require('./_redefine-all');\nvar ctx = require('./_ctx');\nvar anInstance = require('./_an-instance');\nvar forOf = require('./_for-of');\nvar $iterDefine = require('./_iter-define');\nvar step = require('./_iter-step');\nvar setSpecies = require('./_set-species');\nvar DESCRIPTORS = require('./_descriptors');\nvar fastKey = require('./_meta').fastKey;\nvar validate = require('./_validate-collection');\nvar SIZE = DESCRIPTORS ? '_s' : 'size';\n\nvar getEntry = function (that, key) {\n // fast case\n var index = fastKey(key);\n var entry;\n if (index !== 'F') return that._i[index];\n // frozen object case\n for (entry = that._f; entry; entry = entry.n) {\n if (entry.k == key) return entry;\n }\n};\n\nmodule.exports = {\n getConstructor: function (wrapper, NAME, IS_MAP, ADDER) {\n var C = wrapper(function (that, iterable) {\n anInstance(that, C, NAME, '_i');\n that._t = NAME; // collection type\n that._i = create(null); // index\n that._f = undefined; // first entry\n that._l = undefined; // last entry\n that[SIZE] = 0; // size\n if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);\n });\n redefineAll(C.prototype, {\n // 23.1.3.1 Map.prototype.clear()\n // 23.2.3.2 Set.prototype.clear()\n clear: function clear() {\n for (var that = validate(this, NAME), data = that._i, entry = that._f; entry; entry = entry.n) {\n entry.r = true;\n if (entry.p) entry.p = entry.p.n = undefined;\n delete data[entry.i];\n }\n that._f = that._l = undefined;\n that[SIZE] = 0;\n },\n // 23.1.3.3 Map.prototype.delete(key)\n // 23.2.3.4 Set.prototype.delete(value)\n 'delete': function (key) {\n var that = validate(this, NAME);\n var entry = getEntry(that, key);\n if (entry) {\n var next = entry.n;\n var prev = entry.p;\n delete that._i[entry.i];\n entry.r = true;\n if (prev) prev.n = next;\n if (next) next.p = prev;\n if (that._f == entry) that._f = next;\n if (that._l == entry) that._l = prev;\n that[SIZE]--;\n } return !!entry;\n },\n // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined)\n // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined)\n forEach: function forEach(callbackfn /* , that = undefined */) {\n validate(this, NAME);\n var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);\n var entry;\n while (entry = entry ? entry.n : this._f) {\n f(entry.v, entry.k, this);\n // revert to the last existing entry\n while (entry && entry.r) entry = entry.p;\n }\n },\n // 23.1.3.7 Map.prototype.has(key)\n // 23.2.3.7 Set.prototype.has(value)\n has: function has(key) {\n return !!getEntry(validate(this, NAME), key);\n }\n });\n if (DESCRIPTORS) dP(C.prototype, 'size', {\n get: function () {\n return validate(this, NAME)[SIZE];\n }\n });\n return C;\n },\n def: function (that, key, value) {\n var entry = getEntry(that, key);\n var prev, index;\n // change existing entry\n if (entry) {\n entry.v = value;\n // create new entry\n } else {\n that._l = entry = {\n i: index = fastKey(key, true), // <- index\n k: key, // <- key\n v: value, // <- value\n p: prev = that._l, // <- previous entry\n n: undefined, // <- next entry\n r: false // <- removed\n };\n if (!that._f) that._f = entry;\n if (prev) prev.n = entry;\n that[SIZE]++;\n // add to index\n if (index !== 'F') that._i[index] = entry;\n } return that;\n },\n getEntry: getEntry,\n setStrong: function (C, NAME, IS_MAP) {\n // add .keys, .values, .entries, [@@iterator]\n // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11\n $iterDefine(C, NAME, function (iterated, kind) {\n this._t = validate(iterated, NAME); // target\n this._k = kind; // kind\n this._l = undefined; // previous\n }, function () {\n var that = this;\n var kind = that._k;\n var entry = that._l;\n // revert to the last existing entry\n while (entry && entry.r) entry = entry.p;\n // get next entry\n if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) {\n // or finish the iteration\n that._t = undefined;\n return step(1);\n }\n // return step by kind\n if (kind == 'keys') return step(0, entry.k);\n if (kind == 'values') return step(0, entry.v);\n return step(0, [entry.k, entry.v]);\n }, IS_MAP ? 'entries' : 'values', !IS_MAP, true);\n\n // add [@@species], 23.1.2.2, 23.2.2.2\n setSpecies(NAME);\n }\n};\n","var isObject = require('./_is-object');\nvar isArray = require('./_is-array');\nvar SPECIES = require('./_wks')('species');\n\nmodule.exports = function (original) {\n var C;\n if (isArray(original)) {\n C = original.constructor;\n // cross-realm fallback\n if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;\n if (isObject(C)) {\n C = C[SPECIES];\n if (C === null) C = undefined;\n }\n } return C === undefined ? Array : C;\n};\n","// 9.4.2.3 ArraySpeciesCreate(originalArray, length)\nvar speciesConstructor = require('./_array-species-constructor');\n\nmodule.exports = function (original, length) {\n return new (speciesConstructor(original))(length);\n};\n","// 0 -> Array#forEach\n// 1 -> Array#map\n// 2 -> Array#filter\n// 3 -> Array#some\n// 4 -> Array#every\n// 5 -> Array#find\n// 6 -> Array#findIndex\nvar ctx = require('./_ctx');\nvar IObject = require('./_iobject');\nvar toObject = require('./_to-object');\nvar toLength = require('./_to-length');\nvar asc = require('./_array-species-create');\nmodule.exports = function (TYPE, $create) {\n var IS_MAP = TYPE == 1;\n var IS_FILTER = TYPE == 2;\n var IS_SOME = TYPE == 3;\n var IS_EVERY = TYPE == 4;\n var IS_FIND_INDEX = TYPE == 6;\n var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;\n var create = $create || asc;\n return function ($this, callbackfn, that) {\n var O = toObject($this);\n var self = IObject(O);\n var f = ctx(callbackfn, that, 3);\n var length = toLength(self.length);\n var index = 0;\n var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;\n var val, res;\n for (;length > index; index++) if (NO_HOLES || index in self) {\n val = self[index];\n res = f(val, index, O);\n if (TYPE) {\n if (IS_MAP) result[index] = res; // map\n else if (res) switch (TYPE) {\n case 3: return true; // some\n case 5: return val; // find\n case 6: return index; // findIndex\n case 2: result.push(val); // filter\n } else if (IS_EVERY) return false; // every\n }\n }\n return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result;\n };\n};\n","'use strict';\nvar global = require('./_global');\nvar $export = require('./_export');\nvar meta = require('./_meta');\nvar fails = require('./_fails');\nvar hide = require('./_hide');\nvar redefineAll = require('./_redefine-all');\nvar forOf = require('./_for-of');\nvar anInstance = require('./_an-instance');\nvar isObject = require('./_is-object');\nvar setToStringTag = require('./_set-to-string-tag');\nvar dP = require('./_object-dp').f;\nvar each = require('./_array-methods')(0);\nvar DESCRIPTORS = require('./_descriptors');\n\nmodule.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) {\n var Base = global[NAME];\n var C = Base;\n var ADDER = IS_MAP ? 'set' : 'add';\n var proto = C && C.prototype;\n var O = {};\n if (!DESCRIPTORS || typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function () {\n new C().entries().next();\n }))) {\n // create collection constructor\n C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER);\n redefineAll(C.prototype, methods);\n meta.NEED = true;\n } else {\n C = wrapper(function (target, iterable) {\n anInstance(target, C, NAME, '_c');\n target._c = new Base();\n if (iterable != undefined) forOf(iterable, IS_MAP, target[ADDER], target);\n });\n each('add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON'.split(','), function (KEY) {\n var IS_ADDER = KEY == 'add' || KEY == 'set';\n if (KEY in proto && !(IS_WEAK && KEY == 'clear')) hide(C.prototype, KEY, function (a, b) {\n anInstance(this, C, KEY);\n if (!IS_ADDER && IS_WEAK && !isObject(a)) return KEY == 'get' ? undefined : false;\n var result = this._c[KEY](a === 0 ? 0 : a, b);\n return IS_ADDER ? this : result;\n });\n });\n IS_WEAK || dP(C.prototype, 'size', {\n get: function () {\n return this._c.size;\n }\n });\n }\n\n setToStringTag(C, NAME);\n\n O[NAME] = C;\n $export($export.G + $export.W + $export.F, O);\n\n if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP);\n\n return C;\n};\n","'use strict';\nvar strong = require('./_collection-strong');\nvar validate = require('./_validate-collection');\nvar SET = 'Set';\n\n// 23.2 Set Objects\nmodule.exports = require('./_collection')(SET, function (get) {\n return function Set() { return get(this, arguments.length > 0 ? arguments[0] : undefined); };\n}, {\n // 23.2.3.1 Set.prototype.add(value)\n add: function add(value) {\n return strong.def(validate(this, SET), value = value === 0 ? 0 : value, value);\n }\n}, strong);\n","var forOf = require('./_for-of');\n\nmodule.exports = function (iter, ITERATOR) {\n var result = [];\n forOf(iter, false, result.push, result, ITERATOR);\n return result;\n};\n","// https://github.com/DavidBruant/Map-Set.prototype.toJSON\nvar classof = require('./_classof');\nvar from = require('./_array-from-iterable');\nmodule.exports = function (NAME) {\n return function toJSON() {\n if (classof(this) != NAME) throw TypeError(NAME + \"#toJSON isn't generic\");\n return from(this);\n };\n};\n","// https://github.com/DavidBruant/Map-Set.prototype.toJSON\nvar $export = require('./_export');\n\n$export($export.P + $export.R, 'Set', { toJSON: require('./_collection-to-json')('Set') });\n","'use strict';\n// https://tc39.github.io/proposal-setmap-offrom/\nvar $export = require('./_export');\n\nmodule.exports = function (COLLECTION) {\n $export($export.S, COLLECTION, { of: function of() {\n var length = arguments.length;\n var A = Array(length);\n while (length--) A[length] = arguments[length];\n return new this(A);\n } });\n};\n","// https://tc39.github.io/proposal-setmap-offrom/#sec-set.of\nrequire('./_set-collection-of')('Set');\n","'use strict';\n// https://tc39.github.io/proposal-setmap-offrom/\nvar $export = require('./_export');\nvar aFunction = require('./_a-function');\nvar ctx = require('./_ctx');\nvar forOf = require('./_for-of');\n\nmodule.exports = function (COLLECTION) {\n $export($export.S, COLLECTION, { from: function from(source /* , mapFn, thisArg */) {\n var mapFn = arguments[1];\n var mapping, A, n, cb;\n aFunction(this);\n mapping = mapFn !== undefined;\n if (mapping) aFunction(mapFn);\n if (source == undefined) return new this();\n A = [];\n if (mapping) {\n n = 0;\n cb = ctx(mapFn, arguments[2], 2);\n forOf(source, false, function (nextItem) {\n A.push(cb(nextItem, n++));\n });\n } else {\n forOf(source, false, A.push, A);\n }\n return new this(A);\n } });\n};\n","// https://tc39.github.io/proposal-setmap-offrom/#sec-set.from\nrequire('./_set-collection-from')('Set');\n","require('../modules/es6.object.to-string');\nrequire('../modules/es6.string.iterator');\nrequire('../modules/web.dom.iterable');\nrequire('../modules/es6.set');\nrequire('../modules/es7.set.to-json');\nrequire('../modules/es7.set.of');\nrequire('../modules/es7.set.from');\nmodule.exports = require('../modules/_core').Set;\n","module.exports = { \"default\": require(\"core-js/library/fn/set\"), __esModule: true };","'use strict';\n// 19.1.2.1 Object.assign(target, source, ...)\nvar getKeys = require('./_object-keys');\nvar gOPS = require('./_object-gops');\nvar pIE = require('./_object-pie');\nvar toObject = require('./_to-object');\nvar IObject = require('./_iobject');\nvar $assign = Object.assign;\n\n// should work with symbols and should have deterministic property order (V8 bug)\nmodule.exports = !$assign || require('./_fails')(function () {\n var A = {};\n var B = {};\n // eslint-disable-next-line no-undef\n var S = Symbol();\n var K = 'abcdefghijklmnopqrst';\n A[S] = 7;\n K.split('').forEach(function (k) { B[k] = k; });\n return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;\n}) ? function assign(target, source) { // eslint-disable-line no-unused-vars\n var T = toObject(target);\n var aLen = arguments.length;\n var index = 1;\n var getSymbols = gOPS.f;\n var isEnum = pIE.f;\n while (aLen > index) {\n var S = IObject(arguments[index++]);\n var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S);\n var length = keys.length;\n var j = 0;\n var key;\n while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key];\n } return T;\n} : $assign;\n","// 19.1.3.1 Object.assign(target, source)\nvar $export = require('./_export');\n\n$export($export.S + $export.F, 'Object', { assign: require('./_object-assign') });\n","require('../../modules/es6.object.assign');\nmodule.exports = require('../../modules/_core').Object.assign;\n","module.exports = { \"default\": require(\"core-js/library/fn/object/assign\"), __esModule: true };","/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n * - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function(val, options) {\n options = options || {};\n var type = typeof val;\n if (type === 'string' && val.length > 0) {\n return parse(val);\n } else if (type === 'number' && isNaN(val) === false) {\n return options.long ? fmtLong(val) : fmtShort(val);\n }\n throw new Error(\n 'val is not a non-empty string or a valid number. val=' +\n JSON.stringify(val)\n );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n str = String(str);\n if (str.length > 100) {\n return;\n }\n var match = /^((?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(\n str\n );\n if (!match) {\n return;\n }\n var n = parseFloat(match[1]);\n var type = (match[2] || 'ms').toLowerCase();\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n default:\n return undefined;\n }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n if (ms >= d) {\n return Math.round(ms / d) + 'd';\n }\n if (ms >= h) {\n return Math.round(ms / h) + 'h';\n }\n if (ms >= m) {\n return Math.round(ms / m) + 'm';\n }\n if (ms >= s) {\n return Math.round(ms / s) + 's';\n }\n return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n return plural(ms, d, 'day') ||\n plural(ms, h, 'hour') ||\n plural(ms, m, 'minute') ||\n plural(ms, s, 'second') ||\n ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, n, name) {\n if (ms < n) {\n return;\n }\n if (ms < n * 1.5) {\n return Math.floor(ms / n) + ' ' + name;\n }\n return Math.ceil(ms / n) + ' ' + name + 's';\n}\n","\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n *\n * Expose `debug()` as the module.\n */\n\nexports = module.exports = createDebug.debug = createDebug['default'] = createDebug;\nexports.coerce = coerce;\nexports.disable = disable;\nexports.enable = enable;\nexports.enabled = enabled;\nexports.humanize = require('ms');\n\n/**\n * The currently active debug mode names, and names to skip.\n */\n\nexports.names = [];\nexports.skips = [];\n\n/**\n * Map of special \"%n\" handling functions, for the debug \"format\" argument.\n *\n * Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n */\n\nexports.formatters = {};\n\n/**\n * Previous log timestamp.\n */\n\nvar prevTime;\n\n/**\n * Select a color.\n * @param {String} namespace\n * @return {Number}\n * @api private\n */\n\nfunction selectColor(namespace) {\n var hash = 0, i;\n\n for (i in namespace) {\n hash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n hash |= 0; // Convert to 32bit integer\n }\n\n return exports.colors[Math.abs(hash) % exports.colors.length];\n}\n\n/**\n * Create a debugger with the given `namespace`.\n *\n * @param {String} namespace\n * @return {Function}\n * @api public\n */\n\nfunction createDebug(namespace) {\n\n function debug() {\n // disabled?\n if (!debug.enabled) return;\n\n var self = debug;\n\n // set `diff` timestamp\n var curr = +new Date();\n var ms = curr - (prevTime || curr);\n self.diff = ms;\n self.prev = prevTime;\n self.curr = curr;\n prevTime = curr;\n\n // turn the `arguments` into a proper Array\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n\n args[0] = exports.coerce(args[0]);\n\n if ('string' !== typeof args[0]) {\n // anything else let's inspect with %O\n args.unshift('%O');\n }\n\n // apply any `formatters` transformations\n var index = 0;\n args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) {\n // if we encounter an escaped % then don't increase the array index\n if (match === '%%') return match;\n index++;\n var formatter = exports.formatters[format];\n if ('function' === typeof formatter) {\n var val = args[index];\n match = formatter.call(self, val);\n\n // now we need to remove `args[index]` since it's inlined in the `format`\n args.splice(index, 1);\n index--;\n }\n return match;\n });\n\n // apply env-specific formatting (colors, etc.)\n exports.formatArgs.call(self, args);\n\n var logFn = debug.log || exports.log || console.log.bind(console);\n logFn.apply(self, args);\n }\n\n debug.namespace = namespace;\n debug.enabled = exports.enabled(namespace);\n debug.useColors = exports.useColors();\n debug.color = selectColor(namespace);\n\n // env-specific initialization logic for debug instances\n if ('function' === typeof exports.init) {\n exports.init(debug);\n }\n\n return debug;\n}\n\n/**\n * Enables a debug mode by namespaces. This can include modes\n * separated by a colon and wildcards.\n *\n * @param {String} namespaces\n * @api public\n */\n\nfunction enable(namespaces) {\n exports.save(namespaces);\n\n exports.names = [];\n exports.skips = [];\n\n var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n var len = split.length;\n\n for (var i = 0; i < len; i++) {\n if (!split[i]) continue; // ignore empty strings\n namespaces = split[i].replace(/\\*/g, '.*?');\n if (namespaces[0] === '-') {\n exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));\n } else {\n exports.names.push(new RegExp('^' + namespaces + '$'));\n }\n }\n}\n\n/**\n * Disable debug output.\n *\n * @api public\n */\n\nfunction disable() {\n exports.enable('');\n}\n\n/**\n * Returns true if the given mode name is enabled, false otherwise.\n *\n * @param {String} name\n * @return {Boolean}\n * @api public\n */\n\nfunction enabled(name) {\n var i, len;\n for (i = 0, len = exports.skips.length; i < len; i++) {\n if (exports.skips[i].test(name)) {\n return false;\n }\n }\n for (i = 0, len = exports.names.length; i < len; i++) {\n if (exports.names[i].test(name)) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * Coerce `val`.\n *\n * @param {Mixed} val\n * @return {Mixed}\n * @api private\n */\n\nfunction coerce(val) {\n if (val instanceof Error) return val.stack || val.message;\n return val;\n}\n","/**\n * This is the web browser implementation of `debug()`.\n *\n * Expose `debug()` as the module.\n */\n\nexports = module.exports = require('./debug');\nexports.log = log;\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = 'undefined' != typeof chrome\n && 'undefined' != typeof chrome.storage\n ? chrome.storage.local\n : localstorage();\n\n/**\n * Colors.\n */\n\nexports.colors = [\n 'lightseagreen',\n 'forestgreen',\n 'goldenrod',\n 'dodgerblue',\n 'darkorchid',\n 'crimson'\n];\n\n/**\n * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n * and the Firebug extension (any Firefox version) are known\n * to support \"%c\" CSS customizations.\n *\n * TODO: add a `localStorage` variable to explicitly enable/disable colors\n */\n\nfunction useColors() {\n // NB: In an Electron preload script, document will be defined but not fully\n // initialized. Since we know we're in Chrome, we'll just detect this case\n // explicitly\n if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') {\n return true;\n }\n\n // is webkit? http://stackoverflow.com/a/16459606/376773\n // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n // double check webkit in userAgent just in case we are in a worker\n (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nexports.formatters.j = function(v) {\n try {\n return JSON.stringify(v);\n } catch (err) {\n return '[UnexpectedJSONParseError]: ' + err.message;\n }\n};\n\n\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return;\n\n var c = 'color: ' + this.color;\n args.splice(1, 0, c, 'color: inherit')\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-zA-Z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n}\n\n/**\n * Invokes `console.log()` when available.\n * No-op when `console.log` is not a \"function\".\n *\n * @api public\n */\n\nfunction log() {\n // this hackery is required for IE8/9, where\n // the `console.log` function doesn't have 'apply'\n return 'object' === typeof console\n && console.log\n && Function.prototype.apply.call(console.log, console, arguments);\n}\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\n\nfunction save(namespaces) {\n try {\n if (null == namespaces) {\n exports.storage.removeItem('debug');\n } else {\n exports.storage.debug = namespaces;\n }\n } catch(e) {}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\n\nfunction load() {\n var r;\n try {\n r = exports.storage.debug;\n } catch(e) {}\n\n // If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n if (!r && typeof process !== 'undefined' && 'env' in process) {\n r = process.env.DEBUG;\n }\n\n return r;\n}\n\n/**\n * Enable namespaces listed in `localStorage.debug` initially.\n */\n\nexports.enable(load());\n\n/**\n * Localstorage attempts to return the localstorage.\n *\n * This is necessary because safari throws\n * when a user disables cookies/localstorage\n * and you attempt to access it.\n *\n * @return {LocalStorage}\n * @api private\n */\n\nfunction localstorage() {\n try {\n return window.localStorage;\n } catch (e) {}\n}\n","'use strict';\n\nmodule.exports = function bind(fn, thisArg) {\n return function wrap() {\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n return fn.apply(thisArg, args);\n };\n};\n","/*!\n * Determine if an object is a Buffer\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n\n// The _isBuffer check is for Safari 5-7 support, because it's missing\n// Object.prototype.constructor. Remove this eventually\nmodule.exports = function (obj) {\n return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer)\n}\n\nfunction isBuffer (obj) {\n return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)\n}\n\n// For Node v0.10 support. Remove this eventually.\nfunction isSlowBuffer (obj) {\n return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0))\n}\n","'use strict';\n\nvar bind = require('./helpers/bind');\nvar isBuffer = require('is-buffer');\n\n/*global toString:true*/\n\n// utils is a library of generic helper functions non-specific to axios\n\nvar toString = Object.prototype.toString;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\nfunction isArray(val) {\n return toString.call(val) === '[object Array]';\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nfunction isArrayBuffer(val) {\n return toString.call(val) === '[object ArrayBuffer]';\n}\n\n/**\n * Determine if a value is a FormData\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction isFormData(val) {\n return (typeof FormData !== 'undefined') && (val instanceof FormData);\n}\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n var result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a String, otherwise false\n */\nfunction isString(val) {\n return typeof val === 'string';\n}\n\n/**\n * Determine if a value is a Number\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Number, otherwise false\n */\nfunction isNumber(val) {\n return typeof val === 'number';\n}\n\n/**\n * Determine if a value is undefined\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nfunction isUndefined(val) {\n return typeof val === 'undefined';\n}\n\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\nfunction isObject(val) {\n return val !== null && typeof val === 'object';\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\nfunction isDate(val) {\n return toString.call(val) === '[object Date]';\n}\n\n/**\n * Determine if a value is a File\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nfunction isFile(val) {\n return toString.call(val) === '[object File]';\n}\n\n/**\n * Determine if a value is a Blob\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nfunction isBlob(val) {\n return toString.call(val) === '[object Blob]';\n}\n\n/**\n * Determine if a value is a Function\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nfunction isFunction(val) {\n return toString.call(val) === '[object Function]';\n}\n\n/**\n * Determine if a value is a Stream\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nfunction isStream(val) {\n return isObject(val) && isFunction(val.pipe);\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nfunction isURLSearchParams(val) {\n return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;\n}\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\nfunction trim(str) {\n return str.replace(/^\\s*/, '').replace(/\\s*$/, '');\n}\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n */\nfunction isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {\n return false;\n }\n return (\n typeof window !== 'undefined' &&\n typeof document !== 'undefined'\n );\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object' && !isArray(obj)) {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (var i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n fn.call(null, obj[key], key, obj);\n }\n }\n }\n}\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n var result = {};\n function assignValue(val, key) {\n if (typeof result[key] === 'object' && typeof val === 'object') {\n result[key] = merge(result[key], val);\n } else {\n result[key] = val;\n }\n }\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n * @return {Object} The resulting value of object a\n */\nfunction extend(a, b, thisArg) {\n forEach(b, function assignValue(val, key) {\n if (thisArg && typeof val === 'function') {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n });\n return a;\n}\n\nmodule.exports = {\n isArray: isArray,\n isArrayBuffer: isArrayBuffer,\n isBuffer: isBuffer,\n isFormData: isFormData,\n isArrayBufferView: isArrayBufferView,\n isString: isString,\n isNumber: isNumber,\n isObject: isObject,\n isUndefined: isUndefined,\n isDate: isDate,\n isFile: isFile,\n isBlob: isBlob,\n isFunction: isFunction,\n isStream: isStream,\n isURLSearchParams: isURLSearchParams,\n isStandardBrowserEnv: isStandardBrowserEnv,\n forEach: forEach,\n merge: merge,\n extend: extend,\n trim: trim\n};\n","'use strict';\n\nvar utils = require('../utils');\n\nmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n utils.forEach(headers, function processHeader(value, name) {\n if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n headers[normalizedName] = value;\n delete headers[name];\n }\n });\n};\n","'use strict';\n\n/**\n * Update an Error with the specified config, error code, and response.\n *\n * @param {Error} error The error to update.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The error.\n */\nmodule.exports = function enhanceError(error, config, code, request, response) {\n error.config = config;\n if (code) {\n error.code = code;\n }\n error.request = request;\n error.response = response;\n return error;\n};\n","'use strict';\n\nvar enhanceError = require('./enhanceError');\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The created error.\n */\nmodule.exports = function createError(message, config, code, request, response) {\n var error = new Error(message);\n return enhanceError(error, config, code, request, response);\n};\n","'use strict';\n\nvar createError = require('./createError');\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n */\nmodule.exports = function settle(resolve, reject, response) {\n var validateStatus = response.config.validateStatus;\n // Note: status is not exposed by XDomainRequest\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(createError(\n 'Request failed with status code ' + response.status,\n response.config,\n null,\n response.request,\n response\n ));\n }\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%40/gi, '@').\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @returns {string} The formatted url\n */\nmodule.exports = function buildURL(url, params, paramsSerializer) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n\n var serializedParams;\n if (paramsSerializer) {\n serializedParams = paramsSerializer(params);\n } else if (utils.isURLSearchParams(params)) {\n serializedParams = params.toString();\n } else {\n var parts = [];\n\n utils.forEach(params, function serialize(val, key) {\n if (val === null || typeof val === 'undefined') {\n return;\n }\n\n if (utils.isArray(val)) {\n key = key + '[]';\n }\n\n if (!utils.isArray(val)) {\n val = [val];\n }\n\n utils.forEach(val, function parseValue(v) {\n if (utils.isDate(v)) {\n v = v.toISOString();\n } else if (utils.isObject(v)) {\n v = JSON.stringify(v);\n }\n parts.push(encode(key) + '=' + encode(v));\n });\n });\n\n serializedParams = parts.join('&');\n }\n\n if (serializedParams) {\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n var parsed = {};\n var key;\n var val;\n var i;\n\n if (!headers) { return parsed; }\n\n utils.forEach(headers.split('\\n'), function parser(line) {\n i = line.indexOf(':');\n key = utils.trim(line.substr(0, i)).toLowerCase();\n val = utils.trim(line.substr(i + 1));\n\n if (key) {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs have full support of the APIs needed to test\n // whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n var msie = /(msie|trident)/i.test(navigator.userAgent);\n var urlParsingNode = document.createElement('a');\n var originURL;\n\n /**\n * Parse a URL to discover it's components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n var href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })()\n);\n","'use strict';\n\n// btoa polyfill for IE<10 courtesy https://github.com/davidchambers/Base64.js\n\nvar chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n\nfunction E() {\n this.message = 'String contains an invalid character';\n}\nE.prototype = new Error;\nE.prototype.code = 5;\nE.prototype.name = 'InvalidCharacterError';\n\nfunction btoa(input) {\n var str = String(input);\n var output = '';\n for (\n // initialize result and counter\n var block, charCode, idx = 0, map = chars;\n // if the next str index does not exist:\n // change the mapping table to \"=\"\n // check if d has no fractional digits\n str.charAt(idx | 0) || (map = '=', idx % 1);\n // \"8 - idx % 1 * 8\" generates the sequence 2, 4, 6, 8\n output += map.charAt(63 & block >> 8 - idx % 1 * 8)\n ) {\n charCode = str.charCodeAt(idx += 3 / 4);\n if (charCode > 0xFF) {\n throw new E();\n }\n block = block << 8 | charCode;\n }\n return output;\n}\n\nmodule.exports = btoa;\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs support document.cookie\n (function standardBrowserEnv() {\n return {\n write: function write(name, value, expires, path, domain, secure) {\n var cookie = [];\n cookie.push(name + '=' + encodeURIComponent(value));\n\n if (utils.isNumber(expires)) {\n cookie.push('expires=' + new Date(expires).toGMTString());\n }\n\n if (utils.isString(path)) {\n cookie.push('path=' + path);\n }\n\n if (utils.isString(domain)) {\n cookie.push('domain=' + domain);\n }\n\n if (secure === true) {\n cookie.push('secure');\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read: function read(name) {\n var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove: function remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n };\n })() :\n\n // Non standard browser env (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return {\n write: function write() {},\n read: function read() { return null; },\n remove: function remove() {}\n };\n })()\n);\n","'use strict';\n\nvar utils = require('./../utils');\nvar settle = require('./../core/settle');\nvar buildURL = require('./../helpers/buildURL');\nvar parseHeaders = require('./../helpers/parseHeaders');\nvar isURLSameOrigin = require('./../helpers/isURLSameOrigin');\nvar createError = require('../core/createError');\nvar btoa = (typeof window !== 'undefined' && window.btoa && window.btoa.bind(window)) || require('./../helpers/btoa');\n\nmodule.exports = function xhrAdapter(config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n var requestData = config.data;\n var requestHeaders = config.headers;\n\n if (utils.isFormData(requestData)) {\n delete requestHeaders['Content-Type']; // Let the browser set it\n }\n\n var request = new XMLHttpRequest();\n var loadEvent = 'onreadystatechange';\n var xDomain = false;\n\n // For IE 8/9 CORS support\n // Only supports POST and GET calls and doesn't returns the response headers.\n // DON'T do this for testing b/c XMLHttpRequest is mocked, not XDomainRequest.\n if (process.env.NODE_ENV !== 'test' &&\n typeof window !== 'undefined' &&\n window.XDomainRequest && !('withCredentials' in request) &&\n !isURLSameOrigin(config.url)) {\n request = new window.XDomainRequest();\n loadEvent = 'onload';\n xDomain = true;\n request.onprogress = function handleProgress() {};\n request.ontimeout = function handleTimeout() {};\n }\n\n // HTTP basic authentication\n if (config.auth) {\n var username = config.auth.username || '';\n var password = config.auth.password || '';\n requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n }\n\n request.open(config.method.toUpperCase(), buildURL(config.url, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n // Listen for ready state\n request[loadEvent] = function handleLoad() {\n if (!request || (request.readyState !== 4 && !xDomain)) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n\n // Prepare the response\n var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;\n var response = {\n data: responseData,\n // IE sends 1223 instead of 204 (https://github.com/mzabriskie/axios/issues/201)\n status: request.status === 1223 ? 204 : request.status,\n statusText: request.status === 1223 ? 'No Content' : request.statusText,\n headers: responseHeaders,\n config: config,\n request: request\n };\n\n settle(resolve, reject, response);\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(createError('Network Error', config, null, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED',\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if (utils.isStandardBrowserEnv()) {\n var cookies = require('./../helpers/cookies');\n\n // Add xsrf header\n var xsrfValue = (config.withCredentials || isURLSameOrigin(config.url)) && config.xsrfCookieName ?\n cookies.read(config.xsrfCookieName) :\n undefined;\n\n if (xsrfValue) {\n requestHeaders[config.xsrfHeaderName] = xsrfValue;\n }\n }\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n // Remove Content-Type if data is undefined\n delete requestHeaders[key];\n } else {\n // Otherwise add header to the request\n request.setRequestHeader(key, val);\n }\n });\n }\n\n // Add withCredentials to request if needed\n if (config.withCredentials) {\n request.withCredentials = true;\n }\n\n // Add responseType to request if needed\n if (config.responseType) {\n try {\n request.responseType = config.responseType;\n } catch (e) {\n // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2.\n // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function.\n if (config.responseType !== 'json') {\n throw e;\n }\n }\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', config.onDownloadProgress);\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', config.onUploadProgress);\n }\n\n if (config.cancelToken) {\n // Handle cancellation\n config.cancelToken.promise.then(function onCanceled(cancel) {\n if (!request) {\n return;\n }\n\n request.abort();\n reject(cancel);\n // Clean up request\n request = null;\n });\n }\n\n if (requestData === undefined) {\n requestData = null;\n }\n\n // Send the request\n request.send(requestData);\n });\n};\n","'use strict';\n\nvar utils = require('./utils');\nvar normalizeHeaderName = require('./helpers/normalizeHeaderName');\n\nvar DEFAULT_CONTENT_TYPE = {\n 'Content-Type': 'application/x-www-form-urlencoded'\n};\n\nfunction setContentTypeIfUnset(headers, value) {\n if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n headers['Content-Type'] = value;\n }\n}\n\nfunction getDefaultAdapter() {\n var adapter;\n if (typeof XMLHttpRequest !== 'undefined') {\n // For browsers use XHR adapter\n adapter = require('./adapters/xhr');\n } else if (typeof process !== 'undefined') {\n // For node use HTTP adapter\n adapter = require('./adapters/http');\n }\n return adapter;\n}\n\nvar defaults = {\n adapter: getDefaultAdapter(),\n\n transformRequest: [function transformRequest(data, headers) {\n normalizeHeaderName(headers, 'Content-Type');\n if (utils.isFormData(data) ||\n utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n return data.toString();\n }\n if (utils.isObject(data)) {\n setContentTypeIfUnset(headers, 'application/json;charset=utf-8');\n return JSON.stringify(data);\n }\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n /*eslint no-param-reassign:0*/\n if (typeof data === 'string') {\n try {\n data = JSON.parse(data);\n } catch (e) { /* Ignore */ }\n }\n return data;\n }],\n\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n }\n};\n\ndefaults.headers = {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n }\n};\n\nutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n defaults.headers[method] = {};\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n});\n\nmodule.exports = defaults;\n","'use strict';\n\nvar utils = require('./../utils');\n\nfunction InterceptorManager() {\n this.handlers = [];\n}\n\n/**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\nInterceptorManager.prototype.use = function use(fulfilled, rejected) {\n this.handlers.push({\n fulfilled: fulfilled,\n rejected: rejected\n });\n return this.handlers.length - 1;\n};\n\n/**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n */\nInterceptorManager.prototype.eject = function eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n};\n\n/**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n */\nInterceptorManager.prototype.forEach = function forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n};\n\nmodule.exports = InterceptorManager;\n","'use strict';\n\nvar utils = require('./../utils');\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n /*eslint no-param-reassign:0*/\n utils.forEach(fns, function transform(fn) {\n data = fn(data, headers);\n });\n\n return data;\n};\n","'use strict';\n\nmodule.exports = function isCancel(value) {\n return !!(value && value.__CANCEL__);\n};\n","'use strict';\n\nvar utils = require('./../utils');\nvar transformData = require('./transformData');\nvar isCancel = require('../cancel/isCancel');\nvar defaults = require('../defaults');\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n * @returns {Promise} The Promise to be fulfilled\n */\nmodule.exports = function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n // Ensure headers exist\n config.headers = config.headers || {};\n\n // Transform request data\n config.data = transformData(\n config.data,\n config.headers,\n config.transformRequest\n );\n\n // Flatten headers\n config.headers = utils.merge(\n config.headers.common || {},\n config.headers[config.method] || {},\n config.headers || {}\n );\n\n utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n function cleanHeaderConfig(method) {\n delete config.headers[method];\n }\n );\n\n var adapter = config.adapter || defaults.adapter;\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData(\n response.data,\n response.headers,\n config.transformResponse\n );\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData(\n reason.response.data,\n reason.response.headers,\n config.transformResponse\n );\n }\n }\n\n return Promise.reject(reason);\n });\n};\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nmodule.exports = function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d\\+\\-\\.]*:)?\\/\\//i.test(url);\n};\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n * @returns {string} The combined URL\n */\nmodule.exports = function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n};\n","'use strict';\n\nvar defaults = require('./../defaults');\nvar utils = require('./../utils');\nvar InterceptorManager = require('./InterceptorManager');\nvar dispatchRequest = require('./dispatchRequest');\nvar isAbsoluteURL = require('./../helpers/isAbsoluteURL');\nvar combineURLs = require('./../helpers/combineURLs');\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n */\nfunction Axios(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n}\n\n/**\n * Dispatch a request\n *\n * @param {Object} config The config specific for this request (merged with this.defaults)\n */\nAxios.prototype.request = function request(config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof config === 'string') {\n config = utils.merge({\n url: arguments[0]\n }, arguments[1]);\n }\n\n config = utils.merge(defaults, this.defaults, { method: 'get' }, config);\n config.method = config.method.toLowerCase();\n\n // Support baseURL config\n if (config.baseURL && !isAbsoluteURL(config.url)) {\n config.url = combineURLs(config.baseURL, config.url);\n }\n\n // Hook up interceptors middleware\n var chain = [dispatchRequest, undefined];\n var promise = Promise.resolve(config);\n\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n chain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n chain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n while (chain.length) {\n promise = promise.then(chain.shift(), chain.shift());\n }\n\n return promise;\n};\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(utils.merge(config || {}, {\n method: method,\n url: url\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, data, config) {\n return this.request(utils.merge(config || {}, {\n method: method,\n url: url,\n data: data\n }));\n };\n});\n\nmodule.exports = Axios;\n","'use strict';\n\n/**\n * A `Cancel` is an object that is thrown when an operation is canceled.\n *\n * @class\n * @param {string=} message The message.\n */\nfunction Cancel(message) {\n this.message = message;\n}\n\nCancel.prototype.toString = function toString() {\n return 'Cancel' + (this.message ? ': ' + this.message : '');\n};\n\nCancel.prototype.__CANCEL__ = true;\n\nmodule.exports = Cancel;\n","'use strict';\n\nvar Cancel = require('./Cancel');\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @class\n * @param {Function} executor The executor function.\n */\nfunction CancelToken(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n var resolvePromise;\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n var token = this;\n executor(function cancel(message) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new Cancel(message);\n resolvePromise(token.reason);\n });\n}\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n};\n\n/**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\nCancelToken.source = function source() {\n var cancel;\n var token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token: token,\n cancel: cancel\n };\n};\n\nmodule.exports = CancelToken;\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n * @returns {Function}\n */\nmodule.exports = function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n};\n","'use strict';\n\nvar utils = require('./utils');\nvar bind = require('./helpers/bind');\nvar Axios = require('./core/Axios');\nvar defaults = require('./defaults');\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n * @return {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n var context = new Axios(defaultConfig);\n var instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context);\n\n // Copy context to instance\n utils.extend(instance, context);\n\n return instance;\n}\n\n// Create the default instance to be exported\nvar axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Factory for creating new instances\naxios.create = function create(instanceConfig) {\n return createInstance(utils.merge(defaults, instanceConfig));\n};\n\n// Expose Cancel & CancelToken\naxios.Cancel = require('./cancel/Cancel');\naxios.CancelToken = require('./cancel/CancelToken');\naxios.isCancel = require('./cancel/isCancel');\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\naxios.spread = require('./helpers/spread');\n\nmodule.exports = axios;\n\n// Allow use of default import syntax in TypeScript\nmodule.exports.default = axios;\n","module.exports = require('./lib/axios');","// most Object methods by ES6 should accept primitives\nvar $export = require('./_export');\nvar core = require('./_core');\nvar fails = require('./_fails');\nmodule.exports = function (KEY, exec) {\n var fn = (core.Object || {})[KEY] || Object[KEY];\n var exp = {};\n exp[KEY] = exec(fn);\n $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp);\n};\n","// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)\nvar toIObject = require('./_to-iobject');\nvar $getOwnPropertyDescriptor = require('./_object-gopd').f;\n\nrequire('./_object-sap')('getOwnPropertyDescriptor', function () {\n return function getOwnPropertyDescriptor(it, key) {\n return $getOwnPropertyDescriptor(toIObject(it), key);\n };\n});\n","require('../../modules/es6.object.get-own-property-descriptor');\nvar $Object = require('../../modules/_core').Object;\nmodule.exports = function getOwnPropertyDescriptor(it, key) {\n return $Object.getOwnPropertyDescriptor(it, key);\n};\n","module.exports = { \"default\": require(\"core-js/library/fn/object/get-own-property-descriptor\"), __esModule: true };","/*\n\n Javascript State Machine Library - https://github.com/jakesgordon/javascript-state-machine\n\n Copyright (c) 2012, 2013, 2014, 2015, Jake Gordon and contributors\n Released under the MIT license - https://github.com/jakesgordon/javascript-state-machine/blob/master/LICENSE\n\n*/\n\n(function () {\n\n var StateMachine = {\n\n //---------------------------------------------------------------------------\n\n VERSION: \"2.4.0\",\n\n //---------------------------------------------------------------------------\n\n Result: {\n SUCCEEDED: 1, // the event transitioned successfully from one state to another\n NOTRANSITION: 2, // the event was successfull but no state transition was necessary\n CANCELLED: 3, // the event was cancelled by the caller in a beforeEvent callback\n PENDING: 4 // the event is asynchronous and the caller is in control of when the transition occurs\n },\n\n Error: {\n INVALID_TRANSITION: 100, // caller tried to fire an event that was innapropriate in the current state\n PENDING_TRANSITION: 200, // caller tried to fire an event while an async transition was still pending\n INVALID_CALLBACK: 300 // caller provided callback function threw an exception\n },\n\n WILDCARD: '*',\n ASYNC: 'async',\n\n //---------------------------------------------------------------------------\n\n create: function(cfg, target) {\n\n var initial = (typeof cfg.initial == 'string') ? { state: cfg.initial } : cfg.initial; // allow for a simple string, or an object with { state: 'foo', event: 'setup', defer: true|false }\n var terminal = cfg.terminal || cfg['final'];\n var fsm = target || cfg.target || {};\n var events = cfg.events || [];\n var callbacks = cfg.callbacks || {};\n var map = {}; // track state transitions allowed for an event { event: { from: [ to ] } }\n var transitions = {}; // track events allowed from a state { state: [ event ] }\n\n var add = function(e) {\n var from = Array.isArray(e.from) ? e.from : (e.from ? [e.from] : [StateMachine.WILDCARD]); // allow 'wildcard' transition if 'from' is not specified\n map[e.name] = map[e.name] || {};\n for (var n = 0 ; n < from.length ; n++) {\n transitions[from[n]] = transitions[from[n]] || [];\n transitions[from[n]].push(e.name);\n\n map[e.name][from[n]] = e.to || from[n]; // allow no-op transition if 'to' is not specified\n }\n if (e.to)\n transitions[e.to] = transitions[e.to] || [];\n };\n\n if (initial) {\n initial.event = initial.event || 'startup';\n add({ name: initial.event, from: 'none', to: initial.state });\n }\n\n for(var n = 0 ; n < events.length ; n++)\n add(events[n]);\n\n for(var name in map) {\n if (map.hasOwnProperty(name))\n fsm[name] = StateMachine.buildEvent(name, map[name]);\n }\n\n for(var name in callbacks) {\n if (callbacks.hasOwnProperty(name))\n fsm[name] = callbacks[name]\n }\n\n fsm.current = 'none';\n fsm.is = function(state) { return Array.isArray(state) ? (state.indexOf(this.current) >= 0) : (this.current === state); };\n fsm.can = function(event) { return !this.transition && (map[event] !== undefined) && (map[event].hasOwnProperty(this.current) || map[event].hasOwnProperty(StateMachine.WILDCARD)); }\n fsm.cannot = function(event) { return !this.can(event); };\n fsm.transitions = function() { return (transitions[this.current] || []).concat(transitions[StateMachine.WILDCARD] || []); };\n fsm.isFinished = function() { return this.is(terminal); };\n fsm.error = cfg.error || function(name, from, to, args, error, msg, e) { throw e || msg; }; // default behavior when something unexpected happens is to throw an exception, but caller can override this behavior if desired (see github issue #3 and #17)\n fsm.states = function() { return Object.keys(transitions).sort() };\n\n if (initial && !initial.defer)\n fsm[initial.event]();\n\n return fsm;\n\n },\n\n //===========================================================================\n\n doCallback: function(fsm, func, name, from, to, args) {\n if (func) {\n try {\n return func.apply(fsm, [name, from, to].concat(args));\n }\n catch(e) {\n return fsm.error(name, from, to, args, StateMachine.Error.INVALID_CALLBACK, \"an exception occurred in a caller-provided callback function\", e);\n }\n }\n },\n\n beforeAnyEvent: function(fsm, name, from, to, args) { return StateMachine.doCallback(fsm, fsm['onbeforeevent'], name, from, to, args); },\n afterAnyEvent: function(fsm, name, from, to, args) { return StateMachine.doCallback(fsm, fsm['onafterevent'] || fsm['onevent'], name, from, to, args); },\n leaveAnyState: function(fsm, name, from, to, args) { return StateMachine.doCallback(fsm, fsm['onleavestate'], name, from, to, args); },\n enterAnyState: function(fsm, name, from, to, args) { return StateMachine.doCallback(fsm, fsm['onenterstate'] || fsm['onstate'], name, from, to, args); },\n changeState: function(fsm, name, from, to, args) { return StateMachine.doCallback(fsm, fsm['onchangestate'], name, from, to, args); },\n\n beforeThisEvent: function(fsm, name, from, to, args) { return StateMachine.doCallback(fsm, fsm['onbefore' + name], name, from, to, args); },\n afterThisEvent: function(fsm, name, from, to, args) { return StateMachine.doCallback(fsm, fsm['onafter' + name] || fsm['on' + name], name, from, to, args); },\n leaveThisState: function(fsm, name, from, to, args) { return StateMachine.doCallback(fsm, fsm['onleave' + from], name, from, to, args); },\n enterThisState: function(fsm, name, from, to, args) { return StateMachine.doCallback(fsm, fsm['onenter' + to] || fsm['on' + to], name, from, to, args); },\n\n beforeEvent: function(fsm, name, from, to, args) {\n if ((false === StateMachine.beforeThisEvent(fsm, name, from, to, args)) ||\n (false === StateMachine.beforeAnyEvent( fsm, name, from, to, args)))\n return false;\n },\n\n afterEvent: function(fsm, name, from, to, args) {\n StateMachine.afterThisEvent(fsm, name, from, to, args);\n StateMachine.afterAnyEvent( fsm, name, from, to, args);\n },\n\n leaveState: function(fsm, name, from, to, args) {\n var specific = StateMachine.leaveThisState(fsm, name, from, to, args),\n general = StateMachine.leaveAnyState( fsm, name, from, to, args);\n if ((false === specific) || (false === general))\n return false;\n else if ((StateMachine.ASYNC === specific) || (StateMachine.ASYNC === general))\n return StateMachine.ASYNC;\n },\n\n enterState: function(fsm, name, from, to, args) {\n StateMachine.enterThisState(fsm, name, from, to, args);\n StateMachine.enterAnyState( fsm, name, from, to, args);\n },\n\n //===========================================================================\n\n buildEvent: function(name, map) {\n return function() {\n\n var from = this.current;\n var to = map[from] || (map[StateMachine.WILDCARD] != StateMachine.WILDCARD ? map[StateMachine.WILDCARD] : from) || from;\n var args = Array.prototype.slice.call(arguments); // turn arguments into pure array\n\n if (this.transition)\n return this.error(name, from, to, args, StateMachine.Error.PENDING_TRANSITION, \"event \" + name + \" inappropriate because previous transition did not complete\");\n\n if (this.cannot(name))\n return this.error(name, from, to, args, StateMachine.Error.INVALID_TRANSITION, \"event \" + name + \" inappropriate in current state \" + this.current);\n\n if (false === StateMachine.beforeEvent(this, name, from, to, args))\n return StateMachine.Result.CANCELLED;\n\n if (from === to) {\n StateMachine.afterEvent(this, name, from, to, args);\n return StateMachine.Result.NOTRANSITION;\n }\n\n // prepare a transition method for use EITHER lower down, or by caller if they want an async transition (indicated by an ASYNC return value from leaveState)\n var fsm = this;\n this.transition = function() {\n fsm.transition = null; // this method should only ever be called once\n fsm.current = to;\n StateMachine.enterState( fsm, name, from, to, args);\n StateMachine.changeState(fsm, name, from, to, args);\n StateMachine.afterEvent( fsm, name, from, to, args);\n return StateMachine.Result.SUCCEEDED;\n };\n this.transition.cancel = function() { // provide a way for caller to cancel async transition if desired (issue #22)\n fsm.transition = null;\n StateMachine.afterEvent(fsm, name, from, to, args);\n }\n\n var leave = StateMachine.leaveState(this, name, from, to, args);\n if (false === leave) {\n this.transition = null;\n return StateMachine.Result.CANCELLED;\n }\n else if (StateMachine.ASYNC === leave) {\n return StateMachine.Result.PENDING;\n }\n else {\n if (this.transition) // need to check in case user manually called transition() but forgot to return StateMachine.ASYNC\n return this.transition();\n }\n\n };\n }\n\n }; // StateMachine\n\n //===========================================================================\n\n //======\n // NODE\n //======\n if (typeof exports !== 'undefined') {\n if (typeof module !== 'undefined' && module.exports) {\n exports = module.exports = StateMachine;\n }\n exports.StateMachine = StateMachine;\n }\n //============\n // AMD/REQUIRE\n //============\n else if (typeof define === 'function' && define.amd) {\n define(function(require) { return StateMachine; });\n }\n //========\n // BROWSER\n //========\n else if (typeof window !== 'undefined') {\n window.StateMachine = StateMachine;\n }\n //===========\n // WEB WORKER\n //===========\n else if (typeof self !== 'undefined') {\n self.StateMachine = StateMachine;\n }\n\n}());\n","\"use strict\";\n\nexports.__esModule = true;\n\nvar _assign = require(\"../core-js/object/assign\");\n\nvar _assign2 = _interopRequireDefault(_assign);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _assign2.default || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n};","'use strict';\nvar redefineAll = require('./_redefine-all');\nvar getWeak = require('./_meta').getWeak;\nvar anObject = require('./_an-object');\nvar isObject = require('./_is-object');\nvar anInstance = require('./_an-instance');\nvar forOf = require('./_for-of');\nvar createArrayMethod = require('./_array-methods');\nvar $has = require('./_has');\nvar validate = require('./_validate-collection');\nvar arrayFind = createArrayMethod(5);\nvar arrayFindIndex = createArrayMethod(6);\nvar id = 0;\n\n// fallback for uncaught frozen keys\nvar uncaughtFrozenStore = function (that) {\n return that._l || (that._l = new UncaughtFrozenStore());\n};\nvar UncaughtFrozenStore = function () {\n this.a = [];\n};\nvar findUncaughtFrozen = function (store, key) {\n return arrayFind(store.a, function (it) {\n return it[0] === key;\n });\n};\nUncaughtFrozenStore.prototype = {\n get: function (key) {\n var entry = findUncaughtFrozen(this, key);\n if (entry) return entry[1];\n },\n has: function (key) {\n return !!findUncaughtFrozen(this, key);\n },\n set: function (key, value) {\n var entry = findUncaughtFrozen(this, key);\n if (entry) entry[1] = value;\n else this.a.push([key, value]);\n },\n 'delete': function (key) {\n var index = arrayFindIndex(this.a, function (it) {\n return it[0] === key;\n });\n if (~index) this.a.splice(index, 1);\n return !!~index;\n }\n};\n\nmodule.exports = {\n getConstructor: function (wrapper, NAME, IS_MAP, ADDER) {\n var C = wrapper(function (that, iterable) {\n anInstance(that, C, NAME, '_i');\n that._t = NAME; // collection type\n that._i = id++; // collection id\n that._l = undefined; // leak store for uncaught frozen objects\n if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);\n });\n redefineAll(C.prototype, {\n // 23.3.3.2 WeakMap.prototype.delete(key)\n // 23.4.3.3 WeakSet.prototype.delete(value)\n 'delete': function (key) {\n if (!isObject(key)) return false;\n var data = getWeak(key);\n if (data === true) return uncaughtFrozenStore(validate(this, NAME))['delete'](key);\n return data && $has(data, this._i) && delete data[this._i];\n },\n // 23.3.3.4 WeakMap.prototype.has(key)\n // 23.4.3.4 WeakSet.prototype.has(value)\n has: function has(key) {\n if (!isObject(key)) return false;\n var data = getWeak(key);\n if (data === true) return uncaughtFrozenStore(validate(this, NAME)).has(key);\n return data && $has(data, this._i);\n }\n });\n return C;\n },\n def: function (that, key, value) {\n var data = getWeak(anObject(key), true);\n if (data === true) uncaughtFrozenStore(that).set(key, value);\n else data[that._i] = value;\n return that;\n },\n ufstore: uncaughtFrozenStore\n};\n","'use strict';\nvar each = require('./_array-methods')(0);\nvar redefine = require('./_redefine');\nvar meta = require('./_meta');\nvar assign = require('./_object-assign');\nvar weak = require('./_collection-weak');\nvar isObject = require('./_is-object');\nvar fails = require('./_fails');\nvar validate = require('./_validate-collection');\nvar WEAK_MAP = 'WeakMap';\nvar getWeak = meta.getWeak;\nvar isExtensible = Object.isExtensible;\nvar uncaughtFrozenStore = weak.ufstore;\nvar tmp = {};\nvar InternalMap;\n\nvar wrapper = function (get) {\n return function WeakMap() {\n return get(this, arguments.length > 0 ? arguments[0] : undefined);\n };\n};\n\nvar methods = {\n // 23.3.3.3 WeakMap.prototype.get(key)\n get: function get(key) {\n if (isObject(key)) {\n var data = getWeak(key);\n if (data === true) return uncaughtFrozenStore(validate(this, WEAK_MAP)).get(key);\n return data ? data[this._i] : undefined;\n }\n },\n // 23.3.3.5 WeakMap.prototype.set(key, value)\n set: function set(key, value) {\n return weak.def(validate(this, WEAK_MAP), key, value);\n }\n};\n\n// 23.3 WeakMap Objects\nvar $WeakMap = module.exports = require('./_collection')(WEAK_MAP, wrapper, methods, weak, true, true);\n\n// IE11 WeakMap frozen keys fix\nif (fails(function () { return new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7; })) {\n InternalMap = weak.getConstructor(wrapper, WEAK_MAP);\n assign(InternalMap.prototype, methods);\n meta.NEED = true;\n each(['delete', 'has', 'get', 'set'], function (key) {\n var proto = $WeakMap.prototype;\n var method = proto[key];\n redefine(proto, key, function (a, b) {\n // store frozen objects on internal weakmap shim\n if (isObject(a) && !isExtensible(a)) {\n if (!this._f) this._f = new InternalMap();\n var result = this._f[key](a, b);\n return key == 'set' ? this : result;\n // store all the rest on native weakmap\n } return method.call(this, a, b);\n });\n });\n}\n","// https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.of\nrequire('./_set-collection-of')('WeakMap');\n","// https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.from\nrequire('./_set-collection-from')('WeakMap');\n","require('../modules/es6.object.to-string');\nrequire('../modules/web.dom.iterable');\nrequire('../modules/es6.weak-map');\nrequire('../modules/es7.weak-map.of');\nrequire('../modules/es7.weak-map.from');\nmodule.exports = require('../modules/_core').WeakMap;\n","module.exports = { \"default\": require(\"core-js/library/fn/weak-map\"), __esModule: true };","// 19.1.2.14 Object.keys(O)\nvar toObject = require('./_to-object');\nvar $keys = require('./_object-keys');\n\nrequire('./_object-sap')('keys', function () {\n return function keys(it) {\n return $keys(toObject(it));\n };\n});\n","require('../../modules/es6.object.keys');\nmodule.exports = require('../../modules/_core').Object.keys;\n","module.exports = { \"default\": require(\"core-js/library/fn/object/keys\"), __esModule: true };","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseGetTag = require('./_baseGetTag'),\n getPrototype = require('./_getPrototype'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n}\n\nmodule.exports = isPlainObject;\n","/* eslint-disable */\nexport default typeof global !== 'undefined' ? global :\n typeof window !== 'undefined' ? window : {};\n","import d from 'debug';\n\nconst EXPIRED = Symbol('expired');\nconst debug = d('LC:Expirable');\nexport default class Expirable {\n constructor(value, ttl) {\n this._value = value;\n if (typeof ttl === 'number') {\n this.expiredAt = Date.now() + ttl;\n }\n }\n\n get value() {\n const expired = this.expiredAt && this.expiredAt < Date.now();\n if (expired) debug(`expired: ${this._value}`);\n return expired ? EXPIRED : this._value;\n }\n}\nExpirable.EXPIRED = EXPIRED;\n","import d from 'debug';\nimport Expirable from './expirable';\n\nconst debug = d('LC:Cache');\nexport default class Cache {\n constructor(name = 'anonymous') {\n this.name = name;\n this._map = {};\n }\n\n get(key) {\n const cache = this._map[key];\n if (cache) {\n const value = cache.value;\n if (value !== Expirable.EXPIRED) {\n debug('[%s] hit: %s %O', this.name, key, value);\n return value;\n }\n delete this._map[key];\n }\n debug(`[${this.name}] missed: ${key}`);\n return null;\n }\n\n set(key, value, ttl) {\n debug('[%s] set: %s %O %d', this.name, key, value, ttl);\n this._map[key] = new Expirable(value, ttl);\n }\n}\n","import isPlainObject from 'lodash/isPlainObject';\nimport global from './global';\n\nexport { global };\n\nexport const tryAll = (promiseConstructors) => {\n const promise = new Promise(promiseConstructors[0]);\n if (promiseConstructors.length === 1) {\n return promise;\n }\n return promise.catch(() => tryAll(promiseConstructors.slice(1)));\n};\n\nexport const tap = interceptor => value => ((interceptor(value), value));\n\nexport { default as Expirable } from './expirable';\nexport { default as Cache } from './cache';\n\nexport const decodeDate = (date) => {\n if (!date) return date;\n if (typeof date === 'string') {\n return new Date(date);\n }\n if (date.__type === 'Date' && date.iso) {\n return new Date(date.iso);\n }\n // Long\n if (typeof date.toNumber === 'function') {\n return new Date(date.toNumber());\n }\n return date;\n};\n\nexport const keyRemap = (keymap, obj) =>\n Object.keys(obj).reduce((newObj, key) => {\n const newKey = keymap[key] || key;\n return Object.assign(newObj, {\n [newKey]: obj[key],\n });\n }, {});\n\nexport const isIE10 = (\n global.navigator &&\n global.navigator.userAgent &&\n global.navigator.userAgent.indexOf('MSIE 10.') !== -1\n);\n\n/* eslint-disable no-proto */\nexport const getStaticProperty = (klass, property) =>\n (klass[property] || (klass.__proto__ ? getStaticProperty(klass.__proto__, property) : undefined));\n/* eslint-enable no-proto */\n\nexport const union = (a, b) => Array.from(new Set([...a, ...b]));\nexport const difference = (a, b) => Array.from(\n (bSet => new Set(a.filter(x => !bSet.has(x))))(new Set(b))\n);\n\nconst map = new WeakMap();\n\n// protected property helper\nexport const internal = (object) => {\n if (!map.has(object)) {\n map.set(object, {});\n }\n return map.get(object);\n};\n\n// debug utility\nconst removeNull = (obj) => {\n if (!isPlainObject(obj)) return obj;\n const object = Object.assign({}, obj);\n // eslint-disable-next-line no-restricted-syntax\n for (const prop in object) {\n if ({}.hasOwnProperty.call(object, prop)) {\n const value = object[prop];\n if (value === null) {\n delete object[prop];\n } else {\n object[prop] = removeNull(value);\n }\n }\n }\n return object;\n};\nexport const trim = message => removeNull(JSON.parse(JSON.stringify(message)));\n\nexport const ensureArray = (target) => {\n if (Array.isArray(target)) {\n return target;\n }\n if (target === undefined || target === null) {\n return [];\n }\n return [target];\n};\n\nexport const setValue = (target, key, value) => {\n // '.' is not allowed in Class keys, escaping is not in concern now.\n const segs = key.split('.');\n const lastSeg = segs.pop();\n let currentTarget = target;\n segs.forEach((seg) => {\n if (currentTarget[seg] === undefined) currentTarget[seg] = {};\n currentTarget = currentTarget[seg];\n });\n currentTarget[lastSeg] = value;\n return target;\n};\n\n// eslint-disable-next-line no-undef\nexport const isWeapp = typeof wx === 'object' && typeof wx.connectSocket === 'function';\n\n// throttle decorator\nexport const throttle = wait => (target, property, descriptor) => {\n const callback = descriptor.value;\n // very naive, internal use only\n if (callback.length) {\n throw new Error('throttled function should not accept any arguments');\n }\n return {\n ...descriptor,\n value() {\n let {\n throttleMeta,\n } = internal(this);\n if (!throttleMeta) throttleMeta = internal(this).throttleMeta = {};\n let {\n [property]: propertyMeta,\n } = throttleMeta;\n if (!propertyMeta) propertyMeta = throttleMeta[property] = {};\n const {\n previouseTimestamp = 0,\n timeout,\n } = propertyMeta;\n const now = Date.now();\n const remainingTime = wait - (now - previouseTimestamp);\n if (remainingTime <= 0) {\n throttleMeta[property].previouseTimestamp = now;\n callback.apply(this);\n } else if (!timeout) {\n propertyMeta.timeout = setTimeout(() => {\n propertyMeta.previouseTimestamp = Date.now();\n delete propertyMeta.timeout;\n callback.apply(this);\n }, remainingTime);\n }\n },\n };\n};\n","import { global } from '../utils';\n\nconst WebSocket = global.WebSocket || global.MozWebSocket;\nexport default WebSocket;\n","// WebSocket with auto reconnecting feature, backup endpoint and EventEmitter interface.\n\nimport d from 'debug';\nimport EventEmitter from 'eventemitter3';\nimport StateMachine from 'javascript-state-machine';\n\nimport WebSocket from 'ws';\n\nimport { tryAll, global } from './utils';\n\nconst debug = d('LC:WebSocketPlus');\n\nconst HEARTBEAT_TIME = 180000;\nconst TIMEOUT_TIME = 380000;\n\nconst DEFAULT_RETRY_STRATEGY = attempt => Math.min(1000 * Math.pow(2, attempt), 300000);\n\nconst requireConnected = (target, name, descriptor) =>\n Object.assign({}, descriptor, {\n value: function requireConnectedWrapper(...args) {\n if (!this.is('connected')) {\n const currentState = this.current;\n console.warn(`${name} should not be called when the connection is ${currentState}`);\n if (this.is('disconnected') || this.is('reconnecting')) {\n console.warn('disconnect and reconnect event should be handled to avoid such calls.');\n }\n throw new Error('Connection unavailable');\n }\n return descriptor.value.call(this, ...args);\n },\n });\n\nclass WebSocketPlus extends EventEmitter {\n constructor(getUrls, protocol) {\n if (typeof WebSocket === 'undefined') {\n throw new Error('WebSocket is undefined. Polyfill is required in this runtime.');\n }\n super();\n if (typeof getUrls !== 'function') {\n this._getUrls = () => Promise.resolve(getUrls);\n } else {\n this._getUrls = getUrls;\n }\n this._protocol = protocol;\n this.init();\n this._createWs(this._getUrls, this._protocol).then(\n () => {\n this.__postponeTimeoutTimer = this._postponeTimeoutTimer.bind(this);\n if (global.addEventListener) {\n this.__pause = () => this.pause();\n this.__resume = () => this.resume();\n global.addEventListener('offline', this.__pause);\n global.addEventListener('online', this.__resume);\n }\n this.open();\n }\n ).catch(this.throw.bind(this));\n }\n\n _createWs(getUrls, protocol) {\n return getUrls().then((wsUrls) => {\n let urls = wsUrls;\n if (!(urls instanceof Array)) {\n urls = [urls];\n }\n return tryAll(\n urls.map(url => (resolve, reject) => {\n debug(`connect [${url}] ${protocol}`);\n const ws = protocol ? new WebSocket(\n url, protocol\n ) : new WebSocket(url);\n ws.binaryType = this.binaryType || 'arraybuffer';\n ws.onopen = () => resolve(ws);\n ws.onerror = ws.onclose = (error) => {\n if (error instanceof Error) {\n return reject(error);\n }\n // in browser, error event is useless\n return reject(new Error(`Failed to connect [${url}]`));\n };\n })\n ).then((ws) => {\n this._ws = ws;\n this._ws.onclose = this._handleClose.bind(this);\n this._ws.onmessage = this._handleMessage.bind(this);\n return ws;\n });\n });\n }\n _destroyWs() {\n const ws = this._ws;\n if (!ws) return;\n ws.onopen = ws.onclose = ws.onerror = ws.onmessage = null;\n this._ws = null;\n ws.close();\n }\n\n // eslint-disable-next-line class-methods-use-this\n onbeforeevent(event, from, to, ...payload) {\n debug(`${event}: ${from} -> ${to}`, ...payload);\n }\n onopen() {\n this.emit('open');\n }\n onconnected() {\n this._startConnectionKeeper();\n }\n onleaveconnected(event, from, to) {\n this._stopConnectionKeeper();\n this._destroyWs();\n if (to === 'offline' || to === 'disconnected') {\n this.emit('disconnect');\n }\n }\n onpause() {\n this.emit('offline');\n }\n onbeforeresume() {\n this.emit('online');\n }\n onreconnect() {\n this.emit('reconnect');\n }\n ondisconnected(event, from, to, attempt = 0) {\n const delay = DEFAULT_RETRY_STRATEGY.call(null, attempt);\n debug(`schedule attempt=${attempt} delay=${delay}`);\n this.emit('schedule', attempt, delay);\n if (this.__scheduledRetry) {\n clearTimeout(this.__scheduledRetry);\n }\n this.__scheduledRetry = setTimeout(() => {\n if (this.is('disconnected')) {\n this.retry(attempt);\n }\n }, delay);\n }\n onretry(event, from, to, attempt = 0) {\n this.emit('retry', attempt);\n this._createWs(this._getUrls, this._protocol).then(\n () => (this.can('reconnect') ? this.reconnect() : this._destroyWs()),\n () => this.can('fail') && this.fail(attempt + 1)\n );\n }\n onerror(event, from, to, error) {\n this.emit('error', error);\n }\n onclose() {\n if (global.removeEventListener) {\n if (this.__pause) global.removeEventListener('offline', this.__pause);\n if (this.__resume) global.removeEventListener('online', this.__resume);\n }\n }\n\n // jsdoc-ignore-start\n @requireConnected\n // jsdoc-ignore-end\n _ping() {\n debug('ping');\n try {\n this.ping();\n } catch (error) {\n console.warn(`websocket ping error: ${error.message}`);\n }\n }\n ping() {\n if (this._ws.ping) {\n this._ws.ping();\n } else {\n console.warn(`The WebSocket implement does not support sending ping frame.\n Override ping method to use application defined ping/pong mechanism.`);\n }\n }\n\n _postponeTimeoutTimer() {\n debug('_postponeTimeoutTimer');\n this._clearTimeoutTimers();\n this._timeoutTimer = setTimeout(() => {\n debug('timeout');\n this.disconnect();\n }, TIMEOUT_TIME);\n }\n _clearTimeoutTimers() {\n if (this._timeoutTimer) {\n clearTimeout(this._timeoutTimer);\n }\n }\n _startConnectionKeeper() {\n debug('start connection keeper');\n this._heartbeatTimer = setInterval(this._ping.bind(this), HEARTBEAT_TIME);\n const addListener = this._ws.addListener || this._ws.addEventListener;\n addListener.call(this._ws, 'message', this.__postponeTimeoutTimer);\n addListener.call(this._ws, 'pong', this.__postponeTimeoutTimer);\n this._postponeTimeoutTimer();\n }\n _stopConnectionKeeper() {\n debug('stop connection keeper');\n // websockets/ws#489\n const removeListener = this._ws.removeListener || this._ws.removeEventListener;\n removeListener.call(this._ws, 'message', this.__postponeTimeoutTimer);\n removeListener.call(this._ws, 'pong', this.__postponeTimeoutTimer);\n this._clearTimeoutTimers();\n if (this._heartbeatTimer) {\n clearInterval(this._heartbeatTimer);\n }\n }\n\n _handleClose(event) {\n debug(`ws closed [${event.code}] ${event.reason}`);\n // socket closed manually, ignore close event.\n if (this.isFinished()) return;\n this.handleClose(event);\n }\n handleClose() {\n // reconnect\n this.disconnect();\n }\n\n // jsdoc-ignore-start\n @requireConnected\n // jsdoc-ignore-end\n send(data) {\n debug('send', data);\n this._ws.send(data);\n }\n\n _handleMessage(event) {\n debug('message', event.data);\n this.handleMessage(event.data);\n }\n handleMessage(message) {\n this.emit('message', message);\n }\n}\n\nStateMachine.create({\n target: WebSocketPlus.prototype,\n initial: {\n state: 'initialized',\n event: 'init',\n defer: true,\n },\n terminal: 'closed',\n events: [{\n name: 'open',\n from: 'initialized',\n to: 'connected',\n }, {\n name: 'disconnect',\n from: 'connected',\n to: 'disconnected',\n }, {\n name: 'retry',\n from: 'disconnected',\n to: 'reconnecting',\n }, {\n name: 'fail',\n from: 'reconnecting',\n to: 'disconnected',\n }, {\n name: 'reconnect',\n from: 'reconnecting',\n to: 'connected',\n }, {\n name: 'pause',\n from: ['connected', 'disconnected', 'reconnecting'],\n to: 'offline',\n }, {\n }, {\n name: 'resume',\n from: 'offline',\n to: 'disconnected',\n }, {\n name: 'close',\n from: ['connected', 'disconnected', 'reconnecting', 'offline'],\n to: 'closed',\n }, {\n name: 'throw',\n from: '*',\n to: 'error',\n }],\n});\n\nexport default WebSocketPlus;\n","// 19.1.2.5 Object.freeze(O)\nvar isObject = require('./_is-object');\nvar meta = require('./_meta').onFreeze;\n\nrequire('./_object-sap')('freeze', function ($freeze) {\n return function freeze(it) {\n return $freeze && isObject(it) ? $freeze(meta(it)) : it;\n };\n});\n","require('../../modules/es6.object.freeze');\nmodule.exports = require('../../modules/_core').Object.freeze;\n","module.exports = { \"default\": require(\"core-js/library/fn/object/freeze\"), __esModule: true };","export const error = Object.freeze({\n 1000: {\n name: 'CLOSE_NORMAL',\n },\n 1006: {\n name: 'CLOSE_ABNORMAL',\n },\n 4100: {\n name: 'APP_NOT_AVAILABLE',\n message: 'App not exists or realtime message service is disabled.',\n },\n 4103: {\n name: 'INVALID_LOGIN',\n message: 'Malformed clientId.',\n },\n 4105: {\n name: 'SESSION_REQUIRED',\n message: 'Message sent before session opened. ',\n },\n 4107: {\n name: 'READ_TIMEOUT',\n },\n 4108: {\n name: 'LOGIN_TIMEOUT',\n },\n 4109: {\n name: 'FRAME_TOO_LONG',\n },\n 4110: {\n name: 'INVALID_ORIGIN',\n message: 'Access denied by domain whitelist.',\n },\n 4111: {\n name: 'SESSION_CONFLICT',\n },\n 4112: {\n name: 'SESSION_TOKEN_EXPIRED',\n },\n 4200: {\n name: 'INTERNAL_ERROR',\n message: 'Internal error, please contact LeanCloud for support.',\n },\n 4201: {\n name: 'SEND_MESSAGE_TIMEOUT',\n },\n 4302: {\n name: 'CONVERSATION_SIGNATURE_FAILED',\n },\n 4303: {\n name: 'CONVERSATION_NOT_FOUND',\n },\n 4304: {\n name: 'CONVERSATION_FULL',\n },\n 4305: {\n name: 'CONVERSATION_REJECTED_BY_APP',\n },\n 4306: {\n name: 'CONVERSATION_UPDATE_FAILED',\n },\n 4307: {\n name: 'CONVERSATION_READ_ONLY',\n },\n 4308: {\n name: 'CONVERSATION_NOT_ALLOWED',\n },\n 4401: {\n name: 'INVALID_MESSAGING_TARGET',\n },\n 4402: {\n name: 'MESSAGE_REJECTED_BY_APP',\n },\n});\n\nexport const ErrorCode = Object.freeze(\n Object.keys(error).reduce((result, code) => Object.assign(result, {\n [error[code].name]: Number(code),\n }), {})\n);\n\nexport const createError = (errorMessage) => {\n const {\n code, reason, appCode, detail,\n } = errorMessage;\n let message = reason || detail;\n if (!message && error[code]) {\n message = error[code].message || error[code].name;\n }\n if (!message) {\n message = `Unknow Error: ${code}`;\n }\n const err = new Error(message);\n return Object.assign(err, {\n code, appCode, detail,\n });\n};\n","import d from 'debug';\nimport WebSocketPlus from './websocket-plus';\nimport { createError } from './error';\nimport { GenericCommand, CommandType } from '../proto/message';\nimport { trim, isWeapp } from './utils';\n\nconst debug = d('LC:Connection');\n\nconst COMMAND_TIMEOUT = 20000;\n\nexport default class Connection extends WebSocketPlus {\n constructor(getUrl, { format, version }) {\n debug('initializing Connection');\n const protocolString = `lc.${format}.${version}`;\n if (!isWeapp) {\n super(getUrl, protocolString);\n } else {\n super(getUrl().then(urls => urls.map(url =>\n `${url}${url.indexOf('?') === -1 ? '?' : '&'}subprotocol=${encodeURIComponent(protocolString)}`\n )));\n }\n this._protocalFormat = format;\n this._commands = {};\n this._serialId = 0;\n }\n\n send(command, waitingForRespond = true) {\n let serialId;\n if (waitingForRespond) {\n this._serialId += 1;\n serialId = this._serialId;\n command.i = serialId; // eslint-disable-line no-param-reassign\n }\n debug('↑ %O sent', trim(command));\n\n let message;\n if (this._protocalFormat === 'proto2base64') {\n message = command.toBase64();\n } else if (command.toArrayBuffer) {\n message = command.toArrayBuffer();\n }\n if (!message) {\n throw new TypeError(`${command} is not a GenericCommand`);\n }\n\n super.send(message);\n\n if (!waitingForRespond) {\n return Promise.resolve();\n }\n return new Promise((resolve, reject) => {\n this._commands[serialId] = {\n resolve,\n reject,\n };\n setTimeout(\n () => {\n if (this._commands[serialId]) {\n debug('✗ %O timeout', trim(command));\n reject(new Error('Command Timeout.'));\n delete this._commands[serialId];\n }\n },\n COMMAND_TIMEOUT\n );\n });\n }\n\n handleMessage(msg) {\n let message;\n try {\n message = GenericCommand.decode(msg);\n debug('↓ %O received', trim(message));\n } catch (e) {\n console.warn('Decode message failed', msg);\n }\n this.emit('allmessage', message);\n const serialId = message.i;\n if (serialId) {\n if (this._commands[serialId]) {\n if (message.cmd === CommandType.error) {\n this\n ._commands[serialId]\n .reject(createError(message.errorMessage));\n } else {\n this\n ._commands[serialId]\n .resolve(message);\n }\n delete this._commands[serialId];\n } else {\n console.warn(`Unexpected command received with serialId [${serialId}],\n which have timed out or never been requested.`);\n }\n } else if (message.cmd === CommandType.error) {\n this.emit('error', createError(message.errorMessage));\n } else {\n this.emit('message', message);\n }\n }\n\n ping() {\n return this.send(new GenericCommand({\n cmd: CommandType.echo,\n })).catch(error => debug('ping failed:', error));\n }\n}\n","/* eslint-disable max-len */\n\n/**\n * 插件接口\n *\n *

\n * 插件是由一个或多个扩展点组成的字典。SDK 的扩展点可以分为两类:\n *

\n * 第一类扩展点是类实例化之后的回调,包括 RealtimeIMClientConversation。这些扩展点可以通过一个同步的 Decorator 进行扩展。Decorator 接受一个对应的实例并对其进行一些操作。\n * 特别的,由于注册自定义消息类这个需求特别的常用,额外定义一个 messageClasses 扩展点来做这件事情。\n *

\n * 第二类扩展点是在某些事件处理前、后可以注入逻辑的点。\n * 其中 beforeMessageParseafterMessageParse 可以通过一个异步的 Middleware 进行扩展。Middleware 接受一个对象,返回一个同类型对象或同类型对象的 Promise。\n * beforeMessageDispatch 可以通过返回一个 boolean 类型的 shouldDispatch 值来控制是否要继续派发收到的消息。\n *

\n * 如果使用了多个插件,这些 hook 会按照插件数组的顺序依次执行。前一个 Middleware 的返回值会作为参数传给后一个 Middleware。\n *\n * @interface Plugin\n * @since 3.1.0\n */\n\n/* eslint-enable max-len */\n\n/**\n * 插件名称,用于在日志中显示异常的插件\n *\n * @name Plugin.name\n * @type string\n */\n\n/**\n * 插件注册的消息类型\n *\n * @name Plugin.messageClasses\n * @type AVMessage[]\n */\n\n/**\n * 在 Realtime 实例化后对其进行修饰。\n *

\n * 接受一个参数为 Realtime 实例。\n *\n * @name Plugin.onRealtimeCreate\n * @type Function\n */\n\n/**\n * 在 IMClient 实例化后对其进行修饰。\n *

\n * 接受一个参数为 IMClient 实例。\n *\n * @name Plugin.onIMClientCreate\n * @type Function\n */\n\n/**\n * 在 Conversation 实例化后对其进行修饰。\n *

\n * 接受一个参数为 Conversation 实例。\n * 需要注意的是,该扩展点并不是在 {@link IMClient#createConversation} 方法创建成功后调用的 hook,\n * 而是所有的 Conversation 实例化的时候(包括但不限于 query 时)调用的 hook。\n *\n * @name Plugin.onConversationCreate\n * @type Function\n */\n\n/**\n * 在对消息进行 parse 之前,对原始消息进行修改。\n *

\n * 接受一个参数为原始消息,是某个消息 JSON 化(message.toJSON())的返回值,一般是一个 JSON 对象。\n * 该方法需要返回一个 JSON 对象。如果这个结果是异步得到的,也可以返回一个 Promise(fulfilled with a JSON)。\n *\n * @name Plugin.beforeMessageParse\n * @type Function\n */\n\n/**\n * 在对消息进行 parse 之后,对消息实例进行修改。\n *

\n * 接受一个参数为消息实例,一般是一个已注册的 Message 类或其子类的实例。\n * 该方法需要返回一个同类型的消息实例。如果这个结果是异步得到的,也可以返回一个 Promise。\n *\n * @name Plugin.afterMessageParse\n * @type Function\n */\n\n/**\n * 在收到消息之后,派发消息之前,控制是否派发这条消息。\n *

\n * 接受参数为 message 与 conversation。\n * 该方法需要返回 boolean 类型的值,如果返回 false 则 SDK 不再派发这条消息,后续的 beforeMessageDispatch 也不会执行。\n * 如果这个结果是异步得到的,也可以返回一个 Promise。\n *\n * @name Plugin.beforeMessageDispatch\n * @type Function\n * @since 3.4.0\n */\n\nimport { ensureArray, tap } from './utils';\n\nconst checkType = middleware => (param) => {\n const { constructor } = param;\n return Promise.resolve(param).then(middleware).then(tap((result) => {\n if (result === undefined || result === null) {\n // eslint-disable-next-line max-len\n return console.warn(`Middleware[${middleware._pluginName || 'anonymous plugin'}:${middleware.name || 'anonymous middleware'}] param/return types not match. It returns ${result} while a ${param.constructor.name} expected.`);\n }\n if (!(result instanceof constructor)) {\n // eslint-disable-next-line max-len\n return console.warn(`Middleware[${middleware._pluginName || 'anonymous plugin'}:${middleware.name || 'anonymous middleware'}] param/return types not match. It returns a ${result.constructor.name} while a ${param.constructor.name} expected.`);\n }\n return 0;\n }));\n};\n\nexport const applyDecorators = (decorators, target) => {\n if (decorators) {\n decorators.forEach((decorator) => {\n try {\n decorator(target);\n } catch (error) {\n if (decorator._pluginName) {\n error.message += `[${decorator._pluginName}]`;\n }\n throw error;\n }\n });\n }\n};\n\nexport const applyMiddlewares = middlewares => target =>\n ensureArray(middlewares).reduce(\n (previousPromise, middleware) => previousPromise\n .then(checkType(middleware))\n .catch((error) => {\n if (middleware._pluginName) {\n // eslint-disable-next-line no-param-reassign\n error.message += `[${middleware._pluginName}]`;\n }\n throw error;\n }),\n Promise.resolve(target)\n );\n\nexport const applyDispatcher = (dispatchers, payload) =>\n ensureArray(dispatchers).reduce(\n (resultPromise, dispatcher) => resultPromise.then(shouldDispatch =>\n (shouldDispatch === false ? false : dispatcher(...payload))\n ).catch((error) => {\n if (dispatcher._pluginName) {\n // eslint-disable-next-line no-param-reassign\n error.message += `[${dispatcher._pluginName}]`;\n }\n throw error;\n }), Promise.resolve(true)\n );\n","import d from 'debug';\nimport EventEmitter from 'eventemitter3';\nimport axios from 'axios';\nimport Connection from './connection';\nimport { ErrorCode, createError } from './error';\nimport { tap, Cache, trim, internal, ensureArray, isWeapp } from './utils';\nimport { applyDecorators, applyDispatcher } from './plugin';\n\nconst debug = d('LC:Realtime');\n\nconst pushRouterCache = new Cache('push-router');\n\nexport default class Realtime extends EventEmitter {\n /**\n * @extends EventEmitter\n * @param {Object} options\n * @param {String} options.appId\n * @param {String} [options.region='cn'] 节点 id\n * @param {Boolean} [options.pushOfflineMessages=false] 启用推送离线消息模式(默认为发送未读消息通知模式)\n * @param {Boolean} [options.noBinary=false] 设置 WebSocket 使用字符串格式收发消息(默认为二进制格式)。\n * 适用于 WebSocket 实现不支持二进制数据格式的情况(如 React Native)\n * @param {Boolean} [options.ssl=true] 使用 wss 进行连接\n * @param {Plugin[]} [options.plugins] 加载插件(since 3.1.0)\n */\n constructor(options) {\n debug('initializing Realtime');\n super();\n if (typeof options.appId !== 'string') {\n throw new TypeError(`appId [${options.appId}] is not a string`);\n }\n this._options = Object.assign({\n appId: undefined,\n region: 'cn',\n pushOfflineMessages: false,\n noBinary: isWeapp,\n ssl: true,\n server: process.env.SERVER,\n }, options);\n this._cache = new Cache('endpoints');\n internal(this).clients = new Set();\n this._plugins = [\n ...ensureArray(Realtime.__preRegisteredPlugins),\n ...ensureArray(options.plugins),\n ].reduce(\n (result, plugin) => {\n // eslint-disable-next-line no-restricted-syntax\n for (const hook in plugin) {\n if ({}.hasOwnProperty.call(plugin, hook) && hook !== 'name') {\n if (plugin.name) {\n ensureArray(plugin[hook]).forEach((value) => {\n // eslint-disable-next-line no-param-reassign\n value._pluginName = plugin.name;\n });\n }\n // eslint-disable-next-line no-param-reassign\n result[hook] = ensureArray(result[hook]).concat(plugin[hook]);\n }\n }\n return result;\n },\n {}\n );\n // onRealtimeCreate hook\n applyDecorators(this._plugins.onRealtimeCreate, this);\n }\n\n _open() {\n if (this._openPromise) return this._openPromise;\n\n let format = 'protobuf2';\n if (this._options.noBinary) {\n // 不发送 binary data,fallback to base64 string\n format = 'proto2base64';\n }\n let version = 3;\n if (this._options.pushOfflineMessages) {\n // 不推送离线消息,而是发送对话的未读通知\n version = 1;\n }\n const protocol = {\n format,\n version,\n };\n this._openPromise = new Promise((resolve, reject) => {\n debug('No connection established, create a new one.');\n const connection = new Connection(\n () => this._getEndpoints(this._options),\n protocol\n );\n connection.on('open', () => resolve(connection));\n connection.on('error', reject);\n connection.on('message', this._dispatchCommand.bind(this));\n /**\n * 连接断开。\n * 连接断开可能是因为 SDK 进入了离线状态(see {@link Realtime#event:offline}),或长时间没有收到服务器心跳。\n * 连接断开后所有的网络操作都会失败,请在连接断开后禁用相关的 UI 元素。\n * @event Realtime#disconnect\n */\n /**\n * 计划在一段时间后尝试重新连接\n * @event Realtime#schedule\n * @param {Number} attempt 尝试重连的次数\n * @param {Number} delay 延迟的毫秒数\n */\n /**\n * 正在尝试重新连接\n * @event Realtime#retry\n * @param {Number} attempt 尝试重连的次数\n */\n /**\n * 连接恢复正常。\n * 请重新启用在 {@link Realtime#event:disconnect} 事件中禁用的相关 UI 元素\n * @event Realtime#reconnect\n */\n\n /**\n * 客户端连接断开\n * @event IMClient#disconnect\n * @see Realtime#event:disconnect\n * @since 3.2.0\n */\n /**\n * 计划在一段时间后尝试重新连接\n * @event IMClient#schedule\n * @param {Number} attempt 尝试重连的次数\n * @param {Number} delay 延迟的毫秒数\n * @since 3.2.0\n */\n /**\n * 正在尝试重新连接\n * @event IMClient#retry\n * @param {Number} attempt 尝试重连的次数\n * @since 3.2.0\n */\n\n /**\n * 客户端进入离线状态。\n * 这通常意味着网络已断开,或者 {@link Realtime#pause} 被调用\n * @event Realtime#offline\n * @since 3.4.0\n */\n /**\n * 客户端恢复在线状态\n * 这通常意味着网络已恢复,或者 {@link Realtime#resume} 被调用\n * @event Realtime#online\n * @since 3.4.0\n */\n /**\n * 进入离线状态。\n * 这通常意味着网络已断开,或者 {@link Realtime#pause} 被调用\n * @event IMClient#offline\n * @since 3.4.0\n */\n /**\n * 恢复在线状态\n * 这通常意味着网络已恢复,或者 {@link Realtime#resume} 被调用\n * @event IMClient#online\n * @since 3.4.0\n */\n\n // event proxy\n ['disconnect', 'reconnect', 'retry', 'schedule', 'offline', 'online'].forEach(\n event => connection.on(event, (...payload) => {\n debug(`${event} event emitted. %O`, payload);\n this.emit(event, ...payload);\n if (event !== 'reconnect') {\n internal(this).clients.forEach((client) => {\n client.emit(event, ...payload);\n });\n }\n })\n );\n // override handleClose\n connection.handleClose = function handleClose(event) {\n const isFatal = [\n ErrorCode.APP_NOT_AVAILABLE,\n ErrorCode.INVALID_LOGIN,\n ErrorCode.INVALID_ORIGIN,\n ].some(errorCode => errorCode === event.code);\n if (isFatal) {\n // in these cases, SDK should throw.\n this.throw(createError(event));\n } else {\n // reconnect\n this.disconnect();\n }\n };\n internal(this).connection = connection;\n }).catch((error) => {\n delete this._openPromise;\n throw error;\n });\n\n return this._openPromise;\n }\n\n _getEndpoints(options) {\n return Promise.resolve(\n this._cache.get('endpoints') ||\n this\n .constructor\n ._fetchEndpointsInfo(options)\n .then(\n tap(info => this._cache.set('endpoints', info, info.ttl * 1000))\n )\n ).then((info) => {\n debug('endpoint info: %O', info);\n return [info.server, info.secondary];\n });\n }\n\n static _fetchPushRouter({ appId, region }) {\n debug('fetch router');\n switch (region) {\n case 'cn': {\n const cachedPushRouter = pushRouterCache.get(appId);\n if (cachedPushRouter) {\n return Promise.resolve(cachedPushRouter);\n }\n return axios\n .get('https://app-router.leancloud.cn/1/route', {\n params: {\n appId,\n },\n timeout: 20000,\n })\n .then(\n res => res.data\n )\n .then(tap(debug))\n .then(\n (route) => {\n const pushRouter = route.push_router_server;\n if (!pushRouter) {\n throw new Error('push router not exists');\n }\n let ttl = route.ttl;\n if (typeof ttl !== 'number') {\n ttl = 3600;\n }\n pushRouterCache.set(appId, pushRouter, ttl * 1000);\n return pushRouter;\n }\n )\n .catch(() => 'router-g0-push.leancloud.cn');\n }\n case 'us':\n return Promise.resolve('router-a0-push.leancloud.cn');\n default:\n throw new Error(`Region [${region}] is not supported.`);\n }\n }\n\n static _fetchEndpointsInfo({ appId, region, ssl, server }) {\n debug('fetch endpoint info');\n return this._fetchPushRouter({ appId, region })\n .then(tap(debug))\n .then(router =>\n axios.get(`https://${router}/v1/route`, {\n params: {\n appId,\n secure: ssl,\n features: isWeapp ? 'wechat' : undefined,\n server,\n _t: Date.now(),\n },\n timeout: 20000,\n }).then(\n res => res.data\n ).then(tap(debug))\n );\n }\n\n _close() {\n if (this._openPromise) {\n this._openPromise.then(connection => connection.close());\n }\n delete this._openPromise;\n }\n\n /**\n * 手动进行重连。\n * SDK 在网络出现异常时会自动按照一定的时间间隔尝试重连,调用该方法会立即尝试重连并重置重连尝试计数器。\n * 只能在 `schedule` 事件之后,`retry` 事件之前调用,如果当前网络正常或者正在进行重连,调用该方法会抛异常。\n */\n retry() {\n const connection = internal(this).connection;\n if (!connection) {\n throw new Error('no connection established');\n }\n if (connection.cannot('retry')) {\n throw new Error(\n `retrying not allowed when not disconnected. the connection is now ${connection.current}`\n );\n }\n return connection.retry();\n }\n /**\n * 暂停,使 SDK 进入离线状态。\n * 你可以在网络断开、应用进入后台等时刻调用该方法让 SDK 进入离线状态,离线状态下不会尝试重连。\n * 在浏览器中 SDK 会自动监听网络变化,因此无需手动调用该方法。\n *\n * @since 3.4.0\n * @see Realtime#event:offline\n */\n pause() {\n // 这个方法常常在网络断开、进入后台时被调用,此时 connection 可能没有建立或者已经 close。\n // 因此不像 retry,这个方法应该尽可能 loose\n const connection = internal(this).connection;\n if (!connection) return;\n if (connection.can('pause')) connection.pause();\n }\n /**\n * 恢复在线状态。\n * 你可以在网络恢复、应用回到前台等时刻调用该方法让 SDK 恢复在线状态,恢复在线状态后 SDK 会开始尝试重连。\n *\n * @since 3.4.0\n * @see Realtime#event:online\n */\n resume() {\n // 与 pause 一样,这个方法应该尽可能 loose\n const connection = internal(this).connection;\n if (!connection) return;\n if (connection.can('resume')) connection.resume();\n }\n\n _register(client) {\n internal(this).clients.add(client);\n }\n\n _deregister(client) {\n internal(this).clients.delete(client);\n if (internal(this).clients.size === 0) {\n this._close();\n }\n }\n\n _dispatchCommand(command) {\n return applyDispatcher(this._plugins.beforeCommandDispatch, [command, this])\n .then((shouldDispatch) => {\n // no plugin handled this command\n if (shouldDispatch) return debug('[WARN] Unexpected message received: %O', trim(command));\n return false;\n });\n }\n}\n"],"names":["defined","toInteger","aFunction","isObject","require$$0","document","require$$1","require$$2","anObject","toPrimitive","IE8_DOM_DEFINE","dP","createDesc","core","global","ctx","hide","cof","IObject","min","toIObject","toLength","toAbsoluteIndex","uid","IE_PROTO","has","$keys","enumBugKeys","getKeys","PROTOTYPE","dPs","create","descriptor","setToStringTag","toObject","$iterCreate","getPrototypeOf","LIBRARY","Iterators","redefine","$export","step","addToUnscopables","TAG","ITERATOR","classof","getIterFn","isArrayIter","call","process","invoke","cel","html","isNode","newPromiseCapability","SPECIES","DESCRIPTORS","TypeError","newPromiseCapabilityModule","perform","anInstance","require$$3","speciesConstructor","require$$4","require$$5","require$$6","promiseResolve","require$$7","forOf","wksExt","gOPS","pIE","gOPN","toString","gOPD","$GOPD","$DP","gOPNExt","wks","shared","ObjectProto","USE_NATIVE","$fails","_create","enumKeys","wksDefine","isArray","_iterator","_symbol","Storage","getItem","key","wx","getStorageSync","setItem","value","setStorageSync","removeItem","clear","clearStorageSync","_defineProperty","_typeof2","$Object","_setPrototypeOf","$JSON","hasOwnProperty","Commons","CustomEventTarget","EventWrapper","FormData","_entries","append","name","uri","push","set","entry","get","delete","filter","entries","find","getAll","some","keys","map","values","UNSENT","OPENED","HEADERS_RECEIVED","LOADING","DONE","REQUEST_EVENTS","successCallback","response","status","statusCode","statusText","text","data","responseText","readyState","dispatchEvent","type","XMLHttpRequest","_headers","abort","Error","getAllResponseHeaders","console","warn","getResponseHeader","overrideMimeType","open","method","url","async","_method","_url","setRequestHeader","header","toLowerCase","send","blobs","length","restData","reduce","result","assign","uploadFile","filePath","formData","success","bind","fail","error","request","toUpperCase","EventTarget","CONNECTING","OPEN","CLOSING","CLOSED","EVENTS","instance","errorHandler","event","message","_readyState","errMsg","WebSocket","protocal","_protocal","onSocketOpen","onSocketError","onSocketMessage","origin","ports","source","onSocketClose","code","reason","wasClean","connectSocket","setTimeout","close","closeSocket","sendSocketMessage","polyfill","target","window","polyfills","localStorage","Object","navigator","k","e","define","require","this","newBuilder","build","messages","push_server","messages2","JsonObjectMessage","UnreadTuple","LogItem","DataCommand","SessionCommand","ErrorCommand","DirectCommand","AckCommand","UnreadCommand","ConvCommand","RoomCommand","LogsCommand","RcpCommand","ReadTuple","MaxReadTuple","ReadCommand","PresenceCommand","ReportCommand","GenericCommand","PatchCommand","PatchItem","CommandType","OpType","StatusType","$defineProperty","createProperty","_from","redefineAll","validate","$iterDefine","setSpecies","asc","fails","meta","strong","from","d","ms","fn","thisArg","wrap","args","Array","arguments","i","apply","prototype","val","isArrayBuffer","isFormData","isArrayBufferView","ArrayBuffer","isView","buffer","isString","isNumber","isUndefined","isDate","isFile","isBlob","isFunction","isStream","pipe","isURLSearchParams","URLSearchParams","trim","str","replace","isStandardBrowserEnv","product","forEach","obj","l","merge","assignValue","extend","a","b","isBuffer","normalizeHeaderName","headers","normalizedName","utils","processHeader","enhanceError","config","createError","settle","resolve","reject","validateStatus","encode","encodeURIComponent","buildURL","params","paramsSerializer","serializedParams","parts","serialize","parseValue","v","toISOString","join","indexOf","parseHeaders","parsed","split","parser","line","substr","standardBrowserEnv","msie","test","userAgent","urlParsingNode","createElement","originURL","resolveURL","href","setAttribute","protocol","host","search","hash","hostname","port","pathname","charAt","location","isURLSameOrigin","requestURL","nonStandardBrowserEnv","chars","E","btoa","input","String","output","block","charCode","idx","charCodeAt","write","expires","path","domain","secure","cookie","Date","toGMTString","read","match","RegExp","decodeURIComponent","remove","now","xhrAdapter","dispatchXhrRequest","requestData","requestHeaders","loadEvent","xDomain","env","NODE_ENV","XDomainRequest","onprogress","handleProgress","ontimeout","handleTimeout","auth","username","password","Authorization","timeout","handleLoad","responseURL","responseHeaders","responseData","responseType","onerror","handleError","cookies","xsrfValue","withCredentials","xsrfCookieName","undefined","xsrfHeaderName","onDownloadProgress","addEventListener","onUploadProgress","upload","cancelToken","promise","then","onCanceled","cancel","DEFAULT_CONTENT_TYPE","setContentTypeIfUnset","getDefaultAdapter","adapter","defaults","transformRequest","transformResponse","JSON","parse","maxContentLength","common","forEachMethodNoData","forEachMethodWithData","InterceptorManager","handlers","use","fulfilled","rejected","eject","id","forEachHandler","h","transformData","fns","transform","isCancel","__CANCEL__","throwIfCancellationRequested","throwIfRequested","dispatchRequest","cleanHeaderConfig","onAdapterResolution","onAdapterRejection","isAbsoluteURL","combineURLs","baseURL","relativeURL","Axios","instanceConfig","interceptors","chain","unshiftRequestInterceptors","interceptor","unshift","pushResponseInterceptors","shift","Cancel","CancelToken","executor","resolvePromise","promiseExecutor","token","c","spread","callback","arr","createInstance","defaultConfig","context","axios","all","promises","$getOwnPropertyDescriptor","_assign","createArrayMethod","$has","weak","freeGlobal","Symbol","root","objectProto","symToStringTag","nativeObjectToString","getRawTag","objectToString","overArg","isObjectLike","baseGetTag","getPrototype","EXPIRED","debug","Expirable","ttl","_value","expiredAt","expired","Cache","_map","cache","tryAll","promiseConstructors","catch","slice","tap","isIE10","internal","object","removeNull","isPlainObject","prop","ensureArray","isWeapp","MozWebSocket","HEARTBEAT_TIME","TIMEOUT_TIME","DEFAULT_RETRY_STRATEGY","Math","pow","attempt","requireConnected","requireConnectedWrapper","is","currentState","current","WebSocketPlus","getUrls","_getUrls","_protocol","init","_createWs","__postponeTimeoutTimer","_postponeTimeoutTimer","__pause","pause","__resume","resume","throw","wsUrls","urls","ws","binaryType","onopen","onclose","_ws","_handleClose","onmessage","_handleMessage","_destroyWs","onbeforeevent","to","payload","emit","onconnected","_startConnectionKeeper","onleaveconnected","_stopConnectionKeeper","onpause","onbeforeresume","onreconnect","ondisconnected","delay","__scheduledRetry","clearTimeout","retry","onretry","can","reconnect","removeEventListener","_ping","ping","_clearTimeoutTimers","_timeoutTimer","disconnect","_heartbeatTimer","setInterval","addListener","removeListener","clearInterval","isFinished","handleClose","handleMessage","EventEmitter","StateMachine","initial","state","defer","terminal","events","ErrorCode","Number","errorMessage","appCode","detail","err","COMMAND_TIMEOUT","Connection","getUrl","format","version","protocolString","_protocalFormat","_commands","_serialId","command","waitingForRespond","serialId","toBase64","toArrayBuffer","msg","decode","cmd","echo","applyDecorators","decorators","decorator","_pluginName","applyDispatcher","dispatchers","resultPromise","dispatcher","shouldDispatch","pushRouterCache","Realtime","options","appId","_options","region","pushOfflineMessages","noBinary","ssl","server","SERVER","_cache","clients","_plugins","__preRegisteredPlugins","plugins","plugin","hook","concat","onRealtimeCreate","_open","_openPromise","connection","_getEndpoints","on","_dispatchCommand","client","isFatal","APP_NOT_AVAILABLE","INVALID_LOGIN","INVALID_ORIGIN","errorCode","constructor","_fetchEndpointsInfo","info","secondary","_fetchPushRouter","cachedPushRouter","res","route","pushRouter","push_router_server","router","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AS,IAAT,EAAegI,OAAf,CAAuB9gB,MAAvB,CAA8B4hB,MAA9B;AACA,CAAA,QAAI9I,SAAS,IAAT,EAAegI,OAAf,CAAuBsC,IAAvB,KAAgC,CAApC,EAAuC;AACrC,CAAA,WAAKL,MAAL;AACD,CAAA;AACF,CAAA;;sBAEDpB,6CAAiB3C,SAAS;AACxB,CAAA,WAAOa,gBAAgB,KAAKkB,QAAL,CAAcsC,qBAA9B,EAAqD,CAACrE,OAAD,EAAU,IAAV,CAArD,EACJpM,IADI,CACC,UAACqN,cAAD,EAAoB;AACxB,CAAA;AACA,CAAA,UAAIA,cAAJ,EAAoB,OAAOlI,MAAM,wCAAN,EAAgDnN,OAAKoU,OAAL,CAAhD,CAAP;AACpB,CAAA,aAAO,KAAP;AACD,CAAA,KALI,CAAP;AAMD,CAAA;;;GA5UmCtB;;;;;;;;;;"} \ No newline at end of file diff --git a/dist/realtime.browser.js b/dist/realtime.browser.js new file mode 100644 index 000000000..30ed8f7a6 --- /dev/null +++ b/dist/realtime.browser.js @@ -0,0 +1,22835 @@ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define('leancloud-realtime', ['exports'], factory) : + (factory((global.AV = global.AV || {}))); +}(this, (function (exports) { 'use strict'; + + var define = undefined; + var require = require || function(id) {throw new Error('Unexpected required ' + id)}; + + + + var process = (window && window.process) || {}; + process.env = process.env || {}; + + var commonjsGlobal = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; + + function commonjsRequire () { + throw new Error('Dynamic requires are not currently supported by rollup-plugin-commonjs'); + } + + function unwrapExports (x) { + return x && x.__esModule ? x['default'] : x; + } + + function createCommonjsModule(fn, module) { + return module = { exports: {} }, fn(module, module.exports), module.exports; + } + + // 7.1.4 ToInteger + var ceil = Math.ceil; + var floor = Math.floor; + var _toInteger = function (it) { + return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); + }; + + // 7.2.1 RequireObjectCoercible(argument) + var _defined = function (it) { + if (it == undefined) throw TypeError("Can't call method on " + it); + return it; + }; + + // true -> String#at + // false -> String#codePointAt + var _stringAt = function (TO_STRING) { + return function (that, pos) { + var s = String(_defined(that)); + var i = _toInteger(pos); + var l = s.length; + var a, b; + if (i < 0 || i >= l) return TO_STRING ? '' : undefined; + a = s.charCodeAt(i); + return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff + ? TO_STRING ? s.charAt(i) : a + : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; + }; + }; + + var _library = true; + + var _global = createCommonjsModule(function (module) { + // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 + var global = module.exports = typeof window != 'undefined' && window.Math == Math + ? window : typeof self != 'undefined' && self.Math == Math ? self + // eslint-disable-next-line no-new-func + : Function('return this')(); + if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef + }); + + var _core = createCommonjsModule(function (module) { + var core = module.exports = { version: '2.5.1' }; + if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef + }); + + var _aFunction = function (it) { + if (typeof it != 'function') throw TypeError(it + ' is not a function!'); + return it; + }; + + // optional / simple context binding + + var _ctx = function (fn, that, length) { + _aFunction(fn); + if (that === undefined) return fn; + switch (length) { + case 1: return function (a) { + return fn.call(that, a); + }; + case 2: return function (a, b) { + return fn.call(that, a, b); + }; + case 3: return function (a, b, c) { + return fn.call(that, a, b, c); + }; + } + return function (/* ...args */) { + return fn.apply(that, arguments); + }; + }; + + var _isObject = function (it) { + return typeof it === 'object' ? it !== null : typeof it === 'function'; + }; + + var _anObject = function (it) { + if (!_isObject(it)) throw TypeError(it + ' is not an object!'); + return it; + }; + + var _fails = function (exec) { + try { + return !!exec(); + } catch (e) { + return true; + } + }; + + // Thank's IE8 for his funny defineProperty + var _descriptors = !_fails(function () { + return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; + }); + + var document$1 = _global.document; + // typeof document.createElement is 'object' in old IE + var is = _isObject(document$1) && _isObject(document$1.createElement); + var _domCreate = function (it) { + return is ? document$1.createElement(it) : {}; + }; + + var _ie8DomDefine = !_descriptors && !_fails(function () { + return Object.defineProperty(_domCreate('div'), 'a', { get: function () { return 7; } }).a != 7; + }); + + // 7.1.1 ToPrimitive(input [, PreferredType]) + + // instead of the ES6 spec version, we didn't implement @@toPrimitive case + // and the second argument - flag - preferred type is a string + var _toPrimitive = function (it, S) { + if (!_isObject(it)) return it; + var fn, val; + if (S && typeof (fn = it.toString) == 'function' && !_isObject(val = fn.call(it))) return val; + if (typeof (fn = it.valueOf) == 'function' && !_isObject(val = fn.call(it))) return val; + if (!S && typeof (fn = it.toString) == 'function' && !_isObject(val = fn.call(it))) return val; + throw TypeError("Can't convert object to primitive value"); + }; + + var dP = Object.defineProperty; + + var f = _descriptors ? Object.defineProperty : function defineProperty(O, P, Attributes) { + _anObject(O); + P = _toPrimitive(P, true); + _anObject(Attributes); + if (_ie8DomDefine) try { + return dP(O, P, Attributes); + } catch (e) { /* empty */ } + if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); + if ('value' in Attributes) O[P] = Attributes.value; + return O; + }; + + var _objectDp = { + f: f + }; + + var _propertyDesc = function (bitmap, value) { + return { + enumerable: !(bitmap & 1), + configurable: !(bitmap & 2), + writable: !(bitmap & 4), + value: value + }; + }; + + var _hide = _descriptors ? function (object, key, value) { + return _objectDp.f(object, key, _propertyDesc(1, value)); + } : function (object, key, value) { + object[key] = value; + return object; + }; + + var PROTOTYPE = 'prototype'; + + var $export = function (type, name, source) { + var IS_FORCED = type & $export.F; + var IS_GLOBAL = type & $export.G; + var IS_STATIC = type & $export.S; + var IS_PROTO = type & $export.P; + var IS_BIND = type & $export.B; + var IS_WRAP = type & $export.W; + var exports = IS_GLOBAL ? _core : _core[name] || (_core[name] = {}); + var expProto = exports[PROTOTYPE]; + var target = IS_GLOBAL ? _global : IS_STATIC ? _global[name] : (_global[name] || {})[PROTOTYPE]; + var key, own, out; + if (IS_GLOBAL) source = name; + for (key in source) { + // contains in native + own = !IS_FORCED && target && target[key] !== undefined; + if (own && key in exports) continue; + // export native or passed + out = own ? target[key] : source[key]; + // prevent global pollution for namespaces + exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] + // bind timers to global for call from export context + : IS_BIND && own ? _ctx(out, _global) + // wrap global constructors for prevent change them in library + : IS_WRAP && target[key] == out ? (function (C) { + var F = function (a, b, c) { + if (this instanceof C) { + switch (arguments.length) { + case 0: return new C(); + case 1: return new C(a); + case 2: return new C(a, b); + } return new C(a, b, c); + } return C.apply(this, arguments); + }; + F[PROTOTYPE] = C[PROTOTYPE]; + return F; + // make static versions for prototype methods + })(out) : IS_PROTO && typeof out == 'function' ? _ctx(Function.call, out) : out; + // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% + if (IS_PROTO) { + (exports.virtual || (exports.virtual = {}))[key] = out; + // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% + if (type & $export.R && expProto && !expProto[key]) _hide(expProto, key, out); + } + } + }; + // type bitmap + $export.F = 1; // forced + $export.G = 2; // global + $export.S = 4; // static + $export.P = 8; // proto + $export.B = 16; // bind + $export.W = 32; // wrap + $export.U = 64; // safe + $export.R = 128; // real proto method for `library` + var _export = $export; + + var _redefine = _hide; + + var hasOwnProperty = {}.hasOwnProperty; + var _has = function (it, key) { + return hasOwnProperty.call(it, key); + }; + + var _iterators = {}; + + var toString = {}.toString; + + var _cof = function (it) { + return toString.call(it).slice(8, -1); + }; + + // fallback for non-array-like ES3 and non-enumerable old V8 strings + + // eslint-disable-next-line no-prototype-builtins + var _iobject = Object('z').propertyIsEnumerable(0) ? Object : function (it) { + return _cof(it) == 'String' ? it.split('') : Object(it); + }; + + // to indexed object, toObject with fallback for non-array-like ES3 strings + + + var _toIobject = function (it) { + return _iobject(_defined(it)); + }; + + // 7.1.15 ToLength + + var min = Math.min; + var _toLength = function (it) { + return it > 0 ? min(_toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 + }; + + var max = Math.max; + var min$1 = Math.min; + var _toAbsoluteIndex = function (index, length) { + index = _toInteger(index); + return index < 0 ? max(index + length, 0) : min$1(index, length); + }; + + // false -> Array#indexOf + // true -> Array#includes + + + + var _arrayIncludes = function (IS_INCLUDES) { + return function ($this, el, fromIndex) { + var O = _toIobject($this); + var length = _toLength(O.length); + var index = _toAbsoluteIndex(fromIndex, length); + var value; + // Array#includes uses SameValueZero equality algorithm + // eslint-disable-next-line no-self-compare + if (IS_INCLUDES && el != el) while (length > index) { + value = O[index++]; + // eslint-disable-next-line no-self-compare + if (value != value) return true; + // Array#indexOf ignores holes, Array#includes - not + } else for (;length > index; index++) if (IS_INCLUDES || index in O) { + if (O[index] === el) return IS_INCLUDES || index || 0; + } return !IS_INCLUDES && -1; + }; + }; + + var SHARED = '__core-js_shared__'; + var store = _global[SHARED] || (_global[SHARED] = {}); + var _shared = function (key) { + return store[key] || (store[key] = {}); + }; + + var id = 0; + var px = Math.random(); + var _uid = function (key) { + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); + }; + + var shared = _shared('keys'); + + var _sharedKey = function (key) { + return shared[key] || (shared[key] = _uid(key)); + }; + + var arrayIndexOf = _arrayIncludes(false); + var IE_PROTO$1 = _sharedKey('IE_PROTO'); + + var _objectKeysInternal = function (object, names) { + var O = _toIobject(object); + var i = 0; + var result = []; + var key; + for (key in O) if (key != IE_PROTO$1) _has(O, key) && result.push(key); + // Don't enum bug & hidden keys + while (names.length > i) if (_has(O, key = names[i++])) { + ~arrayIndexOf(result, key) || result.push(key); + } + return result; + }; + + // IE 8- don't enum bug keys + var _enumBugKeys = ( + 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' + ).split(','); + + // 19.1.2.14 / 15.2.3.14 Object.keys(O) + + + + var _objectKeys = Object.keys || function keys(O) { + return _objectKeysInternal(O, _enumBugKeys); + }; + + var _objectDps = _descriptors ? Object.defineProperties : function defineProperties(O, Properties) { + _anObject(O); + var keys = _objectKeys(Properties); + var length = keys.length; + var i = 0; + var P; + while (length > i) _objectDp.f(O, P = keys[i++], Properties[P]); + return O; + }; + + var document$2 = _global.document; + var _html = document$2 && document$2.documentElement; + + // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) + + + + var IE_PROTO = _sharedKey('IE_PROTO'); + var Empty = function () { /* empty */ }; + var PROTOTYPE$1 = 'prototype'; + + // Create object with fake `null` prototype: use iframe Object with cleared prototype + var createDict = function () { + // Thrash, waste and sodomy: IE GC bug + var iframe = _domCreate('iframe'); + var i = _enumBugKeys.length; + var lt = '<'; + var gt = '>'; + var iframeDocument; + iframe.style.display = 'none'; + _html.appendChild(iframe); + iframe.src = 'javascript:'; // eslint-disable-line no-script-url + // createDict = iframe.contentWindow.Object; + // html.removeChild(iframe); + iframeDocument = iframe.contentWindow.document; + iframeDocument.open(); + iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); + iframeDocument.close(); + createDict = iframeDocument.F; + while (i--) delete createDict[PROTOTYPE$1][_enumBugKeys[i]]; + return createDict(); + }; + + var _objectCreate = Object.create || function create(O, Properties) { + var result; + if (O !== null) { + Empty[PROTOTYPE$1] = _anObject(O); + result = new Empty(); + Empty[PROTOTYPE$1] = null; + // add "__proto__" for Object.getPrototypeOf polyfill + result[IE_PROTO] = O; + } else result = createDict(); + return Properties === undefined ? result : _objectDps(result, Properties); + }; + + var _wks = createCommonjsModule(function (module) { + var store = _shared('wks'); + + var Symbol = _global.Symbol; + var USE_SYMBOL = typeof Symbol == 'function'; + + var $exports = module.exports = function (name) { + return store[name] || (store[name] = + USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : _uid)('Symbol.' + name)); + }; + + $exports.store = store; + }); + + var def = _objectDp.f; + + var TAG = _wks('toStringTag'); + + var _setToStringTag = function (it, tag, stat) { + if (it && !_has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }); + }; + + var IteratorPrototype = {}; + + // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() + _hide(IteratorPrototype, _wks('iterator'), function () { return this; }); + + var _iterCreate = function (Constructor, NAME, next) { + Constructor.prototype = _objectCreate(IteratorPrototype, { next: _propertyDesc(1, next) }); + _setToStringTag(Constructor, NAME + ' Iterator'); + }; + + // 7.1.13 ToObject(argument) + + var _toObject = function (it) { + return Object(_defined(it)); + }; + + // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) + + + var IE_PROTO$2 = _sharedKey('IE_PROTO'); + var ObjectProto = Object.prototype; + + var _objectGpo = Object.getPrototypeOf || function (O) { + O = _toObject(O); + if (_has(O, IE_PROTO$2)) return O[IE_PROTO$2]; + if (typeof O.constructor == 'function' && O instanceof O.constructor) { + return O.constructor.prototype; + } return O instanceof Object ? ObjectProto : null; + }; + + var ITERATOR = _wks('iterator'); + var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` + var FF_ITERATOR = '@@iterator'; + var KEYS = 'keys'; + var VALUES = 'values'; + + var returnThis = function () { return this; }; + + var _iterDefine = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { + _iterCreate(Constructor, NAME, next); + var getMethod = function (kind) { + if (!BUGGY && kind in proto) return proto[kind]; + switch (kind) { + case KEYS: return function keys() { return new Constructor(this, kind); }; + case VALUES: return function values() { return new Constructor(this, kind); }; + } return function entries() { return new Constructor(this, kind); }; + }; + var TAG = NAME + ' Iterator'; + var DEF_VALUES = DEFAULT == VALUES; + var VALUES_BUG = false; + var proto = Base.prototype; + var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; + var $default = $native || getMethod(DEFAULT); + var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined; + var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; + var methods, key, IteratorPrototype; + // Fix native + if ($anyNative) { + IteratorPrototype = _objectGpo($anyNative.call(new Base())); + if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { + // Set @@toStringTag to native iterators + _setToStringTag(IteratorPrototype, TAG, true); + // fix for some old engines + if (!_library && !_has(IteratorPrototype, ITERATOR)) _hide(IteratorPrototype, ITERATOR, returnThis); + } + } + // fix Array#{values, @@iterator}.name in V8 / FF + if (DEF_VALUES && $native && $native.name !== VALUES) { + VALUES_BUG = true; + $default = function values() { return $native.call(this); }; + } + // Define iterator + if ((!_library || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { + _hide(proto, ITERATOR, $default); + } + // Plug for library + _iterators[NAME] = $default; + _iterators[TAG] = returnThis; + if (DEFAULT) { + methods = { + values: DEF_VALUES ? $default : getMethod(VALUES), + keys: IS_SET ? $default : getMethod(KEYS), + entries: $entries + }; + if (FORCED) for (key in methods) { + if (!(key in proto)) _redefine(proto, key, methods[key]); + } else _export(_export.P + _export.F * (BUGGY || VALUES_BUG), NAME, methods); + } + return methods; + }; + + var $at = _stringAt(true); + + // 21.1.3.27 String.prototype[@@iterator]() + _iterDefine(String, 'String', function (iterated) { + this._t = String(iterated); // target + this._i = 0; // next index + // 21.1.5.2.1 %StringIteratorPrototype%.next() + }, function () { + var O = this._t; + var index = this._i; + var point; + if (index >= O.length) return { value: undefined, done: true }; + point = $at(O, index); + this._i += point.length; + return { value: point, done: false }; + }); + + var _addToUnscopables = function () { /* empty */ }; + + var _iterStep = function (done, value) { + return { value: value, done: !!done }; + }; + + // 22.1.3.4 Array.prototype.entries() + // 22.1.3.13 Array.prototype.keys() + // 22.1.3.29 Array.prototype.values() + // 22.1.3.30 Array.prototype[@@iterator]() + var es6_array_iterator = _iterDefine(Array, 'Array', function (iterated, kind) { + this._t = _toIobject(iterated); // target + this._i = 0; // next index + this._k = kind; // kind + // 22.1.5.2.1 %ArrayIteratorPrototype%.next() + }, function () { + var O = this._t; + var kind = this._k; + var index = this._i++; + if (!O || index >= O.length) { + this._t = undefined; + return _iterStep(1); + } + if (kind == 'keys') return _iterStep(0, index); + if (kind == 'values') return _iterStep(0, O[index]); + return _iterStep(0, [index, O[index]]); + }, 'values'); + + // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) + _iterators.Arguments = _iterators.Array; + + _addToUnscopables('keys'); + _addToUnscopables('values'); + _addToUnscopables('entries'); + + var TO_STRING_TAG = _wks('toStringTag'); + + var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' + + 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' + + 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' + + 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' + + 'TextTrackList,TouchList').split(','); + + for (var i = 0; i < DOMIterables.length; i++) { + var NAME = DOMIterables[i]; + var Collection = _global[NAME]; + var proto = Collection && Collection.prototype; + if (proto && !proto[TO_STRING_TAG]) _hide(proto, TO_STRING_TAG, NAME); + _iterators[NAME] = _iterators.Array; + } + + // getting tag from 19.1.3.6 Object.prototype.toString() + + var TAG$1 = _wks('toStringTag'); + // ES3 wrong here + var ARG = _cof(function () { return arguments; }()) == 'Arguments'; + + // fallback for IE11 Script Access Denied error + var tryGet = function (it, key) { + try { + return it[key]; + } catch (e) { /* empty */ } + }; + + var _classof = function (it) { + var O, T, B; + return it === undefined ? 'Undefined' : it === null ? 'Null' + // @@toStringTag case + : typeof (T = tryGet(O = Object(it), TAG$1)) == 'string' ? T + // builtinTag case + : ARG ? _cof(O) + // ES3 arguments fallback + : (B = _cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; + }; + + var _anInstance = function (it, Constructor, name, forbiddenField) { + if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) { + throw TypeError(name + ': incorrect invocation!'); + } return it; + }; + + // call something on iterator step with safe closing on error + + var _iterCall = function (iterator, fn, value, entries) { + try { + return entries ? fn(_anObject(value)[0], value[1]) : fn(value); + // 7.4.6 IteratorClose(iterator, completion) + } catch (e) { + var ret = iterator['return']; + if (ret !== undefined) _anObject(ret.call(iterator)); + throw e; + } + }; + + // check on default Array iterator + + var ITERATOR$1 = _wks('iterator'); + var ArrayProto = Array.prototype; + + var _isArrayIter = function (it) { + return it !== undefined && (_iterators.Array === it || ArrayProto[ITERATOR$1] === it); + }; + + var ITERATOR$2 = _wks('iterator'); + + var core_getIteratorMethod = _core.getIteratorMethod = function (it) { + if (it != undefined) return it[ITERATOR$2] + || it['@@iterator'] + || _iterators[_classof(it)]; + }; + + var _forOf = createCommonjsModule(function (module) { + var BREAK = {}; + var RETURN = {}; + var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) { + var iterFn = ITERATOR ? function () { return iterable; } : core_getIteratorMethod(iterable); + var f = _ctx(fn, that, entries ? 2 : 1); + var index = 0; + var length, step, iterator, result; + if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!'); + // fast case for arrays with default iterator + if (_isArrayIter(iterFn)) for (length = _toLength(iterable.length); length > index; index++) { + result = entries ? f(_anObject(step = iterable[index])[0], step[1]) : f(iterable[index]); + if (result === BREAK || result === RETURN) return result; + } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) { + result = _iterCall(iterator, f, step.value, entries); + if (result === BREAK || result === RETURN) return result; + } + }; + exports.BREAK = BREAK; + exports.RETURN = RETURN; + }); + + // 7.3.20 SpeciesConstructor(O, defaultConstructor) + + + var SPECIES = _wks('species'); + var _speciesConstructor = function (O, D) { + var C = _anObject(O).constructor; + var S; + return C === undefined || (S = _anObject(C)[SPECIES]) == undefined ? D : _aFunction(S); + }; + + // fast apply, http://jsperf.lnkit.com/fast-apply/5 + var _invoke = function (fn, args, that) { + var un = that === undefined; + switch (args.length) { + case 0: return un ? fn() + : fn.call(that); + case 1: return un ? fn(args[0]) + : fn.call(that, args[0]); + case 2: return un ? fn(args[0], args[1]) + : fn.call(that, args[0], args[1]); + case 3: return un ? fn(args[0], args[1], args[2]) + : fn.call(that, args[0], args[1], args[2]); + case 4: return un ? fn(args[0], args[1], args[2], args[3]) + : fn.call(that, args[0], args[1], args[2], args[3]); + } return fn.apply(that, args); + }; + + var process$2 = _global.process; + var setTask = _global.setImmediate; + var clearTask = _global.clearImmediate; + var MessageChannel = _global.MessageChannel; + var Dispatch = _global.Dispatch; + var counter = 0; + var queue = {}; + var ONREADYSTATECHANGE = 'onreadystatechange'; + var defer; + var channel; + var port; + var run = function () { + var id = +this; + // eslint-disable-next-line no-prototype-builtins + if (queue.hasOwnProperty(id)) { + var fn = queue[id]; + delete queue[id]; + fn(); + } + }; + var listener = function (event) { + run.call(event.data); + }; + // Node.js 0.9+ & IE10+ has setImmediate, otherwise: + if (!setTask || !clearTask) { + setTask = function setImmediate(fn) { + var args = []; + var i = 1; + while (arguments.length > i) args.push(arguments[i++]); + queue[++counter] = function () { + // eslint-disable-next-line no-new-func + _invoke(typeof fn == 'function' ? fn : Function(fn), args); + }; + defer(counter); + return counter; + }; + clearTask = function clearImmediate(id) { + delete queue[id]; + }; + // Node.js 0.8- + if (_cof(process$2) == 'process') { + defer = function (id) { + process$2.nextTick(_ctx(run, id, 1)); + }; + // Sphere (JS game engine) Dispatch API + } else if (Dispatch && Dispatch.now) { + defer = function (id) { + Dispatch.now(_ctx(run, id, 1)); + }; + // Browsers with MessageChannel, includes WebWorkers + } else if (MessageChannel) { + channel = new MessageChannel(); + port = channel.port2; + channel.port1.onmessage = listener; + defer = _ctx(port.postMessage, port, 1); + // Browsers with postMessage, skip WebWorkers + // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' + } else if (_global.addEventListener && typeof postMessage == 'function' && !_global.importScripts) { + defer = function (id) { + _global.postMessage(id + '', '*'); + }; + _global.addEventListener('message', listener, false); + // IE8- + } else if (ONREADYSTATECHANGE in _domCreate('script')) { + defer = function (id) { + _html.appendChild(_domCreate('script'))[ONREADYSTATECHANGE] = function () { + _html.removeChild(this); + run.call(id); + }; + }; + // Rest old browsers + } else { + defer = function (id) { + setTimeout(_ctx(run, id, 1), 0); + }; + } + } + var _task = { + set: setTask, + clear: clearTask + }; + + var macrotask = _task.set; + var Observer = _global.MutationObserver || _global.WebKitMutationObserver; + var process$3 = _global.process; + var Promise = _global.Promise; + var isNode$1 = _cof(process$3) == 'process'; + + var _microtask = function () { + var head, last, notify; + + var flush = function () { + var parent, fn; + if (isNode$1 && (parent = process$3.domain)) parent.exit(); + while (head) { + fn = head.fn; + head = head.next; + try { + fn(); + } catch (e) { + if (head) notify(); + else last = undefined; + throw e; + } + } last = undefined; + if (parent) parent.enter(); + }; + + // Node.js + if (isNode$1) { + notify = function () { + process$3.nextTick(flush); + }; + // browsers with MutationObserver + } else if (Observer) { + var toggle = true; + var node = document.createTextNode(''); + new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new + notify = function () { + node.data = toggle = !toggle; + }; + // environments with maybe non-completely correct, but existent Promise + } else if (Promise && Promise.resolve) { + var promise = Promise.resolve(); + notify = function () { + promise.then(flush); + }; + // for other environments - macrotask based on: + // - setImmediate + // - MessageChannel + // - window.postMessag + // - onreadystatechange + // - setTimeout + } else { + notify = function () { + // strange IE + webpack dev server bug - use .call(global) + macrotask.call(_global, flush); + }; + } + + return function (fn) { + var task = { fn: fn, next: undefined }; + if (last) last.next = task; + if (!head) { + head = task; + notify(); + } last = task; + }; + }; + + // 25.4.1.5 NewPromiseCapability(C) + + + function PromiseCapability(C) { + var resolve, reject; + this.promise = new C(function ($$resolve, $$reject) { + if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor'); + resolve = $$resolve; + reject = $$reject; + }); + this.resolve = _aFunction(resolve); + this.reject = _aFunction(reject); + } + + var f$1 = function (C) { + return new PromiseCapability(C); + }; + + var _newPromiseCapability = { + f: f$1 + }; + + var _perform = function (exec) { + try { + return { e: false, v: exec() }; + } catch (e) { + return { e: true, v: e }; + } + }; + + var _promiseResolve = function (C, x) { + _anObject(C); + if (_isObject(x) && x.constructor === C) return x; + var promiseCapability = _newPromiseCapability.f(C); + var resolve = promiseCapability.resolve; + resolve(x); + return promiseCapability.promise; + }; + + var _redefineAll = function (target, src, safe) { + for (var key in src) { + if (safe && target[key]) target[key] = src[key]; + else _hide(target, key, src[key]); + } return target; + }; + + var SPECIES$1 = _wks('species'); + + var _setSpecies = function (KEY) { + var C = typeof _core[KEY] == 'function' ? _core[KEY] : _global[KEY]; + if (_descriptors && C && !C[SPECIES$1]) _objectDp.f(C, SPECIES$1, { + configurable: true, + get: function () { return this; } + }); + }; + + var ITERATOR$3 = _wks('iterator'); + var SAFE_CLOSING = false; + + try { + var riter = [7][ITERATOR$3](); + riter['return'] = function () { SAFE_CLOSING = true; }; + // eslint-disable-next-line no-throw-literal + Array.from(riter, function () { throw 2; }); + } catch (e) { /* empty */ } + + var _iterDetect = function (exec, skipClosing) { + if (!skipClosing && !SAFE_CLOSING) return false; + var safe = false; + try { + var arr = [7]; + var iter = arr[ITERATOR$3](); + iter.next = function () { return { done: safe = true }; }; + arr[ITERATOR$3] = function () { return iter; }; + exec(arr); + } catch (e) { /* empty */ } + return safe; + }; + + var task = _task.set; + var microtask = _microtask(); + + + + var PROMISE = 'Promise'; + var TypeError$1 = _global.TypeError; + var process$1 = _global.process; + var $Promise = _global[PROMISE]; + var isNode = _classof(process$1) == 'process'; + var empty = function () { /* empty */ }; + var Internal; + var newGenericPromiseCapability; + var OwnPromiseCapability; + var Wrapper; + var newPromiseCapability = newGenericPromiseCapability = _newPromiseCapability.f; + + var USE_NATIVE = !!function () { + try { + // correct subclassing with @@species support + var promise = $Promise.resolve(1); + var FakePromise = (promise.constructor = {})[_wks('species')] = function (exec) { + exec(empty, empty); + }; + // unhandled rejections tracking support, NodeJS Promise without it fails @@species test + return (isNode || typeof PromiseRejectionEvent == 'function') && promise.then(empty) instanceof FakePromise; + } catch (e) { /* empty */ } + }(); + + // helpers + var isThenable = function (it) { + var then; + return _isObject(it) && typeof (then = it.then) == 'function' ? then : false; + }; + var notify = function (promise, isReject) { + if (promise._n) return; + promise._n = true; + var chain = promise._c; + microtask(function () { + var value = promise._v; + var ok = promise._s == 1; + var i = 0; + var run = function (reaction) { + var handler = ok ? reaction.ok : reaction.fail; + var resolve = reaction.resolve; + var reject = reaction.reject; + var domain = reaction.domain; + var result, then; + try { + if (handler) { + if (!ok) { + if (promise._h == 2) onHandleUnhandled(promise); + promise._h = 1; + } + if (handler === true) result = value; + else { + if (domain) domain.enter(); + result = handler(value); + if (domain) domain.exit(); + } + if (result === reaction.promise) { + reject(TypeError$1('Promise-chain cycle')); + } else if (then = isThenable(result)) { + then.call(result, resolve, reject); + } else resolve(result); + } else reject(value); + } catch (e) { + reject(e); + } + }; + while (chain.length > i) run(chain[i++]); // variable length - can't use forEach + promise._c = []; + promise._n = false; + if (isReject && !promise._h) onUnhandled(promise); + }); + }; + var onUnhandled = function (promise) { + task.call(_global, function () { + var value = promise._v; + var unhandled = isUnhandled(promise); + var result, handler, console; + if (unhandled) { + result = _perform(function () { + if (isNode) { + process$1.emit('unhandledRejection', value, promise); + } else if (handler = _global.onunhandledrejection) { + handler({ promise: promise, reason: value }); + } else if ((console = _global.console) && console.error) { + console.error('Unhandled promise rejection', value); + } + }); + // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should + promise._h = isNode || isUnhandled(promise) ? 2 : 1; + } promise._a = undefined; + if (unhandled && result.e) throw result.v; + }); + }; + var isUnhandled = function (promise) { + if (promise._h == 1) return false; + var chain = promise._a || promise._c; + var i = 0; + var reaction; + while (chain.length > i) { + reaction = chain[i++]; + if (reaction.fail || !isUnhandled(reaction.promise)) return false; + } return true; + }; + var onHandleUnhandled = function (promise) { + task.call(_global, function () { + var handler; + if (isNode) { + process$1.emit('rejectionHandled', promise); + } else if (handler = _global.onrejectionhandled) { + handler({ promise: promise, reason: promise._v }); + } + }); + }; + var $reject = function (value) { + var promise = this; + if (promise._d) return; + promise._d = true; + promise = promise._w || promise; // unwrap + promise._v = value; + promise._s = 2; + if (!promise._a) promise._a = promise._c.slice(); + notify(promise, true); + }; + var $resolve = function (value) { + var promise = this; + var then; + if (promise._d) return; + promise._d = true; + promise = promise._w || promise; // unwrap + try { + if (promise === value) throw TypeError$1("Promise can't be resolved itself"); + if (then = isThenable(value)) { + microtask(function () { + var wrapper = { _w: promise, _d: false }; // wrap + try { + then.call(value, _ctx($resolve, wrapper, 1), _ctx($reject, wrapper, 1)); + } catch (e) { + $reject.call(wrapper, e); + } + }); + } else { + promise._v = value; + promise._s = 1; + notify(promise, false); + } + } catch (e) { + $reject.call({ _w: promise, _d: false }, e); // wrap + } + }; + + // constructor polyfill + if (!USE_NATIVE) { + // 25.4.3.1 Promise(executor) + $Promise = function Promise(executor) { + _anInstance(this, $Promise, PROMISE, '_h'); + _aFunction(executor); + Internal.call(this); + try { + executor(_ctx($resolve, this, 1), _ctx($reject, this, 1)); + } catch (err) { + $reject.call(this, err); + } + }; + // eslint-disable-next-line no-unused-vars + Internal = function Promise(executor) { + this._c = []; // <- awaiting reactions + this._a = undefined; // <- checked in isUnhandled reactions + this._s = 0; // <- state + this._d = false; // <- done + this._v = undefined; // <- value + this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled + this._n = false; // <- notify + }; + Internal.prototype = _redefineAll($Promise.prototype, { + // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected) + then: function then(onFulfilled, onRejected) { + var reaction = newPromiseCapability(_speciesConstructor(this, $Promise)); + reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true; + reaction.fail = typeof onRejected == 'function' && onRejected; + reaction.domain = isNode ? process$1.domain : undefined; + this._c.push(reaction); + if (this._a) this._a.push(reaction); + if (this._s) notify(this, false); + return reaction.promise; + }, + // 25.4.5.1 Promise.prototype.catch(onRejected) + 'catch': function (onRejected) { + return this.then(undefined, onRejected); + } + }); + OwnPromiseCapability = function () { + var promise = new Internal(); + this.promise = promise; + this.resolve = _ctx($resolve, promise, 1); + this.reject = _ctx($reject, promise, 1); + }; + _newPromiseCapability.f = newPromiseCapability = function (C) { + return C === $Promise || C === Wrapper + ? new OwnPromiseCapability(C) + : newGenericPromiseCapability(C); + }; + } + + _export(_export.G + _export.W + _export.F * !USE_NATIVE, { Promise: $Promise }); + _setToStringTag($Promise, PROMISE); + _setSpecies(PROMISE); + Wrapper = _core[PROMISE]; + + // statics + _export(_export.S + _export.F * !USE_NATIVE, PROMISE, { + // 25.4.4.5 Promise.reject(r) + reject: function reject(r) { + var capability = newPromiseCapability(this); + var $$reject = capability.reject; + $$reject(r); + return capability.promise; + } + }); + _export(_export.S + _export.F * (_library || !USE_NATIVE), PROMISE, { + // 25.4.4.6 Promise.resolve(x) + resolve: function resolve(x) { + return _promiseResolve(_library && this === Wrapper ? $Promise : this, x); + } + }); + _export(_export.S + _export.F * !(USE_NATIVE && _iterDetect(function (iter) { + $Promise.all(iter)['catch'](empty); + })), PROMISE, { + // 25.4.4.1 Promise.all(iterable) + all: function all(iterable) { + var C = this; + var capability = newPromiseCapability(C); + var resolve = capability.resolve; + var reject = capability.reject; + var result = _perform(function () { + var values = []; + var index = 0; + var remaining = 1; + _forOf(iterable, false, function (promise) { + var $index = index++; + var alreadyCalled = false; + values.push(undefined); + remaining++; + C.resolve(promise).then(function (value) { + if (alreadyCalled) return; + alreadyCalled = true; + values[$index] = value; + --remaining || resolve(values); + }, reject); + }); + --remaining || resolve(values); + }); + if (result.e) reject(result.v); + return capability.promise; + }, + // 25.4.4.4 Promise.race(iterable) + race: function race(iterable) { + var C = this; + var capability = newPromiseCapability(C); + var reject = capability.reject; + var result = _perform(function () { + _forOf(iterable, false, function (promise) { + C.resolve(promise).then(capability.resolve, reject); + }); + }); + if (result.e) reject(result.v); + return capability.promise; + } + }); + + _export(_export.P + _export.R, 'Promise', { 'finally': function (onFinally) { + var C = _speciesConstructor(this, _core.Promise || _global.Promise); + var isFunction = typeof onFinally == 'function'; + return this.then( + isFunction ? function (x) { + return _promiseResolve(C, onFinally()).then(function () { return x; }); + } : onFinally, + isFunction ? function (e) { + return _promiseResolve(C, onFinally()).then(function () { throw e; }); + } : onFinally + ); + } }); + + // https://github.com/tc39/proposal-promise-try + + + + + _export(_export.S, 'Promise', { 'try': function (callbackfn) { + var promiseCapability = _newPromiseCapability.f(this); + var result = _perform(callbackfn); + (result.e ? promiseCapability.reject : promiseCapability.resolve)(result.v); + return promiseCapability.promise; + } }); + + var promise$1 = _core.Promise; + + var promise = createCommonjsModule(function (module) { + module.exports = { "default": promise$1, __esModule: true }; + }); + + var _Promise = unwrapExports(promise); + + var long_1 = createCommonjsModule(function (module) { + /* + Copyright 2013 Daniel Wirtz + Copyright 2009 The Closure Library Authors. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS-IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + + /** + * @license long.js (c) 2013 Daniel Wirtz + * Released under the Apache License, Version 2.0 + * see: https://github.com/dcodeIO/long.js for details + */ + (function(global, factory) { + + /* AMD */ if (typeof undefined === 'function' && undefined["amd"]) + undefined([], factory); + /* CommonJS */ else if (typeof commonjsRequire === 'function' && 'object' === "object" && module && module["exports"]) + module["exports"] = factory(); + /* Global */ else + (global["dcodeIO"] = global["dcodeIO"] || {})["Long"] = factory(); + + })(commonjsGlobal, function() { + "use strict"; + + /** + * Constructs a 64 bit two's-complement integer, given its low and high 32 bit values as *signed* integers. + * See the from* functions below for more convenient ways of constructing Longs. + * @exports Long + * @class A Long class for representing a 64 bit two's-complement integer value. + * @param {number} low The low (signed) 32 bits of the long + * @param {number} high The high (signed) 32 bits of the long + * @param {boolean=} unsigned Whether unsigned or not, defaults to `false` for signed + * @constructor + */ + function Long(low, high, unsigned) { + + /** + * The low 32 bits as a signed value. + * @type {number} + */ + this.low = low | 0; + + /** + * The high 32 bits as a signed value. + * @type {number} + */ + this.high = high | 0; + + /** + * Whether unsigned or not. + * @type {boolean} + */ + this.unsigned = !!unsigned; + } + + // The internal representation of a long is the two given signed, 32-bit values. + // We use 32-bit pieces because these are the size of integers on which + // Javascript performs bit-operations. For operations like addition and + // multiplication, we split each number into 16 bit pieces, which can easily be + // multiplied within Javascript's floating-point representation without overflow + // or change in sign. + // + // In the algorithms below, we frequently reduce the negative case to the + // positive case by negating the input(s) and then post-processing the result. + // Note that we must ALWAYS check specially whether those values are MIN_VALUE + // (-2^63) because -MIN_VALUE == MIN_VALUE (since 2^63 cannot be represented as + // a positive number, it overflows back into a negative). Not handling this + // case would often result in infinite recursion. + // + // Common constant values ZERO, ONE, NEG_ONE, etc. are defined below the from* + // methods on which they depend. + + /** + * An indicator used to reliably determine if an object is a Long or not. + * @type {boolean} + * @const + * @private + */ + Long.prototype.__isLong__; + + Object.defineProperty(Long.prototype, "__isLong__", { + value: true, + enumerable: false, + configurable: false + }); + + /** + * @function + * @param {*} obj Object + * @returns {boolean} + * @inner + */ + function isLong(obj) { + return (obj && obj["__isLong__"]) === true; + } + + /** + * Tests if the specified object is a Long. + * @function + * @param {*} obj Object + * @returns {boolean} + */ + Long.isLong = isLong; + + /** + * A cache of the Long representations of small integer values. + * @type {!Object} + * @inner + */ + var INT_CACHE = {}; + + /** + * A cache of the Long representations of small unsigned integer values. + * @type {!Object} + * @inner + */ + var UINT_CACHE = {}; + + /** + * @param {number} value + * @param {boolean=} unsigned + * @returns {!Long} + * @inner + */ + function fromInt(value, unsigned) { + var obj, cachedObj, cache; + if (unsigned) { + value >>>= 0; + if (cache = (0 <= value && value < 256)) { + cachedObj = UINT_CACHE[value]; + if (cachedObj) + return cachedObj; + } + obj = fromBits(value, (value | 0) < 0 ? -1 : 0, true); + if (cache) + UINT_CACHE[value] = obj; + return obj; + } else { + value |= 0; + if (cache = (-128 <= value && value < 128)) { + cachedObj = INT_CACHE[value]; + if (cachedObj) + return cachedObj; + } + obj = fromBits(value, value < 0 ? -1 : 0, false); + if (cache) + INT_CACHE[value] = obj; + return obj; + } + } + + /** + * Returns a Long representing the given 32 bit integer value. + * @function + * @param {number} value The 32 bit integer in question + * @param {boolean=} unsigned Whether unsigned or not, defaults to `false` for signed + * @returns {!Long} The corresponding Long value + */ + Long.fromInt = fromInt; + + /** + * @param {number} value + * @param {boolean=} unsigned + * @returns {!Long} + * @inner + */ + function fromNumber(value, unsigned) { + if (isNaN(value) || !isFinite(value)) + return unsigned ? UZERO : ZERO; + if (unsigned) { + if (value < 0) + return UZERO; + if (value >= TWO_PWR_64_DBL) + return MAX_UNSIGNED_VALUE; + } else { + if (value <= -TWO_PWR_63_DBL) + return MIN_VALUE; + if (value + 1 >= TWO_PWR_63_DBL) + return MAX_VALUE; + } + if (value < 0) + return fromNumber(-value, unsigned).neg(); + return fromBits((value % TWO_PWR_32_DBL) | 0, (value / TWO_PWR_32_DBL) | 0, unsigned); + } + + /** + * Returns a Long representing the given value, provided that it is a finite number. Otherwise, zero is returned. + * @function + * @param {number} value The number in question + * @param {boolean=} unsigned Whether unsigned or not, defaults to `false` for signed + * @returns {!Long} The corresponding Long value + */ + Long.fromNumber = fromNumber; + + /** + * @param {number} lowBits + * @param {number} highBits + * @param {boolean=} unsigned + * @returns {!Long} + * @inner + */ + function fromBits(lowBits, highBits, unsigned) { + return new Long(lowBits, highBits, unsigned); + } + + /** + * Returns a Long representing the 64 bit integer that comes by concatenating the given low and high bits. Each is + * assumed to use 32 bits. + * @function + * @param {number} lowBits The low 32 bits + * @param {number} highBits The high 32 bits + * @param {boolean=} unsigned Whether unsigned or not, defaults to `false` for signed + * @returns {!Long} The corresponding Long value + */ + Long.fromBits = fromBits; + + /** + * @function + * @param {number} base + * @param {number} exponent + * @returns {number} + * @inner + */ + var pow_dbl = Math.pow; // Used 4 times (4*8 to 15+4) + + /** + * @param {string} str + * @param {(boolean|number)=} unsigned + * @param {number=} radix + * @returns {!Long} + * @inner + */ + function fromString(str, unsigned, radix) { + if (str.length === 0) + throw Error('empty string'); + if (str === "NaN" || str === "Infinity" || str === "+Infinity" || str === "-Infinity") + return ZERO; + if (typeof unsigned === 'number') { + // For goog.math.long compatibility + radix = unsigned, + unsigned = false; + } else { + unsigned = !! unsigned; + } + radix = radix || 10; + if (radix < 2 || 36 < radix) + throw RangeError('radix'); + + var p; + if ((p = str.indexOf('-')) > 0) + throw Error('interior hyphen'); + else if (p === 0) { + return fromString(str.substring(1), unsigned, radix).neg(); + } + + // Do several (8) digits each time through the loop, so as to + // minimize the calls to the very expensive emulated div. + var radixToPower = fromNumber(pow_dbl(radix, 8)); + + var result = ZERO; + for (var i = 0; i < str.length; i += 8) { + var size = Math.min(8, str.length - i), + value = parseInt(str.substring(i, i + size), radix); + if (size < 8) { + var power = fromNumber(pow_dbl(radix, size)); + result = result.mul(power).add(fromNumber(value)); + } else { + result = result.mul(radixToPower); + result = result.add(fromNumber(value)); + } + } + result.unsigned = unsigned; + return result; + } + + /** + * Returns a Long representation of the given string, written using the specified radix. + * @function + * @param {string} str The textual representation of the Long + * @param {(boolean|number)=} unsigned Whether unsigned or not, defaults to `false` for signed + * @param {number=} radix The radix in which the text is written (2-36), defaults to 10 + * @returns {!Long} The corresponding Long value + */ + Long.fromString = fromString; + + /** + * @function + * @param {!Long|number|string|!{low: number, high: number, unsigned: boolean}} val + * @returns {!Long} + * @inner + */ + function fromValue(val) { + if (val /* is compatible */ instanceof Long) + return val; + if (typeof val === 'number') + return fromNumber(val); + if (typeof val === 'string') + return fromString(val); + // Throws for non-objects, converts non-instanceof Long: + return fromBits(val.low, val.high, val.unsigned); + } + + /** + * Converts the specified value to a Long. + * @function + * @param {!Long|number|string|!{low: number, high: number, unsigned: boolean}} val Value + * @returns {!Long} + */ + Long.fromValue = fromValue; + + // NOTE: the compiler should inline these constant values below and then remove these variables, so there should be + // no runtime penalty for these. + + /** + * @type {number} + * @const + * @inner + */ + var TWO_PWR_16_DBL = 1 << 16; + + /** + * @type {number} + * @const + * @inner + */ + var TWO_PWR_24_DBL = 1 << 24; + + /** + * @type {number} + * @const + * @inner + */ + var TWO_PWR_32_DBL = TWO_PWR_16_DBL * TWO_PWR_16_DBL; + + /** + * @type {number} + * @const + * @inner + */ + var TWO_PWR_64_DBL = TWO_PWR_32_DBL * TWO_PWR_32_DBL; + + /** + * @type {number} + * @const + * @inner + */ + var TWO_PWR_63_DBL = TWO_PWR_64_DBL / 2; + + /** + * @type {!Long} + * @const + * @inner + */ + var TWO_PWR_24 = fromInt(TWO_PWR_24_DBL); + + /** + * @type {!Long} + * @inner + */ + var ZERO = fromInt(0); + + /** + * Signed zero. + * @type {!Long} + */ + Long.ZERO = ZERO; + + /** + * @type {!Long} + * @inner + */ + var UZERO = fromInt(0, true); + + /** + * Unsigned zero. + * @type {!Long} + */ + Long.UZERO = UZERO; + + /** + * @type {!Long} + * @inner + */ + var ONE = fromInt(1); + + /** + * Signed one. + * @type {!Long} + */ + Long.ONE = ONE; + + /** + * @type {!Long} + * @inner + */ + var UONE = fromInt(1, true); + + /** + * Unsigned one. + * @type {!Long} + */ + Long.UONE = UONE; + + /** + * @type {!Long} + * @inner + */ + var NEG_ONE = fromInt(-1); + + /** + * Signed negative one. + * @type {!Long} + */ + Long.NEG_ONE = NEG_ONE; + + /** + * @type {!Long} + * @inner + */ + var MAX_VALUE = fromBits(0xFFFFFFFF|0, 0x7FFFFFFF|0, false); + + /** + * Maximum signed value. + * @type {!Long} + */ + Long.MAX_VALUE = MAX_VALUE; + + /** + * @type {!Long} + * @inner + */ + var MAX_UNSIGNED_VALUE = fromBits(0xFFFFFFFF|0, 0xFFFFFFFF|0, true); + + /** + * Maximum unsigned value. + * @type {!Long} + */ + Long.MAX_UNSIGNED_VALUE = MAX_UNSIGNED_VALUE; + + /** + * @type {!Long} + * @inner + */ + var MIN_VALUE = fromBits(0, 0x80000000|0, false); + + /** + * Minimum signed value. + * @type {!Long} + */ + Long.MIN_VALUE = MIN_VALUE; + + /** + * @alias Long.prototype + * @inner + */ + var LongPrototype = Long.prototype; + + /** + * Converts the Long to a 32 bit integer, assuming it is a 32 bit integer. + * @returns {number} + */ + LongPrototype.toInt = function toInt() { + return this.unsigned ? this.low >>> 0 : this.low; + }; + + /** + * Converts the Long to a the nearest floating-point representation of this value (double, 53 bit mantissa). + * @returns {number} + */ + LongPrototype.toNumber = function toNumber() { + if (this.unsigned) + return ((this.high >>> 0) * TWO_PWR_32_DBL) + (this.low >>> 0); + return this.high * TWO_PWR_32_DBL + (this.low >>> 0); + }; + + /** + * Converts the Long to a string written in the specified radix. + * @param {number=} radix Radix (2-36), defaults to 10 + * @returns {string} + * @override + * @throws {RangeError} If `radix` is out of range + */ + LongPrototype.toString = function toString(radix) { + radix = radix || 10; + if (radix < 2 || 36 < radix) + throw RangeError('radix'); + if (this.isZero()) + return '0'; + if (this.isNegative()) { // Unsigned Longs are never negative + if (this.eq(MIN_VALUE)) { + // We need to change the Long value before it can be negated, so we remove + // the bottom-most digit in this base and then recurse to do the rest. + var radixLong = fromNumber(radix), + div = this.div(radixLong), + rem1 = div.mul(radixLong).sub(this); + return div.toString(radix) + rem1.toInt().toString(radix); + } else + return '-' + this.neg().toString(radix); + } + + // Do several (6) digits each time through the loop, so as to + // minimize the calls to the very expensive emulated div. + var radixToPower = fromNumber(pow_dbl(radix, 6), this.unsigned), + rem = this; + var result = ''; + while (true) { + var remDiv = rem.div(radixToPower), + intval = rem.sub(remDiv.mul(radixToPower)).toInt() >>> 0, + digits = intval.toString(radix); + rem = remDiv; + if (rem.isZero()) + return digits + result; + else { + while (digits.length < 6) + digits = '0' + digits; + result = '' + digits + result; + } + } + }; + + /** + * Gets the high 32 bits as a signed integer. + * @returns {number} Signed high bits + */ + LongPrototype.getHighBits = function getHighBits() { + return this.high; + }; + + /** + * Gets the high 32 bits as an unsigned integer. + * @returns {number} Unsigned high bits + */ + LongPrototype.getHighBitsUnsigned = function getHighBitsUnsigned() { + return this.high >>> 0; + }; + + /** + * Gets the low 32 bits as a signed integer. + * @returns {number} Signed low bits + */ + LongPrototype.getLowBits = function getLowBits() { + return this.low; + }; + + /** + * Gets the low 32 bits as an unsigned integer. + * @returns {number} Unsigned low bits + */ + LongPrototype.getLowBitsUnsigned = function getLowBitsUnsigned() { + return this.low >>> 0; + }; + + /** + * Gets the number of bits needed to represent the absolute value of this Long. + * @returns {number} + */ + LongPrototype.getNumBitsAbs = function getNumBitsAbs() { + if (this.isNegative()) // Unsigned Longs are never negative + return this.eq(MIN_VALUE) ? 64 : this.neg().getNumBitsAbs(); + var val = this.high != 0 ? this.high : this.low; + for (var bit = 31; bit > 0; bit--) + if ((val & (1 << bit)) != 0) + break; + return this.high != 0 ? bit + 33 : bit + 1; + }; + + /** + * Tests if this Long's value equals zero. + * @returns {boolean} + */ + LongPrototype.isZero = function isZero() { + return this.high === 0 && this.low === 0; + }; + + /** + * Tests if this Long's value is negative. + * @returns {boolean} + */ + LongPrototype.isNegative = function isNegative() { + return !this.unsigned && this.high < 0; + }; + + /** + * Tests if this Long's value is positive. + * @returns {boolean} + */ + LongPrototype.isPositive = function isPositive() { + return this.unsigned || this.high >= 0; + }; + + /** + * Tests if this Long's value is odd. + * @returns {boolean} + */ + LongPrototype.isOdd = function isOdd() { + return (this.low & 1) === 1; + }; + + /** + * Tests if this Long's value is even. + * @returns {boolean} + */ + LongPrototype.isEven = function isEven() { + return (this.low & 1) === 0; + }; + + /** + * Tests if this Long's value equals the specified's. + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ + LongPrototype.equals = function equals(other) { + if (!isLong(other)) + other = fromValue(other); + if (this.unsigned !== other.unsigned && (this.high >>> 31) === 1 && (other.high >>> 31) === 1) + return false; + return this.high === other.high && this.low === other.low; + }; + + /** + * Tests if this Long's value equals the specified's. This is an alias of {@link Long#equals}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ + LongPrototype.eq = LongPrototype.equals; + + /** + * Tests if this Long's value differs from the specified's. + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ + LongPrototype.notEquals = function notEquals(other) { + return !this.eq(/* validates */ other); + }; + + /** + * Tests if this Long's value differs from the specified's. This is an alias of {@link Long#notEquals}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ + LongPrototype.neq = LongPrototype.notEquals; + + /** + * Tests if this Long's value is less than the specified's. + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ + LongPrototype.lessThan = function lessThan(other) { + return this.comp(/* validates */ other) < 0; + }; + + /** + * Tests if this Long's value is less than the specified's. This is an alias of {@link Long#lessThan}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ + LongPrototype.lt = LongPrototype.lessThan; + + /** + * Tests if this Long's value is less than or equal the specified's. + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ + LongPrototype.lessThanOrEqual = function lessThanOrEqual(other) { + return this.comp(/* validates */ other) <= 0; + }; + + /** + * Tests if this Long's value is less than or equal the specified's. This is an alias of {@link Long#lessThanOrEqual}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ + LongPrototype.lte = LongPrototype.lessThanOrEqual; + + /** + * Tests if this Long's value is greater than the specified's. + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ + LongPrototype.greaterThan = function greaterThan(other) { + return this.comp(/* validates */ other) > 0; + }; + + /** + * Tests if this Long's value is greater than the specified's. This is an alias of {@link Long#greaterThan}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ + LongPrototype.gt = LongPrototype.greaterThan; + + /** + * Tests if this Long's value is greater than or equal the specified's. + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ + LongPrototype.greaterThanOrEqual = function greaterThanOrEqual(other) { + return this.comp(/* validates */ other) >= 0; + }; + + /** + * Tests if this Long's value is greater than or equal the specified's. This is an alias of {@link Long#greaterThanOrEqual}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ + LongPrototype.gte = LongPrototype.greaterThanOrEqual; + + /** + * Compares this Long's value with the specified's. + * @param {!Long|number|string} other Other value + * @returns {number} 0 if they are the same, 1 if the this is greater and -1 + * if the given one is greater + */ + LongPrototype.compare = function compare(other) { + if (!isLong(other)) + other = fromValue(other); + if (this.eq(other)) + return 0; + var thisNeg = this.isNegative(), + otherNeg = other.isNegative(); + if (thisNeg && !otherNeg) + return -1; + if (!thisNeg && otherNeg) + return 1; + // At this point the sign bits are the same + if (!this.unsigned) + return this.sub(other).isNegative() ? -1 : 1; + // Both are positive if at least one is unsigned + return (other.high >>> 0) > (this.high >>> 0) || (other.high === this.high && (other.low >>> 0) > (this.low >>> 0)) ? -1 : 1; + }; + + /** + * Compares this Long's value with the specified's. This is an alias of {@link Long#compare}. + * @function + * @param {!Long|number|string} other Other value + * @returns {number} 0 if they are the same, 1 if the this is greater and -1 + * if the given one is greater + */ + LongPrototype.comp = LongPrototype.compare; + + /** + * Negates this Long's value. + * @returns {!Long} Negated Long + */ + LongPrototype.negate = function negate() { + if (!this.unsigned && this.eq(MIN_VALUE)) + return MIN_VALUE; + return this.not().add(ONE); + }; + + /** + * Negates this Long's value. This is an alias of {@link Long#negate}. + * @function + * @returns {!Long} Negated Long + */ + LongPrototype.neg = LongPrototype.negate; + + /** + * Returns the sum of this and the specified Long. + * @param {!Long|number|string} addend Addend + * @returns {!Long} Sum + */ + LongPrototype.add = function add(addend) { + if (!isLong(addend)) + addend = fromValue(addend); + + // Divide each number into 4 chunks of 16 bits, and then sum the chunks. + + var a48 = this.high >>> 16; + var a32 = this.high & 0xFFFF; + var a16 = this.low >>> 16; + var a00 = this.low & 0xFFFF; + + var b48 = addend.high >>> 16; + var b32 = addend.high & 0xFFFF; + var b16 = addend.low >>> 16; + var b00 = addend.low & 0xFFFF; + + var c48 = 0, c32 = 0, c16 = 0, c00 = 0; + c00 += a00 + b00; + c16 += c00 >>> 16; + c00 &= 0xFFFF; + c16 += a16 + b16; + c32 += c16 >>> 16; + c16 &= 0xFFFF; + c32 += a32 + b32; + c48 += c32 >>> 16; + c32 &= 0xFFFF; + c48 += a48 + b48; + c48 &= 0xFFFF; + return fromBits((c16 << 16) | c00, (c48 << 16) | c32, this.unsigned); + }; + + /** + * Returns the difference of this and the specified Long. + * @param {!Long|number|string} subtrahend Subtrahend + * @returns {!Long} Difference + */ + LongPrototype.subtract = function subtract(subtrahend) { + if (!isLong(subtrahend)) + subtrahend = fromValue(subtrahend); + return this.add(subtrahend.neg()); + }; + + /** + * Returns the difference of this and the specified Long. This is an alias of {@link Long#subtract}. + * @function + * @param {!Long|number|string} subtrahend Subtrahend + * @returns {!Long} Difference + */ + LongPrototype.sub = LongPrototype.subtract; + + /** + * Returns the product of this and the specified Long. + * @param {!Long|number|string} multiplier Multiplier + * @returns {!Long} Product + */ + LongPrototype.multiply = function multiply(multiplier) { + if (this.isZero()) + return ZERO; + if (!isLong(multiplier)) + multiplier = fromValue(multiplier); + if (multiplier.isZero()) + return ZERO; + if (this.eq(MIN_VALUE)) + return multiplier.isOdd() ? MIN_VALUE : ZERO; + if (multiplier.eq(MIN_VALUE)) + return this.isOdd() ? MIN_VALUE : ZERO; + + if (this.isNegative()) { + if (multiplier.isNegative()) + return this.neg().mul(multiplier.neg()); + else + return this.neg().mul(multiplier).neg(); + } else if (multiplier.isNegative()) + return this.mul(multiplier.neg()).neg(); + + // If both longs are small, use float multiplication + if (this.lt(TWO_PWR_24) && multiplier.lt(TWO_PWR_24)) + return fromNumber(this.toNumber() * multiplier.toNumber(), this.unsigned); + + // Divide each long into 4 chunks of 16 bits, and then add up 4x4 products. + // We can skip products that would overflow. + + var a48 = this.high >>> 16; + var a32 = this.high & 0xFFFF; + var a16 = this.low >>> 16; + var a00 = this.low & 0xFFFF; + + var b48 = multiplier.high >>> 16; + var b32 = multiplier.high & 0xFFFF; + var b16 = multiplier.low >>> 16; + var b00 = multiplier.low & 0xFFFF; + + var c48 = 0, c32 = 0, c16 = 0, c00 = 0; + c00 += a00 * b00; + c16 += c00 >>> 16; + c00 &= 0xFFFF; + c16 += a16 * b00; + c32 += c16 >>> 16; + c16 &= 0xFFFF; + c16 += a00 * b16; + c32 += c16 >>> 16; + c16 &= 0xFFFF; + c32 += a32 * b00; + c48 += c32 >>> 16; + c32 &= 0xFFFF; + c32 += a16 * b16; + c48 += c32 >>> 16; + c32 &= 0xFFFF; + c32 += a00 * b32; + c48 += c32 >>> 16; + c32 &= 0xFFFF; + c48 += a48 * b00 + a32 * b16 + a16 * b32 + a00 * b48; + c48 &= 0xFFFF; + return fromBits((c16 << 16) | c00, (c48 << 16) | c32, this.unsigned); + }; + + /** + * Returns the product of this and the specified Long. This is an alias of {@link Long#multiply}. + * @function + * @param {!Long|number|string} multiplier Multiplier + * @returns {!Long} Product + */ + LongPrototype.mul = LongPrototype.multiply; + + /** + * Returns this Long divided by the specified. The result is signed if this Long is signed or + * unsigned if this Long is unsigned. + * @param {!Long|number|string} divisor Divisor + * @returns {!Long} Quotient + */ + LongPrototype.divide = function divide(divisor) { + if (!isLong(divisor)) + divisor = fromValue(divisor); + if (divisor.isZero()) + throw Error('division by zero'); + if (this.isZero()) + return this.unsigned ? UZERO : ZERO; + var approx, rem, res; + if (!this.unsigned) { + // This section is only relevant for signed longs and is derived from the + // closure library as a whole. + if (this.eq(MIN_VALUE)) { + if (divisor.eq(ONE) || divisor.eq(NEG_ONE)) + return MIN_VALUE; // recall that -MIN_VALUE == MIN_VALUE + else if (divisor.eq(MIN_VALUE)) + return ONE; + else { + // At this point, we have |other| >= 2, so |this/other| < |MIN_VALUE|. + var halfThis = this.shr(1); + approx = halfThis.div(divisor).shl(1); + if (approx.eq(ZERO)) { + return divisor.isNegative() ? ONE : NEG_ONE; + } else { + rem = this.sub(divisor.mul(approx)); + res = approx.add(rem.div(divisor)); + return res; + } + } + } else if (divisor.eq(MIN_VALUE)) + return this.unsigned ? UZERO : ZERO; + if (this.isNegative()) { + if (divisor.isNegative()) + return this.neg().div(divisor.neg()); + return this.neg().div(divisor).neg(); + } else if (divisor.isNegative()) + return this.div(divisor.neg()).neg(); + res = ZERO; + } else { + // The algorithm below has not been made for unsigned longs. It's therefore + // required to take special care of the MSB prior to running it. + if (!divisor.unsigned) + divisor = divisor.toUnsigned(); + if (divisor.gt(this)) + return UZERO; + if (divisor.gt(this.shru(1))) // 15 >>> 1 = 7 ; with divisor = 8 ; true + return UONE; + res = UZERO; + } + + // Repeat the following until the remainder is less than other: find a + // floating-point that approximates remainder / other *from below*, add this + // into the result, and subtract it from the remainder. It is critical that + // the approximate value is less than or equal to the real value so that the + // remainder never becomes negative. + rem = this; + while (rem.gte(divisor)) { + // Approximate the result of division. This may be a little greater or + // smaller than the actual value. + approx = Math.max(1, Math.floor(rem.toNumber() / divisor.toNumber())); + + // We will tweak the approximate result by changing it in the 48-th digit or + // the smallest non-fractional digit, whichever is larger. + var log2 = Math.ceil(Math.log(approx) / Math.LN2), + delta = (log2 <= 48) ? 1 : pow_dbl(2, log2 - 48), + + // Decrease the approximation until it is smaller than the remainder. Note + // that if it is too large, the product overflows and is negative. + approxRes = fromNumber(approx), + approxRem = approxRes.mul(divisor); + while (approxRem.isNegative() || approxRem.gt(rem)) { + approx -= delta; + approxRes = fromNumber(approx, this.unsigned); + approxRem = approxRes.mul(divisor); + } + + // We know the answer can't be zero... and actually, zero would cause + // infinite recursion since we would make no progress. + if (approxRes.isZero()) + approxRes = ONE; + + res = res.add(approxRes); + rem = rem.sub(approxRem); + } + return res; + }; + + /** + * Returns this Long divided by the specified. This is an alias of {@link Long#divide}. + * @function + * @param {!Long|number|string} divisor Divisor + * @returns {!Long} Quotient + */ + LongPrototype.div = LongPrototype.divide; + + /** + * Returns this Long modulo the specified. + * @param {!Long|number|string} divisor Divisor + * @returns {!Long} Remainder + */ + LongPrototype.modulo = function modulo(divisor) { + if (!isLong(divisor)) + divisor = fromValue(divisor); + return this.sub(this.div(divisor).mul(divisor)); + }; + + /** + * Returns this Long modulo the specified. This is an alias of {@link Long#modulo}. + * @function + * @param {!Long|number|string} divisor Divisor + * @returns {!Long} Remainder + */ + LongPrototype.mod = LongPrototype.modulo; + + /** + * Returns the bitwise NOT of this Long. + * @returns {!Long} + */ + LongPrototype.not = function not() { + return fromBits(~this.low, ~this.high, this.unsigned); + }; + + /** + * Returns the bitwise AND of this Long and the specified. + * @param {!Long|number|string} other Other Long + * @returns {!Long} + */ + LongPrototype.and = function and(other) { + if (!isLong(other)) + other = fromValue(other); + return fromBits(this.low & other.low, this.high & other.high, this.unsigned); + }; + + /** + * Returns the bitwise OR of this Long and the specified. + * @param {!Long|number|string} other Other Long + * @returns {!Long} + */ + LongPrototype.or = function or(other) { + if (!isLong(other)) + other = fromValue(other); + return fromBits(this.low | other.low, this.high | other.high, this.unsigned); + }; + + /** + * Returns the bitwise XOR of this Long and the given one. + * @param {!Long|number|string} other Other Long + * @returns {!Long} + */ + LongPrototype.xor = function xor(other) { + if (!isLong(other)) + other = fromValue(other); + return fromBits(this.low ^ other.low, this.high ^ other.high, this.unsigned); + }; + + /** + * Returns this Long with bits shifted to the left by the given amount. + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long + */ + LongPrototype.shiftLeft = function shiftLeft(numBits) { + if (isLong(numBits)) + numBits = numBits.toInt(); + if ((numBits &= 63) === 0) + return this; + else if (numBits < 32) + return fromBits(this.low << numBits, (this.high << numBits) | (this.low >>> (32 - numBits)), this.unsigned); + else + return fromBits(0, this.low << (numBits - 32), this.unsigned); + }; + + /** + * Returns this Long with bits shifted to the left by the given amount. This is an alias of {@link Long#shiftLeft}. + * @function + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long + */ + LongPrototype.shl = LongPrototype.shiftLeft; + + /** + * Returns this Long with bits arithmetically shifted to the right by the given amount. + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long + */ + LongPrototype.shiftRight = function shiftRight(numBits) { + if (isLong(numBits)) + numBits = numBits.toInt(); + if ((numBits &= 63) === 0) + return this; + else if (numBits < 32) + return fromBits((this.low >>> numBits) | (this.high << (32 - numBits)), this.high >> numBits, this.unsigned); + else + return fromBits(this.high >> (numBits - 32), this.high >= 0 ? 0 : -1, this.unsigned); + }; + + /** + * Returns this Long with bits arithmetically shifted to the right by the given amount. This is an alias of {@link Long#shiftRight}. + * @function + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long + */ + LongPrototype.shr = LongPrototype.shiftRight; + + /** + * Returns this Long with bits logically shifted to the right by the given amount. + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long + */ + LongPrototype.shiftRightUnsigned = function shiftRightUnsigned(numBits) { + if (isLong(numBits)) + numBits = numBits.toInt(); + numBits &= 63; + if (numBits === 0) + return this; + else { + var high = this.high; + if (numBits < 32) { + var low = this.low; + return fromBits((low >>> numBits) | (high << (32 - numBits)), high >>> numBits, this.unsigned); + } else if (numBits === 32) + return fromBits(high, 0, this.unsigned); + else + return fromBits(high >>> (numBits - 32), 0, this.unsigned); + } + }; + + /** + * Returns this Long with bits logically shifted to the right by the given amount. This is an alias of {@link Long#shiftRightUnsigned}. + * @function + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long + */ + LongPrototype.shru = LongPrototype.shiftRightUnsigned; + + /** + * Converts this Long to signed. + * @returns {!Long} Signed long + */ + LongPrototype.toSigned = function toSigned() { + if (!this.unsigned) + return this; + return fromBits(this.low, this.high, false); + }; + + /** + * Converts this Long to unsigned. + * @returns {!Long} Unsigned long + */ + LongPrototype.toUnsigned = function toUnsigned() { + if (this.unsigned) + return this; + return fromBits(this.low, this.high, true); + }; + + /** + * Converts this Long to its byte representation. + * @param {boolean=} le Whether little or big endian, defaults to big endian + * @returns {!Array.} Byte representation + */ + LongPrototype.toBytes = function(le) { + return le ? this.toBytesLE() : this.toBytesBE(); + }; + + /** + * Converts this Long to its little endian byte representation. + * @returns {!Array.} Little endian byte representation + */ + LongPrototype.toBytesLE = function() { + var hi = this.high, + lo = this.low; + return [ + lo & 0xff, + (lo >>> 8) & 0xff, + (lo >>> 16) & 0xff, + (lo >>> 24) & 0xff, + hi & 0xff, + (hi >>> 8) & 0xff, + (hi >>> 16) & 0xff, + (hi >>> 24) & 0xff + ]; + }; + + /** + * Converts this Long to its big endian byte representation. + * @returns {!Array.} Big endian byte representation + */ + LongPrototype.toBytesBE = function() { + var hi = this.high, + lo = this.low; + return [ + (hi >>> 24) & 0xff, + (hi >>> 16) & 0xff, + (hi >>> 8) & 0xff, + hi & 0xff, + (lo >>> 24) & 0xff, + (lo >>> 16) & 0xff, + (lo >>> 8) & 0xff, + lo & 0xff + ]; + }; + + return Long; + }); + }); + + var bytebuffer = createCommonjsModule(function (module) { + /* + Copyright 2013-2014 Daniel Wirtz + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + + /** + * @license bytebuffer.js (c) 2015 Daniel Wirtz + * Backing buffer: ArrayBuffer, Accessor: Uint8Array + * Released under the Apache License, Version 2.0 + * see: https://github.com/dcodeIO/bytebuffer.js for details + */ + (function(global, factory) { + + /* AMD */ if (typeof undefined === 'function' && undefined["amd"]) + undefined(["long"], factory); + /* CommonJS */ else if (typeof commonjsRequire === 'function' && 'object' === "object" && module && module["exports"]) + module['exports'] = (function() { + var Long; try { Long = long_1; } catch (e) {} + return factory(Long); + })(); + /* Global */ else + (global["dcodeIO"] = global["dcodeIO"] || {})["ByteBuffer"] = factory(global["dcodeIO"]["Long"]); + + })(commonjsGlobal, function(Long) { + "use strict"; + + /** + * Constructs a new ByteBuffer. + * @class The swiss army knife for binary data in JavaScript. + * @exports ByteBuffer + * @constructor + * @param {number=} capacity Initial capacity. Defaults to {@link ByteBuffer.DEFAULT_CAPACITY}. + * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to + * {@link ByteBuffer.DEFAULT_ENDIAN}. + * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to + * {@link ByteBuffer.DEFAULT_NOASSERT}. + * @expose + */ + var ByteBuffer = function(capacity, littleEndian, noAssert) { + if (typeof capacity === 'undefined') + capacity = ByteBuffer.DEFAULT_CAPACITY; + if (typeof littleEndian === 'undefined') + littleEndian = ByteBuffer.DEFAULT_ENDIAN; + if (typeof noAssert === 'undefined') + noAssert = ByteBuffer.DEFAULT_NOASSERT; + if (!noAssert) { + capacity = capacity | 0; + if (capacity < 0) + throw RangeError("Illegal capacity"); + littleEndian = !!littleEndian; + noAssert = !!noAssert; + } + + /** + * Backing ArrayBuffer. + * @type {!ArrayBuffer} + * @expose + */ + this.buffer = capacity === 0 ? EMPTY_BUFFER : new ArrayBuffer(capacity); + + /** + * Uint8Array utilized to manipulate the backing buffer. Becomes `null` if the backing buffer has a capacity of `0`. + * @type {?Uint8Array} + * @expose + */ + this.view = capacity === 0 ? null : new Uint8Array(this.buffer); + + /** + * Absolute read/write offset. + * @type {number} + * @expose + * @see ByteBuffer#flip + * @see ByteBuffer#clear + */ + this.offset = 0; + + /** + * Marked offset. + * @type {number} + * @expose + * @see ByteBuffer#mark + * @see ByteBuffer#reset + */ + this.markedOffset = -1; + + /** + * Absolute limit of the contained data. Set to the backing buffer's capacity upon allocation. + * @type {number} + * @expose + * @see ByteBuffer#flip + * @see ByteBuffer#clear + */ + this.limit = capacity; + + /** + * Whether to use little endian byte order, defaults to `false` for big endian. + * @type {boolean} + * @expose + */ + this.littleEndian = littleEndian; + + /** + * Whether to skip assertions of offsets and values, defaults to `false`. + * @type {boolean} + * @expose + */ + this.noAssert = noAssert; + }; + + /** + * ByteBuffer version. + * @type {string} + * @const + * @expose + */ + ByteBuffer.VERSION = "5.0.1"; + + /** + * Little endian constant that can be used instead of its boolean value. Evaluates to `true`. + * @type {boolean} + * @const + * @expose + */ + ByteBuffer.LITTLE_ENDIAN = true; + + /** + * Big endian constant that can be used instead of its boolean value. Evaluates to `false`. + * @type {boolean} + * @const + * @expose + */ + ByteBuffer.BIG_ENDIAN = false; + + /** + * Default initial capacity of `16`. + * @type {number} + * @expose + */ + ByteBuffer.DEFAULT_CAPACITY = 16; + + /** + * Default endianess of `false` for big endian. + * @type {boolean} + * @expose + */ + ByteBuffer.DEFAULT_ENDIAN = ByteBuffer.BIG_ENDIAN; + + /** + * Default no assertions flag of `false`. + * @type {boolean} + * @expose + */ + ByteBuffer.DEFAULT_NOASSERT = false; + + /** + * A `Long` class for representing a 64-bit two's-complement integer value. May be `null` if Long.js has not been loaded + * and int64 support is not available. + * @type {?Long} + * @const + * @see https://github.com/dcodeIO/long.js + * @expose + */ + ByteBuffer.Long = Long || null; + + /** + * @alias ByteBuffer.prototype + * @inner + */ + var ByteBufferPrototype = ByteBuffer.prototype; + + /** + * An indicator used to reliably determine if an object is a ByteBuffer or not. + * @type {boolean} + * @const + * @expose + * @private + */ + ByteBufferPrototype.__isByteBuffer__; + + Object.defineProperty(ByteBufferPrototype, "__isByteBuffer__", { + value: true, + enumerable: false, + configurable: false + }); + + // helpers + + /** + * @type {!ArrayBuffer} + * @inner + */ + var EMPTY_BUFFER = new ArrayBuffer(0); + + /** + * String.fromCharCode reference for compile-time renaming. + * @type {function(...number):string} + * @inner + */ + var stringFromCharCode = String.fromCharCode; + + /** + * Creates a source function for a string. + * @param {string} s String to read from + * @returns {function():number|null} Source function returning the next char code respectively `null` if there are + * no more characters left. + * @throws {TypeError} If the argument is invalid + * @inner + */ + function stringSource(s) { + var i=0; return function() { + return i < s.length ? s.charCodeAt(i++) : null; + }; + } + + /** + * Creates a destination function for a string. + * @returns {function(number=):undefined|string} Destination function successively called with the next char code. + * Returns the final string when called without arguments. + * @inner + */ + function stringDestination() { + var cs = [], ps = []; return function() { + if (arguments.length === 0) + return ps.join('')+stringFromCharCode.apply(String, cs); + if (cs.length + arguments.length > 1024) + ps.push(stringFromCharCode.apply(String, cs)), + cs.length = 0; + Array.prototype.push.apply(cs, arguments); + }; + } + + /** + * Gets the accessor type. + * @returns {Function} `Buffer` under node.js, `Uint8Array` respectively `DataView` in the browser (classes) + * @expose + */ + ByteBuffer.accessor = function() { + return Uint8Array; + }; + /** + * Allocates a new ByteBuffer backed by a buffer of the specified capacity. + * @param {number=} capacity Initial capacity. Defaults to {@link ByteBuffer.DEFAULT_CAPACITY}. + * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to + * {@link ByteBuffer.DEFAULT_ENDIAN}. + * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to + * {@link ByteBuffer.DEFAULT_NOASSERT}. + * @returns {!ByteBuffer} + * @expose + */ + ByteBuffer.allocate = function(capacity, littleEndian, noAssert) { + return new ByteBuffer(capacity, littleEndian, noAssert); + }; + + /** + * Concatenates multiple ByteBuffers into one. + * @param {!Array.} buffers Buffers to concatenate + * @param {(string|boolean)=} encoding String encoding if `buffers` contains a string ("base64", "hex", "binary", + * defaults to "utf8") + * @param {boolean=} littleEndian Whether to use little or big endian byte order for the resulting ByteBuffer. Defaults + * to {@link ByteBuffer.DEFAULT_ENDIAN}. + * @param {boolean=} noAssert Whether to skip assertions of offsets and values for the resulting ByteBuffer. Defaults to + * {@link ByteBuffer.DEFAULT_NOASSERT}. + * @returns {!ByteBuffer} Concatenated ByteBuffer + * @expose + */ + ByteBuffer.concat = function(buffers, encoding, littleEndian, noAssert) { + if (typeof encoding === 'boolean' || typeof encoding !== 'string') { + noAssert = littleEndian; + littleEndian = encoding; + encoding = undefined; + } + var capacity = 0; + for (var i=0, k=buffers.length, length; i 0) capacity += length; + } + if (capacity === 0) + return new ByteBuffer(0, littleEndian, noAssert); + var bb = new ByteBuffer(capacity, littleEndian, noAssert), + bi; + i=0; while (i} buffer Anything that can be wrapped + * @param {(string|boolean)=} encoding String encoding if `buffer` is a string ("base64", "hex", "binary", defaults to + * "utf8") + * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to + * {@link ByteBuffer.DEFAULT_ENDIAN}. + * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to + * {@link ByteBuffer.DEFAULT_NOASSERT}. + * @returns {!ByteBuffer} A ByteBuffer wrapping `buffer` + * @expose + */ + ByteBuffer.wrap = function(buffer, encoding, littleEndian, noAssert) { + if (typeof encoding !== 'string') { + noAssert = littleEndian; + littleEndian = encoding; + encoding = undefined; + } + if (typeof buffer === 'string') { + if (typeof encoding === 'undefined') + encoding = "utf8"; + switch (encoding) { + case "base64": + return ByteBuffer.fromBase64(buffer, littleEndian); + case "hex": + return ByteBuffer.fromHex(buffer, littleEndian); + case "binary": + return ByteBuffer.fromBinary(buffer, littleEndian); + case "utf8": + return ByteBuffer.fromUTF8(buffer, littleEndian); + case "debug": + return ByteBuffer.fromDebug(buffer, littleEndian); + default: + throw Error("Unsupported encoding: "+encoding); + } + } + if (buffer === null || typeof buffer !== 'object') + throw TypeError("Illegal buffer"); + var bb; + if (ByteBuffer.isByteBuffer(buffer)) { + bb = ByteBufferPrototype.clone.call(buffer); + bb.markedOffset = -1; + return bb; + } + if (buffer instanceof Uint8Array) { // Extract ArrayBuffer from Uint8Array + bb = new ByteBuffer(0, littleEndian, noAssert); + if (buffer.length > 0) { // Avoid references to more than one EMPTY_BUFFER + bb.buffer = buffer.buffer; + bb.offset = buffer.byteOffset; + bb.limit = buffer.byteOffset + buffer.byteLength; + bb.view = new Uint8Array(buffer.buffer); + } + } else if (buffer instanceof ArrayBuffer) { // Reuse ArrayBuffer + bb = new ByteBuffer(0, littleEndian, noAssert); + if (buffer.byteLength > 0) { + bb.buffer = buffer; + bb.offset = 0; + bb.limit = buffer.byteLength; + bb.view = buffer.byteLength > 0 ? new Uint8Array(buffer) : null; + } + } else if (Object.prototype.toString.call(buffer) === "[object Array]") { // Create from octets + bb = new ByteBuffer(buffer.length, littleEndian, noAssert); + bb.limit = buffer.length; + for (var i=0; i} value Array of booleans to write + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `length` if omitted. + * @returns {!ByteBuffer} + * @expose + */ + ByteBufferPrototype.writeBitSet = function(value, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (!(value instanceof Array)) + throw TypeError("Illegal BitSet: Not an array"); + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + + var start = offset, + bits = value.length, + bytes = (bits >> 3), + bit = 0, + k; + + offset += this.writeVarint32(bits,offset); + + while(bytes--) { + k = (!!value[bit++] & 1) | + ((!!value[bit++] & 1) << 1) | + ((!!value[bit++] & 1) << 2) | + ((!!value[bit++] & 1) << 3) | + ((!!value[bit++] & 1) << 4) | + ((!!value[bit++] & 1) << 5) | + ((!!value[bit++] & 1) << 6) | + ((!!value[bit++] & 1) << 7); + this.writeByte(k,offset++); + } + + if(bit < bits) { + var m = 0; k = 0; + while(bit < bits) k = k | ((!!value[bit++] & 1) << (m++)); + this.writeByte(k,offset++); + } + + if (relative) { + this.offset = offset; + return this; + } + return offset - start; + }; + + /** + * Reads a BitSet as an array of booleans. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `length` if omitted. + * @returns {Array + * @expose + */ + ByteBufferPrototype.readBitSet = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + + var ret = this.readVarint32(offset), + bits = ret.value, + bytes = (bits >> 3), + bit = 0, + value = [], + k; + + offset += ret.length; + + while(bytes--) { + k = this.readByte(offset++); + value[bit++] = !!(k & 0x01); + value[bit++] = !!(k & 0x02); + value[bit++] = !!(k & 0x04); + value[bit++] = !!(k & 0x08); + value[bit++] = !!(k & 0x10); + value[bit++] = !!(k & 0x20); + value[bit++] = !!(k & 0x40); + value[bit++] = !!(k & 0x80); + } + + if(bit < bits) { + var m = 0; + k = this.readByte(offset++); + while(bit < bits) value[bit++] = !!((k >> (m++)) & 1); + } + + if (relative) { + this.offset = offset; + } + return value; + }; + /** + * Reads the specified number of bytes. + * @param {number} length Number of bytes to read + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `length` if omitted. + * @returns {!ByteBuffer} + * @expose + */ + ByteBufferPrototype.readBytes = function(length, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + length > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+length+") <= "+this.buffer.byteLength); + } + var slice = this.slice(offset, offset + length); + if (relative) this.offset += length; + return slice; + }; + + /** + * Writes a payload of bytes. This is an alias of {@link ByteBuffer#append}. + * @function + * @param {!ByteBuffer|!ArrayBuffer|!Uint8Array|string} source Data to write. If `source` is a ByteBuffer, its offsets + * will be modified according to the performed read operation. + * @param {(string|number)=} encoding Encoding if `data` is a string ("base64", "hex", "binary", defaults to "utf8") + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.writeBytes = ByteBufferPrototype.append; + + // types/ints/int8 + + /** + * Writes an 8bit signed integer. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.writeInt8 = function(value, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof value !== 'number' || value % 1 !== 0) + throw TypeError("Illegal value: "+value+" (not an integer)"); + value |= 0; + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + offset += 1; + var capacity0 = this.buffer.byteLength; + if (offset > capacity0) + this.resize((capacity0 *= 2) > offset ? capacity0 : offset); + offset -= 1; + this.view[offset] = value; + if (relative) this.offset += 1; + return this; + }; + + /** + * Writes an 8bit signed integer. This is an alias of {@link ByteBuffer#writeInt8}. + * @function + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.writeByte = ByteBufferPrototype.writeInt8; + + /** + * Reads an 8bit signed integer. + * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. + * @returns {number} Value read + * @expose + */ + ByteBufferPrototype.readInt8 = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 1 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+1+") <= "+this.buffer.byteLength); + } + var value = this.view[offset]; + if ((value & 0x80) === 0x80) value = -(0xFF - value + 1); // Cast to signed + if (relative) this.offset += 1; + return value; + }; + + /** + * Reads an 8bit signed integer. This is an alias of {@link ByteBuffer#readInt8}. + * @function + * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. + * @returns {number} Value read + * @expose + */ + ByteBufferPrototype.readByte = ByteBufferPrototype.readInt8; + + /** + * Writes an 8bit unsigned integer. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.writeUint8 = function(value, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof value !== 'number' || value % 1 !== 0) + throw TypeError("Illegal value: "+value+" (not an integer)"); + value >>>= 0; + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + offset += 1; + var capacity1 = this.buffer.byteLength; + if (offset > capacity1) + this.resize((capacity1 *= 2) > offset ? capacity1 : offset); + offset -= 1; + this.view[offset] = value; + if (relative) this.offset += 1; + return this; + }; + + /** + * Writes an 8bit unsigned integer. This is an alias of {@link ByteBuffer#writeUint8}. + * @function + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.writeUInt8 = ByteBufferPrototype.writeUint8; + + /** + * Reads an 8bit unsigned integer. + * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. + * @returns {number} Value read + * @expose + */ + ByteBufferPrototype.readUint8 = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 1 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+1+") <= "+this.buffer.byteLength); + } + var value = this.view[offset]; + if (relative) this.offset += 1; + return value; + }; + + /** + * Reads an 8bit unsigned integer. This is an alias of {@link ByteBuffer#readUint8}. + * @function + * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. + * @returns {number} Value read + * @expose + */ + ByteBufferPrototype.readUInt8 = ByteBufferPrototype.readUint8; + + // types/ints/int16 + + /** + * Writes a 16bit signed integer. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. + * @throws {TypeError} If `offset` or `value` is not a valid number + * @throws {RangeError} If `offset` is out of bounds + * @expose + */ + ByteBufferPrototype.writeInt16 = function(value, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof value !== 'number' || value % 1 !== 0) + throw TypeError("Illegal value: "+value+" (not an integer)"); + value |= 0; + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + offset += 2; + var capacity2 = this.buffer.byteLength; + if (offset > capacity2) + this.resize((capacity2 *= 2) > offset ? capacity2 : offset); + offset -= 2; + if (this.littleEndian) { + this.view[offset+1] = (value & 0xFF00) >>> 8; + this.view[offset ] = value & 0x00FF; + } else { + this.view[offset] = (value & 0xFF00) >>> 8; + this.view[offset+1] = value & 0x00FF; + } + if (relative) this.offset += 2; + return this; + }; + + /** + * Writes a 16bit signed integer. This is an alias of {@link ByteBuffer#writeInt16}. + * @function + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. + * @throws {TypeError} If `offset` or `value` is not a valid number + * @throws {RangeError} If `offset` is out of bounds + * @expose + */ + ByteBufferPrototype.writeShort = ByteBufferPrototype.writeInt16; + + /** + * Reads a 16bit signed integer. + * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. + * @returns {number} Value read + * @throws {TypeError} If `offset` is not a valid number + * @throws {RangeError} If `offset` is out of bounds + * @expose + */ + ByteBufferPrototype.readInt16 = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 2 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+2+") <= "+this.buffer.byteLength); + } + var value = 0; + if (this.littleEndian) { + value = this.view[offset ]; + value |= this.view[offset+1] << 8; + } else { + value = this.view[offset ] << 8; + value |= this.view[offset+1]; + } + if ((value & 0x8000) === 0x8000) value = -(0xFFFF - value + 1); // Cast to signed + if (relative) this.offset += 2; + return value; + }; + + /** + * Reads a 16bit signed integer. This is an alias of {@link ByteBuffer#readInt16}. + * @function + * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. + * @returns {number} Value read + * @throws {TypeError} If `offset` is not a valid number + * @throws {RangeError} If `offset` is out of bounds + * @expose + */ + ByteBufferPrototype.readShort = ByteBufferPrototype.readInt16; + + /** + * Writes a 16bit unsigned integer. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. + * @throws {TypeError} If `offset` or `value` is not a valid number + * @throws {RangeError} If `offset` is out of bounds + * @expose + */ + ByteBufferPrototype.writeUint16 = function(value, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof value !== 'number' || value % 1 !== 0) + throw TypeError("Illegal value: "+value+" (not an integer)"); + value >>>= 0; + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + offset += 2; + var capacity3 = this.buffer.byteLength; + if (offset > capacity3) + this.resize((capacity3 *= 2) > offset ? capacity3 : offset); + offset -= 2; + if (this.littleEndian) { + this.view[offset+1] = (value & 0xFF00) >>> 8; + this.view[offset ] = value & 0x00FF; + } else { + this.view[offset] = (value & 0xFF00) >>> 8; + this.view[offset+1] = value & 0x00FF; + } + if (relative) this.offset += 2; + return this; + }; + + /** + * Writes a 16bit unsigned integer. This is an alias of {@link ByteBuffer#writeUint16}. + * @function + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. + * @throws {TypeError} If `offset` or `value` is not a valid number + * @throws {RangeError} If `offset` is out of bounds + * @expose + */ + ByteBufferPrototype.writeUInt16 = ByteBufferPrototype.writeUint16; + + /** + * Reads a 16bit unsigned integer. + * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. + * @returns {number} Value read + * @throws {TypeError} If `offset` is not a valid number + * @throws {RangeError} If `offset` is out of bounds + * @expose + */ + ByteBufferPrototype.readUint16 = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 2 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+2+") <= "+this.buffer.byteLength); + } + var value = 0; + if (this.littleEndian) { + value = this.view[offset ]; + value |= this.view[offset+1] << 8; + } else { + value = this.view[offset ] << 8; + value |= this.view[offset+1]; + } + if (relative) this.offset += 2; + return value; + }; + + /** + * Reads a 16bit unsigned integer. This is an alias of {@link ByteBuffer#readUint16}. + * @function + * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. + * @returns {number} Value read + * @throws {TypeError} If `offset` is not a valid number + * @throws {RangeError} If `offset` is out of bounds + * @expose + */ + ByteBufferPrototype.readUInt16 = ByteBufferPrototype.readUint16; + + // types/ints/int32 + + /** + * Writes a 32bit signed integer. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @expose + */ + ByteBufferPrototype.writeInt32 = function(value, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof value !== 'number' || value % 1 !== 0) + throw TypeError("Illegal value: "+value+" (not an integer)"); + value |= 0; + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + offset += 4; + var capacity4 = this.buffer.byteLength; + if (offset > capacity4) + this.resize((capacity4 *= 2) > offset ? capacity4 : offset); + offset -= 4; + if (this.littleEndian) { + this.view[offset+3] = (value >>> 24) & 0xFF; + this.view[offset+2] = (value >>> 16) & 0xFF; + this.view[offset+1] = (value >>> 8) & 0xFF; + this.view[offset ] = value & 0xFF; + } else { + this.view[offset ] = (value >>> 24) & 0xFF; + this.view[offset+1] = (value >>> 16) & 0xFF; + this.view[offset+2] = (value >>> 8) & 0xFF; + this.view[offset+3] = value & 0xFF; + } + if (relative) this.offset += 4; + return this; + }; + + /** + * Writes a 32bit signed integer. This is an alias of {@link ByteBuffer#writeInt32}. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @expose + */ + ByteBufferPrototype.writeInt = ByteBufferPrototype.writeInt32; + + /** + * Reads a 32bit signed integer. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @returns {number} Value read + * @expose + */ + ByteBufferPrototype.readInt32 = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 4 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+4+") <= "+this.buffer.byteLength); + } + var value = 0; + if (this.littleEndian) { + value = this.view[offset+2] << 16; + value |= this.view[offset+1] << 8; + value |= this.view[offset ]; + value += this.view[offset+3] << 24 >>> 0; + } else { + value = this.view[offset+1] << 16; + value |= this.view[offset+2] << 8; + value |= this.view[offset+3]; + value += this.view[offset ] << 24 >>> 0; + } + value |= 0; // Cast to signed + if (relative) this.offset += 4; + return value; + }; + + /** + * Reads a 32bit signed integer. This is an alias of {@link ByteBuffer#readInt32}. + * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `4` if omitted. + * @returns {number} Value read + * @expose + */ + ByteBufferPrototype.readInt = ByteBufferPrototype.readInt32; + + /** + * Writes a 32bit unsigned integer. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @expose + */ + ByteBufferPrototype.writeUint32 = function(value, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof value !== 'number' || value % 1 !== 0) + throw TypeError("Illegal value: "+value+" (not an integer)"); + value >>>= 0; + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + offset += 4; + var capacity5 = this.buffer.byteLength; + if (offset > capacity5) + this.resize((capacity5 *= 2) > offset ? capacity5 : offset); + offset -= 4; + if (this.littleEndian) { + this.view[offset+3] = (value >>> 24) & 0xFF; + this.view[offset+2] = (value >>> 16) & 0xFF; + this.view[offset+1] = (value >>> 8) & 0xFF; + this.view[offset ] = value & 0xFF; + } else { + this.view[offset ] = (value >>> 24) & 0xFF; + this.view[offset+1] = (value >>> 16) & 0xFF; + this.view[offset+2] = (value >>> 8) & 0xFF; + this.view[offset+3] = value & 0xFF; + } + if (relative) this.offset += 4; + return this; + }; + + /** + * Writes a 32bit unsigned integer. This is an alias of {@link ByteBuffer#writeUint32}. + * @function + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @expose + */ + ByteBufferPrototype.writeUInt32 = ByteBufferPrototype.writeUint32; + + /** + * Reads a 32bit unsigned integer. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @returns {number} Value read + * @expose + */ + ByteBufferPrototype.readUint32 = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 4 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+4+") <= "+this.buffer.byteLength); + } + var value = 0; + if (this.littleEndian) { + value = this.view[offset+2] << 16; + value |= this.view[offset+1] << 8; + value |= this.view[offset ]; + value += this.view[offset+3] << 24 >>> 0; + } else { + value = this.view[offset+1] << 16; + value |= this.view[offset+2] << 8; + value |= this.view[offset+3]; + value += this.view[offset ] << 24 >>> 0; + } + if (relative) this.offset += 4; + return value; + }; + + /** + * Reads a 32bit unsigned integer. This is an alias of {@link ByteBuffer#readUint32}. + * @function + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @returns {number} Value read + * @expose + */ + ByteBufferPrototype.readUInt32 = ByteBufferPrototype.readUint32; + + // types/ints/int64 + + if (Long) { + + /** + * Writes a 64bit signed integer. + * @param {number|!Long} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.writeInt64 = function(value, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof value === 'number') + value = Long.fromNumber(value); + else if (typeof value === 'string') + value = Long.fromString(value); + else if (!(value && value instanceof Long)) + throw TypeError("Illegal value: "+value+" (not an integer or Long)"); + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + if (typeof value === 'number') + value = Long.fromNumber(value); + else if (typeof value === 'string') + value = Long.fromString(value); + offset += 8; + var capacity6 = this.buffer.byteLength; + if (offset > capacity6) + this.resize((capacity6 *= 2) > offset ? capacity6 : offset); + offset -= 8; + var lo = value.low, + hi = value.high; + if (this.littleEndian) { + this.view[offset+3] = (lo >>> 24) & 0xFF; + this.view[offset+2] = (lo >>> 16) & 0xFF; + this.view[offset+1] = (lo >>> 8) & 0xFF; + this.view[offset ] = lo & 0xFF; + offset += 4; + this.view[offset+3] = (hi >>> 24) & 0xFF; + this.view[offset+2] = (hi >>> 16) & 0xFF; + this.view[offset+1] = (hi >>> 8) & 0xFF; + this.view[offset ] = hi & 0xFF; + } else { + this.view[offset ] = (hi >>> 24) & 0xFF; + this.view[offset+1] = (hi >>> 16) & 0xFF; + this.view[offset+2] = (hi >>> 8) & 0xFF; + this.view[offset+3] = hi & 0xFF; + offset += 4; + this.view[offset ] = (lo >>> 24) & 0xFF; + this.view[offset+1] = (lo >>> 16) & 0xFF; + this.view[offset+2] = (lo >>> 8) & 0xFF; + this.view[offset+3] = lo & 0xFF; + } + if (relative) this.offset += 8; + return this; + }; + + /** + * Writes a 64bit signed integer. This is an alias of {@link ByteBuffer#writeInt64}. + * @param {number|!Long} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.writeLong = ByteBufferPrototype.writeInt64; + + /** + * Reads a 64bit signed integer. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {!Long} + * @expose + */ + ByteBufferPrototype.readInt64 = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 8 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+8+") <= "+this.buffer.byteLength); + } + var lo = 0, + hi = 0; + if (this.littleEndian) { + lo = this.view[offset+2] << 16; + lo |= this.view[offset+1] << 8; + lo |= this.view[offset ]; + lo += this.view[offset+3] << 24 >>> 0; + offset += 4; + hi = this.view[offset+2] << 16; + hi |= this.view[offset+1] << 8; + hi |= this.view[offset ]; + hi += this.view[offset+3] << 24 >>> 0; + } else { + hi = this.view[offset+1] << 16; + hi |= this.view[offset+2] << 8; + hi |= this.view[offset+3]; + hi += this.view[offset ] << 24 >>> 0; + offset += 4; + lo = this.view[offset+1] << 16; + lo |= this.view[offset+2] << 8; + lo |= this.view[offset+3]; + lo += this.view[offset ] << 24 >>> 0; + } + var value = new Long(lo, hi, false); + if (relative) this.offset += 8; + return value; + }; + + /** + * Reads a 64bit signed integer. This is an alias of {@link ByteBuffer#readInt64}. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {!Long} + * @expose + */ + ByteBufferPrototype.readLong = ByteBufferPrototype.readInt64; + + /** + * Writes a 64bit unsigned integer. + * @param {number|!Long} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.writeUint64 = function(value, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof value === 'number') + value = Long.fromNumber(value); + else if (typeof value === 'string') + value = Long.fromString(value); + else if (!(value && value instanceof Long)) + throw TypeError("Illegal value: "+value+" (not an integer or Long)"); + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + if (typeof value === 'number') + value = Long.fromNumber(value); + else if (typeof value === 'string') + value = Long.fromString(value); + offset += 8; + var capacity7 = this.buffer.byteLength; + if (offset > capacity7) + this.resize((capacity7 *= 2) > offset ? capacity7 : offset); + offset -= 8; + var lo = value.low, + hi = value.high; + if (this.littleEndian) { + this.view[offset+3] = (lo >>> 24) & 0xFF; + this.view[offset+2] = (lo >>> 16) & 0xFF; + this.view[offset+1] = (lo >>> 8) & 0xFF; + this.view[offset ] = lo & 0xFF; + offset += 4; + this.view[offset+3] = (hi >>> 24) & 0xFF; + this.view[offset+2] = (hi >>> 16) & 0xFF; + this.view[offset+1] = (hi >>> 8) & 0xFF; + this.view[offset ] = hi & 0xFF; + } else { + this.view[offset ] = (hi >>> 24) & 0xFF; + this.view[offset+1] = (hi >>> 16) & 0xFF; + this.view[offset+2] = (hi >>> 8) & 0xFF; + this.view[offset+3] = hi & 0xFF; + offset += 4; + this.view[offset ] = (lo >>> 24) & 0xFF; + this.view[offset+1] = (lo >>> 16) & 0xFF; + this.view[offset+2] = (lo >>> 8) & 0xFF; + this.view[offset+3] = lo & 0xFF; + } + if (relative) this.offset += 8; + return this; + }; + + /** + * Writes a 64bit unsigned integer. This is an alias of {@link ByteBuffer#writeUint64}. + * @function + * @param {number|!Long} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.writeUInt64 = ByteBufferPrototype.writeUint64; + + /** + * Reads a 64bit unsigned integer. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {!Long} + * @expose + */ + ByteBufferPrototype.readUint64 = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 8 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+8+") <= "+this.buffer.byteLength); + } + var lo = 0, + hi = 0; + if (this.littleEndian) { + lo = this.view[offset+2] << 16; + lo |= this.view[offset+1] << 8; + lo |= this.view[offset ]; + lo += this.view[offset+3] << 24 >>> 0; + offset += 4; + hi = this.view[offset+2] << 16; + hi |= this.view[offset+1] << 8; + hi |= this.view[offset ]; + hi += this.view[offset+3] << 24 >>> 0; + } else { + hi = this.view[offset+1] << 16; + hi |= this.view[offset+2] << 8; + hi |= this.view[offset+3]; + hi += this.view[offset ] << 24 >>> 0; + offset += 4; + lo = this.view[offset+1] << 16; + lo |= this.view[offset+2] << 8; + lo |= this.view[offset+3]; + lo += this.view[offset ] << 24 >>> 0; + } + var value = new Long(lo, hi, true); + if (relative) this.offset += 8; + return value; + }; + + /** + * Reads a 64bit unsigned integer. This is an alias of {@link ByteBuffer#readUint64}. + * @function + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {!Long} + * @expose + */ + ByteBufferPrototype.readUInt64 = ByteBufferPrototype.readUint64; + + } // Long + + + // types/floats/float32 + + /* + ieee754 - https://github.com/feross/ieee754 + + The MIT License (MIT) + + Copyright (c) Feross Aboukhadijeh + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + + /** + * Reads an IEEE754 float from a byte array. + * @param {!Array} buffer + * @param {number} offset + * @param {boolean} isLE + * @param {number} mLen + * @param {number} nBytes + * @returns {number} + * @inner + */ + function ieee754_read(buffer, offset, isLE, mLen, nBytes) { + var e, m, + eLen = nBytes * 8 - mLen - 1, + eMax = (1 << eLen) - 1, + eBias = eMax >> 1, + nBits = -7, + i = isLE ? (nBytes - 1) : 0, + d = isLE ? -1 : 1, + s = buffer[offset + i]; + + i += d; + + e = s & ((1 << (-nBits)) - 1); + s >>= (-nBits); + nBits += eLen; + for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {} + + m = e & ((1 << (-nBits)) - 1); + e >>= (-nBits); + nBits += mLen; + for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {} + + if (e === 0) { + e = 1 - eBias; + } else if (e === eMax) { + return m ? NaN : ((s ? -1 : 1) * Infinity); + } else { + m = m + Math.pow(2, mLen); + e = e - eBias; + } + return (s ? -1 : 1) * m * Math.pow(2, e - mLen); + } + + /** + * Writes an IEEE754 float to a byte array. + * @param {!Array} buffer + * @param {number} value + * @param {number} offset + * @param {boolean} isLE + * @param {number} mLen + * @param {number} nBytes + * @inner + */ + function ieee754_write(buffer, value, offset, isLE, mLen, nBytes) { + var e, m, c, + eLen = nBytes * 8 - mLen - 1, + eMax = (1 << eLen) - 1, + eBias = eMax >> 1, + rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0), + i = isLE ? 0 : (nBytes - 1), + d = isLE ? 1 : -1, + s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0; + + value = Math.abs(value); + + if (isNaN(value) || value === Infinity) { + m = isNaN(value) ? 1 : 0; + e = eMax; + } else { + e = Math.floor(Math.log(value) / Math.LN2); + if (value * (c = Math.pow(2, -e)) < 1) { + e--; + c *= 2; + } + if (e + eBias >= 1) { + value += rt / c; + } else { + value += rt * Math.pow(2, 1 - eBias); + } + if (value * c >= 2) { + e++; + c /= 2; + } + + if (e + eBias >= eMax) { + m = 0; + e = eMax; + } else if (e + eBias >= 1) { + m = (value * c - 1) * Math.pow(2, mLen); + e = e + eBias; + } else { + m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen); + e = 0; + } + } + + for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} + + e = (e << mLen) | m; + eLen += mLen; + for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} + + buffer[offset + i - d] |= s * 128; + } + + /** + * Writes a 32bit float. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.writeFloat32 = function(value, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof value !== 'number') + throw TypeError("Illegal value: "+value+" (not a number)"); + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + offset += 4; + var capacity8 = this.buffer.byteLength; + if (offset > capacity8) + this.resize((capacity8 *= 2) > offset ? capacity8 : offset); + offset -= 4; + ieee754_write(this.view, value, offset, this.littleEndian, 23, 4); + if (relative) this.offset += 4; + return this; + }; + + /** + * Writes a 32bit float. This is an alias of {@link ByteBuffer#writeFloat32}. + * @function + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.writeFloat = ByteBufferPrototype.writeFloat32; + + /** + * Reads a 32bit float. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @returns {number} + * @expose + */ + ByteBufferPrototype.readFloat32 = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 4 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+4+") <= "+this.buffer.byteLength); + } + var value = ieee754_read(this.view, offset, this.littleEndian, 23, 4); + if (relative) this.offset += 4; + return value; + }; + + /** + * Reads a 32bit float. This is an alias of {@link ByteBuffer#readFloat32}. + * @function + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @returns {number} + * @expose + */ + ByteBufferPrototype.readFloat = ByteBufferPrototype.readFloat32; + + // types/floats/float64 + + /** + * Writes a 64bit float. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.writeFloat64 = function(value, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof value !== 'number') + throw TypeError("Illegal value: "+value+" (not a number)"); + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + offset += 8; + var capacity9 = this.buffer.byteLength; + if (offset > capacity9) + this.resize((capacity9 *= 2) > offset ? capacity9 : offset); + offset -= 8; + ieee754_write(this.view, value, offset, this.littleEndian, 52, 8); + if (relative) this.offset += 8; + return this; + }; + + /** + * Writes a 64bit float. This is an alias of {@link ByteBuffer#writeFloat64}. + * @function + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.writeDouble = ByteBufferPrototype.writeFloat64; + + /** + * Reads a 64bit float. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {number} + * @expose + */ + ByteBufferPrototype.readFloat64 = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 8 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+8+") <= "+this.buffer.byteLength); + } + var value = ieee754_read(this.view, offset, this.littleEndian, 52, 8); + if (relative) this.offset += 8; + return value; + }; + + /** + * Reads a 64bit float. This is an alias of {@link ByteBuffer#readFloat64}. + * @function + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {number} + * @expose + */ + ByteBufferPrototype.readDouble = ByteBufferPrototype.readFloat64; + + + // types/varints/varint32 + + /** + * Maximum number of bytes required to store a 32bit base 128 variable-length integer. + * @type {number} + * @const + * @expose + */ + ByteBuffer.MAX_VARINT32_BYTES = 5; + + /** + * Calculates the actual number of bytes required to store a 32bit base 128 variable-length integer. + * @param {number} value Value to encode + * @returns {number} Number of bytes required. Capped to {@link ByteBuffer.MAX_VARINT32_BYTES} + * @expose + */ + ByteBuffer.calculateVarint32 = function(value) { + // ref: src/google/protobuf/io/coded_stream.cc + value = value >>> 0; + if (value < 1 << 7 ) return 1; + else if (value < 1 << 14) return 2; + else if (value < 1 << 21) return 3; + else if (value < 1 << 28) return 4; + else return 5; + }; + + /** + * Zigzag encodes a signed 32bit integer so that it can be effectively used with varint encoding. + * @param {number} n Signed 32bit integer + * @returns {number} Unsigned zigzag encoded 32bit integer + * @expose + */ + ByteBuffer.zigZagEncode32 = function(n) { + return (((n |= 0) << 1) ^ (n >> 31)) >>> 0; // ref: src/google/protobuf/wire_format_lite.h + }; + + /** + * Decodes a zigzag encoded signed 32bit integer. + * @param {number} n Unsigned zigzag encoded 32bit integer + * @returns {number} Signed 32bit integer + * @expose + */ + ByteBuffer.zigZagDecode32 = function(n) { + return ((n >>> 1) ^ -(n & 1)) | 0; // // ref: src/google/protobuf/wire_format_lite.h + }; + + /** + * Writes a 32bit base 128 variable-length integer. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. + * @returns {!ByteBuffer|number} this if `offset` is omitted, else the actual number of bytes written + * @expose + */ + ByteBufferPrototype.writeVarint32 = function(value, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof value !== 'number' || value % 1 !== 0) + throw TypeError("Illegal value: "+value+" (not an integer)"); + value |= 0; + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + var size = ByteBuffer.calculateVarint32(value), + b; + offset += size; + var capacity10 = this.buffer.byteLength; + if (offset > capacity10) + this.resize((capacity10 *= 2) > offset ? capacity10 : offset); + offset -= size; + value >>>= 0; + while (value >= 0x80) { + b = (value & 0x7f) | 0x80; + this.view[offset++] = b; + value >>>= 7; + } + this.view[offset++] = value; + if (relative) { + this.offset = offset; + return this; + } + return size; + }; + + /** + * Writes a zig-zag encoded (signed) 32bit base 128 variable-length integer. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. + * @returns {!ByteBuffer|number} this if `offset` is omitted, else the actual number of bytes written + * @expose + */ + ByteBufferPrototype.writeVarint32ZigZag = function(value, offset) { + return this.writeVarint32(ByteBuffer.zigZagEncode32(value), offset); + }; + + /** + * Reads a 32bit base 128 variable-length integer. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. + * @returns {number|!{value: number, length: number}} The value read if offset is omitted, else the value read + * and the actual number of bytes read. + * @throws {Error} If it's not a valid varint. Has a property `truncated = true` if there is not enough data available + * to fully decode the varint. + * @expose + */ + ByteBufferPrototype.readVarint32 = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 1 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+1+") <= "+this.buffer.byteLength); + } + var c = 0, + value = 0 >>> 0, + b; + do { + if (!this.noAssert && offset > this.limit) { + var err = Error("Truncated"); + err['truncated'] = true; + throw err; + } + b = this.view[offset++]; + if (c < 5) + value |= (b & 0x7f) << (7*c); + ++c; + } while ((b & 0x80) !== 0); + value |= 0; + if (relative) { + this.offset = offset; + return value; + } + return { + "value": value, + "length": c + }; + }; + + /** + * Reads a zig-zag encoded (signed) 32bit base 128 variable-length integer. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. + * @returns {number|!{value: number, length: number}} The value read if offset is omitted, else the value read + * and the actual number of bytes read. + * @throws {Error} If it's not a valid varint + * @expose + */ + ByteBufferPrototype.readVarint32ZigZag = function(offset) { + var val = this.readVarint32(offset); + if (typeof val === 'object') + val["value"] = ByteBuffer.zigZagDecode32(val["value"]); + else + val = ByteBuffer.zigZagDecode32(val); + return val; + }; + + // types/varints/varint64 + + if (Long) { + + /** + * Maximum number of bytes required to store a 64bit base 128 variable-length integer. + * @type {number} + * @const + * @expose + */ + ByteBuffer.MAX_VARINT64_BYTES = 10; + + /** + * Calculates the actual number of bytes required to store a 64bit base 128 variable-length integer. + * @param {number|!Long} value Value to encode + * @returns {number} Number of bytes required. Capped to {@link ByteBuffer.MAX_VARINT64_BYTES} + * @expose + */ + ByteBuffer.calculateVarint64 = function(value) { + if (typeof value === 'number') + value = Long.fromNumber(value); + else if (typeof value === 'string') + value = Long.fromString(value); + // ref: src/google/protobuf/io/coded_stream.cc + var part0 = value.toInt() >>> 0, + part1 = value.shiftRightUnsigned(28).toInt() >>> 0, + part2 = value.shiftRightUnsigned(56).toInt() >>> 0; + if (part2 == 0) { + if (part1 == 0) { + if (part0 < 1 << 14) + return part0 < 1 << 7 ? 1 : 2; + else + return part0 < 1 << 21 ? 3 : 4; + } else { + if (part1 < 1 << 14) + return part1 < 1 << 7 ? 5 : 6; + else + return part1 < 1 << 21 ? 7 : 8; + } + } else + return part2 < 1 << 7 ? 9 : 10; + }; + + /** + * Zigzag encodes a signed 64bit integer so that it can be effectively used with varint encoding. + * @param {number|!Long} value Signed long + * @returns {!Long} Unsigned zigzag encoded long + * @expose + */ + ByteBuffer.zigZagEncode64 = function(value) { + if (typeof value === 'number') + value = Long.fromNumber(value, false); + else if (typeof value === 'string') + value = Long.fromString(value, false); + else if (value.unsigned !== false) value = value.toSigned(); + // ref: src/google/protobuf/wire_format_lite.h + return value.shiftLeft(1).xor(value.shiftRight(63)).toUnsigned(); + }; + + /** + * Decodes a zigzag encoded signed 64bit integer. + * @param {!Long|number} value Unsigned zigzag encoded long or JavaScript number + * @returns {!Long} Signed long + * @expose + */ + ByteBuffer.zigZagDecode64 = function(value) { + if (typeof value === 'number') + value = Long.fromNumber(value, false); + else if (typeof value === 'string') + value = Long.fromString(value, false); + else if (value.unsigned !== false) value = value.toSigned(); + // ref: src/google/protobuf/wire_format_lite.h + return value.shiftRightUnsigned(1).xor(value.and(Long.ONE).toSigned().negate()).toSigned(); + }; + + /** + * Writes a 64bit base 128 variable-length integer. + * @param {number|Long} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. + * @returns {!ByteBuffer|number} `this` if offset is omitted, else the actual number of bytes written. + * @expose + */ + ByteBufferPrototype.writeVarint64 = function(value, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof value === 'number') + value = Long.fromNumber(value); + else if (typeof value === 'string') + value = Long.fromString(value); + else if (!(value && value instanceof Long)) + throw TypeError("Illegal value: "+value+" (not an integer or Long)"); + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + if (typeof value === 'number') + value = Long.fromNumber(value, false); + else if (typeof value === 'string') + value = Long.fromString(value, false); + else if (value.unsigned !== false) value = value.toSigned(); + var size = ByteBuffer.calculateVarint64(value), + part0 = value.toInt() >>> 0, + part1 = value.shiftRightUnsigned(28).toInt() >>> 0, + part2 = value.shiftRightUnsigned(56).toInt() >>> 0; + offset += size; + var capacity11 = this.buffer.byteLength; + if (offset > capacity11) + this.resize((capacity11 *= 2) > offset ? capacity11 : offset); + offset -= size; + switch (size) { + case 10: this.view[offset+9] = (part2 >>> 7) & 0x01; + case 9 : this.view[offset+8] = size !== 9 ? (part2 ) | 0x80 : (part2 ) & 0x7F; + case 8 : this.view[offset+7] = size !== 8 ? (part1 >>> 21) | 0x80 : (part1 >>> 21) & 0x7F; + case 7 : this.view[offset+6] = size !== 7 ? (part1 >>> 14) | 0x80 : (part1 >>> 14) & 0x7F; + case 6 : this.view[offset+5] = size !== 6 ? (part1 >>> 7) | 0x80 : (part1 >>> 7) & 0x7F; + case 5 : this.view[offset+4] = size !== 5 ? (part1 ) | 0x80 : (part1 ) & 0x7F; + case 4 : this.view[offset+3] = size !== 4 ? (part0 >>> 21) | 0x80 : (part0 >>> 21) & 0x7F; + case 3 : this.view[offset+2] = size !== 3 ? (part0 >>> 14) | 0x80 : (part0 >>> 14) & 0x7F; + case 2 : this.view[offset+1] = size !== 2 ? (part0 >>> 7) | 0x80 : (part0 >>> 7) & 0x7F; + case 1 : this.view[offset ] = size !== 1 ? (part0 ) | 0x80 : (part0 ) & 0x7F; + } + if (relative) { + this.offset += size; + return this; + } else { + return size; + } + }; + + /** + * Writes a zig-zag encoded 64bit base 128 variable-length integer. + * @param {number|Long} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. + * @returns {!ByteBuffer|number} `this` if offset is omitted, else the actual number of bytes written. + * @expose + */ + ByteBufferPrototype.writeVarint64ZigZag = function(value, offset) { + return this.writeVarint64(ByteBuffer.zigZagEncode64(value), offset); + }; + + /** + * Reads a 64bit base 128 variable-length integer. Requires Long.js. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * read if omitted. + * @returns {!Long|!{value: Long, length: number}} The value read if offset is omitted, else the value read and + * the actual number of bytes read. + * @throws {Error} If it's not a valid varint + * @expose + */ + ByteBufferPrototype.readVarint64 = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 1 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+1+") <= "+this.buffer.byteLength); + } + // ref: src/google/protobuf/io/coded_stream.cc + var start = offset, + part0 = 0, + part1 = 0, + part2 = 0, + b = 0; + b = this.view[offset++]; part0 = (b & 0x7F) ; if ( b & 0x80 ) { + b = this.view[offset++]; part0 |= (b & 0x7F) << 7; if ((b & 0x80) || (this.noAssert && typeof b === 'undefined')) { + b = this.view[offset++]; part0 |= (b & 0x7F) << 14; if ((b & 0x80) || (this.noAssert && typeof b === 'undefined')) { + b = this.view[offset++]; part0 |= (b & 0x7F) << 21; if ((b & 0x80) || (this.noAssert && typeof b === 'undefined')) { + b = this.view[offset++]; part1 = (b & 0x7F) ; if ((b & 0x80) || (this.noAssert && typeof b === 'undefined')) { + b = this.view[offset++]; part1 |= (b & 0x7F) << 7; if ((b & 0x80) || (this.noAssert && typeof b === 'undefined')) { + b = this.view[offset++]; part1 |= (b & 0x7F) << 14; if ((b & 0x80) || (this.noAssert && typeof b === 'undefined')) { + b = this.view[offset++]; part1 |= (b & 0x7F) << 21; if ((b & 0x80) || (this.noAssert && typeof b === 'undefined')) { + b = this.view[offset++]; part2 = (b & 0x7F) ; if ((b & 0x80) || (this.noAssert && typeof b === 'undefined')) { + b = this.view[offset++]; part2 |= (b & 0x7F) << 7; if ((b & 0x80) || (this.noAssert && typeof b === 'undefined')) { + throw Error("Buffer overrun"); }}}}}}}}}} + var value = Long.fromBits(part0 | (part1 << 28), (part1 >>> 4) | (part2) << 24, false); + if (relative) { + this.offset = offset; + return value; + } else { + return { + 'value': value, + 'length': offset-start + }; + } + }; + + /** + * Reads a zig-zag encoded 64bit base 128 variable-length integer. Requires Long.js. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * read if omitted. + * @returns {!Long|!{value: Long, length: number}} The value read if offset is omitted, else the value read and + * the actual number of bytes read. + * @throws {Error} If it's not a valid varint + * @expose + */ + ByteBufferPrototype.readVarint64ZigZag = function(offset) { + var val = this.readVarint64(offset); + if (val && val['value'] instanceof Long) + val["value"] = ByteBuffer.zigZagDecode64(val["value"]); + else + val = ByteBuffer.zigZagDecode64(val); + return val; + }; + + } // Long + + + // types/strings/cstring + + /** + * Writes a NULL-terminated UTF8 encoded string. For this to work the specified string must not contain any NULL + * characters itself. + * @param {string} str String to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * contained in `str` + 1 if omitted. + * @returns {!ByteBuffer|number} this if offset is omitted, else the actual number of bytes written + * @expose + */ + ByteBufferPrototype.writeCString = function(str, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + var i, + k = str.length; + if (!this.noAssert) { + if (typeof str !== 'string') + throw TypeError("Illegal str: Not a string"); + for (i=0; i>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + // UTF8 strings do not contain zero bytes in between except for the zero character, so: + k = utfx.calculateUTF16asUTF8(stringSource(str))[1]; + offset += k+1; + var capacity12 = this.buffer.byteLength; + if (offset > capacity12) + this.resize((capacity12 *= 2) > offset ? capacity12 : offset); + offset -= k+1; + utfx.encodeUTF16toUTF8(stringSource(str), function(b) { + this.view[offset++] = b; + }.bind(this)); + this.view[offset++] = 0; + if (relative) { + this.offset = offset; + return this; + } + return k; + }; + + /** + * Reads a NULL-terminated UTF8 encoded string. For this to work the string read must not contain any NULL characters + * itself. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * read if omitted. + * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string + * read and the actual number of bytes read. + * @expose + */ + ByteBufferPrototype.readCString = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 1 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+1+") <= "+this.buffer.byteLength); + } + var start = offset, + temp; + // UTF8 strings do not contain zero bytes in between except for the zero character itself, so: + var sd, b = -1; + utfx.decodeUTF8toUTF16(function() { + if (b === 0) return null; + if (offset >= this.limit) + throw RangeError("Illegal range: Truncated data, "+offset+" < "+this.limit); + b = this.view[offset++]; + return b === 0 ? null : b; + }.bind(this), sd = stringDestination(), true); + if (relative) { + this.offset = offset; + return sd(); + } else { + return { + "string": sd(), + "length": offset - start + }; + } + }; + + // types/strings/istring + + /** + * Writes a length as uint32 prefixed UTF8 encoded string. + * @param {string} str String to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. + * @returns {!ByteBuffer|number} `this` if `offset` is omitted, else the actual number of bytes written + * @expose + * @see ByteBuffer#writeVarint32 + */ + ByteBufferPrototype.writeIString = function(str, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof str !== 'string') + throw TypeError("Illegal str: Not a string"); + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + var start = offset, + k; + k = utfx.calculateUTF16asUTF8(stringSource(str), this.noAssert)[1]; + offset += 4+k; + var capacity13 = this.buffer.byteLength; + if (offset > capacity13) + this.resize((capacity13 *= 2) > offset ? capacity13 : offset); + offset -= 4+k; + if (this.littleEndian) { + this.view[offset+3] = (k >>> 24) & 0xFF; + this.view[offset+2] = (k >>> 16) & 0xFF; + this.view[offset+1] = (k >>> 8) & 0xFF; + this.view[offset ] = k & 0xFF; + } else { + this.view[offset ] = (k >>> 24) & 0xFF; + this.view[offset+1] = (k >>> 16) & 0xFF; + this.view[offset+2] = (k >>> 8) & 0xFF; + this.view[offset+3] = k & 0xFF; + } + offset += 4; + utfx.encodeUTF16toUTF8(stringSource(str), function(b) { + this.view[offset++] = b; + }.bind(this)); + if (offset !== start + 4 + k) + throw RangeError("Illegal range: Truncated data, "+offset+" == "+(offset+4+k)); + if (relative) { + this.offset = offset; + return this; + } + return offset - start; + }; + + /** + * Reads a length as uint32 prefixed UTF8 encoded string. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * read if omitted. + * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string + * read and the actual number of bytes read. + * @expose + * @see ByteBuffer#readVarint32 + */ + ByteBufferPrototype.readIString = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 4 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+4+") <= "+this.buffer.byteLength); + } + var start = offset; + var len = this.readUint32(offset); + var str = this.readUTF8String(len, ByteBuffer.METRICS_BYTES, offset += 4); + offset += str['length']; + if (relative) { + this.offset = offset; + return str['string']; + } else { + return { + 'string': str['string'], + 'length': offset - start + }; + } + }; + + // types/strings/utf8string + + /** + * Metrics representing number of UTF8 characters. Evaluates to `c`. + * @type {string} + * @const + * @expose + */ + ByteBuffer.METRICS_CHARS = 'c'; + + /** + * Metrics representing number of bytes. Evaluates to `b`. + * @type {string} + * @const + * @expose + */ + ByteBuffer.METRICS_BYTES = 'b'; + + /** + * Writes an UTF8 encoded string. + * @param {string} str String to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} if omitted. + * @returns {!ByteBuffer|number} this if offset is omitted, else the actual number of bytes written. + * @expose + */ + ByteBufferPrototype.writeUTF8String = function(str, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + var k; + var start = offset; + k = utfx.calculateUTF16asUTF8(stringSource(str))[1]; + offset += k; + var capacity14 = this.buffer.byteLength; + if (offset > capacity14) + this.resize((capacity14 *= 2) > offset ? capacity14 : offset); + offset -= k; + utfx.encodeUTF16toUTF8(stringSource(str), function(b) { + this.view[offset++] = b; + }.bind(this)); + if (relative) { + this.offset = offset; + return this; + } + return offset - start; + }; + + /** + * Writes an UTF8 encoded string. This is an alias of {@link ByteBuffer#writeUTF8String}. + * @function + * @param {string} str String to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} if omitted. + * @returns {!ByteBuffer|number} this if offset is omitted, else the actual number of bytes written. + * @expose + */ + ByteBufferPrototype.writeString = ByteBufferPrototype.writeUTF8String; + + /** + * Calculates the number of UTF8 characters of a string. JavaScript itself uses UTF-16, so that a string's + * `length` property does not reflect its actual UTF8 size if it contains code points larger than 0xFFFF. + * @param {string} str String to calculate + * @returns {number} Number of UTF8 characters + * @expose + */ + ByteBuffer.calculateUTF8Chars = function(str) { + return utfx.calculateUTF16asUTF8(stringSource(str))[0]; + }; + + /** + * Calculates the number of UTF8 bytes of a string. + * @param {string} str String to calculate + * @returns {number} Number of UTF8 bytes + * @expose + */ + ByteBuffer.calculateUTF8Bytes = function(str) { + return utfx.calculateUTF16asUTF8(stringSource(str))[1]; + }; + + /** + * Calculates the number of UTF8 bytes of a string. This is an alias of {@link ByteBuffer.calculateUTF8Bytes}. + * @function + * @param {string} str String to calculate + * @returns {number} Number of UTF8 bytes + * @expose + */ + ByteBuffer.calculateString = ByteBuffer.calculateUTF8Bytes; + + /** + * Reads an UTF8 encoded string. + * @param {number} length Number of characters or bytes to read. + * @param {string=} metrics Metrics specifying what `length` is meant to count. Defaults to + * {@link ByteBuffer.METRICS_CHARS}. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * read if omitted. + * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string + * read and the actual number of bytes read. + * @expose + */ + ByteBufferPrototype.readUTF8String = function(length, metrics, offset) { + if (typeof metrics === 'number') { + offset = metrics; + metrics = undefined; + } + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (typeof metrics === 'undefined') metrics = ByteBuffer.METRICS_CHARS; + if (!this.noAssert) { + if (typeof length !== 'number' || length % 1 !== 0) + throw TypeError("Illegal length: "+length+" (not an integer)"); + length |= 0; + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + var i = 0, + start = offset, + sd; + if (metrics === ByteBuffer.METRICS_CHARS) { // The same for node and the browser + sd = stringDestination(); + utfx.decodeUTF8(function() { + return i < length && offset < this.limit ? this.view[offset++] : null; + }.bind(this), function(cp) { + ++i; utfx.UTF8toUTF16(cp, sd); + }); + if (i !== length) + throw RangeError("Illegal range: Truncated data, "+i+" == "+length); + if (relative) { + this.offset = offset; + return sd(); + } else { + return { + "string": sd(), + "length": offset - start + }; + } + } else if (metrics === ByteBuffer.METRICS_BYTES) { + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + length > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+length+") <= "+this.buffer.byteLength); + } + var k = offset + length; + utfx.decodeUTF8toUTF16(function() { + return offset < k ? this.view[offset++] : null; + }.bind(this), sd = stringDestination(), this.noAssert); + if (offset !== k) + throw RangeError("Illegal range: Truncated data, "+offset+" == "+k); + if (relative) { + this.offset = offset; + return sd(); + } else { + return { + 'string': sd(), + 'length': offset - start + }; + } + } else + throw TypeError("Unsupported metrics: "+metrics); + }; + + /** + * Reads an UTF8 encoded string. This is an alias of {@link ByteBuffer#readUTF8String}. + * @function + * @param {number} length Number of characters or bytes to read + * @param {number=} metrics Metrics specifying what `n` is meant to count. Defaults to + * {@link ByteBuffer.METRICS_CHARS}. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * read if omitted. + * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string + * read and the actual number of bytes read. + * @expose + */ + ByteBufferPrototype.readString = ByteBufferPrototype.readUTF8String; + + // types/strings/vstring + + /** + * Writes a length as varint32 prefixed UTF8 encoded string. + * @param {string} str String to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. + * @returns {!ByteBuffer|number} `this` if `offset` is omitted, else the actual number of bytes written + * @expose + * @see ByteBuffer#writeVarint32 + */ + ByteBufferPrototype.writeVString = function(str, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof str !== 'string') + throw TypeError("Illegal str: Not a string"); + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + var start = offset, + k, l; + k = utfx.calculateUTF16asUTF8(stringSource(str), this.noAssert)[1]; + l = ByteBuffer.calculateVarint32(k); + offset += l+k; + var capacity15 = this.buffer.byteLength; + if (offset > capacity15) + this.resize((capacity15 *= 2) > offset ? capacity15 : offset); + offset -= l+k; + offset += this.writeVarint32(k, offset); + utfx.encodeUTF16toUTF8(stringSource(str), function(b) { + this.view[offset++] = b; + }.bind(this)); + if (offset !== start+k+l) + throw RangeError("Illegal range: Truncated data, "+offset+" == "+(offset+k+l)); + if (relative) { + this.offset = offset; + return this; + } + return offset - start; + }; + + /** + * Reads a length as varint32 prefixed UTF8 encoded string. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * read if omitted. + * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string + * read and the actual number of bytes read. + * @expose + * @see ByteBuffer#readVarint32 + */ + ByteBufferPrototype.readVString = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 1 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+1+") <= "+this.buffer.byteLength); + } + var start = offset; + var len = this.readVarint32(offset); + var str = this.readUTF8String(len['value'], ByteBuffer.METRICS_BYTES, offset += len['length']); + offset += str['length']; + if (relative) { + this.offset = offset; + return str['string']; + } else { + return { + 'string': str['string'], + 'length': offset - start + }; + } + }; + + + /** + * Appends some data to this ByteBuffer. This will overwrite any contents behind the specified offset up to the appended + * data's length. + * @param {!ByteBuffer|!ArrayBuffer|!Uint8Array|string} source Data to append. If `source` is a ByteBuffer, its offsets + * will be modified according to the performed read operation. + * @param {(string|number)=} encoding Encoding if `data` is a string ("base64", "hex", "binary", defaults to "utf8") + * @param {number=} offset Offset to append at. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. + * @returns {!ByteBuffer} this + * @expose + * @example A relative `<01 02>03.append(<04 05>)` will result in `<01 02 04 05>, 04 05|` + * @example An absolute `<01 02>03.append(04 05>, 1)` will result in `<01 04>05, 04 05|` + */ + ByteBufferPrototype.append = function(source, encoding, offset) { + if (typeof encoding === 'number' || typeof encoding !== 'string') { + offset = encoding; + encoding = undefined; + } + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + if (!(source instanceof ByteBuffer)) + source = ByteBuffer.wrap(source, encoding); + var length = source.limit - source.offset; + if (length <= 0) return this; // Nothing to append + offset += length; + var capacity16 = this.buffer.byteLength; + if (offset > capacity16) + this.resize((capacity16 *= 2) > offset ? capacity16 : offset); + offset -= length; + this.view.set(source.view.subarray(source.offset, source.limit), offset); + source.offset += length; + if (relative) this.offset += length; + return this; + }; + + /** + * Appends this ByteBuffer's contents to another ByteBuffer. This will overwrite any contents at and after the + specified offset up to the length of this ByteBuffer's data. + * @param {!ByteBuffer} target Target ByteBuffer + * @param {number=} offset Offset to append to. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * read if omitted. + * @returns {!ByteBuffer} this + * @expose + * @see ByteBuffer#append + */ + ByteBufferPrototype.appendTo = function(target, offset) { + target.append(this, offset); + return this; + }; + + /** + * Enables or disables assertions of argument types and offsets. Assertions are enabled by default but you can opt to + * disable them if your code already makes sure that everything is valid. + * @param {boolean} assert `true` to enable assertions, otherwise `false` + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.assert = function(assert) { + this.noAssert = !assert; + return this; + }; + + /** + * Gets the capacity of this ByteBuffer's backing buffer. + * @returns {number} Capacity of the backing buffer + * @expose + */ + ByteBufferPrototype.capacity = function() { + return this.buffer.byteLength; + }; + /** + * Clears this ByteBuffer's offsets by setting {@link ByteBuffer#offset} to `0` and {@link ByteBuffer#limit} to the + * backing buffer's capacity. Discards {@link ByteBuffer#markedOffset}. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.clear = function() { + this.offset = 0; + this.limit = this.buffer.byteLength; + this.markedOffset = -1; + return this; + }; + + /** + * Creates a cloned instance of this ByteBuffer, preset with this ByteBuffer's values for {@link ByteBuffer#offset}, + * {@link ByteBuffer#markedOffset} and {@link ByteBuffer#limit}. + * @param {boolean=} copy Whether to copy the backing buffer or to return another view on the same, defaults to `false` + * @returns {!ByteBuffer} Cloned instance + * @expose + */ + ByteBufferPrototype.clone = function(copy) { + var bb = new ByteBuffer(0, this.littleEndian, this.noAssert); + if (copy) { + bb.buffer = new ArrayBuffer(this.buffer.byteLength); + bb.view = new Uint8Array(bb.buffer); + } else { + bb.buffer = this.buffer; + bb.view = this.view; + } + bb.offset = this.offset; + bb.markedOffset = this.markedOffset; + bb.limit = this.limit; + return bb; + }; + + /** + * Compacts this ByteBuffer to be backed by a {@link ByteBuffer#buffer} of its contents' length. Contents are the bytes + * between {@link ByteBuffer#offset} and {@link ByteBuffer#limit}. Will set `offset = 0` and `limit = capacity` and + * adapt {@link ByteBuffer#markedOffset} to the same relative position if set. + * @param {number=} begin Offset to start at, defaults to {@link ByteBuffer#offset} + * @param {number=} end Offset to end at, defaults to {@link ByteBuffer#limit} + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.compact = function(begin, end) { + if (typeof begin === 'undefined') begin = this.offset; + if (typeof end === 'undefined') end = this.limit; + if (!this.noAssert) { + if (typeof begin !== 'number' || begin % 1 !== 0) + throw TypeError("Illegal begin: Not an integer"); + begin >>>= 0; + if (typeof end !== 'number' || end % 1 !== 0) + throw TypeError("Illegal end: Not an integer"); + end >>>= 0; + if (begin < 0 || begin > end || end > this.buffer.byteLength) + throw RangeError("Illegal range: 0 <= "+begin+" <= "+end+" <= "+this.buffer.byteLength); + } + if (begin === 0 && end === this.buffer.byteLength) + return this; // Already compacted + var len = end - begin; + if (len === 0) { + this.buffer = EMPTY_BUFFER; + this.view = null; + if (this.markedOffset >= 0) this.markedOffset -= begin; + this.offset = 0; + this.limit = 0; + return this; + } + var buffer = new ArrayBuffer(len); + var view = new Uint8Array(buffer); + view.set(this.view.subarray(begin, end)); + this.buffer = buffer; + this.view = view; + if (this.markedOffset >= 0) this.markedOffset -= begin; + this.offset = 0; + this.limit = len; + return this; + }; + + /** + * Creates a copy of this ByteBuffer's contents. Contents are the bytes between {@link ByteBuffer#offset} and + * {@link ByteBuffer#limit}. + * @param {number=} begin Begin offset, defaults to {@link ByteBuffer#offset}. + * @param {number=} end End offset, defaults to {@link ByteBuffer#limit}. + * @returns {!ByteBuffer} Copy + * @expose + */ + ByteBufferPrototype.copy = function(begin, end) { + if (typeof begin === 'undefined') begin = this.offset; + if (typeof end === 'undefined') end = this.limit; + if (!this.noAssert) { + if (typeof begin !== 'number' || begin % 1 !== 0) + throw TypeError("Illegal begin: Not an integer"); + begin >>>= 0; + if (typeof end !== 'number' || end % 1 !== 0) + throw TypeError("Illegal end: Not an integer"); + end >>>= 0; + if (begin < 0 || begin > end || end > this.buffer.byteLength) + throw RangeError("Illegal range: 0 <= "+begin+" <= "+end+" <= "+this.buffer.byteLength); + } + if (begin === end) + return new ByteBuffer(0, this.littleEndian, this.noAssert); + var capacity = end - begin, + bb = new ByteBuffer(capacity, this.littleEndian, this.noAssert); + bb.offset = 0; + bb.limit = capacity; + if (bb.markedOffset >= 0) bb.markedOffset -= begin; + this.copyTo(bb, 0, begin, end); + return bb; + }; + + /** + * Copies this ByteBuffer's contents to another ByteBuffer. Contents are the bytes between {@link ByteBuffer#offset} and + * {@link ByteBuffer#limit}. + * @param {!ByteBuffer} target Target ByteBuffer + * @param {number=} targetOffset Offset to copy to. Will use and increase the target's {@link ByteBuffer#offset} + * by the number of bytes copied if omitted. + * @param {number=} sourceOffset Offset to start copying from. Will use and increase {@link ByteBuffer#offset} by the + * number of bytes copied if omitted. + * @param {number=} sourceLimit Offset to end copying from, defaults to {@link ByteBuffer#limit} + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.copyTo = function(target, targetOffset, sourceOffset, sourceLimit) { + var relative, + targetRelative; + if (!this.noAssert) { + if (!ByteBuffer.isByteBuffer(target)) + throw TypeError("Illegal target: Not a ByteBuffer"); + } + targetOffset = (targetRelative = typeof targetOffset === 'undefined') ? target.offset : targetOffset | 0; + sourceOffset = (relative = typeof sourceOffset === 'undefined') ? this.offset : sourceOffset | 0; + sourceLimit = typeof sourceLimit === 'undefined' ? this.limit : sourceLimit | 0; + + if (targetOffset < 0 || targetOffset > target.buffer.byteLength) + throw RangeError("Illegal target range: 0 <= "+targetOffset+" <= "+target.buffer.byteLength); + if (sourceOffset < 0 || sourceLimit > this.buffer.byteLength) + throw RangeError("Illegal source range: 0 <= "+sourceOffset+" <= "+this.buffer.byteLength); + + var len = sourceLimit - sourceOffset; + if (len === 0) + return target; // Nothing to copy + + target.ensureCapacity(targetOffset + len); + + target.view.set(this.view.subarray(sourceOffset, sourceLimit), targetOffset); + + if (relative) this.offset += len; + if (targetRelative) target.offset += len; + + return this; + }; + + /** + * Makes sure that this ByteBuffer is backed by a {@link ByteBuffer#buffer} of at least the specified capacity. If the + * current capacity is exceeded, it will be doubled. If double the current capacity is less than the required capacity, + * the required capacity will be used instead. + * @param {number} capacity Required capacity + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.ensureCapacity = function(capacity) { + var current = this.buffer.byteLength; + if (current < capacity) + return this.resize((current *= 2) > capacity ? current : capacity); + return this; + }; + + /** + * Overwrites this ByteBuffer's contents with the specified value. Contents are the bytes between + * {@link ByteBuffer#offset} and {@link ByteBuffer#limit}. + * @param {number|string} value Byte value to fill with. If given as a string, the first character is used. + * @param {number=} begin Begin offset. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. defaults to {@link ByteBuffer#offset}. + * @param {number=} end End offset, defaults to {@link ByteBuffer#limit}. + * @returns {!ByteBuffer} this + * @expose + * @example `someByteBuffer.clear().fill(0)` fills the entire backing buffer with zeroes + */ + ByteBufferPrototype.fill = function(value, begin, end) { + var relative = typeof begin === 'undefined'; + if (relative) begin = this.offset; + if (typeof value === 'string' && value.length > 0) + value = value.charCodeAt(0); + if (typeof begin === 'undefined') begin = this.offset; + if (typeof end === 'undefined') end = this.limit; + if (!this.noAssert) { + if (typeof value !== 'number' || value % 1 !== 0) + throw TypeError("Illegal value: "+value+" (not an integer)"); + value |= 0; + if (typeof begin !== 'number' || begin % 1 !== 0) + throw TypeError("Illegal begin: Not an integer"); + begin >>>= 0; + if (typeof end !== 'number' || end % 1 !== 0) + throw TypeError("Illegal end: Not an integer"); + end >>>= 0; + if (begin < 0 || begin > end || end > this.buffer.byteLength) + throw RangeError("Illegal range: 0 <= "+begin+" <= "+end+" <= "+this.buffer.byteLength); + } + if (begin >= end) + return this; // Nothing to fill + while (begin < end) this.view[begin++] = value; + if (relative) this.offset = begin; + return this; + }; + + /** + * Makes this ByteBuffer ready for a new sequence of write or relative read operations. Sets `limit = offset` and + * `offset = 0`. Make sure always to flip a ByteBuffer when all relative read or write operations are complete. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.flip = function() { + this.limit = this.offset; + this.offset = 0; + return this; + }; + /** + * Marks an offset on this ByteBuffer to be used later. + * @param {number=} offset Offset to mark. Defaults to {@link ByteBuffer#offset}. + * @returns {!ByteBuffer} this + * @throws {TypeError} If `offset` is not a valid number + * @throws {RangeError} If `offset` is out of bounds + * @see ByteBuffer#reset + * @expose + */ + ByteBufferPrototype.mark = function(offset) { + offset = typeof offset === 'undefined' ? this.offset : offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + this.markedOffset = offset; + return this; + }; + /** + * Sets the byte order. + * @param {boolean} littleEndian `true` for little endian byte order, `false` for big endian + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.order = function(littleEndian) { + if (!this.noAssert) { + if (typeof littleEndian !== 'boolean') + throw TypeError("Illegal littleEndian: Not a boolean"); + } + this.littleEndian = !!littleEndian; + return this; + }; + + /** + * Switches (to) little endian byte order. + * @param {boolean=} littleEndian Defaults to `true`, otherwise uses big endian + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.LE = function(littleEndian) { + this.littleEndian = typeof littleEndian !== 'undefined' ? !!littleEndian : true; + return this; + }; + + /** + * Switches (to) big endian byte order. + * @param {boolean=} bigEndian Defaults to `true`, otherwise uses little endian + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.BE = function(bigEndian) { + this.littleEndian = typeof bigEndian !== 'undefined' ? !bigEndian : false; + return this; + }; + /** + * Prepends some data to this ByteBuffer. This will overwrite any contents before the specified offset up to the + * prepended data's length. If there is not enough space available before the specified `offset`, the backing buffer + * will be resized and its contents moved accordingly. + * @param {!ByteBuffer|string|!ArrayBuffer} source Data to prepend. If `source` is a ByteBuffer, its offset will be + * modified according to the performed read operation. + * @param {(string|number)=} encoding Encoding if `data` is a string ("base64", "hex", "binary", defaults to "utf8") + * @param {number=} offset Offset to prepend at. Will use and decrease {@link ByteBuffer#offset} by the number of bytes + * prepended if omitted. + * @returns {!ByteBuffer} this + * @expose + * @example A relative `00<01 02 03>.prepend(<04 05>)` results in `<04 05 01 02 03>, 04 05|` + * @example An absolute `00<01 02 03>.prepend(<04 05>, 2)` results in `04<05 02 03>, 04 05|` + */ + ByteBufferPrototype.prepend = function(source, encoding, offset) { + if (typeof encoding === 'number' || typeof encoding !== 'string') { + offset = encoding; + encoding = undefined; + } + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + if (!(source instanceof ByteBuffer)) + source = ByteBuffer.wrap(source, encoding); + var len = source.limit - source.offset; + if (len <= 0) return this; // Nothing to prepend + var diff = len - offset; + if (diff > 0) { // Not enough space before offset, so resize + move + var buffer = new ArrayBuffer(this.buffer.byteLength + diff); + var view = new Uint8Array(buffer); + view.set(this.view.subarray(offset, this.buffer.byteLength), len); + this.buffer = buffer; + this.view = view; + this.offset += diff; + if (this.markedOffset >= 0) this.markedOffset += diff; + this.limit += diff; + offset += diff; + } else { + var arrayView = new Uint8Array(this.buffer); + } + this.view.set(source.view.subarray(source.offset, source.limit), offset - len); + + source.offset = source.limit; + if (relative) + this.offset -= len; + return this; + }; + + /** + * Prepends this ByteBuffer to another ByteBuffer. This will overwrite any contents before the specified offset up to the + * prepended data's length. If there is not enough space available before the specified `offset`, the backing buffer + * will be resized and its contents moved accordingly. + * @param {!ByteBuffer} target Target ByteBuffer + * @param {number=} offset Offset to prepend at. Will use and decrease {@link ByteBuffer#offset} by the number of bytes + * prepended if omitted. + * @returns {!ByteBuffer} this + * @expose + * @see ByteBuffer#prepend + */ + ByteBufferPrototype.prependTo = function(target, offset) { + target.prepend(this, offset); + return this; + }; + /** + * Prints debug information about this ByteBuffer's contents. + * @param {function(string)=} out Output function to call, defaults to console.log + * @expose + */ + ByteBufferPrototype.printDebug = function(out) { + if (typeof out !== 'function') out = console.log.bind(console); + out( + this.toString()+"\n"+ + "-------------------------------------------------------------------\n"+ + this.toDebug(/* columns */ true) + ); + }; + + /** + * Gets the number of remaining readable bytes. Contents are the bytes between {@link ByteBuffer#offset} and + * {@link ByteBuffer#limit}, so this returns `limit - offset`. + * @returns {number} Remaining readable bytes. May be negative if `offset > limit`. + * @expose + */ + ByteBufferPrototype.remaining = function() { + return this.limit - this.offset; + }; + /** + * Resets this ByteBuffer's {@link ByteBuffer#offset}. If an offset has been marked through {@link ByteBuffer#mark} + * before, `offset` will be set to {@link ByteBuffer#markedOffset}, which will then be discarded. If no offset has been + * marked, sets `offset = 0`. + * @returns {!ByteBuffer} this + * @see ByteBuffer#mark + * @expose + */ + ByteBufferPrototype.reset = function() { + if (this.markedOffset >= 0) { + this.offset = this.markedOffset; + this.markedOffset = -1; + } else { + this.offset = 0; + } + return this; + }; + /** + * Resizes this ByteBuffer to be backed by a buffer of at least the given capacity. Will do nothing if already that + * large or larger. + * @param {number} capacity Capacity required + * @returns {!ByteBuffer} this + * @throws {TypeError} If `capacity` is not a number + * @throws {RangeError} If `capacity < 0` + * @expose + */ + ByteBufferPrototype.resize = function(capacity) { + if (!this.noAssert) { + if (typeof capacity !== 'number' || capacity % 1 !== 0) + throw TypeError("Illegal capacity: "+capacity+" (not an integer)"); + capacity |= 0; + if (capacity < 0) + throw RangeError("Illegal capacity: 0 <= "+capacity); + } + if (this.buffer.byteLength < capacity) { + var buffer = new ArrayBuffer(capacity); + var view = new Uint8Array(buffer); + view.set(this.view); + this.buffer = buffer; + this.view = view; + } + return this; + }; + /** + * Reverses this ByteBuffer's contents. + * @param {number=} begin Offset to start at, defaults to {@link ByteBuffer#offset} + * @param {number=} end Offset to end at, defaults to {@link ByteBuffer#limit} + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.reverse = function(begin, end) { + if (typeof begin === 'undefined') begin = this.offset; + if (typeof end === 'undefined') end = this.limit; + if (!this.noAssert) { + if (typeof begin !== 'number' || begin % 1 !== 0) + throw TypeError("Illegal begin: Not an integer"); + begin >>>= 0; + if (typeof end !== 'number' || end % 1 !== 0) + throw TypeError("Illegal end: Not an integer"); + end >>>= 0; + if (begin < 0 || begin > end || end > this.buffer.byteLength) + throw RangeError("Illegal range: 0 <= "+begin+" <= "+end+" <= "+this.buffer.byteLength); + } + if (begin === end) + return this; // Nothing to reverse + Array.prototype.reverse.call(this.view.subarray(begin, end)); + return this; + }; + /** + * Skips the next `length` bytes. This will just advance + * @param {number} length Number of bytes to skip. May also be negative to move the offset back. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.skip = function(length) { + if (!this.noAssert) { + if (typeof length !== 'number' || length % 1 !== 0) + throw TypeError("Illegal length: "+length+" (not an integer)"); + length |= 0; + } + var offset = this.offset + length; + if (!this.noAssert) { + if (offset < 0 || offset > this.buffer.byteLength) + throw RangeError("Illegal length: 0 <= "+this.offset+" + "+length+" <= "+this.buffer.byteLength); + } + this.offset = offset; + return this; + }; + + /** + * Slices this ByteBuffer by creating a cloned instance with `offset = begin` and `limit = end`. + * @param {number=} begin Begin offset, defaults to {@link ByteBuffer#offset}. + * @param {number=} end End offset, defaults to {@link ByteBuffer#limit}. + * @returns {!ByteBuffer} Clone of this ByteBuffer with slicing applied, backed by the same {@link ByteBuffer#buffer} + * @expose + */ + ByteBufferPrototype.slice = function(begin, end) { + if (typeof begin === 'undefined') begin = this.offset; + if (typeof end === 'undefined') end = this.limit; + if (!this.noAssert) { + if (typeof begin !== 'number' || begin % 1 !== 0) + throw TypeError("Illegal begin: Not an integer"); + begin >>>= 0; + if (typeof end !== 'number' || end % 1 !== 0) + throw TypeError("Illegal end: Not an integer"); + end >>>= 0; + if (begin < 0 || begin > end || end > this.buffer.byteLength) + throw RangeError("Illegal range: 0 <= "+begin+" <= "+end+" <= "+this.buffer.byteLength); + } + var bb = this.clone(); + bb.offset = begin; + bb.limit = end; + return bb; + }; + /** + * Returns a copy of the backing buffer that contains this ByteBuffer's contents. Contents are the bytes between + * {@link ByteBuffer#offset} and {@link ByteBuffer#limit}. + * @param {boolean=} forceCopy If `true` returns a copy, otherwise returns a view referencing the same memory if + * possible. Defaults to `false` + * @returns {!ArrayBuffer} Contents as an ArrayBuffer + * @expose + */ + ByteBufferPrototype.toBuffer = function(forceCopy) { + var offset = this.offset, + limit = this.limit; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: Not an integer"); + offset >>>= 0; + if (typeof limit !== 'number' || limit % 1 !== 0) + throw TypeError("Illegal limit: Not an integer"); + limit >>>= 0; + if (offset < 0 || offset > limit || limit > this.buffer.byteLength) + throw RangeError("Illegal range: 0 <= "+offset+" <= "+limit+" <= "+this.buffer.byteLength); + } + // NOTE: It's not possible to have another ArrayBuffer reference the same memory as the backing buffer. This is + // possible with Uint8Array#subarray only, but we have to return an ArrayBuffer by contract. So: + if (!forceCopy && offset === 0 && limit === this.buffer.byteLength) + return this.buffer; + if (offset === limit) + return EMPTY_BUFFER; + var buffer = new ArrayBuffer(limit - offset); + new Uint8Array(buffer).set(new Uint8Array(this.buffer).subarray(offset, limit), 0); + return buffer; + }; + + /** + * Returns a raw buffer compacted to contain this ByteBuffer's contents. Contents are the bytes between + * {@link ByteBuffer#offset} and {@link ByteBuffer#limit}. This is an alias of {@link ByteBuffer#toBuffer}. + * @function + * @param {boolean=} forceCopy If `true` returns a copy, otherwise returns a view referencing the same memory. + * Defaults to `false` + * @returns {!ArrayBuffer} Contents as an ArrayBuffer + * @expose + */ + ByteBufferPrototype.toArrayBuffer = ByteBufferPrototype.toBuffer; + + /** + * Converts the ByteBuffer's contents to a string. + * @param {string=} encoding Output encoding. Returns an informative string representation if omitted but also allows + * direct conversion to "utf8", "hex", "base64" and "binary" encoding. "debug" returns a hex representation with + * highlighted offsets. + * @param {number=} begin Offset to begin at, defaults to {@link ByteBuffer#offset} + * @param {number=} end Offset to end at, defaults to {@link ByteBuffer#limit} + * @returns {string} String representation + * @throws {Error} If `encoding` is invalid + * @expose + */ + ByteBufferPrototype.toString = function(encoding, begin, end) { + if (typeof encoding === 'undefined') + return "ByteBufferAB(offset="+this.offset+",markedOffset="+this.markedOffset+",limit="+this.limit+",capacity="+this.capacity()+")"; + if (typeof encoding === 'number') + encoding = "utf8", + begin = encoding, + end = begin; + switch (encoding) { + case "utf8": + return this.toUTF8(begin, end); + case "base64": + return this.toBase64(begin, end); + case "hex": + return this.toHex(begin, end); + case "binary": + return this.toBinary(begin, end); + case "debug": + return this.toDebug(); + case "columns": + return this.toColumns(); + default: + throw Error("Unsupported encoding: "+encoding); + } + }; + + // lxiv-embeddable + + /** + * lxiv-embeddable (c) 2014 Daniel Wirtz + * Released under the Apache License, Version 2.0 + * see: https://github.com/dcodeIO/lxiv for details + */ + var lxiv = function() { + "use strict"; + + /** + * lxiv namespace. + * @type {!Object.} + * @exports lxiv + */ + var lxiv = {}; + + /** + * Character codes for output. + * @type {!Array.} + * @inner + */ + var aout = [ + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, + 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 97, 98, 99, 100, 101, 102, + 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, + 119, 120, 121, 122, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 43, 47 + ]; + + /** + * Character codes for input. + * @type {!Array.} + * @inner + */ + var ain = []; + for (var i=0, k=aout.length; i>2)&0x3f]); + t = (b&0x3)<<4; + if ((b = src()) !== null) { + t |= (b>>4)&0xf; + dst(aout[(t|((b>>4)&0xf))&0x3f]); + t = (b&0xf)<<2; + if ((b = src()) !== null) + dst(aout[(t|((b>>6)&0x3))&0x3f]), + dst(aout[b&0x3f]); + else + dst(aout[t&0x3f]), + dst(61); + } else + dst(aout[t&0x3f]), + dst(61), + dst(61); + } + }; + + /** + * Decodes base64 char codes to bytes. + * @param {!function():number|null} src Characters source as a function returning the next char code respectively + * `null` if there are no more characters left. + * @param {!function(number)} dst Bytes destination as a function successively called with the next byte. + * @throws {Error} If a character code is invalid + */ + lxiv.decode = function(src, dst) { + var c, t1, t2; + function fail(c) { + throw Error("Illegal character code: "+c); + } + while ((c = src()) !== null) { + t1 = ain[c]; + if (typeof t1 === 'undefined') fail(c); + if ((c = src()) !== null) { + t2 = ain[c]; + if (typeof t2 === 'undefined') fail(c); + dst((t1<<2)>>>0|(t2&0x30)>>4); + if ((c = src()) !== null) { + t1 = ain[c]; + if (typeof t1 === 'undefined') + if (c === 61) break; else fail(c); + dst(((t2&0xf)<<4)>>>0|(t1&0x3c)>>2); + if ((c = src()) !== null) { + t2 = ain[c]; + if (typeof t2 === 'undefined') + if (c === 61) break; else fail(c); + dst(((t1&0x3)<<6)>>>0|t2); + } + } + } + } + }; + + /** + * Tests if a string is valid base64. + * @param {string} str String to test + * @returns {boolean} `true` if valid, otherwise `false` + */ + lxiv.test = function(str) { + return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(str); + }; + + return lxiv; + }(); + + // encodings/base64 + + /** + * Encodes this ByteBuffer's contents to a base64 encoded string. + * @param {number=} begin Offset to begin at, defaults to {@link ByteBuffer#offset}. + * @param {number=} end Offset to end at, defaults to {@link ByteBuffer#limit}. + * @returns {string} Base64 encoded string + * @throws {RangeError} If `begin` or `end` is out of bounds + * @expose + */ + ByteBufferPrototype.toBase64 = function(begin, end) { + if (typeof begin === 'undefined') + begin = this.offset; + if (typeof end === 'undefined') + end = this.limit; + begin = begin | 0; end = end | 0; + if (begin < 0 || end > this.capacity || begin > end) + throw RangeError("begin, end"); + var sd; lxiv.encode(function() { + return begin < end ? this.view[begin++] : null; + }.bind(this), sd = stringDestination()); + return sd(); + }; + + /** + * Decodes a base64 encoded string to a ByteBuffer. + * @param {string} str String to decode + * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to + * {@link ByteBuffer.DEFAULT_ENDIAN}. + * @returns {!ByteBuffer} ByteBuffer + * @expose + */ + ByteBuffer.fromBase64 = function(str, littleEndian) { + if (typeof str !== 'string') + throw TypeError("str"); + var bb = new ByteBuffer(str.length/4*3, littleEndian), + i = 0; + lxiv.decode(stringSource(str), function(b) { + bb.view[i++] = b; + }); + bb.limit = i; + return bb; + }; + + /** + * Encodes a binary string to base64 like `window.btoa` does. + * @param {string} str Binary string + * @returns {string} Base64 encoded string + * @see https://developer.mozilla.org/en-US/docs/Web/API/Window.btoa + * @expose + */ + ByteBuffer.btoa = function(str) { + return ByteBuffer.fromBinary(str).toBase64(); + }; + + /** + * Decodes a base64 encoded string to binary like `window.atob` does. + * @param {string} b64 Base64 encoded string + * @returns {string} Binary string + * @see https://developer.mozilla.org/en-US/docs/Web/API/Window.atob + * @expose + */ + ByteBuffer.atob = function(b64) { + return ByteBuffer.fromBase64(b64).toBinary(); + }; + + // encodings/binary + + /** + * Encodes this ByteBuffer to a binary encoded string, that is using only characters 0x00-0xFF as bytes. + * @param {number=} begin Offset to begin at. Defaults to {@link ByteBuffer#offset}. + * @param {number=} end Offset to end at. Defaults to {@link ByteBuffer#limit}. + * @returns {string} Binary encoded string + * @throws {RangeError} If `offset > limit` + * @expose + */ + ByteBufferPrototype.toBinary = function(begin, end) { + if (typeof begin === 'undefined') + begin = this.offset; + if (typeof end === 'undefined') + end = this.limit; + begin |= 0; end |= 0; + if (begin < 0 || end > this.capacity() || begin > end) + throw RangeError("begin, end"); + if (begin === end) + return ""; + var chars = [], + parts = []; + while (begin < end) { + chars.push(this.view[begin++]); + if (chars.length >= 1024) + parts.push(String.fromCharCode.apply(String, chars)), + chars = []; + } + return parts.join('') + String.fromCharCode.apply(String, chars); + }; + + /** + * Decodes a binary encoded string, that is using only characters 0x00-0xFF as bytes, to a ByteBuffer. + * @param {string} str String to decode + * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to + * {@link ByteBuffer.DEFAULT_ENDIAN}. + * @returns {!ByteBuffer} ByteBuffer + * @expose + */ + ByteBuffer.fromBinary = function(str, littleEndian) { + if (typeof str !== 'string') + throw TypeError("str"); + var i = 0, + k = str.length, + charCode, + bb = new ByteBuffer(k, littleEndian); + while (i 0xff) + throw RangeError("illegal char code: "+charCode); + bb.view[i++] = charCode; + } + bb.limit = k; + return bb; + }; + + // encodings/debug + + /** + * Encodes this ByteBuffer to a hex encoded string with marked offsets. Offset symbols are: + * * `<` : offset, + * * `'` : markedOffset, + * * `>` : limit, + * * `|` : offset and limit, + * * `[` : offset and markedOffset, + * * `]` : markedOffset and limit, + * * `!` : offset, markedOffset and limit + * @param {boolean=} columns If `true` returns two columns hex + ascii, defaults to `false` + * @returns {string|!Array.} Debug string or array of lines if `asArray = true` + * @expose + * @example `>00'01 02<03` contains four bytes with `limit=0, markedOffset=1, offset=3` + * @example `00[01 02 03>` contains four bytes with `offset=markedOffset=1, limit=4` + * @example `00|01 02 03` contains four bytes with `offset=limit=1, markedOffset=-1` + * @example `|` contains zero bytes with `offset=limit=0, markedOffset=-1` + */ + ByteBufferPrototype.toDebug = function(columns) { + var i = -1, + k = this.buffer.byteLength, + b, + hex = "", + asc = "", + out = ""; + while (i 32 && b < 127 ? String.fromCharCode(b) : '.'; + } + ++i; + if (columns) { + if (i > 0 && i % 16 === 0 && i !== k) { + while (hex.length < 3*16+3) hex += " "; + out += hex+asc+"\n"; + hex = asc = ""; + } + } + if (i === this.offset && i === this.limit) + hex += i === this.markedOffset ? "!" : "|"; + else if (i === this.offset) + hex += i === this.markedOffset ? "[" : "<"; + else if (i === this.limit) + hex += i === this.markedOffset ? "]" : ">"; + else + hex += i === this.markedOffset ? "'" : (columns || (i !== 0 && i !== k) ? " " : ""); + } + if (columns && hex !== " ") { + while (hex.length < 3*16+3) + hex += " "; + out += hex + asc + "\n"; + } + return columns ? out : hex; + }; + + /** + * Decodes a hex encoded string with marked offsets to a ByteBuffer. + * @param {string} str Debug string to decode (not be generated with `columns = true`) + * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to + * {@link ByteBuffer.DEFAULT_ENDIAN}. + * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to + * {@link ByteBuffer.DEFAULT_NOASSERT}. + * @returns {!ByteBuffer} ByteBuffer + * @expose + * @see ByteBuffer#toDebug + */ + ByteBuffer.fromDebug = function(str, littleEndian, noAssert) { + var k = str.length, + bb = new ByteBuffer(((k+1)/3)|0, littleEndian, noAssert); + var i = 0, j = 0, ch, b, + rs = false, // Require symbol next + ho = false, hm = false, hl = false, // Already has offset (ho), markedOffset (hm), limit (hl)? + fail = false; + while (i': + if (!noAssert) { + if (hl) { + fail = true; + break; + } + hl = true; + } + bb.limit = j; + rs = false; + break; + case "'": + if (!noAssert) { + if (hm) { + fail = true; + break; + } + hm = true; + } + bb.markedOffset = j; + rs = false; + break; + case ' ': + rs = false; + break; + default: + if (!noAssert) { + if (rs) { + fail = true; + break; + } + } + b = parseInt(ch+str.charAt(i++), 16); + if (!noAssert) { + if (isNaN(b) || b < 0 || b > 255) + throw TypeError("Illegal str: Not a debug encoded string"); + } + bb.view[j++] = b; + rs = true; + } + if (fail) + throw TypeError("Illegal str: Invalid symbol at "+i); + } + if (!noAssert) { + if (!ho || !hl) + throw TypeError("Illegal str: Missing offset or limit"); + if (j>>= 0; + if (typeof end !== 'number' || end % 1 !== 0) + throw TypeError("Illegal end: Not an integer"); + end >>>= 0; + if (begin < 0 || begin > end || end > this.buffer.byteLength) + throw RangeError("Illegal range: 0 <= "+begin+" <= "+end+" <= "+this.buffer.byteLength); + } + var out = new Array(end - begin), + b; + while (begin < end) { + b = this.view[begin++]; + if (b < 0x10) + out.push("0", b.toString(16)); + else out.push(b.toString(16)); + } + return out.join(''); + }; + + /** + * Decodes a hex encoded string to a ByteBuffer. + * @param {string} str String to decode + * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to + * {@link ByteBuffer.DEFAULT_ENDIAN}. + * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to + * {@link ByteBuffer.DEFAULT_NOASSERT}. + * @returns {!ByteBuffer} ByteBuffer + * @expose + */ + ByteBuffer.fromHex = function(str, littleEndian, noAssert) { + if (!noAssert) { + if (typeof str !== 'string') + throw TypeError("Illegal str: Not a string"); + if (str.length % 2 !== 0) + throw TypeError("Illegal str: Length not a multiple of 2"); + } + var k = str.length, + bb = new ByteBuffer((k / 2) | 0, littleEndian), + b; + for (var i=0, j=0; i 255) + throw TypeError("Illegal str: Contains non-hex characters"); + bb.view[j++] = b; + } + bb.limit = j; + return bb; + }; + + // utfx-embeddable + + /** + * utfx-embeddable (c) 2014 Daniel Wirtz + * Released under the Apache License, Version 2.0 + * see: https://github.com/dcodeIO/utfx for details + */ + var utfx = function() { + "use strict"; + + /** + * utfx namespace. + * @inner + * @type {!Object.} + */ + var utfx = {}; + + /** + * Maximum valid code point. + * @type {number} + * @const + */ + utfx.MAX_CODEPOINT = 0x10FFFF; + + /** + * Encodes UTF8 code points to UTF8 bytes. + * @param {(!function():number|null) | number} src Code points source, either as a function returning the next code point + * respectively `null` if there are no more code points left or a single numeric code point. + * @param {!function(number)} dst Bytes destination as a function successively called with the next byte + */ + utfx.encodeUTF8 = function(src, dst) { + var cp = null; + if (typeof src === 'number') + cp = src, + src = function() { return null; }; + while (cp !== null || (cp = src()) !== null) { + if (cp < 0x80) + dst(cp&0x7F); + else if (cp < 0x800) + dst(((cp>>6)&0x1F)|0xC0), + dst((cp&0x3F)|0x80); + else if (cp < 0x10000) + dst(((cp>>12)&0x0F)|0xE0), + dst(((cp>>6)&0x3F)|0x80), + dst((cp&0x3F)|0x80); + else + dst(((cp>>18)&0x07)|0xF0), + dst(((cp>>12)&0x3F)|0x80), + dst(((cp>>6)&0x3F)|0x80), + dst((cp&0x3F)|0x80); + cp = null; + } + }; + + /** + * Decodes UTF8 bytes to UTF8 code points. + * @param {!function():number|null} src Bytes source as a function returning the next byte respectively `null` if there + * are no more bytes left. + * @param {!function(number)} dst Code points destination as a function successively called with each decoded code point. + * @throws {RangeError} If a starting byte is invalid in UTF8 + * @throws {Error} If the last sequence is truncated. Has an array property `bytes` holding the + * remaining bytes. + */ + utfx.decodeUTF8 = function(src, dst) { + var a, b, c, d, fail = function(b) { + b = b.slice(0, b.indexOf(null)); + var err = Error(b.toString()); + err.name = "TruncatedError"; + err['bytes'] = b; + throw err; + }; + while ((a = src()) !== null) { + if ((a&0x80) === 0) + dst(a); + else if ((a&0xE0) === 0xC0) + ((b = src()) === null) && fail([a, b]), + dst(((a&0x1F)<<6) | (b&0x3F)); + else if ((a&0xF0) === 0xE0) + ((b=src()) === null || (c=src()) === null) && fail([a, b, c]), + dst(((a&0x0F)<<12) | ((b&0x3F)<<6) | (c&0x3F)); + else if ((a&0xF8) === 0xF0) + ((b=src()) === null || (c=src()) === null || (d=src()) === null) && fail([a, b, c ,d]), + dst(((a&0x07)<<18) | ((b&0x3F)<<12) | ((c&0x3F)<<6) | (d&0x3F)); + else throw RangeError("Illegal starting byte: "+a); + } + }; + + /** + * Converts UTF16 characters to UTF8 code points. + * @param {!function():number|null} src Characters source as a function returning the next char code respectively + * `null` if there are no more characters left. + * @param {!function(number)} dst Code points destination as a function successively called with each converted code + * point. + */ + utfx.UTF16toUTF8 = function(src, dst) { + var c1, c2 = null; + while (true) { + if ((c1 = c2 !== null ? c2 : src()) === null) + break; + if (c1 >= 0xD800 && c1 <= 0xDFFF) { + if ((c2 = src()) !== null) { + if (c2 >= 0xDC00 && c2 <= 0xDFFF) { + dst((c1-0xD800)*0x400+c2-0xDC00+0x10000); + c2 = null; continue; + } + } + } + dst(c1); + } + if (c2 !== null) dst(c2); + }; + + /** + * Converts UTF8 code points to UTF16 characters. + * @param {(!function():number|null) | number} src Code points source, either as a function returning the next code point + * respectively `null` if there are no more code points left or a single numeric code point. + * @param {!function(number)} dst Characters destination as a function successively called with each converted char code. + * @throws {RangeError} If a code point is out of range + */ + utfx.UTF8toUTF16 = function(src, dst) { + var cp = null; + if (typeof src === 'number') + cp = src, src = function() { return null; }; + while (cp !== null || (cp = src()) !== null) { + if (cp <= 0xFFFF) + dst(cp); + else + cp -= 0x10000, + dst((cp>>10)+0xD800), + dst((cp%0x400)+0xDC00); + cp = null; + } + }; + + /** + * Converts and encodes UTF16 characters to UTF8 bytes. + * @param {!function():number|null} src Characters source as a function returning the next char code respectively `null` + * if there are no more characters left. + * @param {!function(number)} dst Bytes destination as a function successively called with the next byte. + */ + utfx.encodeUTF16toUTF8 = function(src, dst) { + utfx.UTF16toUTF8(src, function(cp) { + utfx.encodeUTF8(cp, dst); + }); + }; + + /** + * Decodes and converts UTF8 bytes to UTF16 characters. + * @param {!function():number|null} src Bytes source as a function returning the next byte respectively `null` if there + * are no more bytes left. + * @param {!function(number)} dst Characters destination as a function successively called with each converted char code. + * @throws {RangeError} If a starting byte is invalid in UTF8 + * @throws {Error} If the last sequence is truncated. Has an array property `bytes` holding the remaining bytes. + */ + utfx.decodeUTF8toUTF16 = function(src, dst) { + utfx.decodeUTF8(src, function(cp) { + utfx.UTF8toUTF16(cp, dst); + }); + }; + + /** + * Calculates the byte length of an UTF8 code point. + * @param {number} cp UTF8 code point + * @returns {number} Byte length + */ + utfx.calculateCodePoint = function(cp) { + return (cp < 0x80) ? 1 : (cp < 0x800) ? 2 : (cp < 0x10000) ? 3 : 4; + }; + + /** + * Calculates the number of UTF8 bytes required to store UTF8 code points. + * @param {(!function():number|null)} src Code points source as a function returning the next code point respectively + * `null` if there are no more code points left. + * @returns {number} The number of UTF8 bytes required + */ + utfx.calculateUTF8 = function(src) { + var cp, l=0; + while ((cp = src()) !== null) + l += (cp < 0x80) ? 1 : (cp < 0x800) ? 2 : (cp < 0x10000) ? 3 : 4; + return l; + }; + + /** + * Calculates the number of UTF8 code points respectively UTF8 bytes required to store UTF16 char codes. + * @param {(!function():number|null)} src Characters source as a function returning the next char code respectively + * `null` if there are no more characters left. + * @returns {!Array.} The number of UTF8 code points at index 0 and the number of UTF8 bytes required at index 1. + */ + utfx.calculateUTF16asUTF8 = function(src) { + var n=0, l=0; + utfx.UTF16toUTF8(src, function(cp) { + ++n; l += (cp < 0x80) ? 1 : (cp < 0x800) ? 2 : (cp < 0x10000) ? 3 : 4; + }); + return [n,l]; + }; + + return utfx; + }(); + + // encodings/utf8 + + /** + * Encodes this ByteBuffer's contents between {@link ByteBuffer#offset} and {@link ByteBuffer#limit} to an UTF8 encoded + * string. + * @returns {string} Hex encoded string + * @throws {RangeError} If `offset > limit` + * @expose + */ + ByteBufferPrototype.toUTF8 = function(begin, end) { + if (typeof begin === 'undefined') begin = this.offset; + if (typeof end === 'undefined') end = this.limit; + if (!this.noAssert) { + if (typeof begin !== 'number' || begin % 1 !== 0) + throw TypeError("Illegal begin: Not an integer"); + begin >>>= 0; + if (typeof end !== 'number' || end % 1 !== 0) + throw TypeError("Illegal end: Not an integer"); + end >>>= 0; + if (begin < 0 || begin > end || end > this.buffer.byteLength) + throw RangeError("Illegal range: 0 <= "+begin+" <= "+end+" <= "+this.buffer.byteLength); + } + var sd; try { + utfx.decodeUTF8toUTF16(function() { + return begin < end ? this.view[begin++] : null; + }.bind(this), sd = stringDestination()); + } catch (e) { + if (begin !== end) + throw RangeError("Illegal range: Truncated data, "+begin+" != "+end); + } + return sd(); + }; + + /** + * Decodes an UTF8 encoded string to a ByteBuffer. + * @param {string} str String to decode + * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to + * {@link ByteBuffer.DEFAULT_ENDIAN}. + * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to + * {@link ByteBuffer.DEFAULT_NOASSERT}. + * @returns {!ByteBuffer} ByteBuffer + * @expose + */ + ByteBuffer.fromUTF8 = function(str, littleEndian, noAssert) { + if (!noAssert) + if (typeof str !== 'string') + throw TypeError("Illegal str: Not a string"); + var bb = new ByteBuffer(utfx.calculateUTF16asUTF8(stringSource(str), true)[1], littleEndian, noAssert), + i = 0; + utfx.encodeUTF16toUTF8(stringSource(str), function(b) { + bb.view[i++] = b; + }); + bb.limit = i; + return bb; + }; + + return ByteBuffer; + }); + }); + + var empty$1 = {}; + + + var empty$2 = Object.freeze({ + default: empty$1 + }); + + var require$$2 = ( empty$2 && empty$1 ) || empty$2; + + var protobufLight = createCommonjsModule(function (module) { + /* + Copyright 2013 Daniel Wirtz + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + + /** + * @license protobuf.js (c) 2013 Daniel Wirtz + * Released under the Apache License, Version 2.0 + * see: https://github.com/dcodeIO/protobuf.js for details + */ + (function(global, factory) { + + /* AMD */ if (typeof undefined === 'function' && undefined["amd"]) + undefined(["bytebuffer"], factory); + /* CommonJS */ else if (typeof commonjsRequire === "function" && 'object' === "object" && module && module["exports"]) + module["exports"] = factory(bytebuffer, true); + /* Global */ else + (global["dcodeIO"] = global["dcodeIO"] || {})["ProtoBuf"] = factory(global["dcodeIO"]["ByteBuffer"]); + + })(commonjsGlobal, function(ByteBuffer, isCommonJS) { + "use strict"; + + /** + * The ProtoBuf namespace. + * @exports ProtoBuf + * @namespace + * @expose + */ + var ProtoBuf = {}; + + /** + * @type {!function(new: ByteBuffer, ...[*])} + * @expose + */ + ProtoBuf.ByteBuffer = ByteBuffer; + + /** + * @type {?function(new: Long, ...[*])} + * @expose + */ + ProtoBuf.Long = ByteBuffer.Long || null; + + /** + * ProtoBuf.js version. + * @type {string} + * @const + * @expose + */ + ProtoBuf.VERSION = "5.0.2"; + + /** + * Wire types. + * @type {Object.} + * @const + * @expose + */ + ProtoBuf.WIRE_TYPES = {}; + + /** + * Varint wire type. + * @type {number} + * @expose + */ + ProtoBuf.WIRE_TYPES.VARINT = 0; + + /** + * Fixed 64 bits wire type. + * @type {number} + * @const + * @expose + */ + ProtoBuf.WIRE_TYPES.BITS64 = 1; + + /** + * Length delimited wire type. + * @type {number} + * @const + * @expose + */ + ProtoBuf.WIRE_TYPES.LDELIM = 2; + + /** + * Start group wire type. + * @type {number} + * @const + * @expose + */ + ProtoBuf.WIRE_TYPES.STARTGROUP = 3; + + /** + * End group wire type. + * @type {number} + * @const + * @expose + */ + ProtoBuf.WIRE_TYPES.ENDGROUP = 4; + + /** + * Fixed 32 bits wire type. + * @type {number} + * @const + * @expose + */ + ProtoBuf.WIRE_TYPES.BITS32 = 5; + + /** + * Packable wire types. + * @type {!Array.} + * @const + * @expose + */ + ProtoBuf.PACKABLE_WIRE_TYPES = [ + ProtoBuf.WIRE_TYPES.VARINT, + ProtoBuf.WIRE_TYPES.BITS64, + ProtoBuf.WIRE_TYPES.BITS32 + ]; + + /** + * Types. + * @dict + * @type {!Object.} + * @const + * @expose + */ + ProtoBuf.TYPES = { + // According to the protobuf spec. + "int32": { + name: "int32", + wireType: ProtoBuf.WIRE_TYPES.VARINT, + defaultValue: 0 + }, + "uint32": { + name: "uint32", + wireType: ProtoBuf.WIRE_TYPES.VARINT, + defaultValue: 0 + }, + "sint32": { + name: "sint32", + wireType: ProtoBuf.WIRE_TYPES.VARINT, + defaultValue: 0 + }, + "int64": { + name: "int64", + wireType: ProtoBuf.WIRE_TYPES.VARINT, + defaultValue: ProtoBuf.Long ? ProtoBuf.Long.ZERO : undefined + }, + "uint64": { + name: "uint64", + wireType: ProtoBuf.WIRE_TYPES.VARINT, + defaultValue: ProtoBuf.Long ? ProtoBuf.Long.UZERO : undefined + }, + "sint64": { + name: "sint64", + wireType: ProtoBuf.WIRE_TYPES.VARINT, + defaultValue: ProtoBuf.Long ? ProtoBuf.Long.ZERO : undefined + }, + "bool": { + name: "bool", + wireType: ProtoBuf.WIRE_TYPES.VARINT, + defaultValue: false + }, + "double": { + name: "double", + wireType: ProtoBuf.WIRE_TYPES.BITS64, + defaultValue: 0 + }, + "string": { + name: "string", + wireType: ProtoBuf.WIRE_TYPES.LDELIM, + defaultValue: "" + }, + "bytes": { + name: "bytes", + wireType: ProtoBuf.WIRE_TYPES.LDELIM, + defaultValue: null // overridden in the code, must be a unique instance + }, + "fixed32": { + name: "fixed32", + wireType: ProtoBuf.WIRE_TYPES.BITS32, + defaultValue: 0 + }, + "sfixed32": { + name: "sfixed32", + wireType: ProtoBuf.WIRE_TYPES.BITS32, + defaultValue: 0 + }, + "fixed64": { + name: "fixed64", + wireType: ProtoBuf.WIRE_TYPES.BITS64, + defaultValue: ProtoBuf.Long ? ProtoBuf.Long.UZERO : undefined + }, + "sfixed64": { + name: "sfixed64", + wireType: ProtoBuf.WIRE_TYPES.BITS64, + defaultValue: ProtoBuf.Long ? ProtoBuf.Long.ZERO : undefined + }, + "float": { + name: "float", + wireType: ProtoBuf.WIRE_TYPES.BITS32, + defaultValue: 0 + }, + "enum": { + name: "enum", + wireType: ProtoBuf.WIRE_TYPES.VARINT, + defaultValue: 0 + }, + "message": { + name: "message", + wireType: ProtoBuf.WIRE_TYPES.LDELIM, + defaultValue: null + }, + "group": { + name: "group", + wireType: ProtoBuf.WIRE_TYPES.STARTGROUP, + defaultValue: null + } + }; + + /** + * Valid map key types. + * @type {!Array.>} + * @const + * @expose + */ + ProtoBuf.MAP_KEY_TYPES = [ + ProtoBuf.TYPES["int32"], + ProtoBuf.TYPES["sint32"], + ProtoBuf.TYPES["sfixed32"], + ProtoBuf.TYPES["uint32"], + ProtoBuf.TYPES["fixed32"], + ProtoBuf.TYPES["int64"], + ProtoBuf.TYPES["sint64"], + ProtoBuf.TYPES["sfixed64"], + ProtoBuf.TYPES["uint64"], + ProtoBuf.TYPES["fixed64"], + ProtoBuf.TYPES["bool"], + ProtoBuf.TYPES["string"], + ProtoBuf.TYPES["bytes"] + ]; + + /** + * Minimum field id. + * @type {number} + * @const + * @expose + */ + ProtoBuf.ID_MIN = 1; + + /** + * Maximum field id. + * @type {number} + * @const + * @expose + */ + ProtoBuf.ID_MAX = 0x1FFFFFFF; + + /** + * If set to `true`, field names will be converted from underscore notation to camel case. Defaults to `false`. + * Must be set prior to parsing. + * @type {boolean} + * @expose + */ + ProtoBuf.convertFieldsToCamelCase = false; + + /** + * By default, messages are populated with (setX, set_x) accessors for each field. This can be disabled by + * setting this to `false` prior to building messages. + * @type {boolean} + * @expose + */ + ProtoBuf.populateAccessors = true; + + /** + * By default, messages are populated with default values if a field is not present on the wire. To disable + * this behavior, set this setting to `false`. + * @type {boolean} + * @expose + */ + ProtoBuf.populateDefaults = true; + + /** + * @alias ProtoBuf.Util + * @expose + */ + ProtoBuf.Util = (function() { + "use strict"; + + /** + * ProtoBuf utilities. + * @exports ProtoBuf.Util + * @namespace + */ + var Util = {}; + + /** + * Flag if running in node or not. + * @type {boolean} + * @const + * @expose + */ + Util.IS_NODE = !!( + typeof process === 'object' && process+'' === '[object process]' && !process['browser'] + ); + + /** + * Constructs a XMLHttpRequest object. + * @return {XMLHttpRequest} + * @throws {Error} If XMLHttpRequest is not supported + * @expose + */ + Util.XHR = function() { + // No dependencies please, ref: http://www.quirksmode.org/js/xmlhttp.html + var XMLHttpFactories = [ + function () {return new XMLHttpRequest()}, + function () {return new ActiveXObject("Msxml2.XMLHTTP")}, + function () {return new ActiveXObject("Msxml3.XMLHTTP")}, + function () {return new ActiveXObject("Microsoft.XMLHTTP")} + ]; + /** @type {?XMLHttpRequest} */ + var xhr = null; + for (var i=0;i} + * @expose + */ + ProtoBuf.Lang = { + + // Characters always ending a statement + DELIM: /[\s\{\}=;:\[\],'"\(\)<>]/g, + + // Field rules + RULE: /^(?:required|optional|repeated|map)$/, + + // Field types + TYPE: /^(?:double|float|int32|uint32|sint32|int64|uint64|sint64|fixed32|sfixed32|fixed64|sfixed64|bool|string|bytes)$/, + + // Names + NAME: /^[a-zA-Z_][a-zA-Z_0-9]*$/, + + // Type definitions + TYPEDEF: /^[a-zA-Z][a-zA-Z_0-9]*$/, + + // Type references + TYPEREF: /^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)+$/, + + // Fully qualified type references + FQTYPEREF: /^(?:\.[a-zA-Z][a-zA-Z_0-9]*)+$/, + + // All numbers + NUMBER: /^-?(?:[1-9][0-9]*|0|0[xX][0-9a-fA-F]+|0[0-7]+|([0-9]*(\.[0-9]*)?([Ee][+-]?[0-9]+)?)|inf|nan)$/, + + // Decimal numbers + NUMBER_DEC: /^(?:[1-9][0-9]*|0)$/, + + // Hexadecimal numbers + NUMBER_HEX: /^0[xX][0-9a-fA-F]+$/, + + // Octal numbers + NUMBER_OCT: /^0[0-7]+$/, + + // Floating point numbers + NUMBER_FLT: /^([0-9]*(\.[0-9]*)?([Ee][+-]?[0-9]+)?|inf|nan)$/, + + // Booleans + BOOL: /^(?:true|false)$/i, + + // Id numbers + ID: /^(?:[1-9][0-9]*|0|0[xX][0-9a-fA-F]+|0[0-7]+)$/, + + // Negative id numbers (enum values) + NEGID: /^\-?(?:[1-9][0-9]*|0|0[xX][0-9a-fA-F]+|0[0-7]+)$/, + + // Whitespaces + WHITESPACE: /\s/, + + // All strings + STRING: /(?:"([^"\\]*(?:\\.[^"\\]*)*)")|(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g, + + // Double quoted strings + STRING_DQ: /(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g, + + // Single quoted strings + STRING_SQ: /(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g + }; + + + /** + * @alias ProtoBuf.Reflect + * @expose + */ + ProtoBuf.Reflect = (function(ProtoBuf) { + "use strict"; + + /** + * Reflection types. + * @exports ProtoBuf.Reflect + * @namespace + */ + var Reflect = {}; + + /** + * Constructs a Reflect base class. + * @exports ProtoBuf.Reflect.T + * @constructor + * @abstract + * @param {!ProtoBuf.Builder} builder Builder reference + * @param {?ProtoBuf.Reflect.T} parent Parent object + * @param {string} name Object name + */ + var T = function(builder, parent, name) { + + /** + * Builder reference. + * @type {!ProtoBuf.Builder} + * @expose + */ + this.builder = builder; + + /** + * Parent object. + * @type {?ProtoBuf.Reflect.T} + * @expose + */ + this.parent = parent; + + /** + * Object name in namespace. + * @type {string} + * @expose + */ + this.name = name; + + /** + * Fully qualified class name + * @type {string} + * @expose + */ + this.className; + }; + + /** + * @alias ProtoBuf.Reflect.T.prototype + * @inner + */ + var TPrototype = T.prototype; + + /** + * Returns the fully qualified name of this object. + * @returns {string} Fully qualified name as of ".PATH.TO.THIS" + * @expose + */ + TPrototype.fqn = function() { + var name = this.name, + ptr = this; + do { + ptr = ptr.parent; + if (ptr == null) + break; + name = ptr.name+"."+name; + } while (true); + return name; + }; + + /** + * Returns a string representation of this Reflect object (its fully qualified name). + * @param {boolean=} includeClass Set to true to include the class name. Defaults to false. + * @return String representation + * @expose + */ + TPrototype.toString = function(includeClass) { + return (includeClass ? this.className + " " : "") + this.fqn(); + }; + + /** + * Builds this type. + * @throws {Error} If this type cannot be built directly + * @expose + */ + TPrototype.build = function() { + throw Error(this.toString(true)+" cannot be built directly"); + }; + + /** + * @alias ProtoBuf.Reflect.T + * @expose + */ + Reflect.T = T; + + /** + * Constructs a new Namespace. + * @exports ProtoBuf.Reflect.Namespace + * @param {!ProtoBuf.Builder} builder Builder reference + * @param {?ProtoBuf.Reflect.Namespace} parent Namespace parent + * @param {string} name Namespace name + * @param {Object.=} options Namespace options + * @param {string?} syntax The syntax level of this definition (e.g., proto3) + * @constructor + * @extends ProtoBuf.Reflect.T + */ + var Namespace = function(builder, parent, name, options, syntax) { + T.call(this, builder, parent, name); + + /** + * @override + */ + this.className = "Namespace"; + + /** + * Children inside the namespace. + * @type {!Array.} + */ + this.children = []; + + /** + * Options. + * @type {!Object.} + */ + this.options = options || {}; + + /** + * Syntax level (e.g., proto2 or proto3). + * @type {!string} + */ + this.syntax = syntax || "proto2"; + }; + + /** + * @alias ProtoBuf.Reflect.Namespace.prototype + * @inner + */ + var NamespacePrototype = Namespace.prototype = Object.create(T.prototype); + + /** + * Returns an array of the namespace's children. + * @param {ProtoBuf.Reflect.T=} type Filter type (returns instances of this type only). Defaults to null (all children). + * @return {Array.} + * @expose + */ + NamespacePrototype.getChildren = function(type) { + type = type || null; + if (type == null) + return this.children.slice(); + var children = []; + for (var i=0, k=this.children.length; i} qn Qualified name to resolve + * @param {boolean=} excludeNonNamespace Excludes non-namespace types, defaults to `false` + * @return {?ProtoBuf.Reflect.Namespace} The resolved type or null if not found + * @expose + */ + NamespacePrototype.resolve = function(qn, excludeNonNamespace) { + var part = typeof qn === 'string' ? qn.split(".") : qn, + ptr = this, + i = 0; + if (part[i] === "") { // Fully qualified name, e.g. ".My.Message' + while (ptr.parent !== null) + ptr = ptr.parent; + i++; + } + var child; + do { + do { + if (!(ptr instanceof Reflect.Namespace)) { + ptr = null; + break; + } + child = ptr.getChild(part[i]); + if (!child || !(child instanceof Reflect.T) || (excludeNonNamespace && !(child instanceof Reflect.Namespace))) { + ptr = null; + break; + } + ptr = child; i++; + } while (i < part.length); + if (ptr != null) + break; // Found + // Else search the parent + if (this.parent !== null) + return this.parent.resolve(qn, excludeNonNamespace); + } while (ptr != null); + return ptr; + }; + + /** + * Determines the shortest qualified name of the specified type, if any, relative to this namespace. + * @param {!ProtoBuf.Reflect.T} t Reflection type + * @returns {string} The shortest qualified name or, if there is none, the fqn + * @expose + */ + NamespacePrototype.qn = function(t) { + var part = [], ptr = t; + do { + part.unshift(ptr.name); + ptr = ptr.parent; + } while (ptr !== null); + for (var len=1; len <= part.length; len++) { + var qn = part.slice(part.length-len); + if (t === this.resolve(qn, t instanceof Reflect.Namespace)) + return qn.join("."); + } + return t.fqn(); + }; + + /** + * Builds the namespace and returns the runtime counterpart. + * @return {Object.} Runtime namespace + * @expose + */ + NamespacePrototype.build = function() { + /** @dict */ + var ns = {}; + var children = this.children; + for (var i=0, k=children.length, child; i} + */ + NamespacePrototype.buildOpt = function() { + var opt = {}, + keys = Object.keys(this.options); + for (var i=0, k=keys.length; i}null} Option value or NULL if there is no such option + */ + NamespacePrototype.getOption = function(name) { + if (typeof name === 'undefined') + return this.options; + return typeof this.options[name] !== 'undefined' ? this.options[name] : null; + }; + + /** + * @alias ProtoBuf.Reflect.Namespace + * @expose + */ + Reflect.Namespace = Namespace; + + /** + * Constructs a new Element implementation that checks and converts values for a + * particular field type, as appropriate. + * + * An Element represents a single value: either the value of a singular field, + * or a value contained in one entry of a repeated field or map field. This + * class does not implement these higher-level concepts; it only encapsulates + * the low-level typechecking and conversion. + * + * @exports ProtoBuf.Reflect.Element + * @param {{name: string, wireType: number}} type Resolved data type + * @param {ProtoBuf.Reflect.T|null} resolvedType Resolved type, if relevant + * (e.g. submessage field). + * @param {boolean} isMapKey Is this element a Map key? The value will be + * converted to string form if so. + * @param {string} syntax Syntax level of defining message type, e.g., + * proto2 or proto3. + * @param {string} name Name of the field containing this element (for error + * messages) + * @constructor + */ + var Element = function(type, resolvedType, isMapKey, syntax, name) { + + /** + * Element type, as a string (e.g., int32). + * @type {{name: string, wireType: number}} + */ + this.type = type; + + /** + * Element type reference to submessage or enum definition, if needed. + * @type {ProtoBuf.Reflect.T|null} + */ + this.resolvedType = resolvedType; + + /** + * Element is a map key. + * @type {boolean} + */ + this.isMapKey = isMapKey; + + /** + * Syntax level of defining message type, e.g., proto2 or proto3. + * @type {string} + */ + this.syntax = syntax; + + /** + * Name of the field containing this element (for error messages) + * @type {string} + */ + this.name = name; + + if (isMapKey && ProtoBuf.MAP_KEY_TYPES.indexOf(type) < 0) + throw Error("Invalid map key type: " + type.name); + }; + + var ElementPrototype = Element.prototype; + + /** + * Obtains a (new) default value for the specified type. + * @param type {string|{name: string, wireType: number}} Field type + * @returns {*} Default value + * @inner + */ + function mkDefault(type) { + if (typeof type === 'string') + type = ProtoBuf.TYPES[type]; + if (typeof type.defaultValue === 'undefined') + throw Error("default value for type "+type.name+" is not supported"); + if (type == ProtoBuf.TYPES["bytes"]) + return new ByteBuffer(0); + return type.defaultValue; + } + + /** + * Returns the default value for this field in proto3. + * @function + * @param type {string|{name: string, wireType: number}} the field type + * @returns {*} Default value + */ + Element.defaultFieldValue = mkDefault; + + /** + * Makes a Long from a value. + * @param {{low: number, high: number, unsigned: boolean}|string|number} value Value + * @param {boolean=} unsigned Whether unsigned or not, defaults to reuse it from Long-like objects or to signed for + * strings and numbers + * @returns {!Long} + * @throws {Error} If the value cannot be converted to a Long + * @inner + */ + function mkLong(value, unsigned) { + if (value && typeof value.low === 'number' && typeof value.high === 'number' && typeof value.unsigned === 'boolean' + && value.low === value.low && value.high === value.high) + return new ProtoBuf.Long(value.low, value.high, typeof unsigned === 'undefined' ? value.unsigned : unsigned); + if (typeof value === 'string') + return ProtoBuf.Long.fromString(value, unsigned || false, 10); + if (typeof value === 'number') + return ProtoBuf.Long.fromNumber(value, unsigned || false); + throw Error("not convertible to Long"); + } + + ElementPrototype.toString = function() { + return (this.name || '') + (this.isMapKey ? 'map' : 'value') + ' element'; + }; + + /** + * Checks if the given value can be set for an element of this type (singular + * field or one element of a repeated field or map). + * @param {*} value Value to check + * @return {*} Verified, maybe adjusted, value + * @throws {Error} If the value cannot be verified for this element slot + * @expose + */ + ElementPrototype.verifyValue = function(value) { + var self = this; + function fail(val, msg) { + throw Error("Illegal value for "+self.toString(true)+" of type "+self.type.name+": "+val+" ("+msg+")"); + } + switch (this.type) { + // Signed 32bit + case ProtoBuf.TYPES["int32"]: + case ProtoBuf.TYPES["sint32"]: + case ProtoBuf.TYPES["sfixed32"]: + // Account for !NaN: value === value + if (typeof value !== 'number' || (value === value && value % 1 !== 0)) + fail(typeof value, "not an integer"); + return value > 4294967295 ? value | 0 : value; + + // Unsigned 32bit + case ProtoBuf.TYPES["uint32"]: + case ProtoBuf.TYPES["fixed32"]: + if (typeof value !== 'number' || (value === value && value % 1 !== 0)) + fail(typeof value, "not an integer"); + return value < 0 ? value >>> 0 : value; + + // Signed 64bit + case ProtoBuf.TYPES["int64"]: + case ProtoBuf.TYPES["sint64"]: + case ProtoBuf.TYPES["sfixed64"]: { + if (ProtoBuf.Long) + try { + return mkLong(value, false); + } catch (e) { + fail(typeof value, e.message); + } + else + fail(typeof value, "requires Long.js"); + } + + // Unsigned 64bit + case ProtoBuf.TYPES["uint64"]: + case ProtoBuf.TYPES["fixed64"]: { + if (ProtoBuf.Long) + try { + return mkLong(value, true); + } catch (e) { + fail(typeof value, e.message); + } + else + fail(typeof value, "requires Long.js"); + } + + // Bool + case ProtoBuf.TYPES["bool"]: + if (typeof value !== 'boolean') + fail(typeof value, "not a boolean"); + return value; + + // Float + case ProtoBuf.TYPES["float"]: + case ProtoBuf.TYPES["double"]: + if (typeof value !== 'number') + fail(typeof value, "not a number"); + return value; + + // Length-delimited string + case ProtoBuf.TYPES["string"]: + if (typeof value !== 'string' && !(value && value instanceof String)) + fail(typeof value, "not a string"); + return ""+value; // Convert String object to string + + // Length-delimited bytes + case ProtoBuf.TYPES["bytes"]: + if (ByteBuffer.isByteBuffer(value)) + return value; + return ByteBuffer.wrap(value, "base64"); + + // Constant enum value + case ProtoBuf.TYPES["enum"]: { + var values = this.resolvedType.getChildren(ProtoBuf.Reflect.Enum.Value); + for (i=0; i 4294967295 || value < 0) + fail(typeof value, "not in range for uint32"); + return value; + } else { + // proto2 requires enum values to be valid. + fail(value, "not a valid enum value"); + } + } + // Embedded message + case ProtoBuf.TYPES["group"]: + case ProtoBuf.TYPES["message"]: { + if (!value || typeof value !== 'object') + fail(typeof value, "object expected"); + if (value instanceof this.resolvedType.clazz) + return value; + if (value instanceof ProtoBuf.Builder.Message) { + // Mismatched type: Convert to object (see: https://github.com/dcodeIO/ProtoBuf.js/issues/180) + var obj = {}; + for (var i in value) + if (value.hasOwnProperty(i)) + obj[i] = value[i]; + value = obj; + } + // Else let's try to construct one from a key-value object + return new (this.resolvedType.clazz)(value); // May throw for a hundred of reasons + } + } + + // We should never end here + throw Error("[INTERNAL] Illegal value for "+this.toString(true)+": "+value+" (undefined type "+this.type+")"); + }; + + /** + * Calculates the byte length of an element on the wire. + * @param {number} id Field number + * @param {*} value Field value + * @returns {number} Byte length + * @throws {Error} If the value cannot be calculated + * @expose + */ + ElementPrototype.calculateLength = function(id, value) { + if (value === null) return 0; // Nothing to encode + // Tag has already been written + var n; + switch (this.type) { + case ProtoBuf.TYPES["int32"]: + return value < 0 ? ByteBuffer.calculateVarint64(value) : ByteBuffer.calculateVarint32(value); + case ProtoBuf.TYPES["uint32"]: + return ByteBuffer.calculateVarint32(value); + case ProtoBuf.TYPES["sint32"]: + return ByteBuffer.calculateVarint32(ByteBuffer.zigZagEncode32(value)); + case ProtoBuf.TYPES["fixed32"]: + case ProtoBuf.TYPES["sfixed32"]: + case ProtoBuf.TYPES["float"]: + return 4; + case ProtoBuf.TYPES["int64"]: + case ProtoBuf.TYPES["uint64"]: + return ByteBuffer.calculateVarint64(value); + case ProtoBuf.TYPES["sint64"]: + return ByteBuffer.calculateVarint64(ByteBuffer.zigZagEncode64(value)); + case ProtoBuf.TYPES["fixed64"]: + case ProtoBuf.TYPES["sfixed64"]: + return 8; + case ProtoBuf.TYPES["bool"]: + return 1; + case ProtoBuf.TYPES["enum"]: + return ByteBuffer.calculateVarint32(value); + case ProtoBuf.TYPES["double"]: + return 8; + case ProtoBuf.TYPES["string"]: + n = ByteBuffer.calculateUTF8Bytes(value); + return ByteBuffer.calculateVarint32(n) + n; + case ProtoBuf.TYPES["bytes"]: + if (value.remaining() < 0) + throw Error("Illegal value for "+this.toString(true)+": "+value.remaining()+" bytes remaining"); + return ByteBuffer.calculateVarint32(value.remaining()) + value.remaining(); + case ProtoBuf.TYPES["message"]: + n = this.resolvedType.calculate(value); + return ByteBuffer.calculateVarint32(n) + n; + case ProtoBuf.TYPES["group"]: + n = this.resolvedType.calculate(value); + return n + ByteBuffer.calculateVarint32((id << 3) | ProtoBuf.WIRE_TYPES.ENDGROUP); + } + // We should never end here + throw Error("[INTERNAL] Illegal value to encode in "+this.toString(true)+": "+value+" (unknown type)"); + }; + + /** + * Encodes a value to the specified buffer. Does not encode the key. + * @param {number} id Field number + * @param {*} value Field value + * @param {ByteBuffer} buffer ByteBuffer to encode to + * @return {ByteBuffer} The ByteBuffer for chaining + * @throws {Error} If the value cannot be encoded + * @expose + */ + ElementPrototype.encodeValue = function(id, value, buffer) { + if (value === null) return buffer; // Nothing to encode + // Tag has already been written + + switch (this.type) { + // 32bit signed varint + case ProtoBuf.TYPES["int32"]: + // "If you use int32 or int64 as the type for a negative number, the resulting varint is always ten bytes + // long – it is, effectively, treated like a very large unsigned integer." (see #122) + if (value < 0) + buffer.writeVarint64(value); + else + buffer.writeVarint32(value); + break; + + // 32bit unsigned varint + case ProtoBuf.TYPES["uint32"]: + buffer.writeVarint32(value); + break; + + // 32bit varint zig-zag + case ProtoBuf.TYPES["sint32"]: + buffer.writeVarint32ZigZag(value); + break; + + // Fixed unsigned 32bit + case ProtoBuf.TYPES["fixed32"]: + buffer.writeUint32(value); + break; + + // Fixed signed 32bit + case ProtoBuf.TYPES["sfixed32"]: + buffer.writeInt32(value); + break; + + // 64bit varint as-is + case ProtoBuf.TYPES["int64"]: + case ProtoBuf.TYPES["uint64"]: + buffer.writeVarint64(value); // throws + break; + + // 64bit varint zig-zag + case ProtoBuf.TYPES["sint64"]: + buffer.writeVarint64ZigZag(value); // throws + break; + + // Fixed unsigned 64bit + case ProtoBuf.TYPES["fixed64"]: + buffer.writeUint64(value); // throws + break; + + // Fixed signed 64bit + case ProtoBuf.TYPES["sfixed64"]: + buffer.writeInt64(value); // throws + break; + + // Bool + case ProtoBuf.TYPES["bool"]: + if (typeof value === 'string') + buffer.writeVarint32(value.toLowerCase() === 'false' ? 0 : !!value); + else + buffer.writeVarint32(value ? 1 : 0); + break; + + // Constant enum value + case ProtoBuf.TYPES["enum"]: + buffer.writeVarint32(value); + break; + + // 32bit float + case ProtoBuf.TYPES["float"]: + buffer.writeFloat32(value); + break; + + // 64bit float + case ProtoBuf.TYPES["double"]: + buffer.writeFloat64(value); + break; + + // Length-delimited string + case ProtoBuf.TYPES["string"]: + buffer.writeVString(value); + break; + + // Length-delimited bytes + case ProtoBuf.TYPES["bytes"]: + if (value.remaining() < 0) + throw Error("Illegal value for "+this.toString(true)+": "+value.remaining()+" bytes remaining"); + var prevOffset = value.offset; + buffer.writeVarint32(value.remaining()); + buffer.append(value); + value.offset = prevOffset; + break; + + // Embedded message + case ProtoBuf.TYPES["message"]: + var bb = new ByteBuffer().LE(); + this.resolvedType.encode(value, bb); + buffer.writeVarint32(bb.offset); + buffer.append(bb.flip()); + break; + + // Legacy group + case ProtoBuf.TYPES["group"]: + this.resolvedType.encode(value, buffer); + buffer.writeVarint32((id << 3) | ProtoBuf.WIRE_TYPES.ENDGROUP); + break; + + default: + // We should never end here + throw Error("[INTERNAL] Illegal value to encode in "+this.toString(true)+": "+value+" (unknown type)"); + } + return buffer; + }; + + /** + * Decode one element value from the specified buffer. + * @param {ByteBuffer} buffer ByteBuffer to decode from + * @param {number} wireType The field wire type + * @param {number} id The field number + * @return {*} Decoded value + * @throws {Error} If the field cannot be decoded + * @expose + */ + ElementPrototype.decode = function(buffer, wireType, id) { + if (wireType != this.type.wireType) + throw Error("Unexpected wire type for element"); + + var value, nBytes; + switch (this.type) { + // 32bit signed varint + case ProtoBuf.TYPES["int32"]: + return buffer.readVarint32() | 0; + + // 32bit unsigned varint + case ProtoBuf.TYPES["uint32"]: + return buffer.readVarint32() >>> 0; + + // 32bit signed varint zig-zag + case ProtoBuf.TYPES["sint32"]: + return buffer.readVarint32ZigZag() | 0; + + // Fixed 32bit unsigned + case ProtoBuf.TYPES["fixed32"]: + return buffer.readUint32() >>> 0; + + case ProtoBuf.TYPES["sfixed32"]: + return buffer.readInt32() | 0; + + // 64bit signed varint + case ProtoBuf.TYPES["int64"]: + return buffer.readVarint64(); + + // 64bit unsigned varint + case ProtoBuf.TYPES["uint64"]: + return buffer.readVarint64().toUnsigned(); + + // 64bit signed varint zig-zag + case ProtoBuf.TYPES["sint64"]: + return buffer.readVarint64ZigZag(); + + // Fixed 64bit unsigned + case ProtoBuf.TYPES["fixed64"]: + return buffer.readUint64(); + + // Fixed 64bit signed + case ProtoBuf.TYPES["sfixed64"]: + return buffer.readInt64(); + + // Bool varint + case ProtoBuf.TYPES["bool"]: + return !!buffer.readVarint32(); + + // Constant enum value (varint) + case ProtoBuf.TYPES["enum"]: + // The following Builder.Message#set will already throw + return buffer.readVarint32(); + + // 32bit float + case ProtoBuf.TYPES["float"]: + return buffer.readFloat(); + + // 64bit float + case ProtoBuf.TYPES["double"]: + return buffer.readDouble(); + + // Length-delimited string + case ProtoBuf.TYPES["string"]: + return buffer.readVString(); + + // Length-delimited bytes + case ProtoBuf.TYPES["bytes"]: { + nBytes = buffer.readVarint32(); + if (buffer.remaining() < nBytes) + throw Error("Illegal number of bytes for "+this.toString(true)+": "+nBytes+" required but got only "+buffer.remaining()); + value = buffer.clone(); // Offset already set + value.limit = value.offset+nBytes; + buffer.offset += nBytes; + return value; + } + + // Length-delimited embedded message + case ProtoBuf.TYPES["message"]: { + nBytes = buffer.readVarint32(); + return this.resolvedType.decode(buffer, nBytes); + } + + // Legacy group + case ProtoBuf.TYPES["group"]: + return this.resolvedType.decode(buffer, -1, id); + } + + // We should never end here + throw Error("[INTERNAL] Illegal decode type"); + }; + + /** + * Converts a value from a string to the canonical element type. + * + * Legal only when isMapKey is true. + * + * @param {string} str The string value + * @returns {*} The value + */ + ElementPrototype.valueFromString = function(str) { + if (!this.isMapKey) { + throw Error("valueFromString() called on non-map-key element"); + } + + switch (this.type) { + case ProtoBuf.TYPES["int32"]: + case ProtoBuf.TYPES["sint32"]: + case ProtoBuf.TYPES["sfixed32"]: + case ProtoBuf.TYPES["uint32"]: + case ProtoBuf.TYPES["fixed32"]: + return this.verifyValue(parseInt(str)); + + case ProtoBuf.TYPES["int64"]: + case ProtoBuf.TYPES["sint64"]: + case ProtoBuf.TYPES["sfixed64"]: + case ProtoBuf.TYPES["uint64"]: + case ProtoBuf.TYPES["fixed64"]: + // Long-based fields support conversions from string already. + return this.verifyValue(str); + + case ProtoBuf.TYPES["bool"]: + return str === "true"; + + case ProtoBuf.TYPES["string"]: + return this.verifyValue(str); + + case ProtoBuf.TYPES["bytes"]: + return ByteBuffer.fromBinary(str); + } + }; + + /** + * Converts a value from the canonical element type to a string. + * + * It should be the case that `valueFromString(valueToString(val))` returns + * a value equivalent to `verifyValue(val)` for every legal value of `val` + * according to this element type. + * + * This may be used when the element must be stored or used as a string, + * e.g., as a map key on an Object. + * + * Legal only when isMapKey is true. + * + * @param {*} val The value + * @returns {string} The string form of the value. + */ + ElementPrototype.valueToString = function(value) { + if (!this.isMapKey) { + throw Error("valueToString() called on non-map-key element"); + } + + if (this.type === ProtoBuf.TYPES["bytes"]) { + return value.toString("binary"); + } else { + return value.toString(); + } + }; + + /** + * @alias ProtoBuf.Reflect.Element + * @expose + */ + Reflect.Element = Element; + + /** + * Constructs a new Message. + * @exports ProtoBuf.Reflect.Message + * @param {!ProtoBuf.Builder} builder Builder reference + * @param {!ProtoBuf.Reflect.Namespace} parent Parent message or namespace + * @param {string} name Message name + * @param {Object.=} options Message options + * @param {boolean=} isGroup `true` if this is a legacy group + * @param {string?} syntax The syntax level of this definition (e.g., proto3) + * @constructor + * @extends ProtoBuf.Reflect.Namespace + */ + var Message = function(builder, parent, name, options, isGroup, syntax) { + Namespace.call(this, builder, parent, name, options, syntax); + + /** + * @override + */ + this.className = "Message"; + + /** + * Extensions range. + * @type {!Array.|undefined} + * @expose + */ + this.extensions = undefined; + + /** + * Runtime message class. + * @type {?function(new:ProtoBuf.Builder.Message)} + * @expose + */ + this.clazz = null; + + /** + * Whether this is a legacy group or not. + * @type {boolean} + * @expose + */ + this.isGroup = !!isGroup; + + // The following cached collections are used to efficiently iterate over or look up fields when decoding. + + /** + * Cached fields. + * @type {?Array.} + * @private + */ + this._fields = null; + + /** + * Cached fields by id. + * @type {?Object.} + * @private + */ + this._fieldsById = null; + + /** + * Cached fields by name. + * @type {?Object.} + * @private + */ + this._fieldsByName = null; + }; + + /** + * @alias ProtoBuf.Reflect.Message.prototype + * @inner + */ + var MessagePrototype = Message.prototype = Object.create(Namespace.prototype); + + /** + * Builds the message and returns the runtime counterpart, which is a fully functional class. + * @see ProtoBuf.Builder.Message + * @param {boolean=} rebuild Whether to rebuild or not, defaults to false + * @return {ProtoBuf.Reflect.Message} Message class + * @throws {Error} If the message cannot be built + * @expose + */ + MessagePrototype.build = function(rebuild) { + if (this.clazz && !rebuild) + return this.clazz; + + // Create the runtime Message class in its own scope + var clazz = (function(ProtoBuf, T) { + + var fields = T.getChildren(ProtoBuf.Reflect.Message.Field), + oneofs = T.getChildren(ProtoBuf.Reflect.Message.OneOf); + + /** + * Constructs a new runtime Message. + * @name ProtoBuf.Builder.Message + * @class Barebone of all runtime messages. + * @param {!Object.|string} values Preset values + * @param {...string} var_args + * @constructor + * @throws {Error} If the message cannot be created + */ + var Message = function(values, var_args) { + ProtoBuf.Builder.Message.call(this); + + // Create virtual oneof properties + for (var i=0, k=oneofs.length; i 0) { + var value; + // Set field values from a values object + if (arguments.length === 1 && values !== null && typeof values === 'object' && + /* not _another_ Message */ (typeof values.encode !== 'function' || values instanceof Message) && + /* not a repeated field */ !Array.isArray(values) && + /* not a Map */ !(values instanceof ProtoBuf.Map) && + /* not a ByteBuffer */ !ByteBuffer.isByteBuffer(values) && + /* not an ArrayBuffer */ !(values instanceof ArrayBuffer) && + /* not a Long */ !(ProtoBuf.Long && values instanceof ProtoBuf.Long)) { + this.$set(values); + } else // Set field values from arguments, in declaration order + for (i=0, k=arguments.length; i} keyOrObj String key or plain object holding multiple values + * @param {(*|boolean)=} value Value to set if key is a string, otherwise omitted + * @param {boolean=} noAssert Whether to not assert for an actual field / proper value type, defaults to `false` + * @returns {!ProtoBuf.Builder.Message} this + * @throws {Error} If the value cannot be set + * @expose + */ + MessagePrototype.set = function(keyOrObj, value, noAssert) { + if (keyOrObj && typeof keyOrObj === 'object') { + noAssert = value; + for (var ikey in keyOrObj) { + // Check if virtual oneof field - don't set these + if (keyOrObj.hasOwnProperty(ikey) && typeof (value = keyOrObj[ikey]) !== 'undefined' && T._oneofsByName[ikey] === undefined) + this.$set(ikey, value, noAssert); + } + return this; + } + var field = T._fieldsByName[keyOrObj]; + if (!noAssert) { + if (!field) + throw Error(this+"#"+keyOrObj+" is not a field: undefined"); + if (!(field instanceof ProtoBuf.Reflect.Message.Field)) + throw Error(this+"#"+keyOrObj+" is not a field: "+field.toString(true)); + this[field.name] = (value = field.verifyValue(value)); // May throw + } else + this[keyOrObj] = value; + if (field && field.oneof) { // Field is part of an OneOf (not a virtual OneOf field) + var currentField = this[field.oneof.name]; // Virtual field references currently set field + if (value !== null) { + if (currentField !== null && currentField !== field.name) + this[currentField] = null; // Clear currently set field + this[field.oneof.name] = field.name; // Point virtual field at this field + } else if (/* value === null && */currentField === keyOrObj) + this[field.oneof.name] = null; // Clear virtual field (current field explicitly cleared) + } + return this; + }; + + /** + * Sets a field's value. This is an alias for [@link ProtoBuf.Builder.Message#set}. + * @name ProtoBuf.Builder.Message#$set + * @function + * @param {string|!Object.} keyOrObj String key or plain object holding multiple values + * @param {(*|boolean)=} value Value to set if key is a string, otherwise omitted + * @param {boolean=} noAssert Whether to not assert the value, defaults to `false` + * @throws {Error} If the value cannot be set + * @expose + */ + MessagePrototype.$set = MessagePrototype.set; + + /** + * Gets a field's value. + * @name ProtoBuf.Builder.Message#get + * @function + * @param {string} key Key + * @param {boolean=} noAssert Whether to not assert for an actual field, defaults to `false` + * @return {*} Value + * @throws {Error} If there is no such field + * @expose + */ + MessagePrototype.get = function(key, noAssert) { + if (noAssert) + return this[key]; + var field = T._fieldsByName[key]; + if (!field || !(field instanceof ProtoBuf.Reflect.Message.Field)) + throw Error(this+"#"+key+" is not a field: undefined"); + if (!(field instanceof ProtoBuf.Reflect.Message.Field)) + throw Error(this+"#"+key+" is not a field: "+field.toString(true)); + return this[field.name]; + }; + + /** + * Gets a field's value. This is an alias for {@link ProtoBuf.Builder.Message#$get}. + * @name ProtoBuf.Builder.Message#$get + * @function + * @param {string} key Key + * @return {*} Value + * @throws {Error} If there is no such field + * @expose + */ + MessagePrototype.$get = MessagePrototype.get; + + // Getters and setters + + for (var i=0; i} data Data payload + * @param {(!ByteBuffer|boolean)=} buffer ByteBuffer to encode to. Will create a new one and flip it if omitted. + * @param {boolean=} noVerify Whether to not verify field values, defaults to `false` + * @return {!ByteBuffer} Encoded message as a ByteBuffer + * @expose + */ + Message.encode = function(data, buffer, noVerify) { + return new Message(data).encode(buffer, noVerify); + }; + + /** + * Calculates the byte length of the message. + * @name ProtoBuf.Builder.Message#calculate + * @function + * @returns {number} Byte length + * @throws {Error} If the message cannot be calculated or if required fields are missing. + * @expose + */ + MessagePrototype.calculate = function() { + return T.calculate(this); + }; + + /** + * Encodes the varint32 length-delimited message. + * @name ProtoBuf.Builder.Message#encodeDelimited + * @function + * @param {(!ByteBuffer|boolean)=} buffer ByteBuffer to encode to. Will create a new one and flip it if omitted. + * @param {boolean=} noVerify Whether to not verify field values, defaults to `false` + * @return {!ByteBuffer} Encoded message as a ByteBuffer + * @throws {Error} If the message cannot be encoded or if required fields are missing. The later still + * returns the encoded ByteBuffer in the `encoded` property on the error. + * @expose + */ + MessagePrototype.encodeDelimited = function(buffer, noVerify) { + var isNew = false; + if (!buffer) + buffer = new ByteBuffer(), + isNew = true; + var enc = new ByteBuffer().LE(); + T.encode(this, enc, noVerify).flip(); + buffer.writeVarint32(enc.remaining()); + buffer.append(enc); + return isNew ? buffer.flip() : buffer; + }; + + /** + * Directly encodes the message to an ArrayBuffer. + * @name ProtoBuf.Builder.Message#encodeAB + * @function + * @return {ArrayBuffer} Encoded message as ArrayBuffer + * @throws {Error} If the message cannot be encoded or if required fields are missing. The later still + * returns the encoded ArrayBuffer in the `encoded` property on the error. + * @expose + */ + MessagePrototype.encodeAB = function() { + try { + return this.encode().toArrayBuffer(); + } catch (e) { + if (e["encoded"]) e["encoded"] = e["encoded"].toArrayBuffer(); + throw(e); + } + }; + + /** + * Returns the message as an ArrayBuffer. This is an alias for {@link ProtoBuf.Builder.Message#encodeAB}. + * @name ProtoBuf.Builder.Message#toArrayBuffer + * @function + * @return {ArrayBuffer} Encoded message as ArrayBuffer + * @throws {Error} If the message cannot be encoded or if required fields are missing. The later still + * returns the encoded ArrayBuffer in the `encoded` property on the error. + * @expose + */ + MessagePrototype.toArrayBuffer = MessagePrototype.encodeAB; + + /** + * Directly encodes the message to a node Buffer. + * @name ProtoBuf.Builder.Message#encodeNB + * @function + * @return {!Buffer} + * @throws {Error} If the message cannot be encoded, not running under node.js or if required fields are + * missing. The later still returns the encoded node Buffer in the `encoded` property on the error. + * @expose + */ + MessagePrototype.encodeNB = function() { + try { + return this.encode().toBuffer(); + } catch (e) { + if (e["encoded"]) e["encoded"] = e["encoded"].toBuffer(); + throw(e); + } + }; + + /** + * Returns the message as a node Buffer. This is an alias for {@link ProtoBuf.Builder.Message#encodeNB}. + * @name ProtoBuf.Builder.Message#toBuffer + * @function + * @return {!Buffer} + * @throws {Error} If the message cannot be encoded or if required fields are missing. The later still + * returns the encoded node Buffer in the `encoded` property on the error. + * @expose + */ + MessagePrototype.toBuffer = MessagePrototype.encodeNB; + + /** + * Directly encodes the message to a base64 encoded string. + * @name ProtoBuf.Builder.Message#encode64 + * @function + * @return {string} Base64 encoded string + * @throws {Error} If the underlying buffer cannot be encoded or if required fields are missing. The later + * still returns the encoded base64 string in the `encoded` property on the error. + * @expose + */ + MessagePrototype.encode64 = function() { + try { + return this.encode().toBase64(); + } catch (e) { + if (e["encoded"]) e["encoded"] = e["encoded"].toBase64(); + throw(e); + } + }; + + /** + * Returns the message as a base64 encoded string. This is an alias for {@link ProtoBuf.Builder.Message#encode64}. + * @name ProtoBuf.Builder.Message#toBase64 + * @function + * @return {string} Base64 encoded string + * @throws {Error} If the message cannot be encoded or if required fields are missing. The later still + * returns the encoded base64 string in the `encoded` property on the error. + * @expose + */ + MessagePrototype.toBase64 = MessagePrototype.encode64; + + /** + * Directly encodes the message to a hex encoded string. + * @name ProtoBuf.Builder.Message#encodeHex + * @function + * @return {string} Hex encoded string + * @throws {Error} If the underlying buffer cannot be encoded or if required fields are missing. The later + * still returns the encoded hex string in the `encoded` property on the error. + * @expose + */ + MessagePrototype.encodeHex = function() { + try { + return this.encode().toHex(); + } catch (e) { + if (e["encoded"]) e["encoded"] = e["encoded"].toHex(); + throw(e); + } + }; + + /** + * Returns the message as a hex encoded string. This is an alias for {@link ProtoBuf.Builder.Message#encodeHex}. + * @name ProtoBuf.Builder.Message#toHex + * @function + * @return {string} Hex encoded string + * @throws {Error} If the message cannot be encoded or if required fields are missing. The later still + * returns the encoded hex string in the `encoded` property on the error. + * @expose + */ + MessagePrototype.toHex = MessagePrototype.encodeHex; + + /** + * Clones a message object or field value to a raw object. + * @param {*} obj Object to clone + * @param {boolean} binaryAsBase64 Whether to include binary data as base64 strings or as a buffer otherwise + * @param {boolean} longsAsStrings Whether to encode longs as strings + * @param {!ProtoBuf.Reflect.T=} resolvedType The resolved field type if a field + * @returns {*} Cloned object + * @inner + */ + function cloneRaw(obj, binaryAsBase64, longsAsStrings, resolvedType) { + if (obj === null || typeof obj !== 'object') { + // Convert enum values to their respective names + if (resolvedType && resolvedType instanceof ProtoBuf.Reflect.Enum) { + var name = ProtoBuf.Reflect.Enum.getName(resolvedType.object, obj); + if (name !== null) + return name; + } + // Pass-through string, number, boolean, null... + return obj; + } + // Convert ByteBuffers to raw buffer or strings + if (ByteBuffer.isByteBuffer(obj)) + return binaryAsBase64 ? obj.toBase64() : obj.toBuffer(); + // Convert Longs to proper objects or strings + if (ProtoBuf.Long.isLong(obj)) + return longsAsStrings ? obj.toString() : ProtoBuf.Long.fromValue(obj); + var clone; + // Clone arrays + if (Array.isArray(obj)) { + clone = []; + obj.forEach(function(v, k) { + clone[k] = cloneRaw(v, binaryAsBase64, longsAsStrings, resolvedType); + }); + return clone; + } + clone = {}; + // Convert maps to objects + if (obj instanceof ProtoBuf.Map) { + var it = obj.entries(); + for (var e = it.next(); !e.done; e = it.next()) + clone[obj.keyElem.valueToString(e.value[0])] = cloneRaw(e.value[1], binaryAsBase64, longsAsStrings, obj.valueElem.resolvedType); + return clone; + } + // Everything else is a non-null object + var type = obj.$type, + field = undefined; + for (var i in obj) + if (obj.hasOwnProperty(i)) { + if (type && (field = type.getChild(i))) + clone[i] = cloneRaw(obj[i], binaryAsBase64, longsAsStrings, field.resolvedType); + else + clone[i] = cloneRaw(obj[i], binaryAsBase64, longsAsStrings); + } + return clone; + } + + /** + * Returns the message's raw payload. + * @param {boolean=} binaryAsBase64 Whether to include binary data as base64 strings instead of Buffers, defaults to `false` + * @param {boolean} longsAsStrings Whether to encode longs as strings + * @returns {Object.} Raw payload + * @expose + */ + MessagePrototype.toRaw = function(binaryAsBase64, longsAsStrings) { + return cloneRaw(this, !!binaryAsBase64, !!longsAsStrings, this.$type); + }; + + /** + * Encodes a message to JSON. + * @returns {string} JSON string + * @expose + */ + MessagePrototype.encodeJSON = function() { + return JSON.stringify( + cloneRaw(this, + /* binary-as-base64 */ true, + /* longs-as-strings */ true, + this.$type + ) + ); + }; + + /** + * Decodes a message from the specified buffer or string. + * @name ProtoBuf.Builder.Message.decode + * @function + * @param {!ByteBuffer|!ArrayBuffer|!Buffer|string} buffer Buffer to decode from + * @param {(number|string)=} length Message length. Defaults to decode all the remainig data. + * @param {string=} enc Encoding if buffer is a string: hex, utf8 (not recommended), defaults to base64 + * @return {!ProtoBuf.Builder.Message} Decoded message + * @throws {Error} If the message cannot be decoded or if required fields are missing. The later still + * returns the decoded message with missing fields in the `decoded` property on the error. + * @expose + * @see ProtoBuf.Builder.Message.decode64 + * @see ProtoBuf.Builder.Message.decodeHex + */ + Message.decode = function(buffer, length, enc) { + if (typeof length === 'string') + enc = length, + length = -1; + if (typeof buffer === 'string') + buffer = ByteBuffer.wrap(buffer, enc ? enc : "base64"); + else if (!ByteBuffer.isByteBuffer(buffer)) + buffer = ByteBuffer.wrap(buffer); // May throw + var le = buffer.littleEndian; + try { + var msg = T.decode(buffer.LE(), length); + buffer.LE(le); + return msg; + } catch (e) { + buffer.LE(le); + throw(e); + } + }; + + /** + * Decodes a varint32 length-delimited message from the specified buffer or string. + * @name ProtoBuf.Builder.Message.decodeDelimited + * @function + * @param {!ByteBuffer|!ArrayBuffer|!Buffer|string} buffer Buffer to decode from + * @param {string=} enc Encoding if buffer is a string: hex, utf8 (not recommended), defaults to base64 + * @return {ProtoBuf.Builder.Message} Decoded message or `null` if not enough bytes are available yet + * @throws {Error} If the message cannot be decoded or if required fields are missing. The later still + * returns the decoded message with missing fields in the `decoded` property on the error. + * @expose + */ + Message.decodeDelimited = function(buffer, enc) { + if (typeof buffer === 'string') + buffer = ByteBuffer.wrap(buffer, enc ? enc : "base64"); + else if (!ByteBuffer.isByteBuffer(buffer)) + buffer = ByteBuffer.wrap(buffer); // May throw + if (buffer.remaining() < 1) + return null; + var off = buffer.offset, + len = buffer.readVarint32(); + if (buffer.remaining() < len) { + buffer.offset = off; + return null; + } + try { + var msg = T.decode(buffer.slice(buffer.offset, buffer.offset + len).LE()); + buffer.offset += len; + return msg; + } catch (err) { + buffer.offset += len; + throw err; + } + }; + + /** + * Decodes the message from the specified base64 encoded string. + * @name ProtoBuf.Builder.Message.decode64 + * @function + * @param {string} str String to decode from + * @return {!ProtoBuf.Builder.Message} Decoded message + * @throws {Error} If the message cannot be decoded or if required fields are missing. The later still + * returns the decoded message with missing fields in the `decoded` property on the error. + * @expose + */ + Message.decode64 = function(str) { + return Message.decode(str, "base64"); + }; + + /** + * Decodes the message from the specified hex encoded string. + * @name ProtoBuf.Builder.Message.decodeHex + * @function + * @param {string} str String to decode from + * @return {!ProtoBuf.Builder.Message} Decoded message + * @throws {Error} If the message cannot be decoded or if required fields are missing. The later still + * returns the decoded message with missing fields in the `decoded` property on the error. + * @expose + */ + Message.decodeHex = function(str) { + return Message.decode(str, "hex"); + }; + + /** + * Decodes the message from a JSON string. + * @name ProtoBuf.Builder.Message.decodeJSON + * @function + * @param {string} str String to decode from + * @return {!ProtoBuf.Builder.Message} Decoded message + * @throws {Error} If the message cannot be decoded or if required fields are + * missing. + * @expose + */ + Message.decodeJSON = function(str) { + return new Message(JSON.parse(str)); + }; + + // Utility + + /** + * Returns a string representation of this Message. + * @name ProtoBuf.Builder.Message#toString + * @function + * @return {string} String representation as of ".Fully.Qualified.MessageName" + * @expose + */ + MessagePrototype.toString = function() { + return T.toString(); + }; + + // Properties + + /** + * Message options. + * @name ProtoBuf.Builder.Message.$options + * @type {Object.} + * @expose + */ + var $optionsS; // cc needs this + + /** + * Message options. + * @name ProtoBuf.Builder.Message#$options + * @type {Object.} + * @expose + */ + var $options; + + /** + * Reflection type. + * @name ProtoBuf.Builder.Message.$type + * @type {!ProtoBuf.Reflect.Message} + * @expose + */ + var $typeS; + + /** + * Reflection type. + * @name ProtoBuf.Builder.Message#$type + * @type {!ProtoBuf.Reflect.Message} + * @expose + */ + var $type; + + if (Object.defineProperty) + Object.defineProperty(Message, '$options', { "value": T.buildOpt() }), + Object.defineProperty(MessagePrototype, "$options", { "value": Message["$options"] }), + Object.defineProperty(Message, "$type", { "value": T }), + Object.defineProperty(MessagePrototype, "$type", { "value": T }); + + return Message; + + })(ProtoBuf, this); + + // Static enums and prototyped sub-messages / cached collections + this._fields = []; + this._fieldsById = {}; + this._fieldsByName = {}; + this._oneofsByName = {}; + for (var i=0, k=this.children.length, child; i>> 3; + switch (wireType) { + case ProtoBuf.WIRE_TYPES.VARINT: + do tag = buf.readUint8(); + while ((tag & 0x80) === 0x80); + break; + case ProtoBuf.WIRE_TYPES.BITS64: + buf.offset += 8; + break; + case ProtoBuf.WIRE_TYPES.LDELIM: + tag = buf.readVarint32(); // reads the varint + buf.offset += tag; // skips n bytes + break; + case ProtoBuf.WIRE_TYPES.STARTGROUP: + skipTillGroupEnd(id, buf); + break; + case ProtoBuf.WIRE_TYPES.ENDGROUP: + if (id === expectedId) + return false; + else + throw Error("Illegal GROUPEND after unknown group: "+id+" ("+expectedId+" expected)"); + case ProtoBuf.WIRE_TYPES.BITS32: + buf.offset += 4; + break; + default: + throw Error("Illegal wire type in unknown group "+expectedId+": "+wireType); + } + return true; + } + + /** + * Decodes an encoded message and returns the decoded message. + * @param {ByteBuffer} buffer ByteBuffer to decode from + * @param {number=} length Message length. Defaults to decode all remaining data. + * @param {number=} expectedGroupEndId Expected GROUPEND id if this is a legacy group + * @return {ProtoBuf.Builder.Message} Decoded message + * @throws {Error} If the message cannot be decoded + * @expose + */ + MessagePrototype.decode = function(buffer, length, expectedGroupEndId) { + if (typeof length !== 'number') + length = -1; + var start = buffer.offset, + msg = new (this.clazz)(), + tag, wireType, id, field; + while (buffer.offset < start+length || (length === -1 && buffer.remaining() > 0)) { + tag = buffer.readVarint32(); + wireType = tag & 0x07; + id = tag >>> 3; + if (wireType === ProtoBuf.WIRE_TYPES.ENDGROUP) { + if (id !== expectedGroupEndId) + throw Error("Illegal group end indicator for "+this.toString(true)+": "+id+" ("+(expectedGroupEndId ? expectedGroupEndId+" expected" : "not a group")+")"); + break; + } + if (!(field = this._fieldsById[id])) { + // "messages created by your new code can be parsed by your old code: old binaries simply ignore the new field when parsing." + switch (wireType) { + case ProtoBuf.WIRE_TYPES.VARINT: + buffer.readVarint32(); + break; + case ProtoBuf.WIRE_TYPES.BITS32: + buffer.offset += 4; + break; + case ProtoBuf.WIRE_TYPES.BITS64: + buffer.offset += 8; + break; + case ProtoBuf.WIRE_TYPES.LDELIM: + var len = buffer.readVarint32(); + buffer.offset += len; + break; + case ProtoBuf.WIRE_TYPES.STARTGROUP: + while (skipTillGroupEnd(id, buffer)) {} + break; + default: + throw Error("Illegal wire type for unknown field "+id+" in "+this.toString(true)+"#decode: "+wireType); + } + continue; + } + if (field.repeated && !field.options["packed"]) { + msg[field.name].push(field.decode(wireType, buffer)); + } else if (field.map) { + var keyval = field.decode(wireType, buffer); + msg[field.name].set(keyval[0], keyval[1]); + } else { + msg[field.name] = field.decode(wireType, buffer); + if (field.oneof) { // Field is part of an OneOf (not a virtual OneOf field) + var currentField = msg[field.oneof.name]; // Virtual field references currently set field + if (currentField !== null && currentField !== field.name) + msg[currentField] = null; // Clear currently set field + msg[field.oneof.name] = field.name; // Point virtual field at this field + } + } + } + + // Check if all required fields are present and set default values for optional fields that are not + for (var i=0, k=this._fields.length; i=} options Options + * @param {!ProtoBuf.Reflect.Message.OneOf=} oneof Enclosing OneOf + * @param {string?} syntax The syntax level of this definition (e.g., proto3) + * @constructor + * @extends ProtoBuf.Reflect.T + */ + var Field = function(builder, message, rule, keytype, type, name, id, options, oneof, syntax) { + T.call(this, builder, message, name); + + /** + * @override + */ + this.className = "Message.Field"; + + /** + * Message field required flag. + * @type {boolean} + * @expose + */ + this.required = rule === "required"; + + /** + * Message field repeated flag. + * @type {boolean} + * @expose + */ + this.repeated = rule === "repeated"; + + /** + * Message field map flag. + * @type {boolean} + * @expose + */ + this.map = rule === "map"; + + /** + * Message field key type. Type reference string if unresolved, protobuf + * type if resolved. Valid only if this.map === true, null otherwise. + * @type {string|{name: string, wireType: number}|null} + * @expose + */ + this.keyType = keytype || null; + + /** + * Message field type. Type reference string if unresolved, protobuf type if + * resolved. In a map field, this is the value type. + * @type {string|{name: string, wireType: number}} + * @expose + */ + this.type = type; + + /** + * Resolved type reference inside the global namespace. + * @type {ProtoBuf.Reflect.T|null} + * @expose + */ + this.resolvedType = null; + + /** + * Unique message field id. + * @type {number} + * @expose + */ + this.id = id; + + /** + * Message field options. + * @type {!Object.} + * @dict + * @expose + */ + this.options = options || {}; + + /** + * Default value. + * @type {*} + * @expose + */ + this.defaultValue = null; + + /** + * Enclosing OneOf. + * @type {?ProtoBuf.Reflect.Message.OneOf} + * @expose + */ + this.oneof = oneof || null; + + /** + * Syntax level of this definition (e.g., proto3). + * @type {string} + * @expose + */ + this.syntax = syntax || 'proto2'; + + /** + * Original field name. + * @type {string} + * @expose + */ + this.originalName = this.name; // Used to revert camelcase transformation on naming collisions + + /** + * Element implementation. Created in build() after types are resolved. + * @type {ProtoBuf.Element} + * @expose + */ + this.element = null; + + /** + * Key element implementation, for map fields. Created in build() after + * types are resolved. + * @type {ProtoBuf.Element} + * @expose + */ + this.keyElement = null; + + // Convert field names to camel case notation if the override is set + if (this.builder.options['convertFieldsToCamelCase'] && !(this instanceof Message.ExtensionField)) + this.name = ProtoBuf.Util.toCamelCase(this.name); + }; + + /** + * @alias ProtoBuf.Reflect.Message.Field.prototype + * @inner + */ + var FieldPrototype = Field.prototype = Object.create(T.prototype); + + /** + * Builds the field. + * @override + * @expose + */ + FieldPrototype.build = function() { + this.element = new Element(this.type, this.resolvedType, false, this.syntax, this.name); + if (this.map) + this.keyElement = new Element(this.keyType, undefined, true, this.syntax, this.name); + + // In proto3, fields do not have field presence, and every field is set to + // its type's default value ("", 0, 0.0, or false). + if (this.syntax === 'proto3' && !this.repeated && !this.map) + this.defaultValue = Element.defaultFieldValue(this.type); + + // Otherwise, default values are present when explicitly specified + else if (typeof this.options['default'] !== 'undefined') + this.defaultValue = this.verifyValue(this.options['default']); + }; + + /** + * Checks if the given value can be set for this field. + * @param {*} value Value to check + * @param {boolean=} skipRepeated Whether to skip the repeated value check or not. Defaults to false. + * @return {*} Verified, maybe adjusted, value + * @throws {Error} If the value cannot be set for this field + * @expose + */ + FieldPrototype.verifyValue = function(value, skipRepeated) { + skipRepeated = skipRepeated || false; + var self = this; + function fail(val, msg) { + throw Error("Illegal value for "+self.toString(true)+" of type "+self.type.name+": "+val+" ("+msg+")"); + } + if (value === null) { // NULL values for optional fields + if (this.required) + fail(typeof value, "required"); + if (this.syntax === 'proto3' && this.type !== ProtoBuf.TYPES["message"]) + fail(typeof value, "proto3 field without field presence cannot be null"); + return null; + } + var i; + if (this.repeated && !skipRepeated) { // Repeated values as arrays + if (!Array.isArray(value)) + value = [value]; + var res = []; + for (i=0; i 0; + + case ProtoBuf.TYPES["bytes"]: + return value.remaining() > 0; + + case ProtoBuf.TYPES["enum"]: + return value !== 0; + + case ProtoBuf.TYPES["message"]: + return value !== null; + default: + return true; + } + }; + + /** + * Encodes the specified field value to the specified buffer. + * @param {*} value Verified field value + * @param {ByteBuffer} buffer ByteBuffer to encode to + * @param {!ProtoBuf.Builder.Message} message Runtime message + * @return {ByteBuffer} The ByteBuffer for chaining + * @throws {Error} If the field cannot be encoded + * @expose + */ + FieldPrototype.encode = function(value, buffer, message) { + if (this.type === null || typeof this.type !== 'object') + throw Error("[INTERNAL] Unresolved type in "+this.toString(true)+": "+this.type); + if (value === null || (this.repeated && value.length == 0)) + return buffer; // Optional omitted + try { + if (this.repeated) { + var i; + // "Only repeated fields of primitive numeric types (types which use the varint, 32-bit, or 64-bit wire + // types) can be declared 'packed'." + if (this.options["packed"] && ProtoBuf.PACKABLE_WIRE_TYPES.indexOf(this.type.wireType) >= 0) { + // "All of the elements of the field are packed into a single key-value pair with wire type 2 + // (length-delimited). Each element is encoded the same way it would be normally, except without a + // tag preceding it." + buffer.writeVarint32((this.id << 3) | ProtoBuf.WIRE_TYPES.LDELIM); + buffer.ensureCapacity(buffer.offset += 1); // We do not know the length yet, so let's assume a varint of length 1 + var start = buffer.offset; // Remember where the contents begin + for (i=0; i 1) { // We need to move the contents + var contents = buffer.slice(start, buffer.offset); + start += varintLen-1; + buffer.offset = start; + buffer.append(contents); + } + buffer.writeVarint32(len, start-varintLen); + } else { + // "If your message definition has repeated elements (without the [packed=true] option), the encoded + // message has zero or more key-value pairs with the same tag number" + for (i=0; i= 0) { + n += ByteBuffer.calculateVarint32((this.id << 3) | ProtoBuf.WIRE_TYPES.LDELIM); + ni = 0; + for (i=0; i= 0) { + if (!skipRepeated) { + nBytes = buffer.readVarint32(); + nBytes = buffer.offset + nBytes; // Limit + var values = []; + while (buffer.offset < nBytes) + values.push(this.decode(this.type.wireType, buffer, true)); + return values; + } + // Read the next value otherwise... + } + + // Handle maps. + if (this.map) { + // Read one (key, value) submessage, and return [key, value] + var key = Element.defaultFieldValue(this.keyType); + value = Element.defaultFieldValue(this.type); + + // Read the length + nBytes = buffer.readVarint32(); + if (buffer.remaining() < nBytes) + throw Error("Illegal number of bytes for "+this.toString(true)+": "+nBytes+" required but got only "+buffer.remaining()); + + // Get a sub-buffer of this key/value submessage + var msgbuf = buffer.clone(); + msgbuf.limit = msgbuf.offset + nBytes; + buffer.offset += nBytes; + + while (msgbuf.remaining() > 0) { + var tag = msgbuf.readVarint32(); + wireType = tag & 0x07; + var id = tag >>> 3; + if (id === 1) { + key = this.keyElement.decode(msgbuf, wireType, id); + } else if (id === 2) { + value = this.element.decode(msgbuf, wireType, id); + } else { + throw Error("Unexpected tag in map field key/value submessage"); + } + } + + return [key, value]; + } + + // Handle singular and non-packed repeated field values. + return this.element.decode(buffer, wireType, this.id); + }; + + /** + * @alias ProtoBuf.Reflect.Message.Field + * @expose + */ + Reflect.Message.Field = Field; + + /** + * Constructs a new Message ExtensionField. + * @exports ProtoBuf.Reflect.Message.ExtensionField + * @param {!ProtoBuf.Builder} builder Builder reference + * @param {!ProtoBuf.Reflect.Message} message Message reference + * @param {string} rule Rule, one of requried, optional, repeated + * @param {string} type Data type, e.g. int32 + * @param {string} name Field name + * @param {number} id Unique field id + * @param {!Object.=} options Options + * @constructor + * @extends ProtoBuf.Reflect.Message.Field + */ + var ExtensionField = function(builder, message, rule, type, name, id, options) { + Field.call(this, builder, message, rule, /* keytype = */ null, type, name, id, options); + + /** + * Extension reference. + * @type {!ProtoBuf.Reflect.Extension} + * @expose + */ + this.extension; + }; + + // Extends Field + ExtensionField.prototype = Object.create(Field.prototype); + + /** + * @alias ProtoBuf.Reflect.Message.ExtensionField + * @expose + */ + Reflect.Message.ExtensionField = ExtensionField; + + /** + * Constructs a new Message OneOf. + * @exports ProtoBuf.Reflect.Message.OneOf + * @param {!ProtoBuf.Builder} builder Builder reference + * @param {!ProtoBuf.Reflect.Message} message Message reference + * @param {string} name OneOf name + * @constructor + * @extends ProtoBuf.Reflect.T + */ + var OneOf = function(builder, message, name) { + T.call(this, builder, message, name); + + /** + * Enclosed fields. + * @type {!Array.} + * @expose + */ + this.fields = []; + }; + + /** + * @alias ProtoBuf.Reflect.Message.OneOf + * @expose + */ + Reflect.Message.OneOf = OneOf; + + /** + * Constructs a new Enum. + * @exports ProtoBuf.Reflect.Enum + * @param {!ProtoBuf.Builder} builder Builder reference + * @param {!ProtoBuf.Reflect.T} parent Parent Reflect object + * @param {string} name Enum name + * @param {Object.=} options Enum options + * @param {string?} syntax The syntax level (e.g., proto3) + * @constructor + * @extends ProtoBuf.Reflect.Namespace + */ + var Enum = function(builder, parent, name, options, syntax) { + Namespace.call(this, builder, parent, name, options, syntax); + + /** + * @override + */ + this.className = "Enum"; + + /** + * Runtime enum object. + * @type {Object.|null} + * @expose + */ + this.object = null; + }; + + /** + * Gets the string name of an enum value. + * @param {!ProtoBuf.Builder.Enum} enm Runtime enum + * @param {number} value Enum value + * @returns {?string} Name or `null` if not present + * @expose + */ + Enum.getName = function(enm, value) { + var keys = Object.keys(enm); + for (var i=0, key; i} + * @expose + */ + EnumPrototype.build = function(rebuild) { + if (this.object && !rebuild) + return this.object; + var enm = new ProtoBuf.Builder.Enum(), + values = this.getChildren(Enum.Value); + for (var i=0, k=values.length; i=} options Options + * @constructor + * @extends ProtoBuf.Reflect.Namespace + */ + var Service = function(builder, root, name, options) { + Namespace.call(this, builder, root, name, options); + + /** + * @override + */ + this.className = "Service"; + + /** + * Built runtime service class. + * @type {?function(new:ProtoBuf.Builder.Service)} + */ + this.clazz = null; + }; + + /** + * @alias ProtoBuf.Reflect.Service.prototype + * @inner + */ + var ServicePrototype = Service.prototype = Object.create(Namespace.prototype); + + /** + * Builds the service and returns the runtime counterpart, which is a fully functional class. + * @see ProtoBuf.Builder.Service + * @param {boolean=} rebuild Whether to rebuild or not + * @return {Function} Service class + * @throws {Error} If the message cannot be built + * @expose + */ + ServicePrototype.build = function(rebuild) { + if (this.clazz && !rebuild) + return this.clazz; + + // Create the runtime Service class in its own scope + return this.clazz = (function(ProtoBuf, T) { + + /** + * Constructs a new runtime Service. + * @name ProtoBuf.Builder.Service + * @param {function(string, ProtoBuf.Builder.Message, function(Error, ProtoBuf.Builder.Message=))=} rpcImpl RPC implementation receiving the method name and the message + * @class Barebone of all runtime services. + * @constructor + * @throws {Error} If the service cannot be created + */ + var Service = function(rpcImpl) { + ProtoBuf.Builder.Service.call(this); + + /** + * Service implementation. + * @name ProtoBuf.Builder.Service#rpcImpl + * @type {!function(string, ProtoBuf.Builder.Message, function(Error, ProtoBuf.Builder.Message=))} + * @expose + */ + this.rpcImpl = rpcImpl || function(name, msg, callback) { + // This is what a user has to implement: A function receiving the method name, the actual message to + // send (type checked) and the callback that's either provided with the error as its first + // argument or null and the actual response message. + setTimeout(callback.bind(this, Error("Not implemented, see: https://github.com/dcodeIO/ProtoBuf.js/wiki/Services")), 0); // Must be async! + }; + }; + + /** + * @alias ProtoBuf.Builder.Service.prototype + * @inner + */ + var ServicePrototype = Service.prototype = Object.create(ProtoBuf.Builder.Service.prototype); + + /** + * Asynchronously performs an RPC call using the given RPC implementation. + * @name ProtoBuf.Builder.Service.[Method] + * @function + * @param {!function(string, ProtoBuf.Builder.Message, function(Error, ProtoBuf.Builder.Message=))} rpcImpl RPC implementation + * @param {ProtoBuf.Builder.Message} req Request + * @param {function(Error, (ProtoBuf.Builder.Message|ByteBuffer|Buffer|string)=)} callback Callback receiving + * the error if any and the response either as a pre-parsed message or as its raw bytes + * @abstract + */ + + /** + * Asynchronously performs an RPC call using the instance's RPC implementation. + * @name ProtoBuf.Builder.Service#[Method] + * @function + * @param {ProtoBuf.Builder.Message} req Request + * @param {function(Error, (ProtoBuf.Builder.Message|ByteBuffer|Buffer|string)=)} callback Callback receiving + * the error if any and the response either as a pre-parsed message or as its raw bytes + * @abstract + */ + + var rpc = T.getChildren(ProtoBuf.Reflect.Service.RPCMethod); + for (var i=0; i} + * @expose + */ + var $optionsS; // cc needs this + + /** + * Service options. + * @name ProtoBuf.Builder.Service#$options + * @type {Object.} + * @expose + */ + var $options; + + /** + * Reflection type. + * @name ProtoBuf.Builder.Service.$type + * @type {!ProtoBuf.Reflect.Service} + * @expose + */ + var $typeS; + + /** + * Reflection type. + * @name ProtoBuf.Builder.Service#$type + * @type {!ProtoBuf.Reflect.Service} + * @expose + */ + var $type; + + if (Object.defineProperty) + Object.defineProperty(Service, "$options", { "value": T.buildOpt() }), + Object.defineProperty(ServicePrototype, "$options", { "value": Service["$options"] }), + Object.defineProperty(Service, "$type", { "value": T }), + Object.defineProperty(ServicePrototype, "$type", { "value": T }); + + return Service; + + })(ProtoBuf, this); + }; + + /** + * @alias ProtoBuf.Reflect.Service + * @expose + */ + Reflect.Service = Service; + + /** + * Abstract service method. + * @exports ProtoBuf.Reflect.Service.Method + * @param {!ProtoBuf.Builder} builder Builder reference + * @param {!ProtoBuf.Reflect.Service} svc Service + * @param {string} name Method name + * @param {Object.=} options Options + * @constructor + * @extends ProtoBuf.Reflect.T + */ + var Method = function(builder, svc, name, options) { + T.call(this, builder, svc, name); + + /** + * @override + */ + this.className = "Service.Method"; + + /** + * Options. + * @type {Object.} + * @expose + */ + this.options = options || {}; + }; + + /** + * @alias ProtoBuf.Reflect.Service.Method.prototype + * @inner + */ + var MethodPrototype = Method.prototype = Object.create(T.prototype); + + /** + * Builds the method's '$options' property. + * @name ProtoBuf.Reflect.Service.Method#buildOpt + * @function + * @return {Object.} + */ + MethodPrototype.buildOpt = NamespacePrototype.buildOpt; + + /** + * @alias ProtoBuf.Reflect.Service.Method + * @expose + */ + Reflect.Service.Method = Method; + + /** + * RPC service method. + * @exports ProtoBuf.Reflect.Service.RPCMethod + * @param {!ProtoBuf.Builder} builder Builder reference + * @param {!ProtoBuf.Reflect.Service} svc Service + * @param {string} name Method name + * @param {string} request Request message name + * @param {string} response Response message name + * @param {boolean} request_stream Whether requests are streamed + * @param {boolean} response_stream Whether responses are streamed + * @param {Object.=} options Options + * @constructor + * @extends ProtoBuf.Reflect.Service.Method + */ + var RPCMethod = function(builder, svc, name, request, response, request_stream, response_stream, options) { + Method.call(this, builder, svc, name, options); + + /** + * @override + */ + this.className = "Service.RPCMethod"; + + /** + * Request message name. + * @type {string} + * @expose + */ + this.requestName = request; + + /** + * Response message name. + * @type {string} + * @expose + */ + this.responseName = response; + + /** + * Whether requests are streamed + * @type {bool} + * @expose + */ + this.requestStream = request_stream; + + /** + * Whether responses are streamed + * @type {bool} + * @expose + */ + this.responseStream = response_stream; + + /** + * Resolved request message type. + * @type {ProtoBuf.Reflect.Message} + * @expose + */ + this.resolvedRequestType = null; + + /** + * Resolved response message type. + * @type {ProtoBuf.Reflect.Message} + * @expose + */ + this.resolvedResponseType = null; + }; + + // Extends Method + RPCMethod.prototype = Object.create(Method.prototype); + + /** + * @alias ProtoBuf.Reflect.Service.RPCMethod + * @expose + */ + Reflect.Service.RPCMethod = RPCMethod; + + return Reflect; + + })(ProtoBuf); + + /** + * @alias ProtoBuf.Builder + * @expose + */ + ProtoBuf.Builder = (function(ProtoBuf, Lang, Reflect) { + "use strict"; + + /** + * Constructs a new Builder. + * @exports ProtoBuf.Builder + * @class Provides the functionality to build protocol messages. + * @param {Object.=} options Options + * @constructor + */ + var Builder = function(options) { + + /** + * Namespace. + * @type {ProtoBuf.Reflect.Namespace} + * @expose + */ + this.ns = new Reflect.Namespace(this, null, ""); // Global namespace + + /** + * Namespace pointer. + * @type {ProtoBuf.Reflect.T} + * @expose + */ + this.ptr = this.ns; + + /** + * Resolved flag. + * @type {boolean} + * @expose + */ + this.resolved = false; + + /** + * The current building result. + * @type {Object.|null} + * @expose + */ + this.result = null; + + /** + * Imported files. + * @type {Array.} + * @expose + */ + this.files = {}; + + /** + * Import root override. + * @type {?string} + * @expose + */ + this.importRoot = null; + + /** + * Options. + * @type {!Object.} + * @expose + */ + this.options = options || {}; + }; + + /** + * @alias ProtoBuf.Builder.prototype + * @inner + */ + var BuilderPrototype = Builder.prototype; + + // ----- Definition tests ----- + + /** + * Tests if a definition most likely describes a message. + * @param {!Object} def + * @returns {boolean} + * @expose + */ + Builder.isMessage = function(def) { + // Messages require a string name + if (typeof def["name"] !== 'string') + return false; + // Messages do not contain values (enum) or rpc methods (service) + if (typeof def["values"] !== 'undefined' || typeof def["rpc"] !== 'undefined') + return false; + return true; + }; + + /** + * Tests if a definition most likely describes a message field. + * @param {!Object} def + * @returns {boolean} + * @expose + */ + Builder.isMessageField = function(def) { + // Message fields require a string rule, name and type and an id + if (typeof def["rule"] !== 'string' || typeof def["name"] !== 'string' || typeof def["type"] !== 'string' || typeof def["id"] === 'undefined') + return false; + return true; + }; + + /** + * Tests if a definition most likely describes an enum. + * @param {!Object} def + * @returns {boolean} + * @expose + */ + Builder.isEnum = function(def) { + // Enums require a string name + if (typeof def["name"] !== 'string') + return false; + // Enums require at least one value + if (typeof def["values"] === 'undefined' || !Array.isArray(def["values"]) || def["values"].length === 0) + return false; + return true; + }; + + /** + * Tests if a definition most likely describes a service. + * @param {!Object} def + * @returns {boolean} + * @expose + */ + Builder.isService = function(def) { + // Services require a string name and an rpc object + if (typeof def["name"] !== 'string' || typeof def["rpc"] !== 'object' || !def["rpc"]) + return false; + return true; + }; + + /** + * Tests if a definition most likely describes an extended message + * @param {!Object} def + * @returns {boolean} + * @expose + */ + Builder.isExtend = function(def) { + // Extends rquire a string ref + if (typeof def["ref"] !== 'string') + return false; + return true; + }; + + // ----- Building ----- + + /** + * Resets the pointer to the root namespace. + * @returns {!ProtoBuf.Builder} this + * @expose + */ + BuilderPrototype.reset = function() { + this.ptr = this.ns; + return this; + }; + + /** + * Defines a namespace on top of the current pointer position and places the pointer on it. + * @param {string} namespace + * @return {!ProtoBuf.Builder} this + * @expose + */ + BuilderPrototype.define = function(namespace) { + if (typeof namespace !== 'string' || !Lang.TYPEREF.test(namespace)) + throw Error("illegal namespace: "+namespace); + namespace.split(".").forEach(function(part) { + var ns = this.ptr.getChild(part); + if (ns === null) // Keep existing + this.ptr.addChild(ns = new Reflect.Namespace(this, this.ptr, part)); + this.ptr = ns; + }, this); + return this; + }; + + /** + * Creates the specified definitions at the current pointer position. + * @param {!Array.} defs Messages, enums or services to create + * @returns {!ProtoBuf.Builder} this + * @throws {Error} If a message definition is invalid + * @expose + */ + BuilderPrototype.create = function(defs) { + if (!defs) + return this; // Nothing to create + if (!Array.isArray(defs)) + defs = [defs]; + else { + if (defs.length === 0) + return this; + defs = defs.slice(); + } + + // It's quite hard to keep track of scopes and memory here, so let's do this iteratively. + var stack = [defs]; + while (stack.length > 0) { + defs = stack.pop(); + + if (!Array.isArray(defs)) // Stack always contains entire namespaces + throw Error("not a valid namespace: "+JSON.stringify(defs)); + + while (defs.length > 0) { + var def = defs.shift(); // Namespaces always contain an array of messages, enums and services + + if (Builder.isMessage(def)) { + var obj = new Reflect.Message(this, this.ptr, def["name"], def["options"], def["isGroup"], def["syntax"]); + + // Create OneOfs + var oneofs = {}; + if (def["oneofs"]) + Object.keys(def["oneofs"]).forEach(function(name) { + obj.addChild(oneofs[name] = new Reflect.Message.OneOf(this, obj, name)); + }, this); + + // Create fields + if (def["fields"]) + def["fields"].forEach(function(fld) { + if (obj.getChild(fld["id"]|0) !== null) + throw Error("duplicate or invalid field id in "+obj.name+": "+fld['id']); + if (fld["options"] && typeof fld["options"] !== 'object') + throw Error("illegal field options in "+obj.name+"#"+fld["name"]); + var oneof = null; + if (typeof fld["oneof"] === 'string' && !(oneof = oneofs[fld["oneof"]])) + throw Error("illegal oneof in "+obj.name+"#"+fld["name"]+": "+fld["oneof"]); + fld = new Reflect.Message.Field(this, obj, fld["rule"], fld["keytype"], fld["type"], fld["name"], fld["id"], fld["options"], oneof, def["syntax"]); + if (oneof) + oneof.fields.push(fld); + obj.addChild(fld); + }, this); + + // Push children to stack + var subObj = []; + if (def["enums"]) + def["enums"].forEach(function(enm) { + subObj.push(enm); + }); + if (def["messages"]) + def["messages"].forEach(function(msg) { + subObj.push(msg); + }); + if (def["services"]) + def["services"].forEach(function(svc) { + subObj.push(svc); + }); + + // Set extension ranges + if (def["extensions"]) { + if (typeof def["extensions"][0] === 'number') // pre 5.0.1 + obj.extensions = [ def["extensions"] ]; + else + obj.extensions = def["extensions"]; + } + + // Create on top of current namespace + this.ptr.addChild(obj); + if (subObj.length > 0) { + stack.push(defs); // Push the current level back + defs = subObj; // Continue processing sub level + subObj = null; + this.ptr = obj; // And move the pointer to this namespace + obj = null; + continue; + } + subObj = null; + + } else if (Builder.isEnum(def)) { + + obj = new Reflect.Enum(this, this.ptr, def["name"], def["options"], def["syntax"]); + def["values"].forEach(function(val) { + obj.addChild(new Reflect.Enum.Value(this, obj, val["name"], val["id"])); + }, this); + this.ptr.addChild(obj); + + } else if (Builder.isService(def)) { + + obj = new Reflect.Service(this, this.ptr, def["name"], def["options"]); + Object.keys(def["rpc"]).forEach(function(name) { + var mtd = def["rpc"][name]; + obj.addChild(new Reflect.Service.RPCMethod(this, obj, name, mtd["request"], mtd["response"], !!mtd["request_stream"], !!mtd["response_stream"], mtd["options"])); + }, this); + this.ptr.addChild(obj); + + } else if (Builder.isExtend(def)) { + + obj = this.ptr.resolve(def["ref"], true); + if (obj) { + def["fields"].forEach(function(fld) { + if (obj.getChild(fld['id']|0) !== null) + throw Error("duplicate extended field id in "+obj.name+": "+fld['id']); + // Check if field id is allowed to be extended + if (obj.extensions) { + var valid = false; + obj.extensions.forEach(function(range) { + if (fld["id"] >= range[0] && fld["id"] <= range[1]) + valid = true; + }); + if (!valid) + throw Error("illegal extended field id in "+obj.name+": "+fld['id']+" (not within valid ranges)"); + } + // Convert extension field names to camel case notation if the override is set + var name = fld["name"]; + if (this.options['convertFieldsToCamelCase']) + name = ProtoBuf.Util.toCamelCase(name); + // see #161: Extensions use their fully qualified name as their runtime key and... + var field = new Reflect.Message.ExtensionField(this, obj, fld["rule"], fld["type"], this.ptr.fqn()+'.'+name, fld["id"], fld["options"]); + // ...are added on top of the current namespace as an extension which is used for + // resolving their type later on (the extension always keeps the original name to + // prevent naming collisions) + var ext = new Reflect.Extension(this, this.ptr, fld["name"], field); + field.extension = ext; + this.ptr.addChild(ext); + obj.addChild(field); + }, this); + + } else if (!/\.?google\.protobuf\./.test(def["ref"])) // Silently skip internal extensions + throw Error("extended message "+def["ref"]+" is not defined"); + + } else + throw Error("not a valid definition: "+JSON.stringify(def)); + + def = null; + obj = null; + } + // Break goes here + defs = null; + this.ptr = this.ptr.parent; // Namespace done, continue at parent + } + this.resolved = false; // Require re-resolve + this.result = null; // Require re-build + return this; + }; + + /** + * Propagates syntax to all children. + * @param {!Object} parent + * @inner + */ + function propagateSyntax(parent) { + if (parent['messages']) { + parent['messages'].forEach(function(child) { + child["syntax"] = parent["syntax"]; + propagateSyntax(child); + }); + } + if (parent['enums']) { + parent['enums'].forEach(function(child) { + child["syntax"] = parent["syntax"]; + }); + } + } + + /** + * Imports another definition into this builder. + * @param {Object.} json Parsed import + * @param {(string|{root: string, file: string})=} filename Imported file name + * @returns {!ProtoBuf.Builder} this + * @throws {Error} If the definition or file cannot be imported + * @expose + */ + BuilderPrototype["import"] = function(json, filename) { + var delim = '/'; + + // Make sure to skip duplicate imports + + if (typeof filename === 'string') { + + if (ProtoBuf.Util.IS_NODE) + filename = require$$2['resolve'](filename); + if (this.files[filename] === true) + return this.reset(); + this.files[filename] = true; + + } else if (typeof filename === 'object') { // Object with root, file. + + var root = filename.root; + if (ProtoBuf.Util.IS_NODE) + root = require$$2['resolve'](root); + if (root.indexOf("\\") >= 0 || filename.file.indexOf("\\") >= 0) + delim = '\\'; + var fname; + if (ProtoBuf.Util.IS_NODE) + fname = require$$2['join'](root, filename.file); + else + fname = root + delim + filename.file; + if (this.files[fname] === true) + return this.reset(); + this.files[fname] = true; + } + + // Import imports + + if (json['imports'] && json['imports'].length > 0) { + var importRoot, + resetRoot = false; + + if (typeof filename === 'object') { // If an import root is specified, override + + this.importRoot = filename["root"]; resetRoot = true; // ... and reset afterwards + importRoot = this.importRoot; + filename = filename["file"]; + if (importRoot.indexOf("\\") >= 0 || filename.indexOf("\\") >= 0) + delim = '\\'; + + } else if (typeof filename === 'string') { + + if (this.importRoot) // If import root is overridden, use it + importRoot = this.importRoot; + else { // Otherwise compute from filename + if (filename.indexOf("/") >= 0) { // Unix + importRoot = filename.replace(/\/[^\/]*$/, ""); + if (/* /file.proto */ importRoot === "") + importRoot = "/"; + } else if (filename.indexOf("\\") >= 0) { // Windows + importRoot = filename.replace(/\\[^\\]*$/, ""); + delim = '\\'; + } else + importRoot = "."; + } + + } else + importRoot = null; + + for (var i=0; i)=} path Specifies what to return. If omitted, the entire namespace will be returned. + * @returns {!ProtoBuf.Builder.Message|!Object.} + * @throws {Error} If a type could not be resolved + * @expose + */ + BuilderPrototype.build = function(path) { + this.reset(); + if (!this.resolved) + this.resolveAll(), + this.resolved = true, + this.result = null; // Require re-build + if (this.result === null) // (Re-)Build + this.result = this.ns.build(); + if (!path) + return this.result; + var part = typeof path === 'string' ? path.split(".") : path, + ptr = this.result; // Build namespace pointer (no hasChild etc.) + for (var i=0; i=} contents Initial contents + * @constructor + */ + var Map = function(field, contents) { + if (!field.map) + throw Error("field is not a map"); + + /** + * The field corresponding to this map. + * @type {!ProtoBuf.Reflect.Field} + */ + this.field = field; + + /** + * Element instance corresponding to key type. + * @type {!ProtoBuf.Reflect.Element} + */ + this.keyElem = new Reflect.Element(field.keyType, null, true, field.syntax); + + /** + * Element instance corresponding to value type. + * @type {!ProtoBuf.Reflect.Element} + */ + this.valueElem = new Reflect.Element(field.type, field.resolvedType, false, field.syntax); + + /** + * Internal map: stores mapping of (string form of key) -> (key, value) + * pair. + * + * We provide map semantics for arbitrary key types, but we build on top + * of an Object, which has only string keys. In order to avoid the need + * to convert a string key back to its native type in many situations, + * we store the native key value alongside the value. Thus, we only need + * a one-way mapping from a key type to its string form that guarantees + * uniqueness and equality (i.e., str(K1) === str(K2) if and only if K1 + * === K2). + * + * @type {!Object} + */ + this.map = {}; + + /** + * Returns the number of elements in the map. + */ + Object.defineProperty(this, "size", { + get: function() { return Object.keys(this.map).length; } + }); + + // Fill initial contents from a raw object. + if (contents) { + var keys = Object.keys(contents); + for (var i = 0; i < keys.length; i++) { + var key = this.keyElem.valueFromString(keys[i]); + var val = this.valueElem.verifyValue(contents[keys[i]]); + this.map[this.keyElem.valueToString(key)] = + { key: key, value: val }; + } + } + }; + + var MapPrototype = Map.prototype; + + /** + * Helper: return an iterator over an array. + * @param {!Array<*>} arr the array + * @returns {!Object} an iterator + * @inner + */ + function arrayIterator(arr) { + var idx = 0; + return { + next: function() { + if (idx < arr.length) + return { done: false, value: arr[idx++] }; + return { done: true }; + } + } + } + + /** + * Clears the map. + */ + MapPrototype.clear = function() { + this.map = {}; + }; + + /** + * Deletes a particular key from the map. + * @returns {boolean} Whether any entry with this key was deleted. + */ + MapPrototype["delete"] = function(key) { + var keyValue = this.keyElem.valueToString(this.keyElem.verifyValue(key)); + var hadKey = keyValue in this.map; + delete this.map[keyValue]; + return hadKey; + }; + + /** + * Returns an iterator over [key, value] pairs in the map. + * @returns {Object} The iterator + */ + MapPrototype.entries = function() { + var entries = []; + var strKeys = Object.keys(this.map); + for (var i = 0, entry; i < strKeys.length; i++) + entries.push([(entry=this.map[strKeys[i]]).key, entry.value]); + return arrayIterator(entries); + }; + + /** + * Returns an iterator over keys in the map. + * @returns {Object} The iterator + */ + MapPrototype.keys = function() { + var keys = []; + var strKeys = Object.keys(this.map); + for (var i = 0; i < strKeys.length; i++) + keys.push(this.map[strKeys[i]].key); + return arrayIterator(keys); + }; + + /** + * Returns an iterator over values in the map. + * @returns {!Object} The iterator + */ + MapPrototype.values = function() { + var values = []; + var strKeys = Object.keys(this.map); + for (var i = 0; i < strKeys.length; i++) + values.push(this.map[strKeys[i]].value); + return arrayIterator(values); + }; + + /** + * Iterates over entries in the map, calling a function on each. + * @param {function(this:*, *, *, *)} cb The callback to invoke with value, key, and map arguments. + * @param {Object=} thisArg The `this` value for the callback + */ + MapPrototype.forEach = function(cb, thisArg) { + var strKeys = Object.keys(this.map); + for (var i = 0, entry; i < strKeys.length; i++) + cb.call(thisArg, (entry=this.map[strKeys[i]]).value, entry.key, this); + }; + + /** + * Sets a key in the map to the given value. + * @param {*} key The key + * @param {*} value The value + * @returns {!ProtoBuf.Map} The map instance + */ + MapPrototype.set = function(key, value) { + var keyValue = this.keyElem.verifyValue(key); + var valValue = this.valueElem.verifyValue(value); + this.map[this.keyElem.valueToString(keyValue)] = + { key: keyValue, value: valValue }; + return this; + }; + + /** + * Gets the value corresponding to a key in the map. + * @param {*} key The key + * @returns {*|undefined} The value, or `undefined` if key not present + */ + MapPrototype.get = function(key) { + var keyValue = this.keyElem.valueToString(this.keyElem.verifyValue(key)); + if (!(keyValue in this.map)) + return undefined; + return this.map[keyValue].value; + }; + + /** + * Determines whether the given key is present in the map. + * @param {*} key The key + * @returns {boolean} `true` if the key is present + */ + MapPrototype.has = function(key) { + var keyValue = this.keyElem.valueToString(this.keyElem.verifyValue(key)); + return (keyValue in this.map); + }; + + return Map; + })(ProtoBuf, ProtoBuf.Reflect); + + + /** + * Constructs a new empty Builder. + * @param {Object.=} options Builder options, defaults to global options set on ProtoBuf + * @return {!ProtoBuf.Builder} Builder + * @expose + */ + ProtoBuf.newBuilder = function(options) { + options = options || {}; + if (typeof options['convertFieldsToCamelCase'] === 'undefined') + options['convertFieldsToCamelCase'] = ProtoBuf.convertFieldsToCamelCase; + if (typeof options['populateAccessors'] === 'undefined') + options['populateAccessors'] = ProtoBuf.populateAccessors; + return new ProtoBuf.Builder(options); + }; + + /** + * Loads a .json definition and returns the Builder. + * @param {!*|string} json JSON definition + * @param {(ProtoBuf.Builder|string|{root: string, file: string})=} builder Builder to append to. Will create a new one if omitted. + * @param {(string|{root: string, file: string})=} filename The corresponding file name if known. Must be specified for imports. + * @return {ProtoBuf.Builder} Builder to create new messages + * @throws {Error} If the definition cannot be parsed or built + * @expose + */ + ProtoBuf.loadJson = function(json, builder, filename) { + if (typeof builder === 'string' || (builder && typeof builder["file"] === 'string' && typeof builder["root"] === 'string')) + filename = builder, + builder = null; + if (!builder || typeof builder !== 'object') + builder = ProtoBuf.newBuilder(); + if (typeof json === 'string') + json = JSON.parse(json); + builder["import"](json, filename); + builder.resolveAll(); + return builder; + }; + + /** + * Loads a .json file and returns the Builder. + * @param {string|!{root: string, file: string}} filename Path to json file or an object specifying 'file' with + * an overridden 'root' path for all imported files. + * @param {function(?Error, !ProtoBuf.Builder=)=} callback Callback that will receive `null` as the first and + * the Builder as its second argument on success, otherwise the error as its first argument. If omitted, the + * file will be read synchronously and this function will return the Builder. + * @param {ProtoBuf.Builder=} builder Builder to append to. Will create a new one if omitted. + * @return {?ProtoBuf.Builder|undefined} The Builder if synchronous (no callback specified, will be NULL if the + * request has failed), else undefined + * @expose + */ + ProtoBuf.loadJsonFile = function(filename, callback, builder) { + if (callback && typeof callback === 'object') + builder = callback, + callback = null; + else if (!callback || typeof callback !== 'function') + callback = null; + if (callback) + return ProtoBuf.Util.fetch(typeof filename === 'string' ? filename : filename["root"]+"/"+filename["file"], function(contents) { + if (contents === null) { + callback(Error("Failed to fetch file")); + return; + } + try { + callback(null, ProtoBuf.loadJson(JSON.parse(contents), builder, filename)); + } catch (e) { + callback(e); + } + }); + var contents = ProtoBuf.Util.fetch(typeof filename === 'object' ? filename["root"]+"/"+filename["file"] : filename); + return contents === null ? null : ProtoBuf.loadJson(JSON.parse(contents), builder, filename); + }; + + return ProtoBuf; + }); + }); + + var messageCompiled = protobufLight.newBuilder({})['import']({ + "package": "push_server.messages2", + "syntax": "proto2", + "options": { + "objc_class_prefix": "AVIM" + }, + "messages": [{ + "name": "JsonObjectMessage", + "syntax": "proto2", + "fields": [{ + "rule": "required", + "type": "string", + "name": "data", + "id": 1 + }] + }, { + "name": "UnreadTuple", + "syntax": "proto2", + "fields": [{ + "rule": "required", + "type": "string", + "name": "cid", + "id": 1 + }, { + "rule": "required", + "type": "int32", + "name": "unread", + "id": 2 + }, { + "rule": "optional", + "type": "string", + "name": "mid", + "id": 3 + }, { + "rule": "optional", + "type": "int64", + "name": "timestamp", + "id": 4 + }, { + "rule": "optional", + "type": "string", + "name": "from", + "id": 5 + }, { + "rule": "optional", + "type": "string", + "name": "data", + "id": 6 + }, { + "rule": "optional", + "type": "int64", + "name": "patchTimestamp", + "id": 7 + }] + }, { + "name": "LogItem", + "syntax": "proto2", + "fields": [{ + "rule": "optional", + "type": "string", + "name": "from", + "id": 1 + }, { + "rule": "optional", + "type": "string", + "name": "data", + "id": 2 + }, { + "rule": "optional", + "type": "int64", + "name": "timestamp", + "id": 3 + }, { + "rule": "optional", + "type": "string", + "name": "msgId", + "id": 4 + }, { + "rule": "optional", + "type": "int64", + "name": "ackAt", + "id": 5 + }, { + "rule": "optional", + "type": "int64", + "name": "readAt", + "id": 6 + }, { + "rule": "optional", + "type": "int64", + "name": "patchTimestamp", + "id": 7 + }] + }, { + "name": "DataCommand", + "syntax": "proto2", + "fields": [{ + "rule": "repeated", + "type": "string", + "name": "ids", + "id": 1 + }, { + "rule": "repeated", + "type": "JsonObjectMessage", + "name": "msg", + "id": 2 + }, { + "rule": "optional", + "type": "bool", + "name": "offline", + "id": 3 + }] + }, { + "name": "SessionCommand", + "syntax": "proto2", + "fields": [{ + "rule": "optional", + "type": "int64", + "name": "t", + "id": 1 + }, { + "rule": "optional", + "type": "string", + "name": "n", + "id": 2 + }, { + "rule": "optional", + "type": "string", + "name": "s", + "id": 3 + }, { + "rule": "optional", + "type": "string", + "name": "ua", + "id": 4 + }, { + "rule": "optional", + "type": "bool", + "name": "r", + "id": 5 + }, { + "rule": "optional", + "type": "string", + "name": "tag", + "id": 6 + }, { + "rule": "optional", + "type": "string", + "name": "deviceId", + "id": 7 + }, { + "rule": "repeated", + "type": "string", + "name": "sessionPeerIds", + "id": 8 + }, { + "rule": "repeated", + "type": "string", + "name": "onlineSessionPeerIds", + "id": 9 + }, { + "rule": "optional", + "type": "string", + "name": "st", + "id": 10 + }, { + "rule": "optional", + "type": "int32", + "name": "stTtl", + "id": 11 + }, { + "rule": "optional", + "type": "int32", + "name": "code", + "id": 12 + }, { + "rule": "optional", + "type": "string", + "name": "reason", + "id": 13 + }, { + "rule": "optional", + "type": "string", + "name": "deviceToken", + "id": 14 + }, { + "rule": "optional", + "type": "bool", + "name": "sp", + "id": 15 + }, { + "rule": "optional", + "type": "string", + "name": "detail", + "id": 16 + }, { + "rule": "optional", + "type": "int64", + "name": "lastUnreadNotifTime", + "id": 17 + }, { + "rule": "optional", + "type": "int64", + "name": "lastPatchTime", + "id": 18 + }, { + "rule": "optional", + "type": "int64", + "name": "configBitmap", + "id": 19 + }] + }, { + "name": "ErrorCommand", + "syntax": "proto2", + "fields": [{ + "rule": "required", + "type": "int32", + "name": "code", + "id": 1 + }, { + "rule": "required", + "type": "string", + "name": "reason", + "id": 2 + }, { + "rule": "optional", + "type": "int32", + "name": "appCode", + "id": 3 + }, { + "rule": "optional", + "type": "string", + "name": "detail", + "id": 4 + }] + }, { + "name": "DirectCommand", + "syntax": "proto2", + "fields": [{ + "rule": "optional", + "type": "string", + "name": "msg", + "id": 1 + }, { + "rule": "optional", + "type": "string", + "name": "uid", + "id": 2 + }, { + "rule": "optional", + "type": "string", + "name": "fromPeerId", + "id": 3 + }, { + "rule": "optional", + "type": "int64", + "name": "timestamp", + "id": 4 + }, { + "rule": "optional", + "type": "bool", + "name": "offline", + "id": 5 + }, { + "rule": "optional", + "type": "bool", + "name": "hasMore", + "id": 6 + }, { + "rule": "repeated", + "type": "string", + "name": "toPeerIds", + "id": 7 + }, { + "rule": "optional", + "type": "bool", + "name": "r", + "id": 10 + }, { + "rule": "optional", + "type": "string", + "name": "cid", + "id": 11 + }, { + "rule": "optional", + "type": "string", + "name": "id", + "id": 12 + }, { + "rule": "optional", + "type": "bool", + "name": "transient", + "id": 13 + }, { + "rule": "optional", + "type": "string", + "name": "dt", + "id": 14 + }, { + "rule": "optional", + "type": "string", + "name": "roomId", + "id": 15 + }, { + "rule": "optional", + "type": "string", + "name": "pushData", + "id": 16 + }, { + "rule": "optional", + "type": "bool", + "name": "will", + "id": 17 + }, { + "rule": "optional", + "type": "int64", + "name": "patchTimestamp", + "id": 18 + }] + }, { + "name": "AckCommand", + "syntax": "proto2", + "fields": [{ + "rule": "optional", + "type": "int32", + "name": "code", + "id": 1 + }, { + "rule": "optional", + "type": "string", + "name": "reason", + "id": 2 + }, { + "rule": "optional", + "type": "string", + "name": "mid", + "id": 3 + }, { + "rule": "optional", + "type": "string", + "name": "cid", + "id": 4 + }, { + "rule": "optional", + "type": "int64", + "name": "t", + "id": 5 + }, { + "rule": "optional", + "type": "string", + "name": "uid", + "id": 6 + }, { + "rule": "optional", + "type": "int64", + "name": "fromts", + "id": 7 + }, { + "rule": "optional", + "type": "int64", + "name": "tots", + "id": 8 + }, { + "rule": "optional", + "type": "string", + "name": "type", + "id": 9 + }, { + "rule": "repeated", + "type": "string", + "name": "ids", + "id": 10 + }, { + "rule": "optional", + "type": "int32", + "name": "appCode", + "id": 11 + }] + }, { + "name": "UnreadCommand", + "syntax": "proto2", + "fields": [{ + "rule": "repeated", + "type": "UnreadTuple", + "name": "convs", + "id": 1 + }, { + "rule": "optional", + "type": "int64", + "name": "notifTime", + "id": 2 + }] + }, { + "name": "ConvCommand", + "syntax": "proto2", + "fields": [{ + "rule": "repeated", + "type": "string", + "name": "m", + "id": 1 + }, { + "rule": "optional", + "type": "bool", + "name": "transient", + "id": 2 + }, { + "rule": "optional", + "type": "bool", + "name": "unique", + "id": 3 + }, { + "rule": "optional", + "type": "string", + "name": "cid", + "id": 4 + }, { + "rule": "optional", + "type": "string", + "name": "cdate", + "id": 5 + }, { + "rule": "optional", + "type": "string", + "name": "initBy", + "id": 6 + }, { + "rule": "optional", + "type": "string", + "name": "sort", + "id": 7 + }, { + "rule": "optional", + "type": "int32", + "name": "limit", + "id": 8 + }, { + "rule": "optional", + "type": "int32", + "name": "skip", + "id": 9 + }, { + "rule": "optional", + "type": "int32", + "name": "flag", + "id": 10 + }, { + "rule": "optional", + "type": "int32", + "name": "count", + "id": 11 + }, { + "rule": "optional", + "type": "string", + "name": "udate", + "id": 12 + }, { + "rule": "optional", + "type": "int64", + "name": "t", + "id": 13 + }, { + "rule": "optional", + "type": "string", + "name": "n", + "id": 14 + }, { + "rule": "optional", + "type": "string", + "name": "s", + "id": 15 + }, { + "rule": "optional", + "type": "bool", + "name": "statusSub", + "id": 16 + }, { + "rule": "optional", + "type": "bool", + "name": "statusPub", + "id": 17 + }, { + "rule": "optional", + "type": "int32", + "name": "statusTTL", + "id": 18 + }, { + "rule": "optional", + "type": "string", + "name": "uniqueId", + "id": 19 + }, { + "rule": "optional", + "type": "string", + "name": "targetClientId", + "id": 20 + }, { + "rule": "optional", + "type": "int64", + "name": "maxReadTimestamp", + "id": 21 + }, { + "rule": "optional", + "type": "int64", + "name": "maxAckTimestamp", + "id": 22 + }, { + "rule": "optional", + "type": "bool", + "name": "queryAllMembers", + "id": 23 + }, { + "rule": "repeated", + "type": "MaxReadTuple", + "name": "maxReadTuples", + "id": 24 + }, { + "rule": "repeated", + "type": "string", + "name": "cids", + "id": 25 + }, { + "rule": "optional", + "type": "JsonObjectMessage", + "name": "results", + "id": 100 + }, { + "rule": "optional", + "type": "JsonObjectMessage", + "name": "where", + "id": 101 + }, { + "rule": "optional", + "type": "JsonObjectMessage", + "name": "attr", + "id": 103 + }] + }, { + "name": "RoomCommand", + "syntax": "proto2", + "fields": [{ + "rule": "optional", + "type": "string", + "name": "roomId", + "id": 1 + }, { + "rule": "optional", + "type": "string", + "name": "s", + "id": 2 + }, { + "rule": "optional", + "type": "int64", + "name": "t", + "id": 3 + }, { + "rule": "optional", + "type": "string", + "name": "n", + "id": 4 + }, { + "rule": "optional", + "type": "bool", + "name": "transient", + "id": 5 + }, { + "rule": "repeated", + "type": "string", + "name": "roomPeerIds", + "id": 6 + }, { + "rule": "optional", + "type": "string", + "name": "byPeerId", + "id": 7 + }] + }, { + "name": "LogsCommand", + "syntax": "proto2", + "fields": [{ + "rule": "optional", + "type": "string", + "name": "cid", + "id": 1 + }, { + "rule": "optional", + "type": "int32", + "name": "l", + "id": 2 + }, { + "rule": "optional", + "type": "int32", + "name": "limit", + "id": 3 + }, { + "rule": "optional", + "type": "int64", + "name": "t", + "id": 4 + }, { + "rule": "optional", + "type": "int64", + "name": "tt", + "id": 5 + }, { + "rule": "optional", + "type": "string", + "name": "tmid", + "id": 6 + }, { + "rule": "optional", + "type": "string", + "name": "mid", + "id": 7 + }, { + "rule": "optional", + "type": "string", + "name": "checksum", + "id": 8 + }, { + "rule": "optional", + "type": "bool", + "name": "stored", + "id": 9 + }, { + "rule": "optional", + "type": "bool", + "name": "reversed", + "id": 10 + }, { + "rule": "repeated", + "type": "LogItem", + "name": "logs", + "id": 105 + }] + }, { + "name": "RcpCommand", + "syntax": "proto2", + "fields": [{ + "rule": "optional", + "type": "string", + "name": "id", + "id": 1 + }, { + "rule": "optional", + "type": "string", + "name": "cid", + "id": 2 + }, { + "rule": "optional", + "type": "int64", + "name": "t", + "id": 3 + }, { + "rule": "optional", + "type": "bool", + "name": "read", + "id": 4 + }] + }, { + "name": "ReadTuple", + "syntax": "proto2", + "fields": [{ + "rule": "required", + "type": "string", + "name": "cid", + "id": 1 + }, { + "rule": "optional", + "type": "int64", + "name": "timestamp", + "id": 2 + }, { + "rule": "optional", + "type": "string", + "name": "mid", + "id": 3 + }] + }, { + "name": "MaxReadTuple", + "syntax": "proto2", + "fields": [{ + "rule": "optional", + "type": "string", + "name": "pid", + "id": 1 + }, { + "rule": "optional", + "type": "int64", + "name": "maxAckTimestamp", + "id": 2 + }, { + "rule": "optional", + "type": "int64", + "name": "maxReadTimestamp", + "id": 3 + }] + }, { + "name": "ReadCommand", + "syntax": "proto2", + "fields": [{ + "rule": "optional", + "type": "string", + "name": "cid", + "id": 1 + }, { + "rule": "repeated", + "type": "string", + "name": "cids", + "id": 2 + }, { + "rule": "repeated", + "type": "ReadTuple", + "name": "convs", + "id": 3 + }] + }, { + "name": "PresenceCommand", + "syntax": "proto2", + "fields": [{ + "rule": "optional", + "type": "StatusType", + "name": "status", + "id": 1 + }, { + "rule": "repeated", + "type": "string", + "name": "sessionPeerIds", + "id": 2 + }, { + "rule": "optional", + "type": "string", + "name": "cid", + "id": 3 + }] + }, { + "name": "ReportCommand", + "syntax": "proto2", + "fields": [{ + "rule": "optional", + "type": "bool", + "name": "initiative", + "id": 1 + }, { + "rule": "optional", + "type": "string", + "name": "type", + "id": 2 + }, { + "rule": "optional", + "type": "string", + "name": "data", + "id": 3 + }] + }, { + "name": "PatchItem", + "syntax": "proto2", + "fields": [{ + "rule": "optional", + "type": "string", + "name": "cid", + "id": 1 + }, { + "rule": "optional", + "type": "string", + "name": "mid", + "id": 2 + }, { + "rule": "optional", + "type": "int64", + "name": "timestamp", + "id": 3 + }, { + "rule": "optional", + "type": "bool", + "name": "recall", + "id": 4 + }, { + "rule": "optional", + "type": "string", + "name": "data", + "id": 5 + }, { + "rule": "optional", + "type": "int64", + "name": "patchTimestamp", + "id": 6 + }, { + "rule": "optional", + "type": "string", + "name": "from", + "id": 7 + }] + }, { + "name": "PatchCommand", + "syntax": "proto2", + "fields": [{ + "rule": "repeated", + "type": "PatchItem", + "name": "patches", + "id": 1 + }, { + "rule": "optional", + "type": "int64", + "name": "lastPatchTime", + "id": 2 + }] + }, { + "name": "GenericCommand", + "syntax": "proto2", + "fields": [{ + "rule": "optional", + "type": "CommandType", + "name": "cmd", + "id": 1 + }, { + "rule": "optional", + "type": "OpType", + "name": "op", + "id": 2 + }, { + "rule": "optional", + "type": "string", + "name": "appId", + "id": 3 + }, { + "rule": "optional", + "type": "string", + "name": "peerId", + "id": 4 + }, { + "rule": "optional", + "type": "int32", + "name": "i", + "id": 5 + }, { + "rule": "optional", + "type": "string", + "name": "installationId", + "id": 6 + }, { + "rule": "optional", + "type": "int32", + "name": "priority", + "id": 7 + }, { + "rule": "optional", + "type": "int32", + "name": "service", + "id": 8 + }, { + "rule": "optional", + "type": "DataCommand", + "name": "dataMessage", + "id": 101 + }, { + "rule": "optional", + "type": "SessionCommand", + "name": "sessionMessage", + "id": 102 + }, { + "rule": "optional", + "type": "ErrorCommand", + "name": "errorMessage", + "id": 103 + }, { + "rule": "optional", + "type": "DirectCommand", + "name": "directMessage", + "id": 104 + }, { + "rule": "optional", + "type": "AckCommand", + "name": "ackMessage", + "id": 105 + }, { + "rule": "optional", + "type": "UnreadCommand", + "name": "unreadMessage", + "id": 106 + }, { + "rule": "optional", + "type": "ReadCommand", + "name": "readMessage", + "id": 107 + }, { + "rule": "optional", + "type": "RcpCommand", + "name": "rcpMessage", + "id": 108 + }, { + "rule": "optional", + "type": "LogsCommand", + "name": "logsMessage", + "id": 109 + }, { + "rule": "optional", + "type": "ConvCommand", + "name": "convMessage", + "id": 110 + }, { + "rule": "optional", + "type": "RoomCommand", + "name": "roomMessage", + "id": 111 + }, { + "rule": "optional", + "type": "PresenceCommand", + "name": "presenceMessage", + "id": 112 + }, { + "rule": "optional", + "type": "ReportCommand", + "name": "reportMessage", + "id": 113 + }, { + "rule": "optional", + "type": "PatchCommand", + "name": "patchMessage", + "id": 114 + }] + }], + "enums": [{ + "name": "CommandType", + "syntax": "proto2", + "values": [{ + "name": "session", + "id": 0 + }, { + "name": "conv", + "id": 1 + }, { + "name": "direct", + "id": 2 + }, { + "name": "ack", + "id": 3 + }, { + "name": "rcp", + "id": 4 + }, { + "name": "unread", + "id": 5 + }, { + "name": "logs", + "id": 6 + }, { + "name": "error", + "id": 7 + }, { + "name": "login", + "id": 8 + }, { + "name": "data", + "id": 9 + }, { + "name": "room", + "id": 10 + }, { + "name": "read", + "id": 11 + }, { + "name": "presence", + "id": 12 + }, { + "name": "report", + "id": 13 + }, { + "name": "echo", + "id": 14 + }, { + "name": "loggedin", + "id": 15 + }, { + "name": "logout", + "id": 16 + }, { + "name": "loggedout", + "id": 17 + }, { + "name": "patch", + "id": 18 + }] + }, { + "name": "OpType", + "syntax": "proto2", + "values": [{ + "name": "open", + "id": 1 + }, { + "name": "add", + "id": 2 + }, { + "name": "remove", + "id": 3 + }, { + "name": "close", + "id": 4 + }, { + "name": "opened", + "id": 5 + }, { + "name": "closed", + "id": 6 + }, { + "name": "query", + "id": 7 + }, { + "name": "query_result", + "id": 8 + }, { + "name": "conflict", + "id": 9 + }, { + "name": "added", + "id": 10 + }, { + "name": "removed", + "id": 11 + }, { + "name": "start", + "id": 30 + }, { + "name": "started", + "id": 31 + }, { + "name": "joined", + "id": 32 + }, { + "name": "members_joined", + "id": 33 + }, { + "name": "left", + "id": 39 + }, { + "name": "members_left", + "id": 40 + }, { + "name": "results", + "id": 42 + }, { + "name": "count", + "id": 43 + }, { + "name": "result", + "id": 44 + }, { + "name": "update", + "id": 45 + }, { + "name": "updated", + "id": 46 + }, { + "name": "mute", + "id": 47 + }, { + "name": "unmute", + "id": 48 + }, { + "name": "status", + "id": 49 + }, { + "name": "members", + "id": 50 + }, { + "name": "max_read", + "id": 51 + }, { + "name": "is_member", + "id": 52 + }, { + "name": "join", + "id": 80 + }, { + "name": "invite", + "id": 81 + }, { + "name": "leave", + "id": 82 + }, { + "name": "kick", + "id": 83 + }, { + "name": "reject", + "id": 84 + }, { + "name": "invited", + "id": 85 + }, { + "name": "kicked", + "id": 86 + }, { + "name": "upload", + "id": 100 + }, { + "name": "uploaded", + "id": 101 + }, { + "name": "modify", + "id": 150 + }, { + "name": "modified", + "id": 151 + }] + }, { + "name": "StatusType", + "syntax": "proto2", + "values": [{ + "name": "on", + "id": 1 + }, { + "name": "off", + "id": 2 + }] + }], + "isNamespace": true + }).build(); + + var _messages$push_server = messageCompiled.push_server.messages2; + var JsonObjectMessage = _messages$push_server.JsonObjectMessage; + var UnreadTuple = _messages$push_server.UnreadTuple; + var LogItem = _messages$push_server.LogItem; + var DataCommand = _messages$push_server.DataCommand; + var SessionCommand = _messages$push_server.SessionCommand; + var ErrorCommand = _messages$push_server.ErrorCommand; + var DirectCommand = _messages$push_server.DirectCommand; + var AckCommand = _messages$push_server.AckCommand; + var UnreadCommand = _messages$push_server.UnreadCommand; + var ConvCommand = _messages$push_server.ConvCommand; + var RoomCommand = _messages$push_server.RoomCommand; + var LogsCommand = _messages$push_server.LogsCommand; + var RcpCommand = _messages$push_server.RcpCommand; + var ReadTuple = _messages$push_server.ReadTuple; + var MaxReadTuple = _messages$push_server.MaxReadTuple; + var ReadCommand = _messages$push_server.ReadCommand; + var PresenceCommand = _messages$push_server.PresenceCommand; + var ReportCommand = _messages$push_server.ReportCommand; + var GenericCommand = _messages$push_server.GenericCommand; + var PatchCommand = _messages$push_server.PatchCommand; + var PatchItem = _messages$push_server.PatchItem; + var CommandType = _messages$push_server.CommandType; + var OpType = _messages$push_server.OpType; + var StatusType = _messages$push_server.StatusType; + + + + + var message = Object.freeze({ + JsonObjectMessage: JsonObjectMessage, + UnreadTuple: UnreadTuple, + LogItem: LogItem, + DataCommand: DataCommand, + SessionCommand: SessionCommand, + ErrorCommand: ErrorCommand, + DirectCommand: DirectCommand, + AckCommand: AckCommand, + UnreadCommand: UnreadCommand, + ConvCommand: ConvCommand, + RoomCommand: RoomCommand, + LogsCommand: LogsCommand, + RcpCommand: RcpCommand, + ReadTuple: ReadTuple, + MaxReadTuple: MaxReadTuple, + ReadCommand: ReadCommand, + PresenceCommand: PresenceCommand, + ReportCommand: ReportCommand, + GenericCommand: GenericCommand, + PatchCommand: PatchCommand, + PatchItem: PatchItem, + CommandType: CommandType, + OpType: OpType, + StatusType: StatusType + }); + + var eventemitter3 = createCommonjsModule(function (module) { + 'use strict'; + + var has = Object.prototype.hasOwnProperty + , prefix = '~'; + + /** + * Constructor to create a storage for our `EE` objects. + * An `Events` instance is a plain object whose properties are event names. + * + * @constructor + * @api private + */ + function Events() {} + + // + // We try to not inherit from `Object.prototype`. In some engines creating an + // instance in this way is faster than calling `Object.create(null)` directly. + // If `Object.create(null)` is not supported we prefix the event names with a + // character to make sure that the built-in object properties are not + // overridden or used as an attack vector. + // + if (Object.create) { + Events.prototype = Object.create(null); + + // + // This hack is needed because the `__proto__` property is still inherited in + // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5. + // + if (!new Events().__proto__) prefix = false; + } + + /** + * Representation of a single event listener. + * + * @param {Function} fn The listener function. + * @param {Mixed} context The context to invoke the listener with. + * @param {Boolean} [once=false] Specify if the listener is a one-time listener. + * @constructor + * @api private + */ + function EE(fn, context, once) { + this.fn = fn; + this.context = context; + this.once = once || false; + } + + /** + * Minimal `EventEmitter` interface that is molded against the Node.js + * `EventEmitter` interface. + * + * @constructor + * @api public + */ + function EventEmitter() { + this._events = new Events(); + this._eventsCount = 0; + } + + /** + * Return an array listing the events for which the emitter has registered + * listeners. + * + * @returns {Array} + * @api public + */ + EventEmitter.prototype.eventNames = function eventNames() { + var names = [] + , events + , name; + + if (this._eventsCount === 0) return names; + + for (name in (events = this._events)) { + if (has.call(events, name)) names.push(prefix ? name.slice(1) : name); + } + + if (Object.getOwnPropertySymbols) { + return names.concat(Object.getOwnPropertySymbols(events)); + } + + return names; + }; + + /** + * Return the listeners registered for a given event. + * + * @param {String|Symbol} event The event name. + * @param {Boolean} exists Only check if there are listeners. + * @returns {Array|Boolean} + * @api public + */ + EventEmitter.prototype.listeners = function listeners(event, exists) { + var evt = prefix ? prefix + event : event + , available = this._events[evt]; + + if (exists) return !!available; + if (!available) return []; + if (available.fn) return [available.fn]; + + for (var i = 0, l = available.length, ee = new Array(l); i < l; i++) { + ee[i] = available[i].fn; + } + + return ee; + }; + + /** + * Calls each of the listeners registered for a given event. + * + * @param {String|Symbol} event The event name. + * @returns {Boolean} `true` if the event had listeners, else `false`. + * @api public + */ + EventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) { + var evt = prefix ? prefix + event : event; + + if (!this._events[evt]) return false; + + var listeners = this._events[evt] + , len = arguments.length + , args + , i; + + if (listeners.fn) { + if (listeners.once) this.removeListener(event, listeners.fn, undefined, true); + + switch (len) { + case 1: return listeners.fn.call(listeners.context), true; + case 2: return listeners.fn.call(listeners.context, a1), true; + case 3: return listeners.fn.call(listeners.context, a1, a2), true; + case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true; + case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true; + case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true; + } + + for (i = 1, args = new Array(len -1); i < len; i++) { + args[i - 1] = arguments[i]; + } + + listeners.fn.apply(listeners.context, args); + } else { + var length = listeners.length + , j; + + for (i = 0; i < length; i++) { + if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true); + + switch (len) { + case 1: listeners[i].fn.call(listeners[i].context); break; + case 2: listeners[i].fn.call(listeners[i].context, a1); break; + case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break; + case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break; + default: + if (!args) for (j = 1, args = new Array(len -1); j < len; j++) { + args[j - 1] = arguments[j]; + } + + listeners[i].fn.apply(listeners[i].context, args); + } + } + } + + return true; + }; + + /** + * Add a listener for a given event. + * + * @param {String|Symbol} event The event name. + * @param {Function} fn The listener function. + * @param {Mixed} [context=this] The context to invoke the listener with. + * @returns {EventEmitter} `this`. + * @api public + */ + EventEmitter.prototype.on = function on(event, fn, context) { + var listener = new EE(fn, context || this) + , evt = prefix ? prefix + event : event; + + if (!this._events[evt]) this._events[evt] = listener, this._eventsCount++; + else if (!this._events[evt].fn) this._events[evt].push(listener); + else this._events[evt] = [this._events[evt], listener]; + + return this; + }; + + /** + * Add a one-time listener for a given event. + * + * @param {String|Symbol} event The event name. + * @param {Function} fn The listener function. + * @param {Mixed} [context=this] The context to invoke the listener with. + * @returns {EventEmitter} `this`. + * @api public + */ + EventEmitter.prototype.once = function once(event, fn, context) { + var listener = new EE(fn, context || this, true) + , evt = prefix ? prefix + event : event; + + if (!this._events[evt]) this._events[evt] = listener, this._eventsCount++; + else if (!this._events[evt].fn) this._events[evt].push(listener); + else this._events[evt] = [this._events[evt], listener]; + + return this; + }; + + /** + * Remove the listeners of a given event. + * + * @param {String|Symbol} event The event name. + * @param {Function} fn Only remove the listeners that match this function. + * @param {Mixed} context Only remove the listeners that have this context. + * @param {Boolean} once Only remove one-time listeners. + * @returns {EventEmitter} `this`. + * @api public + */ + EventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) { + var evt = prefix ? prefix + event : event; + + if (!this._events[evt]) return this; + if (!fn) { + if (--this._eventsCount === 0) this._events = new Events(); + else delete this._events[evt]; + return this; + } + + var listeners = this._events[evt]; + + if (listeners.fn) { + if ( + listeners.fn === fn + && (!once || listeners.once) + && (!context || listeners.context === context) + ) { + if (--this._eventsCount === 0) this._events = new Events(); + else delete this._events[evt]; + } + } else { + for (var i = 0, events = [], length = listeners.length; i < length; i++) { + if ( + listeners[i].fn !== fn + || (once && !listeners[i].once) + || (context && listeners[i].context !== context) + ) { + events.push(listeners[i]); + } + } + + // + // Reset the array, or remove it completely if we have no more listeners. + // + if (events.length) this._events[evt] = events.length === 1 ? events[0] : events; + else if (--this._eventsCount === 0) this._events = new Events(); + else delete this._events[evt]; + } + + return this; + }; + + /** + * Remove all listeners, or those of the specified event. + * + * @param {String|Symbol} [event] The event name. + * @returns {EventEmitter} `this`. + * @api public + */ + EventEmitter.prototype.removeAllListeners = function removeAllListeners(event) { + var evt; + + if (event) { + evt = prefix ? prefix + event : event; + if (this._events[evt]) { + if (--this._eventsCount === 0) this._events = new Events(); + else delete this._events[evt]; + } + } else { + this._events = new Events(); + this._eventsCount = 0; + } + + return this; + }; + + // + // Alias methods names because people roll like that. + // + EventEmitter.prototype.off = EventEmitter.prototype.removeListener; + EventEmitter.prototype.addListener = EventEmitter.prototype.on; + + // + // This function doesn't apply anymore. + // + EventEmitter.prototype.setMaxListeners = function setMaxListeners() { + return this; + }; + + // + // Expose the prefix. + // + EventEmitter.prefixed = prefix; + + // + // Allow `EventEmitter` to be imported as module namespace. + // + EventEmitter.EventEmitter = EventEmitter; + + // + // Expose the module. + // + { + module.exports = EventEmitter; + } + }); + + var _createProperty = function (object, index, value) { + if (index in object) _objectDp.f(object, index, _propertyDesc(0, value)); + else object[index] = value; + }; + + _export(_export.S + _export.F * !_iterDetect(function (iter) { Array.from(iter); }), 'Array', { + // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) + from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) { + var O = _toObject(arrayLike); + var C = typeof this == 'function' ? this : Array; + var aLen = arguments.length; + var mapfn = aLen > 1 ? arguments[1] : undefined; + var mapping = mapfn !== undefined; + var index = 0; + var iterFn = core_getIteratorMethod(O); + var length, result, step, iterator; + if (mapping) mapfn = _ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2); + // if object isn't iterable or it's array with default iterator - use simple case + if (iterFn != undefined && !(C == Array && _isArrayIter(iterFn))) { + for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) { + _createProperty(result, index, mapping ? _iterCall(iterator, mapfn, [step.value, index], true) : step.value); + } + } else { + length = _toLength(O.length); + for (result = new C(length); length > index; index++) { + _createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); + } + } + result.length = index; + return result; + } + }); + + var from$1 = _core.Array.from; + + var from = createCommonjsModule(function (module) { + module.exports = { "default": from$1, __esModule: true }; + }); + + var _Array$from = unwrapExports(from); + + var toConsumableArray = createCommonjsModule(function (module, exports) { + "use strict"; + + exports.__esModule = true; + + + + var _from2 = _interopRequireDefault(from); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + exports.default = 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 (0, _from2.default)(arr); + } + }; + }); + + var _toConsumableArray = unwrapExports(toConsumableArray); + + var _meta = createCommonjsModule(function (module) { + var META = _uid('meta'); + + + var setDesc = _objectDp.f; + var id = 0; + var isExtensible = Object.isExtensible || function () { + return true; + }; + var FREEZE = !_fails(function () { + return isExtensible(Object.preventExtensions({})); + }); + var setMeta = function (it) { + setDesc(it, META, { value: { + i: 'O' + ++id, // object ID + w: {} // weak collections IDs + } }); + }; + var fastKey = function (it, create) { + // return primitive with prefix + if (!_isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; + if (!_has(it, META)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return 'F'; + // not necessary to add metadata + if (!create) return 'E'; + // add missing metadata + setMeta(it); + // return object ID + } return it[META].i; + }; + var getWeak = function (it, create) { + if (!_has(it, META)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return true; + // not necessary to add metadata + if (!create) return false; + // add missing metadata + setMeta(it); + // return hash weak collections IDs + } return it[META].w; + }; + // add metadata on freeze-family methods calling + var onFreeze = function (it) { + if (FREEZE && meta.NEED && isExtensible(it) && !_has(it, META)) setMeta(it); + return it; + }; + var meta = module.exports = { + KEY: META, + NEED: false, + fastKey: fastKey, + getWeak: getWeak, + onFreeze: onFreeze + }; + }); + + var _validateCollection = function (it, TYPE) { + if (!_isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!'); + return it; + }; + + var dP$1 = _objectDp.f; + + + + + + + + + + var fastKey = _meta.fastKey; + + var SIZE = _descriptors ? '_s' : 'size'; + + var getEntry = function (that, key) { + // fast case + var index = fastKey(key); + var entry; + if (index !== 'F') return that._i[index]; + // frozen object case + for (entry = that._f; entry; entry = entry.n) { + if (entry.k == key) return entry; + } + }; + + var _collectionStrong = { + getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { + var C = wrapper(function (that, iterable) { + _anInstance(that, C, NAME, '_i'); + that._t = NAME; // collection type + that._i = _objectCreate(null); // index + that._f = undefined; // first entry + that._l = undefined; // last entry + that[SIZE] = 0; // size + if (iterable != undefined) _forOf(iterable, IS_MAP, that[ADDER], that); + }); + _redefineAll(C.prototype, { + // 23.1.3.1 Map.prototype.clear() + // 23.2.3.2 Set.prototype.clear() + clear: function clear() { + for (var that = _validateCollection(this, NAME), data = that._i, entry = that._f; entry; entry = entry.n) { + entry.r = true; + if (entry.p) entry.p = entry.p.n = undefined; + delete data[entry.i]; + } + that._f = that._l = undefined; + that[SIZE] = 0; + }, + // 23.1.3.3 Map.prototype.delete(key) + // 23.2.3.4 Set.prototype.delete(value) + 'delete': function (key) { + var that = _validateCollection(this, NAME); + var entry = getEntry(that, key); + if (entry) { + var next = entry.n; + var prev = entry.p; + delete that._i[entry.i]; + entry.r = true; + if (prev) prev.n = next; + if (next) next.p = prev; + if (that._f == entry) that._f = next; + if (that._l == entry) that._l = prev; + that[SIZE]--; + } return !!entry; + }, + // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined) + // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined) + forEach: function forEach(callbackfn /* , that = undefined */) { + _validateCollection(this, NAME); + var f = _ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3); + var entry; + while (entry = entry ? entry.n : this._f) { + f(entry.v, entry.k, this); + // revert to the last existing entry + while (entry && entry.r) entry = entry.p; + } + }, + // 23.1.3.7 Map.prototype.has(key) + // 23.2.3.7 Set.prototype.has(value) + has: function has(key) { + return !!getEntry(_validateCollection(this, NAME), key); + } + }); + if (_descriptors) dP$1(C.prototype, 'size', { + get: function () { + return _validateCollection(this, NAME)[SIZE]; + } + }); + return C; + }, + def: function (that, key, value) { + var entry = getEntry(that, key); + var prev, index; + // change existing entry + if (entry) { + entry.v = value; + // create new entry + } else { + that._l = entry = { + i: index = fastKey(key, true), // <- index + k: key, // <- key + v: value, // <- value + p: prev = that._l, // <- previous entry + n: undefined, // <- next entry + r: false // <- removed + }; + if (!that._f) that._f = entry; + if (prev) prev.n = entry; + that[SIZE]++; + // add to index + if (index !== 'F') that._i[index] = entry; + } return that; + }, + getEntry: getEntry, + setStrong: function (C, NAME, IS_MAP) { + // add .keys, .values, .entries, [@@iterator] + // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11 + _iterDefine(C, NAME, function (iterated, kind) { + this._t = _validateCollection(iterated, NAME); // target + this._k = kind; // kind + this._l = undefined; // previous + }, function () { + var that = this; + var kind = that._k; + var entry = that._l; + // revert to the last existing entry + while (entry && entry.r) entry = entry.p; + // get next entry + if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) { + // or finish the iteration + that._t = undefined; + return _iterStep(1); + } + // return step by kind + if (kind == 'keys') return _iterStep(0, entry.k); + if (kind == 'values') return _iterStep(0, entry.v); + return _iterStep(0, [entry.k, entry.v]); + }, IS_MAP ? 'entries' : 'values', !IS_MAP, true); + + // add [@@species], 23.1.2.2, 23.2.2.2 + _setSpecies(NAME); + } + }; + + // 7.2.2 IsArray(argument) + + var _isArray = Array.isArray || function isArray(arg) { + return _cof(arg) == 'Array'; + }; + + var SPECIES$2 = _wks('species'); + + var _arraySpeciesConstructor = function (original) { + var C; + if (_isArray(original)) { + C = original.constructor; + // cross-realm fallback + if (typeof C == 'function' && (C === Array || _isArray(C.prototype))) C = undefined; + if (_isObject(C)) { + C = C[SPECIES$2]; + if (C === null) C = undefined; + } + } return C === undefined ? Array : C; + }; + + // 9.4.2.3 ArraySpeciesCreate(originalArray, length) + + + var _arraySpeciesCreate = function (original, length) { + return new (_arraySpeciesConstructor(original))(length); + }; + + // 0 -> Array#forEach + // 1 -> Array#map + // 2 -> Array#filter + // 3 -> Array#some + // 4 -> Array#every + // 5 -> Array#find + // 6 -> Array#findIndex + + + + + + var _arrayMethods = function (TYPE, $create) { + var IS_MAP = TYPE == 1; + var IS_FILTER = TYPE == 2; + var IS_SOME = TYPE == 3; + var IS_EVERY = TYPE == 4; + var IS_FIND_INDEX = TYPE == 6; + var NO_HOLES = TYPE == 5 || IS_FIND_INDEX; + var create = $create || _arraySpeciesCreate; + return function ($this, callbackfn, that) { + var O = _toObject($this); + var self = _iobject(O); + var f = _ctx(callbackfn, that, 3); + var length = _toLength(self.length); + var index = 0; + var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined; + var val, res; + for (;length > index; index++) if (NO_HOLES || index in self) { + val = self[index]; + res = f(val, index, O); + if (TYPE) { + if (IS_MAP) result[index] = res; // map + else if (res) switch (TYPE) { + case 3: return true; // some + case 5: return val; // find + case 6: return index; // findIndex + case 2: result.push(val); // filter + } else if (IS_EVERY) return false; // every + } + } + return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result; + }; + }; + + var dP$2 = _objectDp.f; + var each = _arrayMethods(0); + + + var _collection = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) { + var Base = _global[NAME]; + var C = Base; + var ADDER = IS_MAP ? 'set' : 'add'; + var proto = C && C.prototype; + var O = {}; + if (!_descriptors || typeof C != 'function' || !(IS_WEAK || proto.forEach && !_fails(function () { + new C().entries().next(); + }))) { + // create collection constructor + C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER); + _redefineAll(C.prototype, methods); + _meta.NEED = true; + } else { + C = wrapper(function (target, iterable) { + _anInstance(target, C, NAME, '_c'); + target._c = new Base(); + if (iterable != undefined) _forOf(iterable, IS_MAP, target[ADDER], target); + }); + each('add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON'.split(','), function (KEY) { + var IS_ADDER = KEY == 'add' || KEY == 'set'; + if (KEY in proto && !(IS_WEAK && KEY == 'clear')) _hide(C.prototype, KEY, function (a, b) { + _anInstance(this, C, KEY); + if (!IS_ADDER && IS_WEAK && !_isObject(a)) return KEY == 'get' ? undefined : false; + var result = this._c[KEY](a === 0 ? 0 : a, b); + return IS_ADDER ? this : result; + }); + }); + IS_WEAK || dP$2(C.prototype, 'size', { + get: function () { + return this._c.size; + } + }); + } + + _setToStringTag(C, NAME); + + O[NAME] = C; + _export(_export.G + _export.W + _export.F, O); + + if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP); + + return C; + }; + + var SET = 'Set'; + + // 23.2 Set Objects + var es6_set = _collection(SET, function (get) { + return function Set() { return get(this, arguments.length > 0 ? arguments[0] : undefined); }; + }, { + // 23.2.3.1 Set.prototype.add(value) + add: function add(value) { + return _collectionStrong.def(_validateCollection(this, SET), value = value === 0 ? 0 : value, value); + } + }, _collectionStrong); + + var _arrayFromIterable = function (iter, ITERATOR) { + var result = []; + _forOf(iter, false, result.push, result, ITERATOR); + return result; + }; + + // https://github.com/DavidBruant/Map-Set.prototype.toJSON + + + var _collectionToJson = function (NAME) { + return function toJSON() { + if (_classof(this) != NAME) throw TypeError(NAME + "#toJSON isn't generic"); + return _arrayFromIterable(this); + }; + }; + + // https://github.com/DavidBruant/Map-Set.prototype.toJSON + + + _export(_export.P + _export.R, 'Set', { toJSON: _collectionToJson('Set') }); + + // https://tc39.github.io/proposal-setmap-offrom/ + + + var _setCollectionOf = function (COLLECTION) { + _export(_export.S, COLLECTION, { of: function of() { + var length = arguments.length; + var A = Array(length); + while (length--) A[length] = arguments[length]; + return new this(A); + } }); + }; + + // https://tc39.github.io/proposal-setmap-offrom/#sec-set.of + _setCollectionOf('Set'); + + // https://tc39.github.io/proposal-setmap-offrom/ + + + + + + var _setCollectionFrom = function (COLLECTION) { + _export(_export.S, COLLECTION, { from: function from(source /* , mapFn, thisArg */) { + var mapFn = arguments[1]; + var mapping, A, n, cb; + _aFunction(this); + mapping = mapFn !== undefined; + if (mapping) _aFunction(mapFn); + if (source == undefined) return new this(); + A = []; + if (mapping) { + n = 0; + cb = _ctx(mapFn, arguments[2], 2); + _forOf(source, false, function (nextItem) { + A.push(cb(nextItem, n++)); + }); + } else { + _forOf(source, false, A.push, A); + } + return new this(A); + } }); + }; + + // https://tc39.github.io/proposal-setmap-offrom/#sec-set.from + _setCollectionFrom('Set'); + + var set$1 = _core.Set; + + var set = createCommonjsModule(function (module) { + module.exports = { "default": set$1, __esModule: true }; + }); + + var _Set = unwrapExports(set); + + var f$2 = Object.getOwnPropertySymbols; + + var _objectGops = { + f: f$2 + }; + + var f$3 = {}.propertyIsEnumerable; + + var _objectPie = { + f: f$3 + }; + + // 19.1.2.1 Object.assign(target, source, ...) + + + + + + var $assign = Object.assign; + + // should work with symbols and should have deterministic property order (V8 bug) + var _objectAssign = !$assign || _fails(function () { + var A = {}; + var B = {}; + // eslint-disable-next-line no-undef + var S = Symbol(); + var K = 'abcdefghijklmnopqrst'; + A[S] = 7; + K.split('').forEach(function (k) { B[k] = k; }); + return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; + }) ? function assign(target, source) { // eslint-disable-line no-unused-vars + var T = _toObject(target); + var aLen = arguments.length; + var index = 1; + var getSymbols = _objectGops.f; + var isEnum = _objectPie.f; + while (aLen > index) { + var S = _iobject(arguments[index++]); + var keys = getSymbols ? _objectKeys(S).concat(getSymbols(S)) : _objectKeys(S); + var length = keys.length; + var j = 0; + var key; + while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key]; + } return T; + } : $assign; + + // 19.1.3.1 Object.assign(target, source) + + + _export(_export.S + _export.F, 'Object', { assign: _objectAssign }); + + var assign$1 = _core.Object.assign; + + var assign = createCommonjsModule(function (module) { + module.exports = { "default": assign$1, __esModule: true }; + }); + + var _Object$assign = unwrapExports(assign); + + var classCallCheck = createCommonjsModule(function (module, exports) { + "use strict"; + + exports.__esModule = true; + + exports.default = function (instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } + }; + }); + + var _classCallCheck = unwrapExports(classCallCheck); + + var f$4 = _wks; + + var _wksExt = { + f: f$4 + }; + + var iterator$2 = _wksExt.f('iterator'); + + var iterator = createCommonjsModule(function (module) { + module.exports = { "default": iterator$2, __esModule: true }; + }); + + var defineProperty = _objectDp.f; + var _wksDefine = function (name) { + var $Symbol = _core.Symbol || (_core.Symbol = _library ? {} : _global.Symbol || {}); + if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: _wksExt.f(name) }); + }; + + // all enumerable object keys, includes symbols + + + + var _enumKeys = function (it) { + var result = _objectKeys(it); + var getSymbols = _objectGops.f; + if (getSymbols) { + var symbols = getSymbols(it); + var isEnum = _objectPie.f; + var i = 0; + var key; + while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key); + } return result; + }; + + // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) + + var hiddenKeys = _enumBugKeys.concat('length', 'prototype'); + + var f$6 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { + return _objectKeysInternal(O, hiddenKeys); + }; + + var _objectGopn = { + f: f$6 + }; + + // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window + + var gOPN$1 = _objectGopn.f; + var toString$1 = {}.toString; + + var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames + ? Object.getOwnPropertyNames(window) : []; + + var getWindowNames = function (it) { + try { + return gOPN$1(it); + } catch (e) { + return windowNames.slice(); + } + }; + + var f$5 = function getOwnPropertyNames(it) { + return windowNames && toString$1.call(it) == '[object Window]' ? getWindowNames(it) : gOPN$1(_toIobject(it)); + }; + + var _objectGopnExt = { + f: f$5 + }; + + var gOPD$1 = Object.getOwnPropertyDescriptor; + + var f$7 = _descriptors ? gOPD$1 : function getOwnPropertyDescriptor(O, P) { + O = _toIobject(O); + P = _toPrimitive(P, true); + if (_ie8DomDefine) try { + return gOPD$1(O, P); + } catch (e) { /* empty */ } + if (_has(O, P)) return _propertyDesc(!_objectPie.f.call(O, P), O[P]); + }; + + var _objectGopd = { + f: f$7 + }; + + // ECMAScript 6 symbols shim + + + + + + var META = _meta.KEY; + + + + + + + + + + + + + + + + + + + var gOPD = _objectGopd.f; + var dP$3 = _objectDp.f; + var gOPN = _objectGopnExt.f; + var $Symbol = _global.Symbol; + var $JSON = _global.JSON; + var _stringify = $JSON && $JSON.stringify; + var PROTOTYPE$2 = 'prototype'; + var HIDDEN = _wks('_hidden'); + var TO_PRIMITIVE = _wks('toPrimitive'); + var isEnum = {}.propertyIsEnumerable; + var SymbolRegistry = _shared('symbol-registry'); + var AllSymbols = _shared('symbols'); + var OPSymbols = _shared('op-symbols'); + var ObjectProto$1 = Object[PROTOTYPE$2]; + var USE_NATIVE$1 = typeof $Symbol == 'function'; + var QObject = _global.QObject; + // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 + var setter = !QObject || !QObject[PROTOTYPE$2] || !QObject[PROTOTYPE$2].findChild; + + // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 + var setSymbolDesc = _descriptors && _fails(function () { + return _objectCreate(dP$3({}, 'a', { + get: function () { return dP$3(this, 'a', { value: 7 }).a; } + })).a != 7; + }) ? function (it, key, D) { + var protoDesc = gOPD(ObjectProto$1, key); + if (protoDesc) delete ObjectProto$1[key]; + dP$3(it, key, D); + if (protoDesc && it !== ObjectProto$1) dP$3(ObjectProto$1, key, protoDesc); + } : dP$3; + + var wrap = function (tag) { + var sym = AllSymbols[tag] = _objectCreate($Symbol[PROTOTYPE$2]); + sym._k = tag; + return sym; + }; + + var isSymbol = USE_NATIVE$1 && typeof $Symbol.iterator == 'symbol' ? function (it) { + return typeof it == 'symbol'; + } : function (it) { + return it instanceof $Symbol; + }; + + var $defineProperty = function defineProperty(it, key, D) { + if (it === ObjectProto$1) $defineProperty(OPSymbols, key, D); + _anObject(it); + key = _toPrimitive(key, true); + _anObject(D); + if (_has(AllSymbols, key)) { + if (!D.enumerable) { + if (!_has(it, HIDDEN)) dP$3(it, HIDDEN, _propertyDesc(1, {})); + it[HIDDEN][key] = true; + } else { + if (_has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false; + D = _objectCreate(D, { enumerable: _propertyDesc(0, false) }); + } return setSymbolDesc(it, key, D); + } return dP$3(it, key, D); + }; + var $defineProperties = function defineProperties(it, P) { + _anObject(it); + var keys = _enumKeys(P = _toIobject(P)); + var i = 0; + var l = keys.length; + var key; + while (l > i) $defineProperty(it, key = keys[i++], P[key]); + return it; + }; + var $create = function create(it, P) { + return P === undefined ? _objectCreate(it) : $defineProperties(_objectCreate(it), P); + }; + var $propertyIsEnumerable = function propertyIsEnumerable(key) { + var E = isEnum.call(this, key = _toPrimitive(key, true)); + if (this === ObjectProto$1 && _has(AllSymbols, key) && !_has(OPSymbols, key)) return false; + return E || !_has(this, key) || !_has(AllSymbols, key) || _has(this, HIDDEN) && this[HIDDEN][key] ? E : true; + }; + var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) { + it = _toIobject(it); + key = _toPrimitive(key, true); + if (it === ObjectProto$1 && _has(AllSymbols, key) && !_has(OPSymbols, key)) return; + var D = gOPD(it, key); + if (D && _has(AllSymbols, key) && !(_has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true; + return D; + }; + var $getOwnPropertyNames = function getOwnPropertyNames(it) { + var names = gOPN(_toIobject(it)); + var result = []; + var i = 0; + var key; + while (names.length > i) { + if (!_has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key); + } return result; + }; + var $getOwnPropertySymbols = function getOwnPropertySymbols(it) { + var IS_OP = it === ObjectProto$1; + var names = gOPN(IS_OP ? OPSymbols : _toIobject(it)); + var result = []; + var i = 0; + var key; + while (names.length > i) { + if (_has(AllSymbols, key = names[i++]) && (IS_OP ? _has(ObjectProto$1, key) : true)) result.push(AllSymbols[key]); + } return result; + }; + + // 19.4.1.1 Symbol([description]) + if (!USE_NATIVE$1) { + $Symbol = function Symbol() { + if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!'); + var tag = _uid(arguments.length > 0 ? arguments[0] : undefined); + var $set = function (value) { + if (this === ObjectProto$1) $set.call(OPSymbols, value); + if (_has(this, HIDDEN) && _has(this[HIDDEN], tag)) this[HIDDEN][tag] = false; + setSymbolDesc(this, tag, _propertyDesc(1, value)); + }; + if (_descriptors && setter) setSymbolDesc(ObjectProto$1, tag, { configurable: true, set: $set }); + return wrap(tag); + }; + _redefine($Symbol[PROTOTYPE$2], 'toString', function toString() { + return this._k; + }); + + _objectGopd.f = $getOwnPropertyDescriptor; + _objectDp.f = $defineProperty; + _objectGopn.f = _objectGopnExt.f = $getOwnPropertyNames; + _objectPie.f = $propertyIsEnumerable; + _objectGops.f = $getOwnPropertySymbols; + + if (_descriptors && !_library) { + _redefine(ObjectProto$1, 'propertyIsEnumerable', $propertyIsEnumerable, true); + } + + _wksExt.f = function (name) { + return wrap(_wks(name)); + }; + } + + _export(_export.G + _export.W + _export.F * !USE_NATIVE$1, { Symbol: $Symbol }); + + for (var es6Symbols = ( + // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 + 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables' + ).split(','), j = 0; es6Symbols.length > j;)_wks(es6Symbols[j++]); + + for (var wellKnownSymbols = _objectKeys(_wks.store), k = 0; wellKnownSymbols.length > k;) _wksDefine(wellKnownSymbols[k++]); + + _export(_export.S + _export.F * !USE_NATIVE$1, 'Symbol', { + // 19.4.2.1 Symbol.for(key) + 'for': function (key) { + return _has(SymbolRegistry, key += '') + ? SymbolRegistry[key] + : SymbolRegistry[key] = $Symbol(key); + }, + // 19.4.2.5 Symbol.keyFor(sym) + keyFor: function keyFor(sym) { + if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!'); + for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key; + }, + useSetter: function () { setter = true; }, + useSimple: function () { setter = false; } + }); + + _export(_export.S + _export.F * !USE_NATIVE$1, 'Object', { + // 19.1.2.2 Object.create(O [, Properties]) + create: $create, + // 19.1.2.4 Object.defineProperty(O, P, Attributes) + defineProperty: $defineProperty, + // 19.1.2.3 Object.defineProperties(O, Properties) + defineProperties: $defineProperties, + // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) + getOwnPropertyDescriptor: $getOwnPropertyDescriptor, + // 19.1.2.7 Object.getOwnPropertyNames(O) + getOwnPropertyNames: $getOwnPropertyNames, + // 19.1.2.8 Object.getOwnPropertySymbols(O) + getOwnPropertySymbols: $getOwnPropertySymbols + }); + + // 24.3.2 JSON.stringify(value [, replacer [, space]]) + $JSON && _export(_export.S + _export.F * (!USE_NATIVE$1 || _fails(function () { + var S = $Symbol(); + // MS Edge converts symbol values to JSON as {} + // WebKit converts symbol values to JSON as null + // V8 throws on boxed symbols + return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}'; + })), 'JSON', { + stringify: function stringify(it) { + if (it === undefined || isSymbol(it)) return; // IE8 returns string on undefined + var args = [it]; + var i = 1; + var replacer, $replacer; + while (arguments.length > i) args.push(arguments[i++]); + replacer = args[1]; + if (typeof replacer == 'function') $replacer = replacer; + if ($replacer || !_isArray(replacer)) replacer = function (key, value) { + if ($replacer) value = $replacer.call(this, key, value); + if (!isSymbol(value)) return value; + }; + args[1] = replacer; + return _stringify.apply($JSON, args); + } + }); + + // 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) + $Symbol[PROTOTYPE$2][TO_PRIMITIVE] || _hide($Symbol[PROTOTYPE$2], TO_PRIMITIVE, $Symbol[PROTOTYPE$2].valueOf); + // 19.4.3.5 Symbol.prototype[@@toStringTag] + _setToStringTag($Symbol, 'Symbol'); + // 20.2.1.9 Math[@@toStringTag] + _setToStringTag(Math, 'Math', true); + // 24.3.3 JSON[@@toStringTag] + _setToStringTag(_global.JSON, 'JSON', true); + + _wksDefine('asyncIterator'); + + _wksDefine('observable'); + + var symbol$1 = _core.Symbol; + + var symbol = createCommonjsModule(function (module) { + module.exports = { "default": symbol$1, __esModule: true }; + }); + + var _Symbol = unwrapExports(symbol); + + var _typeof_1 = createCommonjsModule(function (module, exports) { + "use strict"; + + exports.__esModule = true; + + + + var _iterator2 = _interopRequireDefault(iterator); + + + + var _symbol2 = _interopRequireDefault(symbol); + + var _typeof = typeof _symbol2.default === "function" && typeof _iterator2.default === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj; }; + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + exports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.default) === "symbol" ? function (obj) { + return typeof obj === "undefined" ? "undefined" : _typeof(obj); + } : function (obj) { + return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof(obj); + }; + }); + + var _typeof = unwrapExports(_typeof_1); + + var possibleConstructorReturn = createCommonjsModule(function (module, exports) { + "use strict"; + + exports.__esModule = true; + + + + var _typeof3 = _interopRequireDefault(_typeof_1); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + exports.default = function (self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return call && ((typeof call === "undefined" ? "undefined" : (0, _typeof3.default)(call)) === "object" || typeof call === "function") ? call : self; + }; + }); + + var _possibleConstructorReturn = unwrapExports(possibleConstructorReturn); + + // Works with __proto__ only. Old v8 can't work with null proto objects. + /* eslint-disable no-proto */ + + + var check = function (O, proto) { + _anObject(O); + if (!_isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!"); + }; + var _setProto = { + set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line + function (test, buggy, set) { + try { + set = _ctx(Function.call, _objectGopd.f(Object.prototype, '__proto__').set, 2); + set(test, []); + buggy = !(test instanceof Array); + } catch (e) { buggy = true; } + return function setPrototypeOf(O, proto) { + check(O, proto); + if (buggy) O.__proto__ = proto; + else set(O, proto); + return O; + }; + }({}, false) : undefined), + check: check + }; + + // 19.1.3.19 Object.setPrototypeOf(O, proto) + + _export(_export.S, 'Object', { setPrototypeOf: _setProto.set }); + + var setPrototypeOf$2 = _core.Object.setPrototypeOf; + + var setPrototypeOf = createCommonjsModule(function (module) { + module.exports = { "default": setPrototypeOf$2, __esModule: true }; + }); + + // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) + _export(_export.S, 'Object', { create: _objectCreate }); + + var $Object = _core.Object; + var create$2 = function create(P, D) { + return $Object.create(P, D); + }; + + var create = createCommonjsModule(function (module) { + module.exports = { "default": create$2, __esModule: true }; + }); + + var inherits = createCommonjsModule(function (module, exports) { + "use strict"; + + exports.__esModule = true; + + + + var _setPrototypeOf2 = _interopRequireDefault(setPrototypeOf); + + + + var _create2 = _interopRequireDefault(create); + + + + var _typeof3 = _interopRequireDefault(_typeof_1); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + exports.default = function (subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === "undefined" ? "undefined" : (0, _typeof3.default)(superClass))); + } + + subClass.prototype = (0, _create2.default)(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true + } + }); + if (superClass) _setPrototypeOf2.default ? (0, _setPrototypeOf2.default)(subClass, superClass) : subClass.__proto__ = superClass; + }; + }); + + var _inherits = unwrapExports(inherits); + + /** + * Helpers. + */ + + var s = 1000; + var m = s * 60; + var h = m * 60; + var d$1 = h * 24; + var y = d$1 * 365.25; + + /** + * Parse or format the given `val`. + * + * Options: + * + * - `long` verbose formatting [false] + * + * @param {String|Number} val + * @param {Object} [options] + * @throws {Error} throw an error if val is not a non-empty string or a number + * @return {String|Number} + * @api public + */ + + var ms = function(val, options) { + options = options || {}; + var type = typeof val; + if (type === 'string' && val.length > 0) { + return parse(val); + } else if (type === 'number' && isNaN(val) === false) { + return options.long ? fmtLong(val) : fmtShort(val); + } + throw new Error( + 'val is not a non-empty string or a valid number. val=' + + JSON.stringify(val) + ); + }; + + /** + * Parse the given `str` and return milliseconds. + * + * @param {String} str + * @return {Number} + * @api private + */ + + function parse(str) { + str = String(str); + if (str.length > 100) { + return; + } + var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec( + str + ); + if (!match) { + return; + } + var n = parseFloat(match[1]); + var type = (match[2] || 'ms').toLowerCase(); + switch (type) { + case 'years': + case 'year': + case 'yrs': + case 'yr': + case 'y': + return n * y; + case 'days': + case 'day': + case 'd': + return n * d$1; + case 'hours': + case 'hour': + case 'hrs': + case 'hr': + case 'h': + return n * h; + case 'minutes': + case 'minute': + case 'mins': + case 'min': + case 'm': + return n * m; + case 'seconds': + case 'second': + case 'secs': + case 'sec': + case 's': + return n * s; + case 'milliseconds': + case 'millisecond': + case 'msecs': + case 'msec': + case 'ms': + return n; + default: + return undefined; + } + } + + /** + * Short format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + + function fmtShort(ms) { + if (ms >= d$1) { + return Math.round(ms / d$1) + 'd'; + } + if (ms >= h) { + return Math.round(ms / h) + 'h'; + } + if (ms >= m) { + return Math.round(ms / m) + 'm'; + } + if (ms >= s) { + return Math.round(ms / s) + 's'; + } + return ms + 'ms'; + } + + /** + * Long format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + + function fmtLong(ms) { + return plural(ms, d$1, 'day') || + plural(ms, h, 'hour') || + plural(ms, m, 'minute') || + plural(ms, s, 'second') || + ms + ' ms'; + } + + /** + * Pluralization helper. + */ + + function plural(ms, n, name) { + if (ms < n) { + return; + } + if (ms < n * 1.5) { + return Math.floor(ms / n) + ' ' + name; + } + return Math.ceil(ms / n) + ' ' + name + 's'; + } + + var debug$1 = createCommonjsModule(function (module, exports) { + /** + * This is the common logic for both the Node.js and web browser + * implementations of `debug()`. + * + * Expose `debug()` as the module. + */ + + exports = module.exports = createDebug.debug = createDebug['default'] = createDebug; + exports.coerce = coerce; + exports.disable = disable; + exports.enable = enable; + exports.enabled = enabled; + exports.humanize = ms; + + /** + * The currently active debug mode names, and names to skip. + */ + + exports.names = []; + exports.skips = []; + + /** + * Map of special "%n" handling functions, for the debug "format" argument. + * + * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". + */ + + exports.formatters = {}; + + /** + * Previous log timestamp. + */ + + var prevTime; + + /** + * Select a color. + * @param {String} namespace + * @return {Number} + * @api private + */ + + function selectColor(namespace) { + var hash = 0, i; + + for (i in namespace) { + hash = ((hash << 5) - hash) + namespace.charCodeAt(i); + hash |= 0; // Convert to 32bit integer + } + + return exports.colors[Math.abs(hash) % exports.colors.length]; + } + + /** + * Create a debugger with the given `namespace`. + * + * @param {String} namespace + * @return {Function} + * @api public + */ + + function createDebug(namespace) { + + function debug() { + // disabled? + if (!debug.enabled) return; + + var self = debug; + + // set `diff` timestamp + var curr = +new Date(); + var ms$$1 = curr - (prevTime || curr); + self.diff = ms$$1; + self.prev = prevTime; + self.curr = curr; + prevTime = curr; + + // turn the `arguments` into a proper Array + var args = new Array(arguments.length); + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i]; + } + + args[0] = exports.coerce(args[0]); + + if ('string' !== typeof args[0]) { + // anything else let's inspect with %O + args.unshift('%O'); + } + + // apply any `formatters` transformations + var index = 0; + args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) { + // if we encounter an escaped % then don't increase the array index + if (match === '%%') return match; + index++; + var formatter = exports.formatters[format]; + if ('function' === typeof formatter) { + var val = args[index]; + match = formatter.call(self, val); + + // now we need to remove `args[index]` since it's inlined in the `format` + args.splice(index, 1); + index--; + } + return match; + }); + + // apply env-specific formatting (colors, etc.) + exports.formatArgs.call(self, args); + + var logFn = debug.log || exports.log || console.log.bind(console); + logFn.apply(self, args); + } + + debug.namespace = namespace; + debug.enabled = exports.enabled(namespace); + debug.useColors = exports.useColors(); + debug.color = selectColor(namespace); + + // env-specific initialization logic for debug instances + if ('function' === typeof exports.init) { + exports.init(debug); + } + + return debug; + } + + /** + * Enables a debug mode by namespaces. This can include modes + * separated by a colon and wildcards. + * + * @param {String} namespaces + * @api public + */ + + function enable(namespaces) { + exports.save(namespaces); + + exports.names = []; + exports.skips = []; + + var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); + var len = split.length; + + for (var i = 0; i < len; i++) { + if (!split[i]) continue; // ignore empty strings + namespaces = split[i].replace(/\*/g, '.*?'); + if (namespaces[0] === '-') { + exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); + } else { + exports.names.push(new RegExp('^' + namespaces + '$')); + } + } + } + + /** + * Disable debug output. + * + * @api public + */ + + function disable() { + exports.enable(''); + } + + /** + * Returns true if the given mode name is enabled, false otherwise. + * + * @param {String} name + * @return {Boolean} + * @api public + */ + + function enabled(name) { + var i, len; + for (i = 0, len = exports.skips.length; i < len; i++) { + if (exports.skips[i].test(name)) { + return false; + } + } + for (i = 0, len = exports.names.length; i < len; i++) { + if (exports.names[i].test(name)) { + return true; + } + } + return false; + } + + /** + * Coerce `val`. + * + * @param {Mixed} val + * @return {Mixed} + * @api private + */ + + function coerce(val) { + if (val instanceof Error) return val.stack || val.message; + return val; + } + }); + + var browser$1 = createCommonjsModule(function (module, exports) { + /** + * This is the web browser implementation of `debug()`. + * + * Expose `debug()` as the module. + */ + + exports = module.exports = debug$1; + exports.log = log; + exports.formatArgs = formatArgs; + exports.save = save; + exports.load = load; + exports.useColors = useColors; + exports.storage = 'undefined' != typeof chrome + && 'undefined' != typeof chrome.storage + ? chrome.storage.local + : localstorage(); + + /** + * Colors. + */ + + exports.colors = [ + 'lightseagreen', + 'forestgreen', + 'goldenrod', + 'dodgerblue', + 'darkorchid', + 'crimson' + ]; + + /** + * Currently only WebKit-based Web Inspectors, Firefox >= v31, + * and the Firebug extension (any Firefox version) are known + * to support "%c" CSS customizations. + * + * TODO: add a `localStorage` variable to explicitly enable/disable colors + */ + + function useColors() { + // NB: In an Electron preload script, document will be defined but not fully + // initialized. Since we know we're in Chrome, we'll just detect this case + // explicitly + if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') { + return true; + } + + // is webkit? http://stackoverflow.com/a/16459606/376773 + // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 + return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) || + // is firebug? http://stackoverflow.com/a/398120/376773 + (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) || + // is firefox >= v31? + // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages + (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) || + // double check webkit in userAgent just in case we are in a worker + (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); + } + + /** + * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. + */ + + exports.formatters.j = function(v) { + try { + return JSON.stringify(v); + } catch (err) { + return '[UnexpectedJSONParseError]: ' + err.message; + } + }; + + + /** + * Colorize log arguments if enabled. + * + * @api public + */ + + function formatArgs(args) { + var useColors = this.useColors; + + args[0] = (useColors ? '%c' : '') + + this.namespace + + (useColors ? ' %c' : ' ') + + args[0] + + (useColors ? '%c ' : ' ') + + '+' + exports.humanize(this.diff); + + if (!useColors) return; + + var c = 'color: ' + this.color; + args.splice(1, 0, c, 'color: inherit'); + + // the final "%c" is somewhat tricky, because there could be other + // arguments passed either before or after the %c, so we need to + // figure out the correct index to insert the CSS into + var index = 0; + var lastC = 0; + args[0].replace(/%[a-zA-Z%]/g, function(match) { + if ('%%' === match) return; + index++; + if ('%c' === match) { + // we only are interested in the *last* %c + // (the user may have provided their own) + lastC = index; + } + }); + + args.splice(lastC, 0, c); + } + + /** + * Invokes `console.log()` when available. + * No-op when `console.log` is not a "function". + * + * @api public + */ + + function log() { + // this hackery is required for IE8/9, where + // the `console.log` function doesn't have 'apply' + return 'object' === typeof console + && console.log + && Function.prototype.apply.call(console.log, console, arguments); + } + + /** + * Save `namespaces`. + * + * @param {String} namespaces + * @api private + */ + + function save(namespaces) { + try { + if (null == namespaces) { + exports.storage.removeItem('debug'); + } else { + exports.storage.debug = namespaces; + } + } catch(e) {} + } + + /** + * Load `namespaces`. + * + * @return {String} returns the previously persisted debug modes + * @api private + */ + + function load() { + var r; + try { + r = exports.storage.debug; + } catch(e) {} + + // If debug isn't set in LS, and we're in Electron, try to load $DEBUG + if (!r && typeof process !== 'undefined' && 'env' in process) { + r = process.env.DEBUG; + } + + return r; + } + + /** + * Enable namespaces listed in `localStorage.debug` initially. + */ + + exports.enable(load()); + + /** + * Localstorage attempts to return the localstorage. + * + * This is necessary because safari throws + * when a user disables cookies/localstorage + * and you attempt to access it. + * + * @return {LocalStorage} + * @api private + */ + + function localstorage() { + try { + return window.localStorage; + } catch (e) {} + } + }); + + var bind = function bind(fn, thisArg) { + return function wrap() { + var args = new Array(arguments.length); + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i]; + } + return fn.apply(thisArg, args); + }; + }; + + /*! + * Determine if an object is a Buffer + * + * @author Feross Aboukhadijeh + * @license MIT + */ + + // The _isBuffer check is for Safari 5-7 support, because it's missing + // Object.prototype.constructor. Remove this eventually + var isBuffer_1 = function (obj) { + return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer) + }; + + function isBuffer (obj) { + return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj) + } + + // For Node v0.10 support. Remove this eventually. + function isSlowBuffer (obj) { + return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0)) + } + + /*global toString:true*/ + + // utils is a library of generic helper functions non-specific to axios + + var toString$2 = Object.prototype.toString; + + /** + * Determine if a value is an Array + * + * @param {Object} val The value to test + * @returns {boolean} True if value is an Array, otherwise false + */ + function isArray$1(val) { + return toString$2.call(val) === '[object Array]'; + } + + /** + * Determine if a value is an ArrayBuffer + * + * @param {Object} val The value to test + * @returns {boolean} True if value is an ArrayBuffer, otherwise false + */ + function isArrayBuffer(val) { + return toString$2.call(val) === '[object ArrayBuffer]'; + } + + /** + * Determine if a value is a FormData + * + * @param {Object} val The value to test + * @returns {boolean} True if value is an FormData, otherwise false + */ + function isFormData(val) { + return typeof FormData !== 'undefined' && val instanceof FormData; + } + + /** + * Determine if a value is a view on an ArrayBuffer + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false + */ + function isArrayBufferView(val) { + var result; + if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) { + result = ArrayBuffer.isView(val); + } else { + result = val && val.buffer && val.buffer instanceof ArrayBuffer; + } + return result; + } + + /** + * Determine if a value is a String + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a String, otherwise false + */ + function isString(val) { + return typeof val === 'string'; + } + + /** + * Determine if a value is a Number + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Number, otherwise false + */ + function isNumber(val) { + return typeof val === 'number'; + } + + /** + * Determine if a value is undefined + * + * @param {Object} val The value to test + * @returns {boolean} True if the value is undefined, otherwise false + */ + function isUndefined(val) { + return typeof val === 'undefined'; + } + + /** + * Determine if a value is an Object + * + * @param {Object} val The value to test + * @returns {boolean} True if value is an Object, otherwise false + */ + function isObject$1(val) { + return val !== null && (typeof val === 'undefined' ? 'undefined' : _typeof(val)) === 'object'; + } + + /** + * Determine if a value is a Date + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Date, otherwise false + */ + function isDate(val) { + return toString$2.call(val) === '[object Date]'; + } + + /** + * Determine if a value is a File + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a File, otherwise false + */ + function isFile(val) { + return toString$2.call(val) === '[object File]'; + } + + /** + * Determine if a value is a Blob + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Blob, otherwise false + */ + function isBlob(val) { + return toString$2.call(val) === '[object Blob]'; + } + + /** + * Determine if a value is a Function + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Function, otherwise false + */ + function isFunction(val) { + return toString$2.call(val) === '[object Function]'; + } + + /** + * Determine if a value is a Stream + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Stream, otherwise false + */ + function isStream(val) { + return isObject$1(val) && isFunction(val.pipe); + } + + /** + * Determine if a value is a URLSearchParams object + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a URLSearchParams object, otherwise false + */ + function isURLSearchParams(val) { + return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams; + } + + /** + * Trim excess whitespace off the beginning and end of a string + * + * @param {String} str The String to trim + * @returns {String} The String freed of excess whitespace + */ + function trim(str) { + return str.replace(/^\s*/, '').replace(/\s*$/, ''); + } + + /** + * Determine if we're running in a standard browser environment + * + * This allows axios to run in a web worker, and react-native. + * Both environments support XMLHttpRequest, but not fully standard globals. + * + * web workers: + * typeof window -> undefined + * typeof document -> undefined + * + * react-native: + * navigator.product -> 'ReactNative' + */ + function isStandardBrowserEnv() { + if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') { + return false; + } + return typeof window !== 'undefined' && typeof document !== 'undefined'; + } + + /** + * Iterate over an Array or an Object invoking a function for each item. + * + * If `obj` is an Array callback will be called passing + * the value, index, and complete array for each item. + * + * If 'obj' is an Object callback will be called passing + * the value, key, and complete object for each property. + * + * @param {Object|Array} obj The object to iterate + * @param {Function} fn The callback to invoke for each item + */ + function forEach(obj, fn) { + // Don't bother if no value provided + if (obj === null || typeof obj === 'undefined') { + return; + } + + // Force an array if not already something iterable + if ((typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) !== 'object' && !isArray$1(obj)) { + /*eslint no-param-reassign:0*/ + obj = [obj]; + } + + if (isArray$1(obj)) { + // Iterate over array values + for (var i = 0, l = obj.length; i < l; i++) { + fn.call(null, obj[i], i, obj); + } + } else { + // Iterate over object keys + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + fn.call(null, obj[key], key, obj); + } + } + } + } + + /** + * Accepts varargs expecting each argument to be an object, then + * immutably merges the properties of each object and returns result. + * + * When multiple objects contain the same key the later object in + * the arguments list will take precedence. + * + * Example: + * + * ```js + * var result = merge({foo: 123}, {foo: 456}); + * console.log(result.foo); // outputs 456 + * ``` + * + * @param {Object} obj1 Object to merge + * @returns {Object} Result of all merge properties + */ + function merge() /* obj1, obj2, obj3, ... */{ + var result = {}; + function assignValue(val, key) { + if (_typeof(result[key]) === 'object' && (typeof val === 'undefined' ? 'undefined' : _typeof(val)) === 'object') { + result[key] = merge(result[key], val); + } else { + result[key] = val; + } + } + + for (var i = 0, l = arguments.length; i < l; i++) { + forEach(arguments[i], assignValue); + } + return result; + } + + /** + * Extends object a by mutably adding to it the properties of object b. + * + * @param {Object} a The object to be extended + * @param {Object} b The object to copy properties from + * @param {Object} thisArg The object to bind function to + * @return {Object} The resulting value of object a + */ + function extend(a, b, thisArg) { + forEach(b, function assignValue(val, key) { + if (thisArg && typeof val === 'function') { + a[key] = bind(val, thisArg); + } else { + a[key] = val; + } + }); + return a; + } + + var utils = { + isArray: isArray$1, + isArrayBuffer: isArrayBuffer, + isBuffer: isBuffer_1, + isFormData: isFormData, + isArrayBufferView: isArrayBufferView, + isString: isString, + isNumber: isNumber, + isObject: isObject$1, + isUndefined: isUndefined, + isDate: isDate, + isFile: isFile, + isBlob: isBlob, + isFunction: isFunction, + isStream: isStream, + isURLSearchParams: isURLSearchParams, + isStandardBrowserEnv: isStandardBrowserEnv, + forEach: forEach, + merge: merge, + extend: extend, + trim: trim + }; + + var $JSON$1 = _core.JSON || (_core.JSON = { stringify: JSON.stringify }); + var stringify$1 = function stringify(it) { // eslint-disable-line no-unused-vars + return $JSON$1.stringify.apply($JSON$1, arguments); + }; + + var stringify = createCommonjsModule(function (module) { + module.exports = { "default": stringify$1, __esModule: true }; + }); + + var _JSON$stringify = unwrapExports(stringify); + + var normalizeHeaderName = function normalizeHeaderName(headers, normalizedName) { + utils.forEach(headers, function processHeader(value, name) { + if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) { + headers[normalizedName] = value; + delete headers[name]; + } + }); + }; + + /** + * Update an Error with the specified config, error code, and response. + * + * @param {Error} error The error to update. + * @param {Object} config The config. + * @param {string} [code] The error code (for example, 'ECONNABORTED'). + * @param {Object} [request] The request. + * @param {Object} [response] The response. + * @returns {Error} The error. + */ + + var enhanceError = function enhanceError(error, config, code, request, response) { + error.config = config; + if (code) { + error.code = code; + } + error.request = request; + error.response = response; + return error; + }; + + /** + * Create an Error with the specified message, config, error code, request and response. + * + * @param {string} message The error message. + * @param {Object} config The config. + * @param {string} [code] The error code (for example, 'ECONNABORTED'). + * @param {Object} [request] The request. + * @param {Object} [response] The response. + * @returns {Error} The created error. + */ + var createError = function createError(message, config, code, request, response) { + var error = new Error(message); + return enhanceError(error, config, code, request, response); + }; + + /** + * Resolve or reject a Promise based on response status. + * + * @param {Function} resolve A function that resolves the promise. + * @param {Function} reject A function that rejects the promise. + * @param {object} response The response. + */ + var settle = function settle(resolve, reject, response) { + var validateStatus = response.config.validateStatus; + // Note: status is not exposed by XDomainRequest + if (!response.status || !validateStatus || validateStatus(response.status)) { + resolve(response); + } else { + reject(createError('Request failed with status code ' + response.status, response.config, null, response.request, response)); + } + }; + + function encode(val) { + return encodeURIComponent(val).replace(/%40/gi, '@').replace(/%3A/gi, ':').replace(/%24/g, '$').replace(/%2C/gi, ',').replace(/%20/g, '+').replace(/%5B/gi, '[').replace(/%5D/gi, ']'); + } + + /** + * Build a URL by appending params to the end + * + * @param {string} url The base of the url (e.g., http://www.google.com) + * @param {object} [params] The params to be appended + * @returns {string} The formatted url + */ + var buildURL = function buildURL(url, params, paramsSerializer) { + /*eslint no-param-reassign:0*/ + if (!params) { + return url; + } + + var serializedParams; + if (paramsSerializer) { + serializedParams = paramsSerializer(params); + } else if (utils.isURLSearchParams(params)) { + serializedParams = params.toString(); + } else { + var parts = []; + + utils.forEach(params, function serialize(val, key) { + if (val === null || typeof val === 'undefined') { + return; + } + + if (utils.isArray(val)) { + key = key + '[]'; + } + + if (!utils.isArray(val)) { + val = [val]; + } + + utils.forEach(val, function parseValue(v) { + if (utils.isDate(v)) { + v = v.toISOString(); + } else if (utils.isObject(v)) { + v = _JSON$stringify(v); + } + parts.push(encode(key) + '=' + encode(v)); + }); + }); + + serializedParams = parts.join('&'); + } + + if (serializedParams) { + url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams; + } + + return url; + }; + + /** + * Parse headers into an object + * + * ``` + * Date: Wed, 27 Aug 2014 08:58:49 GMT + * Content-Type: application/json + * Connection: keep-alive + * Transfer-Encoding: chunked + * ``` + * + * @param {String} headers Headers needing to be parsed + * @returns {Object} Headers parsed into an object + */ + var parseHeaders = function parseHeaders(headers) { + var parsed = {}; + var key; + var val; + var i; + + if (!headers) { + return parsed; + } + + utils.forEach(headers.split('\n'), function parser(line) { + i = line.indexOf(':'); + key = utils.trim(line.substr(0, i)).toLowerCase(); + val = utils.trim(line.substr(i + 1)); + + if (key) { + parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val; + } + }); + + return parsed; + }; + + var isURLSameOrigin = utils.isStandardBrowserEnv() ? + + // Standard browser envs have full support of the APIs needed to test + // whether the request URL is of the same origin as current location. + function standardBrowserEnv() { + var msie = /(msie|trident)/i.test(navigator.userAgent); + var urlParsingNode = document.createElement('a'); + var originURL; + + /** + * Parse a URL to discover it's components + * + * @param {String} url The URL to be parsed + * @returns {Object} + */ + function resolveURL(url) { + var href = url; + + if (msie) { + // IE needs attribute set twice to normalize properties + urlParsingNode.setAttribute('href', href); + href = urlParsingNode.href; + } + + urlParsingNode.setAttribute('href', href); + + // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils + return { + href: urlParsingNode.href, + protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '', + host: urlParsingNode.host, + search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '', + hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '', + hostname: urlParsingNode.hostname, + port: urlParsingNode.port, + pathname: urlParsingNode.pathname.charAt(0) === '/' ? urlParsingNode.pathname : '/' + urlParsingNode.pathname + }; + } + + originURL = resolveURL(window.location.href); + + /** + * Determine if a URL shares the same origin as the current location + * + * @param {String} requestURL The URL to test + * @returns {boolean} True if URL shares the same origin, otherwise false + */ + return function isURLSameOrigin(requestURL) { + var parsed = utils.isString(requestURL) ? resolveURL(requestURL) : requestURL; + return parsed.protocol === originURL.protocol && parsed.host === originURL.host; + }; + }() : + + // Non standard browser envs (web workers, react-native) lack needed support. + function nonStandardBrowserEnv() { + return function isURLSameOrigin() { + return true; + }; + }(); + + // btoa polyfill for IE<10 courtesy https://github.com/davidchambers/Base64.js + + var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; + + function E() { + this.message = 'String contains an invalid character'; + } + E.prototype = new Error(); + E.prototype.code = 5; + E.prototype.name = 'InvalidCharacterError'; + + function btoa$1(input) { + var str = String(input); + var output = ''; + for ( + // initialize result and counter + var block, charCode, idx = 0, map = chars; + // if the next str index does not exist: + // change the mapping table to "=" + // check if d has no fractional digits + str.charAt(idx | 0) || (map = '=', idx % 1); + // "8 - idx % 1 * 8" generates the sequence 2, 4, 6, 8 + output += map.charAt(63 & block >> 8 - idx % 1 * 8)) { + charCode = str.charCodeAt(idx += 3 / 4); + if (charCode > 0xFF) { + throw new E(); + } + block = block << 8 | charCode; + } + return output; + } + + var btoa_1 = btoa$1; + + var cookies = utils.isStandardBrowserEnv() ? + + // Standard browser envs support document.cookie + function standardBrowserEnv() { + return { + write: function write(name, value, expires, path, domain, secure) { + var cookie = []; + cookie.push(name + '=' + encodeURIComponent(value)); + + if (utils.isNumber(expires)) { + cookie.push('expires=' + new Date(expires).toGMTString()); + } + + if (utils.isString(path)) { + cookie.push('path=' + path); + } + + if (utils.isString(domain)) { + cookie.push('domain=' + domain); + } + + if (secure === true) { + cookie.push('secure'); + } + + document.cookie = cookie.join('; '); + }, + + read: function read(name) { + var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)')); + return match ? decodeURIComponent(match[3]) : null; + }, + + remove: function remove(name) { + this.write(name, '', Date.now() - 86400000); + } + }; + }() : + + // Non standard browser env (web workers, react-native) lack needed support. + function nonStandardBrowserEnv() { + return { + write: function write() {}, + read: function read() { + return null; + }, + remove: function remove() {} + }; + }(); + + var btoa = typeof window !== 'undefined' && window.btoa && window.btoa.bind(window) || btoa_1; + + var xhr = function xhrAdapter(config) { + return new _Promise(function dispatchXhrRequest(resolve, reject) { + var requestData = config.data; + var requestHeaders = config.headers; + + if (utils.isFormData(requestData)) { + delete requestHeaders['Content-Type']; // Let the browser set it + } + + var request = new XMLHttpRequest(); + var loadEvent = 'onreadystatechange'; + var xDomain = false; + + // For IE 8/9 CORS support + // Only supports POST and GET calls and doesn't returns the response headers. + // DON'T do this for testing b/c XMLHttpRequest is mocked, not XDomainRequest. + if (process.env.NODE_ENV !== 'test' && typeof window !== 'undefined' && window.XDomainRequest && !('withCredentials' in request) && !isURLSameOrigin(config.url)) { + request = new window.XDomainRequest(); + loadEvent = 'onload'; + xDomain = true; + request.onprogress = function handleProgress() {}; + request.ontimeout = function handleTimeout() {}; + } + + // HTTP basic authentication + if (config.auth) { + var username = config.auth.username || ''; + var password = config.auth.password || ''; + requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password); + } + + request.open(config.method.toUpperCase(), buildURL(config.url, config.params, config.paramsSerializer), true); + + // Set the request timeout in MS + request.timeout = config.timeout; + + // Listen for ready state + request[loadEvent] = function handleLoad() { + if (!request || request.readyState !== 4 && !xDomain) { + return; + } + + // The request errored out and we didn't get a response, this will be + // handled by onerror instead + // With one exception: request that using file: protocol, most browsers + // will return status as 0 even though it's a successful request + if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) { + return; + } + + // Prepare the response + var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null; + var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response; + var response = { + data: responseData, + // IE sends 1223 instead of 204 (https://github.com/mzabriskie/axios/issues/201) + status: request.status === 1223 ? 204 : request.status, + statusText: request.status === 1223 ? 'No Content' : request.statusText, + headers: responseHeaders, + config: config, + request: request + }; + + settle(resolve, reject, response); + + // Clean up request + request = null; + }; + + // Handle low level network errors + request.onerror = function handleError() { + // Real errors are hidden from us by the browser + // onerror should only fire if it's a network error + reject(createError('Network Error', config, null, request)); + + // Clean up request + request = null; + }; + + // Handle timeout + request.ontimeout = function handleTimeout() { + reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED', request)); + + // Clean up request + request = null; + }; + + // Add xsrf header + // This is only done if running in a standard browser environment. + // Specifically not if we're in a web worker, or react-native. + if (utils.isStandardBrowserEnv()) { + var cookies$$1 = cookies; + + // Add xsrf header + var xsrfValue = (config.withCredentials || isURLSameOrigin(config.url)) && config.xsrfCookieName ? cookies$$1.read(config.xsrfCookieName) : undefined; + + if (xsrfValue) { + requestHeaders[config.xsrfHeaderName] = xsrfValue; + } + } + + // Add headers to the request + if ('setRequestHeader' in request) { + utils.forEach(requestHeaders, function setRequestHeader(val, key) { + if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') { + // Remove Content-Type if data is undefined + delete requestHeaders[key]; + } else { + // Otherwise add header to the request + request.setRequestHeader(key, val); + } + }); + } + + // Add withCredentials to request if needed + if (config.withCredentials) { + request.withCredentials = true; + } + + // Add responseType to request if needed + if (config.responseType) { + try { + request.responseType = config.responseType; + } catch (e) { + // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2. + // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function. + if (config.responseType !== 'json') { + throw e; + } + } + } + + // Handle progress if needed + if (typeof config.onDownloadProgress === 'function') { + request.addEventListener('progress', config.onDownloadProgress); + } + + // Not all browsers support upload events + if (typeof config.onUploadProgress === 'function' && request.upload) { + request.upload.addEventListener('progress', config.onUploadProgress); + } + + if (config.cancelToken) { + // Handle cancellation + config.cancelToken.promise.then(function onCanceled(cancel) { + if (!request) { + return; + } + + request.abort(); + reject(cancel); + // Clean up request + request = null; + }); + } + + if (requestData === undefined) { + requestData = null; + } + + // Send the request + request.send(requestData); + }); + }; + + var DEFAULT_CONTENT_TYPE = { + 'Content-Type': 'application/x-www-form-urlencoded' + }; + + function setContentTypeIfUnset(headers, value) { + if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) { + headers['Content-Type'] = value; + } + } + + function getDefaultAdapter() { + var adapter; + if (typeof XMLHttpRequest !== 'undefined') { + // For browsers use XHR adapter + adapter = xhr; + } else if (typeof process !== 'undefined') { + // For node use HTTP adapter + adapter = xhr; + } + return adapter; + } + + var defaults = { + adapter: getDefaultAdapter(), + + transformRequest: [function transformRequest(data, headers) { + normalizeHeaderName(headers, 'Content-Type'); + if (utils.isFormData(data) || utils.isArrayBuffer(data) || utils.isBuffer(data) || utils.isStream(data) || utils.isFile(data) || utils.isBlob(data)) { + return data; + } + if (utils.isArrayBufferView(data)) { + return data.buffer; + } + if (utils.isURLSearchParams(data)) { + setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8'); + return data.toString(); + } + if (utils.isObject(data)) { + setContentTypeIfUnset(headers, 'application/json;charset=utf-8'); + return _JSON$stringify(data); + } + return data; + }], + + transformResponse: [function transformResponse(data) { + /*eslint no-param-reassign:0*/ + if (typeof data === 'string') { + try { + data = JSON.parse(data); + } catch (e) {/* Ignore */} + } + return data; + }], + + timeout: 0, + + xsrfCookieName: 'XSRF-TOKEN', + xsrfHeaderName: 'X-XSRF-TOKEN', + + maxContentLength: -1, + + validateStatus: function validateStatus(status) { + return status >= 200 && status < 300; + } + }; + + defaults.headers = { + common: { + 'Accept': 'application/json, text/plain, */*' + } + }; + + utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) { + defaults.headers[method] = {}; + }); + + utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { + defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE); + }); + + var defaults_1 = defaults; + + function InterceptorManager() { + this.handlers = []; + } + + /** + * Add a new interceptor to the stack + * + * @param {Function} fulfilled The function to handle `then` for a `Promise` + * @param {Function} rejected The function to handle `reject` for a `Promise` + * + * @return {Number} An ID used to remove interceptor later + */ + InterceptorManager.prototype.use = function use(fulfilled, rejected) { + this.handlers.push({ + fulfilled: fulfilled, + rejected: rejected + }); + return this.handlers.length - 1; + }; + + /** + * Remove an interceptor from the stack + * + * @param {Number} id The ID that was returned by `use` + */ + InterceptorManager.prototype.eject = function eject(id) { + if (this.handlers[id]) { + this.handlers[id] = null; + } + }; + + /** + * Iterate over all the registered interceptors + * + * This method is particularly useful for skipping over any + * interceptors that may have become `null` calling `eject`. + * + * @param {Function} fn The function to call for each interceptor + */ + InterceptorManager.prototype.forEach = function forEach(fn) { + utils.forEach(this.handlers, function forEachHandler(h) { + if (h !== null) { + fn(h); + } + }); + }; + + var InterceptorManager_1 = InterceptorManager; + + /** + * Transform the data for a request or a response + * + * @param {Object|String} data The data to be transformed + * @param {Array} headers The headers for the request or response + * @param {Array|Function} fns A single function or Array of functions + * @returns {*} The resulting transformed data + */ + var transformData = function transformData(data, headers, fns) { + /*eslint no-param-reassign:0*/ + utils.forEach(fns, function transform(fn) { + data = fn(data, headers); + }); + + return data; + }; + + var isCancel = function isCancel(value) { + return !!(value && value.__CANCEL__); + }; + + /** + * Throws a `Cancel` if cancellation has been requested. + */ + function throwIfCancellationRequested(config) { + if (config.cancelToken) { + config.cancelToken.throwIfRequested(); + } + } + + /** + * Dispatch a request to the server using the configured adapter. + * + * @param {object} config The config that is to be used for the request + * @returns {Promise} The Promise to be fulfilled + */ + var dispatchRequest = function dispatchRequest(config) { + throwIfCancellationRequested(config); + + // Ensure headers exist + config.headers = config.headers || {}; + + // Transform request data + config.data = transformData(config.data, config.headers, config.transformRequest); + + // Flatten headers + config.headers = utils.merge(config.headers.common || {}, config.headers[config.method] || {}, config.headers || {}); + + utils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], function cleanHeaderConfig(method) { + delete config.headers[method]; + }); + + var adapter = config.adapter || defaults_1.adapter; + + return adapter(config).then(function onAdapterResolution(response) { + throwIfCancellationRequested(config); + + // Transform response data + response.data = transformData(response.data, response.headers, config.transformResponse); + + return response; + }, function onAdapterRejection(reason) { + if (!isCancel(reason)) { + throwIfCancellationRequested(config); + + // Transform response data + if (reason && reason.response) { + reason.response.data = transformData(reason.response.data, reason.response.headers, config.transformResponse); + } + } + + return _Promise.reject(reason); + }); + }; + + /** + * Determines whether the specified URL is absolute + * + * @param {string} url The URL to test + * @returns {boolean} True if the specified URL is absolute, otherwise false + */ + + var isAbsoluteURL = function isAbsoluteURL(url) { + // A URL is considered absolute if it begins with "://" or "//" (protocol-relative URL). + // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed + // by any combination of letters, digits, plus, period, or hyphen. + return (/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url) + ); + }; + + /** + * Creates a new URL by combining the specified URLs + * + * @param {string} baseURL The base URL + * @param {string} relativeURL The relative URL + * @returns {string} The combined URL + */ + + var combineURLs = function combineURLs(baseURL, relativeURL) { + return relativeURL ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '') : baseURL; + }; + + /** + * Create a new instance of Axios + * + * @param {Object} instanceConfig The default config for the instance + */ + function Axios(instanceConfig) { + this.defaults = instanceConfig; + this.interceptors = { + request: new InterceptorManager_1(), + response: new InterceptorManager_1() + }; + } + + /** + * Dispatch a request + * + * @param {Object} config The config specific for this request (merged with this.defaults) + */ + Axios.prototype.request = function request(config) { + /*eslint no-param-reassign:0*/ + // Allow for axios('example/url'[, config]) a la fetch API + if (typeof config === 'string') { + config = utils.merge({ + url: arguments[0] + }, arguments[1]); + } + + config = utils.merge(defaults_1, this.defaults, { method: 'get' }, config); + config.method = config.method.toLowerCase(); + + // Support baseURL config + if (config.baseURL && !isAbsoluteURL(config.url)) { + config.url = combineURLs(config.baseURL, config.url); + } + + // Hook up interceptors middleware + var chain = [dispatchRequest, undefined]; + var promise = _Promise.resolve(config); + + this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) { + chain.unshift(interceptor.fulfilled, interceptor.rejected); + }); + + this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) { + chain.push(interceptor.fulfilled, interceptor.rejected); + }); + + while (chain.length) { + promise = promise.then(chain.shift(), chain.shift()); + } + + return promise; + }; + + // Provide aliases for supported request methods + utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) { + /*eslint func-names:0*/ + Axios.prototype[method] = function (url, config) { + return this.request(utils.merge(config || {}, { + method: method, + url: url + })); + }; + }); + + utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { + /*eslint func-names:0*/ + Axios.prototype[method] = function (url, data, config) { + return this.request(utils.merge(config || {}, { + method: method, + url: url, + data: data + })); + }; + }); + + var Axios_1 = Axios; + + /** + * A `Cancel` is an object that is thrown when an operation is canceled. + * + * @class + * @param {string=} message The message. + */ + + function Cancel(message) { + this.message = message; + } + + Cancel.prototype.toString = function toString() { + return 'Cancel' + (this.message ? ': ' + this.message : ''); + }; + + Cancel.prototype.__CANCEL__ = true; + + var Cancel_1 = Cancel; + + /** + * A `CancelToken` is an object that can be used to request cancellation of an operation. + * + * @class + * @param {Function} executor The executor function. + */ + function CancelToken(executor) { + if (typeof executor !== 'function') { + throw new TypeError('executor must be a function.'); + } + + var resolvePromise; + this.promise = new _Promise(function promiseExecutor(resolve) { + resolvePromise = resolve; + }); + + var token = this; + executor(function cancel(message) { + if (token.reason) { + // Cancellation has already been requested + return; + } + + token.reason = new Cancel_1(message); + resolvePromise(token.reason); + }); + } + + /** + * Throws a `Cancel` if cancellation has been requested. + */ + CancelToken.prototype.throwIfRequested = function throwIfRequested() { + if (this.reason) { + throw this.reason; + } + }; + + /** + * Returns an object that contains a new `CancelToken` and a function that, when called, + * cancels the `CancelToken`. + */ + CancelToken.source = function source() { + var cancel; + var token = new CancelToken(function executor(c) { + cancel = c; + }); + return { + token: token, + cancel: cancel + }; + }; + + var CancelToken_1 = CancelToken; + + /** + * Syntactic sugar for invoking a function and expanding an array for arguments. + * + * Common use case would be to use `Function.prototype.apply`. + * + * ```js + * function f(x, y, z) {} + * var args = [1, 2, 3]; + * f.apply(null, args); + * ``` + * + * With `spread` this example can be re-written. + * + * ```js + * spread(function(x, y, z) {})([1, 2, 3]); + * ``` + * + * @param {Function} callback + * @returns {Function} + */ + + var spread = function spread(callback) { + return function wrap(arr) { + return callback.apply(null, arr); + }; + }; + + /** + * Create an instance of Axios + * + * @param {Object} defaultConfig The default config for the instance + * @return {Axios} A new instance of Axios + */ + function createInstance(defaultConfig) { + var context = new Axios_1(defaultConfig); + var instance = bind(Axios_1.prototype.request, context); + + // Copy axios.prototype to instance + utils.extend(instance, Axios_1.prototype, context); + + // Copy context to instance + utils.extend(instance, context); + + return instance; + } + + // Create the default instance to be exported + var axios$2 = createInstance(defaults_1); + + // Expose Axios class to allow class inheritance + axios$2.Axios = Axios_1; + + // Factory for creating new instances + axios$2.create = function create(instanceConfig) { + return createInstance(utils.merge(defaults_1, instanceConfig)); + }; + + // Expose Cancel & CancelToken + axios$2.Cancel = Cancel_1; + axios$2.CancelToken = CancelToken_1; + axios$2.isCancel = isCancel; + + // Expose all/spread + axios$2.all = function all(promises) { + return _Promise.all(promises); + }; + axios$2.spread = spread; + + var axios_1 = axios$2; + + // Allow use of default import syntax in TypeScript + var default_1 = axios$2; + + axios_1.default = default_1; + + var axios = axios_1; + + // most Object methods by ES6 should accept primitives + + + + var _objectSap = function (KEY, exec) { + var fn = (_core.Object || {})[KEY] || Object[KEY]; + var exp = {}; + exp[KEY] = exec(fn); + _export(_export.S + _export.F * _fails(function () { fn(1); }), 'Object', exp); + }; + + // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) + + var $getOwnPropertyDescriptor$1 = _objectGopd.f; + + _objectSap('getOwnPropertyDescriptor', function () { + return function getOwnPropertyDescriptor(it, key) { + return $getOwnPropertyDescriptor$1(_toIobject(it), key); + }; + }); + + var $Object$1 = _core.Object; + var getOwnPropertyDescriptor$1 = function getOwnPropertyDescriptor(it, key) { + return $Object$1.getOwnPropertyDescriptor(it, key); + }; + + var getOwnPropertyDescriptor = createCommonjsModule(function (module) { + module.exports = { "default": getOwnPropertyDescriptor$1, __esModule: true }; + }); + + var _Object$getOwnPropertyDescriptor = unwrapExports(getOwnPropertyDescriptor); + + var stateMachine = createCommonjsModule(function (module, exports) { + /* + + Javascript State Machine Library - https://github.com/jakesgordon/javascript-state-machine + + Copyright (c) 2012, 2013, 2014, 2015, Jake Gordon and contributors + Released under the MIT license - https://github.com/jakesgordon/javascript-state-machine/blob/master/LICENSE + + */ + + (function () { + + var StateMachine = { + + //--------------------------------------------------------------------------- + + VERSION: "2.4.0", + + //--------------------------------------------------------------------------- + + Result: { + SUCCEEDED: 1, // the event transitioned successfully from one state to another + NOTRANSITION: 2, // the event was successfull but no state transition was necessary + CANCELLED: 3, // the event was cancelled by the caller in a beforeEvent callback + PENDING: 4 // the event is asynchronous and the caller is in control of when the transition occurs + }, + + Error: { + INVALID_TRANSITION: 100, // caller tried to fire an event that was innapropriate in the current state + PENDING_TRANSITION: 200, // caller tried to fire an event while an async transition was still pending + INVALID_CALLBACK: 300 // caller provided callback function threw an exception + }, + + WILDCARD: '*', + ASYNC: 'async', + + //--------------------------------------------------------------------------- + + create: function(cfg, target) { + + var initial = (typeof cfg.initial == 'string') ? { state: cfg.initial } : cfg.initial; // allow for a simple string, or an object with { state: 'foo', event: 'setup', defer: true|false } + var terminal = cfg.terminal || cfg['final']; + var fsm = target || cfg.target || {}; + var events = cfg.events || []; + var callbacks = cfg.callbacks || {}; + var map = {}; // track state transitions allowed for an event { event: { from: [ to ] } } + var transitions = {}; // track events allowed from a state { state: [ event ] } + + var add = function(e) { + var from = Array.isArray(e.from) ? e.from : (e.from ? [e.from] : [StateMachine.WILDCARD]); // allow 'wildcard' transition if 'from' is not specified + map[e.name] = map[e.name] || {}; + for (var n = 0 ; n < from.length ; n++) { + transitions[from[n]] = transitions[from[n]] || []; + transitions[from[n]].push(e.name); + + map[e.name][from[n]] = e.to || from[n]; // allow no-op transition if 'to' is not specified + } + if (e.to) + transitions[e.to] = transitions[e.to] || []; + }; + + if (initial) { + initial.event = initial.event || 'startup'; + add({ name: initial.event, from: 'none', to: initial.state }); + } + + for(var n = 0 ; n < events.length ; n++) + add(events[n]); + + for(var name in map) { + if (map.hasOwnProperty(name)) + fsm[name] = StateMachine.buildEvent(name, map[name]); + } + + for(var name in callbacks) { + if (callbacks.hasOwnProperty(name)) + fsm[name] = callbacks[name]; + } + + fsm.current = 'none'; + fsm.is = function(state) { return Array.isArray(state) ? (state.indexOf(this.current) >= 0) : (this.current === state); }; + fsm.can = function(event) { return !this.transition && (map[event] !== undefined) && (map[event].hasOwnProperty(this.current) || map[event].hasOwnProperty(StateMachine.WILDCARD)); }; + fsm.cannot = function(event) { return !this.can(event); }; + fsm.transitions = function() { return (transitions[this.current] || []).concat(transitions[StateMachine.WILDCARD] || []); }; + fsm.isFinished = function() { return this.is(terminal); }; + fsm.error = cfg.error || function(name, from, to, args, error, msg, e) { throw e || msg; }; // default behavior when something unexpected happens is to throw an exception, but caller can override this behavior if desired (see github issue #3 and #17) + fsm.states = function() { return Object.keys(transitions).sort() }; + + if (initial && !initial.defer) + fsm[initial.event](); + + return fsm; + + }, + + //=========================================================================== + + doCallback: function(fsm, func, name, from, to, args) { + if (func) { + try { + return func.apply(fsm, [name, from, to].concat(args)); + } + catch(e) { + return fsm.error(name, from, to, args, StateMachine.Error.INVALID_CALLBACK, "an exception occurred in a caller-provided callback function", e); + } + } + }, + + beforeAnyEvent: function(fsm, name, from, to, args) { return StateMachine.doCallback(fsm, fsm['onbeforeevent'], name, from, to, args); }, + afterAnyEvent: function(fsm, name, from, to, args) { return StateMachine.doCallback(fsm, fsm['onafterevent'] || fsm['onevent'], name, from, to, args); }, + leaveAnyState: function(fsm, name, from, to, args) { return StateMachine.doCallback(fsm, fsm['onleavestate'], name, from, to, args); }, + enterAnyState: function(fsm, name, from, to, args) { return StateMachine.doCallback(fsm, fsm['onenterstate'] || fsm['onstate'], name, from, to, args); }, + changeState: function(fsm, name, from, to, args) { return StateMachine.doCallback(fsm, fsm['onchangestate'], name, from, to, args); }, + + beforeThisEvent: function(fsm, name, from, to, args) { return StateMachine.doCallback(fsm, fsm['onbefore' + name], name, from, to, args); }, + afterThisEvent: function(fsm, name, from, to, args) { return StateMachine.doCallback(fsm, fsm['onafter' + name] || fsm['on' + name], name, from, to, args); }, + leaveThisState: function(fsm, name, from, to, args) { return StateMachine.doCallback(fsm, fsm['onleave' + from], name, from, to, args); }, + enterThisState: function(fsm, name, from, to, args) { return StateMachine.doCallback(fsm, fsm['onenter' + to] || fsm['on' + to], name, from, to, args); }, + + beforeEvent: function(fsm, name, from, to, args) { + if ((false === StateMachine.beforeThisEvent(fsm, name, from, to, args)) || + (false === StateMachine.beforeAnyEvent( fsm, name, from, to, args))) + return false; + }, + + afterEvent: function(fsm, name, from, to, args) { + StateMachine.afterThisEvent(fsm, name, from, to, args); + StateMachine.afterAnyEvent( fsm, name, from, to, args); + }, + + leaveState: function(fsm, name, from, to, args) { + var specific = StateMachine.leaveThisState(fsm, name, from, to, args), + general = StateMachine.leaveAnyState( fsm, name, from, to, args); + if ((false === specific) || (false === general)) + return false; + else if ((StateMachine.ASYNC === specific) || (StateMachine.ASYNC === general)) + return StateMachine.ASYNC; + }, + + enterState: function(fsm, name, from, to, args) { + StateMachine.enterThisState(fsm, name, from, to, args); + StateMachine.enterAnyState( fsm, name, from, to, args); + }, + + //=========================================================================== + + buildEvent: function(name, map) { + return function() { + + var from = this.current; + var to = map[from] || (map[StateMachine.WILDCARD] != StateMachine.WILDCARD ? map[StateMachine.WILDCARD] : from) || from; + var args = Array.prototype.slice.call(arguments); // turn arguments into pure array + + if (this.transition) + return this.error(name, from, to, args, StateMachine.Error.PENDING_TRANSITION, "event " + name + " inappropriate because previous transition did not complete"); + + if (this.cannot(name)) + return this.error(name, from, to, args, StateMachine.Error.INVALID_TRANSITION, "event " + name + " inappropriate in current state " + this.current); + + if (false === StateMachine.beforeEvent(this, name, from, to, args)) + return StateMachine.Result.CANCELLED; + + if (from === to) { + StateMachine.afterEvent(this, name, from, to, args); + return StateMachine.Result.NOTRANSITION; + } + + // prepare a transition method for use EITHER lower down, or by caller if they want an async transition (indicated by an ASYNC return value from leaveState) + var fsm = this; + this.transition = function() { + fsm.transition = null; // this method should only ever be called once + fsm.current = to; + StateMachine.enterState( fsm, name, from, to, args); + StateMachine.changeState(fsm, name, from, to, args); + StateMachine.afterEvent( fsm, name, from, to, args); + return StateMachine.Result.SUCCEEDED; + }; + this.transition.cancel = function() { // provide a way for caller to cancel async transition if desired (issue #22) + fsm.transition = null; + StateMachine.afterEvent(fsm, name, from, to, args); + }; + + var leave = StateMachine.leaveState(this, name, from, to, args); + if (false === leave) { + this.transition = null; + return StateMachine.Result.CANCELLED; + } + else if (StateMachine.ASYNC === leave) { + return StateMachine.Result.PENDING; + } + else { + if (this.transition) // need to check in case user manually called transition() but forgot to return StateMachine.ASYNC + return this.transition(); + } + + }; + } + + }; // StateMachine + + //=========================================================================== + + //====== + // NODE + //====== + { + if ('object' !== 'undefined' && module.exports) { + exports = module.exports = StateMachine; + } + exports.StateMachine = StateMachine; + } + + }()); + }); + + var _extends = createCommonjsModule(function (module, exports) { + "use strict"; + + exports.__esModule = true; + + + + var _assign2 = _interopRequireDefault(assign); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + exports.default = _assign2.default || 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 _extends$1 = unwrapExports(_extends); + + var getWeak = _meta.getWeak; + + + + + + + + var arrayFind = _arrayMethods(5); + var arrayFindIndex = _arrayMethods(6); + var id$1 = 0; + + // fallback for uncaught frozen keys + var uncaughtFrozenStore = function (that) { + return that._l || (that._l = new UncaughtFrozenStore()); + }; + var UncaughtFrozenStore = function () { + this.a = []; + }; + var findUncaughtFrozen = function (store, key) { + return arrayFind(store.a, function (it) { + return it[0] === key; + }); + }; + UncaughtFrozenStore.prototype = { + get: function (key) { + var entry = findUncaughtFrozen(this, key); + if (entry) return entry[1]; + }, + has: function (key) { + return !!findUncaughtFrozen(this, key); + }, + set: function (key, value) { + var entry = findUncaughtFrozen(this, key); + if (entry) entry[1] = value; + else this.a.push([key, value]); + }, + 'delete': function (key) { + var index = arrayFindIndex(this.a, function (it) { + return it[0] === key; + }); + if (~index) this.a.splice(index, 1); + return !!~index; + } + }; + + var _collectionWeak = { + getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { + var C = wrapper(function (that, iterable) { + _anInstance(that, C, NAME, '_i'); + that._t = NAME; // collection type + that._i = id$1++; // collection id + that._l = undefined; // leak store for uncaught frozen objects + if (iterable != undefined) _forOf(iterable, IS_MAP, that[ADDER], that); + }); + _redefineAll(C.prototype, { + // 23.3.3.2 WeakMap.prototype.delete(key) + // 23.4.3.3 WeakSet.prototype.delete(value) + 'delete': function (key) { + if (!_isObject(key)) return false; + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(_validateCollection(this, NAME))['delete'](key); + return data && _has(data, this._i) && delete data[this._i]; + }, + // 23.3.3.4 WeakMap.prototype.has(key) + // 23.4.3.4 WeakSet.prototype.has(value) + has: function has(key) { + if (!_isObject(key)) return false; + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(_validateCollection(this, NAME)).has(key); + return data && _has(data, this._i); + } + }); + return C; + }, + def: function (that, key, value) { + var data = getWeak(_anObject(key), true); + if (data === true) uncaughtFrozenStore(that).set(key, value); + else data[that._i] = value; + return that; + }, + ufstore: uncaughtFrozenStore + }; + + var es6_weakMap = createCommonjsModule(function (module) { + 'use strict'; + var each = _arrayMethods(0); + + + + + + + + var WEAK_MAP = 'WeakMap'; + var getWeak = _meta.getWeak; + var isExtensible = Object.isExtensible; + var uncaughtFrozenStore = _collectionWeak.ufstore; + var tmp = {}; + var InternalMap; + + var wrapper = function (get) { + return function WeakMap() { + return get(this, arguments.length > 0 ? arguments[0] : undefined); + }; + }; + + var methods = { + // 23.3.3.3 WeakMap.prototype.get(key) + get: function get(key) { + if (_isObject(key)) { + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(_validateCollection(this, WEAK_MAP)).get(key); + return data ? data[this._i] : undefined; + } + }, + // 23.3.3.5 WeakMap.prototype.set(key, value) + set: function set(key, value) { + return _collectionWeak.def(_validateCollection(this, WEAK_MAP), key, value); + } + }; + + // 23.3 WeakMap Objects + var $WeakMap = module.exports = _collection(WEAK_MAP, wrapper, methods, _collectionWeak, true, true); + + // IE11 WeakMap frozen keys fix + if (_fails(function () { return new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7; })) { + InternalMap = _collectionWeak.getConstructor(wrapper, WEAK_MAP); + _objectAssign(InternalMap.prototype, methods); + _meta.NEED = true; + each(['delete', 'has', 'get', 'set'], function (key) { + var proto = $WeakMap.prototype; + var method = proto[key]; + _redefine(proto, key, function (a, b) { + // store frozen objects on internal weakmap shim + if (_isObject(a) && !isExtensible(a)) { + if (!this._f) this._f = new InternalMap(); + var result = this._f[key](a, b); + return key == 'set' ? this : result; + // store all the rest on native weakmap + } return method.call(this, a, b); + }); + }); + } + }); + + // https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.of + _setCollectionOf('WeakMap'); + + // https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.from + _setCollectionFrom('WeakMap'); + + var weakMap$1 = _core.WeakMap; + + var weakMap = createCommonjsModule(function (module) { + module.exports = { "default": weakMap$1, __esModule: true }; + }); + + var _WeakMap = unwrapExports(weakMap); + + // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) + _export(_export.S + _export.F * !_descriptors, 'Object', { defineProperty: _objectDp.f }); + + var $Object$2 = _core.Object; + var defineProperty$3 = function defineProperty(it, key, desc) { + return $Object$2.defineProperty(it, key, desc); + }; + + var defineProperty$2 = createCommonjsModule(function (module) { + module.exports = { "default": defineProperty$3, __esModule: true }; + }); + + var _Object$defineProperty = unwrapExports(defineProperty$2); + + var defineProperty$1 = createCommonjsModule(function (module, exports) { + "use strict"; + + exports.__esModule = true; + + + + var _defineProperty2 = _interopRequireDefault(defineProperty$2); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + exports.default = function (obj, key, value) { + if (key in obj) { + (0, _defineProperty2.default)(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; + }; + }); + + var _defineProperty = unwrapExports(defineProperty$1); + + // 19.1.2.14 Object.keys(O) + + + + _objectSap('keys', function () { + return function keys(it) { + return _objectKeys(_toObject(it)); + }; + }); + + var keys$1 = _core.Object.keys; + + var keys = createCommonjsModule(function (module) { + module.exports = { "default": keys$1, __esModule: true }; + }); + + var _Object$keys = unwrapExports(keys); + + /** Detect free variable `global` from Node.js. */ + var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal; + + var _freeGlobal = freeGlobal; + + /** Detect free variable `self`. */ + var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + + /** Used as a reference to the global object. */ + var root = _freeGlobal || freeSelf || Function('return this')(); + + var _root = root; + + /** Built-in value references. */ + var Symbol$1 = _root.Symbol; + + var _Symbol$1 = Symbol$1; + + /** Used for built-in method references. */ + var objectProto$1 = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty$2 = objectProto$1.hasOwnProperty; + + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var nativeObjectToString = objectProto$1.toString; + + /** Built-in value references. */ + var symToStringTag$1 = _Symbol$1 ? _Symbol$1.toStringTag : undefined; + + /** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ + function getRawTag(value) { + var isOwn = hasOwnProperty$2.call(value, symToStringTag$1), + tag = value[symToStringTag$1]; + + try { + value[symToStringTag$1] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag$1] = tag; + } else { + delete value[symToStringTag$1]; + } + } + return result; + } + + var _getRawTag = getRawTag; + + /** Used for built-in method references. */ + var objectProto$2 = Object.prototype; + + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var nativeObjectToString$1 = objectProto$2.toString; + + /** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ + function objectToString(value) { + return nativeObjectToString$1.call(value); + } + + var _objectToString = objectToString; + + /** `Object#toString` result references. */ + var nullTag = '[object Null]'; + var undefinedTag = '[object Undefined]'; + + /** Built-in value references. */ + var symToStringTag = _Symbol$1 ? _Symbol$1.toStringTag : undefined; + + /** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + return (symToStringTag && symToStringTag in Object(value)) + ? _getRawTag(value) + : _objectToString(value); + } + + var _baseGetTag = baseGetTag; + + /** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ + function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; + } + + var _overArg = overArg; + + /** Built-in value references. */ + var getPrototype = _overArg(Object.getPrototypeOf, Object); + + var _getPrototype = getPrototype; + + /** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ + function isObjectLike(value) { + return value != null && typeof value == 'object'; + } + + var isObjectLike_1 = isObjectLike; + + /** `Object#toString` result references. */ + var objectTag = '[object Object]'; + + /** Used for built-in method references. */ + var funcProto = Function.prototype; + var objectProto = Object.prototype; + + /** Used to resolve the decompiled source of functions. */ + var funcToString = funcProto.toString; + + /** Used to check objects for own properties. */ + var hasOwnProperty$1 = objectProto.hasOwnProperty; + + /** Used to infer the `Object` constructor. */ + var objectCtorString = funcToString.call(Object); + + /** + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. + * + * @static + * @memberOf _ + * @since 0.8.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true + */ + function isPlainObject(value) { + if (!isObjectLike_1(value) || _baseGetTag(value) != objectTag) { + return false; + } + var proto = _getPrototype(value); + if (proto === null) { + return true; + } + var Ctor = hasOwnProperty$1.call(proto, 'constructor') && proto.constructor; + return typeof Ctor == 'function' && Ctor instanceof Ctor && + funcToString.call(Ctor) == objectCtorString; + } + + var isPlainObject_1 = isPlainObject; + + /* eslint-disable */ + var global$2 = typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : {}; + + var createClass = createCommonjsModule(function (module, exports) { + "use strict"; + + exports.__esModule = true; + + + + var _defineProperty2 = _interopRequireDefault(defineProperty$2); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + exports.default = 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; + (0, _defineProperty2.default)(target, descriptor.key, descriptor); + } + } + + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + }(); + }); + + var _createClass = unwrapExports(createClass); + + var EXPIRED = _Symbol('expired'); + var debug$5 = browser$1('LC:Expirable'); + + var Expirable = function () { + function Expirable(value, ttl) { + _classCallCheck(this, Expirable); + + this._value = value; + if (typeof ttl === 'number') { + this.expiredAt = Date.now() + ttl; + } + } + + _createClass(Expirable, [{ + key: 'value', + get: function get() { + var expired = this.expiredAt && this.expiredAt < Date.now(); + if (expired) debug$5('expired: ' + this._value); + return expired ? EXPIRED : this._value; + } + }]); + + return Expirable; + }(); + + Expirable.EXPIRED = EXPIRED; + + var debug$6 = browser$1('LC:Cache'); + + var Cache = function () { + function Cache() { + var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'anonymous'; + + _classCallCheck(this, Cache); + + this.name = name; + this._map = {}; + } + + Cache.prototype.get = function get(key) { + var cache = this._map[key]; + if (cache) { + var value = cache.value; + if (value !== Expirable.EXPIRED) { + debug$6('[%s] hit: %s %O', this.name, key, value); + return value; + } + delete this._map[key]; + } + debug$6('[' + this.name + '] missed: ' + key); + return null; + }; + + Cache.prototype.set = function set(key, value, ttl) { + debug$6('[%s] set: %s %O %d', this.name, key, value, ttl); + this._map[key] = new Expirable(value, ttl); + }; + + return Cache; + }(); + + var tryAll = function tryAll(promiseConstructors) { + var promise = new _Promise(promiseConstructors[0]); + if (promiseConstructors.length === 1) { + return promise; + } + return promise.catch(function () { + return tryAll(promiseConstructors.slice(1)); + }); + }; + + var tap = function tap(interceptor) { + return function (value) { + return interceptor(value), value; + }; + }; + + var decodeDate = function decodeDate(date) { + if (!date) return date; + if (typeof date === 'string') { + return new Date(date); + } + if (date.__type === 'Date' && date.iso) { + return new Date(date.iso); + } + // Long + if (typeof date.toNumber === 'function') { + return new Date(date.toNumber()); + } + return date; + }; + + var keyRemap = function keyRemap(keymap, obj) { + return _Object$keys(obj).reduce(function (newObj, key) { + var newKey = keymap[key] || key; + return _Object$assign(newObj, _defineProperty({}, newKey, obj[key])); + }, {}); + }; + + var isIE10 = global$2.navigator && global$2.navigator.userAgent && global$2.navigator.userAgent.indexOf('MSIE 10.') !== -1; + + /* eslint-disable no-proto */ + var getStaticProperty = function getStaticProperty(klass, property) { + return klass[property] || (klass.__proto__ ? getStaticProperty(klass.__proto__, property) : undefined); + }; + /* eslint-enable no-proto */ + + var union = function union(a, b) { + return _Array$from(new _Set([].concat(_toConsumableArray(a), _toConsumableArray(b)))); + }; + var difference = function difference(a, b) { + return _Array$from(function (bSet) { + return new _Set(a.filter(function (x) { + return !bSet.has(x); + })); + }(new _Set(b))); + }; + + var map = new _WeakMap(); + + // protected property helper + var internal = function internal(object) { + if (!map.has(object)) { + map.set(object, {}); + } + return map.get(object); + }; + + // debug utility + var removeNull = function removeNull(obj) { + if (!isPlainObject_1(obj)) return obj; + var object = _Object$assign({}, obj); + // eslint-disable-next-line no-restricted-syntax + for (var prop in object) { + if ({}.hasOwnProperty.call(object, prop)) { + var value = object[prop]; + if (value === null) { + delete object[prop]; + } else { + object[prop] = removeNull(value); + } + } + } + return object; + }; + var trim$1 = function trim(message) { + return removeNull(JSON.parse(_JSON$stringify(message))); + }; + + var ensureArray = function ensureArray(target) { + if (Array.isArray(target)) { + return target; + } + if (target === undefined || target === null) { + return []; + } + return [target]; + }; + + var setValue = function setValue(target, key, value) { + // '.' is not allowed in Class keys, escaping is not in concern now. + var segs = key.split('.'); + var lastSeg = segs.pop(); + var currentTarget = target; + segs.forEach(function (seg) { + if (currentTarget[seg] === undefined) currentTarget[seg] = {}; + currentTarget = currentTarget[seg]; + }); + currentTarget[lastSeg] = value; + return target; + }; + + // eslint-disable-next-line no-undef + var isWeapp = (typeof wx === 'undefined' ? 'undefined' : _typeof(wx)) === 'object' && typeof wx.connectSocket === 'function'; + + // throttle decorator + var throttle = function throttle(wait) { + return function (target, property, descriptor) { + var callback = descriptor.value; + // very naive, internal use only + if (callback.length) { + throw new Error('throttled function should not accept any arguments'); + } + return _extends$1({}, descriptor, { + value: function value() { + var _this = this; + + var _internal = internal(this), + throttleMeta = _internal.throttleMeta; + + if (!throttleMeta) throttleMeta = internal(this).throttleMeta = {}; + var _throttleMeta = throttleMeta, + propertyMeta = _throttleMeta[property]; + + if (!propertyMeta) propertyMeta = throttleMeta[property] = {}; + var _propertyMeta = propertyMeta, + _propertyMeta$previou = _propertyMeta.previouseTimestamp, + previouseTimestamp = _propertyMeta$previou === undefined ? 0 : _propertyMeta$previou, + timeout = _propertyMeta.timeout; + + var now = Date.now(); + var remainingTime = wait - (now - previouseTimestamp); + if (remainingTime <= 0) { + throttleMeta[property].previouseTimestamp = now; + callback.apply(this); + } else if (!timeout) { + propertyMeta.timeout = setTimeout(function () { + propertyMeta.previouseTimestamp = Date.now(); + delete propertyMeta.timeout; + callback.apply(_this); + }, remainingTime); + } + } + }); + }; + }; + + var WebSocket = global$2.WebSocket || global$2.MozWebSocket; + + var _class; + + function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { + var desc = {}; + Object['ke' + 'ys'](descriptor).forEach(function (key) { + desc[key] = descriptor[key]; + }); + desc.enumerable = !!desc.enumerable; + desc.configurable = !!desc.configurable; + + if ('value' in desc || desc.initializer) { + desc.writable = true; + } + + desc = decorators.slice().reverse().reduce(function (desc, decorator) { + return decorator(target, property, desc) || desc; + }, desc); + + if (context && desc.initializer !== void 0) { + desc.value = desc.initializer ? desc.initializer.call(context) : void 0; + desc.initializer = undefined; + } + + if (desc.initializer === void 0) { + Object['define' + 'Property'](target, property, desc); + desc = null; + } + + return desc; + } + + // WebSocket with auto reconnecting feature, backup endpoint and EventEmitter interface. + + var debug$4 = browser$1('LC:WebSocketPlus'); + + var HEARTBEAT_TIME = 180000; + var TIMEOUT_TIME = 380000; + + var DEFAULT_RETRY_STRATEGY = function DEFAULT_RETRY_STRATEGY(attempt) { + return Math.min(1000 * Math.pow(2, attempt), 300000); + }; + + var requireConnected = function requireConnected(target, name, descriptor) { + return _Object$assign({}, descriptor, { + value: function requireConnectedWrapper() { + var _descriptor$value; + + if (!this.is('connected')) { + var currentState = this.current; + console.warn(name + ' should not be called when the connection is ' + currentState); + if (this.is('disconnected') || this.is('reconnecting')) { + console.warn('disconnect and reconnect event should be handled to avoid such calls.'); + } + throw new Error('Connection unavailable'); + } + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return (_descriptor$value = descriptor.value).call.apply(_descriptor$value, [this].concat(args)); + } + }); + }; + + var WebSocketPlus = (_class = function (_EventEmitter) { + _inherits(WebSocketPlus, _EventEmitter); + + function WebSocketPlus(getUrls, protocol) { + _classCallCheck(this, WebSocketPlus); + + if (typeof WebSocket === 'undefined') { + throw new Error('WebSocket is undefined. Polyfill is required in this runtime.'); + } + + var _this = _possibleConstructorReturn(this, _EventEmitter.call(this)); + + if (typeof getUrls !== 'function') { + _this._getUrls = function () { + return _Promise.resolve(getUrls); + }; + } else { + _this._getUrls = getUrls; + } + _this._protocol = protocol; + _this.init(); + _this._createWs(_this._getUrls, _this._protocol).then(function () { + _this.__postponeTimeoutTimer = _this._postponeTimeoutTimer.bind(_this); + if (global$2.addEventListener) { + _this.__pause = function () { + return _this.pause(); + }; + _this.__resume = function () { + return _this.resume(); + }; + global$2.addEventListener('offline', _this.__pause); + global$2.addEventListener('online', _this.__resume); + } + _this.open(); + }).catch(_this.throw.bind(_this)); + return _this; + } + + WebSocketPlus.prototype._createWs = function _createWs(getUrls, protocol) { + var _this2 = this; + + return getUrls().then(function (wsUrls) { + var urls = wsUrls; + if (!(urls instanceof Array)) { + urls = [urls]; + } + return tryAll(urls.map(function (url) { + return function (resolve, reject) { + debug$4('connect [' + url + '] ' + protocol); + var ws = protocol ? new WebSocket(url, protocol) : new WebSocket(url); + ws.binaryType = _this2.binaryType || 'arraybuffer'; + ws.onopen = function () { + return resolve(ws); + }; + ws.onerror = ws.onclose = function (error) { + if (error instanceof Error) { + return reject(error); + } + // in browser, error event is useless + return reject(new Error('Failed to connect [' + url + ']')); + }; + }; + })).then(function (ws) { + _this2._ws = ws; + _this2._ws.onclose = _this2._handleClose.bind(_this2); + _this2._ws.onmessage = _this2._handleMessage.bind(_this2); + return ws; + }); + }); + }; + + WebSocketPlus.prototype._destroyWs = function _destroyWs() { + var ws = this._ws; + if (!ws) return; + ws.onopen = ws.onclose = ws.onerror = ws.onmessage = null; + this._ws = null; + ws.close(); + }; + + // eslint-disable-next-line class-methods-use-this + + + WebSocketPlus.prototype.onbeforeevent = function onbeforeevent(event, from, to) { + for (var _len2 = arguments.length, payload = Array(_len2 > 3 ? _len2 - 3 : 0), _key2 = 3; _key2 < _len2; _key2++) { + payload[_key2 - 3] = arguments[_key2]; + } + + debug$4.apply(undefined, [event + ': ' + from + ' -> ' + to].concat(payload)); + }; + + WebSocketPlus.prototype.onopen = function onopen() { + this.emit('open'); + }; + + WebSocketPlus.prototype.onconnected = function onconnected() { + this._startConnectionKeeper(); + }; + + WebSocketPlus.prototype.onleaveconnected = function onleaveconnected(event, from, to) { + this._stopConnectionKeeper(); + this._destroyWs(); + if (to === 'offline' || to === 'disconnected') { + this.emit('disconnect'); + } + }; + + WebSocketPlus.prototype.onpause = function onpause() { + this.emit('offline'); + }; + + WebSocketPlus.prototype.onbeforeresume = function onbeforeresume() { + this.emit('online'); + }; + + WebSocketPlus.prototype.onreconnect = function onreconnect() { + this.emit('reconnect'); + }; + + WebSocketPlus.prototype.ondisconnected = function ondisconnected(event, from, to) { + var _this3 = this; + + var attempt = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0; + + var delay = DEFAULT_RETRY_STRATEGY.call(null, attempt); + debug$4('schedule attempt=' + attempt + ' delay=' + delay); + this.emit('schedule', attempt, delay); + if (this.__scheduledRetry) { + clearTimeout(this.__scheduledRetry); + } + this.__scheduledRetry = setTimeout(function () { + if (_this3.is('disconnected')) { + _this3.retry(attempt); + } + }, delay); + }; + + WebSocketPlus.prototype.onretry = function onretry(event, from, to) { + var _this4 = this; + + var attempt = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0; + + this.emit('retry', attempt); + this._createWs(this._getUrls, this._protocol).then(function () { + return _this4.can('reconnect') ? _this4.reconnect() : _this4._destroyWs(); + }, function () { + return _this4.can('fail') && _this4.fail(attempt + 1); + }); + }; + + WebSocketPlus.prototype.onerror = function onerror(event, from, to, error) { + this.emit('error', error); + }; + + WebSocketPlus.prototype.onclose = function onclose() { + if (global$2.removeEventListener) { + if (this.__pause) global$2.removeEventListener('offline', this.__pause); + if (this.__resume) global$2.removeEventListener('online', this.__resume); + } + }; + + // jsdoc-ignore-start + + + // jsdoc-ignore-end + WebSocketPlus.prototype._ping = function _ping() { + debug$4('ping'); + try { + this.ping(); + } catch (error) { + console.warn('websocket ping error: ' + error.message); + } + }; + + WebSocketPlus.prototype.ping = function ping() { + if (this._ws.ping) { + this._ws.ping(); + } else { + console.warn('The WebSocket implement does not support sending ping frame.\n Override ping method to use application defined ping/pong mechanism.'); + } + }; + + WebSocketPlus.prototype._postponeTimeoutTimer = function _postponeTimeoutTimer() { + var _this5 = this; + + debug$4('_postponeTimeoutTimer'); + this._clearTimeoutTimers(); + this._timeoutTimer = setTimeout(function () { + debug$4('timeout'); + _this5.disconnect(); + }, TIMEOUT_TIME); + }; + + WebSocketPlus.prototype._clearTimeoutTimers = function _clearTimeoutTimers() { + if (this._timeoutTimer) { + clearTimeout(this._timeoutTimer); + } + }; + + WebSocketPlus.prototype._startConnectionKeeper = function _startConnectionKeeper() { + debug$4('start connection keeper'); + this._heartbeatTimer = setInterval(this._ping.bind(this), HEARTBEAT_TIME); + var addListener = this._ws.addListener || this._ws.addEventListener; + addListener.call(this._ws, 'message', this.__postponeTimeoutTimer); + addListener.call(this._ws, 'pong', this.__postponeTimeoutTimer); + this._postponeTimeoutTimer(); + }; + + WebSocketPlus.prototype._stopConnectionKeeper = function _stopConnectionKeeper() { + debug$4('stop connection keeper'); + // websockets/ws#489 + var removeListener = this._ws.removeListener || this._ws.removeEventListener; + removeListener.call(this._ws, 'message', this.__postponeTimeoutTimer); + removeListener.call(this._ws, 'pong', this.__postponeTimeoutTimer); + this._clearTimeoutTimers(); + if (this._heartbeatTimer) { + clearInterval(this._heartbeatTimer); + } + }; + + WebSocketPlus.prototype._handleClose = function _handleClose(event) { + debug$4('ws closed [' + event.code + '] ' + event.reason); + // socket closed manually, ignore close event. + if (this.isFinished()) return; + this.handleClose(event); + }; + + WebSocketPlus.prototype.handleClose = function handleClose() { + // reconnect + this.disconnect(); + }; + + // jsdoc-ignore-start + + + // jsdoc-ignore-end + WebSocketPlus.prototype.send = function send(data) { + debug$4('send', data); + this._ws.send(data); + }; + + WebSocketPlus.prototype._handleMessage = function _handleMessage(event) { + debug$4('message', event.data); + this.handleMessage(event.data); + }; + + WebSocketPlus.prototype.handleMessage = function handleMessage(message) { + this.emit('message', message); + }; + + return WebSocketPlus; + }(eventemitter3), (_applyDecoratedDescriptor(_class.prototype, '_ping', [requireConnected], _Object$getOwnPropertyDescriptor(_class.prototype, '_ping'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'send', [requireConnected], _Object$getOwnPropertyDescriptor(_class.prototype, 'send'), _class.prototype)), _class); + + + stateMachine.create({ + target: WebSocketPlus.prototype, + initial: { + state: 'initialized', + event: 'init', + defer: true + }, + terminal: 'closed', + events: [{ + name: 'open', + from: 'initialized', + to: 'connected' + }, { + name: 'disconnect', + from: 'connected', + to: 'disconnected' + }, { + name: 'retry', + from: 'disconnected', + to: 'reconnecting' + }, { + name: 'fail', + from: 'reconnecting', + to: 'disconnected' + }, { + name: 'reconnect', + from: 'reconnecting', + to: 'connected' + }, { + name: 'pause', + from: ['connected', 'disconnected', 'reconnecting'], + to: 'offline' + }, {}, { + name: 'resume', + from: 'offline', + to: 'disconnected' + }, { + name: 'close', + from: ['connected', 'disconnected', 'reconnecting', 'offline'], + to: 'closed' + }, { + name: 'throw', + from: '*', + to: 'error' + }] + }); + + // 19.1.2.5 Object.freeze(O) + + var meta = _meta.onFreeze; + + _objectSap('freeze', function ($freeze) { + return function freeze(it) { + return $freeze && _isObject(it) ? $freeze(meta(it)) : it; + }; + }); + + var freeze$1 = _core.Object.freeze; + + var freeze = createCommonjsModule(function (module) { + module.exports = { "default": freeze$1, __esModule: true }; + }); + + var _Object$freeze = unwrapExports(freeze); + + var error$1 = _Object$freeze({ + 1000: { + name: 'CLOSE_NORMAL' + }, + 1006: { + name: 'CLOSE_ABNORMAL' + }, + 4100: { + name: 'APP_NOT_AVAILABLE', + message: 'App not exists or realtime message service is disabled.' + }, + 4103: { + name: 'INVALID_LOGIN', + message: 'Malformed clientId.' + }, + 4105: { + name: 'SESSION_REQUIRED', + message: 'Message sent before session opened. ' + }, + 4107: { + name: 'READ_TIMEOUT' + }, + 4108: { + name: 'LOGIN_TIMEOUT' + }, + 4109: { + name: 'FRAME_TOO_LONG' + }, + 4110: { + name: 'INVALID_ORIGIN', + message: 'Access denied by domain whitelist.' + }, + 4111: { + name: 'SESSION_CONFLICT' + }, + 4112: { + name: 'SESSION_TOKEN_EXPIRED' + }, + 4200: { + name: 'INTERNAL_ERROR', + message: 'Internal error, please contact LeanCloud for support.' + }, + 4201: { + name: 'SEND_MESSAGE_TIMEOUT' + }, + 4302: { + name: 'CONVERSATION_SIGNATURE_FAILED' + }, + 4303: { + name: 'CONVERSATION_NOT_FOUND' + }, + 4304: { + name: 'CONVERSATION_FULL' + }, + 4305: { + name: 'CONVERSATION_REJECTED_BY_APP' + }, + 4306: { + name: 'CONVERSATION_UPDATE_FAILED' + }, + 4307: { + name: 'CONVERSATION_READ_ONLY' + }, + 4308: { + name: 'CONVERSATION_NOT_ALLOWED' + }, + 4401: { + name: 'INVALID_MESSAGING_TARGET' + }, + 4402: { + name: 'MESSAGE_REJECTED_BY_APP' + } + }); + + var ErrorCode = _Object$freeze(_Object$keys(error$1).reduce(function (result, code) { + return _Object$assign(result, _defineProperty({}, error$1[code].name, Number(code))); + }, {})); + + var createError$3 = function createError(errorMessage) { + var code = errorMessage.code, + reason = errorMessage.reason, + appCode = errorMessage.appCode, + detail = errorMessage.detail; + + var message = reason || detail; + if (!message && error$1[code]) { + message = error$1[code].message || error$1[code].name; + } + if (!message) { + message = 'Unknow Error: ' + code; + } + var err = new Error(message); + return _Object$assign(err, { + code: code, appCode: appCode, detail: detail + }); + }; + + var debug$3 = browser$1('LC:Connection'); + + var COMMAND_TIMEOUT = 20000; + + var Connection = function (_WebSocketPlus) { + _inherits(Connection, _WebSocketPlus); + + function Connection(getUrl, _ref) { + var format = _ref.format, + version = _ref.version; + + _classCallCheck(this, Connection); + + debug$3('initializing Connection'); + var protocolString = 'lc.' + format + '.' + version; + if (!isWeapp) { + var _this = _possibleConstructorReturn(this, _WebSocketPlus.call(this, getUrl, protocolString)); + } else { + var _this = _possibleConstructorReturn(this, _WebSocketPlus.call(this, getUrl().then(function (urls) { + return urls.map(function (url) { + return '' + url + (url.indexOf('?') === -1 ? '?' : '&') + 'subprotocol=' + encodeURIComponent(protocolString); + }); + }))); + } + _this._protocalFormat = format; + _this._commands = {}; + _this._serialId = 0; + return _possibleConstructorReturn(_this); + } + + Connection.prototype.send = function send(command) { + var _this2 = this; + + var waitingForRespond = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + + var serialId = void 0; + if (waitingForRespond) { + this._serialId += 1; + serialId = this._serialId; + command.i = serialId; // eslint-disable-line no-param-reassign + } + debug$3('↑ %O sent', trim$1(command)); + + var message = void 0; + if (this._protocalFormat === 'proto2base64') { + message = command.toBase64(); + } else if (command.toArrayBuffer) { + message = command.toArrayBuffer(); + } + if (!message) { + throw new TypeError(command + ' is not a GenericCommand'); + } + + _WebSocketPlus.prototype.send.call(this, message); + + if (!waitingForRespond) { + return _Promise.resolve(); + } + return new _Promise(function (resolve, reject) { + _this2._commands[serialId] = { + resolve: resolve, + reject: reject + }; + setTimeout(function () { + if (_this2._commands[serialId]) { + debug$3('✗ %O timeout', trim$1(command)); + reject(new Error('Command Timeout.')); + delete _this2._commands[serialId]; + } + }, COMMAND_TIMEOUT); + }); + }; + + Connection.prototype.handleMessage = function handleMessage(msg) { + var message = void 0; + try { + message = GenericCommand.decode(msg); + debug$3('↓ %O received', trim$1(message)); + } catch (e) { + console.warn('Decode message failed', msg); + } + this.emit('allmessage', message); + var serialId = message.i; + if (serialId) { + if (this._commands[serialId]) { + if (message.cmd === CommandType.error) { + this._commands[serialId].reject(createError$3(message.errorMessage)); + } else { + this._commands[serialId].resolve(message); + } + delete this._commands[serialId]; + } else { + console.warn('Unexpected command received with serialId [' + serialId + '],\n which have timed out or never been requested.'); + } + } else if (message.cmd === CommandType.error) { + this.emit('error', createError$3(message.errorMessage)); + } else { + this.emit('message', message); + } + }; + + Connection.prototype.ping = function ping() { + return this.send(new GenericCommand({ + cmd: CommandType.echo + })).catch(function (error$$1) { + return debug$3('ping failed:', error$$1); + }); + }; + + return Connection; + }(WebSocketPlus); + + /* eslint-disable max-len */ + + /** + * 插件接口 + * + *

+ * 插件是由一个或多个扩展点组成的字典。SDK 的扩展点可以分为两类: + *

+ * 第一类扩展点是类实例化之后的回调,包括 RealtimeIMClientConversation。这些扩展点可以通过一个同步的 Decorator 进行扩展。Decorator 接受一个对应的实例并对其进行一些操作。 + * 特别的,由于注册自定义消息类这个需求特别的常用,额外定义一个 messageClasses 扩展点来做这件事情。 + *

+ * 第二类扩展点是在某些事件处理前、后可以注入逻辑的点。 + * 其中 beforeMessageParseafterMessageParse 可以通过一个异步的 Middleware 进行扩展。Middleware 接受一个对象,返回一个同类型对象或同类型对象的 Promise。 + * beforeMessageDispatch 可以通过返回一个 boolean 类型的 shouldDispatch 值来控制是否要继续派发收到的消息。 + *

+ * 如果使用了多个插件,这些 hook 会按照插件数组的顺序依次执行。前一个 Middleware 的返回值会作为参数传给后一个 Middleware。 + * + * @interface Plugin + * @since 3.1.0 + */ + + /* eslint-enable max-len */ + + /** + * 插件名称,用于在日志中显示异常的插件 + * + * @name Plugin.name + * @type string + */ + + /** + * 插件注册的消息类型 + * + * @name Plugin.messageClasses + * @type AVMessage[] + */ + + /** + * 在 Realtime 实例化后对其进行修饰。 + *

+ * 接受一个参数为 Realtime 实例。 + * + * @name Plugin.onRealtimeCreate + * @type Function + */ + + /** + * 在 IMClient 实例化后对其进行修饰。 + *

+ * 接受一个参数为 IMClient 实例。 + * + * @name Plugin.onIMClientCreate + * @type Function + */ + + /** + * 在 Conversation 实例化后对其进行修饰。 + *

+ * 接受一个参数为 Conversation 实例。 + * 需要注意的是,该扩展点并不是在 {@link IMClient#createConversation} 方法创建成功后调用的 hook, + * 而是所有的 Conversation 实例化的时候(包括但不限于 query 时)调用的 hook。 + * + * @name Plugin.onConversationCreate + * @type Function + */ + + /** + * 在对消息进行 parse 之前,对原始消息进行修改。 + *

+ * 接受一个参数为原始消息,是某个消息 JSON 化(message.toJSON())的返回值,一般是一个 JSON 对象。 + * 该方法需要返回一个 JSON 对象。如果这个结果是异步得到的,也可以返回一个 Promise(fulfilled with a JSON)。 + * + * @name Plugin.beforeMessageParse + * @type Function + */ + + /** + * 在对消息进行 parse 之后,对消息实例进行修改。 + *

+ * 接受一个参数为消息实例,一般是一个已注册的 Message 类或其子类的实例。 + * 该方法需要返回一个同类型的消息实例。如果这个结果是异步得到的,也可以返回一个 Promise。 + * + * @name Plugin.afterMessageParse + * @type Function + */ + + /** + * 在收到消息之后,派发消息之前,控制是否派发这条消息。 + *

+ * 接受参数为 message 与 conversation。 + * 该方法需要返回 boolean 类型的值,如果返回 false 则 SDK 不再派发这条消息,后续的 beforeMessageDispatch 也不会执行。 + * 如果这个结果是异步得到的,也可以返回一个 Promise。 + * + * @name Plugin.beforeMessageDispatch + * @type Function + * @since 3.4.0 + */ + + var checkType = function checkType(middleware) { + return function (param) { + var constructor = param.constructor; + + return _Promise.resolve(param).then(middleware).then(tap(function (result) { + if (result === undefined || result === null) { + // eslint-disable-next-line max-len + return console.warn('Middleware[' + (middleware._pluginName || 'anonymous plugin') + ':' + (middleware.name || 'anonymous middleware') + '] param/return types not match. It returns ' + result + ' while a ' + param.constructor.name + ' expected.'); + } + if (!(result instanceof constructor)) { + // eslint-disable-next-line max-len + return console.warn('Middleware[' + (middleware._pluginName || 'anonymous plugin') + ':' + (middleware.name || 'anonymous middleware') + '] param/return types not match. It returns a ' + result.constructor.name + ' while a ' + param.constructor.name + ' expected.'); + } + return 0; + })); + }; + }; + + var applyDecorators = function applyDecorators(decorators, target) { + if (decorators) { + decorators.forEach(function (decorator) { + try { + decorator(target); + } catch (error) { + if (decorator._pluginName) { + error.message += '[' + decorator._pluginName + ']'; + } + throw error; + } + }); + } + }; + + var applyMiddlewares = function applyMiddlewares(middlewares) { + return function (target) { + return ensureArray(middlewares).reduce(function (previousPromise, middleware) { + return previousPromise.then(checkType(middleware)).catch(function (error) { + if (middleware._pluginName) { + // eslint-disable-next-line no-param-reassign + error.message += '[' + middleware._pluginName + ']'; + } + throw error; + }); + }, _Promise.resolve(target)); + }; + }; + + var applyDispatcher = function applyDispatcher(dispatchers, payload) { + return ensureArray(dispatchers).reduce(function (resultPromise, dispatcher) { + return resultPromise.then(function (shouldDispatch) { + return shouldDispatch === false ? false : dispatcher.apply(undefined, _toConsumableArray(payload)); + }).catch(function (error) { + if (dispatcher._pluginName) { + // eslint-disable-next-line no-param-reassign + error.message += '[' + dispatcher._pluginName + ']'; + } + throw error; + }); + }, _Promise.resolve(true)); + }; + + var debug = browser$1('LC:Realtime'); + + var pushRouterCache = new Cache('push-router'); + + var Realtime = function (_EventEmitter) { + _inherits(Realtime, _EventEmitter); + + /** + * @extends EventEmitter + * @param {Object} options + * @param {String} options.appId + * @param {String} [options.region='cn'] 节点 id + * @param {Boolean} [options.pushOfflineMessages=false] 启用推送离线消息模式(默认为发送未读消息通知模式) + * @param {Boolean} [options.noBinary=false] 设置 WebSocket 使用字符串格式收发消息(默认为二进制格式)。 + * 适用于 WebSocket 实现不支持二进制数据格式的情况(如 React Native) + * @param {Boolean} [options.ssl=true] 使用 wss 进行连接 + * @param {Plugin[]} [options.plugins] 加载插件(since 3.1.0) + */ + function Realtime(options) { + _classCallCheck(this, Realtime); + + debug('initializing Realtime'); + + var _this = _possibleConstructorReturn(this, _EventEmitter.call(this)); + + if (typeof options.appId !== 'string') { + throw new TypeError('appId [' + options.appId + '] is not a string'); + } + _this._options = _Object$assign({ + appId: undefined, + region: 'cn', + pushOfflineMessages: false, + noBinary: isWeapp, + ssl: true, + server: process.env.SERVER + }, options); + _this._cache = new Cache('endpoints'); + internal(_this).clients = new _Set(); + _this._plugins = [].concat(_toConsumableArray(ensureArray(Realtime.__preRegisteredPlugins)), _toConsumableArray(ensureArray(options.plugins))).reduce(function (result, plugin) { + // eslint-disable-next-line no-restricted-syntax + for (var hook in plugin) { + if ({}.hasOwnProperty.call(plugin, hook) && hook !== 'name') { + if (plugin.name) { + ensureArray(plugin[hook]).forEach(function (value) { + // eslint-disable-next-line no-param-reassign + value._pluginName = plugin.name; + }); + } + // eslint-disable-next-line no-param-reassign + result[hook] = ensureArray(result[hook]).concat(plugin[hook]); + } + } + return result; + }, {}); + // onRealtimeCreate hook + applyDecorators(_this._plugins.onRealtimeCreate, _this); + return _this; + } + + Realtime.prototype._open = function _open() { + var _this2 = this; + + if (this._openPromise) return this._openPromise; + + var format = 'protobuf2'; + if (this._options.noBinary) { + // 不发送 binary data,fallback to base64 string + format = 'proto2base64'; + } + var version = 3; + if (this._options.pushOfflineMessages) { + // 不推送离线消息,而是发送对话的未读通知 + version = 1; + } + var protocol = { + format: format, + version: version + }; + this._openPromise = new _Promise(function (resolve, reject) { + debug('No connection established, create a new one.'); + var connection = new Connection(function () { + return _this2._getEndpoints(_this2._options); + }, protocol); + connection.on('open', function () { + return resolve(connection); + }); + connection.on('error', reject); + connection.on('message', _this2._dispatchCommand.bind(_this2)); + /** + * 连接断开。 + * 连接断开可能是因为 SDK 进入了离线状态(see {@link Realtime#event:offline}),或长时间没有收到服务器心跳。 + * 连接断开后所有的网络操作都会失败,请在连接断开后禁用相关的 UI 元素。 + * @event Realtime#disconnect + */ + /** + * 计划在一段时间后尝试重新连接 + * @event Realtime#schedule + * @param {Number} attempt 尝试重连的次数 + * @param {Number} delay 延迟的毫秒数 + */ + /** + * 正在尝试重新连接 + * @event Realtime#retry + * @param {Number} attempt 尝试重连的次数 + */ + /** + * 连接恢复正常。 + * 请重新启用在 {@link Realtime#event:disconnect} 事件中禁用的相关 UI 元素 + * @event Realtime#reconnect + */ + + /** + * 客户端连接断开 + * @event IMClient#disconnect + * @see Realtime#event:disconnect + * @since 3.2.0 + */ + /** + * 计划在一段时间后尝试重新连接 + * @event IMClient#schedule + * @param {Number} attempt 尝试重连的次数 + * @param {Number} delay 延迟的毫秒数 + * @since 3.2.0 + */ + /** + * 正在尝试重新连接 + * @event IMClient#retry + * @param {Number} attempt 尝试重连的次数 + * @since 3.2.0 + */ + + /** + * 客户端进入离线状态。 + * 这通常意味着网络已断开,或者 {@link Realtime#pause} 被调用 + * @event Realtime#offline + * @since 3.4.0 + */ + /** + * 客户端恢复在线状态 + * 这通常意味着网络已恢复,或者 {@link Realtime#resume} 被调用 + * @event Realtime#online + * @since 3.4.0 + */ + /** + * 进入离线状态。 + * 这通常意味着网络已断开,或者 {@link Realtime#pause} 被调用 + * @event IMClient#offline + * @since 3.4.0 + */ + /** + * 恢复在线状态 + * 这通常意味着网络已恢复,或者 {@link Realtime#resume} 被调用 + * @event IMClient#online + * @since 3.4.0 + */ + + // event proxy + ['disconnect', 'reconnect', 'retry', 'schedule', 'offline', 'online'].forEach(function (event) { + return connection.on(event, function () { + for (var _len = arguments.length, payload = Array(_len), _key = 0; _key < _len; _key++) { + payload[_key] = arguments[_key]; + } + + debug(event + ' event emitted. %O', payload); + _this2.emit.apply(_this2, [event].concat(payload)); + if (event !== 'reconnect') { + internal(_this2).clients.forEach(function (client) { + client.emit.apply(client, [event].concat(payload)); + }); + } + }); + }); + // override handleClose + connection.handleClose = function handleClose(event) { + var isFatal = [ErrorCode.APP_NOT_AVAILABLE, ErrorCode.INVALID_LOGIN, ErrorCode.INVALID_ORIGIN].some(function (errorCode) { + return errorCode === event.code; + }); + if (isFatal) { + // in these cases, SDK should throw. + this.throw(createError$3(event)); + } else { + // reconnect + this.disconnect(); + } + }; + internal(_this2).connection = connection; + }).catch(function (error$$1) { + delete _this2._openPromise; + throw error$$1; + }); + + return this._openPromise; + }; + + Realtime.prototype._getEndpoints = function _getEndpoints(options) { + var _this3 = this; + + return _Promise.resolve(this._cache.get('endpoints') || this.constructor._fetchEndpointsInfo(options).then(tap(function (info) { + return _this3._cache.set('endpoints', info, info.ttl * 1000); + }))).then(function (info) { + debug('endpoint info: %O', info); + return [info.server, info.secondary]; + }); + }; + + Realtime._fetchPushRouter = function _fetchPushRouter(_ref) { + var appId = _ref.appId, + region = _ref.region; + + debug('fetch router'); + switch (region) { + case 'cn': + { + var cachedPushRouter = pushRouterCache.get(appId); + if (cachedPushRouter) { + return _Promise.resolve(cachedPushRouter); + } + return axios.get('https://app-router.leancloud.cn/1/route', { + params: { + appId: appId + }, + timeout: 20000 + }).then(function (res) { + return res.data; + }).then(tap(debug)).then(function (route) { + var pushRouter = route.push_router_server; + if (!pushRouter) { + throw new Error('push router not exists'); + } + var ttl = route.ttl; + if (typeof ttl !== 'number') { + ttl = 3600; + } + pushRouterCache.set(appId, pushRouter, ttl * 1000); + return pushRouter; + }).catch(function () { + return 'router-g0-push.leancloud.cn'; + }); + } + case 'us': + return _Promise.resolve('router-a0-push.leancloud.cn'); + default: + throw new Error('Region [' + region + '] is not supported.'); + } + }; + + Realtime._fetchEndpointsInfo = function _fetchEndpointsInfo(_ref2) { + var appId = _ref2.appId, + region = _ref2.region, + ssl = _ref2.ssl, + server = _ref2.server; + + debug('fetch endpoint info'); + return this._fetchPushRouter({ appId: appId, region: region }).then(tap(debug)).then(function (router) { + return axios.get('https://' + router + '/v1/route', { + params: { + appId: appId, + secure: ssl, + features: isWeapp ? 'wechat' : undefined, + server: server, + _t: Date.now() + }, + timeout: 20000 + }).then(function (res) { + return res.data; + }).then(tap(debug)); + }); + }; + + Realtime.prototype._close = function _close() { + if (this._openPromise) { + this._openPromise.then(function (connection) { + return connection.close(); + }); + } + delete this._openPromise; + }; + + /** + * 手动进行重连。 + * SDK 在网络出现异常时会自动按照一定的时间间隔尝试重连,调用该方法会立即尝试重连并重置重连尝试计数器。 + * 只能在 `schedule` 事件之后,`retry` 事件之前调用,如果当前网络正常或者正在进行重连,调用该方法会抛异常。 + */ + + + Realtime.prototype.retry = function retry() { + var connection = internal(this).connection; + if (!connection) { + throw new Error('no connection established'); + } + if (connection.cannot('retry')) { + throw new Error('retrying not allowed when not disconnected. the connection is now ' + connection.current); + } + return connection.retry(); + }; + /** + * 暂停,使 SDK 进入离线状态。 + * 你可以在网络断开、应用进入后台等时刻调用该方法让 SDK 进入离线状态,离线状态下不会尝试重连。 + * 在浏览器中 SDK 会自动监听网络变化,因此无需手动调用该方法。 + * + * @since 3.4.0 + * @see Realtime#event:offline + */ + + + Realtime.prototype.pause = function pause() { + // 这个方法常常在网络断开、进入后台时被调用,此时 connection 可能没有建立或者已经 close。 + // 因此不像 retry,这个方法应该尽可能 loose + var connection = internal(this).connection; + if (!connection) return; + if (connection.can('pause')) connection.pause(); + }; + /** + * 恢复在线状态。 + * 你可以在网络恢复、应用回到前台等时刻调用该方法让 SDK 恢复在线状态,恢复在线状态后 SDK 会开始尝试重连。 + * + * @since 3.4.0 + * @see Realtime#event:online + */ + + + Realtime.prototype.resume = function resume() { + // 与 pause 一样,这个方法应该尽可能 loose + var connection = internal(this).connection; + if (!connection) return; + if (connection.can('resume')) connection.resume(); + }; + + Realtime.prototype._register = function _register(client) { + internal(this).clients.add(client); + }; + + Realtime.prototype._deregister = function _deregister(client) { + internal(this).clients.delete(client); + if (internal(this).clients.size === 0) { + this._close(); + } + }; + + Realtime.prototype._dispatchCommand = function _dispatchCommand(command) { + return applyDispatcher(this._plugins.beforeCommandDispatch, [command, this]).then(function (shouldDispatch) { + // no plugin handled this command + if (shouldDispatch) return debug('[WARN] Unexpected message received: %O', trim$1(command)); + return false; + }); + }; + + return Realtime; + }(eventemitter3); + + // Unique ID creation requires a high quality random # generator. In the + // browser this is a little complicated due to unknown quality of Math.random() + // and inconsistent support for the `crypto` API. We do the best we can via + // feature-detection + var rng; + + var crypto = commonjsGlobal.crypto || commonjsGlobal.msCrypto; // for IE 11 + if (crypto && crypto.getRandomValues) { + // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto + var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef + rng = function whatwgRNG() { + crypto.getRandomValues(rnds8); + return rnds8; + }; + } + + if (!rng) { + // Math.random()-based (RNG) + // + // If all else fails, use Math.random(). It's fast, but is of unspecified + // quality. + var rnds = new Array(16); + rng = function() { + for (var i = 0, r; i < 16; i++) { + if ((i & 0x03) === 0) r = Math.random() * 0x100000000; + rnds[i] = r >>> ((i & 0x03) << 3) & 0xff; + } + + return rnds; + }; + } + + var rngBrowser = rng; + + /** + * Convert array of 16 byte values to UUID string format of the form: + * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX + */ + var byteToHex = []; + for (var i$1 = 0; i$1 < 256; ++i$1) { + byteToHex[i$1] = (i$1 + 0x100).toString(16).substr(1); + } + + function bytesToUuid(buf, offset) { + var i = offset || 0; + var bth = byteToHex; + return bth[buf[i++]] + bth[buf[i++]] + + bth[buf[i++]] + bth[buf[i++]] + '-' + + bth[buf[i++]] + bth[buf[i++]] + '-' + + bth[buf[i++]] + bth[buf[i++]] + '-' + + bth[buf[i++]] + bth[buf[i++]] + '-' + + bth[buf[i++]] + bth[buf[i++]] + + bth[buf[i++]] + bth[buf[i++]] + + bth[buf[i++]] + bth[buf[i++]]; + } + + var bytesToUuid_1 = bytesToUuid; + + function v4(options, buf, offset) { + var i = buf && offset || 0; + + if (typeof(options) == 'string') { + buf = options == 'binary' ? new Array(16) : null; + options = null; + } + options = options || {}; + + var rnds = options.random || (options.rng || rngBrowser)(); + + // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` + rnds[6] = (rnds[6] & 0x0f) | 0x40; + rnds[8] = (rnds[8] & 0x3f) | 0x80; + + // Copy bytes to buffer, if provided + if (buf) { + for (var ii = 0; ii < 16; ++ii) { + buf[i + ii] = rnds[ii]; + } + } + + return buf || bytesToUuid_1(rnds); + } + + var v4_1 = v4; + + var objectWithoutProperties = createCommonjsModule(function (module, exports) { + "use strict"; + + exports.__esModule = true; + + exports.default = 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; + }; + }); + + var _objectWithoutProperties = unwrapExports(objectWithoutProperties); + + var ITERATOR$4 = _wks('iterator'); + + var core_isIterable = _core.isIterable = function (it) { + var O = Object(it); + return O[ITERATOR$4] !== undefined + || '@@iterator' in O + // eslint-disable-next-line no-prototype-builtins + || _iterators.hasOwnProperty(_classof(O)); + }; + + var isIterable$2 = core_isIterable; + + var isIterable = createCommonjsModule(function (module) { + module.exports = { "default": isIterable$2, __esModule: true }; + }); + + var core_getIterator = _core.getIterator = function (it) { + var iterFn = core_getIteratorMethod(it); + if (typeof iterFn != 'function') throw TypeError(it + ' is not iterable!'); + return _anObject(iterFn.call(it)); + }; + + var getIterator$1 = core_getIterator; + + var getIterator = createCommonjsModule(function (module) { + module.exports = { "default": getIterator$1, __esModule: true }; + }); + + var _getIterator = unwrapExports(getIterator); + + var slicedToArray = createCommonjsModule(function (module, exports) { + "use strict"; + + exports.__esModule = true; + + + + var _isIterable3 = _interopRequireDefault(isIterable); + + + + var _getIterator3 = _interopRequireDefault(getIterator); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + exports.default = function () { + function sliceIterator(arr, i) { + var _arr = []; + var _n = true; + var _d = false; + var _e = undefined; + + try { + for (var _i = (0, _getIterator3.default)(arr), _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 ((0, _isIterable3.default)(Object(arr))) { + return sliceIterator(arr, i); + } else { + throw new TypeError("Invalid attempt to destructure non-iterable instance"); + } + }; + }(); + }); + + var _slicedToArray = unwrapExports(slicedToArray); + + // 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined) + + var $find = _arrayMethods(5); + var KEY = 'find'; + var forced = true; + // Shouldn't skip holes + if (KEY in []) Array(1)[KEY](function () { forced = false; }); + _export(_export.P + _export.F * forced, 'Array', { + find: function find(callbackfn /* , that = undefined */) { + return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + } + }); + _addToUnscopables(KEY); + + var find$1 = _core.Array.find; + + var find = createCommonjsModule(function (module) { + module.exports = { "default": find$1, __esModule: true }; + }); + + var _Array$find = unwrapExports(find); + + /** Used for built-in method references. */ + var objectProto$5 = Object.prototype; + + /** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ + function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$5; + + return value === proto; + } + + var _isPrototype = isPrototype; + + /* Built-in method references for those with the same name as other `lodash` methods. */ + var nativeKeys = _overArg(Object.keys, Object); + + var _nativeKeys = nativeKeys; + + /** Used for built-in method references. */ + var objectProto$4 = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty$4 = objectProto$4.hasOwnProperty; + + /** + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function baseKeys(object) { + if (!_isPrototype(object)) { + return _nativeKeys(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty$4.call(object, key) && key != 'constructor') { + result.push(key); + } + } + return result; + } + + var _baseKeys = baseKeys; + + /** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ + function isObject$2(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); + } + + var isObject_1 = isObject$2; + + /** `Object#toString` result references. */ + var asyncTag = '[object AsyncFunction]'; + var funcTag = '[object Function]'; + var genTag = '[object GeneratorFunction]'; + var proxyTag = '[object Proxy]'; + + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + function isFunction$1(value) { + if (!isObject_1(value)) { + return false; + } + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 9 which returns 'object' for typed arrays and other constructors. + var tag = _baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; + } + + var isFunction_1 = isFunction$1; + + /** Used to detect overreaching core-js shims. */ + var coreJsData = _root['__core-js_shared__']; + + var _coreJsData = coreJsData; + + /** Used to detect methods masquerading as native. */ + var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(_coreJsData && _coreJsData.keys && _coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; + }()); + + /** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ + function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); + } + + var _isMasked = isMasked; + + /** Used for built-in method references. */ + var funcProto$2 = Function.prototype; + + /** Used to resolve the decompiled source of functions. */ + var funcToString$2 = funcProto$2.toString; + + /** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to convert. + * @returns {string} Returns the source code. + */ + function toSource(func) { + if (func != null) { + try { + return funcToString$2.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} + } + return ''; + } + + var _toSource = toSource; + + /** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ + var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + + /** Used to detect host constructors (Safari). */ + var reIsHostCtor = /^\[object .+?Constructor\]$/; + + /** Used for built-in method references. */ + var funcProto$1 = Function.prototype; + var objectProto$6 = Object.prototype; + + /** Used to resolve the decompiled source of functions. */ + var funcToString$1 = funcProto$1.toString; + + /** Used to check objects for own properties. */ + var hasOwnProperty$5 = objectProto$6.hasOwnProperty; + + /** Used to detect if a method is native. */ + var reIsNative = RegExp('^' + + funcToString$1.call(hasOwnProperty$5).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' + ); + + /** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ + function baseIsNative(value) { + if (!isObject_1(value) || _isMasked(value)) { + return false; + } + var pattern = isFunction_1(value) ? reIsNative : reIsHostCtor; + return pattern.test(_toSource(value)); + } + + var _baseIsNative = baseIsNative; + + /** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ + function getValue(object, key) { + return object == null ? undefined : object[key]; + } + + var _getValue = getValue; + + /** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ + function getNative(object, key) { + var value = _getValue(object, key); + return _baseIsNative(value) ? value : undefined; + } + + var _getNative = getNative; + + /* Built-in method references that are verified to be native. */ + var DataView = _getNative(_root, 'DataView'); + + var _DataView = DataView; + + /* Built-in method references that are verified to be native. */ + var Map = _getNative(_root, 'Map'); + + var _Map = Map; + + /* Built-in method references that are verified to be native. */ + var Promise$1 = _getNative(_root, 'Promise'); + + var _Promise$1 = Promise$1; + + /* Built-in method references that are verified to be native. */ + var Set = _getNative(_root, 'Set'); + + var _Set$1 = Set; + + /* Built-in method references that are verified to be native. */ + var WeakMap = _getNative(_root, 'WeakMap'); + + var _WeakMap$1 = WeakMap; + + /** `Object#toString` result references. */ + var mapTag$1 = '[object Map]'; + var objectTag$1 = '[object Object]'; + var promiseTag = '[object Promise]'; + var setTag$1 = '[object Set]'; + var weakMapTag = '[object WeakMap]'; + + var dataViewTag = '[object DataView]'; + + /** Used to detect maps, sets, and weakmaps. */ + var dataViewCtorString = _toSource(_DataView); + var mapCtorString = _toSource(_Map); + var promiseCtorString = _toSource(_Promise$1); + var setCtorString = _toSource(_Set$1); + var weakMapCtorString = _toSource(_WeakMap$1); + + /** + * Gets the `toStringTag` of `value`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + var getTag = _baseGetTag; + + // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. + if ((_DataView && getTag(new _DataView(new ArrayBuffer(1))) != dataViewTag) || + (_Map && getTag(new _Map) != mapTag$1) || + (_Promise$1 && getTag(_Promise$1.resolve()) != promiseTag) || + (_Set$1 && getTag(new _Set$1) != setTag$1) || + (_WeakMap$1 && getTag(new _WeakMap$1) != weakMapTag)) { + getTag = function(value) { + var result = _baseGetTag(value), + Ctor = result == objectTag$1 ? value.constructor : undefined, + ctorString = Ctor ? _toSource(Ctor) : ''; + + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: return dataViewTag; + case mapCtorString: return mapTag$1; + case promiseCtorString: return promiseTag; + case setCtorString: return setTag$1; + case weakMapCtorString: return weakMapTag; + } + } + return result; + }; + } + + var _getTag = getTag; + + /** `Object#toString` result references. */ + var argsTag = '[object Arguments]'; + + /** + * The base implementation of `_.isArguments`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + */ + function baseIsArguments(value) { + return isObjectLike_1(value) && _baseGetTag(value) == argsTag; + } + + var _baseIsArguments = baseIsArguments; + + /** Used for built-in method references. */ + var objectProto$7 = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty$6 = objectProto$7.hasOwnProperty; + + /** Built-in value references. */ + var propertyIsEnumerable = objectProto$7.propertyIsEnumerable; + + /** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ + var isArguments = _baseIsArguments(function() { return arguments; }()) ? _baseIsArguments : function(value) { + return isObjectLike_1(value) && hasOwnProperty$6.call(value, 'callee') && + !propertyIsEnumerable.call(value, 'callee'); + }; + + var isArguments_1 = isArguments; + + /** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ + var isArray$2 = Array.isArray; + + var isArray_1 = isArray$2; + + /** Used as references for various `Number` constants. */ + var MAX_SAFE_INTEGER = 9007199254740991; + + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ + function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + + var isLength_1 = isLength; + + /** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ + function isArrayLike(value) { + return value != null && isLength_1(value.length) && !isFunction_1(value); + } + + var isArrayLike_1 = isArrayLike; + + /** + * This method returns `false`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `false`. + * @example + * + * _.times(2, _.stubFalse); + * // => [false, false] + */ + function stubFalse() { + return false; + } + + var stubFalse_1 = stubFalse; + + var isBuffer_1$2 = createCommonjsModule(function (module, exports) { + /** Detect free variable `exports`. */ + var freeExports = 'object' == 'object' && exports && !exports.nodeType && exports; + + /** Detect free variable `module`. */ + var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module; + + /** Detect the popular CommonJS extension `module.exports`. */ + var moduleExports = freeModule && freeModule.exports === freeExports; + + /** Built-in value references. */ + var Buffer = moduleExports ? _root.Buffer : undefined; + + /* Built-in method references for those with the same name as other `lodash` methods. */ + var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined; + + /** + * Checks if `value` is a buffer. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. + * @example + * + * _.isBuffer(new Buffer(2)); + * // => true + * + * _.isBuffer(new Uint8Array(2)); + * // => false + */ + var isBuffer = nativeIsBuffer || stubFalse_1; + + module.exports = isBuffer; + }); + + /** `Object#toString` result references. */ + var argsTag$1 = '[object Arguments]'; + var arrayTag = '[object Array]'; + var boolTag = '[object Boolean]'; + var dateTag = '[object Date]'; + var errorTag = '[object Error]'; + var funcTag$1 = '[object Function]'; + var mapTag$2 = '[object Map]'; + var numberTag = '[object Number]'; + var objectTag$2 = '[object Object]'; + var regexpTag = '[object RegExp]'; + var setTag$2 = '[object Set]'; + var stringTag = '[object String]'; + var weakMapTag$1 = '[object WeakMap]'; + + var arrayBufferTag = '[object ArrayBuffer]'; + var dataViewTag$1 = '[object DataView]'; + var float32Tag = '[object Float32Array]'; + var float64Tag = '[object Float64Array]'; + var int8Tag = '[object Int8Array]'; + var int16Tag = '[object Int16Array]'; + var int32Tag = '[object Int32Array]'; + var uint8Tag = '[object Uint8Array]'; + var uint8ClampedTag = '[object Uint8ClampedArray]'; + var uint16Tag = '[object Uint16Array]'; + var uint32Tag = '[object Uint32Array]'; + + /** Used to identify `toStringTag` values of typed arrays. */ + var typedArrayTags = {}; + typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = + typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = + typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = + typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = + typedArrayTags[uint32Tag] = true; + typedArrayTags[argsTag$1] = typedArrayTags[arrayTag] = + typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = + typedArrayTags[dataViewTag$1] = typedArrayTags[dateTag] = + typedArrayTags[errorTag] = typedArrayTags[funcTag$1] = + typedArrayTags[mapTag$2] = typedArrayTags[numberTag] = + typedArrayTags[objectTag$2] = typedArrayTags[regexpTag] = + typedArrayTags[setTag$2] = typedArrayTags[stringTag] = + typedArrayTags[weakMapTag$1] = false; + + /** + * The base implementation of `_.isTypedArray` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + */ + function baseIsTypedArray(value) { + return isObjectLike_1(value) && + isLength_1(value.length) && !!typedArrayTags[_baseGetTag(value)]; + } + + var _baseIsTypedArray = baseIsTypedArray; + + /** + * The base implementation of `_.unary` without support for storing metadata. + * + * @private + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + */ + function baseUnary(func) { + return function(value) { + return func(value); + }; + } + + var _baseUnary = baseUnary; + + var _nodeUtil = createCommonjsModule(function (module, exports) { + /** Detect free variable `exports`. */ + var freeExports = 'object' == 'object' && exports && !exports.nodeType && exports; + + /** Detect free variable `module`. */ + var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module; + + /** Detect the popular CommonJS extension `module.exports`. */ + var moduleExports = freeModule && freeModule.exports === freeExports; + + /** Detect free variable `process` from Node.js. */ + var freeProcess = moduleExports && _freeGlobal.process; + + /** Used to access faster Node.js helpers. */ + var nodeUtil = (function() { + try { + return freeProcess && freeProcess.binding && freeProcess.binding('util'); + } catch (e) {} + }()); + + module.exports = nodeUtil; + }); + + /* Node.js helper references. */ + var nodeIsTypedArray = _nodeUtil && _nodeUtil.isTypedArray; + + /** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ + var isTypedArray = nodeIsTypedArray ? _baseUnary(nodeIsTypedArray) : _baseIsTypedArray; + + var isTypedArray_1 = isTypedArray; + + /** `Object#toString` result references. */ + var mapTag = '[object Map]'; + var setTag = '[object Set]'; + + /** Used for built-in method references. */ + var objectProto$3 = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty$3 = objectProto$3.hasOwnProperty; + + /** + * Checks if `value` is an empty object, collection, map, or set. + * + * Objects are considered empty if they have no own enumerable string keyed + * properties. + * + * Array-like values such as `arguments` objects, arrays, buffers, strings, or + * jQuery-like collections are considered empty if they have a `length` of `0`. + * Similarly, maps and sets are considered empty if they have a `size` of `0`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is empty, else `false`. + * @example + * + * _.isEmpty(null); + * // => true + * + * _.isEmpty(true); + * // => true + * + * _.isEmpty(1); + * // => true + * + * _.isEmpty([1, 2, 3]); + * // => false + * + * _.isEmpty({ 'a': 1 }); + * // => false + */ + function isEmpty(value) { + if (value == null) { + return true; + } + if (isArrayLike_1(value) && + (isArray_1(value) || typeof value == 'string' || typeof value.splice == 'function' || + isBuffer_1$2(value) || isTypedArray_1(value) || isArguments_1(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$3.call(value, key)) { + return false; + } + } + return true; + } + + var isEmpty_1 = isEmpty; + + /** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ + function listCacheClear() { + this.__data__ = []; + this.size = 0; + } + + var _listCacheClear = listCacheClear; + + /** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ + function eq(value, other) { + return value === other || (value !== value && other !== other); + } + + var eq_1 = eq; + + /** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq_1(array[length][0], key)) { + return length; + } + } + return -1; + } + + var _assocIndexOf = assocIndexOf; + + /** Used for built-in method references. */ + var arrayProto = Array.prototype; + + /** Built-in value references. */ + var splice = arrayProto.splice; + + /** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + 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; + } + + var _listCacheDelete = listCacheDelete; + + /** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function listCacheGet(key) { + var data = this.__data__, + index = _assocIndexOf(data, key); + + return index < 0 ? undefined : data[index][1]; + } + + var _listCacheGet = listCacheGet; + + /** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function listCacheHas(key) { + return _assocIndexOf(this.__data__, key) > -1; + } + + var _listCacheHas = listCacheHas; + + /** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ + 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; + } + + var _listCacheSet = listCacheSet; + + /** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + 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]); + } + } + + // Add methods to `ListCache`. + ListCache.prototype.clear = _listCacheClear; + ListCache.prototype['delete'] = _listCacheDelete; + ListCache.prototype.get = _listCacheGet; + ListCache.prototype.has = _listCacheHas; + ListCache.prototype.set = _listCacheSet; + + var _ListCache = ListCache; + + /** + * Removes all key-value entries from the stack. + * + * @private + * @name clear + * @memberOf Stack + */ + function stackClear() { + this.__data__ = new _ListCache; + this.size = 0; + } + + var _stackClear = stackClear; + + /** + * Removes `key` and its value from the stack. + * + * @private + * @name delete + * @memberOf Stack + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function stackDelete(key) { + var data = this.__data__, + result = data['delete'](key); + + this.size = data.size; + return result; + } + + var _stackDelete = stackDelete; + + /** + * Gets the stack value for `key`. + * + * @private + * @name get + * @memberOf Stack + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function stackGet(key) { + return this.__data__.get(key); + } + + var _stackGet = stackGet; + + /** + * Checks if a stack value for `key` exists. + * + * @private + * @name has + * @memberOf Stack + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function stackHas(key) { + return this.__data__.has(key); + } + + var _stackHas = stackHas; + + /* Built-in method references that are verified to be native. */ + var nativeCreate = _getNative(Object, 'create'); + + var _nativeCreate = nativeCreate; + + /** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ + function hashClear() { + this.__data__ = _nativeCreate ? _nativeCreate(null) : {}; + this.size = 0; + } + + var _hashClear = hashClear; + + /** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; + return result; + } + + var _hashDelete = hashDelete; + + /** Used to stand-in for `undefined` hash values. */ + var HASH_UNDEFINED = '__lodash_hash_undefined__'; + + /** Used for built-in method references. */ + var objectProto$8 = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty$7 = objectProto$8.hasOwnProperty; + + /** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function hashGet(key) { + var data = this.__data__; + if (_nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty$7.call(data, key) ? data[key] : undefined; + } + + var _hashGet = hashGet; + + /** Used for built-in method references. */ + var objectProto$9 = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty$8 = objectProto$9.hasOwnProperty; + + /** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function hashHas(key) { + var data = this.__data__; + return _nativeCreate ? (data[key] !== undefined) : hasOwnProperty$8.call(data, key); + } + + var _hashHas = hashHas; + + /** Used to stand-in for `undefined` hash values. */ + var HASH_UNDEFINED$1 = '__lodash_hash_undefined__'; + + /** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ + function hashSet(key, value) { + var data = this.__data__; + this.size += this.has(key) ? 0 : 1; + data[key] = (_nativeCreate && value === undefined) ? HASH_UNDEFINED$1 : value; + return this; + } + + var _hashSet = hashSet; + + /** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + 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]); + } + } + + // Add methods to `Hash`. + Hash.prototype.clear = _hashClear; + Hash.prototype['delete'] = _hashDelete; + Hash.prototype.get = _hashGet; + Hash.prototype.has = _hashHas; + Hash.prototype.set = _hashSet; + + var _Hash = Hash; + + /** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ + function mapCacheClear() { + this.size = 0; + this.__data__ = { + 'hash': new _Hash, + 'map': new (_Map || _ListCache), + 'string': new _Hash + }; + } + + var _mapCacheClear = mapCacheClear; + + /** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ + function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); + } + + var _isKeyable = isKeyable; + + /** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ + function getMapData(map, key) { + var data = map.__data__; + return _isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; + } + + var _getMapData = getMapData; + + /** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function mapCacheDelete(key) { + var result = _getMapData(this, key)['delete'](key); + this.size -= result ? 1 : 0; + return result; + } + + var _mapCacheDelete = mapCacheDelete; + + /** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function mapCacheGet(key) { + return _getMapData(this, key).get(key); + } + + var _mapCacheGet = mapCacheGet; + + /** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function mapCacheHas(key) { + return _getMapData(this, key).has(key); + } + + var _mapCacheHas = mapCacheHas; + + /** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ + 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; + } + + var _mapCacheSet = mapCacheSet; + + /** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + 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]); + } + } + + // Add methods to `MapCache`. + MapCache.prototype.clear = _mapCacheClear; + MapCache.prototype['delete'] = _mapCacheDelete; + MapCache.prototype.get = _mapCacheGet; + MapCache.prototype.has = _mapCacheHas; + MapCache.prototype.set = _mapCacheSet; + + var _MapCache = MapCache; + + /** Used as the size to enable large array optimizations. */ + var LARGE_ARRAY_SIZE = 200; + + /** + * Sets the stack `key` to `value`. + * + * @private + * @name set + * @memberOf Stack + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the stack cache instance. + */ + 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; + } + + var _stackSet = stackSet; + + /** + * Creates a stack cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function Stack(entries) { + var data = this.__data__ = new _ListCache(entries); + this.size = data.size; + } + + // Add methods to `Stack`. + Stack.prototype.clear = _stackClear; + Stack.prototype['delete'] = _stackDelete; + Stack.prototype.get = _stackGet; + Stack.prototype.has = _stackHas; + Stack.prototype.set = _stackSet; + + var _Stack = Stack; + + /** + * A specialized version of `_.forEach` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ + 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; + } + + var _arrayEach = arrayEach; + + var defineProperty$5 = (function() { + try { + var func = _getNative(Object, 'defineProperty'); + func({}, '', {}); + return func; + } catch (e) {} + }()); + + var _defineProperty$2 = defineProperty$5; + + /** + * The base implementation of `assignValue` and `assignMergeValue` without + * value checks. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function baseAssignValue(object, key, value) { + if (key == '__proto__' && _defineProperty$2) { + _defineProperty$2(object, key, { + 'configurable': true, + 'enumerable': true, + 'value': value, + 'writable': true + }); + } else { + object[key] = value; + } + } + + var _baseAssignValue = baseAssignValue; + + /** Used for built-in method references. */ + var objectProto$10 = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty$9 = objectProto$10.hasOwnProperty; + + /** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty$9.call(object, key) && eq_1(objValue, value)) || + (value === undefined && !(key in object))) { + _baseAssignValue(object, key, value); + } + } + + var _assignValue = assignValue; + + /** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property identifiers to copy. + * @param {Object} [object={}] The object to copy properties to. + * @param {Function} [customizer] The function to customize copied values. + * @returns {Object} Returns `object`. + */ + 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; + } + + var _copyObject = copyObject; + + /** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ + function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); + + while (++index < n) { + result[index] = iteratee(index); + } + return result; + } + + var _baseTimes = baseTimes; + + /** Used as references for various `Number` constants. */ + var MAX_SAFE_INTEGER$1 = 9007199254740991; + + /** Used to detect unsigned integer values. */ + var reIsUint = /^(?:0|[1-9]\d*)$/; + + /** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ + function isIndex(value, length) { + length = length == null ? MAX_SAFE_INTEGER$1 : length; + return !!length && + (typeof value == 'number' || reIsUint.test(value)) && + (value > -1 && value % 1 == 0 && value < length); + } + + var _isIndex = isIndex; + + /** Used for built-in method references. */ + var objectProto$11 = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty$10 = objectProto$11.hasOwnProperty; + + /** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ + function arrayLikeKeys(value, inherited) { + var isArr = isArray_1(value), + isArg = !isArr && isArguments_1(value), + isBuff = !isArr && !isArg && isBuffer_1$2(value), + isType = !isArr && !isArg && !isBuff && isTypedArray_1(value), + skipIndexes = isArr || isArg || isBuff || isType, + result = skipIndexes ? _baseTimes(value.length, String) : [], + length = result.length; + + for (var key in value) { + if ((inherited || hasOwnProperty$10.call(value, key)) && + !(skipIndexes && ( + // Safari 9 has enumerable `arguments.length` in strict mode. + key == 'length' || + // Node.js 0.10 has enumerable non-index properties on buffers. + (isBuff && (key == 'offset' || key == 'parent')) || + // PhantomJS 2 has enumerable non-index properties on typed arrays. + (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || + // Skip index properties. + _isIndex(key, length) + ))) { + result.push(key); + } + } + return result; + } + + var _arrayLikeKeys = arrayLikeKeys; + + /** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ + function keys$3(object) { + return isArrayLike_1(object) ? _arrayLikeKeys(object) : _baseKeys(object); + } + + var keys_1 = keys$3; + + /** + * The base implementation of `_.assign` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ + function baseAssign(object, source) { + return object && _copyObject(source, keys_1(source), object); + } + + var _baseAssign = baseAssign; + + /** + * This function is like + * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * except that it includes inherited enumerable properties. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } + } + return result; + } + + var _nativeKeysIn = nativeKeysIn; + + /** Used for built-in method references. */ + var objectProto$12 = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty$11 = objectProto$12.hasOwnProperty; + + /** + * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function baseKeysIn(object) { + if (!isObject_1(object)) { + return _nativeKeysIn(object); + } + var isProto = _isPrototype(object), + result = []; + + for (var key in object) { + if (!(key == 'constructor' && (isProto || !hasOwnProperty$11.call(object, key)))) { + result.push(key); + } + } + return result; + } + + var _baseKeysIn = baseKeysIn; + + /** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ + function keysIn$1(object) { + return isArrayLike_1(object) ? _arrayLikeKeys(object, true) : _baseKeysIn(object); + } + + var keysIn_1 = keysIn$1; + + /** + * The base implementation of `_.assignIn` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ + function baseAssignIn(object, source) { + return object && _copyObject(source, keysIn_1(source), object); + } + + var _baseAssignIn = baseAssignIn; + + var _cloneBuffer = createCommonjsModule(function (module, exports) { + /** Detect free variable `exports`. */ + var freeExports = 'object' == 'object' && exports && !exports.nodeType && exports; + + /** Detect free variable `module`. */ + var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module; + + /** Detect the popular CommonJS extension `module.exports`. */ + var moduleExports = freeModule && freeModule.exports === freeExports; + + /** Built-in value references. */ + var Buffer = moduleExports ? _root.Buffer : undefined, + allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined; + + /** + * Creates a clone of `buffer`. + * + * @private + * @param {Buffer} buffer The buffer to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Buffer} Returns the cloned buffer. + */ + 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; + }); + + /** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ + function copyArray(source, array) { + var index = -1, + length = source.length; + + array || (array = Array(length)); + while (++index < length) { + array[index] = source[index]; + } + return array; + } + + var _copyArray = copyArray; + + /** + * A specialized version of `_.filter` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ + 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; + } + + var _arrayFilter = arrayFilter; + + /** + * This method returns a new empty array. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Array} Returns the new empty array. + * @example + * + * var arrays = _.times(2, _.stubArray); + * + * console.log(arrays); + * // => [[], []] + * + * console.log(arrays[0] === arrays[1]); + * // => false + */ + function stubArray() { + return []; + } + + var stubArray_1 = stubArray; + + /** Used for built-in method references. */ + var objectProto$13 = Object.prototype; + + /** Built-in value references. */ + var propertyIsEnumerable$1 = objectProto$13.propertyIsEnumerable; + + /* Built-in method references for those with the same name as other `lodash` methods. */ + var nativeGetSymbols = Object.getOwnPropertySymbols; + + /** + * Creates an array of the own enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ + var getSymbols = !nativeGetSymbols ? stubArray_1 : function(object) { + if (object == null) { + return []; + } + object = Object(object); + return _arrayFilter(nativeGetSymbols(object), function(symbol) { + return propertyIsEnumerable$1.call(object, symbol); + }); + }; + + var _getSymbols = getSymbols; + + /** + * Copies own symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ + function copySymbols(source, object) { + return _copyObject(source, _getSymbols(source), object); + } + + var _copySymbols = copySymbols; + + /** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ + function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + return array; + } + + var _arrayPush = arrayPush; + + /* Built-in method references for those with the same name as other `lodash` methods. */ + var nativeGetSymbols$1 = Object.getOwnPropertySymbols; + + /** + * Creates an array of the own and inherited enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ + var getSymbolsIn = !nativeGetSymbols$1 ? stubArray_1 : function(object) { + var result = []; + while (object) { + _arrayPush(result, _getSymbols(object)); + object = _getPrototype(object); + } + return result; + }; + + var _getSymbolsIn = getSymbolsIn; + + /** + * Copies own and inherited symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ + function copySymbolsIn(source, object) { + return _copyObject(source, _getSymbolsIn(source), object); + } + + var _copySymbolsIn = copySymbolsIn; + + /** + * The base implementation of `getAllKeys` and `getAllKeysIn` which uses + * `keysFunc` and `symbolsFunc` to get the enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Function} keysFunc The function to get the keys of `object`. + * @param {Function} symbolsFunc The function to get the symbols of `object`. + * @returns {Array} Returns the array of property names and symbols. + */ + function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return isArray_1(object) ? result : _arrayPush(result, symbolsFunc(object)); + } + + var _baseGetAllKeys = baseGetAllKeys; + + /** + * Creates an array of own enumerable property names and symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ + function getAllKeys(object) { + return _baseGetAllKeys(object, keys_1, _getSymbols); + } + + var _getAllKeys = getAllKeys; + + /** + * Creates an array of own and inherited enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ + function getAllKeysIn(object) { + return _baseGetAllKeys(object, keysIn_1, _getSymbolsIn); + } + + var _getAllKeysIn = getAllKeysIn; + + /** Used for built-in method references. */ + var objectProto$14 = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty$12 = objectProto$14.hasOwnProperty; + + /** + * Initializes an array clone. + * + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the initialized clone. + */ + function initCloneArray(array) { + var length = array.length, + result = array.constructor(length); + + // Add properties assigned by `RegExp#exec`. + if (length && typeof array[0] == 'string' && hasOwnProperty$12.call(array, 'index')) { + result.index = array.index; + result.input = array.input; + } + return result; + } + + var _initCloneArray = initCloneArray; + + /** Built-in value references. */ + var Uint8Array$1 = _root.Uint8Array; + + var _Uint8Array = Uint8Array$1; + + /** + * Creates a clone of `arrayBuffer`. + * + * @private + * @param {ArrayBuffer} arrayBuffer The array buffer to clone. + * @returns {ArrayBuffer} Returns the cloned array buffer. + */ + function cloneArrayBuffer(arrayBuffer) { + var result = new arrayBuffer.constructor(arrayBuffer.byteLength); + new _Uint8Array(result).set(new _Uint8Array(arrayBuffer)); + return result; + } + + var _cloneArrayBuffer = cloneArrayBuffer; + + /** + * Creates a clone of `dataView`. + * + * @private + * @param {Object} dataView The data view to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned data view. + */ + function cloneDataView(dataView, isDeep) { + var buffer = isDeep ? _cloneArrayBuffer(dataView.buffer) : dataView.buffer; + return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); + } + + var _cloneDataView = cloneDataView; + + /** + * Adds the key-value `pair` to `map`. + * + * @private + * @param {Object} map The map to modify. + * @param {Array} pair The key-value pair to add. + * @returns {Object} Returns `map`. + */ + function addMapEntry(map, pair) { + // Don't return `map.set` because it's not chainable in IE 11. + map.set(pair[0], pair[1]); + return map; + } + + var _addMapEntry = addMapEntry; + + /** + * A specialized version of `_.reduce` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the first element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ + 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; + } + + var _arrayReduce = arrayReduce; + + /** + * Converts `map` to its key-value pairs. + * + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the key-value pairs. + */ + function mapToArray(map) { + var index = -1, + result = Array(map.size); + + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; + } + + var _mapToArray = mapToArray; + + /** Used to compose bitmasks for cloning. */ + var CLONE_DEEP_FLAG$2 = 1; + + /** + * Creates a clone of `map`. + * + * @private + * @param {Object} map The map to clone. + * @param {Function} cloneFunc The function to clone values. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned map. + */ + function cloneMap(map, isDeep, cloneFunc) { + var array = isDeep ? cloneFunc(_mapToArray(map), CLONE_DEEP_FLAG$2) : _mapToArray(map); + return _arrayReduce(array, _addMapEntry, new map.constructor); + } + + var _cloneMap = cloneMap; + + /** Used to match `RegExp` flags from their coerced string values. */ + var reFlags = /\w*$/; + + /** + * Creates a clone of `regexp`. + * + * @private + * @param {Object} regexp The regexp to clone. + * @returns {Object} Returns the cloned regexp. + */ + function cloneRegExp(regexp) { + var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); + result.lastIndex = regexp.lastIndex; + return result; + } + + var _cloneRegExp = cloneRegExp; + + /** + * Adds `value` to `set`. + * + * @private + * @param {Object} set The set to modify. + * @param {*} value The value to add. + * @returns {Object} Returns `set`. + */ + function addSetEntry(set, value) { + // Don't return `set.add` because it's not chainable in IE 11. + set.add(value); + return set; + } + + var _addSetEntry = addSetEntry; + + /** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ + function setToArray(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = value; + }); + return result; + } + + var _setToArray = setToArray; + + /** Used to compose bitmasks for cloning. */ + var CLONE_DEEP_FLAG$3 = 1; + + /** + * Creates a clone of `set`. + * + * @private + * @param {Object} set The set to clone. + * @param {Function} cloneFunc The function to clone values. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned set. + */ + function cloneSet(set, isDeep, cloneFunc) { + var array = isDeep ? cloneFunc(_setToArray(set), CLONE_DEEP_FLAG$3) : _setToArray(set); + return _arrayReduce(array, _addSetEntry, new set.constructor); + } + + var _cloneSet = cloneSet; + + /** Used to convert symbols to primitives and strings. */ + var symbolProto = _Symbol$1 ? _Symbol$1.prototype : undefined; + var symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; + + /** + * Creates a clone of the `symbol` object. + * + * @private + * @param {Object} symbol The symbol object to clone. + * @returns {Object} Returns the cloned symbol object. + */ + function cloneSymbol(symbol) { + return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; + } + + var _cloneSymbol = cloneSymbol; + + /** + * Creates a clone of `typedArray`. + * + * @private + * @param {Object} typedArray The typed array to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned typed array. + */ + function cloneTypedArray(typedArray, isDeep) { + var buffer = isDeep ? _cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; + return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); + } + + var _cloneTypedArray = cloneTypedArray; + + /** `Object#toString` result references. */ + var boolTag$2 = '[object Boolean]'; + var dateTag$2 = '[object Date]'; + var mapTag$4 = '[object Map]'; + var numberTag$2 = '[object Number]'; + var regexpTag$2 = '[object RegExp]'; + var setTag$4 = '[object Set]'; + var stringTag$2 = '[object String]'; + var symbolTag$1 = '[object Symbol]'; + + var arrayBufferTag$2 = '[object ArrayBuffer]'; + var dataViewTag$3 = '[object DataView]'; + var float32Tag$2 = '[object Float32Array]'; + var float64Tag$2 = '[object Float64Array]'; + var int8Tag$2 = '[object Int8Array]'; + var int16Tag$2 = '[object Int16Array]'; + var int32Tag$2 = '[object Int32Array]'; + var uint8Tag$2 = '[object Uint8Array]'; + var uint8ClampedTag$2 = '[object Uint8ClampedArray]'; + var uint16Tag$2 = '[object Uint16Array]'; + var uint32Tag$2 = '[object Uint32Array]'; + + /** + * Initializes an object clone based on its `toStringTag`. + * + * **Note:** This function only supports cloning values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to clone. + * @param {string} tag The `toStringTag` of the object to clone. + * @param {Function} cloneFunc The function to clone values. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the initialized clone. + */ + function initCloneByTag(object, tag, cloneFunc, isDeep) { + var Ctor = object.constructor; + switch (tag) { + case arrayBufferTag$2: + return _cloneArrayBuffer(object); + + case boolTag$2: + case dateTag$2: + return new Ctor(+object); + + case dataViewTag$3: + return _cloneDataView(object, isDeep); + + case float32Tag$2: case float64Tag$2: + case int8Tag$2: case int16Tag$2: case int32Tag$2: + case uint8Tag$2: case uint8ClampedTag$2: case uint16Tag$2: case uint32Tag$2: + return _cloneTypedArray(object, isDeep); + + case mapTag$4: + return _cloneMap(object, isDeep, cloneFunc); + + case numberTag$2: + case stringTag$2: + return new Ctor(object); + + case regexpTag$2: + return _cloneRegExp(object); + + case setTag$4: + return _cloneSet(object, isDeep, cloneFunc); + + case symbolTag$1: + return _cloneSymbol(object); + } + } + + var _initCloneByTag = initCloneByTag; + + /** Built-in value references. */ + var objectCreate = Object.create; + + /** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} proto The object to inherit from. + * @returns {Object} Returns the new object. + */ + var baseCreate = (function() { + function object() {} + return function(proto) { + if (!isObject_1(proto)) { + return {}; + } + if (objectCreate) { + return objectCreate(proto); + } + object.prototype = proto; + var result = new object; + object.prototype = undefined; + return result; + }; + }()); + + var _baseCreate = baseCreate; + + /** + * Initializes an object clone. + * + * @private + * @param {Object} object The object to clone. + * @returns {Object} Returns the initialized clone. + */ + function initCloneObject(object) { + return (typeof object.constructor == 'function' && !_isPrototype(object)) + ? _baseCreate(_getPrototype(object)) + : {}; + } + + var _initCloneObject = initCloneObject; + + /** Used to compose bitmasks for cloning. */ + var CLONE_DEEP_FLAG$1 = 1; + var CLONE_FLAT_FLAG = 2; + var CLONE_SYMBOLS_FLAG$1 = 4; + + /** `Object#toString` result references. */ + var argsTag$2 = '[object Arguments]'; + var arrayTag$1 = '[object Array]'; + var boolTag$1 = '[object Boolean]'; + var dateTag$1 = '[object Date]'; + var errorTag$1 = '[object Error]'; + var funcTag$2 = '[object Function]'; + var genTag$1 = '[object GeneratorFunction]'; + var mapTag$3 = '[object Map]'; + var numberTag$1 = '[object Number]'; + var objectTag$3 = '[object Object]'; + var regexpTag$1 = '[object RegExp]'; + var setTag$3 = '[object Set]'; + var stringTag$1 = '[object String]'; + var symbolTag = '[object Symbol]'; + var weakMapTag$2 = '[object WeakMap]'; + + var arrayBufferTag$1 = '[object ArrayBuffer]'; + var dataViewTag$2 = '[object DataView]'; + var float32Tag$1 = '[object Float32Array]'; + var float64Tag$1 = '[object Float64Array]'; + var int8Tag$1 = '[object Int8Array]'; + var int16Tag$1 = '[object Int16Array]'; + var int32Tag$1 = '[object Int32Array]'; + var uint8Tag$1 = '[object Uint8Array]'; + var uint8ClampedTag$1 = '[object Uint8ClampedArray]'; + var uint16Tag$1 = '[object Uint16Array]'; + var uint32Tag$1 = '[object Uint32Array]'; + + /** Used to identify `toStringTag` values supported by `_.clone`. */ + var cloneableTags = {}; + cloneableTags[argsTag$2] = cloneableTags[arrayTag$1] = + cloneableTags[arrayBufferTag$1] = cloneableTags[dataViewTag$2] = + cloneableTags[boolTag$1] = cloneableTags[dateTag$1] = + cloneableTags[float32Tag$1] = cloneableTags[float64Tag$1] = + cloneableTags[int8Tag$1] = cloneableTags[int16Tag$1] = + cloneableTags[int32Tag$1] = cloneableTags[mapTag$3] = + cloneableTags[numberTag$1] = cloneableTags[objectTag$3] = + cloneableTags[regexpTag$1] = cloneableTags[setTag$3] = + cloneableTags[stringTag$1] = cloneableTags[symbolTag] = + cloneableTags[uint8Tag$1] = cloneableTags[uint8ClampedTag$1] = + cloneableTags[uint16Tag$1] = cloneableTags[uint32Tag$1] = true; + cloneableTags[errorTag$1] = cloneableTags[funcTag$2] = + cloneableTags[weakMapTag$2] = false; + + /** + * The base implementation of `_.clone` and `_.cloneDeep` which tracks + * traversed objects. + * + * @private + * @param {*} value The value to clone. + * @param {boolean} bitmask The bitmask flags. + * 1 - Deep clone + * 2 - Flatten inherited properties + * 4 - Clone symbols + * @param {Function} [customizer] The function to customize cloning. + * @param {string} [key] The key of `value`. + * @param {Object} [object] The parent object of `value`. + * @param {Object} [stack] Tracks traversed objects and their clone counterparts. + * @returns {*} Returns the cloned value. + */ + function baseClone(value, bitmask, customizer, key, object, stack) { + var result, + isDeep = bitmask & CLONE_DEEP_FLAG$1, + isFlat = bitmask & CLONE_FLAT_FLAG, + isFull = bitmask & CLONE_SYMBOLS_FLAG$1; + + if (customizer) { + result = object ? customizer(value, key, object, stack) : customizer(value); + } + if (result !== undefined) { + return result; + } + if (!isObject_1(value)) { + return value; + } + var isArr = isArray_1(value); + if (isArr) { + result = _initCloneArray(value); + if (!isDeep) { + return _copyArray(value, result); + } + } else { + var tag = _getTag(value), + isFunc = tag == funcTag$2 || tag == genTag$1; + + if (isBuffer_1$2(value)) { + return _cloneBuffer(value, isDeep); + } + if (tag == objectTag$3 || tag == argsTag$2 || (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); + } + } + // Check for circular references and return its corresponding clone. + 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_1); + + var props = isArr ? undefined : keysFunc(value); + _arrayEach(props || value, function(subValue, key) { + if (props) { + key = subValue; + subValue = value[key]; + } + // Recursively populate clone (susceptible to call stack limits). + _assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + return result; + } + + var _baseClone = baseClone; + + /** Used to compose bitmasks for cloning. */ + var CLONE_DEEP_FLAG = 1; + var CLONE_SYMBOLS_FLAG = 4; + + /** + * This method is like `_.clone` except that it recursively clones `value`. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @returns {*} Returns the deep cloned value. + * @see _.clone + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var deep = _.cloneDeep(objects); + * console.log(deep[0] === objects[0]); + * // => false + */ + function cloneDeep(value) { + return _baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); + } + + var cloneDeep_1 = cloneDeep; + + var debug$10 = browser$1('LC:SignatureFactoryRunner'); + + function _validateSignature() { + var signatureResult = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var signature = signatureResult.signature, + timestamp = signatureResult.timestamp, + nonce = signatureResult.nonce; + + if (typeof signature !== 'string' || typeof timestamp !== 'number' || typeof nonce !== 'string') { + throw new Error('malformed signature'); + } + return { + signature: signature, + timestamp: timestamp, + nonce: nonce + }; + } + + var runSignatureFactory = (function (signatureFactory, params) { + return _Promise.resolve().then(function () { + debug$10('call signatureFactory with ' + params); + return signatureFactory.apply(undefined, _toConsumableArray(params)); + }).then(tap(function (signatureResult) { + return debug$10('sign result %O', signatureResult); + }), function (error) { + // eslint-disable-next-line no-param-reassign + error.message = 'sign error: ' + error.message; + debug$10(error); + throw error; + }).then(_validateSignature); + }); + + var _rMessageStatus; + + /** + * 消息状态枚举 + * @enum {Symbol} + * @since 3.2.0 + * @memberof module:leancloud-realtime + */ + var MessageStatus = { + /** 初始状态、未知状态 */ + NONE: _Symbol('none'), + /** 正在发送 */ + SENDING: _Symbol('sending'), + /** 已发送 */ + SENT: _Symbol('sent'), + /** 已送达 */ + DELIVERED: _Symbol('delivered'), + /** 发送失败 */ + FAILED: _Symbol('failed') + }; + _Object$freeze(MessageStatus); + + var rMessageStatus = (_rMessageStatus = {}, _defineProperty(_rMessageStatus, MessageStatus.NONE, true), _defineProperty(_rMessageStatus, MessageStatus.SENDING, true), _defineProperty(_rMessageStatus, MessageStatus.SENT, true), _defineProperty(_rMessageStatus, MessageStatus.DELIVERED, true), _defineProperty(_rMessageStatus, MessageStatus.READ, true), _defineProperty(_rMessageStatus, MessageStatus.FAILED, true), _rMessageStatus); + + var Message = function () { + /** + * @implements AVMessage + * @param {Object|String} content 消息内容 + */ + function Message(content) { + _classCallCheck(this, Message); + + _Object$assign(this, { content: content }, { + /** + * @type {String} + * @memberof Message# + */ + id: v4_1(), + /** + * 消息所在的 conversation id + * @memberof Message# + * @type {String?} + */ + cid: null, + /** + * 消息发送时间 + * @memberof Message# + * @type {Date} + */ + timestamp: new Date(), + /** + * 消息发送者 + * @memberof Message# + * @type {String} + */ + from: undefined, + /** + * 标记需要回执 + * @memberof Message# + * @type {Boolean} + * @deprecated 指定是否需要送达回执请使用 {@link Conversation#send} 方法的 `options.receipt` 参数。 + */ + needReceipt: false, + /** + * 标记暂态消息 + * @memberof Message# + * @type {Boolean} + * @deprecated 指定是否作为暂态消息发送请使用 {@link Conversation#send} 方法的 `options.transient` 参数。 + * 请不要将是否为暂态作为区分某些消息的标记,请使用富媒体消息的属性(attributes)或使用自定义消息类型。 + * 该字段将在 v4.0 中移除。 + */ + transient: false + /** + * @var deliveredAt {?Date} 消息送达时间 + * @memberof Message# + */ + // deliveredAt, + }); + this._setStatus(MessageStatus.NONE); + } + + /** + * 设置是否需要送达回执 + * @param {Boolean} needReceipt + * @return {Message} self + * @deprecated 请使用 {@link Conversation#send} 方法的 `options.receipt` 选项代替。 + */ + + + Message.prototype.setNeedReceipt = function setNeedReceipt(needReceipt) { + console.warn('DEPRECATION Message#setNeedReceipt: Use Conversation#send with sendOptions.receipt instead.'); + this.needReceipt = needReceipt; + return this; + }; + + /** + * 设置是否是暂态消息 + * @param {Boolean} transient + * @return {Message} self + * @deprecated 请使用 {@link Conversation#send} 方法的 `options.transient` 选项代替。 + */ + + + Message.prototype.setTransient = function setTransient(transient) { + console.warn('DEPRECATION Message#setTransient: Use Conversation#send with sendOptions.transient instead.'); + this.transient = transient; + return this; + }; + + /** + * 将当前消息序列化为 JSON 对象 + * @protected + * @return {Object} + */ + + + Message.prototype.toJSON = function toJSON() { + return this.content; + }; + + /** + * 消息状态,值为 {@link module:leancloud-realtime.MessageStatus} 之一 + * @type {Symbol} + * @readonly + * @since 3.2.0 + */ + + + Message.prototype._setStatus = function _setStatus(status) { + if (!rMessageStatus[status]) { + throw new Error('Invalid message status'); + } + this._status = status; + }; + + /** + * 消息修改或撤回时间,可以通过比较其与消息的 timestamp 是否相等判断消息是否被修改过或撤回过。 + * @type {Date} + * @since 3.5.0 + */ + + + /** + * 判断给定的内容是否是有效的 Message, + * 该方法始终返回 true + * @protected + * @returns {Boolean} + * @implements AVMessage.validate + */ + Message.validate = function validate() { + return true; + }; + + /** + * 解析处理消息内容 + *

+       * 如果子类提供了 message,返回该 message
+       * 如果没有提供,将 json 作为 content 实例化一个 Message
+       * @protected
+       * @param  {Object}  json    json 格式的消息内容
+       * @param  {Message} message 子类提供的 message
+       * @return {Message}
+       * @implements AVMessage.parse
+       */
+
+
+      Message.parse = function parse(json, message) {
+        return message || new this(json);
+      };
+
+      _createClass(Message, [{
+        key: 'status',
+        get: function get() {
+          return this._status;
+        }
+      }, {
+        key: 'updatedAt',
+        get: function get() {
+          return this._updatedAt || this.timestamp;
+        },
+        set: function set(value) {
+          this._updatedAt = value;
+        }
+      }]);
+
+      return Message;
+    }();
+
+    /* eslint-disable no-param-reassign */
+    // documented in ../index.js
+    var messageType = function messageType(type) {
+      if (typeof type !== 'number') {
+        throw new TypeError(type + ' is not a Number');
+      }
+      return function (target) {
+        target.TYPE = type;
+        target.validate = function (json) {
+          return json._lctype === type;
+        };
+        target.prototype._getType = function () {
+          return { _lctype: type };
+        };
+      };
+    };
+
+    // documented in ../index.js
+    var messageField = function messageField(fields) {
+      if (typeof fields !== 'string') {
+        if (!Array.isArray(fields)) {
+          throw new TypeError(fields + ' is not an Array');
+        } else if (fields.some(function (value) {
+          return typeof value !== 'string';
+        })) {
+          throw new TypeError('fields contains non-string typed member');
+        }
+      }
+      return function (target) {
+        // IE10 Hack:
+        // static properties in IE10 will not be inherited from super
+        // search for parse method and assign it manually
+        var originalCustomFields = isIE10 ? getStaticProperty(target, '_customFields') : target._customFields;
+        originalCustomFields = Array.isArray(originalCustomFields) ? originalCustomFields : [];
+        target._customFields = originalCustomFields.concat(fields);
+      };
+    };
+
+    // IE10 Hack:
+    // static properties in IE10 will not be inherited from super
+    // search for parse method and assign it manually
+
+    var IE10Compatible = function IE10Compatible(target) {
+      if (isIE10) {
+        target.parse = getStaticProperty(target, 'parse');
+      }
+    };
+
+    var _dec$2;
+    var _class$3;
+
+    // jsdoc-ignore-start
+
+    // jsdoc-ignore-end
+    var TypedMessage = (_dec$2 = messageField(['_lctext', '_lcattrs']), _dec$2(_class$3 = function (_Message) {
+      _inherits(TypedMessage, _Message);
+
+      /**
+       * 所有内置的富媒体消息均继承自本类
+       * @extends Message
+       */
+      function TypedMessage() {
+        _classCallCheck(this, TypedMessage);
+
+        var _this = _possibleConstructorReturn(this, _Message.call(this));
+
+        _this._ = {};
+        return _this;
+      }
+
+      /**
+       * @type {Number}
+       * @readonly
+       */
+
+
+      /**
+       * @param {String} text
+       * @return {TypedMessage} self
+       */
+      TypedMessage.prototype.setText = function setText(text) {
+        this._lctext = text;
+        return this;
+      };
+      /**
+       * @return {String}
+       */
+
+
+      TypedMessage.prototype.getText = function getText() {
+        return this._lctext;
+      };
+
+      /**
+       * @param {Object} attributes
+       * @return {TypedMessage} self
+       */
+
+
+      TypedMessage.prototype.setAttributes = function setAttributes(attributes) {
+        this._lcattrs = attributes;
+        return this;
+      };
+      /**
+       * @return {Object}
+       */
+
+
+      TypedMessage.prototype.getAttributes = function getAttributes() {
+        return this._lcattrs;
+      };
+
+      TypedMessage.prototype._getCustomFields = function _getCustomFields() {
+        var _this2 = this;
+
+        var fields = Array.isArray(this.constructor._customFields) ? this.constructor._customFields : [];
+        return fields.reduce(function (result, field) {
+          if (typeof field !== 'string') return result;
+          result[field] = _this2[field]; // eslint-disable-line no-param-reassign
+          return result;
+        }, {});
+      };
+
+      /* eslint-disable class-methods-use-this */
+
+
+      TypedMessage.prototype._getType = function _getType() {
+        throw new Error('not implemented');
+      };
+      /* eslint-enable class-methods-use-this */
+
+      TypedMessage.prototype.toJSON = function toJSON() {
+        return _Object$assign({
+          _lctext: this.getText(),
+          _lcattrs: this.getAttributes()
+        }, this._getCustomFields(), this._getType());
+      };
+
+      /**
+       * 解析处理消息内容
+       * 
+       * 为给定的 message 设置 text 与 attributes 属性,返回该 message
+       * 如果子类没有提供 message,new this()
+       * @protected
+       * @param  {Object}  json    json 格式的消息内容
+       * @param  {TypedMessage} message 子类提供的 message
+       * @return {TypedMessage}
+       * @implements AVMessage.parse
+       */
+
+
+      TypedMessage.parse = function parse(json) {
+        var message = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new this();
+
+        message.content = json; // eslint-disable-line no-param-reassign
+        var customFields = isIE10 ? getStaticProperty(message.constructor, '_customFields') : message.constructor._customFields;
+        var fields = Array.isArray(customFields) ? customFields : [];
+        fields = fields.reduce(function (result, field) {
+          if (typeof field !== 'string') return result;
+          result[field] = json[field]; // eslint-disable-line no-param-reassign
+          return result;
+        }, {});
+        _Object$assign(message, fields);
+        return _Message.parse.call(this, json, message);
+      };
+
+      _createClass(TypedMessage, [{
+        key: 'type',
+        get: function get() {
+          return this.constructor.TYPE;
+        }
+
+        /** @type {String} */
+
+      }, {
+        key: 'text',
+        set: function set(text) {
+          return this.setText(text);
+        },
+        get: function get() {
+          return this.getText();
+        }
+
+        /** @type {Object} */
+
+      }, {
+        key: 'attributes',
+        set: function set(attributes) {
+          return this.setAttributes(attributes);
+        },
+        get: function get() {
+          return this.getAttributes();
+        }
+
+        /**
+         * 在客户端需要以文本形式展示该消息时显示的文案,
+         * 如 [红包] 新春快乐。
+         * 默认值为消息的 text。
+         * @type {String}
+         * @readonly
+         */
+
+      }, {
+        key: 'summary',
+        get: function get() {
+          return this.text;
+        }
+      }]);
+
+      return TypedMessage;
+    }(Message)) || _class$3);
+
+    var _dec$1;
+    var _class$2;
+
+    // jsdoc-ignore-start
+
+    // jsdoc-ignore-end
+    /**
+     * 已撤回类型消息,当消息被撤回时,SDK 会使用该类型的消息替代原始消息
+     * @extends TypedMessage
+     */
+    var RecalledMessage = (_dec$1 = messageType(-127), _dec$1(_class$2 = function (_TypedMessage) {
+      _inherits(RecalledMessage, _TypedMessage);
+
+      function RecalledMessage() {
+        _classCallCheck(this, RecalledMessage);
+
+        return _possibleConstructorReturn(this, _TypedMessage.apply(this, arguments));
+      }
+
+      _createClass(RecalledMessage, [{
+        key: 'summary',
+
+        /**
+         * 在客户端需要以文本形式展示该消息时显示的文案,值为 [该消息已撤回]
+         * @type {String}
+         * @readonly
+         */
+        // eslint-disable-next-line class-methods-use-this
+        get: function get() {
+          return '[该消息已撤回]';
+        }
+      }]);
+
+      return RecalledMessage;
+    }(TypedMessage)) || _class$2);
+
+    var debug$9 = browser$1('LC:Conversation');
+
+    var Conversation = function (_EventEmitter) {
+      _inherits(Conversation, _EventEmitter);
+
+      /**
+       * 无法直接实例化,请使用 {@link IMClient#createConversation} 创建新的对话
+       * @extends EventEmitter
+       */
+      function Conversation(_ref, client) {
+        var id = _ref.id,
+            creator = _ref.creator,
+            createdAt = _ref.createdAt,
+            updatedAt = _ref.updatedAt,
+            lastMessageAt = _ref.lastMessageAt,
+            lastMessage = _ref.lastMessage,
+            _ref$mutedMembers = _ref.mutedMembers,
+            mutedMembers = _ref$mutedMembers === undefined ? [] : _ref$mutedMembers,
+            _ref$members = _ref.members,
+            members = _ref$members === undefined ? [] : _ref$members,
+            _ref$transient = _ref.transient,
+            transient = _ref$transient === undefined ? false : _ref$transient,
+            _ref$system = _ref.system,
+            system = _ref$system === undefined ? false : _ref$system,
+            _ref$muted = _ref.muted,
+            muted = _ref$muted === undefined ? false : _ref$muted,
+            attributes = _objectWithoutProperties(_ref, ['id', 'creator', 'createdAt', 'updatedAt', 'lastMessageAt', 'lastMessage', 'mutedMembers', 'members', 'transient', 'system', 'muted']);
+
+        _classCallCheck(this, Conversation);
+
+        var _this = _possibleConstructorReturn(this, _EventEmitter.call(this));
+
+        _Object$assign(_this, {
+          /**
+           * 对话 id,对应 _Conversation 表中的 objectId
+           * @memberof Conversation#
+           * @type {String}
+           */
+          id: id,
+          /**
+           * 对话创建者
+           * @memberof Conversation#
+           * @type {String}
+           */
+          creator: creator,
+          /**
+           * 对话创建时间
+           * @memberof Conversation#
+           * @type {Date}
+           */
+          createdAt: createdAt,
+          /**
+           * 对话更新时间
+           * @memberof Conversation#
+           * @type {Date}
+           */
+          updatedAt: updatedAt,
+          /**
+           * 最后一条消息时间
+           * @memberof Conversation#
+           * @type {?Date}
+           */
+          lastMessageAt: lastMessageAt,
+          /**
+           * 最后一条消息
+           * @memberof Conversation#
+           * @type {?Message}
+           */
+          lastMessage: lastMessage,
+          /**
+           * 对该对话设置了静音的用户列表
+           * @memberof Conversation#
+           * @type {?String[]}
+           */
+          mutedMembers: mutedMembers,
+          /**
+           * 参与该对话的用户列表
+           * @memberof Conversation#
+           * @type {String[]}
+           */
+          members: members,
+          /**
+           * 暂态对话标记
+           * @memberof Conversation#
+           * @type {Boolean}
+           */
+          transient: transient,
+          /**
+           * 系统对话标记
+           * @memberof Conversation#
+           * @type {Boolean}
+           * @since 3.3
+           */
+          system: system,
+          /**
+           * 当前用户静音该对话标记
+           * @memberof Conversation#
+           * @type {Boolean}
+           */
+          muted: muted
+        });
+        _this._attributes = attributes;
+        _this._reset();
+        _this.members = _Array$from(new _Set(_this.members));
+        _Object$assign(internal(_this), {
+          messagesWaitingForReceipt: {},
+          lastDeliveredAt: null,
+          lastReadAt: null,
+          unreadMessagesCount: 0
+        });
+        if (client instanceof IMClient) {
+          _this._client = client;
+        } else {
+          throw new TypeError('Conversation must be initialized with a client');
+        }
+        ['kicked', 'membersjoined', 'membersleft', 'message', 'receipt', 'lastdeliveredatupdate', 'lastreadatupdate', 'messagerecall', 'messageupdate'].forEach(function (event) {
+          return _this.on(event, function () {
+            for (var _len = arguments.length, payload = Array(_len), _key = 0; _key < _len; _key++) {
+              payload[_key] = arguments[_key];
+            }
+
+            return _this._debug(event + ' event emitted. %O', payload);
+          });
+        });
+        // onConversationCreate hook
+        applyDecorators(_this._client._plugins.onConversationCreate, _this);
+        return _this;
+      }
+
+      Conversation.prototype._setLastDeliveredAt = function _setLastDeliveredAt(value) {
+        var date = decodeDate(value);
+        if (!(date < internal(this).lastDeliveredAt)) {
+          internal(this).lastDeliveredAt = date;
+          /**
+           * 最后消息送达时间更新
+           * @event Conversation#lastdeliveredatupdate
+           * @since 3.4.0
+           */
+          this.emit('lastdeliveredatupdate');
+        }
+      };
+      /**
+       * 最后消息被阅读时间,常用来实现发送消息的「已读」标记,可通过 {@link Conversation#fetchReceiptTimestamps} 获取或更新该属性
+       * @type {?Date}
+       * @since 3.4.0
+       */
+
+
+      Conversation.prototype._setLastReadAt = function _setLastReadAt(value) {
+        var date = decodeDate(value);
+        if (!(date < internal(this).lastReadAt)) {
+          internal(this).lastReadAt = date;
+          /**
+           * 最后消息被阅读时间更新
+           * @event Conversation#lastreadatupdate
+           * @since 3.4.0
+           */
+          this.emit('lastreadatupdate');
+        }
+      };
+
+      /**
+       * 对话额外属性,对应 _Conversation 表中的 attr
+       * @type {Object}
+       * @deprecated Use {@link Conversation#get conversation.get('attr')},
+       * {@link Conversation#set conversation.set('attr', value)} instead
+       */
+
+
+      /**
+       * 设置对话额外属性
+       * @param {Object} map    key-value 对
+       * @param {Boolean} [assign=false] 使用 Object.assign 更新属性,而不是替换整个 attributes
+       * @return {Conversation} self
+       * @deprecated Use {@link Conversation#set} instead. See {@link https://url.leanapp.cn/DeprecateAttributes} for more details.
+       */
+      Conversation.prototype.setAttributes = function setAttributes(map) {
+        var _this2 = this;
+
+        var assign = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
+
+        console.warn('DEPRECATION Conversation#setAttributes: Use conversation.set() instead. See https://url.leanapp.cn/DeprecateAttributes for more details.');
+        this._debug('set attributes: value=' + _JSON$stringify(map) + ', assign=' + assign);
+        if (!isPlainObject_1(map)) {
+          throw new TypeError('attributes must be a plain object');
+        }
+        if (!assign) {
+          this.set('attr', map);
+        } else {
+          _Object$keys(map).forEach(function (key) {
+            return _this2.setAttribute(key, map[key]);
+          });
+        }
+        return this;
+      };
+      /**
+       * 设置对话额外属性
+       * @param {String} key
+       * @param {Any} value
+       * @return {Conversation} self
+       * @deprecated Use {@link Conversation#set conversation.set('attr.key', value)} instead
+       */
+
+
+      Conversation.prototype.setAttribute = function setAttribute(key, value) {
+        console.warn('DEPRECATION Conversation#setAttribute: Use conversation.set(\'attr.key\', value) instead. See https://url.leanapp.cn/DeprecateAttributes for more details.');
+        return this.set('attr.' + key, value);
+      };
+      /**
+       * 对话名字,对应 _Conversation 表中的 name
+       * @type {String}
+       */
+
+
+      /**
+       * 设置对话名字
+       * @param {String} value
+       * @return {Conversation} self
+       * @deprecated Use {@link Conversation#set conversation.set('name', value)} instead
+       */
+      Conversation.prototype.setName = function setName(value) {
+        console.warn('DEPRECATION Conversation#setName: Use conversation.set(\'name\', value) instead. See https://url.leanapp.cn/DeprecateAttributes for more details.');
+        return this.set('name', value);
+      };
+
+      /**
+       * 获取对话的自定义属性
+       * @since 3.2.0
+       * @param  {String} key key 属性的键名,'x' 对应 Conversation 表中的 x 列
+       * @return {Any} 属性的值
+       */
+
+
+      Conversation.prototype.get = function get(key) {
+        return internal(this).currentAttributes[key];
+      };
+
+      /**
+       * 设置对话的自定义属性
+       * @since 3.2.0
+       * @param {String} key 属性的键名,'x' 对应 Conversation 表中的 x 列,支持使用 'x.y.z' 来修改对象的部分字段。
+       * @param {Any} value 属性的值
+       * @return {Conversation} self
+       * @example
+       *
+       * // 设置对话的 color 属性
+       * conversation.set('color', {
+       *   text: '#000',
+       *   background: '#DDD',
+       * });
+       * // 设置对话的 color.text 属性
+       * conversation.set('color.text', '#333');
+       */
+
+
+      Conversation.prototype.set = function set(key, value) {
+        this._debug('set [' + key + ']: ' + value);
+        var pendingAttributes = internal(this).pendingAttributes;
+        var pendingKeys = _Object$keys(pendingAttributes);
+        // suppose pendingAttributes = { 'a.b': {} }
+        // set 'a' or 'a.b': delete 'a.b'
+        var re = new RegExp('^' + key);
+        var childKeys = pendingKeys.filter(re.test.bind(re));
+        childKeys.forEach(function (k) {
+          delete pendingAttributes[k];
+        });
+        if (childKeys.length) {
+          pendingAttributes[key] = value;
+        } else {
+          // set 'a.c': nothing to do
+          // set 'a.b.c.d': assign c: { d: {} } to 'a.b'
+          // CAUTION: non-standard API, provided by core-js
+          var parentKey = _Array$find(pendingKeys, function (k) {
+            return key.indexOf(k) === 0;
+          }); // 'a.b'
+          if (parentKey) {
+            setValue(pendingAttributes[parentKey], key.slice(parentKey.length + 1), value);
+          } else {
+            pendingAttributes[key] = value;
+          }
+        }
+        // build currentAttributes
+        internal(this).currentAttributes = _Object$keys(pendingAttributes).reduce(function (target, k) {
+          return setValue(target, k, pendingAttributes[k]);
+        }, cloneDeep_1(this._attributes));
+        return this;
+      };
+
+      Conversation.prototype._reset = function _reset() {
+        internal(this).pendingAttributes = {};
+        internal(this).currentAttributes = this._attributes;
+      };
+
+      Conversation.prototype._debug = function _debug() {
+        for (var _len2 = arguments.length, params = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
+          params[_key2] = arguments[_key2];
+        }
+
+        debug$9.apply(undefined, params.concat(['[' + this.id + ']']));
+      };
+
+      Conversation.prototype._send = function _send(command) {
+        var _client;
+
+        /* eslint-disable no-param-reassign */
+        if (command.cmd === null) {
+          command.cmd = 'conv';
+        }
+        if (command.cmd === 'conv' && command.convMessage === null) {
+          command.convMessage = new ConvCommand();
+        }
+        if (command.convMessage && command.convMessage.cid === null) {
+          command.convMessage.cid = this.id;
+        }
+        /* eslint-enable no-param-reassign */
+
+        for (var _len3 = arguments.length, args = Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
+          args[_key3 - 1] = arguments[_key3];
+        }
+
+        return (_client = this._client)._send.apply(_client, [command].concat(args));
+      };
+      /**
+       * 保存当前对话的属性至服务器
+       * @return {Promise.} self
+       */
+
+
+      Conversation.prototype.save = function save$$1() {
+        var _this3 = this;
+
+        this._debug('save');
+        var attr = internal(this).pendingAttributes;
+        if (isEmpty_1(attr)) {
+          this._debug('nothing touched, resolve with self');
+          return _Promise.resolve(this);
+        }
+        this._debug('attr: %O', attr);
+        var convMessage = new ConvCommand({
+          attr: new JsonObjectMessage({
+            data: _JSON$stringify(attr)
+          })
+        });
+        return this._send(new GenericCommand({
+          op: 'update',
+          convMessage: convMessage
+        })).then(function (resCommand) {
+          _this3.updatedAt = resCommand.convMessage.udate;
+          _this3._attributes = internal(_this3).currentAttributes;
+          internal(_this3).pendingAttributes = {};
+          return _this3;
+        });
+      };
+
+      /**
+       * 从服务器更新对话的属性
+       * @return {Promise.} self
+       */
+
+
+      Conversation.prototype.fetch = function fetch() {
+        var _this4 = this;
+
+        return this._client.getQuery().equalTo('objectId', this.id).find().then(function () {
+          return _this4;
+        });
+      };
+
+      /**
+       * 静音,客户端拒绝收到服务器端的离线推送通知
+       * @return {Promise.} self
+       */
+
+
+      Conversation.prototype.mute = function mute() {
+        var _this5 = this;
+
+        this._debug('mute');
+        return this._send(new GenericCommand({
+          op: 'mute'
+        })).then(function () {
+          if (!_this5.transient) {
+            _this5.muted = true;
+            _this5.mutedMembers = union(_this5.mutedMembers, [_this5._client.id]);
+          }
+          return _this5;
+        });
+      };
+
+      /**
+       * 取消静音
+       * @return {Promise.} self
+       */
+
+
+      Conversation.prototype.unmute = function unmute() {
+        var _this6 = this;
+
+        this._debug('unmute');
+        return this._send(new GenericCommand({
+          op: 'unmute'
+        })).then(function () {
+          if (!_this6.transient) {
+            _this6.muted = false;
+            _this6.mutedMembers = difference(_this6.mutedMembers, [_this6._client.id]);
+          }
+          return _this6;
+        });
+      };
+
+      /**
+       * 获取对话人数,或暂态对话的在线人数
+       * @return {Promise.}
+       */
+
+
+      Conversation.prototype.count = function count() {
+        this._debug('unmute');
+        return this._send(new GenericCommand({
+          op: 'count'
+        })).then(function (resCommand) {
+          return resCommand.convMessage.count;
+        });
+      };
+
+      /**
+       * 增加成员
+       * @param {String|String[]} clientIds 新增成员 client id
+       * @return {Promise.} self
+       */
+
+
+      Conversation.prototype.add = function add(clientIds) {
+        var _this7 = this;
+
+        this._debug('add', clientIds);
+        if (typeof clientIds === 'string') {
+          clientIds = [clientIds]; // eslint-disable-line no-param-reassign
+        }
+        var convMessage = new ConvCommand({
+          m: clientIds
+        });
+        return _Promise.resolve(new GenericCommand({
+          op: 'add',
+          convMessage: convMessage
+        })).then(function (command) {
+          if (_this7._client.options.conversationSignatureFactory) {
+            var _params = [_this7.id, _this7._client.id, clientIds.sort(), 'add'];
+            return runSignatureFactory(_this7._client.options.conversationSignatureFactory, _params).then(function (signatureResult) {
+              _Object$assign(command.convMessage, keyRemap({
+                signature: 's',
+                timestamp: 't',
+                nonce: 'n'
+              }, signatureResult));
+              return command;
+            });
+          }
+          return command;
+        }).then(this._send.bind(this)).then(function () {
+          if (!_this7.transient && !_this7.system) {
+            _this7.members = union(_this7.members, clientIds);
+          }
+          return _this7;
+        });
+      };
+
+      /**
+       * 剔除成员
+       * @param {String|String[]} clientIds 成员 client id
+       * @return {Promise.} self
+       */
+
+
+      Conversation.prototype.remove = function remove(clientIds) {
+        var _this8 = this;
+
+        this._debug('remove', clientIds);
+        if (typeof clientIds === 'string') {
+          clientIds = [clientIds]; // eslint-disable-line no-param-reassign
+        }
+        var convMessage = new ConvCommand({
+          m: clientIds
+        });
+        return _Promise.resolve(new GenericCommand({
+          op: 'remove',
+          convMessage: convMessage
+        })).then(function (command) {
+          if (_this8._client.options.conversationSignatureFactory) {
+            var _params2 = [_this8.id, _this8._client.id, clientIds.sort(), 'remove'];
+            return runSignatureFactory(_this8._client.options.conversationSignatureFactory, _params2).then(function (signatureResult) {
+              _Object$assign(command.convMessage, keyRemap({
+                signature: 's',
+                timestamp: 't',
+                nonce: 'n'
+              }, signatureResult));
+              return command;
+            });
+          }
+          return command;
+        }).then(this._send.bind(this)).then(function () {
+          if (!_this8.transient && !_this8.system) {
+            _this8.members = difference(_this8.members, clientIds);
+          }
+          return _this8;
+        });
+      };
+
+      /**
+       * (当前用户)加入该对话
+       * @return {Promise.} self
+       */
+
+
+      Conversation.prototype.join = function join() {
+        this._debug('join');
+        return this.add(this._client.id);
+      };
+
+      /**
+       * (当前用户)退出该对话
+       * @return {Promise.} self
+       */
+
+
+      Conversation.prototype.quit = function quit() {
+        this._debug('quit');
+        return this.remove(this._client.id);
+      };
+
+      /**
+       * 发送消息
+       * @param  {Message} message 消息,Message 及其子类的实例
+       * @param {Object} [options] since v3.3.0,发送选项
+       * @param {Boolean} [options.transient] since v3.3.1,是否作为暂态消息发送
+       * @param {Boolean} [options.receipt] 是否需要送达回执,仅在普通对话中有效
+       * @param {Boolean} [options.will] since v3.4.0,是否指定该消息作为「掉线消息」发送,
+       * 「掉线消息」会延迟到当前用户掉线后发送,常用来实现「下线通知」功能
+       * @param {MessagePriority} [options.priority] 消息优先级,仅在暂态对话中有效,
+       * see: {@link module:leancloud-realtime.MessagePriority MessagePriority}
+       * @param {Object} [options.pushData] 消息对应的离线推送内容,如果消息接收方不在线,会推送指定的内容。其结构说明参见: {@link https://url.leanapp.cn/pushData 推送消息内容}
+       * @return {Promise.} 发送的消息
+       */
+
+
+      Conversation.prototype.send = function send(message, options) {
+        var _this9 = this;
+
+        this._debug(message, 'send');
+        if (!(message instanceof Message)) {
+          throw new TypeError(message + ' is not a Message');
+        }
+        var _options = _Object$assign({}, options);
+        // support typo reciept option
+        if (_options.reciept !== undefined) {
+          console.warn('DEPRECATION Conversation#send options.reciept: please use receipt option instead');
+          if (_options.receipt === undefined) _options.receipt = _options.reciept;
+        }
+
+        var _Object$assign2 = _Object$assign(
+        // support deprecated attribute: message.needReceipt
+        {
+          transient: message.transient,
+          receipt: message.needReceipt
+        },
+        // support Message static property: sendOptions
+        message.constructor.sendOptions, _options),
+            transient = _Object$assign2.transient,
+            receipt = _Object$assign2.receipt,
+            priority = _Object$assign2.priority,
+            pushData = _Object$assign2.pushData,
+            will = _Object$assign2.will;
+
+        if (receipt) {
+          if (this.transient) {
+            console.warn('receipt option is ignored as the conversation is transient.');
+          } else if (transient) {
+            console.warn('receipt option is ignored as the message is sent transiently.');
+          } else if (this.members.length > 2) {
+            console.warn('receipt option is recommended to be used in one-on-one conversation.'); // eslint-disable-line max-len
+          }
+        }
+        if (priority && !this.transient) {
+          console.warn('priority option is ignored as the conversation is not transient.');
+        }
+        _Object$assign(message, {
+          cid: this.id,
+          from: this._client.id
+        });
+        message._setStatus(MessageStatus.SENDING);
+        var msg = message.toJSON();
+        if (typeof msg !== 'string') {
+          msg = _JSON$stringify(msg);
+        }
+        var sendPromise = this._send(new GenericCommand({
+          cmd: 'direct',
+          directMessage: new DirectCommand({
+            msg: msg,
+            cid: this.id,
+            r: receipt,
+            transient: transient,
+            dt: message.id,
+            pushData: _JSON$stringify(pushData),
+            will: will
+          }),
+          priority: priority
+        }), !transient);
+        if (!transient) {
+          sendPromise = sendPromise.then(function (resCommand) {
+            var _resCommand$ackMessag = resCommand.ackMessage,
+                uid = _resCommand$ackMessag.uid,
+                t = _resCommand$ackMessag.t,
+                code = _resCommand$ackMessag.code,
+                reason = _resCommand$ackMessag.reason,
+                appCode = _resCommand$ackMessag.appCode;
+
+            if (code !== null) {
+              throw createError$3({
+                code: code, reason: reason, appCode: appCode
+              });
+            }
+            _Object$assign(message, {
+              id: uid,
+              timestamp: new Date(t.toNumber())
+            });
+            _this9.lastMessage = message;
+            _this9.lastMessageAt = message.timestamp;
+          });
+        }
+        return sendPromise.then(function () {
+          message._setStatus(MessageStatus.SENT);
+          if (receipt) {
+            internal(_this9).messagesWaitingForReceipt[message.id] = message;
+          }
+          return message;
+        }, function (error$$1) {
+          message._setStatus(MessageStatus.FAILED);
+          throw error$$1;
+        });
+      };
+
+      Conversation.prototype._update = function _update(message, newMessage, recall) {
+        var _this10 = this;
+
+        this._debug('patch %O %O %O', message, newMessage, recall);
+        if (message instanceof Message) {
+          if (message.from !== this._client.id) {
+            throw new Error('Updating message from others is not allowed');
+          }
+          if (message.status !== MessageStatus.SENT && message.status !== MessageStatus.DELIVERED) {
+            throw new Error('Message is not sent');
+          }
+        } else if (!(message.id && message.timestamp)) {
+          throw new TypeError(message + ' is not a Message');
+        }
+        var data = null;
+        if (!recall) {
+          data = newMessage.toJSON();
+          if (typeof data !== 'string') {
+            data = _JSON$stringify(data);
+          }
+        }
+        return this._send(new GenericCommand({
+          cmd: CommandType.patch,
+          op: OpType.modify,
+          patchMessage: new PatchCommand({
+            patches: [new PatchItem({
+              cid: this.id,
+              mid: message.id,
+              timestamp: Number(message.timestamp),
+              recall: recall,
+              data: data
+            })],
+            lastPatchTime: this._client._lastPatchTime
+          })
+        })).then(function () {
+          var id = message.id,
+              cid = message.cid,
+              timestamp = message.timestamp,
+              from = message.from,
+              _status = message._status;
+
+          _Object$assign(newMessage, {
+            id: id, cid: cid, timestamp: timestamp, from: from, _status: _status
+          });
+          if (_this10.lastMessage.id === newMessage.id) {
+            _this10.lastMessage = newMessage;
+          }
+          return newMessage;
+        });
+      };
+
+      /**
+       * 修改已发送的消息
+       * @param {AVMessage} message 要修改的消息,该消息必须是由当前用户发送的。也可以提供一个包含消息 {id, timestamp} 的对象
+       * @param {AVMessage} newMessage 新的消息
+       */
+
+
+      Conversation.prototype.update = function update(message, newMessage) {
+        if (!(newMessage instanceof Message)) {
+          throw new TypeError(newMessage + ' is not a Message');
+        }
+        return this._update(message, newMessage, false);
+      };
+
+      /**
+       * 撤回已发送的消息
+       * @param {AVMessage} message 要撤回的消息,该消息必须是由当前用户发送的。也可以提供一个包含消息 {id, timestamp} 的对象
+       */
+
+
+      Conversation.prototype.recall = function recall(message) {
+        return this._update(message, new RecalledMessage(), true);
+      };
+
+      /**
+       * 查询消息记录
+       * 如果仅需实现消息记录翻页查询需求,建议使用 {@link Conversation#createMessagesIterator}
+       * @param  {Object} [options]
+       * @param  {Date}   [options.beforeTime] 限制查询结果为小于这个该时间之前的消息,不传则为当前时间
+       * @param  {String} [options.beforeMessageId] 限制查询结果为该消息之前的消息,需要与 beforeTime 同时使用,为防止某时刻有重复消息
+       * @param  {Date}   [options.afterTime] 限制查询结果为大于这个该时间之前的消息
+       * @param  {String} [options.afterMessageId] 限制查询结果为该消息之后的消息,需要与 afterTime 同时使用,为防止某时刻有重复消息
+       * @param  {Number} [options.limit] 限制查询结果的数量,目前服务端默认为 20
+       * @return {Promise.} 消息列表
+       */
+
+
+      Conversation.prototype.queryMessages = function queryMessages() {
+        var _this11 = this;
+
+        var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
+
+        this._debug('query messages %O', options);
+        if (options.beforeMessageId && !options.beforeTime) {
+          throw new Error('query option beforeMessageId must be used with option beforeTime');
+        }
+        if (options.afterMessageId && !options.afterTime) {
+          throw new Error('query option afterMessageId must be used with option afterTime');
+        }
+        var conditions = keyRemap({
+          beforeTime: 't',
+          beforeMessageId: 'mid',
+          afterTime: 'tt',
+          afterMessageId: 'tmid',
+          limit: 'l'
+        }, options);
+        if (conditions.t instanceof Date) {
+          conditions.t = conditions.t.getTime();
+        }
+        if (conditions.tt instanceof Date) {
+          conditions.tt = conditions.tt.getTime();
+        }
+        return this._send(new GenericCommand({
+          cmd: 'logs',
+          logsMessage: new LogsCommand(_Object$assign(conditions, {
+            cid: this.id
+          }))
+        })).then(function (resCommand) {
+          return _Promise.all(resCommand.logsMessage.logs.map(function (_ref2) {
+            var msgId = _ref2.msgId,
+                timestamp = _ref2.timestamp,
+                patchTimestamp = _ref2.patchTimestamp,
+                from = _ref2.from,
+                ackAt = _ref2.ackAt,
+                readAt = _ref2.readAt,
+                data = _ref2.data;
+            return _this11._client._messageParser.parse(data).then(function (message) {
+              var messageProps = {
+                id: msgId,
+                cid: _this11.id,
+                timestamp: new Date(timestamp.toNumber()),
+                from: from,
+                deliveredAt: ackAt
+              };
+              if (patchTimestamp) {
+                messageProps.updatedAt = new Date(patchTimestamp.toNumber());
+              }
+              _Object$assign(message, messageProps);
+              var status = MessageStatus.SENT;
+              if (_this11.members.length === 2) {
+                if (ackAt) status = MessageStatus.DELIVERED;
+                if (ackAt) _this11._setLastDeliveredAt(ackAt);
+                if (readAt) _this11._setLastReadAt(readAt);
+              }
+              message._setStatus(status);
+              return message;
+            });
+          }));
+        });
+      };
+
+      /**
+       * 获取消息翻页迭代器
+       * @param  {Object} [options]
+       * @param  {Date}   [options.beforeTime] 限制起始查询结果为小于这个该时间之前的消息,不传则为当前时间
+       * @param  {String} [options.beforeMessageId] 限制起始查询结果为该消息之前的消息,需要与 beforeTime 同时使用,为防止某时刻有重复消息
+       * @param  {Number} [options.limit] 限制每页查询结果的数量,目前服务端默认为 20
+       * @return {AsyncIterater.>>} [AsyncIterator]{@link https://github.com/tc39/proposal-async-iteration},调用其 next 方法返回获取下一页消息的 Promise
+       * @example
+       * var messageIterator = conversation.createMessagesIterator({ limit: 10 });
+       * messageIterator.next().then(function(result) {
+       *   // result: {
+       *   //   value: [message1, ..., message10],
+       *   //   done: false,
+       *   // }
+       * });
+       * messageIterator.next().then(function(result) {
+       *   // result: {
+       *   //   value: [message11, ..., message20],
+       *   //   done: false,
+       *   // }
+       * });
+       * messageIterator.next().then(function(result) {
+       *   // No more messages
+       *   // result: { value: [], done: true }
+       * });
+       */
+
+
+      Conversation.prototype.createMessagesIterator = function createMessagesIterator() {
+        var _this12 = this;
+
+        var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
+            beforeTime = _ref3.beforeTime,
+            beforeMessageId = _ref3.beforeMessageId,
+            limit = _ref3.limit;
+
+        var promise = void 0;
+        return {
+          next: function next() {
+            if (promise === undefined) {
+              // first call
+              promise = _this12.queryMessages({
+                limit: limit,
+                beforeTime: beforeTime,
+                beforeMessageId: beforeMessageId
+              });
+            } else {
+              promise = promise.then(function (prevMessages) {
+                if (prevMessages.length === 0 || prevMessages.length < limit) {
+                  // no more messages
+                  return [];
+                }
+                return _this12.queryMessages({
+                  beforeTime: prevMessages[0].timestamp,
+                  beforeMessageId: prevMessages[0].id,
+                  limit: limit
+                });
+              });
+            }
+            return promise.then(function (value) {
+              return {
+                value: _Array$from(value),
+                done: value.length === 0 || value.length < limit
+              };
+            });
+          }
+        };
+      };
+
+      /**
+       * 将该会话标记为已读
+       * @return {Promise.} self
+       */
+
+
+      Conversation.prototype.read = function read() {
+        this.unreadMessagesCount = 0;
+        // 跳过暂态会话
+        if (this.transient) return _Promise.resolve(this);
+        var client = this._client;
+        if (!internal(client).readConversationsBuffer) {
+          internal(client).readConversationsBuffer = new _Set();
+        }
+        internal(client).readConversationsBuffer.add(this);
+        client._doSendRead();
+        return _Promise.resolve(this);
+      };
+
+      /**
+       * 将该会话标记为已读
+       * @deprecated in favor of {@link Conversation#read}
+       * @return {Promise.} self
+       */
+
+
+      Conversation.prototype.markAsRead = function markAsRead() {
+        console.warn('DEPRECATION Conversation#markAsRead: Use Conversation#read instead.');
+        return this.read();
+      };
+
+      Conversation.prototype._handleReceipt = function _handleReceipt(_ref4) {
+        var messageId = _ref4.messageId,
+            timestamp = _ref4.timestamp,
+            read = _ref4.read;
+
+        if (read) {
+          this._setLastReadAt(timestamp);
+        } else {
+          this._setLastDeliveredAt(timestamp);
+        }
+
+        var _internal = internal(this),
+            messagesWaitingForReceipt = _internal.messagesWaitingForReceipt;
+
+        var message = messagesWaitingForReceipt[messageId];
+        if (!message) return;
+        message._setStatus(MessageStatus.DELIVERED);
+        message.deliveredAt = timestamp;
+        delete messagesWaitingForReceipt[messageId];
+        /**
+         * 消息已送达。只有在发送时设置了需要回执的情况下才会收到送达回执,该回执并不代表用户已读。
+         * @event Conversation#receipt
+         * @deprecated use {@link Conversation#event:lastdeliveredatupdate}
+         * and {@link Conversation#event:lastreadatupdate} instead
+         * @since 3.2.0
+         * @param {Object} payload
+         * @param {Message} payload.message 送达的消息
+         */
+        this.emit('receipt', { message: message });
+      };
+
+      /**
+       * 更新对话的最新回执时间戳(lastDeliveredAt、lastReadAt)
+       * @since 3.4.0
+       * @return {Promise.} this
+       */
+
+
+      Conversation.prototype.fetchReceiptTimestamps = function fetchReceiptTimestamps() {
+        var _this13 = this;
+
+        return this._send(new GenericCommand({
+          op: 'max_read'
+        })).then(function (_ref5) {
+          var _ref5$convMessage = _ref5.convMessage,
+              maxReadTimestamp = _ref5$convMessage.maxReadTimestamp,
+              maxAckTimestamp = _ref5$convMessage.maxAckTimestamp;
+
+          _this13._setLastDeliveredAt(maxAckTimestamp);
+          _this13._setLastReadAt(maxReadTimestamp);
+          return _this13;
+        });
+      };
+
+      Conversation.prototype._fetchAllReceiptTimestamps = function _fetchAllReceiptTimestamps() {
+        var convMessage = new ConvCommand({
+          queryAllMembers: true
+        });
+        return this._send(new GenericCommand({
+          op: 'max_read',
+          convMessage: convMessage
+        })).then(function (_ref6) {
+          var maxReadTuples = _ref6.convMessage.maxReadTuples;
+          return maxReadTuples.filter(function (maxReadTuple) {
+            return maxReadTuple.maxAckTimestamp || maxReadTuple.maxReadTimestamp;
+          }).map(function (_ref7) {
+            var pid = _ref7.pid,
+                maxAckTimestamp = _ref7.maxAckTimestamp,
+                maxReadTimestamp = _ref7.maxReadTimestamp;
+            return {
+              pid: pid,
+              lastDeliveredAt: decodeDate(maxAckTimestamp),
+              lastReadAt: decodeDate(maxReadTimestamp)
+            };
+          });
+        });
+      };
+
+      _createClass(Conversation, [{
+        key: 'unreadMessagesCount',
+        set: function set(value) {
+          if (value !== this.unreadMessagesCount) {
+            internal(this).unreadMessagesCount = value;
+            this._client.emit('unreadmessagescountupdate', [this]);
+          }
+        }
+        /**
+         * 当前用户在该对话的未读消息数
+         * @type {Number}
+         */
+        ,
+        get: function get() {
+          return internal(this).unreadMessagesCount;
+        }
+      }, {
+        key: 'createdAt',
+        set: function set(value) {
+          this._createdAt = decodeDate(value);
+        },
+        get: function get() {
+          return this._createdAt;
+        }
+      }, {
+        key: 'updatedAt',
+        set: function set(value) {
+          this._updatedAt = decodeDate(value);
+        },
+        get: function get() {
+          return this._updatedAt;
+        }
+      }, {
+        key: 'lastMessageAt',
+        set: function set(value) {
+          var time = decodeDate(value);
+          if (time <= this._lastMessageAt) return;
+          this._lastMessageAt = time;
+        },
+        get: function get() {
+          return this._lastMessageAt;
+        }
+        /**
+         * 最后消息送达时间,常用来实现消息的「已送达」标记,可通过 {@link Conversation#fetchReceiptTimestamps} 获取或更新该属性
+         * @type {?Date}
+         * @since 3.4.0
+         */
+
+      }, {
+        key: 'lastDeliveredAt',
+        get: function get() {
+          if (this.members.length !== 2) return null;
+          return internal(this).lastDeliveredAt;
+        }
+      }, {
+        key: 'lastReadAt',
+        get: function get() {
+          if (this.members.length !== 2) return null;
+          return internal(this).lastReadAt;
+        }
+      }, {
+        key: 'attributes',
+        get: function get() {
+          console.warn('DEPRECATION Conversation.attributes: Use conversation.get(\'attr\') instead. See https://url.leanapp.cn/DeprecateAttributes for more details.');
+          return this.get('attr');
+        },
+        set: function set(value) {
+          console.warn('DEPRECATION Conversation.attributes: Use conversation.set(\'attr\', value) instead. See https://url.leanapp.cn/DeprecateAttributes for more details.');
+          this.set('attr', value);
+        }
+      }, {
+        key: 'name',
+        get: function get() {
+          return this.get('name');
+        },
+        set: function set(value) {
+          this.set('name', value);
+        }
+      }]);
+
+      return Conversation;
+    }(eventemitter3);
+
+    var debug$11 = browser$1('LC:ConversationQuery');
+
+    var ConversationQuery = function () {
+      ConversationQuery._encode = function _encode(value) {
+        if (value instanceof Date) {
+          return { __type: 'Date', iso: value.toJSON() };
+        }
+        if (value instanceof RegExp) {
+          return value.source;
+        }
+        return value;
+      };
+
+      ConversationQuery._quote = function _quote(s) {
+        return '\\Q' + s.replace('\\E', '\\E\\\\E\\Q') + '\\E';
+      };
+
+      ConversationQuery._calculateFlag = function _calculateFlag(options) {
+        return ['withLastMessagesRefreshed', 'compact'].reduce(
+        // eslint-disable-next-line no-bitwise
+        function (prev, key) {
+          return (prev << 1) + Boolean(options[key]);
+        }, 0);
+      };
+
+      /**
+       * Create a ConversationQuery
+       * @param  {IMClient} client
+       */
+
+
+      function ConversationQuery(client) {
+        _classCallCheck(this, ConversationQuery);
+
+        this._client = client;
+        this._where = {};
+        this._extraOptions = {};
+      }
+
+      ConversationQuery.prototype._addCondition = function _addCondition(key, condition, value) {
+        // Check if we already have a condition
+        if (!this._where[key]) {
+          this._where[key] = {};
+        }
+        this._where[key][condition] = this.constructor._encode(value);
+        return this;
+      };
+
+      ConversationQuery.prototype.toJSON = function toJSON() {
+        var json = {
+          where: this._where,
+          flag: this.constructor._calculateFlag(this._extraOptions)
+        };
+        if (typeof this._skip !== 'undefined') json.skip = this._skip;
+        if (typeof this._limit !== 'undefined') json.limit = this._limit;
+        if (typeof this._order !== 'undefined') json.sort = this._order;
+        debug$11(json);
+        return json;
+      };
+
+      /**
+       * 增加查询条件,指定聊天室的组员包含某些成员即可返回
+       * @param {string[]} peerIds - 成员 ID 列表
+       * @return {ConversationQuery} self
+       */
+
+
+      ConversationQuery.prototype.containsMembers = function containsMembers(peerIds) {
+        return this.containsAll('m', peerIds);
+      };
+
+      /**
+       * 增加查询条件,指定聊天室的组员条件满足条件的才返回
+       *
+       * @param {string[]} - 成员 ID 列表
+       * @param {Boolean} includeSelf - 是否包含自己
+       * @return {ConversationQuery} self
+       */
+
+
+      ConversationQuery.prototype.withMembers = function withMembers(peerIds, includeSelf) {
+        var peerIdsSet = new _Set(peerIds);
+        if (includeSelf) {
+          peerIdsSet.add(this._client.id);
+        }
+        this.sizeEqualTo('m', peerIdsSet.size);
+        return this.containsMembers(_Array$from(peerIdsSet));
+      };
+
+      /**
+       * 增加查询条件,当 conversation 的属性中对应的字段满足等于条件时即可返回
+       *
+       * @param {string} key
+       * @param value
+       * @return {ConversationQuery} self
+       */
+
+
+      ConversationQuery.prototype.equalTo = function equalTo(key, value) {
+        this._where[key] = this.constructor._encode(value);
+        return this;
+      };
+
+      /**
+       * 增加查询条件,当 conversation 的属性中对应的字段满足小于条件时即可返回
+       * @param {string} key
+       * @param value
+       * @return {ConversationQuery} self
+       */
+
+
+      ConversationQuery.prototype.lessThan = function lessThan(key, value) {
+        return this._addCondition(key, '$lt', value);
+      };
+
+      /**
+       * 增加查询条件,当 conversation 的属性中对应的字段满足小于等于条件时即可返回
+        * @param {string} key
+       * @param value
+       * @return {ConversationQuery} self
+       */
+
+
+      ConversationQuery.prototype.lessThanOrEqualTo = function lessThanOrEqualTo(key, value) {
+        return this._addCondition(key, '$lte', value);
+      };
+
+      /**
+       * 增加查询条件,当 conversation 的属性中对应的字段满足大于条件时即可返回
+       *
+       * @param {string} key
+       * @param value
+       * @return {ConversationQuery} self
+       */
+
+      ConversationQuery.prototype.greaterThan = function greaterThan(key, value) {
+        return this._addCondition(key, '$gt', value);
+      };
+
+      /**
+       * 增加查询条件,当 conversation 的属性中对应的字段满足大于等于条件时即可返回
+       *
+       * @param {string} key
+       * @param value
+       * @return {ConversationQuery} self
+       */
+
+      ConversationQuery.prototype.greaterThanOrEqualTo = function greaterThanOrEqualTo(key, value) {
+        return this._addCondition(key, '$gte', value);
+      };
+
+      /**
+       * 增加查询条件,当 conversation 的属性中对应的字段满足不等于条件时即可返回
+       *
+       * @param {string} key
+       * @param value
+       * @return {ConversationQuery} self
+       */
+
+
+      ConversationQuery.prototype.notEqualTo = function notEqualTo(key, value) {
+        return this._addCondition(key, '$ne', value);
+      };
+
+      /**
+       * 增加查询条件,当 conversation 存在指定的字段时即可返回
+       *
+       * @since 3.5.0
+       * @param {string} key
+       * @return {ConversationQuery} self
+       */
+
+
+      ConversationQuery.prototype.exists = function exists(key) {
+        return this._addCondition(key, '$exists', true);
+      };
+
+      /**
+       * 增加查询条件,当 conversation 不存在指定的字段时即可返回
+       *
+       * @since 3.5.0
+       * @param {string} key
+       * @return {ConversationQuery} self
+       */
+
+
+      ConversationQuery.prototype.doesNotExist = function doesNotExist(key) {
+        return this._addCondition(key, '$exists', false);
+      };
+
+      /**
+       * 增加查询条件,当 conversation 的属性中对应的字段对应的值包含在指定值中时即可返回
+       *
+       * @param {string} key
+       * @param values
+       * @return {ConversationQuery} self
+       */
+
+
+      ConversationQuery.prototype.containedIn = function containedIn(key, values) {
+        return this._addCondition(key, '$in', values);
+      };
+
+      /**
+       * 增加查询条件,当 conversation 的属性中对应的字段对应的值不包含在指定值中时即可返回
+       *
+       * @param {string} key
+       * @param values
+       * @return {ConversationQuery} self
+       */
+
+
+      ConversationQuery.prototype.notContainsIn = function notContainsIn(key, values) {
+        return this._addCondition(key, '$nin', values);
+      };
+      /**
+       * 增加查询条件,当conversation的属性中对应的字段中的元素包含所有的值才可返回
+       *
+       * @param {string} key
+       * @param values
+       * @return {ConversationQuery} self
+       */
+
+
+      ConversationQuery.prototype.containsAll = function containsAll(key, values) {
+        return this._addCondition(key, '$all', values);
+      };
+
+      /**
+       * 增加查询条件,当 conversation 的属性中对应的字段对应的值包含此字符串即可返回
+       *
+       * @param {string} key
+       * @param {string} subString
+       * @return {ConversationQuery} self
+       */
+
+
+      ConversationQuery.prototype.contains = function contains(key, subString) {
+        return this._addCondition(key, '$regex', ConversationQuery._quote(subString));
+      };
+
+      /**
+       * 增加查询条件,当 conversation 的属性中对应的字段对应的值以此字符串起始即可返回
+       *
+       * @param {string} key
+       * @param {string} prefix
+       * @return {ConversationQuery} self
+       */
+
+
+      ConversationQuery.prototype.startsWith = function startsWith(key, prefix) {
+        return this._addCondition(key, '$regex', '^' + ConversationQuery._quote(prefix));
+      };
+
+      /**
+       * 增加查询条件,当 conversation 的属性中对应的字段对应的值以此字符串结束即可返回
+       *
+       * @param {string} key
+       * @param {string} suffix
+       * @return {ConversationQuery} self
+       */
+
+
+      ConversationQuery.prototype.endsWith = function endsWith(key, suffix) {
+        return this._addCondition(key, '$regex', ConversationQuery._quote(suffix) + '$');
+      };
+
+      /**
+       * 增加查询条件,当 conversation 的属性中对应的字段对应的值满足提供的正则表达式即可返回
+       *
+       * @param {string} key
+       * @param {RegExp} regex
+       * @return {ConversationQuery} self
+       */
+
+
+      ConversationQuery.prototype.matches = function matches(key, regex) {
+        this._addCondition(key, '$regex', regex);
+        // Javascript regex options support mig as inline options but store them
+        // as properties of the object. We support mi & should migrate them to
+        // modifiers
+        var _modifiers = '';
+        if (regex.ignoreCase) {
+          _modifiers += 'i';
+        }
+        if (regex.multiline) {
+          _modifiers += 'm';
+        }
+
+        if (_modifiers && _modifiers.length) {
+          this._addCondition(key, '$options', _modifiers);
+        }
+        return this;
+      };
+
+      /**
+       * 添加查询约束条件,查找 key 类型是数组,该数组的长度匹配提供的数值
+       *
+       * @param {string} key
+       * @param {Number} length
+       * @return {ConversationQuery} self
+       */
+
+
+      ConversationQuery.prototype.sizeEqualTo = function sizeEqualTo(key, length) {
+        return this._addCondition(key, '$size', length);
+      };
+
+      /**
+       * 设置返回集合的大小上限
+       *
+       * @param {Number} limit - 上限
+       * @return {ConversationQuery} self
+       */
+
+
+      ConversationQuery.prototype.limit = function limit(_limit) {
+        this._limit = _limit;
+        return this;
+      };
+
+      /**
+       * 设置返回集合的起始位置,一般用于分页
+       *
+       * @param {Number} skip - 起始位置跳过几个对象
+       * @return {ConversationQuery} self
+       */
+
+
+      ConversationQuery.prototype.skip = function skip(_skip) {
+        this._skip = _skip;
+        return this;
+      };
+
+      /**
+       * 设置返回集合按照指定key进行增序排列
+       *
+       * @param {string} key
+       * @return {ConversationQuery} self
+       */
+
+
+      ConversationQuery.prototype.ascending = function ascending(key) {
+        this._order = key;
+        return this;
+      };
+
+      /**
+       * 设置返回集合按照指定key进行增序排列,如果已设置其他排序,原排序的优先级较高
+       *
+       * @param {string} key
+       * @return {ConversationQuery} self
+       */
+
+
+      ConversationQuery.prototype.addAscending = function addAscending(key) {
+        if (this._order) {
+          this._order += ',' + key;
+        } else {
+          this._order = key;
+        }
+        return this;
+      };
+
+      /**
+       * 设置返回集合按照指定 key 进行降序排列
+       *
+       * @param {string} key
+       * @return {ConversationQuery} self
+       */
+
+
+      ConversationQuery.prototype.descending = function descending(key) {
+        this._order = '-' + key;
+        return this;
+      };
+
+      /**
+       * 设置返回集合按照指定 key 进行降序排列,如果已设置其他排序,原排序的优先级较高
+       *
+       * @param {string} key
+       * @return {ConversationQuery} self
+       */
+
+
+      ConversationQuery.prototype.addDescending = function addDescending(key) {
+        if (this._order) {
+          this._order += ',-' + key;
+        } else {
+          this._order = '-' + key;
+        }
+        return this;
+      };
+
+      /**
+       * 设置返回的 conversations 刷新最后一条消息
+       * @param  {Boolean} [enabled=true]
+       * @return {ConversationQuery} self
+       */
+
+
+      ConversationQuery.prototype.withLastMessagesRefreshed = function withLastMessagesRefreshed() {
+        var enabled = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
+
+        this._extraOptions.withLastMessagesRefreshed = enabled;
+        return this;
+      };
+
+      /**
+       * @deprecated 请替换为 {@link ConversationQuery#withLastMessagesRefreshed}
+       * @param  {Boolean} [enabled=true]
+       * @return {ConversationQuery} self
+       */
+
+
+      ConversationQuery.prototype.withLastMessages = function withLastMessages(enabled) {
+        console.warn('DEPRECATION ConversationQuery#withLastMessages: ' + 'Use ConversationQuery#withLastMessagesRefreshed instead.');
+        return this.withLastMessagesRefreshed(enabled);
+      };
+
+      /**
+       * 设置返回的 conversations 为精简模式,即不含成员列表
+       * @param  {Boolean} [enabled=true]
+       * @return {ConversationQuery} self
+       */
+
+
+      ConversationQuery.prototype.compact = function compact() {
+        var enabled = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
+
+        this._extraOptions.compact = enabled;
+        return this;
+      };
+
+      /**
+       * 执行查询
+       * @return {Promise.}
+       */
+
+
+      ConversationQuery.prototype.find = function find() {
+        return this._client._executeQuery(this);
+      };
+
+      return ConversationQuery;
+    }();
+
+    var version = "3.5.7";
+
+    var _dec;
+    var _dec2;
+    var _class$1;
+
+    function _applyDecoratedDescriptor$1(target, property, decorators, descriptor, context) {
+      var desc = {};
+      Object['ke' + 'ys'](descriptor).forEach(function (key) {
+        desc[key] = descriptor[key];
+      });
+      desc.enumerable = !!desc.enumerable;
+      desc.configurable = !!desc.configurable;
+
+      if ('value' in desc || desc.initializer) {
+        desc.writable = true;
+      }
+
+      desc = decorators.slice().reverse().reduce(function (desc, decorator) {
+        return decorator(target, property, desc) || desc;
+      }, desc);
+
+      if (context && desc.initializer !== void 0) {
+        desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
+        desc.initializer = undefined;
+      }
+
+      if (desc.initializer === void 0) {
+        Object['define' + 'Property'](target, property, desc);
+        desc = null;
+      }
+
+      return desc;
+    }
+
+    var debug$8 = browser$1('LC:IMClient');
+
+    var IMClient = (_dec = throttle(1000), _dec2 = throttle(1000), (_class$1 = function (_EventEmitter) {
+      _inherits(IMClient, _EventEmitter);
+
+      /**
+       * 无法直接实例化,请使用 {@link Realtime#createIMClient} 创建新的 IMClient。
+       *
+       * @extends EventEmitter
+       * @param  {String} [id] 客户端 id
+       * @param  {Object} [options]
+       * @param  {Function} [options.signatureFactory] open session 时的签名方法 // TODO need details
+       * @param  {Function} [options.conversationSignatureFactory] 对话创建、增减成员操作时的签名方法
+       */
+      function IMClient(id) {
+        var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+        var connection = arguments[2];
+        var props = arguments[3];
+
+        _classCallCheck(this, IMClient);
+
+        if (!(id === undefined || typeof id === 'string')) {
+          throw new TypeError('Client id [' + id + '] is not a String');
+        }
+
+        var _this = _possibleConstructorReturn(this, _EventEmitter.call(this));
+
+        _Object$assign(_this, {
+          /**
+           * @var id {String} 客户端 id
+           * @memberof IMClient#
+           */
+          id: id,
+          _connection: connection,
+          options: options
+        }, props);
+
+        if (!_this._messageParser) {
+          throw new Error('IMClient must be initialized with a MessageParser');
+        }
+        _this._conversationCache = new Cache('client:' + _this.id);
+        _this._ackMessageBuffer = {};
+        internal(_this).lastPatchTime = Date.now();
+        internal(_this)._eventemitter = new eventemitter3();
+        ['invited', 'kicked', 'membersjoined', 'membersleft', 'message', 'unreadmessages', 'unreadmessagescountupdate', 'close', 'conflict', 'unhandledmessage', 'reconnect', 'reconnecterror'].forEach(function (event) {
+          return _this.on(event, function () {
+            for (var _len = arguments.length, payload = Array(_len), _key = 0; _key < _len; _key++) {
+              payload[_key] = arguments[_key];
+            }
+
+            return _this._debug(event + ' event emitted. %O', payload);
+          });
+        });
+        // onIMClientCreate hook
+        applyDecorators(_this._plugins.onIMClientCreate, _this);
+        return _this;
+      }
+
+      IMClient.prototype._debug = function _debug() {
+        for (var _len2 = arguments.length, params = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
+          params[_key2] = arguments[_key2];
+        }
+
+        debug$8.apply(undefined, params.concat(['[' + this.id + ']']));
+      };
+
+      /**
+       * @override
+       * @private
+       */
+
+
+      IMClient.prototype._dispatchCommand = function _dispatchCommand(command) {
+        this._debug(trim$1(command), 'received');
+        switch (command.cmd) {
+          case CommandType.conv:
+            return this._dispatchConvMessage(command);
+          case CommandType.direct:
+            return this._dispatchDirectMessage(command);
+          case CommandType.session:
+            return this._dispatchSessionMessage(command);
+          case CommandType.unread:
+            return this._dispatchUnreadMessage(command);
+          case CommandType.rcp:
+            return this._dispatchRcpMessage(command);
+          case CommandType.patch:
+            return this._dispatchPatchMessage(command);
+          default:
+            this.emit('unhandledmessage', command);
+            return _Promise.resolve();
+        }
+      };
+
+      IMClient.prototype._dispatchSessionMessage = function _dispatchSessionMessage(message) {
+        var _message$sessionMessa = message.sessionMessage,
+            code = _message$sessionMessa.code,
+            reason = _message$sessionMessa.reason;
+
+        switch (message.op) {
+          case OpType.closed:
+            {
+              if (code === ErrorCode.SESSION_CONFLICT) {
+                /**
+                 * 用户在其他客户端登录,当前客户端被服务端强行下线。详见文档「单点登录」章节。
+                 * @event IMClient#conflict
+                 */
+                return this.emit('conflict', {
+                  reason: reason
+                });
+              }
+              /**
+               * 当前客户端被服务端强行下线
+               * @event IMClient#close
+               * @param {Object} payload
+               * @param {Number} payload.code 错误码
+               * @param {String} payload.reason 原因
+               */
+              return this.emit('close', {
+                code: code, reason: reason
+              });
+            }
+          default:
+            this.emit('unhandledmessage', message);
+            return _Promise.reject(new Error('Unrecognized session command'));
+        }
+      };
+
+      IMClient.prototype._dispatchUnreadMessage = function _dispatchUnreadMessage(_ref) {
+        var _this2 = this;
+
+        var _ref$unreadMessage = _ref.unreadMessage,
+            convs = _ref$unreadMessage.convs,
+            notifTime = _ref$unreadMessage.notifTime;
+
+        internal(this).lastUnreadNotifTime = notifTime;
+        // ensure all converstions are cached
+        return this.getConversations(convs.map(function (conv) {
+          return conv.cid;
+        })).then(function () {
+          return (
+            // update conversations data
+            _Promise.all(convs.map(function (_ref2) {
+              var cid = _ref2.cid,
+                  unread = _ref2.unread,
+                  mid = _ref2.mid,
+                  ts = _ref2.timestamp,
+                  from = _ref2.from,
+                  data = _ref2.data,
+                  patchTimestamp = _ref2.patchTimestamp;
+              return _this2.getConversation(cid).then(function (conversation) {
+                // deleted conversation
+                if (!conversation) return null;
+                var timestamp = void 0;
+                if (ts) {
+                  timestamp = new Date(ts.toNumber());
+                  conversation.lastMessageAt = timestamp; // eslint-disable-line no-param-reassign
+                }
+                return (mid ? _this2._messageParser.parse(data).then(function (message) {
+                  var messageProps = {
+                    id: mid,
+                    cid: cid,
+                    timestamp: timestamp,
+                    from: from
+                  };
+                  if (patchTimestamp) {
+                    messageProps.updatedAt = new Date(patchTimestamp.toNumber());
+                  }
+                  _Object$assign(message, messageProps);
+                  conversation.lastMessage = message; // eslint-disable-line no-param-reassign
+                }) : _Promise.resolve()).then(function () {
+                  var countNotUpdated = unread === internal(conversation).unreadMessagesCount;
+                  if (countNotUpdated) return null; // to be filtered
+                  // manipulate internal property directly to skip unreadmessagescountupdate event
+                  internal(conversation).unreadMessagesCount = unread;
+                  /**
+                   * 未读消息数目更新
+                   * @event IMClient#unreadmessages
+                   * @deprecated 请使用新的未读消息数目批量更新事件 {@link IMClient#event:unreadmessagescountupdate}
+                   * @param {Object} payload
+                   * @param {Number} payload.count 未读消息数
+                   * @param {String} [payload.lastMessageId] 最新一条未读消息 id
+                   * @param {Date} [payload.lastMessageTimestamp] 最新一条未读消息时间戳
+                   * @param {Conversation} conversation 未读消息数目有更新的对话
+                   */
+                  _this2.emit('unreadmessages', {
+                    count: unread,
+                    lastMessageId: mid,
+                    lastMessageTimestamp: timestamp
+                  }, conversation);
+                  return conversation;
+                });
+              });
+            }
+            // filter conversations without unread count update
+            )).then(function (conversations) {
+              return conversations.filter(function (conversation) {
+                return conversation;
+              });
+            })
+          );
+        }).then(function (conversations) {
+          if (conversations.length) {
+            /**
+             * 未读消息数目更新
+             * @event IMClient#unreadmessagescountupdate
+             * @since 3.4.0
+             * @param {Conversation[]} conversations 未读消息数目有更新的对话列表
+             */
+            _this2.emit('unreadmessagescountupdate', conversations);
+          }
+        });
+      };
+
+      IMClient.prototype._dispatchRcpMessage = function _dispatchRcpMessage(message) {
+        var rcpMessage = message.rcpMessage,
+            read = message.rcpMessage.read;
+
+        var conversationId = rcpMessage.cid;
+        var messageId = rcpMessage.id;
+        var timestamp = new Date(rcpMessage.t.toNumber());
+        var conversation = this._conversationCache.get(conversationId);
+        // conversation not cached means the client does not send the message
+        // during this session
+        if (!conversation) return;
+        conversation._handleReceipt({ messageId: messageId, timestamp: timestamp, read: read });
+      };
+
+      IMClient.prototype._dispatchPatchMessage = function _dispatchPatchMessage(_ref3) {
+        var _this3 = this;
+
+        var patches = _ref3.patchMessage.patches;
+
+        // ensure all converstions are cached
+        return this.getConversations(patches.map(function (patch) {
+          return patch.cid;
+        })).then(function () {
+          return _Promise.all(patches.map(function (_ref4) {
+            var cid = _ref4.cid,
+                mid = _ref4.mid,
+                timestamp = _ref4.timestamp,
+                recall = _ref4.recall,
+                data = _ref4.data,
+                patchTimestamp = _ref4.patchTimestamp,
+                from = _ref4.from;
+            return _this3.getConversation(cid).then(function (conversation) {
+              // deleted conversation
+              if (!conversation) return null;
+              return _this3._messageParser.parse(data).then(function (message) {
+                var patchTime = patchTimestamp.toNumber();
+                var messageProps = {
+                  id: mid,
+                  cid: cid,
+                  timestamp: new Date(timestamp.toNumber()),
+                  updatedAt: new Date(patchTime),
+                  from: from
+                };
+                _Object$assign(message, messageProps);
+                message._setStatus(MessageStatus.SENT);
+                if (internal(_this3).lastPatchTime < patchTime) {
+                  internal(_this3).lastPatchTime = patchTime;
+                }
+                // update conversation lastMessage
+                if (conversation.lastMessage && conversation.lastMessage.id === mid) {
+                  conversation.lastMessage = message; // eslint-disable-line no-param-reassign
+                }
+                if (recall) {
+                  /**
+                   * 消息被撤回
+                   * @event IMClient#messagerecall
+                   * @param {AVMessage} message 被撤回的消息
+                   * @param {Conversation} conversation 消息所在的会话
+                   */
+                  _this3.emit('messagerecall', message, conversation);
+                  /**
+                   * 消息被撤回
+                   * @event Conversation#messagerecall
+                   * @param {AVMessage} message 被撤回的消息
+                   */
+                  conversation.emit('messagerecall', message);
+                } else {
+                  /**
+                   * 消息被修改
+                   * @event IMClient#messageupdate
+                   * @param {AVMessage} message 被修改的消息
+                   * @param {Conversation} conversation 消息所在的会话
+                   */
+                  _this3.emit('messageupdate', message, conversation);
+                  /**
+                   * 消息被修改
+                   * @event Conversation#messageupdate
+                   * @param {AVMessage} message 被修改的消息
+                   */
+                  conversation.emit('messageupdate', message);
+                }
+              });
+            });
+          }));
+        });
+      };
+
+      IMClient.prototype._dispatchConvMessage = function _dispatchConvMessage(message) {
+        var _this4 = this;
+
+        var convMessage = message.convMessage,
+            _message$convMessage = message.convMessage,
+            initBy = _message$convMessage.initBy,
+            m = _message$convMessage.m;
+
+        switch (message.op) {
+          case OpType.joined:
+            {
+              return this.getConversation(convMessage.cid).then(function (conversation) {
+                if (!conversation.transient) {
+                  // eslint-disable-next-line no-param-reassign
+                  conversation.members = union(conversation.members, [_this4.id]);
+                }
+                var payload = {
+                  invitedBy: initBy
+                };
+                /**
+                 * 当前用户被添加至某个对话
+                 * @event IMClient#invited
+                 * @param {Object} payload
+                 * @param {String} payload.invitedBy 邀请者 id
+                 * @param {Conversation} conversation
+                 */
+                _this4.emit('invited', payload, conversation);
+                /**
+                 * 当前用户被添加至当前对话
+                 * @event Conversation#invited
+                 * @param {Object} payload
+                 * @param {String} payload.invitedBy 该移除操作的发起者 id
+                 */
+                conversation.emit('invited', payload);
+              });
+            }
+          case OpType.left:
+            {
+              return this.getConversation(convMessage.cid).then(function (conversation) {
+                if (!conversation.transient) {
+                  // eslint-disable-next-line no-param-reassign
+                  conversation.members = difference(conversation.members, [_this4.id]);
+                }
+                var payload = {
+                  kickedBy: initBy
+                };
+                /**
+                 * 当前用户被从某个对话中移除
+                 * @event IMClient#kicked
+                 * @param {Object} payload
+                 * @param {String} payload.kickedBy 该移除操作的发起者 id
+                 * @param {Conversation} conversation
+                 */
+                _this4.emit('kicked', payload, conversation);
+                /**
+                 * 当前用户被从当前对话中移除
+                 * @event Conversation#kicked
+                 * @param {Object} payload
+                 * @param {String} payload.kickedBy 该移除操作的发起者 id
+                 */
+                conversation.emit('kicked', payload);
+              });
+            }
+          case OpType.members_joined:
+            {
+              return this.getConversation(convMessage.cid).then(function (conversation) {
+                if (!conversation.transient) {
+                  // eslint-disable-next-line no-param-reassign
+                  conversation.members = union(conversation.members, convMessage.m);
+                }
+                var payload = {
+                  invitedBy: initBy,
+                  members: m
+                };
+                /**
+                 * 有用户被添加至某个对话
+                 * @event IMClient#membersjoined
+                 * @param {Object} payload
+                 * @param {String[]} payload.members 被添加的用户 id 列表
+                 * @param {String} payload.invitedBy 邀请者 id
+                 * @param {Conversation} conversation
+                 */
+                _this4.emit('membersjoined', payload, conversation);
+                /**
+                 * 有成员被添加至当前对话
+                 * @event Conversation#membersjoined
+                 * @param {Object} payload
+                 * @param {String[]} payload.members 被添加的成员 id 列表
+                 * @param {String} payload.invitedBy 邀请者 id
+                 */
+                conversation.emit('membersjoined', payload);
+              });
+            }
+          case OpType.members_left:
+            {
+              return this.getConversation(convMessage.cid).then(function (conversation) {
+                if (!conversation.transient) {
+                  // eslint-disable-next-line no-param-reassign
+                  conversation.members = difference(conversation.members, convMessage.m);
+                }
+                var payload = {
+                  kickedBy: initBy,
+                  members: m
+                };
+                /**
+                 * 有成员被从某个对话中移除
+                 * @event IMClient#membersleft
+                 * @param {Object} payload
+                 * @param {String[]} payload.members 被移除的成员 id 列表
+                 * @param {String} payload.kickedBy 该移除操作的发起者 id
+                 * @param {Conversation} conversation
+                 */
+                _this4.emit('membersleft', payload, conversation);
+                /**
+                 * 有成员被从当前对话中移除
+                 * @event Conversation#membersleft
+                 * @param {Object} payload
+                 * @param {String[]} payload.members 被移除的成员 id 列表
+                 * @param {String} payload.kickedBy 该移除操作的发起者 id
+                 */
+                conversation.emit('membersleft', payload);
+              });
+            }
+          default:
+            this.emit('unhandledmessage', message);
+            return _Promise.reject(new Error('Unrecognized conversation command'));
+        }
+      };
+
+      IMClient.prototype._dispatchDirectMessage = function _dispatchDirectMessage(originalMessage) {
+        var _this5 = this;
+
+        var directMessage = originalMessage.directMessage,
+            _originalMessage$dire = originalMessage.directMessage,
+            id = _originalMessage$dire.id,
+            cid = _originalMessage$dire.cid,
+            fromPeerId = _originalMessage$dire.fromPeerId,
+            timestamp = _originalMessage$dire.timestamp,
+            transient = _originalMessage$dire.transient,
+            patchTimestamp = _originalMessage$dire.patchTimestamp;
+
+        return _Promise.all([this.getConversation(directMessage.cid), this._messageParser.parse(directMessage.msg)]).then(function (_ref5) {
+          var _ref6 = _slicedToArray(_ref5, 2),
+              conversation = _ref6[0],
+              message = _ref6[1];
+
+          // deleted conversation
+          if (!conversation) return undefined;
+          var messageProps = {
+            id: id,
+            cid: cid,
+            timestamp: new Date(timestamp.toNumber()),
+            from: fromPeerId,
+            transient: transient
+          };
+          if (patchTimestamp) {
+            messageProps.updatedAt = new Date(patchTimestamp.toNumber());
+          }
+          _Object$assign(message, messageProps);
+          message._setStatus(MessageStatus.SENT);
+          return _this5._dispatchParsedMessage(message, conversation);
+        });
+      };
+
+      IMClient.prototype._dispatchParsedMessage = function _dispatchParsedMessage(message, conversation) {
+        var _this6 = this;
+
+        // beforeMessageDispatch hook
+        return applyDispatcher(this._plugins.beforeMessageDispatch, [message, conversation]).then(function (shouldDispatch) {
+          if (shouldDispatch === false) return;
+          conversation.lastMessage = message; // eslint-disable-line no-param-reassign
+          conversation.lastMessageAt = message.timestamp; // eslint-disable-line no-param-reassign
+          // filter outgoing message sent from another device
+          if (message.from !== _this6.id) {
+            conversation.unreadMessagesCount += 1; // eslint-disable-line no-param-reassign
+            if (!(message.transient || conversation.transient)) {
+              _this6._sendAck(message);
+            }
+          }
+          /**
+           * 当前用户收到消息
+           * @event IMClient#message
+           * @param {Message} message
+           * @param {Conversation} conversation 收到消息的对话
+           */
+          _this6.emit('message', message, conversation);
+          /**
+           * 当前对话收到消息
+           * @event Conversation#message
+           * @param {Message} message
+           */
+          conversation.emit('message', message);
+        });
+      };
+
+      IMClient.prototype._sendAck = function _sendAck(message) {
+        this._debug('send ack for %O', message);
+        var cid = message.cid;
+
+        if (!cid) {
+          throw new Error('missing cid');
+        }
+        if (!this._ackMessageBuffer[cid]) {
+          this._ackMessageBuffer[cid] = [];
+        }
+        this._ackMessageBuffer[cid].push(message);
+        return this._doSendAck();
+      };
+
+      // jsdoc-ignore-start
+
+
+      // jsdoc-ignore-end
+      IMClient.prototype._doSendAck = function _doSendAck() {
+        var _this7 = this;
+
+        // if not connected, just skip everything
+        if (!this._connection.is('connected')) return;
+        this._debug('do send ack %O', this._ackMessageBuffer);
+        _Promise.all(_Object$keys(this._ackMessageBuffer).map(function (cid) {
+          var convAckMessages = _this7._ackMessageBuffer[cid];
+          var timestamps = convAckMessages.map(function (message) {
+            return message.timestamp;
+          });
+          var command = new GenericCommand({
+            cmd: 'ack',
+            ackMessage: new AckCommand({
+              cid: cid,
+              fromts: Math.min.apply(null, timestamps),
+              tots: Math.max.apply(null, timestamps)
+            })
+          });
+          delete _this7._ackMessageBuffer[cid];
+          return _this7._send(command, false).catch(function (error$$1) {
+            _this7._debug('send ack failed: %O', error$$1);
+            _this7._ackMessageBuffer[cid] = convAckMessages;
+          });
+        }));
+      };
+
+      IMClient.prototype._send = function _send(cmd) {
+        var _connection;
+
+        var command = cmd;
+        if (this.id) {
+          command.peerId = this.id;
+        }
+
+        for (var _len3 = arguments.length, args = Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
+          args[_key3 - 1] = arguments[_key3];
+        }
+
+        return (_connection = this._connection).send.apply(_connection, [command].concat(args));
+      };
+
+      IMClient.prototype._open = function _open(appId, tag, deviceId) {
+        var _this8 = this;
+
+        var isReconnect = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
+
+        this._debug('open session');
+
+        var _internal = internal(this),
+            lastUnreadNotifTime = _internal.lastUnreadNotifTime,
+            lastPatchTime = _internal.lastPatchTime;
+
+        return _Promise.resolve(new GenericCommand({
+          cmd: 'session',
+          op: 'open',
+          appId: appId,
+          sessionMessage: new SessionCommand({
+            ua: 'js/' + version,
+            r: isReconnect,
+            lastUnreadNotifTime: lastUnreadNotifTime,
+            lastPatchTime: lastPatchTime,
+            configBitmap: 1
+          })
+        })).then(function (command) {
+          if (isReconnect) {
+            // if sessionToken is not expired, skip signature/tag/deviceId
+            var sessionToken = internal(_this8).sessionToken;
+            if (sessionToken) {
+              var value = sessionToken.value;
+              if (value && value !== Expirable.EXPIRED) {
+                _Object$assign(command.sessionMessage, {
+                  st: value
+                });
+                return command;
+              }
+            }
+          }
+          _Object$assign(command.sessionMessage, trim$1({
+            tag: tag,
+            deviceId: deviceId
+          }));
+          if (_this8.options.signatureFactory) {
+            return runSignatureFactory(_this8.options.signatureFactory, [_this8.id]).then(function (signatureResult) {
+              _Object$assign(command.sessionMessage, keyRemap({
+                signature: 's',
+                timestamp: 't',
+                nonce: 'n'
+              }, signatureResult));
+              return command;
+            });
+          }
+          return command;
+        }).then(this._send.bind(this)).then(function (resCommand) {
+          var peerId = resCommand.peerId,
+              _resCommand$sessionMe = resCommand.sessionMessage,
+              token = _resCommand$sessionMe.st,
+              tokenTTL = _resCommand$sessionMe.stTtl;
+
+          if (!peerId) {
+            console.warn('Unexpected session opened without peerId.');
+            return;
+          }
+          _this8.id = peerId;
+          if (token) {
+            internal(_this8).sessionToken = new Expirable(token, tokenTTL * 1000);
+          }
+        }, function (error$$1) {
+          if (error$$1.code === ErrorCode.SESSION_TOKEN_EXPIRED) {
+            if (internal(_this8).sessionToken === undefined) {
+              // let it fail if sessoinToken not cached but command rejected as token expired
+              // to prevent session openning flood
+              throw new Error('Unexpected session expiration');
+            }
+            debug$8('Session token expired, reopening');
+            delete internal(_this8).sessionToken;
+            return _this8._open(appId, tag, deviceId, isReconnect);
+          }
+          throw error$$1;
+        });
+      };
+
+      /**
+       * 关闭客户端
+       * @return {Promise}
+       */
+
+
+      IMClient.prototype.close = function close() {
+        var _this9 = this;
+
+        this._debug('close session');
+        var command = new GenericCommand({
+          cmd: 'session',
+          op: 'close'
+        });
+        return this._send(command).then(function () {
+          internal(_this9)._eventemitter.emit('close', {
+            code: 0
+          });
+          _this9.emit('close', {
+            code: 0
+          });
+        });
+      };
+      /**
+       * 获取 client 列表中在线的 client,每次查询最多 20 个 clientId,超出部分会被忽略
+       * @param  {String[]} clientIds 要查询的 client ids
+       * @return {Primse.} 在线的 client ids
+       */
+
+
+      IMClient.prototype.ping = function ping(clientIds) {
+        this._debug('ping');
+        if (!(clientIds instanceof Array)) {
+          throw new TypeError('clientIds ' + clientIds + ' is not an Array');
+        }
+        if (!clientIds.length) {
+          return _Promise.resolve([]);
+        }
+        var command = new GenericCommand({
+          cmd: 'session',
+          op: 'query',
+          sessionMessage: new SessionCommand({
+            sessionPeerIds: clientIds
+          })
+        });
+        return this._send(command).then(function (resCommand) {
+          return resCommand.sessionMessage.onlineSessionPeerIds;
+        });
+      };
+
+      /**
+       * 获取某个特定的对话
+       * @param  {String} id 对话 id,对应 _Conversation 表中的 objectId
+       * @param  {Boolean} [noCache=false] 强制不从缓存中获取
+       * @return {Promise.} 如果 id 对应的对话不存在则返回 null
+       */
+
+
+      IMClient.prototype.getConversation = function getConversation(id) {
+        var noCache = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
+
+        if (typeof id !== 'string') {
+          throw new TypeError(id + ' is not a String');
+        }
+        if (!noCache) {
+          var cachedConversation = this._conversationCache.get(id);
+          if (cachedConversation) {
+            return _Promise.resolve(cachedConversation);
+          }
+        }
+        return this.getQuery().equalTo('objectId', id).find().then(function (conversations) {
+          return conversations[0] || null;
+        });
+      };
+
+      /**
+       * 通过 id 批量获取某个特定的对话
+       * @since 3.4.0
+       * @param  {String[]} ids 对话 id 列表,对应 _Conversation 表中的 objectId
+       * @param  {Boolean} [noCache=false] 强制不从缓存中获取
+       * @return {Promise.} 如果 id 对应的对话不存在则返回 null
+       */
+
+
+      IMClient.prototype.getConversations = function getConversations(ids) {
+        var _this10 = this;
+
+        var noCache = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
+
+        var remoteConversationIds = noCache ? ids : ids.filter(function (id) {
+          return _this10._conversationCache.get(id) === null;
+        });
+        return (remoteConversationIds.length ? this.getQuery().containedIn('objectId', remoteConversationIds).limit(999).find() : _Promise.resolve()).then(function () {
+          return ids.map(function (id) {
+            return _this10._conversationCache.get(id);
+          });
+        });
+      };
+
+      /**
+       * 构造一个 ConversationQuery 来查询对话
+       * @return {ConversationQuery}
+       */
+
+
+      IMClient.prototype.getQuery = function getQuery() {
+        return new ConversationQuery(this);
+      };
+
+      IMClient.prototype._executeQuery = function _executeQuery(query) {
+        var _this11 = this;
+
+        var queryJSON = query.toJSON();
+        queryJSON.where = new JsonObjectMessage({
+          data: _JSON$stringify(queryJSON.where)
+        });
+        var command = new GenericCommand({
+          cmd: 'conv',
+          op: 'query',
+          convMessage: new ConvCommand(queryJSON)
+        });
+        return this._send(command).then(function (resCommand) {
+          try {
+            return JSON.parse(resCommand.convMessage.results.data);
+          } catch (error) {
+            var commandString = _JSON$stringify(trim$1(resCommand));
+            throw new Error('Parse query result failed: ' + error$$1.message + '. Command: ' + commandString);
+          }
+        }).then(function (conversations) {
+          return _Promise.all(conversations.map(_this11._parseConversationFromRawData.bind(_this11)));
+        }).then(function (conversations) {
+          return conversations.map(function (fetchedConversation) {
+            var conversation = _this11._conversationCache.get(fetchedConversation.id);
+            if (!conversation) {
+              conversation = fetchedConversation;
+              _this11._debug('no match, set cache');
+              _this11._conversationCache.set(fetchedConversation.id, fetchedConversation);
+            } else {
+              _this11._debug('update cached conversation');
+              ['creator', 'createdAt', 'updatedAt', 'lastMessageAt', 'lastMessage', 'mutedMembers', 'members', '_attributes', 'transient', 'muted'].forEach(function (key) {
+                var value = fetchedConversation[key];
+                if (value !== undefined) conversation[key] = value;
+              });
+              conversation._reset();
+            }
+            return conversation;
+          });
+        });
+      };
+
+      IMClient.prototype._parseConversationFromRawData = function _parseConversationFromRawData(rawData) {
+        var _this12 = this;
+
+        var data = keyRemap({
+          objectId: 'id',
+          lm: 'lastMessageAt',
+          msg: 'lastMessage',
+          msg_from: 'lastMessageFrom',
+          msg_mid: 'lastMessageId',
+          msg_timestamp: 'lastMessageTimestamp',
+          patch_timestamp: 'lastMessagePatchTimestamp',
+          m: 'members',
+          tr: 'transient',
+          sys: 'system',
+          c: 'creator',
+          mu: 'mutedMembers'
+        }, rawData);
+        return _Promise.resolve().then(function () {
+          if (data.lastMessage) {
+            return _this12._messageParser.parse(data.lastMessage).then(function (message) {
+              /* eslint-disable no-param-reassign */
+              data.lastMessage = message;
+              message.from = data.lastMessageFrom;
+              message.id = data.lastMessageId;
+              message.timestamp = new Date(data.lastMessageTimestamp);
+              if (data.lastMessagePatchTimestamp) {
+                message.updatedAt = new Date(data.lastMessagePatchTimestamp);
+              }
+              message._setStatus(MessageStatus.SENT);
+              delete data.lastMessageFrom;
+              delete data.lastMessageId;
+              delete data.lastMessageTimestamp;
+              delete data.lastMessagePatchTimestamp;
+              /* eslint-enable no-param-reassign */
+            });
+          }
+          return _Promise.resolve();
+        }).then(function () {
+          return new Conversation(data, _this12);
+        });
+      };
+
+      /**
+       * 创建一个 conversation
+       * @param {Object} options 除了下列字段外的其他字段将被视为对话的自定义属性
+       * @param {String[]} options.members 对话的初始成员列表,默认包含当前 client
+       * @param {String} [options.name] 对话的名字
+       * @param {Object} [options.attributes] DEPRECATED: 额外属性,对应 _Conversation 表的 attr 列
+       * @param {Boolean} [options.transient=false] 暂态会话
+       * @param {Boolean} [options.unique=false] 唯一对话,当其为 true 时,如果当前已经有相同成员的对话存在则返回该对话,否则会创建新的对话
+       * @return {Promise.}
+       */
+
+
+      IMClient.prototype.createConversation = function createConversation() {
+        var _this13 = this;
+
+        var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
+
+        var m = options.members,
+            name$$1 = options.name,
+            attributes = options.attributes,
+            transient = options.transient,
+            unique = options.unique,
+            properties = _objectWithoutProperties(options, ['members', 'name', 'attributes', 'transient', 'unique']);
+
+        if (!(transient || Array.isArray(m))) {
+          throw new TypeError('conversation members ' + m + ' is not an array');
+        }
+        var members = new _Set(m);
+        members.add(this.id);
+        members = _Array$from(members).sort();
+        var attr = properties || {};
+        if (name$$1) {
+          if (typeof name$$1 !== 'string') {
+            throw new TypeError('conversation name ' + name$$1 + ' is not a string');
+          }
+          attr.name = name$$1;
+        }
+        if (attributes) {
+          console.warn('DEPRECATION createConversation options.attributes param: Use options[propertyName] instead. See https://url.leanapp.cn/DeprecateAttributes for more details.');
+          attr.attr = attributes;
+        }
+        attr = new JsonObjectMessage({
+          data: _JSON$stringify(attr)
+        });
+
+        var startCommandJson = {
+          m: members,
+          attr: attr,
+          transient: transient,
+          unique: unique
+        };
+
+        return _Promise.resolve(new GenericCommand({
+          cmd: 'conv',
+          op: 'start',
+          convMessage: new ConvCommand(startCommandJson)
+        })).then(function (command) {
+          if (_this13.options.conversationSignatureFactory) {
+            var _params = [null, _this13.id, members, 'create'];
+            return runSignatureFactory(_this13.options.conversationSignatureFactory, _params).then(function (signatureResult) {
+              _Object$assign(command.convMessage, keyRemap({
+                signature: 's',
+                timestamp: 't',
+                nonce: 'n'
+              }, signatureResult));
+              return command;
+            });
+          }
+          return command;
+        }).then(this._send.bind(this)).then(function (resCommand) {
+          return new Conversation(_extends$1({
+            name: name$$1,
+            attr: attributes,
+            transient: transient,
+            unique: unique,
+            id: resCommand.convMessage.cid,
+            createdAt: resCommand.convMessage.cdate,
+            updatedAt: resCommand.convMessage.cdate,
+            lastMessageAt: null,
+            creator: _this13.id,
+            members: transient ? [] : members
+          }, properties), _this13);
+        }).then(tap(function (conversation) {
+          return _this13._conversationCache.set(conversation.id, conversation);
+        }));
+      };
+
+      /**
+       * 将指定的所有会话标记为已读
+       * @deprecated 请遍历调用 conversations 的 {@link Conversation#read read} 方法
+       * @param {Conversation[]} conversations 指定的会话列表
+       * @return {Promise.} conversations 返回输入的会话列表
+       */
+      // eslint-disable-next-line class-methods-use-this
+
+
+      IMClient.prototype.markAllAsRead = function markAllAsRead(conversations) {
+        console.warn('DEPRECATION IMClient.markAllAsRead: Use Conversation#read instead.');
+        if (!Array.isArray(conversations)) {
+          throw new TypeError(conversations + ' is not an Array');
+        }
+        return _Promise.all(conversations.map(function (conversation) {
+          return conversation.read();
+        }));
+      };
+
+      // jsdoc-ignore-start
+
+
+      // jsdoc-ignore-end
+      IMClient.prototype._doSendRead = function _doSendRead() {
+        var _this14 = this;
+
+        // if not connected, just skip everything
+        if (!this._connection.is('connected')) return;
+        var buffer = internal(this).readConversationsBuffer;
+        var conversations = _Array$from(buffer);
+        if (!conversations.length) return;
+        var ids = conversations.map(function (conversation) {
+          if (!(conversation instanceof Conversation)) {
+            throw new TypeError(conversation + ' is not a Conversation');
+          }
+          return conversation.id;
+        });
+        this._debug('mark [' + ids + '] as read');
+        buffer.clear();
+        this._sendReadCommand(conversations).catch(function (error$$1) {
+          _this14._debug('send read failed: %O', error$$1);
+          conversations.forEach(buffer.add.bind(buffer));
+        });
+      };
+
+      IMClient.prototype._sendReadCommand = function _sendReadCommand(conversations) {
+        var _this15 = this;
+
+        return this._send(new GenericCommand({
+          cmd: 'read',
+          readMessage: new ReadCommand({
+            convs: conversations.map(function (conversation) {
+              return new ReadTuple({
+                cid: conversation.id,
+                mid: conversation.lastMessage && conversation.lastMessage.from !== _this15.id ? conversation.lastMessage.id : undefined,
+                timestamp: (conversation.lastMessageAt || new Date()).getTime()
+              });
+            })
+          })
+        }), false);
+      };
+
+      return IMClient;
+    }(eventemitter3), (_applyDecoratedDescriptor$1(_class$1.prototype, '_doSendAck', [_dec], _Object$getOwnPropertyDescriptor(_class$1.prototype, '_doSendAck'), _class$1.prototype), _applyDecoratedDescriptor$1(_class$1.prototype, '_doSendRead', [_dec2], _Object$getOwnPropertyDescriptor(_class$1.prototype, '_doSendRead'), _class$1.prototype)), _class$1));
+
+    var _dec$3;
+    var _class$4;
+
+    // jsdoc-ignore-start
+
+    // jsdoc-ignore-end
+    var TextMessage = (_dec$3 = messageType(-1), _dec$3(_class$4 = IE10Compatible(_class$4 = function (_TypedMessage) {
+      _inherits(TextMessage, _TypedMessage);
+
+      /**
+       * 文类类型消息
+       * @extends TypedMessage
+       * @param  {String} [text='']
+       * @throws {TypeError} text 不是 String 类型
+       */
+      function TextMessage() {
+        var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
+
+        _classCallCheck(this, TextMessage);
+
+        if (typeof text !== 'string') {
+          throw new TypeError(text + ' is not a string');
+        }
+
+        var _this = _possibleConstructorReturn(this, _TypedMessage.call(this));
+
+        _this.setText(text);
+        return _this;
+      }
+
+      return TextMessage;
+    }(TypedMessage)) || _class$4) || _class$4);
+
+    var _class$5;
+
+    function _applyDecoratedDescriptor$2(target, property, decorators, descriptor, context) {
+      var desc = {};
+      Object['ke' + 'ys'](descriptor).forEach(function (key) {
+        desc[key] = descriptor[key];
+      });
+      desc.enumerable = !!desc.enumerable;
+      desc.configurable = !!desc.configurable;
+
+      if ('value' in desc || desc.initializer) {
+        desc.writable = true;
+      }
+
+      desc = decorators.slice().reverse().reduce(function (desc, decorator) {
+        return decorator(target, property, desc) || desc;
+      }, desc);
+
+      if (context && desc.initializer !== void 0) {
+        desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
+        desc.initializer = undefined;
+      }
+
+      if (desc.initializer === void 0) {
+        Object['define' + 'Property'](target, property, desc);
+        desc = null;
+      }
+
+      return desc;
+    }
+
+    var debug$12 = browser$1('LC:MessageParser');
+
+    var tryParseJson = function tryParseJson(target, key, descriptor) {
+      var fn = descriptor.value;
+      // eslint-disable-next-line no-param-reassign
+      descriptor.value = function wrapper(param) {
+        var content = void 0;
+        if (typeof param !== 'string') {
+          content = param;
+        } else {
+          try {
+            content = JSON.parse(param);
+          } catch (error) {
+            content = param;
+          }
+        }
+        return fn.call(this, content);
+      };
+    };
+
+    var applyPlugins = function applyPlugins(target, key, descriptor) {
+      var fn = descriptor.value;
+      // eslint-disable-next-line no-param-reassign
+      descriptor.value = function wrapper(json) {
+        var _this = this;
+
+        return _Promise.resolve(json).then(applyMiddlewares(this._plugins.beforeMessageParse)).then(function (decoratedJson) {
+          return fn.call(_this, decoratedJson);
+        }).then(applyMiddlewares(this._plugins.afterMessageParse));
+      };
+    };
+
+    var MessageParser = (_class$5 = function () {
+      function MessageParser() {
+        var plugins = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
+
+        _classCallCheck(this, MessageParser);
+
+        this._plugins = plugins;
+        this._messageClasses = [];
+      }
+
+      MessageParser.prototype.register = function register(messageClass) {
+        if (messageClass && messageClass.parse && messageClass.prototype && messageClass.prototype.toJSON) {
+          this._messageClasses.unshift(messageClass);
+        } else {
+          throw new TypeError('Invalid messageClass');
+        }
+      };
+
+      // jsdoc-ignore-start
+
+
+      // jsdoc-ignore-end
+      MessageParser.prototype.parse = function parse(content) {
+        debug$12('parsing message: %O', content);
+        // eslint-disable-next-line no-restricted-syntax
+        var _iteratorNormalCompletion = true;
+        var _didIteratorError = false;
+        var _iteratorError = undefined;
+
+        try {
+          for (var _iterator = _getIterator(this._messageClasses), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
+            var Klass = _step.value;
+
+            var contentCopy = isPlainObject_1(content) ? _Object$assign({}, content) : content;
+            var valid = void 0;
+            var result = void 0;
+            try {
+              valid = Klass.validate(contentCopy);
+            } catch (error) {
+              // eslint-disable-line no-empty
+            }
+            if (valid) {
+              try {
+                result = Klass.parse(contentCopy);
+              } catch (error) {
+                console.warn('parsing a valid message content error', {
+                  error: error,
+                  Klass: Klass,
+                  content: contentCopy
+                });
+              }
+              if (result !== undefined) {
+                debug$12('parse result: %O', result);
+                return result;
+              }
+            }
+          }
+        } catch (err) {
+          _didIteratorError = true;
+          _iteratorError = err;
+        } finally {
+          try {
+            if (!_iteratorNormalCompletion && _iterator.return) {
+              _iterator.return();
+            }
+          } finally {
+            if (_didIteratorError) {
+              throw _iteratorError;
+            }
+          }
+        }
+
+        throw new Error('No Message Class matched');
+      };
+
+      return MessageParser;
+    }(), (_applyDecoratedDescriptor$2(_class$5.prototype, 'parse', [tryParseJson, applyPlugins], _Object$getOwnPropertyDescriptor(_class$5.prototype, 'parse'), _class$5.prototype)), _class$5);
+
+    /** @module leancloud-realtime */
+    var debug$7 = browser$1('LC:IMPlugin');
+
+    /**
+     * 消息优先级枚举
+     * @enum {Number}
+     * @since 3.3.0
+     */
+    var MessagePriority = {
+      /** 高 */
+      HIGH: 1,
+      /** 普通 */
+      NORMAL: 2,
+      /** 低 */
+      LOW: 3
+    };
+    _Object$freeze(MessagePriority);
+
+    /**
+     * 为 Conversation 定义一个新属性
+     * @param {String} prop 属性名
+     * @param {Object} [descriptor] 属性的描述符,参见 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/getOwnPropertyDescriptor#Description getOwnPropertyDescriptor#Description - MDN},默认为该属性名对应的 Conversation 自定义属性的 getter/setter
+     * @returns void
+     * @example
+     *
+     * conversation.get('type');
+     * conversation.set('type', 1);
+     *
+     * // equals to
+     * defineConversationProperty('type');
+     * conversation.type;
+     * conversation.type = 1;
+     */
+    var defineConversationProperty = function defineConversationProperty(prop) {
+      var descriptor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
+        get: function get() {
+          return this.get(prop);
+        },
+        set: function set(value) {
+          this.set(prop, value);
+        }
+      };
+
+      _Object$defineProperty(Conversation.prototype, prop, descriptor);
+    };
+
+    var onRealtimeCreate = function onRealtimeCreate(realtime) {
+      /* eslint-disable no-param-reassign */
+      var deviceId = v4_1();
+      realtime._IMClients = {};
+      var messageParser = realtime._messageParser = new MessageParser(realtime._plugins);
+
+      /**
+       * 注册消息类
+       *
+       * 在接收消息、查询消息时,会按照消息类注册顺序的逆序依次尝试解析消息内容
+       *
+       * @function register
+       * @memberof Realtime
+       * @instance
+       * @param  {Function | Function[]} messageClass 消息类,需要实现 {@link AVMessage} 接口,
+       * 建议继承自 {@link TypedMessage}
+       * @throws {TypeError} 如果 messageClass 没有实现 {@link AVMessage} 接口则抛出异常
+       */
+      realtime.register = function (messageClass) {
+        return ensureArray(messageClass).map(messageParser.register.bind(messageParser));
+      };
+      realtime.register(ensureArray(realtime._plugins.messageClasses));
+      /**
+       * 创建一个即时通讯客户端,多次创建相同 id 的客户端会返回同一个实例
+       * @function createIMClient
+       * @memberof Realtime
+       * @instance
+       * @param  {String} [id] 客户端 id,如果不指定,服务端会随机生成一个
+       * @param  {Object} [clientOptions] 详细参数 @see {@link IMClient}
+       * @param  {String} [tag] 客户端类型标记,以支持单点登录功能
+       * @return {Promise.}
+       */
+      realtime.createIMClient = function (id, clientOptions, tag) {
+        var idIsString = typeof id === 'string';
+        if (idIsString && realtime._IMClients[id] !== undefined) {
+          return _Promise.resolve(realtime._IMClients[id]);
+        }
+        var promise = realtime._open().then(function (connection) {
+          var client = new IMClient(id, clientOptions, connection, {
+            _messageParser: messageParser,
+            _plugins: realtime._plugins
+          });
+          connection.on('reconnect', function () {
+            return client._open(realtime._options.appId, tag, deviceId, true)
+            /**
+             * 客户端连接恢复正常,该事件通常在 {@link Realtime#event:reconnect} 之后发生
+             * @event IMClient#reconnect
+             * @see Realtime#event:reconnect
+             * @since 3.2.0
+             */
+            /**
+             * 客户端重新登录发生错误(网络连接已恢复,但重新登录错误)
+             * @event IMClient#reconnecterror
+             * @since 3.2.0
+             */
+            .then(function () {
+              return client.emit('reconnect');
+            }, function (error) {
+              return client.emit('reconnecterror', error);
+            });
+          });
+          internal(client)._eventemitter.on('close', function () {
+            delete realtime._IMClients[client.id];
+            realtime._deregister(client);
+          }, realtime);
+          return client._open(realtime._options.appId, tag, deviceId).then(function () {
+            realtime._IMClients[client.id] = client;
+            realtime._register(client);
+            return client;
+          });
+        }).catch(function (error) {
+          delete realtime._IMClients[id];
+          throw error;
+        });
+        if (idIsString) {
+          realtime._IMClients[id] = promise;
+        }
+        return promise;
+      };
+      /* eslint-enable no-param-reassign */
+    };
+
+    var beforeCommandDispatch = function beforeCommandDispatch(command, realtime) {
+      if (command.peerId === null) return true;
+      var targetClient = realtime._IMClients[command.peerId];
+      if (targetClient) {
+        _Promise.resolve(targetClient).then(function (client) {
+          return client._dispatchCommand(command);
+        }).catch(debug$7);
+      } else {
+        debug$7('[WARN] Unexpected message received without any live client match: %O', trim$1(command));
+      }
+      return false;
+    };
+
+    var IMPlugin = {
+      name: 'leancloud-realtime-plugin-im',
+      onRealtimeCreate: onRealtimeCreate,
+      beforeCommandDispatch: beforeCommandDispatch,
+      messageClasses: [Message, RecalledMessage, TextMessage]
+    };
+
+    Realtime.defineConversationProperty = defineConversationProperty;
+    Realtime.__preRegisteredPlugins = [IMPlugin];
+
+    exports.Protocals = message;
+    exports.Promise = _Promise;
+    exports.EventEmitter = eventemitter3;
+    exports.Realtime = Realtime;
+    exports.ErrorCode = ErrorCode;
+    exports.Message = Message;
+    exports.TypedMessage = TypedMessage;
+    exports.TextMessage = TextMessage;
+    exports.RecalledMessage = RecalledMessage;
+    exports.MessagePriority = MessagePriority;
+    exports.MessageStatus = MessageStatus;
+    exports.defineConversationProperty = defineConversationProperty;
+    exports.IMPlugin = IMPlugin;
+    exports.messageType = messageType;
+    exports.messageField = messageField;
+    exports.IE10Compatible = IE10Compatible;
+
+    Object.defineProperty(exports, '__esModule', { value: true });
+
+})));
+
+//# sourceMappingURL=realtime.browser.js.map
\ No newline at end of file
diff --git a/dist/realtime.browser.js.map b/dist/realtime.browser.js.map
new file mode 100644
index 000000000..5cba32e51
--- /dev/null
+++ b/dist/realtime.browser.js.map
@@ -0,0 +1 @@
+{"version":3,"file":null,"sources":["/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_to-integer.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_defined.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_string-at.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_library.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_global.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_core.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_a-function.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_ctx.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_is-object.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_an-object.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_fails.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_descriptors.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_dom-create.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_ie8-dom-define.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_to-primitive.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_object-dp.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_property-desc.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_hide.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_export.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_redefine.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_has.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_iterators.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_cof.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_iobject.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_to-iobject.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_to-length.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_to-absolute-index.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_array-includes.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_shared.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_uid.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_shared-key.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_object-keys-internal.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_enum-bug-keys.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_object-keys.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_object-dps.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_html.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_object-create.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_wks.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_set-to-string-tag.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_iter-create.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_to-object.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_object-gpo.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_iter-define.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es6.string.iterator.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_add-to-unscopables.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_iter-step.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es6.array.iterator.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/web.dom.iterable.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_classof.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_an-instance.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_iter-call.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_is-array-iter.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/core.get-iterator-method.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_for-of.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_species-constructor.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_invoke.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_task.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_microtask.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_new-promise-capability.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_perform.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_promise-resolve.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_redefine-all.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_set-species.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_iter-detect.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es6.promise.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es7.promise.finally.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es7.promise.try.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/fn/promise.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/core-js/promise.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/long/dist/long.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/bytebuffer/dist/bytebuffer.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/@leeyeh/rollup-plugin-node-resolve/src/empty.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/protobufjs/dist/protobuf-light.js","/home/travis/build/leancloud/js-realtime-sdk/proto/message-compiled.js","/home/travis/build/leancloud/js-realtime-sdk/proto/message.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/eventemitter3/index.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_create-property.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es6.array.from.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/fn/array/from.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/core-js/array/from.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/helpers/toConsumableArray.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_meta.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_validate-collection.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_collection-strong.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_is-array.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_array-species-constructor.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_array-species-create.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_array-methods.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_collection.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es6.set.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_array-from-iterable.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_collection-to-json.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es7.set.to-json.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_set-collection-of.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es7.set.of.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_set-collection-from.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es7.set.from.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/fn/set.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/core-js/set.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_object-gops.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_object-pie.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_object-assign.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es6.object.assign.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/fn/object/assign.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/core-js/object/assign.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/helpers/classCallCheck.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_wks-ext.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/fn/symbol/iterator.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/core-js/symbol/iterator.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_wks-define.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_enum-keys.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_object-gopn.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_object-gopn-ext.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_object-gopd.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es6.symbol.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es7.symbol.async-iterator.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es7.symbol.observable.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/fn/symbol/index.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/core-js/symbol.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/helpers/typeof.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/helpers/possibleConstructorReturn.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_set-proto.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es6.object.set-prototype-of.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/fn/object/set-prototype-of.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/core-js/object/set-prototype-of.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es6.object.create.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/fn/object/create.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/core-js/object/create.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/helpers/inherits.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/ms/index.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/debug/src/debug.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/debug/src/browser.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/helpers/bind.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/is-buffer/index.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/utils.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/fn/json/stringify.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/core-js/json/stringify.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/helpers/normalizeHeaderName.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/core/enhanceError.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/core/createError.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/core/settle.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/helpers/buildURL.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/helpers/parseHeaders.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/helpers/isURLSameOrigin.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/helpers/btoa.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/helpers/cookies.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/adapters/xhr.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/defaults.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/core/InterceptorManager.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/core/transformData.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/cancel/isCancel.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/core/dispatchRequest.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/helpers/isAbsoluteURL.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/helpers/combineURLs.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/core/Axios.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/cancel/Cancel.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/cancel/CancelToken.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/helpers/spread.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/lib/axios.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/axios/index.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_object-sap.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es6.object.get-own-property-descriptor.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/fn/object/get-own-property-descriptor.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/core-js/object/get-own-property-descriptor.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/javascript-state-machine/state-machine.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/helpers/extends.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/_collection-weak.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es6.weak-map.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es7.weak-map.of.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es7.weak-map.from.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/fn/weak-map.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/core-js/weak-map.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es6.object.define-property.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/fn/object/define-property.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/core-js/object/define-property.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/helpers/defineProperty.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es6.object.keys.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/fn/object/keys.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/core-js/object/keys.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_freeGlobal.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_root.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_Symbol.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_getRawTag.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_objectToString.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_baseGetTag.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_overArg.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_getPrototype.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/isObjectLike.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/isPlainObject.js","/home/travis/build/leancloud/js-realtime-sdk/src/utils/global.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/helpers/createClass.js","/home/travis/build/leancloud/js-realtime-sdk/src/utils/expirable.js","/home/travis/build/leancloud/js-realtime-sdk/src/utils/cache.js","/home/travis/build/leancloud/js-realtime-sdk/src/utils/index.js","/home/travis/build/leancloud/js-realtime-sdk/src/polyfills/ws-browser.js","/home/travis/build/leancloud/js-realtime-sdk/src/websocket-plus.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es6.object.freeze.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/fn/object/freeze.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/core-js/object/freeze.js","/home/travis/build/leancloud/js-realtime-sdk/src/error.js","/home/travis/build/leancloud/js-realtime-sdk/src/connection.js","/home/travis/build/leancloud/js-realtime-sdk/src/plugin.js","/home/travis/build/leancloud/js-realtime-sdk/src/realtime.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/uuid/lib/rng-browser.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/uuid/lib/bytesToUuid.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/uuid/v4.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/helpers/objectWithoutProperties.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/core.is-iterable.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/fn/is-iterable.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/core-js/is-iterable.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/core.get-iterator.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/fn/get-iterator.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/core-js/get-iterator.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/helpers/slicedToArray.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/modules/es6.array.find.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/core-js/library/fn/array/find.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/babel-runtime/core-js/array/find.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_isPrototype.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_nativeKeys.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_baseKeys.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/isObject.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/isFunction.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_coreJsData.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_isMasked.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_toSource.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_baseIsNative.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_getValue.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_getNative.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_DataView.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_Map.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_Promise.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_Set.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_WeakMap.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_getTag.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_baseIsArguments.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/isArguments.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/isArray.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/isLength.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/isArrayLike.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/stubFalse.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/isBuffer.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_baseIsTypedArray.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_baseUnary.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_nodeUtil.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/isTypedArray.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/isEmpty.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_listCacheClear.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/eq.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_assocIndexOf.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_listCacheDelete.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_listCacheGet.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_listCacheHas.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_listCacheSet.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_ListCache.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_stackClear.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_stackDelete.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_stackGet.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_stackHas.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_nativeCreate.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_hashClear.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_hashDelete.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_hashGet.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_hashHas.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_hashSet.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_Hash.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_mapCacheClear.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_isKeyable.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_getMapData.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_mapCacheDelete.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_mapCacheGet.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_mapCacheHas.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_mapCacheSet.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_MapCache.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_stackSet.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_Stack.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_arrayEach.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_defineProperty.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_baseAssignValue.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_assignValue.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_copyObject.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_baseTimes.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_isIndex.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_arrayLikeKeys.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/keys.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_baseAssign.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_nativeKeysIn.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_baseKeysIn.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/keysIn.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_baseAssignIn.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_cloneBuffer.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_copyArray.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_arrayFilter.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/stubArray.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_getSymbols.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_copySymbols.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_arrayPush.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_getSymbolsIn.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_copySymbolsIn.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_baseGetAllKeys.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_getAllKeys.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_getAllKeysIn.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_initCloneArray.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_Uint8Array.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_cloneArrayBuffer.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_cloneDataView.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_addMapEntry.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_arrayReduce.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_mapToArray.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_cloneMap.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_cloneRegExp.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_addSetEntry.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_setToArray.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_cloneSet.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_cloneSymbol.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_cloneTypedArray.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_initCloneByTag.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_baseCreate.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_initCloneObject.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/_baseClone.js","/home/travis/build/leancloud/js-realtime-sdk/node_modules/lodash/cloneDeep.js","/home/travis/build/leancloud/js-realtime-sdk/src/signature-factory-runner.js","/home/travis/build/leancloud/js-realtime-sdk/src/messages/message.js","/home/travis/build/leancloud/js-realtime-sdk/src/messages/helpers.js","/home/travis/build/leancloud/js-realtime-sdk/src/messages/typed-message.js","/home/travis/build/leancloud/js-realtime-sdk/src/messages/recalled-message.js","/home/travis/build/leancloud/js-realtime-sdk/src/conversation.js","/home/travis/build/leancloud/js-realtime-sdk/src/conversation-query.js","/home/travis/build/leancloud/js-realtime-sdk/src/im-client.js","/home/travis/build/leancloud/js-realtime-sdk/src/messages/text-message.js","/home/travis/build/leancloud/js-realtime-sdk/src/message-parser.js","/home/travis/build/leancloud/js-realtime-sdk/src/plugin-im.js","/home/travis/build/leancloud/js-realtime-sdk/src/index.js"],"sourcesContent":["// 7.1.4 ToInteger\nvar ceil = Math.ceil;\nvar floor = Math.floor;\nmodule.exports = function (it) {\n  return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);\n};\n","// 7.2.1 RequireObjectCoercible(argument)\nmodule.exports = function (it) {\n  if (it == undefined) throw TypeError(\"Can't call method on  \" + it);\n  return it;\n};\n","var toInteger = require('./_to-integer');\nvar defined = require('./_defined');\n// true  -> String#at\n// false -> String#codePointAt\nmodule.exports = function (TO_STRING) {\n  return function (that, pos) {\n    var s = String(defined(that));\n    var i = toInteger(pos);\n    var l = s.length;\n    var a, b;\n    if (i < 0 || i >= l) return TO_STRING ? '' : undefined;\n    a = s.charCodeAt(i);\n    return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff\n      ? TO_STRING ? s.charAt(i) : a\n      : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;\n  };\n};\n","module.exports = true;\n","// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nvar global = module.exports = typeof window != 'undefined' && window.Math == Math\n  ? window : typeof self != 'undefined' && self.Math == Math ? self\n  // eslint-disable-next-line no-new-func\n  : Function('return this')();\nif (typeof __g == 'number') __g = global; // eslint-disable-line no-undef\n","var core = module.exports = { version: '2.5.1' };\nif (typeof __e == 'number') __e = core; // eslint-disable-line no-undef\n","module.exports = function (it) {\n  if (typeof it != 'function') throw TypeError(it + ' is not a function!');\n  return it;\n};\n","// optional / simple context binding\nvar aFunction = require('./_a-function');\nmodule.exports = function (fn, that, length) {\n  aFunction(fn);\n  if (that === undefined) return fn;\n  switch (length) {\n    case 1: return function (a) {\n      return fn.call(that, a);\n    };\n    case 2: return function (a, b) {\n      return fn.call(that, a, b);\n    };\n    case 3: return function (a, b, c) {\n      return fn.call(that, a, b, c);\n    };\n  }\n  return function (/* ...args */) {\n    return fn.apply(that, arguments);\n  };\n};\n","module.exports = function (it) {\n  return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n","var isObject = require('./_is-object');\nmodule.exports = function (it) {\n  if (!isObject(it)) throw TypeError(it + ' is not an object!');\n  return it;\n};\n","module.exports = function (exec) {\n  try {\n    return !!exec();\n  } catch (e) {\n    return true;\n  }\n};\n","// Thank's IE8 for his funny defineProperty\nmodule.exports = !require('./_fails')(function () {\n  return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;\n});\n","var isObject = require('./_is-object');\nvar document = require('./_global').document;\n// typeof document.createElement is 'object' in old IE\nvar is = isObject(document) && isObject(document.createElement);\nmodule.exports = function (it) {\n  return is ? document.createElement(it) : {};\n};\n","module.exports = !require('./_descriptors') && !require('./_fails')(function () {\n  return Object.defineProperty(require('./_dom-create')('div'), 'a', { get: function () { return 7; } }).a != 7;\n});\n","// 7.1.1 ToPrimitive(input [, PreferredType])\nvar isObject = require('./_is-object');\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function (it, S) {\n  if (!isObject(it)) return it;\n  var fn, val;\n  if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n  if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;\n  if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n  throw TypeError(\"Can't convert object to primitive value\");\n};\n","var anObject = require('./_an-object');\nvar IE8_DOM_DEFINE = require('./_ie8-dom-define');\nvar toPrimitive = require('./_to-primitive');\nvar dP = Object.defineProperty;\n\nexports.f = require('./_descriptors') ? Object.defineProperty : function defineProperty(O, P, Attributes) {\n  anObject(O);\n  P = toPrimitive(P, true);\n  anObject(Attributes);\n  if (IE8_DOM_DEFINE) try {\n    return dP(O, P, Attributes);\n  } catch (e) { /* empty */ }\n  if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');\n  if ('value' in Attributes) O[P] = Attributes.value;\n  return O;\n};\n","module.exports = function (bitmap, value) {\n  return {\n    enumerable: !(bitmap & 1),\n    configurable: !(bitmap & 2),\n    writable: !(bitmap & 4),\n    value: value\n  };\n};\n","var dP = require('./_object-dp');\nvar createDesc = require('./_property-desc');\nmodule.exports = require('./_descriptors') ? function (object, key, value) {\n  return dP.f(object, key, createDesc(1, value));\n} : function (object, key, value) {\n  object[key] = value;\n  return object;\n};\n","var global = require('./_global');\nvar core = require('./_core');\nvar ctx = require('./_ctx');\nvar hide = require('./_hide');\nvar PROTOTYPE = 'prototype';\n\nvar $export = function (type, name, source) {\n  var IS_FORCED = type & $export.F;\n  var IS_GLOBAL = type & $export.G;\n  var IS_STATIC = type & $export.S;\n  var IS_PROTO = type & $export.P;\n  var IS_BIND = type & $export.B;\n  var IS_WRAP = type & $export.W;\n  var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});\n  var expProto = exports[PROTOTYPE];\n  var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE];\n  var key, own, out;\n  if (IS_GLOBAL) source = name;\n  for (key in source) {\n    // contains in native\n    own = !IS_FORCED && target && target[key] !== undefined;\n    if (own && key in exports) continue;\n    // export native or passed\n    out = own ? target[key] : source[key];\n    // prevent global pollution for namespaces\n    exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]\n    // bind timers to global for call from export context\n    : IS_BIND && own ? ctx(out, global)\n    // wrap global constructors for prevent change them in library\n    : IS_WRAP && target[key] == out ? (function (C) {\n      var F = function (a, b, c) {\n        if (this instanceof C) {\n          switch (arguments.length) {\n            case 0: return new C();\n            case 1: return new C(a);\n            case 2: return new C(a, b);\n          } return new C(a, b, c);\n        } return C.apply(this, arguments);\n      };\n      F[PROTOTYPE] = C[PROTOTYPE];\n      return F;\n    // make static versions for prototype methods\n    })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;\n    // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%\n    if (IS_PROTO) {\n      (exports.virtual || (exports.virtual = {}))[key] = out;\n      // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%\n      if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out);\n    }\n  }\n};\n// type bitmap\n$export.F = 1;   // forced\n$export.G = 2;   // global\n$export.S = 4;   // static\n$export.P = 8;   // proto\n$export.B = 16;  // bind\n$export.W = 32;  // wrap\n$export.U = 64;  // safe\n$export.R = 128; // real proto method for `library`\nmodule.exports = $export;\n","module.exports = require('./_hide');\n","var hasOwnProperty = {}.hasOwnProperty;\nmodule.exports = function (it, key) {\n  return hasOwnProperty.call(it, key);\n};\n","module.exports = {};\n","var toString = {}.toString;\n\nmodule.exports = function (it) {\n  return toString.call(it).slice(8, -1);\n};\n","// fallback for non-array-like ES3 and non-enumerable old V8 strings\nvar cof = require('./_cof');\n// eslint-disable-next-line no-prototype-builtins\nmodule.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {\n  return cof(it) == 'String' ? it.split('') : Object(it);\n};\n","// to indexed object, toObject with fallback for non-array-like ES3 strings\nvar IObject = require('./_iobject');\nvar defined = require('./_defined');\nmodule.exports = function (it) {\n  return IObject(defined(it));\n};\n","// 7.1.15 ToLength\nvar toInteger = require('./_to-integer');\nvar min = Math.min;\nmodule.exports = function (it) {\n  return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991\n};\n","var toInteger = require('./_to-integer');\nvar max = Math.max;\nvar min = Math.min;\nmodule.exports = function (index, length) {\n  index = toInteger(index);\n  return index < 0 ? max(index + length, 0) : min(index, length);\n};\n","// false -> Array#indexOf\n// true  -> Array#includes\nvar toIObject = require('./_to-iobject');\nvar toLength = require('./_to-length');\nvar toAbsoluteIndex = require('./_to-absolute-index');\nmodule.exports = function (IS_INCLUDES) {\n  return function ($this, el, fromIndex) {\n    var O = toIObject($this);\n    var length = toLength(O.length);\n    var index = toAbsoluteIndex(fromIndex, length);\n    var value;\n    // Array#includes uses SameValueZero equality algorithm\n    // eslint-disable-next-line no-self-compare\n    if (IS_INCLUDES && el != el) while (length > index) {\n      value = O[index++];\n      // eslint-disable-next-line no-self-compare\n      if (value != value) return true;\n    // Array#indexOf ignores holes, Array#includes - not\n    } else for (;length > index; index++) if (IS_INCLUDES || index in O) {\n      if (O[index] === el) return IS_INCLUDES || index || 0;\n    } return !IS_INCLUDES && -1;\n  };\n};\n","var global = require('./_global');\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || (global[SHARED] = {});\nmodule.exports = function (key) {\n  return store[key] || (store[key] = {});\n};\n","var id = 0;\nvar px = Math.random();\nmodule.exports = function (key) {\n  return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));\n};\n","var shared = require('./_shared')('keys');\nvar uid = require('./_uid');\nmodule.exports = function (key) {\n  return shared[key] || (shared[key] = uid(key));\n};\n","var has = require('./_has');\nvar toIObject = require('./_to-iobject');\nvar arrayIndexOf = require('./_array-includes')(false);\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\n\nmodule.exports = function (object, names) {\n  var O = toIObject(object);\n  var i = 0;\n  var result = [];\n  var key;\n  for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);\n  // Don't enum bug & hidden keys\n  while (names.length > i) if (has(O, key = names[i++])) {\n    ~arrayIndexOf(result, key) || result.push(key);\n  }\n  return result;\n};\n","// IE 8- don't enum bug keys\nmodule.exports = (\n  'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'\n).split(',');\n","// 19.1.2.14 / 15.2.3.14 Object.keys(O)\nvar $keys = require('./_object-keys-internal');\nvar enumBugKeys = require('./_enum-bug-keys');\n\nmodule.exports = Object.keys || function keys(O) {\n  return $keys(O, enumBugKeys);\n};\n","var dP = require('./_object-dp');\nvar anObject = require('./_an-object');\nvar getKeys = require('./_object-keys');\n\nmodule.exports = require('./_descriptors') ? Object.defineProperties : function defineProperties(O, Properties) {\n  anObject(O);\n  var keys = getKeys(Properties);\n  var length = keys.length;\n  var i = 0;\n  var P;\n  while (length > i) dP.f(O, P = keys[i++], Properties[P]);\n  return O;\n};\n","var document = require('./_global').document;\nmodule.exports = document && document.documentElement;\n","// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\nvar anObject = require('./_an-object');\nvar dPs = require('./_object-dps');\nvar enumBugKeys = require('./_enum-bug-keys');\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\nvar Empty = function () { /* empty */ };\nvar PROTOTYPE = 'prototype';\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar createDict = function () {\n  // Thrash, waste and sodomy: IE GC bug\n  var iframe = require('./_dom-create')('iframe');\n  var i = enumBugKeys.length;\n  var lt = '<';\n  var gt = '>';\n  var iframeDocument;\n  iframe.style.display = 'none';\n  require('./_html').appendChild(iframe);\n  iframe.src = 'javascript:'; // eslint-disable-line no-script-url\n  // createDict = iframe.contentWindow.Object;\n  // html.removeChild(iframe);\n  iframeDocument = iframe.contentWindow.document;\n  iframeDocument.open();\n  iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);\n  iframeDocument.close();\n  createDict = iframeDocument.F;\n  while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];\n  return createDict();\n};\n\nmodule.exports = Object.create || function create(O, Properties) {\n  var result;\n  if (O !== null) {\n    Empty[PROTOTYPE] = anObject(O);\n    result = new Empty();\n    Empty[PROTOTYPE] = null;\n    // add \"__proto__\" for Object.getPrototypeOf polyfill\n    result[IE_PROTO] = O;\n  } else result = createDict();\n  return Properties === undefined ? result : dPs(result, Properties);\n};\n","var store = require('./_shared')('wks');\nvar uid = require('./_uid');\nvar Symbol = require('./_global').Symbol;\nvar USE_SYMBOL = typeof Symbol == 'function';\n\nvar $exports = module.exports = function (name) {\n  return store[name] || (store[name] =\n    USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));\n};\n\n$exports.store = store;\n","var def = require('./_object-dp').f;\nvar has = require('./_has');\nvar TAG = require('./_wks')('toStringTag');\n\nmodule.exports = function (it, tag, stat) {\n  if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });\n};\n","'use strict';\nvar create = require('./_object-create');\nvar descriptor = require('./_property-desc');\nvar setToStringTag = require('./_set-to-string-tag');\nvar IteratorPrototype = {};\n\n// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()\nrequire('./_hide')(IteratorPrototype, require('./_wks')('iterator'), function () { return this; });\n\nmodule.exports = function (Constructor, NAME, next) {\n  Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });\n  setToStringTag(Constructor, NAME + ' Iterator');\n};\n","// 7.1.13 ToObject(argument)\nvar defined = require('./_defined');\nmodule.exports = function (it) {\n  return Object(defined(it));\n};\n","// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)\nvar has = require('./_has');\nvar toObject = require('./_to-object');\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\nvar ObjectProto = Object.prototype;\n\nmodule.exports = Object.getPrototypeOf || function (O) {\n  O = toObject(O);\n  if (has(O, IE_PROTO)) return O[IE_PROTO];\n  if (typeof O.constructor == 'function' && O instanceof O.constructor) {\n    return O.constructor.prototype;\n  } return O instanceof Object ? ObjectProto : null;\n};\n","'use strict';\nvar LIBRARY = require('./_library');\nvar $export = require('./_export');\nvar redefine = require('./_redefine');\nvar hide = require('./_hide');\nvar has = require('./_has');\nvar Iterators = require('./_iterators');\nvar $iterCreate = require('./_iter-create');\nvar setToStringTag = require('./_set-to-string-tag');\nvar getPrototypeOf = require('./_object-gpo');\nvar ITERATOR = require('./_wks')('iterator');\nvar BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`\nvar FF_ITERATOR = '@@iterator';\nvar KEYS = 'keys';\nvar VALUES = 'values';\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {\n  $iterCreate(Constructor, NAME, next);\n  var getMethod = function (kind) {\n    if (!BUGGY && kind in proto) return proto[kind];\n    switch (kind) {\n      case KEYS: return function keys() { return new Constructor(this, kind); };\n      case VALUES: return function values() { return new Constructor(this, kind); };\n    } return function entries() { return new Constructor(this, kind); };\n  };\n  var TAG = NAME + ' Iterator';\n  var DEF_VALUES = DEFAULT == VALUES;\n  var VALUES_BUG = false;\n  var proto = Base.prototype;\n  var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];\n  var $default = $native || getMethod(DEFAULT);\n  var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;\n  var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;\n  var methods, key, IteratorPrototype;\n  // Fix native\n  if ($anyNative) {\n    IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));\n    if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {\n      // Set @@toStringTag to native iterators\n      setToStringTag(IteratorPrototype, TAG, true);\n      // fix for some old engines\n      if (!LIBRARY && !has(IteratorPrototype, ITERATOR)) hide(IteratorPrototype, ITERATOR, returnThis);\n    }\n  }\n  // fix Array#{values, @@iterator}.name in V8 / FF\n  if (DEF_VALUES && $native && $native.name !== VALUES) {\n    VALUES_BUG = true;\n    $default = function values() { return $native.call(this); };\n  }\n  // Define iterator\n  if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {\n    hide(proto, ITERATOR, $default);\n  }\n  // Plug for library\n  Iterators[NAME] = $default;\n  Iterators[TAG] = returnThis;\n  if (DEFAULT) {\n    methods = {\n      values: DEF_VALUES ? $default : getMethod(VALUES),\n      keys: IS_SET ? $default : getMethod(KEYS),\n      entries: $entries\n    };\n    if (FORCED) for (key in methods) {\n      if (!(key in proto)) redefine(proto, key, methods[key]);\n    } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);\n  }\n  return methods;\n};\n","'use strict';\nvar $at = require('./_string-at')(true);\n\n// 21.1.3.27 String.prototype[@@iterator]()\nrequire('./_iter-define')(String, 'String', function (iterated) {\n  this._t = String(iterated); // target\n  this._i = 0;                // next index\n// 21.1.5.2.1 %StringIteratorPrototype%.next()\n}, function () {\n  var O = this._t;\n  var index = this._i;\n  var point;\n  if (index >= O.length) return { value: undefined, done: true };\n  point = $at(O, index);\n  this._i += point.length;\n  return { value: point, done: false };\n});\n","module.exports = function () { /* empty */ };\n","module.exports = function (done, value) {\n  return { value: value, done: !!done };\n};\n","'use strict';\nvar addToUnscopables = require('./_add-to-unscopables');\nvar step = require('./_iter-step');\nvar Iterators = require('./_iterators');\nvar toIObject = require('./_to-iobject');\n\n// 22.1.3.4 Array.prototype.entries()\n// 22.1.3.13 Array.prototype.keys()\n// 22.1.3.29 Array.prototype.values()\n// 22.1.3.30 Array.prototype[@@iterator]()\nmodule.exports = require('./_iter-define')(Array, 'Array', function (iterated, kind) {\n  this._t = toIObject(iterated); // target\n  this._i = 0;                   // next index\n  this._k = kind;                // kind\n// 22.1.5.2.1 %ArrayIteratorPrototype%.next()\n}, function () {\n  var O = this._t;\n  var kind = this._k;\n  var index = this._i++;\n  if (!O || index >= O.length) {\n    this._t = undefined;\n    return step(1);\n  }\n  if (kind == 'keys') return step(0, index);\n  if (kind == 'values') return step(0, O[index]);\n  return step(0, [index, O[index]]);\n}, 'values');\n\n// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)\nIterators.Arguments = Iterators.Array;\n\naddToUnscopables('keys');\naddToUnscopables('values');\naddToUnscopables('entries');\n","require('./es6.array.iterator');\nvar global = require('./_global');\nvar hide = require('./_hide');\nvar Iterators = require('./_iterators');\nvar TO_STRING_TAG = require('./_wks')('toStringTag');\n\nvar DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' +\n  'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' +\n  'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' +\n  'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' +\n  'TextTrackList,TouchList').split(',');\n\nfor (var i = 0; i < DOMIterables.length; i++) {\n  var NAME = DOMIterables[i];\n  var Collection = global[NAME];\n  var proto = Collection && Collection.prototype;\n  if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);\n  Iterators[NAME] = Iterators.Array;\n}\n","// getting tag from 19.1.3.6 Object.prototype.toString()\nvar cof = require('./_cof');\nvar TAG = require('./_wks')('toStringTag');\n// ES3 wrong here\nvar ARG = cof(function () { return arguments; }()) == 'Arguments';\n\n// fallback for IE11 Script Access Denied error\nvar tryGet = function (it, key) {\n  try {\n    return it[key];\n  } catch (e) { /* empty */ }\n};\n\nmodule.exports = function (it) {\n  var O, T, B;\n  return it === undefined ? 'Undefined' : it === null ? 'Null'\n    // @@toStringTag case\n    : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T\n    // builtinTag case\n    : ARG ? cof(O)\n    // ES3 arguments fallback\n    : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;\n};\n","module.exports = function (it, Constructor, name, forbiddenField) {\n  if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) {\n    throw TypeError(name + ': incorrect invocation!');\n  } return it;\n};\n","// call something on iterator step with safe closing on error\nvar anObject = require('./_an-object');\nmodule.exports = function (iterator, fn, value, entries) {\n  try {\n    return entries ? fn(anObject(value)[0], value[1]) : fn(value);\n  // 7.4.6 IteratorClose(iterator, completion)\n  } catch (e) {\n    var ret = iterator['return'];\n    if (ret !== undefined) anObject(ret.call(iterator));\n    throw e;\n  }\n};\n","// check on default Array iterator\nvar Iterators = require('./_iterators');\nvar ITERATOR = require('./_wks')('iterator');\nvar ArrayProto = Array.prototype;\n\nmodule.exports = function (it) {\n  return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);\n};\n","var classof = require('./_classof');\nvar ITERATOR = require('./_wks')('iterator');\nvar Iterators = require('./_iterators');\nmodule.exports = require('./_core').getIteratorMethod = function (it) {\n  if (it != undefined) return it[ITERATOR]\n    || it['@@iterator']\n    || Iterators[classof(it)];\n};\n","var ctx = require('./_ctx');\nvar call = require('./_iter-call');\nvar isArrayIter = require('./_is-array-iter');\nvar anObject = require('./_an-object');\nvar toLength = require('./_to-length');\nvar getIterFn = require('./core.get-iterator-method');\nvar BREAK = {};\nvar RETURN = {};\nvar exports = module.exports = function (iterable, entries, fn, that, ITERATOR) {\n  var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable);\n  var f = ctx(fn, that, entries ? 2 : 1);\n  var index = 0;\n  var length, step, iterator, result;\n  if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!');\n  // fast case for arrays with default iterator\n  if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) {\n    result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);\n    if (result === BREAK || result === RETURN) return result;\n  } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) {\n    result = call(iterator, f, step.value, entries);\n    if (result === BREAK || result === RETURN) return result;\n  }\n};\nexports.BREAK = BREAK;\nexports.RETURN = RETURN;\n","// 7.3.20 SpeciesConstructor(O, defaultConstructor)\nvar anObject = require('./_an-object');\nvar aFunction = require('./_a-function');\nvar SPECIES = require('./_wks')('species');\nmodule.exports = function (O, D) {\n  var C = anObject(O).constructor;\n  var S;\n  return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S);\n};\n","// fast apply, http://jsperf.lnkit.com/fast-apply/5\nmodule.exports = function (fn, args, that) {\n  var un = that === undefined;\n  switch (args.length) {\n    case 0: return un ? fn()\n                      : fn.call(that);\n    case 1: return un ? fn(args[0])\n                      : fn.call(that, args[0]);\n    case 2: return un ? fn(args[0], args[1])\n                      : fn.call(that, args[0], args[1]);\n    case 3: return un ? fn(args[0], args[1], args[2])\n                      : fn.call(that, args[0], args[1], args[2]);\n    case 4: return un ? fn(args[0], args[1], args[2], args[3])\n                      : fn.call(that, args[0], args[1], args[2], args[3]);\n  } return fn.apply(that, args);\n};\n","var ctx = require('./_ctx');\nvar invoke = require('./_invoke');\nvar html = require('./_html');\nvar cel = require('./_dom-create');\nvar global = require('./_global');\nvar process = global.process;\nvar setTask = global.setImmediate;\nvar clearTask = global.clearImmediate;\nvar MessageChannel = global.MessageChannel;\nvar Dispatch = global.Dispatch;\nvar counter = 0;\nvar queue = {};\nvar ONREADYSTATECHANGE = 'onreadystatechange';\nvar defer, channel, port;\nvar run = function () {\n  var id = +this;\n  // eslint-disable-next-line no-prototype-builtins\n  if (queue.hasOwnProperty(id)) {\n    var fn = queue[id];\n    delete queue[id];\n    fn();\n  }\n};\nvar listener = function (event) {\n  run.call(event.data);\n};\n// Node.js 0.9+ & IE10+ has setImmediate, otherwise:\nif (!setTask || !clearTask) {\n  setTask = function setImmediate(fn) {\n    var args = [];\n    var i = 1;\n    while (arguments.length > i) args.push(arguments[i++]);\n    queue[++counter] = function () {\n      // eslint-disable-next-line no-new-func\n      invoke(typeof fn == 'function' ? fn : Function(fn), args);\n    };\n    defer(counter);\n    return counter;\n  };\n  clearTask = function clearImmediate(id) {\n    delete queue[id];\n  };\n  // Node.js 0.8-\n  if (require('./_cof')(process) == 'process') {\n    defer = function (id) {\n      process.nextTick(ctx(run, id, 1));\n    };\n  // Sphere (JS game engine) Dispatch API\n  } else if (Dispatch && Dispatch.now) {\n    defer = function (id) {\n      Dispatch.now(ctx(run, id, 1));\n    };\n  // Browsers with MessageChannel, includes WebWorkers\n  } else if (MessageChannel) {\n    channel = new MessageChannel();\n    port = channel.port2;\n    channel.port1.onmessage = listener;\n    defer = ctx(port.postMessage, port, 1);\n  // Browsers with postMessage, skip WebWorkers\n  // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'\n  } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) {\n    defer = function (id) {\n      global.postMessage(id + '', '*');\n    };\n    global.addEventListener('message', listener, false);\n  // IE8-\n  } else if (ONREADYSTATECHANGE in cel('script')) {\n    defer = function (id) {\n      html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () {\n        html.removeChild(this);\n        run.call(id);\n      };\n    };\n  // Rest old browsers\n  } else {\n    defer = function (id) {\n      setTimeout(ctx(run, id, 1), 0);\n    };\n  }\n}\nmodule.exports = {\n  set: setTask,\n  clear: clearTask\n};\n","var global = require('./_global');\nvar macrotask = require('./_task').set;\nvar Observer = global.MutationObserver || global.WebKitMutationObserver;\nvar process = global.process;\nvar Promise = global.Promise;\nvar isNode = require('./_cof')(process) == 'process';\n\nmodule.exports = function () {\n  var head, last, notify;\n\n  var flush = function () {\n    var parent, fn;\n    if (isNode && (parent = process.domain)) parent.exit();\n    while (head) {\n      fn = head.fn;\n      head = head.next;\n      try {\n        fn();\n      } catch (e) {\n        if (head) notify();\n        else last = undefined;\n        throw e;\n      }\n    } last = undefined;\n    if (parent) parent.enter();\n  };\n\n  // Node.js\n  if (isNode) {\n    notify = function () {\n      process.nextTick(flush);\n    };\n  // browsers with MutationObserver\n  } else if (Observer) {\n    var toggle = true;\n    var node = document.createTextNode('');\n    new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new\n    notify = function () {\n      node.data = toggle = !toggle;\n    };\n  // environments with maybe non-completely correct, but existent Promise\n  } else if (Promise && Promise.resolve) {\n    var promise = Promise.resolve();\n    notify = function () {\n      promise.then(flush);\n    };\n  // for other environments - macrotask based on:\n  // - setImmediate\n  // - MessageChannel\n  // - window.postMessag\n  // - onreadystatechange\n  // - setTimeout\n  } else {\n    notify = function () {\n      // strange IE + webpack dev server bug - use .call(global)\n      macrotask.call(global, flush);\n    };\n  }\n\n  return function (fn) {\n    var task = { fn: fn, next: undefined };\n    if (last) last.next = task;\n    if (!head) {\n      head = task;\n      notify();\n    } last = task;\n  };\n};\n","'use strict';\n// 25.4.1.5 NewPromiseCapability(C)\nvar aFunction = require('./_a-function');\n\nfunction PromiseCapability(C) {\n  var resolve, reject;\n  this.promise = new C(function ($$resolve, $$reject) {\n    if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');\n    resolve = $$resolve;\n    reject = $$reject;\n  });\n  this.resolve = aFunction(resolve);\n  this.reject = aFunction(reject);\n}\n\nmodule.exports.f = function (C) {\n  return new PromiseCapability(C);\n};\n","module.exports = function (exec) {\n  try {\n    return { e: false, v: exec() };\n  } catch (e) {\n    return { e: true, v: e };\n  }\n};\n","var anObject = require('./_an-object');\nvar isObject = require('./_is-object');\nvar newPromiseCapability = require('./_new-promise-capability');\n\nmodule.exports = function (C, x) {\n  anObject(C);\n  if (isObject(x) && x.constructor === C) return x;\n  var promiseCapability = newPromiseCapability.f(C);\n  var resolve = promiseCapability.resolve;\n  resolve(x);\n  return promiseCapability.promise;\n};\n","var hide = require('./_hide');\nmodule.exports = function (target, src, safe) {\n  for (var key in src) {\n    if (safe && target[key]) target[key] = src[key];\n    else hide(target, key, src[key]);\n  } return target;\n};\n","'use strict';\nvar global = require('./_global');\nvar core = require('./_core');\nvar dP = require('./_object-dp');\nvar DESCRIPTORS = require('./_descriptors');\nvar SPECIES = require('./_wks')('species');\n\nmodule.exports = function (KEY) {\n  var C = typeof core[KEY] == 'function' ? core[KEY] : global[KEY];\n  if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, {\n    configurable: true,\n    get: function () { return this; }\n  });\n};\n","var ITERATOR = require('./_wks')('iterator');\nvar SAFE_CLOSING = false;\n\ntry {\n  var riter = [7][ITERATOR]();\n  riter['return'] = function () { SAFE_CLOSING = true; };\n  // eslint-disable-next-line no-throw-literal\n  Array.from(riter, function () { throw 2; });\n} catch (e) { /* empty */ }\n\nmodule.exports = function (exec, skipClosing) {\n  if (!skipClosing && !SAFE_CLOSING) return false;\n  var safe = false;\n  try {\n    var arr = [7];\n    var iter = arr[ITERATOR]();\n    iter.next = function () { return { done: safe = true }; };\n    arr[ITERATOR] = function () { return iter; };\n    exec(arr);\n  } catch (e) { /* empty */ }\n  return safe;\n};\n","'use strict';\nvar LIBRARY = require('./_library');\nvar global = require('./_global');\nvar ctx = require('./_ctx');\nvar classof = require('./_classof');\nvar $export = require('./_export');\nvar isObject = require('./_is-object');\nvar aFunction = require('./_a-function');\nvar anInstance = require('./_an-instance');\nvar forOf = require('./_for-of');\nvar speciesConstructor = require('./_species-constructor');\nvar task = require('./_task').set;\nvar microtask = require('./_microtask')();\nvar newPromiseCapabilityModule = require('./_new-promise-capability');\nvar perform = require('./_perform');\nvar promiseResolve = require('./_promise-resolve');\nvar PROMISE = 'Promise';\nvar TypeError = global.TypeError;\nvar process = global.process;\nvar $Promise = global[PROMISE];\nvar isNode = classof(process) == 'process';\nvar empty = function () { /* empty */ };\nvar Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper;\nvar newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f;\n\nvar USE_NATIVE = !!function () {\n  try {\n    // correct subclassing with @@species support\n    var promise = $Promise.resolve(1);\n    var FakePromise = (promise.constructor = {})[require('./_wks')('species')] = function (exec) {\n      exec(empty, empty);\n    };\n    // unhandled rejections tracking support, NodeJS Promise without it fails @@species test\n    return (isNode || typeof PromiseRejectionEvent == 'function') && promise.then(empty) instanceof FakePromise;\n  } catch (e) { /* empty */ }\n}();\n\n// helpers\nvar isThenable = function (it) {\n  var then;\n  return isObject(it) && typeof (then = it.then) == 'function' ? then : false;\n};\nvar notify = function (promise, isReject) {\n  if (promise._n) return;\n  promise._n = true;\n  var chain = promise._c;\n  microtask(function () {\n    var value = promise._v;\n    var ok = promise._s == 1;\n    var i = 0;\n    var run = function (reaction) {\n      var handler = ok ? reaction.ok : reaction.fail;\n      var resolve = reaction.resolve;\n      var reject = reaction.reject;\n      var domain = reaction.domain;\n      var result, then;\n      try {\n        if (handler) {\n          if (!ok) {\n            if (promise._h == 2) onHandleUnhandled(promise);\n            promise._h = 1;\n          }\n          if (handler === true) result = value;\n          else {\n            if (domain) domain.enter();\n            result = handler(value);\n            if (domain) domain.exit();\n          }\n          if (result === reaction.promise) {\n            reject(TypeError('Promise-chain cycle'));\n          } else if (then = isThenable(result)) {\n            then.call(result, resolve, reject);\n          } else resolve(result);\n        } else reject(value);\n      } catch (e) {\n        reject(e);\n      }\n    };\n    while (chain.length > i) run(chain[i++]); // variable length - can't use forEach\n    promise._c = [];\n    promise._n = false;\n    if (isReject && !promise._h) onUnhandled(promise);\n  });\n};\nvar onUnhandled = function (promise) {\n  task.call(global, function () {\n    var value = promise._v;\n    var unhandled = isUnhandled(promise);\n    var result, handler, console;\n    if (unhandled) {\n      result = perform(function () {\n        if (isNode) {\n          process.emit('unhandledRejection', value, promise);\n        } else if (handler = global.onunhandledrejection) {\n          handler({ promise: promise, reason: value });\n        } else if ((console = global.console) && console.error) {\n          console.error('Unhandled promise rejection', value);\n        }\n      });\n      // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should\n      promise._h = isNode || isUnhandled(promise) ? 2 : 1;\n    } promise._a = undefined;\n    if (unhandled && result.e) throw result.v;\n  });\n};\nvar isUnhandled = function (promise) {\n  if (promise._h == 1) return false;\n  var chain = promise._a || promise._c;\n  var i = 0;\n  var reaction;\n  while (chain.length > i) {\n    reaction = chain[i++];\n    if (reaction.fail || !isUnhandled(reaction.promise)) return false;\n  } return true;\n};\nvar onHandleUnhandled = function (promise) {\n  task.call(global, function () {\n    var handler;\n    if (isNode) {\n      process.emit('rejectionHandled', promise);\n    } else if (handler = global.onrejectionhandled) {\n      handler({ promise: promise, reason: promise._v });\n    }\n  });\n};\nvar $reject = function (value) {\n  var promise = this;\n  if (promise._d) return;\n  promise._d = true;\n  promise = promise._w || promise; // unwrap\n  promise._v = value;\n  promise._s = 2;\n  if (!promise._a) promise._a = promise._c.slice();\n  notify(promise, true);\n};\nvar $resolve = function (value) {\n  var promise = this;\n  var then;\n  if (promise._d) return;\n  promise._d = true;\n  promise = promise._w || promise; // unwrap\n  try {\n    if (promise === value) throw TypeError(\"Promise can't be resolved itself\");\n    if (then = isThenable(value)) {\n      microtask(function () {\n        var wrapper = { _w: promise, _d: false }; // wrap\n        try {\n          then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1));\n        } catch (e) {\n          $reject.call(wrapper, e);\n        }\n      });\n    } else {\n      promise._v = value;\n      promise._s = 1;\n      notify(promise, false);\n    }\n  } catch (e) {\n    $reject.call({ _w: promise, _d: false }, e); // wrap\n  }\n};\n\n// constructor polyfill\nif (!USE_NATIVE) {\n  // 25.4.3.1 Promise(executor)\n  $Promise = function Promise(executor) {\n    anInstance(this, $Promise, PROMISE, '_h');\n    aFunction(executor);\n    Internal.call(this);\n    try {\n      executor(ctx($resolve, this, 1), ctx($reject, this, 1));\n    } catch (err) {\n      $reject.call(this, err);\n    }\n  };\n  // eslint-disable-next-line no-unused-vars\n  Internal = function Promise(executor) {\n    this._c = [];             // <- awaiting reactions\n    this._a = undefined;      // <- checked in isUnhandled reactions\n    this._s = 0;              // <- state\n    this._d = false;          // <- done\n    this._v = undefined;      // <- value\n    this._h = 0;              // <- rejection state, 0 - default, 1 - handled, 2 - unhandled\n    this._n = false;          // <- notify\n  };\n  Internal.prototype = require('./_redefine-all')($Promise.prototype, {\n    // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected)\n    then: function then(onFulfilled, onRejected) {\n      var reaction = newPromiseCapability(speciesConstructor(this, $Promise));\n      reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;\n      reaction.fail = typeof onRejected == 'function' && onRejected;\n      reaction.domain = isNode ? process.domain : undefined;\n      this._c.push(reaction);\n      if (this._a) this._a.push(reaction);\n      if (this._s) notify(this, false);\n      return reaction.promise;\n    },\n    // 25.4.5.1 Promise.prototype.catch(onRejected)\n    'catch': function (onRejected) {\n      return this.then(undefined, onRejected);\n    }\n  });\n  OwnPromiseCapability = function () {\n    var promise = new Internal();\n    this.promise = promise;\n    this.resolve = ctx($resolve, promise, 1);\n    this.reject = ctx($reject, promise, 1);\n  };\n  newPromiseCapabilityModule.f = newPromiseCapability = function (C) {\n    return C === $Promise || C === Wrapper\n      ? new OwnPromiseCapability(C)\n      : newGenericPromiseCapability(C);\n  };\n}\n\n$export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise });\nrequire('./_set-to-string-tag')($Promise, PROMISE);\nrequire('./_set-species')(PROMISE);\nWrapper = require('./_core')[PROMISE];\n\n// statics\n$export($export.S + $export.F * !USE_NATIVE, PROMISE, {\n  // 25.4.4.5 Promise.reject(r)\n  reject: function reject(r) {\n    var capability = newPromiseCapability(this);\n    var $$reject = capability.reject;\n    $$reject(r);\n    return capability.promise;\n  }\n});\n$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, {\n  // 25.4.4.6 Promise.resolve(x)\n  resolve: function resolve(x) {\n    return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x);\n  }\n});\n$export($export.S + $export.F * !(USE_NATIVE && require('./_iter-detect')(function (iter) {\n  $Promise.all(iter)['catch'](empty);\n})), PROMISE, {\n  // 25.4.4.1 Promise.all(iterable)\n  all: function all(iterable) {\n    var C = this;\n    var capability = newPromiseCapability(C);\n    var resolve = capability.resolve;\n    var reject = capability.reject;\n    var result = perform(function () {\n      var values = [];\n      var index = 0;\n      var remaining = 1;\n      forOf(iterable, false, function (promise) {\n        var $index = index++;\n        var alreadyCalled = false;\n        values.push(undefined);\n        remaining++;\n        C.resolve(promise).then(function (value) {\n          if (alreadyCalled) return;\n          alreadyCalled = true;\n          values[$index] = value;\n          --remaining || resolve(values);\n        }, reject);\n      });\n      --remaining || resolve(values);\n    });\n    if (result.e) reject(result.v);\n    return capability.promise;\n  },\n  // 25.4.4.4 Promise.race(iterable)\n  race: function race(iterable) {\n    var C = this;\n    var capability = newPromiseCapability(C);\n    var reject = capability.reject;\n    var result = perform(function () {\n      forOf(iterable, false, function (promise) {\n        C.resolve(promise).then(capability.resolve, reject);\n      });\n    });\n    if (result.e) reject(result.v);\n    return capability.promise;\n  }\n});\n","// https://github.com/tc39/proposal-promise-finally\n'use strict';\nvar $export = require('./_export');\nvar core = require('./_core');\nvar global = require('./_global');\nvar speciesConstructor = require('./_species-constructor');\nvar promiseResolve = require('./_promise-resolve');\n\n$export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) {\n  var C = speciesConstructor(this, core.Promise || global.Promise);\n  var isFunction = typeof onFinally == 'function';\n  return this.then(\n    isFunction ? function (x) {\n      return promiseResolve(C, onFinally()).then(function () { return x; });\n    } : onFinally,\n    isFunction ? function (e) {\n      return promiseResolve(C, onFinally()).then(function () { throw e; });\n    } : onFinally\n  );\n} });\n","'use strict';\n// https://github.com/tc39/proposal-promise-try\nvar $export = require('./_export');\nvar newPromiseCapability = require('./_new-promise-capability');\nvar perform = require('./_perform');\n\n$export($export.S, 'Promise', { 'try': function (callbackfn) {\n  var promiseCapability = newPromiseCapability.f(this);\n  var result = perform(callbackfn);\n  (result.e ? promiseCapability.reject : promiseCapability.resolve)(result.v);\n  return promiseCapability.promise;\n} });\n","require('../modules/es6.object.to-string');\nrequire('../modules/es6.string.iterator');\nrequire('../modules/web.dom.iterable');\nrequire('../modules/es6.promise');\nrequire('../modules/es7.promise.finally');\nrequire('../modules/es7.promise.try');\nmodule.exports = require('../modules/_core').Promise;\n","module.exports = { \"default\": require(\"core-js/library/fn/promise\"), __esModule: true };","/*\r\n Copyright 2013 Daniel Wirtz \r\n Copyright 2009 The Closure Library Authors. All Rights Reserved.\r\n\r\n Licensed under the Apache License, Version 2.0 (the \"License\");\r\n you may not use this file except in compliance with the License.\r\n You may obtain a copy of the License at\r\n\r\n http://www.apache.org/licenses/LICENSE-2.0\r\n\r\n Unless required by applicable law or agreed to in writing, software\r\n distributed under the License is distributed on an \"AS-IS\" BASIS,\r\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n See the License for the specific language governing permissions and\r\n limitations under the License.\r\n */\r\n\r\n/**\r\n * @license long.js (c) 2013 Daniel Wirtz \r\n * Released under the Apache License, Version 2.0\r\n * see: https://github.com/dcodeIO/long.js for details\r\n */\r\n(function(global, factory) {\r\n\r\n    /* AMD */ if (typeof define === 'function' && define[\"amd\"])\r\n        define([], factory);\r\n    /* CommonJS */ else if (typeof require === 'function' && typeof module === \"object\" && module && module[\"exports\"])\r\n        module[\"exports\"] = factory();\r\n    /* Global */ else\r\n        (global[\"dcodeIO\"] = global[\"dcodeIO\"] || {})[\"Long\"] = factory();\r\n\r\n})(this, function() {\r\n    \"use strict\";\r\n\r\n    /**\r\n     * Constructs a 64 bit two's-complement integer, given its low and high 32 bit values as *signed* integers.\r\n     *  See the from* functions below for more convenient ways of constructing Longs.\r\n     * @exports Long\r\n     * @class A Long class for representing a 64 bit two's-complement integer value.\r\n     * @param {number} low The low (signed) 32 bits of the long\r\n     * @param {number} high The high (signed) 32 bits of the long\r\n     * @param {boolean=} unsigned Whether unsigned or not, defaults to `false` for signed\r\n     * @constructor\r\n     */\r\n    function Long(low, high, unsigned) {\r\n\r\n        /**\r\n         * The low 32 bits as a signed value.\r\n         * @type {number}\r\n         */\r\n        this.low = low | 0;\r\n\r\n        /**\r\n         * The high 32 bits as a signed value.\r\n         * @type {number}\r\n         */\r\n        this.high = high | 0;\r\n\r\n        /**\r\n         * Whether unsigned or not.\r\n         * @type {boolean}\r\n         */\r\n        this.unsigned = !!unsigned;\r\n    }\r\n\r\n    // The internal representation of a long is the two given signed, 32-bit values.\r\n    // We use 32-bit pieces because these are the size of integers on which\r\n    // Javascript performs bit-operations.  For operations like addition and\r\n    // multiplication, we split each number into 16 bit pieces, which can easily be\r\n    // multiplied within Javascript's floating-point representation without overflow\r\n    // or change in sign.\r\n    //\r\n    // In the algorithms below, we frequently reduce the negative case to the\r\n    // positive case by negating the input(s) and then post-processing the result.\r\n    // Note that we must ALWAYS check specially whether those values are MIN_VALUE\r\n    // (-2^63) because -MIN_VALUE == MIN_VALUE (since 2^63 cannot be represented as\r\n    // a positive number, it overflows back into a negative).  Not handling this\r\n    // case would often result in infinite recursion.\r\n    //\r\n    // Common constant values ZERO, ONE, NEG_ONE, etc. are defined below the from*\r\n    // methods on which they depend.\r\n\r\n    /**\r\n     * An indicator used to reliably determine if an object is a Long or not.\r\n     * @type {boolean}\r\n     * @const\r\n     * @private\r\n     */\r\n    Long.prototype.__isLong__;\r\n\r\n    Object.defineProperty(Long.prototype, \"__isLong__\", {\r\n        value: true,\r\n        enumerable: false,\r\n        configurable: false\r\n    });\r\n\r\n    /**\r\n     * @function\r\n     * @param {*} obj Object\r\n     * @returns {boolean}\r\n     * @inner\r\n     */\r\n    function isLong(obj) {\r\n        return (obj && obj[\"__isLong__\"]) === true;\r\n    }\r\n\r\n    /**\r\n     * Tests if the specified object is a Long.\r\n     * @function\r\n     * @param {*} obj Object\r\n     * @returns {boolean}\r\n     */\r\n    Long.isLong = isLong;\r\n\r\n    /**\r\n     * A cache of the Long representations of small integer values.\r\n     * @type {!Object}\r\n     * @inner\r\n     */\r\n    var INT_CACHE = {};\r\n\r\n    /**\r\n     * A cache of the Long representations of small unsigned integer values.\r\n     * @type {!Object}\r\n     * @inner\r\n     */\r\n    var UINT_CACHE = {};\r\n\r\n    /**\r\n     * @param {number} value\r\n     * @param {boolean=} unsigned\r\n     * @returns {!Long}\r\n     * @inner\r\n     */\r\n    function fromInt(value, unsigned) {\r\n        var obj, cachedObj, cache;\r\n        if (unsigned) {\r\n            value >>>= 0;\r\n            if (cache = (0 <= value && value < 256)) {\r\n                cachedObj = UINT_CACHE[value];\r\n                if (cachedObj)\r\n                    return cachedObj;\r\n            }\r\n            obj = fromBits(value, (value | 0) < 0 ? -1 : 0, true);\r\n            if (cache)\r\n                UINT_CACHE[value] = obj;\r\n            return obj;\r\n        } else {\r\n            value |= 0;\r\n            if (cache = (-128 <= value && value < 128)) {\r\n                cachedObj = INT_CACHE[value];\r\n                if (cachedObj)\r\n                    return cachedObj;\r\n            }\r\n            obj = fromBits(value, value < 0 ? -1 : 0, false);\r\n            if (cache)\r\n                INT_CACHE[value] = obj;\r\n            return obj;\r\n        }\r\n    }\r\n\r\n    /**\r\n     * Returns a Long representing the given 32 bit integer value.\r\n     * @function\r\n     * @param {number} value The 32 bit integer in question\r\n     * @param {boolean=} unsigned Whether unsigned or not, defaults to `false` for signed\r\n     * @returns {!Long} The corresponding Long value\r\n     */\r\n    Long.fromInt = fromInt;\r\n\r\n    /**\r\n     * @param {number} value\r\n     * @param {boolean=} unsigned\r\n     * @returns {!Long}\r\n     * @inner\r\n     */\r\n    function fromNumber(value, unsigned) {\r\n        if (isNaN(value) || !isFinite(value))\r\n            return unsigned ? UZERO : ZERO;\r\n        if (unsigned) {\r\n            if (value < 0)\r\n                return UZERO;\r\n            if (value >= TWO_PWR_64_DBL)\r\n                return MAX_UNSIGNED_VALUE;\r\n        } else {\r\n            if (value <= -TWO_PWR_63_DBL)\r\n                return MIN_VALUE;\r\n            if (value + 1 >= TWO_PWR_63_DBL)\r\n                return MAX_VALUE;\r\n        }\r\n        if (value < 0)\r\n            return fromNumber(-value, unsigned).neg();\r\n        return fromBits((value % TWO_PWR_32_DBL) | 0, (value / TWO_PWR_32_DBL) | 0, unsigned);\r\n    }\r\n\r\n    /**\r\n     * Returns a Long representing the given value, provided that it is a finite number. Otherwise, zero is returned.\r\n     * @function\r\n     * @param {number} value The number in question\r\n     * @param {boolean=} unsigned Whether unsigned or not, defaults to `false` for signed\r\n     * @returns {!Long} The corresponding Long value\r\n     */\r\n    Long.fromNumber = fromNumber;\r\n\r\n    /**\r\n     * @param {number} lowBits\r\n     * @param {number} highBits\r\n     * @param {boolean=} unsigned\r\n     * @returns {!Long}\r\n     * @inner\r\n     */\r\n    function fromBits(lowBits, highBits, unsigned) {\r\n        return new Long(lowBits, highBits, unsigned);\r\n    }\r\n\r\n    /**\r\n     * Returns a Long representing the 64 bit integer that comes by concatenating the given low and high bits. Each is\r\n     *  assumed to use 32 bits.\r\n     * @function\r\n     * @param {number} lowBits The low 32 bits\r\n     * @param {number} highBits The high 32 bits\r\n     * @param {boolean=} unsigned Whether unsigned or not, defaults to `false` for signed\r\n     * @returns {!Long} The corresponding Long value\r\n     */\r\n    Long.fromBits = fromBits;\r\n\r\n    /**\r\n     * @function\r\n     * @param {number} base\r\n     * @param {number} exponent\r\n     * @returns {number}\r\n     * @inner\r\n     */\r\n    var pow_dbl = Math.pow; // Used 4 times (4*8 to 15+4)\r\n\r\n    /**\r\n     * @param {string} str\r\n     * @param {(boolean|number)=} unsigned\r\n     * @param {number=} radix\r\n     * @returns {!Long}\r\n     * @inner\r\n     */\r\n    function fromString(str, unsigned, radix) {\r\n        if (str.length === 0)\r\n            throw Error('empty string');\r\n        if (str === \"NaN\" || str === \"Infinity\" || str === \"+Infinity\" || str === \"-Infinity\")\r\n            return ZERO;\r\n        if (typeof unsigned === 'number') {\r\n            // For goog.math.long compatibility\r\n            radix = unsigned,\r\n            unsigned = false;\r\n        } else {\r\n            unsigned = !! unsigned;\r\n        }\r\n        radix = radix || 10;\r\n        if (radix < 2 || 36 < radix)\r\n            throw RangeError('radix');\r\n\r\n        var p;\r\n        if ((p = str.indexOf('-')) > 0)\r\n            throw Error('interior hyphen');\r\n        else if (p === 0) {\r\n            return fromString(str.substring(1), unsigned, radix).neg();\r\n        }\r\n\r\n        // Do several (8) digits each time through the loop, so as to\r\n        // minimize the calls to the very expensive emulated div.\r\n        var radixToPower = fromNumber(pow_dbl(radix, 8));\r\n\r\n        var result = ZERO;\r\n        for (var i = 0; i < str.length; i += 8) {\r\n            var size = Math.min(8, str.length - i),\r\n                value = parseInt(str.substring(i, i + size), radix);\r\n            if (size < 8) {\r\n                var power = fromNumber(pow_dbl(radix, size));\r\n                result = result.mul(power).add(fromNumber(value));\r\n            } else {\r\n                result = result.mul(radixToPower);\r\n                result = result.add(fromNumber(value));\r\n            }\r\n        }\r\n        result.unsigned = unsigned;\r\n        return result;\r\n    }\r\n\r\n    /**\r\n     * Returns a Long representation of the given string, written using the specified radix.\r\n     * @function\r\n     * @param {string} str The textual representation of the Long\r\n     * @param {(boolean|number)=} unsigned Whether unsigned or not, defaults to `false` for signed\r\n     * @param {number=} radix The radix in which the text is written (2-36), defaults to 10\r\n     * @returns {!Long} The corresponding Long value\r\n     */\r\n    Long.fromString = fromString;\r\n\r\n    /**\r\n     * @function\r\n     * @param {!Long|number|string|!{low: number, high: number, unsigned: boolean}} val\r\n     * @returns {!Long}\r\n     * @inner\r\n     */\r\n    function fromValue(val) {\r\n        if (val /* is compatible */ instanceof Long)\r\n            return val;\r\n        if (typeof val === 'number')\r\n            return fromNumber(val);\r\n        if (typeof val === 'string')\r\n            return fromString(val);\r\n        // Throws for non-objects, converts non-instanceof Long:\r\n        return fromBits(val.low, val.high, val.unsigned);\r\n    }\r\n\r\n    /**\r\n     * Converts the specified value to a Long.\r\n     * @function\r\n     * @param {!Long|number|string|!{low: number, high: number, unsigned: boolean}} val Value\r\n     * @returns {!Long}\r\n     */\r\n    Long.fromValue = fromValue;\r\n\r\n    // NOTE: the compiler should inline these constant values below and then remove these variables, so there should be\r\n    // no runtime penalty for these.\r\n\r\n    /**\r\n     * @type {number}\r\n     * @const\r\n     * @inner\r\n     */\r\n    var TWO_PWR_16_DBL = 1 << 16;\r\n\r\n    /**\r\n     * @type {number}\r\n     * @const\r\n     * @inner\r\n     */\r\n    var TWO_PWR_24_DBL = 1 << 24;\r\n\r\n    /**\r\n     * @type {number}\r\n     * @const\r\n     * @inner\r\n     */\r\n    var TWO_PWR_32_DBL = TWO_PWR_16_DBL * TWO_PWR_16_DBL;\r\n\r\n    /**\r\n     * @type {number}\r\n     * @const\r\n     * @inner\r\n     */\r\n    var TWO_PWR_64_DBL = TWO_PWR_32_DBL * TWO_PWR_32_DBL;\r\n\r\n    /**\r\n     * @type {number}\r\n     * @const\r\n     * @inner\r\n     */\r\n    var TWO_PWR_63_DBL = TWO_PWR_64_DBL / 2;\r\n\r\n    /**\r\n     * @type {!Long}\r\n     * @const\r\n     * @inner\r\n     */\r\n    var TWO_PWR_24 = fromInt(TWO_PWR_24_DBL);\r\n\r\n    /**\r\n     * @type {!Long}\r\n     * @inner\r\n     */\r\n    var ZERO = fromInt(0);\r\n\r\n    /**\r\n     * Signed zero.\r\n     * @type {!Long}\r\n     */\r\n    Long.ZERO = ZERO;\r\n\r\n    /**\r\n     * @type {!Long}\r\n     * @inner\r\n     */\r\n    var UZERO = fromInt(0, true);\r\n\r\n    /**\r\n     * Unsigned zero.\r\n     * @type {!Long}\r\n     */\r\n    Long.UZERO = UZERO;\r\n\r\n    /**\r\n     * @type {!Long}\r\n     * @inner\r\n     */\r\n    var ONE = fromInt(1);\r\n\r\n    /**\r\n     * Signed one.\r\n     * @type {!Long}\r\n     */\r\n    Long.ONE = ONE;\r\n\r\n    /**\r\n     * @type {!Long}\r\n     * @inner\r\n     */\r\n    var UONE = fromInt(1, true);\r\n\r\n    /**\r\n     * Unsigned one.\r\n     * @type {!Long}\r\n     */\r\n    Long.UONE = UONE;\r\n\r\n    /**\r\n     * @type {!Long}\r\n     * @inner\r\n     */\r\n    var NEG_ONE = fromInt(-1);\r\n\r\n    /**\r\n     * Signed negative one.\r\n     * @type {!Long}\r\n     */\r\n    Long.NEG_ONE = NEG_ONE;\r\n\r\n    /**\r\n     * @type {!Long}\r\n     * @inner\r\n     */\r\n    var MAX_VALUE = fromBits(0xFFFFFFFF|0, 0x7FFFFFFF|0, false);\r\n\r\n    /**\r\n     * Maximum signed value.\r\n     * @type {!Long}\r\n     */\r\n    Long.MAX_VALUE = MAX_VALUE;\r\n\r\n    /**\r\n     * @type {!Long}\r\n     * @inner\r\n     */\r\n    var MAX_UNSIGNED_VALUE = fromBits(0xFFFFFFFF|0, 0xFFFFFFFF|0, true);\r\n\r\n    /**\r\n     * Maximum unsigned value.\r\n     * @type {!Long}\r\n     */\r\n    Long.MAX_UNSIGNED_VALUE = MAX_UNSIGNED_VALUE;\r\n\r\n    /**\r\n     * @type {!Long}\r\n     * @inner\r\n     */\r\n    var MIN_VALUE = fromBits(0, 0x80000000|0, false);\r\n\r\n    /**\r\n     * Minimum signed value.\r\n     * @type {!Long}\r\n     */\r\n    Long.MIN_VALUE = MIN_VALUE;\r\n\r\n    /**\r\n     * @alias Long.prototype\r\n     * @inner\r\n     */\r\n    var LongPrototype = Long.prototype;\r\n\r\n    /**\r\n     * Converts the Long to a 32 bit integer, assuming it is a 32 bit integer.\r\n     * @returns {number}\r\n     */\r\n    LongPrototype.toInt = function toInt() {\r\n        return this.unsigned ? this.low >>> 0 : this.low;\r\n    };\r\n\r\n    /**\r\n     * Converts the Long to a the nearest floating-point representation of this value (double, 53 bit mantissa).\r\n     * @returns {number}\r\n     */\r\n    LongPrototype.toNumber = function toNumber() {\r\n        if (this.unsigned)\r\n            return ((this.high >>> 0) * TWO_PWR_32_DBL) + (this.low >>> 0);\r\n        return this.high * TWO_PWR_32_DBL + (this.low >>> 0);\r\n    };\r\n\r\n    /**\r\n     * Converts the Long to a string written in the specified radix.\r\n     * @param {number=} radix Radix (2-36), defaults to 10\r\n     * @returns {string}\r\n     * @override\r\n     * @throws {RangeError} If `radix` is out of range\r\n     */\r\n    LongPrototype.toString = function toString(radix) {\r\n        radix = radix || 10;\r\n        if (radix < 2 || 36 < radix)\r\n            throw RangeError('radix');\r\n        if (this.isZero())\r\n            return '0';\r\n        if (this.isNegative()) { // Unsigned Longs are never negative\r\n            if (this.eq(MIN_VALUE)) {\r\n                // We need to change the Long value before it can be negated, so we remove\r\n                // the bottom-most digit in this base and then recurse to do the rest.\r\n                var radixLong = fromNumber(radix),\r\n                    div = this.div(radixLong),\r\n                    rem1 = div.mul(radixLong).sub(this);\r\n                return div.toString(radix) + rem1.toInt().toString(radix);\r\n            } else\r\n                return '-' + this.neg().toString(radix);\r\n        }\r\n\r\n        // Do several (6) digits each time through the loop, so as to\r\n        // minimize the calls to the very expensive emulated div.\r\n        var radixToPower = fromNumber(pow_dbl(radix, 6), this.unsigned),\r\n            rem = this;\r\n        var result = '';\r\n        while (true) {\r\n            var remDiv = rem.div(radixToPower),\r\n                intval = rem.sub(remDiv.mul(radixToPower)).toInt() >>> 0,\r\n                digits = intval.toString(radix);\r\n            rem = remDiv;\r\n            if (rem.isZero())\r\n                return digits + result;\r\n            else {\r\n                while (digits.length < 6)\r\n                    digits = '0' + digits;\r\n                result = '' + digits + result;\r\n            }\r\n        }\r\n    };\r\n\r\n    /**\r\n     * Gets the high 32 bits as a signed integer.\r\n     * @returns {number} Signed high bits\r\n     */\r\n    LongPrototype.getHighBits = function getHighBits() {\r\n        return this.high;\r\n    };\r\n\r\n    /**\r\n     * Gets the high 32 bits as an unsigned integer.\r\n     * @returns {number} Unsigned high bits\r\n     */\r\n    LongPrototype.getHighBitsUnsigned = function getHighBitsUnsigned() {\r\n        return this.high >>> 0;\r\n    };\r\n\r\n    /**\r\n     * Gets the low 32 bits as a signed integer.\r\n     * @returns {number} Signed low bits\r\n     */\r\n    LongPrototype.getLowBits = function getLowBits() {\r\n        return this.low;\r\n    };\r\n\r\n    /**\r\n     * Gets the low 32 bits as an unsigned integer.\r\n     * @returns {number} Unsigned low bits\r\n     */\r\n    LongPrototype.getLowBitsUnsigned = function getLowBitsUnsigned() {\r\n        return this.low >>> 0;\r\n    };\r\n\r\n    /**\r\n     * Gets the number of bits needed to represent the absolute value of this Long.\r\n     * @returns {number}\r\n     */\r\n    LongPrototype.getNumBitsAbs = function getNumBitsAbs() {\r\n        if (this.isNegative()) // Unsigned Longs are never negative\r\n            return this.eq(MIN_VALUE) ? 64 : this.neg().getNumBitsAbs();\r\n        var val = this.high != 0 ? this.high : this.low;\r\n        for (var bit = 31; bit > 0; bit--)\r\n            if ((val & (1 << bit)) != 0)\r\n                break;\r\n        return this.high != 0 ? bit + 33 : bit + 1;\r\n    };\r\n\r\n    /**\r\n     * Tests if this Long's value equals zero.\r\n     * @returns {boolean}\r\n     */\r\n    LongPrototype.isZero = function isZero() {\r\n        return this.high === 0 && this.low === 0;\r\n    };\r\n\r\n    /**\r\n     * Tests if this Long's value is negative.\r\n     * @returns {boolean}\r\n     */\r\n    LongPrototype.isNegative = function isNegative() {\r\n        return !this.unsigned && this.high < 0;\r\n    };\r\n\r\n    /**\r\n     * Tests if this Long's value is positive.\r\n     * @returns {boolean}\r\n     */\r\n    LongPrototype.isPositive = function isPositive() {\r\n        return this.unsigned || this.high >= 0;\r\n    };\r\n\r\n    /**\r\n     * Tests if this Long's value is odd.\r\n     * @returns {boolean}\r\n     */\r\n    LongPrototype.isOdd = function isOdd() {\r\n        return (this.low & 1) === 1;\r\n    };\r\n\r\n    /**\r\n     * Tests if this Long's value is even.\r\n     * @returns {boolean}\r\n     */\r\n    LongPrototype.isEven = function isEven() {\r\n        return (this.low & 1) === 0;\r\n    };\r\n\r\n    /**\r\n     * Tests if this Long's value equals the specified's.\r\n     * @param {!Long|number|string} other Other value\r\n     * @returns {boolean}\r\n     */\r\n    LongPrototype.equals = function equals(other) {\r\n        if (!isLong(other))\r\n            other = fromValue(other);\r\n        if (this.unsigned !== other.unsigned && (this.high >>> 31) === 1 && (other.high >>> 31) === 1)\r\n            return false;\r\n        return this.high === other.high && this.low === other.low;\r\n    };\r\n\r\n    /**\r\n     * Tests if this Long's value equals the specified's. This is an alias of {@link Long#equals}.\r\n     * @function\r\n     * @param {!Long|number|string} other Other value\r\n     * @returns {boolean}\r\n     */\r\n    LongPrototype.eq = LongPrototype.equals;\r\n\r\n    /**\r\n     * Tests if this Long's value differs from the specified's.\r\n     * @param {!Long|number|string} other Other value\r\n     * @returns {boolean}\r\n     */\r\n    LongPrototype.notEquals = function notEquals(other) {\r\n        return !this.eq(/* validates */ other);\r\n    };\r\n\r\n    /**\r\n     * Tests if this Long's value differs from the specified's. This is an alias of {@link Long#notEquals}.\r\n     * @function\r\n     * @param {!Long|number|string} other Other value\r\n     * @returns {boolean}\r\n     */\r\n    LongPrototype.neq = LongPrototype.notEquals;\r\n\r\n    /**\r\n     * Tests if this Long's value is less than the specified's.\r\n     * @param {!Long|number|string} other Other value\r\n     * @returns {boolean}\r\n     */\r\n    LongPrototype.lessThan = function lessThan(other) {\r\n        return this.comp(/* validates */ other) < 0;\r\n    };\r\n\r\n    /**\r\n     * Tests if this Long's value is less than the specified's. This is an alias of {@link Long#lessThan}.\r\n     * @function\r\n     * @param {!Long|number|string} other Other value\r\n     * @returns {boolean}\r\n     */\r\n    LongPrototype.lt = LongPrototype.lessThan;\r\n\r\n    /**\r\n     * Tests if this Long's value is less than or equal the specified's.\r\n     * @param {!Long|number|string} other Other value\r\n     * @returns {boolean}\r\n     */\r\n    LongPrototype.lessThanOrEqual = function lessThanOrEqual(other) {\r\n        return this.comp(/* validates */ other) <= 0;\r\n    };\r\n\r\n    /**\r\n     * Tests if this Long's value is less than or equal the specified's. This is an alias of {@link Long#lessThanOrEqual}.\r\n     * @function\r\n     * @param {!Long|number|string} other Other value\r\n     * @returns {boolean}\r\n     */\r\n    LongPrototype.lte = LongPrototype.lessThanOrEqual;\r\n\r\n    /**\r\n     * Tests if this Long's value is greater than the specified's.\r\n     * @param {!Long|number|string} other Other value\r\n     * @returns {boolean}\r\n     */\r\n    LongPrototype.greaterThan = function greaterThan(other) {\r\n        return this.comp(/* validates */ other) > 0;\r\n    };\r\n\r\n    /**\r\n     * Tests if this Long's value is greater than the specified's. This is an alias of {@link Long#greaterThan}.\r\n     * @function\r\n     * @param {!Long|number|string} other Other value\r\n     * @returns {boolean}\r\n     */\r\n    LongPrototype.gt = LongPrototype.greaterThan;\r\n\r\n    /**\r\n     * Tests if this Long's value is greater than or equal the specified's.\r\n     * @param {!Long|number|string} other Other value\r\n     * @returns {boolean}\r\n     */\r\n    LongPrototype.greaterThanOrEqual = function greaterThanOrEqual(other) {\r\n        return this.comp(/* validates */ other) >= 0;\r\n    };\r\n\r\n    /**\r\n     * Tests if this Long's value is greater than or equal the specified's. This is an alias of {@link Long#greaterThanOrEqual}.\r\n     * @function\r\n     * @param {!Long|number|string} other Other value\r\n     * @returns {boolean}\r\n     */\r\n    LongPrototype.gte = LongPrototype.greaterThanOrEqual;\r\n\r\n    /**\r\n     * Compares this Long's value with the specified's.\r\n     * @param {!Long|number|string} other Other value\r\n     * @returns {number} 0 if they are the same, 1 if the this is greater and -1\r\n     *  if the given one is greater\r\n     */\r\n    LongPrototype.compare = function compare(other) {\r\n        if (!isLong(other))\r\n            other = fromValue(other);\r\n        if (this.eq(other))\r\n            return 0;\r\n        var thisNeg = this.isNegative(),\r\n            otherNeg = other.isNegative();\r\n        if (thisNeg && !otherNeg)\r\n            return -1;\r\n        if (!thisNeg && otherNeg)\r\n            return 1;\r\n        // At this point the sign bits are the same\r\n        if (!this.unsigned)\r\n            return this.sub(other).isNegative() ? -1 : 1;\r\n        // Both are positive if at least one is unsigned\r\n        return (other.high >>> 0) > (this.high >>> 0) || (other.high === this.high && (other.low >>> 0) > (this.low >>> 0)) ? -1 : 1;\r\n    };\r\n\r\n    /**\r\n     * Compares this Long's value with the specified's. This is an alias of {@link Long#compare}.\r\n     * @function\r\n     * @param {!Long|number|string} other Other value\r\n     * @returns {number} 0 if they are the same, 1 if the this is greater and -1\r\n     *  if the given one is greater\r\n     */\r\n    LongPrototype.comp = LongPrototype.compare;\r\n\r\n    /**\r\n     * Negates this Long's value.\r\n     * @returns {!Long} Negated Long\r\n     */\r\n    LongPrototype.negate = function negate() {\r\n        if (!this.unsigned && this.eq(MIN_VALUE))\r\n            return MIN_VALUE;\r\n        return this.not().add(ONE);\r\n    };\r\n\r\n    /**\r\n     * Negates this Long's value. This is an alias of {@link Long#negate}.\r\n     * @function\r\n     * @returns {!Long} Negated Long\r\n     */\r\n    LongPrototype.neg = LongPrototype.negate;\r\n\r\n    /**\r\n     * Returns the sum of this and the specified Long.\r\n     * @param {!Long|number|string} addend Addend\r\n     * @returns {!Long} Sum\r\n     */\r\n    LongPrototype.add = function add(addend) {\r\n        if (!isLong(addend))\r\n            addend = fromValue(addend);\r\n\r\n        // Divide each number into 4 chunks of 16 bits, and then sum the chunks.\r\n\r\n        var a48 = this.high >>> 16;\r\n        var a32 = this.high & 0xFFFF;\r\n        var a16 = this.low >>> 16;\r\n        var a00 = this.low & 0xFFFF;\r\n\r\n        var b48 = addend.high >>> 16;\r\n        var b32 = addend.high & 0xFFFF;\r\n        var b16 = addend.low >>> 16;\r\n        var b00 = addend.low & 0xFFFF;\r\n\r\n        var c48 = 0, c32 = 0, c16 = 0, c00 = 0;\r\n        c00 += a00 + b00;\r\n        c16 += c00 >>> 16;\r\n        c00 &= 0xFFFF;\r\n        c16 += a16 + b16;\r\n        c32 += c16 >>> 16;\r\n        c16 &= 0xFFFF;\r\n        c32 += a32 + b32;\r\n        c48 += c32 >>> 16;\r\n        c32 &= 0xFFFF;\r\n        c48 += a48 + b48;\r\n        c48 &= 0xFFFF;\r\n        return fromBits((c16 << 16) | c00, (c48 << 16) | c32, this.unsigned);\r\n    };\r\n\r\n    /**\r\n     * Returns the difference of this and the specified Long.\r\n     * @param {!Long|number|string} subtrahend Subtrahend\r\n     * @returns {!Long} Difference\r\n     */\r\n    LongPrototype.subtract = function subtract(subtrahend) {\r\n        if (!isLong(subtrahend))\r\n            subtrahend = fromValue(subtrahend);\r\n        return this.add(subtrahend.neg());\r\n    };\r\n\r\n    /**\r\n     * Returns the difference of this and the specified Long. This is an alias of {@link Long#subtract}.\r\n     * @function\r\n     * @param {!Long|number|string} subtrahend Subtrahend\r\n     * @returns {!Long} Difference\r\n     */\r\n    LongPrototype.sub = LongPrototype.subtract;\r\n\r\n    /**\r\n     * Returns the product of this and the specified Long.\r\n     * @param {!Long|number|string} multiplier Multiplier\r\n     * @returns {!Long} Product\r\n     */\r\n    LongPrototype.multiply = function multiply(multiplier) {\r\n        if (this.isZero())\r\n            return ZERO;\r\n        if (!isLong(multiplier))\r\n            multiplier = fromValue(multiplier);\r\n        if (multiplier.isZero())\r\n            return ZERO;\r\n        if (this.eq(MIN_VALUE))\r\n            return multiplier.isOdd() ? MIN_VALUE : ZERO;\r\n        if (multiplier.eq(MIN_VALUE))\r\n            return this.isOdd() ? MIN_VALUE : ZERO;\r\n\r\n        if (this.isNegative()) {\r\n            if (multiplier.isNegative())\r\n                return this.neg().mul(multiplier.neg());\r\n            else\r\n                return this.neg().mul(multiplier).neg();\r\n        } else if (multiplier.isNegative())\r\n            return this.mul(multiplier.neg()).neg();\r\n\r\n        // If both longs are small, use float multiplication\r\n        if (this.lt(TWO_PWR_24) && multiplier.lt(TWO_PWR_24))\r\n            return fromNumber(this.toNumber() * multiplier.toNumber(), this.unsigned);\r\n\r\n        // Divide each long into 4 chunks of 16 bits, and then add up 4x4 products.\r\n        // We can skip products that would overflow.\r\n\r\n        var a48 = this.high >>> 16;\r\n        var a32 = this.high & 0xFFFF;\r\n        var a16 = this.low >>> 16;\r\n        var a00 = this.low & 0xFFFF;\r\n\r\n        var b48 = multiplier.high >>> 16;\r\n        var b32 = multiplier.high & 0xFFFF;\r\n        var b16 = multiplier.low >>> 16;\r\n        var b00 = multiplier.low & 0xFFFF;\r\n\r\n        var c48 = 0, c32 = 0, c16 = 0, c00 = 0;\r\n        c00 += a00 * b00;\r\n        c16 += c00 >>> 16;\r\n        c00 &= 0xFFFF;\r\n        c16 += a16 * b00;\r\n        c32 += c16 >>> 16;\r\n        c16 &= 0xFFFF;\r\n        c16 += a00 * b16;\r\n        c32 += c16 >>> 16;\r\n        c16 &= 0xFFFF;\r\n        c32 += a32 * b00;\r\n        c48 += c32 >>> 16;\r\n        c32 &= 0xFFFF;\r\n        c32 += a16 * b16;\r\n        c48 += c32 >>> 16;\r\n        c32 &= 0xFFFF;\r\n        c32 += a00 * b32;\r\n        c48 += c32 >>> 16;\r\n        c32 &= 0xFFFF;\r\n        c48 += a48 * b00 + a32 * b16 + a16 * b32 + a00 * b48;\r\n        c48 &= 0xFFFF;\r\n        return fromBits((c16 << 16) | c00, (c48 << 16) | c32, this.unsigned);\r\n    };\r\n\r\n    /**\r\n     * Returns the product of this and the specified Long. This is an alias of {@link Long#multiply}.\r\n     * @function\r\n     * @param {!Long|number|string} multiplier Multiplier\r\n     * @returns {!Long} Product\r\n     */\r\n    LongPrototype.mul = LongPrototype.multiply;\r\n\r\n    /**\r\n     * Returns this Long divided by the specified. The result is signed if this Long is signed or\r\n     *  unsigned if this Long is unsigned.\r\n     * @param {!Long|number|string} divisor Divisor\r\n     * @returns {!Long} Quotient\r\n     */\r\n    LongPrototype.divide = function divide(divisor) {\r\n        if (!isLong(divisor))\r\n            divisor = fromValue(divisor);\r\n        if (divisor.isZero())\r\n            throw Error('division by zero');\r\n        if (this.isZero())\r\n            return this.unsigned ? UZERO : ZERO;\r\n        var approx, rem, res;\r\n        if (!this.unsigned) {\r\n            // This section is only relevant for signed longs and is derived from the\r\n            // closure library as a whole.\r\n            if (this.eq(MIN_VALUE)) {\r\n                if (divisor.eq(ONE) || divisor.eq(NEG_ONE))\r\n                    return MIN_VALUE;  // recall that -MIN_VALUE == MIN_VALUE\r\n                else if (divisor.eq(MIN_VALUE))\r\n                    return ONE;\r\n                else {\r\n                    // At this point, we have |other| >= 2, so |this/other| < |MIN_VALUE|.\r\n                    var halfThis = this.shr(1);\r\n                    approx = halfThis.div(divisor).shl(1);\r\n                    if (approx.eq(ZERO)) {\r\n                        return divisor.isNegative() ? ONE : NEG_ONE;\r\n                    } else {\r\n                        rem = this.sub(divisor.mul(approx));\r\n                        res = approx.add(rem.div(divisor));\r\n                        return res;\r\n                    }\r\n                }\r\n            } else if (divisor.eq(MIN_VALUE))\r\n                return this.unsigned ? UZERO : ZERO;\r\n            if (this.isNegative()) {\r\n                if (divisor.isNegative())\r\n                    return this.neg().div(divisor.neg());\r\n                return this.neg().div(divisor).neg();\r\n            } else if (divisor.isNegative())\r\n                return this.div(divisor.neg()).neg();\r\n            res = ZERO;\r\n        } else {\r\n            // The algorithm below has not been made for unsigned longs. It's therefore\r\n            // required to take special care of the MSB prior to running it.\r\n            if (!divisor.unsigned)\r\n                divisor = divisor.toUnsigned();\r\n            if (divisor.gt(this))\r\n                return UZERO;\r\n            if (divisor.gt(this.shru(1))) // 15 >>> 1 = 7 ; with divisor = 8 ; true\r\n                return UONE;\r\n            res = UZERO;\r\n        }\r\n\r\n        // Repeat the following until the remainder is less than other:  find a\r\n        // floating-point that approximates remainder / other *from below*, add this\r\n        // into the result, and subtract it from the remainder.  It is critical that\r\n        // the approximate value is less than or equal to the real value so that the\r\n        // remainder never becomes negative.\r\n        rem = this;\r\n        while (rem.gte(divisor)) {\r\n            // Approximate the result of division. This may be a little greater or\r\n            // smaller than the actual value.\r\n            approx = Math.max(1, Math.floor(rem.toNumber() / divisor.toNumber()));\r\n\r\n            // We will tweak the approximate result by changing it in the 48-th digit or\r\n            // the smallest non-fractional digit, whichever is larger.\r\n            var log2 = Math.ceil(Math.log(approx) / Math.LN2),\r\n                delta = (log2 <= 48) ? 1 : pow_dbl(2, log2 - 48),\r\n\r\n            // Decrease the approximation until it is smaller than the remainder.  Note\r\n            // that if it is too large, the product overflows and is negative.\r\n                approxRes = fromNumber(approx),\r\n                approxRem = approxRes.mul(divisor);\r\n            while (approxRem.isNegative() || approxRem.gt(rem)) {\r\n                approx -= delta;\r\n                approxRes = fromNumber(approx, this.unsigned);\r\n                approxRem = approxRes.mul(divisor);\r\n            }\r\n\r\n            // We know the answer can't be zero... and actually, zero would cause\r\n            // infinite recursion since we would make no progress.\r\n            if (approxRes.isZero())\r\n                approxRes = ONE;\r\n\r\n            res = res.add(approxRes);\r\n            rem = rem.sub(approxRem);\r\n        }\r\n        return res;\r\n    };\r\n\r\n    /**\r\n     * Returns this Long divided by the specified. This is an alias of {@link Long#divide}.\r\n     * @function\r\n     * @param {!Long|number|string} divisor Divisor\r\n     * @returns {!Long} Quotient\r\n     */\r\n    LongPrototype.div = LongPrototype.divide;\r\n\r\n    /**\r\n     * Returns this Long modulo the specified.\r\n     * @param {!Long|number|string} divisor Divisor\r\n     * @returns {!Long} Remainder\r\n     */\r\n    LongPrototype.modulo = function modulo(divisor) {\r\n        if (!isLong(divisor))\r\n            divisor = fromValue(divisor);\r\n        return this.sub(this.div(divisor).mul(divisor));\r\n    };\r\n\r\n    /**\r\n     * Returns this Long modulo the specified. This is an alias of {@link Long#modulo}.\r\n     * @function\r\n     * @param {!Long|number|string} divisor Divisor\r\n     * @returns {!Long} Remainder\r\n     */\r\n    LongPrototype.mod = LongPrototype.modulo;\r\n\r\n    /**\r\n     * Returns the bitwise NOT of this Long.\r\n     * @returns {!Long}\r\n     */\r\n    LongPrototype.not = function not() {\r\n        return fromBits(~this.low, ~this.high, this.unsigned);\r\n    };\r\n\r\n    /**\r\n     * Returns the bitwise AND of this Long and the specified.\r\n     * @param {!Long|number|string} other Other Long\r\n     * @returns {!Long}\r\n     */\r\n    LongPrototype.and = function and(other) {\r\n        if (!isLong(other))\r\n            other = fromValue(other);\r\n        return fromBits(this.low & other.low, this.high & other.high, this.unsigned);\r\n    };\r\n\r\n    /**\r\n     * Returns the bitwise OR of this Long and the specified.\r\n     * @param {!Long|number|string} other Other Long\r\n     * @returns {!Long}\r\n     */\r\n    LongPrototype.or = function or(other) {\r\n        if (!isLong(other))\r\n            other = fromValue(other);\r\n        return fromBits(this.low | other.low, this.high | other.high, this.unsigned);\r\n    };\r\n\r\n    /**\r\n     * Returns the bitwise XOR of this Long and the given one.\r\n     * @param {!Long|number|string} other Other Long\r\n     * @returns {!Long}\r\n     */\r\n    LongPrototype.xor = function xor(other) {\r\n        if (!isLong(other))\r\n            other = fromValue(other);\r\n        return fromBits(this.low ^ other.low, this.high ^ other.high, this.unsigned);\r\n    };\r\n\r\n    /**\r\n     * Returns this Long with bits shifted to the left by the given amount.\r\n     * @param {number|!Long} numBits Number of bits\r\n     * @returns {!Long} Shifted Long\r\n     */\r\n    LongPrototype.shiftLeft = function shiftLeft(numBits) {\r\n        if (isLong(numBits))\r\n            numBits = numBits.toInt();\r\n        if ((numBits &= 63) === 0)\r\n            return this;\r\n        else if (numBits < 32)\r\n            return fromBits(this.low << numBits, (this.high << numBits) | (this.low >>> (32 - numBits)), this.unsigned);\r\n        else\r\n            return fromBits(0, this.low << (numBits - 32), this.unsigned);\r\n    };\r\n\r\n    /**\r\n     * Returns this Long with bits shifted to the left by the given amount. This is an alias of {@link Long#shiftLeft}.\r\n     * @function\r\n     * @param {number|!Long} numBits Number of bits\r\n     * @returns {!Long} Shifted Long\r\n     */\r\n    LongPrototype.shl = LongPrototype.shiftLeft;\r\n\r\n    /**\r\n     * Returns this Long with bits arithmetically shifted to the right by the given amount.\r\n     * @param {number|!Long} numBits Number of bits\r\n     * @returns {!Long} Shifted Long\r\n     */\r\n    LongPrototype.shiftRight = function shiftRight(numBits) {\r\n        if (isLong(numBits))\r\n            numBits = numBits.toInt();\r\n        if ((numBits &= 63) === 0)\r\n            return this;\r\n        else if (numBits < 32)\r\n            return fromBits((this.low >>> numBits) | (this.high << (32 - numBits)), this.high >> numBits, this.unsigned);\r\n        else\r\n            return fromBits(this.high >> (numBits - 32), this.high >= 0 ? 0 : -1, this.unsigned);\r\n    };\r\n\r\n    /**\r\n     * Returns this Long with bits arithmetically shifted to the right by the given amount. This is an alias of {@link Long#shiftRight}.\r\n     * @function\r\n     * @param {number|!Long} numBits Number of bits\r\n     * @returns {!Long} Shifted Long\r\n     */\r\n    LongPrototype.shr = LongPrototype.shiftRight;\r\n\r\n    /**\r\n     * Returns this Long with bits logically shifted to the right by the given amount.\r\n     * @param {number|!Long} numBits Number of bits\r\n     * @returns {!Long} Shifted Long\r\n     */\r\n    LongPrototype.shiftRightUnsigned = function shiftRightUnsigned(numBits) {\r\n        if (isLong(numBits))\r\n            numBits = numBits.toInt();\r\n        numBits &= 63;\r\n        if (numBits === 0)\r\n            return this;\r\n        else {\r\n            var high = this.high;\r\n            if (numBits < 32) {\r\n                var low = this.low;\r\n                return fromBits((low >>> numBits) | (high << (32 - numBits)), high >>> numBits, this.unsigned);\r\n            } else if (numBits === 32)\r\n                return fromBits(high, 0, this.unsigned);\r\n            else\r\n                return fromBits(high >>> (numBits - 32), 0, this.unsigned);\r\n        }\r\n    };\r\n\r\n    /**\r\n     * Returns this Long with bits logically shifted to the right by the given amount. This is an alias of {@link Long#shiftRightUnsigned}.\r\n     * @function\r\n     * @param {number|!Long} numBits Number of bits\r\n     * @returns {!Long} Shifted Long\r\n     */\r\n    LongPrototype.shru = LongPrototype.shiftRightUnsigned;\r\n\r\n    /**\r\n     * Converts this Long to signed.\r\n     * @returns {!Long} Signed long\r\n     */\r\n    LongPrototype.toSigned = function toSigned() {\r\n        if (!this.unsigned)\r\n            return this;\r\n        return fromBits(this.low, this.high, false);\r\n    };\r\n\r\n    /**\r\n     * Converts this Long to unsigned.\r\n     * @returns {!Long} Unsigned long\r\n     */\r\n    LongPrototype.toUnsigned = function toUnsigned() {\r\n        if (this.unsigned)\r\n            return this;\r\n        return fromBits(this.low, this.high, true);\r\n    };\r\n\r\n    /**\r\n     * Converts this Long to its byte representation.\r\n     * @param {boolean=} le Whether little or big endian, defaults to big endian\r\n     * @returns {!Array.} Byte representation\r\n     */\r\n    LongPrototype.toBytes = function(le) {\r\n        return le ? this.toBytesLE() : this.toBytesBE();\r\n    }\r\n\r\n    /**\r\n     * Converts this Long to its little endian byte representation.\r\n     * @returns {!Array.} Little endian byte representation\r\n     */\r\n    LongPrototype.toBytesLE = function() {\r\n        var hi = this.high,\r\n            lo = this.low;\r\n        return [\r\n             lo         & 0xff,\r\n            (lo >>>  8) & 0xff,\r\n            (lo >>> 16) & 0xff,\r\n            (lo >>> 24) & 0xff,\r\n             hi         & 0xff,\r\n            (hi >>>  8) & 0xff,\r\n            (hi >>> 16) & 0xff,\r\n            (hi >>> 24) & 0xff\r\n        ];\r\n    }\r\n\r\n    /**\r\n     * Converts this Long to its big endian byte representation.\r\n     * @returns {!Array.} Big endian byte representation\r\n     */\r\n    LongPrototype.toBytesBE = function() {\r\n        var hi = this.high,\r\n            lo = this.low;\r\n        return [\r\n            (hi >>> 24) & 0xff,\r\n            (hi >>> 16) & 0xff,\r\n            (hi >>>  8) & 0xff,\r\n             hi         & 0xff,\r\n            (lo >>> 24) & 0xff,\r\n            (lo >>> 16) & 0xff,\r\n            (lo >>>  8) & 0xff,\r\n             lo         & 0xff\r\n        ];\r\n    }\r\n\r\n    return Long;\r\n});\r\n","/*\r\n Copyright 2013-2014 Daniel Wirtz \r\n\r\n Licensed under the Apache License, Version 2.0 (the \"License\");\r\n you may not use this file except in compliance with the License.\r\n You may obtain a copy of the License at\r\n\r\n http://www.apache.org/licenses/LICENSE-2.0\r\n\r\n Unless required by applicable law or agreed to in writing, software\r\n distributed under the License is distributed on an \"AS IS\" BASIS,\r\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n See the License for the specific language governing permissions and\r\n limitations under the License.\r\n */\r\n\r\n/**\r\n * @license bytebuffer.js (c) 2015 Daniel Wirtz \r\n * Backing buffer: ArrayBuffer, Accessor: Uint8Array\r\n * Released under the Apache License, Version 2.0\r\n * see: https://github.com/dcodeIO/bytebuffer.js for details\r\n */\r\n(function(global, factory) {\r\n\r\n    /* AMD */ if (typeof define === 'function' && define[\"amd\"])\r\n        define([\"long\"], factory);\r\n    /* CommonJS */ else if (typeof require === 'function' && typeof module === \"object\" && module && module[\"exports\"])\r\n        module['exports'] = (function() {\r\n            var Long; try { Long = require(\"long\"); } catch (e) {}\r\n            return factory(Long);\r\n        })();\r\n    /* Global */ else\r\n        (global[\"dcodeIO\"] = global[\"dcodeIO\"] || {})[\"ByteBuffer\"] = factory(global[\"dcodeIO\"][\"Long\"]);\r\n\r\n})(this, function(Long) {\r\n    \"use strict\";\r\n\r\n    /**\r\n     * Constructs a new ByteBuffer.\r\n     * @class The swiss army knife for binary data in JavaScript.\r\n     * @exports ByteBuffer\r\n     * @constructor\r\n     * @param {number=} capacity Initial capacity. Defaults to {@link ByteBuffer.DEFAULT_CAPACITY}.\r\n     * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to\r\n     *  {@link ByteBuffer.DEFAULT_ENDIAN}.\r\n     * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to\r\n     *  {@link ByteBuffer.DEFAULT_NOASSERT}.\r\n     * @expose\r\n     */\r\n    var ByteBuffer = function(capacity, littleEndian, noAssert) {\r\n        if (typeof capacity === 'undefined')\r\n            capacity = ByteBuffer.DEFAULT_CAPACITY;\r\n        if (typeof littleEndian === 'undefined')\r\n            littleEndian = ByteBuffer.DEFAULT_ENDIAN;\r\n        if (typeof noAssert === 'undefined')\r\n            noAssert = ByteBuffer.DEFAULT_NOASSERT;\r\n        if (!noAssert) {\r\n            capacity = capacity | 0;\r\n            if (capacity < 0)\r\n                throw RangeError(\"Illegal capacity\");\r\n            littleEndian = !!littleEndian;\r\n            noAssert = !!noAssert;\r\n        }\r\n\r\n        /**\r\n         * Backing ArrayBuffer.\r\n         * @type {!ArrayBuffer}\r\n         * @expose\r\n         */\r\n        this.buffer = capacity === 0 ? EMPTY_BUFFER : new ArrayBuffer(capacity);\r\n\r\n        /**\r\n         * Uint8Array utilized to manipulate the backing buffer. Becomes `null` if the backing buffer has a capacity of `0`.\r\n         * @type {?Uint8Array}\r\n         * @expose\r\n         */\r\n        this.view = capacity === 0 ? null : new Uint8Array(this.buffer);\r\n\r\n        /**\r\n         * Absolute read/write offset.\r\n         * @type {number}\r\n         * @expose\r\n         * @see ByteBuffer#flip\r\n         * @see ByteBuffer#clear\r\n         */\r\n        this.offset = 0;\r\n\r\n        /**\r\n         * Marked offset.\r\n         * @type {number}\r\n         * @expose\r\n         * @see ByteBuffer#mark\r\n         * @see ByteBuffer#reset\r\n         */\r\n        this.markedOffset = -1;\r\n\r\n        /**\r\n         * Absolute limit of the contained data. Set to the backing buffer's capacity upon allocation.\r\n         * @type {number}\r\n         * @expose\r\n         * @see ByteBuffer#flip\r\n         * @see ByteBuffer#clear\r\n         */\r\n        this.limit = capacity;\r\n\r\n        /**\r\n         * Whether to use little endian byte order, defaults to `false` for big endian.\r\n         * @type {boolean}\r\n         * @expose\r\n         */\r\n        this.littleEndian = littleEndian;\r\n\r\n        /**\r\n         * Whether to skip assertions of offsets and values, defaults to `false`.\r\n         * @type {boolean}\r\n         * @expose\r\n         */\r\n        this.noAssert = noAssert;\r\n    };\r\n\r\n    /**\r\n     * ByteBuffer version.\r\n     * @type {string}\r\n     * @const\r\n     * @expose\r\n     */\r\n    ByteBuffer.VERSION = \"5.0.1\";\r\n\r\n    /**\r\n     * Little endian constant that can be used instead of its boolean value. Evaluates to `true`.\r\n     * @type {boolean}\r\n     * @const\r\n     * @expose\r\n     */\r\n    ByteBuffer.LITTLE_ENDIAN = true;\r\n\r\n    /**\r\n     * Big endian constant that can be used instead of its boolean value. Evaluates to `false`.\r\n     * @type {boolean}\r\n     * @const\r\n     * @expose\r\n     */\r\n    ByteBuffer.BIG_ENDIAN = false;\r\n\r\n    /**\r\n     * Default initial capacity of `16`.\r\n     * @type {number}\r\n     * @expose\r\n     */\r\n    ByteBuffer.DEFAULT_CAPACITY = 16;\r\n\r\n    /**\r\n     * Default endianess of `false` for big endian.\r\n     * @type {boolean}\r\n     * @expose\r\n     */\r\n    ByteBuffer.DEFAULT_ENDIAN = ByteBuffer.BIG_ENDIAN;\r\n\r\n    /**\r\n     * Default no assertions flag of `false`.\r\n     * @type {boolean}\r\n     * @expose\r\n     */\r\n    ByteBuffer.DEFAULT_NOASSERT = false;\r\n\r\n    /**\r\n     * A `Long` class for representing a 64-bit two's-complement integer value. May be `null` if Long.js has not been loaded\r\n     *  and int64 support is not available.\r\n     * @type {?Long}\r\n     * @const\r\n     * @see https://github.com/dcodeIO/long.js\r\n     * @expose\r\n     */\r\n    ByteBuffer.Long = Long || null;\r\n\r\n    /**\r\n     * @alias ByteBuffer.prototype\r\n     * @inner\r\n     */\r\n    var ByteBufferPrototype = ByteBuffer.prototype;\r\n\r\n    /**\r\n     * An indicator used to reliably determine if an object is a ByteBuffer or not.\r\n     * @type {boolean}\r\n     * @const\r\n     * @expose\r\n     * @private\r\n     */\r\n    ByteBufferPrototype.__isByteBuffer__;\r\n\r\n    Object.defineProperty(ByteBufferPrototype, \"__isByteBuffer__\", {\r\n        value: true,\r\n        enumerable: false,\r\n        configurable: false\r\n    });\r\n\r\n    // helpers\r\n\r\n    /**\r\n     * @type {!ArrayBuffer}\r\n     * @inner\r\n     */\r\n    var EMPTY_BUFFER = new ArrayBuffer(0);\r\n\r\n    /**\r\n     * String.fromCharCode reference for compile-time renaming.\r\n     * @type {function(...number):string}\r\n     * @inner\r\n     */\r\n    var stringFromCharCode = String.fromCharCode;\r\n\r\n    /**\r\n     * Creates a source function for a string.\r\n     * @param {string} s String to read from\r\n     * @returns {function():number|null} Source function returning the next char code respectively `null` if there are\r\n     *  no more characters left.\r\n     * @throws {TypeError} If the argument is invalid\r\n     * @inner\r\n     */\r\n    function stringSource(s) {\r\n        var i=0; return function() {\r\n            return i < s.length ? s.charCodeAt(i++) : null;\r\n        };\r\n    }\r\n\r\n    /**\r\n     * Creates a destination function for a string.\r\n     * @returns {function(number=):undefined|string} Destination function successively called with the next char code.\r\n     *  Returns the final string when called without arguments.\r\n     * @inner\r\n     */\r\n    function stringDestination() {\r\n        var cs = [], ps = []; return function() {\r\n            if (arguments.length === 0)\r\n                return ps.join('')+stringFromCharCode.apply(String, cs);\r\n            if (cs.length + arguments.length > 1024)\r\n                ps.push(stringFromCharCode.apply(String, cs)),\r\n                    cs.length = 0;\r\n            Array.prototype.push.apply(cs, arguments);\r\n        };\r\n    }\r\n\r\n    /**\r\n     * Gets the accessor type.\r\n     * @returns {Function} `Buffer` under node.js, `Uint8Array` respectively `DataView` in the browser (classes)\r\n     * @expose\r\n     */\r\n    ByteBuffer.accessor = function() {\r\n        return Uint8Array;\r\n    };\r\n    /**\r\n     * Allocates a new ByteBuffer backed by a buffer of the specified capacity.\r\n     * @param {number=} capacity Initial capacity. Defaults to {@link ByteBuffer.DEFAULT_CAPACITY}.\r\n     * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to\r\n     *  {@link ByteBuffer.DEFAULT_ENDIAN}.\r\n     * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to\r\n     *  {@link ByteBuffer.DEFAULT_NOASSERT}.\r\n     * @returns {!ByteBuffer}\r\n     * @expose\r\n     */\r\n    ByteBuffer.allocate = function(capacity, littleEndian, noAssert) {\r\n        return new ByteBuffer(capacity, littleEndian, noAssert);\r\n    };\r\n\r\n    /**\r\n     * Concatenates multiple ByteBuffers into one.\r\n     * @param {!Array.} buffers Buffers to concatenate\r\n     * @param {(string|boolean)=} encoding String encoding if `buffers` contains a string (\"base64\", \"hex\", \"binary\",\r\n     *  defaults to \"utf8\")\r\n     * @param {boolean=} littleEndian Whether to use little or big endian byte order for the resulting ByteBuffer. Defaults\r\n     *  to {@link ByteBuffer.DEFAULT_ENDIAN}.\r\n     * @param {boolean=} noAssert Whether to skip assertions of offsets and values for the resulting ByteBuffer. Defaults to\r\n     *  {@link ByteBuffer.DEFAULT_NOASSERT}.\r\n     * @returns {!ByteBuffer} Concatenated ByteBuffer\r\n     * @expose\r\n     */\r\n    ByteBuffer.concat = function(buffers, encoding, littleEndian, noAssert) {\r\n        if (typeof encoding === 'boolean' || typeof encoding !== 'string') {\r\n            noAssert = littleEndian;\r\n            littleEndian = encoding;\r\n            encoding = undefined;\r\n        }\r\n        var capacity = 0;\r\n        for (var i=0, k=buffers.length, length; i 0) capacity += length;\r\n        }\r\n        if (capacity === 0)\r\n            return new ByteBuffer(0, littleEndian, noAssert);\r\n        var bb = new ByteBuffer(capacity, littleEndian, noAssert),\r\n            bi;\r\n        i=0; while (i} buffer Anything that can be wrapped\r\n     * @param {(string|boolean)=} encoding String encoding if `buffer` is a string (\"base64\", \"hex\", \"binary\", defaults to\r\n     *  \"utf8\")\r\n     * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to\r\n     *  {@link ByteBuffer.DEFAULT_ENDIAN}.\r\n     * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to\r\n     *  {@link ByteBuffer.DEFAULT_NOASSERT}.\r\n     * @returns {!ByteBuffer} A ByteBuffer wrapping `buffer`\r\n     * @expose\r\n     */\r\n    ByteBuffer.wrap = function(buffer, encoding, littleEndian, noAssert) {\r\n        if (typeof encoding !== 'string') {\r\n            noAssert = littleEndian;\r\n            littleEndian = encoding;\r\n            encoding = undefined;\r\n        }\r\n        if (typeof buffer === 'string') {\r\n            if (typeof encoding === 'undefined')\r\n                encoding = \"utf8\";\r\n            switch (encoding) {\r\n                case \"base64\":\r\n                    return ByteBuffer.fromBase64(buffer, littleEndian);\r\n                case \"hex\":\r\n                    return ByteBuffer.fromHex(buffer, littleEndian);\r\n                case \"binary\":\r\n                    return ByteBuffer.fromBinary(buffer, littleEndian);\r\n                case \"utf8\":\r\n                    return ByteBuffer.fromUTF8(buffer, littleEndian);\r\n                case \"debug\":\r\n                    return ByteBuffer.fromDebug(buffer, littleEndian);\r\n                default:\r\n                    throw Error(\"Unsupported encoding: \"+encoding);\r\n            }\r\n        }\r\n        if (buffer === null || typeof buffer !== 'object')\r\n            throw TypeError(\"Illegal buffer\");\r\n        var bb;\r\n        if (ByteBuffer.isByteBuffer(buffer)) {\r\n            bb = ByteBufferPrototype.clone.call(buffer);\r\n            bb.markedOffset = -1;\r\n            return bb;\r\n        }\r\n        if (buffer instanceof Uint8Array) { // Extract ArrayBuffer from Uint8Array\r\n            bb = new ByteBuffer(0, littleEndian, noAssert);\r\n            if (buffer.length > 0) { // Avoid references to more than one EMPTY_BUFFER\r\n                bb.buffer = buffer.buffer;\r\n                bb.offset = buffer.byteOffset;\r\n                bb.limit = buffer.byteOffset + buffer.byteLength;\r\n                bb.view = new Uint8Array(buffer.buffer);\r\n            }\r\n        } else if (buffer instanceof ArrayBuffer) { // Reuse ArrayBuffer\r\n            bb = new ByteBuffer(0, littleEndian, noAssert);\r\n            if (buffer.byteLength > 0) {\r\n                bb.buffer = buffer;\r\n                bb.offset = 0;\r\n                bb.limit = buffer.byteLength;\r\n                bb.view = buffer.byteLength > 0 ? new Uint8Array(buffer) : null;\r\n            }\r\n        } else if (Object.prototype.toString.call(buffer) === \"[object Array]\") { // Create from octets\r\n            bb = new ByteBuffer(buffer.length, littleEndian, noAssert);\r\n            bb.limit = buffer.length;\r\n            for (var i=0; i} value Array of booleans to write\r\n     * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `length` if omitted.\r\n     * @returns {!ByteBuffer}\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.writeBitSet = function(value, offset) {\r\n      var relative = typeof offset === 'undefined';\n      if (relative) offset = this.offset;\n      if (!this.noAssert) {\r\n        if (!(value instanceof Array))\r\n          throw TypeError(\"Illegal BitSet: Not an array\");\r\n        if (typeof offset !== 'number' || offset % 1 !== 0)\n            throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n        offset >>>= 0;\n        if (offset < 0 || offset + 0 > this.buffer.byteLength)\n            throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n      }\r\n\r\n      var start = offset,\r\n          bits = value.length,\r\n          bytes = (bits >> 3),\r\n          bit = 0,\r\n          k;\r\n\r\n      offset += this.writeVarint32(bits,offset);\r\n\r\n      while(bytes--) {\r\n        k = (!!value[bit++] & 1) |\r\n            ((!!value[bit++] & 1) << 1) |\r\n            ((!!value[bit++] & 1) << 2) |\r\n            ((!!value[bit++] & 1) << 3) |\r\n            ((!!value[bit++] & 1) << 4) |\r\n            ((!!value[bit++] & 1) << 5) |\r\n            ((!!value[bit++] & 1) << 6) |\r\n            ((!!value[bit++] & 1) << 7);\r\n        this.writeByte(k,offset++);\r\n      }\r\n\r\n      if(bit < bits) {\r\n        var m = 0; k = 0;\r\n        while(bit < bits) k = k | ((!!value[bit++] & 1) << (m++));\r\n        this.writeByte(k,offset++);\r\n      }\r\n\r\n      if (relative) {\r\n        this.offset = offset;\r\n        return this;\r\n      }\r\n      return offset - start;\r\n    }\r\n\r\n    /**\r\n     * Reads a BitSet as an array of booleans.\r\n     * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `length` if omitted.\r\n     * @returns {Array\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.readBitSet = function(offset) {\r\n      var relative = typeof offset === 'undefined';\n      if (relative) offset = this.offset;\n\r\n      var ret = this.readVarint32(offset),\r\n          bits = ret.value,\r\n          bytes = (bits >> 3),\r\n          bit = 0,\r\n          value = [],\r\n          k;\r\n\r\n      offset += ret.length;\r\n\r\n      while(bytes--) {\r\n        k = this.readByte(offset++);\r\n        value[bit++] = !!(k & 0x01);\r\n        value[bit++] = !!(k & 0x02);\r\n        value[bit++] = !!(k & 0x04);\r\n        value[bit++] = !!(k & 0x08);\r\n        value[bit++] = !!(k & 0x10);\r\n        value[bit++] = !!(k & 0x20);\r\n        value[bit++] = !!(k & 0x40);\r\n        value[bit++] = !!(k & 0x80);\r\n      }\r\n\r\n      if(bit < bits) {\r\n        var m = 0;\r\n        k = this.readByte(offset++);\r\n        while(bit < bits) value[bit++] = !!((k >> (m++)) & 1);\r\n      }\r\n\r\n      if (relative) {\r\n        this.offset = offset;\r\n      }\r\n      return value;\r\n    }\r\n    /**\r\n     * Reads the specified number of bytes.\r\n     * @param {number} length Number of bytes to read\r\n     * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `length` if omitted.\r\n     * @returns {!ByteBuffer}\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.readBytes = function(length, offset) {\r\n        var relative = typeof offset === 'undefined';\n        if (relative) offset = this.offset;\n        if (!this.noAssert) {\r\n            if (typeof offset !== 'number' || offset % 1 !== 0)\n                throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n            offset >>>= 0;\n            if (offset < 0 || offset + length > this.buffer.byteLength)\n                throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+length+\") <= \"+this.buffer.byteLength);\n        }\r\n        var slice = this.slice(offset, offset + length);\r\n        if (relative) this.offset += length;\n        return slice;\r\n    };\r\n\r\n    /**\r\n     * Writes a payload of bytes. This is an alias of {@link ByteBuffer#append}.\r\n     * @function\r\n     * @param {!ByteBuffer|!ArrayBuffer|!Uint8Array|string} source Data to write. If `source` is a ByteBuffer, its offsets\r\n     *  will be modified according to the performed read operation.\r\n     * @param {(string|number)=} encoding Encoding if `data` is a string (\"base64\", \"hex\", \"binary\", defaults to \"utf8\")\r\n     * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes\r\n     *  written if omitted.\r\n     * @returns {!ByteBuffer} this\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.writeBytes = ByteBufferPrototype.append;\r\n\r\n    // types/ints/int8\r\n\r\n    /**\r\n     * Writes an 8bit signed integer.\r\n     * @param {number} value Value to write\r\n     * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `1` if omitted.\r\n     * @returns {!ByteBuffer} this\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.writeInt8 = function(value, offset) {\r\n        var relative = typeof offset === 'undefined';\n        if (relative) offset = this.offset;\n        if (!this.noAssert) {\r\n            if (typeof value !== 'number' || value % 1 !== 0)\n                throw TypeError(\"Illegal value: \"+value+\" (not an integer)\");\n            value |= 0;\n            if (typeof offset !== 'number' || offset % 1 !== 0)\n                throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n            offset >>>= 0;\n            if (offset < 0 || offset + 0 > this.buffer.byteLength)\n                throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n        }\r\n        offset += 1;\n        var capacity0 = this.buffer.byteLength;\n        if (offset > capacity0)\n            this.resize((capacity0 *= 2) > offset ? capacity0 : offset);\n        offset -= 1;\n        this.view[offset] = value;\r\n        if (relative) this.offset += 1;\n        return this;\r\n    };\r\n\r\n    /**\r\n     * Writes an 8bit signed integer. This is an alias of {@link ByteBuffer#writeInt8}.\r\n     * @function\r\n     * @param {number} value Value to write\r\n     * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `1` if omitted.\r\n     * @returns {!ByteBuffer} this\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.writeByte = ByteBufferPrototype.writeInt8;\r\n\r\n    /**\r\n     * Reads an 8bit signed integer.\r\n     * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `1` if omitted.\r\n     * @returns {number} Value read\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.readInt8 = function(offset) {\r\n        var relative = typeof offset === 'undefined';\n        if (relative) offset = this.offset;\n        if (!this.noAssert) {\r\n            if (typeof offset !== 'number' || offset % 1 !== 0)\n                throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n            offset >>>= 0;\n            if (offset < 0 || offset + 1 > this.buffer.byteLength)\n                throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+1+\") <= \"+this.buffer.byteLength);\n        }\r\n        var value = this.view[offset];\r\n        if ((value & 0x80) === 0x80) value = -(0xFF - value + 1); // Cast to signed\r\n        if (relative) this.offset += 1;\n        return value;\r\n    };\r\n\r\n    /**\r\n     * Reads an 8bit signed integer. This is an alias of {@link ByteBuffer#readInt8}.\r\n     * @function\r\n     * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `1` if omitted.\r\n     * @returns {number} Value read\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.readByte = ByteBufferPrototype.readInt8;\r\n\r\n    /**\r\n     * Writes an 8bit unsigned integer.\r\n     * @param {number} value Value to write\r\n     * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `1` if omitted.\r\n     * @returns {!ByteBuffer} this\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.writeUint8 = function(value, offset) {\r\n        var relative = typeof offset === 'undefined';\n        if (relative) offset = this.offset;\n        if (!this.noAssert) {\r\n            if (typeof value !== 'number' || value % 1 !== 0)\n                throw TypeError(\"Illegal value: \"+value+\" (not an integer)\");\n            value >>>= 0;\n            if (typeof offset !== 'number' || offset % 1 !== 0)\n                throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n            offset >>>= 0;\n            if (offset < 0 || offset + 0 > this.buffer.byteLength)\n                throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n        }\r\n        offset += 1;\n        var capacity1 = this.buffer.byteLength;\n        if (offset > capacity1)\n            this.resize((capacity1 *= 2) > offset ? capacity1 : offset);\n        offset -= 1;\n        this.view[offset] = value;\r\n        if (relative) this.offset += 1;\n        return this;\r\n    };\r\n\r\n    /**\r\n     * Writes an 8bit unsigned integer. This is an alias of {@link ByteBuffer#writeUint8}.\r\n     * @function\r\n     * @param {number} value Value to write\r\n     * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `1` if omitted.\r\n     * @returns {!ByteBuffer} this\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.writeUInt8 = ByteBufferPrototype.writeUint8;\r\n\r\n    /**\r\n     * Reads an 8bit unsigned integer.\r\n     * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `1` if omitted.\r\n     * @returns {number} Value read\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.readUint8 = function(offset) {\r\n        var relative = typeof offset === 'undefined';\n        if (relative) offset = this.offset;\n        if (!this.noAssert) {\r\n            if (typeof offset !== 'number' || offset % 1 !== 0)\n                throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n            offset >>>= 0;\n            if (offset < 0 || offset + 1 > this.buffer.byteLength)\n                throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+1+\") <= \"+this.buffer.byteLength);\n        }\r\n        var value = this.view[offset];\r\n        if (relative) this.offset += 1;\n        return value;\r\n    };\r\n\r\n    /**\r\n     * Reads an 8bit unsigned integer. This is an alias of {@link ByteBuffer#readUint8}.\r\n     * @function\r\n     * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `1` if omitted.\r\n     * @returns {number} Value read\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.readUInt8 = ByteBufferPrototype.readUint8;\r\n\r\n    // types/ints/int16\r\n\r\n    /**\r\n     * Writes a 16bit signed integer.\r\n     * @param {number} value Value to write\r\n     * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `2` if omitted.\r\n     * @throws {TypeError} If `offset` or `value` is not a valid number\r\n     * @throws {RangeError} If `offset` is out of bounds\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.writeInt16 = function(value, offset) {\r\n        var relative = typeof offset === 'undefined';\n        if (relative) offset = this.offset;\n        if (!this.noAssert) {\r\n            if (typeof value !== 'number' || value % 1 !== 0)\n                throw TypeError(\"Illegal value: \"+value+\" (not an integer)\");\n            value |= 0;\n            if (typeof offset !== 'number' || offset % 1 !== 0)\n                throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n            offset >>>= 0;\n            if (offset < 0 || offset + 0 > this.buffer.byteLength)\n                throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n        }\r\n        offset += 2;\n        var capacity2 = this.buffer.byteLength;\n        if (offset > capacity2)\n            this.resize((capacity2 *= 2) > offset ? capacity2 : offset);\n        offset -= 2;\n        if (this.littleEndian) {\r\n            this.view[offset+1] = (value & 0xFF00) >>> 8;\r\n            this.view[offset  ] =  value & 0x00FF;\r\n        } else {\r\n            this.view[offset]   = (value & 0xFF00) >>> 8;\r\n            this.view[offset+1] =  value & 0x00FF;\r\n        }\r\n        if (relative) this.offset += 2;\n        return this;\r\n    };\r\n\r\n    /**\r\n     * Writes a 16bit signed integer. This is an alias of {@link ByteBuffer#writeInt16}.\r\n     * @function\r\n     * @param {number} value Value to write\r\n     * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `2` if omitted.\r\n     * @throws {TypeError} If `offset` or `value` is not a valid number\r\n     * @throws {RangeError} If `offset` is out of bounds\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.writeShort = ByteBufferPrototype.writeInt16;\r\n\r\n    /**\r\n     * Reads a 16bit signed integer.\r\n     * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `2` if omitted.\r\n     * @returns {number} Value read\r\n     * @throws {TypeError} If `offset` is not a valid number\r\n     * @throws {RangeError} If `offset` is out of bounds\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.readInt16 = function(offset) {\r\n        var relative = typeof offset === 'undefined';\n        if (relative) offset = this.offset;\n        if (!this.noAssert) {\r\n            if (typeof offset !== 'number' || offset % 1 !== 0)\n                throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n            offset >>>= 0;\n            if (offset < 0 || offset + 2 > this.buffer.byteLength)\n                throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+2+\") <= \"+this.buffer.byteLength);\n        }\r\n        var value = 0;\r\n        if (this.littleEndian) {\r\n            value  = this.view[offset  ];\r\n            value |= this.view[offset+1] << 8;\r\n        } else {\r\n            value  = this.view[offset  ] << 8;\r\n            value |= this.view[offset+1];\r\n        }\r\n        if ((value & 0x8000) === 0x8000) value = -(0xFFFF - value + 1); // Cast to signed\r\n        if (relative) this.offset += 2;\n        return value;\r\n    };\r\n\r\n    /**\r\n     * Reads a 16bit signed integer. This is an alias of {@link ByteBuffer#readInt16}.\r\n     * @function\r\n     * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `2` if omitted.\r\n     * @returns {number} Value read\r\n     * @throws {TypeError} If `offset` is not a valid number\r\n     * @throws {RangeError} If `offset` is out of bounds\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.readShort = ByteBufferPrototype.readInt16;\r\n\r\n    /**\r\n     * Writes a 16bit unsigned integer.\r\n     * @param {number} value Value to write\r\n     * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `2` if omitted.\r\n     * @throws {TypeError} If `offset` or `value` is not a valid number\r\n     * @throws {RangeError} If `offset` is out of bounds\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.writeUint16 = function(value, offset) {\r\n        var relative = typeof offset === 'undefined';\n        if (relative) offset = this.offset;\n        if (!this.noAssert) {\r\n            if (typeof value !== 'number' || value % 1 !== 0)\n                throw TypeError(\"Illegal value: \"+value+\" (not an integer)\");\n            value >>>= 0;\n            if (typeof offset !== 'number' || offset % 1 !== 0)\n                throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n            offset >>>= 0;\n            if (offset < 0 || offset + 0 > this.buffer.byteLength)\n                throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n        }\r\n        offset += 2;\n        var capacity3 = this.buffer.byteLength;\n        if (offset > capacity3)\n            this.resize((capacity3 *= 2) > offset ? capacity3 : offset);\n        offset -= 2;\n        if (this.littleEndian) {\r\n            this.view[offset+1] = (value & 0xFF00) >>> 8;\r\n            this.view[offset  ] =  value & 0x00FF;\r\n        } else {\r\n            this.view[offset]   = (value & 0xFF00) >>> 8;\r\n            this.view[offset+1] =  value & 0x00FF;\r\n        }\r\n        if (relative) this.offset += 2;\n        return this;\r\n    };\r\n\r\n    /**\r\n     * Writes a 16bit unsigned integer. This is an alias of {@link ByteBuffer#writeUint16}.\r\n     * @function\r\n     * @param {number} value Value to write\r\n     * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `2` if omitted.\r\n     * @throws {TypeError} If `offset` or `value` is not a valid number\r\n     * @throws {RangeError} If `offset` is out of bounds\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.writeUInt16 = ByteBufferPrototype.writeUint16;\r\n\r\n    /**\r\n     * Reads a 16bit unsigned integer.\r\n     * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `2` if omitted.\r\n     * @returns {number} Value read\r\n     * @throws {TypeError} If `offset` is not a valid number\r\n     * @throws {RangeError} If `offset` is out of bounds\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.readUint16 = function(offset) {\r\n        var relative = typeof offset === 'undefined';\n        if (relative) offset = this.offset;\n        if (!this.noAssert) {\r\n            if (typeof offset !== 'number' || offset % 1 !== 0)\n                throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n            offset >>>= 0;\n            if (offset < 0 || offset + 2 > this.buffer.byteLength)\n                throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+2+\") <= \"+this.buffer.byteLength);\n        }\r\n        var value = 0;\r\n        if (this.littleEndian) {\r\n            value  = this.view[offset  ];\r\n            value |= this.view[offset+1] << 8;\r\n        } else {\r\n            value  = this.view[offset  ] << 8;\r\n            value |= this.view[offset+1];\r\n        }\r\n        if (relative) this.offset += 2;\n        return value;\r\n    };\r\n\r\n    /**\r\n     * Reads a 16bit unsigned integer. This is an alias of {@link ByteBuffer#readUint16}.\r\n     * @function\r\n     * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `2` if omitted.\r\n     * @returns {number} Value read\r\n     * @throws {TypeError} If `offset` is not a valid number\r\n     * @throws {RangeError} If `offset` is out of bounds\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.readUInt16 = ByteBufferPrototype.readUint16;\r\n\r\n    // types/ints/int32\r\n\r\n    /**\r\n     * Writes a 32bit signed integer.\r\n     * @param {number} value Value to write\r\n     * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted.\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.writeInt32 = function(value, offset) {\r\n        var relative = typeof offset === 'undefined';\n        if (relative) offset = this.offset;\n        if (!this.noAssert) {\r\n            if (typeof value !== 'number' || value % 1 !== 0)\n                throw TypeError(\"Illegal value: \"+value+\" (not an integer)\");\n            value |= 0;\n            if (typeof offset !== 'number' || offset % 1 !== 0)\n                throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n            offset >>>= 0;\n            if (offset < 0 || offset + 0 > this.buffer.byteLength)\n                throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n        }\r\n        offset += 4;\n        var capacity4 = this.buffer.byteLength;\n        if (offset > capacity4)\n            this.resize((capacity4 *= 2) > offset ? capacity4 : offset);\n        offset -= 4;\n        if (this.littleEndian) {\n            this.view[offset+3] = (value >>> 24) & 0xFF;\n            this.view[offset+2] = (value >>> 16) & 0xFF;\n            this.view[offset+1] = (value >>>  8) & 0xFF;\n            this.view[offset  ] =  value         & 0xFF;\n        } else {\n            this.view[offset  ] = (value >>> 24) & 0xFF;\n            this.view[offset+1] = (value >>> 16) & 0xFF;\n            this.view[offset+2] = (value >>>  8) & 0xFF;\n            this.view[offset+3] =  value         & 0xFF;\n        }\n        if (relative) this.offset += 4;\n        return this;\r\n    };\r\n\r\n    /**\r\n     * Writes a 32bit signed integer. This is an alias of {@link ByteBuffer#writeInt32}.\r\n     * @param {number} value Value to write\r\n     * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted.\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.writeInt = ByteBufferPrototype.writeInt32;\r\n\r\n    /**\r\n     * Reads a 32bit signed integer.\r\n     * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `4` if omitted.\r\n     * @returns {number} Value read\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.readInt32 = function(offset) {\r\n        var relative = typeof offset === 'undefined';\n        if (relative) offset = this.offset;\n        if (!this.noAssert) {\r\n            if (typeof offset !== 'number' || offset % 1 !== 0)\n                throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n            offset >>>= 0;\n            if (offset < 0 || offset + 4 > this.buffer.byteLength)\n                throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+4+\") <= \"+this.buffer.byteLength);\n        }\r\n        var value = 0;\r\n        if (this.littleEndian) {\n            value  = this.view[offset+2] << 16;\n            value |= this.view[offset+1] <<  8;\n            value |= this.view[offset  ];\n            value += this.view[offset+3] << 24 >>> 0;\n        } else {\n            value  = this.view[offset+1] << 16;\n            value |= this.view[offset+2] <<  8;\n            value |= this.view[offset+3];\n            value += this.view[offset  ] << 24 >>> 0;\n        }\n        value |= 0; // Cast to signed\r\n        if (relative) this.offset += 4;\n        return value;\r\n    };\r\n\r\n    /**\r\n     * Reads a 32bit signed integer. This is an alias of {@link ByteBuffer#readInt32}.\r\n     * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `4` if omitted.\r\n     * @returns {number} Value read\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.readInt = ByteBufferPrototype.readInt32;\r\n\r\n    /**\r\n     * Writes a 32bit unsigned integer.\r\n     * @param {number} value Value to write\r\n     * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted.\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.writeUint32 = function(value, offset) {\r\n        var relative = typeof offset === 'undefined';\n        if (relative) offset = this.offset;\n        if (!this.noAssert) {\r\n            if (typeof value !== 'number' || value % 1 !== 0)\n                throw TypeError(\"Illegal value: \"+value+\" (not an integer)\");\n            value >>>= 0;\n            if (typeof offset !== 'number' || offset % 1 !== 0)\n                throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n            offset >>>= 0;\n            if (offset < 0 || offset + 0 > this.buffer.byteLength)\n                throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n        }\r\n        offset += 4;\n        var capacity5 = this.buffer.byteLength;\n        if (offset > capacity5)\n            this.resize((capacity5 *= 2) > offset ? capacity5 : offset);\n        offset -= 4;\n        if (this.littleEndian) {\n            this.view[offset+3] = (value >>> 24) & 0xFF;\n            this.view[offset+2] = (value >>> 16) & 0xFF;\n            this.view[offset+1] = (value >>>  8) & 0xFF;\n            this.view[offset  ] =  value         & 0xFF;\n        } else {\n            this.view[offset  ] = (value >>> 24) & 0xFF;\n            this.view[offset+1] = (value >>> 16) & 0xFF;\n            this.view[offset+2] = (value >>>  8) & 0xFF;\n            this.view[offset+3] =  value         & 0xFF;\n        }\n        if (relative) this.offset += 4;\n        return this;\r\n    };\r\n\r\n    /**\r\n     * Writes a 32bit unsigned integer. This is an alias of {@link ByteBuffer#writeUint32}.\r\n     * @function\r\n     * @param {number} value Value to write\r\n     * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted.\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.writeUInt32 = ByteBufferPrototype.writeUint32;\r\n\r\n    /**\r\n     * Reads a 32bit unsigned integer.\r\n     * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `4` if omitted.\r\n     * @returns {number} Value read\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.readUint32 = function(offset) {\r\n        var relative = typeof offset === 'undefined';\n        if (relative) offset = this.offset;\n        if (!this.noAssert) {\r\n            if (typeof offset !== 'number' || offset % 1 !== 0)\n                throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n            offset >>>= 0;\n            if (offset < 0 || offset + 4 > this.buffer.byteLength)\n                throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+4+\") <= \"+this.buffer.byteLength);\n        }\r\n        var value = 0;\r\n        if (this.littleEndian) {\n            value  = this.view[offset+2] << 16;\n            value |= this.view[offset+1] <<  8;\n            value |= this.view[offset  ];\n            value += this.view[offset+3] << 24 >>> 0;\n        } else {\n            value  = this.view[offset+1] << 16;\n            value |= this.view[offset+2] <<  8;\n            value |= this.view[offset+3];\n            value += this.view[offset  ] << 24 >>> 0;\n        }\n        if (relative) this.offset += 4;\n        return value;\r\n    };\r\n\r\n    /**\r\n     * Reads a 32bit unsigned integer. This is an alias of {@link ByteBuffer#readUint32}.\r\n     * @function\r\n     * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `4` if omitted.\r\n     * @returns {number} Value read\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.readUInt32 = ByteBufferPrototype.readUint32;\r\n\r\n    // types/ints/int64\r\n\r\n    if (Long) {\r\n\r\n        /**\r\n         * Writes a 64bit signed integer.\r\n         * @param {number|!Long} value Value to write\r\n         * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted.\r\n         * @returns {!ByteBuffer} this\r\n         * @expose\r\n         */\r\n        ByteBufferPrototype.writeInt64 = function(value, offset) {\r\n            var relative = typeof offset === 'undefined';\n            if (relative) offset = this.offset;\n            if (!this.noAssert) {\r\n                if (typeof value === 'number')\n                    value = Long.fromNumber(value);\n                else if (typeof value === 'string')\n                    value = Long.fromString(value);\n                else if (!(value && value instanceof Long))\n                    throw TypeError(\"Illegal value: \"+value+\" (not an integer or Long)\");\n                if (typeof offset !== 'number' || offset % 1 !== 0)\n                    throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n                offset >>>= 0;\n                if (offset < 0 || offset + 0 > this.buffer.byteLength)\n                    throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n            }\r\n            if (typeof value === 'number')\n                value = Long.fromNumber(value);\n            else if (typeof value === 'string')\n                value = Long.fromString(value);\n            offset += 8;\n            var capacity6 = this.buffer.byteLength;\n            if (offset > capacity6)\n                this.resize((capacity6 *= 2) > offset ? capacity6 : offset);\n            offset -= 8;\n            var lo = value.low,\r\n                hi = value.high;\r\n            if (this.littleEndian) {\r\n                this.view[offset+3] = (lo >>> 24) & 0xFF;\n                this.view[offset+2] = (lo >>> 16) & 0xFF;\n                this.view[offset+1] = (lo >>>  8) & 0xFF;\n                this.view[offset  ] =  lo         & 0xFF;\n                offset += 4;\r\n                this.view[offset+3] = (hi >>> 24) & 0xFF;\n                this.view[offset+2] = (hi >>> 16) & 0xFF;\n                this.view[offset+1] = (hi >>>  8) & 0xFF;\n                this.view[offset  ] =  hi         & 0xFF;\n            } else {\r\n                this.view[offset  ] = (hi >>> 24) & 0xFF;\n                this.view[offset+1] = (hi >>> 16) & 0xFF;\n                this.view[offset+2] = (hi >>>  8) & 0xFF;\n                this.view[offset+3] =  hi         & 0xFF;\n                offset += 4;\r\n                this.view[offset  ] = (lo >>> 24) & 0xFF;\n                this.view[offset+1] = (lo >>> 16) & 0xFF;\n                this.view[offset+2] = (lo >>>  8) & 0xFF;\n                this.view[offset+3] =  lo         & 0xFF;\n            }\r\n            if (relative) this.offset += 8;\n            return this;\r\n        };\r\n\r\n        /**\r\n         * Writes a 64bit signed integer. This is an alias of {@link ByteBuffer#writeInt64}.\r\n         * @param {number|!Long} value Value to write\r\n         * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted.\r\n         * @returns {!ByteBuffer} this\r\n         * @expose\r\n         */\r\n        ByteBufferPrototype.writeLong = ByteBufferPrototype.writeInt64;\r\n\r\n        /**\r\n         * Reads a 64bit signed integer.\r\n         * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted.\r\n         * @returns {!Long}\r\n         * @expose\r\n         */\r\n        ByteBufferPrototype.readInt64 = function(offset) {\r\n            var relative = typeof offset === 'undefined';\n            if (relative) offset = this.offset;\n            if (!this.noAssert) {\r\n                if (typeof offset !== 'number' || offset % 1 !== 0)\n                    throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n                offset >>>= 0;\n                if (offset < 0 || offset + 8 > this.buffer.byteLength)\n                    throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+8+\") <= \"+this.buffer.byteLength);\n            }\r\n            var lo = 0,\r\n                hi = 0;\r\n            if (this.littleEndian) {\r\n                lo  = this.view[offset+2] << 16;\n                lo |= this.view[offset+1] <<  8;\n                lo |= this.view[offset  ];\n                lo += this.view[offset+3] << 24 >>> 0;\n                offset += 4;\r\n                hi  = this.view[offset+2] << 16;\n                hi |= this.view[offset+1] <<  8;\n                hi |= this.view[offset  ];\n                hi += this.view[offset+3] << 24 >>> 0;\n            } else {\r\n                hi  = this.view[offset+1] << 16;\n                hi |= this.view[offset+2] <<  8;\n                hi |= this.view[offset+3];\n                hi += this.view[offset  ] << 24 >>> 0;\n                offset += 4;\r\n                lo  = this.view[offset+1] << 16;\n                lo |= this.view[offset+2] <<  8;\n                lo |= this.view[offset+3];\n                lo += this.view[offset  ] << 24 >>> 0;\n            }\r\n            var value = new Long(lo, hi, false);\r\n            if (relative) this.offset += 8;\n            return value;\r\n        };\r\n\r\n        /**\r\n         * Reads a 64bit signed integer. This is an alias of {@link ByteBuffer#readInt64}.\r\n         * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted.\r\n         * @returns {!Long}\r\n         * @expose\r\n         */\r\n        ByteBufferPrototype.readLong = ByteBufferPrototype.readInt64;\r\n\r\n        /**\r\n         * Writes a 64bit unsigned integer.\r\n         * @param {number|!Long} value Value to write\r\n         * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted.\r\n         * @returns {!ByteBuffer} this\r\n         * @expose\r\n         */\r\n        ByteBufferPrototype.writeUint64 = function(value, offset) {\r\n            var relative = typeof offset === 'undefined';\n            if (relative) offset = this.offset;\n            if (!this.noAssert) {\r\n                if (typeof value === 'number')\n                    value = Long.fromNumber(value);\n                else if (typeof value === 'string')\n                    value = Long.fromString(value);\n                else if (!(value && value instanceof Long))\n                    throw TypeError(\"Illegal value: \"+value+\" (not an integer or Long)\");\n                if (typeof offset !== 'number' || offset % 1 !== 0)\n                    throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n                offset >>>= 0;\n                if (offset < 0 || offset + 0 > this.buffer.byteLength)\n                    throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n            }\r\n            if (typeof value === 'number')\n                value = Long.fromNumber(value);\n            else if (typeof value === 'string')\n                value = Long.fromString(value);\n            offset += 8;\n            var capacity7 = this.buffer.byteLength;\n            if (offset > capacity7)\n                this.resize((capacity7 *= 2) > offset ? capacity7 : offset);\n            offset -= 8;\n            var lo = value.low,\r\n                hi = value.high;\r\n            if (this.littleEndian) {\r\n                this.view[offset+3] = (lo >>> 24) & 0xFF;\n                this.view[offset+2] = (lo >>> 16) & 0xFF;\n                this.view[offset+1] = (lo >>>  8) & 0xFF;\n                this.view[offset  ] =  lo         & 0xFF;\n                offset += 4;\r\n                this.view[offset+3] = (hi >>> 24) & 0xFF;\n                this.view[offset+2] = (hi >>> 16) & 0xFF;\n                this.view[offset+1] = (hi >>>  8) & 0xFF;\n                this.view[offset  ] =  hi         & 0xFF;\n            } else {\r\n                this.view[offset  ] = (hi >>> 24) & 0xFF;\n                this.view[offset+1] = (hi >>> 16) & 0xFF;\n                this.view[offset+2] = (hi >>>  8) & 0xFF;\n                this.view[offset+3] =  hi         & 0xFF;\n                offset += 4;\r\n                this.view[offset  ] = (lo >>> 24) & 0xFF;\n                this.view[offset+1] = (lo >>> 16) & 0xFF;\n                this.view[offset+2] = (lo >>>  8) & 0xFF;\n                this.view[offset+3] =  lo         & 0xFF;\n            }\r\n            if (relative) this.offset += 8;\n            return this;\r\n        };\r\n\r\n        /**\r\n         * Writes a 64bit unsigned integer. This is an alias of {@link ByteBuffer#writeUint64}.\r\n         * @function\r\n         * @param {number|!Long} value Value to write\r\n         * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted.\r\n         * @returns {!ByteBuffer} this\r\n         * @expose\r\n         */\r\n        ByteBufferPrototype.writeUInt64 = ByteBufferPrototype.writeUint64;\r\n\r\n        /**\r\n         * Reads a 64bit unsigned integer.\r\n         * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted.\r\n         * @returns {!Long}\r\n         * @expose\r\n         */\r\n        ByteBufferPrototype.readUint64 = function(offset) {\r\n            var relative = typeof offset === 'undefined';\n            if (relative) offset = this.offset;\n            if (!this.noAssert) {\r\n                if (typeof offset !== 'number' || offset % 1 !== 0)\n                    throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n                offset >>>= 0;\n                if (offset < 0 || offset + 8 > this.buffer.byteLength)\n                    throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+8+\") <= \"+this.buffer.byteLength);\n            }\r\n            var lo = 0,\r\n                hi = 0;\r\n            if (this.littleEndian) {\r\n                lo  = this.view[offset+2] << 16;\n                lo |= this.view[offset+1] <<  8;\n                lo |= this.view[offset  ];\n                lo += this.view[offset+3] << 24 >>> 0;\n                offset += 4;\r\n                hi  = this.view[offset+2] << 16;\n                hi |= this.view[offset+1] <<  8;\n                hi |= this.view[offset  ];\n                hi += this.view[offset+3] << 24 >>> 0;\n            } else {\r\n                hi  = this.view[offset+1] << 16;\n                hi |= this.view[offset+2] <<  8;\n                hi |= this.view[offset+3];\n                hi += this.view[offset  ] << 24 >>> 0;\n                offset += 4;\r\n                lo  = this.view[offset+1] << 16;\n                lo |= this.view[offset+2] <<  8;\n                lo |= this.view[offset+3];\n                lo += this.view[offset  ] << 24 >>> 0;\n            }\r\n            var value = new Long(lo, hi, true);\r\n            if (relative) this.offset += 8;\n            return value;\r\n        };\r\n\r\n        /**\r\n         * Reads a 64bit unsigned integer. This is an alias of {@link ByteBuffer#readUint64}.\r\n         * @function\r\n         * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted.\r\n         * @returns {!Long}\r\n         * @expose\r\n         */\r\n        ByteBufferPrototype.readUInt64 = ByteBufferPrototype.readUint64;\r\n\r\n    } // Long\r\n\r\n\r\n    // types/floats/float32\r\n\r\n    /*\r\n     ieee754 - https://github.com/feross/ieee754\r\n\r\n     The MIT License (MIT)\r\n\r\n     Copyright (c) Feross Aboukhadijeh\r\n\r\n     Permission is hereby granted, free of charge, to any person obtaining a copy\r\n     of this software and associated documentation files (the \"Software\"), to deal\r\n     in the Software without restriction, including without limitation the rights\r\n     to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n     copies of the Software, and to permit persons to whom the Software is\r\n     furnished to do so, subject to the following conditions:\r\n\r\n     The above copyright notice and this permission notice shall be included in\r\n     all copies or substantial portions of the Software.\r\n\r\n     THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n     IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n     FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n     AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n     LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n     OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n     THE SOFTWARE.\r\n    */\r\n\r\n    /**\r\n     * Reads an IEEE754 float from a byte array.\r\n     * @param {!Array} buffer\r\n     * @param {number} offset\r\n     * @param {boolean} isLE\r\n     * @param {number} mLen\r\n     * @param {number} nBytes\r\n     * @returns {number}\r\n     * @inner\r\n     */\r\n    function ieee754_read(buffer, offset, isLE, mLen, nBytes) {\r\n        var e, m,\r\n            eLen = nBytes * 8 - mLen - 1,\r\n            eMax = (1 << eLen) - 1,\r\n            eBias = eMax >> 1,\r\n            nBits = -7,\r\n            i = isLE ? (nBytes - 1) : 0,\r\n            d = isLE ? -1 : 1,\r\n            s = buffer[offset + i];\r\n\r\n        i += d;\r\n\r\n        e = s & ((1 << (-nBits)) - 1);\r\n        s >>= (-nBits);\r\n        nBits += eLen;\r\n        for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}\r\n\r\n        m = e & ((1 << (-nBits)) - 1);\r\n        e >>= (-nBits);\r\n        nBits += mLen;\r\n        for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}\r\n\r\n        if (e === 0) {\r\n            e = 1 - eBias;\r\n        } else if (e === eMax) {\r\n            return m ? NaN : ((s ? -1 : 1) * Infinity);\r\n        } else {\r\n            m = m + Math.pow(2, mLen);\r\n            e = e - eBias;\r\n        }\r\n        return (s ? -1 : 1) * m * Math.pow(2, e - mLen);\r\n    }\r\n\r\n    /**\r\n     * Writes an IEEE754 float to a byte array.\r\n     * @param {!Array} buffer\r\n     * @param {number} value\r\n     * @param {number} offset\r\n     * @param {boolean} isLE\r\n     * @param {number} mLen\r\n     * @param {number} nBytes\r\n     * @inner\r\n     */\r\n    function ieee754_write(buffer, value, offset, isLE, mLen, nBytes) {\r\n        var e, m, c,\r\n            eLen = nBytes * 8 - mLen - 1,\r\n            eMax = (1 << eLen) - 1,\r\n            eBias = eMax >> 1,\r\n            rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0),\r\n            i = isLE ? 0 : (nBytes - 1),\r\n            d = isLE ? 1 : -1,\r\n            s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0;\r\n\r\n        value = Math.abs(value);\r\n\r\n        if (isNaN(value) || value === Infinity) {\r\n            m = isNaN(value) ? 1 : 0;\r\n            e = eMax;\r\n        } else {\r\n            e = Math.floor(Math.log(value) / Math.LN2);\r\n            if (value * (c = Math.pow(2, -e)) < 1) {\r\n                e--;\r\n                c *= 2;\r\n            }\r\n            if (e + eBias >= 1) {\r\n                value += rt / c;\r\n            } else {\r\n                value += rt * Math.pow(2, 1 - eBias);\r\n            }\r\n            if (value * c >= 2) {\r\n                e++;\r\n                c /= 2;\r\n            }\r\n\r\n            if (e + eBias >= eMax) {\r\n                m = 0;\r\n                e = eMax;\r\n            } else if (e + eBias >= 1) {\r\n                m = (value * c - 1) * Math.pow(2, mLen);\r\n                e = e + eBias;\r\n            } else {\r\n                m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);\r\n                e = 0;\r\n            }\r\n        }\r\n\r\n        for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\r\n\r\n        e = (e << mLen) | m;\r\n        eLen += mLen;\r\n        for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\r\n\r\n        buffer[offset + i - d] |= s * 128;\r\n    }\r\n\r\n    /**\r\n     * Writes a 32bit float.\r\n     * @param {number} value Value to write\r\n     * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted.\r\n     * @returns {!ByteBuffer} this\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.writeFloat32 = function(value, offset) {\r\n        var relative = typeof offset === 'undefined';\n        if (relative) offset = this.offset;\n        if (!this.noAssert) {\r\n            if (typeof value !== 'number')\r\n                throw TypeError(\"Illegal value: \"+value+\" (not a number)\");\r\n            if (typeof offset !== 'number' || offset % 1 !== 0)\n                throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n            offset >>>= 0;\n            if (offset < 0 || offset + 0 > this.buffer.byteLength)\n                throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n        }\r\n        offset += 4;\n        var capacity8 = this.buffer.byteLength;\n        if (offset > capacity8)\n            this.resize((capacity8 *= 2) > offset ? capacity8 : offset);\n        offset -= 4;\n        ieee754_write(this.view, value, offset, this.littleEndian, 23, 4);\r\n        if (relative) this.offset += 4;\n        return this;\r\n    };\r\n\r\n    /**\r\n     * Writes a 32bit float. This is an alias of {@link ByteBuffer#writeFloat32}.\r\n     * @function\r\n     * @param {number} value Value to write\r\n     * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted.\r\n     * @returns {!ByteBuffer} this\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.writeFloat = ByteBufferPrototype.writeFloat32;\r\n\r\n    /**\r\n     * Reads a 32bit float.\r\n     * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `4` if omitted.\r\n     * @returns {number}\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.readFloat32 = function(offset) {\r\n        var relative = typeof offset === 'undefined';\n        if (relative) offset = this.offset;\n        if (!this.noAssert) {\r\n            if (typeof offset !== 'number' || offset % 1 !== 0)\n                throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n            offset >>>= 0;\n            if (offset < 0 || offset + 4 > this.buffer.byteLength)\n                throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+4+\") <= \"+this.buffer.byteLength);\n        }\r\n        var value = ieee754_read(this.view, offset, this.littleEndian, 23, 4);\r\n        if (relative) this.offset += 4;\n        return value;\r\n    };\r\n\r\n    /**\r\n     * Reads a 32bit float. This is an alias of {@link ByteBuffer#readFloat32}.\r\n     * @function\r\n     * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `4` if omitted.\r\n     * @returns {number}\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.readFloat = ByteBufferPrototype.readFloat32;\r\n\r\n    // types/floats/float64\r\n\r\n    /**\r\n     * Writes a 64bit float.\r\n     * @param {number} value Value to write\r\n     * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted.\r\n     * @returns {!ByteBuffer} this\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.writeFloat64 = function(value, offset) {\r\n        var relative = typeof offset === 'undefined';\n        if (relative) offset = this.offset;\n        if (!this.noAssert) {\r\n            if (typeof value !== 'number')\r\n                throw TypeError(\"Illegal value: \"+value+\" (not a number)\");\r\n            if (typeof offset !== 'number' || offset % 1 !== 0)\n                throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n            offset >>>= 0;\n            if (offset < 0 || offset + 0 > this.buffer.byteLength)\n                throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n        }\r\n        offset += 8;\n        var capacity9 = this.buffer.byteLength;\n        if (offset > capacity9)\n            this.resize((capacity9 *= 2) > offset ? capacity9 : offset);\n        offset -= 8;\n        ieee754_write(this.view, value, offset, this.littleEndian, 52, 8);\r\n        if (relative) this.offset += 8;\n        return this;\r\n    };\r\n\r\n    /**\r\n     * Writes a 64bit float. This is an alias of {@link ByteBuffer#writeFloat64}.\r\n     * @function\r\n     * @param {number} value Value to write\r\n     * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted.\r\n     * @returns {!ByteBuffer} this\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.writeDouble = ByteBufferPrototype.writeFloat64;\r\n\r\n    /**\r\n     * Reads a 64bit float.\r\n     * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted.\r\n     * @returns {number}\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.readFloat64 = function(offset) {\r\n        var relative = typeof offset === 'undefined';\n        if (relative) offset = this.offset;\n        if (!this.noAssert) {\r\n            if (typeof offset !== 'number' || offset % 1 !== 0)\n                throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n            offset >>>= 0;\n            if (offset < 0 || offset + 8 > this.buffer.byteLength)\n                throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+8+\") <= \"+this.buffer.byteLength);\n        }\r\n        var value = ieee754_read(this.view, offset, this.littleEndian, 52, 8);\r\n        if (relative) this.offset += 8;\n        return value;\r\n    };\r\n\r\n    /**\r\n     * Reads a 64bit float. This is an alias of {@link ByteBuffer#readFloat64}.\r\n     * @function\r\n     * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted.\r\n     * @returns {number}\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.readDouble = ByteBufferPrototype.readFloat64;\r\n\r\n\r\n    // types/varints/varint32\r\n\r\n    /**\r\n     * Maximum number of bytes required to store a 32bit base 128 variable-length integer.\r\n     * @type {number}\r\n     * @const\r\n     * @expose\r\n     */\r\n    ByteBuffer.MAX_VARINT32_BYTES = 5;\r\n\r\n    /**\r\n     * Calculates the actual number of bytes required to store a 32bit base 128 variable-length integer.\r\n     * @param {number} value Value to encode\r\n     * @returns {number} Number of bytes required. Capped to {@link ByteBuffer.MAX_VARINT32_BYTES}\r\n     * @expose\r\n     */\r\n    ByteBuffer.calculateVarint32 = function(value) {\r\n        // ref: src/google/protobuf/io/coded_stream.cc\r\n        value = value >>> 0;\r\n             if (value < 1 << 7 ) return 1;\r\n        else if (value < 1 << 14) return 2;\r\n        else if (value < 1 << 21) return 3;\r\n        else if (value < 1 << 28) return 4;\r\n        else                      return 5;\r\n    };\r\n\r\n    /**\r\n     * Zigzag encodes a signed 32bit integer so that it can be effectively used with varint encoding.\r\n     * @param {number} n Signed 32bit integer\r\n     * @returns {number} Unsigned zigzag encoded 32bit integer\r\n     * @expose\r\n     */\r\n    ByteBuffer.zigZagEncode32 = function(n) {\r\n        return (((n |= 0) << 1) ^ (n >> 31)) >>> 0; // ref: src/google/protobuf/wire_format_lite.h\r\n    };\r\n\r\n    /**\r\n     * Decodes a zigzag encoded signed 32bit integer.\r\n     * @param {number} n Unsigned zigzag encoded 32bit integer\r\n     * @returns {number} Signed 32bit integer\r\n     * @expose\r\n     */\r\n    ByteBuffer.zigZagDecode32 = function(n) {\r\n        return ((n >>> 1) ^ -(n & 1)) | 0; // // ref: src/google/protobuf/wire_format_lite.h\r\n    };\r\n\r\n    /**\r\n     * Writes a 32bit base 128 variable-length integer.\r\n     * @param {number} value Value to write\r\n     * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes\r\n     *  written if omitted.\r\n     * @returns {!ByteBuffer|number} this if `offset` is omitted, else the actual number of bytes written\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.writeVarint32 = function(value, offset) {\r\n        var relative = typeof offset === 'undefined';\n        if (relative) offset = this.offset;\n        if (!this.noAssert) {\r\n            if (typeof value !== 'number' || value % 1 !== 0)\n                throw TypeError(\"Illegal value: \"+value+\" (not an integer)\");\n            value |= 0;\n            if (typeof offset !== 'number' || offset % 1 !== 0)\n                throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n            offset >>>= 0;\n            if (offset < 0 || offset + 0 > this.buffer.byteLength)\n                throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n        }\r\n        var size = ByteBuffer.calculateVarint32(value),\r\n            b;\r\n        offset += size;\n        var capacity10 = this.buffer.byteLength;\n        if (offset > capacity10)\n            this.resize((capacity10 *= 2) > offset ? capacity10 : offset);\n        offset -= size;\n        value >>>= 0;\r\n        while (value >= 0x80) {\r\n            b = (value & 0x7f) | 0x80;\r\n            this.view[offset++] = b;\r\n            value >>>= 7;\r\n        }\r\n        this.view[offset++] = value;\r\n        if (relative) {\r\n            this.offset = offset;\r\n            return this;\r\n        }\r\n        return size;\r\n    };\r\n\r\n    /**\r\n     * Writes a zig-zag encoded (signed) 32bit base 128 variable-length integer.\r\n     * @param {number} value Value to write\r\n     * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes\r\n     *  written if omitted.\r\n     * @returns {!ByteBuffer|number} this if `offset` is omitted, else the actual number of bytes written\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.writeVarint32ZigZag = function(value, offset) {\r\n        return this.writeVarint32(ByteBuffer.zigZagEncode32(value), offset);\r\n    };\r\n\r\n    /**\r\n     * Reads a 32bit base 128 variable-length integer.\r\n     * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes\r\n     *  written if omitted.\r\n     * @returns {number|!{value: number, length: number}} The value read if offset is omitted, else the value read\r\n     *  and the actual number of bytes read.\r\n     * @throws {Error} If it's not a valid varint. Has a property `truncated = true` if there is not enough data available\r\n     *  to fully decode the varint.\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.readVarint32 = function(offset) {\r\n        var relative = typeof offset === 'undefined';\n        if (relative) offset = this.offset;\n        if (!this.noAssert) {\r\n            if (typeof offset !== 'number' || offset % 1 !== 0)\n                throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n            offset >>>= 0;\n            if (offset < 0 || offset + 1 > this.buffer.byteLength)\n                throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+1+\") <= \"+this.buffer.byteLength);\n        }\r\n        var c = 0,\r\n            value = 0 >>> 0,\r\n            b;\r\n        do {\r\n            if (!this.noAssert && offset > this.limit) {\r\n                var err = Error(\"Truncated\");\r\n                err['truncated'] = true;\r\n                throw err;\r\n            }\r\n            b = this.view[offset++];\r\n            if (c < 5)\r\n                value |= (b & 0x7f) << (7*c);\r\n            ++c;\r\n        } while ((b & 0x80) !== 0);\r\n        value |= 0;\r\n        if (relative) {\r\n            this.offset = offset;\r\n            return value;\r\n        }\r\n        return {\r\n            \"value\": value,\r\n            \"length\": c\r\n        };\r\n    };\r\n\r\n    /**\r\n     * Reads a zig-zag encoded (signed) 32bit base 128 variable-length integer.\r\n     * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes\r\n     *  written if omitted.\r\n     * @returns {number|!{value: number, length: number}} The value read if offset is omitted, else the value read\r\n     *  and the actual number of bytes read.\r\n     * @throws {Error} If it's not a valid varint\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.readVarint32ZigZag = function(offset) {\r\n        var val = this.readVarint32(offset);\r\n        if (typeof val === 'object')\r\n            val[\"value\"] = ByteBuffer.zigZagDecode32(val[\"value\"]);\r\n        else\r\n            val = ByteBuffer.zigZagDecode32(val);\r\n        return val;\r\n    };\r\n\r\n    // types/varints/varint64\r\n\r\n    if (Long) {\r\n\r\n        /**\r\n         * Maximum number of bytes required to store a 64bit base 128 variable-length integer.\r\n         * @type {number}\r\n         * @const\r\n         * @expose\r\n         */\r\n        ByteBuffer.MAX_VARINT64_BYTES = 10;\r\n\r\n        /**\r\n         * Calculates the actual number of bytes required to store a 64bit base 128 variable-length integer.\r\n         * @param {number|!Long} value Value to encode\r\n         * @returns {number} Number of bytes required. Capped to {@link ByteBuffer.MAX_VARINT64_BYTES}\r\n         * @expose\r\n         */\r\n        ByteBuffer.calculateVarint64 = function(value) {\r\n            if (typeof value === 'number')\n                value = Long.fromNumber(value);\n            else if (typeof value === 'string')\n                value = Long.fromString(value);\n            // ref: src/google/protobuf/io/coded_stream.cc\r\n            var part0 = value.toInt() >>> 0,\r\n                part1 = value.shiftRightUnsigned(28).toInt() >>> 0,\r\n                part2 = value.shiftRightUnsigned(56).toInt() >>> 0;\r\n            if (part2 == 0) {\r\n                if (part1 == 0) {\r\n                    if (part0 < 1 << 14)\r\n                        return part0 < 1 << 7 ? 1 : 2;\r\n                    else\r\n                        return part0 < 1 << 21 ? 3 : 4;\r\n                } else {\r\n                    if (part1 < 1 << 14)\r\n                        return part1 < 1 << 7 ? 5 : 6;\r\n                    else\r\n                        return part1 < 1 << 21 ? 7 : 8;\r\n                }\r\n            } else\r\n                return part2 < 1 << 7 ? 9 : 10;\r\n        };\r\n\r\n        /**\r\n         * Zigzag encodes a signed 64bit integer so that it can be effectively used with varint encoding.\r\n         * @param {number|!Long} value Signed long\r\n         * @returns {!Long} Unsigned zigzag encoded long\r\n         * @expose\r\n         */\r\n        ByteBuffer.zigZagEncode64 = function(value) {\r\n            if (typeof value === 'number')\n                value = Long.fromNumber(value, false);\n            else if (typeof value === 'string')\n                value = Long.fromString(value, false);\n            else if (value.unsigned !== false) value = value.toSigned();\n            // ref: src/google/protobuf/wire_format_lite.h\r\n            return value.shiftLeft(1).xor(value.shiftRight(63)).toUnsigned();\r\n        };\r\n\r\n        /**\r\n         * Decodes a zigzag encoded signed 64bit integer.\r\n         * @param {!Long|number} value Unsigned zigzag encoded long or JavaScript number\r\n         * @returns {!Long} Signed long\r\n         * @expose\r\n         */\r\n        ByteBuffer.zigZagDecode64 = function(value) {\r\n            if (typeof value === 'number')\n                value = Long.fromNumber(value, false);\n            else if (typeof value === 'string')\n                value = Long.fromString(value, false);\n            else if (value.unsigned !== false) value = value.toSigned();\n            // ref: src/google/protobuf/wire_format_lite.h\r\n            return value.shiftRightUnsigned(1).xor(value.and(Long.ONE).toSigned().negate()).toSigned();\r\n        };\r\n\r\n        /**\r\n         * Writes a 64bit base 128 variable-length integer.\r\n         * @param {number|Long} value Value to write\r\n         * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes\r\n         *  written if omitted.\r\n         * @returns {!ByteBuffer|number} `this` if offset is omitted, else the actual number of bytes written.\r\n         * @expose\r\n         */\r\n        ByteBufferPrototype.writeVarint64 = function(value, offset) {\r\n            var relative = typeof offset === 'undefined';\n            if (relative) offset = this.offset;\n            if (!this.noAssert) {\r\n                if (typeof value === 'number')\n                    value = Long.fromNumber(value);\n                else if (typeof value === 'string')\n                    value = Long.fromString(value);\n                else if (!(value && value instanceof Long))\n                    throw TypeError(\"Illegal value: \"+value+\" (not an integer or Long)\");\n                if (typeof offset !== 'number' || offset % 1 !== 0)\n                    throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n                offset >>>= 0;\n                if (offset < 0 || offset + 0 > this.buffer.byteLength)\n                    throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n            }\r\n            if (typeof value === 'number')\n                value = Long.fromNumber(value, false);\n            else if (typeof value === 'string')\n                value = Long.fromString(value, false);\n            else if (value.unsigned !== false) value = value.toSigned();\n            var size = ByteBuffer.calculateVarint64(value),\r\n                part0 = value.toInt() >>> 0,\r\n                part1 = value.shiftRightUnsigned(28).toInt() >>> 0,\r\n                part2 = value.shiftRightUnsigned(56).toInt() >>> 0;\r\n            offset += size;\n            var capacity11 = this.buffer.byteLength;\n            if (offset > capacity11)\n                this.resize((capacity11 *= 2) > offset ? capacity11 : offset);\n            offset -= size;\n            switch (size) {\r\n                case 10: this.view[offset+9] = (part2 >>>  7) & 0x01;\r\n                case 9 : this.view[offset+8] = size !== 9 ? (part2       ) | 0x80 : (part2       ) & 0x7F;\r\n                case 8 : this.view[offset+7] = size !== 8 ? (part1 >>> 21) | 0x80 : (part1 >>> 21) & 0x7F;\r\n                case 7 : this.view[offset+6] = size !== 7 ? (part1 >>> 14) | 0x80 : (part1 >>> 14) & 0x7F;\r\n                case 6 : this.view[offset+5] = size !== 6 ? (part1 >>>  7) | 0x80 : (part1 >>>  7) & 0x7F;\r\n                case 5 : this.view[offset+4] = size !== 5 ? (part1       ) | 0x80 : (part1       ) & 0x7F;\r\n                case 4 : this.view[offset+3] = size !== 4 ? (part0 >>> 21) | 0x80 : (part0 >>> 21) & 0x7F;\r\n                case 3 : this.view[offset+2] = size !== 3 ? (part0 >>> 14) | 0x80 : (part0 >>> 14) & 0x7F;\r\n                case 2 : this.view[offset+1] = size !== 2 ? (part0 >>>  7) | 0x80 : (part0 >>>  7) & 0x7F;\r\n                case 1 : this.view[offset  ] = size !== 1 ? (part0       ) | 0x80 : (part0       ) & 0x7F;\r\n            }\r\n            if (relative) {\r\n                this.offset += size;\r\n                return this;\r\n            } else {\r\n                return size;\r\n            }\r\n        };\r\n\r\n        /**\r\n         * Writes a zig-zag encoded 64bit base 128 variable-length integer.\r\n         * @param {number|Long} value Value to write\r\n         * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes\r\n         *  written if omitted.\r\n         * @returns {!ByteBuffer|number} `this` if offset is omitted, else the actual number of bytes written.\r\n         * @expose\r\n         */\r\n        ByteBufferPrototype.writeVarint64ZigZag = function(value, offset) {\r\n            return this.writeVarint64(ByteBuffer.zigZagEncode64(value), offset);\r\n        };\r\n\r\n        /**\r\n         * Reads a 64bit base 128 variable-length integer. Requires Long.js.\r\n         * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes\r\n         *  read if omitted.\r\n         * @returns {!Long|!{value: Long, length: number}} The value read if offset is omitted, else the value read and\r\n         *  the actual number of bytes read.\r\n         * @throws {Error} If it's not a valid varint\r\n         * @expose\r\n         */\r\n        ByteBufferPrototype.readVarint64 = function(offset) {\r\n            var relative = typeof offset === 'undefined';\n            if (relative) offset = this.offset;\n            if (!this.noAssert) {\r\n                if (typeof offset !== 'number' || offset % 1 !== 0)\n                    throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n                offset >>>= 0;\n                if (offset < 0 || offset + 1 > this.buffer.byteLength)\n                    throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+1+\") <= \"+this.buffer.byteLength);\n            }\r\n            // ref: src/google/protobuf/io/coded_stream.cc\r\n            var start = offset,\r\n                part0 = 0,\r\n                part1 = 0,\r\n                part2 = 0,\r\n                b  = 0;\r\n            b = this.view[offset++]; part0  = (b & 0x7F)      ; if ( b & 0x80                                                   ) {\r\n            b = this.view[offset++]; part0 |= (b & 0x7F) <<  7; if ((b & 0x80) || (this.noAssert && typeof b === 'undefined')) {\r\n            b = this.view[offset++]; part0 |= (b & 0x7F) << 14; if ((b & 0x80) || (this.noAssert && typeof b === 'undefined')) {\r\n            b = this.view[offset++]; part0 |= (b & 0x7F) << 21; if ((b & 0x80) || (this.noAssert && typeof b === 'undefined')) {\r\n            b = this.view[offset++]; part1  = (b & 0x7F)      ; if ((b & 0x80) || (this.noAssert && typeof b === 'undefined')) {\r\n            b = this.view[offset++]; part1 |= (b & 0x7F) <<  7; if ((b & 0x80) || (this.noAssert && typeof b === 'undefined')) {\r\n            b = this.view[offset++]; part1 |= (b & 0x7F) << 14; if ((b & 0x80) || (this.noAssert && typeof b === 'undefined')) {\r\n            b = this.view[offset++]; part1 |= (b & 0x7F) << 21; if ((b & 0x80) || (this.noAssert && typeof b === 'undefined')) {\r\n            b = this.view[offset++]; part2  = (b & 0x7F)      ; if ((b & 0x80) || (this.noAssert && typeof b === 'undefined')) {\r\n            b = this.view[offset++]; part2 |= (b & 0x7F) <<  7; if ((b & 0x80) || (this.noAssert && typeof b === 'undefined')) {\r\n            throw Error(\"Buffer overrun\"); }}}}}}}}}}\r\n            var value = Long.fromBits(part0 | (part1 << 28), (part1 >>> 4) | (part2) << 24, false);\r\n            if (relative) {\r\n                this.offset = offset;\r\n                return value;\r\n            } else {\r\n                return {\r\n                    'value': value,\r\n                    'length': offset-start\r\n                };\r\n            }\r\n        };\r\n\r\n        /**\r\n         * Reads a zig-zag encoded 64bit base 128 variable-length integer. Requires Long.js.\r\n         * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes\r\n         *  read if omitted.\r\n         * @returns {!Long|!{value: Long, length: number}} The value read if offset is omitted, else the value read and\r\n         *  the actual number of bytes read.\r\n         * @throws {Error} If it's not a valid varint\r\n         * @expose\r\n         */\r\n        ByteBufferPrototype.readVarint64ZigZag = function(offset) {\r\n            var val = this.readVarint64(offset);\r\n            if (val && val['value'] instanceof Long)\r\n                val[\"value\"] = ByteBuffer.zigZagDecode64(val[\"value\"]);\r\n            else\r\n                val = ByteBuffer.zigZagDecode64(val);\r\n            return val;\r\n        };\r\n\r\n    } // Long\r\n\r\n\r\n    // types/strings/cstring\r\n\r\n    /**\r\n     * Writes a NULL-terminated UTF8 encoded string. For this to work the specified string must not contain any NULL\r\n     *  characters itself.\r\n     * @param {string} str String to write\r\n     * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes\r\n     *  contained in `str` + 1 if omitted.\r\n     * @returns {!ByteBuffer|number} this if offset is omitted, else the actual number of bytes written\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.writeCString = function(str, offset) {\r\n        var relative = typeof offset === 'undefined';\n        if (relative) offset = this.offset;\n        var i,\r\n            k = str.length;\r\n        if (!this.noAssert) {\r\n            if (typeof str !== 'string')\r\n                throw TypeError(\"Illegal str: Not a string\");\r\n            for (i=0; i>>= 0;\n            if (offset < 0 || offset + 0 > this.buffer.byteLength)\n                throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n        }\r\n        // UTF8 strings do not contain zero bytes in between except for the zero character, so:\r\n        k = utfx.calculateUTF16asUTF8(stringSource(str))[1];\r\n        offset += k+1;\n        var capacity12 = this.buffer.byteLength;\n        if (offset > capacity12)\n            this.resize((capacity12 *= 2) > offset ? capacity12 : offset);\n        offset -= k+1;\n        utfx.encodeUTF16toUTF8(stringSource(str), function(b) {\r\n            this.view[offset++] = b;\r\n        }.bind(this));\r\n        this.view[offset++] = 0;\r\n        if (relative) {\r\n            this.offset = offset;\r\n            return this;\r\n        }\r\n        return k;\r\n    };\r\n\r\n    /**\r\n     * Reads a NULL-terminated UTF8 encoded string. For this to work the string read must not contain any NULL characters\r\n     *  itself.\r\n     * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes\r\n     *  read if omitted.\r\n     * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string\r\n     *  read and the actual number of bytes read.\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.readCString = function(offset) {\r\n        var relative = typeof offset === 'undefined';\n        if (relative) offset = this.offset;\n        if (!this.noAssert) {\r\n            if (typeof offset !== 'number' || offset % 1 !== 0)\n                throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n            offset >>>= 0;\n            if (offset < 0 || offset + 1 > this.buffer.byteLength)\n                throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+1+\") <= \"+this.buffer.byteLength);\n        }\r\n        var start = offset,\r\n            temp;\r\n        // UTF8 strings do not contain zero bytes in between except for the zero character itself, so:\r\n        var sd, b = -1;\r\n        utfx.decodeUTF8toUTF16(function() {\r\n            if (b === 0) return null;\r\n            if (offset >= this.limit)\r\n                throw RangeError(\"Illegal range: Truncated data, \"+offset+\" < \"+this.limit);\r\n            b = this.view[offset++];\r\n            return b === 0 ? null : b;\r\n        }.bind(this), sd = stringDestination(), true);\r\n        if (relative) {\r\n            this.offset = offset;\r\n            return sd();\r\n        } else {\r\n            return {\r\n                \"string\": sd(),\r\n                \"length\": offset - start\r\n            };\r\n        }\r\n    };\r\n\r\n    // types/strings/istring\r\n\r\n    /**\r\n     * Writes a length as uint32 prefixed UTF8 encoded string.\r\n     * @param {string} str String to write\r\n     * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes\r\n     *  written if omitted.\r\n     * @returns {!ByteBuffer|number} `this` if `offset` is omitted, else the actual number of bytes written\r\n     * @expose\r\n     * @see ByteBuffer#writeVarint32\r\n     */\r\n    ByteBufferPrototype.writeIString = function(str, offset) {\r\n        var relative = typeof offset === 'undefined';\n        if (relative) offset = this.offset;\n        if (!this.noAssert) {\r\n            if (typeof str !== 'string')\r\n                throw TypeError(\"Illegal str: Not a string\");\r\n            if (typeof offset !== 'number' || offset % 1 !== 0)\n                throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n            offset >>>= 0;\n            if (offset < 0 || offset + 0 > this.buffer.byteLength)\n                throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n        }\r\n        var start = offset,\r\n            k;\r\n        k = utfx.calculateUTF16asUTF8(stringSource(str), this.noAssert)[1];\r\n        offset += 4+k;\n        var capacity13 = this.buffer.byteLength;\n        if (offset > capacity13)\n            this.resize((capacity13 *= 2) > offset ? capacity13 : offset);\n        offset -= 4+k;\n        if (this.littleEndian) {\n            this.view[offset+3] = (k >>> 24) & 0xFF;\n            this.view[offset+2] = (k >>> 16) & 0xFF;\n            this.view[offset+1] = (k >>>  8) & 0xFF;\n            this.view[offset  ] =  k         & 0xFF;\n        } else {\n            this.view[offset  ] = (k >>> 24) & 0xFF;\n            this.view[offset+1] = (k >>> 16) & 0xFF;\n            this.view[offset+2] = (k >>>  8) & 0xFF;\n            this.view[offset+3] =  k         & 0xFF;\n        }\n        offset += 4;\r\n        utfx.encodeUTF16toUTF8(stringSource(str), function(b) {\r\n            this.view[offset++] = b;\r\n        }.bind(this));\r\n        if (offset !== start + 4 + k)\r\n            throw RangeError(\"Illegal range: Truncated data, \"+offset+\" == \"+(offset+4+k));\r\n        if (relative) {\r\n            this.offset = offset;\r\n            return this;\r\n        }\r\n        return offset - start;\r\n    };\r\n\r\n    /**\r\n     * Reads a length as uint32 prefixed UTF8 encoded string.\r\n     * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes\r\n     *  read if omitted.\r\n     * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string\r\n     *  read and the actual number of bytes read.\r\n     * @expose\r\n     * @see ByteBuffer#readVarint32\r\n     */\r\n    ByteBufferPrototype.readIString = function(offset) {\r\n        var relative = typeof offset === 'undefined';\n        if (relative) offset = this.offset;\n        if (!this.noAssert) {\r\n            if (typeof offset !== 'number' || offset % 1 !== 0)\n                throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n            offset >>>= 0;\n            if (offset < 0 || offset + 4 > this.buffer.byteLength)\n                throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+4+\") <= \"+this.buffer.byteLength);\n        }\r\n        var start = offset;\r\n        var len = this.readUint32(offset);\r\n        var str = this.readUTF8String(len, ByteBuffer.METRICS_BYTES, offset += 4);\r\n        offset += str['length'];\r\n        if (relative) {\r\n            this.offset = offset;\r\n            return str['string'];\r\n        } else {\r\n            return {\r\n                'string': str['string'],\r\n                'length': offset - start\r\n            };\r\n        }\r\n    };\r\n\r\n    // types/strings/utf8string\r\n\r\n    /**\r\n     * Metrics representing number of UTF8 characters. Evaluates to `c`.\r\n     * @type {string}\r\n     * @const\r\n     * @expose\r\n     */\r\n    ByteBuffer.METRICS_CHARS = 'c';\r\n\r\n    /**\r\n     * Metrics representing number of bytes. Evaluates to `b`.\r\n     * @type {string}\r\n     * @const\r\n     * @expose\r\n     */\r\n    ByteBuffer.METRICS_BYTES = 'b';\r\n\r\n    /**\r\n     * Writes an UTF8 encoded string.\r\n     * @param {string} str String to write\r\n     * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} if omitted.\r\n     * @returns {!ByteBuffer|number} this if offset is omitted, else the actual number of bytes written.\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.writeUTF8String = function(str, offset) {\r\n        var relative = typeof offset === 'undefined';\n        if (relative) offset = this.offset;\n        if (!this.noAssert) {\r\n            if (typeof offset !== 'number' || offset % 1 !== 0)\n                throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n            offset >>>= 0;\n            if (offset < 0 || offset + 0 > this.buffer.byteLength)\n                throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n        }\r\n        var k;\r\n        var start = offset;\r\n        k = utfx.calculateUTF16asUTF8(stringSource(str))[1];\r\n        offset += k;\n        var capacity14 = this.buffer.byteLength;\n        if (offset > capacity14)\n            this.resize((capacity14 *= 2) > offset ? capacity14 : offset);\n        offset -= k;\n        utfx.encodeUTF16toUTF8(stringSource(str), function(b) {\r\n            this.view[offset++] = b;\r\n        }.bind(this));\r\n        if (relative) {\r\n            this.offset = offset;\r\n            return this;\r\n        }\r\n        return offset - start;\r\n    };\r\n\r\n    /**\r\n     * Writes an UTF8 encoded string. This is an alias of {@link ByteBuffer#writeUTF8String}.\r\n     * @function\r\n     * @param {string} str String to write\r\n     * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} if omitted.\r\n     * @returns {!ByteBuffer|number} this if offset is omitted, else the actual number of bytes written.\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.writeString = ByteBufferPrototype.writeUTF8String;\r\n\r\n    /**\r\n     * Calculates the number of UTF8 characters of a string. JavaScript itself uses UTF-16, so that a string's\r\n     *  `length` property does not reflect its actual UTF8 size if it contains code points larger than 0xFFFF.\r\n     * @param {string} str String to calculate\r\n     * @returns {number} Number of UTF8 characters\r\n     * @expose\r\n     */\r\n    ByteBuffer.calculateUTF8Chars = function(str) {\r\n        return utfx.calculateUTF16asUTF8(stringSource(str))[0];\r\n    };\r\n\r\n    /**\r\n     * Calculates the number of UTF8 bytes of a string.\r\n     * @param {string} str String to calculate\r\n     * @returns {number} Number of UTF8 bytes\r\n     * @expose\r\n     */\r\n    ByteBuffer.calculateUTF8Bytes = function(str) {\r\n        return utfx.calculateUTF16asUTF8(stringSource(str))[1];\r\n    };\r\n\r\n    /**\r\n     * Calculates the number of UTF8 bytes of a string. This is an alias of {@link ByteBuffer.calculateUTF8Bytes}.\r\n     * @function\r\n     * @param {string} str String to calculate\r\n     * @returns {number} Number of UTF8 bytes\r\n     * @expose\r\n     */\r\n    ByteBuffer.calculateString = ByteBuffer.calculateUTF8Bytes;\r\n\r\n    /**\r\n     * Reads an UTF8 encoded string.\r\n     * @param {number} length Number of characters or bytes to read.\r\n     * @param {string=} metrics Metrics specifying what `length` is meant to count. Defaults to\r\n     *  {@link ByteBuffer.METRICS_CHARS}.\r\n     * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes\r\n     *  read if omitted.\r\n     * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string\r\n     *  read and the actual number of bytes read.\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.readUTF8String = function(length, metrics, offset) {\r\n        if (typeof metrics === 'number') {\r\n            offset = metrics;\r\n            metrics = undefined;\r\n        }\r\n        var relative = typeof offset === 'undefined';\n        if (relative) offset = this.offset;\n        if (typeof metrics === 'undefined') metrics = ByteBuffer.METRICS_CHARS;\r\n        if (!this.noAssert) {\r\n            if (typeof length !== 'number' || length % 1 !== 0)\n                throw TypeError(\"Illegal length: \"+length+\" (not an integer)\");\n            length |= 0;\n            if (typeof offset !== 'number' || offset % 1 !== 0)\n                throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n            offset >>>= 0;\n            if (offset < 0 || offset + 0 > this.buffer.byteLength)\n                throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n        }\r\n        var i = 0,\r\n            start = offset,\r\n            sd;\r\n        if (metrics === ByteBuffer.METRICS_CHARS) { // The same for node and the browser\r\n            sd = stringDestination();\r\n            utfx.decodeUTF8(function() {\r\n                return i < length && offset < this.limit ? this.view[offset++] : null;\r\n            }.bind(this), function(cp) {\r\n                ++i; utfx.UTF8toUTF16(cp, sd);\r\n            });\r\n            if (i !== length)\r\n                throw RangeError(\"Illegal range: Truncated data, \"+i+\" == \"+length);\r\n            if (relative) {\r\n                this.offset = offset;\r\n                return sd();\r\n            } else {\r\n                return {\r\n                    \"string\": sd(),\r\n                    \"length\": offset - start\r\n                };\r\n            }\r\n        } else if (metrics === ByteBuffer.METRICS_BYTES) {\r\n            if (!this.noAssert) {\r\n                if (typeof offset !== 'number' || offset % 1 !== 0)\n                    throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n                offset >>>= 0;\n                if (offset < 0 || offset + length > this.buffer.byteLength)\n                    throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+length+\") <= \"+this.buffer.byteLength);\n            }\r\n            var k = offset + length;\r\n            utfx.decodeUTF8toUTF16(function() {\r\n                return offset < k ? this.view[offset++] : null;\r\n            }.bind(this), sd = stringDestination(), this.noAssert);\r\n            if (offset !== k)\r\n                throw RangeError(\"Illegal range: Truncated data, \"+offset+\" == \"+k);\r\n            if (relative) {\r\n                this.offset = offset;\r\n                return sd();\r\n            } else {\r\n                return {\r\n                    'string': sd(),\r\n                    'length': offset - start\r\n                };\r\n            }\r\n        } else\r\n            throw TypeError(\"Unsupported metrics: \"+metrics);\r\n    };\r\n\r\n    /**\r\n     * Reads an UTF8 encoded string. This is an alias of {@link ByteBuffer#readUTF8String}.\r\n     * @function\r\n     * @param {number} length Number of characters or bytes to read\r\n     * @param {number=} metrics Metrics specifying what `n` is meant to count. Defaults to\r\n     *  {@link ByteBuffer.METRICS_CHARS}.\r\n     * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes\r\n     *  read if omitted.\r\n     * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string\r\n     *  read and the actual number of bytes read.\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.readString = ByteBufferPrototype.readUTF8String;\r\n\r\n    // types/strings/vstring\r\n\r\n    /**\r\n     * Writes a length as varint32 prefixed UTF8 encoded string.\r\n     * @param {string} str String to write\r\n     * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes\r\n     *  written if omitted.\r\n     * @returns {!ByteBuffer|number} `this` if `offset` is omitted, else the actual number of bytes written\r\n     * @expose\r\n     * @see ByteBuffer#writeVarint32\r\n     */\r\n    ByteBufferPrototype.writeVString = function(str, offset) {\r\n        var relative = typeof offset === 'undefined';\n        if (relative) offset = this.offset;\n        if (!this.noAssert) {\r\n            if (typeof str !== 'string')\r\n                throw TypeError(\"Illegal str: Not a string\");\r\n            if (typeof offset !== 'number' || offset % 1 !== 0)\n                throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n            offset >>>= 0;\n            if (offset < 0 || offset + 0 > this.buffer.byteLength)\n                throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n        }\r\n        var start = offset,\r\n            k, l;\r\n        k = utfx.calculateUTF16asUTF8(stringSource(str), this.noAssert)[1];\r\n        l = ByteBuffer.calculateVarint32(k);\r\n        offset += l+k;\n        var capacity15 = this.buffer.byteLength;\n        if (offset > capacity15)\n            this.resize((capacity15 *= 2) > offset ? capacity15 : offset);\n        offset -= l+k;\n        offset += this.writeVarint32(k, offset);\r\n        utfx.encodeUTF16toUTF8(stringSource(str), function(b) {\r\n            this.view[offset++] = b;\r\n        }.bind(this));\r\n        if (offset !== start+k+l)\r\n            throw RangeError(\"Illegal range: Truncated data, \"+offset+\" == \"+(offset+k+l));\r\n        if (relative) {\r\n            this.offset = offset;\r\n            return this;\r\n        }\r\n        return offset - start;\r\n    };\r\n\r\n    /**\r\n     * Reads a length as varint32 prefixed UTF8 encoded string.\r\n     * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes\r\n     *  read if omitted.\r\n     * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string\r\n     *  read and the actual number of bytes read.\r\n     * @expose\r\n     * @see ByteBuffer#readVarint32\r\n     */\r\n    ByteBufferPrototype.readVString = function(offset) {\r\n        var relative = typeof offset === 'undefined';\n        if (relative) offset = this.offset;\n        if (!this.noAssert) {\r\n            if (typeof offset !== 'number' || offset % 1 !== 0)\n                throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n            offset >>>= 0;\n            if (offset < 0 || offset + 1 > this.buffer.byteLength)\n                throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+1+\") <= \"+this.buffer.byteLength);\n        }\r\n        var start = offset;\r\n        var len = this.readVarint32(offset);\r\n        var str = this.readUTF8String(len['value'], ByteBuffer.METRICS_BYTES, offset += len['length']);\r\n        offset += str['length'];\r\n        if (relative) {\r\n            this.offset = offset;\r\n            return str['string'];\r\n        } else {\r\n            return {\r\n                'string': str['string'],\r\n                'length': offset - start\r\n            };\r\n        }\r\n    };\r\n\r\n\r\n    /**\r\n     * Appends some data to this ByteBuffer. This will overwrite any contents behind the specified offset up to the appended\r\n     *  data's length.\r\n     * @param {!ByteBuffer|!ArrayBuffer|!Uint8Array|string} source Data to append. If `source` is a ByteBuffer, its offsets\r\n     *  will be modified according to the performed read operation.\r\n     * @param {(string|number)=} encoding Encoding if `data` is a string (\"base64\", \"hex\", \"binary\", defaults to \"utf8\")\r\n     * @param {number=} offset Offset to append at. Will use and increase {@link ByteBuffer#offset} by the number of bytes\r\n     *  written if omitted.\r\n     * @returns {!ByteBuffer} this\r\n     * @expose\r\n     * @example A relative `<01 02>03.append(<04 05>)` will result in `<01 02 04 05>, 04 05|`\r\n     * @example An absolute `<01 02>03.append(04 05>, 1)` will result in `<01 04>05, 04 05|`\r\n     */\r\n    ByteBufferPrototype.append = function(source, encoding, offset) {\r\n        if (typeof encoding === 'number' || typeof encoding !== 'string') {\r\n            offset = encoding;\r\n            encoding = undefined;\r\n        }\r\n        var relative = typeof offset === 'undefined';\n        if (relative) offset = this.offset;\n        if (!this.noAssert) {\r\n            if (typeof offset !== 'number' || offset % 1 !== 0)\n                throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n            offset >>>= 0;\n            if (offset < 0 || offset + 0 > this.buffer.byteLength)\n                throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n        }\r\n        if (!(source instanceof ByteBuffer))\r\n            source = ByteBuffer.wrap(source, encoding);\r\n        var length = source.limit - source.offset;\r\n        if (length <= 0) return this; // Nothing to append\r\n        offset += length;\n        var capacity16 = this.buffer.byteLength;\n        if (offset > capacity16)\n            this.resize((capacity16 *= 2) > offset ? capacity16 : offset);\n        offset -= length;\n        this.view.set(source.view.subarray(source.offset, source.limit), offset);\r\n        source.offset += length;\r\n        if (relative) this.offset += length;\n        return this;\r\n    };\r\n\r\n    /**\r\n     * Appends this ByteBuffer's contents to another ByteBuffer. This will overwrite any contents at and after the\r\n        specified offset up to the length of this ByteBuffer's data.\r\n     * @param {!ByteBuffer} target Target ByteBuffer\r\n     * @param {number=} offset Offset to append to. Will use and increase {@link ByteBuffer#offset} by the number of bytes\r\n     *  read if omitted.\r\n     * @returns {!ByteBuffer} this\r\n     * @expose\r\n     * @see ByteBuffer#append\r\n     */\r\n    ByteBufferPrototype.appendTo = function(target, offset) {\r\n        target.append(this, offset);\r\n        return this;\r\n    };\r\n\r\n    /**\r\n     * Enables or disables assertions of argument types and offsets. Assertions are enabled by default but you can opt to\r\n     *  disable them if your code already makes sure that everything is valid.\r\n     * @param {boolean} assert `true` to enable assertions, otherwise `false`\r\n     * @returns {!ByteBuffer} this\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.assert = function(assert) {\r\n        this.noAssert = !assert;\r\n        return this;\r\n    };\r\n\r\n    /**\r\n     * Gets the capacity of this ByteBuffer's backing buffer.\r\n     * @returns {number} Capacity of the backing buffer\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.capacity = function() {\r\n        return this.buffer.byteLength;\r\n    };\r\n    /**\r\n     * Clears this ByteBuffer's offsets by setting {@link ByteBuffer#offset} to `0` and {@link ByteBuffer#limit} to the\r\n     *  backing buffer's capacity. Discards {@link ByteBuffer#markedOffset}.\r\n     * @returns {!ByteBuffer} this\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.clear = function() {\r\n        this.offset = 0;\r\n        this.limit = this.buffer.byteLength;\r\n        this.markedOffset = -1;\r\n        return this;\r\n    };\r\n\r\n    /**\r\n     * Creates a cloned instance of this ByteBuffer, preset with this ByteBuffer's values for {@link ByteBuffer#offset},\r\n     *  {@link ByteBuffer#markedOffset} and {@link ByteBuffer#limit}.\r\n     * @param {boolean=} copy Whether to copy the backing buffer or to return another view on the same, defaults to `false`\r\n     * @returns {!ByteBuffer} Cloned instance\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.clone = function(copy) {\r\n        var bb = new ByteBuffer(0, this.littleEndian, this.noAssert);\r\n        if (copy) {\r\n            bb.buffer = new ArrayBuffer(this.buffer.byteLength);\r\n            bb.view = new Uint8Array(bb.buffer);\r\n        } else {\r\n            bb.buffer = this.buffer;\r\n            bb.view = this.view;\r\n        }\r\n        bb.offset = this.offset;\r\n        bb.markedOffset = this.markedOffset;\r\n        bb.limit = this.limit;\r\n        return bb;\r\n    };\r\n\r\n    /**\r\n     * Compacts this ByteBuffer to be backed by a {@link ByteBuffer#buffer} of its contents' length. Contents are the bytes\r\n     *  between {@link ByteBuffer#offset} and {@link ByteBuffer#limit}. Will set `offset = 0` and `limit = capacity` and\r\n     *  adapt {@link ByteBuffer#markedOffset} to the same relative position if set.\r\n     * @param {number=} begin Offset to start at, defaults to {@link ByteBuffer#offset}\r\n     * @param {number=} end Offset to end at, defaults to {@link ByteBuffer#limit}\r\n     * @returns {!ByteBuffer} this\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.compact = function(begin, end) {\r\n        if (typeof begin === 'undefined') begin = this.offset;\r\n        if (typeof end === 'undefined') end = this.limit;\r\n        if (!this.noAssert) {\r\n            if (typeof begin !== 'number' || begin % 1 !== 0)\n                throw TypeError(\"Illegal begin: Not an integer\");\n            begin >>>= 0;\n            if (typeof end !== 'number' || end % 1 !== 0)\n                throw TypeError(\"Illegal end: Not an integer\");\n            end >>>= 0;\n            if (begin < 0 || begin > end || end > this.buffer.byteLength)\n                throw RangeError(\"Illegal range: 0 <= \"+begin+\" <= \"+end+\" <= \"+this.buffer.byteLength);\n        }\r\n        if (begin === 0 && end === this.buffer.byteLength)\r\n            return this; // Already compacted\r\n        var len = end - begin;\r\n        if (len === 0) {\r\n            this.buffer = EMPTY_BUFFER;\r\n            this.view = null;\r\n            if (this.markedOffset >= 0) this.markedOffset -= begin;\r\n            this.offset = 0;\r\n            this.limit = 0;\r\n            return this;\r\n        }\r\n        var buffer = new ArrayBuffer(len);\r\n        var view = new Uint8Array(buffer);\r\n        view.set(this.view.subarray(begin, end));\r\n        this.buffer = buffer;\r\n        this.view = view;\r\n        if (this.markedOffset >= 0) this.markedOffset -= begin;\r\n        this.offset = 0;\r\n        this.limit = len;\r\n        return this;\r\n    };\r\n\r\n    /**\r\n     * Creates a copy of this ByteBuffer's contents. Contents are the bytes between {@link ByteBuffer#offset} and\r\n     *  {@link ByteBuffer#limit}.\r\n     * @param {number=} begin Begin offset, defaults to {@link ByteBuffer#offset}.\r\n     * @param {number=} end End offset, defaults to {@link ByteBuffer#limit}.\r\n     * @returns {!ByteBuffer} Copy\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.copy = function(begin, end) {\r\n        if (typeof begin === 'undefined') begin = this.offset;\r\n        if (typeof end === 'undefined') end = this.limit;\r\n        if (!this.noAssert) {\r\n            if (typeof begin !== 'number' || begin % 1 !== 0)\n                throw TypeError(\"Illegal begin: Not an integer\");\n            begin >>>= 0;\n            if (typeof end !== 'number' || end % 1 !== 0)\n                throw TypeError(\"Illegal end: Not an integer\");\n            end >>>= 0;\n            if (begin < 0 || begin > end || end > this.buffer.byteLength)\n                throw RangeError(\"Illegal range: 0 <= \"+begin+\" <= \"+end+\" <= \"+this.buffer.byteLength);\n        }\r\n        if (begin === end)\r\n            return new ByteBuffer(0, this.littleEndian, this.noAssert);\r\n        var capacity = end - begin,\r\n            bb = new ByteBuffer(capacity, this.littleEndian, this.noAssert);\r\n        bb.offset = 0;\r\n        bb.limit = capacity;\r\n        if (bb.markedOffset >= 0) bb.markedOffset -= begin;\r\n        this.copyTo(bb, 0, begin, end);\r\n        return bb;\r\n    };\r\n\r\n    /**\r\n     * Copies this ByteBuffer's contents to another ByteBuffer. Contents are the bytes between {@link ByteBuffer#offset} and\r\n     *  {@link ByteBuffer#limit}.\r\n     * @param {!ByteBuffer} target Target ByteBuffer\r\n     * @param {number=} targetOffset Offset to copy to. Will use and increase the target's {@link ByteBuffer#offset}\r\n     *  by the number of bytes copied if omitted.\r\n     * @param {number=} sourceOffset Offset to start copying from. Will use and increase {@link ByteBuffer#offset} by the\r\n     *  number of bytes copied if omitted.\r\n     * @param {number=} sourceLimit Offset to end copying from, defaults to {@link ByteBuffer#limit}\r\n     * @returns {!ByteBuffer} this\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.copyTo = function(target, targetOffset, sourceOffset, sourceLimit) {\r\n        var relative,\r\n            targetRelative;\r\n        if (!this.noAssert) {\r\n            if (!ByteBuffer.isByteBuffer(target))\r\n                throw TypeError(\"Illegal target: Not a ByteBuffer\");\r\n        }\r\n        targetOffset = (targetRelative = typeof targetOffset === 'undefined') ? target.offset : targetOffset | 0;\r\n        sourceOffset = (relative = typeof sourceOffset === 'undefined') ? this.offset : sourceOffset | 0;\r\n        sourceLimit = typeof sourceLimit === 'undefined' ? this.limit : sourceLimit | 0;\r\n\r\n        if (targetOffset < 0 || targetOffset > target.buffer.byteLength)\r\n            throw RangeError(\"Illegal target range: 0 <= \"+targetOffset+\" <= \"+target.buffer.byteLength);\r\n        if (sourceOffset < 0 || sourceLimit > this.buffer.byteLength)\r\n            throw RangeError(\"Illegal source range: 0 <= \"+sourceOffset+\" <= \"+this.buffer.byteLength);\r\n\r\n        var len = sourceLimit - sourceOffset;\r\n        if (len === 0)\r\n            return target; // Nothing to copy\r\n\r\n        target.ensureCapacity(targetOffset + len);\r\n\r\n        target.view.set(this.view.subarray(sourceOffset, sourceLimit), targetOffset);\r\n\r\n        if (relative) this.offset += len;\r\n        if (targetRelative) target.offset += len;\r\n\r\n        return this;\r\n    };\r\n\r\n    /**\r\n     * Makes sure that this ByteBuffer is backed by a {@link ByteBuffer#buffer} of at least the specified capacity. If the\r\n     *  current capacity is exceeded, it will be doubled. If double the current capacity is less than the required capacity,\r\n     *  the required capacity will be used instead.\r\n     * @param {number} capacity Required capacity\r\n     * @returns {!ByteBuffer} this\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.ensureCapacity = function(capacity) {\r\n        var current = this.buffer.byteLength;\r\n        if (current < capacity)\r\n            return this.resize((current *= 2) > capacity ? current : capacity);\r\n        return this;\r\n    };\r\n\r\n    /**\r\n     * Overwrites this ByteBuffer's contents with the specified value. Contents are the bytes between\r\n     *  {@link ByteBuffer#offset} and {@link ByteBuffer#limit}.\r\n     * @param {number|string} value Byte value to fill with. If given as a string, the first character is used.\r\n     * @param {number=} begin Begin offset. Will use and increase {@link ByteBuffer#offset} by the number of bytes\r\n     *  written if omitted. defaults to {@link ByteBuffer#offset}.\r\n     * @param {number=} end End offset, defaults to {@link ByteBuffer#limit}.\r\n     * @returns {!ByteBuffer} this\r\n     * @expose\r\n     * @example `someByteBuffer.clear().fill(0)` fills the entire backing buffer with zeroes\r\n     */\r\n    ByteBufferPrototype.fill = function(value, begin, end) {\r\n        var relative = typeof begin === 'undefined';\n        if (relative) begin = this.offset;\n        if (typeof value === 'string' && value.length > 0)\r\n            value = value.charCodeAt(0);\r\n        if (typeof begin === 'undefined') begin = this.offset;\r\n        if (typeof end === 'undefined') end = this.limit;\r\n        if (!this.noAssert) {\r\n            if (typeof value !== 'number' || value % 1 !== 0)\n                throw TypeError(\"Illegal value: \"+value+\" (not an integer)\");\n            value |= 0;\n            if (typeof begin !== 'number' || begin % 1 !== 0)\n                throw TypeError(\"Illegal begin: Not an integer\");\n            begin >>>= 0;\n            if (typeof end !== 'number' || end % 1 !== 0)\n                throw TypeError(\"Illegal end: Not an integer\");\n            end >>>= 0;\n            if (begin < 0 || begin > end || end > this.buffer.byteLength)\n                throw RangeError(\"Illegal range: 0 <= \"+begin+\" <= \"+end+\" <= \"+this.buffer.byteLength);\n        }\r\n        if (begin >= end)\r\n            return this; // Nothing to fill\r\n        while (begin < end) this.view[begin++] = value;\r\n        if (relative) this.offset = begin;\r\n        return this;\r\n    };\r\n\r\n    /**\r\n     * Makes this ByteBuffer ready for a new sequence of write or relative read operations. Sets `limit = offset` and\r\n     *  `offset = 0`. Make sure always to flip a ByteBuffer when all relative read or write operations are complete.\r\n     * @returns {!ByteBuffer} this\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.flip = function() {\r\n        this.limit = this.offset;\r\n        this.offset = 0;\r\n        return this;\r\n    };\r\n    /**\r\n     * Marks an offset on this ByteBuffer to be used later.\r\n     * @param {number=} offset Offset to mark. Defaults to {@link ByteBuffer#offset}.\r\n     * @returns {!ByteBuffer} this\r\n     * @throws {TypeError} If `offset` is not a valid number\r\n     * @throws {RangeError} If `offset` is out of bounds\r\n     * @see ByteBuffer#reset\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.mark = function(offset) {\r\n        offset = typeof offset === 'undefined' ? this.offset : offset;\r\n        if (!this.noAssert) {\r\n            if (typeof offset !== 'number' || offset % 1 !== 0)\n                throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n            offset >>>= 0;\n            if (offset < 0 || offset + 0 > this.buffer.byteLength)\n                throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n        }\r\n        this.markedOffset = offset;\r\n        return this;\r\n    };\r\n    /**\r\n     * Sets the byte order.\r\n     * @param {boolean} littleEndian `true` for little endian byte order, `false` for big endian\r\n     * @returns {!ByteBuffer} this\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.order = function(littleEndian) {\r\n        if (!this.noAssert) {\r\n            if (typeof littleEndian !== 'boolean')\r\n                throw TypeError(\"Illegal littleEndian: Not a boolean\");\r\n        }\r\n        this.littleEndian = !!littleEndian;\r\n        return this;\r\n    };\r\n\r\n    /**\r\n     * Switches (to) little endian byte order.\r\n     * @param {boolean=} littleEndian Defaults to `true`, otherwise uses big endian\r\n     * @returns {!ByteBuffer} this\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.LE = function(littleEndian) {\r\n        this.littleEndian = typeof littleEndian !== 'undefined' ? !!littleEndian : true;\r\n        return this;\r\n    };\r\n\r\n    /**\r\n     * Switches (to) big endian byte order.\r\n     * @param {boolean=} bigEndian Defaults to `true`, otherwise uses little endian\r\n     * @returns {!ByteBuffer} this\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.BE = function(bigEndian) {\r\n        this.littleEndian = typeof bigEndian !== 'undefined' ? !bigEndian : false;\r\n        return this;\r\n    };\r\n    /**\r\n     * Prepends some data to this ByteBuffer. This will overwrite any contents before the specified offset up to the\r\n     *  prepended data's length. If there is not enough space available before the specified `offset`, the backing buffer\r\n     *  will be resized and its contents moved accordingly.\r\n     * @param {!ByteBuffer|string|!ArrayBuffer} source Data to prepend. If `source` is a ByteBuffer, its offset will be\r\n     *  modified according to the performed read operation.\r\n     * @param {(string|number)=} encoding Encoding if `data` is a string (\"base64\", \"hex\", \"binary\", defaults to \"utf8\")\r\n     * @param {number=} offset Offset to prepend at. Will use and decrease {@link ByteBuffer#offset} by the number of bytes\r\n     *  prepended if omitted.\r\n     * @returns {!ByteBuffer} this\r\n     * @expose\r\n     * @example A relative `00<01 02 03>.prepend(<04 05>)` results in `<04 05 01 02 03>, 04 05|`\r\n     * @example An absolute `00<01 02 03>.prepend(<04 05>, 2)` results in `04<05 02 03>, 04 05|`\r\n     */\r\n    ByteBufferPrototype.prepend = function(source, encoding, offset) {\r\n        if (typeof encoding === 'number' || typeof encoding !== 'string') {\r\n            offset = encoding;\r\n            encoding = undefined;\r\n        }\r\n        var relative = typeof offset === 'undefined';\n        if (relative) offset = this.offset;\n        if (!this.noAssert) {\r\n            if (typeof offset !== 'number' || offset % 1 !== 0)\n                throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n            offset >>>= 0;\n            if (offset < 0 || offset + 0 > this.buffer.byteLength)\n                throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n        }\r\n        if (!(source instanceof ByteBuffer))\r\n            source = ByteBuffer.wrap(source, encoding);\r\n        var len = source.limit - source.offset;\r\n        if (len <= 0) return this; // Nothing to prepend\r\n        var diff = len - offset;\r\n        if (diff > 0) { // Not enough space before offset, so resize + move\r\n            var buffer = new ArrayBuffer(this.buffer.byteLength + diff);\r\n            var view = new Uint8Array(buffer);\r\n            view.set(this.view.subarray(offset, this.buffer.byteLength), len);\r\n            this.buffer = buffer;\r\n            this.view = view;\r\n            this.offset += diff;\r\n            if (this.markedOffset >= 0) this.markedOffset += diff;\r\n            this.limit += diff;\r\n            offset += diff;\r\n        } else {\r\n            var arrayView = new Uint8Array(this.buffer);\r\n        }\r\n        this.view.set(source.view.subarray(source.offset, source.limit), offset - len);\r\n\r\n        source.offset = source.limit;\r\n        if (relative)\r\n            this.offset -= len;\r\n        return this;\r\n    };\r\n\r\n    /**\r\n     * Prepends this ByteBuffer to another ByteBuffer. This will overwrite any contents before the specified offset up to the\r\n     *  prepended data's length. If there is not enough space available before the specified `offset`, the backing buffer\r\n     *  will be resized and its contents moved accordingly.\r\n     * @param {!ByteBuffer} target Target ByteBuffer\r\n     * @param {number=} offset Offset to prepend at. Will use and decrease {@link ByteBuffer#offset} by the number of bytes\r\n     *  prepended if omitted.\r\n     * @returns {!ByteBuffer} this\r\n     * @expose\r\n     * @see ByteBuffer#prepend\r\n     */\r\n    ByteBufferPrototype.prependTo = function(target, offset) {\r\n        target.prepend(this, offset);\r\n        return this;\r\n    };\r\n    /**\r\n     * Prints debug information about this ByteBuffer's contents.\r\n     * @param {function(string)=} out Output function to call, defaults to console.log\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.printDebug = function(out) {\r\n        if (typeof out !== 'function') out = console.log.bind(console);\r\n        out(\r\n            this.toString()+\"\\n\"+\r\n            \"-------------------------------------------------------------------\\n\"+\r\n            this.toDebug(/* columns */ true)\r\n        );\r\n    };\r\n\r\n    /**\r\n     * Gets the number of remaining readable bytes. Contents are the bytes between {@link ByteBuffer#offset} and\r\n     *  {@link ByteBuffer#limit}, so this returns `limit - offset`.\r\n     * @returns {number} Remaining readable bytes. May be negative if `offset > limit`.\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.remaining = function() {\r\n        return this.limit - this.offset;\r\n    };\r\n    /**\r\n     * Resets this ByteBuffer's {@link ByteBuffer#offset}. If an offset has been marked through {@link ByteBuffer#mark}\r\n     *  before, `offset` will be set to {@link ByteBuffer#markedOffset}, which will then be discarded. If no offset has been\r\n     *  marked, sets `offset = 0`.\r\n     * @returns {!ByteBuffer} this\r\n     * @see ByteBuffer#mark\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.reset = function() {\r\n        if (this.markedOffset >= 0) {\r\n            this.offset = this.markedOffset;\r\n            this.markedOffset = -1;\r\n        } else {\r\n            this.offset = 0;\r\n        }\r\n        return this;\r\n    };\r\n    /**\r\n     * Resizes this ByteBuffer to be backed by a buffer of at least the given capacity. Will do nothing if already that\r\n     *  large or larger.\r\n     * @param {number} capacity Capacity required\r\n     * @returns {!ByteBuffer} this\r\n     * @throws {TypeError} If `capacity` is not a number\r\n     * @throws {RangeError} If `capacity < 0`\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.resize = function(capacity) {\r\n        if (!this.noAssert) {\r\n            if (typeof capacity !== 'number' || capacity % 1 !== 0)\n                throw TypeError(\"Illegal capacity: \"+capacity+\" (not an integer)\");\n            capacity |= 0;\n            if (capacity < 0)\r\n                throw RangeError(\"Illegal capacity: 0 <= \"+capacity);\r\n        }\r\n        if (this.buffer.byteLength < capacity) {\r\n            var buffer = new ArrayBuffer(capacity);\r\n            var view = new Uint8Array(buffer);\r\n            view.set(this.view);\r\n            this.buffer = buffer;\r\n            this.view = view;\r\n        }\r\n        return this;\r\n    };\r\n    /**\r\n     * Reverses this ByteBuffer's contents.\r\n     * @param {number=} begin Offset to start at, defaults to {@link ByteBuffer#offset}\r\n     * @param {number=} end Offset to end at, defaults to {@link ByteBuffer#limit}\r\n     * @returns {!ByteBuffer} this\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.reverse = function(begin, end) {\r\n        if (typeof begin === 'undefined') begin = this.offset;\r\n        if (typeof end === 'undefined') end = this.limit;\r\n        if (!this.noAssert) {\r\n            if (typeof begin !== 'number' || begin % 1 !== 0)\n                throw TypeError(\"Illegal begin: Not an integer\");\n            begin >>>= 0;\n            if (typeof end !== 'number' || end % 1 !== 0)\n                throw TypeError(\"Illegal end: Not an integer\");\n            end >>>= 0;\n            if (begin < 0 || begin > end || end > this.buffer.byteLength)\n                throw RangeError(\"Illegal range: 0 <= \"+begin+\" <= \"+end+\" <= \"+this.buffer.byteLength);\n        }\r\n        if (begin === end)\r\n            return this; // Nothing to reverse\r\n        Array.prototype.reverse.call(this.view.subarray(begin, end));\r\n        return this;\r\n    };\r\n    /**\r\n     * Skips the next `length` bytes. This will just advance\r\n     * @param {number} length Number of bytes to skip. May also be negative to move the offset back.\r\n     * @returns {!ByteBuffer} this\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.skip = function(length) {\r\n        if (!this.noAssert) {\r\n            if (typeof length !== 'number' || length % 1 !== 0)\n                throw TypeError(\"Illegal length: \"+length+\" (not an integer)\");\n            length |= 0;\n        }\r\n        var offset = this.offset + length;\r\n        if (!this.noAssert) {\r\n            if (offset < 0 || offset > this.buffer.byteLength)\r\n                throw RangeError(\"Illegal length: 0 <= \"+this.offset+\" + \"+length+\" <= \"+this.buffer.byteLength);\r\n        }\r\n        this.offset = offset;\r\n        return this;\r\n    };\r\n\r\n    /**\r\n     * Slices this ByteBuffer by creating a cloned instance with `offset = begin` and `limit = end`.\r\n     * @param {number=} begin Begin offset, defaults to {@link ByteBuffer#offset}.\r\n     * @param {number=} end End offset, defaults to {@link ByteBuffer#limit}.\r\n     * @returns {!ByteBuffer} Clone of this ByteBuffer with slicing applied, backed by the same {@link ByteBuffer#buffer}\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.slice = function(begin, end) {\r\n        if (typeof begin === 'undefined') begin = this.offset;\r\n        if (typeof end === 'undefined') end = this.limit;\r\n        if (!this.noAssert) {\r\n            if (typeof begin !== 'number' || begin % 1 !== 0)\n                throw TypeError(\"Illegal begin: Not an integer\");\n            begin >>>= 0;\n            if (typeof end !== 'number' || end % 1 !== 0)\n                throw TypeError(\"Illegal end: Not an integer\");\n            end >>>= 0;\n            if (begin < 0 || begin > end || end > this.buffer.byteLength)\n                throw RangeError(\"Illegal range: 0 <= \"+begin+\" <= \"+end+\" <= \"+this.buffer.byteLength);\n        }\r\n        var bb = this.clone();\r\n        bb.offset = begin;\r\n        bb.limit = end;\r\n        return bb;\r\n    };\r\n    /**\r\n     * Returns a copy of the backing buffer that contains this ByteBuffer's contents. Contents are the bytes between\r\n     *  {@link ByteBuffer#offset} and {@link ByteBuffer#limit}.\r\n     * @param {boolean=} forceCopy If `true` returns a copy, otherwise returns a view referencing the same memory if\r\n     *  possible. Defaults to `false`\r\n     * @returns {!ArrayBuffer} Contents as an ArrayBuffer\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.toBuffer = function(forceCopy) {\r\n        var offset = this.offset,\r\n            limit = this.limit;\r\n        if (!this.noAssert) {\r\n            if (typeof offset !== 'number' || offset % 1 !== 0)\n                throw TypeError(\"Illegal offset: Not an integer\");\n            offset >>>= 0;\n            if (typeof limit !== 'number' || limit % 1 !== 0)\n                throw TypeError(\"Illegal limit: Not an integer\");\n            limit >>>= 0;\n            if (offset < 0 || offset > limit || limit > this.buffer.byteLength)\n                throw RangeError(\"Illegal range: 0 <= \"+offset+\" <= \"+limit+\" <= \"+this.buffer.byteLength);\n        }\r\n        // NOTE: It's not possible to have another ArrayBuffer reference the same memory as the backing buffer. This is\r\n        // possible with Uint8Array#subarray only, but we have to return an ArrayBuffer by contract. So:\r\n        if (!forceCopy && offset === 0 && limit === this.buffer.byteLength)\r\n            return this.buffer;\r\n        if (offset === limit)\r\n            return EMPTY_BUFFER;\r\n        var buffer = new ArrayBuffer(limit - offset);\r\n        new Uint8Array(buffer).set(new Uint8Array(this.buffer).subarray(offset, limit), 0);\r\n        return buffer;\r\n    };\r\n\r\n    /**\r\n     * Returns a raw buffer compacted to contain this ByteBuffer's contents. Contents are the bytes between\r\n     *  {@link ByteBuffer#offset} and {@link ByteBuffer#limit}. This is an alias of {@link ByteBuffer#toBuffer}.\r\n     * @function\r\n     * @param {boolean=} forceCopy If `true` returns a copy, otherwise returns a view referencing the same memory.\r\n     *  Defaults to `false`\r\n     * @returns {!ArrayBuffer} Contents as an ArrayBuffer\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.toArrayBuffer = ByteBufferPrototype.toBuffer;\r\n\r\n    /**\r\n     * Converts the ByteBuffer's contents to a string.\r\n     * @param {string=} encoding Output encoding. Returns an informative string representation if omitted but also allows\r\n     *  direct conversion to \"utf8\", \"hex\", \"base64\" and \"binary\" encoding. \"debug\" returns a hex representation with\r\n     *  highlighted offsets.\r\n     * @param {number=} begin Offset to begin at, defaults to {@link ByteBuffer#offset}\r\n     * @param {number=} end Offset to end at, defaults to {@link ByteBuffer#limit}\r\n     * @returns {string} String representation\r\n     * @throws {Error} If `encoding` is invalid\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.toString = function(encoding, begin, end) {\r\n        if (typeof encoding === 'undefined')\r\n            return \"ByteBufferAB(offset=\"+this.offset+\",markedOffset=\"+this.markedOffset+\",limit=\"+this.limit+\",capacity=\"+this.capacity()+\")\";\r\n        if (typeof encoding === 'number')\r\n            encoding = \"utf8\",\r\n            begin = encoding,\r\n            end = begin;\r\n        switch (encoding) {\r\n            case \"utf8\":\r\n                return this.toUTF8(begin, end);\r\n            case \"base64\":\r\n                return this.toBase64(begin, end);\r\n            case \"hex\":\r\n                return this.toHex(begin, end);\r\n            case \"binary\":\r\n                return this.toBinary(begin, end);\r\n            case \"debug\":\r\n                return this.toDebug();\r\n            case \"columns\":\r\n                return this.toColumns();\r\n            default:\r\n                throw Error(\"Unsupported encoding: \"+encoding);\r\n        }\r\n    };\r\n\r\n    // lxiv-embeddable\r\n\r\n    /**\r\n     * lxiv-embeddable (c) 2014 Daniel Wirtz \r\n     * Released under the Apache License, Version 2.0\r\n     * see: https://github.com/dcodeIO/lxiv for details\r\n     */\r\n    var lxiv = function() {\r\n        \"use strict\";\r\n\r\n        /**\r\n         * lxiv namespace.\r\n         * @type {!Object.}\r\n         * @exports lxiv\r\n         */\r\n        var lxiv = {};\r\n\r\n        /**\r\n         * Character codes for output.\r\n         * @type {!Array.}\r\n         * @inner\r\n         */\r\n        var aout = [\r\n            65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,\r\n            81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 97, 98, 99, 100, 101, 102,\r\n            103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,\r\n            119, 120, 121, 122, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 43, 47\r\n        ];\r\n\r\n        /**\r\n         * Character codes for input.\r\n         * @type {!Array.}\r\n         * @inner\r\n         */\r\n        var ain = [];\r\n        for (var i=0, k=aout.length; i>2)&0x3f]);\r\n                t = (b&0x3)<<4;\r\n                if ((b = src()) !== null) {\r\n                    t |= (b>>4)&0xf;\r\n                    dst(aout[(t|((b>>4)&0xf))&0x3f]);\r\n                    t = (b&0xf)<<2;\r\n                    if ((b = src()) !== null)\r\n                        dst(aout[(t|((b>>6)&0x3))&0x3f]),\r\n                        dst(aout[b&0x3f]);\r\n                    else\r\n                        dst(aout[t&0x3f]),\r\n                        dst(61);\r\n                } else\r\n                    dst(aout[t&0x3f]),\r\n                    dst(61),\r\n                    dst(61);\r\n            }\r\n        };\r\n\r\n        /**\r\n         * Decodes base64 char codes to bytes.\r\n         * @param {!function():number|null} src Characters source as a function returning the next char code respectively\r\n         *  `null` if there are no more characters left.\r\n         * @param {!function(number)} dst Bytes destination as a function successively called with the next byte.\r\n         * @throws {Error} If a character code is invalid\r\n         */\r\n        lxiv.decode = function(src, dst) {\r\n            var c, t1, t2;\r\n            function fail(c) {\r\n                throw Error(\"Illegal character code: \"+c);\r\n            }\r\n            while ((c = src()) !== null) {\r\n                t1 = ain[c];\r\n                if (typeof t1 === 'undefined') fail(c);\r\n                if ((c = src()) !== null) {\r\n                    t2 = ain[c];\r\n                    if (typeof t2 === 'undefined') fail(c);\r\n                    dst((t1<<2)>>>0|(t2&0x30)>>4);\r\n                    if ((c = src()) !== null) {\r\n                        t1 = ain[c];\r\n                        if (typeof t1 === 'undefined')\r\n                            if (c === 61) break; else fail(c);\r\n                        dst(((t2&0xf)<<4)>>>0|(t1&0x3c)>>2);\r\n                        if ((c = src()) !== null) {\r\n                            t2 = ain[c];\r\n                            if (typeof t2 === 'undefined')\r\n                                if (c === 61) break; else fail(c);\r\n                            dst(((t1&0x3)<<6)>>>0|t2);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        };\r\n\r\n        /**\r\n         * Tests if a string is valid base64.\r\n         * @param {string} str String to test\r\n         * @returns {boolean} `true` if valid, otherwise `false`\r\n         */\r\n        lxiv.test = function(str) {\r\n            return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(str);\r\n        };\r\n\r\n        return lxiv;\r\n    }();\r\n\r\n    // encodings/base64\r\n\r\n    /**\r\n     * Encodes this ByteBuffer's contents to a base64 encoded string.\r\n     * @param {number=} begin Offset to begin at, defaults to {@link ByteBuffer#offset}.\r\n     * @param {number=} end Offset to end at, defaults to {@link ByteBuffer#limit}.\r\n     * @returns {string} Base64 encoded string\r\n     * @throws {RangeError} If `begin` or `end` is out of bounds\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.toBase64 = function(begin, end) {\r\n        if (typeof begin === 'undefined')\r\n            begin = this.offset;\r\n        if (typeof end === 'undefined')\r\n            end = this.limit;\r\n        begin = begin | 0; end = end | 0;\r\n        if (begin < 0 || end > this.capacity || begin > end)\r\n            throw RangeError(\"begin, end\");\r\n        var sd; lxiv.encode(function() {\r\n            return begin < end ? this.view[begin++] : null;\r\n        }.bind(this), sd = stringDestination());\r\n        return sd();\r\n    };\r\n\r\n    /**\r\n     * Decodes a base64 encoded string to a ByteBuffer.\r\n     * @param {string} str String to decode\r\n     * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to\r\n     *  {@link ByteBuffer.DEFAULT_ENDIAN}.\r\n     * @returns {!ByteBuffer} ByteBuffer\r\n     * @expose\r\n     */\r\n    ByteBuffer.fromBase64 = function(str, littleEndian) {\r\n        if (typeof str !== 'string')\r\n            throw TypeError(\"str\");\r\n        var bb = new ByteBuffer(str.length/4*3, littleEndian),\r\n            i = 0;\r\n        lxiv.decode(stringSource(str), function(b) {\r\n            bb.view[i++] = b;\r\n        });\r\n        bb.limit = i;\r\n        return bb;\r\n    };\r\n\r\n    /**\r\n     * Encodes a binary string to base64 like `window.btoa` does.\r\n     * @param {string} str Binary string\r\n     * @returns {string} Base64 encoded string\r\n     * @see https://developer.mozilla.org/en-US/docs/Web/API/Window.btoa\r\n     * @expose\r\n     */\r\n    ByteBuffer.btoa = function(str) {\r\n        return ByteBuffer.fromBinary(str).toBase64();\r\n    };\r\n\r\n    /**\r\n     * Decodes a base64 encoded string to binary like `window.atob` does.\r\n     * @param {string} b64 Base64 encoded string\r\n     * @returns {string} Binary string\r\n     * @see https://developer.mozilla.org/en-US/docs/Web/API/Window.atob\r\n     * @expose\r\n     */\r\n    ByteBuffer.atob = function(b64) {\r\n        return ByteBuffer.fromBase64(b64).toBinary();\r\n    };\r\n\r\n    // encodings/binary\r\n\r\n    /**\r\n     * Encodes this ByteBuffer to a binary encoded string, that is using only characters 0x00-0xFF as bytes.\r\n     * @param {number=} begin Offset to begin at. Defaults to {@link ByteBuffer#offset}.\r\n     * @param {number=} end Offset to end at. Defaults to {@link ByteBuffer#limit}.\r\n     * @returns {string} Binary encoded string\r\n     * @throws {RangeError} If `offset > limit`\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.toBinary = function(begin, end) {\r\n        if (typeof begin === 'undefined')\r\n            begin = this.offset;\r\n        if (typeof end === 'undefined')\r\n            end = this.limit;\r\n        begin |= 0; end |= 0;\r\n        if (begin < 0 || end > this.capacity() || begin > end)\r\n            throw RangeError(\"begin, end\");\r\n        if (begin === end)\r\n            return \"\";\r\n        var chars = [],\r\n            parts = [];\r\n        while (begin < end) {\r\n            chars.push(this.view[begin++]);\r\n            if (chars.length >= 1024)\r\n                parts.push(String.fromCharCode.apply(String, chars)),\r\n                chars = [];\r\n        }\r\n        return parts.join('') + String.fromCharCode.apply(String, chars);\r\n    };\r\n\r\n    /**\r\n     * Decodes a binary encoded string, that is using only characters 0x00-0xFF as bytes, to a ByteBuffer.\r\n     * @param {string} str String to decode\r\n     * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to\r\n     *  {@link ByteBuffer.DEFAULT_ENDIAN}.\r\n     * @returns {!ByteBuffer} ByteBuffer\r\n     * @expose\r\n     */\r\n    ByteBuffer.fromBinary = function(str, littleEndian) {\r\n        if (typeof str !== 'string')\r\n            throw TypeError(\"str\");\r\n        var i = 0,\r\n            k = str.length,\r\n            charCode,\r\n            bb = new ByteBuffer(k, littleEndian);\r\n        while (i 0xff)\r\n                throw RangeError(\"illegal char code: \"+charCode);\r\n            bb.view[i++] = charCode;\r\n        }\r\n        bb.limit = k;\r\n        return bb;\r\n    };\r\n\r\n    // encodings/debug\r\n\r\n    /**\r\n     * Encodes this ByteBuffer to a hex encoded string with marked offsets. Offset symbols are:\r\n     * * `<` : offset,\r\n     * * `'` : markedOffset,\r\n     * * `>` : limit,\r\n     * * `|` : offset and limit,\r\n     * * `[` : offset and markedOffset,\r\n     * * `]` : markedOffset and limit,\r\n     * * `!` : offset, markedOffset and limit\r\n     * @param {boolean=} columns If `true` returns two columns hex + ascii, defaults to `false`\r\n     * @returns {string|!Array.} Debug string or array of lines if `asArray = true`\r\n     * @expose\r\n     * @example `>00'01 02<03` contains four bytes with `limit=0, markedOffset=1, offset=3`\r\n     * @example `00[01 02 03>` contains four bytes with `offset=markedOffset=1, limit=4`\r\n     * @example `00|01 02 03` contains four bytes with `offset=limit=1, markedOffset=-1`\r\n     * @example `|` contains zero bytes with `offset=limit=0, markedOffset=-1`\r\n     */\r\n    ByteBufferPrototype.toDebug = function(columns) {\r\n        var i = -1,\r\n            k = this.buffer.byteLength,\r\n            b,\r\n            hex = \"\",\r\n            asc = \"\",\r\n            out = \"\";\r\n        while (i 32 && b < 127 ? String.fromCharCode(b) : '.';\r\n            }\r\n            ++i;\r\n            if (columns) {\r\n                if (i > 0 && i % 16 === 0 && i !== k) {\r\n                    while (hex.length < 3*16+3) hex += \" \";\r\n                    out += hex+asc+\"\\n\";\r\n                    hex = asc = \"\";\r\n                }\r\n            }\r\n            if (i === this.offset && i === this.limit)\r\n                hex += i === this.markedOffset ? \"!\" : \"|\";\r\n            else if (i === this.offset)\r\n                hex += i === this.markedOffset ? \"[\" : \"<\";\r\n            else if (i === this.limit)\r\n                hex += i === this.markedOffset ? \"]\" : \">\";\r\n            else\r\n                hex += i === this.markedOffset ? \"'\" : (columns || (i !== 0 && i !== k) ? \" \" : \"\");\r\n        }\r\n        if (columns && hex !== \" \") {\r\n            while (hex.length < 3*16+3)\r\n                hex += \" \";\r\n            out += hex + asc + \"\\n\";\r\n        }\r\n        return columns ? out : hex;\r\n    };\r\n\r\n    /**\r\n     * Decodes a hex encoded string with marked offsets to a ByteBuffer.\r\n     * @param {string} str Debug string to decode (not be generated with `columns = true`)\r\n     * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to\r\n     *  {@link ByteBuffer.DEFAULT_ENDIAN}.\r\n     * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to\r\n     *  {@link ByteBuffer.DEFAULT_NOASSERT}.\r\n     * @returns {!ByteBuffer} ByteBuffer\r\n     * @expose\r\n     * @see ByteBuffer#toDebug\r\n     */\r\n    ByteBuffer.fromDebug = function(str, littleEndian, noAssert) {\r\n        var k = str.length,\r\n            bb = new ByteBuffer(((k+1)/3)|0, littleEndian, noAssert);\r\n        var i = 0, j = 0, ch, b,\r\n            rs = false, // Require symbol next\r\n            ho = false, hm = false, hl = false, // Already has offset (ho), markedOffset (hm), limit (hl)?\r\n            fail = false;\r\n        while (i':\r\n                    if (!noAssert) {\r\n                        if (hl) {\r\n                            fail = true;\r\n                            break;\r\n                        }\r\n                        hl = true;\r\n                    }\r\n                    bb.limit = j;\r\n                    rs = false;\r\n                    break;\r\n                case \"'\":\r\n                    if (!noAssert) {\r\n                        if (hm) {\r\n                            fail = true;\r\n                            break;\r\n                        }\r\n                        hm = true;\r\n                    }\r\n                    bb.markedOffset = j;\r\n                    rs = false;\r\n                    break;\r\n                case ' ':\r\n                    rs = false;\r\n                    break;\r\n                default:\r\n                    if (!noAssert) {\r\n                        if (rs) {\r\n                            fail = true;\r\n                            break;\r\n                        }\r\n                    }\r\n                    b = parseInt(ch+str.charAt(i++), 16);\r\n                    if (!noAssert) {\r\n                        if (isNaN(b) || b < 0 || b > 255)\r\n                            throw TypeError(\"Illegal str: Not a debug encoded string\");\r\n                    }\r\n                    bb.view[j++] = b;\r\n                    rs = true;\r\n            }\r\n            if (fail)\r\n                throw TypeError(\"Illegal str: Invalid symbol at \"+i);\r\n        }\r\n        if (!noAssert) {\r\n            if (!ho || !hl)\r\n                throw TypeError(\"Illegal str: Missing offset or limit\");\r\n            if (j>>= 0;\n            if (typeof end !== 'number' || end % 1 !== 0)\n                throw TypeError(\"Illegal end: Not an integer\");\n            end >>>= 0;\n            if (begin < 0 || begin > end || end > this.buffer.byteLength)\n                throw RangeError(\"Illegal range: 0 <= \"+begin+\" <= \"+end+\" <= \"+this.buffer.byteLength);\n        }\r\n        var out = new Array(end - begin),\r\n            b;\r\n        while (begin < end) {\r\n            b = this.view[begin++];\r\n            if (b < 0x10)\r\n                out.push(\"0\", b.toString(16));\r\n            else out.push(b.toString(16));\r\n        }\r\n        return out.join('');\r\n    };\r\n\r\n    /**\r\n     * Decodes a hex encoded string to a ByteBuffer.\r\n     * @param {string} str String to decode\r\n     * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to\r\n     *  {@link ByteBuffer.DEFAULT_ENDIAN}.\r\n     * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to\r\n     *  {@link ByteBuffer.DEFAULT_NOASSERT}.\r\n     * @returns {!ByteBuffer} ByteBuffer\r\n     * @expose\r\n     */\r\n    ByteBuffer.fromHex = function(str, littleEndian, noAssert) {\r\n        if (!noAssert) {\r\n            if (typeof str !== 'string')\r\n                throw TypeError(\"Illegal str: Not a string\");\r\n            if (str.length % 2 !== 0)\r\n                throw TypeError(\"Illegal str: Length not a multiple of 2\");\r\n        }\r\n        var k = str.length,\r\n            bb = new ByteBuffer((k / 2) | 0, littleEndian),\r\n            b;\r\n        for (var i=0, j=0; i 255)\r\n                    throw TypeError(\"Illegal str: Contains non-hex characters\");\r\n            bb.view[j++] = b;\r\n        }\r\n        bb.limit = j;\r\n        return bb;\r\n    };\r\n\r\n    // utfx-embeddable\r\n\r\n    /**\r\n     * utfx-embeddable (c) 2014 Daniel Wirtz \r\n     * Released under the Apache License, Version 2.0\r\n     * see: https://github.com/dcodeIO/utfx for details\r\n     */\r\n    var utfx = function() {\r\n        \"use strict\";\r\n\r\n        /**\r\n         * utfx namespace.\r\n         * @inner\r\n         * @type {!Object.}\r\n         */\r\n        var utfx = {};\r\n\r\n        /**\r\n         * Maximum valid code point.\r\n         * @type {number}\r\n         * @const\r\n         */\r\n        utfx.MAX_CODEPOINT = 0x10FFFF;\r\n\r\n        /**\r\n         * Encodes UTF8 code points to UTF8 bytes.\r\n         * @param {(!function():number|null) | number} src Code points source, either as a function returning the next code point\r\n         *  respectively `null` if there are no more code points left or a single numeric code point.\r\n         * @param {!function(number)} dst Bytes destination as a function successively called with the next byte\r\n         */\r\n        utfx.encodeUTF8 = function(src, dst) {\r\n            var cp = null;\r\n            if (typeof src === 'number')\r\n                cp = src,\r\n                src = function() { return null; };\r\n            while (cp !== null || (cp = src()) !== null) {\r\n                if (cp < 0x80)\r\n                    dst(cp&0x7F);\r\n                else if (cp < 0x800)\r\n                    dst(((cp>>6)&0x1F)|0xC0),\r\n                    dst((cp&0x3F)|0x80);\r\n                else if (cp < 0x10000)\r\n                    dst(((cp>>12)&0x0F)|0xE0),\r\n                    dst(((cp>>6)&0x3F)|0x80),\r\n                    dst((cp&0x3F)|0x80);\r\n                else\r\n                    dst(((cp>>18)&0x07)|0xF0),\r\n                    dst(((cp>>12)&0x3F)|0x80),\r\n                    dst(((cp>>6)&0x3F)|0x80),\r\n                    dst((cp&0x3F)|0x80);\r\n                cp = null;\r\n            }\r\n        };\r\n\r\n        /**\r\n         * Decodes UTF8 bytes to UTF8 code points.\r\n         * @param {!function():number|null} src Bytes source as a function returning the next byte respectively `null` if there\r\n         *  are no more bytes left.\r\n         * @param {!function(number)} dst Code points destination as a function successively called with each decoded code point.\r\n         * @throws {RangeError} If a starting byte is invalid in UTF8\r\n         * @throws {Error} If the last sequence is truncated. Has an array property `bytes` holding the\r\n         *  remaining bytes.\r\n         */\r\n        utfx.decodeUTF8 = function(src, dst) {\r\n            var a, b, c, d, fail = function(b) {\r\n                b = b.slice(0, b.indexOf(null));\r\n                var err = Error(b.toString());\r\n                err.name = \"TruncatedError\";\r\n                err['bytes'] = b;\r\n                throw err;\r\n            };\r\n            while ((a = src()) !== null) {\r\n                if ((a&0x80) === 0)\r\n                    dst(a);\r\n                else if ((a&0xE0) === 0xC0)\r\n                    ((b = src()) === null) && fail([a, b]),\r\n                    dst(((a&0x1F)<<6) | (b&0x3F));\r\n                else if ((a&0xF0) === 0xE0)\r\n                    ((b=src()) === null || (c=src()) === null) && fail([a, b, c]),\r\n                    dst(((a&0x0F)<<12) | ((b&0x3F)<<6) | (c&0x3F));\r\n                else if ((a&0xF8) === 0xF0)\r\n                    ((b=src()) === null || (c=src()) === null || (d=src()) === null) && fail([a, b, c ,d]),\r\n                    dst(((a&0x07)<<18) | ((b&0x3F)<<12) | ((c&0x3F)<<6) | (d&0x3F));\r\n                else throw RangeError(\"Illegal starting byte: \"+a);\r\n            }\r\n        };\r\n\r\n        /**\r\n         * Converts UTF16 characters to UTF8 code points.\r\n         * @param {!function():number|null} src Characters source as a function returning the next char code respectively\r\n         *  `null` if there are no more characters left.\r\n         * @param {!function(number)} dst Code points destination as a function successively called with each converted code\r\n         *  point.\r\n         */\r\n        utfx.UTF16toUTF8 = function(src, dst) {\r\n            var c1, c2 = null;\r\n            while (true) {\r\n                if ((c1 = c2 !== null ? c2 : src()) === null)\r\n                    break;\r\n                if (c1 >= 0xD800 && c1 <= 0xDFFF) {\r\n                    if ((c2 = src()) !== null) {\r\n                        if (c2 >= 0xDC00 && c2 <= 0xDFFF) {\r\n                            dst((c1-0xD800)*0x400+c2-0xDC00+0x10000);\r\n                            c2 = null; continue;\r\n                        }\r\n                    }\r\n                }\r\n                dst(c1);\r\n            }\r\n            if (c2 !== null) dst(c2);\r\n        };\r\n\r\n        /**\r\n         * Converts UTF8 code points to UTF16 characters.\r\n         * @param {(!function():number|null) | number} src Code points source, either as a function returning the next code point\r\n         *  respectively `null` if there are no more code points left or a single numeric code point.\r\n         * @param {!function(number)} dst Characters destination as a function successively called with each converted char code.\r\n         * @throws {RangeError} If a code point is out of range\r\n         */\r\n        utfx.UTF8toUTF16 = function(src, dst) {\r\n            var cp = null;\r\n            if (typeof src === 'number')\r\n                cp = src, src = function() { return null; };\r\n            while (cp !== null || (cp = src()) !== null) {\r\n                if (cp <= 0xFFFF)\r\n                    dst(cp);\r\n                else\r\n                    cp -= 0x10000,\r\n                    dst((cp>>10)+0xD800),\r\n                    dst((cp%0x400)+0xDC00);\r\n                cp = null;\r\n            }\r\n        };\r\n\r\n        /**\r\n         * Converts and encodes UTF16 characters to UTF8 bytes.\r\n         * @param {!function():number|null} src Characters source as a function returning the next char code respectively `null`\r\n         *  if there are no more characters left.\r\n         * @param {!function(number)} dst Bytes destination as a function successively called with the next byte.\r\n         */\r\n        utfx.encodeUTF16toUTF8 = function(src, dst) {\r\n            utfx.UTF16toUTF8(src, function(cp) {\r\n                utfx.encodeUTF8(cp, dst);\r\n            });\r\n        };\r\n\r\n        /**\r\n         * Decodes and converts UTF8 bytes to UTF16 characters.\r\n         * @param {!function():number|null} src Bytes source as a function returning the next byte respectively `null` if there\r\n         *  are no more bytes left.\r\n         * @param {!function(number)} dst Characters destination as a function successively called with each converted char code.\r\n         * @throws {RangeError} If a starting byte is invalid in UTF8\r\n         * @throws {Error} If the last sequence is truncated. Has an array property `bytes` holding the remaining bytes.\r\n         */\r\n        utfx.decodeUTF8toUTF16 = function(src, dst) {\r\n            utfx.decodeUTF8(src, function(cp) {\r\n                utfx.UTF8toUTF16(cp, dst);\r\n            });\r\n        };\r\n\r\n        /**\r\n         * Calculates the byte length of an UTF8 code point.\r\n         * @param {number} cp UTF8 code point\r\n         * @returns {number} Byte length\r\n         */\r\n        utfx.calculateCodePoint = function(cp) {\r\n            return (cp < 0x80) ? 1 : (cp < 0x800) ? 2 : (cp < 0x10000) ? 3 : 4;\r\n        };\r\n\r\n        /**\r\n         * Calculates the number of UTF8 bytes required to store UTF8 code points.\r\n         * @param {(!function():number|null)} src Code points source as a function returning the next code point respectively\r\n         *  `null` if there are no more code points left.\r\n         * @returns {number} The number of UTF8 bytes required\r\n         */\r\n        utfx.calculateUTF8 = function(src) {\r\n            var cp, l=0;\r\n            while ((cp = src()) !== null)\r\n                l += (cp < 0x80) ? 1 : (cp < 0x800) ? 2 : (cp < 0x10000) ? 3 : 4;\r\n            return l;\r\n        };\r\n\r\n        /**\r\n         * Calculates the number of UTF8 code points respectively UTF8 bytes required to store UTF16 char codes.\r\n         * @param {(!function():number|null)} src Characters source as a function returning the next char code respectively\r\n         *  `null` if there are no more characters left.\r\n         * @returns {!Array.} The number of UTF8 code points at index 0 and the number of UTF8 bytes required at index 1.\r\n         */\r\n        utfx.calculateUTF16asUTF8 = function(src) {\r\n            var n=0, l=0;\r\n            utfx.UTF16toUTF8(src, function(cp) {\r\n                ++n; l += (cp < 0x80) ? 1 : (cp < 0x800) ? 2 : (cp < 0x10000) ? 3 : 4;\r\n            });\r\n            return [n,l];\r\n        };\r\n\r\n        return utfx;\r\n    }();\r\n\r\n    // encodings/utf8\r\n\r\n    /**\r\n     * Encodes this ByteBuffer's contents between {@link ByteBuffer#offset} and {@link ByteBuffer#limit} to an UTF8 encoded\r\n     *  string.\r\n     * @returns {string} Hex encoded string\r\n     * @throws {RangeError} If `offset > limit`\r\n     * @expose\r\n     */\r\n    ByteBufferPrototype.toUTF8 = function(begin, end) {\r\n        if (typeof begin === 'undefined') begin = this.offset;\r\n        if (typeof end === 'undefined') end = this.limit;\r\n        if (!this.noAssert) {\r\n            if (typeof begin !== 'number' || begin % 1 !== 0)\n                throw TypeError(\"Illegal begin: Not an integer\");\n            begin >>>= 0;\n            if (typeof end !== 'number' || end % 1 !== 0)\n                throw TypeError(\"Illegal end: Not an integer\");\n            end >>>= 0;\n            if (begin < 0 || begin > end || end > this.buffer.byteLength)\n                throw RangeError(\"Illegal range: 0 <= \"+begin+\" <= \"+end+\" <= \"+this.buffer.byteLength);\n        }\r\n        var sd; try {\r\n            utfx.decodeUTF8toUTF16(function() {\r\n                return begin < end ? this.view[begin++] : null;\r\n            }.bind(this), sd = stringDestination());\r\n        } catch (e) {\r\n            if (begin !== end)\r\n                throw RangeError(\"Illegal range: Truncated data, \"+begin+\" != \"+end);\r\n        }\r\n        return sd();\r\n    };\r\n\r\n    /**\r\n     * Decodes an UTF8 encoded string to a ByteBuffer.\r\n     * @param {string} str String to decode\r\n     * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to\r\n     *  {@link ByteBuffer.DEFAULT_ENDIAN}.\r\n     * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to\r\n     *  {@link ByteBuffer.DEFAULT_NOASSERT}.\r\n     * @returns {!ByteBuffer} ByteBuffer\r\n     * @expose\r\n     */\r\n    ByteBuffer.fromUTF8 = function(str, littleEndian, noAssert) {\r\n        if (!noAssert)\r\n            if (typeof str !== 'string')\r\n                throw TypeError(\"Illegal str: Not a string\");\r\n        var bb = new ByteBuffer(utfx.calculateUTF16asUTF8(stringSource(str), true)[1], littleEndian, noAssert),\r\n            i = 0;\r\n        utfx.encodeUTF16toUTF8(stringSource(str), function(b) {\r\n            bb.view[i++] = b;\r\n        });\r\n        bb.limit = i;\r\n        return bb;\r\n    };\r\n\r\n    return ByteBuffer;\r\n});\r\n","export default {};\n","/*\r\n Copyright 2013 Daniel Wirtz \r\n\r\n Licensed under the Apache License, Version 2.0 (the \"License\");\r\n you may not use this file except in compliance with the License.\r\n You may obtain a copy of the License at\r\n\r\n http://www.apache.org/licenses/LICENSE-2.0\r\n\r\n Unless required by applicable law or agreed to in writing, software\r\n distributed under the License is distributed on an \"AS IS\" BASIS,\r\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n See the License for the specific language governing permissions and\r\n limitations under the License.\r\n */\r\n\r\n/**\r\n * @license protobuf.js (c) 2013 Daniel Wirtz \r\n * Released under the Apache License, Version 2.0\r\n * see: https://github.com/dcodeIO/protobuf.js for details\r\n */\r\n(function(global, factory) {\r\n\r\n    /* AMD */ if (typeof define === 'function' && define[\"amd\"])\r\n        define([\"bytebuffer\"], factory);\r\n    /* CommonJS */ else if (typeof require === \"function\" && typeof module === \"object\" && module && module[\"exports\"])\r\n        module[\"exports\"] = factory(require(\"bytebuffer\"), true);\r\n    /* Global */ else\r\n        (global[\"dcodeIO\"] = global[\"dcodeIO\"] || {})[\"ProtoBuf\"] = factory(global[\"dcodeIO\"][\"ByteBuffer\"]);\r\n\r\n})(this, function(ByteBuffer, isCommonJS) {\r\n    \"use strict\";\r\n\r\n    /**\r\n     * The ProtoBuf namespace.\r\n     * @exports ProtoBuf\r\n     * @namespace\r\n     * @expose\r\n     */\r\n    var ProtoBuf = {};\r\n\r\n    /**\r\n     * @type {!function(new: ByteBuffer, ...[*])}\r\n     * @expose\r\n     */\r\n    ProtoBuf.ByteBuffer = ByteBuffer;\r\n\r\n    /**\r\n     * @type {?function(new: Long, ...[*])}\r\n     * @expose\r\n     */\r\n    ProtoBuf.Long = ByteBuffer.Long || null;\r\n\r\n    /**\r\n     * ProtoBuf.js version.\r\n     * @type {string}\r\n     * @const\r\n     * @expose\r\n     */\r\n    ProtoBuf.VERSION = \"5.0.2\";\r\n\r\n    /**\r\n     * Wire types.\r\n     * @type {Object.}\r\n     * @const\r\n     * @expose\r\n     */\r\n    ProtoBuf.WIRE_TYPES = {};\r\n\r\n    /**\r\n     * Varint wire type.\r\n     * @type {number}\r\n     * @expose\r\n     */\r\n    ProtoBuf.WIRE_TYPES.VARINT = 0;\r\n\r\n    /**\r\n     * Fixed 64 bits wire type.\r\n     * @type {number}\r\n     * @const\r\n     * @expose\r\n     */\r\n    ProtoBuf.WIRE_TYPES.BITS64 = 1;\r\n\r\n    /**\r\n     * Length delimited wire type.\r\n     * @type {number}\r\n     * @const\r\n     * @expose\r\n     */\r\n    ProtoBuf.WIRE_TYPES.LDELIM = 2;\r\n\r\n    /**\r\n     * Start group wire type.\r\n     * @type {number}\r\n     * @const\r\n     * @expose\r\n     */\r\n    ProtoBuf.WIRE_TYPES.STARTGROUP = 3;\r\n\r\n    /**\r\n     * End group wire type.\r\n     * @type {number}\r\n     * @const\r\n     * @expose\r\n     */\r\n    ProtoBuf.WIRE_TYPES.ENDGROUP = 4;\r\n\r\n    /**\r\n     * Fixed 32 bits wire type.\r\n     * @type {number}\r\n     * @const\r\n     * @expose\r\n     */\r\n    ProtoBuf.WIRE_TYPES.BITS32 = 5;\r\n\r\n    /**\r\n     * Packable wire types.\r\n     * @type {!Array.}\r\n     * @const\r\n     * @expose\r\n     */\r\n    ProtoBuf.PACKABLE_WIRE_TYPES = [\r\n        ProtoBuf.WIRE_TYPES.VARINT,\r\n        ProtoBuf.WIRE_TYPES.BITS64,\r\n        ProtoBuf.WIRE_TYPES.BITS32\r\n    ];\r\n\r\n    /**\r\n     * Types.\r\n     * @dict\r\n     * @type {!Object.}\r\n     * @const\r\n     * @expose\r\n     */\r\n    ProtoBuf.TYPES = {\r\n        // According to the protobuf spec.\r\n        \"int32\": {\r\n            name: \"int32\",\r\n            wireType: ProtoBuf.WIRE_TYPES.VARINT,\r\n            defaultValue: 0\r\n        },\r\n        \"uint32\": {\r\n            name: \"uint32\",\r\n            wireType: ProtoBuf.WIRE_TYPES.VARINT,\r\n            defaultValue: 0\r\n        },\r\n        \"sint32\": {\r\n            name: \"sint32\",\r\n            wireType: ProtoBuf.WIRE_TYPES.VARINT,\r\n            defaultValue: 0\r\n        },\r\n        \"int64\": {\r\n            name: \"int64\",\r\n            wireType: ProtoBuf.WIRE_TYPES.VARINT,\r\n            defaultValue: ProtoBuf.Long ? ProtoBuf.Long.ZERO : undefined\r\n        },\r\n        \"uint64\": {\r\n            name: \"uint64\",\r\n            wireType: ProtoBuf.WIRE_TYPES.VARINT,\r\n            defaultValue: ProtoBuf.Long ? ProtoBuf.Long.UZERO : undefined\r\n        },\r\n        \"sint64\": {\r\n            name: \"sint64\",\r\n            wireType: ProtoBuf.WIRE_TYPES.VARINT,\r\n            defaultValue: ProtoBuf.Long ? ProtoBuf.Long.ZERO : undefined\r\n        },\r\n        \"bool\": {\r\n            name: \"bool\",\r\n            wireType: ProtoBuf.WIRE_TYPES.VARINT,\r\n            defaultValue: false\r\n        },\r\n        \"double\": {\r\n            name: \"double\",\r\n            wireType: ProtoBuf.WIRE_TYPES.BITS64,\r\n            defaultValue: 0\r\n        },\r\n        \"string\": {\r\n            name: \"string\",\r\n            wireType: ProtoBuf.WIRE_TYPES.LDELIM,\r\n            defaultValue: \"\"\r\n        },\r\n        \"bytes\": {\r\n            name: \"bytes\",\r\n            wireType: ProtoBuf.WIRE_TYPES.LDELIM,\r\n            defaultValue: null // overridden in the code, must be a unique instance\r\n        },\r\n        \"fixed32\": {\r\n            name: \"fixed32\",\r\n            wireType: ProtoBuf.WIRE_TYPES.BITS32,\r\n            defaultValue: 0\r\n        },\r\n        \"sfixed32\": {\r\n            name: \"sfixed32\",\r\n            wireType: ProtoBuf.WIRE_TYPES.BITS32,\r\n            defaultValue: 0\r\n        },\r\n        \"fixed64\": {\r\n            name: \"fixed64\",\r\n            wireType: ProtoBuf.WIRE_TYPES.BITS64,\r\n            defaultValue:  ProtoBuf.Long ? ProtoBuf.Long.UZERO : undefined\r\n        },\r\n        \"sfixed64\": {\r\n            name: \"sfixed64\",\r\n            wireType: ProtoBuf.WIRE_TYPES.BITS64,\r\n            defaultValue: ProtoBuf.Long ? ProtoBuf.Long.ZERO : undefined\r\n        },\r\n        \"float\": {\r\n            name: \"float\",\r\n            wireType: ProtoBuf.WIRE_TYPES.BITS32,\r\n            defaultValue: 0\r\n        },\r\n        \"enum\": {\r\n            name: \"enum\",\r\n            wireType: ProtoBuf.WIRE_TYPES.VARINT,\r\n            defaultValue: 0\r\n        },\r\n        \"message\": {\r\n            name: \"message\",\r\n            wireType: ProtoBuf.WIRE_TYPES.LDELIM,\r\n            defaultValue: null\r\n        },\r\n        \"group\": {\r\n            name: \"group\",\r\n            wireType: ProtoBuf.WIRE_TYPES.STARTGROUP,\r\n            defaultValue: null\r\n        }\r\n    };\r\n\r\n    /**\r\n     * Valid map key types.\r\n     * @type {!Array.>}\r\n     * @const\r\n     * @expose\r\n     */\r\n    ProtoBuf.MAP_KEY_TYPES = [\r\n        ProtoBuf.TYPES[\"int32\"],\r\n        ProtoBuf.TYPES[\"sint32\"],\r\n        ProtoBuf.TYPES[\"sfixed32\"],\r\n        ProtoBuf.TYPES[\"uint32\"],\r\n        ProtoBuf.TYPES[\"fixed32\"],\r\n        ProtoBuf.TYPES[\"int64\"],\r\n        ProtoBuf.TYPES[\"sint64\"],\r\n        ProtoBuf.TYPES[\"sfixed64\"],\r\n        ProtoBuf.TYPES[\"uint64\"],\r\n        ProtoBuf.TYPES[\"fixed64\"],\r\n        ProtoBuf.TYPES[\"bool\"],\r\n        ProtoBuf.TYPES[\"string\"],\r\n        ProtoBuf.TYPES[\"bytes\"]\r\n    ];\r\n\r\n    /**\r\n     * Minimum field id.\r\n     * @type {number}\r\n     * @const\r\n     * @expose\r\n     */\r\n    ProtoBuf.ID_MIN = 1;\r\n\r\n    /**\r\n     * Maximum field id.\r\n     * @type {number}\r\n     * @const\r\n     * @expose\r\n     */\r\n    ProtoBuf.ID_MAX = 0x1FFFFFFF;\r\n\r\n    /**\r\n     * If set to `true`, field names will be converted from underscore notation to camel case. Defaults to `false`.\r\n     *  Must be set prior to parsing.\r\n     * @type {boolean}\r\n     * @expose\r\n     */\r\n    ProtoBuf.convertFieldsToCamelCase = false;\r\n\r\n    /**\r\n     * By default, messages are populated with (setX, set_x) accessors for each field. This can be disabled by\r\n     *  setting this to `false` prior to building messages.\r\n     * @type {boolean}\r\n     * @expose\r\n     */\r\n    ProtoBuf.populateAccessors = true;\r\n\r\n    /**\r\n     * By default, messages are populated with default values if a field is not present on the wire. To disable\r\n     *  this behavior, set this setting to `false`.\r\n     * @type {boolean}\r\n     * @expose\r\n     */\r\n    ProtoBuf.populateDefaults = true;\r\n\r\n    /**\r\n     * @alias ProtoBuf.Util\r\n     * @expose\r\n     */\r\n    ProtoBuf.Util = (function() {\r\n        \"use strict\";\r\n\r\n        /**\r\n         * ProtoBuf utilities.\r\n         * @exports ProtoBuf.Util\r\n         * @namespace\r\n         */\r\n        var Util = {};\r\n\r\n        /**\r\n         * Flag if running in node or not.\r\n         * @type {boolean}\r\n         * @const\r\n         * @expose\r\n         */\r\n        Util.IS_NODE = !!(\r\n            typeof process === 'object' && process+'' === '[object process]' && !process['browser']\r\n        );\r\n\r\n        /**\r\n         * Constructs a XMLHttpRequest object.\r\n         * @return {XMLHttpRequest}\r\n         * @throws {Error} If XMLHttpRequest is not supported\r\n         * @expose\r\n         */\r\n        Util.XHR = function() {\r\n            // No dependencies please, ref: http://www.quirksmode.org/js/xmlhttp.html\r\n            var XMLHttpFactories = [\r\n                function () {return new XMLHttpRequest()},\r\n                function () {return new ActiveXObject(\"Msxml2.XMLHTTP\")},\r\n                function () {return new ActiveXObject(\"Msxml3.XMLHTTP\")},\r\n                function () {return new ActiveXObject(\"Microsoft.XMLHTTP\")}\r\n            ];\r\n            /** @type {?XMLHttpRequest} */\r\n            var xhr = null;\r\n            for (var i=0;i}\r\n     * @expose\r\n     */\r\n    ProtoBuf.Lang = {\r\n\r\n        // Characters always ending a statement\r\n        DELIM: /[\\s\\{\\}=;:\\[\\],'\"\\(\\)<>]/g,\r\n\r\n        // Field rules\r\n        RULE: /^(?:required|optional|repeated|map)$/,\r\n\r\n        // Field types\r\n        TYPE: /^(?:double|float|int32|uint32|sint32|int64|uint64|sint64|fixed32|sfixed32|fixed64|sfixed64|bool|string|bytes)$/,\r\n\r\n        // Names\r\n        NAME: /^[a-zA-Z_][a-zA-Z_0-9]*$/,\r\n\r\n        // Type definitions\r\n        TYPEDEF: /^[a-zA-Z][a-zA-Z_0-9]*$/,\r\n\r\n        // Type references\r\n        TYPEREF: /^(?:\\.?[a-zA-Z_][a-zA-Z_0-9]*)+$/,\r\n\r\n        // Fully qualified type references\r\n        FQTYPEREF: /^(?:\\.[a-zA-Z][a-zA-Z_0-9]*)+$/,\r\n\r\n        // All numbers\r\n        NUMBER: /^-?(?:[1-9][0-9]*|0|0[xX][0-9a-fA-F]+|0[0-7]+|([0-9]*(\\.[0-9]*)?([Ee][+-]?[0-9]+)?)|inf|nan)$/,\r\n\r\n        // Decimal numbers\r\n        NUMBER_DEC: /^(?:[1-9][0-9]*|0)$/,\r\n\r\n        // Hexadecimal numbers\r\n        NUMBER_HEX: /^0[xX][0-9a-fA-F]+$/,\r\n\r\n        // Octal numbers\r\n        NUMBER_OCT: /^0[0-7]+$/,\r\n\r\n        // Floating point numbers\r\n        NUMBER_FLT: /^([0-9]*(\\.[0-9]*)?([Ee][+-]?[0-9]+)?|inf|nan)$/,\r\n\r\n        // Booleans\r\n        BOOL: /^(?:true|false)$/i,\r\n\r\n        // Id numbers\r\n        ID: /^(?:[1-9][0-9]*|0|0[xX][0-9a-fA-F]+|0[0-7]+)$/,\r\n\r\n        // Negative id numbers (enum values)\r\n        NEGID: /^\\-?(?:[1-9][0-9]*|0|0[xX][0-9a-fA-F]+|0[0-7]+)$/,\r\n\r\n        // Whitespaces\r\n        WHITESPACE: /\\s/,\r\n\r\n        // All strings\r\n        STRING: /(?:\"([^\"\\\\]*(?:\\\\.[^\"\\\\]*)*)\")|(?:'([^'\\\\]*(?:\\\\.[^'\\\\]*)*)')/g,\r\n\r\n        // Double quoted strings\r\n        STRING_DQ: /(?:\"([^\"\\\\]*(?:\\\\.[^\"\\\\]*)*)\")/g,\r\n\r\n        // Single quoted strings\r\n        STRING_SQ: /(?:'([^'\\\\]*(?:\\\\.[^'\\\\]*)*)')/g\r\n    };\r\n\r\n\r\n    /**\r\n     * @alias ProtoBuf.Reflect\r\n     * @expose\r\n     */\r\n    ProtoBuf.Reflect = (function(ProtoBuf) {\r\n        \"use strict\";\r\n\r\n        /**\r\n         * Reflection types.\r\n         * @exports ProtoBuf.Reflect\r\n         * @namespace\r\n         */\r\n        var Reflect = {};\r\n\r\n        /**\r\n         * Constructs a Reflect base class.\r\n         * @exports ProtoBuf.Reflect.T\r\n         * @constructor\r\n         * @abstract\r\n         * @param {!ProtoBuf.Builder} builder Builder reference\r\n         * @param {?ProtoBuf.Reflect.T} parent Parent object\r\n         * @param {string} name Object name\r\n         */\r\n        var T = function(builder, parent, name) {\r\n\r\n            /**\r\n             * Builder reference.\r\n             * @type {!ProtoBuf.Builder}\r\n             * @expose\r\n             */\r\n            this.builder = builder;\r\n\r\n            /**\r\n             * Parent object.\r\n             * @type {?ProtoBuf.Reflect.T}\r\n             * @expose\r\n             */\r\n            this.parent = parent;\r\n\r\n            /**\r\n             * Object name in namespace.\r\n             * @type {string}\r\n             * @expose\r\n             */\r\n            this.name = name;\r\n\r\n            /**\r\n             * Fully qualified class name\r\n             * @type {string}\r\n             * @expose\r\n             */\r\n            this.className;\r\n        };\r\n\r\n        /**\r\n         * @alias ProtoBuf.Reflect.T.prototype\r\n         * @inner\r\n         */\r\n        var TPrototype = T.prototype;\r\n\r\n        /**\r\n         * Returns the fully qualified name of this object.\r\n         * @returns {string} Fully qualified name as of \".PATH.TO.THIS\"\r\n         * @expose\r\n         */\r\n        TPrototype.fqn = function() {\r\n            var name = this.name,\r\n                ptr = this;\r\n            do {\r\n                ptr = ptr.parent;\r\n                if (ptr == null)\r\n                    break;\r\n                name = ptr.name+\".\"+name;\r\n            } while (true);\r\n            return name;\r\n        };\r\n\r\n        /**\r\n         * Returns a string representation of this Reflect object (its fully qualified name).\r\n         * @param {boolean=} includeClass Set to true to include the class name. Defaults to false.\r\n         * @return String representation\r\n         * @expose\r\n         */\r\n        TPrototype.toString = function(includeClass) {\r\n            return (includeClass ? this.className + \" \" : \"\") + this.fqn();\r\n        };\r\n\r\n        /**\r\n         * Builds this type.\r\n         * @throws {Error} If this type cannot be built directly\r\n         * @expose\r\n         */\r\n        TPrototype.build = function() {\r\n            throw Error(this.toString(true)+\" cannot be built directly\");\r\n        };\r\n\r\n        /**\r\n         * @alias ProtoBuf.Reflect.T\r\n         * @expose\r\n         */\r\n        Reflect.T = T;\r\n\r\n        /**\r\n         * Constructs a new Namespace.\r\n         * @exports ProtoBuf.Reflect.Namespace\r\n         * @param {!ProtoBuf.Builder} builder Builder reference\r\n         * @param {?ProtoBuf.Reflect.Namespace} parent Namespace parent\r\n         * @param {string} name Namespace name\r\n         * @param {Object.=} options Namespace options\r\n         * @param {string?} syntax The syntax level of this definition (e.g., proto3)\r\n         * @constructor\r\n         * @extends ProtoBuf.Reflect.T\r\n         */\r\n        var Namespace = function(builder, parent, name, options, syntax) {\r\n            T.call(this, builder, parent, name);\r\n\r\n            /**\r\n             * @override\r\n             */\r\n            this.className = \"Namespace\";\r\n\r\n            /**\r\n             * Children inside the namespace.\r\n             * @type {!Array.}\r\n             */\r\n            this.children = [];\r\n\r\n            /**\r\n             * Options.\r\n             * @type {!Object.}\r\n             */\r\n            this.options = options || {};\r\n\r\n            /**\r\n             * Syntax level (e.g., proto2 or proto3).\r\n             * @type {!string}\r\n             */\r\n            this.syntax = syntax || \"proto2\";\r\n        };\r\n\r\n        /**\r\n         * @alias ProtoBuf.Reflect.Namespace.prototype\r\n         * @inner\r\n         */\r\n        var NamespacePrototype = Namespace.prototype = Object.create(T.prototype);\r\n\r\n        /**\r\n         * Returns an array of the namespace's children.\r\n         * @param {ProtoBuf.Reflect.T=} type Filter type (returns instances of this type only). Defaults to null (all children).\r\n         * @return {Array.}\r\n         * @expose\r\n         */\r\n        NamespacePrototype.getChildren = function(type) {\r\n            type = type || null;\r\n            if (type == null)\r\n                return this.children.slice();\r\n            var children = [];\r\n            for (var i=0, k=this.children.length; i} qn Qualified name to resolve\r\n         * @param {boolean=} excludeNonNamespace Excludes non-namespace types, defaults to `false`\r\n         * @return {?ProtoBuf.Reflect.Namespace} The resolved type or null if not found\r\n         * @expose\r\n         */\r\n        NamespacePrototype.resolve = function(qn, excludeNonNamespace) {\r\n            var part = typeof qn === 'string' ? qn.split(\".\") : qn,\r\n                ptr = this,\r\n                i = 0;\r\n            if (part[i] === \"\") { // Fully qualified name, e.g. \".My.Message'\r\n                while (ptr.parent !== null)\r\n                    ptr = ptr.parent;\r\n                i++;\r\n            }\r\n            var child;\r\n            do {\r\n                do {\r\n                    if (!(ptr instanceof Reflect.Namespace)) {\r\n                        ptr = null;\r\n                        break;\r\n                    }\r\n                    child = ptr.getChild(part[i]);\r\n                    if (!child || !(child instanceof Reflect.T) || (excludeNonNamespace && !(child instanceof Reflect.Namespace))) {\r\n                        ptr = null;\r\n                        break;\r\n                    }\r\n                    ptr = child; i++;\r\n                } while (i < part.length);\r\n                if (ptr != null)\r\n                    break; // Found\r\n                // Else search the parent\r\n                if (this.parent !== null)\r\n                    return this.parent.resolve(qn, excludeNonNamespace);\r\n            } while (ptr != null);\r\n            return ptr;\r\n        };\r\n\r\n        /**\r\n         * Determines the shortest qualified name of the specified type, if any, relative to this namespace.\r\n         * @param {!ProtoBuf.Reflect.T} t Reflection type\r\n         * @returns {string} The shortest qualified name or, if there is none, the fqn\r\n         * @expose\r\n         */\r\n        NamespacePrototype.qn = function(t) {\r\n            var part = [], ptr = t;\r\n            do {\r\n                part.unshift(ptr.name);\r\n                ptr = ptr.parent;\r\n            } while (ptr !== null);\r\n            for (var len=1; len <= part.length; len++) {\r\n                var qn = part.slice(part.length-len);\r\n                if (t === this.resolve(qn, t instanceof Reflect.Namespace))\r\n                    return qn.join(\".\");\r\n            }\r\n            return t.fqn();\r\n        };\r\n\r\n        /**\r\n         * Builds the namespace and returns the runtime counterpart.\r\n         * @return {Object.} Runtime namespace\r\n         * @expose\r\n         */\r\n        NamespacePrototype.build = function() {\r\n            /** @dict */\r\n            var ns = {};\r\n            var children = this.children;\r\n            for (var i=0, k=children.length, child; i}\r\n         */\r\n        NamespacePrototype.buildOpt = function() {\r\n            var opt = {},\r\n                keys = Object.keys(this.options);\r\n            for (var i=0, k=keys.length; i}null} Option value or NULL if there is no such option\r\n         */\r\n        NamespacePrototype.getOption = function(name) {\r\n            if (typeof name === 'undefined')\r\n                return this.options;\r\n            return typeof this.options[name] !== 'undefined' ? this.options[name] : null;\r\n        };\r\n\r\n        /**\r\n         * @alias ProtoBuf.Reflect.Namespace\r\n         * @expose\r\n         */\r\n        Reflect.Namespace = Namespace;\r\n\r\n        /**\r\n         * Constructs a new Element implementation that checks and converts values for a\r\n         * particular field type, as appropriate.\r\n         *\r\n         * An Element represents a single value: either the value of a singular field,\r\n         * or a value contained in one entry of a repeated field or map field. This\r\n         * class does not implement these higher-level concepts; it only encapsulates\r\n         * the low-level typechecking and conversion.\r\n         *\r\n         * @exports ProtoBuf.Reflect.Element\r\n         * @param {{name: string, wireType: number}} type Resolved data type\r\n         * @param {ProtoBuf.Reflect.T|null} resolvedType Resolved type, if relevant\r\n         * (e.g. submessage field).\r\n         * @param {boolean} isMapKey Is this element a Map key? The value will be\r\n         * converted to string form if so.\r\n         * @param {string} syntax Syntax level of defining message type, e.g.,\r\n         * proto2 or proto3.\r\n         * @param {string} name Name of the field containing this element (for error\r\n         * messages)\r\n         * @constructor\r\n         */\r\n        var Element = function(type, resolvedType, isMapKey, syntax, name) {\r\n\r\n            /**\r\n             * Element type, as a string (e.g., int32).\r\n             * @type {{name: string, wireType: number}}\r\n             */\r\n            this.type = type;\r\n\r\n            /**\r\n             * Element type reference to submessage or enum definition, if needed.\r\n             * @type {ProtoBuf.Reflect.T|null}\r\n             */\r\n            this.resolvedType = resolvedType;\r\n\r\n            /**\r\n             * Element is a map key.\r\n             * @type {boolean}\r\n             */\r\n            this.isMapKey = isMapKey;\r\n\r\n            /**\r\n             * Syntax level of defining message type, e.g., proto2 or proto3.\r\n             * @type {string}\r\n             */\r\n            this.syntax = syntax;\r\n\r\n            /**\r\n             * Name of the field containing this element (for error messages)\r\n             * @type {string}\r\n             */\r\n            this.name = name;\r\n\r\n            if (isMapKey && ProtoBuf.MAP_KEY_TYPES.indexOf(type) < 0)\r\n                throw Error(\"Invalid map key type: \" + type.name);\r\n        };\r\n\r\n        var ElementPrototype = Element.prototype;\r\n\r\n        /**\r\n         * Obtains a (new) default value for the specified type.\r\n         * @param type {string|{name: string, wireType: number}} Field type\r\n         * @returns {*} Default value\r\n         * @inner\r\n         */\r\n        function mkDefault(type) {\r\n            if (typeof type === 'string')\r\n                type = ProtoBuf.TYPES[type];\r\n            if (typeof type.defaultValue === 'undefined')\r\n                throw Error(\"default value for type \"+type.name+\" is not supported\");\r\n            if (type == ProtoBuf.TYPES[\"bytes\"])\r\n                return new ByteBuffer(0);\r\n            return type.defaultValue;\r\n        }\r\n\r\n        /**\r\n         * Returns the default value for this field in proto3.\r\n         * @function\r\n         * @param type {string|{name: string, wireType: number}} the field type\r\n         * @returns {*} Default value\r\n         */\r\n        Element.defaultFieldValue = mkDefault;\r\n\r\n        /**\r\n         * Makes a Long from a value.\r\n         * @param {{low: number, high: number, unsigned: boolean}|string|number} value Value\r\n         * @param {boolean=} unsigned Whether unsigned or not, defaults to reuse it from Long-like objects or to signed for\r\n         *  strings and numbers\r\n         * @returns {!Long}\r\n         * @throws {Error} If the value cannot be converted to a Long\r\n         * @inner\r\n         */\r\n        function mkLong(value, unsigned) {\r\n            if (value && typeof value.low === 'number' && typeof value.high === 'number' && typeof value.unsigned === 'boolean'\r\n                && value.low === value.low && value.high === value.high)\r\n                return new ProtoBuf.Long(value.low, value.high, typeof unsigned === 'undefined' ? value.unsigned : unsigned);\r\n            if (typeof value === 'string')\r\n                return ProtoBuf.Long.fromString(value, unsigned || false, 10);\r\n            if (typeof value === 'number')\r\n                return ProtoBuf.Long.fromNumber(value, unsigned || false);\r\n            throw Error(\"not convertible to Long\");\r\n        }\r\n\r\n        ElementPrototype.toString = function() {\r\n            return (this.name || '') + (this.isMapKey ? 'map' : 'value') + ' element';\r\n        }\r\n\r\n        /**\r\n         * Checks if the given value can be set for an element of this type (singular\r\n         * field or one element of a repeated field or map).\r\n         * @param {*} value Value to check\r\n         * @return {*} Verified, maybe adjusted, value\r\n         * @throws {Error} If the value cannot be verified for this element slot\r\n         * @expose\r\n         */\r\n        ElementPrototype.verifyValue = function(value) {\r\n            var self = this;\r\n            function fail(val, msg) {\r\n                throw Error(\"Illegal value for \"+self.toString(true)+\" of type \"+self.type.name+\": \"+val+\" (\"+msg+\")\");\r\n            }\r\n            switch (this.type) {\r\n                // Signed 32bit\r\n                case ProtoBuf.TYPES[\"int32\"]:\r\n                case ProtoBuf.TYPES[\"sint32\"]:\r\n                case ProtoBuf.TYPES[\"sfixed32\"]:\r\n                    // Account for !NaN: value === value\r\n                    if (typeof value !== 'number' || (value === value && value % 1 !== 0))\r\n                        fail(typeof value, \"not an integer\");\r\n                    return value > 4294967295 ? value | 0 : value;\r\n\r\n                // Unsigned 32bit\r\n                case ProtoBuf.TYPES[\"uint32\"]:\r\n                case ProtoBuf.TYPES[\"fixed32\"]:\r\n                    if (typeof value !== 'number' || (value === value && value % 1 !== 0))\r\n                        fail(typeof value, \"not an integer\");\r\n                    return value < 0 ? value >>> 0 : value;\r\n\r\n                // Signed 64bit\r\n                case ProtoBuf.TYPES[\"int64\"]:\r\n                case ProtoBuf.TYPES[\"sint64\"]:\r\n                case ProtoBuf.TYPES[\"sfixed64\"]: {\r\n                    if (ProtoBuf.Long)\r\n                        try {\r\n                            return mkLong(value, false);\r\n                        } catch (e) {\r\n                            fail(typeof value, e.message);\r\n                        }\r\n                    else\r\n                        fail(typeof value, \"requires Long.js\");\r\n                }\r\n\r\n                // Unsigned 64bit\r\n                case ProtoBuf.TYPES[\"uint64\"]:\r\n                case ProtoBuf.TYPES[\"fixed64\"]: {\r\n                    if (ProtoBuf.Long)\r\n                        try {\r\n                            return mkLong(value, true);\r\n                        } catch (e) {\r\n                            fail(typeof value, e.message);\r\n                        }\r\n                    else\r\n                        fail(typeof value, \"requires Long.js\");\r\n                }\r\n\r\n                // Bool\r\n                case ProtoBuf.TYPES[\"bool\"]:\r\n                    if (typeof value !== 'boolean')\r\n                        fail(typeof value, \"not a boolean\");\r\n                    return value;\r\n\r\n                // Float\r\n                case ProtoBuf.TYPES[\"float\"]:\r\n                case ProtoBuf.TYPES[\"double\"]:\r\n                    if (typeof value !== 'number')\r\n                        fail(typeof value, \"not a number\");\r\n                    return value;\r\n\r\n                // Length-delimited string\r\n                case ProtoBuf.TYPES[\"string\"]:\r\n                    if (typeof value !== 'string' && !(value && value instanceof String))\r\n                        fail(typeof value, \"not a string\");\r\n                    return \"\"+value; // Convert String object to string\r\n\r\n                // Length-delimited bytes\r\n                case ProtoBuf.TYPES[\"bytes\"]:\r\n                    if (ByteBuffer.isByteBuffer(value))\r\n                        return value;\r\n                    return ByteBuffer.wrap(value, \"base64\");\r\n\r\n                // Constant enum value\r\n                case ProtoBuf.TYPES[\"enum\"]: {\r\n                    var values = this.resolvedType.getChildren(ProtoBuf.Reflect.Enum.Value);\r\n                    for (i=0; i 4294967295 || value < 0)\r\n                            fail(typeof value, \"not in range for uint32\")\r\n                        return value;\r\n                    } else {\r\n                        // proto2 requires enum values to be valid.\r\n                        fail(value, \"not a valid enum value\");\r\n                    }\r\n                }\r\n                // Embedded message\r\n                case ProtoBuf.TYPES[\"group\"]:\r\n                case ProtoBuf.TYPES[\"message\"]: {\r\n                    if (!value || typeof value !== 'object')\r\n                        fail(typeof value, \"object expected\");\r\n                    if (value instanceof this.resolvedType.clazz)\r\n                        return value;\r\n                    if (value instanceof ProtoBuf.Builder.Message) {\r\n                        // Mismatched type: Convert to object (see: https://github.com/dcodeIO/ProtoBuf.js/issues/180)\r\n                        var obj = {};\r\n                        for (var i in value)\r\n                            if (value.hasOwnProperty(i))\r\n                                obj[i] = value[i];\r\n                        value = obj;\r\n                    }\r\n                    // Else let's try to construct one from a key-value object\r\n                    return new (this.resolvedType.clazz)(value); // May throw for a hundred of reasons\r\n                }\r\n            }\r\n\r\n            // We should never end here\r\n            throw Error(\"[INTERNAL] Illegal value for \"+this.toString(true)+\": \"+value+\" (undefined type \"+this.type+\")\");\r\n        };\r\n\r\n        /**\r\n         * Calculates the byte length of an element on the wire.\r\n         * @param {number} id Field number\r\n         * @param {*} value Field value\r\n         * @returns {number} Byte length\r\n         * @throws {Error} If the value cannot be calculated\r\n         * @expose\r\n         */\r\n        ElementPrototype.calculateLength = function(id, value) {\r\n            if (value === null) return 0; // Nothing to encode\r\n            // Tag has already been written\r\n            var n;\r\n            switch (this.type) {\r\n                case ProtoBuf.TYPES[\"int32\"]:\r\n                    return value < 0 ? ByteBuffer.calculateVarint64(value) : ByteBuffer.calculateVarint32(value);\r\n                case ProtoBuf.TYPES[\"uint32\"]:\r\n                    return ByteBuffer.calculateVarint32(value);\r\n                case ProtoBuf.TYPES[\"sint32\"]:\r\n                    return ByteBuffer.calculateVarint32(ByteBuffer.zigZagEncode32(value));\r\n                case ProtoBuf.TYPES[\"fixed32\"]:\r\n                case ProtoBuf.TYPES[\"sfixed32\"]:\r\n                case ProtoBuf.TYPES[\"float\"]:\r\n                    return 4;\r\n                case ProtoBuf.TYPES[\"int64\"]:\r\n                case ProtoBuf.TYPES[\"uint64\"]:\r\n                    return ByteBuffer.calculateVarint64(value);\r\n                case ProtoBuf.TYPES[\"sint64\"]:\r\n                    return ByteBuffer.calculateVarint64(ByteBuffer.zigZagEncode64(value));\r\n                case ProtoBuf.TYPES[\"fixed64\"]:\r\n                case ProtoBuf.TYPES[\"sfixed64\"]:\r\n                    return 8;\r\n                case ProtoBuf.TYPES[\"bool\"]:\r\n                    return 1;\r\n                case ProtoBuf.TYPES[\"enum\"]:\r\n                    return ByteBuffer.calculateVarint32(value);\r\n                case ProtoBuf.TYPES[\"double\"]:\r\n                    return 8;\r\n                case ProtoBuf.TYPES[\"string\"]:\r\n                    n = ByteBuffer.calculateUTF8Bytes(value);\r\n                    return ByteBuffer.calculateVarint32(n) + n;\r\n                case ProtoBuf.TYPES[\"bytes\"]:\r\n                    if (value.remaining() < 0)\r\n                        throw Error(\"Illegal value for \"+this.toString(true)+\": \"+value.remaining()+\" bytes remaining\");\r\n                    return ByteBuffer.calculateVarint32(value.remaining()) + value.remaining();\r\n                case ProtoBuf.TYPES[\"message\"]:\r\n                    n = this.resolvedType.calculate(value);\r\n                    return ByteBuffer.calculateVarint32(n) + n;\r\n                case ProtoBuf.TYPES[\"group\"]:\r\n                    n = this.resolvedType.calculate(value);\r\n                    return n + ByteBuffer.calculateVarint32((id << 3) | ProtoBuf.WIRE_TYPES.ENDGROUP);\r\n            }\r\n            // We should never end here\r\n            throw Error(\"[INTERNAL] Illegal value to encode in \"+this.toString(true)+\": \"+value+\" (unknown type)\");\r\n        };\r\n\r\n        /**\r\n         * Encodes a value to the specified buffer. Does not encode the key.\r\n         * @param {number} id Field number\r\n         * @param {*} value Field value\r\n         * @param {ByteBuffer} buffer ByteBuffer to encode to\r\n         * @return {ByteBuffer} The ByteBuffer for chaining\r\n         * @throws {Error} If the value cannot be encoded\r\n         * @expose\r\n         */\r\n        ElementPrototype.encodeValue = function(id, value, buffer) {\r\n            if (value === null) return buffer; // Nothing to encode\r\n            // Tag has already been written\r\n\r\n            switch (this.type) {\r\n                // 32bit signed varint\r\n                case ProtoBuf.TYPES[\"int32\"]:\r\n                    // \"If you use int32 or int64 as the type for a negative number, the resulting varint is always ten bytes\r\n                    // long – it is, effectively, treated like a very large unsigned integer.\" (see #122)\r\n                    if (value < 0)\r\n                        buffer.writeVarint64(value);\r\n                    else\r\n                        buffer.writeVarint32(value);\r\n                    break;\r\n\r\n                // 32bit unsigned varint\r\n                case ProtoBuf.TYPES[\"uint32\"]:\r\n                    buffer.writeVarint32(value);\r\n                    break;\r\n\r\n                // 32bit varint zig-zag\r\n                case ProtoBuf.TYPES[\"sint32\"]:\r\n                    buffer.writeVarint32ZigZag(value);\r\n                    break;\r\n\r\n                // Fixed unsigned 32bit\r\n                case ProtoBuf.TYPES[\"fixed32\"]:\r\n                    buffer.writeUint32(value);\r\n                    break;\r\n\r\n                // Fixed signed 32bit\r\n                case ProtoBuf.TYPES[\"sfixed32\"]:\r\n                    buffer.writeInt32(value);\r\n                    break;\r\n\r\n                // 64bit varint as-is\r\n                case ProtoBuf.TYPES[\"int64\"]:\r\n                case ProtoBuf.TYPES[\"uint64\"]:\r\n                    buffer.writeVarint64(value); // throws\r\n                    break;\r\n\r\n                // 64bit varint zig-zag\r\n                case ProtoBuf.TYPES[\"sint64\"]:\r\n                    buffer.writeVarint64ZigZag(value); // throws\r\n                    break;\r\n\r\n                // Fixed unsigned 64bit\r\n                case ProtoBuf.TYPES[\"fixed64\"]:\r\n                    buffer.writeUint64(value); // throws\r\n                    break;\r\n\r\n                // Fixed signed 64bit\r\n                case ProtoBuf.TYPES[\"sfixed64\"]:\r\n                    buffer.writeInt64(value); // throws\r\n                    break;\r\n\r\n                // Bool\r\n                case ProtoBuf.TYPES[\"bool\"]:\r\n                    if (typeof value === 'string')\r\n                        buffer.writeVarint32(value.toLowerCase() === 'false' ? 0 : !!value);\r\n                    else\r\n                        buffer.writeVarint32(value ? 1 : 0);\r\n                    break;\r\n\r\n                // Constant enum value\r\n                case ProtoBuf.TYPES[\"enum\"]:\r\n                    buffer.writeVarint32(value);\r\n                    break;\r\n\r\n                // 32bit float\r\n                case ProtoBuf.TYPES[\"float\"]:\r\n                    buffer.writeFloat32(value);\r\n                    break;\r\n\r\n                // 64bit float\r\n                case ProtoBuf.TYPES[\"double\"]:\r\n                    buffer.writeFloat64(value);\r\n                    break;\r\n\r\n                // Length-delimited string\r\n                case ProtoBuf.TYPES[\"string\"]:\r\n                    buffer.writeVString(value);\r\n                    break;\r\n\r\n                // Length-delimited bytes\r\n                case ProtoBuf.TYPES[\"bytes\"]:\r\n                    if (value.remaining() < 0)\r\n                        throw Error(\"Illegal value for \"+this.toString(true)+\": \"+value.remaining()+\" bytes remaining\");\r\n                    var prevOffset = value.offset;\r\n                    buffer.writeVarint32(value.remaining());\r\n                    buffer.append(value);\r\n                    value.offset = prevOffset;\r\n                    break;\r\n\r\n                // Embedded message\r\n                case ProtoBuf.TYPES[\"message\"]:\r\n                    var bb = new ByteBuffer().LE();\r\n                    this.resolvedType.encode(value, bb);\r\n                    buffer.writeVarint32(bb.offset);\r\n                    buffer.append(bb.flip());\r\n                    break;\r\n\r\n                // Legacy group\r\n                case ProtoBuf.TYPES[\"group\"]:\r\n                    this.resolvedType.encode(value, buffer);\r\n                    buffer.writeVarint32((id << 3) | ProtoBuf.WIRE_TYPES.ENDGROUP);\r\n                    break;\r\n\r\n                default:\r\n                    // We should never end here\r\n                    throw Error(\"[INTERNAL] Illegal value to encode in \"+this.toString(true)+\": \"+value+\" (unknown type)\");\r\n            }\r\n            return buffer;\r\n        };\r\n\r\n        /**\r\n         * Decode one element value from the specified buffer.\r\n         * @param {ByteBuffer} buffer ByteBuffer to decode from\r\n         * @param {number} wireType The field wire type\r\n         * @param {number} id The field number\r\n         * @return {*} Decoded value\r\n         * @throws {Error} If the field cannot be decoded\r\n         * @expose\r\n         */\r\n        ElementPrototype.decode = function(buffer, wireType, id) {\r\n            if (wireType != this.type.wireType)\r\n                throw Error(\"Unexpected wire type for element\");\r\n\r\n            var value, nBytes;\r\n            switch (this.type) {\r\n                // 32bit signed varint\r\n                case ProtoBuf.TYPES[\"int32\"]:\r\n                    return buffer.readVarint32() | 0;\r\n\r\n                // 32bit unsigned varint\r\n                case ProtoBuf.TYPES[\"uint32\"]:\r\n                    return buffer.readVarint32() >>> 0;\r\n\r\n                // 32bit signed varint zig-zag\r\n                case ProtoBuf.TYPES[\"sint32\"]:\r\n                    return buffer.readVarint32ZigZag() | 0;\r\n\r\n                // Fixed 32bit unsigned\r\n                case ProtoBuf.TYPES[\"fixed32\"]:\r\n                    return buffer.readUint32() >>> 0;\r\n\r\n                case ProtoBuf.TYPES[\"sfixed32\"]:\r\n                    return buffer.readInt32() | 0;\r\n\r\n                // 64bit signed varint\r\n                case ProtoBuf.TYPES[\"int64\"]:\r\n                    return buffer.readVarint64();\r\n\r\n                // 64bit unsigned varint\r\n                case ProtoBuf.TYPES[\"uint64\"]:\r\n                    return buffer.readVarint64().toUnsigned();\r\n\r\n                // 64bit signed varint zig-zag\r\n                case ProtoBuf.TYPES[\"sint64\"]:\r\n                    return buffer.readVarint64ZigZag();\r\n\r\n                // Fixed 64bit unsigned\r\n                case ProtoBuf.TYPES[\"fixed64\"]:\r\n                    return buffer.readUint64();\r\n\r\n                // Fixed 64bit signed\r\n                case ProtoBuf.TYPES[\"sfixed64\"]:\r\n                    return buffer.readInt64();\r\n\r\n                // Bool varint\r\n                case ProtoBuf.TYPES[\"bool\"]:\r\n                    return !!buffer.readVarint32();\r\n\r\n                // Constant enum value (varint)\r\n                case ProtoBuf.TYPES[\"enum\"]:\r\n                    // The following Builder.Message#set will already throw\r\n                    return buffer.readVarint32();\r\n\r\n                // 32bit float\r\n                case ProtoBuf.TYPES[\"float\"]:\r\n                    return buffer.readFloat();\r\n\r\n                // 64bit float\r\n                case ProtoBuf.TYPES[\"double\"]:\r\n                    return buffer.readDouble();\r\n\r\n                // Length-delimited string\r\n                case ProtoBuf.TYPES[\"string\"]:\r\n                    return buffer.readVString();\r\n\r\n                // Length-delimited bytes\r\n                case ProtoBuf.TYPES[\"bytes\"]: {\r\n                    nBytes = buffer.readVarint32();\r\n                    if (buffer.remaining() < nBytes)\r\n                        throw Error(\"Illegal number of bytes for \"+this.toString(true)+\": \"+nBytes+\" required but got only \"+buffer.remaining());\r\n                    value = buffer.clone(); // Offset already set\r\n                    value.limit = value.offset+nBytes;\r\n                    buffer.offset += nBytes;\r\n                    return value;\r\n                }\r\n\r\n                // Length-delimited embedded message\r\n                case ProtoBuf.TYPES[\"message\"]: {\r\n                    nBytes = buffer.readVarint32();\r\n                    return this.resolvedType.decode(buffer, nBytes);\r\n                }\r\n\r\n                // Legacy group\r\n                case ProtoBuf.TYPES[\"group\"]:\r\n                    return this.resolvedType.decode(buffer, -1, id);\r\n            }\r\n\r\n            // We should never end here\r\n            throw Error(\"[INTERNAL] Illegal decode type\");\r\n        };\r\n\r\n        /**\r\n         * Converts a value from a string to the canonical element type.\r\n         *\r\n         * Legal only when isMapKey is true.\r\n         *\r\n         * @param {string} str The string value\r\n         * @returns {*} The value\r\n         */\r\n        ElementPrototype.valueFromString = function(str) {\r\n            if (!this.isMapKey) {\r\n                throw Error(\"valueFromString() called on non-map-key element\");\r\n            }\r\n\r\n            switch (this.type) {\r\n                case ProtoBuf.TYPES[\"int32\"]:\r\n                case ProtoBuf.TYPES[\"sint32\"]:\r\n                case ProtoBuf.TYPES[\"sfixed32\"]:\r\n                case ProtoBuf.TYPES[\"uint32\"]:\r\n                case ProtoBuf.TYPES[\"fixed32\"]:\r\n                    return this.verifyValue(parseInt(str));\r\n\r\n                case ProtoBuf.TYPES[\"int64\"]:\r\n                case ProtoBuf.TYPES[\"sint64\"]:\r\n                case ProtoBuf.TYPES[\"sfixed64\"]:\r\n                case ProtoBuf.TYPES[\"uint64\"]:\r\n                case ProtoBuf.TYPES[\"fixed64\"]:\r\n                      // Long-based fields support conversions from string already.\r\n                      return this.verifyValue(str);\r\n\r\n                case ProtoBuf.TYPES[\"bool\"]:\r\n                      return str === \"true\";\r\n\r\n                case ProtoBuf.TYPES[\"string\"]:\r\n                      return this.verifyValue(str);\r\n\r\n                case ProtoBuf.TYPES[\"bytes\"]:\r\n                      return ByteBuffer.fromBinary(str);\r\n            }\r\n        };\r\n\r\n        /**\r\n         * Converts a value from the canonical element type to a string.\r\n         *\r\n         * It should be the case that `valueFromString(valueToString(val))` returns\r\n         * a value equivalent to `verifyValue(val)` for every legal value of `val`\r\n         * according to this element type.\r\n         *\r\n         * This may be used when the element must be stored or used as a string,\r\n         * e.g., as a map key on an Object.\r\n         *\r\n         * Legal only when isMapKey is true.\r\n         *\r\n         * @param {*} val The value\r\n         * @returns {string} The string form of the value.\r\n         */\r\n        ElementPrototype.valueToString = function(value) {\r\n            if (!this.isMapKey) {\r\n                throw Error(\"valueToString() called on non-map-key element\");\r\n            }\r\n\r\n            if (this.type === ProtoBuf.TYPES[\"bytes\"]) {\r\n                return value.toString(\"binary\");\r\n            } else {\r\n                return value.toString();\r\n            }\r\n        };\r\n\r\n        /**\r\n         * @alias ProtoBuf.Reflect.Element\r\n         * @expose\r\n         */\r\n        Reflect.Element = Element;\r\n\r\n        /**\r\n         * Constructs a new Message.\r\n         * @exports ProtoBuf.Reflect.Message\r\n         * @param {!ProtoBuf.Builder} builder Builder reference\r\n         * @param {!ProtoBuf.Reflect.Namespace} parent Parent message or namespace\r\n         * @param {string} name Message name\r\n         * @param {Object.=} options Message options\r\n         * @param {boolean=} isGroup `true` if this is a legacy group\r\n         * @param {string?} syntax The syntax level of this definition (e.g., proto3)\r\n         * @constructor\r\n         * @extends ProtoBuf.Reflect.Namespace\r\n         */\r\n        var Message = function(builder, parent, name, options, isGroup, syntax) {\r\n            Namespace.call(this, builder, parent, name, options, syntax);\r\n\r\n            /**\r\n             * @override\r\n             */\r\n            this.className = \"Message\";\r\n\r\n            /**\r\n             * Extensions range.\r\n             * @type {!Array.|undefined}\r\n             * @expose\r\n             */\r\n            this.extensions = undefined;\r\n\r\n            /**\r\n             * Runtime message class.\r\n             * @type {?function(new:ProtoBuf.Builder.Message)}\r\n             * @expose\r\n             */\r\n            this.clazz = null;\r\n\r\n            /**\r\n             * Whether this is a legacy group or not.\r\n             * @type {boolean}\r\n             * @expose\r\n             */\r\n            this.isGroup = !!isGroup;\r\n\r\n            // The following cached collections are used to efficiently iterate over or look up fields when decoding.\r\n\r\n            /**\r\n             * Cached fields.\r\n             * @type {?Array.}\r\n             * @private\r\n             */\r\n            this._fields = null;\r\n\r\n            /**\r\n             * Cached fields by id.\r\n             * @type {?Object.}\r\n             * @private\r\n             */\r\n            this._fieldsById = null;\r\n\r\n            /**\r\n             * Cached fields by name.\r\n             * @type {?Object.}\r\n             * @private\r\n             */\r\n            this._fieldsByName = null;\r\n        };\r\n\r\n        /**\r\n         * @alias ProtoBuf.Reflect.Message.prototype\r\n         * @inner\r\n         */\r\n        var MessagePrototype = Message.prototype = Object.create(Namespace.prototype);\r\n\r\n        /**\r\n         * Builds the message and returns the runtime counterpart, which is a fully functional class.\r\n         * @see ProtoBuf.Builder.Message\r\n         * @param {boolean=} rebuild Whether to rebuild or not, defaults to false\r\n         * @return {ProtoBuf.Reflect.Message} Message class\r\n         * @throws {Error} If the message cannot be built\r\n         * @expose\r\n         */\r\n        MessagePrototype.build = function(rebuild) {\r\n            if (this.clazz && !rebuild)\r\n                return this.clazz;\r\n\r\n            // Create the runtime Message class in its own scope\r\n            var clazz = (function(ProtoBuf, T) {\r\n\r\n                var fields = T.getChildren(ProtoBuf.Reflect.Message.Field),\r\n                    oneofs = T.getChildren(ProtoBuf.Reflect.Message.OneOf);\r\n\r\n                /**\r\n                 * Constructs a new runtime Message.\r\n                 * @name ProtoBuf.Builder.Message\r\n                 * @class Barebone of all runtime messages.\r\n                 * @param {!Object.|string} values Preset values\r\n                 * @param {...string} var_args\r\n                 * @constructor\r\n                 * @throws {Error} If the message cannot be created\r\n                 */\r\n                var Message = function(values, var_args) {\r\n                    ProtoBuf.Builder.Message.call(this);\r\n\r\n                    // Create virtual oneof properties\r\n                    for (var i=0, k=oneofs.length; i 0) {\r\n                        var value;\r\n                        // Set field values from a values object\r\n                        if (arguments.length === 1 && values !== null && typeof values === 'object' &&\r\n                            /* not _another_ Message */ (typeof values.encode !== 'function' || values instanceof Message) &&\r\n                            /* not a repeated field */ !Array.isArray(values) &&\r\n                            /* not a Map */ !(values instanceof ProtoBuf.Map) &&\r\n                            /* not a ByteBuffer */ !ByteBuffer.isByteBuffer(values) &&\r\n                            /* not an ArrayBuffer */ !(values instanceof ArrayBuffer) &&\r\n                            /* not a Long */ !(ProtoBuf.Long && values instanceof ProtoBuf.Long)) {\r\n                            this.$set(values);\r\n                        } else // Set field values from arguments, in declaration order\r\n                            for (i=0, k=arguments.length; i} keyOrObj String key or plain object holding multiple values\r\n                 * @param {(*|boolean)=} value Value to set if key is a string, otherwise omitted\r\n                 * @param {boolean=} noAssert Whether to not assert for an actual field / proper value type, defaults to `false`\r\n                 * @returns {!ProtoBuf.Builder.Message} this\r\n                 * @throws {Error} If the value cannot be set\r\n                 * @expose\r\n                 */\r\n                MessagePrototype.set = function(keyOrObj, value, noAssert) {\r\n                    if (keyOrObj && typeof keyOrObj === 'object') {\r\n                        noAssert = value;\r\n                        for (var ikey in keyOrObj) {\r\n                            // Check if virtual oneof field - don't set these\r\n                            if (keyOrObj.hasOwnProperty(ikey) && typeof (value = keyOrObj[ikey]) !== 'undefined' && T._oneofsByName[ikey] === undefined)\r\n                                this.$set(ikey, value, noAssert);\r\n                        }\r\n                        return this;\r\n                    }\r\n                    var field = T._fieldsByName[keyOrObj];\r\n                    if (!noAssert) {\r\n                        if (!field)\r\n                            throw Error(this+\"#\"+keyOrObj+\" is not a field: undefined\");\r\n                        if (!(field instanceof ProtoBuf.Reflect.Message.Field))\r\n                            throw Error(this+\"#\"+keyOrObj+\" is not a field: \"+field.toString(true));\r\n                        this[field.name] = (value = field.verifyValue(value)); // May throw\r\n                    } else\r\n                        this[keyOrObj] = value;\r\n                    if (field && field.oneof) { // Field is part of an OneOf (not a virtual OneOf field)\r\n                        var currentField = this[field.oneof.name]; // Virtual field references currently set field\r\n                        if (value !== null) {\r\n                            if (currentField !== null && currentField !== field.name)\r\n                                this[currentField] = null; // Clear currently set field\r\n                            this[field.oneof.name] = field.name; // Point virtual field at this field\r\n                        } else if (/* value === null && */currentField === keyOrObj)\r\n                            this[field.oneof.name] = null; // Clear virtual field (current field explicitly cleared)\r\n                    }\r\n                    return this;\r\n                };\r\n\r\n                /**\r\n                 * Sets a field's value. This is an alias for [@link ProtoBuf.Builder.Message#set}.\r\n                 * @name ProtoBuf.Builder.Message#$set\r\n                 * @function\r\n                 * @param {string|!Object.} keyOrObj String key or plain object holding multiple values\r\n                 * @param {(*|boolean)=} value Value to set if key is a string, otherwise omitted\r\n                 * @param {boolean=} noAssert Whether to not assert the value, defaults to `false`\r\n                 * @throws {Error} If the value cannot be set\r\n                 * @expose\r\n                 */\r\n                MessagePrototype.$set = MessagePrototype.set;\r\n\r\n                /**\r\n                 * Gets a field's value.\r\n                 * @name ProtoBuf.Builder.Message#get\r\n                 * @function\r\n                 * @param {string} key Key\r\n                 * @param {boolean=} noAssert Whether to not assert for an actual field, defaults to `false`\r\n                 * @return {*} Value\r\n                 * @throws {Error} If there is no such field\r\n                 * @expose\r\n                 */\r\n                MessagePrototype.get = function(key, noAssert) {\r\n                    if (noAssert)\r\n                        return this[key];\r\n                    var field = T._fieldsByName[key];\r\n                    if (!field || !(field instanceof ProtoBuf.Reflect.Message.Field))\r\n                        throw Error(this+\"#\"+key+\" is not a field: undefined\");\r\n                    if (!(field instanceof ProtoBuf.Reflect.Message.Field))\r\n                        throw Error(this+\"#\"+key+\" is not a field: \"+field.toString(true));\r\n                    return this[field.name];\r\n                };\r\n\r\n                /**\r\n                 * Gets a field's value. This is an alias for {@link ProtoBuf.Builder.Message#$get}.\r\n                 * @name ProtoBuf.Builder.Message#$get\r\n                 * @function\r\n                 * @param {string} key Key\r\n                 * @return {*} Value\r\n                 * @throws {Error} If there is no such field\r\n                 * @expose\r\n                 */\r\n                MessagePrototype.$get = MessagePrototype.get;\r\n\r\n                // Getters and setters\r\n\r\n                for (var i=0; i} data Data payload\r\n                 * @param {(!ByteBuffer|boolean)=} buffer ByteBuffer to encode to. Will create a new one and flip it if omitted.\r\n                 * @param {boolean=} noVerify Whether to not verify field values, defaults to `false`\r\n                 * @return {!ByteBuffer} Encoded message as a ByteBuffer\r\n                 * @expose\r\n                 */\r\n                Message.encode = function(data, buffer, noVerify) {\r\n                    return new Message(data).encode(buffer, noVerify);\r\n                };\r\n\r\n                /**\r\n                 * Calculates the byte length of the message.\r\n                 * @name ProtoBuf.Builder.Message#calculate\r\n                 * @function\r\n                 * @returns {number} Byte length\r\n                 * @throws {Error} If the message cannot be calculated or if required fields are missing.\r\n                 * @expose\r\n                 */\r\n                MessagePrototype.calculate = function() {\r\n                    return T.calculate(this);\r\n                };\r\n\r\n                /**\r\n                 * Encodes the varint32 length-delimited message.\r\n                 * @name ProtoBuf.Builder.Message#encodeDelimited\r\n                 * @function\r\n                 * @param {(!ByteBuffer|boolean)=} buffer ByteBuffer to encode to. Will create a new one and flip it if omitted.\r\n                 * @param {boolean=} noVerify Whether to not verify field values, defaults to `false`\r\n                 * @return {!ByteBuffer} Encoded message as a ByteBuffer\r\n                 * @throws {Error} If the message cannot be encoded or if required fields are missing. The later still\r\n                 *  returns the encoded ByteBuffer in the `encoded` property on the error.\r\n                 * @expose\r\n                 */\r\n                MessagePrototype.encodeDelimited = function(buffer, noVerify) {\r\n                    var isNew = false;\r\n                    if (!buffer)\r\n                        buffer = new ByteBuffer(),\r\n                        isNew = true;\r\n                    var enc = new ByteBuffer().LE();\r\n                    T.encode(this, enc, noVerify).flip();\r\n                    buffer.writeVarint32(enc.remaining());\r\n                    buffer.append(enc);\r\n                    return isNew ? buffer.flip() : buffer;\r\n                };\r\n\r\n                /**\r\n                 * Directly encodes the message to an ArrayBuffer.\r\n                 * @name ProtoBuf.Builder.Message#encodeAB\r\n                 * @function\r\n                 * @return {ArrayBuffer} Encoded message as ArrayBuffer\r\n                 * @throws {Error} If the message cannot be encoded or if required fields are missing. The later still\r\n                 *  returns the encoded ArrayBuffer in the `encoded` property on the error.\r\n                 * @expose\r\n                 */\r\n                MessagePrototype.encodeAB = function() {\r\n                    try {\r\n                        return this.encode().toArrayBuffer();\r\n                    } catch (e) {\r\n                        if (e[\"encoded\"]) e[\"encoded\"] = e[\"encoded\"].toArrayBuffer();\r\n                        throw(e);\r\n                    }\r\n                };\r\n\r\n                /**\r\n                 * Returns the message as an ArrayBuffer. This is an alias for {@link ProtoBuf.Builder.Message#encodeAB}.\r\n                 * @name ProtoBuf.Builder.Message#toArrayBuffer\r\n                 * @function\r\n                 * @return {ArrayBuffer} Encoded message as ArrayBuffer\r\n                 * @throws {Error} If the message cannot be encoded or if required fields are missing. The later still\r\n                 *  returns the encoded ArrayBuffer in the `encoded` property on the error.\r\n                 * @expose\r\n                 */\r\n                MessagePrototype.toArrayBuffer = MessagePrototype.encodeAB;\r\n\r\n                /**\r\n                 * Directly encodes the message to a node Buffer.\r\n                 * @name ProtoBuf.Builder.Message#encodeNB\r\n                 * @function\r\n                 * @return {!Buffer}\r\n                 * @throws {Error} If the message cannot be encoded, not running under node.js or if required fields are\r\n                 *  missing. The later still returns the encoded node Buffer in the `encoded` property on the error.\r\n                 * @expose\r\n                 */\r\n                MessagePrototype.encodeNB = function() {\r\n                    try {\r\n                        return this.encode().toBuffer();\r\n                    } catch (e) {\r\n                        if (e[\"encoded\"]) e[\"encoded\"] = e[\"encoded\"].toBuffer();\r\n                        throw(e);\r\n                    }\r\n                };\r\n\r\n                /**\r\n                 * Returns the message as a node Buffer. This is an alias for {@link ProtoBuf.Builder.Message#encodeNB}.\r\n                 * @name ProtoBuf.Builder.Message#toBuffer\r\n                 * @function\r\n                 * @return {!Buffer}\r\n                 * @throws {Error} If the message cannot be encoded or if required fields are missing. The later still\r\n                 *  returns the encoded node Buffer in the `encoded` property on the error.\r\n                 * @expose\r\n                 */\r\n                MessagePrototype.toBuffer = MessagePrototype.encodeNB;\r\n\r\n                /**\r\n                 * Directly encodes the message to a base64 encoded string.\r\n                 * @name ProtoBuf.Builder.Message#encode64\r\n                 * @function\r\n                 * @return {string} Base64 encoded string\r\n                 * @throws {Error} If the underlying buffer cannot be encoded or if required fields are missing. The later\r\n                 *  still returns the encoded base64 string in the `encoded` property on the error.\r\n                 * @expose\r\n                 */\r\n                MessagePrototype.encode64 = function() {\r\n                    try {\r\n                        return this.encode().toBase64();\r\n                    } catch (e) {\r\n                        if (e[\"encoded\"]) e[\"encoded\"] = e[\"encoded\"].toBase64();\r\n                        throw(e);\r\n                    }\r\n                };\r\n\r\n                /**\r\n                 * Returns the message as a base64 encoded string. This is an alias for {@link ProtoBuf.Builder.Message#encode64}.\r\n                 * @name ProtoBuf.Builder.Message#toBase64\r\n                 * @function\r\n                 * @return {string} Base64 encoded string\r\n                 * @throws {Error} If the message cannot be encoded or if required fields are missing. The later still\r\n                 *  returns the encoded base64 string in the `encoded` property on the error.\r\n                 * @expose\r\n                 */\r\n                MessagePrototype.toBase64 = MessagePrototype.encode64;\r\n\r\n                /**\r\n                 * Directly encodes the message to a hex encoded string.\r\n                 * @name ProtoBuf.Builder.Message#encodeHex\r\n                 * @function\r\n                 * @return {string} Hex encoded string\r\n                 * @throws {Error} If the underlying buffer cannot be encoded or if required fields are missing. The later\r\n                 *  still returns the encoded hex string in the `encoded` property on the error.\r\n                 * @expose\r\n                 */\r\n                MessagePrototype.encodeHex = function() {\r\n                    try {\r\n                        return this.encode().toHex();\r\n                    } catch (e) {\r\n                        if (e[\"encoded\"]) e[\"encoded\"] = e[\"encoded\"].toHex();\r\n                        throw(e);\r\n                    }\r\n                };\r\n\r\n                /**\r\n                 * Returns the message as a hex encoded string. This is an alias for {@link ProtoBuf.Builder.Message#encodeHex}.\r\n                 * @name ProtoBuf.Builder.Message#toHex\r\n                 * @function\r\n                 * @return {string} Hex encoded string\r\n                 * @throws {Error} If the message cannot be encoded or if required fields are missing. The later still\r\n                 *  returns the encoded hex string in the `encoded` property on the error.\r\n                 * @expose\r\n                 */\r\n                MessagePrototype.toHex = MessagePrototype.encodeHex;\r\n\r\n                /**\r\n                 * Clones a message object or field value to a raw object.\r\n                 * @param {*} obj Object to clone\r\n                 * @param {boolean} binaryAsBase64 Whether to include binary data as base64 strings or as a buffer otherwise\r\n                 * @param {boolean} longsAsStrings Whether to encode longs as strings\r\n                 * @param {!ProtoBuf.Reflect.T=} resolvedType The resolved field type if a field\r\n                 * @returns {*} Cloned object\r\n                 * @inner\r\n                 */\r\n                function cloneRaw(obj, binaryAsBase64, longsAsStrings, resolvedType) {\r\n                    if (obj === null || typeof obj !== 'object') {\r\n                        // Convert enum values to their respective names\r\n                        if (resolvedType && resolvedType instanceof ProtoBuf.Reflect.Enum) {\r\n                            var name = ProtoBuf.Reflect.Enum.getName(resolvedType.object, obj);\r\n                            if (name !== null)\r\n                                return name;\r\n                        }\r\n                        // Pass-through string, number, boolean, null...\r\n                        return obj;\r\n                    }\r\n                    // Convert ByteBuffers to raw buffer or strings\r\n                    if (ByteBuffer.isByteBuffer(obj))\r\n                        return binaryAsBase64 ? obj.toBase64() : obj.toBuffer();\r\n                    // Convert Longs to proper objects or strings\r\n                    if (ProtoBuf.Long.isLong(obj))\r\n                        return longsAsStrings ? obj.toString() : ProtoBuf.Long.fromValue(obj);\r\n                    var clone;\r\n                    // Clone arrays\r\n                    if (Array.isArray(obj)) {\r\n                        clone = [];\r\n                        obj.forEach(function(v, k) {\r\n                            clone[k] = cloneRaw(v, binaryAsBase64, longsAsStrings, resolvedType);\r\n                        });\r\n                        return clone;\r\n                    }\r\n                    clone = {};\r\n                    // Convert maps to objects\r\n                    if (obj instanceof ProtoBuf.Map) {\r\n                        var it = obj.entries();\r\n                        for (var e = it.next(); !e.done; e = it.next())\r\n                            clone[obj.keyElem.valueToString(e.value[0])] = cloneRaw(e.value[1], binaryAsBase64, longsAsStrings, obj.valueElem.resolvedType);\r\n                        return clone;\r\n                    }\r\n                    // Everything else is a non-null object\r\n                    var type = obj.$type,\r\n                        field = undefined;\r\n                    for (var i in obj)\r\n                        if (obj.hasOwnProperty(i)) {\r\n                            if (type && (field = type.getChild(i)))\r\n                                clone[i] = cloneRaw(obj[i], binaryAsBase64, longsAsStrings, field.resolvedType);\r\n                            else\r\n                                clone[i] = cloneRaw(obj[i], binaryAsBase64, longsAsStrings);\r\n                        }\r\n                    return clone;\r\n                }\r\n\r\n                /**\r\n                 * Returns the message's raw payload.\r\n                 * @param {boolean=} binaryAsBase64 Whether to include binary data as base64 strings instead of Buffers, defaults to `false`\r\n                 * @param {boolean} longsAsStrings Whether to encode longs as strings\r\n                 * @returns {Object.} Raw payload\r\n                 * @expose\r\n                 */\r\n                MessagePrototype.toRaw = function(binaryAsBase64, longsAsStrings) {\r\n                    return cloneRaw(this, !!binaryAsBase64, !!longsAsStrings, this.$type);\r\n                };\r\n\r\n                /**\r\n                 * Encodes a message to JSON.\r\n                 * @returns {string} JSON string\r\n                 * @expose\r\n                 */\r\n                MessagePrototype.encodeJSON = function() {\r\n                    return JSON.stringify(\r\n                        cloneRaw(this,\r\n                             /* binary-as-base64 */ true,\r\n                             /* longs-as-strings */ true,\r\n                             this.$type\r\n                        )\r\n                    );\r\n                };\r\n\r\n                /**\r\n                 * Decodes a message from the specified buffer or string.\r\n                 * @name ProtoBuf.Builder.Message.decode\r\n                 * @function\r\n                 * @param {!ByteBuffer|!ArrayBuffer|!Buffer|string} buffer Buffer to decode from\r\n                 * @param {(number|string)=} length Message length. Defaults to decode all the remainig data.\r\n                 * @param {string=} enc Encoding if buffer is a string: hex, utf8 (not recommended), defaults to base64\r\n                 * @return {!ProtoBuf.Builder.Message} Decoded message\r\n                 * @throws {Error} If the message cannot be decoded or if required fields are missing. The later still\r\n                 *  returns the decoded message with missing fields in the `decoded` property on the error.\r\n                 * @expose\r\n                 * @see ProtoBuf.Builder.Message.decode64\r\n                 * @see ProtoBuf.Builder.Message.decodeHex\r\n                 */\r\n                Message.decode = function(buffer, length, enc) {\r\n                    if (typeof length === 'string')\r\n                        enc = length,\r\n                        length = -1;\r\n                    if (typeof buffer === 'string')\r\n                        buffer = ByteBuffer.wrap(buffer, enc ? enc : \"base64\");\r\n                    else if (!ByteBuffer.isByteBuffer(buffer))\r\n                        buffer = ByteBuffer.wrap(buffer); // May throw\r\n                    var le = buffer.littleEndian;\r\n                    try {\r\n                        var msg = T.decode(buffer.LE(), length);\r\n                        buffer.LE(le);\r\n                        return msg;\r\n                    } catch (e) {\r\n                        buffer.LE(le);\r\n                        throw(e);\r\n                    }\r\n                };\r\n\r\n                /**\r\n                 * Decodes a varint32 length-delimited message from the specified buffer or string.\r\n                 * @name ProtoBuf.Builder.Message.decodeDelimited\r\n                 * @function\r\n                 * @param {!ByteBuffer|!ArrayBuffer|!Buffer|string} buffer Buffer to decode from\r\n                 * @param {string=} enc Encoding if buffer is a string: hex, utf8 (not recommended), defaults to base64\r\n                 * @return {ProtoBuf.Builder.Message} Decoded message or `null` if not enough bytes are available yet\r\n                 * @throws {Error} If the message cannot be decoded or if required fields are missing. The later still\r\n                 *  returns the decoded message with missing fields in the `decoded` property on the error.\r\n                 * @expose\r\n                 */\r\n                Message.decodeDelimited = function(buffer, enc) {\r\n                    if (typeof buffer === 'string')\r\n                        buffer = ByteBuffer.wrap(buffer, enc ? enc : \"base64\");\r\n                    else if (!ByteBuffer.isByteBuffer(buffer))\r\n                        buffer = ByteBuffer.wrap(buffer); // May throw\r\n                    if (buffer.remaining() < 1)\r\n                        return null;\r\n                    var off = buffer.offset,\r\n                        len = buffer.readVarint32();\r\n                    if (buffer.remaining() < len) {\r\n                        buffer.offset = off;\r\n                        return null;\r\n                    }\r\n                    try {\r\n                        var msg = T.decode(buffer.slice(buffer.offset, buffer.offset + len).LE());\r\n                        buffer.offset += len;\r\n                        return msg;\r\n                    } catch (err) {\r\n                        buffer.offset += len;\r\n                        throw err;\r\n                    }\r\n                };\r\n\r\n                /**\r\n                 * Decodes the message from the specified base64 encoded string.\r\n                 * @name ProtoBuf.Builder.Message.decode64\r\n                 * @function\r\n                 * @param {string} str String to decode from\r\n                 * @return {!ProtoBuf.Builder.Message} Decoded message\r\n                 * @throws {Error} If the message cannot be decoded or if required fields are missing. The later still\r\n                 *  returns the decoded message with missing fields in the `decoded` property on the error.\r\n                 * @expose\r\n                 */\r\n                Message.decode64 = function(str) {\r\n                    return Message.decode(str, \"base64\");\r\n                };\r\n\r\n                /**\r\n                 * Decodes the message from the specified hex encoded string.\r\n                 * @name ProtoBuf.Builder.Message.decodeHex\r\n                 * @function\r\n                 * @param {string} str String to decode from\r\n                 * @return {!ProtoBuf.Builder.Message} Decoded message\r\n                 * @throws {Error} If the message cannot be decoded or if required fields are missing. The later still\r\n                 *  returns the decoded message with missing fields in the `decoded` property on the error.\r\n                 * @expose\r\n                 */\r\n                Message.decodeHex = function(str) {\r\n                    return Message.decode(str, \"hex\");\r\n                };\r\n\r\n                /**\r\n                 * Decodes the message from a JSON string.\r\n                 * @name ProtoBuf.Builder.Message.decodeJSON\r\n                 * @function\r\n                 * @param {string} str String to decode from\r\n                 * @return {!ProtoBuf.Builder.Message} Decoded message\r\n                 * @throws {Error} If the message cannot be decoded or if required fields are\r\n                 * missing.\r\n                 * @expose\r\n                 */\r\n                Message.decodeJSON = function(str) {\r\n                    return new Message(JSON.parse(str));\r\n                };\r\n\r\n                // Utility\r\n\r\n                /**\r\n                 * Returns a string representation of this Message.\r\n                 * @name ProtoBuf.Builder.Message#toString\r\n                 * @function\r\n                 * @return {string} String representation as of \".Fully.Qualified.MessageName\"\r\n                 * @expose\r\n                 */\r\n                MessagePrototype.toString = function() {\r\n                    return T.toString();\r\n                };\r\n\r\n                // Properties\r\n\r\n                /**\r\n                 * Message options.\r\n                 * @name ProtoBuf.Builder.Message.$options\r\n                 * @type {Object.}\r\n                 * @expose\r\n                 */\r\n                var $optionsS; // cc needs this\r\n\r\n                /**\r\n                 * Message options.\r\n                 * @name ProtoBuf.Builder.Message#$options\r\n                 * @type {Object.}\r\n                 * @expose\r\n                 */\r\n                var $options;\r\n\r\n                /**\r\n                 * Reflection type.\r\n                 * @name ProtoBuf.Builder.Message.$type\r\n                 * @type {!ProtoBuf.Reflect.Message}\r\n                 * @expose\r\n                 */\r\n                var $typeS;\r\n\r\n                /**\r\n                 * Reflection type.\r\n                 * @name ProtoBuf.Builder.Message#$type\r\n                 * @type {!ProtoBuf.Reflect.Message}\r\n                 * @expose\r\n                 */\r\n                var $type;\r\n\r\n                if (Object.defineProperty)\r\n                    Object.defineProperty(Message, '$options', { \"value\": T.buildOpt() }),\r\n                    Object.defineProperty(MessagePrototype, \"$options\", { \"value\": Message[\"$options\"] }),\r\n                    Object.defineProperty(Message, \"$type\", { \"value\": T }),\r\n                    Object.defineProperty(MessagePrototype, \"$type\", { \"value\": T });\r\n\r\n                return Message;\r\n\r\n            })(ProtoBuf, this);\r\n\r\n            // Static enums and prototyped sub-messages / cached collections\r\n            this._fields = [];\r\n            this._fieldsById = {};\r\n            this._fieldsByName = {};\r\n            this._oneofsByName = {};\r\n            for (var i=0, k=this.children.length, child; i>> 3;\r\n            switch (wireType) {\r\n                case ProtoBuf.WIRE_TYPES.VARINT:\r\n                    do tag = buf.readUint8();\r\n                    while ((tag & 0x80) === 0x80);\r\n                    break;\r\n                case ProtoBuf.WIRE_TYPES.BITS64:\r\n                    buf.offset += 8;\r\n                    break;\r\n                case ProtoBuf.WIRE_TYPES.LDELIM:\r\n                    tag = buf.readVarint32(); // reads the varint\r\n                    buf.offset += tag;        // skips n bytes\r\n                    break;\r\n                case ProtoBuf.WIRE_TYPES.STARTGROUP:\r\n                    skipTillGroupEnd(id, buf);\r\n                    break;\r\n                case ProtoBuf.WIRE_TYPES.ENDGROUP:\r\n                    if (id === expectedId)\r\n                        return false;\r\n                    else\r\n                        throw Error(\"Illegal GROUPEND after unknown group: \"+id+\" (\"+expectedId+\" expected)\");\r\n                case ProtoBuf.WIRE_TYPES.BITS32:\r\n                    buf.offset += 4;\r\n                    break;\r\n                default:\r\n                    throw Error(\"Illegal wire type in unknown group \"+expectedId+\": \"+wireType);\r\n            }\r\n            return true;\r\n        }\r\n\r\n        /**\r\n         * Decodes an encoded message and returns the decoded message.\r\n         * @param {ByteBuffer} buffer ByteBuffer to decode from\r\n         * @param {number=} length Message length. Defaults to decode all remaining data.\r\n         * @param {number=} expectedGroupEndId Expected GROUPEND id if this is a legacy group\r\n         * @return {ProtoBuf.Builder.Message} Decoded message\r\n         * @throws {Error} If the message cannot be decoded\r\n         * @expose\r\n         */\r\n        MessagePrototype.decode = function(buffer, length, expectedGroupEndId) {\r\n            if (typeof length !== 'number')\r\n                length = -1;\r\n            var start = buffer.offset,\r\n                msg = new (this.clazz)(),\r\n                tag, wireType, id, field;\r\n            while (buffer.offset < start+length || (length === -1 && buffer.remaining() > 0)) {\r\n                tag = buffer.readVarint32();\r\n                wireType = tag & 0x07;\r\n                id = tag >>> 3;\r\n                if (wireType === ProtoBuf.WIRE_TYPES.ENDGROUP) {\r\n                    if (id !== expectedGroupEndId)\r\n                        throw Error(\"Illegal group end indicator for \"+this.toString(true)+\": \"+id+\" (\"+(expectedGroupEndId ? expectedGroupEndId+\" expected\" : \"not a group\")+\")\");\r\n                    break;\r\n                }\r\n                if (!(field = this._fieldsById[id])) {\r\n                    // \"messages created by your new code can be parsed by your old code: old binaries simply ignore the new field when parsing.\"\r\n                    switch (wireType) {\r\n                        case ProtoBuf.WIRE_TYPES.VARINT:\r\n                            buffer.readVarint32();\r\n                            break;\r\n                        case ProtoBuf.WIRE_TYPES.BITS32:\r\n                            buffer.offset += 4;\r\n                            break;\r\n                        case ProtoBuf.WIRE_TYPES.BITS64:\r\n                            buffer.offset += 8;\r\n                            break;\r\n                        case ProtoBuf.WIRE_TYPES.LDELIM:\r\n                            var len = buffer.readVarint32();\r\n                            buffer.offset += len;\r\n                            break;\r\n                        case ProtoBuf.WIRE_TYPES.STARTGROUP:\r\n                            while (skipTillGroupEnd(id, buffer)) {}\r\n                            break;\r\n                        default:\r\n                            throw Error(\"Illegal wire type for unknown field \"+id+\" in \"+this.toString(true)+\"#decode: \"+wireType);\r\n                    }\r\n                    continue;\r\n                }\r\n                if (field.repeated && !field.options[\"packed\"]) {\r\n                    msg[field.name].push(field.decode(wireType, buffer));\r\n                } else if (field.map) {\r\n                    var keyval = field.decode(wireType, buffer);\r\n                    msg[field.name].set(keyval[0], keyval[1]);\r\n                } else {\r\n                    msg[field.name] = field.decode(wireType, buffer);\r\n                    if (field.oneof) { // Field is part of an OneOf (not a virtual OneOf field)\r\n                        var currentField = msg[field.oneof.name]; // Virtual field references currently set field\r\n                        if (currentField !== null && currentField !== field.name)\r\n                            msg[currentField] = null; // Clear currently set field\r\n                        msg[field.oneof.name] = field.name; // Point virtual field at this field\r\n                    }\r\n                }\r\n            }\r\n\r\n            // Check if all required fields are present and set default values for optional fields that are not\r\n            for (var i=0, k=this._fields.length; i=} options Options\r\n         * @param {!ProtoBuf.Reflect.Message.OneOf=} oneof Enclosing OneOf\r\n         * @param {string?} syntax The syntax level of this definition (e.g., proto3)\r\n         * @constructor\r\n         * @extends ProtoBuf.Reflect.T\r\n         */\r\n        var Field = function(builder, message, rule, keytype, type, name, id, options, oneof, syntax) {\r\n            T.call(this, builder, message, name);\r\n\r\n            /**\r\n             * @override\r\n             */\r\n            this.className = \"Message.Field\";\r\n\r\n            /**\r\n             * Message field required flag.\r\n             * @type {boolean}\r\n             * @expose\r\n             */\r\n            this.required = rule === \"required\";\r\n\r\n            /**\r\n             * Message field repeated flag.\r\n             * @type {boolean}\r\n             * @expose\r\n             */\r\n            this.repeated = rule === \"repeated\";\r\n\r\n            /**\r\n             * Message field map flag.\r\n             * @type {boolean}\r\n             * @expose\r\n             */\r\n            this.map = rule === \"map\";\r\n\r\n            /**\r\n             * Message field key type. Type reference string if unresolved, protobuf\r\n             * type if resolved. Valid only if this.map === true, null otherwise.\r\n             * @type {string|{name: string, wireType: number}|null}\r\n             * @expose\r\n             */\r\n            this.keyType = keytype || null;\r\n\r\n            /**\r\n             * Message field type. Type reference string if unresolved, protobuf type if\r\n             * resolved. In a map field, this is the value type.\r\n             * @type {string|{name: string, wireType: number}}\r\n             * @expose\r\n             */\r\n            this.type = type;\r\n\r\n            /**\r\n             * Resolved type reference inside the global namespace.\r\n             * @type {ProtoBuf.Reflect.T|null}\r\n             * @expose\r\n             */\r\n            this.resolvedType = null;\r\n\r\n            /**\r\n             * Unique message field id.\r\n             * @type {number}\r\n             * @expose\r\n             */\r\n            this.id = id;\r\n\r\n            /**\r\n             * Message field options.\r\n             * @type {!Object.}\r\n             * @dict\r\n             * @expose\r\n             */\r\n            this.options = options || {};\r\n\r\n            /**\r\n             * Default value.\r\n             * @type {*}\r\n             * @expose\r\n             */\r\n            this.defaultValue = null;\r\n\r\n            /**\r\n             * Enclosing OneOf.\r\n             * @type {?ProtoBuf.Reflect.Message.OneOf}\r\n             * @expose\r\n             */\r\n            this.oneof = oneof || null;\r\n\r\n            /**\r\n             * Syntax level of this definition (e.g., proto3).\r\n             * @type {string}\r\n             * @expose\r\n             */\r\n            this.syntax = syntax || 'proto2';\r\n\r\n            /**\r\n             * Original field name.\r\n             * @type {string}\r\n             * @expose\r\n             */\r\n            this.originalName = this.name; // Used to revert camelcase transformation on naming collisions\r\n\r\n            /**\r\n             * Element implementation. Created in build() after types are resolved.\r\n             * @type {ProtoBuf.Element}\r\n             * @expose\r\n             */\r\n            this.element = null;\r\n\r\n            /**\r\n             * Key element implementation, for map fields. Created in build() after\r\n             * types are resolved.\r\n             * @type {ProtoBuf.Element}\r\n             * @expose\r\n             */\r\n            this.keyElement = null;\r\n\r\n            // Convert field names to camel case notation if the override is set\r\n            if (this.builder.options['convertFieldsToCamelCase'] && !(this instanceof Message.ExtensionField))\r\n                this.name = ProtoBuf.Util.toCamelCase(this.name);\r\n        };\r\n\r\n        /**\r\n         * @alias ProtoBuf.Reflect.Message.Field.prototype\r\n         * @inner\r\n         */\r\n        var FieldPrototype = Field.prototype = Object.create(T.prototype);\r\n\r\n        /**\r\n         * Builds the field.\r\n         * @override\r\n         * @expose\r\n         */\r\n        FieldPrototype.build = function() {\r\n            this.element = new Element(this.type, this.resolvedType, false, this.syntax, this.name);\r\n            if (this.map)\r\n                this.keyElement = new Element(this.keyType, undefined, true, this.syntax, this.name);\r\n\r\n            // In proto3, fields do not have field presence, and every field is set to\r\n            // its type's default value (\"\", 0, 0.0, or false).\r\n            if (this.syntax === 'proto3' && !this.repeated && !this.map)\r\n                this.defaultValue = Element.defaultFieldValue(this.type);\r\n\r\n            // Otherwise, default values are present when explicitly specified\r\n            else if (typeof this.options['default'] !== 'undefined')\r\n                this.defaultValue = this.verifyValue(this.options['default']);\r\n        };\r\n\r\n        /**\r\n         * Checks if the given value can be set for this field.\r\n         * @param {*} value Value to check\r\n         * @param {boolean=} skipRepeated Whether to skip the repeated value check or not. Defaults to false.\r\n         * @return {*} Verified, maybe adjusted, value\r\n         * @throws {Error} If the value cannot be set for this field\r\n         * @expose\r\n         */\r\n        FieldPrototype.verifyValue = function(value, skipRepeated) {\r\n            skipRepeated = skipRepeated || false;\r\n            var self = this;\r\n            function fail(val, msg) {\r\n                throw Error(\"Illegal value for \"+self.toString(true)+\" of type \"+self.type.name+\": \"+val+\" (\"+msg+\")\");\r\n            }\r\n            if (value === null) { // NULL values for optional fields\r\n                if (this.required)\r\n                    fail(typeof value, \"required\");\r\n                if (this.syntax === 'proto3' && this.type !== ProtoBuf.TYPES[\"message\"])\r\n                    fail(typeof value, \"proto3 field without field presence cannot be null\");\r\n                return null;\r\n            }\r\n            var i;\r\n            if (this.repeated && !skipRepeated) { // Repeated values as arrays\r\n                if (!Array.isArray(value))\r\n                    value = [value];\r\n                var res = [];\r\n                for (i=0; i 0;\r\n\r\n                case ProtoBuf.TYPES[\"bytes\"]:\r\n                    return value.remaining() > 0;\r\n\r\n                case ProtoBuf.TYPES[\"enum\"]:\r\n                    return value !== 0;\r\n\r\n                case ProtoBuf.TYPES[\"message\"]:\r\n                    return value !== null;\r\n                default:\r\n                    return true;\r\n            }\r\n        };\r\n\r\n        /**\r\n         * Encodes the specified field value to the specified buffer.\r\n         * @param {*} value Verified field value\r\n         * @param {ByteBuffer} buffer ByteBuffer to encode to\r\n         * @param {!ProtoBuf.Builder.Message} message Runtime message\r\n         * @return {ByteBuffer} The ByteBuffer for chaining\r\n         * @throws {Error} If the field cannot be encoded\r\n         * @expose\r\n         */\r\n        FieldPrototype.encode = function(value, buffer, message) {\r\n            if (this.type === null || typeof this.type !== 'object')\r\n                throw Error(\"[INTERNAL] Unresolved type in \"+this.toString(true)+\": \"+this.type);\r\n            if (value === null || (this.repeated && value.length == 0))\r\n                return buffer; // Optional omitted\r\n            try {\r\n                if (this.repeated) {\r\n                    var i;\r\n                    // \"Only repeated fields of primitive numeric types (types which use the varint, 32-bit, or 64-bit wire\r\n                    // types) can be declared 'packed'.\"\r\n                    if (this.options[\"packed\"] && ProtoBuf.PACKABLE_WIRE_TYPES.indexOf(this.type.wireType) >= 0) {\r\n                        // \"All of the elements of the field are packed into a single key-value pair with wire type 2\r\n                        // (length-delimited). Each element is encoded the same way it would be normally, except without a\r\n                        // tag preceding it.\"\r\n                        buffer.writeVarint32((this.id << 3) | ProtoBuf.WIRE_TYPES.LDELIM);\r\n                        buffer.ensureCapacity(buffer.offset += 1); // We do not know the length yet, so let's assume a varint of length 1\r\n                        var start = buffer.offset; // Remember where the contents begin\r\n                        for (i=0; i 1) { // We need to move the contents\r\n                            var contents = buffer.slice(start, buffer.offset);\r\n                            start += varintLen-1;\r\n                            buffer.offset = start;\r\n                            buffer.append(contents);\r\n                        }\r\n                        buffer.writeVarint32(len, start-varintLen);\r\n                    } else {\r\n                        // \"If your message definition has repeated elements (without the [packed=true] option), the encoded\r\n                        // message has zero or more key-value pairs with the same tag number\"\r\n                        for (i=0; i= 0) {\r\n                        n += ByteBuffer.calculateVarint32((this.id << 3) | ProtoBuf.WIRE_TYPES.LDELIM);\r\n                        ni = 0;\r\n                        for (i=0; i= 0) {\r\n                if (!skipRepeated) {\r\n                    nBytes = buffer.readVarint32();\r\n                    nBytes = buffer.offset + nBytes; // Limit\r\n                    var values = [];\r\n                    while (buffer.offset < nBytes)\r\n                        values.push(this.decode(this.type.wireType, buffer, true));\r\n                    return values;\r\n                }\r\n                // Read the next value otherwise...\r\n            }\r\n\r\n            // Handle maps.\r\n            if (this.map) {\r\n                // Read one (key, value) submessage, and return [key, value]\r\n                var key = Element.defaultFieldValue(this.keyType);\r\n                value = Element.defaultFieldValue(this.type);\r\n\r\n                // Read the length\r\n                nBytes = buffer.readVarint32();\r\n                if (buffer.remaining() < nBytes)\r\n                    throw Error(\"Illegal number of bytes for \"+this.toString(true)+\": \"+nBytes+\" required but got only \"+buffer.remaining());\r\n\r\n                // Get a sub-buffer of this key/value submessage\r\n                var msgbuf = buffer.clone();\r\n                msgbuf.limit = msgbuf.offset + nBytes;\r\n                buffer.offset += nBytes;\r\n\r\n                while (msgbuf.remaining() > 0) {\r\n                    var tag = msgbuf.readVarint32();\r\n                    wireType = tag & 0x07;\r\n                    var id = tag >>> 3;\r\n                    if (id === 1) {\r\n                        key = this.keyElement.decode(msgbuf, wireType, id);\r\n                    } else if (id === 2) {\r\n                        value = this.element.decode(msgbuf, wireType, id);\r\n                    } else {\r\n                        throw Error(\"Unexpected tag in map field key/value submessage\");\r\n                    }\r\n                }\r\n\r\n                return [key, value];\r\n            }\r\n\r\n            // Handle singular and non-packed repeated field values.\r\n            return this.element.decode(buffer, wireType, this.id);\r\n        };\r\n\r\n        /**\r\n         * @alias ProtoBuf.Reflect.Message.Field\r\n         * @expose\r\n         */\r\n        Reflect.Message.Field = Field;\r\n\r\n        /**\r\n         * Constructs a new Message ExtensionField.\r\n         * @exports ProtoBuf.Reflect.Message.ExtensionField\r\n         * @param {!ProtoBuf.Builder} builder Builder reference\r\n         * @param {!ProtoBuf.Reflect.Message} message Message reference\r\n         * @param {string} rule Rule, one of requried, optional, repeated\r\n         * @param {string} type Data type, e.g. int32\r\n         * @param {string} name Field name\r\n         * @param {number} id Unique field id\r\n         * @param {!Object.=} options Options\r\n         * @constructor\r\n         * @extends ProtoBuf.Reflect.Message.Field\r\n         */\r\n        var ExtensionField = function(builder, message, rule, type, name, id, options) {\r\n            Field.call(this, builder, message, rule, /* keytype = */ null, type, name, id, options);\r\n\r\n            /**\r\n             * Extension reference.\r\n             * @type {!ProtoBuf.Reflect.Extension}\r\n             * @expose\r\n             */\r\n            this.extension;\r\n        };\r\n\r\n        // Extends Field\r\n        ExtensionField.prototype = Object.create(Field.prototype);\r\n\r\n        /**\r\n         * @alias ProtoBuf.Reflect.Message.ExtensionField\r\n         * @expose\r\n         */\r\n        Reflect.Message.ExtensionField = ExtensionField;\r\n\r\n        /**\r\n         * Constructs a new Message OneOf.\r\n         * @exports ProtoBuf.Reflect.Message.OneOf\r\n         * @param {!ProtoBuf.Builder} builder Builder reference\r\n         * @param {!ProtoBuf.Reflect.Message} message Message reference\r\n         * @param {string} name OneOf name\r\n         * @constructor\r\n         * @extends ProtoBuf.Reflect.T\r\n         */\r\n        var OneOf = function(builder, message, name) {\r\n            T.call(this, builder, message, name);\r\n\r\n            /**\r\n             * Enclosed fields.\r\n             * @type {!Array.}\r\n             * @expose\r\n             */\r\n            this.fields = [];\r\n        };\r\n\r\n        /**\r\n         * @alias ProtoBuf.Reflect.Message.OneOf\r\n         * @expose\r\n         */\r\n        Reflect.Message.OneOf = OneOf;\r\n\r\n        /**\r\n         * Constructs a new Enum.\r\n         * @exports ProtoBuf.Reflect.Enum\r\n         * @param {!ProtoBuf.Builder} builder Builder reference\r\n         * @param {!ProtoBuf.Reflect.T} parent Parent Reflect object\r\n         * @param {string} name Enum name\r\n         * @param {Object.=} options Enum options\r\n         * @param {string?} syntax The syntax level (e.g., proto3)\r\n         * @constructor\r\n         * @extends ProtoBuf.Reflect.Namespace\r\n         */\r\n        var Enum = function(builder, parent, name, options, syntax) {\r\n            Namespace.call(this, builder, parent, name, options, syntax);\r\n\r\n            /**\r\n             * @override\r\n             */\r\n            this.className = \"Enum\";\r\n\r\n            /**\r\n             * Runtime enum object.\r\n             * @type {Object.|null}\r\n             * @expose\r\n             */\r\n            this.object = null;\r\n        };\r\n\r\n        /**\r\n         * Gets the string name of an enum value.\r\n         * @param {!ProtoBuf.Builder.Enum} enm Runtime enum\r\n         * @param {number} value Enum value\r\n         * @returns {?string} Name or `null` if not present\r\n         * @expose\r\n         */\r\n        Enum.getName = function(enm, value) {\r\n            var keys = Object.keys(enm);\r\n            for (var i=0, key; i}\r\n         * @expose\r\n         */\r\n        EnumPrototype.build = function(rebuild) {\r\n            if (this.object && !rebuild)\r\n                return this.object;\r\n            var enm = new ProtoBuf.Builder.Enum(),\r\n                values = this.getChildren(Enum.Value);\r\n            for (var i=0, k=values.length; i=} options Options\r\n         * @constructor\r\n         * @extends ProtoBuf.Reflect.Namespace\r\n         */\r\n        var Service = function(builder, root, name, options) {\r\n            Namespace.call(this, builder, root, name, options);\r\n\r\n            /**\r\n             * @override\r\n             */\r\n            this.className = \"Service\";\r\n\r\n            /**\r\n             * Built runtime service class.\r\n             * @type {?function(new:ProtoBuf.Builder.Service)}\r\n             */\r\n            this.clazz = null;\r\n        };\r\n\r\n        /**\r\n         * @alias ProtoBuf.Reflect.Service.prototype\r\n         * @inner\r\n         */\r\n        var ServicePrototype = Service.prototype = Object.create(Namespace.prototype);\r\n\r\n        /**\r\n         * Builds the service and returns the runtime counterpart, which is a fully functional class.\r\n         * @see ProtoBuf.Builder.Service\r\n         * @param {boolean=} rebuild Whether to rebuild or not\r\n         * @return {Function} Service class\r\n         * @throws {Error} If the message cannot be built\r\n         * @expose\r\n         */\r\n        ServicePrototype.build = function(rebuild) {\r\n            if (this.clazz && !rebuild)\r\n                return this.clazz;\r\n\r\n            // Create the runtime Service class in its own scope\r\n            return this.clazz = (function(ProtoBuf, T) {\r\n\r\n                /**\r\n                 * Constructs a new runtime Service.\r\n                 * @name ProtoBuf.Builder.Service\r\n                 * @param {function(string, ProtoBuf.Builder.Message, function(Error, ProtoBuf.Builder.Message=))=} rpcImpl RPC implementation receiving the method name and the message\r\n                 * @class Barebone of all runtime services.\r\n                 * @constructor\r\n                 * @throws {Error} If the service cannot be created\r\n                 */\r\n                var Service = function(rpcImpl) {\r\n                    ProtoBuf.Builder.Service.call(this);\r\n\r\n                    /**\r\n                     * Service implementation.\r\n                     * @name ProtoBuf.Builder.Service#rpcImpl\r\n                     * @type {!function(string, ProtoBuf.Builder.Message, function(Error, ProtoBuf.Builder.Message=))}\r\n                     * @expose\r\n                     */\r\n                    this.rpcImpl = rpcImpl || function(name, msg, callback) {\r\n                        // This is what a user has to implement: A function receiving the method name, the actual message to\r\n                        // send (type checked) and the callback that's either provided with the error as its first\r\n                        // argument or null and the actual response message.\r\n                        setTimeout(callback.bind(this, Error(\"Not implemented, see: https://github.com/dcodeIO/ProtoBuf.js/wiki/Services\")), 0); // Must be async!\r\n                    };\r\n                };\r\n\r\n                /**\r\n                 * @alias ProtoBuf.Builder.Service.prototype\r\n                 * @inner\r\n                 */\r\n                var ServicePrototype = Service.prototype = Object.create(ProtoBuf.Builder.Service.prototype);\r\n\r\n                /**\r\n                 * Asynchronously performs an RPC call using the given RPC implementation.\r\n                 * @name ProtoBuf.Builder.Service.[Method]\r\n                 * @function\r\n                 * @param {!function(string, ProtoBuf.Builder.Message, function(Error, ProtoBuf.Builder.Message=))} rpcImpl RPC implementation\r\n                 * @param {ProtoBuf.Builder.Message} req Request\r\n                 * @param {function(Error, (ProtoBuf.Builder.Message|ByteBuffer|Buffer|string)=)} callback Callback receiving\r\n                 *  the error if any and the response either as a pre-parsed message or as its raw bytes\r\n                 * @abstract\r\n                 */\r\n\r\n                /**\r\n                 * Asynchronously performs an RPC call using the instance's RPC implementation.\r\n                 * @name ProtoBuf.Builder.Service#[Method]\r\n                 * @function\r\n                 * @param {ProtoBuf.Builder.Message} req Request\r\n                 * @param {function(Error, (ProtoBuf.Builder.Message|ByteBuffer|Buffer|string)=)} callback Callback receiving\r\n                 *  the error if any and the response either as a pre-parsed message or as its raw bytes\r\n                 * @abstract\r\n                 */\r\n\r\n                var rpc = T.getChildren(ProtoBuf.Reflect.Service.RPCMethod);\r\n                for (var i=0; i}\r\n                 * @expose\r\n                 */\r\n                var $optionsS; // cc needs this\r\n\r\n                /**\r\n                 * Service options.\r\n                 * @name ProtoBuf.Builder.Service#$options\r\n                 * @type {Object.}\r\n                 * @expose\r\n                 */\r\n                var $options;\r\n\r\n                /**\r\n                 * Reflection type.\r\n                 * @name ProtoBuf.Builder.Service.$type\r\n                 * @type {!ProtoBuf.Reflect.Service}\r\n                 * @expose\r\n                 */\r\n                var $typeS;\r\n\r\n                /**\r\n                 * Reflection type.\r\n                 * @name ProtoBuf.Builder.Service#$type\r\n                 * @type {!ProtoBuf.Reflect.Service}\r\n                 * @expose\r\n                 */\r\n                var $type;\r\n\r\n                if (Object.defineProperty)\r\n                    Object.defineProperty(Service, \"$options\", { \"value\": T.buildOpt() }),\r\n                    Object.defineProperty(ServicePrototype, \"$options\", { \"value\": Service[\"$options\"] }),\r\n                    Object.defineProperty(Service, \"$type\", { \"value\": T }),\r\n                    Object.defineProperty(ServicePrototype, \"$type\", { \"value\": T });\r\n\r\n                return Service;\r\n\r\n            })(ProtoBuf, this);\r\n        };\r\n\r\n        /**\r\n         * @alias ProtoBuf.Reflect.Service\r\n         * @expose\r\n         */\r\n        Reflect.Service = Service;\r\n\r\n        /**\r\n         * Abstract service method.\r\n         * @exports ProtoBuf.Reflect.Service.Method\r\n         * @param {!ProtoBuf.Builder} builder Builder reference\r\n         * @param {!ProtoBuf.Reflect.Service} svc Service\r\n         * @param {string} name Method name\r\n         * @param {Object.=} options Options\r\n         * @constructor\r\n         * @extends ProtoBuf.Reflect.T\r\n         */\r\n        var Method = function(builder, svc, name, options) {\r\n            T.call(this, builder, svc, name);\r\n\r\n            /**\r\n             * @override\r\n             */\r\n            this.className = \"Service.Method\";\r\n\r\n            /**\r\n             * Options.\r\n             * @type {Object.}\r\n             * @expose\r\n             */\r\n            this.options = options || {};\r\n        };\r\n\r\n        /**\r\n         * @alias ProtoBuf.Reflect.Service.Method.prototype\r\n         * @inner\r\n         */\r\n        var MethodPrototype = Method.prototype = Object.create(T.prototype);\r\n\r\n        /**\r\n         * Builds the method's '$options' property.\r\n         * @name ProtoBuf.Reflect.Service.Method#buildOpt\r\n         * @function\r\n         * @return {Object.}\r\n         */\r\n        MethodPrototype.buildOpt = NamespacePrototype.buildOpt;\r\n\r\n        /**\r\n         * @alias ProtoBuf.Reflect.Service.Method\r\n         * @expose\r\n         */\r\n        Reflect.Service.Method = Method;\r\n\r\n        /**\r\n         * RPC service method.\r\n         * @exports ProtoBuf.Reflect.Service.RPCMethod\r\n         * @param {!ProtoBuf.Builder} builder Builder reference\r\n         * @param {!ProtoBuf.Reflect.Service} svc Service\r\n         * @param {string} name Method name\r\n         * @param {string} request Request message name\r\n         * @param {string} response Response message name\r\n         * @param {boolean} request_stream Whether requests are streamed\r\n         * @param {boolean} response_stream Whether responses are streamed\r\n         * @param {Object.=} options Options\r\n         * @constructor\r\n         * @extends ProtoBuf.Reflect.Service.Method\r\n         */\r\n        var RPCMethod = function(builder, svc, name, request, response, request_stream, response_stream, options) {\r\n            Method.call(this, builder, svc, name, options);\r\n\r\n            /**\r\n             * @override\r\n             */\r\n            this.className = \"Service.RPCMethod\";\r\n\r\n            /**\r\n             * Request message name.\r\n             * @type {string}\r\n             * @expose\r\n             */\r\n            this.requestName = request;\r\n\r\n            /**\r\n             * Response message name.\r\n             * @type {string}\r\n             * @expose\r\n             */\r\n            this.responseName = response;\r\n\r\n            /**\r\n             * Whether requests are streamed\r\n             * @type {bool}\r\n             * @expose\r\n             */\r\n            this.requestStream = request_stream;\r\n\r\n            /**\r\n             * Whether responses are streamed\r\n             * @type {bool}\r\n             * @expose\r\n             */\r\n            this.responseStream = response_stream;\r\n\r\n            /**\r\n             * Resolved request message type.\r\n             * @type {ProtoBuf.Reflect.Message}\r\n             * @expose\r\n             */\r\n            this.resolvedRequestType = null;\r\n\r\n            /**\r\n             * Resolved response message type.\r\n             * @type {ProtoBuf.Reflect.Message}\r\n             * @expose\r\n             */\r\n            this.resolvedResponseType = null;\r\n        };\r\n\r\n        // Extends Method\r\n        RPCMethod.prototype = Object.create(Method.prototype);\r\n\r\n        /**\r\n         * @alias ProtoBuf.Reflect.Service.RPCMethod\r\n         * @expose\r\n         */\r\n        Reflect.Service.RPCMethod = RPCMethod;\r\n\r\n        return Reflect;\r\n\r\n    })(ProtoBuf);\r\n\r\n    /**\r\n     * @alias ProtoBuf.Builder\r\n     * @expose\r\n     */\r\n    ProtoBuf.Builder = (function(ProtoBuf, Lang, Reflect) {\r\n        \"use strict\";\r\n\r\n        /**\r\n         * Constructs a new Builder.\r\n         * @exports ProtoBuf.Builder\r\n         * @class Provides the functionality to build protocol messages.\r\n         * @param {Object.=} options Options\r\n         * @constructor\r\n         */\r\n        var Builder = function(options) {\r\n\r\n            /**\r\n             * Namespace.\r\n             * @type {ProtoBuf.Reflect.Namespace}\r\n             * @expose\r\n             */\r\n            this.ns = new Reflect.Namespace(this, null, \"\"); // Global namespace\r\n\r\n            /**\r\n             * Namespace pointer.\r\n             * @type {ProtoBuf.Reflect.T}\r\n             * @expose\r\n             */\r\n            this.ptr = this.ns;\r\n\r\n            /**\r\n             * Resolved flag.\r\n             * @type {boolean}\r\n             * @expose\r\n             */\r\n            this.resolved = false;\r\n\r\n            /**\r\n             * The current building result.\r\n             * @type {Object.|null}\r\n             * @expose\r\n             */\r\n            this.result = null;\r\n\r\n            /**\r\n             * Imported files.\r\n             * @type {Array.}\r\n             * @expose\r\n             */\r\n            this.files = {};\r\n\r\n            /**\r\n             * Import root override.\r\n             * @type {?string}\r\n             * @expose\r\n             */\r\n            this.importRoot = null;\r\n\r\n            /**\r\n             * Options.\r\n             * @type {!Object.}\r\n             * @expose\r\n             */\r\n            this.options = options || {};\r\n        };\r\n\r\n        /**\r\n         * @alias ProtoBuf.Builder.prototype\r\n         * @inner\r\n         */\r\n        var BuilderPrototype = Builder.prototype;\r\n\r\n        // ----- Definition tests -----\r\n\r\n        /**\r\n         * Tests if a definition most likely describes a message.\r\n         * @param {!Object} def\r\n         * @returns {boolean}\r\n         * @expose\r\n         */\r\n        Builder.isMessage = function(def) {\r\n            // Messages require a string name\r\n            if (typeof def[\"name\"] !== 'string')\r\n                return false;\r\n            // Messages do not contain values (enum) or rpc methods (service)\r\n            if (typeof def[\"values\"] !== 'undefined' || typeof def[\"rpc\"] !== 'undefined')\r\n                return false;\r\n            return true;\r\n        };\r\n\r\n        /**\r\n         * Tests if a definition most likely describes a message field.\r\n         * @param {!Object} def\r\n         * @returns {boolean}\r\n         * @expose\r\n         */\r\n        Builder.isMessageField = function(def) {\r\n            // Message fields require a string rule, name and type and an id\r\n            if (typeof def[\"rule\"] !== 'string' || typeof def[\"name\"] !== 'string' || typeof def[\"type\"] !== 'string' || typeof def[\"id\"] === 'undefined')\r\n                return false;\r\n            return true;\r\n        };\r\n\r\n        /**\r\n         * Tests if a definition most likely describes an enum.\r\n         * @param {!Object} def\r\n         * @returns {boolean}\r\n         * @expose\r\n         */\r\n        Builder.isEnum = function(def) {\r\n            // Enums require a string name\r\n            if (typeof def[\"name\"] !== 'string')\r\n                return false;\r\n            // Enums require at least one value\r\n            if (typeof def[\"values\"] === 'undefined' || !Array.isArray(def[\"values\"]) || def[\"values\"].length === 0)\r\n                return false;\r\n            return true;\r\n        };\r\n\r\n        /**\r\n         * Tests if a definition most likely describes a service.\r\n         * @param {!Object} def\r\n         * @returns {boolean}\r\n         * @expose\r\n         */\r\n        Builder.isService = function(def) {\r\n            // Services require a string name and an rpc object\r\n            if (typeof def[\"name\"] !== 'string' || typeof def[\"rpc\"] !== 'object' || !def[\"rpc\"])\r\n                return false;\r\n            return true;\r\n        };\r\n\r\n        /**\r\n         * Tests if a definition most likely describes an extended message\r\n         * @param {!Object} def\r\n         * @returns {boolean}\r\n         * @expose\r\n         */\r\n        Builder.isExtend = function(def) {\r\n            // Extends rquire a string ref\r\n            if (typeof def[\"ref\"] !== 'string')\r\n                return false;\r\n            return true;\r\n        };\r\n\r\n        // ----- Building -----\r\n\r\n        /**\r\n         * Resets the pointer to the root namespace.\r\n         * @returns {!ProtoBuf.Builder} this\r\n         * @expose\r\n         */\r\n        BuilderPrototype.reset = function() {\r\n            this.ptr = this.ns;\r\n            return this;\r\n        };\r\n\r\n        /**\r\n         * Defines a namespace on top of the current pointer position and places the pointer on it.\r\n         * @param {string} namespace\r\n         * @return {!ProtoBuf.Builder} this\r\n         * @expose\r\n         */\r\n        BuilderPrototype.define = function(namespace) {\r\n            if (typeof namespace !== 'string' || !Lang.TYPEREF.test(namespace))\r\n                throw Error(\"illegal namespace: \"+namespace);\r\n            namespace.split(\".\").forEach(function(part) {\r\n                var ns = this.ptr.getChild(part);\r\n                if (ns === null) // Keep existing\r\n                    this.ptr.addChild(ns = new Reflect.Namespace(this, this.ptr, part));\r\n                this.ptr = ns;\r\n            }, this);\r\n            return this;\r\n        };\r\n\r\n        /**\r\n         * Creates the specified definitions at the current pointer position.\r\n         * @param {!Array.} defs Messages, enums or services to create\r\n         * @returns {!ProtoBuf.Builder} this\r\n         * @throws {Error} If a message definition is invalid\r\n         * @expose\r\n         */\r\n        BuilderPrototype.create = function(defs) {\r\n            if (!defs)\r\n                return this; // Nothing to create\r\n            if (!Array.isArray(defs))\r\n                defs = [defs];\r\n            else {\r\n                if (defs.length === 0)\r\n                    return this;\r\n                defs = defs.slice();\r\n            }\r\n\r\n            // It's quite hard to keep track of scopes and memory here, so let's do this iteratively.\r\n            var stack = [defs];\r\n            while (stack.length > 0) {\r\n                defs = stack.pop();\r\n\r\n                if (!Array.isArray(defs)) // Stack always contains entire namespaces\r\n                    throw Error(\"not a valid namespace: \"+JSON.stringify(defs));\r\n\r\n                while (defs.length > 0) {\r\n                    var def = defs.shift(); // Namespaces always contain an array of messages, enums and services\r\n\r\n                    if (Builder.isMessage(def)) {\r\n                        var obj = new Reflect.Message(this, this.ptr, def[\"name\"], def[\"options\"], def[\"isGroup\"], def[\"syntax\"]);\r\n\r\n                        // Create OneOfs\r\n                        var oneofs = {};\r\n                        if (def[\"oneofs\"])\r\n                            Object.keys(def[\"oneofs\"]).forEach(function(name) {\r\n                                obj.addChild(oneofs[name] = new Reflect.Message.OneOf(this, obj, name));\r\n                            }, this);\r\n\r\n                        // Create fields\r\n                        if (def[\"fields\"])\r\n                            def[\"fields\"].forEach(function(fld) {\r\n                                if (obj.getChild(fld[\"id\"]|0) !== null)\r\n                                    throw Error(\"duplicate or invalid field id in \"+obj.name+\": \"+fld['id']);\r\n                                if (fld[\"options\"] && typeof fld[\"options\"] !== 'object')\r\n                                    throw Error(\"illegal field options in \"+obj.name+\"#\"+fld[\"name\"]);\r\n                                var oneof = null;\r\n                                if (typeof fld[\"oneof\"] === 'string' && !(oneof = oneofs[fld[\"oneof\"]]))\r\n                                    throw Error(\"illegal oneof in \"+obj.name+\"#\"+fld[\"name\"]+\": \"+fld[\"oneof\"]);\r\n                                fld = new Reflect.Message.Field(this, obj, fld[\"rule\"], fld[\"keytype\"], fld[\"type\"], fld[\"name\"], fld[\"id\"], fld[\"options\"], oneof, def[\"syntax\"]);\r\n                                if (oneof)\r\n                                    oneof.fields.push(fld);\r\n                                obj.addChild(fld);\r\n                            }, this);\r\n\r\n                        // Push children to stack\r\n                        var subObj = [];\r\n                        if (def[\"enums\"])\r\n                            def[\"enums\"].forEach(function(enm) {\r\n                                subObj.push(enm);\r\n                            });\r\n                        if (def[\"messages\"])\r\n                            def[\"messages\"].forEach(function(msg) {\r\n                                subObj.push(msg);\r\n                            });\r\n                        if (def[\"services\"])\r\n                            def[\"services\"].forEach(function(svc) {\r\n                                subObj.push(svc);\r\n                            });\r\n\r\n                        // Set extension ranges\r\n                        if (def[\"extensions\"]) {\r\n                            if (typeof def[\"extensions\"][0] === 'number') // pre 5.0.1\r\n                                obj.extensions = [ def[\"extensions\"] ];\r\n                            else\r\n                                obj.extensions = def[\"extensions\"];\r\n                        }\r\n\r\n                        // Create on top of current namespace\r\n                        this.ptr.addChild(obj);\r\n                        if (subObj.length > 0) {\r\n                            stack.push(defs); // Push the current level back\r\n                            defs = subObj; // Continue processing sub level\r\n                            subObj = null;\r\n                            this.ptr = obj; // And move the pointer to this namespace\r\n                            obj = null;\r\n                            continue;\r\n                        }\r\n                        subObj = null;\r\n\r\n                    } else if (Builder.isEnum(def)) {\r\n\r\n                        obj = new Reflect.Enum(this, this.ptr, def[\"name\"], def[\"options\"], def[\"syntax\"]);\r\n                        def[\"values\"].forEach(function(val) {\r\n                            obj.addChild(new Reflect.Enum.Value(this, obj, val[\"name\"], val[\"id\"]));\r\n                        }, this);\r\n                        this.ptr.addChild(obj);\r\n\r\n                    } else if (Builder.isService(def)) {\r\n\r\n                        obj = new Reflect.Service(this, this.ptr, def[\"name\"], def[\"options\"]);\r\n                        Object.keys(def[\"rpc\"]).forEach(function(name) {\r\n                            var mtd = def[\"rpc\"][name];\r\n                            obj.addChild(new Reflect.Service.RPCMethod(this, obj, name, mtd[\"request\"], mtd[\"response\"], !!mtd[\"request_stream\"], !!mtd[\"response_stream\"], mtd[\"options\"]));\r\n                        }, this);\r\n                        this.ptr.addChild(obj);\r\n\r\n                    } else if (Builder.isExtend(def)) {\r\n\r\n                        obj = this.ptr.resolve(def[\"ref\"], true);\r\n                        if (obj) {\r\n                            def[\"fields\"].forEach(function(fld) {\r\n                                if (obj.getChild(fld['id']|0) !== null)\r\n                                    throw Error(\"duplicate extended field id in \"+obj.name+\": \"+fld['id']);\r\n                                // Check if field id is allowed to be extended\r\n                                if (obj.extensions) {\r\n                                    var valid = false;\r\n                                    obj.extensions.forEach(function(range) {\r\n                                        if (fld[\"id\"] >= range[0] && fld[\"id\"] <= range[1])\r\n                                            valid = true;\r\n                                    });\r\n                                    if (!valid)\r\n                                        throw Error(\"illegal extended field id in \"+obj.name+\": \"+fld['id']+\" (not within valid ranges)\");\r\n                                }\r\n                                // Convert extension field names to camel case notation if the override is set\r\n                                var name = fld[\"name\"];\r\n                                if (this.options['convertFieldsToCamelCase'])\r\n                                    name = ProtoBuf.Util.toCamelCase(name);\r\n                                // see #161: Extensions use their fully qualified name as their runtime key and...\r\n                                var field = new Reflect.Message.ExtensionField(this, obj, fld[\"rule\"], fld[\"type\"], this.ptr.fqn()+'.'+name, fld[\"id\"], fld[\"options\"]);\r\n                                // ...are added on top of the current namespace as an extension which is used for\r\n                                // resolving their type later on (the extension always keeps the original name to\r\n                                // prevent naming collisions)\r\n                                var ext = new Reflect.Extension(this, this.ptr, fld[\"name\"], field);\r\n                                field.extension = ext;\r\n                                this.ptr.addChild(ext);\r\n                                obj.addChild(field);\r\n                            }, this);\r\n\r\n                        } else if (!/\\.?google\\.protobuf\\./.test(def[\"ref\"])) // Silently skip internal extensions\r\n                            throw Error(\"extended message \"+def[\"ref\"]+\" is not defined\");\r\n\r\n                    } else\r\n                        throw Error(\"not a valid definition: \"+JSON.stringify(def));\r\n\r\n                    def = null;\r\n                    obj = null;\r\n                }\r\n                // Break goes here\r\n                defs = null;\r\n                this.ptr = this.ptr.parent; // Namespace done, continue at parent\r\n            }\r\n            this.resolved = false; // Require re-resolve\r\n            this.result = null; // Require re-build\r\n            return this;\r\n        };\r\n\r\n        /**\r\n         * Propagates syntax to all children.\r\n         * @param {!Object} parent\r\n         * @inner\r\n         */\r\n        function propagateSyntax(parent) {\r\n            if (parent['messages']) {\r\n                parent['messages'].forEach(function(child) {\r\n                    child[\"syntax\"] = parent[\"syntax\"];\r\n                    propagateSyntax(child);\r\n                });\r\n            }\r\n            if (parent['enums']) {\r\n                parent['enums'].forEach(function(child) {\r\n                    child[\"syntax\"] = parent[\"syntax\"];\r\n                });\r\n            }\r\n        }\r\n\r\n        /**\r\n         * Imports another definition into this builder.\r\n         * @param {Object.} json Parsed import\r\n         * @param {(string|{root: string, file: string})=} filename Imported file name\r\n         * @returns {!ProtoBuf.Builder} this\r\n         * @throws {Error} If the definition or file cannot be imported\r\n         * @expose\r\n         */\r\n        BuilderPrototype[\"import\"] = function(json, filename) {\r\n            var delim = '/';\r\n\r\n            // Make sure to skip duplicate imports\r\n\r\n            if (typeof filename === 'string') {\r\n\r\n                if (ProtoBuf.Util.IS_NODE)\r\n                    filename = require(\"path\")['resolve'](filename);\r\n                if (this.files[filename] === true)\r\n                    return this.reset();\r\n                this.files[filename] = true;\r\n\r\n            } else if (typeof filename === 'object') { // Object with root, file.\r\n\r\n                var root = filename.root;\r\n                if (ProtoBuf.Util.IS_NODE)\r\n                    root = require(\"path\")['resolve'](root);\r\n                if (root.indexOf(\"\\\\\") >= 0 || filename.file.indexOf(\"\\\\\") >= 0)\r\n                    delim = '\\\\';\r\n                var fname;\r\n                if (ProtoBuf.Util.IS_NODE)\r\n                    fname = require(\"path\")['join'](root, filename.file);\r\n                else\r\n                    fname = root + delim + filename.file;\r\n                if (this.files[fname] === true)\r\n                    return this.reset();\r\n                this.files[fname] = true;\r\n            }\r\n\r\n            // Import imports\r\n\r\n            if (json['imports'] && json['imports'].length > 0) {\r\n                var importRoot,\r\n                    resetRoot = false;\r\n\r\n                if (typeof filename === 'object') { // If an import root is specified, override\r\n\r\n                    this.importRoot = filename[\"root\"]; resetRoot = true; // ... and reset afterwards\r\n                    importRoot = this.importRoot;\r\n                    filename = filename[\"file\"];\r\n                    if (importRoot.indexOf(\"\\\\\") >= 0 || filename.indexOf(\"\\\\\") >= 0)\r\n                        delim = '\\\\';\r\n\r\n                } else if (typeof filename === 'string') {\r\n\r\n                    if (this.importRoot) // If import root is overridden, use it\r\n                        importRoot = this.importRoot;\r\n                    else { // Otherwise compute from filename\r\n                        if (filename.indexOf(\"/\") >= 0) { // Unix\r\n                            importRoot = filename.replace(/\\/[^\\/]*$/, \"\");\r\n                            if (/* /file.proto */ importRoot === \"\")\r\n                                importRoot = \"/\";\r\n                        } else if (filename.indexOf(\"\\\\\") >= 0) { // Windows\r\n                            importRoot = filename.replace(/\\\\[^\\\\]*$/, \"\");\r\n                            delim = '\\\\';\r\n                        } else\r\n                            importRoot = \".\";\r\n                    }\r\n\r\n                } else\r\n                    importRoot = null;\r\n\r\n                for (var i=0; i)=} path Specifies what to return. If omitted, the entire namespace will be returned.\r\n         * @returns {!ProtoBuf.Builder.Message|!Object.}\r\n         * @throws {Error} If a type could not be resolved\r\n         * @expose\r\n         */\r\n        BuilderPrototype.build = function(path) {\r\n            this.reset();\r\n            if (!this.resolved)\r\n                this.resolveAll(),\r\n                this.resolved = true,\r\n                this.result = null; // Require re-build\r\n            if (this.result === null) // (Re-)Build\r\n                this.result = this.ns.build();\r\n            if (!path)\r\n                return this.result;\r\n            var part = typeof path === 'string' ? path.split(\".\") : path,\r\n                ptr = this.result; // Build namespace pointer (no hasChild etc.)\r\n            for (var i=0; i=} contents Initial contents\r\n         * @constructor\r\n         */\r\n        var Map = function(field, contents) {\r\n            if (!field.map)\r\n                throw Error(\"field is not a map\");\r\n\r\n            /**\r\n             * The field corresponding to this map.\r\n             * @type {!ProtoBuf.Reflect.Field}\r\n             */\r\n            this.field = field;\r\n\r\n            /**\r\n             * Element instance corresponding to key type.\r\n             * @type {!ProtoBuf.Reflect.Element}\r\n             */\r\n            this.keyElem = new Reflect.Element(field.keyType, null, true, field.syntax);\r\n\r\n            /**\r\n             * Element instance corresponding to value type.\r\n             * @type {!ProtoBuf.Reflect.Element}\r\n             */\r\n            this.valueElem = new Reflect.Element(field.type, field.resolvedType, false, field.syntax);\r\n\r\n            /**\r\n             * Internal map: stores mapping of (string form of key) -> (key, value)\r\n             * pair.\r\n             *\r\n             * We provide map semantics for arbitrary key types, but we build on top\r\n             * of an Object, which has only string keys. In order to avoid the need\r\n             * to convert a string key back to its native type in many situations,\r\n             * we store the native key value alongside the value. Thus, we only need\r\n             * a one-way mapping from a key type to its string form that guarantees\r\n             * uniqueness and equality (i.e., str(K1) === str(K2) if and only if K1\r\n             * === K2).\r\n             *\r\n             * @type {!Object}\r\n             */\r\n            this.map = {};\r\n\r\n            /**\r\n             * Returns the number of elements in the map.\r\n             */\r\n            Object.defineProperty(this, \"size\", {\r\n                get: function() { return Object.keys(this.map).length; }\r\n            });\r\n\r\n            // Fill initial contents from a raw object.\r\n            if (contents) {\r\n                var keys = Object.keys(contents);\r\n                for (var i = 0; i < keys.length; i++) {\r\n                    var key = this.keyElem.valueFromString(keys[i]);\r\n                    var val = this.valueElem.verifyValue(contents[keys[i]]);\r\n                    this.map[this.keyElem.valueToString(key)] =\r\n                        { key: key, value: val };\r\n                }\r\n            }\r\n        };\r\n\r\n        var MapPrototype = Map.prototype;\r\n\r\n        /**\r\n         * Helper: return an iterator over an array.\r\n         * @param {!Array<*>} arr the array\r\n         * @returns {!Object} an iterator\r\n         * @inner\r\n         */\r\n        function arrayIterator(arr) {\r\n            var idx = 0;\r\n            return {\r\n                next: function() {\r\n                    if (idx < arr.length)\r\n                        return { done: false, value: arr[idx++] };\r\n                    return { done: true };\r\n                }\r\n            }\r\n        }\r\n\r\n        /**\r\n         * Clears the map.\r\n         */\r\n        MapPrototype.clear = function() {\r\n            this.map = {};\r\n        };\r\n\r\n        /**\r\n         * Deletes a particular key from the map.\r\n         * @returns {boolean} Whether any entry with this key was deleted.\r\n         */\r\n        MapPrototype[\"delete\"] = function(key) {\r\n            var keyValue = this.keyElem.valueToString(this.keyElem.verifyValue(key));\r\n            var hadKey = keyValue in this.map;\r\n            delete this.map[keyValue];\r\n            return hadKey;\r\n        };\r\n\r\n        /**\r\n         * Returns an iterator over [key, value] pairs in the map.\r\n         * @returns {Object} The iterator\r\n         */\r\n        MapPrototype.entries = function() {\r\n            var entries = [];\r\n            var strKeys = Object.keys(this.map);\r\n            for (var i = 0, entry; i < strKeys.length; i++)\r\n                entries.push([(entry=this.map[strKeys[i]]).key, entry.value]);\r\n            return arrayIterator(entries);\r\n        };\r\n\r\n        /**\r\n         * Returns an iterator over keys in the map.\r\n         * @returns {Object} The iterator\r\n         */\r\n        MapPrototype.keys = function() {\r\n            var keys = [];\r\n            var strKeys = Object.keys(this.map);\r\n            for (var i = 0; i < strKeys.length; i++)\r\n                keys.push(this.map[strKeys[i]].key);\r\n            return arrayIterator(keys);\r\n        };\r\n\r\n        /**\r\n         * Returns an iterator over values in the map.\r\n         * @returns {!Object} The iterator\r\n         */\r\n        MapPrototype.values = function() {\r\n            var values = [];\r\n            var strKeys = Object.keys(this.map);\r\n            for (var i = 0; i < strKeys.length; i++)\r\n                values.push(this.map[strKeys[i]].value);\r\n            return arrayIterator(values);\r\n        };\r\n\r\n        /**\r\n         * Iterates over entries in the map, calling a function on each.\r\n         * @param {function(this:*, *, *, *)} cb The callback to invoke with value, key, and map arguments.\r\n         * @param {Object=} thisArg The `this` value for the callback\r\n         */\r\n        MapPrototype.forEach = function(cb, thisArg) {\r\n            var strKeys = Object.keys(this.map);\r\n            for (var i = 0, entry; i < strKeys.length; i++)\r\n                cb.call(thisArg, (entry=this.map[strKeys[i]]).value, entry.key, this);\r\n        };\r\n\r\n        /**\r\n         * Sets a key in the map to the given value.\r\n         * @param {*} key The key\r\n         * @param {*} value The value\r\n         * @returns {!ProtoBuf.Map} The map instance\r\n         */\r\n        MapPrototype.set = function(key, value) {\r\n            var keyValue = this.keyElem.verifyValue(key);\r\n            var valValue = this.valueElem.verifyValue(value);\r\n            this.map[this.keyElem.valueToString(keyValue)] =\r\n                { key: keyValue, value: valValue };\r\n            return this;\r\n        };\r\n\r\n        /**\r\n         * Gets the value corresponding to a key in the map.\r\n         * @param {*} key The key\r\n         * @returns {*|undefined} The value, or `undefined` if key not present\r\n         */\r\n        MapPrototype.get = function(key) {\r\n            var keyValue = this.keyElem.valueToString(this.keyElem.verifyValue(key));\r\n            if (!(keyValue in this.map))\r\n                return undefined;\r\n            return this.map[keyValue].value;\r\n        };\r\n\r\n        /**\r\n         * Determines whether the given key is present in the map.\r\n         * @param {*} key The key\r\n         * @returns {boolean} `true` if the key is present\r\n         */\r\n        MapPrototype.has = function(key) {\r\n            var keyValue = this.keyElem.valueToString(this.keyElem.verifyValue(key));\r\n            return (keyValue in this.map);\r\n        };\r\n\r\n        return Map;\r\n    })(ProtoBuf, ProtoBuf.Reflect);\r\n\r\n\r\n    /**\r\n     * Constructs a new empty Builder.\r\n     * @param {Object.=} options Builder options, defaults to global options set on ProtoBuf\r\n     * @return {!ProtoBuf.Builder} Builder\r\n     * @expose\r\n     */\r\n    ProtoBuf.newBuilder = function(options) {\r\n        options = options || {};\r\n        if (typeof options['convertFieldsToCamelCase'] === 'undefined')\r\n            options['convertFieldsToCamelCase'] = ProtoBuf.convertFieldsToCamelCase;\r\n        if (typeof options['populateAccessors'] === 'undefined')\r\n            options['populateAccessors'] = ProtoBuf.populateAccessors;\r\n        return new ProtoBuf.Builder(options);\r\n    };\r\n\r\n    /**\r\n     * Loads a .json definition and returns the Builder.\r\n     * @param {!*|string} json JSON definition\r\n     * @param {(ProtoBuf.Builder|string|{root: string, file: string})=} builder Builder to append to. Will create a new one if omitted.\r\n     * @param {(string|{root: string, file: string})=} filename The corresponding file name if known. Must be specified for imports.\r\n     * @return {ProtoBuf.Builder} Builder to create new messages\r\n     * @throws {Error} If the definition cannot be parsed or built\r\n     * @expose\r\n     */\r\n    ProtoBuf.loadJson = function(json, builder, filename) {\r\n        if (typeof builder === 'string' || (builder && typeof builder[\"file\"] === 'string' && typeof builder[\"root\"] === 'string'))\r\n            filename = builder,\r\n            builder = null;\r\n        if (!builder || typeof builder !== 'object')\r\n            builder = ProtoBuf.newBuilder();\r\n        if (typeof json === 'string')\r\n            json = JSON.parse(json);\r\n        builder[\"import\"](json, filename);\r\n        builder.resolveAll();\r\n        return builder;\r\n    };\r\n\r\n    /**\r\n     * Loads a .json file and returns the Builder.\r\n     * @param {string|!{root: string, file: string}} filename Path to json file or an object specifying 'file' with\r\n     *  an overridden 'root' path for all imported files.\r\n     * @param {function(?Error, !ProtoBuf.Builder=)=} callback Callback that will receive `null` as the first and\r\n     *  the Builder as its second argument on success, otherwise the error as its first argument. If omitted, the\r\n     *  file will be read synchronously and this function will return the Builder.\r\n     * @param {ProtoBuf.Builder=} builder Builder to append to. Will create a new one if omitted.\r\n     * @return {?ProtoBuf.Builder|undefined} The Builder if synchronous (no callback specified, will be NULL if the\r\n     *   request has failed), else undefined\r\n     * @expose\r\n     */\r\n    ProtoBuf.loadJsonFile = function(filename, callback, builder) {\r\n        if (callback && typeof callback === 'object')\r\n            builder = callback,\r\n            callback = null;\r\n        else if (!callback || typeof callback !== 'function')\r\n            callback = null;\r\n        if (callback)\r\n            return ProtoBuf.Util.fetch(typeof filename === 'string' ? filename : filename[\"root\"]+\"/\"+filename[\"file\"], function(contents) {\r\n                if (contents === null) {\r\n                    callback(Error(\"Failed to fetch file\"));\r\n                    return;\r\n                }\r\n                try {\r\n                    callback(null, ProtoBuf.loadJson(JSON.parse(contents), builder, filename));\r\n                } catch (e) {\r\n                    callback(e);\r\n                }\r\n            });\r\n        var contents = ProtoBuf.Util.fetch(typeof filename === 'object' ? filename[\"root\"]+\"/\"+filename[\"file\"] : filename);\r\n        return contents === null ? null : ProtoBuf.loadJson(JSON.parse(contents), builder, filename);\r\n    };\r\n\r\n    return ProtoBuf;\r\n});\r\n","module.exports = require(\"protobufjs/dist/protobuf-light\").newBuilder({})['import']({\n    \"package\": \"push_server.messages2\",\n    \"syntax\": \"proto2\",\n    \"options\": {\n        \"objc_class_prefix\": \"AVIM\"\n    },\n    \"messages\": [\n        {\n            \"name\": \"JsonObjectMessage\",\n            \"syntax\": \"proto2\",\n            \"fields\": [\n                {\n                    \"rule\": \"required\",\n                    \"type\": \"string\",\n                    \"name\": \"data\",\n                    \"id\": 1\n                }\n            ]\n        },\n        {\n            \"name\": \"UnreadTuple\",\n            \"syntax\": \"proto2\",\n            \"fields\": [\n                {\n                    \"rule\": \"required\",\n                    \"type\": \"string\",\n                    \"name\": \"cid\",\n                    \"id\": 1\n                },\n                {\n                    \"rule\": \"required\",\n                    \"type\": \"int32\",\n                    \"name\": \"unread\",\n                    \"id\": 2\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"string\",\n                    \"name\": \"mid\",\n                    \"id\": 3\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"int64\",\n                    \"name\": \"timestamp\",\n                    \"id\": 4\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"string\",\n                    \"name\": \"from\",\n                    \"id\": 5\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"string\",\n                    \"name\": \"data\",\n                    \"id\": 6\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"int64\",\n                    \"name\": \"patchTimestamp\",\n                    \"id\": 7\n                }\n            ]\n        },\n        {\n            \"name\": \"LogItem\",\n            \"syntax\": \"proto2\",\n            \"fields\": [\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"string\",\n                    \"name\": \"from\",\n                    \"id\": 1\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"string\",\n                    \"name\": \"data\",\n                    \"id\": 2\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"int64\",\n                    \"name\": \"timestamp\",\n                    \"id\": 3\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"string\",\n                    \"name\": \"msgId\",\n                    \"id\": 4\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"int64\",\n                    \"name\": \"ackAt\",\n                    \"id\": 5\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"int64\",\n                    \"name\": \"readAt\",\n                    \"id\": 6\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"int64\",\n                    \"name\": \"patchTimestamp\",\n                    \"id\": 7\n                }\n            ]\n        },\n        {\n            \"name\": \"DataCommand\",\n            \"syntax\": \"proto2\",\n            \"fields\": [\n                {\n                    \"rule\": \"repeated\",\n                    \"type\": \"string\",\n                    \"name\": \"ids\",\n                    \"id\": 1\n                },\n                {\n                    \"rule\": \"repeated\",\n                    \"type\": \"JsonObjectMessage\",\n                    \"name\": \"msg\",\n                    \"id\": 2\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"bool\",\n                    \"name\": \"offline\",\n                    \"id\": 3\n                }\n            ]\n        },\n        {\n            \"name\": \"SessionCommand\",\n            \"syntax\": \"proto2\",\n            \"fields\": [\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"int64\",\n                    \"name\": \"t\",\n                    \"id\": 1\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"string\",\n                    \"name\": \"n\",\n                    \"id\": 2\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"string\",\n                    \"name\": \"s\",\n                    \"id\": 3\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"string\",\n                    \"name\": \"ua\",\n                    \"id\": 4\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"bool\",\n                    \"name\": \"r\",\n                    \"id\": 5\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"string\",\n                    \"name\": \"tag\",\n                    \"id\": 6\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"string\",\n                    \"name\": \"deviceId\",\n                    \"id\": 7\n                },\n                {\n                    \"rule\": \"repeated\",\n                    \"type\": \"string\",\n                    \"name\": \"sessionPeerIds\",\n                    \"id\": 8\n                },\n                {\n                    \"rule\": \"repeated\",\n                    \"type\": \"string\",\n                    \"name\": \"onlineSessionPeerIds\",\n                    \"id\": 9\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"string\",\n                    \"name\": \"st\",\n                    \"id\": 10\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"int32\",\n                    \"name\": \"stTtl\",\n                    \"id\": 11\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"int32\",\n                    \"name\": \"code\",\n                    \"id\": 12\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"string\",\n                    \"name\": \"reason\",\n                    \"id\": 13\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"string\",\n                    \"name\": \"deviceToken\",\n                    \"id\": 14\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"bool\",\n                    \"name\": \"sp\",\n                    \"id\": 15\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"string\",\n                    \"name\": \"detail\",\n                    \"id\": 16\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"int64\",\n                    \"name\": \"lastUnreadNotifTime\",\n                    \"id\": 17\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"int64\",\n                    \"name\": \"lastPatchTime\",\n                    \"id\": 18\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"int64\",\n                    \"name\": \"configBitmap\",\n                    \"id\": 19\n                }\n            ]\n        },\n        {\n            \"name\": \"ErrorCommand\",\n            \"syntax\": \"proto2\",\n            \"fields\": [\n                {\n                    \"rule\": \"required\",\n                    \"type\": \"int32\",\n                    \"name\": \"code\",\n                    \"id\": 1\n                },\n                {\n                    \"rule\": \"required\",\n                    \"type\": \"string\",\n                    \"name\": \"reason\",\n                    \"id\": 2\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"int32\",\n                    \"name\": \"appCode\",\n                    \"id\": 3\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"string\",\n                    \"name\": \"detail\",\n                    \"id\": 4\n                }\n            ]\n        },\n        {\n            \"name\": \"DirectCommand\",\n            \"syntax\": \"proto2\",\n            \"fields\": [\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"string\",\n                    \"name\": \"msg\",\n                    \"id\": 1\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"string\",\n                    \"name\": \"uid\",\n                    \"id\": 2\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"string\",\n                    \"name\": \"fromPeerId\",\n                    \"id\": 3\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"int64\",\n                    \"name\": \"timestamp\",\n                    \"id\": 4\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"bool\",\n                    \"name\": \"offline\",\n                    \"id\": 5\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"bool\",\n                    \"name\": \"hasMore\",\n                    \"id\": 6\n                },\n                {\n                    \"rule\": \"repeated\",\n                    \"type\": \"string\",\n                    \"name\": \"toPeerIds\",\n                    \"id\": 7\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"bool\",\n                    \"name\": \"r\",\n                    \"id\": 10\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"string\",\n                    \"name\": \"cid\",\n                    \"id\": 11\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"string\",\n                    \"name\": \"id\",\n                    \"id\": 12\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"bool\",\n                    \"name\": \"transient\",\n                    \"id\": 13\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"string\",\n                    \"name\": \"dt\",\n                    \"id\": 14\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"string\",\n                    \"name\": \"roomId\",\n                    \"id\": 15\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"string\",\n                    \"name\": \"pushData\",\n                    \"id\": 16\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"bool\",\n                    \"name\": \"will\",\n                    \"id\": 17\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"int64\",\n                    \"name\": \"patchTimestamp\",\n                    \"id\": 18\n                }\n            ]\n        },\n        {\n            \"name\": \"AckCommand\",\n            \"syntax\": \"proto2\",\n            \"fields\": [\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"int32\",\n                    \"name\": \"code\",\n                    \"id\": 1\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"string\",\n                    \"name\": \"reason\",\n                    \"id\": 2\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"string\",\n                    \"name\": \"mid\",\n                    \"id\": 3\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"string\",\n                    \"name\": \"cid\",\n                    \"id\": 4\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"int64\",\n                    \"name\": \"t\",\n                    \"id\": 5\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"string\",\n                    \"name\": \"uid\",\n                    \"id\": 6\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"int64\",\n                    \"name\": \"fromts\",\n                    \"id\": 7\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"int64\",\n                    \"name\": \"tots\",\n                    \"id\": 8\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"string\",\n                    \"name\": \"type\",\n                    \"id\": 9\n                },\n                {\n                    \"rule\": \"repeated\",\n                    \"type\": \"string\",\n                    \"name\": \"ids\",\n                    \"id\": 10\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"int32\",\n                    \"name\": \"appCode\",\n                    \"id\": 11\n                }\n            ]\n        },\n        {\n            \"name\": \"UnreadCommand\",\n            \"syntax\": \"proto2\",\n            \"fields\": [\n                {\n                    \"rule\": \"repeated\",\n                    \"type\": \"UnreadTuple\",\n                    \"name\": \"convs\",\n                    \"id\": 1\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"int64\",\n                    \"name\": \"notifTime\",\n                    \"id\": 2\n                }\n            ]\n        },\n        {\n            \"name\": \"ConvCommand\",\n            \"syntax\": \"proto2\",\n            \"fields\": [\n                {\n                    \"rule\": \"repeated\",\n                    \"type\": \"string\",\n                    \"name\": \"m\",\n                    \"id\": 1\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"bool\",\n                    \"name\": \"transient\",\n                    \"id\": 2\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"bool\",\n                    \"name\": \"unique\",\n                    \"id\": 3\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"string\",\n                    \"name\": \"cid\",\n                    \"id\": 4\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"string\",\n                    \"name\": \"cdate\",\n                    \"id\": 5\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"string\",\n                    \"name\": \"initBy\",\n                    \"id\": 6\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"string\",\n                    \"name\": \"sort\",\n                    \"id\": 7\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"int32\",\n                    \"name\": \"limit\",\n                    \"id\": 8\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"int32\",\n                    \"name\": \"skip\",\n                    \"id\": 9\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"int32\",\n                    \"name\": \"flag\",\n                    \"id\": 10\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"int32\",\n                    \"name\": \"count\",\n                    \"id\": 11\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"string\",\n                    \"name\": \"udate\",\n                    \"id\": 12\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"int64\",\n                    \"name\": \"t\",\n                    \"id\": 13\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"string\",\n                    \"name\": \"n\",\n                    \"id\": 14\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"string\",\n                    \"name\": \"s\",\n                    \"id\": 15\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"bool\",\n                    \"name\": \"statusSub\",\n                    \"id\": 16\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"bool\",\n                    \"name\": \"statusPub\",\n                    \"id\": 17\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"int32\",\n                    \"name\": \"statusTTL\",\n                    \"id\": 18\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"string\",\n                    \"name\": \"uniqueId\",\n                    \"id\": 19\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"string\",\n                    \"name\": \"targetClientId\",\n                    \"id\": 20\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"int64\",\n                    \"name\": \"maxReadTimestamp\",\n                    \"id\": 21\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"int64\",\n                    \"name\": \"maxAckTimestamp\",\n                    \"id\": 22\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"bool\",\n                    \"name\": \"queryAllMembers\",\n                    \"id\": 23\n                },\n                {\n                    \"rule\": \"repeated\",\n                    \"type\": \"MaxReadTuple\",\n                    \"name\": \"maxReadTuples\",\n                    \"id\": 24\n                },\n                {\n                    \"rule\": \"repeated\",\n                    \"type\": \"string\",\n                    \"name\": \"cids\",\n                    \"id\": 25\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"JsonObjectMessage\",\n                    \"name\": \"results\",\n                    \"id\": 100\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"JsonObjectMessage\",\n                    \"name\": \"where\",\n                    \"id\": 101\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"JsonObjectMessage\",\n                    \"name\": \"attr\",\n                    \"id\": 103\n                }\n            ]\n        },\n        {\n            \"name\": \"RoomCommand\",\n            \"syntax\": \"proto2\",\n            \"fields\": [\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"string\",\n                    \"name\": \"roomId\",\n                    \"id\": 1\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"string\",\n                    \"name\": \"s\",\n                    \"id\": 2\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"int64\",\n                    \"name\": \"t\",\n                    \"id\": 3\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"string\",\n                    \"name\": \"n\",\n                    \"id\": 4\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"bool\",\n                    \"name\": \"transient\",\n                    \"id\": 5\n                },\n                {\n                    \"rule\": \"repeated\",\n                    \"type\": \"string\",\n                    \"name\": \"roomPeerIds\",\n                    \"id\": 6\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"string\",\n                    \"name\": \"byPeerId\",\n                    \"id\": 7\n                }\n            ]\n        },\n        {\n            \"name\": \"LogsCommand\",\n            \"syntax\": \"proto2\",\n            \"fields\": [\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"string\",\n                    \"name\": \"cid\",\n                    \"id\": 1\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"int32\",\n                    \"name\": \"l\",\n                    \"id\": 2\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"int32\",\n                    \"name\": \"limit\",\n                    \"id\": 3\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"int64\",\n                    \"name\": \"t\",\n                    \"id\": 4\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"int64\",\n                    \"name\": \"tt\",\n                    \"id\": 5\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"string\",\n                    \"name\": \"tmid\",\n                    \"id\": 6\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"string\",\n                    \"name\": \"mid\",\n                    \"id\": 7\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"string\",\n                    \"name\": \"checksum\",\n                    \"id\": 8\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"bool\",\n                    \"name\": \"stored\",\n                    \"id\": 9\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"bool\",\n                    \"name\": \"reversed\",\n                    \"id\": 10\n                },\n                {\n                    \"rule\": \"repeated\",\n                    \"type\": \"LogItem\",\n                    \"name\": \"logs\",\n                    \"id\": 105\n                }\n            ]\n        },\n        {\n            \"name\": \"RcpCommand\",\n            \"syntax\": \"proto2\",\n            \"fields\": [\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"string\",\n                    \"name\": \"id\",\n                    \"id\": 1\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"string\",\n                    \"name\": \"cid\",\n                    \"id\": 2\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"int64\",\n                    \"name\": \"t\",\n                    \"id\": 3\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"bool\",\n                    \"name\": \"read\",\n                    \"id\": 4\n                }\n            ]\n        },\n        {\n            \"name\": \"ReadTuple\",\n            \"syntax\": \"proto2\",\n            \"fields\": [\n                {\n                    \"rule\": \"required\",\n                    \"type\": \"string\",\n                    \"name\": \"cid\",\n                    \"id\": 1\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"int64\",\n                    \"name\": \"timestamp\",\n                    \"id\": 2\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"string\",\n                    \"name\": \"mid\",\n                    \"id\": 3\n                }\n            ]\n        },\n        {\n            \"name\": \"MaxReadTuple\",\n            \"syntax\": \"proto2\",\n            \"fields\": [\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"string\",\n                    \"name\": \"pid\",\n                    \"id\": 1\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"int64\",\n                    \"name\": \"maxAckTimestamp\",\n                    \"id\": 2\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"int64\",\n                    \"name\": \"maxReadTimestamp\",\n                    \"id\": 3\n                }\n            ]\n        },\n        {\n            \"name\": \"ReadCommand\",\n            \"syntax\": \"proto2\",\n            \"fields\": [\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"string\",\n                    \"name\": \"cid\",\n                    \"id\": 1\n                },\n                {\n                    \"rule\": \"repeated\",\n                    \"type\": \"string\",\n                    \"name\": \"cids\",\n                    \"id\": 2\n                },\n                {\n                    \"rule\": \"repeated\",\n                    \"type\": \"ReadTuple\",\n                    \"name\": \"convs\",\n                    \"id\": 3\n                }\n            ]\n        },\n        {\n            \"name\": \"PresenceCommand\",\n            \"syntax\": \"proto2\",\n            \"fields\": [\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"StatusType\",\n                    \"name\": \"status\",\n                    \"id\": 1\n                },\n                {\n                    \"rule\": \"repeated\",\n                    \"type\": \"string\",\n                    \"name\": \"sessionPeerIds\",\n                    \"id\": 2\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"string\",\n                    \"name\": \"cid\",\n                    \"id\": 3\n                }\n            ]\n        },\n        {\n            \"name\": \"ReportCommand\",\n            \"syntax\": \"proto2\",\n            \"fields\": [\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"bool\",\n                    \"name\": \"initiative\",\n                    \"id\": 1\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"string\",\n                    \"name\": \"type\",\n                    \"id\": 2\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"string\",\n                    \"name\": \"data\",\n                    \"id\": 3\n                }\n            ]\n        },\n        {\n            \"name\": \"PatchItem\",\n            \"syntax\": \"proto2\",\n            \"fields\": [\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"string\",\n                    \"name\": \"cid\",\n                    \"id\": 1\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"string\",\n                    \"name\": \"mid\",\n                    \"id\": 2\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"int64\",\n                    \"name\": \"timestamp\",\n                    \"id\": 3\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"bool\",\n                    \"name\": \"recall\",\n                    \"id\": 4\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"string\",\n                    \"name\": \"data\",\n                    \"id\": 5\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"int64\",\n                    \"name\": \"patchTimestamp\",\n                    \"id\": 6\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"string\",\n                    \"name\": \"from\",\n                    \"id\": 7\n                }\n            ]\n        },\n        {\n            \"name\": \"PatchCommand\",\n            \"syntax\": \"proto2\",\n            \"fields\": [\n                {\n                    \"rule\": \"repeated\",\n                    \"type\": \"PatchItem\",\n                    \"name\": \"patches\",\n                    \"id\": 1\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"int64\",\n                    \"name\": \"lastPatchTime\",\n                    \"id\": 2\n                }\n            ]\n        },\n        {\n            \"name\": \"GenericCommand\",\n            \"syntax\": \"proto2\",\n            \"fields\": [\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"CommandType\",\n                    \"name\": \"cmd\",\n                    \"id\": 1\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"OpType\",\n                    \"name\": \"op\",\n                    \"id\": 2\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"string\",\n                    \"name\": \"appId\",\n                    \"id\": 3\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"string\",\n                    \"name\": \"peerId\",\n                    \"id\": 4\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"int32\",\n                    \"name\": \"i\",\n                    \"id\": 5\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"string\",\n                    \"name\": \"installationId\",\n                    \"id\": 6\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"int32\",\n                    \"name\": \"priority\",\n                    \"id\": 7\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"int32\",\n                    \"name\": \"service\",\n                    \"id\": 8\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"DataCommand\",\n                    \"name\": \"dataMessage\",\n                    \"id\": 101\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"SessionCommand\",\n                    \"name\": \"sessionMessage\",\n                    \"id\": 102\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"ErrorCommand\",\n                    \"name\": \"errorMessage\",\n                    \"id\": 103\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"DirectCommand\",\n                    \"name\": \"directMessage\",\n                    \"id\": 104\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"AckCommand\",\n                    \"name\": \"ackMessage\",\n                    \"id\": 105\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"UnreadCommand\",\n                    \"name\": \"unreadMessage\",\n                    \"id\": 106\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"ReadCommand\",\n                    \"name\": \"readMessage\",\n                    \"id\": 107\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"RcpCommand\",\n                    \"name\": \"rcpMessage\",\n                    \"id\": 108\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"LogsCommand\",\n                    \"name\": \"logsMessage\",\n                    \"id\": 109\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"ConvCommand\",\n                    \"name\": \"convMessage\",\n                    \"id\": 110\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"RoomCommand\",\n                    \"name\": \"roomMessage\",\n                    \"id\": 111\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"PresenceCommand\",\n                    \"name\": \"presenceMessage\",\n                    \"id\": 112\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"ReportCommand\",\n                    \"name\": \"reportMessage\",\n                    \"id\": 113\n                },\n                {\n                    \"rule\": \"optional\",\n                    \"type\": \"PatchCommand\",\n                    \"name\": \"patchMessage\",\n                    \"id\": 114\n                }\n            ]\n        }\n    ],\n    \"enums\": [\n        {\n            \"name\": \"CommandType\",\n            \"syntax\": \"proto2\",\n            \"values\": [\n                {\n                    \"name\": \"session\",\n                    \"id\": 0\n                },\n                {\n                    \"name\": \"conv\",\n                    \"id\": 1\n                },\n                {\n                    \"name\": \"direct\",\n                    \"id\": 2\n                },\n                {\n                    \"name\": \"ack\",\n                    \"id\": 3\n                },\n                {\n                    \"name\": \"rcp\",\n                    \"id\": 4\n                },\n                {\n                    \"name\": \"unread\",\n                    \"id\": 5\n                },\n                {\n                    \"name\": \"logs\",\n                    \"id\": 6\n                },\n                {\n                    \"name\": \"error\",\n                    \"id\": 7\n                },\n                {\n                    \"name\": \"login\",\n                    \"id\": 8\n                },\n                {\n                    \"name\": \"data\",\n                    \"id\": 9\n                },\n                {\n                    \"name\": \"room\",\n                    \"id\": 10\n                },\n                {\n                    \"name\": \"read\",\n                    \"id\": 11\n                },\n                {\n                    \"name\": \"presence\",\n                    \"id\": 12\n                },\n                {\n                    \"name\": \"report\",\n                    \"id\": 13\n                },\n                {\n                    \"name\": \"echo\",\n                    \"id\": 14\n                },\n                {\n                    \"name\": \"loggedin\",\n                    \"id\": 15\n                },\n                {\n                    \"name\": \"logout\",\n                    \"id\": 16\n                },\n                {\n                    \"name\": \"loggedout\",\n                    \"id\": 17\n                },\n                {\n                    \"name\": \"patch\",\n                    \"id\": 18\n                }\n            ]\n        },\n        {\n            \"name\": \"OpType\",\n            \"syntax\": \"proto2\",\n            \"values\": [\n                {\n                    \"name\": \"open\",\n                    \"id\": 1\n                },\n                {\n                    \"name\": \"add\",\n                    \"id\": 2\n                },\n                {\n                    \"name\": \"remove\",\n                    \"id\": 3\n                },\n                {\n                    \"name\": \"close\",\n                    \"id\": 4\n                },\n                {\n                    \"name\": \"opened\",\n                    \"id\": 5\n                },\n                {\n                    \"name\": \"closed\",\n                    \"id\": 6\n                },\n                {\n                    \"name\": \"query\",\n                    \"id\": 7\n                },\n                {\n                    \"name\": \"query_result\",\n                    \"id\": 8\n                },\n                {\n                    \"name\": \"conflict\",\n                    \"id\": 9\n                },\n                {\n                    \"name\": \"added\",\n                    \"id\": 10\n                },\n                {\n                    \"name\": \"removed\",\n                    \"id\": 11\n                },\n                {\n                    \"name\": \"start\",\n                    \"id\": 30\n                },\n                {\n                    \"name\": \"started\",\n                    \"id\": 31\n                },\n                {\n                    \"name\": \"joined\",\n                    \"id\": 32\n                },\n                {\n                    \"name\": \"members_joined\",\n                    \"id\": 33\n                },\n                {\n                    \"name\": \"left\",\n                    \"id\": 39\n                },\n                {\n                    \"name\": \"members_left\",\n                    \"id\": 40\n                },\n                {\n                    \"name\": \"results\",\n                    \"id\": 42\n                },\n                {\n                    \"name\": \"count\",\n                    \"id\": 43\n                },\n                {\n                    \"name\": \"result\",\n                    \"id\": 44\n                },\n                {\n                    \"name\": \"update\",\n                    \"id\": 45\n                },\n                {\n                    \"name\": \"updated\",\n                    \"id\": 46\n                },\n                {\n                    \"name\": \"mute\",\n                    \"id\": 47\n                },\n                {\n                    \"name\": \"unmute\",\n                    \"id\": 48\n                },\n                {\n                    \"name\": \"status\",\n                    \"id\": 49\n                },\n                {\n                    \"name\": \"members\",\n                    \"id\": 50\n                },\n                {\n                    \"name\": \"max_read\",\n                    \"id\": 51\n                },\n                {\n                    \"name\": \"is_member\",\n                    \"id\": 52\n                },\n                {\n                    \"name\": \"join\",\n                    \"id\": 80\n                },\n                {\n                    \"name\": \"invite\",\n                    \"id\": 81\n                },\n                {\n                    \"name\": \"leave\",\n                    \"id\": 82\n                },\n                {\n                    \"name\": \"kick\",\n                    \"id\": 83\n                },\n                {\n                    \"name\": \"reject\",\n                    \"id\": 84\n                },\n                {\n                    \"name\": \"invited\",\n                    \"id\": 85\n                },\n                {\n                    \"name\": \"kicked\",\n                    \"id\": 86\n                },\n                {\n                    \"name\": \"upload\",\n                    \"id\": 100\n                },\n                {\n                    \"name\": \"uploaded\",\n                    \"id\": 101\n                },\n                {\n                    \"name\": \"modify\",\n                    \"id\": 150\n                },\n                {\n                    \"name\": \"modified\",\n                    \"id\": 151\n                }\n            ]\n        },\n        {\n            \"name\": \"StatusType\",\n            \"syntax\": \"proto2\",\n            \"values\": [\n                {\n                    \"name\": \"on\",\n                    \"id\": 1\n                },\n                {\n                    \"name\": \"off\",\n                    \"id\": 2\n                }\n            ]\n        }\n    ],\n    \"isNamespace\": true\n}).build();\n","import messages from './message-compiled';\n\nconst {\n  JsonObjectMessage,\n  UnreadTuple,\n  LogItem,\n  DataCommand,\n  SessionCommand,\n  ErrorCommand,\n  DirectCommand,\n  AckCommand,\n  UnreadCommand,\n  ConvCommand,\n  RoomCommand,\n  LogsCommand,\n  RcpCommand,\n  ReadTuple,\n  MaxReadTuple,\n  ReadCommand,\n  PresenceCommand,\n  ReportCommand,\n  GenericCommand,\n  PatchCommand,\n  PatchItem,\n  CommandType,\n  OpType,\n  StatusType,\n} = messages.push_server.messages2;\n\nexport {\n  JsonObjectMessage,\n  UnreadTuple,\n  LogItem,\n  DataCommand,\n  SessionCommand,\n  ErrorCommand,\n  DirectCommand,\n  AckCommand,\n  UnreadCommand,\n  ConvCommand,\n  RoomCommand,\n  LogsCommand,\n  RcpCommand,\n  ReadTuple,\n  MaxReadTuple,\n  ReadCommand,\n  PresenceCommand,\n  ReportCommand,\n  GenericCommand,\n  PatchCommand,\n  PatchItem,\n  CommandType,\n  OpType,\n  StatusType,\n};\n","'use strict';\n\nvar has = Object.prototype.hasOwnProperty\n  , prefix = '~';\n\n/**\n * Constructor to create a storage for our `EE` objects.\n * An `Events` instance is a plain object whose properties are event names.\n *\n * @constructor\n * @api private\n */\nfunction Events() {}\n\n//\n// We try to not inherit from `Object.prototype`. In some engines creating an\n// instance in this way is faster than calling `Object.create(null)` directly.\n// If `Object.create(null)` is not supported we prefix the event names with a\n// character to make sure that the built-in object properties are not\n// overridden or used as an attack vector.\n//\nif (Object.create) {\n  Events.prototype = Object.create(null);\n\n  //\n  // This hack is needed because the `__proto__` property is still inherited in\n  // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.\n  //\n  if (!new Events().__proto__) prefix = false;\n}\n\n/**\n * Representation of a single event listener.\n *\n * @param {Function} fn The listener function.\n * @param {Mixed} context The context to invoke the listener with.\n * @param {Boolean} [once=false] Specify if the listener is a one-time listener.\n * @constructor\n * @api private\n */\nfunction EE(fn, context, once) {\n  this.fn = fn;\n  this.context = context;\n  this.once = once || false;\n}\n\n/**\n * Minimal `EventEmitter` interface that is molded against the Node.js\n * `EventEmitter` interface.\n *\n * @constructor\n * @api public\n */\nfunction EventEmitter() {\n  this._events = new Events();\n  this._eventsCount = 0;\n}\n\n/**\n * Return an array listing the events for which the emitter has registered\n * listeners.\n *\n * @returns {Array}\n * @api public\n */\nEventEmitter.prototype.eventNames = function eventNames() {\n  var names = []\n    , events\n    , name;\n\n  if (this._eventsCount === 0) return names;\n\n  for (name in (events = this._events)) {\n    if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);\n  }\n\n  if (Object.getOwnPropertySymbols) {\n    return names.concat(Object.getOwnPropertySymbols(events));\n  }\n\n  return names;\n};\n\n/**\n * Return the listeners registered for a given event.\n *\n * @param {String|Symbol} event The event name.\n * @param {Boolean} exists Only check if there are listeners.\n * @returns {Array|Boolean}\n * @api public\n */\nEventEmitter.prototype.listeners = function listeners(event, exists) {\n  var evt = prefix ? prefix + event : event\n    , available = this._events[evt];\n\n  if (exists) return !!available;\n  if (!available) return [];\n  if (available.fn) return [available.fn];\n\n  for (var i = 0, l = available.length, ee = new Array(l); i < l; i++) {\n    ee[i] = available[i].fn;\n  }\n\n  return ee;\n};\n\n/**\n * Calls each of the listeners registered for a given event.\n *\n * @param {String|Symbol} event The event name.\n * @returns {Boolean} `true` if the event had listeners, else `false`.\n * @api public\n */\nEventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {\n  var evt = prefix ? prefix + event : event;\n\n  if (!this._events[evt]) return false;\n\n  var listeners = this._events[evt]\n    , len = arguments.length\n    , args\n    , i;\n\n  if (listeners.fn) {\n    if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);\n\n    switch (len) {\n      case 1: return listeners.fn.call(listeners.context), true;\n      case 2: return listeners.fn.call(listeners.context, a1), true;\n      case 3: return listeners.fn.call(listeners.context, a1, a2), true;\n      case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;\n      case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;\n      case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;\n    }\n\n    for (i = 1, args = new Array(len -1); i < len; i++) {\n      args[i - 1] = arguments[i];\n    }\n\n    listeners.fn.apply(listeners.context, args);\n  } else {\n    var length = listeners.length\n      , j;\n\n    for (i = 0; i < length; i++) {\n      if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);\n\n      switch (len) {\n        case 1: listeners[i].fn.call(listeners[i].context); break;\n        case 2: listeners[i].fn.call(listeners[i].context, a1); break;\n        case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;\n        case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;\n        default:\n          if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {\n            args[j - 1] = arguments[j];\n          }\n\n          listeners[i].fn.apply(listeners[i].context, args);\n      }\n    }\n  }\n\n  return true;\n};\n\n/**\n * Add a listener for a given event.\n *\n * @param {String|Symbol} event The event name.\n * @param {Function} fn The listener function.\n * @param {Mixed} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @api public\n */\nEventEmitter.prototype.on = function on(event, fn, context) {\n  var listener = new EE(fn, context || this)\n    , evt = prefix ? prefix + event : event;\n\n  if (!this._events[evt]) this._events[evt] = listener, this._eventsCount++;\n  else if (!this._events[evt].fn) this._events[evt].push(listener);\n  else this._events[evt] = [this._events[evt], listener];\n\n  return this;\n};\n\n/**\n * Add a one-time listener for a given event.\n *\n * @param {String|Symbol} event The event name.\n * @param {Function} fn The listener function.\n * @param {Mixed} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @api public\n */\nEventEmitter.prototype.once = function once(event, fn, context) {\n  var listener = new EE(fn, context || this, true)\n    , evt = prefix ? prefix + event : event;\n\n  if (!this._events[evt]) this._events[evt] = listener, this._eventsCount++;\n  else if (!this._events[evt].fn) this._events[evt].push(listener);\n  else this._events[evt] = [this._events[evt], listener];\n\n  return this;\n};\n\n/**\n * Remove the listeners of a given event.\n *\n * @param {String|Symbol} event The event name.\n * @param {Function} fn Only remove the listeners that match this function.\n * @param {Mixed} context Only remove the listeners that have this context.\n * @param {Boolean} once Only remove one-time listeners.\n * @returns {EventEmitter} `this`.\n * @api public\n */\nEventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {\n  var evt = prefix ? prefix + event : event;\n\n  if (!this._events[evt]) return this;\n  if (!fn) {\n    if (--this._eventsCount === 0) this._events = new Events();\n    else delete this._events[evt];\n    return this;\n  }\n\n  var listeners = this._events[evt];\n\n  if (listeners.fn) {\n    if (\n         listeners.fn === fn\n      && (!once || listeners.once)\n      && (!context || listeners.context === context)\n    ) {\n      if (--this._eventsCount === 0) this._events = new Events();\n      else delete this._events[evt];\n    }\n  } else {\n    for (var i = 0, events = [], length = listeners.length; i < length; i++) {\n      if (\n           listeners[i].fn !== fn\n        || (once && !listeners[i].once)\n        || (context && listeners[i].context !== context)\n      ) {\n        events.push(listeners[i]);\n      }\n    }\n\n    //\n    // Reset the array, or remove it completely if we have no more listeners.\n    //\n    if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;\n    else if (--this._eventsCount === 0) this._events = new Events();\n    else delete this._events[evt];\n  }\n\n  return this;\n};\n\n/**\n * Remove all listeners, or those of the specified event.\n *\n * @param {String|Symbol} [event] The event name.\n * @returns {EventEmitter} `this`.\n * @api public\n */\nEventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {\n  var evt;\n\n  if (event) {\n    evt = prefix ? prefix + event : event;\n    if (this._events[evt]) {\n      if (--this._eventsCount === 0) this._events = new Events();\n      else delete this._events[evt];\n    }\n  } else {\n    this._events = new Events();\n    this._eventsCount = 0;\n  }\n\n  return this;\n};\n\n//\n// Alias methods names because people roll like that.\n//\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\nEventEmitter.prototype.addListener = EventEmitter.prototype.on;\n\n//\n// This function doesn't apply anymore.\n//\nEventEmitter.prototype.setMaxListeners = function setMaxListeners() {\n  return this;\n};\n\n//\n// Expose the prefix.\n//\nEventEmitter.prefixed = prefix;\n\n//\n// Allow `EventEmitter` to be imported as module namespace.\n//\nEventEmitter.EventEmitter = EventEmitter;\n\n//\n// Expose the module.\n//\nif ('undefined' !== typeof module) {\n  module.exports = EventEmitter;\n}\n","'use strict';\nvar $defineProperty = require('./_object-dp');\nvar createDesc = require('./_property-desc');\n\nmodule.exports = function (object, index, value) {\n  if (index in object) $defineProperty.f(object, index, createDesc(0, value));\n  else object[index] = value;\n};\n","'use strict';\nvar ctx = require('./_ctx');\nvar $export = require('./_export');\nvar toObject = require('./_to-object');\nvar call = require('./_iter-call');\nvar isArrayIter = require('./_is-array-iter');\nvar toLength = require('./_to-length');\nvar createProperty = require('./_create-property');\nvar getIterFn = require('./core.get-iterator-method');\n\n$export($export.S + $export.F * !require('./_iter-detect')(function (iter) { Array.from(iter); }), 'Array', {\n  // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined)\n  from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {\n    var O = toObject(arrayLike);\n    var C = typeof this == 'function' ? this : Array;\n    var aLen = arguments.length;\n    var mapfn = aLen > 1 ? arguments[1] : undefined;\n    var mapping = mapfn !== undefined;\n    var index = 0;\n    var iterFn = getIterFn(O);\n    var length, result, step, iterator;\n    if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2);\n    // if object isn't iterable or it's array with default iterator - use simple case\n    if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) {\n      for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) {\n        createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value);\n      }\n    } else {\n      length = toLength(O.length);\n      for (result = new C(length); length > index; index++) {\n        createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]);\n      }\n    }\n    result.length = index;\n    return result;\n  }\n});\n","require('../../modules/es6.string.iterator');\nrequire('../../modules/es6.array.from');\nmodule.exports = require('../../modules/_core').Array.from;\n","module.exports = { \"default\": require(\"core-js/library/fn/array/from\"), __esModule: true };","\"use strict\";\n\nexports.__esModule = true;\n\nvar _from = require(\"../core-js/array/from\");\n\nvar _from2 = _interopRequireDefault(_from);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function (arr) {\n  if (Array.isArray(arr)) {\n    for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {\n      arr2[i] = arr[i];\n    }\n\n    return arr2;\n  } else {\n    return (0, _from2.default)(arr);\n  }\n};","var META = require('./_uid')('meta');\nvar isObject = require('./_is-object');\nvar has = require('./_has');\nvar setDesc = require('./_object-dp').f;\nvar id = 0;\nvar isExtensible = Object.isExtensible || function () {\n  return true;\n};\nvar FREEZE = !require('./_fails')(function () {\n  return isExtensible(Object.preventExtensions({}));\n});\nvar setMeta = function (it) {\n  setDesc(it, META, { value: {\n    i: 'O' + ++id, // object ID\n    w: {}          // weak collections IDs\n  } });\n};\nvar fastKey = function (it, create) {\n  // return primitive with prefix\n  if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;\n  if (!has(it, META)) {\n    // can't set metadata to uncaught frozen object\n    if (!isExtensible(it)) return 'F';\n    // not necessary to add metadata\n    if (!create) return 'E';\n    // add missing metadata\n    setMeta(it);\n  // return object ID\n  } return it[META].i;\n};\nvar getWeak = function (it, create) {\n  if (!has(it, META)) {\n    // can't set metadata to uncaught frozen object\n    if (!isExtensible(it)) return true;\n    // not necessary to add metadata\n    if (!create) return false;\n    // add missing metadata\n    setMeta(it);\n  // return hash weak collections IDs\n  } return it[META].w;\n};\n// add metadata on freeze-family methods calling\nvar onFreeze = function (it) {\n  if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it);\n  return it;\n};\nvar meta = module.exports = {\n  KEY: META,\n  NEED: false,\n  fastKey: fastKey,\n  getWeak: getWeak,\n  onFreeze: onFreeze\n};\n","var isObject = require('./_is-object');\nmodule.exports = function (it, TYPE) {\n  if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!');\n  return it;\n};\n","'use strict';\nvar dP = require('./_object-dp').f;\nvar create = require('./_object-create');\nvar redefineAll = require('./_redefine-all');\nvar ctx = require('./_ctx');\nvar anInstance = require('./_an-instance');\nvar forOf = require('./_for-of');\nvar $iterDefine = require('./_iter-define');\nvar step = require('./_iter-step');\nvar setSpecies = require('./_set-species');\nvar DESCRIPTORS = require('./_descriptors');\nvar fastKey = require('./_meta').fastKey;\nvar validate = require('./_validate-collection');\nvar SIZE = DESCRIPTORS ? '_s' : 'size';\n\nvar getEntry = function (that, key) {\n  // fast case\n  var index = fastKey(key);\n  var entry;\n  if (index !== 'F') return that._i[index];\n  // frozen object case\n  for (entry = that._f; entry; entry = entry.n) {\n    if (entry.k == key) return entry;\n  }\n};\n\nmodule.exports = {\n  getConstructor: function (wrapper, NAME, IS_MAP, ADDER) {\n    var C = wrapper(function (that, iterable) {\n      anInstance(that, C, NAME, '_i');\n      that._t = NAME;         // collection type\n      that._i = create(null); // index\n      that._f = undefined;    // first entry\n      that._l = undefined;    // last entry\n      that[SIZE] = 0;         // size\n      if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);\n    });\n    redefineAll(C.prototype, {\n      // 23.1.3.1 Map.prototype.clear()\n      // 23.2.3.2 Set.prototype.clear()\n      clear: function clear() {\n        for (var that = validate(this, NAME), data = that._i, entry = that._f; entry; entry = entry.n) {\n          entry.r = true;\n          if (entry.p) entry.p = entry.p.n = undefined;\n          delete data[entry.i];\n        }\n        that._f = that._l = undefined;\n        that[SIZE] = 0;\n      },\n      // 23.1.3.3 Map.prototype.delete(key)\n      // 23.2.3.4 Set.prototype.delete(value)\n      'delete': function (key) {\n        var that = validate(this, NAME);\n        var entry = getEntry(that, key);\n        if (entry) {\n          var next = entry.n;\n          var prev = entry.p;\n          delete that._i[entry.i];\n          entry.r = true;\n          if (prev) prev.n = next;\n          if (next) next.p = prev;\n          if (that._f == entry) that._f = next;\n          if (that._l == entry) that._l = prev;\n          that[SIZE]--;\n        } return !!entry;\n      },\n      // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined)\n      // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined)\n      forEach: function forEach(callbackfn /* , that = undefined */) {\n        validate(this, NAME);\n        var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);\n        var entry;\n        while (entry = entry ? entry.n : this._f) {\n          f(entry.v, entry.k, this);\n          // revert to the last existing entry\n          while (entry && entry.r) entry = entry.p;\n        }\n      },\n      // 23.1.3.7 Map.prototype.has(key)\n      // 23.2.3.7 Set.prototype.has(value)\n      has: function has(key) {\n        return !!getEntry(validate(this, NAME), key);\n      }\n    });\n    if (DESCRIPTORS) dP(C.prototype, 'size', {\n      get: function () {\n        return validate(this, NAME)[SIZE];\n      }\n    });\n    return C;\n  },\n  def: function (that, key, value) {\n    var entry = getEntry(that, key);\n    var prev, index;\n    // change existing entry\n    if (entry) {\n      entry.v = value;\n    // create new entry\n    } else {\n      that._l = entry = {\n        i: index = fastKey(key, true), // <- index\n        k: key,                        // <- key\n        v: value,                      // <- value\n        p: prev = that._l,             // <- previous entry\n        n: undefined,                  // <- next entry\n        r: false                       // <- removed\n      };\n      if (!that._f) that._f = entry;\n      if (prev) prev.n = entry;\n      that[SIZE]++;\n      // add to index\n      if (index !== 'F') that._i[index] = entry;\n    } return that;\n  },\n  getEntry: getEntry,\n  setStrong: function (C, NAME, IS_MAP) {\n    // add .keys, .values, .entries, [@@iterator]\n    // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11\n    $iterDefine(C, NAME, function (iterated, kind) {\n      this._t = validate(iterated, NAME); // target\n      this._k = kind;                     // kind\n      this._l = undefined;                // previous\n    }, function () {\n      var that = this;\n      var kind = that._k;\n      var entry = that._l;\n      // revert to the last existing entry\n      while (entry && entry.r) entry = entry.p;\n      // get next entry\n      if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) {\n        // or finish the iteration\n        that._t = undefined;\n        return step(1);\n      }\n      // return step by kind\n      if (kind == 'keys') return step(0, entry.k);\n      if (kind == 'values') return step(0, entry.v);\n      return step(0, [entry.k, entry.v]);\n    }, IS_MAP ? 'entries' : 'values', !IS_MAP, true);\n\n    // add [@@species], 23.1.2.2, 23.2.2.2\n    setSpecies(NAME);\n  }\n};\n","// 7.2.2 IsArray(argument)\nvar cof = require('./_cof');\nmodule.exports = Array.isArray || function isArray(arg) {\n  return cof(arg) == 'Array';\n};\n","var isObject = require('./_is-object');\nvar isArray = require('./_is-array');\nvar SPECIES = require('./_wks')('species');\n\nmodule.exports = function (original) {\n  var C;\n  if (isArray(original)) {\n    C = original.constructor;\n    // cross-realm fallback\n    if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;\n    if (isObject(C)) {\n      C = C[SPECIES];\n      if (C === null) C = undefined;\n    }\n  } return C === undefined ? Array : C;\n};\n","// 9.4.2.3 ArraySpeciesCreate(originalArray, length)\nvar speciesConstructor = require('./_array-species-constructor');\n\nmodule.exports = function (original, length) {\n  return new (speciesConstructor(original))(length);\n};\n","// 0 -> Array#forEach\n// 1 -> Array#map\n// 2 -> Array#filter\n// 3 -> Array#some\n// 4 -> Array#every\n// 5 -> Array#find\n// 6 -> Array#findIndex\nvar ctx = require('./_ctx');\nvar IObject = require('./_iobject');\nvar toObject = require('./_to-object');\nvar toLength = require('./_to-length');\nvar asc = require('./_array-species-create');\nmodule.exports = function (TYPE, $create) {\n  var IS_MAP = TYPE == 1;\n  var IS_FILTER = TYPE == 2;\n  var IS_SOME = TYPE == 3;\n  var IS_EVERY = TYPE == 4;\n  var IS_FIND_INDEX = TYPE == 6;\n  var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;\n  var create = $create || asc;\n  return function ($this, callbackfn, that) {\n    var O = toObject($this);\n    var self = IObject(O);\n    var f = ctx(callbackfn, that, 3);\n    var length = toLength(self.length);\n    var index = 0;\n    var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;\n    var val, res;\n    for (;length > index; index++) if (NO_HOLES || index in self) {\n      val = self[index];\n      res = f(val, index, O);\n      if (TYPE) {\n        if (IS_MAP) result[index] = res;   // map\n        else if (res) switch (TYPE) {\n          case 3: return true;             // some\n          case 5: return val;              // find\n          case 6: return index;            // findIndex\n          case 2: result.push(val);        // filter\n        } else if (IS_EVERY) return false; // every\n      }\n    }\n    return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result;\n  };\n};\n","'use strict';\nvar global = require('./_global');\nvar $export = require('./_export');\nvar meta = require('./_meta');\nvar fails = require('./_fails');\nvar hide = require('./_hide');\nvar redefineAll = require('./_redefine-all');\nvar forOf = require('./_for-of');\nvar anInstance = require('./_an-instance');\nvar isObject = require('./_is-object');\nvar setToStringTag = require('./_set-to-string-tag');\nvar dP = require('./_object-dp').f;\nvar each = require('./_array-methods')(0);\nvar DESCRIPTORS = require('./_descriptors');\n\nmodule.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) {\n  var Base = global[NAME];\n  var C = Base;\n  var ADDER = IS_MAP ? 'set' : 'add';\n  var proto = C && C.prototype;\n  var O = {};\n  if (!DESCRIPTORS || typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function () {\n    new C().entries().next();\n  }))) {\n    // create collection constructor\n    C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER);\n    redefineAll(C.prototype, methods);\n    meta.NEED = true;\n  } else {\n    C = wrapper(function (target, iterable) {\n      anInstance(target, C, NAME, '_c');\n      target._c = new Base();\n      if (iterable != undefined) forOf(iterable, IS_MAP, target[ADDER], target);\n    });\n    each('add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON'.split(','), function (KEY) {\n      var IS_ADDER = KEY == 'add' || KEY == 'set';\n      if (KEY in proto && !(IS_WEAK && KEY == 'clear')) hide(C.prototype, KEY, function (a, b) {\n        anInstance(this, C, KEY);\n        if (!IS_ADDER && IS_WEAK && !isObject(a)) return KEY == 'get' ? undefined : false;\n        var result = this._c[KEY](a === 0 ? 0 : a, b);\n        return IS_ADDER ? this : result;\n      });\n    });\n    IS_WEAK || dP(C.prototype, 'size', {\n      get: function () {\n        return this._c.size;\n      }\n    });\n  }\n\n  setToStringTag(C, NAME);\n\n  O[NAME] = C;\n  $export($export.G + $export.W + $export.F, O);\n\n  if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP);\n\n  return C;\n};\n","'use strict';\nvar strong = require('./_collection-strong');\nvar validate = require('./_validate-collection');\nvar SET = 'Set';\n\n// 23.2 Set Objects\nmodule.exports = require('./_collection')(SET, function (get) {\n  return function Set() { return get(this, arguments.length > 0 ? arguments[0] : undefined); };\n}, {\n  // 23.2.3.1 Set.prototype.add(value)\n  add: function add(value) {\n    return strong.def(validate(this, SET), value = value === 0 ? 0 : value, value);\n  }\n}, strong);\n","var forOf = require('./_for-of');\n\nmodule.exports = function (iter, ITERATOR) {\n  var result = [];\n  forOf(iter, false, result.push, result, ITERATOR);\n  return result;\n};\n","// https://github.com/DavidBruant/Map-Set.prototype.toJSON\nvar classof = require('./_classof');\nvar from = require('./_array-from-iterable');\nmodule.exports = function (NAME) {\n  return function toJSON() {\n    if (classof(this) != NAME) throw TypeError(NAME + \"#toJSON isn't generic\");\n    return from(this);\n  };\n};\n","// https://github.com/DavidBruant/Map-Set.prototype.toJSON\nvar $export = require('./_export');\n\n$export($export.P + $export.R, 'Set', { toJSON: require('./_collection-to-json')('Set') });\n","'use strict';\n// https://tc39.github.io/proposal-setmap-offrom/\nvar $export = require('./_export');\n\nmodule.exports = function (COLLECTION) {\n  $export($export.S, COLLECTION, { of: function of() {\n    var length = arguments.length;\n    var A = Array(length);\n    while (length--) A[length] = arguments[length];\n    return new this(A);\n  } });\n};\n","// https://tc39.github.io/proposal-setmap-offrom/#sec-set.of\nrequire('./_set-collection-of')('Set');\n","'use strict';\n// https://tc39.github.io/proposal-setmap-offrom/\nvar $export = require('./_export');\nvar aFunction = require('./_a-function');\nvar ctx = require('./_ctx');\nvar forOf = require('./_for-of');\n\nmodule.exports = function (COLLECTION) {\n  $export($export.S, COLLECTION, { from: function from(source /* , mapFn, thisArg */) {\n    var mapFn = arguments[1];\n    var mapping, A, n, cb;\n    aFunction(this);\n    mapping = mapFn !== undefined;\n    if (mapping) aFunction(mapFn);\n    if (source == undefined) return new this();\n    A = [];\n    if (mapping) {\n      n = 0;\n      cb = ctx(mapFn, arguments[2], 2);\n      forOf(source, false, function (nextItem) {\n        A.push(cb(nextItem, n++));\n      });\n    } else {\n      forOf(source, false, A.push, A);\n    }\n    return new this(A);\n  } });\n};\n","// https://tc39.github.io/proposal-setmap-offrom/#sec-set.from\nrequire('./_set-collection-from')('Set');\n","require('../modules/es6.object.to-string');\nrequire('../modules/es6.string.iterator');\nrequire('../modules/web.dom.iterable');\nrequire('../modules/es6.set');\nrequire('../modules/es7.set.to-json');\nrequire('../modules/es7.set.of');\nrequire('../modules/es7.set.from');\nmodule.exports = require('../modules/_core').Set;\n","module.exports = { \"default\": require(\"core-js/library/fn/set\"), __esModule: true };","exports.f = Object.getOwnPropertySymbols;\n","exports.f = {}.propertyIsEnumerable;\n","'use strict';\n// 19.1.2.1 Object.assign(target, source, ...)\nvar getKeys = require('./_object-keys');\nvar gOPS = require('./_object-gops');\nvar pIE = require('./_object-pie');\nvar toObject = require('./_to-object');\nvar IObject = require('./_iobject');\nvar $assign = Object.assign;\n\n// should work with symbols and should have deterministic property order (V8 bug)\nmodule.exports = !$assign || require('./_fails')(function () {\n  var A = {};\n  var B = {};\n  // eslint-disable-next-line no-undef\n  var S = Symbol();\n  var K = 'abcdefghijklmnopqrst';\n  A[S] = 7;\n  K.split('').forEach(function (k) { B[k] = k; });\n  return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;\n}) ? function assign(target, source) { // eslint-disable-line no-unused-vars\n  var T = toObject(target);\n  var aLen = arguments.length;\n  var index = 1;\n  var getSymbols = gOPS.f;\n  var isEnum = pIE.f;\n  while (aLen > index) {\n    var S = IObject(arguments[index++]);\n    var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S);\n    var length = keys.length;\n    var j = 0;\n    var key;\n    while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key];\n  } return T;\n} : $assign;\n","// 19.1.3.1 Object.assign(target, source)\nvar $export = require('./_export');\n\n$export($export.S + $export.F, 'Object', { assign: require('./_object-assign') });\n","require('../../modules/es6.object.assign');\nmodule.exports = require('../../modules/_core').Object.assign;\n","module.exports = { \"default\": require(\"core-js/library/fn/object/assign\"), __esModule: true };","\"use strict\";\n\nexports.__esModule = true;\n\nexports.default = function (instance, Constructor) {\n  if (!(instance instanceof Constructor)) {\n    throw new TypeError(\"Cannot call a class as a function\");\n  }\n};","exports.f = require('./_wks');\n","require('../../modules/es6.string.iterator');\nrequire('../../modules/web.dom.iterable');\nmodule.exports = require('../../modules/_wks-ext').f('iterator');\n","module.exports = { \"default\": require(\"core-js/library/fn/symbol/iterator\"), __esModule: true };","var global = require('./_global');\nvar core = require('./_core');\nvar LIBRARY = require('./_library');\nvar wksExt = require('./_wks-ext');\nvar defineProperty = require('./_object-dp').f;\nmodule.exports = function (name) {\n  var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});\n  if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) });\n};\n","// all enumerable object keys, includes symbols\nvar getKeys = require('./_object-keys');\nvar gOPS = require('./_object-gops');\nvar pIE = require('./_object-pie');\nmodule.exports = function (it) {\n  var result = getKeys(it);\n  var getSymbols = gOPS.f;\n  if (getSymbols) {\n    var symbols = getSymbols(it);\n    var isEnum = pIE.f;\n    var i = 0;\n    var key;\n    while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key);\n  } return result;\n};\n","// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)\nvar $keys = require('./_object-keys-internal');\nvar hiddenKeys = require('./_enum-bug-keys').concat('length', 'prototype');\n\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n  return $keys(O, hiddenKeys);\n};\n","// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window\nvar toIObject = require('./_to-iobject');\nvar gOPN = require('./_object-gopn').f;\nvar toString = {}.toString;\n\nvar windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames\n  ? Object.getOwnPropertyNames(window) : [];\n\nvar getWindowNames = function (it) {\n  try {\n    return gOPN(it);\n  } catch (e) {\n    return windowNames.slice();\n  }\n};\n\nmodule.exports.f = function getOwnPropertyNames(it) {\n  return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));\n};\n","var pIE = require('./_object-pie');\nvar createDesc = require('./_property-desc');\nvar toIObject = require('./_to-iobject');\nvar toPrimitive = require('./_to-primitive');\nvar has = require('./_has');\nvar IE8_DOM_DEFINE = require('./_ie8-dom-define');\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nexports.f = require('./_descriptors') ? gOPD : function getOwnPropertyDescriptor(O, P) {\n  O = toIObject(O);\n  P = toPrimitive(P, true);\n  if (IE8_DOM_DEFINE) try {\n    return gOPD(O, P);\n  } catch (e) { /* empty */ }\n  if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);\n};\n","'use strict';\n// ECMAScript 6 symbols shim\nvar global = require('./_global');\nvar has = require('./_has');\nvar DESCRIPTORS = require('./_descriptors');\nvar $export = require('./_export');\nvar redefine = require('./_redefine');\nvar META = require('./_meta').KEY;\nvar $fails = require('./_fails');\nvar shared = require('./_shared');\nvar setToStringTag = require('./_set-to-string-tag');\nvar uid = require('./_uid');\nvar wks = require('./_wks');\nvar wksExt = require('./_wks-ext');\nvar wksDefine = require('./_wks-define');\nvar enumKeys = require('./_enum-keys');\nvar isArray = require('./_is-array');\nvar anObject = require('./_an-object');\nvar toIObject = require('./_to-iobject');\nvar toPrimitive = require('./_to-primitive');\nvar createDesc = require('./_property-desc');\nvar _create = require('./_object-create');\nvar gOPNExt = require('./_object-gopn-ext');\nvar $GOPD = require('./_object-gopd');\nvar $DP = require('./_object-dp');\nvar $keys = require('./_object-keys');\nvar gOPD = $GOPD.f;\nvar dP = $DP.f;\nvar gOPN = gOPNExt.f;\nvar $Symbol = global.Symbol;\nvar $JSON = global.JSON;\nvar _stringify = $JSON && $JSON.stringify;\nvar PROTOTYPE = 'prototype';\nvar HIDDEN = wks('_hidden');\nvar TO_PRIMITIVE = wks('toPrimitive');\nvar isEnum = {}.propertyIsEnumerable;\nvar SymbolRegistry = shared('symbol-registry');\nvar AllSymbols = shared('symbols');\nvar OPSymbols = shared('op-symbols');\nvar ObjectProto = Object[PROTOTYPE];\nvar USE_NATIVE = typeof $Symbol == 'function';\nvar QObject = global.QObject;\n// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173\nvar setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;\n\n// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687\nvar setSymbolDesc = DESCRIPTORS && $fails(function () {\n  return _create(dP({}, 'a', {\n    get: function () { return dP(this, 'a', { value: 7 }).a; }\n  })).a != 7;\n}) ? function (it, key, D) {\n  var protoDesc = gOPD(ObjectProto, key);\n  if (protoDesc) delete ObjectProto[key];\n  dP(it, key, D);\n  if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc);\n} : dP;\n\nvar wrap = function (tag) {\n  var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);\n  sym._k = tag;\n  return sym;\n};\n\nvar isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) {\n  return typeof it == 'symbol';\n} : function (it) {\n  return it instanceof $Symbol;\n};\n\nvar $defineProperty = function defineProperty(it, key, D) {\n  if (it === ObjectProto) $defineProperty(OPSymbols, key, D);\n  anObject(it);\n  key = toPrimitive(key, true);\n  anObject(D);\n  if (has(AllSymbols, key)) {\n    if (!D.enumerable) {\n      if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {}));\n      it[HIDDEN][key] = true;\n    } else {\n      if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false;\n      D = _create(D, { enumerable: createDesc(0, false) });\n    } return setSymbolDesc(it, key, D);\n  } return dP(it, key, D);\n};\nvar $defineProperties = function defineProperties(it, P) {\n  anObject(it);\n  var keys = enumKeys(P = toIObject(P));\n  var i = 0;\n  var l = keys.length;\n  var key;\n  while (l > i) $defineProperty(it, key = keys[i++], P[key]);\n  return it;\n};\nvar $create = function create(it, P) {\n  return P === undefined ? _create(it) : $defineProperties(_create(it), P);\n};\nvar $propertyIsEnumerable = function propertyIsEnumerable(key) {\n  var E = isEnum.call(this, key = toPrimitive(key, true));\n  if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false;\n  return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;\n};\nvar $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) {\n  it = toIObject(it);\n  key = toPrimitive(key, true);\n  if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return;\n  var D = gOPD(it, key);\n  if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true;\n  return D;\n};\nvar $getOwnPropertyNames = function getOwnPropertyNames(it) {\n  var names = gOPN(toIObject(it));\n  var result = [];\n  var i = 0;\n  var key;\n  while (names.length > i) {\n    if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key);\n  } return result;\n};\nvar $getOwnPropertySymbols = function getOwnPropertySymbols(it) {\n  var IS_OP = it === ObjectProto;\n  var names = gOPN(IS_OP ? OPSymbols : toIObject(it));\n  var result = [];\n  var i = 0;\n  var key;\n  while (names.length > i) {\n    if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]);\n  } return result;\n};\n\n// 19.4.1.1 Symbol([description])\nif (!USE_NATIVE) {\n  $Symbol = function Symbol() {\n    if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!');\n    var tag = uid(arguments.length > 0 ? arguments[0] : undefined);\n    var $set = function (value) {\n      if (this === ObjectProto) $set.call(OPSymbols, value);\n      if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;\n      setSymbolDesc(this, tag, createDesc(1, value));\n    };\n    if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set });\n    return wrap(tag);\n  };\n  redefine($Symbol[PROTOTYPE], 'toString', function toString() {\n    return this._k;\n  });\n\n  $GOPD.f = $getOwnPropertyDescriptor;\n  $DP.f = $defineProperty;\n  require('./_object-gopn').f = gOPNExt.f = $getOwnPropertyNames;\n  require('./_object-pie').f = $propertyIsEnumerable;\n  require('./_object-gops').f = $getOwnPropertySymbols;\n\n  if (DESCRIPTORS && !require('./_library')) {\n    redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);\n  }\n\n  wksExt.f = function (name) {\n    return wrap(wks(name));\n  };\n}\n\n$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol });\n\nfor (var es6Symbols = (\n  // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14\n  'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'\n).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]);\n\nfor (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]);\n\n$export($export.S + $export.F * !USE_NATIVE, 'Symbol', {\n  // 19.4.2.1 Symbol.for(key)\n  'for': function (key) {\n    return has(SymbolRegistry, key += '')\n      ? SymbolRegistry[key]\n      : SymbolRegistry[key] = $Symbol(key);\n  },\n  // 19.4.2.5 Symbol.keyFor(sym)\n  keyFor: function keyFor(sym) {\n    if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!');\n    for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key;\n  },\n  useSetter: function () { setter = true; },\n  useSimple: function () { setter = false; }\n});\n\n$export($export.S + $export.F * !USE_NATIVE, 'Object', {\n  // 19.1.2.2 Object.create(O [, Properties])\n  create: $create,\n  // 19.1.2.4 Object.defineProperty(O, P, Attributes)\n  defineProperty: $defineProperty,\n  // 19.1.2.3 Object.defineProperties(O, Properties)\n  defineProperties: $defineProperties,\n  // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)\n  getOwnPropertyDescriptor: $getOwnPropertyDescriptor,\n  // 19.1.2.7 Object.getOwnPropertyNames(O)\n  getOwnPropertyNames: $getOwnPropertyNames,\n  // 19.1.2.8 Object.getOwnPropertySymbols(O)\n  getOwnPropertySymbols: $getOwnPropertySymbols\n});\n\n// 24.3.2 JSON.stringify(value [, replacer [, space]])\n$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () {\n  var S = $Symbol();\n  // MS Edge converts symbol values to JSON as {}\n  // WebKit converts symbol values to JSON as null\n  // V8 throws on boxed symbols\n  return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}';\n})), 'JSON', {\n  stringify: function stringify(it) {\n    if (it === undefined || isSymbol(it)) return; // IE8 returns string on undefined\n    var args = [it];\n    var i = 1;\n    var replacer, $replacer;\n    while (arguments.length > i) args.push(arguments[i++]);\n    replacer = args[1];\n    if (typeof replacer == 'function') $replacer = replacer;\n    if ($replacer || !isArray(replacer)) replacer = function (key, value) {\n      if ($replacer) value = $replacer.call(this, key, value);\n      if (!isSymbol(value)) return value;\n    };\n    args[1] = replacer;\n    return _stringify.apply($JSON, args);\n  }\n});\n\n// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)\n$Symbol[PROTOTYPE][TO_PRIMITIVE] || require('./_hide')($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);\n// 19.4.3.5 Symbol.prototype[@@toStringTag]\nsetToStringTag($Symbol, 'Symbol');\n// 20.2.1.9 Math[@@toStringTag]\nsetToStringTag(Math, 'Math', true);\n// 24.3.3 JSON[@@toStringTag]\nsetToStringTag(global.JSON, 'JSON', true);\n","require('./_wks-define')('asyncIterator');\n","require('./_wks-define')('observable');\n","require('../../modules/es6.symbol');\nrequire('../../modules/es6.object.to-string');\nrequire('../../modules/es7.symbol.async-iterator');\nrequire('../../modules/es7.symbol.observable');\nmodule.exports = require('../../modules/_core').Symbol;\n","module.exports = { \"default\": require(\"core-js/library/fn/symbol\"), __esModule: true };","\"use strict\";\n\nexports.__esModule = true;\n\nvar _iterator = require(\"../core-js/symbol/iterator\");\n\nvar _iterator2 = _interopRequireDefault(_iterator);\n\nvar _symbol = require(\"../core-js/symbol\");\n\nvar _symbol2 = _interopRequireDefault(_symbol);\n\nvar _typeof = typeof _symbol2.default === \"function\" && typeof _iterator2.default === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === \"function\" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? \"symbol\" : typeof obj; };\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = typeof _symbol2.default === \"function\" && _typeof(_iterator2.default) === \"symbol\" ? function (obj) {\n  return typeof obj === \"undefined\" ? \"undefined\" : _typeof(obj);\n} : function (obj) {\n  return obj && typeof _symbol2.default === \"function\" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? \"symbol\" : typeof obj === \"undefined\" ? \"undefined\" : _typeof(obj);\n};","\"use strict\";\n\nexports.__esModule = true;\n\nvar _typeof2 = require(\"../helpers/typeof\");\n\nvar _typeof3 = _interopRequireDefault(_typeof2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function (self, call) {\n  if (!self) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n\n  return call && ((typeof call === \"undefined\" ? \"undefined\" : (0, _typeof3.default)(call)) === \"object\" || typeof call === \"function\") ? call : self;\n};","// Works with __proto__ only. Old v8 can't work with null proto objects.\n/* eslint-disable no-proto */\nvar isObject = require('./_is-object');\nvar anObject = require('./_an-object');\nvar check = function (O, proto) {\n  anObject(O);\n  if (!isObject(proto) && proto !== null) throw TypeError(proto + \": can't set as prototype!\");\n};\nmodule.exports = {\n  set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line\n    function (test, buggy, set) {\n      try {\n        set = require('./_ctx')(Function.call, require('./_object-gopd').f(Object.prototype, '__proto__').set, 2);\n        set(test, []);\n        buggy = !(test instanceof Array);\n      } catch (e) { buggy = true; }\n      return function setPrototypeOf(O, proto) {\n        check(O, proto);\n        if (buggy) O.__proto__ = proto;\n        else set(O, proto);\n        return O;\n      };\n    }({}, false) : undefined),\n  check: check\n};\n","// 19.1.3.19 Object.setPrototypeOf(O, proto)\nvar $export = require('./_export');\n$export($export.S, 'Object', { setPrototypeOf: require('./_set-proto').set });\n","require('../../modules/es6.object.set-prototype-of');\nmodule.exports = require('../../modules/_core').Object.setPrototypeOf;\n","module.exports = { \"default\": require(\"core-js/library/fn/object/set-prototype-of\"), __esModule: true };","var $export = require('./_export');\n// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\n$export($export.S, 'Object', { create: require('./_object-create') });\n","require('../../modules/es6.object.create');\nvar $Object = require('../../modules/_core').Object;\nmodule.exports = function create(P, D) {\n  return $Object.create(P, D);\n};\n","module.exports = { \"default\": require(\"core-js/library/fn/object/create\"), __esModule: true };","\"use strict\";\n\nexports.__esModule = true;\n\nvar _setPrototypeOf = require(\"../core-js/object/set-prototype-of\");\n\nvar _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf);\n\nvar _create = require(\"../core-js/object/create\");\n\nvar _create2 = _interopRequireDefault(_create);\n\nvar _typeof2 = require(\"../helpers/typeof\");\n\nvar _typeof3 = _interopRequireDefault(_typeof2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function (subClass, superClass) {\n  if (typeof superClass !== \"function\" && superClass !== null) {\n    throw new TypeError(\"Super expression must either be null or a function, not \" + (typeof superClass === \"undefined\" ? \"undefined\" : (0, _typeof3.default)(superClass)));\n  }\n\n  subClass.prototype = (0, _create2.default)(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      enumerable: false,\n      writable: true,\n      configurable: true\n    }\n  });\n  if (superClass) _setPrototypeOf2.default ? (0, _setPrototypeOf2.default)(subClass, superClass) : subClass.__proto__ = superClass;\n};","/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n *  - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function(val, options) {\n  options = options || {};\n  var type = typeof val;\n  if (type === 'string' && val.length > 0) {\n    return parse(val);\n  } else if (type === 'number' && isNaN(val) === false) {\n    return options.long ? fmtLong(val) : fmtShort(val);\n  }\n  throw new Error(\n    'val is not a non-empty string or a valid number. val=' +\n      JSON.stringify(val)\n  );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n  str = String(str);\n  if (str.length > 100) {\n    return;\n  }\n  var match = /^((?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(\n    str\n  );\n  if (!match) {\n    return;\n  }\n  var n = parseFloat(match[1]);\n  var type = (match[2] || 'ms').toLowerCase();\n  switch (type) {\n    case 'years':\n    case 'year':\n    case 'yrs':\n    case 'yr':\n    case 'y':\n      return n * y;\n    case 'days':\n    case 'day':\n    case 'd':\n      return n * d;\n    case 'hours':\n    case 'hour':\n    case 'hrs':\n    case 'hr':\n    case 'h':\n      return n * h;\n    case 'minutes':\n    case 'minute':\n    case 'mins':\n    case 'min':\n    case 'm':\n      return n * m;\n    case 'seconds':\n    case 'second':\n    case 'secs':\n    case 'sec':\n    case 's':\n      return n * s;\n    case 'milliseconds':\n    case 'millisecond':\n    case 'msecs':\n    case 'msec':\n    case 'ms':\n      return n;\n    default:\n      return undefined;\n  }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n  if (ms >= d) {\n    return Math.round(ms / d) + 'd';\n  }\n  if (ms >= h) {\n    return Math.round(ms / h) + 'h';\n  }\n  if (ms >= m) {\n    return Math.round(ms / m) + 'm';\n  }\n  if (ms >= s) {\n    return Math.round(ms / s) + 's';\n  }\n  return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n  return plural(ms, d, 'day') ||\n    plural(ms, h, 'hour') ||\n    plural(ms, m, 'minute') ||\n    plural(ms, s, 'second') ||\n    ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, n, name) {\n  if (ms < n) {\n    return;\n  }\n  if (ms < n * 1.5) {\n    return Math.floor(ms / n) + ' ' + name;\n  }\n  return Math.ceil(ms / n) + ' ' + name + 's';\n}\n","\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n *\n * Expose `debug()` as the module.\n */\n\nexports = module.exports = createDebug.debug = createDebug['default'] = createDebug;\nexports.coerce = coerce;\nexports.disable = disable;\nexports.enable = enable;\nexports.enabled = enabled;\nexports.humanize = require('ms');\n\n/**\n * The currently active debug mode names, and names to skip.\n */\n\nexports.names = [];\nexports.skips = [];\n\n/**\n * Map of special \"%n\" handling functions, for the debug \"format\" argument.\n *\n * Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n */\n\nexports.formatters = {};\n\n/**\n * Previous log timestamp.\n */\n\nvar prevTime;\n\n/**\n * Select a color.\n * @param {String} namespace\n * @return {Number}\n * @api private\n */\n\nfunction selectColor(namespace) {\n  var hash = 0, i;\n\n  for (i in namespace) {\n    hash  = ((hash << 5) - hash) + namespace.charCodeAt(i);\n    hash |= 0; // Convert to 32bit integer\n  }\n\n  return exports.colors[Math.abs(hash) % exports.colors.length];\n}\n\n/**\n * Create a debugger with the given `namespace`.\n *\n * @param {String} namespace\n * @return {Function}\n * @api public\n */\n\nfunction createDebug(namespace) {\n\n  function debug() {\n    // disabled?\n    if (!debug.enabled) return;\n\n    var self = debug;\n\n    // set `diff` timestamp\n    var curr = +new Date();\n    var ms = curr - (prevTime || curr);\n    self.diff = ms;\n    self.prev = prevTime;\n    self.curr = curr;\n    prevTime = curr;\n\n    // turn the `arguments` into a proper Array\n    var args = new Array(arguments.length);\n    for (var i = 0; i < args.length; i++) {\n      args[i] = arguments[i];\n    }\n\n    args[0] = exports.coerce(args[0]);\n\n    if ('string' !== typeof args[0]) {\n      // anything else let's inspect with %O\n      args.unshift('%O');\n    }\n\n    // apply any `formatters` transformations\n    var index = 0;\n    args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) {\n      // if we encounter an escaped % then don't increase the array index\n      if (match === '%%') return match;\n      index++;\n      var formatter = exports.formatters[format];\n      if ('function' === typeof formatter) {\n        var val = args[index];\n        match = formatter.call(self, val);\n\n        // now we need to remove `args[index]` since it's inlined in the `format`\n        args.splice(index, 1);\n        index--;\n      }\n      return match;\n    });\n\n    // apply env-specific formatting (colors, etc.)\n    exports.formatArgs.call(self, args);\n\n    var logFn = debug.log || exports.log || console.log.bind(console);\n    logFn.apply(self, args);\n  }\n\n  debug.namespace = namespace;\n  debug.enabled = exports.enabled(namespace);\n  debug.useColors = exports.useColors();\n  debug.color = selectColor(namespace);\n\n  // env-specific initialization logic for debug instances\n  if ('function' === typeof exports.init) {\n    exports.init(debug);\n  }\n\n  return debug;\n}\n\n/**\n * Enables a debug mode by namespaces. This can include modes\n * separated by a colon and wildcards.\n *\n * @param {String} namespaces\n * @api public\n */\n\nfunction enable(namespaces) {\n  exports.save(namespaces);\n\n  exports.names = [];\n  exports.skips = [];\n\n  var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n  var len = split.length;\n\n  for (var i = 0; i < len; i++) {\n    if (!split[i]) continue; // ignore empty strings\n    namespaces = split[i].replace(/\\*/g, '.*?');\n    if (namespaces[0] === '-') {\n      exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));\n    } else {\n      exports.names.push(new RegExp('^' + namespaces + '$'));\n    }\n  }\n}\n\n/**\n * Disable debug output.\n *\n * @api public\n */\n\nfunction disable() {\n  exports.enable('');\n}\n\n/**\n * Returns true if the given mode name is enabled, false otherwise.\n *\n * @param {String} name\n * @return {Boolean}\n * @api public\n */\n\nfunction enabled(name) {\n  var i, len;\n  for (i = 0, len = exports.skips.length; i < len; i++) {\n    if (exports.skips[i].test(name)) {\n      return false;\n    }\n  }\n  for (i = 0, len = exports.names.length; i < len; i++) {\n    if (exports.names[i].test(name)) {\n      return true;\n    }\n  }\n  return false;\n}\n\n/**\n * Coerce `val`.\n *\n * @param {Mixed} val\n * @return {Mixed}\n * @api private\n */\n\nfunction coerce(val) {\n  if (val instanceof Error) return val.stack || val.message;\n  return val;\n}\n","/**\n * This is the web browser implementation of `debug()`.\n *\n * Expose `debug()` as the module.\n */\n\nexports = module.exports = require('./debug');\nexports.log = log;\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = 'undefined' != typeof chrome\n               && 'undefined' != typeof chrome.storage\n                  ? chrome.storage.local\n                  : localstorage();\n\n/**\n * Colors.\n */\n\nexports.colors = [\n  'lightseagreen',\n  'forestgreen',\n  'goldenrod',\n  'dodgerblue',\n  'darkorchid',\n  'crimson'\n];\n\n/**\n * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n * and the Firebug extension (any Firefox version) are known\n * to support \"%c\" CSS customizations.\n *\n * TODO: add a `localStorage` variable to explicitly enable/disable colors\n */\n\nfunction useColors() {\n  // NB: In an Electron preload script, document will be defined but not fully\n  // initialized. Since we know we're in Chrome, we'll just detect this case\n  // explicitly\n  if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') {\n    return true;\n  }\n\n  // is webkit? http://stackoverflow.com/a/16459606/376773\n  // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n  return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n    // is firebug? http://stackoverflow.com/a/398120/376773\n    (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n    // is firefox >= v31?\n    // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n    (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n    // double check webkit in userAgent just in case we are in a worker\n    (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nexports.formatters.j = function(v) {\n  try {\n    return JSON.stringify(v);\n  } catch (err) {\n    return '[UnexpectedJSONParseError]: ' + err.message;\n  }\n};\n\n\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n  var useColors = this.useColors;\n\n  args[0] = (useColors ? '%c' : '')\n    + this.namespace\n    + (useColors ? ' %c' : ' ')\n    + args[0]\n    + (useColors ? '%c ' : ' ')\n    + '+' + exports.humanize(this.diff);\n\n  if (!useColors) return;\n\n  var c = 'color: ' + this.color;\n  args.splice(1, 0, c, 'color: inherit')\n\n  // the final \"%c\" is somewhat tricky, because there could be other\n  // arguments passed either before or after the %c, so we need to\n  // figure out the correct index to insert the CSS into\n  var index = 0;\n  var lastC = 0;\n  args[0].replace(/%[a-zA-Z%]/g, function(match) {\n    if ('%%' === match) return;\n    index++;\n    if ('%c' === match) {\n      // we only are interested in the *last* %c\n      // (the user may have provided their own)\n      lastC = index;\n    }\n  });\n\n  args.splice(lastC, 0, c);\n}\n\n/**\n * Invokes `console.log()` when available.\n * No-op when `console.log` is not a \"function\".\n *\n * @api public\n */\n\nfunction log() {\n  // this hackery is required for IE8/9, where\n  // the `console.log` function doesn't have 'apply'\n  return 'object' === typeof console\n    && console.log\n    && Function.prototype.apply.call(console.log, console, arguments);\n}\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\n\nfunction save(namespaces) {\n  try {\n    if (null == namespaces) {\n      exports.storage.removeItem('debug');\n    } else {\n      exports.storage.debug = namespaces;\n    }\n  } catch(e) {}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\n\nfunction load() {\n  var r;\n  try {\n    r = exports.storage.debug;\n  } catch(e) {}\n\n  // If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n  if (!r && typeof process !== 'undefined' && 'env' in process) {\n    r = process.env.DEBUG;\n  }\n\n  return r;\n}\n\n/**\n * Enable namespaces listed in `localStorage.debug` initially.\n */\n\nexports.enable(load());\n\n/**\n * Localstorage attempts to return the localstorage.\n *\n * This is necessary because safari throws\n * when a user disables cookies/localstorage\n * and you attempt to access it.\n *\n * @return {LocalStorage}\n * @api private\n */\n\nfunction localstorage() {\n  try {\n    return window.localStorage;\n  } catch (e) {}\n}\n","'use strict';\n\nmodule.exports = function bind(fn, thisArg) {\n  return function wrap() {\n    var args = new Array(arguments.length);\n    for (var i = 0; i < args.length; i++) {\n      args[i] = arguments[i];\n    }\n    return fn.apply(thisArg, args);\n  };\n};\n","/*!\n * Determine if an object is a Buffer\n *\n * @author   Feross Aboukhadijeh  \n * @license  MIT\n */\n\n// The _isBuffer check is for Safari 5-7 support, because it's missing\n// Object.prototype.constructor. Remove this eventually\nmodule.exports = function (obj) {\n  return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer)\n}\n\nfunction isBuffer (obj) {\n  return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)\n}\n\n// For Node v0.10 support. Remove this eventually.\nfunction isSlowBuffer (obj) {\n  return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0))\n}\n","'use strict';\n\nvar bind = require('./helpers/bind');\nvar isBuffer = require('is-buffer');\n\n/*global toString:true*/\n\n// utils is a library of generic helper functions non-specific to axios\n\nvar toString = Object.prototype.toString;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\nfunction isArray(val) {\n  return toString.call(val) === '[object Array]';\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nfunction isArrayBuffer(val) {\n  return toString.call(val) === '[object ArrayBuffer]';\n}\n\n/**\n * Determine if a value is a FormData\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction isFormData(val) {\n  return (typeof FormData !== 'undefined') && (val instanceof FormData);\n}\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n  var result;\n  if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n    result = ArrayBuffer.isView(val);\n  } else {\n    result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);\n  }\n  return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a String, otherwise false\n */\nfunction isString(val) {\n  return typeof val === 'string';\n}\n\n/**\n * Determine if a value is a Number\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Number, otherwise false\n */\nfunction isNumber(val) {\n  return typeof val === 'number';\n}\n\n/**\n * Determine if a value is undefined\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nfunction isUndefined(val) {\n  return typeof val === 'undefined';\n}\n\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\nfunction isObject(val) {\n  return val !== null && typeof val === 'object';\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\nfunction isDate(val) {\n  return toString.call(val) === '[object Date]';\n}\n\n/**\n * Determine if a value is a File\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nfunction isFile(val) {\n  return toString.call(val) === '[object File]';\n}\n\n/**\n * Determine if a value is a Blob\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nfunction isBlob(val) {\n  return toString.call(val) === '[object Blob]';\n}\n\n/**\n * Determine if a value is a Function\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nfunction isFunction(val) {\n  return toString.call(val) === '[object Function]';\n}\n\n/**\n * Determine if a value is a Stream\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nfunction isStream(val) {\n  return isObject(val) && isFunction(val.pipe);\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nfunction isURLSearchParams(val) {\n  return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;\n}\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\nfunction trim(str) {\n  return str.replace(/^\\s*/, '').replace(/\\s*$/, '');\n}\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n *  typeof window -> undefined\n *  typeof document -> undefined\n *\n * react-native:\n *  navigator.product -> 'ReactNative'\n */\nfunction isStandardBrowserEnv() {\n  if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {\n    return false;\n  }\n  return (\n    typeof window !== 'undefined' &&\n    typeof document !== 'undefined'\n  );\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n  // Don't bother if no value provided\n  if (obj === null || typeof obj === 'undefined') {\n    return;\n  }\n\n  // Force an array if not already something iterable\n  if (typeof obj !== 'object' && !isArray(obj)) {\n    /*eslint no-param-reassign:0*/\n    obj = [obj];\n  }\n\n  if (isArray(obj)) {\n    // Iterate over array values\n    for (var i = 0, l = obj.length; i < l; i++) {\n      fn.call(null, obj[i], i, obj);\n    }\n  } else {\n    // Iterate over object keys\n    for (var key in obj) {\n      if (Object.prototype.hasOwnProperty.call(obj, key)) {\n        fn.call(null, obj[key], key, obj);\n      }\n    }\n  }\n}\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n  var result = {};\n  function assignValue(val, key) {\n    if (typeof result[key] === 'object' && typeof val === 'object') {\n      result[key] = merge(result[key], val);\n    } else {\n      result[key] = val;\n    }\n  }\n\n  for (var i = 0, l = arguments.length; i < l; i++) {\n    forEach(arguments[i], assignValue);\n  }\n  return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n * @return {Object} The resulting value of object a\n */\nfunction extend(a, b, thisArg) {\n  forEach(b, function assignValue(val, key) {\n    if (thisArg && typeof val === 'function') {\n      a[key] = bind(val, thisArg);\n    } else {\n      a[key] = val;\n    }\n  });\n  return a;\n}\n\nmodule.exports = {\n  isArray: isArray,\n  isArrayBuffer: isArrayBuffer,\n  isBuffer: isBuffer,\n  isFormData: isFormData,\n  isArrayBufferView: isArrayBufferView,\n  isString: isString,\n  isNumber: isNumber,\n  isObject: isObject,\n  isUndefined: isUndefined,\n  isDate: isDate,\n  isFile: isFile,\n  isBlob: isBlob,\n  isFunction: isFunction,\n  isStream: isStream,\n  isURLSearchParams: isURLSearchParams,\n  isStandardBrowserEnv: isStandardBrowserEnv,\n  forEach: forEach,\n  merge: merge,\n  extend: extend,\n  trim: trim\n};\n","var core = require('../../modules/_core');\nvar $JSON = core.JSON || (core.JSON = { stringify: JSON.stringify });\nmodule.exports = function stringify(it) { // eslint-disable-line no-unused-vars\n  return $JSON.stringify.apply($JSON, arguments);\n};\n","module.exports = { \"default\": require(\"core-js/library/fn/json/stringify\"), __esModule: true };","'use strict';\n\nvar utils = require('../utils');\n\nmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n  utils.forEach(headers, function processHeader(value, name) {\n    if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n      headers[normalizedName] = value;\n      delete headers[name];\n    }\n  });\n};\n","'use strict';\n\n/**\n * Update an Error with the specified config, error code, and response.\n *\n * @param {Error} error The error to update.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The error.\n */\nmodule.exports = function enhanceError(error, config, code, request, response) {\n  error.config = config;\n  if (code) {\n    error.code = code;\n  }\n  error.request = request;\n  error.response = response;\n  return error;\n};\n","'use strict';\n\nvar enhanceError = require('./enhanceError');\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The created error.\n */\nmodule.exports = function createError(message, config, code, request, response) {\n  var error = new Error(message);\n  return enhanceError(error, config, code, request, response);\n};\n","'use strict';\n\nvar createError = require('./createError');\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n */\nmodule.exports = function settle(resolve, reject, response) {\n  var validateStatus = response.config.validateStatus;\n  // Note: status is not exposed by XDomainRequest\n  if (!response.status || !validateStatus || validateStatus(response.status)) {\n    resolve(response);\n  } else {\n    reject(createError(\n      'Request failed with status code ' + response.status,\n      response.config,\n      null,\n      response.request,\n      response\n    ));\n  }\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nfunction encode(val) {\n  return encodeURIComponent(val).\n    replace(/%40/gi, '@').\n    replace(/%3A/gi, ':').\n    replace(/%24/g, '$').\n    replace(/%2C/gi, ',').\n    replace(/%20/g, '+').\n    replace(/%5B/gi, '[').\n    replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @returns {string} The formatted url\n */\nmodule.exports = function buildURL(url, params, paramsSerializer) {\n  /*eslint no-param-reassign:0*/\n  if (!params) {\n    return url;\n  }\n\n  var serializedParams;\n  if (paramsSerializer) {\n    serializedParams = paramsSerializer(params);\n  } else if (utils.isURLSearchParams(params)) {\n    serializedParams = params.toString();\n  } else {\n    var parts = [];\n\n    utils.forEach(params, function serialize(val, key) {\n      if (val === null || typeof val === 'undefined') {\n        return;\n      }\n\n      if (utils.isArray(val)) {\n        key = key + '[]';\n      }\n\n      if (!utils.isArray(val)) {\n        val = [val];\n      }\n\n      utils.forEach(val, function parseValue(v) {\n        if (utils.isDate(v)) {\n          v = v.toISOString();\n        } else if (utils.isObject(v)) {\n          v = JSON.stringify(v);\n        }\n        parts.push(encode(key) + '=' + encode(v));\n      });\n    });\n\n    serializedParams = parts.join('&');\n  }\n\n  if (serializedParams) {\n    url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n  }\n\n  return url;\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n  var parsed = {};\n  var key;\n  var val;\n  var i;\n\n  if (!headers) { return parsed; }\n\n  utils.forEach(headers.split('\\n'), function parser(line) {\n    i = line.indexOf(':');\n    key = utils.trim(line.substr(0, i)).toLowerCase();\n    val = utils.trim(line.substr(i + 1));\n\n    if (key) {\n      parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n    }\n  });\n\n  return parsed;\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n  utils.isStandardBrowserEnv() ?\n\n  // Standard browser envs have full support of the APIs needed to test\n  // whether the request URL is of the same origin as current location.\n  (function standardBrowserEnv() {\n    var msie = /(msie|trident)/i.test(navigator.userAgent);\n    var urlParsingNode = document.createElement('a');\n    var originURL;\n\n    /**\n    * Parse a URL to discover it's components\n    *\n    * @param {String} url The URL to be parsed\n    * @returns {Object}\n    */\n    function resolveURL(url) {\n      var href = url;\n\n      if (msie) {\n        // IE needs attribute set twice to normalize properties\n        urlParsingNode.setAttribute('href', href);\n        href = urlParsingNode.href;\n      }\n\n      urlParsingNode.setAttribute('href', href);\n\n      // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n      return {\n        href: urlParsingNode.href,\n        protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n        host: urlParsingNode.host,\n        search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n        hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n        hostname: urlParsingNode.hostname,\n        port: urlParsingNode.port,\n        pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n                  urlParsingNode.pathname :\n                  '/' + urlParsingNode.pathname\n      };\n    }\n\n    originURL = resolveURL(window.location.href);\n\n    /**\n    * Determine if a URL shares the same origin as the current location\n    *\n    * @param {String} requestURL The URL to test\n    * @returns {boolean} True if URL shares the same origin, otherwise false\n    */\n    return function isURLSameOrigin(requestURL) {\n      var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n      return (parsed.protocol === originURL.protocol &&\n            parsed.host === originURL.host);\n    };\n  })() :\n\n  // Non standard browser envs (web workers, react-native) lack needed support.\n  (function nonStandardBrowserEnv() {\n    return function isURLSameOrigin() {\n      return true;\n    };\n  })()\n);\n","'use strict';\n\n// btoa polyfill for IE<10 courtesy https://github.com/davidchambers/Base64.js\n\nvar chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n\nfunction E() {\n  this.message = 'String contains an invalid character';\n}\nE.prototype = new Error;\nE.prototype.code = 5;\nE.prototype.name = 'InvalidCharacterError';\n\nfunction btoa(input) {\n  var str = String(input);\n  var output = '';\n  for (\n    // initialize result and counter\n    var block, charCode, idx = 0, map = chars;\n    // if the next str index does not exist:\n    //   change the mapping table to \"=\"\n    //   check if d has no fractional digits\n    str.charAt(idx | 0) || (map = '=', idx % 1);\n    // \"8 - idx % 1 * 8\" generates the sequence 2, 4, 6, 8\n    output += map.charAt(63 & block >> 8 - idx % 1 * 8)\n  ) {\n    charCode = str.charCodeAt(idx += 3 / 4);\n    if (charCode > 0xFF) {\n      throw new E();\n    }\n    block = block << 8 | charCode;\n  }\n  return output;\n}\n\nmodule.exports = btoa;\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n  utils.isStandardBrowserEnv() ?\n\n  // Standard browser envs support document.cookie\n  (function standardBrowserEnv() {\n    return {\n      write: function write(name, value, expires, path, domain, secure) {\n        var cookie = [];\n        cookie.push(name + '=' + encodeURIComponent(value));\n\n        if (utils.isNumber(expires)) {\n          cookie.push('expires=' + new Date(expires).toGMTString());\n        }\n\n        if (utils.isString(path)) {\n          cookie.push('path=' + path);\n        }\n\n        if (utils.isString(domain)) {\n          cookie.push('domain=' + domain);\n        }\n\n        if (secure === true) {\n          cookie.push('secure');\n        }\n\n        document.cookie = cookie.join('; ');\n      },\n\n      read: function read(name) {\n        var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n        return (match ? decodeURIComponent(match[3]) : null);\n      },\n\n      remove: function remove(name) {\n        this.write(name, '', Date.now() - 86400000);\n      }\n    };\n  })() :\n\n  // Non standard browser env (web workers, react-native) lack needed support.\n  (function nonStandardBrowserEnv() {\n    return {\n      write: function write() {},\n      read: function read() { return null; },\n      remove: function remove() {}\n    };\n  })()\n);\n","'use strict';\n\nvar utils = require('./../utils');\nvar settle = require('./../core/settle');\nvar buildURL = require('./../helpers/buildURL');\nvar parseHeaders = require('./../helpers/parseHeaders');\nvar isURLSameOrigin = require('./../helpers/isURLSameOrigin');\nvar createError = require('../core/createError');\nvar btoa = (typeof window !== 'undefined' && window.btoa && window.btoa.bind(window)) || require('./../helpers/btoa');\n\nmodule.exports = function xhrAdapter(config) {\n  return new Promise(function dispatchXhrRequest(resolve, reject) {\n    var requestData = config.data;\n    var requestHeaders = config.headers;\n\n    if (utils.isFormData(requestData)) {\n      delete requestHeaders['Content-Type']; // Let the browser set it\n    }\n\n    var request = new XMLHttpRequest();\n    var loadEvent = 'onreadystatechange';\n    var xDomain = false;\n\n    // For IE 8/9 CORS support\n    // Only supports POST and GET calls and doesn't returns the response headers.\n    // DON'T do this for testing b/c XMLHttpRequest is mocked, not XDomainRequest.\n    if (process.env.NODE_ENV !== 'test' &&\n        typeof window !== 'undefined' &&\n        window.XDomainRequest && !('withCredentials' in request) &&\n        !isURLSameOrigin(config.url)) {\n      request = new window.XDomainRequest();\n      loadEvent = 'onload';\n      xDomain = true;\n      request.onprogress = function handleProgress() {};\n      request.ontimeout = function handleTimeout() {};\n    }\n\n    // HTTP basic authentication\n    if (config.auth) {\n      var username = config.auth.username || '';\n      var password = config.auth.password || '';\n      requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n    }\n\n    request.open(config.method.toUpperCase(), buildURL(config.url, config.params, config.paramsSerializer), true);\n\n    // Set the request timeout in MS\n    request.timeout = config.timeout;\n\n    // Listen for ready state\n    request[loadEvent] = function handleLoad() {\n      if (!request || (request.readyState !== 4 && !xDomain)) {\n        return;\n      }\n\n      // The request errored out and we didn't get a response, this will be\n      // handled by onerror instead\n      // With one exception: request that using file: protocol, most browsers\n      // will return status as 0 even though it's a successful request\n      if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n        return;\n      }\n\n      // Prepare the response\n      var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n      var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;\n      var response = {\n        data: responseData,\n        // IE sends 1223 instead of 204 (https://github.com/mzabriskie/axios/issues/201)\n        status: request.status === 1223 ? 204 : request.status,\n        statusText: request.status === 1223 ? 'No Content' : request.statusText,\n        headers: responseHeaders,\n        config: config,\n        request: request\n      };\n\n      settle(resolve, reject, response);\n\n      // Clean up request\n      request = null;\n    };\n\n    // Handle low level network errors\n    request.onerror = function handleError() {\n      // Real errors are hidden from us by the browser\n      // onerror should only fire if it's a network error\n      reject(createError('Network Error', config, null, request));\n\n      // Clean up request\n      request = null;\n    };\n\n    // Handle timeout\n    request.ontimeout = function handleTimeout() {\n      reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED',\n        request));\n\n      // Clean up request\n      request = null;\n    };\n\n    // Add xsrf header\n    // This is only done if running in a standard browser environment.\n    // Specifically not if we're in a web worker, or react-native.\n    if (utils.isStandardBrowserEnv()) {\n      var cookies = require('./../helpers/cookies');\n\n      // Add xsrf header\n      var xsrfValue = (config.withCredentials || isURLSameOrigin(config.url)) && config.xsrfCookieName ?\n          cookies.read(config.xsrfCookieName) :\n          undefined;\n\n      if (xsrfValue) {\n        requestHeaders[config.xsrfHeaderName] = xsrfValue;\n      }\n    }\n\n    // Add headers to the request\n    if ('setRequestHeader' in request) {\n      utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n        if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n          // Remove Content-Type if data is undefined\n          delete requestHeaders[key];\n        } else {\n          // Otherwise add header to the request\n          request.setRequestHeader(key, val);\n        }\n      });\n    }\n\n    // Add withCredentials to request if needed\n    if (config.withCredentials) {\n      request.withCredentials = true;\n    }\n\n    // Add responseType to request if needed\n    if (config.responseType) {\n      try {\n        request.responseType = config.responseType;\n      } catch (e) {\n        // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2.\n        // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function.\n        if (config.responseType !== 'json') {\n          throw e;\n        }\n      }\n    }\n\n    // Handle progress if needed\n    if (typeof config.onDownloadProgress === 'function') {\n      request.addEventListener('progress', config.onDownloadProgress);\n    }\n\n    // Not all browsers support upload events\n    if (typeof config.onUploadProgress === 'function' && request.upload) {\n      request.upload.addEventListener('progress', config.onUploadProgress);\n    }\n\n    if (config.cancelToken) {\n      // Handle cancellation\n      config.cancelToken.promise.then(function onCanceled(cancel) {\n        if (!request) {\n          return;\n        }\n\n        request.abort();\n        reject(cancel);\n        // Clean up request\n        request = null;\n      });\n    }\n\n    if (requestData === undefined) {\n      requestData = null;\n    }\n\n    // Send the request\n    request.send(requestData);\n  });\n};\n","'use strict';\n\nvar utils = require('./utils');\nvar normalizeHeaderName = require('./helpers/normalizeHeaderName');\n\nvar DEFAULT_CONTENT_TYPE = {\n  'Content-Type': 'application/x-www-form-urlencoded'\n};\n\nfunction setContentTypeIfUnset(headers, value) {\n  if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n    headers['Content-Type'] = value;\n  }\n}\n\nfunction getDefaultAdapter() {\n  var adapter;\n  if (typeof XMLHttpRequest !== 'undefined') {\n    // For browsers use XHR adapter\n    adapter = require('./adapters/xhr');\n  } else if (typeof process !== 'undefined') {\n    // For node use HTTP adapter\n    adapter = require('./adapters/http');\n  }\n  return adapter;\n}\n\nvar defaults = {\n  adapter: getDefaultAdapter(),\n\n  transformRequest: [function transformRequest(data, headers) {\n    normalizeHeaderName(headers, 'Content-Type');\n    if (utils.isFormData(data) ||\n      utils.isArrayBuffer(data) ||\n      utils.isBuffer(data) ||\n      utils.isStream(data) ||\n      utils.isFile(data) ||\n      utils.isBlob(data)\n    ) {\n      return data;\n    }\n    if (utils.isArrayBufferView(data)) {\n      return data.buffer;\n    }\n    if (utils.isURLSearchParams(data)) {\n      setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n      return data.toString();\n    }\n    if (utils.isObject(data)) {\n      setContentTypeIfUnset(headers, 'application/json;charset=utf-8');\n      return JSON.stringify(data);\n    }\n    return data;\n  }],\n\n  transformResponse: [function transformResponse(data) {\n    /*eslint no-param-reassign:0*/\n    if (typeof data === 'string') {\n      try {\n        data = JSON.parse(data);\n      } catch (e) { /* Ignore */ }\n    }\n    return data;\n  }],\n\n  timeout: 0,\n\n  xsrfCookieName: 'XSRF-TOKEN',\n  xsrfHeaderName: 'X-XSRF-TOKEN',\n\n  maxContentLength: -1,\n\n  validateStatus: function validateStatus(status) {\n    return status >= 200 && status < 300;\n  }\n};\n\ndefaults.headers = {\n  common: {\n    'Accept': 'application/json, text/plain, */*'\n  }\n};\n\nutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n  defaults.headers[method] = {};\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n  defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n});\n\nmodule.exports = defaults;\n","'use strict';\n\nvar utils = require('./../utils');\n\nfunction InterceptorManager() {\n  this.handlers = [];\n}\n\n/**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\nInterceptorManager.prototype.use = function use(fulfilled, rejected) {\n  this.handlers.push({\n    fulfilled: fulfilled,\n    rejected: rejected\n  });\n  return this.handlers.length - 1;\n};\n\n/**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n */\nInterceptorManager.prototype.eject = function eject(id) {\n  if (this.handlers[id]) {\n    this.handlers[id] = null;\n  }\n};\n\n/**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n */\nInterceptorManager.prototype.forEach = function forEach(fn) {\n  utils.forEach(this.handlers, function forEachHandler(h) {\n    if (h !== null) {\n      fn(h);\n    }\n  });\n};\n\nmodule.exports = InterceptorManager;\n","'use strict';\n\nvar utils = require('./../utils');\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n  /*eslint no-param-reassign:0*/\n  utils.forEach(fns, function transform(fn) {\n    data = fn(data, headers);\n  });\n\n  return data;\n};\n","'use strict';\n\nmodule.exports = function isCancel(value) {\n  return !!(value && value.__CANCEL__);\n};\n","'use strict';\n\nvar utils = require('./../utils');\nvar transformData = require('./transformData');\nvar isCancel = require('../cancel/isCancel');\nvar defaults = require('../defaults');\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nfunction throwIfCancellationRequested(config) {\n  if (config.cancelToken) {\n    config.cancelToken.throwIfRequested();\n  }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n * @returns {Promise} The Promise to be fulfilled\n */\nmodule.exports = function dispatchRequest(config) {\n  throwIfCancellationRequested(config);\n\n  // Ensure headers exist\n  config.headers = config.headers || {};\n\n  // Transform request data\n  config.data = transformData(\n    config.data,\n    config.headers,\n    config.transformRequest\n  );\n\n  // Flatten headers\n  config.headers = utils.merge(\n    config.headers.common || {},\n    config.headers[config.method] || {},\n    config.headers || {}\n  );\n\n  utils.forEach(\n    ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n    function cleanHeaderConfig(method) {\n      delete config.headers[method];\n    }\n  );\n\n  var adapter = config.adapter || defaults.adapter;\n\n  return adapter(config).then(function onAdapterResolution(response) {\n    throwIfCancellationRequested(config);\n\n    // Transform response data\n    response.data = transformData(\n      response.data,\n      response.headers,\n      config.transformResponse\n    );\n\n    return response;\n  }, function onAdapterRejection(reason) {\n    if (!isCancel(reason)) {\n      throwIfCancellationRequested(config);\n\n      // Transform response data\n      if (reason && reason.response) {\n        reason.response.data = transformData(\n          reason.response.data,\n          reason.response.headers,\n          config.transformResponse\n        );\n      }\n    }\n\n    return Promise.reject(reason);\n  });\n};\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nmodule.exports = function isAbsoluteURL(url) {\n  // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n  // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n  // by any combination of letters, digits, plus, period, or hyphen.\n  return /^([a-z][a-z\\d\\+\\-\\.]*:)?\\/\\//i.test(url);\n};\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n * @returns {string} The combined URL\n */\nmodule.exports = function combineURLs(baseURL, relativeURL) {\n  return relativeURL\n    ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n    : baseURL;\n};\n","'use strict';\n\nvar defaults = require('./../defaults');\nvar utils = require('./../utils');\nvar InterceptorManager = require('./InterceptorManager');\nvar dispatchRequest = require('./dispatchRequest');\nvar isAbsoluteURL = require('./../helpers/isAbsoluteURL');\nvar combineURLs = require('./../helpers/combineURLs');\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n */\nfunction Axios(instanceConfig) {\n  this.defaults = instanceConfig;\n  this.interceptors = {\n    request: new InterceptorManager(),\n    response: new InterceptorManager()\n  };\n}\n\n/**\n * Dispatch a request\n *\n * @param {Object} config The config specific for this request (merged with this.defaults)\n */\nAxios.prototype.request = function request(config) {\n  /*eslint no-param-reassign:0*/\n  // Allow for axios('example/url'[, config]) a la fetch API\n  if (typeof config === 'string') {\n    config = utils.merge({\n      url: arguments[0]\n    }, arguments[1]);\n  }\n\n  config = utils.merge(defaults, this.defaults, { method: 'get' }, config);\n  config.method = config.method.toLowerCase();\n\n  // Support baseURL config\n  if (config.baseURL && !isAbsoluteURL(config.url)) {\n    config.url = combineURLs(config.baseURL, config.url);\n  }\n\n  // Hook up interceptors middleware\n  var chain = [dispatchRequest, undefined];\n  var promise = Promise.resolve(config);\n\n  this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n    chain.unshift(interceptor.fulfilled, interceptor.rejected);\n  });\n\n  this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n    chain.push(interceptor.fulfilled, interceptor.rejected);\n  });\n\n  while (chain.length) {\n    promise = promise.then(chain.shift(), chain.shift());\n  }\n\n  return promise;\n};\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n  /*eslint func-names:0*/\n  Axios.prototype[method] = function(url, config) {\n    return this.request(utils.merge(config || {}, {\n      method: method,\n      url: url\n    }));\n  };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n  /*eslint func-names:0*/\n  Axios.prototype[method] = function(url, data, config) {\n    return this.request(utils.merge(config || {}, {\n      method: method,\n      url: url,\n      data: data\n    }));\n  };\n});\n\nmodule.exports = Axios;\n","'use strict';\n\n/**\n * A `Cancel` is an object that is thrown when an operation is canceled.\n *\n * @class\n * @param {string=} message The message.\n */\nfunction Cancel(message) {\n  this.message = message;\n}\n\nCancel.prototype.toString = function toString() {\n  return 'Cancel' + (this.message ? ': ' + this.message : '');\n};\n\nCancel.prototype.__CANCEL__ = true;\n\nmodule.exports = Cancel;\n","'use strict';\n\nvar Cancel = require('./Cancel');\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @class\n * @param {Function} executor The executor function.\n */\nfunction CancelToken(executor) {\n  if (typeof executor !== 'function') {\n    throw new TypeError('executor must be a function.');\n  }\n\n  var resolvePromise;\n  this.promise = new Promise(function promiseExecutor(resolve) {\n    resolvePromise = resolve;\n  });\n\n  var token = this;\n  executor(function cancel(message) {\n    if (token.reason) {\n      // Cancellation has already been requested\n      return;\n    }\n\n    token.reason = new Cancel(message);\n    resolvePromise(token.reason);\n  });\n}\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n  if (this.reason) {\n    throw this.reason;\n  }\n};\n\n/**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\nCancelToken.source = function source() {\n  var cancel;\n  var token = new CancelToken(function executor(c) {\n    cancel = c;\n  });\n  return {\n    token: token,\n    cancel: cancel\n  };\n};\n\nmodule.exports = CancelToken;\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n *  ```js\n *  function f(x, y, z) {}\n *  var args = [1, 2, 3];\n *  f.apply(null, args);\n *  ```\n *\n * With `spread` this example can be re-written.\n *\n *  ```js\n *  spread(function(x, y, z) {})([1, 2, 3]);\n *  ```\n *\n * @param {Function} callback\n * @returns {Function}\n */\nmodule.exports = function spread(callback) {\n  return function wrap(arr) {\n    return callback.apply(null, arr);\n  };\n};\n","'use strict';\n\nvar utils = require('./utils');\nvar bind = require('./helpers/bind');\nvar Axios = require('./core/Axios');\nvar defaults = require('./defaults');\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n * @return {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n  var context = new Axios(defaultConfig);\n  var instance = bind(Axios.prototype.request, context);\n\n  // Copy axios.prototype to instance\n  utils.extend(instance, Axios.prototype, context);\n\n  // Copy context to instance\n  utils.extend(instance, context);\n\n  return instance;\n}\n\n// Create the default instance to be exported\nvar axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Factory for creating new instances\naxios.create = function create(instanceConfig) {\n  return createInstance(utils.merge(defaults, instanceConfig));\n};\n\n// Expose Cancel & CancelToken\naxios.Cancel = require('./cancel/Cancel');\naxios.CancelToken = require('./cancel/CancelToken');\naxios.isCancel = require('./cancel/isCancel');\n\n// Expose all/spread\naxios.all = function all(promises) {\n  return Promise.all(promises);\n};\naxios.spread = require('./helpers/spread');\n\nmodule.exports = axios;\n\n// Allow use of default import syntax in TypeScript\nmodule.exports.default = axios;\n","module.exports = require('./lib/axios');","// most Object methods by ES6 should accept primitives\nvar $export = require('./_export');\nvar core = require('./_core');\nvar fails = require('./_fails');\nmodule.exports = function (KEY, exec) {\n  var fn = (core.Object || {})[KEY] || Object[KEY];\n  var exp = {};\n  exp[KEY] = exec(fn);\n  $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp);\n};\n","// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)\nvar toIObject = require('./_to-iobject');\nvar $getOwnPropertyDescriptor = require('./_object-gopd').f;\n\nrequire('./_object-sap')('getOwnPropertyDescriptor', function () {\n  return function getOwnPropertyDescriptor(it, key) {\n    return $getOwnPropertyDescriptor(toIObject(it), key);\n  };\n});\n","require('../../modules/es6.object.get-own-property-descriptor');\nvar $Object = require('../../modules/_core').Object;\nmodule.exports = function getOwnPropertyDescriptor(it, key) {\n  return $Object.getOwnPropertyDescriptor(it, key);\n};\n","module.exports = { \"default\": require(\"core-js/library/fn/object/get-own-property-descriptor\"), __esModule: true };","/*\n\n  Javascript State Machine Library - https://github.com/jakesgordon/javascript-state-machine\n\n  Copyright (c) 2012, 2013, 2014, 2015, Jake Gordon and contributors\n  Released under the MIT license - https://github.com/jakesgordon/javascript-state-machine/blob/master/LICENSE\n\n*/\n\n(function () {\n\n  var StateMachine = {\n\n    //---------------------------------------------------------------------------\n\n    VERSION: \"2.4.0\",\n\n    //---------------------------------------------------------------------------\n\n    Result: {\n      SUCCEEDED:    1, // the event transitioned successfully from one state to another\n      NOTRANSITION: 2, // the event was successfull but no state transition was necessary\n      CANCELLED:    3, // the event was cancelled by the caller in a beforeEvent callback\n      PENDING:      4  // the event is asynchronous and the caller is in control of when the transition occurs\n    },\n\n    Error: {\n      INVALID_TRANSITION: 100, // caller tried to fire an event that was innapropriate in the current state\n      PENDING_TRANSITION: 200, // caller tried to fire an event while an async transition was still pending\n      INVALID_CALLBACK:   300 // caller provided callback function threw an exception\n    },\n\n    WILDCARD: '*',\n    ASYNC: 'async',\n\n    //---------------------------------------------------------------------------\n\n    create: function(cfg, target) {\n\n      var initial      = (typeof cfg.initial == 'string') ? { state: cfg.initial } : cfg.initial; // allow for a simple string, or an object with { state: 'foo', event: 'setup', defer: true|false }\n      var terminal     = cfg.terminal || cfg['final'];\n      var fsm          = target || cfg.target  || {};\n      var events       = cfg.events || [];\n      var callbacks    = cfg.callbacks || {};\n      var map          = {}; // track state transitions allowed for an event { event: { from: [ to ] } }\n      var transitions  = {}; // track events allowed from a state            { state: [ event ] }\n\n      var add = function(e) {\n        var from = Array.isArray(e.from) ? e.from : (e.from ? [e.from] : [StateMachine.WILDCARD]); // allow 'wildcard' transition if 'from' is not specified\n        map[e.name] = map[e.name] || {};\n        for (var n = 0 ; n < from.length ; n++) {\n          transitions[from[n]] = transitions[from[n]] || [];\n          transitions[from[n]].push(e.name);\n\n          map[e.name][from[n]] = e.to || from[n]; // allow no-op transition if 'to' is not specified\n        }\n        if (e.to)\n          transitions[e.to] = transitions[e.to] || [];\n      };\n\n      if (initial) {\n        initial.event = initial.event || 'startup';\n        add({ name: initial.event, from: 'none', to: initial.state });\n      }\n\n      for(var n = 0 ; n < events.length ; n++)\n        add(events[n]);\n\n      for(var name in map) {\n        if (map.hasOwnProperty(name))\n          fsm[name] = StateMachine.buildEvent(name, map[name]);\n      }\n\n      for(var name in callbacks) {\n        if (callbacks.hasOwnProperty(name))\n          fsm[name] = callbacks[name]\n      }\n\n      fsm.current     = 'none';\n      fsm.is          = function(state) { return Array.isArray(state) ? (state.indexOf(this.current) >= 0) : (this.current === state); };\n      fsm.can         = function(event) { return !this.transition && (map[event] !== undefined) && (map[event].hasOwnProperty(this.current) || map[event].hasOwnProperty(StateMachine.WILDCARD)); }\n      fsm.cannot      = function(event) { return !this.can(event); };\n      fsm.transitions = function()      { return (transitions[this.current] || []).concat(transitions[StateMachine.WILDCARD] || []); };\n      fsm.isFinished  = function()      { return this.is(terminal); };\n      fsm.error       = cfg.error || function(name, from, to, args, error, msg, e) { throw e || msg; }; // default behavior when something unexpected happens is to throw an exception, but caller can override this behavior if desired (see github issue #3 and #17)\n      fsm.states      = function() { return Object.keys(transitions).sort() };\n\n      if (initial && !initial.defer)\n        fsm[initial.event]();\n\n      return fsm;\n\n    },\n\n    //===========================================================================\n\n    doCallback: function(fsm, func, name, from, to, args) {\n      if (func) {\n        try {\n          return func.apply(fsm, [name, from, to].concat(args));\n        }\n        catch(e) {\n          return fsm.error(name, from, to, args, StateMachine.Error.INVALID_CALLBACK, \"an exception occurred in a caller-provided callback function\", e);\n        }\n      }\n    },\n\n    beforeAnyEvent:  function(fsm, name, from, to, args) { return StateMachine.doCallback(fsm, fsm['onbeforeevent'],                       name, from, to, args); },\n    afterAnyEvent:   function(fsm, name, from, to, args) { return StateMachine.doCallback(fsm, fsm['onafterevent'] || fsm['onevent'],      name, from, to, args); },\n    leaveAnyState:   function(fsm, name, from, to, args) { return StateMachine.doCallback(fsm, fsm['onleavestate'],                        name, from, to, args); },\n    enterAnyState:   function(fsm, name, from, to, args) { return StateMachine.doCallback(fsm, fsm['onenterstate'] || fsm['onstate'],      name, from, to, args); },\n    changeState:     function(fsm, name, from, to, args) { return StateMachine.doCallback(fsm, fsm['onchangestate'],                       name, from, to, args); },\n\n    beforeThisEvent: function(fsm, name, from, to, args) { return StateMachine.doCallback(fsm, fsm['onbefore' + name],                     name, from, to, args); },\n    afterThisEvent:  function(fsm, name, from, to, args) { return StateMachine.doCallback(fsm, fsm['onafter'  + name] || fsm['on' + name], name, from, to, args); },\n    leaveThisState:  function(fsm, name, from, to, args) { return StateMachine.doCallback(fsm, fsm['onleave'  + from],                     name, from, to, args); },\n    enterThisState:  function(fsm, name, from, to, args) { return StateMachine.doCallback(fsm, fsm['onenter'  + to]   || fsm['on' + to],   name, from, to, args); },\n\n    beforeEvent: function(fsm, name, from, to, args) {\n      if ((false === StateMachine.beforeThisEvent(fsm, name, from, to, args)) ||\n          (false === StateMachine.beforeAnyEvent( fsm, name, from, to, args)))\n        return false;\n    },\n\n    afterEvent: function(fsm, name, from, to, args) {\n      StateMachine.afterThisEvent(fsm, name, from, to, args);\n      StateMachine.afterAnyEvent( fsm, name, from, to, args);\n    },\n\n    leaveState: function(fsm, name, from, to, args) {\n      var specific = StateMachine.leaveThisState(fsm, name, from, to, args),\n          general  = StateMachine.leaveAnyState( fsm, name, from, to, args);\n      if ((false === specific) || (false === general))\n        return false;\n      else if ((StateMachine.ASYNC === specific) || (StateMachine.ASYNC === general))\n        return StateMachine.ASYNC;\n    },\n\n    enterState: function(fsm, name, from, to, args) {\n      StateMachine.enterThisState(fsm, name, from, to, args);\n      StateMachine.enterAnyState( fsm, name, from, to, args);\n    },\n\n    //===========================================================================\n\n    buildEvent: function(name, map) {\n      return function() {\n\n        var from  = this.current;\n        var to    = map[from] || (map[StateMachine.WILDCARD] != StateMachine.WILDCARD ? map[StateMachine.WILDCARD] : from) || from;\n        var args  = Array.prototype.slice.call(arguments); // turn arguments into pure array\n\n        if (this.transition)\n          return this.error(name, from, to, args, StateMachine.Error.PENDING_TRANSITION, \"event \" + name + \" inappropriate because previous transition did not complete\");\n\n        if (this.cannot(name))\n          return this.error(name, from, to, args, StateMachine.Error.INVALID_TRANSITION, \"event \" + name + \" inappropriate in current state \" + this.current);\n\n        if (false === StateMachine.beforeEvent(this, name, from, to, args))\n          return StateMachine.Result.CANCELLED;\n\n        if (from === to) {\n          StateMachine.afterEvent(this, name, from, to, args);\n          return StateMachine.Result.NOTRANSITION;\n        }\n\n        // prepare a transition method for use EITHER lower down, or by caller if they want an async transition (indicated by an ASYNC return value from leaveState)\n        var fsm = this;\n        this.transition = function() {\n          fsm.transition = null; // this method should only ever be called once\n          fsm.current = to;\n          StateMachine.enterState( fsm, name, from, to, args);\n          StateMachine.changeState(fsm, name, from, to, args);\n          StateMachine.afterEvent( fsm, name, from, to, args);\n          return StateMachine.Result.SUCCEEDED;\n        };\n        this.transition.cancel = function() { // provide a way for caller to cancel async transition if desired (issue #22)\n          fsm.transition = null;\n          StateMachine.afterEvent(fsm, name, from, to, args);\n        }\n\n        var leave = StateMachine.leaveState(this, name, from, to, args);\n        if (false === leave) {\n          this.transition = null;\n          return StateMachine.Result.CANCELLED;\n        }\n        else if (StateMachine.ASYNC === leave) {\n          return StateMachine.Result.PENDING;\n        }\n        else {\n          if (this.transition) // need to check in case user manually called transition() but forgot to return StateMachine.ASYNC\n            return this.transition();\n        }\n\n      };\n    }\n\n  }; // StateMachine\n\n  //===========================================================================\n\n  //======\n  // NODE\n  //======\n  if (typeof exports !== 'undefined') {\n    if (typeof module !== 'undefined' && module.exports) {\n      exports = module.exports = StateMachine;\n    }\n    exports.StateMachine = StateMachine;\n  }\n  //============\n  // AMD/REQUIRE\n  //============\n  else if (typeof define === 'function' && define.amd) {\n    define(function(require) { return StateMachine; });\n  }\n  //========\n  // BROWSER\n  //========\n  else if (typeof window !== 'undefined') {\n    window.StateMachine = StateMachine;\n  }\n  //===========\n  // WEB WORKER\n  //===========\n  else if (typeof self !== 'undefined') {\n    self.StateMachine = StateMachine;\n  }\n\n}());\n","\"use strict\";\n\nexports.__esModule = true;\n\nvar _assign = require(\"../core-js/object/assign\");\n\nvar _assign2 = _interopRequireDefault(_assign);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _assign2.default || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\n};","'use strict';\nvar redefineAll = require('./_redefine-all');\nvar getWeak = require('./_meta').getWeak;\nvar anObject = require('./_an-object');\nvar isObject = require('./_is-object');\nvar anInstance = require('./_an-instance');\nvar forOf = require('./_for-of');\nvar createArrayMethod = require('./_array-methods');\nvar $has = require('./_has');\nvar validate = require('./_validate-collection');\nvar arrayFind = createArrayMethod(5);\nvar arrayFindIndex = createArrayMethod(6);\nvar id = 0;\n\n// fallback for uncaught frozen keys\nvar uncaughtFrozenStore = function (that) {\n  return that._l || (that._l = new UncaughtFrozenStore());\n};\nvar UncaughtFrozenStore = function () {\n  this.a = [];\n};\nvar findUncaughtFrozen = function (store, key) {\n  return arrayFind(store.a, function (it) {\n    return it[0] === key;\n  });\n};\nUncaughtFrozenStore.prototype = {\n  get: function (key) {\n    var entry = findUncaughtFrozen(this, key);\n    if (entry) return entry[1];\n  },\n  has: function (key) {\n    return !!findUncaughtFrozen(this, key);\n  },\n  set: function (key, value) {\n    var entry = findUncaughtFrozen(this, key);\n    if (entry) entry[1] = value;\n    else this.a.push([key, value]);\n  },\n  'delete': function (key) {\n    var index = arrayFindIndex(this.a, function (it) {\n      return it[0] === key;\n    });\n    if (~index) this.a.splice(index, 1);\n    return !!~index;\n  }\n};\n\nmodule.exports = {\n  getConstructor: function (wrapper, NAME, IS_MAP, ADDER) {\n    var C = wrapper(function (that, iterable) {\n      anInstance(that, C, NAME, '_i');\n      that._t = NAME;      // collection type\n      that._i = id++;      // collection id\n      that._l = undefined; // leak store for uncaught frozen objects\n      if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);\n    });\n    redefineAll(C.prototype, {\n      // 23.3.3.2 WeakMap.prototype.delete(key)\n      // 23.4.3.3 WeakSet.prototype.delete(value)\n      'delete': function (key) {\n        if (!isObject(key)) return false;\n        var data = getWeak(key);\n        if (data === true) return uncaughtFrozenStore(validate(this, NAME))['delete'](key);\n        return data && $has(data, this._i) && delete data[this._i];\n      },\n      // 23.3.3.4 WeakMap.prototype.has(key)\n      // 23.4.3.4 WeakSet.prototype.has(value)\n      has: function has(key) {\n        if (!isObject(key)) return false;\n        var data = getWeak(key);\n        if (data === true) return uncaughtFrozenStore(validate(this, NAME)).has(key);\n        return data && $has(data, this._i);\n      }\n    });\n    return C;\n  },\n  def: function (that, key, value) {\n    var data = getWeak(anObject(key), true);\n    if (data === true) uncaughtFrozenStore(that).set(key, value);\n    else data[that._i] = value;\n    return that;\n  },\n  ufstore: uncaughtFrozenStore\n};\n","'use strict';\nvar each = require('./_array-methods')(0);\nvar redefine = require('./_redefine');\nvar meta = require('./_meta');\nvar assign = require('./_object-assign');\nvar weak = require('./_collection-weak');\nvar isObject = require('./_is-object');\nvar fails = require('./_fails');\nvar validate = require('./_validate-collection');\nvar WEAK_MAP = 'WeakMap';\nvar getWeak = meta.getWeak;\nvar isExtensible = Object.isExtensible;\nvar uncaughtFrozenStore = weak.ufstore;\nvar tmp = {};\nvar InternalMap;\n\nvar wrapper = function (get) {\n  return function WeakMap() {\n    return get(this, arguments.length > 0 ? arguments[0] : undefined);\n  };\n};\n\nvar methods = {\n  // 23.3.3.3 WeakMap.prototype.get(key)\n  get: function get(key) {\n    if (isObject(key)) {\n      var data = getWeak(key);\n      if (data === true) return uncaughtFrozenStore(validate(this, WEAK_MAP)).get(key);\n      return data ? data[this._i] : undefined;\n    }\n  },\n  // 23.3.3.5 WeakMap.prototype.set(key, value)\n  set: function set(key, value) {\n    return weak.def(validate(this, WEAK_MAP), key, value);\n  }\n};\n\n// 23.3 WeakMap Objects\nvar $WeakMap = module.exports = require('./_collection')(WEAK_MAP, wrapper, methods, weak, true, true);\n\n// IE11 WeakMap frozen keys fix\nif (fails(function () { return new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7; })) {\n  InternalMap = weak.getConstructor(wrapper, WEAK_MAP);\n  assign(InternalMap.prototype, methods);\n  meta.NEED = true;\n  each(['delete', 'has', 'get', 'set'], function (key) {\n    var proto = $WeakMap.prototype;\n    var method = proto[key];\n    redefine(proto, key, function (a, b) {\n      // store frozen objects on internal weakmap shim\n      if (isObject(a) && !isExtensible(a)) {\n        if (!this._f) this._f = new InternalMap();\n        var result = this._f[key](a, b);\n        return key == 'set' ? this : result;\n      // store all the rest on native weakmap\n      } return method.call(this, a, b);\n    });\n  });\n}\n","// https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.of\nrequire('./_set-collection-of')('WeakMap');\n","// https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.from\nrequire('./_set-collection-from')('WeakMap');\n","require('../modules/es6.object.to-string');\nrequire('../modules/web.dom.iterable');\nrequire('../modules/es6.weak-map');\nrequire('../modules/es7.weak-map.of');\nrequire('../modules/es7.weak-map.from');\nmodule.exports = require('../modules/_core').WeakMap;\n","module.exports = { \"default\": require(\"core-js/library/fn/weak-map\"), __esModule: true };","var $export = require('./_export');\n// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)\n$export($export.S + $export.F * !require('./_descriptors'), 'Object', { defineProperty: require('./_object-dp').f });\n","require('../../modules/es6.object.define-property');\nvar $Object = require('../../modules/_core').Object;\nmodule.exports = function defineProperty(it, key, desc) {\n  return $Object.defineProperty(it, key, desc);\n};\n","module.exports = { \"default\": require(\"core-js/library/fn/object/define-property\"), __esModule: true };","\"use strict\";\n\nexports.__esModule = true;\n\nvar _defineProperty = require(\"../core-js/object/define-property\");\n\nvar _defineProperty2 = _interopRequireDefault(_defineProperty);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function (obj, key, value) {\n  if (key in obj) {\n    (0, _defineProperty2.default)(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n};","// 19.1.2.14 Object.keys(O)\nvar toObject = require('./_to-object');\nvar $keys = require('./_object-keys');\n\nrequire('./_object-sap')('keys', function () {\n  return function keys(it) {\n    return $keys(toObject(it));\n  };\n});\n","require('../../modules/es6.object.keys');\nmodule.exports = require('../../modules/_core').Object.keys;\n","module.exports = { \"default\": require(\"core-js/library/fn/object/keys\"), __esModule: true };","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n  var isOwn = hasOwnProperty.call(value, symToStringTag),\n      tag = value[symToStringTag];\n\n  try {\n    value[symToStringTag] = undefined;\n    var unmasked = true;\n  } catch (e) {}\n\n  var result = nativeObjectToString.call(value);\n  if (unmasked) {\n    if (isOwn) {\n      value[symToStringTag] = tag;\n    } else {\n      delete value[symToStringTag];\n    }\n  }\n  return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n  return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","var Symbol = require('./_Symbol'),\n    getRawTag = require('./_getRawTag'),\n    objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n    undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n  if (value == null) {\n    return value === undefined ? undefinedTag : nullTag;\n  }\n  return (symToStringTag && symToStringTag in Object(value))\n    ? getRawTag(value)\n    : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n  return function(arg) {\n    return func(transform(arg));\n  };\n}\n\nmodule.exports = overArg;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n  return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseGetTag = require('./_baseGetTag'),\n    getPrototype = require('./_getPrototype'),\n    isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n    objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n *   this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n  if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n    return false;\n  }\n  var proto = getPrototype(value);\n  if (proto === null) {\n    return true;\n  }\n  var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n  return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n    funcToString.call(Ctor) == objectCtorString;\n}\n\nmodule.exports = isPlainObject;\n","/* eslint-disable */\nexport default typeof global !== 'undefined' ? global :\n  typeof window !== 'undefined' ? window : {};\n","\"use strict\";\n\nexports.__esModule = true;\n\nvar _defineProperty = require(\"../core-js/object/define-property\");\n\nvar _defineProperty2 = _interopRequireDefault(_defineProperty);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function () {\n  function defineProperties(target, props) {\n    for (var i = 0; i < props.length; i++) {\n      var descriptor = props[i];\n      descriptor.enumerable = descriptor.enumerable || false;\n      descriptor.configurable = true;\n      if (\"value\" in descriptor) descriptor.writable = true;\n      (0, _defineProperty2.default)(target, descriptor.key, descriptor);\n    }\n  }\n\n  return function (Constructor, protoProps, staticProps) {\n    if (protoProps) defineProperties(Constructor.prototype, protoProps);\n    if (staticProps) defineProperties(Constructor, staticProps);\n    return Constructor;\n  };\n}();","import d from 'debug';\n\nconst EXPIRED = Symbol('expired');\nconst debug = d('LC:Expirable');\nexport default class Expirable {\n  constructor(value, ttl) {\n    this._value = value;\n    if (typeof ttl === 'number') {\n      this.expiredAt = Date.now() + ttl;\n    }\n  }\n\n  get value() {\n    const expired = this.expiredAt && this.expiredAt < Date.now();\n    if (expired) debug(`expired: ${this._value}`);\n    return expired ? EXPIRED : this._value;\n  }\n}\nExpirable.EXPIRED = EXPIRED;\n","import d from 'debug';\nimport Expirable from './expirable';\n\nconst debug = d('LC:Cache');\nexport default class Cache {\n  constructor(name = 'anonymous') {\n    this.name = name;\n    this._map = {};\n  }\n\n  get(key) {\n    const cache = this._map[key];\n    if (cache) {\n      const value = cache.value;\n      if (value !== Expirable.EXPIRED) {\n        debug('[%s] hit: %s %O', this.name, key, value);\n        return value;\n      }\n      delete this._map[key];\n    }\n    debug(`[${this.name}] missed: ${key}`);\n    return null;\n  }\n\n  set(key, value, ttl) {\n    debug('[%s] set: %s %O %d', this.name, key, value, ttl);\n    this._map[key] = new Expirable(value, ttl);\n  }\n}\n","import isPlainObject from 'lodash/isPlainObject';\nimport global from './global';\n\nexport { global };\n\nexport const tryAll = (promiseConstructors) => {\n  const promise = new Promise(promiseConstructors[0]);\n  if (promiseConstructors.length === 1) {\n    return promise;\n  }\n  return promise.catch(() => tryAll(promiseConstructors.slice(1)));\n};\n\nexport const tap = interceptor => value => ((interceptor(value), value));\n\nexport { default as Expirable } from './expirable';\nexport { default as Cache } from './cache';\n\nexport const decodeDate = (date) => {\n  if (!date) return date;\n  if (typeof date === 'string') {\n    return new Date(date);\n  }\n  if (date.__type === 'Date' && date.iso) {\n    return new Date(date.iso);\n  }\n  // Long\n  if (typeof date.toNumber === 'function') {\n    return new Date(date.toNumber());\n  }\n  return date;\n};\n\nexport const keyRemap = (keymap, obj) =>\n  Object.keys(obj).reduce((newObj, key) => {\n    const newKey = keymap[key] || key;\n    return Object.assign(newObj, {\n      [newKey]: obj[key],\n    });\n  }, {});\n\nexport const isIE10 = (\n  global.navigator &&\n  global.navigator.userAgent &&\n  global.navigator.userAgent.indexOf('MSIE 10.') !== -1\n);\n\n/* eslint-disable no-proto */\nexport const getStaticProperty = (klass, property) =>\n  (klass[property] || (klass.__proto__ ? getStaticProperty(klass.__proto__, property) : undefined));\n/* eslint-enable no-proto */\n\nexport const union = (a, b) => Array.from(new Set([...a, ...b]));\nexport const difference = (a, b) => Array.from(\n  (bSet => new Set(a.filter(x => !bSet.has(x))))(new Set(b))\n);\n\nconst map = new WeakMap();\n\n// protected property helper\nexport const internal = (object) => {\n  if (!map.has(object)) {\n    map.set(object, {});\n  }\n  return map.get(object);\n};\n\n// debug utility\nconst removeNull = (obj) => {\n  if (!isPlainObject(obj)) return obj;\n  const object = Object.assign({}, obj);\n  // eslint-disable-next-line no-restricted-syntax\n  for (const prop in object) {\n    if ({}.hasOwnProperty.call(object, prop)) {\n      const value = object[prop];\n      if (value === null) {\n        delete object[prop];\n      } else {\n        object[prop] = removeNull(value);\n      }\n    }\n  }\n  return object;\n};\nexport const trim = message => removeNull(JSON.parse(JSON.stringify(message)));\n\nexport const ensureArray = (target) => {\n  if (Array.isArray(target)) {\n    return target;\n  }\n  if (target === undefined || target === null) {\n    return [];\n  }\n  return [target];\n};\n\nexport const setValue = (target, key, value) => {\n  // '.' is not allowed in Class keys, escaping is not in concern now.\n  const segs = key.split('.');\n  const lastSeg = segs.pop();\n  let currentTarget = target;\n  segs.forEach((seg) => {\n    if (currentTarget[seg] === undefined) currentTarget[seg] = {};\n    currentTarget = currentTarget[seg];\n  });\n  currentTarget[lastSeg] = value;\n  return target;\n};\n\n// eslint-disable-next-line no-undef\nexport const isWeapp = typeof wx === 'object' && typeof wx.connectSocket === 'function';\n\n// throttle decorator\nexport const throttle = wait => (target, property, descriptor) => {\n  const callback = descriptor.value;\n  // very naive, internal use only\n  if (callback.length) {\n    throw new Error('throttled function should not accept any arguments');\n  }\n  return {\n    ...descriptor,\n    value() {\n      let {\n        throttleMeta,\n      } = internal(this);\n      if (!throttleMeta) throttleMeta = internal(this).throttleMeta = {};\n      let {\n        [property]: propertyMeta,\n      } = throttleMeta;\n      if (!propertyMeta) propertyMeta = throttleMeta[property] = {};\n      const {\n        previouseTimestamp = 0,\n        timeout,\n      } = propertyMeta;\n      const now = Date.now();\n      const remainingTime = wait - (now - previouseTimestamp);\n      if (remainingTime <= 0) {\n        throttleMeta[property].previouseTimestamp = now;\n        callback.apply(this);\n      } else if (!timeout) {\n        propertyMeta.timeout = setTimeout(() => {\n          propertyMeta.previouseTimestamp = Date.now();\n          delete propertyMeta.timeout;\n          callback.apply(this);\n        }, remainingTime);\n      }\n    },\n  };\n};\n","import { global } from '../utils';\n\nconst WebSocket = global.WebSocket || global.MozWebSocket;\nexport default WebSocket;\n","// WebSocket with auto reconnecting feature, backup endpoint and EventEmitter interface.\n\nimport d from 'debug';\nimport EventEmitter from 'eventemitter3';\nimport StateMachine from 'javascript-state-machine';\n\nimport WebSocket from 'ws';\n\nimport { tryAll, global } from './utils';\n\nconst debug = d('LC:WebSocketPlus');\n\nconst HEARTBEAT_TIME = 180000;\nconst TIMEOUT_TIME = 380000;\n\nconst DEFAULT_RETRY_STRATEGY = attempt => Math.min(1000 * Math.pow(2, attempt), 300000);\n\nconst requireConnected = (target, name, descriptor) =>\n  Object.assign({}, descriptor, {\n    value: function requireConnectedWrapper(...args) {\n      if (!this.is('connected')) {\n        const currentState = this.current;\n        console.warn(`${name} should not be called when the connection is ${currentState}`);\n        if (this.is('disconnected') || this.is('reconnecting')) {\n          console.warn('disconnect and reconnect event should be handled to avoid such calls.');\n        }\n        throw new Error('Connection unavailable');\n      }\n      return descriptor.value.call(this, ...args);\n    },\n  });\n\nclass WebSocketPlus extends EventEmitter {\n  constructor(getUrls, protocol) {\n    if (typeof WebSocket === 'undefined') {\n      throw new Error('WebSocket is undefined. Polyfill is required in this runtime.');\n    }\n    super();\n    if (typeof getUrls !== 'function') {\n      this._getUrls = () => Promise.resolve(getUrls);\n    } else {\n      this._getUrls = getUrls;\n    }\n    this._protocol = protocol;\n    this.init();\n    this._createWs(this._getUrls, this._protocol).then(\n      () => {\n        this.__postponeTimeoutTimer = this._postponeTimeoutTimer.bind(this);\n        if (global.addEventListener) {\n          this.__pause = () => this.pause();\n          this.__resume = () => this.resume();\n          global.addEventListener('offline', this.__pause);\n          global.addEventListener('online', this.__resume);\n        }\n        this.open();\n      }\n    ).catch(this.throw.bind(this));\n  }\n\n  _createWs(getUrls, protocol) {\n    return getUrls().then((wsUrls) => {\n      let urls = wsUrls;\n      if (!(urls instanceof Array)) {\n        urls = [urls];\n      }\n      return tryAll(\n        urls.map(url => (resolve, reject) => {\n          debug(`connect [${url}] ${protocol}`);\n          const ws = protocol ? new WebSocket(\n            url, protocol\n          ) : new WebSocket(url);\n          ws.binaryType = this.binaryType || 'arraybuffer';\n          ws.onopen = () => resolve(ws);\n          ws.onerror = ws.onclose = (error) => {\n            if (error instanceof Error) {\n              return reject(error);\n            }\n            // in browser, error event is useless\n            return reject(new Error(`Failed to connect [${url}]`));\n          };\n        })\n      ).then((ws) => {\n        this._ws = ws;\n        this._ws.onclose = this._handleClose.bind(this);\n        this._ws.onmessage = this._handleMessage.bind(this);\n        return ws;\n      });\n    });\n  }\n  _destroyWs() {\n    const ws = this._ws;\n    if (!ws) return;\n    ws.onopen = ws.onclose = ws.onerror = ws.onmessage = null;\n    this._ws = null;\n    ws.close();\n  }\n\n  // eslint-disable-next-line class-methods-use-this\n  onbeforeevent(event, from, to, ...payload) {\n    debug(`${event}: ${from} -> ${to}`, ...payload);\n  }\n  onopen() {\n    this.emit('open');\n  }\n  onconnected() {\n    this._startConnectionKeeper();\n  }\n  onleaveconnected(event, from, to) {\n    this._stopConnectionKeeper();\n    this._destroyWs();\n    if (to === 'offline' || to === 'disconnected') {\n      this.emit('disconnect');\n    }\n  }\n  onpause() {\n    this.emit('offline');\n  }\n  onbeforeresume() {\n    this.emit('online');\n  }\n  onreconnect() {\n    this.emit('reconnect');\n  }\n  ondisconnected(event, from, to, attempt = 0) {\n    const delay = DEFAULT_RETRY_STRATEGY.call(null, attempt);\n    debug(`schedule attempt=${attempt} delay=${delay}`);\n    this.emit('schedule', attempt, delay);\n    if (this.__scheduledRetry) {\n      clearTimeout(this.__scheduledRetry);\n    }\n    this.__scheduledRetry = setTimeout(() => {\n      if (this.is('disconnected')) {\n        this.retry(attempt);\n      }\n    }, delay);\n  }\n  onretry(event, from, to, attempt = 0) {\n    this.emit('retry', attempt);\n    this._createWs(this._getUrls, this._protocol).then(\n      () => (this.can('reconnect') ? this.reconnect() : this._destroyWs()),\n      () => this.can('fail') && this.fail(attempt + 1)\n    );\n  }\n  onerror(event, from, to, error) {\n    this.emit('error', error);\n  }\n  onclose() {\n    if (global.removeEventListener) {\n      if (this.__pause) global.removeEventListener('offline', this.__pause);\n      if (this.__resume) global.removeEventListener('online', this.__resume);\n    }\n  }\n\n  // jsdoc-ignore-start\n  @requireConnected\n  // jsdoc-ignore-end\n  _ping() {\n    debug('ping');\n    try {\n      this.ping();\n    } catch (error) {\n      console.warn(`websocket ping error: ${error.message}`);\n    }\n  }\n  ping() {\n    if (this._ws.ping) {\n      this._ws.ping();\n    } else {\n      console.warn(`The WebSocket implement does not support sending ping frame.\n        Override ping method to use application defined ping/pong mechanism.`);\n    }\n  }\n\n  _postponeTimeoutTimer() {\n    debug('_postponeTimeoutTimer');\n    this._clearTimeoutTimers();\n    this._timeoutTimer = setTimeout(() => {\n      debug('timeout');\n      this.disconnect();\n    }, TIMEOUT_TIME);\n  }\n  _clearTimeoutTimers() {\n    if (this._timeoutTimer) {\n      clearTimeout(this._timeoutTimer);\n    }\n  }\n  _startConnectionKeeper() {\n    debug('start connection keeper');\n    this._heartbeatTimer = setInterval(this._ping.bind(this), HEARTBEAT_TIME);\n    const addListener = this._ws.addListener || this._ws.addEventListener;\n    addListener.call(this._ws, 'message', this.__postponeTimeoutTimer);\n    addListener.call(this._ws, 'pong', this.__postponeTimeoutTimer);\n    this._postponeTimeoutTimer();\n  }\n  _stopConnectionKeeper() {\n    debug('stop connection keeper');\n    // websockets/ws#489\n    const removeListener = this._ws.removeListener || this._ws.removeEventListener;\n    removeListener.call(this._ws, 'message', this.__postponeTimeoutTimer);\n    removeListener.call(this._ws, 'pong', this.__postponeTimeoutTimer);\n    this._clearTimeoutTimers();\n    if (this._heartbeatTimer) {\n      clearInterval(this._heartbeatTimer);\n    }\n  }\n\n  _handleClose(event) {\n    debug(`ws closed [${event.code}] ${event.reason}`);\n    // socket closed manually, ignore close event.\n    if (this.isFinished()) return;\n    this.handleClose(event);\n  }\n  handleClose() {\n    // reconnect\n    this.disconnect();\n  }\n\n  // jsdoc-ignore-start\n  @requireConnected\n  // jsdoc-ignore-end\n  send(data) {\n    debug('send', data);\n    this._ws.send(data);\n  }\n\n  _handleMessage(event) {\n    debug('message', event.data);\n    this.handleMessage(event.data);\n  }\n  handleMessage(message) {\n    this.emit('message', message);\n  }\n}\n\nStateMachine.create({\n  target: WebSocketPlus.prototype,\n  initial: {\n    state: 'initialized',\n    event: 'init',\n    defer: true,\n  },\n  terminal: 'closed',\n  events: [{\n    name: 'open',\n    from: 'initialized',\n    to: 'connected',\n  }, {\n    name: 'disconnect',\n    from: 'connected',\n    to: 'disconnected',\n  }, {\n    name: 'retry',\n    from: 'disconnected',\n    to: 'reconnecting',\n  }, {\n    name: 'fail',\n    from: 'reconnecting',\n    to: 'disconnected',\n  }, {\n    name: 'reconnect',\n    from: 'reconnecting',\n    to: 'connected',\n  }, {\n    name: 'pause',\n    from: ['connected', 'disconnected', 'reconnecting'],\n    to: 'offline',\n  }, {\n  }, {\n    name: 'resume',\n    from: 'offline',\n    to: 'disconnected',\n  }, {\n    name: 'close',\n    from: ['connected', 'disconnected', 'reconnecting', 'offline'],\n    to: 'closed',\n  }, {\n    name: 'throw',\n    from: '*',\n    to: 'error',\n  }],\n});\n\nexport default WebSocketPlus;\n","// 19.1.2.5 Object.freeze(O)\nvar isObject = require('./_is-object');\nvar meta = require('./_meta').onFreeze;\n\nrequire('./_object-sap')('freeze', function ($freeze) {\n  return function freeze(it) {\n    return $freeze && isObject(it) ? $freeze(meta(it)) : it;\n  };\n});\n","require('../../modules/es6.object.freeze');\nmodule.exports = require('../../modules/_core').Object.freeze;\n","module.exports = { \"default\": require(\"core-js/library/fn/object/freeze\"), __esModule: true };","export const error = Object.freeze({\n  1000: {\n    name: 'CLOSE_NORMAL',\n  },\n  1006: {\n    name: 'CLOSE_ABNORMAL',\n  },\n  4100: {\n    name: 'APP_NOT_AVAILABLE',\n    message: 'App not exists or realtime message service is disabled.',\n  },\n  4103: {\n    name: 'INVALID_LOGIN',\n    message: 'Malformed clientId.',\n  },\n  4105: {\n    name: 'SESSION_REQUIRED',\n    message: 'Message sent before session opened. ',\n  },\n  4107: {\n    name: 'READ_TIMEOUT',\n  },\n  4108: {\n    name: 'LOGIN_TIMEOUT',\n  },\n  4109: {\n    name: 'FRAME_TOO_LONG',\n  },\n  4110: {\n    name: 'INVALID_ORIGIN',\n    message: 'Access denied by domain whitelist.',\n  },\n  4111: {\n    name: 'SESSION_CONFLICT',\n  },\n  4112: {\n    name: 'SESSION_TOKEN_EXPIRED',\n  },\n  4200: {\n    name: 'INTERNAL_ERROR',\n    message: 'Internal error, please contact LeanCloud for support.',\n  },\n  4201: {\n    name: 'SEND_MESSAGE_TIMEOUT',\n  },\n  4302: {\n    name: 'CONVERSATION_SIGNATURE_FAILED',\n  },\n  4303: {\n    name: 'CONVERSATION_NOT_FOUND',\n  },\n  4304: {\n    name: 'CONVERSATION_FULL',\n  },\n  4305: {\n    name: 'CONVERSATION_REJECTED_BY_APP',\n  },\n  4306: {\n    name: 'CONVERSATION_UPDATE_FAILED',\n  },\n  4307: {\n    name: 'CONVERSATION_READ_ONLY',\n  },\n  4308: {\n    name: 'CONVERSATION_NOT_ALLOWED',\n  },\n  4401: {\n    name: 'INVALID_MESSAGING_TARGET',\n  },\n  4402: {\n    name: 'MESSAGE_REJECTED_BY_APP',\n  },\n});\n\nexport const ErrorCode = Object.freeze(\n  Object.keys(error).reduce((result, code) => Object.assign(result, {\n    [error[code].name]: Number(code),\n  }), {})\n);\n\nexport const createError = (errorMessage) => {\n  const {\n    code, reason, appCode, detail,\n  } = errorMessage;\n  let message = reason || detail;\n  if (!message && error[code]) {\n    message = error[code].message || error[code].name;\n  }\n  if (!message) {\n    message = `Unknow Error: ${code}`;\n  }\n  const err = new Error(message);\n  return Object.assign(err, {\n    code, appCode, detail,\n  });\n};\n","import d from 'debug';\nimport WebSocketPlus from './websocket-plus';\nimport { createError } from './error';\nimport { GenericCommand, CommandType } from '../proto/message';\nimport { trim, isWeapp } from './utils';\n\nconst debug = d('LC:Connection');\n\nconst COMMAND_TIMEOUT = 20000;\n\nexport default class Connection extends WebSocketPlus {\n  constructor(getUrl, { format, version }) {\n    debug('initializing Connection');\n    const protocolString = `lc.${format}.${version}`;\n    if (!isWeapp) {\n      super(getUrl, protocolString);\n    } else {\n      super(getUrl().then(urls => urls.map(url =>\n        `${url}${url.indexOf('?') === -1 ? '?' : '&'}subprotocol=${encodeURIComponent(protocolString)}`\n      )));\n    }\n    this._protocalFormat = format;\n    this._commands = {};\n    this._serialId = 0;\n  }\n\n  send(command, waitingForRespond = true) {\n    let serialId;\n    if (waitingForRespond) {\n      this._serialId += 1;\n      serialId = this._serialId;\n      command.i = serialId; // eslint-disable-line no-param-reassign\n    }\n    debug('↑ %O sent', trim(command));\n\n    let message;\n    if (this._protocalFormat === 'proto2base64') {\n      message = command.toBase64();\n    } else if (command.toArrayBuffer) {\n      message = command.toArrayBuffer();\n    }\n    if (!message) {\n      throw new TypeError(`${command} is not a GenericCommand`);\n    }\n\n    super.send(message);\n\n    if (!waitingForRespond) {\n      return Promise.resolve();\n    }\n    return new Promise((resolve, reject) => {\n      this._commands[serialId] = {\n        resolve,\n        reject,\n      };\n      setTimeout(\n        () => {\n          if (this._commands[serialId]) {\n            debug('✗ %O timeout', trim(command));\n            reject(new Error('Command Timeout.'));\n            delete this._commands[serialId];\n          }\n        },\n        COMMAND_TIMEOUT\n      );\n    });\n  }\n\n  handleMessage(msg) {\n    let message;\n    try {\n      message = GenericCommand.decode(msg);\n      debug('↓ %O received', trim(message));\n    } catch (e) {\n      console.warn('Decode message failed', msg);\n    }\n    this.emit('allmessage', message);\n    const serialId = message.i;\n    if (serialId) {\n      if (this._commands[serialId]) {\n        if (message.cmd === CommandType.error) {\n          this\n            ._commands[serialId]\n            .reject(createError(message.errorMessage));\n        } else {\n          this\n            ._commands[serialId]\n            .resolve(message);\n        }\n        delete this._commands[serialId];\n      } else {\n        console.warn(`Unexpected command received with serialId [${serialId}],\n         which have timed out or never been requested.`);\n      }\n    } else if (message.cmd === CommandType.error) {\n      this.emit('error', createError(message.errorMessage));\n    } else {\n      this.emit('message', message);\n    }\n  }\n\n  ping() {\n    return this.send(new GenericCommand({\n      cmd: CommandType.echo,\n    })).catch(error => debug('ping failed:', error));\n  }\n}\n","/* eslint-disable max-len */\n\n/**\n * 插件接口\n *\n * 

\n * 插件是由一个或多个扩展点组成的字典。SDK 的扩展点可以分为两类:\n *

\n * 第一类扩展点是类实例化之后的回调,包括 RealtimeIMClientConversation。这些扩展点可以通过一个同步的 Decorator 进行扩展。Decorator 接受一个对应的实例并对其进行一些操作。\n * 特别的,由于注册自定义消息类这个需求特别的常用,额外定义一个 messageClasses 扩展点来做这件事情。\n *

\n * 第二类扩展点是在某些事件处理前、后可以注入逻辑的点。\n * 其中 beforeMessageParseafterMessageParse 可以通过一个异步的 Middleware 进行扩展。Middleware 接受一个对象,返回一个同类型对象或同类型对象的 Promise。\n * beforeMessageDispatch 可以通过返回一个 boolean 类型的 shouldDispatch 值来控制是否要继续派发收到的消息。\n *

\n * 如果使用了多个插件,这些 hook 会按照插件数组的顺序依次执行。前一个 Middleware 的返回值会作为参数传给后一个 Middleware。\n *\n * @interface Plugin\n * @since 3.1.0\n */\n\n/* eslint-enable max-len */\n\n/**\n * 插件名称,用于在日志中显示异常的插件\n *\n * @name Plugin.name\n * @type string\n */\n\n/**\n * 插件注册的消息类型\n *\n * @name Plugin.messageClasses\n * @type AVMessage[]\n */\n\n/**\n * 在 Realtime 实例化后对其进行修饰。\n *

\n * 接受一个参数为 Realtime 实例。\n *\n * @name Plugin.onRealtimeCreate\n * @type Function\n */\n\n/**\n * 在 IMClient 实例化后对其进行修饰。\n *

\n * 接受一个参数为 IMClient 实例。\n *\n * @name Plugin.onIMClientCreate\n * @type Function\n */\n\n/**\n * 在 Conversation 实例化后对其进行修饰。\n *

\n * 接受一个参数为 Conversation 实例。\n * 需要注意的是,该扩展点并不是在 {@link IMClient#createConversation} 方法创建成功后调用的 hook,\n * 而是所有的 Conversation 实例化的时候(包括但不限于 query 时)调用的 hook。\n *\n * @name Plugin.onConversationCreate\n * @type Function\n */\n\n/**\n * 在对消息进行 parse 之前,对原始消息进行修改。\n *

\n * 接受一个参数为原始消息,是某个消息 JSON 化(message.toJSON())的返回值,一般是一个 JSON 对象。\n * 该方法需要返回一个 JSON 对象。如果这个结果是异步得到的,也可以返回一个 Promise(fulfilled with a JSON)。\n *\n * @name Plugin.beforeMessageParse\n * @type Function\n */\n\n/**\n * 在对消息进行 parse 之后,对消息实例进行修改。\n *

\n * 接受一个参数为消息实例,一般是一个已注册的 Message 类或其子类的实例。\n * 该方法需要返回一个同类型的消息实例。如果这个结果是异步得到的,也可以返回一个 Promise。\n *\n * @name Plugin.afterMessageParse\n * @type Function\n */\n\n/**\n * 在收到消息之后,派发消息之前,控制是否派发这条消息。\n *

\n * 接受参数为 message 与 conversation。\n * 该方法需要返回 boolean 类型的值,如果返回 false 则 SDK 不再派发这条消息,后续的 beforeMessageDispatch 也不会执行。\n * 如果这个结果是异步得到的,也可以返回一个 Promise。\n *\n * @name Plugin.beforeMessageDispatch\n * @type Function\n * @since 3.4.0\n */\n\nimport { ensureArray, tap } from './utils';\n\nconst checkType = middleware => (param) => {\n const { constructor } = param;\n return Promise.resolve(param).then(middleware).then(tap((result) => {\n if (result === undefined || result === null) {\n // eslint-disable-next-line max-len\n return console.warn(`Middleware[${middleware._pluginName || 'anonymous plugin'}:${middleware.name || 'anonymous middleware'}] param/return types not match. It returns ${result} while a ${param.constructor.name} expected.`);\n }\n if (!(result instanceof constructor)) {\n // eslint-disable-next-line max-len\n return console.warn(`Middleware[${middleware._pluginName || 'anonymous plugin'}:${middleware.name || 'anonymous middleware'}] param/return types not match. It returns a ${result.constructor.name} while a ${param.constructor.name} expected.`);\n }\n return 0;\n }));\n};\n\nexport const applyDecorators = (decorators, target) => {\n if (decorators) {\n decorators.forEach((decorator) => {\n try {\n decorator(target);\n } catch (error) {\n if (decorator._pluginName) {\n error.message += `[${decorator._pluginName}]`;\n }\n throw error;\n }\n });\n }\n};\n\nexport const applyMiddlewares = middlewares => target =>\n ensureArray(middlewares).reduce(\n (previousPromise, middleware) => previousPromise\n .then(checkType(middleware))\n .catch((error) => {\n if (middleware._pluginName) {\n // eslint-disable-next-line no-param-reassign\n error.message += `[${middleware._pluginName}]`;\n }\n throw error;\n }),\n Promise.resolve(target)\n );\n\nexport const applyDispatcher = (dispatchers, payload) =>\n ensureArray(dispatchers).reduce(\n (resultPromise, dispatcher) => resultPromise.then(shouldDispatch =>\n (shouldDispatch === false ? false : dispatcher(...payload))\n ).catch((error) => {\n if (dispatcher._pluginName) {\n // eslint-disable-next-line no-param-reassign\n error.message += `[${dispatcher._pluginName}]`;\n }\n throw error;\n }), Promise.resolve(true)\n );\n","import d from 'debug';\nimport EventEmitter from 'eventemitter3';\nimport axios from 'axios';\nimport Connection from './connection';\nimport { ErrorCode, createError } from './error';\nimport { tap, Cache, trim, internal, ensureArray, isWeapp } from './utils';\nimport { applyDecorators, applyDispatcher } from './plugin';\n\nconst debug = d('LC:Realtime');\n\nconst pushRouterCache = new Cache('push-router');\n\nexport default class Realtime extends EventEmitter {\n /**\n * @extends EventEmitter\n * @param {Object} options\n * @param {String} options.appId\n * @param {String} [options.region='cn'] 节点 id\n * @param {Boolean} [options.pushOfflineMessages=false] 启用推送离线消息模式(默认为发送未读消息通知模式)\n * @param {Boolean} [options.noBinary=false] 设置 WebSocket 使用字符串格式收发消息(默认为二进制格式)。\n * 适用于 WebSocket 实现不支持二进制数据格式的情况(如 React Native)\n * @param {Boolean} [options.ssl=true] 使用 wss 进行连接\n * @param {Plugin[]} [options.plugins] 加载插件(since 3.1.0)\n */\n constructor(options) {\n debug('initializing Realtime');\n super();\n if (typeof options.appId !== 'string') {\n throw new TypeError(`appId [${options.appId}] is not a string`);\n }\n this._options = Object.assign({\n appId: undefined,\n region: 'cn',\n pushOfflineMessages: false,\n noBinary: isWeapp,\n ssl: true,\n server: process.env.SERVER,\n }, options);\n this._cache = new Cache('endpoints');\n internal(this).clients = new Set();\n this._plugins = [\n ...ensureArray(Realtime.__preRegisteredPlugins),\n ...ensureArray(options.plugins),\n ].reduce(\n (result, plugin) => {\n // eslint-disable-next-line no-restricted-syntax\n for (const hook in plugin) {\n if ({}.hasOwnProperty.call(plugin, hook) && hook !== 'name') {\n if (plugin.name) {\n ensureArray(plugin[hook]).forEach((value) => {\n // eslint-disable-next-line no-param-reassign\n value._pluginName = plugin.name;\n });\n }\n // eslint-disable-next-line no-param-reassign\n result[hook] = ensureArray(result[hook]).concat(plugin[hook]);\n }\n }\n return result;\n },\n {}\n );\n // onRealtimeCreate hook\n applyDecorators(this._plugins.onRealtimeCreate, this);\n }\n\n _open() {\n if (this._openPromise) return this._openPromise;\n\n let format = 'protobuf2';\n if (this._options.noBinary) {\n // 不发送 binary data,fallback to base64 string\n format = 'proto2base64';\n }\n let version = 3;\n if (this._options.pushOfflineMessages) {\n // 不推送离线消息,而是发送对话的未读通知\n version = 1;\n }\n const protocol = {\n format,\n version,\n };\n this._openPromise = new Promise((resolve, reject) => {\n debug('No connection established, create a new one.');\n const connection = new Connection(\n () => this._getEndpoints(this._options),\n protocol\n );\n connection.on('open', () => resolve(connection));\n connection.on('error', reject);\n connection.on('message', this._dispatchCommand.bind(this));\n /**\n * 连接断开。\n * 连接断开可能是因为 SDK 进入了离线状态(see {@link Realtime#event:offline}),或长时间没有收到服务器心跳。\n * 连接断开后所有的网络操作都会失败,请在连接断开后禁用相关的 UI 元素。\n * @event Realtime#disconnect\n */\n /**\n * 计划在一段时间后尝试重新连接\n * @event Realtime#schedule\n * @param {Number} attempt 尝试重连的次数\n * @param {Number} delay 延迟的毫秒数\n */\n /**\n * 正在尝试重新连接\n * @event Realtime#retry\n * @param {Number} attempt 尝试重连的次数\n */\n /**\n * 连接恢复正常。\n * 请重新启用在 {@link Realtime#event:disconnect} 事件中禁用的相关 UI 元素\n * @event Realtime#reconnect\n */\n\n /**\n * 客户端连接断开\n * @event IMClient#disconnect\n * @see Realtime#event:disconnect\n * @since 3.2.0\n */\n /**\n * 计划在一段时间后尝试重新连接\n * @event IMClient#schedule\n * @param {Number} attempt 尝试重连的次数\n * @param {Number} delay 延迟的毫秒数\n * @since 3.2.0\n */\n /**\n * 正在尝试重新连接\n * @event IMClient#retry\n * @param {Number} attempt 尝试重连的次数\n * @since 3.2.0\n */\n\n /**\n * 客户端进入离线状态。\n * 这通常意味着网络已断开,或者 {@link Realtime#pause} 被调用\n * @event Realtime#offline\n * @since 3.4.0\n */\n /**\n * 客户端恢复在线状态\n * 这通常意味着网络已恢复,或者 {@link Realtime#resume} 被调用\n * @event Realtime#online\n * @since 3.4.0\n */\n /**\n * 进入离线状态。\n * 这通常意味着网络已断开,或者 {@link Realtime#pause} 被调用\n * @event IMClient#offline\n * @since 3.4.0\n */\n /**\n * 恢复在线状态\n * 这通常意味着网络已恢复,或者 {@link Realtime#resume} 被调用\n * @event IMClient#online\n * @since 3.4.0\n */\n\n // event proxy\n ['disconnect', 'reconnect', 'retry', 'schedule', 'offline', 'online'].forEach(\n event => connection.on(event, (...payload) => {\n debug(`${event} event emitted. %O`, payload);\n this.emit(event, ...payload);\n if (event !== 'reconnect') {\n internal(this).clients.forEach((client) => {\n client.emit(event, ...payload);\n });\n }\n })\n );\n // override handleClose\n connection.handleClose = function handleClose(event) {\n const isFatal = [\n ErrorCode.APP_NOT_AVAILABLE,\n ErrorCode.INVALID_LOGIN,\n ErrorCode.INVALID_ORIGIN,\n ].some(errorCode => errorCode === event.code);\n if (isFatal) {\n // in these cases, SDK should throw.\n this.throw(createError(event));\n } else {\n // reconnect\n this.disconnect();\n }\n };\n internal(this).connection = connection;\n }).catch((error) => {\n delete this._openPromise;\n throw error;\n });\n\n return this._openPromise;\n }\n\n _getEndpoints(options) {\n return Promise.resolve(\n this._cache.get('endpoints') ||\n this\n .constructor\n ._fetchEndpointsInfo(options)\n .then(\n tap(info => this._cache.set('endpoints', info, info.ttl * 1000))\n )\n ).then((info) => {\n debug('endpoint info: %O', info);\n return [info.server, info.secondary];\n });\n }\n\n static _fetchPushRouter({ appId, region }) {\n debug('fetch router');\n switch (region) {\n case 'cn': {\n const cachedPushRouter = pushRouterCache.get(appId);\n if (cachedPushRouter) {\n return Promise.resolve(cachedPushRouter);\n }\n return axios\n .get('https://app-router.leancloud.cn/1/route', {\n params: {\n appId,\n },\n timeout: 20000,\n })\n .then(\n res => res.data\n )\n .then(tap(debug))\n .then(\n (route) => {\n const pushRouter = route.push_router_server;\n if (!pushRouter) {\n throw new Error('push router not exists');\n }\n let ttl = route.ttl;\n if (typeof ttl !== 'number') {\n ttl = 3600;\n }\n pushRouterCache.set(appId, pushRouter, ttl * 1000);\n return pushRouter;\n }\n )\n .catch(() => 'router-g0-push.leancloud.cn');\n }\n case 'us':\n return Promise.resolve('router-a0-push.leancloud.cn');\n default:\n throw new Error(`Region [${region}] is not supported.`);\n }\n }\n\n static _fetchEndpointsInfo({ appId, region, ssl, server }) {\n debug('fetch endpoint info');\n return this._fetchPushRouter({ appId, region })\n .then(tap(debug))\n .then(router =>\n axios.get(`https://${router}/v1/route`, {\n params: {\n appId,\n secure: ssl,\n features: isWeapp ? 'wechat' : undefined,\n server,\n _t: Date.now(),\n },\n timeout: 20000,\n }).then(\n res => res.data\n ).then(tap(debug))\n );\n }\n\n _close() {\n if (this._openPromise) {\n this._openPromise.then(connection => connection.close());\n }\n delete this._openPromise;\n }\n\n /**\n * 手动进行重连。\n * SDK 在网络出现异常时会自动按照一定的时间间隔尝试重连,调用该方法会立即尝试重连并重置重连尝试计数器。\n * 只能在 `schedule` 事件之后,`retry` 事件之前调用,如果当前网络正常或者正在进行重连,调用该方法会抛异常。\n */\n retry() {\n const connection = internal(this).connection;\n if (!connection) {\n throw new Error('no connection established');\n }\n if (connection.cannot('retry')) {\n throw new Error(\n `retrying not allowed when not disconnected. the connection is now ${connection.current}`\n );\n }\n return connection.retry();\n }\n /**\n * 暂停,使 SDK 进入离线状态。\n * 你可以在网络断开、应用进入后台等时刻调用该方法让 SDK 进入离线状态,离线状态下不会尝试重连。\n * 在浏览器中 SDK 会自动监听网络变化,因此无需手动调用该方法。\n *\n * @since 3.4.0\n * @see Realtime#event:offline\n */\n pause() {\n // 这个方法常常在网络断开、进入后台时被调用,此时 connection 可能没有建立或者已经 close。\n // 因此不像 retry,这个方法应该尽可能 loose\n const connection = internal(this).connection;\n if (!connection) return;\n if (connection.can('pause')) connection.pause();\n }\n /**\n * 恢复在线状态。\n * 你可以在网络恢复、应用回到前台等时刻调用该方法让 SDK 恢复在线状态,恢复在线状态后 SDK 会开始尝试重连。\n *\n * @since 3.4.0\n * @see Realtime#event:online\n */\n resume() {\n // 与 pause 一样,这个方法应该尽可能 loose\n const connection = internal(this).connection;\n if (!connection) return;\n if (connection.can('resume')) connection.resume();\n }\n\n _register(client) {\n internal(this).clients.add(client);\n }\n\n _deregister(client) {\n internal(this).clients.delete(client);\n if (internal(this).clients.size === 0) {\n this._close();\n }\n }\n\n _dispatchCommand(command) {\n return applyDispatcher(this._plugins.beforeCommandDispatch, [command, this])\n .then((shouldDispatch) => {\n // no plugin handled this command\n if (shouldDispatch) return debug('[WARN] Unexpected message received: %O', trim(command));\n return false;\n });\n }\n}\n","// Unique ID creation requires a high quality random # generator. In the\n// browser this is a little complicated due to unknown quality of Math.random()\n// and inconsistent support for the `crypto` API. We do the best we can via\n// feature-detection\nvar rng;\n\nvar crypto = global.crypto || global.msCrypto; // for IE 11\nif (crypto && crypto.getRandomValues) {\n // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto\n var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef\n rng = function whatwgRNG() {\n crypto.getRandomValues(rnds8);\n return rnds8;\n };\n}\n\nif (!rng) {\n // Math.random()-based (RNG)\n //\n // If all else fails, use Math.random(). It's fast, but is of unspecified\n // quality.\n var rnds = new Array(16);\n rng = function() {\n for (var i = 0, r; i < 16; i++) {\n if ((i & 0x03) === 0) r = Math.random() * 0x100000000;\n rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;\n }\n\n return rnds;\n };\n}\n\nmodule.exports = rng;\n","/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nvar byteToHex = [];\nfor (var i = 0; i < 256; ++i) {\n byteToHex[i] = (i + 0x100).toString(16).substr(1);\n}\n\nfunction bytesToUuid(buf, offset) {\n var i = offset || 0;\n var bth = byteToHex;\n return bth[buf[i++]] + bth[buf[i++]] +\n bth[buf[i++]] + bth[buf[i++]] + '-' +\n bth[buf[i++]] + bth[buf[i++]] + '-' +\n bth[buf[i++]] + bth[buf[i++]] + '-' +\n bth[buf[i++]] + bth[buf[i++]] + '-' +\n bth[buf[i++]] + bth[buf[i++]] +\n bth[buf[i++]] + bth[buf[i++]] +\n bth[buf[i++]] + bth[buf[i++]];\n}\n\nmodule.exports = bytesToUuid;\n","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\nfunction v4(options, buf, offset) {\n var i = buf && offset || 0;\n\n if (typeof(options) == 'string') {\n buf = options == 'binary' ? new Array(16) : null;\n options = null;\n }\n options = options || {};\n\n var rnds = options.random || (options.rng || rng)();\n\n // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n rnds[6] = (rnds[6] & 0x0f) | 0x40;\n rnds[8] = (rnds[8] & 0x3f) | 0x80;\n\n // Copy bytes to buffer, if provided\n if (buf) {\n for (var ii = 0; ii < 16; ++ii) {\n buf[i + ii] = rnds[ii];\n }\n }\n\n return buf || bytesToUuid(rnds);\n}\n\nmodule.exports = v4;\n","\"use strict\";\n\nexports.__esModule = true;\n\nexports.default = function (obj, keys) {\n var target = {};\n\n for (var i in obj) {\n if (keys.indexOf(i) >= 0) continue;\n if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;\n target[i] = obj[i];\n }\n\n return target;\n};","var classof = require('./_classof');\nvar ITERATOR = require('./_wks')('iterator');\nvar Iterators = require('./_iterators');\nmodule.exports = require('./_core').isIterable = function (it) {\n var O = Object(it);\n return O[ITERATOR] !== undefined\n || '@@iterator' in O\n // eslint-disable-next-line no-prototype-builtins\n || Iterators.hasOwnProperty(classof(O));\n};\n","require('../modules/web.dom.iterable');\nrequire('../modules/es6.string.iterator');\nmodule.exports = require('../modules/core.is-iterable');\n","module.exports = { \"default\": require(\"core-js/library/fn/is-iterable\"), __esModule: true };","var anObject = require('./_an-object');\nvar get = require('./core.get-iterator-method');\nmodule.exports = require('./_core').getIterator = function (it) {\n var iterFn = get(it);\n if (typeof iterFn != 'function') throw TypeError(it + ' is not iterable!');\n return anObject(iterFn.call(it));\n};\n","require('../modules/web.dom.iterable');\nrequire('../modules/es6.string.iterator');\nmodule.exports = require('../modules/core.get-iterator');\n","module.exports = { \"default\": require(\"core-js/library/fn/get-iterator\"), __esModule: true };","\"use strict\";\n\nexports.__esModule = true;\n\nvar _isIterable2 = require(\"../core-js/is-iterable\");\n\nvar _isIterable3 = _interopRequireDefault(_isIterable2);\n\nvar _getIterator2 = require(\"../core-js/get-iterator\");\n\nvar _getIterator3 = _interopRequireDefault(_getIterator2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function () {\n function sliceIterator(arr, i) {\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = (0, _getIterator3.default)(arr), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"]) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n }\n\n return function (arr, i) {\n if (Array.isArray(arr)) {\n return arr;\n } else if ((0, _isIterable3.default)(Object(arr))) {\n return sliceIterator(arr, i);\n } else {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n }\n };\n}();","'use strict';\n// 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined)\nvar $export = require('./_export');\nvar $find = require('./_array-methods')(5);\nvar KEY = 'find';\nvar forced = true;\n// Shouldn't skip holes\nif (KEY in []) Array(1)[KEY](function () { forced = false; });\n$export($export.P + $export.F * forced, 'Array', {\n find: function find(callbackfn /* , that = undefined */) {\n return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\nrequire('./_add-to-unscopables')(KEY);\n","require('../../modules/es6.array.find');\nmodule.exports = require('../../modules/_core').Array.find;\n","module.exports = { \"default\": require(\"core-js/library/fn/array/find\"), __esModule: true };","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var baseKeys = require('./_baseKeys'),\n getTag = require('./_getTag'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isArrayLike = require('./isArrayLike'),\n isBuffer = require('./isBuffer'),\n isPrototype = require('./_isPrototype'),\n isTypedArray = require('./isTypedArray');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n setTag = '[object Set]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if `value` is an empty object, collection, map, or set.\n *\n * Objects are considered empty if they have no own enumerable string keyed\n * properties.\n *\n * Array-like values such as `arguments` objects, arrays, buffers, strings, or\n * jQuery-like collections are considered empty if they have a `length` of `0`.\n * Similarly, maps and sets are considered empty if they have a `size` of `0`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is empty, else `false`.\n * @example\n *\n * _.isEmpty(null);\n * // => true\n *\n * _.isEmpty(true);\n * // => true\n *\n * _.isEmpty(1);\n * // => true\n *\n * _.isEmpty([1, 2, 3]);\n * // => false\n *\n * _.isEmpty({ 'a': 1 });\n * // => false\n */\nfunction isEmpty(value) {\n if (value == null) {\n return true;\n }\n if (isArrayLike(value) &&\n (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||\n isBuffer(value) || isTypedArray(value) || isArguments(value))) {\n return !value.length;\n }\n var tag = getTag(value);\n if (tag == mapTag || tag == setTag) {\n return !value.size;\n }\n if (isPrototype(value)) {\n return !baseKeys(value).length;\n }\n for (var key in value) {\n if (hasOwnProperty.call(value, key)) {\n return false;\n }\n }\n return true;\n}\n\nmodule.exports = isEmpty;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n length = length == null ? MAX_SAFE_INTEGER : length;\n return !!length &&\n (typeof value == 'number' || reIsUint.test(value)) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var copyObject = require('./_copyObject'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\n","var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeysIn;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n","var root = require('./_root');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","var copyObject = require('./_copyObject'),\n getSymbols = require('./_getSymbols');\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nmodule.exports = getSymbolsIn;\n","var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbolsIn = require('./_getSymbolsIn'),\n keysIn = require('./keysIn');\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nmodule.exports = initCloneArray;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n","/**\n * Adds the key-value `pair` to `map`.\n *\n * @private\n * @param {Object} map The map to modify.\n * @param {Array} pair The key-value pair to add.\n * @returns {Object} Returns `map`.\n */\nfunction addMapEntry(map, pair) {\n // Don't return `map.set` because it's not chainable in IE 11.\n map.set(pair[0], pair[1]);\n return map;\n}\n\nmodule.exports = addMapEntry;\n","/**\n * A specialized version of `_.reduce` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the first element of `array` as\n * the initial value.\n * @returns {*} Returns the accumulated value.\n */\nfunction arrayReduce(array, iteratee, accumulator, initAccum) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n if (initAccum && length) {\n accumulator = array[++index];\n }\n while (++index < length) {\n accumulator = iteratee(accumulator, array[index], index, array);\n }\n return accumulator;\n}\n\nmodule.exports = arrayReduce;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n","var addMapEntry = require('./_addMapEntry'),\n arrayReduce = require('./_arrayReduce'),\n mapToArray = require('./_mapToArray');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1;\n\n/**\n * Creates a clone of `map`.\n *\n * @private\n * @param {Object} map The map to clone.\n * @param {Function} cloneFunc The function to clone values.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned map.\n */\nfunction cloneMap(map, isDeep, cloneFunc) {\n var array = isDeep ? cloneFunc(mapToArray(map), CLONE_DEEP_FLAG) : mapToArray(map);\n return arrayReduce(array, addMapEntry, new map.constructor);\n}\n\nmodule.exports = cloneMap;\n","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n","/**\n * Adds `value` to `set`.\n *\n * @private\n * @param {Object} set The set to modify.\n * @param {*} value The value to add.\n * @returns {Object} Returns `set`.\n */\nfunction addSetEntry(set, value) {\n // Don't return `set.add` because it's not chainable in IE 11.\n set.add(value);\n return set;\n}\n\nmodule.exports = addSetEntry;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n","var addSetEntry = require('./_addSetEntry'),\n arrayReduce = require('./_arrayReduce'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1;\n\n/**\n * Creates a clone of `set`.\n *\n * @private\n * @param {Object} set The set to clone.\n * @param {Function} cloneFunc The function to clone values.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned set.\n */\nfunction cloneSet(set, isDeep, cloneFunc) {\n var array = isDeep ? cloneFunc(setToArray(set), CLONE_DEEP_FLAG) : setToArray(set);\n return arrayReduce(array, addSetEntry, new set.constructor);\n}\n\nmodule.exports = cloneSet;\n","var Symbol = require('./_Symbol');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneMap = require('./_cloneMap'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSet = require('./_cloneSet'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {Function} cloneFunc The function to clone values.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, cloneFunc, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return cloneMap(object, isDeep, cloneFunc);\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return cloneSet(object, isDeep, cloneFunc);\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nmodule.exports = initCloneByTag;\n","var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n","var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n","var Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isObject = require('./isObject'),\n keys = require('./keys');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, baseClone, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nmodule.exports = baseClone;\n","var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = cloneDeep;\n","import d from 'debug';\nimport { tap } from './utils';\n\nconst debug = d('LC:SignatureFactoryRunner');\n\nfunction _validateSignature(signatureResult = {}) {\n const {\n signature,\n timestamp,\n nonce,\n } = signatureResult;\n if (typeof signature !== 'string'\n || typeof timestamp !== 'number'\n || typeof nonce !== 'string') {\n throw new Error('malformed signature');\n }\n return {\n signature,\n timestamp,\n nonce,\n };\n}\n\nexport default (signatureFactory, params) =>\n Promise.resolve()\n .then(() => {\n debug(`call signatureFactory with ${params}`);\n return signatureFactory(...params);\n })\n .then(\n tap(signatureResult => debug('sign result %O', signatureResult)),\n (error) => {\n // eslint-disable-next-line no-param-reassign\n error.message = `sign error: ${error.message}`;\n debug(error);\n throw error;\n }\n )\n .then(_validateSignature);\n","import uuid from 'uuid/v4';\n\n\n/**\n * 消息状态枚举\n * @enum {Symbol}\n * @since 3.2.0\n * @memberof module:leancloud-realtime\n */\nconst MessageStatus = {\n /** 初始状态、未知状态 */\n NONE: Symbol('none'),\n /** 正在发送 */\n SENDING: Symbol('sending'),\n /** 已发送 */\n SENT: Symbol('sent'),\n /** 已送达 */\n DELIVERED: Symbol('delivered'),\n /** 发送失败 */\n FAILED: Symbol('failed'),\n};\nObject.freeze(MessageStatus);\n\nconst rMessageStatus = {\n [MessageStatus.NONE]: true,\n [MessageStatus.SENDING]: true,\n [MessageStatus.SENT]: true,\n [MessageStatus.DELIVERED]: true,\n [MessageStatus.READ]: true,\n [MessageStatus.FAILED]: true,\n};\n\nexport { MessageStatus };\nexport default class Message {\n /**\n * @implements AVMessage\n * @param {Object|String} content 消息内容\n */\n constructor(content) {\n Object.assign(this, { content }, {\n /**\n * @type {String}\n * @memberof Message#\n */\n id: uuid(),\n /**\n * 消息所在的 conversation id\n * @memberof Message#\n * @type {String?}\n */\n cid: null,\n /**\n * 消息发送时间\n * @memberof Message#\n * @type {Date}\n */\n timestamp: new Date(),\n /**\n * 消息发送者\n * @memberof Message#\n * @type {String}\n */\n from: undefined,\n /**\n * 标记需要回执\n * @memberof Message#\n * @type {Boolean}\n * @deprecated 指定是否需要送达回执请使用 {@link Conversation#send} 方法的 `options.receipt` 参数。\n */\n needReceipt: false,\n /**\n * 标记暂态消息\n * @memberof Message#\n * @type {Boolean}\n * @deprecated 指定是否作为暂态消息发送请使用 {@link Conversation#send} 方法的 `options.transient` 参数。\n * 请不要将是否为暂态作为区分某些消息的标记,请使用富媒体消息的属性(attributes)或使用自定义消息类型。\n * 该字段将在 v4.0 中移除。\n */\n transient: false,\n /**\n * @var deliveredAt {?Date} 消息送达时间\n * @memberof Message#\n */\n // deliveredAt,\n });\n this._setStatus(MessageStatus.NONE);\n }\n\n /**\n * 设置是否需要送达回执\n * @param {Boolean} needReceipt\n * @return {Message} self\n * @deprecated 请使用 {@link Conversation#send} 方法的 `options.receipt` 选项代替。\n */\n setNeedReceipt(needReceipt) {\n console.warn('DEPRECATION Message#setNeedReceipt: Use Conversation#send with sendOptions.receipt instead.');\n this.needReceipt = needReceipt;\n return this;\n }\n\n /**\n * 设置是否是暂态消息\n * @param {Boolean} transient\n * @return {Message} self\n * @deprecated 请使用 {@link Conversation#send} 方法的 `options.transient` 选项代替。\n */\n setTransient(transient) {\n console.warn('DEPRECATION Message#setTransient: Use Conversation#send with sendOptions.transient instead.');\n this.transient = transient;\n return this;\n }\n\n /**\n * 将当前消息序列化为 JSON 对象\n * @protected\n * @return {Object}\n */\n toJSON() {\n return this.content;\n }\n\n /**\n * 消息状态,值为 {@link module:leancloud-realtime.MessageStatus} 之一\n * @type {Symbol}\n * @readonly\n * @since 3.2.0\n */\n get status() {\n return this._status;\n }\n\n _setStatus(status) {\n if (!rMessageStatus[status]) {\n throw new Error('Invalid message status');\n }\n this._status = status;\n }\n\n /**\n * 消息修改或撤回时间,可以通过比较其与消息的 timestamp 是否相等判断消息是否被修改过或撤回过。\n * @type {Date}\n * @since 3.5.0\n */\n get updatedAt() {\n return this._updatedAt || this.timestamp;\n }\n set updatedAt(value) {\n this._updatedAt = value;\n }\n\n /**\n * 判断给定的内容是否是有效的 Message,\n * 该方法始终返回 true\n * @protected\n * @returns {Boolean}\n * @implements AVMessage.validate\n */\n static validate() {\n return true;\n }\n\n /**\n * 解析处理消息内容\n *

\n   * 如果子类提供了 message,返回该 message\n   * 如果没有提供,将 json 作为 content 实例化一个 Message\n   * @protected\n   * @param  {Object}  json    json 格式的消息内容\n   * @param  {Message} message 子类提供的 message\n   * @return {Message}\n   * @implements AVMessage.parse\n   */\n  static parse(json, message) {\n    return message || new this(json);\n  }\n}\n","/* eslint-disable no-param-reassign */\nimport { getStaticProperty, isIE10 } from '../utils';\n\n// documented in ../index.js\nexport const messageType = (type) => {\n  if (typeof type !== 'number') {\n    throw new TypeError(`${type} is not a Number`);\n  }\n  return (target) => {\n    target.TYPE = type;\n    target.validate = json => (json._lctype === type);\n    target.prototype._getType = () => ({ _lctype: type });\n  };\n};\n\n// documented in ../index.js\nexport const messageField = (fields) => {\n  if (typeof fields !== 'string') {\n    if (!Array.isArray(fields)) {\n      throw new TypeError(`${fields} is not an Array`);\n    } else if (fields.some(value => typeof value !== 'string')) {\n      throw new TypeError('fields contains non-string typed member');\n    }\n  }\n  return (target) => {\n    // IE10 Hack:\n    // static properties in IE10 will not be inherited from super\n    // search for parse method and assign it manually\n    let originalCustomFields = isIE10\n      ? getStaticProperty(target, '_customFields')\n      : target._customFields;\n    originalCustomFields = Array.isArray(originalCustomFields)\n      ? originalCustomFields : [];\n    target._customFields = originalCustomFields.concat(fields);\n  };\n};\n\n// IE10 Hack:\n// static properties in IE10 will not be inherited from super\n// search for parse method and assign it manually\n\nexport const IE10Compatible = (target) => {\n  if (isIE10) {\n    target.parse = getStaticProperty(target, 'parse');\n  }\n};\n","import Message from './message';\nimport { messageField } from './helpers';\nimport { getStaticProperty, isIE10 } from '../utils';\n\n// jsdoc-ignore-start\n@messageField(['_lctext', '_lcattrs'])\n// jsdoc-ignore-end\nexport default class TypedMessage extends Message {\n  /**\n   * 所有内置的富媒体消息均继承自本类\n   * @extends Message\n   */\n  constructor() {\n    super();\n    this._ = {};\n  }\n\n  /**\n   * @type {Number}\n   * @readonly\n   */\n  get type() {\n    return this.constructor.TYPE;\n  }\n\n  /** @type {String} */\n  set text(text) {\n    return this.setText(text);\n  }\n  get text() {\n    return this.getText();\n  }\n\n  /** @type {Object} */\n  set attributes(attributes) {\n    return this.setAttributes(attributes);\n  }\n  get attributes() {\n    return this.getAttributes();\n  }\n\n  /**\n   * 在客户端需要以文本形式展示该消息时显示的文案,\n   * 如 [红包] 新春快乐。\n   * 默认值为消息的 text。\n   * @type {String}\n   * @readonly\n   */\n  get summary() {\n    return this.text;\n  }\n\n  /**\n   * @param {String} text\n   * @return {TypedMessage} self\n   */\n  setText(text) {\n    this._lctext = text;\n    return this;\n  }\n  /**\n   * @return {String}\n   */\n  getText() {\n    return this._lctext;\n  }\n\n  /**\n   * @param {Object} attributes\n   * @return {TypedMessage} self\n   */\n  setAttributes(attributes) {\n    this._lcattrs = attributes;\n    return this;\n  }\n  /**\n   * @return {Object}\n   */\n  getAttributes() {\n    return this._lcattrs;\n  }\n\n  _getCustomFields() {\n    const fields = Array.isArray(this.constructor._customFields)\n      ? this.constructor._customFields : [];\n    return fields.reduce((result, field) => {\n      if (typeof field !== 'string') return result;\n      result[field] = this[field]; // eslint-disable-line no-param-reassign\n      return result;\n    }, {});\n  }\n\n  /* eslint-disable class-methods-use-this */\n  _getType() {\n    throw new Error('not implemented');\n  }\n  /* eslint-enable class-methods-use-this */\n\n  toJSON() {\n    return Object.assign({\n      _lctext: this.getText(),\n      _lcattrs: this.getAttributes(),\n    }, this._getCustomFields(), this._getType());\n  }\n\n  /**\n   * 解析处理消息内容\n   * 
\n   * 为给定的 message 设置 text 与 attributes 属性,返回该 message\n   * 如果子类没有提供 message,new this()\n   * @protected\n   * @param  {Object}  json    json 格式的消息内容\n   * @param  {TypedMessage} message 子类提供的 message\n   * @return {TypedMessage}\n   * @implements AVMessage.parse\n   */\n  static parse(json, message = new this()) {\n    message.content = json; // eslint-disable-line no-param-reassign\n    const customFields = isIE10\n      ? getStaticProperty(message.constructor, '_customFields')\n      : message.constructor._customFields;\n    let fields = Array.isArray(customFields) ? customFields : [];\n    fields = fields.reduce((result, field) => {\n      if (typeof field !== 'string') return result;\n      result[field] = json[field]; // eslint-disable-line no-param-reassign\n      return result;\n    }, {});\n    Object.assign(message, fields);\n    return super.parse(json, message);\n  }\n}\n","import TypedMessage from './typed-message';\nimport { messageType } from './helpers';\n\n// jsdoc-ignore-start\n@messageType(-127)\n// jsdoc-ignore-end\n/**\n * 已撤回类型消息,当消息被撤回时,SDK 会使用该类型的消息替代原始消息\n * @extends TypedMessage\n */\nclass RecalledMessage extends TypedMessage {\n  /**\n   * 在客户端需要以文本形式展示该消息时显示的文案,值为 [该消息已撤回]\n   * @type {String}\n   * @readonly\n   */\n  // eslint-disable-next-line class-methods-use-this\n  get summary() {\n    return '[该消息已撤回]';\n  }\n}\nexport default RecalledMessage;\n","import EventEmitter from 'eventemitter3';\nimport isEmpty from 'lodash/isEmpty';\nimport isPlainObject from 'lodash/isPlainObject';\nimport cloneDeep from 'lodash/cloneDeep';\nimport d from 'debug';\nimport { decodeDate, keyRemap, union, difference, internal, setValue } from './utils';\nimport { applyDecorators } from './plugin';\nimport IMClient from './im-client';\nimport {\n  GenericCommand,\n  ConvCommand,\n  JsonObjectMessage,\n  DirectCommand,\n  LogsCommand,\n  PatchCommand,\n  PatchItem,\n  CommandType,\n  OpType,\n} from '../proto/message';\nimport runSignatureFactory from './signature-factory-runner';\nimport { createError } from './error';\nimport Message, { MessageStatus } from './messages/message';\nimport RecalledMessage from './messages/recalled-message';\n\nconst debug = d('LC:Conversation');\n\nexport default class Conversation extends EventEmitter {\n  /**\n   * 无法直接实例化,请使用 {@link IMClient#createConversation} 创建新的对话\n   * @extends EventEmitter\n   */\n  constructor({\n    id,\n    creator,\n    createdAt,\n    updatedAt,\n    lastMessageAt,\n    lastMessage,\n    mutedMembers = [],\n    members = [],\n    transient = false,\n    system = false,\n    muted = false,\n    // jsdoc-ignore-start\n    ...attributes\n    // jsdoc-ignore-end\n  }, client) {\n    super();\n    Object.assign(this, {\n      /**\n       * 对话 id,对应 _Conversation 表中的 objectId\n       * @memberof Conversation#\n       * @type {String}\n       */\n      id,\n      /**\n       * 对话创建者\n       * @memberof Conversation#\n       * @type {String}\n       */\n      creator,\n      /**\n       * 对话创建时间\n       * @memberof Conversation#\n       * @type {Date}\n       */\n      createdAt,\n      /**\n       * 对话更新时间\n       * @memberof Conversation#\n       * @type {Date}\n       */\n      updatedAt,\n      /**\n       * 最后一条消息时间\n       * @memberof Conversation#\n       * @type {?Date}\n       */\n      lastMessageAt,\n      /**\n       * 最后一条消息\n       * @memberof Conversation#\n       * @type {?Message}\n       */\n      lastMessage,\n      /**\n       * 对该对话设置了静音的用户列表\n       * @memberof Conversation#\n       * @type {?String[]}\n       */\n      mutedMembers,\n      /**\n       * 参与该对话的用户列表\n       * @memberof Conversation#\n       * @type {String[]}\n       */\n      members,\n      /**\n       * 暂态对话标记\n       * @memberof Conversation#\n       * @type {Boolean}\n       */\n      transient,\n      /**\n       * 系统对话标记\n       * @memberof Conversation#\n       * @type {Boolean}\n       * @since 3.3\n       */\n      system,\n      /**\n       * 当前用户静音该对话标记\n       * @memberof Conversation#\n       * @type {Boolean}\n       */\n      muted,\n    });\n    this._attributes = attributes;\n    this._reset();\n    this.members = Array.from(new Set(this.members));\n    Object.assign(internal(this), {\n      messagesWaitingForReceipt: {},\n      lastDeliveredAt: null,\n      lastReadAt: null,\n      unreadMessagesCount: 0,\n    });\n    if (client instanceof IMClient) {\n      this._client = client;\n    } else {\n      throw new TypeError('Conversation must be initialized with a client');\n    }\n    [\n      'kicked',\n      'membersjoined',\n      'membersleft',\n      'message',\n      'receipt',\n      'lastdeliveredatupdate',\n      'lastreadatupdate',\n      'messagerecall',\n      'messageupdate',\n    ].forEach(event => this.on(\n      event,\n      (...payload) => this._debug(`${event} event emitted. %O`, payload)\n    ));\n    // onConversationCreate hook\n    applyDecorators(this._client._plugins.onConversationCreate, this);\n  }\n\n  set unreadMessagesCount(value) {\n    if (value !== this.unreadMessagesCount) {\n      internal(this).unreadMessagesCount = value;\n      this._client.emit('unreadmessagescountupdate', [this]);\n    }\n  }\n  /**\n   * 当前用户在该对话的未读消息数\n   * @type {Number}\n   */\n  get unreadMessagesCount() {\n    return internal(this).unreadMessagesCount;\n  }\n\n  set createdAt(value) {\n    this._createdAt = decodeDate(value);\n  }\n  get createdAt() {\n    return this._createdAt;\n  }\n  set updatedAt(value) {\n    this._updatedAt = decodeDate(value);\n  }\n  get updatedAt() {\n    return this._updatedAt;\n  }\n  set lastMessageAt(value) {\n    const time = decodeDate(value);\n    if (time <= this._lastMessageAt) return;\n    this._lastMessageAt = time;\n  }\n  get lastMessageAt() {\n    return this._lastMessageAt;\n  }\n  /**\n   * 最后消息送达时间,常用来实现消息的「已送达」标记,可通过 {@link Conversation#fetchReceiptTimestamps} 获取或更新该属性\n   * @type {?Date}\n   * @since 3.4.0\n   */\n  get lastDeliveredAt() {\n    if (this.members.length !== 2) return null;\n    return internal(this).lastDeliveredAt;\n  }\n  _setLastDeliveredAt(value) {\n    const date = decodeDate(value);\n    if (!(date < internal(this).lastDeliveredAt)) {\n      internal(this).lastDeliveredAt = date;\n      /**\n       * 最后消息送达时间更新\n       * @event Conversation#lastdeliveredatupdate\n       * @since 3.4.0\n       */\n      this.emit('lastdeliveredatupdate');\n    }\n  }\n  /**\n   * 最后消息被阅读时间,常用来实现发送消息的「已读」标记,可通过 {@link Conversation#fetchReceiptTimestamps} 获取或更新该属性\n   * @type {?Date}\n   * @since 3.4.0\n   */\n  get lastReadAt() {\n    if (this.members.length !== 2) return null;\n    return internal(this).lastReadAt;\n  }\n  _setLastReadAt(value) {\n    const date = decodeDate(value);\n    if (!(date < internal(this).lastReadAt)) {\n      internal(this).lastReadAt = date;\n      /**\n       * 最后消息被阅读时间更新\n       * @event Conversation#lastreadatupdate\n       * @since 3.4.0\n       */\n      this.emit('lastreadatupdate');\n    }\n  }\n\n  /**\n   * 对话额外属性,对应 _Conversation 表中的 attr\n   * @type {Object}\n   * @deprecated Use {@link Conversation#get conversation.get('attr')},\n   * {@link Conversation#set conversation.set('attr', value)} instead\n   */\n  get attributes() {\n    console.warn('DEPRECATION Conversation.attributes: Use conversation.get(\\'attr\\') instead. See https://url.leanapp.cn/DeprecateAttributes for more details.');\n    return this.get('attr');\n  }\n  set attributes(value) {\n    console.warn('DEPRECATION Conversation.attributes: Use conversation.set(\\'attr\\', value) instead. See https://url.leanapp.cn/DeprecateAttributes for more details.');\n    this.set('attr', value);\n  }\n  /**\n   * 设置对话额外属性\n   * @param {Object} map    key-value 对\n   * @param {Boolean} [assign=false] 使用 Object.assign 更新属性,而不是替换整个 attributes\n   * @return {Conversation} self\n   * @deprecated Use {@link Conversation#set} instead. See {@link https://url.leanapp.cn/DeprecateAttributes} for more details.\n   */\n  setAttributes(map, assign = false) {\n    console.warn('DEPRECATION Conversation#setAttributes: Use conversation.set() instead. See https://url.leanapp.cn/DeprecateAttributes for more details.');\n    this._debug(`set attributes: value=${JSON.stringify(map)}, assign=${assign}`);\n    if (!isPlainObject(map)) {\n      throw new TypeError('attributes must be a plain object');\n    }\n    if (!assign) {\n      this.set('attr', map);\n    } else {\n      Object.keys(map).forEach(key => this.setAttribute(key, map[key]));\n    }\n    return this;\n  }\n  /**\n   * 设置对话额外属性\n   * @param {String} key\n   * @param {Any} value\n   * @return {Conversation} self\n   * @deprecated Use {@link Conversation#set conversation.set('attr.key', value)} instead\n   */\n  setAttribute(key, value) {\n    console.warn('DEPRECATION Conversation#setAttribute: Use conversation.set(\\'attr.key\\', value) instead. See https://url.leanapp.cn/DeprecateAttributes for more details.');\n    return this.set(`attr.${key}`, value);\n  }\n  /**\n   * 对话名字,对应 _Conversation 表中的 name\n   * @type {String}\n   */\n  get name() {\n    return this.get('name');\n  }\n  set name(value) {\n    this.set('name', value);\n  }\n  /**\n   * 设置对话名字\n   * @param {String} value\n   * @return {Conversation} self\n   * @deprecated Use {@link Conversation#set conversation.set('name', value)} instead\n   */\n  setName(value) {\n    console.warn('DEPRECATION Conversation#setName: Use conversation.set(\\'name\\', value) instead. See https://url.leanapp.cn/DeprecateAttributes for more details.');\n    return this.set('name', value);\n  }\n\n  /**\n   * 获取对话的自定义属性\n   * @since 3.2.0\n   * @param  {String} key key 属性的键名,'x' 对应 Conversation 表中的 x 列\n   * @return {Any} 属性的值\n   */\n  get(key) {\n    return internal(this).currentAttributes[key];\n  }\n\n  /**\n   * 设置对话的自定义属性\n   * @since 3.2.0\n   * @param {String} key 属性的键名,'x' 对应 Conversation 表中的 x 列,支持使用 'x.y.z' 来修改对象的部分字段。\n   * @param {Any} value 属性的值\n   * @return {Conversation} self\n   * @example\n   *\n   * // 设置对话的 color 属性\n   * conversation.set('color', {\n   *   text: '#000',\n   *   background: '#DDD',\n   * });\n   * // 设置对话的 color.text 属性\n   * conversation.set('color.text', '#333');\n   */\n  set(key, value) {\n    this._debug(`set [${key}]: ${value}`);\n    const pendingAttributes = internal(this).pendingAttributes;\n    const pendingKeys = Object.keys(pendingAttributes);\n    // suppose pendingAttributes = { 'a.b': {} }\n    // set 'a' or 'a.b': delete 'a.b'\n    const re = new RegExp(`^${key}`);\n    const childKeys = pendingKeys.filter(re.test.bind(re));\n    childKeys.forEach((k) => {\n      delete pendingAttributes[k];\n    });\n    if (childKeys.length) {\n      pendingAttributes[key] = value;\n    } else {\n      // set 'a.c': nothing to do\n      // set 'a.b.c.d': assign c: { d: {} } to 'a.b'\n      // CAUTION: non-standard API, provided by core-js\n      const parentKey = Array.find(pendingKeys, k => key.indexOf(k) === 0); // 'a.b'\n      if (parentKey) {\n        setValue(pendingAttributes[parentKey], key.slice(parentKey.length + 1), value);\n      } else {\n        pendingAttributes[key] = value;\n      }\n    }\n    // build currentAttributes\n    internal(this).currentAttributes = Object.keys(pendingAttributes)\n      .reduce(\n        (target, k) => setValue(target, k, pendingAttributes[k]),\n        cloneDeep(this._attributes)\n      );\n    return this;\n  }\n\n  _reset() {\n    internal(this).pendingAttributes = {};\n    internal(this).currentAttributes = this._attributes;\n  }\n\n  _debug(...params) {\n    debug(...params, `[${this.id}]`);\n  }\n\n  _send(command, ...args) {\n    /* eslint-disable no-param-reassign */\n    if (command.cmd === null) {\n      command.cmd = 'conv';\n    }\n    if (command.cmd === 'conv' && command.convMessage === null) {\n      command.convMessage = new ConvCommand();\n    }\n    if (command.convMessage && command.convMessage.cid === null) {\n      command.convMessage.cid = this.id;\n    }\n    /* eslint-enable no-param-reassign */\n    return this._client._send(command, ...args);\n  }\n  /**\n   * 保存当前对话的属性至服务器\n   * @return {Promise.} self\n   */\n  save() {\n    this._debug('save');\n    const attr = internal(this).pendingAttributes;\n    if (isEmpty(attr)) {\n      this._debug('nothing touched, resolve with self');\n      return Promise.resolve(this);\n    }\n    this._debug('attr: %O', attr);\n    const convMessage = new ConvCommand({\n      attr: new JsonObjectMessage({\n        data: JSON.stringify(attr),\n      }),\n    });\n    return this\n      ._send(new GenericCommand({\n        op: 'update',\n        convMessage,\n      }))\n      .then((resCommand) => {\n        this.updatedAt = resCommand.convMessage.udate;\n        this._attributes = internal(this).currentAttributes;\n        internal(this).pendingAttributes = {};\n        return this;\n      });\n  }\n\n  /**\n   * 从服务器更新对话的属性\n   * @return {Promise.} self\n   */\n  fetch() {\n    return this\n      ._client\n      .getQuery()\n      .equalTo('objectId', this.id)\n      .find()\n      .then(() => this);\n  }\n\n  /**\n   * 静音,客户端拒绝收到服务器端的离线推送通知\n   * @return {Promise.} self\n   */\n  mute() {\n    this._debug('mute');\n    return this._send(new GenericCommand({\n      op: 'mute',\n    })).then(() => {\n      if (!this.transient) {\n        this.muted = true;\n        this.mutedMembers = union(this.mutedMembers, [this._client.id]);\n      }\n      return this;\n    });\n  }\n\n  /**\n   * 取消静音\n   * @return {Promise.} self\n   */\n  unmute() {\n    this._debug('unmute');\n    return this._send(new GenericCommand({\n      op: 'unmute',\n    })).then(() => {\n      if (!this.transient) {\n        this.muted = false;\n        this.mutedMembers = difference(this.mutedMembers, [this._client.id]);\n      }\n      return this;\n    });\n  }\n\n  /**\n   * 获取对话人数,或暂态对话的在线人数\n   * @return {Promise.}\n   */\n  count() {\n    this._debug('unmute');\n    return this._send(new GenericCommand({\n      op: 'count',\n    })).then(resCommand => resCommand.convMessage.count);\n  }\n\n  /**\n   * 增加成员\n   * @param {String|String[]} clientIds 新增成员 client id\n   * @return {Promise.} self\n   */\n  add(clientIds) {\n    this._debug('add', clientIds);\n    if (typeof clientIds === 'string') {\n      clientIds = [clientIds]; // eslint-disable-line no-param-reassign\n    }\n    const convMessage = new ConvCommand({\n      m: clientIds,\n    });\n    return Promise.resolve(\n      new GenericCommand({\n        op: 'add',\n        convMessage,\n      })\n    ).then((command) => {\n      if (this._client.options.conversationSignatureFactory) {\n        const params = [this.id, this._client.id, clientIds.sort(), 'add'];\n        return runSignatureFactory(this._client.options.conversationSignatureFactory, params)\n          .then((signatureResult) => {\n            Object.assign(command.convMessage, keyRemap({\n              signature: 's',\n              timestamp: 't',\n              nonce: 'n',\n            }, signatureResult));\n            return command;\n          });\n      }\n      return command;\n    }).then(\n      this._send.bind(this)\n    ).then(() => {\n      if (!this.transient && !this.system) {\n        this.members = union(this.members, clientIds);\n      }\n      return this;\n    });\n  }\n\n  /**\n   * 剔除成员\n   * @param {String|String[]} clientIds 成员 client id\n   * @return {Promise.} self\n   */\n  remove(clientIds) {\n    this._debug('remove', clientIds);\n    if (typeof clientIds === 'string') {\n      clientIds = [clientIds]; // eslint-disable-line no-param-reassign\n    }\n    const convMessage = new ConvCommand({\n      m: clientIds,\n    });\n    return Promise.resolve(\n      new GenericCommand({\n        op: 'remove',\n        convMessage,\n      })\n    ).then((command) => {\n      if (this._client.options.conversationSignatureFactory) {\n        const params = [this.id, this._client.id, clientIds.sort(), 'remove'];\n        return runSignatureFactory(this._client.options.conversationSignatureFactory, params)\n          .then((signatureResult) => {\n            Object.assign(command.convMessage, keyRemap({\n              signature: 's',\n              timestamp: 't',\n              nonce: 'n',\n            }, signatureResult));\n            return command;\n          });\n      }\n      return command;\n    }).then(\n      this._send.bind(this)\n    ).then(() => {\n      if (!this.transient && !this.system) {\n        this.members = difference(this.members, clientIds);\n      }\n      return this;\n    });\n  }\n\n  /**\n   * (当前用户)加入该对话\n   * @return {Promise.} self\n   */\n  join() {\n    this._debug('join');\n    return this.add(this._client.id);\n  }\n\n  /**\n   * (当前用户)退出该对话\n   * @return {Promise.} self\n   */\n  quit() {\n    this._debug('quit');\n    return this.remove(this._client.id);\n  }\n\n  /**\n   * 发送消息\n   * @param  {Message} message 消息,Message 及其子类的实例\n   * @param {Object} [options] since v3.3.0,发送选项\n   * @param {Boolean} [options.transient] since v3.3.1,是否作为暂态消息发送\n   * @param {Boolean} [options.receipt] 是否需要送达回执,仅在普通对话中有效\n   * @param {Boolean} [options.will] since v3.4.0,是否指定该消息作为「掉线消息」发送,\n   * 「掉线消息」会延迟到当前用户掉线后发送,常用来实现「下线通知」功能\n   * @param {MessagePriority} [options.priority] 消息优先级,仅在暂态对话中有效,\n   * see: {@link module:leancloud-realtime.MessagePriority MessagePriority}\n   * @param {Object} [options.pushData] 消息对应的离线推送内容,如果消息接收方不在线,会推送指定的内容。其结构说明参见: {@link https://url.leanapp.cn/pushData 推送消息内容}\n   * @return {Promise.} 发送的消息\n   */\n  send(message, options) {\n    this._debug(message, 'send');\n    if (!(message instanceof Message)) {\n      throw new TypeError(`${message} is not a Message`);\n    }\n    const _options = Object.assign({}, options);\n    // support typo reciept option\n    if (_options.reciept !== undefined) {\n      console.warn('DEPRECATION Conversation#send options.reciept: please use receipt option instead');\n      if (_options.receipt === undefined) _options.receipt = _options.reciept;\n    }\n    const {\n      transient,\n      receipt,\n      priority,\n      pushData,\n      will,\n    } = Object.assign(\n      // support deprecated attribute: message.needReceipt\n      {\n        transient: message.transient,\n        receipt: message.needReceipt,\n      },\n      // support Message static property: sendOptions\n      message.constructor.sendOptions,\n      _options\n    );\n    if (receipt) {\n      if (this.transient) {\n        console.warn('receipt option is ignored as the conversation is transient.');\n      } else if (transient) {\n        console.warn('receipt option is ignored as the message is sent transiently.');\n      } else if (this.members.length > 2) {\n        console.warn('receipt option is recommended to be used in one-on-one conversation.'); // eslint-disable-line max-len\n      }\n    }\n    if (priority && !this.transient) {\n      console.warn('priority option is ignored as the conversation is not transient.');\n    }\n    Object.assign(message, {\n      cid: this.id,\n      from: this._client.id,\n    });\n    message._setStatus(MessageStatus.SENDING);\n    let msg = message.toJSON();\n    if (typeof msg !== 'string') {\n      msg = JSON.stringify(msg);\n    }\n    let sendPromise = this._send(new GenericCommand({\n      cmd: 'direct',\n      directMessage: new DirectCommand({\n        msg,\n        cid: this.id,\n        r: receipt,\n        transient,\n        dt: message.id,\n        pushData: JSON.stringify(pushData),\n        will,\n      }),\n      priority,\n    }), !transient);\n    if (!transient) {\n      sendPromise = sendPromise.then((resCommand) => {\n        const {\n          ackMessage: {\n            uid,\n            t,\n            code,\n            reason,\n            appCode,\n            },\n          } = resCommand;\n        if (code !== null) {\n          throw createError({\n            code, reason, appCode,\n          });\n        }\n        Object.assign(message, {\n          id: uid,\n          timestamp: new Date(t.toNumber()),\n        });\n        this.lastMessage = message;\n        this.lastMessageAt = message.timestamp;\n      });\n    }\n    return sendPromise.then(() => {\n      message._setStatus(MessageStatus.SENT);\n      if (receipt) {\n        internal(this).messagesWaitingForReceipt[message.id] = message;\n      }\n      return message;\n    }, (error) => {\n      message._setStatus(MessageStatus.FAILED);\n      throw error;\n    });\n  }\n\n  _update(message, newMessage, recall) {\n    this._debug('patch %O %O %O', message, newMessage, recall);\n    if (message instanceof Message) {\n      if (message.from !== this._client.id) {\n        throw new Error('Updating message from others is not allowed');\n      }\n      if (message.status !== MessageStatus.SENT && message.status !== MessageStatus.DELIVERED) {\n        throw new Error('Message is not sent');\n      }\n    } else if (!(message.id && message.timestamp)) {\n      throw new TypeError(`${message} is not a Message`);\n    }\n    let data = null;\n    if (!recall) {\n      data = newMessage.toJSON();\n      if (typeof data !== 'string') {\n        data = JSON.stringify(data);\n      }\n    }\n    return this._send(new GenericCommand({\n      cmd: CommandType.patch,\n      op: OpType.modify,\n      patchMessage: new PatchCommand({\n        patches: [new PatchItem({\n          cid: this.id,\n          mid: message.id,\n          timestamp: Number(message.timestamp),\n          recall,\n          data,\n        })],\n        lastPatchTime: this._client._lastPatchTime,\n      }),\n    })).then(() => {\n      const {\n        id, cid, timestamp, from, _status,\n      } = message;\n      Object.assign(newMessage, {\n        id, cid, timestamp, from, _status,\n      });\n      if (this.lastMessage.id === newMessage.id) {\n        this.lastMessage = newMessage;\n      }\n      return newMessage;\n    });\n  }\n\n  /**\n   * 修改已发送的消息\n   * @param {AVMessage} message 要修改的消息,该消息必须是由当前用户发送的。也可以提供一个包含消息 {id, timestamp} 的对象\n   * @param {AVMessage} newMessage 新的消息\n   */\n  update(message, newMessage) {\n    if (!(newMessage instanceof Message)) {\n      throw new TypeError(`${newMessage} is not a Message`);\n    }\n    return this._update(message, newMessage, false);\n  }\n\n  /**\n   * 撤回已发送的消息\n   * @param {AVMessage} message 要撤回的消息,该消息必须是由当前用户发送的。也可以提供一个包含消息 {id, timestamp} 的对象\n   */\n  recall(message) {\n    return this._update(message, new RecalledMessage(), true);\n  }\n\n  /**\n   * 查询消息记录\n   * 如果仅需实现消息记录翻页查询需求,建议使用 {@link Conversation#createMessagesIterator}\n   * @param  {Object} [options]\n   * @param  {Date}   [options.beforeTime] 限制查询结果为小于这个该时间之前的消息,不传则为当前时间\n   * @param  {String} [options.beforeMessageId] 限制查询结果为该消息之前的消息,需要与 beforeTime 同时使用,为防止某时刻有重复消息\n   * @param  {Date}   [options.afterTime] 限制查询结果为大于这个该时间之前的消息\n   * @param  {String} [options.afterMessageId] 限制查询结果为该消息之后的消息,需要与 afterTime 同时使用,为防止某时刻有重复消息\n   * @param  {Number} [options.limit] 限制查询结果的数量,目前服务端默认为 20\n   * @return {Promise.} 消息列表\n   */\n  queryMessages(options = {}) {\n    this._debug('query messages %O', options);\n    if (options.beforeMessageId && !options.beforeTime) {\n      throw new Error('query option beforeMessageId must be used with option beforeTime');\n    }\n    if (options.afterMessageId && !options.afterTime) {\n      throw new Error('query option afterMessageId must be used with option afterTime');\n    }\n    const conditions = keyRemap({\n      beforeTime: 't',\n      beforeMessageId: 'mid',\n      afterTime: 'tt',\n      afterMessageId: 'tmid',\n      limit: 'l',\n    }, options);\n    if (conditions.t instanceof Date) {\n      conditions.t = conditions.t.getTime();\n    }\n    if (conditions.tt instanceof Date) {\n      conditions.tt = conditions.tt.getTime();\n    }\n    return this._send(new GenericCommand({\n      cmd: 'logs',\n      logsMessage: new LogsCommand(\n        Object.assign(conditions, {\n          cid: this.id,\n        })\n      ),\n    })).then(resCommand =>\n      Promise.all(resCommand.logsMessage.logs.map(({\n        msgId,\n        timestamp,\n        patchTimestamp,\n        from,\n        ackAt,\n        readAt,\n        data,\n      }) =>\n        this._client._messageParser.parse(data).then((message) => {\n          const messageProps = {\n            id: msgId,\n            cid: this.id,\n            timestamp: new Date(timestamp.toNumber()),\n            from,\n            deliveredAt: ackAt,\n          };\n          if (patchTimestamp) {\n            messageProps.updatedAt = new Date(patchTimestamp.toNumber());\n          }\n          Object.assign(message, messageProps);\n          let status = MessageStatus.SENT;\n          if (this.members.length === 2) {\n            if (ackAt) status = MessageStatus.DELIVERED;\n            if (ackAt) this._setLastDeliveredAt(ackAt);\n            if (readAt) this._setLastReadAt(readAt);\n          }\n          message._setStatus(status);\n          return message;\n        })\n      ))\n    );\n  }\n\n  /**\n   * 获取消息翻页迭代器\n   * @param  {Object} [options]\n   * @param  {Date}   [options.beforeTime] 限制起始查询结果为小于这个该时间之前的消息,不传则为当前时间\n   * @param  {String} [options.beforeMessageId] 限制起始查询结果为该消息之前的消息,需要与 beforeTime 同时使用,为防止某时刻有重复消息\n   * @param  {Number} [options.limit] 限制每页查询结果的数量,目前服务端默认为 20\n   * @return {AsyncIterater.>>} [AsyncIterator]{@link https://github.com/tc39/proposal-async-iteration},调用其 next 方法返回获取下一页消息的 Promise\n   * @example\n   * var messageIterator = conversation.createMessagesIterator({ limit: 10 });\n   * messageIterator.next().then(function(result) {\n   *   // result: {\n   *   //   value: [message1, ..., message10],\n   *   //   done: false,\n   *   // }\n   * });\n   * messageIterator.next().then(function(result) {\n   *   // result: {\n   *   //   value: [message11, ..., message20],\n   *   //   done: false,\n   *   // }\n   * });\n   * messageIterator.next().then(function(result) {\n   *   // No more messages\n   *   // result: { value: [], done: true }\n   * });\n   */\n  createMessagesIterator({ beforeTime, beforeMessageId, limit } = {}) {\n    let promise;\n    return {\n      next: () => {\n        if (promise === undefined) {\n          // first call\n          promise = this.queryMessages({\n            limit,\n            beforeTime,\n            beforeMessageId,\n          });\n        } else {\n          promise = promise.then((prevMessages) => {\n            if (prevMessages.length === 0 || prevMessages.length < limit) {\n              // no more messages\n              return [];\n            }\n            return this.queryMessages({\n              beforeTime: prevMessages[0].timestamp,\n              beforeMessageId: prevMessages[0].id,\n              limit,\n            });\n          });\n        }\n        return promise.then(value => ({\n          value: Array.from(value),\n          done: value.length === 0 || value.length < limit,\n        }));\n      },\n    };\n  }\n\n  /**\n   * 将该会话标记为已读\n   * @return {Promise.} self\n   */\n  read() {\n    this.unreadMessagesCount = 0;\n    // 跳过暂态会话\n    if (this.transient) return Promise.resolve(this);\n    const client = this._client;\n    if (!internal(client).readConversationsBuffer) {\n      internal(client).readConversationsBuffer = new Set();\n    }\n    internal(client).readConversationsBuffer.add(this);\n    client._doSendRead();\n    return Promise.resolve(this);\n  }\n\n  /**\n   * 将该会话标记为已读\n   * @deprecated in favor of {@link Conversation#read}\n   * @return {Promise.} self\n   */\n  markAsRead() {\n    console.warn('DEPRECATION Conversation#markAsRead: Use Conversation#read instead.');\n    return this.read();\n  }\n\n  _handleReceipt({ messageId, timestamp, read }) {\n    if (read) {\n      this._setLastReadAt(timestamp);\n    } else {\n      this._setLastDeliveredAt(timestamp);\n    }\n    const { messagesWaitingForReceipt } = internal(this);\n    const message = messagesWaitingForReceipt[messageId];\n    if (!message) return;\n    message._setStatus(MessageStatus.DELIVERED);\n    message.deliveredAt = timestamp;\n    delete messagesWaitingForReceipt[messageId];\n    /**\n     * 消息已送达。只有在发送时设置了需要回执的情况下才会收到送达回执,该回执并不代表用户已读。\n     * @event Conversation#receipt\n     * @deprecated use {@link Conversation#event:lastdeliveredatupdate}\n     * and {@link Conversation#event:lastreadatupdate} instead\n     * @since 3.2.0\n     * @param {Object} payload\n     * @param {Message} payload.message 送达的消息\n     */\n    this.emit('receipt', { message });\n  }\n\n  /**\n   * 更新对话的最新回执时间戳(lastDeliveredAt、lastReadAt)\n   * @since 3.4.0\n   * @return {Promise.} this\n   */\n  fetchReceiptTimestamps() {\n    return this._send(new GenericCommand({\n      op: 'max_read',\n    })).then(({\n      convMessage: {\n        maxReadTimestamp,\n        maxAckTimestamp,\n      },\n    }) => {\n      this._setLastDeliveredAt(maxAckTimestamp);\n      this._setLastReadAt(maxReadTimestamp);\n      return this;\n    });\n  }\n\n  _fetchAllReceiptTimestamps() {\n    const convMessage = new ConvCommand({\n      queryAllMembers: true,\n    });\n    return this._send(new GenericCommand({\n      op: 'max_read',\n      convMessage,\n    })).then(({\n      convMessage: {\n        maxReadTuples,\n      },\n    }) => maxReadTuples\n      .filter(maxReadTuple => maxReadTuple.maxAckTimestamp || maxReadTuple.maxReadTimestamp)\n      .map(({ pid, maxAckTimestamp, maxReadTimestamp }) => ({\n        pid,\n        lastDeliveredAt: decodeDate(maxAckTimestamp),\n        lastReadAt: decodeDate(maxReadTimestamp),\n      })));\n  }\n}\n","import d from 'debug';\n\nconst debug = d('LC:ConversationQuery');\n\nexport default class ConversationQuery {\n  static _encode(value) {\n    if (value instanceof Date) {\n      return { __type: 'Date', iso: value.toJSON() };\n    }\n    if (value instanceof RegExp) {\n      return value.source;\n    }\n    return value;\n  }\n\n  static _quote(s) {\n    return `\\\\Q${s.replace('\\\\E', '\\\\E\\\\\\\\E\\\\Q')}\\\\E`;\n  }\n\n  static _calculateFlag(options) {\n    return [\n      'withLastMessagesRefreshed',\n      'compact',\n    ].reduce(\n      // eslint-disable-next-line no-bitwise\n      (prev, key) => (prev << 1) + (Boolean)(options[key]),\n      0\n    );\n  }\n\n  /**\n   * Create a ConversationQuery\n   * @param  {IMClient} client\n   */\n  constructor(client) {\n    this._client = client;\n    this._where = {};\n    this._extraOptions = {};\n  }\n\n  _addCondition(key, condition, value) {\n    // Check if we already have a condition\n    if (!this._where[key]) {\n      this._where[key] = {};\n    }\n    this._where[key][condition] = this.constructor._encode(value);\n    return this;\n  }\n\n  toJSON() {\n    const json = {\n      where: this._where,\n      flag: this.constructor._calculateFlag(this._extraOptions),\n    };\n    if (typeof this._skip !== 'undefined') json.skip = this._skip;\n    if (typeof this._limit !== 'undefined') json.limit = this._limit;\n    if (typeof this._order !== 'undefined') json.sort = this._order;\n    debug(json);\n    return json;\n  }\n\n  /**\n   * 增加查询条件,指定聊天室的组员包含某些成员即可返回\n   * @param {string[]} peerIds - 成员 ID 列表\n   * @return {ConversationQuery} self\n   */\n  containsMembers(peerIds) {\n    return this.containsAll('m', peerIds);\n  }\n\n  /**\n   * 增加查询条件,指定聊天室的组员条件满足条件的才返回\n   *\n   * @param {string[]} - 成员 ID 列表\n   * @param {Boolean} includeSelf - 是否包含自己\n   * @return {ConversationQuery} self\n   */\n  withMembers(peerIds, includeSelf) {\n    const peerIdsSet = new Set(peerIds);\n    if (includeSelf) {\n      peerIdsSet.add(this._client.id);\n    }\n    this.sizeEqualTo('m', peerIdsSet.size);\n    return this.containsMembers(Array.from(peerIdsSet));\n  }\n\n  /**\n   * 增加查询条件,当 conversation 的属性中对应的字段满足等于条件时即可返回\n   *\n   * @param {string} key\n   * @param value\n   * @return {ConversationQuery} self\n   */\n  equalTo(key, value) {\n    this._where[key] = this.constructor._encode(value);\n    return this;\n  }\n\n  /**\n   * 增加查询条件,当 conversation 的属性中对应的字段满足小于条件时即可返回\n   * @param {string} key\n   * @param value\n   * @return {ConversationQuery} self\n   */\n  lessThan(key, value) {\n    return this._addCondition(key, '$lt', value);\n  }\n\n\n  /**\n   * 增加查询条件,当 conversation 的属性中对应的字段满足小于等于条件时即可返回\n\n   * @param {string} key\n   * @param value\n   * @return {ConversationQuery} self\n   */\n  lessThanOrEqualTo(key, value) {\n    return this._addCondition(key, '$lte', value);\n  }\n\n  /**\n   * 增加查询条件,当 conversation 的属性中对应的字段满足大于条件时即可返回\n   *\n   * @param {string} key\n   * @param value\n   * @return {ConversationQuery} self\n   */\n\n  greaterThan(key, value) {\n    return this._addCondition(key, '$gt', value);\n  }\n\n  /**\n   * 增加查询条件,当 conversation 的属性中对应的字段满足大于等于条件时即可返回\n   *\n   * @param {string} key\n   * @param value\n   * @return {ConversationQuery} self\n   */\n\n  greaterThanOrEqualTo(key, value) {\n    return this._addCondition(key, '$gte', value);\n  }\n\n  /**\n   * 增加查询条件,当 conversation 的属性中对应的字段满足不等于条件时即可返回\n   *\n   * @param {string} key\n   * @param value\n   * @return {ConversationQuery} self\n   */\n  notEqualTo(key, value) {\n    return this._addCondition(key, '$ne', value);\n  }\n\n  /**\n   * 增加查询条件,当 conversation 存在指定的字段时即可返回\n   *\n   * @since 3.5.0\n   * @param {string} key\n   * @return {ConversationQuery} self\n   */\n  exists(key) {\n    return this._addCondition(key, '$exists', true);\n  }\n\n  /**\n   * 增加查询条件,当 conversation 不存在指定的字段时即可返回\n   *\n   * @since 3.5.0\n   * @param {string} key\n   * @return {ConversationQuery} self\n   */\n  doesNotExist(key) {\n    return this._addCondition(key, '$exists', false);\n  }\n\n  /**\n   * 增加查询条件,当 conversation 的属性中对应的字段对应的值包含在指定值中时即可返回\n   *\n   * @param {string} key\n   * @param values\n   * @return {ConversationQuery} self\n   */\n  containedIn(key, values) {\n    return this._addCondition(key, '$in', values);\n  }\n\n  /**\n   * 增加查询条件,当 conversation 的属性中对应的字段对应的值不包含在指定值中时即可返回\n   *\n   * @param {string} key\n   * @param values\n   * @return {ConversationQuery} self\n   */\n  notContainsIn(key, values) {\n    return this._addCondition(key, '$nin', values);\n  }\n  /**\n   * 增加查询条件,当conversation的属性中对应的字段中的元素包含所有的值才可返回\n   *\n   * @param {string} key\n   * @param values\n   * @return {ConversationQuery} self\n   */\n  containsAll(key, values) {\n    return this._addCondition(key, '$all', values);\n  }\n\n  /**\n   * 增加查询条件,当 conversation 的属性中对应的字段对应的值包含此字符串即可返回\n   *\n   * @param {string} key\n   * @param {string} subString\n   * @return {ConversationQuery} self\n   */\n  contains(key, subString) {\n    return this._addCondition(key, '$regex', ConversationQuery._quote(subString));\n  }\n\n  /**\n   * 增加查询条件,当 conversation 的属性中对应的字段对应的值以此字符串起始即可返回\n   *\n   * @param {string} key\n   * @param {string} prefix\n   * @return {ConversationQuery} self\n   */\n  startsWith(key, prefix) {\n    return this._addCondition(key, '$regex', `^${ConversationQuery._quote(prefix)}`);\n  }\n\n  /**\n   * 增加查询条件,当 conversation 的属性中对应的字段对应的值以此字符串结束即可返回\n   *\n   * @param {string} key\n   * @param {string} suffix\n   * @return {ConversationQuery} self\n   */\n  endsWith(key, suffix) {\n    return this._addCondition(key, '$regex', `${ConversationQuery._quote(suffix)}$`);\n  }\n\n  /**\n   * 增加查询条件,当 conversation 的属性中对应的字段对应的值满足提供的正则表达式即可返回\n   *\n   * @param {string} key\n   * @param {RegExp} regex\n   * @return {ConversationQuery} self\n   */\n  matches(key, regex) {\n    this._addCondition(key, '$regex', regex);\n    // Javascript regex options support mig as inline options but store them\n    // as properties of the object. We support mi & should migrate them to\n    // modifiers\n    let _modifiers = '';\n    if (regex.ignoreCase) { _modifiers += 'i'; }\n    if (regex.multiline) { _modifiers += 'm'; }\n\n    if (_modifiers && _modifiers.length) {\n      this._addCondition(key, '$options', _modifiers);\n    }\n    return this;\n  }\n\n  /**\n   * 添加查询约束条件,查找 key 类型是数组,该数组的长度匹配提供的数值\n   *\n   * @param {string} key\n   * @param {Number} length\n   * @return {ConversationQuery} self\n   */\n  sizeEqualTo(key, length) {\n    return this._addCondition(key, '$size', length);\n  }\n\n  /**\n   * 设置返回集合的大小上限\n   *\n   * @param {Number} limit - 上限\n   * @return {ConversationQuery} self\n   */\n  limit(limit) {\n    this._limit = limit;\n    return this;\n  }\n\n  /**\n   * 设置返回集合的起始位置,一般用于分页\n   *\n   * @param {Number} skip - 起始位置跳过几个对象\n   * @return {ConversationQuery} self\n   */\n  skip(skip) {\n    this._skip = skip;\n    return this;\n  }\n\n  /**\n   * 设置返回集合按照指定key进行增序排列\n   *\n   * @param {string} key\n   * @return {ConversationQuery} self\n   */\n  ascending(key) {\n    this._order = key;\n    return this;\n  }\n\n  /**\n   * 设置返回集合按照指定key进行增序排列,如果已设置其他排序,原排序的优先级较高\n   *\n   * @param {string} key\n   * @return {ConversationQuery} self\n   */\n  addAscending(key) {\n    if (this._order) {\n      this._order += `,${key}`;\n    } else {\n      this._order = key;\n    }\n    return this;\n  }\n\n  /**\n   * 设置返回集合按照指定 key 进行降序排列\n   *\n   * @param {string} key\n   * @return {ConversationQuery} self\n   */\n  descending(key) {\n    this._order = `-${key}`;\n    return this;\n  }\n\n  /**\n   * 设置返回集合按照指定 key 进行降序排列,如果已设置其他排序,原排序的优先级较高\n   *\n   * @param {string} key\n   * @return {ConversationQuery} self\n   */\n  addDescending(key) {\n    if (this._order) {\n      this._order += `,-${key}`;\n    } else {\n      this._order = `-${key}`;\n    }\n    return this;\n  }\n\n  /**\n   * 设置返回的 conversations 刷新最后一条消息\n   * @param  {Boolean} [enabled=true]\n   * @return {ConversationQuery} self\n   */\n  withLastMessagesRefreshed(enabled = true) {\n    this._extraOptions.withLastMessagesRefreshed = enabled;\n    return this;\n  }\n\n  /**\n   * @deprecated 请替换为 {@link ConversationQuery#withLastMessagesRefreshed}\n   * @param  {Boolean} [enabled=true]\n   * @return {ConversationQuery} self\n   */\n  withLastMessages(enabled) {\n    console.warn('DEPRECATION ConversationQuery#withLastMessages: ' +\n      'Use ConversationQuery#withLastMessagesRefreshed instead.');\n    return this.withLastMessagesRefreshed(enabled);\n  }\n\n  /**\n   * 设置返回的 conversations 为精简模式,即不含成员列表\n   * @param  {Boolean} [enabled=true]\n   * @return {ConversationQuery} self\n   */\n  compact(enabled = true) {\n    this._extraOptions.compact = enabled;\n    return this;\n  }\n\n  /**\n   * 执行查询\n   * @return {Promise.}\n   */\n  find() {\n    return this._client._executeQuery(this);\n  }\n}\n","import EventEmitter from 'eventemitter3';\nimport d from 'debug';\nimport Conversation from './conversation';\nimport ConversationQuery from './conversation-query';\nimport {\n  GenericCommand,\n  SessionCommand,\n  ConvCommand,\n  AckCommand,\n  JsonObjectMessage,\n  ReadCommand,\n  ReadTuple,\n  CommandType,\n  OpType,\n} from '../proto/message';\nimport { ErrorCode } from './error';\nimport { tap, Expirable, Cache, keyRemap, union, difference, trim, internal, throttle } from './utils';\nimport { applyDecorators, applyDispatcher } from './plugin';\nimport runSignatureFactory from './signature-factory-runner';\nimport { MessageStatus } from './messages/message';\nimport { version as VERSION } from '../package.json';\n\nconst debug = d('LC:IMClient');\n\nexport default class IMClient extends EventEmitter {\n  /**\n   * 无法直接实例化,请使用 {@link Realtime#createIMClient} 创建新的 IMClient。\n   *\n   * @extends EventEmitter\n   * @param  {String} [id] 客户端 id\n   * @param  {Object} [options]\n   * @param  {Function} [options.signatureFactory] open session 时的签名方法 // TODO need details\n   * @param  {Function} [options.conversationSignatureFactory] 对话创建、增减成员操作时的签名方法\n   */\n  constructor(id, options = {}, connection, props) {\n    if (!(id === undefined || typeof id === 'string')) {\n      throw new TypeError(`Client id [${id}] is not a String`);\n    }\n    super();\n    Object.assign(this, {\n      /**\n       * @var id {String} 客户端 id\n       * @memberof IMClient#\n       */\n      id,\n      _connection: connection,\n      options,\n    }, props);\n\n    if (!this._messageParser) {\n      throw new Error('IMClient must be initialized with a MessageParser');\n    }\n    this._conversationCache = new Cache(`client:${this.id}`);\n    this._ackMessageBuffer = {};\n    internal(this).lastPatchTime = Date.now();\n    internal(this)._eventemitter = new EventEmitter();\n    [\n      'invited',\n      'kicked',\n      'membersjoined',\n      'membersleft',\n      'message',\n      'unreadmessages',\n      'unreadmessagescountupdate',\n      'close',\n      'conflict',\n      'unhandledmessage',\n      'reconnect',\n      'reconnecterror',\n    ].forEach(event => this.on(\n      event,\n      (...payload) => this._debug(`${event} event emitted. %O`, payload)\n    ));\n    // onIMClientCreate hook\n    applyDecorators(this._plugins.onIMClientCreate, this);\n  }\n\n  _debug(...params) {\n    debug(...params, `[${this.id}]`);\n  }\n\n  /**\n   * @override\n   * @private\n   */\n  _dispatchCommand(command) {\n    this._debug(trim(command), 'received');\n    switch (command.cmd) {\n      case CommandType.conv:\n        return this._dispatchConvMessage(command);\n      case CommandType.direct:\n        return this._dispatchDirectMessage(command);\n      case CommandType.session:\n        return this._dispatchSessionMessage(command);\n      case CommandType.unread:\n        return this._dispatchUnreadMessage(command);\n      case CommandType.rcp:\n        return this._dispatchRcpMessage(command);\n      case CommandType.patch:\n        return this._dispatchPatchMessage(command);\n      default:\n        this.emit('unhandledmessage', command);\n        return Promise.resolve();\n    }\n  }\n\n  _dispatchSessionMessage(message) {\n    const {\n      sessionMessage: {\n        code, reason,\n      },\n    } = message;\n    switch (message.op) {\n      case OpType.closed: {\n        if (code === ErrorCode.SESSION_CONFLICT) {\n          /**\n           * 用户在其他客户端登录,当前客户端被服务端强行下线。详见文档「单点登录」章节。\n           * @event IMClient#conflict\n           */\n          return this.emit('conflict', {\n            reason,\n          });\n        }\n        /**\n         * 当前客户端被服务端强行下线\n         * @event IMClient#close\n         * @param {Object} payload\n         * @param {Number} payload.code 错误码\n         * @param {String} payload.reason 原因\n         */\n        return this.emit('close', {\n          code, reason,\n        });\n      }\n      default:\n        this.emit('unhandledmessage', message);\n        return Promise.reject(new Error('Unrecognized session command'));\n    }\n  }\n\n  _dispatchUnreadMessage({\n    unreadMessage: {\n      convs,\n      notifTime,\n    },\n  }) {\n    internal(this).lastUnreadNotifTime = notifTime;\n    // ensure all converstions are cached\n    return this.getConversations(convs.map(conv => conv.cid)).then(() =>\n      // update conversations data\n      Promise.all(convs.map(({\n          cid,\n          unread,\n          mid,\n          timestamp: ts,\n          from,\n          data,\n          patchTimestamp,\n        }) => this.getConversation(cid).then((conversation) => {\n          // deleted conversation\n          if (!conversation) return null;\n          let timestamp;\n          if (ts) {\n            timestamp = new Date(ts.toNumber());\n            conversation.lastMessageAt = timestamp; // eslint-disable-line no-param-reassign\n          }\n          return (mid ? this._messageParser.parse(data).then((message) => {\n            const messageProps = {\n              id: mid,\n              cid,\n              timestamp,\n              from,\n            };\n            if (patchTimestamp) {\n              messageProps.updatedAt = new Date(patchTimestamp.toNumber());\n            }\n            Object.assign(message, messageProps);\n            conversation.lastMessage = message; // eslint-disable-line no-param-reassign\n          }) : Promise.resolve()).then(() => {\n            const countNotUpdated = unread === internal(conversation).unreadMessagesCount;\n            if (countNotUpdated) return null; // to be filtered\n            // manipulate internal property directly to skip unreadmessagescountupdate event\n            internal(conversation).unreadMessagesCount = unread;\n            /**\n             * 未读消息数目更新\n             * @event IMClient#unreadmessages\n             * @deprecated 请使用新的未读消息数目批量更新事件 {@link IMClient#event:unreadmessagescountupdate}\n             * @param {Object} payload\n             * @param {Number} payload.count 未读消息数\n             * @param {String} [payload.lastMessageId] 最新一条未读消息 id\n             * @param {Date} [payload.lastMessageTimestamp] 最新一条未读消息时间戳\n             * @param {Conversation} conversation 未读消息数目有更新的对话\n             */\n            this.emit('unreadmessages', {\n              count: unread,\n              lastMessageId: mid,\n              lastMessageTimestamp: timestamp,\n            }, conversation);\n            return conversation;\n          });\n        })\n      // filter conversations without unread count update\n      )).then(conversations => conversations.filter(conversation => conversation))\n    ).then((conversations) => {\n      if (conversations.length) {\n        /**\n         * 未读消息数目更新\n         * @event IMClient#unreadmessagescountupdate\n         * @since 3.4.0\n         * @param {Conversation[]} conversations 未读消息数目有更新的对话列表\n         */\n        this.emit('unreadmessagescountupdate', conversations);\n      }\n    });\n  }\n\n  _dispatchRcpMessage(message) {\n    const {\n      rcpMessage,\n      rcpMessage: {\n        read,\n      },\n    } = message;\n    const conversationId = rcpMessage.cid;\n    const messageId = rcpMessage.id;\n    const timestamp = new Date(rcpMessage.t.toNumber());\n    const conversation = this._conversationCache.get(conversationId);\n    // conversation not cached means the client does not send the message\n    // during this session\n    if (!conversation) return;\n    conversation._handleReceipt({ messageId, timestamp, read });\n  }\n\n  _dispatchPatchMessage({\n      patchMessage: {\n        patches,\n      },\n    }) {\n    // ensure all converstions are cached\n    return this.getConversations(patches.map(patch => patch.cid)).then(() =>\n      Promise.all(patches.map(({\n        cid, mid, timestamp, recall, data, patchTimestamp, from,\n      }) =>\n        this.getConversation(cid).then((conversation) => {\n          // deleted conversation\n          if (!conversation) return null;\n          return this._messageParser.parse(data).then((message) => {\n            const patchTime = patchTimestamp.toNumber();\n            const messageProps = {\n              id: mid,\n              cid,\n              timestamp: new Date(timestamp.toNumber()),\n              updatedAt: new Date(patchTime),\n              from,\n            };\n            Object.assign(message, messageProps);\n            message._setStatus(MessageStatus.SENT);\n            if (internal(this).lastPatchTime < patchTime) {\n              internal(this).lastPatchTime = patchTime;\n            }\n            // update conversation lastMessage\n            if (conversation.lastMessage && conversation.lastMessage.id === mid) {\n              conversation.lastMessage = message; // eslint-disable-line no-param-reassign\n            }\n            if (recall) {\n              /**\n               * 消息被撤回\n               * @event IMClient#messagerecall\n               * @param {AVMessage} message 被撤回的消息\n               * @param {Conversation} conversation 消息所在的会话\n               */\n              this.emit('messagerecall', message, conversation);\n              /**\n               * 消息被撤回\n               * @event Conversation#messagerecall\n               * @param {AVMessage} message 被撤回的消息\n               */\n              conversation.emit('messagerecall', message);\n            } else {\n              /**\n               * 消息被修改\n               * @event IMClient#messageupdate\n               * @param {AVMessage} message 被修改的消息\n               * @param {Conversation} conversation 消息所在的会话\n               */\n              this.emit('messageupdate', message, conversation);\n              /**\n               * 消息被修改\n               * @event Conversation#messageupdate\n               * @param {AVMessage} message 被修改的消息\n               */\n              conversation.emit('messageupdate', message);\n            }\n          });\n        })\n      ))\n    );\n  }\n\n  _dispatchConvMessage(message) {\n    const {\n      convMessage,\n      convMessage: {\n        initBy, m,\n      },\n    } = message;\n    switch (message.op) {\n      case OpType.joined: {\n        return this.getConversation(convMessage.cid).then((conversation) => {\n          if (!conversation.transient) {\n            // eslint-disable-next-line no-param-reassign\n            conversation.members = union(conversation.members, [this.id]);\n          }\n          const payload = {\n            invitedBy: initBy,\n          };\n          /**\n           * 当前用户被添加至某个对话\n           * @event IMClient#invited\n           * @param {Object} payload\n           * @param {String} payload.invitedBy 邀请者 id\n           * @param {Conversation} conversation\n           */\n          this.emit('invited', payload, conversation);\n          /**\n           * 当前用户被添加至当前对话\n           * @event Conversation#invited\n           * @param {Object} payload\n           * @param {String} payload.invitedBy 该移除操作的发起者 id\n           */\n          conversation.emit('invited', payload);\n        });\n      }\n      case OpType.left: {\n        return this.getConversation(convMessage.cid).then((conversation) => {\n          if (!conversation.transient) {\n            // eslint-disable-next-line no-param-reassign\n            conversation.members = difference(conversation.members, [this.id]);\n          }\n          const payload = {\n            kickedBy: initBy,\n          };\n          /**\n           * 当前用户被从某个对话中移除\n           * @event IMClient#kicked\n           * @param {Object} payload\n           * @param {String} payload.kickedBy 该移除操作的发起者 id\n           * @param {Conversation} conversation\n           */\n          this.emit('kicked', payload, conversation);\n          /**\n           * 当前用户被从当前对话中移除\n           * @event Conversation#kicked\n           * @param {Object} payload\n           * @param {String} payload.kickedBy 该移除操作的发起者 id\n           */\n          conversation.emit('kicked', payload);\n        });\n      }\n      case OpType.members_joined: {\n        return this.getConversation(convMessage.cid).then((conversation) => {\n          if (!conversation.transient) {\n            // eslint-disable-next-line no-param-reassign\n            conversation.members = union(conversation.members, convMessage.m);\n          }\n          const payload = {\n            invitedBy: initBy,\n            members: m,\n          };\n          /**\n           * 有用户被添加至某个对话\n           * @event IMClient#membersjoined\n           * @param {Object} payload\n           * @param {String[]} payload.members 被添加的用户 id 列表\n           * @param {String} payload.invitedBy 邀请者 id\n           * @param {Conversation} conversation\n           */\n          this.emit('membersjoined', payload, conversation);\n          /**\n           * 有成员被添加至当前对话\n           * @event Conversation#membersjoined\n           * @param {Object} payload\n           * @param {String[]} payload.members 被添加的成员 id 列表\n           * @param {String} payload.invitedBy 邀请者 id\n           */\n          conversation.emit('membersjoined', payload);\n        });\n      }\n      case OpType.members_left: {\n        return this.getConversation(convMessage.cid).then((conversation) => {\n          if (!conversation.transient) {\n            // eslint-disable-next-line no-param-reassign\n            conversation.members = difference(conversation.members, convMessage.m);\n          }\n          const payload = {\n            kickedBy: initBy,\n            members: m,\n          };\n          /**\n           * 有成员被从某个对话中移除\n           * @event IMClient#membersleft\n           * @param {Object} payload\n           * @param {String[]} payload.members 被移除的成员 id 列表\n           * @param {String} payload.kickedBy 该移除操作的发起者 id\n           * @param {Conversation} conversation\n           */\n          this.emit('membersleft', payload, conversation);\n          /**\n           * 有成员被从当前对话中移除\n           * @event Conversation#membersleft\n           * @param {Object} payload\n           * @param {String[]} payload.members 被移除的成员 id 列表\n           * @param {String} payload.kickedBy 该移除操作的发起者 id\n           */\n          conversation.emit('membersleft', payload);\n        });\n      }\n      default:\n        this.emit('unhandledmessage', message);\n        return Promise.reject(new Error('Unrecognized conversation command'));\n    }\n  }\n\n  _dispatchDirectMessage(originalMessage) {\n    const {\n      directMessage,\n      directMessage: {\n        id, cid, fromPeerId, timestamp, transient, patchTimestamp,\n      },\n    } = originalMessage;\n    return Promise.all([\n      this.getConversation(directMessage.cid),\n      this._messageParser.parse(directMessage.msg),\n    ]).then(([conversation, message]) => {\n      // deleted conversation\n      if (!conversation) return undefined;\n      const messageProps = {\n        id,\n        cid,\n        timestamp: new Date(timestamp.toNumber()),\n        from: fromPeerId,\n        transient,\n      };\n      if (patchTimestamp) {\n        messageProps.updatedAt = new Date(patchTimestamp.toNumber());\n      }\n      Object.assign(message, messageProps);\n      message._setStatus(MessageStatus.SENT);\n      return this._dispatchParsedMessage(message, conversation);\n    });\n  }\n\n  _dispatchParsedMessage(message, conversation) {\n    // beforeMessageDispatch hook\n    return applyDispatcher(this._plugins.beforeMessageDispatch, [message, conversation])\n      .then((shouldDispatch) => {\n        if (shouldDispatch === false) return;\n        conversation.lastMessage = message; // eslint-disable-line no-param-reassign\n        conversation.lastMessageAt = message.timestamp; // eslint-disable-line no-param-reassign\n        // filter outgoing message sent from another device\n        if (message.from !== this.id) {\n          conversation.unreadMessagesCount += 1; // eslint-disable-line no-param-reassign\n          if (!(message.transient || conversation.transient)) {\n            this._sendAck(message);\n          }\n        }\n        /**\n         * 当前用户收到消息\n         * @event IMClient#message\n         * @param {Message} message\n         * @param {Conversation} conversation 收到消息的对话\n         */\n        this.emit('message', message, conversation);\n        /**\n         * 当前对话收到消息\n         * @event Conversation#message\n         * @param {Message} message\n         */\n        conversation.emit('message', message);\n      });\n  }\n\n  _sendAck(message) {\n    this._debug('send ack for %O', message);\n    const { cid } = message;\n    if (!cid) {\n      throw new Error('missing cid');\n    }\n    if (!this._ackMessageBuffer[cid]) {\n      this._ackMessageBuffer[cid] = [];\n    }\n    this._ackMessageBuffer[cid].push(message);\n    return this._doSendAck();\n  }\n\n  // jsdoc-ignore-start\n  @throttle(1000)\n  // jsdoc-ignore-end\n  _doSendAck() {\n    // if not connected, just skip everything\n    if (!this._connection.is('connected')) return;\n    this._debug('do send ack %O', this._ackMessageBuffer);\n    Promise.all(Object.keys(this._ackMessageBuffer).map((cid) => {\n      const convAckMessages = this._ackMessageBuffer[cid];\n      const timestamps = convAckMessages.map(message => message.timestamp);\n      const command = new GenericCommand({\n        cmd: 'ack',\n        ackMessage: new AckCommand({\n          cid,\n          fromts: Math.min.apply(null, timestamps),\n          tots: Math.max.apply(null, timestamps),\n        }),\n      });\n      delete this._ackMessageBuffer[cid];\n      return this._send(command, false).catch((error) => {\n        this._debug('send ack failed: %O', error);\n        this._ackMessageBuffer[cid] = convAckMessages;\n      });\n    }));\n  }\n\n  _send(cmd, ...args) {\n    const command = cmd;\n    if (this.id) {\n      command.peerId = this.id;\n    }\n    return this._connection.send(command, ...args);\n  }\n\n  _open(appId, tag, deviceId, isReconnect = false) {\n    this._debug('open session');\n    const {\n      lastUnreadNotifTime,\n      lastPatchTime,\n    } = internal(this);\n    return Promise\n      .resolve(new GenericCommand({\n        cmd: 'session',\n        op: 'open',\n        appId,\n        sessionMessage: new SessionCommand({\n          ua: `js/${VERSION}`,\n          r: isReconnect,\n          lastUnreadNotifTime,\n          lastPatchTime,\n          configBitmap: 1,\n        }),\n      }))\n      .then((command) => {\n        if (isReconnect) {\n          // if sessionToken is not expired, skip signature/tag/deviceId\n          const sessionToken = internal(this).sessionToken;\n          if (sessionToken) {\n            const value = sessionToken.value;\n            if (value && value !== Expirable.EXPIRED) {\n              Object.assign(command.sessionMessage, {\n                st: value,\n              });\n              return command;\n            }\n          }\n        }\n        Object.assign(command.sessionMessage, trim({\n          tag,\n          deviceId,\n        }));\n        if (this.options.signatureFactory) {\n          return runSignatureFactory(this.options.signatureFactory, [this.id])\n            .then((signatureResult) => {\n              Object.assign(command.sessionMessage, keyRemap({\n                signature: 's',\n                timestamp: 't',\n                nonce: 'n',\n              }, signatureResult));\n              return command;\n            });\n        }\n        return command;\n      })\n      .then(this._send.bind(this))\n      .then((resCommand) => {\n        const {\n          peerId,\n          sessionMessage: {\n            st: token,\n            stTtl: tokenTTL,\n          },\n        } = resCommand;\n        if (!peerId) {\n          console.warn('Unexpected session opened without peerId.');\n          return;\n        }\n        this.id = peerId;\n        if (token) {\n          internal(this).sessionToken = new Expirable(token, tokenTTL * 1000);\n        }\n      }, (error) => {\n        if (error.code === ErrorCode.SESSION_TOKEN_EXPIRED) {\n          if (internal(this).sessionToken === undefined) {\n            // let it fail if sessoinToken not cached but command rejected as token expired\n            // to prevent session openning flood\n            throw new Error('Unexpected session expiration');\n          }\n          debug('Session token expired, reopening');\n          delete internal(this).sessionToken;\n          return this._open(appId, tag, deviceId, isReconnect);\n        }\n        throw error;\n      });\n  }\n\n  /**\n   * 关闭客户端\n   * @return {Promise}\n   */\n  close() {\n    this._debug('close session');\n    const command = new GenericCommand({\n      cmd: 'session',\n      op: 'close',\n    });\n    return this._send(command).then(\n      () => {\n        internal(this)._eventemitter.emit('close', {\n          code: 0,\n        });\n        this.emit('close', {\n          code: 0,\n        });\n      }\n    );\n  }\n  /**\n   * 获取 client 列表中在线的 client,每次查询最多 20 个 clientId,超出部分会被忽略\n   * @param  {String[]} clientIds 要查询的 client ids\n   * @return {Primse.} 在线的 client ids\n   */\n  ping(clientIds) {\n    this._debug('ping');\n    if (!(clientIds instanceof Array)) {\n      throw new TypeError(`clientIds ${clientIds} is not an Array`);\n    }\n    if (!clientIds.length) {\n      return Promise.resolve([]);\n    }\n    const command = new GenericCommand({\n      cmd: 'session',\n      op: 'query',\n      sessionMessage: new SessionCommand({\n        sessionPeerIds: clientIds,\n      }),\n    });\n    return this._send(command)\n      .then(resCommand => resCommand.sessionMessage.onlineSessionPeerIds);\n  }\n\n  /**\n   * 获取某个特定的对话\n   * @param  {String} id 对话 id,对应 _Conversation 表中的 objectId\n   * @param  {Boolean} [noCache=false] 强制不从缓存中获取\n   * @return {Promise.} 如果 id 对应的对话不存在则返回 null\n   */\n  getConversation(id, noCache = false) {\n    if (typeof id !== 'string') {\n      throw new TypeError(`${id} is not a String`);\n    }\n    if (!noCache) {\n      const cachedConversation = this._conversationCache.get(id);\n      if (cachedConversation) {\n        return Promise.resolve(cachedConversation);\n      }\n    }\n    return this\n      .getQuery()\n      .equalTo('objectId', id)\n      .find()\n      .then(conversations => conversations[0] || null);\n  }\n\n  /**\n   * 通过 id 批量获取某个特定的对话\n   * @since 3.4.0\n   * @param  {String[]} ids 对话 id 列表,对应 _Conversation 表中的 objectId\n   * @param  {Boolean} [noCache=false] 强制不从缓存中获取\n   * @return {Promise.} 如果 id 对应的对话不存在则返回 null\n   */\n  getConversations(ids, noCache = false) {\n    const remoteConversationIds =\n      noCache ? ids : ids.filter(id => this._conversationCache.get(id) === null);\n    return (\n      remoteConversationIds.length ?\n      this.getQuery().containedIn('objectId', remoteConversationIds).limit(999).find() :\n      Promise.resolve()\n    ).then(() => ids.map(id => this._conversationCache.get(id)));\n  }\n\n  /**\n   * 构造一个 ConversationQuery 来查询对话\n   * @return {ConversationQuery}\n   */\n  getQuery() {\n    return new ConversationQuery(this);\n  }\n\n  _executeQuery(query) {\n    const queryJSON = query.toJSON();\n    queryJSON.where = new JsonObjectMessage({\n      data: JSON.stringify(queryJSON.where),\n    });\n    const command = new GenericCommand({\n      cmd: 'conv',\n      op: 'query',\n      convMessage: new ConvCommand(queryJSON),\n    });\n    return this\n      ._send(command)\n      .then((resCommand) => {\n        try {\n          return JSON.parse(resCommand.convMessage.results.data);\n        } catch (error) {\n          const commandString = JSON.stringify(trim(resCommand));\n          throw new Error(`Parse query result failed: ${error.message}. Command: ${commandString}`);\n        }\n      })\n      .then(conversations => Promise.all(conversations.map(\n        this._parseConversationFromRawData.bind(this)\n      )))\n      .then(conversations => conversations.map((fetchedConversation) => {\n        let conversation = this._conversationCache.get(fetchedConversation.id);\n        if (!conversation) {\n          conversation = fetchedConversation;\n          this._debug('no match, set cache');\n          this._conversationCache.set(fetchedConversation.id, fetchedConversation);\n        } else {\n          this._debug('update cached conversation');\n          [\n            'creator',\n            'createdAt',\n            'updatedAt',\n            'lastMessageAt',\n            'lastMessage',\n            'mutedMembers',\n            'members',\n            '_attributes',\n            'transient',\n            'muted',\n          ].forEach((key) => {\n            const value = fetchedConversation[key];\n            if (value !== undefined) conversation[key] = value;\n          });\n          conversation._reset();\n        }\n        return conversation;\n      }));\n  }\n\n  _parseConversationFromRawData(rawData) {\n    const data = keyRemap({\n      objectId: 'id',\n      lm: 'lastMessageAt',\n      msg: 'lastMessage',\n      msg_from: 'lastMessageFrom',\n      msg_mid: 'lastMessageId',\n      msg_timestamp: 'lastMessageTimestamp',\n      patch_timestamp: 'lastMessagePatchTimestamp',\n      m: 'members',\n      tr: 'transient',\n      sys: 'system',\n      c: 'creator',\n      mu: 'mutedMembers',\n    }, rawData);\n    return Promise.resolve().then(() => {\n      if (data.lastMessage) {\n        return this._messageParser.parse(data.lastMessage).then(\n          (message) => {\n            /* eslint-disable no-param-reassign */\n            data.lastMessage = message;\n            message.from = data.lastMessageFrom;\n            message.id = data.lastMessageId;\n            message.timestamp = new Date(data.lastMessageTimestamp);\n            if (data.lastMessagePatchTimestamp) {\n              message.updatedAt = new Date(data.lastMessagePatchTimestamp);\n            }\n            message._setStatus(MessageStatus.SENT);\n            delete data.lastMessageFrom;\n            delete data.lastMessageId;\n            delete data.lastMessageTimestamp;\n            delete data.lastMessagePatchTimestamp;\n            /* eslint-enable no-param-reassign */\n          }\n        );\n      }\n      return Promise.resolve();\n    }).then(() => new Conversation(data, this));\n  }\n\n  /**\n   * 创建一个 conversation\n   * @param {Object} options 除了下列字段外的其他字段将被视为对话的自定义属性\n   * @param {String[]} options.members 对话的初始成员列表,默认包含当前 client\n   * @param {String} [options.name] 对话的名字\n   * @param {Object} [options.attributes] DEPRECATED: 额外属性,对应 _Conversation 表的 attr 列\n   * @param {Boolean} [options.transient=false] 暂态会话\n   * @param {Boolean} [options.unique=false] 唯一对话,当其为 true 时,如果当前已经有相同成员的对话存在则返回该对话,否则会创建新的对话\n   * @return {Promise.}\n   */\n  createConversation(options = {}) {\n    const {\n      members: m,\n      name,\n      attributes,\n      transient,\n      unique,\n      ...properties\n    } = options;\n    if (!(transient || Array.isArray(m))) {\n      throw new TypeError(`conversation members ${m} is not an array`);\n    }\n    let members = new Set(m);\n    members.add(this.id);\n    members = Array.from(members).sort();\n    let attr = properties || {};\n    if (name) {\n      if (typeof name !== 'string') {\n        throw new TypeError(`conversation name ${name} is not a string`);\n      }\n      attr.name = name;\n    }\n    if (attributes) {\n      console.warn('DEPRECATION createConversation options.attributes param: Use options[propertyName] instead. See https://url.leanapp.cn/DeprecateAttributes for more details.');\n      attr.attr = attributes;\n    }\n    attr = new JsonObjectMessage({\n      data: JSON.stringify(attr),\n    });\n\n    const startCommandJson = {\n      m: members,\n      attr,\n      transient,\n      unique,\n    };\n\n    return Promise.resolve(\n        new GenericCommand({\n          cmd: 'conv',\n          op: 'start',\n          convMessage: new ConvCommand(startCommandJson),\n        })\n      )\n      .then((command) => {\n        if (this.options.conversationSignatureFactory) {\n          const params = [null, this.id, members, 'create'];\n          return runSignatureFactory(this.options.conversationSignatureFactory, params)\n            .then((signatureResult) => {\n              Object.assign(command.convMessage, keyRemap({\n                signature: 's',\n                timestamp: 't',\n                nonce: 'n',\n              }, signatureResult));\n              return command;\n            });\n        }\n        return command;\n      })\n      .then(this._send.bind(this))\n      .then(resCommand => new Conversation({\n        name,\n        attr: attributes,\n        transient,\n        unique,\n        id: resCommand.convMessage.cid,\n        createdAt: resCommand.convMessage.cdate,\n        updatedAt: resCommand.convMessage.cdate,\n        lastMessageAt: null,\n        creator: this.id,\n        members: transient ? [] : members,\n        ...properties,\n      }, this))\n      .then(tap(conversation =>\n        this._conversationCache.set(conversation.id, conversation)\n      ));\n  }\n\n  /**\n   * 将指定的所有会话标记为已读\n   * @deprecated 请遍历调用 conversations 的 {@link Conversation#read read} 方法\n   * @param {Conversation[]} conversations 指定的会话列表\n   * @return {Promise.} conversations 返回输入的会话列表\n   */\n  // eslint-disable-next-line class-methods-use-this\n  markAllAsRead(conversations) {\n    console.warn('DEPRECATION IMClient.markAllAsRead: Use Conversation#read instead.');\n    if (!Array.isArray(conversations)) {\n      throw new TypeError(`${conversations} is not an Array`);\n    }\n    return Promise.all(conversations.map(conversation => conversation.read()));\n  }\n\n  // jsdoc-ignore-start\n  @throttle(1000)\n  // jsdoc-ignore-end\n  _doSendRead() {\n    // if not connected, just skip everything\n    if (!this._connection.is('connected')) return;\n    const buffer = internal(this).readConversationsBuffer;\n    const conversations = Array.from(buffer);\n    if (!conversations.length) return;\n    const ids = conversations.map((conversation) => {\n      if (!(conversation instanceof Conversation)) {\n        throw new TypeError(`${conversation} is not a Conversation`);\n      }\n      return conversation.id;\n    });\n    this._debug(`mark [${ids}] as read`);\n    buffer.clear();\n    this._sendReadCommand(conversations).catch((error) => {\n      this._debug('send read failed: %O', error);\n      conversations.forEach(buffer.add.bind(buffer));\n    });\n  }\n  _sendReadCommand(conversations) {\n    return this._send(new GenericCommand({\n      cmd: 'read',\n      readMessage: new ReadCommand({\n        convs: conversations.map(conversation => new ReadTuple({\n          cid: conversation.id,\n          mid: (conversation.lastMessage && conversation.lastMessage.from !== this.id)\n            ? conversation.lastMessage.id : undefined,\n          timestamp: (conversation.lastMessageAt || new Date()).getTime(),\n        })),\n      }),\n    }), false);\n  }\n}\n","import TypedMessage from './typed-message';\nimport { messageType, IE10Compatible } from './helpers';\n\n// jsdoc-ignore-start\n@messageType(-1)\n@IE10Compatible\n// jsdoc-ignore-end\nexport default class TextMessage extends TypedMessage {\n  /**\n   * 文类类型消息\n   * @extends TypedMessage\n   * @param  {String} [text='']\n   * @throws {TypeError} text 不是 String 类型\n   */\n  constructor(text = '') {\n    if (typeof text !== 'string') {\n      throw new TypeError(`${text} is not a string`);\n    }\n    super();\n    this.setText(text);\n  }\n}\n\n/**\n * @name TYPE\n * @memberof TextMessage\n * @type Number\n * @static\n * @const\n */\n","import d from 'debug';\nimport isPlainObject from 'lodash/isPlainObject';\nimport { applyMiddlewares } from './plugin';\n\nconst debug = d('LC:MessageParser');\n\nconst tryParseJson = (target, key, descriptor) => {\n  const fn = descriptor.value;\n  // eslint-disable-next-line no-param-reassign\n  descriptor.value = function wrapper(param) {\n    let content;\n    if (typeof param !== 'string') {\n      content = param;\n    } else {\n      try {\n        content = JSON.parse(param);\n      } catch (error) {\n        content = param;\n      }\n    }\n    return fn.call(this, content);\n  };\n};\n\nconst applyPlugins = (target, key, descriptor) => {\n  const fn = descriptor.value;\n  // eslint-disable-next-line no-param-reassign\n  descriptor.value = function wrapper(json) {\n    return Promise.resolve(json)\n      .then(applyMiddlewares(this._plugins.beforeMessageParse))\n      .then(decoratedJson => fn.call(this, decoratedJson))\n      .then(applyMiddlewares(this._plugins.afterMessageParse));\n  };\n};\n\nexport default class MessageParser {\n  constructor(plugins = {}) {\n    this._plugins = plugins;\n    this._messageClasses = [];\n  }\n\n  register(messageClass) {\n    if (\n      messageClass &&\n      messageClass.parse &&\n      messageClass.prototype &&\n      messageClass.prototype.toJSON\n    ) {\n      this._messageClasses.unshift(messageClass);\n    } else {\n      throw new TypeError('Invalid messageClass');\n    }\n  }\n\n  // jsdoc-ignore-start\n  @tryParseJson\n  @applyPlugins\n  // jsdoc-ignore-end\n  parse(content) {\n    debug('parsing message: %O', content);\n    // eslint-disable-next-line no-restricted-syntax\n    for (const Klass of this._messageClasses) {\n      const contentCopy = isPlainObject(content) ? Object.assign({}, content) : content;\n      let valid;\n      let result;\n      try {\n        valid = Klass.validate(contentCopy);\n      } catch (error) {\n        // eslint-disable-line no-empty\n      }\n      if (valid) {\n        try {\n          result = Klass.parse(contentCopy);\n        } catch (error) {\n          console.warn('parsing a valid message content error', {\n            error,\n            Klass,\n            content: contentCopy,\n          });\n        }\n        if (result !== undefined) {\n          debug('parse result: %O', result);\n          return result;\n        }\n      }\n    }\n    throw new Error('No Message Class matched');\n  }\n}\n","/** @module leancloud-realtime */\nimport d from 'debug';\nimport uuid from 'uuid/v4';\nimport IMClient from './im-client';\nimport Conversation from './conversation';\nimport Message, { MessageStatus } from './messages/message';\nimport TextMessage from './messages/text-message';\nimport TypedMessage from './messages/typed-message';\nimport RecalledMessage from './messages/recalled-message';\nimport MessageParser from './message-parser';\nimport { trim, internal, ensureArray } from './utils';\n\nconst debug = d('LC:IMPlugin');\n\n/**\n * 消息优先级枚举\n * @enum {Number}\n * @since 3.3.0\n */\nconst MessagePriority = {\n  /** 高 */\n  HIGH: 1,\n  /** 普通 */\n  NORMAL: 2,\n  /** 低 */\n  LOW: 3,\n};\nObject.freeze(MessagePriority);\n\n/**\n * 为 Conversation 定义一个新属性\n * @param {String} prop 属性名\n * @param {Object} [descriptor] 属性的描述符,参见 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/getOwnPropertyDescriptor#Description getOwnPropertyDescriptor#Description - MDN},默认为该属性名对应的 Conversation 自定义属性的 getter/setter\n * @returns void\n * @example\n *\n * conversation.get('type');\n * conversation.set('type', 1);\n *\n * // equals to\n * defineConversationProperty('type');\n * conversation.type;\n * conversation.type = 1;\n */\nconst defineConversationProperty = (prop, descriptor = {\n  get() { return this.get(prop); },\n  set(value) { this.set(prop, value); },\n}) => {\n  Object.defineProperty(Conversation.prototype, prop, descriptor);\n};\n\nexport {\n  /**\n   * @see Message\n   */\n  Message,\n  /**\n   * @see TypedMessage\n   */\n  TypedMessage,\n  /**\n   * @see TextMessage\n   */\n  TextMessage,\n  /**\n   * @see RecalledMessage\n   */\n  RecalledMessage,\n  MessagePriority,\n  MessageStatus,\n  defineConversationProperty,\n};\n\nexport {\n  /**\n   * decorator,定义消息类的类型常量\n   * @function\n   * @param {Number} type 自定义类型请使用正整数\n   * @example @messageType(1)\n   * class CustomMessage extends TypedMessage {}\n   *\n   * // 不支持 decorator 的情况下可以这样使用\n   * class CustomMessage extends TypedMessage {\n   *   //...\n   * }\n   * messageType(1)(CustomMessage);\n   */\n  messageType,\n  /**\n   * decorator,定义消息类的自定义字段\n   * @function\n   * @param {String[]} fields 自定义字段\n   * @example @messageField(['foo'])\n   * class CustomMessage extends TypedMessage {\n   *   constructor(foo) {\n   *     super();\n   *     this.foo = foo;\n   *   }\n   * }\n   *\n   * // 不支持 decorator 的情况下可以这样使用\n   * class CustomMessage extends TypedMessage {\n   *   constructor(foo) {\n   *     super();\n   *     this.foo = foo;\n   *   }\n   *   //...\n   * }\n   * messageField(['foo'])(CustomMessage);\n   */\n  messageField,\n  IE10Compatible,\n} from './messages/helpers';\n\nconst onRealtimeCreate = (realtime) => {\n  /* eslint-disable no-param-reassign */\n  const deviceId = uuid();\n  realtime._IMClients = {};\n  const messageParser = realtime._messageParser = new MessageParser(realtime._plugins);\n\n  /**\n   * 注册消息类\n   *\n   * 在接收消息、查询消息时,会按照消息类注册顺序的逆序依次尝试解析消息内容\n   *\n   * @function register\n   * @memberof Realtime\n   * @instance\n   * @param  {Function | Function[]} messageClass 消息类,需要实现 {@link AVMessage} 接口,\n   * 建议继承自 {@link TypedMessage}\n   * @throws {TypeError} 如果 messageClass 没有实现 {@link AVMessage} 接口则抛出异常\n   */\n  realtime.register = messageClass =>\n    ensureArray(messageClass).map(messageParser.register.bind(messageParser));\n  realtime.register(ensureArray(realtime._plugins.messageClasses));\n  /**\n   * 创建一个即时通讯客户端,多次创建相同 id 的客户端会返回同一个实例\n   * @function createIMClient\n   * @memberof Realtime\n   * @instance\n   * @param  {String} [id] 客户端 id,如果不指定,服务端会随机生成一个\n   * @param  {Object} [clientOptions] 详细参数 @see {@link IMClient}\n   * @param  {String} [tag] 客户端类型标记,以支持单点登录功能\n   * @return {Promise.}\n   */\n  realtime.createIMClient = (id, clientOptions, tag) => {\n    const idIsString = typeof id === 'string';\n    if (idIsString && realtime._IMClients[id] !== undefined) {\n      return Promise.resolve(realtime._IMClients[id]);\n    }\n    const promise = realtime._open().then((connection) => {\n      const client = new IMClient(id, clientOptions, connection, {\n        _messageParser: messageParser,\n        _plugins: realtime._plugins,\n      });\n      connection.on('reconnect', () =>\n        client._open(realtime._options.appId, tag, deviceId, true)\n          /**\n           * 客户端连接恢复正常,该事件通常在 {@link Realtime#event:reconnect} 之后发生\n           * @event IMClient#reconnect\n           * @see Realtime#event:reconnect\n           * @since 3.2.0\n           */\n          /**\n           * 客户端重新登录发生错误(网络连接已恢复,但重新登录错误)\n           * @event IMClient#reconnecterror\n           * @since 3.2.0\n           */\n          .then(\n            () => client.emit('reconnect'),\n            error => client.emit('reconnecterror', error)\n          )\n      );\n      internal(client)._eventemitter.on('close', () => {\n        delete realtime._IMClients[client.id];\n        realtime._deregister(client);\n      }, realtime);\n      return client._open(realtime._options.appId, tag, deviceId)\n        .then(() => {\n          realtime._IMClients[client.id] = client;\n          realtime._register(client);\n          return client;\n        });\n    }).catch((error) => {\n      delete realtime._IMClients[id];\n      throw error;\n    });\n    if (idIsString) {\n      realtime._IMClients[id] = promise;\n    }\n    return promise;\n  };\n  /* eslint-enable no-param-reassign */\n};\n\nconst beforeCommandDispatch = (command, realtime) => {\n  if (command.peerId === null) return true;\n  const targetClient = realtime._IMClients[command.peerId];\n  if (targetClient) {\n    Promise.resolve(targetClient).then(client => client._dispatchCommand(command)).catch(debug);\n  } else {\n    debug(\n      '[WARN] Unexpected message received without any live client match: %O',\n      trim(command)\n    );\n  }\n  return false;\n};\n\nexport const IMPlugin = {\n  name: 'leancloud-realtime-plugin-im',\n  onRealtimeCreate,\n  beforeCommandDispatch,\n  messageClasses: [\n    Message,\n    RecalledMessage,\n    TextMessage,\n  ],\n};\n","import { Realtime } from './core';\nimport { IMPlugin, defineConversationProperty } from './plugin-im';\n\nRealtime.defineConversationProperty = defineConversationProperty;\nRealtime.__preRegisteredPlugins = [IMPlugin];\n\nexport * from './core';\n\nexport * from './plugin-im';\n"],"names":["defined","toInteger","aFunction","isObject","require$$0","document","require$$1","require$$2","anObject","toPrimitive","IE8_DOM_DEFINE","dP","createDesc","core","global","ctx","hide","cof","IObject","min","toIObject","toLength","toAbsoluteIndex","uid","IE_PROTO","has","$keys","enumBugKeys","getKeys","PROTOTYPE","dPs","create","descriptor","setToStringTag","toObject","$iterCreate","getPrototypeOf","LIBRARY","Iterators","redefine","$export","step","addToUnscopables","TAG","ITERATOR","classof","getIterFn","isArrayIter","call","process","invoke","cel","html","isNode","newPromiseCapability","SPECIES","DESCRIPTORS","TypeError","newPromiseCapabilityModule","perform","anInstance","require$$3","speciesConstructor","require$$4","require$$5","require$$6","promiseResolve","require$$7","forOf","define","require","this","newBuilder","build","messages","push_server","messages2","JsonObjectMessage","UnreadTuple","LogItem","DataCommand","SessionCommand","ErrorCommand","DirectCommand","AckCommand","UnreadCommand","ConvCommand","RoomCommand","LogsCommand","RcpCommand","ReadTuple","MaxReadTuple","ReadCommand","PresenceCommand","ReportCommand","GenericCommand","PatchCommand","PatchItem","CommandType","OpType","StatusType","$defineProperty","createProperty","_from","redefineAll","validate","$iterDefine","setSpecies","isArray","asc","fails","meta","strong","from","gOPS","pIE","wksExt","gOPN","toString","gOPD","$GOPD","$DP","gOPNExt","wks","shared","ObjectProto","USE_NATIVE","$fails","_create","enumKeys","wksDefine","_iterator","_symbol","_typeof2","_setPrototypeOf","d","ms","bind","fn","thisArg","wrap","args","Array","arguments","length","i","apply","Object","prototype","val","isArrayBuffer","isFormData","FormData","isArrayBufferView","result","ArrayBuffer","isView","buffer","isString","isNumber","isUndefined","isDate","isFile","isBlob","isFunction","isStream","pipe","isURLSearchParams","URLSearchParams","trim","str","replace","isStandardBrowserEnv","navigator","product","window","forEach","obj","l","key","hasOwnProperty","merge","assignValue","extend","a","b","isBuffer","$JSON","normalizeHeaderName","headers","normalizedName","utils","processHeader","value","name","toUpperCase","enhanceError","error","config","code","request","response","createError","message","Error","settle","resolve","reject","validateStatus","status","encode","encodeURIComponent","buildURL","url","params","paramsSerializer","serializedParams","parts","serialize","parseValue","v","toISOString","push","join","indexOf","parseHeaders","parsed","split","parser","line","substr","toLowerCase","standardBrowserEnv","msie","test","userAgent","urlParsingNode","createElement","originURL","resolveURL","href","setAttribute","protocol","host","search","hash","hostname","port","pathname","charAt","location","isURLSameOrigin","requestURL","nonStandardBrowserEnv","chars","E","btoa","input","String","output","block","charCode","idx","map","charCodeAt","write","expires","path","domain","secure","cookie","Date","toGMTString","read","match","RegExp","decodeURIComponent","remove","now","xhrAdapter","dispatchXhrRequest","requestData","data","requestHeaders","XMLHttpRequest","loadEvent","xDomain","env","NODE_ENV","XDomainRequest","onprogress","handleProgress","ontimeout","handleTimeout","auth","username","password","Authorization","open","method","timeout","handleLoad","readyState","responseURL","responseHeaders","getAllResponseHeaders","responseData","responseType","responseText","statusText","onerror","handleError","cookies","xsrfValue","withCredentials","xsrfCookieName","undefined","xsrfHeaderName","setRequestHeader","e","onDownloadProgress","addEventListener","onUploadProgress","upload","cancelToken","promise","then","onCanceled","cancel","abort","send","DEFAULT_CONTENT_TYPE","setContentTypeIfUnset","getDefaultAdapter","adapter","defaults","transformRequest","transformResponse","JSON","parse","maxContentLength","common","forEachMethodNoData","forEachMethodWithData","InterceptorManager","handlers","use","fulfilled","rejected","eject","id","forEachHandler","h","transformData","fns","transform","isCancel","__CANCEL__","throwIfCancellationRequested","throwIfRequested","dispatchRequest","cleanHeaderConfig","onAdapterResolution","onAdapterRejection","reason","isAbsoluteURL","combineURLs","baseURL","relativeURL","Axios","instanceConfig","interceptors","chain","unshiftRequestInterceptors","interceptor","unshift","pushResponseInterceptors","shift","Cancel","CancelToken","executor","resolvePromise","promiseExecutor","token","source","c","spread","callback","arr","createInstance","defaultConfig","context","instance","axios","all","promises","$getOwnPropertyDescriptor","$Object","_assign","createArrayMethod","$has","weak","assign","_defineProperty","freeGlobal","Symbol","root","objectProto","symToStringTag","nativeObjectToString","getRawTag","objectToString","overArg","isObjectLike","baseGetTag","getPrototype","EXPIRED","debug","Expirable","ttl","_value","expiredAt","expired","Cache","_map","get","cache","set","tryAll","promiseConstructors","catch","slice","tap","decodeDate","date","__type","iso","toNumber","keyRemap","keymap","reduce","newObj","newKey","isIE10","getStaticProperty","klass","property","__proto__","union","difference","filter","bSet","x","internal","object","removeNull","isPlainObject","prop","ensureArray","target","setValue","segs","lastSeg","pop","currentTarget","seg","isWeapp","wx","connectSocket","throttle","throttleMeta","propertyMeta","previouseTimestamp","remainingTime","wait","setTimeout","WebSocket","MozWebSocket","HEARTBEAT_TIME","TIMEOUT_TIME","DEFAULT_RETRY_STRATEGY","Math","pow","attempt","requireConnected","requireConnectedWrapper","is","currentState","current","console","warn","WebSocketPlus","getUrls","_getUrls","_protocol","init","_createWs","__postponeTimeoutTimer","_postponeTimeoutTimer","__pause","pause","__resume","resume","throw","wsUrls","urls","ws","binaryType","onopen","onclose","_ws","_handleClose","onmessage","_handleMessage","_destroyWs","close","onbeforeevent","event","to","payload","emit","onconnected","_startConnectionKeeper","onleaveconnected","_stopConnectionKeeper","onpause","onbeforeresume","onreconnect","ondisconnected","delay","__scheduledRetry","clearTimeout","retry","onretry","can","reconnect","fail","removeEventListener","_ping","ping","_clearTimeoutTimers","_timeoutTimer","disconnect","_heartbeatTimer","setInterval","addListener","removeListener","clearInterval","isFinished","handleClose","handleMessage","EventEmitter","StateMachine","initial","state","defer","terminal","events","ErrorCode","Number","errorMessage","appCode","detail","err","COMMAND_TIMEOUT","Connection","getUrl","format","version","protocolString","_protocalFormat","_commands","_serialId","command","waitingForRespond","serialId","toBase64","toArrayBuffer","msg","decode","cmd","echo","checkType","param","constructor","middleware","_pluginName","applyDecorators","decorators","decorator","applyMiddlewares","middlewares","previousPromise","applyDispatcher","dispatchers","resultPromise","dispatcher","shouldDispatch","pushRouterCache","Realtime","options","appId","_options","region","pushOfflineMessages","noBinary","ssl","server","SERVER","_cache","clients","_plugins","__preRegisteredPlugins","plugins","plugin","hook","concat","onRealtimeCreate","_open","_openPromise","connection","_getEndpoints","on","_dispatchCommand","client","isFatal","APP_NOT_AVAILABLE","INVALID_LOGIN","INVALID_ORIGIN","some","errorCode","_fetchEndpointsInfo","info","secondary","_fetchPushRouter","cachedPushRouter","res","route","pushRouter","push_router_server","router","features","_t","_close","cannot","_register","add","_deregister","delete","size","beforeCommandDispatch","rng","bytesToUuid","_isIterable2","_getIterator2","isPrototype","nativeKeys","coreJsData","funcProto","funcToString","isMasked","toSource","getValue","baseIsNative","getNative","Promise","mapTag","objectTag","setTag","DataView","Map","Set","WeakMap","baseIsArguments","isLength","stubFalse","argsTag","funcTag","weakMapTag","dataViewTag","nodeUtil","baseUnary","baseIsTypedArray","isArrayLike","isTypedArray","isArguments","getTag","baseKeys","eq","assocIndexOf","listCacheClear","listCacheDelete","listCacheGet","listCacheHas","listCacheSet","ListCache","nativeCreate","HASH_UNDEFINED","hashClear","hashDelete","hashGet","hashHas","hashSet","Hash","isKeyable","getMapData","mapCacheClear","mapCacheDelete","mapCacheGet","mapCacheHas","mapCacheSet","MapCache","stackClear","stackDelete","stackGet","stackHas","stackSet","defineProperty","baseAssignValue","MAX_SAFE_INTEGER","baseTimes","isIndex","keys","arrayLikeKeys","copyObject","nativeKeysIn","keysIn","baseKeysIn","propertyIsEnumerable","stubArray","arrayFilter","getSymbols","nativeGetSymbols","arrayPush","getSymbolsIn","baseGetAllKeys","Uint8Array","cloneArrayBuffer","CLONE_DEEP_FLAG","mapToArray","arrayReduce","addMapEntry","setToArray","addSetEntry","boolTag","dateTag","numberTag","regexpTag","stringTag","symbolTag","arrayBufferTag","float32Tag","float64Tag","int8Tag","int16Tag","int32Tag","uint8Tag","uint8ClampedTag","uint16Tag","uint32Tag","cloneDataView","cloneTypedArray","cloneMap","cloneRegExp","cloneSet","cloneSymbol","baseCreate","CLONE_SYMBOLS_FLAG","arrayTag","errorTag","genTag","initCloneArray","copyArray","cloneBuffer","initCloneObject","copySymbolsIn","baseAssignIn","copySymbols","baseAssign","initCloneByTag","Stack","getAllKeysIn","getAllKeys","arrayEach","baseClone","_validateSignature","signatureResult","signature","timestamp","nonce","signatureFactory","MessageStatus","NONE","SENDING","SENT","DELIVERED","FAILED","rMessageStatus","READ","Message","content","uuid","cid","needReceipt","transient","_setStatus","setNeedReceipt","setTransient","toJSON","_status","json","_updatedAt","messageType","type","TYPE","_lctype","_getType","messageField","fields","originalCustomFields","_customFields","IE10Compatible","TypedMessage","_","setText","text","_lctext","getText","setAttributes","attributes","_lcattrs","getAttributes","_getCustomFields","field","customFields","RecalledMessage","Conversation","creator","createdAt","updatedAt","lastMessageAt","lastMessage","mutedMembers","members","system","muted","_attributes","_reset","messagesWaitingForReceipt","lastDeliveredAt","lastReadAt","unreadMessagesCount","IMClient","_client","_debug","onConversationCreate","_setLastDeliveredAt","_setLastReadAt","setName","currentAttributes","pendingAttributes","pendingKeys","re","childKeys","k","parentKey","cloneDeep","_send","convMessage","save","attr","isEmpty","op","resCommand","udate","fetch","getQuery","equalTo","find","mute","unmute","count","clientIds","m","conversationSignatureFactory","sort","runSignatureFactory","quit","reciept","receipt","sendOptions","priority","pushData","will","sendPromise","directMessage","r","dt","ackMessage","t","_update","newMessage","recall","patch","modify","patchMessage","patches","mid","lastPatchTime","_lastPatchTime","update","queryMessages","beforeMessageId","beforeTime","afterMessageId","afterTime","conditions","limit","getTime","tt","logsMessage","logs","msgId","patchTimestamp","ackAt","readAt","_messageParser","messageProps","deliveredAt","createMessagesIterator","next","prevMessages","done","readConversationsBuffer","_doSendRead","markAsRead","_handleReceipt","messageId","fetchReceiptTimestamps","maxReadTimestamp","maxAckTimestamp","_fetchAllReceiptTimestamps","queryAllMembers","maxReadTuples","maxReadTuple","pid","_createdAt","time","_lastMessageAt","ConversationQuery","_encode","_quote","s","_calculateFlag","prev","Boolean","_where","_extraOptions","_addCondition","condition","where","flag","_skip","skip","_limit","_order","containsMembers","peerIds","containsAll","withMembers","includeSelf","peerIdsSet","sizeEqualTo","lessThan","lessThanOrEqualTo","greaterThan","greaterThanOrEqualTo","notEqualTo","exists","doesNotExist","containedIn","values","notContainsIn","contains","subString","startsWith","prefix","endsWith","suffix","matches","regex","_modifiers","ignoreCase","multiline","ascending","addAscending","descending","addDescending","withLastMessagesRefreshed","enabled","withLastMessages","compact","_executeQuery","props","_connection","_conversationCache","_ackMessageBuffer","_eventemitter","onIMClientCreate","conv","_dispatchConvMessage","direct","_dispatchDirectMessage","session","_dispatchSessionMessage","unread","_dispatchUnreadMessage","rcp","_dispatchRcpMessage","_dispatchPatchMessage","sessionMessage","closed","SESSION_CONFLICT","unreadMessage","convs","notifTime","lastUnreadNotifTime","getConversations","ts","getConversation","conversation","countNotUpdated","lastMessageId","lastMessageTimestamp","conversations","rcpMessage","conversationId","patchTime","initBy","joined","invitedBy","left","kickedBy","members_joined","members_left","originalMessage","fromPeerId","_dispatchParsedMessage","beforeMessageDispatch","_sendAck","_doSendAck","convAckMessages","timestamps","fromts","tots","max","peerId","tag","deviceId","isReconnect","ua","VERSION","configBitmap","sessionToken","st","tokenTTL","stTtl","SESSION_TOKEN_EXPIRED","sessionPeerIds","onlineSessionPeerIds","noCache","cachedConversation","ids","remoteConversationIds","query","queryJSON","results","commandString","_parseConversationFromRawData","fetchedConversation","rawData","objectId","lm","msg_from","msg_mid","msg_timestamp","patch_timestamp","tr","sys","mu","lastMessageFrom","lastMessagePatchTimestamp","createConversation","unique","properties","startCommandJson","cdate","markAllAsRead","clear","_sendReadCommand","readMessage","TextMessage","tryParseJson","wrapper","applyPlugins","beforeMessageParse","decoratedJson","afterMessageParse","MessageParser","_messageClasses","register","messageClass","Klass","contentCopy","valid","MessagePriority","HIGH","NORMAL","LOW","defineConversationProperty","realtime","_IMClients","messageParser","messageClasses","createIMClient","clientOptions","idIsString","targetClient","IMPlugin"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAA;AACA,QAAI,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;AACrB,QAAI,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;AACvB,kBAAc,GAAG,UAAU,EAAE,EAAE;MAC7B,OAAO,KAAK,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,GAAG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lD,OAAxB,CAAV;AAAA,IAAA,KAAnC,EAA+E/I,KAA/E,CAAqFb,OAArF;AACD,IAAA,GAFD,MAEO;AACLA,IAAAA,YACE,sEADF,EAEExP,OAAKoZ,OAAL,CAFF;AAID,IAAA;AACD,IAAA,SAAO,KAAP;AACD,IAAA,CAZD;;AAcA,AAAO,QAAM2iB,WAAW;AACtBt6B,IAAAA,QAAM,8BADgB;AAEtBua,IAAAA,oCAFsB;AAGtBiC,IAAAA,8CAHsB;AAItByd,IAAAA,kBAAgB,CACdpU,OADc,EAEdoC,eAFc,EAGd0Q,WAHc;AAJM,IAAA,CAAjB;;IC9MPtf,SAASwgB,0BAAT,GAAsCA,0BAAtC;AACAxgB,IAAAA,SAASa,sBAAT,GAAkC,CAACogB,QAAD,CAAlC,CAEA,AAEA;;;;;;;;;;;;;;;;;;;;;"}
\ No newline at end of file
diff --git a/dist/realtime.browser.min.js b/dist/realtime.browser.min.js
new file mode 100644
index 000000000..a6aa5ac71
--- /dev/null
+++ b/dist/realtime.browser.min.js
@@ -0,0 +1,9 @@
+!function(a,b){"object"==typeof exports&&"undefined"!=typeof module?b(exports):"function"==typeof define&&define.amd?define("leancloud-realtime",["exports"],b):b(a.AV=a.AV||{})}(this,function(a){"use strict";function b(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function c(a){return a&&a.__esModule?a.default:a}function d(a,b){return b={exports:{}},a(b,b.exports),b.exports}function e(a){var b,c;this.promise=new a(function(a,d){if(void 0!==b||void 0!==c)throw TypeError("Bad Promise constructor");b=a,c=d}),this.resolve=Ib(b),this.reject=Ib(c)}function f(a){if(a=String(a),!(a.length>100)){var b=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(a);if(b){var c=parseFloat(b[1]);switch((b[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*Ug;case"days":case"day":case"d":return c*Tg;case"hours":case"hour":case"hrs":case"hr":case"h":return c*Sg;case"minutes":case"minute":case"mins":case"min":case"m":return c*Rg;case"seconds":case"second":case"secs":case"sec":case"s":return c*Qg;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}}}function g(a){return a>=Tg?Math.round(a/Tg)+"d":a>=Sg?Math.round(a/Sg)+"h":a>=Rg?Math.round(a/Rg)+"m":a>=Qg?Math.round(a/Qg)+"s":a+"ms"}function h(a){return i(a,Tg,"day")||i(a,Sg,"hour")||i(a,Rg,"minute")||i(a,Qg,"second")||a+" ms"}function i(a,b,c){if(!(a>8-f%1*8)){if((c=d.charCodeAt(f+=.75))>255)throw new F;b=b<<8|c}return e}function H(a,b){!_g.isUndefined(a)&&_g.isUndefined(a["Content-Type"])&&(a["Content-Type"]=b)}function I(){this.handlers=[]}function J(a){a.cancelToken&&a.cancelToken.throwIfRequested()}function K(a){this.defaults=a,this.interceptors={request:new th,response:new th}}function L(a){this.message=a}function M(a){if("function"!=typeof a)throw new TypeError("executor must be a function.");var b;this.promise=new ke(function(a){b=a});var c=this;a(function(a){c.reason||(c.reason=new Ah(a),b(c.reason))})}function N(a){var b=new zh(a),c=Yg(zh.prototype.request,b);return _g.extend(c,zh.prototype,b),_g.extend(c,b),c}function O(a){var b=qi.call(a,si),c=a[si];try{a[si]=void 0;var d=!0}catch(a){}var e=ri.call(a);return d&&(b?a[si]=c:delete a[si]),e}function P(a){return vi.call(a)}function Q(a){return null==a?void 0===a?yi:xi:zi&&zi in Object(a)?ti(a):wi(a)}function R(a,b){return function(c){return a(b(c))}}function S(a){return null!=a&&"object"==typeof a}function T(a){if(!Ei(a)||Ai(a)!=Fi)return!1;var b=Di(a);if(null===b)return!0;var c=Ji.call(b,"constructor")&&b.constructor;return"function"==typeof c&&c instanceof c&&Ii.call(c)==Ki}function U(a,b,c,d,e){var f={};return Object.keys(d).forEach(function(a){f[a]=d[a]}),f.enumerable=!!f.enumerable,f.configurable=!!f.configurable,("value"in f||f.initializer)&&(f.writable=!0),f=c.slice().reverse().reduce(function(c,d){return d(a,b,c)||c},f),e&&void 0!==f.initializer&&(f.value=f.initializer?f.initializer.call(e):void 0,f.initializer=void 0),void 0===f.initializer&&(Object.defineProperty(a,b,f),f=null),f}function V(a,b){var c=b||0,d=Jj;return d[a[c++]]+d[a[c++]]+d[a[c++]]+d[a[c++]]+"-"+d[a[c++]]+d[a[c++]]+"-"+d[a[c++]]+d[a[c++]]+"-"+d[a[c++]]+d[a[c++]]+"-"+d[a[c++]]+d[a[c++]]+d[a[c++]]+d[a[c++]]+d[a[c++]]+d[a[c++]]}function W(a,b,c){var d=b&&c||0;"string"==typeof a&&(b="binary"==a?new Array(16):null,a=null),a=a||{};var e=a.random||(a.rng||Ij)();if(e[6]=15&e[6]|64,e[8]=63&e[8]|128,b)for(var f=0;f<16;++f)b[d+f]=e[f];return b||Lj(e)}function X(a){var b=a&&a.constructor;return a===("function"==typeof b&&b.prototype||ck)}function Y(a){if(!dk(a))return fk(a);var b=[];for(var c in Object(a))hk.call(a,c)&&"constructor"!=c&&b.push(c);return b}function Z(a){var b=typeof a;return null!=a&&("object"==b||"function"==b)}function $(a){if(!jk(a))return!1;var b=Ai(a);return b==lk||b==mk||b==kk||b==nk}function _(a){return!!rk&&rk in a}function aa(a){if(null!=a){try{return uk.call(a)}catch(a){}try{return a+""}catch(a){}}return""}function ba(a){return!(!jk(a)||sk(a))&&(ok(a)?Ck:xk).test(vk(a))}function ca(a,b){return null==a?void 0:a[b]}function da(a,b){var c=Ek(a,b);return Dk(c)?c:void 0}function ea(a){return Ei(a)&&Ai(a)==Xk}function fa(a){return"number"==typeof a&&a>-1&&a%1==0&&a<=el}function ga(a){return null!=a&&fl(a.length)&&!ok(a)}function ha(){return!1}function ia(a){return Ei(a)&&fl(a.length)&&!!jl[Ai(a)]}function ja(a){return function(b){return a(b)}}function ka(a){if(null==a)return!0;if(gl(a)&&(dl(a)||"string"==typeof a||"function"==typeof a.splice||il(a)||pl(a)||bl(a)))return!a.length;var b=Wk(a);if(b==ql||b==rl)return!a.size;if(dk(a))return!ik(a).length;for(var c in a)if(tl.call(a,c))return!1;return!0}function la(){this.__data__=[],this.size=0}function ma(a,b){return a===b||a!==a&&b!==b}function na(a,b){for(var c=a.length;c--;)if(wl(a[c][0],b))return c;return-1}function oa(a){var b=this.__data__,c=xl(b,a);return!(c<0)&&(c==b.length-1?b.pop():zl.call(b,c,1),--this.size,!0)}function pa(a){var b=this.__data__,c=xl(b,a);return c<0?void 0:b[c][1]}function qa(a){return xl(this.__data__,a)>-1}function ra(a,b){var c=this.__data__,d=xl(c,a);return d<0?(++this.size,c.push([a,b])):c[d][1]=b,this}function sa(a){var b=-1,c=null==a?0:a.length;for(this.clear();++b-1&&a%1==0&&a0&&void 0!==arguments[0]?arguments[0]:{},b=a.signature,c=a.timestamp,d=a.nonce;if("string"!=typeof b||"number"!=typeof c||"string"!=typeof d)throw new Error("malformed signature");return{signature:b,timestamp:c,nonce:d}}function zb(a,b,c,d,e){var f={};return Object.keys(d).forEach(function(a){f[a]=d[a]}),f.enumerable=!!f.enumerable,f.configurable=!!f.configurable,("value"in f||f.initializer)&&(f.writable=!0),f=c.slice().reverse().reduce(function(c,d){return d(a,b,c)||c},f),e&&void 0!==f.initializer&&(f.value=f.initializer?f.initializer.call(e):void 0,f.initializer=void 0),void 0===f.initializer&&(Object.defineProperty(a,b,f),f=null),f}var Ab=window&&window.process||{};Ab.env=Ab.env||{};var Bb="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Cb=Math.ceil,Db=Math.floor,Eb=function(a){return isNaN(a=+a)?0:(a>0?Db:Cb)(a)},Fb=function(a){if(void 0==a)throw TypeError("Can't call method on  "+a);return a},Gb=d(function(a){var b=a.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=b)}),Hb=d(function(a){var b=a.exports={version:"2.5.1"};"number"==typeof __e&&(__e=b)}),Ib=function(a){if("function"!=typeof a)throw TypeError(a+" is not a function!");return a},Jb=function(a,b,c){if(Ib(a),void 0===b)return a;switch(c){case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)}}return function(){return a.apply(b,arguments)}},Kb=function(a){return"object"==typeof a?null!==a:"function"==typeof a},Lb=function(a){if(!Kb(a))throw TypeError(a+" is not an object!");return a},Mb=function(a){try{return!!a()}catch(a){return!0}},Nb=!Mb(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),Ob=Gb.document,Pb=Kb(Ob)&&Kb(Ob.createElement),Qb=function(a){return Pb?Ob.createElement(a):{}},Rb=!Nb&&!Mb(function(){return 7!=Object.defineProperty(Qb("div"),"a",{get:function(){return 7}}).a}),Sb=function(a,b){if(!Kb(a))return a;var c,d;if(b&&"function"==typeof(c=a.toString)&&!Kb(d=c.call(a)))return d;if("function"==typeof(c=a.valueOf)&&!Kb(d=c.call(a)))return d;if(!b&&"function"==typeof(c=a.toString)&&!Kb(d=c.call(a)))return d;throw TypeError("Can't convert object to primitive value")},Tb=Object.defineProperty,Ub=Nb?Object.defineProperty:function(a,b,c){if(Lb(a),b=Sb(b,!0),Lb(c),Rb)try{return Tb(a,b,c)}catch(a){}if("get"in c||"set"in c)throw TypeError("Accessors not supported!");return"value"in c&&(a[b]=c.value),a},Vb={f:Ub},Wb=function(a,b){return{enumerable:!(1&a),configurable:!(2&a),writable:!(4&a),value:b}},Xb=Nb?function(a,b,c){return Vb.f(a,b,Wb(1,c))}:function(a,b,c){return a[b]=c,a},Yb=function(a,b,c){var d,e,f,g=a&Yb.F,h=a&Yb.G,i=a&Yb.S,j=a&Yb.P,k=a&Yb.B,l=a&Yb.W,m=h?Hb:Hb[b]||(Hb[b]={}),n=m.prototype,o=h?Gb:i?Gb[b]:(Gb[b]||{}).prototype;h&&(c=b);for(d in c)(e=!g&&o&&void 0!==o[d])&&d in m||(f=e?o[d]:c[d],m[d]=h&&"function"!=typeof o[d]?c[d]:k&&e?Jb(f,Gb):l&&o[d]==f?function(a){var b=function(b,c,d){if(this instanceof a){switch(arguments.length){case 0:return new a;case 1:return new a(b);case 2:return new a(b,c)}return new a(b,c,d)}return a.apply(this,arguments)};return b.prototype=a.prototype,b}(f):j&&"function"==typeof f?Jb(Function.call,f):f,j&&((m.virtual||(m.virtual={}))[d]=f,a&Yb.R&&n&&!n[d]&&Xb(n,d,f)))};Yb.F=1,Yb.G=2,Yb.S=4,Yb.P=8,Yb.B=16,Yb.W=32,Yb.U=64,Yb.R=128;var Zb=Yb,$b=Xb,_b={}.hasOwnProperty,ac=function(a,b){return _b.call(a,b)},bc={},cc={}.toString,dc=function(a){return cc.call(a).slice(8,-1)},ec=Object("z").propertyIsEnumerable(0)?Object:function(a){return"String"==dc(a)?a.split(""):Object(a)},fc=function(a){return ec(Fb(a))},gc=Math.min,hc=function(a){return a>0?gc(Eb(a),9007199254740991):0},ic=Math.max,jc=Math.min,kc=function(a,b){return a=Eb(a),a<0?ic(a+b,0):jc(a,b)},lc=Gb["__core-js_shared__"]||(Gb["__core-js_shared__"]={}),mc=function(a){return lc[a]||(lc[a]={})},nc=0,oc=Math.random(),pc=function(a){return"Symbol(".concat(void 0===a?"":a,")_",(++nc+oc).toString(36))},qc=mc("keys"),rc=function(a){return qc[a]||(qc[a]=pc(a))},sc=function(a){return function(b,c,d){var e,f=fc(b),g=hc(f.length),h=kc(d,g);if(a&&c!=c){for(;g>h;)if((e=f[h++])!=e)return!0}else for(;g>h;h++)if((a||h in f)&&f[h]===c)return a||h||0;return!a&&-1}}(!1),tc=rc("IE_PROTO"),uc=function(a,b){var c,d=fc(a),e=0,f=[];for(c in d)c!=tc&&ac(d,c)&&f.push(c);for(;b.length>e;)ac(d,c=b[e++])&&(~sc(f,c)||f.push(c));return f},vc="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),wc=Object.keys||function(a){return uc(a,vc)},xc=Nb?Object.defineProperties:function(a,b){Lb(a);for(var c,d=wc(b),e=d.length,f=0;e>f;)Vb.f(a,c=d[f++],b[c]);return a},yc=Gb.document,zc=yc&&yc.documentElement,Ac=rc("IE_PROTO"),Bc=function(){},Cc=function(){var a,b=Qb("iframe"),c=vc.length;for(b.style.display="none",zc.appendChild(b),b.src="javascript:",a=b.contentWindow.document,a.open(),a.write("