From 23fb37930fb0a91383850cde5d934de7b482a453 Mon Sep 17 00:00:00 2001 From: Ma Bingyao Date: Thu, 14 Jul 2016 01:13:19 +0800 Subject: [PATCH] Update to v2.0.11 --- bower.json | 4 +- dist/hprose-html5.js | 6376 +------------------------------------- dist/hprose-html5.min.js | 2 +- gulpfile.js | 2 +- package.json | 4 +- src/CopyRight.js | 2 +- 6 files changed, 11 insertions(+), 6379 deletions(-) diff --git a/bower.json b/bower.json index d2261cc..94b7c94 100644 --- a/bower.json +++ b/bower.json @@ -1,8 +1,8 @@ { "author": "Ma Bingyao ", "name": "hprose-html5", - "version": "2.0.10", - "description": "Hprose is a High Performance Remote Object Service Engine. It is a modern, lightweight, cross-language, cross-platform, object-oriented, high performance, remote dynamic communication middleware.", + "version": "2.0.11", + "description": "Hprose is a High Performance Remote Object Service Engine.", "keywords": [ "hprose", "rpc", diff --git a/dist/hprose-html5.js b/dist/hprose-html5.js index 2521013..bc5adea 100644 --- a/dist/hprose-html5.js +++ b/dist/hprose-html5.js @@ -1,6377 +1,9 @@ -// Hprose for HTML5 v2.0.10 +// Hprose for HTML5 v2.0.11 // Copyright (c) 2008-2016 http://hprose.com // Hprose is freely distributable under the MIT license. // For all details and documentation: // https://github.com/hprose/hprose-html5 -/**********************************************************\ -| | -| hprose | -| | -| Official WebSite: http://www.hprose.com/ | -| http://www.hprose.org/ | -| | -\**********************************************************/ - -/**********************************************************\ - * * - * Init.js * - * * - * hprose init for HTML5. * - * * - * LastModified: Feb 23, 2016 * - * Author: Ma Bingyao * - * * -\**********************************************************/ - -(function (global) { - 'use strict'; - - global.hprose = Object.create(null); - -})(this); - -/**********************************************************\ -| | -| hprose | -| | -| Official WebSite: http://www.hprose.com/ | -| http://www.hprose.org/ | -| | -\**********************************************************/ - -/**********************************************************\ - * * - * Helper.js * - * * - * hprose helper for HTML5. * - * * - * LastModified: Mar 2, 2016 * - * Author: Ma Bingyao * - * * -\**********************************************************/ - -(function (global, undefined) { - 'use strict'; - - function generic(method) { - if (typeof method !== "function") { - throw new TypeError(method + " is not a function"); - } - return function(context) { - return method.apply(context, Array.prototype.slice.call(arguments, 1)); - }; - } - - var arrayLikeObjectArgumentsEnabled = true; - - try { - String.fromCharCode.apply(String, new Uint8Array([1])); - } - catch (e) { - arrayLikeObjectArgumentsEnabled = false; - } - - function toArray(arrayLikeObject) { - var n = arrayLikeObject.length; - var a = new Array(n); - for (var i = 0; i < n; ++i) { - a[i] = arrayLikeObject[i]; - } - return a; - } - - var getCharCodes = arrayLikeObjectArgumentsEnabled ? function(bytes) { return bytes; } : toArray; - - function toBinaryString(bytes) { - if (bytes instanceof ArrayBuffer) { - bytes = new Uint8Array(bytes); - } - var n = bytes.length; - if (n < 100000) { - return String.fromCharCode.apply(String, getCharCodes(bytes)); - } - var remain = n & 0xFFFF; - var count = n >> 16; - var a = new Array(remain ? count + 1 : count); - for (var i = 0; i < count; ++i) { - a[i] = String.fromCharCode.apply(String, getCharCodes(bytes.subarray(i << 16, (i + 1) << 16))); - } - if (remain) { - a[count] = String.fromCharCode.apply(String, getCharCodes(bytes.subarray(count << 16, n))); - } - return a.join(''); - } - - function toUint8Array(bs) { - var n = bs.length; - var data = new Uint8Array(n); - for (var i = 0; i < n; i++) { - data[i] = bs.charCodeAt(i) & 0xFF; - } - return data; - } - - global.hprose.generic = generic; - global.hprose.toBinaryString = toBinaryString; - global.hprose.toUint8Array = toUint8Array; - global.hprose.toArray = toArray; - -})(this); - -/**********************************************************\ -| | -| hprose | -| | -| Official WebSite: http://www.hprose.com/ | -| http://www.hprose.org/ | -| | -\**********************************************************/ - -/**********************************************************\ - * * - * Polyfill.js * - * * - * Polyfill for JavaScript. * - * * - * LastModified: Mar 2, 2016 * - * Author: Ma Bingyao * - * * -\**********************************************************/ - -(function (global, undefined) { - 'use strict'; - /* Function */ - if (!Function.prototype.bind) { - Object.defineProperty(Function.prototype, 'bind', { value: function(oThis) { - if (typeof this !== 'function') { - throw new TypeError('Function.prototype.bind - what is trying to be bound is not callable'); - } - var aArgs = Array.prototype.slice.call(arguments, 1), - toBind = this, - NOP = function() {}, - bound = function() { - return toBind.apply(this instanceof NOP ? this : oThis, - aArgs.concat(Array.prototype.slice.call(arguments))); - }; - if (this.prototype) { - NOP.prototype = this.prototype; - } - bound.prototype = new NOP(); - return bound; - } }); - } - /* Array */ - if (!Array.prototype.includes) { - Object.defineProperty(Array.prototype, 'includes', { value: function(searchElement /*, fromIndex*/ ) { - var O = Object(this); - var len = parseInt(O.length, 10) || 0; - if (len === 0) { - return false; - } - var n = parseInt(arguments[1], 10) || 0; - var k; - if (n >= 0) { - k = n; - } - else { - k = len + n; - if (k < 0) { k = 0; } - } - var currentElement; - while (k < len) { - currentElement = O[k]; - if (searchElement === currentElement || - (searchElement !== searchElement && currentElement !== currentElement)) { // NaN !== NaN - return true; - } - k++; - } - return false; - } }); - } - if (!Array.prototype.find) { - Object.defineProperty(Array.prototype, 'find', { value: function(predicate) { - if (this === null || this === undefined) { - throw new TypeError('Array.prototype.find called on null or undefined'); - } - if (typeof predicate !== 'function') { - throw new TypeError('predicate must be a function'); - } - var list = Object(this); - var length = list.length >>> 0; - var thisArg = arguments[1]; - var value; - for (var i = 0; i < length; i++) { - value = list[i]; - if (predicate.call(thisArg, value, i, list)) { - return value; - } - } - return undefined; - } }); - } - if (!Array.prototype.findIndex) { - Object.defineProperty(Array.prototype, 'findIndex', { value: function(predicate) { - if (this === null || this === undefined) { - throw new TypeError('Array.prototype.findIndex called on null or undefined'); - } - if (typeof predicate !== 'function') { - throw new TypeError('predicate must be a function'); - } - var list = Object(this); - var length = list.length >>> 0; - var thisArg = arguments[1]; - var value; - - for (var i = 0; i < length; i++) { - value = list[i]; - if (predicate.call(thisArg, value, i, list)) { - return i; - } - } - return -1; - } }); - } - if (!Array.prototype.fill) { - Object.defineProperty(Array.prototype, 'fill', { value: function(value) { - if (this === null || this === undefined) { - throw new TypeError('this is null or not defined'); - } - var O = Object(this); - var len = O.length >>> 0; - var start = arguments[1]; - var relativeStart = start >> 0; - var k = relativeStart < 0 ? Math.max(len + relativeStart, 0) : Math.min(relativeStart, len); - var end = arguments[2]; - var relativeEnd = end === undefined ? len : end >> 0; - var f = relativeEnd < 0 ? Math.max(len + relativeEnd, 0) : Math.min(relativeEnd, len); - - while (k < f) { - O[k] = value; - k++; - } - return O; - } }); - } - if (!Array.prototype.copyWithin) { - Object.defineProperty(Array.prototype, 'copyWithin', { value: function(target, start/*, end*/) { - if (this === null || this === undefined) { - throw new TypeError('this is null or not defined'); - } - var O = Object(this); - var len = O.length >>> 0; - var relativeTarget = target >> 0; - var to = relativeTarget < 0 ? Math.max(len + relativeTarget, 0) : Math.min(relativeTarget, len); - var relativeStart = start >> 0; - var from = relativeStart < 0 ? Math.max(len + relativeStart, 0) : Math.min(relativeStart, len); - var end = arguments[2]; - var relativeEnd = end === undefined ? len : end >> 0; - var f = relativeEnd < 0 ? Math.max(len + relativeEnd, 0) : Math.min(relativeEnd, len); - var count = Math.min(f - from, len - to); - var direction = 1; - if (from < to && to < (from + count)) { - direction = -1; - from += count - 1; - to += count - 1; - } - while (count > 0) { - if (from in O) { - O[to] = O[from]; - } - else { - delete O[to]; - } - from += direction; - to += direction; - count--; - } - return O; - } }); - } - if (!Array.from) { - Object.defineProperty(Array, 'from', { value: (function() { - var toStr = Object.prototype.toString; - var isCallable = function(fn) { - return typeof fn === 'function' || toStr.call(fn) === '[object Function]'; - }; - var toInteger = function(value) { - var number = Number(value); - if (isNaN(number)) { return 0; } - if (number === 0 || !isFinite(number)) { return number; } - return (number > 0 ? 1 : -1) * Math.floor(Math.abs(number)); - }; - var maxSafeInteger = Math.pow(2, 53) - 1; - var toLength = function(value) { - var len = toInteger(value); - return Math.min(Math.max(len, 0), maxSafeInteger); - }; - - return function(arrayLike/*, mapFn, thisArg */) { - var C = this; - var items = Object(arrayLike); - if (arrayLike === null || arrayLike === undefined) { - throw new TypeError("Array.from requires an array-like object - not null or undefined"); - } - var mapFn = arguments.length > 1 ? arguments[1] : void undefined; - var T; - if (typeof mapFn !== 'undefined') { - if (!isCallable(mapFn)) { - throw new TypeError('Array.from: when provided, the second argument must be a function'); - } - if (arguments.length > 2) { - T = arguments[2]; - } - } - var len = toLength(items.length); - var A = isCallable(C) ? Object(new C(len)) : new Array(len); - var k = 0; - var kValue; - while (k < len) { - kValue = items[k]; - if (mapFn) { - A[k] = typeof T === 'undefined' ? mapFn(kValue, k) : mapFn.call(T, kValue, k); - } - else { - A[k] = kValue; - } - k += 1; - } - A.length = len; - return A; - }; - }()) }); - } - if (!Array.of) { - Object.defineProperty(Array, 'of', { value: function() { - return Array.prototype.slice.call(arguments); - } }); - } - /* String */ - if (!String.prototype.startsWith) { - Object.defineProperty(String.prototype, 'startsWith', { value: function(searchString, position){ - position = position || 0; - return this.substr(position, searchString.length) === searchString; - } }); - } - if (!String.prototype.endsWith) { - Object.defineProperty(String.prototype, 'endsWith', { value: function(searchString, position) { - var subjectString = this.toString(); - if (typeof position !== 'number' || !isFinite(position) || Math.floor(position) !== position || position > subjectString.length) { - position = subjectString.length; - } - position -= searchString.length; - var lastIndex = subjectString.indexOf(searchString, position); - return lastIndex !== -1 && lastIndex === position; - } }); - } - if (!String.prototype.includes) { - Object.defineProperty(String.prototype, 'includes', { value: function() { - if (typeof arguments[1] === "number") { - if (this.length < arguments[0].length + arguments[1].length) { - return false; - } - else { - return this.substr(arguments[1], arguments[0].length) === arguments[0]; - } - } - else { - return String.prototype.indexOf.apply(this, arguments) !== -1; - } - } }); - } - if (!String.prototype.repeat) { - Object.defineProperty(String.prototype, 'repeat', { value: function(count) { - var str = this.toString(); - count = +count; - if (count !== count) { - count = 0; - } - if (count < 0) { - throw new RangeError('repeat count must be non-negative'); - } - if (count === Infinity) { - throw new RangeError('repeat count must be less than infinity'); - } - count = Math.floor(count); - if (str.length === 0 || count === 0) { - return ''; - } - // Ensuring count is a 31-bit integer allows us to heavily optimize the - // main part. But anyway, most current (August 2014) browsers can't handle - // strings 1 << 28 chars or longer, so: - if (str.length * count >= 1 << 28) { - throw new RangeError('repeat count must not overflow maximum string size'); - } - var rpt = ''; - for (;;) { - if ((count & 1) === 1) { - rpt += str; - } - count >>>= 1; - if (count === 0) { - break; - } - str += str; - } - // Could we try: - // return Array(count + 1).join(this); - return rpt; - } }); - } - if (!String.prototype.trim) { - Object.defineProperty(String.prototype, 'trim', { value: function() { - return this.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g, ''); - } }); - } - if (!String.prototype.trimLeft) { - Object.defineProperty(String.prototype, 'trimLeft', { value: function() { - return this.toString().replace(/^[\s\xa0]+/, ''); - } }); - } - if (!String.prototype.trimRight) { - Object.defineProperty(String.prototype, 'trimRight', { value: function() { - return this.toString().replace(/[\s\xa0]+$/, ''); - } }); - } - /* Object */ - if (!Object.keys) { - Object.defineProperty(Object, 'keys', { value: (function () { - var hasOwnProperty = Object.prototype.hasOwnProperty, - hasDontEnumBug = !({toString: null}).propertyIsEnumerable('toString'), - dontEnums = [ - 'toString', - 'toLocaleString', - 'valueOf', - 'hasOwnProperty', - 'isPrototypeOf', - 'propertyIsEnumerable', - 'constructor' - ], - dontEnumsLength = dontEnums.length; - return function (obj) { - if (typeof obj !== 'object' && typeof obj !== 'function' || obj === null) { - throw new TypeError('Object.keys called on non-object'); - } - var result = []; - for (var prop in obj) { - if (hasOwnProperty.call(obj, prop)) { - result.push(prop); - } - } - if (hasDontEnumBug) { - for (var i=0; i < dontEnumsLength; i++) { - if (hasOwnProperty.call(obj, dontEnums[i])) { - result.push(dontEnums[i]); - } - } - } - return result; - }; - })() }); - } - /* Generic methods */ - var generic = global.hprose.generic; - - function genericMethods(obj, properties) { - var proto = obj.prototype; - for (var i = 0, len = properties.length; i < len; i++) { - var property = properties[i]; - var method = proto[property]; - if (typeof method === 'function' && typeof obj[property] === 'undefined') { - Object.defineProperty(obj, property, { value: generic(method) }); - } - } - } - genericMethods(Array, [ - "pop", - "push", - "reverse", - "shift", - "sort", - "splice", - "unshift", - "concat", - "join", - "slice", - "indexOf", - "lastIndexOf", - "filter", - "forEach", - "every", - "map", - "some", - "reduce", - "reduceRight", - "includes", - "find", - "findIndex" - ]); - genericMethods(String, [ - 'quote', - 'substring', - 'toLowerCase', - 'toUpperCase', - 'charAt', - 'charCodeAt', - 'indexOf', - 'lastIndexOf', - 'include', - 'startsWith', - 'endsWith', - 'repeat', - 'trim', - 'trimLeft', - 'trimRight', - 'toLocaleLowerCase', - 'toLocaleUpperCase', - 'match', - 'search', - 'replace', - 'split', - 'substr', - 'concat', - 'slice' - ]); - -})(this); - -/**********************************************************\ -| | -| hprose | -| | -| Official WebSite: http://www.hprose.com/ | -| http://www.hprose.org/ | -| | -\**********************************************************/ - -/**********************************************************\ - * * - * HarmonyMaps.js * - * * - * Harmony Maps for HTML5. * - * * - * LastModified: Mar 2, 2016 * - * Author: Ma Bingyao * - * * -\**********************************************************/ - -(function (global) { - 'use strict'; - - var hasWeakMap = 'WeakMap' in global; - var hasMap = 'Map' in global; - var hasForEach = true; - - if (hasMap) { - hasForEach = 'forEach' in new global.Map(); - } - - if (hasWeakMap && hasMap && hasForEach) { return; } - - var namespaces = Object.create(null); - var count = 0; - var reDefineValueOf = function (obj) { - var privates = Object.create(null); - var baseValueOf = obj.valueOf; - Object.defineProperty(obj, 'valueOf', { - value: function (namespace, n) { - if ((this === obj) && - (n in namespaces) && - (namespaces[n] === namespace)) { - if (!(n in privates)) { - privates[n] = Object.create(null); - } - return privates[n]; - } - else { - return baseValueOf.apply(this, arguments); - } - }, - writable: true, - configurable: true, - enumerable: false - }); - }; - - if (!hasWeakMap) { - global.WeakMap = function WeakMap() { - var namespace = Object.create(null); - var n = count++; - namespaces[n] = namespace; - var map = function (key) { - if (key !== Object(key)) { - throw new Error('value is not a non-null object'); - } - var privates = key.valueOf(namespace, n); - if (privates !== key.valueOf()) { - return privates; - } - reDefineValueOf(key); - return key.valueOf(namespace, n); - }; - var m = Object.create(WeakMap.prototype, { - get: { - value: function (key) { - return map(key).value; - } - }, - set: { - value: function (key, value) { - map(key).value = value; - } - }, - has: { - value: function (key) { - return 'value' in map(key); - } - }, - 'delete': { - value: function (key) { - return delete map(key).value; - } - }, - clear: { - value: function () { - delete namespaces[n]; - n = count++; - namespaces[n] = namespace; - } - } - }); - if (arguments.length > 0 && Array.isArray(arguments[0])) { - var iterable = arguments[0]; - for (var i = 0, len = iterable.length; i < len; i++) { - m.set(iterable[i][0], iterable[i][1]); - } - } - return m; - }; - } - - if (!hasMap) { - var objectMap = function () { - var namespace = Object.create(null); - var n = count++; - var nullMap = Object.create(null); - namespaces[n] = namespace; - var map = function (key) { - if (key === null) { return nullMap; } - var privates = key.valueOf(namespace, n); - if (privates !== key.valueOf()) { return privates; } - reDefineValueOf(key); - return key.valueOf(namespace, n); - }; - return { - get: function (key) { return map(key).value; }, - set: function (key, value) { map(key).value = value; }, - has: function (key) { return 'value' in map(key); }, - 'delete': function (key) { return delete map(key).value; }, - clear: function () { - delete namespaces[n]; - n = count++; - namespaces[n] = namespace; - } - }; - }; - var noKeyMap = function () { - var map = Object.create(null); - return { - get: function () { return map.value; }, - set: function (_, value) { map.value = value; }, - has: function () { return 'value' in map; }, - 'delete': function () { return delete map.value; }, - clear: function () { map = Object.create(null); } - }; - }; - var scalarMap = function () { - var map = Object.create(null); - return { - get: function (key) { return map[key]; }, - set: function (key, value) { map[key] = value; }, - has: function (key) { return key in map; }, - 'delete': function (key) { return delete map[key]; }, - clear: function () { map = Object.create(null); } - }; - }; - global.Map = function Map() { - var map = { - 'number': scalarMap(), - 'string': scalarMap(), - 'boolean': scalarMap(), - 'object': objectMap(), - 'function': objectMap(), - 'unknown': objectMap(), - 'undefined': noKeyMap(), - 'null': noKeyMap() - }; - var size = 0; - var keys = []; - var m = Object.create(Map.prototype, { - size: { - get : function () { return size; } - }, - get: { - value: function (key) { - return map[typeof(key)].get(key); - } - }, - set: { - value: function (key, value) { - if (!this.has(key)) { - keys.push(key); - size++; - } - map[typeof(key)].set(key, value); - } - }, - has: { - value: function (key) { - return map[typeof(key)].has(key); - } - }, - 'delete': { - value: function (key) { - if (this.has(key)) { - size--; - keys.splice(keys.indexOf(key), 1); - return map[typeof(key)]['delete'](key); - } - return false; - } - }, - clear: { - value: function () { - keys.length = 0; - for (var key in map) { map[key].clear(); } - size = 0; - } - }, - forEach: { - value: function (callback, thisArg) { - for (var i = 0, n = keys.length; i < n; i++) { - callback.call(thisArg, this.get(keys[i]), keys[i], this); - } - } - } - }); - if (arguments.length > 0 && Array.isArray(arguments[0])) { - var iterable = arguments[0]; - for (var i = 0, len = iterable.length; i < len; i++) { - m.set(iterable[i][0], iterable[i][1]); - } - } - return m; - }; - } - - if (!hasForEach) { - var OldMap = global.Map; - global.Map = function Map() { - var map = new OldMap(); - var size = 0; - var keys = []; - var m = Object.create(Map.prototype, { - size: { - get : function () { return size; } - }, - get: { - value: function (key) { - return map.get(key); - } - }, - set: { - value: function (key, value) { - if (!map.has(key)) { - keys.push(key); - size++; - } - map.set(key, value); - } - }, - has: { - value: function (key) { - return map.has(key); - } - }, - 'delete': { - value: function (key) { - if (map.has(key)) { - size--; - keys.splice(keys.indexOf(key), 1); - return map['delete'](key); - } - return false; - } - }, - clear: { - value: function () { - if ('clear' in map) { - map.clear(); - } - else { - for (var i = 0, n = keys.length; i < n; i++) { - map['delete'](keys[i]); - } - } - keys.length = 0; - size = 0; - } - }, - forEach: { - value: function (callback, thisArg) { - for (var i = 0, n = keys.length; i < n; i++) { - callback.call(thisArg, this.get(keys[i]), keys[i], this); - } - } - } - }); - if (arguments.length > 0 && Array.isArray(arguments[0])) { - var iterable = arguments[0]; - for (var i = 0, len = iterable.length; i < len; i++) { - m.set(iterable[i][0], iterable[i][1]); - } - } - return m; - }; - } -})(this); - -/**********************************************************\ -| | -| hprose | -| | -| Official WebSite: http://www.hprose.com/ | -| http://www.hprose.org/ | -| | -\**********************************************************/ - -/**********************************************************\ - * * - * TimeoutError.js * - * * - * TimeoutError for HTML5. * - * * - * LastModified: Jul 17, 2015 * - * Author: Ma Bingyao * - * * -\**********************************************************/ - -function TimeoutError(message) { - Error.call(this); - this.message = message; - this.name = TimeoutError.name; - if (typeof Error.captureStackTrace === 'function') { - Error.captureStackTrace(this, TimeoutError); - } -} - -TimeoutError.prototype = Object.create(Error.prototype); -TimeoutError.prototype.constructor = TimeoutError; - -/**********************************************************\ -| | -| hprose | -| | -| Official WebSite: http://www.hprose.com/ | -| http://www.hprose.org/ | -| | -\**********************************************************/ - -/**********************************************************\ - * * - * setImmediate.js * - * * - * setImmediate for HTML5. * - * * - * LastModified: Mar 2, 2016 * - * Author: Ma Bingyao * - * * -\**********************************************************/ - -(function(global, undefined) { - 'use strict'; - if (global.setImmediate) { return; } - - var doc = global.document; - var MutationObserver = global.MutationObserver || global.WebKitMutationObserver || global.MozMutationOvserver; - var polifill = {}; - var nextId = 1; - var tasks = {}; - - function wrap(handler) { - var args = Array.prototype.slice.call(arguments, 1); - return function() { - handler.apply(undefined, args); - }; - } - - function clear(handleId) { - delete tasks[handleId]; - } - - function run(handleId) { - var task = tasks[handleId]; - if (task) { - try { - task(); - } - finally { - clear(handleId); - } - } - } - - function create(args) { - tasks[nextId] = wrap.apply(undefined, args); - return nextId++; - } - - polifill.mutationObserver = function() { - var queue = [], - node = doc.createTextNode(''), - observer = new MutationObserver(function() { - while (queue.length > 0) { - run(queue.shift()); - } - }); - - observer.observe(node, {"characterData": true}); - - return function() { - var handleId = create(arguments); - queue.push(handleId); - node.data = handleId & 1; - return handleId; - }; - }; - - polifill.messageChannel = function() { - var channel = new global.MessageChannel(); - - channel.port1.onmessage = function(event) { - run(Number(event.data)); - }; - - return function() { - var handleId = create(arguments); - channel.port2.postMessage(handleId); - return handleId; - }; - }; - - polifill.nextTick = function() { - return function() { - var handleId = create(arguments); - global.process.nextTick( wrap( run, handleId ) ); - return handleId; - }; - }; - - polifill.postMessage = function() { - var iframe = doc.createElement('iframe'); - iframe.style.display = 'none'; - doc.documentElement.appendChild(iframe); - var iwin = iframe.contentWindow; - iwin.document.write(''); - iwin.document.close(); - var queue = []; - window.addEventListener('message', function() { - while (queue.length > 0) { - run(queue.shift()); - } - }); - return function() { - var handleId = create(arguments); - queue.push(handleId); - iwin.postMessage(1, "*"); - return handleId; - }; - }; - - polifill.readyStateChange = function() { - var html = doc.documentElement; - - return function() { - var handleId = create(arguments); - var script = doc.createElement('script'); - - script.onreadystatechange = function() { - run(handleId); - script.onreadystatechange = null; - html.removeChild(script); - script = null; - }; - - html.appendChild(script); - - return handleId; - }; - }; - - polifill.setTimeout = function() { - return function() { - var handleId = create(arguments); - global.setTimeout( wrap( run, handleId ), 0 ); - return handleId; - }; - }; - - // If supported, we should attach to the prototype of global, since that is where setTimeout et al. live. - var attachTo = Object.getPrototypeOf && Object.getPrototypeOf(global); - attachTo = (attachTo && attachTo.setTimeout ? attachTo : global); - - // Don't get fooled by e.g. browserify environments. - // For Node.js before 0.9 - if (typeof(global.process) !== 'undefined' && - Object.prototype.toString.call(global.process) === '[object process]' && - !global.process.browser) { - attachTo.setImmediate = polifill.nextTick(); - } - // For IE 6–9 - else if (doc && ('onreadystatechange' in doc.createElement('script'))) { - attachTo.setImmediate = polifill.readyStateChange(); - } - // For MutationObserver, where supported - else if (doc && MutationObserver) { - attachTo.setImmediate = polifill.mutationObserver(); - } - // For web workers, where supported - else if (global.MessageChannel) { - attachTo.setImmediate = polifill.messageChannel(); - } - // For non-IE modern browsers - else if (doc && 'postMessage' in global && 'addEventListener' in global) { - attachTo.setImmediate = polifill.postMessage(); - } - // For older browsers - else { - attachTo.setImmediate = polifill.setTimeout(); - } - - attachTo.clearImmediate = clear; -})(this); - -/**********************************************************\ -| | -| hprose | -| | -| Official WebSite: http://www.hprose.com/ | -| http://www.hprose.org/ | -| | -\**********************************************************/ - -/**********************************************************\ - * * - * Future.js * - * * - * hprose Future for HTML5. * - * * - * LastModified: Jun 7, 2016 * - * Author: Ma Bingyao * - * * -\**********************************************************/ - -(function (global, undefined) { - 'use strict'; - - var PENDING = 0; - var FULFILLED = 1; - var REJECTED = 2; - - var hasPromise = 'Promise' in global; - var setImmediate = global.setImmediate; - var setTimeout = global.setTimeout; - var clearTimeout = global.clearTimeout; - var TimeoutError = global.TimeoutError; - - function Future(computation) { - Object.defineProperties(this, { - _subscribers: { value: [] }, - resolve: { value: this.resolve.bind(this) }, - reject: { value: this.reject.bind(this) } - }); - var self = this; - if (typeof computation === 'function') { - setImmediate(function() { - try { - self.resolve(computation()); - } - catch(e) { - self.reject(e); - } - }); - } - } - - function isFuture(obj) { - return obj instanceof Future; - } - - function isPromise(obj) { - return isFuture(obj) || (hasPromise && (obj instanceof global.Promise) && (typeof (obj.then === 'function'))); - } - - function toPromise(obj) { - return (isPromise(obj) ? obj : value(obj)); - } - - function delayed(duration, value) { - var computation = (typeof value === 'function') ? - value : - function() { return value; }; - var future = new Future(); - setTimeout(function() { - try { - future.resolve(computation()); - } - catch(e) { - future.reject(e); - } - }, duration); - return future; - } - - function error(e) { - var future = new Future(); - future.reject(e); - return future; - } - - function value(v) { - var future = new Future(); - future.resolve(v); - return future; - } - - function sync(computation) { - try { - var result = computation(); - return value(result); - } - catch(e) { - return error(e); - } - } - - function promise(executor) { - var future = new Future(); - executor(future.resolve, future.reject); - return future; - } - - function arraysize(array) { - var size = 0; - Array.forEach(array, function() { ++size; }); - return size; - } - - function all(array) { - array = isPromise(array) ? array : value(array); - return array.then(function(array) { - var n = array.length; - var count = arraysize(array); - var result = new Array(n); - if (count === 0) { return value(result); } - var future = new Future(); - Array.forEach(array, function(element, index) { - toPromise(element).then(function(value) { - result[index] = value; - if (--count === 0) { - future.resolve(result); - } - }, - future.reject); - }); - return future; - }); - } - - function join() { - return all(arguments); - } - - function race(array) { - array = isPromise(array) ? array : value(array); - return array.then(function(array) { - var future = new Future(); - Array.forEach(array, function(element) { - toPromise(element).fill(future); - }); - return future; - }); - } - - function any(array) { - array = isPromise(array) ? array : value(array); - return array.then(function(array) { - var n = array.length; - var count = arraysize(array); - if (count === 0) { - throw new RangeError('any(): array must not be empty'); - } - var reasons = new Array(n); - var future = new Future(); - Array.forEach(array, function(element, index) { - toPromise(element).then(future.resolve, function(e) { - reasons[index] = e; - if (--count === 0) { - future.reject(reasons); - } - }); - }); - return future; - }); - } - - function settle(array) { - array = isPromise(array) ? array : value(array); - return array.then(function(array) { - var n = array.length; - var count = arraysize(array); - var result = new Array(n); - if (count === 0) { return value(result); } - var future = new Future(); - Array.forEach(array, function(element, index) { - var f = toPromise(element); - f.whenComplete(function() { - result[index] = f.inspect(); - if (--count === 0) { - future.resolve(result); - } - }); - }); - return future; - }); - } - - function attempt(handler/*, arg1, arg2, ... */) { - var args = Array.slice(arguments, 1); - return all(args).then(function(args) { - return handler.apply(undefined, args); - }); - } - - function run(handler, thisArg/*, arg1, arg2, ... */) { - var args = Array.slice(arguments, 2); - return all(args).then(function(args) { - return handler.apply(thisArg, args); - }); - } - - function wrap(handler, thisArg) { - return function() { - return all(arguments).then(function(args) { - return handler.apply(thisArg, args); - }); - }; - } - - function forEach(array, callback, thisArg) { - return all(array).then(function(array) { - return array.forEach(callback, thisArg); - }); - } - - function every(array, callback, thisArg) { - return all(array).then(function(array) { - return array.every(callback, thisArg); - }); - } - - function some(array, callback, thisArg) { - return all(array).then(function(array) { - return array.some(callback, thisArg); - }); - } - - function filter(array, callback, thisArg) { - return all(array).then(function(array) { - return array.filter(callback, thisArg); - }); - } - - function map(array, callback, thisArg) { - return all(array).then(function(array) { - return array.map(callback, thisArg); - }); - } - - function reduce(array, callback, initialValue) { - if (arguments.length > 2) { - return all(array).then(function(array) { - if (!isPromise(initialValue)) { - initialValue = value(initialValue); - } - return initialValue.then(function(value) { - return array.reduce(callback, value); - }); - }); - } - return all(array).then(function(array) { - return array.reduce(callback); - }); - } - - function reduceRight(array, callback, initialValue) { - if (arguments.length > 2) { - return all(array).then(function(array) { - if (!isPromise(initialValue)) { - initialValue = value(initialValue); - } - return initialValue.then(function(value) { - return array.reduceRight(callback, value); - }); - }); - } - return all(array).then(function(array) { - return array.reduceRight(callback); - }); - } - - function indexOf(array, searchElement, fromIndex) { - return all(array).then(function(array) { - if (!isPromise(searchElement)) { - searchElement = value(searchElement); - } - return searchElement.then(function(searchElement) { - return array.indexOf(searchElement, fromIndex); - }); - }); - } - - function lastIndexOf(array, searchElement, fromIndex) { - return all(array).then(function(array) { - if (!isPromise(searchElement)) { - searchElement = value(searchElement); - } - return searchElement.then(function(searchElement) { - if (fromIndex === undefined) { - fromIndex = array.length - 1; - } - return array.lastIndexOf(searchElement, fromIndex); - }); - }); - } - - function includes(array, searchElement, fromIndex) { - return all(array).then(function(array) { - if (!isPromise(searchElement)) { - searchElement = value(searchElement); - } - return searchElement.then(function(searchElement) { - return array.includes(searchElement, fromIndex); - }); - }); - } - - function find(array, predicate, thisArg) { - return all(array).then(function(array) { - return array.find(predicate, thisArg); - }); - } - - function findIndex(array, predicate, thisArg) { - return all(array).then(function(array) { - return array.findIndex(predicate, thisArg); - }); - } - - Object.defineProperties(Future, { - // port from Dart - delayed: { value: delayed }, - error: { value: error }, - sync: { value: sync }, - value: { value: value }, - // Promise compatible - all: { value: all }, - race: { value: race }, - resolve: { value: value }, - reject: { value: error }, - // extended methods - promise: { value: promise }, - isFuture: { value: isFuture }, - isPromise: { value: isPromise }, - toPromise: { value: toPromise }, - join: { value: join }, - any: { value: any }, - settle: { value: settle }, - attempt: { value: attempt }, - run: { value: run }, - wrap: { value: wrap }, - // for array - forEach: { value: forEach }, - every: { value: every }, - some: { value: some }, - filter: { value: filter }, - map: { value: map }, - reduce: { value: reduce }, - reduceRight: { value: reduceRight }, - indexOf: { value: indexOf }, - lastIndexOf: { value: lastIndexOf }, - includes: { value: includes }, - find: { value: find }, - findIndex: { value: findIndex } - }); - - function _call(callback, next, x) { - setImmediate(function() { - try { - var r = callback(x); - next.resolve(r); - } - catch(e) { - next.reject(e); - } - }); - } - - function _reject(onreject, next, e) { - if (onreject) { - _call(onreject, next, e); - } - else { - next.reject(e); - } - } - - function _resolve(onfulfill, onreject, self, next, x) { - function resolvePromise(y) { - _resolve(onfulfill, onreject, self, next, y); - } - function rejectPromise(r) { - _reject(onreject, next, r); - } - if (isPromise(x)) { - if (x === self) { - rejectPromise(new TypeError('Self resolution')); - return; - } - x.then(resolvePromise, rejectPromise); - return; - } - if ((x !== null) && - (typeof x === 'object') || - (typeof x === 'function')) { - var then; - try { - then = x.then; - } - catch (e) { - rejectPromise(e); - return; - } - if (typeof then === 'function') { - var notrun = true; - try { - then.call(x, function(y) { - if (notrun) { - notrun = false; - resolvePromise(y); - } - }, function(r) { - if (notrun) { - notrun = false; - rejectPromise(r); - } - }); - return; - } - catch (e) { - if (notrun) { - notrun = false; - rejectPromise(e); - } - } - return; - } - } - if (onfulfill) { - _call(onfulfill, next, x); - } - else { - next.resolve(x); - } - } - - Object.defineProperties(Future.prototype, { - _value: { writable: true }, - _reason: { writable: true }, - _state: { value: PENDING, writable: true }, - resolve: { value: function(value) { - if (this._state === PENDING) { - this._state = FULFILLED; - this._value = value; - var subscribers = this._subscribers; - while (subscribers.length > 0) { - var subscriber = subscribers.shift(); - _resolve(subscriber.onfulfill, - subscriber.onreject, - this, - subscriber.next, - value); - } - } - } }, - reject: { value: function(reason) { - if (this._state === PENDING) { - this._state = REJECTED; - this._reason = reason; - var subscribers = this._subscribers; - while (subscribers.length > 0) { - var subscriber = subscribers.shift(); - if (subscriber.onreject) { - _call(subscriber.onreject, - subscriber.next, - reason); - } - else { - subscriber.next.reject(reason); - } - } - } - } }, - then: { value: function(onfulfill, onreject) { - if (typeof onfulfill !== 'function') { onfulfill = null; } - if (typeof onreject !== 'function') { onreject = null; } - if (onfulfill || onreject) { - var next = new Future(); - if (this._state === FULFILLED) { - _resolve(onfulfill, onreject, this, next, this._value); - } - else if (this._state === REJECTED) { - if (onreject) { - _call(onreject, next, this._reason); - } - else { - next.reject(this._reason); - } - } - else { - this._subscribers.push({ - onfulfill: onfulfill, - onreject: onreject, - next: next - }); - } - return next; - } - return this; - } }, - done: { value: function(onfulfill, onreject) { - this.then(onfulfill, onreject).then(null, function(error) { - setImmediate(function() { throw error; }); - }); - } }, - inspect: { value: function() { - switch (this._state) { - case PENDING: return { state: 'pending' }; - case FULFILLED: return { state: 'fulfilled', value: this._value }; - case REJECTED: return { state: 'rejected', reason: this._reason }; - } - } }, - catchError: { value: function(onreject, test) { - if (typeof test === 'function') { - var self = this; - return this['catch'](function(e) { - if (test(e)) { - return self['catch'](onreject); - } - else { - throw e; - } - }); - } - return this['catch'](onreject); - } }, - 'catch': { value: function(onreject) { - return this.then(null, onreject); - } }, - fail: { value: function(onreject) { - this.done(null, onreject); - } }, - whenComplete: { value: function(action) { - return this.then( - function(v) { - var f = action(); - if (f === undefined) { return v; } - f = isPromise(f) ? f : value(f); - return f.then(function() { return v; }); - }, - function(e) { - var f = action(); - if (f === undefined) { throw e; } - f = isPromise(f) ? f : value(f); - return f.then(function() { throw e; }); - } - ); - } }, - complete: { value: function(oncomplete) { - return this.then(oncomplete, oncomplete); - } }, - always: { value: function(oncomplete) { - this.done(oncomplete, oncomplete); - } }, - fill: { value: function(future) { - this.then(future.resolve, future.reject); - } }, - timeout: { value: function(duration, reason) { - var future = new Future(); - var timeoutId = setTimeout(function() { - future.reject(reason || new TimeoutError('timeout')); - }, duration); - this.whenComplete(function() { clearTimeout(timeoutId); }) - .fill(future); - return future; - } }, - delay: { value: function(duration) { - var future = new Future(); - this.then(function(result) { - setTimeout(function() { - future.resolve(result); - }, duration); - }, - future.reject); - return future; - } }, - tap: { value: function(onfulfilledSideEffect, thisArg) { - return this.then(function(result) { - onfulfilledSideEffect.call(thisArg, result); - return result; - }); - } }, - spread: { value: function(onfulfilledArray, thisArg) { - return this.then(function(array) { - return onfulfilledArray.apply(thisArg, array); - }); - } }, - get: { value: function(key) { - return this.then(function(result) { - return result[key]; - }); - } }, - set: { value: function(key, value) { - return this.then(function(result) { - result[key] = value; - return result; - }); - } }, - apply: { value: function(method, args) { - args = args || []; - return this.then(function(result) { - return all(args).then(function(args) { - return result[method].apply(result, args); - }); - }); - } }, - call: { value: function(method) { - var args = Array.slice(arguments, 1); - return this.then(function(result) { - return all(args).then(function(args) { - return result[method].apply(result, args); - }); - }); - } }, - bind: { value: function(method) { - var bindargs = Array.slice(arguments); - if (Array.isArray(method)) { - for (var i = 0, n = method.length; i < n; ++i) { - bindargs[0] = method[i]; - this.bind.apply(this, bindargs); - } - return; - } - bindargs.shift(); - var self = this; - Object.defineProperty(this, method, { value: function() { - var args = Array.slice(arguments); - return self.then(function(result) { - return all(bindargs.concat(args)).then(function(args) { - return result[method].apply(result, args); - }); - }); - } }); - return this; - } }, - forEach: { value: function(callback, thisArg) { - return forEach(this, callback, thisArg); - } }, - every: { value: function(callback, thisArg) { - return every(this, callback, thisArg); - } }, - some: { value: function(callback, thisArg) { - return some(this, callback, thisArg); - } }, - filter: { value: function(callback, thisArg) { - return filter(this, callback, thisArg); - } }, - map: { value: function(callback, thisArg) { - return map(this, callback, thisArg); - } }, - reduce: { value: function(callback, initialValue) { - if (arguments.length > 1) { - return reduce(this, callback, initialValue); - } - return reduce(this, callback); - } }, - reduceRight: { value: function(callback, initialValue) { - if (arguments.length > 1) { - return reduceRight(this, callback, initialValue); - } - return reduceRight(this, callback); - } }, - indexOf: { value: function(searchElement, fromIndex) { - return indexOf(this, searchElement, fromIndex); - } }, - lastIndexOf: { value: function(searchElement, fromIndex) { - return lastIndexOf(this, searchElement, fromIndex); - } }, - includes: { value: function(searchElement, fromIndex) { - return includes(this, searchElement, fromIndex); - } }, - find: { value: function(predicate, thisArg) { - return find(this, predicate, thisArg); - } }, - findIndex: { value: function(predicate, thisArg) { - return findIndex(this, predicate, thisArg); - } } - }); - - global.hprose.Future = Future; - - function Completer() { - var future = new Future(); - Object.defineProperties(this, { - future: { value: future }, - complete: { value: future.resolve }, - completeError: { value: future.reject }, - isCompleted: { get: function() { - return ( future._state !== PENDING ); - } } - }); - } - - global.hprose.Completer = Completer; - - global.hprose.resolved = value; - - global.hprose.rejected = error; - - global.hprose.deferred = function() { - var self = new Future(); - return Object.create(null, { - promise: { value: self }, - resolve: { value: self.resolve }, - reject: { value: self.reject } - }); - }; - - if (hasPromise) { return; } - - global.Promise = function(executor) { - Future.call(this); - executor(this.resolve, this.reject); - }; - - global.Promise.prototype = Object.create(Future.prototype); - global.Promise.prototype.constructor = Future; - - Object.defineProperties(global.Promise, { - all: { value: all }, - race: { value: race }, - resolve: { value: value }, - reject: { value: error } - }); - -})(this); - -/**********************************************************\ -| | -| hprose | -| | -| Official WebSite: http://www.hprose.com/ | -| http://www.hprose.org/ | -| | -\**********************************************************/ - -/**********************************************************\ - * * - * BytesIO.js * - * * - * hprose BytesIO for HTML5. * - * * - * LastModified: Mar 2, 2016 * - * Author: Ma Bingyao * - * * -\**********************************************************/ - -(function (global, undefined) { - 'use strict'; - - var toBinaryString = global.hprose.toBinaryString; - - var _EMPTY_BYTES = new Uint8Array(0); - var _INIT_SIZE = 1024; - - function writeInt32BE(bytes, p, i) { - bytes[p++] = i >>> 24 & 0xFF; - bytes[p++] = i >>> 16 & 0xFF; - bytes[p++] = i >>> 8 & 0xFF; - bytes[p++] = i & 0xFF; - return p; - } - - function writeInt32LE(bytes, p, i) { - bytes[p++] = i & 0xFF; - bytes[p++] = i >>> 8 & 0xFF; - bytes[p++] = i >>> 16 & 0xFF; - bytes[p++] = i >>> 24 & 0xFF; - return p; - } - - function writeString(bytes, p, str) { - var n = str.length; - for (var i = 0; i < n; ++i) { - var codeUnit = str.charCodeAt(i); - if (codeUnit < 0x80) { - bytes[p++] = codeUnit; - } - else if (codeUnit < 0x800) { - bytes[p++] = 0xC0 | (codeUnit >> 6); - bytes[p++] = 0x80 | (codeUnit & 0x3F); - } - else if (codeUnit < 0xD800 || codeUnit > 0xDFFF) { - bytes[p++] = 0xE0 | (codeUnit >> 12); - bytes[p++] = 0x80 | ((codeUnit >> 6) & 0x3F); - bytes[p++] = 0x80 | (codeUnit & 0x3F); - } - else { - if (i + 1 < n) { - var nextCodeUnit = str.charCodeAt(i + 1); - if (codeUnit < 0xDC00 && 0xDC00 <= nextCodeUnit && nextCodeUnit <= 0xDFFF) { - var rune = (((codeUnit & 0x03FF) << 10) | (nextCodeUnit & 0x03FF)) + 0x010000; - bytes[p++] = 0xF0 | (rune >> 18); - bytes[p++] = 0x80 | ((rune >> 12) & 0x3F); - bytes[p++] = 0x80 | ((rune >> 6) & 0x3F); - bytes[p++] = 0x80 | (rune & 0x3F); - ++i; - continue; - } - } - throw new Error('Malformed string'); - } - } - return p; - } - - function readShortString(bytes, n) { - var charCodes = new Array(n); - var i = 0, off = 0; - for (var len = bytes.length; i < n && off < len; i++) { - var unit = bytes[off++]; - switch (unit >> 4) { - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - charCodes[i] = unit; - break; - case 12: - case 13: - if (off < len) { - charCodes[i] = ((unit & 0x1F) << 6) | - (bytes[off++] & 0x3F); - } - else { - throw new Error('Unfinished UTF-8 octet sequence'); - } - break; - case 14: - if (off + 1 < len) { - charCodes[i] = ((unit & 0x0F) << 12) | - ((bytes[off++] & 0x3F) << 6) | - (bytes[off++] & 0x3F); - } - else { - throw new Error('Unfinished UTF-8 octet sequence'); - } - break; - case 15: - if (off + 2 < len) { - var rune = (((unit & 0x07) << 18) | - ((bytes[off++] & 0x3F) << 12) | - ((bytes[off++] & 0x3F) << 6) | - (bytes[off++] & 0x3F)) - 0x10000; - if (0 <= rune && rune <= 0xFFFFF) { - charCodes[i++] = (((rune >> 10) & 0x03FF) | 0xD800); - charCodes[i] = ((rune & 0x03FF) | 0xDC00); - } - else { - throw new Error('Character outside valid Unicode range: 0x' + rune.toString(16)); - } - } - else { - throw new Error('Unfinished UTF-8 octet sequence'); - } - break; - default: - throw new Error('Bad UTF-8 encoding 0x' + unit.toString(16)); - } - } - if (i < n) { - charCodes.length = i; - } - return [String.fromCharCode.apply(String, charCodes), off]; - } - - function readLongString(bytes, n) { - var buf = []; - var charCodes = new Array(0xFFFF); - var i = 0, off = 0; - for (var len = bytes.length; i < n && off < len; i++) { - var unit = bytes[off++]; - switch (unit >> 4) { - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - charCodes[i] = unit; - break; - case 12: - case 13: - if (off < len) { - charCodes[i] = ((unit & 0x1F) << 6) | - (bytes[off++] & 0x3F); - } - else { - throw new Error('Unfinished UTF-8 octet sequence'); - } - break; - case 14: - if (off + 1 < len) { - charCodes[i] = ((unit & 0x0F) << 12) | - ((bytes[off++] & 0x3F) << 6) | - (bytes[off++] & 0x3F); - } - else { - throw new Error('Unfinished UTF-8 octet sequence'); - } - break; - case 15: - if (off + 2 < len) { - var rune = (((unit & 0x07) << 18) | - ((bytes[off++] & 0x3F) << 12) | - ((bytes[off++] & 0x3F) << 6) | - (bytes[off++] & 0x3F)) - 0x10000; - if (0 <= rune && rune <= 0xFFFFF) { - charCodes[i++] = (((rune >> 10) & 0x03FF) | 0xD800); - charCodes[i] = ((rune & 0x03FF) | 0xDC00); - } - else { - throw new Error('Character outside valid Unicode range: 0x' + rune.toString(16)); - } - } - else { - throw new Error('Unfinished UTF-8 octet sequence'); - } - break; - default: - throw new Error('Bad UTF-8 encoding 0x' + unit.toString(16)); - } - if (i >= 65534) { - var size = i + 1; - charCodes.length = size; - buf.push(String.fromCharCode.apply(String, charCodes)); - n -= size; - i = -1; - } - } - if (i > 0) { - charCodes.length = i; - buf.push(String.fromCharCode.apply(String, charCodes)); - } - return [buf.join(''), off]; - } - - function readString(bytes, n) { - if (n === undefined || n === null || (n < 0)) { n = bytes.length; } - if (n === 0) { return ['', 0]; } - return ((n < 100000) ? - readShortString(bytes, n) : - readLongString(bytes, n)); - } - - function readStringAsBytes(bytes, n) { - if (n === undefined) { n = bytes.length; } - if (n === 0) { return [_EMPTY_BYTES, 0]; } - var i = 0, off = 0; - for (var len = bytes.length; i < n && off < len; i++) { - var unit = bytes[off++]; - switch (unit >> 4) { - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - break; - case 12: - case 13: - if (off < len) { - off++; - } - else { - throw new Error('Unfinished UTF-8 octet sequence'); - } - break; - case 14: - if (off + 1 < len) { - off += 2; - } - else { - throw new Error('Unfinished UTF-8 octet sequence'); - } - break; - case 15: - if (off + 2 < len) { - var rune = (((unit & 0x07) << 18) | - ((bytes[off++] & 0x3F) << 12) | - ((bytes[off++] & 0x3F) << 6) | - (bytes[off++] & 0x3F)) - 0x10000; - if (0 <= rune && rune <= 0xFFFFF) { - i++; - } - else { - throw new Error('Character outside valid Unicode range: 0x' + rune.toString(16)); - } - } - else { - throw new Error('Unfinished UTF-8 octet sequence'); - } - break; - default: - throw new Error('Bad UTF-8 encoding 0x' + unit.toString(16)); - } - } - return [bytes.subarray(0, off), off]; - } - - function pow2roundup(x) { - --x; - x |= x >> 1; - x |= x >> 2; - x |= x >> 4; - x |= x >> 8; - x |= x >> 16; - return x + 1; - } - - function BytesIO() { - var a = arguments; - switch (a.length) { - case 1: - switch (a[0].constructor) { - case Uint8Array: - this._bytes = a[0]; - this._length = a[0].length; - break; - case BytesIO: - this._bytes = a[0].toBytes(); - this._length = a[0].length; - break; - case String: - this.writeString(a[0]); - break; - case Number: - this._bytes = new Uint8Array(a[0]); - break; - default: - this._bytes = new Uint8Array(a[0]); - this._length = this._bytes.length; - break; - } - break; - case 2: - this._bytes = new Uint8Array(a[0], a[1]); - this._length = a[1]; - break; - case 3: - this._bytes = new Uint8Array(a[0], a[1], a[2]); - this._length = a[2]; - break; - } - this.mark(); - } - - Object.defineProperties(BytesIO.prototype, { - _bytes: { value: null, writable: true }, - _length: { value: 0, writable: true }, - _wmark: { value: 0, writable: true }, - _off: { value: 0, writable: true }, - _rmark: { value: 0, writable: true }, - _grow: { value: function(n) { - var bytes = this._bytes; - var required = this._length + n; - var size = pow2roundup(required); - if (bytes) { - size *= 2; - if (size > bytes.length) { - var buf = new Uint8Array(size); - buf.set(bytes); - this._bytes = buf; - } - } - else { - size = Math.max(size, _INIT_SIZE); - this._bytes = new Uint8Array(size); - } - } }, - length: { get: function() { return this._length; } }, - capacity: { get: function() { - return this._bytes ? this._bytes.length : 0; - } }, - position: { get: function() { return this._off; } }, - // returns a view of the the internal buffer. - bytes: { get : function() { - return (this._bytes === null) ? - _EMPTY_BYTES : - this._bytes.subarray(0, this._length); - } }, - buffer: { get : function() { - if (this._bytes === null) { - return _EMPTY_BYTES.buffer; - } - if (this._bytes.buffer.slice) { - return this._bytes.buffer.slice(0, this._length); - } - var buf = new Uint8Array(this._length); - buf.set(this._bytes.subarray(0, this._length)); - return buf.buffer; - } }, - mark: { value: function() { - this._wmark = this._length; - this._rmark = this._off; - } }, - reset: { value: function() { - this._length = this._wmark; - this._off = this._rmark; - } }, - clear: { value: function() { - this._bytes = null; - this._length = 0; - this._wmark = 0; - this._off = 0; - this._rmark = 0; - } }, - writeByte: { value: function(b) { - this._grow(1); - this._bytes[this._length++] = b; - } }, - writeInt32BE: { value: function(i) { - if ((i === (i | 0)) && (i <= 2147483647)) { - this._grow(4); - this._length = writeInt32BE(this._bytes, this._length, i); - return; - } - throw new TypeError('value is out of bounds'); - } }, - writeUInt32BE: { value: function(i) { - if (((i & 0x7FFFFFFF) + 0x80000000 === i) && (i >= 0)) { - this._grow(4); - this._length = writeInt32BE(this._bytes, this._length, i | 0); - return; - } - throw new TypeError('value is out of bounds'); - } }, - writeInt32LE: { value: function(i) { - if ((i === (i | 0)) && (i <= 2147483647)) { - this._grow(4); - this._length = writeInt32LE(this._bytes, this._length, i); - return; - } - throw new TypeError('value is out of bounds'); - } }, - writeUInt32LE: { value: function(i) { - if (((i & 0x7FFFFFFF) + 0x80000000 === i) && (i >= 0)) { - this._grow(4); - this._length = writeInt32LE(this._bytes, this._length, i | 0); - return; - } - throw new TypeError('value is out of bounds'); - } }, - write: { value: function(data) { - var n = data.byteLength || data.length; - if (n === 0) { return; } - this._grow(n); - var bytes = this._bytes; - var length = this._length; - switch (data.constructor) { - case ArrayBuffer: - bytes.set(new Uint8Array(data), length); - break; - case Uint8Array: - bytes.set(data, length); - break; - case BytesIO: - bytes.set(data.bytes, length); - break; - default: - for (var i = 0; i < n; i++) { - bytes[length + i] = data[i]; - } - break; - } - this._length += n; - } }, - writeAsciiString: { value: function(str) { - var n = str.length; - if (n === 0) { return; } - this._grow(n); - var bytes = this._bytes; - var l = this._length; - for (var i = 0; i < n; ++i, ++l) { - bytes[l] = str.charCodeAt(i); - } - this._length = l; - } }, - writeString: { value: function(str) { - var n = str.length; - if (n === 0) { return; } - // A single code unit uses at most 3 bytes. - // Two code units at most 4. - this._grow(n * 3); - this._length = writeString(this._bytes, this._length, str); - } }, - readByte: { value: function() { - if (this._off < this._length) { - return this._bytes[this._off++]; - } - return -1; - } }, - readInt32BE: { value: function() { - var bytes = this._bytes; - var off = this._off; - if (off + 3 < this._length) { - var result = bytes[off++] << 24 | - bytes[off++] << 16 | - bytes[off++] << 8 | - bytes[off++]; - this._off = off; - return result; - } - throw new Error('EOF'); - } }, - readUInt32BE: { value: function() { - var value = this.readInt32BE(); - if (value < 0) { - return (value & 0x7FFFFFFF) + 0x80000000; - } - return value; - } }, - readInt32LE: { value: function() { - var bytes = this._bytes; - var off = this._off; - if (off + 3 < this._length) { - var result = bytes[off++] | - bytes[off++] << 8 | - bytes[off++] << 16 | - bytes[off++] << 24; - this._off = off; - return result; - } - throw new Error('EOF'); - } }, - readUInt32LE: { value: function() { - var value = this.readInt32LE(); - if (value < 0) { - return (value & 0x7FFFFFFF) + 0x80000000; - } - return value; - } }, - read: { value: function(n) { - if (this._off + n > this._length) { - n = this._length - this._off; - } - if (n === 0) { return _EMPTY_BYTES; } - return this._bytes.subarray(this._off, this._off += n); - } }, - skip: { value: function(n) { - if (this._off + n > this._length) { - n = this._length - this._off; - this._off = this._length; - } - else { - this._off += n; - } - return n; - } }, - // the result is an Uint8Array, and includes tag. - readBytes: { value: function(tag) { - var pos = Array.indexOf(this._bytes, tag, this._off); - var buf; - if (pos === -1) { - buf = this._bytes.subarray(this._off, this._length); - this._off = this._length; - } - else { - buf = this._bytes.subarray(this._off, pos + 1); - this._off = pos + 1; - } - return buf; - } }, - // the result is a String, and doesn't include tag. - // but the position is the same as readBytes - readUntil: { value: function(tag) { - var pos = Array.indexOf(this._bytes, tag, this._off); - var str = ''; - if (pos === this._off) { - this._off++; - } - else if (pos === -1) { - str = readString(this._bytes.subarray(this._off, this._length))[0]; - this._off = this._length; - } - else { - str = readString(this._bytes.subarray(this._off, pos))[0]; - this._off = pos + 1; - } - return str; - } }, - readAsciiString: { value: function(n) { - if (this._off + n > this._length) { - n = this._length - this._off; - } - if (n === 0) { return ''; } - return toBinaryString(this._bytes.subarray(this._off, this._off += n)); - } }, - // n is the UTF16 length - readStringAsBytes: { value: function(n) { - var r = readStringAsBytes(this._bytes.subarray(this._off, this._length), n); - this._off += r[1]; - return r[0]; - } }, - // n is the UTF16 length - readString: { value: function(n) { - var r = readString(this._bytes.subarray(this._off, this._length), n); - this._off += r[1]; - return r[0]; - } }, - // returns a view of the the internal buffer and clears `this`. - takeBytes: { value: function() { - var buffer = this.bytes; - this.clear(); - return buffer; - } }, - // returns a copy of the current contents and leaves `this` intact. - toBytes: { value: function() { - return new Uint8Array(this.bytes); - } }, - toString: { value: function() { - return readString(this.bytes, this._length)[0]; - } }, - clone: { value: function() { - return new BytesIO(this.toBytes()); - } }, - trunc: { value: function() { - this._bytes = this._bytes.subarray(this._off, this._length); - this._length = this._bytes.length; - this._off = 0; - this._wmark = 0; - this._rmark = 0; - } } - }); - - function toString(data) { - /* jshint -W086 */ - if (data.length === 0) { return ''; } - switch(data.constructor) { - case String: return data; - case BytesIO: data = data.bytes; - case ArrayBuffer: data = new Uint8Array(data); - case Uint8Array: return readString(data, data.length)[0]; - default: return String.fromCharCode.apply(String, data); - } - } - - Object.defineProperty(BytesIO, 'toString', { value: toString }); - - global.hprose.BytesIO = BytesIO; - -})(this); - -/**********************************************************\ -| | -| hprose | -| | -| Official WebSite: http://www.hprose.com/ | -| http://www.hprose.org/ | -| | -\**********************************************************/ -/**********************************************************\ - * * - * Tags.js * - * * - * hprose tags enum for HTML5. * - * * - * LastModified: Feb 23, 2016 * - * Author: Ma Bingyao * - * * -\**********************************************************/ - -(function (global) { - 'use strict'; - - global.hprose.Tags = { - /* Serialize Tags */ - TagInteger : 0x69, // 'i' - TagLong : 0x6C, // 'l' - TagDouble : 0x64, // 'd' - TagNull : 0x6E, // 'n' - TagEmpty : 0x65, // 'e' - TagTrue : 0x74, // 't' - TagFalse : 0x66, // 'f' - TagNaN : 0x4E, // 'N' - TagInfinity : 0x49, // 'I' - TagDate : 0x44, // 'D' - TagTime : 0x54, // 'T' - TagUTC : 0x5A, // 'Z' - TagBytes : 0x62, // 'b' - TagUTF8Char : 0x75, // 'u' - TagString : 0x73, // 's' - TagGuid : 0x67, // 'g' - TagList : 0x61, // 'a' - TagMap : 0x6d, // 'm' - TagClass : 0x63, // 'c' - TagObject : 0x6F, // 'o' - TagRef : 0x72, // 'r' - /* Serialize Marks */ - TagPos : 0x2B, // '+' - TagNeg : 0x2D, // '-' - TagSemicolon : 0x3B, // ',' - TagOpenbrace : 0x7B, // '{' - TagClosebrace : 0x7D, // '}' - TagQuote : 0x22, // '"' - TagPoint : 0x2E, // '.' - /* Protocol Tags */ - TagFunctions : 0x46, // 'F' - TagCall : 0x43, // 'C' - TagResult : 0x52, // 'R' - TagArgument : 0x41, // 'A' - TagError : 0x45, // 'E' - TagEnd : 0x7A // 'z' - }; -})(this); - -/**********************************************************\ -| | -| hprose | -| | -| Official WebSite: http://www.hprose.com/ | -| http://www.hprose.org/ | -| | -\**********************************************************/ - -/**********************************************************\ - * * - * ClassManager.js * - * * - * hprose ClassManager for HTML5. * - * * - * LastModified: Feb 23, 2016 * - * Author: Ma Bingyao * - * * -\**********************************************************/ - -(function (global) { - 'use strict'; - - var WeakMap = global.WeakMap; - - var classCache = Object.create(null); - var aliasCache = new WeakMap(); - - function register(cls, alias) { - aliasCache.set(cls, alias); - classCache[alias] = cls; - } - - function getClassAlias(cls) { - return aliasCache.get(cls); - } - - function getClass(alias) { - return classCache[alias]; - } - - global.hprose.ClassManager = Object.create(null, { - register: { value: register }, - getClassAlias: { value: getClassAlias }, - getClass: { value: getClass } - }); - - global.hprose.register = register; - - register(Object, 'Object'); - -})(this); - -/**********************************************************\ -| | -| hprose | -| | -| Official WebSite: http://www.hprose.com/ | -| http://www.hprose.org/ | -| | -\**********************************************************/ - -/**********************************************************\ - * * - * Writer.js * - * * - * hprose Writer for HTML5. * - * * - * LastModified: Mar 2, 2016 * - * Author: Ma Bingyao * - * * -\**********************************************************/ - -(function (global, undefined) { - 'use strict'; - - var Map = global.Map; - var BytesIO = global.hprose.BytesIO; - var Tags = global.hprose.Tags; - var ClassManager = global.hprose.ClassManager; - - function getClassName(obj) { - var cls = obj.constructor; - var classname = ClassManager.getClassAlias(cls); - if (classname) { return classname; } - if (cls.name) { - classname = cls.name; - } - else { - var ctor = cls.toString(); - classname = ctor.substr(0, ctor.indexOf('(')).replace(/(^\s*function\s*)|(\s*$)/ig, ''); - if (classname === '' || classname === 'Object') { - return (typeof(obj.getClassName) === 'function') ? obj.getClassName() : 'Object'; - } - } - if (classname !== 'Object') { - ClassManager.register(cls, classname); - } - return classname; - } - - var fakeWriterRefer = Object.create(null, { - set: { value: function () {} }, - write: { value: function () { return false; } }, - reset: { value: function () {} } - }); - - function RealWriterRefer(stream) { - Object.defineProperties(this, { - _stream: { value: stream }, - _ref: { value: new Map(), writable: true } - }); - } - - Object.defineProperties(RealWriterRefer.prototype, { - _refcount: { value: 0, writable: true }, - set: { value: function (val) { - this._ref.set(val, this._refcount++); - } }, - write: { value: function (val) { - var index = this._ref.get(val); - if (index !== undefined) { - this._stream.writeByte(Tags.TagRef); - this._stream.writeString('' + index); - this._stream.writeByte(Tags.TagSemicolon); - return true; - } - return false; - } }, - reset: { value: function () { - this._ref = new Map(); - this._refcount = 0; - } } - }); - - function realWriterRefer(stream) { - return new RealWriterRefer(stream); - } - - function Writer(stream, simple) { - Object.defineProperties(this, { - stream: { value: stream }, - _classref: { value: Object.create(null), writable: true }, - _fieldsref: { value: [], writable: true }, - _refer: { value: simple ? fakeWriterRefer : realWriterRefer(stream) } - }); - } - - function serialize(writer, value) { - var stream = writer.stream; - if (value === undefined || value === null) { - stream.writeByte(Tags.TagNull); - return; - } - switch (value.constructor) { - case Function: - stream.writeByte(Tags.TagNull); - return; - case Number: - writeNumber(writer, value); - return; - case Boolean: - writeBoolean(writer, value); - return; - case String: - switch (value.length) { - case 0: - stream.writeByte(Tags.TagEmpty); - return; - case 1: - stream.writeByte(Tags.TagUTF8Char); - stream.writeString(value); - return; - } - writer.writeStringWithRef(value); - return; - case Date: - writer.writeDateWithRef(value); - return; - case Map: - writer.writeMapWithRef(value); - return; - case ArrayBuffer: - case Uint8Array: - case BytesIO: - writer.writeBytesWithRef(value); - return; - case Int8Array: - case Int16Array: - case Int32Array: - case Uint16Array: - case Uint32Array: - writeIntListWithRef(writer, value); - return; - case Float32Array: - case Float64Array: - writeDoubleListWithRef(writer, value); - return; - default: - if (Array.isArray(value)) { - writer.writeListWithRef(value); - } - else { - var classname = getClassName(value); - if (classname === 'Object') { - writer.writeMapWithRef(value); - } - else { - writer.writeObjectWithRef(value); - } - } - break; - } - } - - function writeNumber(writer, n) { - var stream = writer.stream; - n = n.valueOf(); - if (n === (n | 0)) { - if (0 <= n && n <= 9) { - stream.writeByte(n + 0x30); - } - else { - stream.writeByte(Tags.TagInteger); - stream.writeAsciiString('' + n); - stream.writeByte(Tags.TagSemicolon); - } - } - else if (isNaN(n)) { - stream.writeByte(Tags.TagNaN); - } - else if (isFinite(n)) { - stream.writeByte(Tags.TagDouble); - stream.writeAsciiString('' + n); - stream.writeByte(Tags.TagSemicolon); - } - else { - stream.writeByte(Tags.TagInfinity); - stream.writeByte((n > 0) ? Tags.TagPos : Tags.TagNeg); - } - } - - function writeInteger(writer, n) { - var stream = writer.stream; - if (0 <= n && n <= 9) { - stream.writeByte(n + 0x30); - } - else { - if (n < -2147483648 || n > 2147483647) { - stream.writeByte(Tags.TagLong); - } - else { - stream.writeByte(Tags.TagInteger); - } - stream.writeAsciiString('' + n); - stream.writeByte(Tags.TagSemicolon); - } - } - - function writeDouble(writer, n) { - var stream = writer.stream; - if (isNaN(n)) { - stream.writeByte(Tags.TagNaN); - } - else if (isFinite(n)) { - stream.writeByte(Tags.TagDouble); - stream.writeAsciiString('' + n); - stream.writeByte(Tags.TagSemicolon); - } - else { - stream.writeByte(Tags.TagInfinity); - stream.writeByte((n > 0) ? Tags.TagPos : Tags.TagNeg); - } - } - - function writeBoolean(writer, b) { - writer.stream.writeByte(b.valueOf() ? Tags.TagTrue : Tags.TagFalse); - } - - function writeUTCDate(writer, date) { - writer._refer.set(date); - var stream = writer.stream; - var year = ('0000' + date.getUTCFullYear()).slice(-4); - var month = ('00' + (date.getUTCMonth() + 1)).slice(-2); - var day = ('00' + date.getUTCDate()).slice(-2); - var hour = ('00' + date.getUTCHours()).slice(-2); - var minute = ('00' + date.getUTCMinutes()).slice(-2); - var second = ('00' + date.getUTCSeconds()).slice(-2); - var millisecond = ('000' + date.getUTCMilliseconds()).slice(-3); - stream.writeByte(Tags.TagDate); - stream.writeAsciiString(year + month + day); - stream.writeByte(Tags.TagTime); - stream.writeAsciiString(hour + minute + second); - if (millisecond !== '000') { - stream.writeByte(Tags.TagPoint); - stream.writeAsciiString(millisecond); - } - stream.writeByte(Tags.TagUTC); - } - - function writeDate(writer, date) { - writer._refer.set(date); - var stream = writer.stream; - var year = ('0000' + date.getFullYear()).slice(-4); - var month = ('00' + (date.getMonth() + 1)).slice(-2); - var day = ('00' + date.getDate()).slice(-2); - var hour = ('00' + date.getHours()).slice(-2); - var minute = ('00' + date.getMinutes()).slice(-2); - var second = ('00' + date.getSeconds()).slice(-2); - var millisecond = ('000' + date.getMilliseconds()).slice(-3); - if ((hour === '00') && (minute === '00') && - (second === '00') && (millisecond === '000')) { - stream.writeByte(Tags.TagDate); - stream.writeAsciiString(year + month + day); - } - else if ((year === '1970') && (month === '01') && (day === '01')) { - stream.writeByte(Tags.TagTime); - stream.writeAsciiString(hour + minute + second); - if (millisecond !== '000') { - stream.writeByte(Tags.TagPoint); - stream.writeAsciiString(millisecond); - } - } - else { - stream.writeByte(Tags.TagDate); - stream.writeAsciiString(year + month + day); - stream.writeByte(Tags.TagTime); - stream.writeAsciiString(hour + minute + second); - if (millisecond !== '000') { - stream.writeByte(Tags.TagPoint); - stream.writeAsciiString(millisecond); - } - } - stream.writeByte(Tags.TagSemicolon); - } - - function writeTime(writer, time) { - writer._refer.set(time); - var stream = writer.stream; - var hour = ('00' + time.getHours()).slice(-2); - var minute = ('00' + time.getMinutes()).slice(-2); - var second = ('00' + time.getSeconds()).slice(-2); - var millisecond = ('000' + time.getMilliseconds()).slice(-3); - stream.writeByte(Tags.TagTime); - stream.writeAsciiString(hour + minute + second); - if (millisecond !== '000') { - stream.writeByte(Tags.TagPoint); - stream.writeAsciiString(millisecond); - } - stream.writeByte(Tags.TagSemicolon); - } - - function writeBytes(writer, bytes) { - writer._refer.set(bytes); - var stream = writer.stream; - stream.writeByte(Tags.TagBytes); - var n = bytes.byteLength || bytes.length; - if (n > 0) { - stream.writeAsciiString('' + n); - stream.writeByte(Tags.TagQuote); - stream.write(bytes); - } - else { - stream.writeByte(Tags.TagQuote); - } - stream.writeByte(Tags.TagQuote); - } - - function writeString(writer, str) { - writer._refer.set(str); - var stream = writer.stream; - var n = str.length; - stream.writeByte(Tags.TagString); - if (n > 0) { - stream.writeAsciiString('' + n); - stream.writeByte(Tags.TagQuote); - stream.writeString(str); - } - else { - stream.writeByte(Tags.TagQuote); - } - stream.writeByte(Tags.TagQuote); - } - - function writeArray(writer, array, writeElem) { - writer._refer.set(array); - var stream = writer.stream; - var n = array.length; - stream.writeByte(Tags.TagList); - if (n > 0) { - stream.writeAsciiString('' + n); - stream.writeByte(Tags.TagOpenbrace); - for (var i = 0; i < n; i++) { - writeElem(writer, array[i]); - } - } - else { - stream.writeByte(Tags.TagOpenbrace); - } - stream.writeByte(Tags.TagClosebrace); - } - - function writeIntListWithRef(writer, list) { - if (!writer._refer.write(list)) { - writeArray(writer, list, writeInteger); - } - } - - function writeDoubleListWithRef(writer, list) { - if (!writer._refer.write(list)) { - writeArray(writer, list, writeDouble); - } - } - - function writeMap(writer, map) { - writer._refer.set(map); - var stream = writer.stream; - var fields = []; - for (var key in map) { - if (map.hasOwnProperty(key) && - typeof(map[key]) !== 'function') { - fields[fields.length] = key; - } - } - var n = fields.length; - stream.writeByte(Tags.TagMap); - if (n > 0) { - stream.writeAsciiString('' + n); - stream.writeByte(Tags.TagOpenbrace); - for (var i = 0; i < n; i++) { - serialize(writer, fields[i]); - serialize(writer, map[fields[i]]); - } - } - else { - stream.writeByte(Tags.TagOpenbrace); - } - stream.writeByte(Tags.TagClosebrace); - } - - function writeHarmonyMap(writer, map) { - writer._refer.set(map); - var stream = writer.stream; - var n = map.size; - stream.writeByte(Tags.TagMap); - if (n > 0) { - stream.writeAsciiString('' + n); - stream.writeByte(Tags.TagOpenbrace); - map.forEach(function(value, key) { - serialize(writer, key); - serialize(writer, value); - }); - } - else { - stream.writeByte(Tags.TagOpenbrace); - } - stream.writeByte(Tags.TagClosebrace); - } - - function writeObject(writer, obj) { - var stream = writer.stream; - var classname = getClassName(obj); - var fields, index; - if (classname in writer._classref) { - index = writer._classref[classname]; - fields = writer._fieldsref[index]; - } - else { - fields = []; - for (var key in obj) { - if (obj.hasOwnProperty(key) && - typeof(obj[key]) !== 'function') { - fields[fields.length] = key.toString(); - } - } - index = writeClass(writer, classname, fields); - } - stream.writeByte(Tags.TagObject); - stream.writeAsciiString('' + index); - stream.writeByte(Tags.TagOpenbrace); - writer._refer.set(obj); - var n = fields.length; - for (var i = 0; i < n; i++) { - serialize(writer, obj[fields[i]]); - } - stream.writeByte(Tags.TagClosebrace); - } - - function writeClass(writer, classname, fields) { - var stream = writer.stream; - var n = fields.length; - stream.writeByte(Tags.TagClass); - stream.writeAsciiString('' + classname.length); - stream.writeByte(Tags.TagQuote); - stream.writeString(classname); - stream.writeByte(Tags.TagQuote); - if (n > 0) { - stream.writeAsciiString('' + n); - stream.writeByte(Tags.TagOpenbrace); - for (var i = 0; i < n; i++) { - writeString(writer, fields[i]); - } - } - else { - stream.writeByte(Tags.TagOpenbrace); - } - stream.writeByte(Tags.TagClosebrace); - var index = writer._fieldsref.length; - writer._classref[classname] = index; - writer._fieldsref[index] = fields; - return index; - } - - Object.defineProperties(Writer.prototype, { - serialize: { value: function(value) { - serialize(this, value); - } }, - writeInteger: { value: function(value) { - writeInteger(this, value); - } }, - writeDouble: { value: function(value) { - writeDouble(this, value); - } }, - writeBoolean: { value: function(value) { - writeBoolean(this, value); - } }, - writeUTCDate: { value: function(value) { - writeUTCDate(this, value); - } }, - writeUTCDateWithRef: { value: function(value) { - if (!this._refer.write(value)) { - writeUTCDate(this, value); - } - } }, - writeDate: { value: function(value) { - writeDate(this, value); - } }, - writeDateWithRef: { value: function(value) { - if (!this._refer.write(value)) { - writeDate(this, value); - } - } }, - writeTime: { value: function(value) { - writeTime(this, value); - } }, - writeTimeWithRef: { value: function(value) { - if (!this._refer.write(value)) { - writeTime(this, value); - } - } }, - writeBytes: { value: function(value) { - writeBytes(this, value); - } }, - writeBytesWithRef: { value: function(value) { - if (!this._refer.write(value)) { - writeBytes(this, value); - } - } }, - writeString: { value: function(value) { - writeString(this, value); - } }, - writeStringWithRef: { value: function(value) { - if (!this._refer.write(value)) { - writeString(this, value); - } - } }, - writeList: { value: function(value) { - writeArray(this, value, serialize); - } }, - writeListWithRef: { value: function(value) { - if (!this._refer.write(value)) { - writeArray(this, value, serialize); - } - } }, - writeMap: { value: function(value) { - if (value instanceof Map) { - writeHarmonyMap(this, value); - } - else { - writeMap(this, value); - } - } }, - writeMapWithRef: { value: function(value) { - if (!this._refer.write(value)) { - if (value instanceof Map) { - writeHarmonyMap(this, value); - } - else { - writeMap(this, value); - } - } - } }, - writeObject: { value: function(value) { - writeObject(this, value); - } }, - writeObjectWithRef: { value: function(value) { - if (!this._refer.write(value)) { - writeObject(this, value); - } - } }, - reset: { value: function() { - this._classref = Object.create(null); - this._fieldsref.length = 0; - this._refer.reset(); - } } - }); - - global.hprose.Writer = Writer; - -})(this); - -/**********************************************************\ -| | -| hprose | -| | -| Official WebSite: http://www.hprose.com/ | -| http://www.hprose.org/ | -| | -\**********************************************************/ - -/**********************************************************\ - * * - * Reader.js * - * * - * hprose Reader for HTML5. * - * * - * LastModified: Mar 2, 2016 * - * Author: Ma Bingyao * - * * -\**********************************************************/ - -(function (global, undefined) { - 'use strict'; - - var Map = global.Map; - var BytesIO = global.hprose.BytesIO; - var Tags = global.hprose.Tags; - var ClassManager = global.hprose.ClassManager; - - function unexpectedTag(tag, expectTags) { - if (tag && expectTags) { - var expectTagStr = ''; - if (typeof(expectTags) === 'number') { - expectTagStr = String.fromCharCode(expectTags); - } - else { - expectTagStr = String.fromCharCode.apply(String, expectTags); - } - throw new Error('Tag "' + expectTagStr + '" expected, but "' + String.fromCharCode(tag) + '" found in stream'); - } - else if (tag) { - throw new Error('Unexpected serialize tag "' + String.fromCharCode(tag) + '" in stream'); - } - else { - throw new Error('No byte found in stream'); - } - } - - function readRaw(stream) { - var ostream = new BytesIO(); - _readRaw(stream, ostream); - return ostream.bytes; - } - - function _readRaw(stream, ostream) { - __readRaw(stream, ostream, stream.readByte()); - } - - function __readRaw(stream, ostream, tag) { - ostream.writeByte(tag); - switch (tag) { - case 48: - case 49: - case 50: - case 51: - case 52: - case 53: - case 54: - case 55: - case 56: - case 57: - case Tags.TagNull: - case Tags.TagEmpty: - case Tags.TagTrue: - case Tags.TagFalse: - case Tags.TagNaN: - break; - case Tags.TagInfinity: - ostream.writeByte(stream.readByte()); - break; - case Tags.TagInteger: - case Tags.TagLong: - case Tags.TagDouble: - case Tags.TagRef: - readNumberRaw(stream, ostream); - break; - case Tags.TagDate: - case Tags.TagTime: - readDateTimeRaw(stream, ostream); - break; - case Tags.TagUTF8Char: - readUTF8CharRaw(stream, ostream); - break; - case Tags.TagBytes: - readBytesRaw(stream, ostream); - break; - case Tags.TagString: - readStringRaw(stream, ostream); - break; - case Tags.TagGuid: - readGuidRaw(stream, ostream); - break; - case Tags.TagList: - case Tags.TagMap: - case Tags.TagObject: - readComplexRaw(stream, ostream); - break; - case Tags.TagClass: - readComplexRaw(stream, ostream); - _readRaw(stream, ostream); - break; - case Tags.TagError: - _readRaw(stream, ostream); - break; - default: unexpectedTag(tag); - } - } - function readNumberRaw(stream, ostream) { - var tag; - do { - tag = stream.readByte(); - ostream.writeByte(tag); - } while (tag !== Tags.TagSemicolon); - } - function readDateTimeRaw(stream, ostream) { - var tag; - do { - tag = stream.readByte(); - ostream.writeByte(tag); - } while (tag !== Tags.TagSemicolon && - tag !== Tags.TagUTC); - } - function readUTF8CharRaw(stream, ostream) { - ostream.writeString(stream.readString(1)); - } - function readBytesRaw(stream, ostream) { - var count = 0; - var tag = 48; - do { - count *= 10; - count += tag - 48; - tag = stream.readByte(); - ostream.writeByte(tag); - } while (tag !== Tags.TagQuote); - ostream.write(stream.read(count + 1)); - } - function readStringRaw(stream, ostream) { - var count = 0; - var tag = 48; - do { - count *= 10; - count += tag - 48; - tag = stream.readByte(); - ostream.writeByte(tag); - } while (tag !== Tags.TagQuote); - ostream.write(stream.readStringAsBytes(count + 1)); - } - function readGuidRaw(stream, ostream) { - ostream.write(stream.read(38)); - } - function readComplexRaw(stream, ostream) { - var tag; - do { - tag = stream.readByte(); - ostream.writeByte(tag); - } while (tag !== Tags.TagOpenbrace); - while ((tag = stream.readByte()) !== Tags.TagClosebrace) { - __readRaw(stream, ostream, tag); - } - ostream.writeByte(tag); - } - - function RawReader(stream) { - Object.defineProperties(this, { - stream: { value : stream }, - readRaw: { value: function() { return readRaw(stream); } } - }); - } - - global.hprose.RawReader = RawReader; - - var fakeReaderRefer = Object.create(null, { - set: { value: function() {} }, - read: { value: function() { unexpectedTag(Tags.TagRef); } }, - reset: { value: function() {} } - }); - - function RealReaderRefer() { - Object.defineProperties(this, { - ref: { value: [] } - }); - } - - Object.defineProperties(RealReaderRefer.prototype, { - set: { value: function(val) { this.ref.push(val); } }, - read: { value: function(index) { return this.ref[index]; } }, - reset: { value: function() { this.ref.length = 0; } } - }); - - function realReaderRefer() { - return new RealReaderRefer(); - } - - function getter(str) { - var obj = global; - var names = str.split('.'); - var i; - for (i = 0; i < names.length; i++) { - obj = obj[names[i]]; - if (obj === undefined) { - return null; - } - } - return obj; - } - function findClass(cn, poslist, i, c) { - if (i < poslist.length) { - var pos = poslist[i]; - cn[pos] = c; - var cls = findClass(cn, poslist, i + 1, '.'); - if (i + 1 < poslist.length) { - if (cls === null) { - cls = findClass(cn, poslist, i + 1, '_'); - } - } - return cls; - } - var classname = cn.join(''); - try { - var cl = getter(classname); - return ((typeof(cl) === 'function') ? cl : null); - } catch (e) { - return null; - } - } - - function getClass(classname) { - var cls = ClassManager.getClass(classname); - if (cls) { return cls; } - cls = getter(classname); - if (typeof(cls) === 'function') { - ClassManager.register(cls, classname); - return cls; - } - var poslist = []; - var pos = classname.indexOf('_'); - while (pos >= 0) { - poslist[poslist.length] = pos; - pos = classname.indexOf('_', pos + 1); - } - if (poslist.length > 0) { - var cn = classname.split(''); - cls = findClass(cn, poslist, 0, '.'); - if (cls === null) { - cls = findClass(cn, poslist, 0, '_'); - } - if (typeof(cls) === 'function') { - ClassManager.register(cls, classname); - return cls; - } - } - cls = function () {}; - Object.defineProperty(cls.prototype, 'getClassName', { value: function () { - return classname; - }}); - ClassManager.register(cls, classname); - return cls; - } - - - function readInt(stream, tag) { - var s = stream.readUntil(tag); - if (s.length === 0) { return 0; } - return parseInt(s, 10); - } - function unserialize(reader) { - var stream = reader.stream; - var tag = stream.readByte(); - switch (tag) { - case 48: - case 49: - case 50: - case 51: - case 52: - case 53: - case 54: - case 55: - case 56: - case 57: return tag - 48; - case Tags.TagInteger: return readIntegerWithoutTag(stream); - case Tags.TagLong: return readLongWithoutTag(stream); - case Tags.TagDouble: return readDoubleWithoutTag(stream); - case Tags.TagNull: return null; - case Tags.TagEmpty: return ''; - case Tags.TagTrue: return true; - case Tags.TagFalse: return false; - case Tags.TagNaN: return NaN; - case Tags.TagInfinity: return readInfinityWithoutTag(stream); - case Tags.TagDate: return readDateWithoutTag(reader); - case Tags.TagTime: return readTimeWithoutTag(reader); - case Tags.TagBytes: return readBytesWithoutTag(reader); - case Tags.TagUTF8Char: return readUTF8CharWithoutTag(reader); - case Tags.TagString: return readStringWithoutTag(reader); - case Tags.TagGuid: return readGuidWithoutTag(reader); - case Tags.TagList: return readListWithoutTag(reader); - case Tags.TagMap: return reader.useHarmonyMap ? readHarmonyMapWithoutTag(reader) : readMapWithoutTag(reader); - case Tags.TagClass: readClass(reader); return readObject(reader); - case Tags.TagObject: return readObjectWithoutTag(reader); - case Tags.TagRef: return readRef(reader); - case Tags.TagError: throw new Error(readString(reader)); - default: unexpectedTag(tag); - } - } - function readIntegerWithoutTag(stream) { - return readInt(stream, Tags.TagSemicolon); - } - function readInteger(stream) { - var tag = stream.readByte(); - switch (tag) { - case 48: - case 49: - case 50: - case 51: - case 52: - case 53: - case 54: - case 55: - case 56: - case 57: return tag - 48; - case Tags.TagInteger: return readIntegerWithoutTag(stream); - default: unexpectedTag(tag); - } - } - function readLongWithoutTag(stream) { - var s = stream.readUntil(Tags.TagSemicolon); - var l = parseInt(s, 10); - if (l.toString() === s) { return l; } - return s; - } - function readLong(stream) { - var tag = stream.readByte(); - switch (tag) { - case 48: - case 49: - case 50: - case 51: - case 52: - case 53: - case 54: - case 55: - case 56: - case 57: return tag - 48; - case Tags.TagInteger: - case Tags.TagLong: return readLongWithoutTag(stream); - default: unexpectedTag(tag); - } - } - function readDoubleWithoutTag(stream) { - return parseFloat(stream.readUntil(Tags.TagSemicolon)); - } - function readDouble(stream) { - var tag = stream.readByte(); - switch (tag) { - case 48: - case 49: - case 50: - case 51: - case 52: - case 53: - case 54: - case 55: - case 56: - case 57: return tag - 48; - case Tags.TagInteger: - case Tags.TagLong: - case Tags.TagDouble: return readDoubleWithoutTag(stream); - case Tags.TagNaN: return NaN; - case Tags.TagInfinity: return readInfinityWithoutTag(stream); - default: unexpectedTag(tag); - } - } - function readInfinityWithoutTag(stream) { - return ((stream.readByte() === Tags.TagNeg) ? -Infinity : Infinity); - } - function readBoolean(stream) { - var tag = stream.readByte(); - switch (tag) { - case Tags.TagTrue: return true; - case Tags.TagFalse: return false; - default: unexpectedTag(tag); - } - } - function readDateWithoutTag(reader) { - var stream = reader.stream; - var year = parseInt(stream.readAsciiString(4), 10); - var month = parseInt(stream.readAsciiString(2), 10) - 1; - var day = parseInt(stream.readAsciiString(2), 10); - var date; - var tag = stream.readByte(); - if (tag === Tags.TagTime) { - var hour = parseInt(stream.readAsciiString(2), 10); - var minute = parseInt(stream.readAsciiString(2), 10); - var second = parseInt(stream.readAsciiString(2), 10); - var millisecond = 0; - tag = stream.readByte(); - if (tag === Tags.TagPoint) { - millisecond = parseInt(stream.readAsciiString(3), 10); - tag = stream.readByte(); - if ((tag >= 48) && (tag <= 57)) { - stream.skip(2); - tag = stream.readByte(); - if ((tag >= 48) && (tag <= 57)) { - stream.skip(2); - tag = stream.readByte(); - } - } - } - if (tag === Tags.TagUTC) { - date = new Date(Date.UTC(year, month, day, hour, minute, second, millisecond)); - } - else { - date = new Date(year, month, day, hour, minute, second, millisecond); - } - } - else if (tag === Tags.TagUTC) { - date = new Date(Date.UTC(year, month, day)); - } - else { - date = new Date(year, month, day); - } - reader.refer.set(date); - return date; - } - function readDate(reader) { - var tag = reader.stream.readByte(); - switch (tag) { - case Tags.TagNull: return null; - case Tags.TagDate: return readDateWithoutTag(reader); - case Tags.TagRef: return readRef(reader); - default: unexpectedTag(tag); - } - } - function readTimeWithoutTag(reader) { - var stream = reader.stream; - var time; - var hour = parseInt(stream.readAsciiString(2), 10); - var minute = parseInt(stream.readAsciiString(2), 10); - var second = parseInt(stream.readAsciiString(2), 10); - var millisecond = 0; - var tag = stream.readByte(); - if (tag === Tags.TagPoint) { - millisecond = parseInt(stream.readAsciiString(3), 10); - tag = stream.readByte(); - if ((tag >= 48) && (tag <= 57)) { - stream.skip(2); - tag = stream.readByte(); - if ((tag >= 48) && (tag <= 57)) { - stream.skip(2); - tag = stream.readByte(); - } - } - } - if (tag === Tags.TagUTC) { - time = new Date(Date.UTC(1970, 0, 1, hour, minute, second, millisecond)); - } - else { - time = new Date(1970, 0, 1, hour, minute, second, millisecond); - } - reader.refer.set(time); - return time; - } - function readTime(reader) { - var tag = reader.stream.readByte(); - switch (tag) { - case Tags.TagNull: return null; - case Tags.TagTime: return readTimeWithoutTag(reader); - case Tags.TagRef: return readRef(reader); - default: unexpectedTag(tag); - } - } - function readBytesWithoutTag(reader) { - var stream = reader.stream; - var count = readInt(stream, Tags.TagQuote); - var bytes = stream.read(count); - stream.skip(1); - reader.refer.set(bytes); - return bytes; - } - function readBytes(reader) { - var tag = reader.stream.readByte(); - switch (tag) { - case Tags.TagNull: return null; - case Tags.TagEmpty: return new Uint8Array(0); - case Tags.TagBytes: return readBytesWithoutTag(reader); - case Tags.TagRef: return readRef(reader); - default: unexpectedTag(tag); - } - } - function readUTF8CharWithoutTag(reader) { - return reader.stream.readString(1); - } - function _readString(reader) { - var stream = reader.stream; - var s = stream.readString(readInt(stream, Tags.TagQuote)); - stream.skip(1); - return s; - } - function readStringWithoutTag(reader) { - var s = _readString(reader); - reader.refer.set(s); - return s; - } - function readString(reader) { - var tag = reader.stream.readByte(); - switch (tag) { - case Tags.TagNull: return null; - case Tags.TagEmpty: return ''; - case Tags.TagUTF8Char: return readUTF8CharWithoutTag(reader); - case Tags.TagString: return readStringWithoutTag(reader); - case Tags.TagRef: return readRef(reader); - default: unexpectedTag(tag); - } - } - function readGuidWithoutTag(reader) { - var stream = reader.stream; - stream.skip(1); - var s = stream.readAsciiString(36); - stream.skip(1); - reader.refer.set(s); - return s; - } - function readGuid(reader) { - var tag = reader.stream.readByte(); - switch (tag) { - case Tags.TagNull: return null; - case Tags.TagGuid: return readGuidWithoutTag(reader); - case Tags.TagRef: return readRef(reader); - default: unexpectedTag(tag); - } - } - function readListWithoutTag(reader) { - var stream = reader.stream; - var list = []; - reader.refer.set(list); - var count = readInt(stream, Tags.TagOpenbrace); - for (var i = 0; i < count; i++) { - list[i] = unserialize(reader); - } - stream.skip(1); - return list; - } - function readList(reader) { - var tag = reader.stream.readByte(); - switch (tag) { - case Tags.TagNull: return null; - case Tags.TagList: return readListWithoutTag(reader); - case Tags.TagRef: return readRef(reader); - default: unexpectedTag(tag); - } - } - function readMapWithoutTag(reader) { - var stream = reader.stream; - var map = {}; - reader.refer.set(map); - var count = readInt(stream, Tags.TagOpenbrace); - for (var i = 0; i < count; i++) { - var key = unserialize(reader); - var value = unserialize(reader); - map[key] = value; - } - stream.skip(1); - return map; - } - function readMap(reader) { - var tag = reader.stream.readByte(); - switch (tag) { - case Tags.TagNull: return null; - case Tags.TagMap: return readMapWithoutTag(reader); - case Tags.TagRef: return readRef(reader); - default: unexpectedTag(tag); - } - } - function readHarmonyMapWithoutTag(reader) { - var stream = reader.stream; - var map = new Map(); - reader.refer.set(map); - var count = readInt(stream, Tags.TagOpenbrace); - for (var i = 0; i < count; i++) { - var key = unserialize(reader); - var value = unserialize(reader); - map.set(key, value); - } - stream.skip(1); - return map; - } - function readHarmonyMap(reader) { - var tag = reader.stream.readByte(); - switch (tag) { - case Tags.TagNull: return null; - case Tags.TagMap: return readHarmonyMapWithoutTag(reader); - case Tags.TagRef: return readRef(reader); - default: unexpectedTag(tag); - } - } - function readObjectWithoutTag(reader) { - var stream = reader.stream; - var cls = reader.classref[readInt(stream, Tags.TagOpenbrace)]; - var obj = new cls.classname(); - reader.refer.set(obj); - for (var i = 0; i < cls.count; i++) { - obj[cls.fields[i]] = unserialize(reader); - } - stream.skip(1); - return obj; - } - function readObject(reader) { - var tag = reader.stream.readByte(); - switch(tag) { - case Tags.TagNull: return null; - case Tags.TagClass: readClass(reader); return readObject(reader); - case Tags.TagObject: return readObjectWithoutTag(reader); - case Tags.TagRef: return readRef(reader); - default: unexpectedTag(tag); - } - } - function readClass(reader) { - var stream = reader.stream; - var classname = _readString(reader); - var count = readInt(stream, Tags.TagOpenbrace); - var fields = []; - for (var i = 0; i < count; i++) { - fields[i] = readString(reader); - } - stream.skip(1); - classname = getClass(classname); - reader.classref.push({ - classname: classname, - count: count, - fields: fields - }); - } - function readRef(reader) { - return reader.refer.read(readInt(reader.stream, Tags.TagSemicolon)); - } - - function Reader(stream, simple, useHarmonyMap) { - RawReader.call(this, stream); - this.useHarmonyMap = !!useHarmonyMap; - Object.defineProperties(this, { - classref: { value: [] }, - refer: { value: simple ? fakeReaderRefer : realReaderRefer() } - }); - } - - Reader.prototype = Object.create(RawReader.prototype); - Reader.prototype.constructor = Reader; - - Object.defineProperties(Reader.prototype, { - useHarmonyMap: { value: false, writable: true }, - checkTag: { value: function(expectTag, tag) { - if (tag === undefined) { tag = this.stream.readByte(); } - if (tag !== expectTag) { unexpectedTag(tag, expectTag); } - } }, - checkTags: { value: function(expectTags, tag) { - if (tag === undefined) { tag = this.stream.readByte(); } - if (expectTags.indexOf(tag) >= 0) { return tag; } - unexpectedTag(tag, expectTags); - } }, - unserialize: { value: function() { - return unserialize(this); - } }, - readInteger: { value: function() { - return readInteger(this.stream); - } }, - readLong: { value: function() { - return readLong(this.stream); - } }, - readDouble: { value: function() { - return readDouble(this.stream); - } }, - readBoolean: { value: function() { - return readBoolean(this.stream); - } }, - readDateWithoutTag: { value: function() { - return readDateWithoutTag(this); - } }, - readDate: { value: function() { - return readDate(this); - } }, - readTimeWithoutTag: { value: function() { - return readTimeWithoutTag(this); - } }, - readTime: { value: function() { - return readTime(this); - } }, - readBytesWithoutTag: { value: function() { - return readBytesWithoutTag(this); - } }, - readBytes: { value: function() { - return readBytes(this); - } }, - readStringWithoutTag: { value: function() { - return readStringWithoutTag(this); - } }, - readString: { value: function() { - return readString(this); - } }, - readGuidWithoutTag: { value: function() { - return readGuidWithoutTag(this); - } }, - readGuid: { value: function() { - return readGuid(this); - } }, - readListWithoutTag: { value: function() { - return readListWithoutTag(this); - } }, - readList: { value: function() { - return readList(this); - } }, - readMapWithoutTag: { value: function() { - return this.useHarmonyMap ? - readHarmonyMapWithoutTag(this) : - readMapWithoutTag(this); - } }, - readMap: { value: function() { - return this.useHarmonyMap ? - readHarmonyMap(this) : - readMap(this); - } }, - readObjectWithoutTag: { value: function() { - return readObjectWithoutTag(this); - } }, - readObject: { value: function() { - return readObject(this); - } }, - reset: { value: function() { - this.classref.length = 0; - this.refer.reset(); - } } - }); - - global.hprose.Reader = Reader; -})(this); - -/**********************************************************\ -| | -| hprose | -| | -| Official WebSite: http://www.hprose.com/ | -| http://www.hprose.org/ | -| | -\**********************************************************/ - -/**********************************************************\ - * * - * Formatter.js * - * * - * hprose Formatter for HTML5. * - * * - * LastModified: Feb 23, 2016 * - * Author: Ma Bingyao * - * * -\**********************************************************/ - -(function (global) { - 'use strict'; - - var BytesIO = global.hprose.BytesIO; - var Writer = global.hprose.Writer; - var Reader = global.hprose.Reader; - - function serialize(value, simple) { - var stream = new BytesIO(); - var writer = new Writer(stream, simple); - writer.serialize(value); - return stream; - } - - function unserialize(stream, simple, useHarmonyMap) { - if (!(stream instanceof BytesIO)) { - stream = new BytesIO(stream); - } - return new Reader(stream, simple, useHarmonyMap).unserialize(); - } - - global.hprose.Formatter = { - serialize: function (value, simple) { - return serialize(value, simple).bytes; - }, - unserialize: unserialize - }; - - global.hprose.serialize = serialize; - - global.hprose.unserialize = unserialize; - -})(this); - -/**********************************************************\ -| | -| hprose | -| | -| Official WebSite: http://www.hprose.com/ | -| http://www.hprose.org/ | -| | -\**********************************************************/ - -/**********************************************************\ - * * - * ResultMode.js * - * * - * hprose ResultMode for HTML5. * - * * - * LastModified: Feb 23, 2016 * - * Author: Ma Bingyao * - * * -\**********************************************************/ - -(function (global) { - 'use strict'; - - global.hprose.ResultMode = { - Normal: 0, - Serialized: 1, - Raw: 2, - RawWithEndTag: 3 - }; - global.hprose.Normal = global.hprose.ResultMode.Normal; - global.hprose.Serialized = global.hprose.ResultMode.Serialized; - global.hprose.Raw = global.hprose.ResultMode.Raw; - global.hprose.RawWithEndTag = global.hprose.ResultMode.RawWithEndTag; - -})(this); - -/**********************************************************\ -| | -| hprose | -| | -| Official WebSite: http://www.hprose.com/ | -| http://www.hprose.org/ | -| | -\**********************************************************/ -/**********************************************************\ - * * - * Client.js * - * * - * hprose client for HTML5. * - * * - * LastModified: Jul 4, 2016 * - * Author: Ma Bingyao * - * * -\**********************************************************/ - -(function (global, undefined) { - 'use strict'; - - var setImmediate = global.setImmediate; - var Tags = global.hprose.Tags; - var ResultMode = global.hprose.ResultMode; - var BytesIO = global.hprose.BytesIO; - var Writer = global.hprose.Writer; - var Reader = global.hprose.Reader; - var Future = global.hprose.Future; - - var GETFUNCTIONS = new Uint8Array(1); - GETFUNCTIONS[0] = Tags.TagEnd; - - function noop(){} - - var s_boolean = 'boolean'; - var s_string = 'string'; - var s_number = 'number'; - var s_function = 'function'; - var s_object = 'object'; - - function Client(uri, functions, settings) { - - // private members - var _uri, - _uris = [], - _index = -1, - _byref = false, - _simple = false, - _timeout = 30000, - _retry = 10, - _idempotent = false, - _failswitch = false, - _lock = false, - _tasks = [], - _useHarmonyMap = false, - _onerror = noop, - _filters = [], - _batch = false, - _batches = [], - _ready = new Future(), - _topics = Object.create(null), - _id = null, - _keepAlive = true, - _invokeHandler = invokeHandler, - _batchInvokeHandler = batchInvokeHandler, - _beforeFilterHandler = beforeFilterHandler, - _afterFilterHandler = afterFilterHandler, - _invokeHandlers = [], - _batchInvokeHandlers = [], - _beforeFilterHandlers = [], - _afterFilterHandlers = [], - - self = this; - - function outputFilter(request, context) { - for (var i = 0, n = _filters.length; i < n; i++) { - request = _filters[i].outputFilter(request, context); - } - return request; - } - - function inputFilter(response, context) { - for (var i = _filters.length - 1; i >= 0; i--) { - response = _filters[i].inputFilter(response, context); - } - return response; - } - - function beforeFilterHandler(request, context) { - request = outputFilter(request, context); - return _afterFilterHandler(request, context) - .then(function(response) { - if (context.oneway) { return; } - return inputFilter(response, context); - }); - } - - function afterFilterHandler(request, context) { - return self.sendAndReceive(request, context); - } - - function sendAndReceive(request, context, onsuccess, onerror) { - _beforeFilterHandler(request, context) - .then(onsuccess, function(e) { - if (retry(request, context, onsuccess, onerror)) { return; } - onerror(e); - }); - } - - function retry(data, context, onsuccess, onerror) { - if (context.failswitch) { - if (++_index >= _uris.length) { - _index = 0; - } - _uri = _uris[_index]; - } - if (context.idempotent) { - if (--context.retry >= 0) { - var interval = (context.retry >= 10) ? 500 : (10 - context.retry) * 500; - global.setTimeout(function() { - sendAndReceive(data, context, onsuccess, onerror); - }, interval); - return true; - } - } - return false; - } - - function initService(stub) { - var context = { - retry: _retry, - idempotent: true, - failswitch: true, - timeout: _timeout, - client: self, - userdata: {} - }; - var onsuccess = function(data) { - var error = null; - try { - var stream = new BytesIO(data); - var reader = new Reader(stream, true); - var tag = stream.readByte(); - switch (tag) { - case Tags.TagError: - error = new Error(reader.readString()); - break; - case Tags.TagFunctions: - var functions = reader.readList(); - reader.checkTag(Tags.TagEnd); - setFunctions(stub, functions); - break; - default: - error = new Error('Wrong Response:\r\n' + BytesIO.toString(data)); - break; - } - } - catch (e) { - error = e; - } - if (error !== null) { - _ready.reject(error); - } - else { - _ready.resolve(stub); - } - }; - sendAndReceive(GETFUNCTIONS, context, onsuccess, _ready.reject); - } - - function setFunction(stub, name) { - return function() { - if (_batch) { - return _invoke(stub, name, Array.slice(arguments), true); - } - else { - return Future.all(arguments).then(function(args) { - return _invoke(stub, name, args, false); - }); - } - }; - } - - function setMethods(stub, obj, namespace, name, methods) { - if (obj[name] !== undefined) { return; } - obj[name] = {}; - if (typeof(methods) === s_string || methods.constructor === Object) { - methods = [methods]; - } - if (Array.isArray(methods)) { - for (var i = 0; i < methods.length; i++) { - var m = methods[i]; - if (typeof(m) === s_string) { - obj[name][m] = setFunction(stub, namespace + name + '_' + m); - } - else { - for (var n in m) { - setMethods(stub, obj[name], name + '_', n, m[n]); - } - } - } - } - } - - function setFunctions(stub, functions) { - for (var i = 0; i < functions.length; i++) { - var f = functions[i]; - if (typeof(f) === s_string) { - if (stub[f] === undefined) { - stub[f] = setFunction(stub, f); - } - } - else { - for (var name in f) { - setMethods(stub, stub, '', name, f[name]); - } - } - } - } - - function copyargs(src, dest) { - var n = Math.min(src.length, dest.length); - for (var i = 0; i < n; ++i) { dest[i] = src[i]; } - } - - function initContext(batch) { - if (batch) { - return { - mode: ResultMode.Normal, - byref: _byref, - simple: _simple, - onsuccess: undefined, - onerror: undefined, - useHarmonyMap: _useHarmonyMap, - client: self, - userdata: {} - }; - } - return { - mode: ResultMode.Normal, - byref: _byref, - simple: _simple, - timeout: _timeout, - retry: _retry, - idempotent: _idempotent, - failswitch: _failswitch, - oneway: false, - sync: false, - onsuccess: undefined, - onerror: undefined, - useHarmonyMap: _useHarmonyMap, - client: self, - userdata: {} - }; - } - - function getContext(stub, name, args, batch) { - var context = initContext(batch); - if (name in stub) { - var method = stub[name]; - for (var key in method) { - if (key in context) { - context[key] = method[key]; - } - } - } - var i = 0, n = args.length; - for (; i < n; ++i) { - if (typeof args[i] === s_function) { break; } - } - if (i === n) { return context; } - var extra = args.splice(i, n - i); - context.onsuccess = extra[0]; - n = extra.length; - for (i = 1; i < n; ++i) { - var arg = extra[i]; - switch (typeof arg) { - case s_function: - context.onerror = arg; break; - case s_boolean: - context.byref = arg; break; - case s_number: - context.mode = arg; break; - case s_object: - for (var k in arg) { - if (k in context) { - context[k] = arg[k]; - } - } - break; - } - } - return context; - } - - function encode(name, args, context) { - var stream = new BytesIO(); - stream.writeByte(Tags.TagCall); - var writer = new Writer(stream, context.simple); - writer.writeString(name); - if (args.length > 0 || context.byref) { - writer.reset(); - writer.writeList(args); - if (context.byref) { - writer.writeBoolean(true); - } - } - return stream; - } - - function __invoke(name, args, context, batch) { - if (_lock) { - return Future.promise(function(resolve, reject) { - _tasks.push({ - batch: batch, - name: name, - args: args, - context: context, - resolve: resolve, - reject: reject - }); - }); - } - if (batch) { - return multicall(name, args, context); - } - return call(name, args, context); - } - - function _invoke(stub, name, args, batch) { - return __invoke(name, args, getContext(stub, name, args, batch), batch); - } - - function errorHandling(name, error, context, reject) { - try { - if (context.onerror) { - context.onerror(name, error); - } - else { - _onerror(name, error); - } - reject(error); - } - catch (e) { - reject(e); - } - } - - function invokeHandler(name, args, context) { - var request = encode(name, args, context); - request.writeByte(Tags.TagEnd); - return Future.promise(function(resolve, reject) { - sendAndReceive(request.bytes, context, function(response) { - if (context.oneway) { - resolve(); - return; - } - var result = null; - var error = null; - try { - if (context.mode === ResultMode.RawWithEndTag) { - result = response; - } - else if (context.mode === ResultMode.Raw) { - result = response.subarray(0, response.byteLength - 1); - } - else { - var stream = new BytesIO(response); - var reader = new Reader(stream, false, context.useHarmonyMap); - var tag = stream.readByte(); - if (tag === Tags.TagResult) { - if (context.mode === ResultMode.Serialized) { - result = reader.readRaw(); - } - else { - result = reader.unserialize(); - } - tag = stream.readByte(); - if (tag === Tags.TagArgument) { - reader.reset(); - var _args = reader.readList(); - copyargs(_args, args); - tag = stream.readByte(); - } - } - else if (tag === Tags.TagError) { - error = new Error(reader.readString()); - tag = stream.readByte(); - } - if (tag !== Tags.TagEnd) { - error = new Error('Wrong Response:\r\n' + BytesIO.toString(response)); - } - } - } - catch (e) { - error = e; - } - if (error) { - reject(error); - } - else { - resolve(result); - } - }, reject); - }); - } - - function unlock(sync) { - return function() { - if (sync) { - _lock = false; - setImmediate(function(tasks) { - tasks.forEach(function(task) { - if ('settings' in task) { - endBatch(task.settings) - .then(task.resolve, task.reject); - } - else { - __invoke(task.name, task.args, task.context, task.batch).then(task.resolve, task.reject); - } - }); - }, _tasks); - _tasks = []; - } - }; - } - - function call(name, args, context) { - if (context.sync) { _lock = true; } - var promise = Future.promise(function(resolve, reject) { - _invokeHandler(name, args, context).then(function(result) { - try { - if (context.onsuccess) { - try { - context.onsuccess(result, args); - } - catch (e) { - if (context.onerror) { - context.onerror(name, e); - } - reject(e); - } - } - resolve(result); - } - catch (e) { - reject(e); - } - }, function(error) { - errorHandling(name, error, context, reject); - }); - }); - promise.whenComplete(unlock(context.sync)); - return promise; - } - - function multicall(name, args, context) { - return Future.promise(function(resolve, reject) { - _batches.push({ - args: args, - name: name, - context: context, - resolve: resolve, - reject: reject - }); - }); - } - - function getBatchContext(settings) { - var context = { - timeout: _timeout, - retry: _retry, - idempotent: _idempotent, - failswitch: _failswitch, - oneway: false, - sync: false, - client: self, - userdata: {} - }; - for (var k in settings) { - if (k in context) { - context[k] = settings[k]; - } - } - return context; - } - - function batchInvokeHandler(batches, context) { - var request = batches.reduce(function(stream, item) { - stream.write(encode(item.name, item.args, item.context)); - return stream; - }, new BytesIO()); - request.writeByte(Tags.TagEnd); - return Future.promise(function(resolve, reject) { - sendAndReceive(request.bytes, context, function(response) { - if (context.oneway) { - resolve(batches); - return; - } - var i = -1; - var stream = new BytesIO(response); - var reader = new Reader(stream, false); - var tag = stream.readByte(); - try { - while (tag !== Tags.TagEnd) { - var result = null; - var error = null; - var mode = batches[++i].context.mode; - if (mode >= ResultMode.Raw) { - result = new BytesIO(); - } - if (tag === Tags.TagResult) { - if (mode === ResultMode.Serialized) { - result = reader.readRaw(); - } - else if (mode >= ResultMode.Raw) { - result.writeByte(Tags.TagResult); - result.write(reader.readRaw()); - } - else { - reader.useHarmonyMap = batches[i].context.useHarmonyMap; - reader.reset(); - result = reader.unserialize(); - } - tag = stream.readByte(); - if (tag === Tags.TagArgument) { - if (mode >= ResultMode.Raw) { - result.writeByte(Tags.TagArgument); - result.write(reader.readRaw()); - } - else { - reader.reset(); - var _args = reader.readList(); - copyargs(_args, batches[i].args); - } - tag = stream.readByte(); - } - } - else if (tag === Tags.TagError) { - if (mode >= ResultMode.Raw) { - result.writeByte(Tags.TagError); - result.write(reader.readRaw()); - } - else { - reader.reset(); - error = new Error(reader.readString()); - } - tag = stream.readByte(); - } - if ([Tags.TagEnd, - Tags.TagResult, - Tags.TagError].indexOf(tag) < 0) { - reject(new Error('Wrong Response:\r\n' + BytesIO.toString(response))); - return; - } - if (mode >= ResultMode.Raw) { - if (mode === ResultMode.RawWithEndTag) { - result.writeByte(Tags.TagEnd); - } - batches[i].result = result.bytes; - } - else { - batches[i].result = result; - } - batches[i].error = error; - } - } - catch (e) { - reject(e); - return; - } - resolve(batches); - }, reject); - }); - } - - function beginBatch() { - _batch = true; - } - - function endBatch(settings) { - settings = settings || {}; - _batch = false; - if (_lock) { - return Future.promise(function(resolve, reject) { - _tasks.push({ - batch: true, - settings: settings, - resolve: resolve, - reject: reject - }); - }); - } - var batchSize = _batches.length; - if (batchSize === 0) { return Future.value([]); } - var context = getBatchContext(settings); - if (context.sync) { _lock = true; } - var batches = _batches; - _batches = []; - var promise = Future.promise(function(resolve, reject) { - _batchInvokeHandler(batches, context).then(function(batches) { - batches.forEach(function(i) { - if (i.error) { - errorHandling(i.name, i.error, i.context, i.reject); - } - else { - try { - if (i.context.onsuccess) { - try { - i.context.onsuccess(i.result, i.args); - } - catch (e) { - if (i.context.onerror) { - i.context.onerror(i.name, e); - } - i.reject(e); - } - } - i.resolve(i.result); - } - catch (e) { - i.reject(e); - } - } - delete i.context; - delete i.resolve; - delete i.reject; - }); - resolve(batches); - }, function(error) { - batches.forEach(function(i) { - if ('reject' in i) { - errorHandling(i.name, error, i.context, i.reject); - } - }); - reject(error); - }); - }); - promise.whenComplete(unlock(context.sync)); - return promise; - } - - function getOnError() { - return _onerror; - } - function setOnError(value) { - if (typeof(value) === s_function) { - _onerror = value; - } - } - function getUri() { - return _uri; - } - function getFailswitch() { - return _failswitch; - } - function setFailswitch(value) { - _failswitch = !!value; - } - function getTimeout() { - return _timeout; - } - function setTimeout(value) { - if (typeof(value) === 'number') { - _timeout = value | 0; - } - else { - _timeout = 0; - } - } - function getRetry() { - return _retry; - } - function setRetry(value) { - if (typeof(value) === 'number') { - _retry = value | 0; - } - else { - _retry = 0; - } - } - function getIdempotent() { - return _idempotent; - } - function setIdempotent(value) { - _idempotent = !!value; - } - function setKeepAlive(value) { - _keepAlive = !!value; - } - function getKeepAlive() { - return _keepAlive; - } - function getByRef() { - return _byref; - } - function setByRef(value) { - _byref = !!value; - } - function getSimpleMode() { - return _simple; - } - function setSimpleMode(value) { - _simple = !!value; - } - function getUseHarmonyMap() { - return _useHarmonyMap; - } - function setUseHarmonyMap(value) { - _useHarmonyMap = !!value; - } - function getFilter() { - if (_filters.length === 0) { - return null; - } - if (_filters.length === 1) { - return _filters[0]; - } - return _filters.slice(); - } - function setFilter(filter) { - _filters.length = 0; - if (Array.isArray(filter)) { - filter.forEach(function(filter) { - addFilter(filter); - }); - } - else { - addFilter(filter); - } - } - function addFilter(filter) { - if (filter && - typeof filter.inputFilter === 'function' && - typeof filter.outputFilter === 'function') { - _filters.push(filter); - } - } - function removeFilter(filter) { - var i = _filters.indexOf(filter); - if (i === -1) { - return false; - } - _filters.splice(i, 1); - return true; - } - function filters() { - return _filters; - } - function useService(uri, functions, create) { - if (create === undefined) { - if (typeof(functions) === s_boolean) { - create = functions; - functions = false; - } - if (!functions) { - if (typeof(uri) === s_boolean) { - create = uri; - uri = false; - } - else if (uri && uri.constructor === Object || - Array.isArray(uri)) { - functions = uri; - uri = false; - } - } - } - var stub = self; - if (create) { - stub = {}; - } - if (!uri && !_uri) { - return new Error('You should set server uri first!'); - } - if (uri) { - _uri = uri; - } - if (typeof(functions) === s_string || - (functions && functions.constructor === Object)) { - functions = [functions]; - } - if (!Array.isArray(functions)) { - setImmediate(initService, stub); - return _ready; - } - setFunctions(stub, functions); - _ready.resolve(stub); - return stub; - } - function invoke(name, args, onsuccess/*, onerror, settings*/) { - var argc = arguments.length; - if ((argc < 1) || (typeof name !== s_string)) { - throw new Error('name must be a string'); - } - if (argc === 1) { args = []; } - if (argc === 2) { - if (!Array.isArray(args)) { - var _args = []; - if (typeof args !== s_function) { - _args.push(noop); - } - _args.push(args); - args = _args; - } - } - if (argc > 2) { - if (typeof onsuccess !== s_function) { - args.push(noop); - } - for (var i = 2; i < argc; i++) { - args.push(arguments[i]); - } - } - return _invoke(self, name, args, _batch); - } - function ready(onComplete, onError) { - return _ready.then(onComplete, onError); - } - function getTopic(name, id, create) { - if (_topics[name]) { - var topics = _topics[name]; - if (topics[id]) { - return topics[id]; - } - return null; - } - if (create) { - _topics[name] = Object.create(null); - } - return null; - } - // subscribe(name, callback, timeout) - // subscribe(name, id, callback, timeout) - function subscribe(name, id, callback, timeout) { - if (typeof name !== s_string) { - throw new TypeError('topic name must be a string.'); - } - if (id === undefined || id === null) { - if (typeof callback === s_function) { - id = callback; - } - else { - throw new TypeError('callback must be a function.'); - } - } - if (typeof id === s_function) { - timeout = callback; - callback = id; - if (_id === null) { - _id = autoId(); - } - _id.then(function(id) { - subscribe(name, id, callback, timeout); - }); - return; - } - if (typeof callback !== s_function) { - throw new TypeError('callback must be a function.'); - } - if (Future.isPromise(id)) { - id.then(function(id) { - subscribe(name, id, callback, timeout); - }); - return; - } - if (timeout === undefined) { timeout = _timeout; } - var topic = getTopic(name, id, true); - if (topic === null) { - var cb = function() { - _invoke(self, name, [id, topic.handler, cb, { - idempotent: true, - failswitch: false, - timeout: timeout - }], false); - }; - topic = { - handler: function(result) { - var topic = getTopic(name, id, false); - if (topic) { - if (result !== null) { - var callbacks = topic.callbacks; - for (var i = 0, n = callbacks.length; i < n; ++i) { - try { - callbacks[i](result); - } - catch (e) {} - } - } - if (getTopic(name, id, false) !== null) { cb(); } - } - }, - callbacks: [callback] - }; - _topics[name][id] = topic; - cb(); - } - else if (topic.callbacks.indexOf(callback) < 0) { - topic.callbacks.push(callback); - } - } - function delTopic(topics, id, callback) { - if (topics) { - if (typeof callback === s_function) { - var topic = topics[id]; - if (topic) { - var callbacks = topic.callbacks; - var p = callbacks.indexOf(callback); - if (p >= 0) { - callbacks[p] = callbacks[callbacks.length - 1]; - callbacks.length--; - } - if (callbacks.length === 0) { - delete topics[id]; - } - } - } - else { - delete topics[id]; - } - } - } - // unsubscribe(name) - // unsubscribe(name, callback) - // unsubscribe(name, id) - // unsubscribe(name, id, callback) - function unsubscribe(name, id, callback) { - if (typeof name !== s_string) { - throw new TypeError('topic name must be a string.'); - } - if (id === undefined || id === null) { - if (typeof callback === s_function) { - id = callback; - } - else { - delete _topics[name]; - return; - } - } - if (typeof id === s_function) { - callback = id; - id = null; - } - if (id === null) { - if (_id === null) { - if (_topics[name]) { - var topics = _topics[name]; - for (id in topics) { - delTopic(topics, id, callback); - } - } - } - else { - _id.then(function(id) { - unsubscribe(name, id, callback); - }); - } - } - else if (Future.isPromise(id)) { - id.then(function(id) { - unsubscribe(name, id, callback); - }); - } - else { - delTopic(_topics[name], id, callback); - } - } - function getId() { - return _id; - } - function autoId() { - return _invoke(self, '#', [], false); - } - autoId.sync = true; - autoId.idempotent = true; - autoId.failswitch = true; - function addInvokeHandler(handler) { - _invokeHandlers.push(handler); - _invokeHandler = _invokeHandlers.reduceRight( - function(next, handler) { - return function(name, args, context) { - return Future.sync(function() { - return handler(name, args, context, next); - }); - }; - }, invokeHandler); - } - function addBatchInvokeHandler(handler) { - _batchInvokeHandlers.push(handler); - _batchInvokeHandler = _batchInvokeHandlers.reduceRight( - function(next, handler) { - return function(batches, context) { - return Future.sync(function() { - return handler(batches, context, next); - }); - }; - }, batchInvokeHandler); - } - function addBeforeFilterHandler(handler) { - _beforeFilterHandlers.push(handler); - _beforeFilterHandler = _beforeFilterHandlers.reduceRight( - function(next, handler) { - return function(request, context) { - return Future.sync(function() { - return handler(request, context, next); - }); - }; - }, beforeFilterHandler); - } - function addAfterFilterHandler(handler) { - _afterFilterHandlers.push(handler); - _afterFilterHandler = _afterFilterHandlers.reduceRight( - function(next, handler) { - return function(request, context) { - return Future.sync(function() { - return handler(request, context, next); - }); - }; - }, afterFilterHandler); - } - function use(handler) { - addInvokeHandler(handler); - return self; - } - var batch = Object.create(null, { - begin: { value: beginBatch }, - end: { value: endBatch }, - use: { value: function(handler) { - addBatchInvokeHandler(handler); - return batch; - } } - }); - var beforeFilter = Object.create(null, { - use: { value: function(handler) { - addBeforeFilterHandler(handler); - return beforeFilter; - } } - }); - var afterFilter = Object.create(null, { - use: { value: function(handler) { - addAfterFilterHandler(handler); - return afterFilter; - } } - }); - Object.defineProperties(this, { - '#': { value: autoId }, - onerror: { get: getOnError, set: setOnError }, - uri: { get: getUri }, - id: { get: getId }, - failswitch: { get: getFailswitch, set: setFailswitch }, - timeout: { get: getTimeout, set: setTimeout }, - retry: { get: getRetry, set: setRetry }, - idempotent: { get: getIdempotent, set: setIdempotent }, - keepAlive: { get: getKeepAlive, set: setKeepAlive }, - byref: { get: getByRef, set: setByRef }, - simple: { get: getSimpleMode, set: setSimpleMode }, - useHarmonyMap: { get: getUseHarmonyMap, set: setUseHarmonyMap }, - filter: { get: getFilter, set: setFilter }, - addFilter: { value: addFilter }, - removeFilter: { value: removeFilter }, - filters: { get: filters }, - useService: { value: useService }, - invoke: { value: invoke }, - ready: { value: ready }, - subscribe: { value: subscribe }, - unsubscribe: { value: unsubscribe }, - use: { value: use }, - batch: { value: batch }, - beforeFilter: { value: beforeFilter }, - afterFilter: { value: afterFilter } - }); - /* function constructor */ { - if ((settings) && (typeof settings === s_object)) { - ['failswitch', 'timeout', 'retry', 'idempotent', - 'keepAlive', 'byref', 'simple','useHarmonyMap', - 'filter'].forEach(function(key) { - if (key in settings) { - self[key] = settings[key]; - } - }); - } - if (typeof(uri) === s_string) { - _uris = [uri]; - _index = 0; - useService(uri, functions); - } - else if (Array.isArray(uri)) { - _uris = uri; - _index = Math.floor(Math.random() * _uris.length); - useService(_uris[_index], functions); - } - } - } - - function checkuri(uri) { - var parser = document.createElement('a'); - parser.href = uri; - var protocol = parser.protocol; - if (protocol === 'http:' || - protocol === 'https:' || - protocol === 'tcp:' || - protocol === 'tcp4:'|| - protocol === 'tcp6:' || - protocol === 'tcps:' || - protocol === 'tcp4s:' || - protocol === 'tcp6s:' || - protocol === 'tls:' || - protocol === 'ws:' || - protocol === 'wss:') { - return; - } - throw new Error('The ' + protocol + ' client isn\'t implemented.'); - } - - function create(uri, functions, settings) { - try { - return global.hprose.HttpClient.create(uri, functions, settings); - } - catch(e) {} - try { - return global.hprose.TcpClient.create(uri, functions, settings); - } - catch(e) {} - try { - return global.hprose.WebSocketClient.create(uri, functions, settings); - } - catch(e) {} - if (typeof uri === 'string') { - checkuri(uri); - } - else if (Array.isArray(uri)) { - uri.forEach(function(uri) { checkuri(uri); }); - throw new Error('Not support multiple protocol.'); - } - throw new Error('You should set server uri first!'); - } - - Object.defineProperty(Client, 'create', { value: create }); - - global.hprose.Client = Client; - -})(this); - -/**********************************************************\ -| | -| hprose | -| | -| Official WebSite: http://www.hprose.com/ | -| http://www.hprose.org/ | -| | -\**********************************************************/ -/**********************************************************\ - * * - * HttpClient.js * - * * - * hprose http client for HTML5. * - * * - * LastModified: Feb 28, 2016 * - * Author: Ma Bingyao * - * * -\**********************************************************/ - -(function (global, undefined) { - 'use strict'; - - var Client = global.hprose.Client; - var Future = global.hprose.Future; - var BytesIO = global.hprose.BytesIO; - var TimeoutError = global.TimeoutError; - - function noop(){} - - function HttpClient(uri, functions, settings) { - if (this.constructor !== HttpClient) { - return new HttpClient(uri, functions, settings); - } - Client.call(this, uri, functions, settings); - var _header = Object.create(null); - var _onreqprogress = noop; - var _onresprogress = noop; - - var self = this; - - function xhrPost(request, env) { - var future = new Future(); - var xhr = new XMLHttpRequest(); - xhr.open('POST', self.uri, true); - if (global.location !== undefined && global.location.protocol !== 'file:') { - xhr.withCredentials = 'true'; - } - xhr.responseType = 'arraybuffer'; - for (var name in _header) { - xhr.setRequestHeader(name, _header[name]); - } - xhr.onload = function() { - xhr.onload = noop; - if (xhr.status) { - if (xhr.status === 200) { - future.resolve(new Uint8Array(xhr.response)); - } - else { - future.reject(new Error(xhr.status + ':' + xhr.statusText)); - } - } - }; - xhr.onerror = function() { - future.reject(new Error('error')); - }; - if (xhr.upload !== undefined) { - xhr.upload.onprogress = _onreqprogress; - } - xhr.onprogress = _onresprogress; - if (env.timeout > 0) { - future = future.timeout(env.timeout).catchError(function(e) { - xhr.onload = noop; - xhr.onerror = noop; - xhr.abort(); - throw e; - }, - function(e) { - return e instanceof TimeoutError; - }); - } - if (request.constructor === String || ArrayBuffer.isView) { - xhr.send(request); - } - else if (request.buffer.slice) { - xhr.send(request.buffer.slice(0, request.length)); - } - else { - var buf = new Uint8Array(request.length); - buf.set(request); - xhr.send(buf.buffer); - } - return future; - } - - function apiPost(request, env) { - var future = new Future(); - global.api.ajax({ - url: self.uri(), - method: 'post', - data: { body: BytesIO.toString(request) }, - timeout: env.timeout, - dataType: 'text', - headers: _header, - certificate: self.certificate - }, function(ret, err) { - if (ret) { - future.resolve((new BytesIO(ret)).takeBytes()); - } - else { - future.reject(new Error(err.msg)); - } - }); - return future; - } - - function sendAndReceive(request, env) { - var apicloud = (typeof(global.api) !== "undefined" && - typeof(global.api.ajax) !== "undefined"); - var future = apicloud ? apiPost(request, env) : - xhrPost(request, env); - if (env.oneway) { future.resolve(); } - return future; - } - - function setOnRequestProgress(value) { - if (typeof(value) === 'function') { - _onreqprogress = value; - } - } - function getOnRequestProgress() { - return _onreqprogress; - } - function setOnResponseProgress(value) { - if (typeof(value) === 'function') { - _onresprogress = value; - } - } - function getOnResponseProgress() { - return _onresprogress; - } - function setHeader(name, value) { - if (name.toLowerCase() !== 'content-type' && - name.toLowerCase() !== 'content-length') { - if (value) { - _header[name] = value; - } - else { - delete _header[name]; - } - } - } - Object.defineProperties(this, { - onprogress: { get: getOnRequestProgress, set: setOnRequestProgress }, - onRequestProgress: { get: getOnRequestProgress, set: setOnRequestProgress }, - onResponseProgress: { get: getOnResponseProgress, set: setOnResponseProgress }, - setHeader: { value: setHeader }, - sendAndReceive: { value: sendAndReceive } - }); - } - - function checkuri(uri) { - var parser = document.createElement('a'); - parser.href = uri; - if (parser.protocol === 'http:' || - parser.protocol === 'https:') { - return; - } - throw new Error('This client desn\'t support ' + parser.protocol + ' scheme.'); - } - - function create(uri, functions, settings) { - if (typeof uri === 'string') { - checkuri(uri); - } - else if (Array.isArray(uri)) { - uri.forEach(function(uri) { checkuri(uri); }); - } - else { - throw new Error('You should set server uri first!'); - } - return new HttpClient(uri, functions, settings); - } - - Object.defineProperty(HttpClient, 'create', { value: create }); - - global.hprose.HttpClient = HttpClient; - -})(this); - -/**********************************************************\ -| | -| hprose | -| | -| Official WebSite: http://www.hprose.com/ | -| http://www.hprose.org/ | -| | -\**********************************************************/ -/**********************************************************\ - * * - * WebSocketClient.js * - * * - * hprose websocket client for HTML5. * - * * - * LastModified: Mar 2, 2016 * - * Author: Ma Bingyao * - * * -\**********************************************************/ - -(function (global, undefined) { - 'use strict'; - - var BytesIO = global.hprose.BytesIO; - var Client = global.hprose.Client; - var Future = global.hprose.Future; - var TimeoutError = global.TimeoutError; - - var WebSocket = global.WebSocket || global.MozWebSocket; - - function noop(){} - function WebSocketClient(uri, functions, settings) { - if (typeof(WebSocket) === "undefined") { - throw new Error('WebSocket is not supported by this browser.'); - } - if (this.constructor !== WebSocketClient) { - return new WebSocketClient(uri, functions, settings); - } - - Client.call(this, uri, functions, settings); - - var _id = 0; - var _count = 0; - var _futures = []; - var _requests = []; - var _ready = null; - var ws = null; - - var self = this; - - function getNextId() { - return (_id < 0x7fffffff) ? ++_id : _id = 0; - } - function send(id, request) { - var bytes = new BytesIO(); - bytes.writeInt32BE(id); - if (request.constructor === String) { - bytes.writeString(request); - } - else { - bytes.write(request); - } - var message = bytes.bytes; - if (ArrayBuffer.isView) { - ws.send(message); - } - else if (message.buffer.slice) { - ws.send(message.buffer.slice(0, message.length)); - } - else { - ws.send(message.buffer); - } - } - function onopen(e) { - _ready.resolve(e); - } - function onmessage(e) { - var bytes = new BytesIO(e.data); - var id = bytes.readInt32BE(); - var future = _futures[id]; - delete _futures[id]; - if (future !== undefined) { - --_count; - future.resolve(bytes.read(bytes.length - 4)); - } - if ((_count < 100) && (_requests.length > 0)) { - ++_count; - var request = _requests.shift(); - _ready.then(function() { send(request[0], request[1]); }); - } - if (_count === 0 && !self.keepAlive) { - close(); - } - } - function onclose(e) { - _futures.forEach(function(future, id) { - future.reject(new Error(e.code + ':' + e.reason)); - delete _futures[id]; - }); - _count = 0; - ws = null; - } - function connect() { - _ready = new Future(); - ws = new WebSocket(self.uri); - ws.binaryType = 'arraybuffer'; - ws.onopen = onopen; - ws.onmessage = onmessage; - ws.onerror = noop; - ws.onclose = onclose; - } - function sendAndReceive(request, env) { - if (ws === null || - ws.readyState === WebSocket.CLOSING || - ws.readyState === WebSocket.CLOSED) { - connect(); - } - var id = getNextId(); - var future = new Future(); - _futures[id] = future; - if (env.timeout > 0) { - future = future.timeout(env.timeout).catchError(function(e) { - delete _futures[id]; - --_count; - throw e; - }, - function(e) { - return e instanceof TimeoutError; - }); - } - if (_count < 100) { - ++_count; - _ready.then(function() { send(id, request); }); - } - else { - _requests.push([id, request]); - } - if (env.oneway) { future.resolve(); } - return future; - } - function close() { - if (ws !== null) { - ws.onopen = noop; - ws.onmessage = noop; - ws.onclose = noop; - ws.close(); - } - } - - Object.defineProperties(this, { - sendAndReceive: { value: sendAndReceive }, - close: { value: close } - }); - } - - function checkuri(uri) { - var parser = document.createElement('a'); - parser.href = uri; - if (parser.protocol === 'ws:' || - parser.protocol === 'wss:') { - return; - } - throw new Error('This client desn\'t support ' + parser.protocol + ' scheme.'); - } - - function create(uri, functions, settings) { - if (typeof uri === 'string') { - checkuri(uri); - } - else if (Array.isArray(uri)) { - uri.forEach(function(uri) { checkuri(uri); }); - } - else { - throw new Error('You should set server uri first!'); - } - return new WebSocketClient(uri, functions, settings); - } - - Object.defineProperty(WebSocketClient, 'create', { value: create }); - - global.hprose.WebSocketClient = WebSocketClient; - -})(this); - -/**********************************************************\ -| | -| hprose | -| | -| Official WebSite: http://www.hprose.com/ | -| http://www.hprose.org/ | -| | -\**********************************************************/ -/**********************************************************\ - * * - * ChromeTcpSocket.js * - * * - * chrome tcp socket for JavaScript. * - * * - * LastModified: Mar 2, 2016 * - * Author: Ma Bingyao * - * * -\**********************************************************/ - -(function (global, undefined) { - 'use strict'; - - var Future = global.hprose.Future; - - function noop(){} - - var socketPool = {}; - var socketManager = null; - - function receiveListener(info) { - var socket = socketPool[info.socketId]; - socket.onreceive(info.data); - } - - function receiveErrorListener(info) { - var socket = socketPool[info.socketId]; - socket.onerror(info.resultCode); - socket.destroy(); - } - - function ChromeTcpSocket() { - if (socketManager === null) { - socketManager = global.chrome.sockets.tcp; - socketManager.onReceive.addListener(receiveListener); - socketManager.onReceiveError.addListener(receiveErrorListener); - } - this.socketId = new Future(); - this.connected = false; - this.timeid = undefined; - this.onclose = noop; - this.onconnect = noop; - this.onreceive = noop; - this.onerror = noop; - } - - Object.defineProperties(ChromeTcpSocket.prototype, { - connect: { value: function(address, port, options) { - var self = this; - socketManager.create({ persistent: options && options.persistent }, function(createInfo) { - if (options) { - if ('noDelay' in options) { - socketManager.setNoDelay(createInfo.socketId, options.noDelay, function(result) { - if (result < 0) { - self.socketId.reject(result); - socketManager.disconnect(createInfo.socketId); - socketManager.close(createInfo.socketId); - self.onclose(); - } - }); - } - if ('keepAlive' in options) { - socketManager.setKeepAlive(createInfo.socketId, options.keepAlive, function(result) { - if (result < 0) { - self.socketId.reject(result); - socketManager.disconnect(createInfo.socketId); - socketManager.close(createInfo.socketId); - self.onclose(); - } - }); - } - } - if (options && options.tls) { - socketManager.setPaused(createInfo.socketId, true, function() { - socketManager.connect(createInfo.socketId, address, port, function(result) { - if (result < 0) { - self.socketId.reject(result); - socketManager.disconnect(createInfo.socketId); - socketManager.close(createInfo.socketId); - self.onclose(); - } - else { - socketManager.secure(createInfo.socketId, function(secureResult) { - if (secureResult !== 0) { - self.socketId.reject(result); - socketManager.disconnect(createInfo.socketId); - socketManager.close(createInfo.socketId); - self.onclose(); - } - else { - socketManager.setPaused(createInfo.socketId, false, function() { - self.socketId.resolve(createInfo.socketId); - }); - } - }); - } - }); - }); - } - else { - socketManager.connect(createInfo.socketId, address, port, function(result) { - if (result < 0) { - self.socketId.reject(result); - socketManager.disconnect(createInfo.socketId); - socketManager.close(createInfo.socketId); - self.onclose(); - } - else { - self.socketId.resolve(createInfo.socketId); - } - }); - } - }); - this.socketId.then(function(socketId) { - socketPool[socketId] = self; - self.connected = true; - self.onconnect(socketId); - }, function(reason) { - self.onerror(reason); - }); - } }, - send: { value: function(data) { - var self = this; - var promise = new Future(); - this.socketId.then(function(socketId) { - socketManager.send(socketId, data, function(sendInfo) { - if (sendInfo.resultCode < 0) { - self.onerror(sendInfo.resultCode); - promise.reject(sendInfo.resultCode); - self.destroy(); - } - else { - promise.resolve(sendInfo.bytesSent); - } - }); - }); - return promise; - } }, - destroy: { value: function() { - var self = this; - this.connected = false; - this.socketId.then(function(socketId) { - socketManager.disconnect(socketId); - socketManager.close(socketId); - delete socketPool[socketId]; - self.onclose(); - }); - } }, - ref: { value: function() { - this.socketId.then(function(socketId) { - socketManager.setPaused(socketId, false); - }); - } }, - unref: { value: function() { - this.socketId.then(function(socketId) { - socketManager.setPaused(socketId, true); - }); - } }, - clearTimeout: { value: function() { - if (this.timeid !== undefined) { - global.clearTimeout(this.timeid); - } - } }, - setTimeout: { value: function(timeout, fn) { - this.clearTimeout(); - this.timeid = global.setTimeout(fn, timeout); - } } - }); - - global.hprose.ChromeTcpSocket = ChromeTcpSocket; - -})(this); - -/**********************************************************\ -| | -| hprose | -| | -| Official WebSite: http://www.hprose.com/ | -| http://www.hprose.org/ | -| | -\**********************************************************/ -/**********************************************************\ - * * - * APICloudTcpSocket.js * - * * - * APICloud tcp socket for HTML5. * - * * - * LastModified: Mar 8, 2016 * - * Author: Ma Bingyao * - * * -\**********************************************************/ - -(function (global, undefined) { - 'use strict'; - - var Future = global.hprose.Future; - var atob = global.atob; - var btoa = global.btoa; - var toUint8Array = global.hprose.toUint8Array; - var toBinaryString = global.hprose.toBinaryString; - - function noop(){} - - var socketPool = {}; - var socketManager = null; - - function APICloudTcpSocket() { - if (socketManager === null) { - socketManager = global.api.require('socketManager'); - } - this.socketId = new Future(); - this.connected = false; - this.timeid = undefined; - this.onclose = noop; - this.onconnect = noop; - this.onreceive = noop; - this.onerror = noop; - } - - Object.defineProperties(APICloudTcpSocket.prototype, { - connect: { value: function(address, port, options) { - var self = this; - socketManager.createSocket({ - type: 'tcp', - host: address, - port: port, - timeout: options.timeout, - returnBase64: true - }, - function(ret/*, err*/) { - if (ret) { - switch(ret.state) { - case 101: break; - case 102: self.socketId.resolve(ret.sid); break; - case 103: self.onreceive(toUint8Array(atob(ret.data.replace(/\s+/g, '')))); break; - case 201: self.socketId.reject(new Error('Create TCP socket failed')); break; - case 202: self.socketId.reject(new Error('TCP connection failed')); break; - case 203: self.onclose(); self.onerror(new Error('Abnormal disconnect connection')); break; - case 204: self.onclose(); break; - case 205: self.onclose(); self.onerror(new Error('Unknown error')); break; - } - } - }); - this.socketId.then(function(socketId) { - socketPool[socketId] = self; - self.connected = true; - self.onconnect(socketId); - }, function(reason) { - self.onerror(reason); - }); - } }, - send: { value: function(data) { - var self = this; - var promise = new Future(); - this.socketId.then(function(socketId) { - socketManager.write({ - sid: socketId, - data: btoa(toBinaryString(data)), - base64: true - }, - function(ret, err) { - if (ret.status) { - promise.resolve(); - } - else { - self.onerror(new Error(err.msg)); - promise.reject(err.msg); - self.destroy(); - } - }); - }); - return promise; - } }, - destroy: { value: function() { - var self = this; - this.connected = false; - this.socketId.then(function(socketId) { - socketManager.closeSocket({ - sid: socketId - }, - function(ret, err) { - if (!ret.status) { - self.onerror(new Error(err.msg)); - } - }); - delete socketPool[socketId]; - //self.onclose(); - }); - } }, - ref: { value: noop }, - unref: { value: noop }, - clearTimeout: { value: function() { - if (this.timeid !== undefined) { - global.clearTimeout(this.timeid); - } - } }, - setTimeout: { value: function(timeout, fn) { - this.clearTimeout(); - this.timeid = global.setTimeout(fn, timeout); - } } - }); - - global.hprose.APICloudTcpSocket = APICloudTcpSocket; - -})(this); - -/**********************************************************\ -| | -| hprose | -| | -| Official WebSite: http://www.hprose.com/ | -| http://www.hprose.org/ | -| | -\**********************************************************/ -/**********************************************************\ - * * - * TcpClient.js * - * * - * hprose tcp client for HTML5. * - * * - * LastModified: Mar 2, 2016 * - * Author: Ma Bingyao * - * * -\**********************************************************/ - -(function (global, undefined) { - 'use strict'; - - var ChromeTcpSocket = global.hprose.ChromeTcpSocket; - var APICloudTcpSocket = global.hprose.APICloudTcpSocket; - var Client = global.hprose.Client; - var BytesIO = global.hprose.BytesIO; - var Future = global.hprose.Future; - var TimeoutError = global.TimeoutError; - - function noop(){} - - function setReceiveHandler(socket, onreceive) { - socket.onreceive = function(data) { - if (!('receiveEntry' in socket)) { - socket.receiveEntry = { - stream: new BytesIO(), - headerLength: 4, - dataLength: -1, - id: null - }; - } - var entry = socket.receiveEntry; - var stream = entry.stream; - var headerLength = entry.headerLength; - var dataLength = entry.dataLength; - var id = entry.id; - stream.write(data); - while (true) { - if ((dataLength < 0) && (stream.length >= headerLength)) { - dataLength = stream.readInt32BE(); - if ((dataLength & 0x80000000) !== 0) { - dataLength &= 0x7fffffff; - headerLength = 8; - } - } - if ((headerLength === 8) && (id === null) && (stream.length >= headerLength)) { - id = stream.readInt32BE(); - } - if ((dataLength >= 0) && ((stream.length - headerLength) >= dataLength)) { - onreceive(stream.read(dataLength), id); - headerLength = 4; - id = null; - stream.trunc(); - dataLength = -1; - } - else { - break; - } - } - entry.stream = stream; - entry.headerLength = headerLength; - entry.dataLength = dataLength; - entry.id = id; - }; - } - - function TcpTransporter(client) { - if (client) { - this.client = client; - this.uri = this.client.uri; - this.size = 0; - this.pool = []; - this.requests = []; - } - } - - Object.defineProperties(TcpTransporter.prototype, { - create: { value: function() { - var parser = document.createElement('a'); - parser.href = this.uri; - var protocol = parser.protocol; - // HTMLAnchorElement can't parse TCP protocol - // replace to HTTP can be correctly resolved. - parser.protocol = "http:"; - var address = parser.hostname; - var port = parseInt(parser.port, 10); - var tls; - if (protocol === 'tcp:' || - protocol === 'tcp4:' || - protocol === 'tcp6:') { - tls = false; - } - else if (protocol === 'tcps:' || - protocol === 'tcp4s:' || - protocol === 'tcp6s:' || - protocol === 'tls:') { - tls = true; - } - else { - throw new Error('Unsupported ' + protocol + ' protocol!'); - } - var conn; - if (global.chrome && global.chrome.sockets && global.chrome.sockets.tcp) { - conn = new ChromeTcpSocket(); - } - else if (global.api && global.api.require) { - conn = new APICloudTcpSocket(); - } - else { - throw new Error('TCP Socket is not supported by this browser or platform.'); - } - var self = this; - conn.connect(address, port, { - persistent: true, - tls: tls, - timeout: this.client.timeout, - noDelay: this.client.noDelay, - keepAlive: this.client.keepAlive - }); - conn.onclose = function() { --self.size; }; - ++this.size; - return conn; - } } - }); - - function FullDuplexTcpTransporter(client) { - TcpTransporter.call(this, client); - } - - FullDuplexTcpTransporter.prototype = Object.create( - TcpTransporter.prototype, { - fetch: { value: function() { - var pool = this.pool; - while (pool.length > 0) { - var conn = pool.shift(); - if (conn.connected) { - if (conn.count === 0) { - conn.clearTimeout(); - conn.ref(); - } - return conn; - } - } - return null; - } }, - init: { value: function(conn) { - var self = this; - conn.count = 0; - conn.futures = {}; - conn.timeoutIds = {}; - setReceiveHandler(conn, function(data, id) { - var future = conn.futures[id]; - if (future) { - self.clean(conn, id); - if (conn.count === 0) { - self.recycle(conn); - } - future.resolve(data); - } - }); - conn.onerror = function (e) { - var futures = conn.futures; - for (var id in futures) { - var future = futures[id]; - self.clean(conn, id); - future.reject(e); - } - }; - } }, - recycle: { value: function(conn) { - conn.unref(); - conn.setTimeout(this.client.poolTimeout, function() { - conn.destroy(); - }); - } }, - clean: { value: function(conn, id) { - if (conn.timeoutIds[id] !== undefined) { - global.clearTimeout(conn.timeoutIds[id]); - delete conn.timeoutIds[id]; - } - delete conn.futures[id]; - --conn.count; - this.sendNext(conn); - } }, - sendNext: { value: function(conn) { - if (conn.count < 10) { - if (this.requests.length > 0) { - var request = this.requests.shift(); - request.push(conn); - this.send.apply(this, request); - } - else { - this.pool.push(conn); - } - } - } }, - send: { value: function(request, future, id, env, conn) { - var self = this; - var timeout = env.timeout; - if (timeout > 0) { - conn.timeoutIds[id] = global.setTimeout(function() { - self.clean(conn, id); - if (conn.count === 0) { - self.recycle(conn); - } - future.reject(new TimeoutError('timeout')); - }, timeout); - } - conn.count++; - conn.futures[id] = future; - - var len = request.length; - var buf = new BytesIO(8 + len); - buf.writeInt32BE(len | 0x80000000); - buf.writeInt32BE(id); - buf.write(request); - conn.send(buf.buffer).then(function() { - self.sendNext(conn); - }); - } }, - getNextId: { value: function() { - return (this.nextid < 0x7fffffff) ? ++this.nextid : this.nextid = 0; - } }, - sendAndReceive: { value: function(request, future, env) { - var conn = this.fetch(); - var id = this.getNextId(); - if (conn) { - this.send(request, future, id, env, conn); - } - else if (this.size < this.client.maxPoolSize) { - conn = this.create(); - conn.onerror = function(e) { - future.reject(e); - }; - var self = this; - conn.onconnect = function() { - self.init(conn); - self.send(request, future, id, env, conn); - }; - } - else { - this.requests.push([request, future, id, env]); - } - } } - }); - - FullDuplexTcpTransporter.prototype.constructor = TcpTransporter; - - function HalfDuplexTcpTransporter(client) { - TcpTransporter.call(this, client); - } - - HalfDuplexTcpTransporter.prototype = Object.create( - TcpTransporter.prototype, { - fetch: { value: function() { - var pool = this.pool; - while (pool.length > 0) { - var conn = pool.shift(); - if (conn.connected) { - conn.clearTimeout(); - conn.ref(); - return conn; - } - } - return null; - } }, - recycle: { value: function(conn) { - conn.unref(); - conn.setTimeout(this.client.poolTimeout, function() { - conn.destroy(); - }); - this.pool.push(conn); - } }, - clean: { value: function(conn) { - conn.onreceive = noop; - conn.onerror = noop; - if (conn.timeoutId !== undefined) { - global.clearTimeout(conn.timeoutId); - delete conn.timeoutId; - } - } }, - sendNext: { value: function(conn) { - if (this.requests.length > 0) { - var request = this.requests.shift(); - request.push(conn); - this.send.apply(this, request); - } - else { - this.recycle(conn); - } - } }, - send: { value: function(request, future, env, conn) { - var self = this; - var timeout = env.timeout; - if (timeout > 0) { - conn.timeoutId = global.setTimeout(function() { - self.clean(conn); - self.recycle(conn); - future.reject(new TimeoutError('timeout')); - }, timeout); - } - setReceiveHandler(conn, function(data) { - self.clean(conn); - self.sendNext(conn); - future.resolve(data); - }); - conn.onerror = function(e) { - self.clean(conn); - future.reject(e); - }; - - var len = request.length; - var buf = new BytesIO(4 + len); - buf.writeInt32BE(len); - buf.write(request); - conn.send(buf.buffer); - } }, - sendAndReceive: { value: function(request, future, env) { - var conn = this.fetch(); - if (conn) { - this.send(request, future, env, conn); - } - else if (this.size < this.client.maxPoolSize) { - conn = this.create(); - var self = this; - conn.onerror = function(e) { - future.reject(e); - }; - conn.onconnect = function() { - self.send(request, future, env, conn); - }; - } - else { - this.requests.push([request, future, env]); - } - } } - }); - - HalfDuplexTcpTransporter.prototype.constructor = TcpTransporter; - - function TcpClient(uri, functions, settings) { - if (this.constructor !== TcpClient) { - return new TcpClient(uri, functions, settings); - } - Client.call(this, uri, functions, settings); - - var self = this; - var _noDelay = true; - var _fullDuplex = false; - var _maxPoolSize = 10; - var _poolTimeout = 30000; - var fdtrans = null; - var hdtrans = null; - - function getNoDelay() { - return _noDelay; - } - - function setNoDelay(value) { - _noDelay = !!value; - } - - function getFullDuplex() { - return _fullDuplex; - } - - function setFullDuplex(value) { - _fullDuplex = !!value; - } - - function getMaxPoolSize() { - return _maxPoolSize; - } - - function setMaxPoolSize(value) { - if (typeof(value) === 'number') { - _maxPoolSize = value | 0; - if (_maxPoolSize < 1) { - _maxPoolSize = 10; - } - } - else { - _maxPoolSize = 10; - } - } - - function getPoolTimeout() { - return _poolTimeout; - } - - function setPoolTimeout(value) { - if (typeof(value) === 'number') { - _poolTimeout = value | 0; - } - else { - _poolTimeout = 0; - } - } - - function sendAndReceive(request, env) { - var future = new Future(); - if (_fullDuplex) { - if ((fdtrans === null) || (fdtrans.uri !== self.uri)) { - fdtrans = new FullDuplexTcpTransporter(self); - } - fdtrans.sendAndReceive(request, future, env); - } - else { - if ((hdtrans === null) || (hdtrans.uri !== self.uri)) { - hdtrans = new HalfDuplexTcpTransporter(self); - } - hdtrans.sendAndReceive(request, future, env); - } - if (env.oneway) { future.resolve(); } - return future; - } - - Object.defineProperties(this, { - noDelay: { get: getNoDelay, set: setNoDelay }, - fullDuplex: { get: getFullDuplex, set: setFullDuplex }, - maxPoolSize: { get: getMaxPoolSize, set: setMaxPoolSize }, - poolTimeout: { get: getPoolTimeout, set: setPoolTimeout }, - sendAndReceive: { value: sendAndReceive } - }); - } - - function checkuri(uri) { - var parser = document.createElement('a'); - parser.href = uri; - var protocol = parser.protocol; - if (protocol === 'tcp:' || - protocol === 'tcp4:'|| - protocol === 'tcp6:' || - protocol === 'tcps:' || - protocol === 'tcp4s:' || - protocol === 'tcp6s:' || - protocol === 'tls:') { - return; - } - throw new Error('This client desn\'t support ' + protocol + ' scheme.'); - } - - function create(uri, functions, settings) { - if (typeof uri === 'string') { - checkuri(uri); - } - else if (Array.isArray(uri)) { - uri.forEach(function(uri) { checkuri(uri); }); - } - else { - throw new Error('You should set server uri first!'); - } - return new TcpClient(uri, functions, settings); - } - - Object.defineProperty(TcpClient, 'create', { value: create }); - - global.hprose.TcpClient = TcpClient; - -})(this); - -/**********************************************************\ -| | -| hprose | -| | -| Official WebSite: http://www.hprose.com/ | -| http://www.hprose.org/ | -| | -\**********************************************************/ - -/**********************************************************\ - * * - * JSONRPCClientFilter.js * - * * - * jsonrpc client filter for JavaScript. * - * * - * LastModified: Feb 23, 2016 * - * Author: Ma Bingyao * - * * -\**********************************************************/ - -(function (global) { - 'use strict'; - - var Tags = global.hprose.Tags; - var BytesIO = global.hprose.BytesIO; - var Writer = global.hprose.Writer; - var Reader = global.hprose.Reader; - var JSON = global.JSON; - - var s_id = 1; - - function JSONRPCClientFilter(version) { - this.version = version || '2.0'; - } - - JSONRPCClientFilter.prototype.inputFilter = function inputFilter(data/*, context*/) { - var json = BytesIO.toString(data); - if (json.charAt(0) === '{') { - json = '[' + json + ']'; - } - var responses = JSON.parse(json); - var stream = new BytesIO(); - var writer = new Writer(stream, true); - for (var i = 0, n = responses.length; i < n; ++i) { - var response = responses[i]; - if (response.error) { - stream.writeByte(Tags.TagError); - writer.writeString(response.error.message); - } - else { - stream.writeByte(Tags.TagResult); - writer.serialize(response.result); - } - } - stream.writeByte(Tags.TagEnd); - return stream.bytes; - }; - - JSONRPCClientFilter.prototype.outputFilter = function outputFilter(data/*, context*/) { - var requests = []; - var stream = new BytesIO(data); - var reader = new Reader(stream, false, false); - var tag = stream.readByte(); - do { - var request = {}; - if (tag === Tags.TagCall) { - request.method = reader.readString(); - tag = stream.readByte(); - if (tag === Tags.TagList) { - request.params = reader.readListWithoutTag(); - tag = stream.readByte(); - } - if (tag === Tags.TagTrue) { - tag = stream.readByte(); - } - } - if (this.version === '1.1') { - request.version = '1.1'; - } - else if (this.version === '2.0') { - request.jsonrpc = '2.0'; - } - request.id = s_id++; - requests.push(request); - } while (tag === Tags.TagCall); - if (requests.length > 1) { - return JSON.stringify(requests); - } - return JSON.stringify(requests[0]); - }; - - global.hprose.JSONRPCClientFilter = JSONRPCClientFilter; - -})(this); - -/**********************************************************\ -| | -| hprose | -| | -| Official WebSite: http://www.hprose.com/ | -| http://www.hprose.org/ | -| | -\**********************************************************/ - -/**********************************************************\ - * * - * Loader.js * - * * - * hprose CommonJS/AMD/CMD loader for HTML5. * - * * - * LastModified: Mar 2, 2016 * - * Author: Ma Bingyao * - * * -\**********************************************************/ - -/* global define, module */ -(function (global) { - 'use strict'; - - global.hprose.common = { - Completer: global.hprose.Completer, - Future: global.hprose.Future, - ResultMode: global.hprose.ResultMode - }; - - global.hprose.io = { - BytesIO: global.hprose.BytesIO, - ClassManager: global.hprose.ClassManager, - Tags: global.hprose.Tags, - RawReader: global.hprose.RawReader, - Reader: global.hprose.Reader, - Writer: global.hprose.Writer, - Formatter: global.hprose.Formatter - }; - - global.hprose.client = { - Client: global.hprose.Client, - HttpClient: global.hprose.HttpClient, - TcpClient: global.hprose.TcpClient, - WebSocketClient: global.hprose.WebSocketClient - }; - - global.hprose.filter = { - JSONRPCClientFilter: global.hprose.JSONRPCClientFilter - }; - - if (typeof define === 'function') { - if (define.cmd) { - define('hprose', [], global.hprose); - } - else if (define.amd) { - define('hprose', [], function() { return global.hprose; }); - } - } - if (typeof module === 'object' && typeof module.exports === 'object') { - module.exports = global.hprose; - } -})(this); +function TimeoutError(e){Error.call(this),this.message=e,this.name=TimeoutError.name,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,TimeoutError)}!function(e){"use strict";e.hprose=Object.create(null)}(this),function(e,t){"use strict";function r(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return function(t){return e.apply(t,Array.prototype.slice.call(arguments,1))}}function n(e){for(var t=e.length,r=new Array(t),n=0;t>n;++n)r[n]=e[n];return r}function i(e){e instanceof ArrayBuffer&&(e=new Uint8Array(e));var t=e.length;if(1e5>t)return String.fromCharCode.apply(String,u(e));for(var r=65535&t,n=t>>16,i=new Array(r?n+1:n),a=0;n>a;++a)i[a]=String.fromCharCode.apply(String,u(e.subarray(a<<16,a+1<<16)));return r&&(i[n]=String.fromCharCode.apply(String,u(e.subarray(n<<16,t)))),i.join("")}function a(e){for(var t=e.length,r=new Uint8Array(t),n=0;t>n;n++)r[n]=255&e.charCodeAt(n);return r}var o=!0;try{String.fromCharCode.apply(String,new Uint8Array([1]))}catch(s){o=!1}var u=o?function(e){return e}:n;e.hprose.generic=r,e.hprose.toBinaryString=i,e.hprose.toUint8Array=a,e.hprose.toArray=n}(this),function(e,t){"use strict";function r(e,t){for(var r=e.prototype,i=0,a=t.length;a>i;i++){var o=t[i],s=r[o];"function"==typeof s&&"undefined"==typeof e[o]&&Object.defineProperty(e,o,{value:n(s)})}}Function.prototype.bind||Object.defineProperty(Function.prototype,"bind",{value:function(e){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var t=Array.prototype.slice.call(arguments,1),r=this,n=function(){},i=function(){return r.apply(this instanceof n?this:e,t.concat(Array.prototype.slice.call(arguments)))};return this.prototype&&(n.prototype=this.prototype),i.prototype=new n,i}}),Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{value:function(e){var t=Object(this),r=parseInt(t.length,10)||0;if(0===r)return!1;var n,i=parseInt(arguments[1],10)||0;i>=0?n=i:(n=r+i,0>n&&(n=0));for(var a;r>n;){if(a=t[n],e===a||e!==e&&a!==a)return!0;n++}return!1}}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(e){if(null===this||this===t)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var r,n=Object(this),i=n.length>>>0,a=arguments[1],o=0;i>o;o++)if(r=n[o],e.call(a,r,o,n))return r;return t}}),Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function(e){if(null===this||this===t)throw new TypeError("Array.prototype.findIndex called on null or undefined");if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var r,n=Object(this),i=n.length>>>0,a=arguments[1],o=0;i>o;o++)if(r=n[o],e.call(a,r,o,n))return o;return-1}}),Array.prototype.fill||Object.defineProperty(Array.prototype,"fill",{value:function(e){if(null===this||this===t)throw new TypeError("this is null or not defined");for(var r=Object(this),n=r.length>>>0,i=arguments[1],a=i>>0,o=0>a?Math.max(n+a,0):Math.min(a,n),s=arguments[2],u=s===t?n:s>>0,c=0>u?Math.max(n+u,0):Math.min(u,n);c>o;)r[o]=e,o++;return r}}),Array.prototype.copyWithin||Object.defineProperty(Array.prototype,"copyWithin",{value:function(e,r){if(null===this||this===t)throw new TypeError("this is null or not defined");var n=Object(this),i=n.length>>>0,a=e>>0,o=0>a?Math.max(i+a,0):Math.min(a,i),s=r>>0,u=0>s?Math.max(i+s,0):Math.min(s,i),c=arguments[2],f=c===t?i:c>>0,l=0>f?Math.max(i+f,0):Math.min(f,i),h=Math.min(l-u,i-o),g=1;for(o>u&&u+h>o&&(g=-1,u+=h-1,o+=h-1);h>0;)u in n?n[o]=n[u]:delete n[o],u+=g,o+=g,h--;return n}}),Array.from||Object.defineProperty(Array,"from",{value:function(){var e=Object.prototype.toString,r=function(t){return"function"==typeof t||"[object Function]"===e.call(t)},n=function(e){var t=Number(e);return isNaN(t)?0:0!==t&&isFinite(t)?(t>0?1:-1)*Math.floor(Math.abs(t)):t},i=Math.pow(2,53)-1,a=function(e){var t=n(e);return Math.min(Math.max(t,0),i)};return function(e){var n=this,i=Object(e);if(null===e||e===t)throw new TypeError("Array.from requires an array-like object - not null or undefined");var o,s=arguments.length>1?arguments[1]:void t;if("undefined"!=typeof s){if(!r(s))throw new TypeError("Array.from: when provided, the second argument must be a function");arguments.length>2&&(o=arguments[2])}for(var u,c=a(i.length),f=r(n)?Object(new n(c)):new Array(c),l=0;c>l;)u=i[l],s?f[l]="undefined"==typeof o?s(u,l):s.call(o,u,l):f[l]=u,l+=1;return f.length=c,f}}()}),Array.of||Object.defineProperty(Array,"of",{value:function(){return Array.prototype.slice.call(arguments)}}),String.prototype.startsWith||Object.defineProperty(String.prototype,"startsWith",{value:function(e,t){return t=t||0,this.substr(t,e.length)===e}}),String.prototype.endsWith||Object.defineProperty(String.prototype,"endsWith",{value:function(e,t){var r=this.toString();("number"!=typeof t||!isFinite(t)||Math.floor(t)!==t||t>r.length)&&(t=r.length),t-=e.length;var n=r.indexOf(e,t);return-1!==n&&n===t}}),String.prototype.includes||Object.defineProperty(String.prototype,"includes",{value:function(){return"number"==typeof arguments[1]?this.lengthe)throw new RangeError("repeat count must be non-negative");if(e===1/0)throw new RangeError("repeat count must be less than infinity");if(e=Math.floor(e),0===t.length||0===e)return"";if(t.length*e>=1<<28)throw new RangeError("repeat count must not overflow maximum string size");for(var r="";1===(1&e)&&(r+=t),e>>>=1,0!==e;)t+=t;return r}}),String.prototype.trim||Object.defineProperty(String.prototype,"trim",{value:function(){return this.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")}}),String.prototype.trimLeft||Object.defineProperty(String.prototype,"trimLeft",{value:function(){return this.toString().replace(/^[\s\xa0]+/,"")}}),String.prototype.trimRight||Object.defineProperty(String.prototype,"trimRight",{value:function(){return this.toString().replace(/[\s\xa0]+$/,"")}}),Object.keys||Object.defineProperty(Object,"keys",{value:function(){var e=Object.prototype.hasOwnProperty,t=!{toString:null}.propertyIsEnumerable("toString"),r=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],n=r.length;return function(i){if("object"!=typeof i&&"function"!=typeof i||null===i)throw new TypeError("Object.keys called on non-object");var a=[];for(var o in i)e.call(i,o)&&a.push(o);if(t)for(var s=0;n>s;s++)e.call(i,r[s])&&a.push(r[s]);return a}}()});var n=e.hprose.generic;r(Array,["pop","push","reverse","shift","sort","splice","unshift","concat","join","slice","indexOf","lastIndexOf","filter","forEach","every","map","some","reduce","reduceRight","includes","find","findIndex"]),r(String,["quote","substring","toLowerCase","toUpperCase","charAt","charCodeAt","indexOf","lastIndexOf","include","startsWith","endsWith","repeat","trim","trimLeft","trimRight","toLocaleLowerCase","toLocaleUpperCase","match","search","replace","split","substr","concat","slice"])}(this),function(e){"use strict";var t="WeakMap"in e,r="Map"in e,n=!0;if(r&&(n="forEach"in new e.Map),!(t&&r&&n)){var i=Object.create(null),a=0,o=function(e){var t=Object.create(null),r=e.valueOf;Object.defineProperty(e,"valueOf",{value:function(n,a){return this===e&&a in i&&i[a]===n?(a in t||(t[a]=Object.create(null)),t[a]):r.apply(this,arguments)},writable:!0,configurable:!0,enumerable:!1})};if(t||(e.WeakMap=function l(){var e=Object.create(null),t=a++;i[t]=e;var r=function(r){if(r!==Object(r))throw new Error("value is not a non-null object");var n=r.valueOf(e,t);return n!==r.valueOf()?n:(o(r),r.valueOf(e,t))},n=Object.create(l.prototype,{get:{value:function(e){return r(e).value}},set:{value:function(e,t){r(e).value=t}},has:{value:function(e){return"value"in r(e)}},"delete":{value:function(e){return delete r(e).value}},clear:{value:function(){delete i[t],t=a++,i[t]=e}}});if(arguments.length>0&&Array.isArray(arguments[0]))for(var s=arguments[0],u=0,c=s.length;c>u;u++)n.set(s[u][0],s[u][1]);return n}),!r){var s=function(){var e=Object.create(null),t=a++,r=Object.create(null);i[t]=e;var n=function(n){if(null===n)return r;var i=n.valueOf(e,t);return i!==n.valueOf()?i:(o(n),n.valueOf(e,t))};return{get:function(e){return n(e).value},set:function(e,t){n(e).value=t},has:function(e){return"value"in n(e)},"delete":function(e){return delete n(e).value},clear:function(){delete i[t],t=a++,i[t]=e}}},u=function(){var e=Object.create(null);return{get:function(){return e.value},set:function(t,r){e.value=r},has:function(){return"value"in e},"delete":function(){return delete e.value},clear:function(){e=Object.create(null)}}},c=function(){var e=Object.create(null);return{get:function(t){return e[t]},set:function(t,r){e[t]=r},has:function(t){return t in e},"delete":function(t){return delete e[t]},clear:function(){e=Object.create(null)}}};e.Map=function h(){var e={number:c(),string:c(),"boolean":c(),object:s(),"function":s(),unknown:s(),undefined:u(),"null":u()},t=0,r=[],n=Object.create(h.prototype,{size:{get:function(){return t}},get:{value:function(t){return e[typeof t].get(t)}},set:{value:function(n,i){this.has(n)||(r.push(n),t++),e[typeof n].set(n,i)}},has:{value:function(t){return e[typeof t].has(t)}},"delete":{value:function(n){return this.has(n)?(t--,r.splice(r.indexOf(n),1),e[typeof n]["delete"](n)):!1}},clear:{value:function(){r.length=0;for(var n in e)e[n].clear();t=0}},forEach:{value:function(e,t){for(var n=0,i=r.length;i>n;n++)e.call(t,this.get(r[n]),r[n],this)}}});if(arguments.length>0&&Array.isArray(arguments[0]))for(var i=arguments[0],a=0,o=i.length;o>a;a++)n.set(i[a][0],i[a][1]);return n}}if(!n){var f=e.Map;e.Map=function g(){var e=new f,t=0,r=[],n=Object.create(g.prototype,{size:{get:function(){return t}},get:{value:function(t){return e.get(t)}},set:{value:function(n,i){e.has(n)||(r.push(n),t++),e.set(n,i)}},has:{value:function(t){return e.has(t)}},"delete":{value:function(n){return e.has(n)?(t--,r.splice(r.indexOf(n),1),e["delete"](n)):!1}},clear:{value:function(){if("clear"in e)e.clear();else for(var n=0,i=r.length;i>n;n++)e["delete"](r[n]);r.length=0,t=0}},forEach:{value:function(e,t){for(var n=0,i=r.length;i>n;n++)e.call(t,this.get(r[n]),r[n],this)}}});if(arguments.length>0&&Array.isArray(arguments[0]))for(var i=arguments[0],a=0,o=i.length;o>a;a++)n.set(i[a][0],i[a][1]);return n}}}}(this),TimeoutError.prototype=Object.create(Error.prototype),TimeoutError.prototype.constructor=TimeoutError,function(e,t){"use strict";function r(e){var r=Array.prototype.slice.call(arguments,1);return function(){e.apply(t,r)}}function n(e){delete f[e]}function i(e){var t=f[e];if(t)try{t()}finally{n(e)}}function a(e){return f[c]=r.apply(t,e),c++}if(!e.setImmediate){var o=e.document,s=e.MutationObserver||e.WebKitMutationObserver||e.MozMutationOvserver,u={},c=1,f={};u.mutationObserver=function(){var e=[],t=o.createTextNode(""),r=new s(function(){for(;e.length>0;)i(e.shift())});return r.observe(t,{characterData:!0}),function(){var r=a(arguments);return e.push(r),t.data=1&r,r}},u.messageChannel=function(){var t=new e.MessageChannel;return t.port1.onmessage=function(e){i(Number(e.data))},function(){var e=a(arguments);return t.port2.postMessage(e),e}},u.nextTick=function(){return function(){var t=a(arguments);return e.process.nextTick(r(i,t)),t}},u.postMessage=function(){var e=o.createElement("iframe");e.style.display="none",o.documentElement.appendChild(e);var t=e.contentWindow;t.document.write(''),t.document.close();var r=[];return window.addEventListener("message",function(){for(;r.length>0;)i(r.shift())}),function(){var e=a(arguments);return r.push(e),t.postMessage(1,"*"),e}},u.readyStateChange=function(){var e=o.documentElement;return function(){var t=a(arguments),r=o.createElement("script");return r.onreadystatechange=function(){i(t),r.onreadystatechange=null,e.removeChild(r),r=null},e.appendChild(r),t}},u.setTimeout=function(){return function(){var t=a(arguments);return e.setTimeout(r(i,t),0),t}};var l=Object.getPrototypeOf&&Object.getPrototypeOf(e);l=l&&l.setTimeout?l:e,"undefined"==typeof e.process||"[object process]"!==Object.prototype.toString.call(e.process)||e.process.browser?o&&"onreadystatechange"in o.createElement("script")?l.setImmediate=u.readyStateChange():o&&s?l.setImmediate=u.mutationObserver():e.MessageChannel?l.setImmediate=u.messageChannel():o&&"postMessage"in e&&"addEventListener"in e?l.setImmediate=u.postMessage():l.setImmediate=u.setTimeout():l.setImmediate=u.nextTick(),l.clearImmediate=n}}(this),function(e,t){"use strict";function r(e){Object.defineProperties(this,{_subscribers:{value:[]},resolve:{value:this.resolve.bind(this)},reject:{value:this.reject.bind(this)}});var t=this;"function"==typeof e&&L(function(){try{t.resolve(e())}catch(r){t.reject(r)}})}function n(e){return e instanceof r}function i(t){return n(t)||W&&t instanceof e.Promise&&typeof("function"===t.then)}function a(e){return i(e)?e:u(e)}function o(e,t){var n="function"==typeof t?t:function(){return t},i=new r;return D(function(){try{i.resolve(n())}catch(e){i.reject(e)}},e),i}function s(e){var t=new r;return t.reject(e),t}function u(e){var t=new r;return t.resolve(e),t}function c(e){try{var t=e();return u(t)}catch(r){return s(r)}}function f(e){var t=new r;return e(t.resolve,t.reject),t}function l(e){var t=0;return Array.forEach(e,function(){++t}),t}function h(e){return e=i(e)?e:u(e),e.then(function(e){var t=e.length,n=l(e),i=new Array(t);if(0===n)return u(i);var o=new r;return Array.forEach(e,function(e,t){a(e).then(function(e){i[t]=e,0===--n&&o.resolve(i)},o.reject)}),o})}function g(){return h(arguments)}function p(e){return e=i(e)?e:u(e),e.then(function(e){var t=new r;return Array.forEach(e,function(e){a(e).fill(t)}),t})}function v(e){return e=i(e)?e:u(e),e.then(function(e){var t=e.length,n=l(e);if(0===n)throw new RangeError("any(): array must not be empty");var i=new Array(t),o=new r;return Array.forEach(e,function(e,t){a(e).then(o.resolve,function(e){i[t]=e,0===--n&&o.reject(i)})}),o})}function d(e){return e=i(e)?e:u(e),e.then(function(e){var t=e.length,n=l(e),i=new Array(t);if(0===n)return u(i);var o=new r;return Array.forEach(e,function(e,t){var r=a(e);r.whenComplete(function(){i[t]=r.inspect(),0===--n&&o.resolve(i)})}),o})}function y(e){var r=Array.slice(arguments,1);return h(r).then(function(r){return e.apply(t,r)})}function w(e,t){var r=Array.slice(arguments,2);return h(r).then(function(r){return e.apply(t,r)})}function m(e,t){return function(){return h(arguments).then(function(r){return e.apply(t,r)})}}function b(e,t,r){return h(e).then(function(e){return e.forEach(t,r)})}function T(e,t,r){return h(e).then(function(e){return e.every(t,r)})}function _(e,t,r){return h(e).then(function(e){return e.some(t,r)})}function O(e,t,r){return h(e).then(function(e){return e.filter(t,r)})}function S(e,t,r){return h(e).then(function(e){return e.map(t,r)})}function j(e,t,r){return arguments.length>2?h(e).then(function(e){return i(r)||(r=u(r)),r.then(function(r){return e.reduce(t,r)})}):h(e).then(function(e){return e.reduce(t)})}function B(e,t,r){return arguments.length>2?h(e).then(function(e){return i(r)||(r=u(r)),r.then(function(r){return e.reduceRight(t,r)})}):h(e).then(function(e){return e.reduceRight(t)})}function E(e,t,r){return h(e).then(function(e){return i(t)||(t=u(t)),t.then(function(t){return e.indexOf(t,r)})})}function A(e,r,n){return h(e).then(function(e){return i(r)||(r=u(r)),r.then(function(r){return n===t&&(n=e.length-1),e.lastIndexOf(r,n)})})}function k(e,t,r){return h(e).then(function(e){return i(t)||(t=u(t)),t.then(function(t){return e.includes(t,r)})})}function C(e,t,r){return h(e).then(function(e){return e.find(t,r)})}function I(e,t,r){return h(e).then(function(e){return e.findIndex(t,r)})}function R(e,t,r){L(function(){try{var n=e(r);t.resolve(n)}catch(i){t.reject(i)}})}function x(e,t,r){e?R(e,t,r):t.reject(r)}function M(e,t,r,n,a){function o(i){M(e,t,r,n,i)}function s(e){x(t,n,e)}if(i(a))return a===r?void s(new TypeError("Self resolution")):void a.then(o,s);if(null!==a&&"object"==typeof a||"function"==typeof a){var u;try{u=a.then}catch(c){return void s(c)}if("function"==typeof u){var f=!0;try{return void u.call(a,function(e){f&&(f=!1,o(e))},function(e){f&&(f=!1,s(e))})}catch(c){f&&(f=!1,s(c))}return}}e?R(e,n,a):n.resolve(a)}function P(){var e=new r;Object.defineProperties(this,{future:{value:e},complete:{value:e.resolve},completeError:{value:e.reject},isCompleted:{get:function(){return e._state!==U}}})}var U=0,N=1,F=2,W="Promise"in e,L=e.setImmediate,D=e.setTimeout,z=e.clearTimeout,q=e.TimeoutError;Object.defineProperties(r,{delayed:{value:o},error:{value:s},sync:{value:c},value:{value:u},all:{value:h},race:{value:p},resolve:{value:u},reject:{value:s},promise:{value:f},isFuture:{value:n},isPromise:{value:i},toPromise:{value:a},join:{value:g},any:{value:v},settle:{value:d},attempt:{value:y},run:{value:w},wrap:{value:m},forEach:{value:b},every:{value:T},some:{value:_},filter:{value:O},map:{value:S},reduce:{value:j},reduceRight:{value:B},indexOf:{value:E},lastIndexOf:{value:A},includes:{value:k},find:{value:C},findIndex:{value:I}}),Object.defineProperties(r.prototype,{_value:{writable:!0},_reason:{writable:!0},_state:{value:U,writable:!0},resolve:{value:function(e){if(this._state===U){this._state=N,this._value=e;for(var t=this._subscribers;t.length>0;){var r=t.shift();M(r.onfulfill,r.onreject,this,r.next,e)}}}},reject:{value:function(e){if(this._state===U){this._state=F,this._reason=e;for(var t=this._subscribers;t.length>0;){var r=t.shift();r.onreject?R(r.onreject,r.next,e):r.next.reject(e)}}}},then:{value:function(e,t){if("function"!=typeof e&&(e=null),"function"!=typeof t&&(t=null),e||t){var n=new r;return this._state===N?M(e,t,this,n,this._value):this._state===F?t?R(t,n,this._reason):n.reject(this._reason):this._subscribers.push({onfulfill:e,onreject:t,next:n}),n}return this}},done:{value:function(e,t){this.then(e,t).then(null,function(e){L(function(){throw e})})}},inspect:{value:function(){switch(this._state){case U:return{state:"pending"};case N:return{state:"fulfilled",value:this._value};case F:return{state:"rejected",reason:this._reason}}}},catchError:{value:function(e,t){if("function"==typeof t){var r=this;return this["catch"](function(n){if(t(n))return r["catch"](e);throw n})}return this["catch"](e)}},"catch":{value:function(e){return this.then(null,e)}},fail:{value:function(e){this.done(null,e)}},whenComplete:{value:function(e){return this.then(function(r){var n=e();return n===t?r:(n=i(n)?n:u(n),n.then(function(){return r}))},function(r){var n=e();if(n===t)throw r;return n=i(n)?n:u(n),n.then(function(){throw r})})}},complete:{value:function(e){return this.then(e,e)}},always:{value:function(e){this.done(e,e)}},fill:{value:function(e){this.then(e.resolve,e.reject)}},timeout:{value:function(e,t){var n=new r,i=D(function(){n.reject(t||new q("timeout"))},e);return this.whenComplete(function(){z(i)}).fill(n),n}},delay:{value:function(e){var t=new r;return this.then(function(r){D(function(){t.resolve(r)},e)},t.reject),t}},tap:{value:function(e,t){return this.then(function(r){return e.call(t,r),r})}},spread:{value:function(e,t){return this.then(function(r){return e.apply(t,r)})}},get:{value:function(e){return this.then(function(t){return t[e]})}},set:{value:function(e,t){return this.then(function(r){return r[e]=t,r})}},apply:{value:function(e,t){return t=t||[],this.then(function(r){return h(t).then(function(t){return r[e].apply(r,t)})})}},call:{value:function(e){var t=Array.slice(arguments,1);return this.then(function(r){return h(t).then(function(t){return r[e].apply(r,t)})})}},bind:{value:function(e){var t=Array.slice(arguments);{if(!Array.isArray(e)){t.shift();var r=this;return Object.defineProperty(this,e,{value:function(){var n=Array.slice(arguments);return r.then(function(r){return h(t.concat(n)).then(function(t){return r[e].apply(r,t)})})}}),this}for(var n=0,i=e.length;i>n;++n)t[0]=e[n],this.bind.apply(this,t)}}},forEach:{value:function(e,t){return b(this,e,t)}},every:{value:function(e,t){return T(this,e,t)}},some:{value:function(e,t){return _(this,e,t)}},filter:{value:function(e,t){return O(this,e,t)}},map:{value:function(e,t){return S(this,e,t)}},reduce:{value:function(e,t){return arguments.length>1?j(this,e,t):j(this,e)}},reduceRight:{value:function(e,t){return arguments.length>1?B(this,e,t):B(this,e)}},indexOf:{value:function(e,t){return E(this,e,t)}},lastIndexOf:{value:function(e,t){return A(this,e,t)}},includes:{value:function(e,t){return k(this,e,t)}},find:{value:function(e,t){return C(this,e,t)}},findIndex:{value:function(e,t){return I(this,e,t)}}}),e.hprose.Future=r,e.hprose.Completer=P,e.hprose.resolved=u,e.hprose.rejected=s,e.hprose.deferred=function(){var e=new r;return Object.create(null,{promise:{value:e},resolve:{value:e.resolve},reject:{value:e.reject}})},W||(e.Promise=function(e){r.call(this),e(this.resolve,this.reject)},e.Promise.prototype=Object.create(r.prototype),e.Promise.prototype.constructor=r,Object.defineProperties(e.Promise,{all:{value:h},race:{value:p},resolve:{value:u},reject:{value:s}}))}(this),function(e,t){"use strict";function r(e,t,r){return e[t++]=r>>>24&255,e[t++]=r>>>16&255,e[t++]=r>>>8&255,e[t++]=255&r,t}function n(e,t,r){return e[t++]=255&r,e[t++]=r>>>8&255,e[t++]=r>>>16&255,e[t++]=r>>>24&255,t}function i(e,t,r){for(var n=r.length,i=0;n>i;++i){var a=r.charCodeAt(i);if(128>a)e[t++]=a;else if(2048>a)e[t++]=192|a>>6,e[t++]=128|63&a;else{if(!(55296>a||a>57343)){if(n>i+1){var o=r.charCodeAt(i+1);if(56320>a&&o>=56320&&57343>=o){var s=((1023&a)<<10|1023&o)+65536;e[t++]=240|s>>18,e[t++]=128|s>>12&63,e[t++]=128|s>>6&63,e[t++]=128|63&s,++i;continue}}throw new Error("Malformed string")}e[t++]=224|a>>12,e[t++]=128|a>>6&63,e[t++]=128|63&a}}return t}function a(e,t){for(var r=new Array(t),n=0,i=0,a=e.length;t>n&&a>i;n++){var o=e[i++];switch(o>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:r[n]=o;break;case 12:case 13:if(!(a>i))throw new Error("Unfinished UTF-8 octet sequence");r[n]=(31&o)<<6|63&e[i++];break;case 14:if(!(a>i+1))throw new Error("Unfinished UTF-8 octet sequence");r[n]=(15&o)<<12|(63&e[i++])<<6|63&e[i++];break;case 15:if(!(a>i+2))throw new Error("Unfinished UTF-8 octet sequence");var s=((7&o)<<18|(63&e[i++])<<12|(63&e[i++])<<6|63&e[i++])-65536;if(!(s>=0&&1048575>=s))throw new Error("Character outside valid Unicode range: 0x"+s.toString(16));r[n++]=s>>10&1023|55296,r[n]=1023&s|56320;break;default:throw new Error("Bad UTF-8 encoding 0x"+o.toString(16))}}return t>n&&(r.length=n),[String.fromCharCode.apply(String,r),i]}function o(e,t){for(var r=[],n=new Array(65535),i=0,a=0,o=e.length;t>i&&o>a;i++){var s=e[a++];switch(s>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:n[i]=s;break;case 12:case 13:if(!(o>a))throw new Error("Unfinished UTF-8 octet sequence");n[i]=(31&s)<<6|63&e[a++];break;case 14:if(!(o>a+1))throw new Error("Unfinished UTF-8 octet sequence");n[i]=(15&s)<<12|(63&e[a++])<<6|63&e[a++];break;case 15:if(!(o>a+2))throw new Error("Unfinished UTF-8 octet sequence");var u=((7&s)<<18|(63&e[a++])<<12|(63&e[a++])<<6|63&e[a++])-65536;if(!(u>=0&&1048575>=u))throw new Error("Character outside valid Unicode range: 0x"+u.toString(16));n[i++]=u>>10&1023|55296,n[i]=1023&u|56320;break;default:throw new Error("Bad UTF-8 encoding 0x"+s.toString(16))}if(i>=65534){var c=i+1;n.length=c,r.push(String.fromCharCode.apply(String,n)),t-=c,i=-1}}return i>0&&(n.length=i,r.push(String.fromCharCode.apply(String,n))),[r.join(""),a]}function s(e,r){return(r===t||null===r||0>r)&&(r=e.length),0===r?["",0]:1e5>r?a(e,r):o(e,r)}function u(e,r){if(r===t&&(r=e.length),0===r)return[g,0];for(var n=0,i=0,a=e.length;r>n&&a>i;n++){var o=e[i++];switch(o>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:break;case 12:case 13:if(!(a>i))throw new Error("Unfinished UTF-8 octet sequence");i++;break;case 14:if(!(a>i+1))throw new Error("Unfinished UTF-8 octet sequence");i+=2;break;case 15:if(!(a>i+2))throw new Error("Unfinished UTF-8 octet sequence");var s=((7&o)<<18|(63&e[i++])<<12|(63&e[i++])<<6|63&e[i++])-65536;if(!(s>=0&&1048575>=s))throw new Error("Character outside valid Unicode range: 0x"+s.toString(16));n++;break;default:throw new Error("Bad UTF-8 encoding 0x"+o.toString(16))}}return[e.subarray(0,i),i]}function c(e){return--e,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,e+1}function f(){var e=arguments;switch(e.length){case 1:switch(e[0].constructor){case Uint8Array:this._bytes=e[0],this._length=e[0].length;break;case f:this._bytes=e[0].toBytes(),this._length=e[0].length;break;case String:this.writeString(e[0]);break;case Number:this._bytes=new Uint8Array(e[0]);break;default:this._bytes=new Uint8Array(e[0]),this._length=this._bytes.length}break;case 2:this._bytes=new Uint8Array(e[0],e[1]),this._length=e[1];break;case 3:this._bytes=new Uint8Array(e[0],e[1],e[2]),this._length=e[2]}this.mark()}function l(e){if(0===e.length)return"";switch(e.constructor){case String:return e;case f:e=e.bytes;case ArrayBuffer:e=new Uint8Array(e);case Uint8Array:return s(e,e.length)[0];default:return String.fromCharCode.apply(String,e)}}var h=e.hprose.toBinaryString,g=new Uint8Array(0),p=1024;Object.defineProperties(f.prototype,{_bytes:{value:null,writable:!0},_length:{value:0,writable:!0},_wmark:{value:0,writable:!0},_off:{value:0,writable:!0},_rmark:{value:0,writable:!0},_grow:{value:function(e){var t=this._bytes,r=this._length+e,n=c(r);if(t){if(n*=2,n>t.length){var i=new Uint8Array(n);i.set(t),this._bytes=i}}else n=Math.max(n,p),this._bytes=new Uint8Array(n)}},length:{get:function(){return this._length}},capacity:{get:function(){return this._bytes?this._bytes.length:0}},position:{get:function(){return this._off}},bytes:{get:function(){return null===this._bytes?g:this._bytes.subarray(0,this._length)}},buffer:{get:function(){if(null===this._bytes)return g.buffer;if(this._bytes.buffer.slice)return this._bytes.buffer.slice(0,this._length);var e=new Uint8Array(this._length);return e.set(this._bytes.subarray(0,this._length)),e.buffer}},mark:{value:function(){this._wmark=this._length,this._rmark=this._off}},reset:{value:function(){this._length=this._wmark,this._off=this._rmark}},clear:{value:function(){this._bytes=null,this._length=0,this._wmark=0,this._off=0,this._rmark=0}},writeByte:{value:function(e){this._grow(1),this._bytes[this._length++]=e}},writeInt32BE:{value:function(e){if(e===(0|e)&&2147483647>=e)return this._grow(4),void(this._length=r(this._bytes,this._length,e));throw new TypeError("value is out of bounds")}},writeUInt32BE:{value:function(e){if((2147483647&e)+2147483648===e&&e>=0)return this._grow(4),void(this._length=r(this._bytes,this._length,0|e));throw new TypeError("value is out of bounds")}},writeInt32LE:{value:function(e){if(e===(0|e)&&2147483647>=e)return this._grow(4),void(this._length=n(this._bytes,this._length,e));throw new TypeError("value is out of bounds")}},writeUInt32LE:{value:function(e){if((2147483647&e)+2147483648===e&&e>=0)return this._grow(4),void(this._length=n(this._bytes,this._length,0|e));throw new TypeError("value is out of bounds")}},write:{value:function(e){var t=e.byteLength||e.length;if(0!==t){this._grow(t);var r=this._bytes,n=this._length;switch(e.constructor){case ArrayBuffer:r.set(new Uint8Array(e),n);break;case Uint8Array:r.set(e,n);break;case f:r.set(e.bytes,n);break;default:for(var i=0;t>i;i++)r[n+i]=e[i]}this._length+=t}}},writeAsciiString:{value:function(e){var t=e.length;if(0!==t){this._grow(t);for(var r=this._bytes,n=this._length,i=0;t>i;++i,++n)r[n]=e.charCodeAt(i);this._length=n}}},writeString:{value:function(e){var t=e.length;0!==t&&(this._grow(3*t),this._length=i(this._bytes,this._length,e))}},readByte:{value:function(){return this._offe?(2147483647&e)+2147483648:e}},readInt32LE:{value:function(){var e=this._bytes,t=this._off;if(t+3e?(2147483647&e)+2147483648:e}},read:{value:function(e){return this._off+e>this._length&&(e=this._length-this._off),0===e?g:this._bytes.subarray(this._off,this._off+=e)}},skip:{value:function(e){return this._off+e>this._length?(e=this._length-this._off,this._off=this._length):this._off+=e,e}},readBytes:{value:function(e){var t,r=Array.indexOf(this._bytes,e,this._off);return-1===r?(t=this._bytes.subarray(this._off,this._length),this._off=this._length):(t=this._bytes.subarray(this._off,r+1),this._off=r+1),t}},readUntil:{value:function(e){var t=Array.indexOf(this._bytes,e,this._off),r="";return t===this._off?this._off++:-1===t?(r=s(this._bytes.subarray(this._off,this._length))[0],this._off=this._length):(r=s(this._bytes.subarray(this._off,t))[0],this._off=t+1),r}},readAsciiString:{value:function(e){return this._off+e>this._length&&(e=this._length-this._off),0===e?"":h(this._bytes.subarray(this._off,this._off+=e))}},readStringAsBytes:{value:function(e){var t=u(this._bytes.subarray(this._off,this._length),e);return this._off+=t[1],t[0]}},readString:{value:function(e){var t=s(this._bytes.subarray(this._off,this._length),e);return this._off+=t[1],t[0]}},takeBytes:{value:function(){var e=this.bytes;return this.clear(),e}},toBytes:{value:function(){return new Uint8Array(this.bytes)}},toString:{value:function(){return s(this.bytes,this._length)[0]}},clone:{value:function(){return new f(this.toBytes())}},trunc:{value:function(){this._bytes=this._bytes.subarray(this._off,this._length),this._length=this._bytes.length,this._off=0,this._wmark=0,this._rmark=0}}}),Object.defineProperty(f,"toString",{value:l}),e.hprose.BytesIO=f}(this),function(e){"use strict";e.hprose.Tags={TagInteger:105,TagLong:108,TagDouble:100,TagNull:110,TagEmpty:101,TagTrue:116,TagFalse:102,TagNaN:78,TagInfinity:73,TagDate:68,TagTime:84,TagUTC:90,TagBytes:98,TagUTF8Char:117,TagString:115,TagGuid:103,TagList:97,TagMap:109,TagClass:99,TagObject:111,TagRef:114,TagPos:43,TagNeg:45,TagSemicolon:59,TagOpenbrace:123,TagClosebrace:125,TagQuote:34,TagPoint:46,TagFunctions:70,TagCall:67,TagResult:82,TagArgument:65,TagError:69,TagEnd:122}}(this),function(e){"use strict";function t(e,t){o.set(e,t),a[t]=e}function r(e){return o.get(e)}function n(e){return a[e]}var i=e.WeakMap,a=Object.create(null),o=new i;e.hprose.ClassManager=Object.create(null,{register:{value:t},getClassAlias:{value:r},getClass:{value:n}}),e.hprose.register=t,t(Object,"Object")}(this),function(e,t){"use strict";function r(e){var t=e.constructor,r=B.getClassAlias(t);if(r)return r;if(t.name)r=t.name;else{var n=t.toString();if(r=n.substr(0,n.indexOf("(")).replace(/(^\s*function\s*)|(\s*$)/gi,""),""===r||"Object"===r)return"function"==typeof e.getClassName?e.getClassName():"Object"}return"Object"!==r&&B.register(t,r),r}function n(e){Object.defineProperties(this,{_stream:{value:e},_ref:{value:new O,writable:!0}})}function i(e){return new n(e)}function a(e,t){Object.defineProperties(this,{stream:{value:e},_classref:{value:Object.create(null),writable:!0},_fieldsref:{value:[],writable:!0},_refer:{value:t?E:i(e)}})}function o(e,n){var i=e.stream;if(n===t||null===n)return void i.writeByte(j.TagNull);switch(n.constructor){case Function:return void i.writeByte(j.TagNull);case Number:return void s(e,n);case Boolean:return void f(e,n);case String:switch(n.length){case 0:return void i.writeByte(j.TagEmpty); +case 1:return i.writeByte(j.TagUTF8Char),void i.writeString(n)}return void e.writeStringWithRef(n);case Date:return void e.writeDateWithRef(n);case O:return void e.writeMapWithRef(n);case ArrayBuffer:case Uint8Array:case S:return void e.writeBytesWithRef(n);case Int8Array:case Int16Array:case Int32Array:case Uint16Array:case Uint32Array:return void y(e,n);case Float32Array:case Float64Array:return void w(e,n);default:if(Array.isArray(n))e.writeListWithRef(n);else{var a=r(n);"Object"===a?e.writeMapWithRef(n):e.writeObjectWithRef(n)}}}function s(e,t){var r=e.stream;t=t.valueOf(),t===(0|t)?t>=0&&9>=t?r.writeByte(t+48):(r.writeByte(j.TagInteger),r.writeAsciiString(""+t),r.writeByte(j.TagSemicolon)):isNaN(t)?r.writeByte(j.TagNaN):isFinite(t)?(r.writeByte(j.TagDouble),r.writeAsciiString(""+t),r.writeByte(j.TagSemicolon)):(r.writeByte(j.TagInfinity),r.writeByte(t>0?j.TagPos:j.TagNeg))}function u(e,t){var r=e.stream;t>=0&&9>=t?r.writeByte(t+48):(-2147483648>t||t>2147483647?r.writeByte(j.TagLong):r.writeByte(j.TagInteger),r.writeAsciiString(""+t),r.writeByte(j.TagSemicolon))}function c(e,t){var r=e.stream;isNaN(t)?r.writeByte(j.TagNaN):isFinite(t)?(r.writeByte(j.TagDouble),r.writeAsciiString(""+t),r.writeByte(j.TagSemicolon)):(r.writeByte(j.TagInfinity),r.writeByte(t>0?j.TagPos:j.TagNeg))}function f(e,t){e.stream.writeByte(t.valueOf()?j.TagTrue:j.TagFalse)}function l(e,t){e._refer.set(t);var r=e.stream,n=("0000"+t.getUTCFullYear()).slice(-4),i=("00"+(t.getUTCMonth()+1)).slice(-2),a=("00"+t.getUTCDate()).slice(-2),o=("00"+t.getUTCHours()).slice(-2),s=("00"+t.getUTCMinutes()).slice(-2),u=("00"+t.getUTCSeconds()).slice(-2),c=("000"+t.getUTCMilliseconds()).slice(-3);r.writeByte(j.TagDate),r.writeAsciiString(n+i+a),r.writeByte(j.TagTime),r.writeAsciiString(o+s+u),"000"!==c&&(r.writeByte(j.TagPoint),r.writeAsciiString(c)),r.writeByte(j.TagUTC)}function h(e,t){e._refer.set(t);var r=e.stream,n=("0000"+t.getFullYear()).slice(-4),i=("00"+(t.getMonth()+1)).slice(-2),a=("00"+t.getDate()).slice(-2),o=("00"+t.getHours()).slice(-2),s=("00"+t.getMinutes()).slice(-2),u=("00"+t.getSeconds()).slice(-2),c=("000"+t.getMilliseconds()).slice(-3);"00"===o&&"00"===s&&"00"===u&&"000"===c?(r.writeByte(j.TagDate),r.writeAsciiString(n+i+a)):"1970"===n&&"01"===i&&"01"===a?(r.writeByte(j.TagTime),r.writeAsciiString(o+s+u),"000"!==c&&(r.writeByte(j.TagPoint),r.writeAsciiString(c))):(r.writeByte(j.TagDate),r.writeAsciiString(n+i+a),r.writeByte(j.TagTime),r.writeAsciiString(o+s+u),"000"!==c&&(r.writeByte(j.TagPoint),r.writeAsciiString(c))),r.writeByte(j.TagSemicolon)}function g(e,t){e._refer.set(t);var r=e.stream,n=("00"+t.getHours()).slice(-2),i=("00"+t.getMinutes()).slice(-2),a=("00"+t.getSeconds()).slice(-2),o=("000"+t.getMilliseconds()).slice(-3);r.writeByte(j.TagTime),r.writeAsciiString(n+i+a),"000"!==o&&(r.writeByte(j.TagPoint),r.writeAsciiString(o)),r.writeByte(j.TagSemicolon)}function p(e,t){e._refer.set(t);var r=e.stream;r.writeByte(j.TagBytes);var n=t.byteLength||t.length;n>0?(r.writeAsciiString(""+n),r.writeByte(j.TagQuote),r.write(t)):r.writeByte(j.TagQuote),r.writeByte(j.TagQuote)}function v(e,t){e._refer.set(t);var r=e.stream,n=t.length;r.writeByte(j.TagString),n>0?(r.writeAsciiString(""+n),r.writeByte(j.TagQuote),r.writeString(t)):r.writeByte(j.TagQuote),r.writeByte(j.TagQuote)}function d(e,t,r){e._refer.set(t);var n=e.stream,i=t.length;if(n.writeByte(j.TagList),i>0){n.writeAsciiString(""+i),n.writeByte(j.TagOpenbrace);for(var a=0;i>a;a++)r(e,t[a])}else n.writeByte(j.TagOpenbrace);n.writeByte(j.TagClosebrace)}function y(e,t){e._refer.write(t)||d(e,t,u)}function w(e,t){e._refer.write(t)||d(e,t,c)}function m(e,t){e._refer.set(t);var r=e.stream,n=[];for(var i in t)t.hasOwnProperty(i)&&"function"!=typeof t[i]&&(n[n.length]=i);var a=n.length;if(r.writeByte(j.TagMap),a>0){r.writeAsciiString(""+a),r.writeByte(j.TagOpenbrace);for(var s=0;a>s;s++)o(e,n[s]),o(e,t[n[s]])}else r.writeByte(j.TagOpenbrace);r.writeByte(j.TagClosebrace)}function b(e,t){e._refer.set(t);var r=e.stream,n=t.size;r.writeByte(j.TagMap),n>0?(r.writeAsciiString(""+n),r.writeByte(j.TagOpenbrace),t.forEach(function(t,r){o(e,r),o(e,t)})):r.writeByte(j.TagOpenbrace),r.writeByte(j.TagClosebrace)}function T(e,t){var n,i,a=e.stream,s=r(t);if(s in e._classref)i=e._classref[s],n=e._fieldsref[i];else{n=[];for(var u in t)t.hasOwnProperty(u)&&"function"!=typeof t[u]&&(n[n.length]=u.toString());i=_(e,s,n)}a.writeByte(j.TagObject),a.writeAsciiString(""+i),a.writeByte(j.TagOpenbrace),e._refer.set(t);for(var c=n.length,f=0;c>f;f++)o(e,t[n[f]]);a.writeByte(j.TagClosebrace)}function _(e,t,r){var n=e.stream,i=r.length;if(n.writeByte(j.TagClass),n.writeAsciiString(""+t.length),n.writeByte(j.TagQuote),n.writeString(t),n.writeByte(j.TagQuote),i>0){n.writeAsciiString(""+i),n.writeByte(j.TagOpenbrace);for(var a=0;i>a;a++)v(e,r[a])}else n.writeByte(j.TagOpenbrace);n.writeByte(j.TagClosebrace);var o=e._fieldsref.length;return e._classref[t]=o,e._fieldsref[o]=r,o}var O=e.Map,S=e.hprose.BytesIO,j=e.hprose.Tags,B=e.hprose.ClassManager,E=Object.create(null,{set:{value:function(){}},write:{value:function(){return!1}},reset:{value:function(){}}});Object.defineProperties(n.prototype,{_refcount:{value:0,writable:!0},set:{value:function(e){this._ref.set(e,this._refcount++)}},write:{value:function(e){var r=this._ref.get(e);return r!==t?(this._stream.writeByte(j.TagRef),this._stream.writeString(""+r),this._stream.writeByte(j.TagSemicolon),!0):!1}},reset:{value:function(){this._ref=new O,this._refcount=0}}}),Object.defineProperties(a.prototype,{serialize:{value:function(e){o(this,e)}},writeInteger:{value:function(e){u(this,e)}},writeDouble:{value:function(e){c(this,e)}},writeBoolean:{value:function(e){f(this,e)}},writeUTCDate:{value:function(e){l(this,e)}},writeUTCDateWithRef:{value:function(e){this._refer.write(e)||l(this,e)}},writeDate:{value:function(e){h(this,e)}},writeDateWithRef:{value:function(e){this._refer.write(e)||h(this,e)}},writeTime:{value:function(e){g(this,e)}},writeTimeWithRef:{value:function(e){this._refer.write(e)||g(this,e)}},writeBytes:{value:function(e){p(this,e)}},writeBytesWithRef:{value:function(e){this._refer.write(e)||p(this,e)}},writeString:{value:function(e){v(this,e)}},writeStringWithRef:{value:function(e){this._refer.write(e)||v(this,e)}},writeList:{value:function(e){d(this,e,o)}},writeListWithRef:{value:function(e){this._refer.write(e)||d(this,e,o)}},writeMap:{value:function(e){e instanceof O?b(this,e):m(this,e)}},writeMapWithRef:{value:function(e){this._refer.write(e)||(e instanceof O?b(this,e):m(this,e))}},writeObject:{value:function(e){T(this,e)}},writeObjectWithRef:{value:function(e){this._refer.write(e)||T(this,e)}},reset:{value:function(){this._classref=Object.create(null),this._fieldsref.length=0,this._refer.reset()}}}),e.hprose.Writer=a}(this),function(e,t){"use strict";function r(e,t){if(e&&t){var r="";throw r="number"==typeof t?String.fromCharCode(t):String.fromCharCode.apply(String,t),new Error('Tag "'+r+'" expected, but "'+String.fromCharCode(e)+'" found in stream')}throw e?new Error('Unexpected serialize tag "'+String.fromCharCode(e)+'" in stream'):new Error("No byte found in stream")}function n(e){var t=new Z;return i(e,t),t.bytes}function i(e,t){a(e,t,e.readByte())}function a(e,t,n){switch(t.writeByte(n),n){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case ee.TagNull:case ee.TagEmpty:case ee.TagTrue:case ee.TagFalse:case ee.TagNaN:break;case ee.TagInfinity:t.writeByte(e.readByte());break;case ee.TagInteger:case ee.TagLong:case ee.TagDouble:case ee.TagRef:o(e,t);break;case ee.TagDate:case ee.TagTime:s(e,t);break;case ee.TagUTF8Char:u(e,t);break;case ee.TagBytes:c(e,t);break;case ee.TagString:f(e,t);break;case ee.TagGuid:l(e,t);break;case ee.TagList:case ee.TagMap:case ee.TagObject:h(e,t);break;case ee.TagClass:h(e,t),i(e,t);break;case ee.TagError:i(e,t);break;default:r(n)}}function o(e,t){var r;do r=e.readByte(),t.writeByte(r);while(r!==ee.TagSemicolon)}function s(e,t){var r;do r=e.readByte(),t.writeByte(r);while(r!==ee.TagSemicolon&&r!==ee.TagUTC)}function u(e,t){t.writeString(e.readString(1))}function c(e,t){var r=0,n=48;do r*=10,r+=n-48,n=e.readByte(),t.writeByte(n);while(n!==ee.TagQuote);t.write(e.read(r+1))}function f(e,t){var r=0,n=48;do r*=10,r+=n-48,n=e.readByte(),t.writeByte(n);while(n!==ee.TagQuote);t.write(e.readStringAsBytes(r+1))}function l(e,t){t.write(e.read(38))}function h(e,t){var r;do r=e.readByte(),t.writeByte(r);while(r!==ee.TagOpenbrace);for(;(r=e.readByte())!==ee.TagClosebrace;)a(e,t,r);t.writeByte(r)}function g(e){Object.defineProperties(this,{stream:{value:e},readRaw:{value:function(){return n(e)}}})}function p(){Object.defineProperties(this,{ref:{value:[]}})}function v(){return new p}function d(r){var n,i=e,a=r.split(".");for(n=0;n=0;)r[r.length]=n,n=e.indexOf("_",n+1);if(r.length>0){var i=e.split("");if(t=y(i,r,0,"."),null===t&&(t=y(i,r,0,"_")),"function"==typeof t)return te.register(t,e),t}return t=function(){},Object.defineProperty(t.prototype,"getClassName",{value:function(){return e}}),te.register(t,e),t}function m(e,t){var r=e.readUntil(t);return 0===r.length?0:parseInt(r,10)}function b(e){var t=e.stream,n=t.readByte();switch(n){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return n-48;case ee.TagInteger:return T(t);case ee.TagLong:return O(t);case ee.TagDouble:return j(t);case ee.TagNull:return null;case ee.TagEmpty:return"";case ee.TagTrue:return!0;case ee.TagFalse:return!1;case ee.TagNaN:return NaN;case ee.TagInfinity:return E(t);case ee.TagDate:return k(e);case ee.TagTime:return I(e);case ee.TagBytes:return x(e);case ee.TagUTF8Char:return P(e);case ee.TagString:return N(e);case ee.TagGuid:return W(e);case ee.TagList:return D(e);case ee.TagMap:return e.useHarmonyMap?Q(e):q(e);case ee.TagClass:return $(e),J(e);case ee.TagObject:return Y(e);case ee.TagRef:return K(e);case ee.TagError:throw new Error(F(e));default:r(n)}}function T(e){return m(e,ee.TagSemicolon)}function _(e){var t=e.readByte();switch(t){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return t-48;case ee.TagInteger:return T(e);default:r(t)}}function O(e){var t=e.readUntil(ee.TagSemicolon),r=parseInt(t,10);return r.toString()===t?r:t}function S(e){var t=e.readByte();switch(t){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return t-48;case ee.TagInteger:case ee.TagLong:return O(e);default:r(t)}}function j(e){return parseFloat(e.readUntil(ee.TagSemicolon))}function B(e){var t=e.readByte();switch(t){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return t-48;case ee.TagInteger:case ee.TagLong:case ee.TagDouble:return j(e);case ee.TagNaN:return NaN;case ee.TagInfinity:return E(e);default:r(t)}}function E(e){return e.readByte()===ee.TagNeg?-(1/0):1/0}function A(e){var t=e.readByte();switch(t){case ee.TagTrue:return!0;case ee.TagFalse:return!1;default:r(t)}}function k(e){var t,r=e.stream,n=parseInt(r.readAsciiString(4),10),i=parseInt(r.readAsciiString(2),10)-1,a=parseInt(r.readAsciiString(2),10),o=r.readByte();if(o===ee.TagTime){var s=parseInt(r.readAsciiString(2),10),u=parseInt(r.readAsciiString(2),10),c=parseInt(r.readAsciiString(2),10),f=0;o=r.readByte(),o===ee.TagPoint&&(f=parseInt(r.readAsciiString(3),10),o=r.readByte(),o>=48&&57>=o&&(r.skip(2),o=r.readByte(),o>=48&&57>=o&&(r.skip(2),o=r.readByte()))),t=o===ee.TagUTC?new Date(Date.UTC(n,i,a,s,u,c,f)):new Date(n,i,a,s,u,c,f)}else t=o===ee.TagUTC?new Date(Date.UTC(n,i,a)):new Date(n,i,a);return e.refer.set(t),t}function C(e){var t=e.stream.readByte();switch(t){case ee.TagNull:return null;case ee.TagDate:return k(e);case ee.TagRef:return K(e);default:r(t)}}function I(e){var t,r=e.stream,n=parseInt(r.readAsciiString(2),10),i=parseInt(r.readAsciiString(2),10),a=parseInt(r.readAsciiString(2),10),o=0,s=r.readByte();return s===ee.TagPoint&&(o=parseInt(r.readAsciiString(3),10),s=r.readByte(),s>=48&&57>=s&&(r.skip(2),s=r.readByte(),s>=48&&57>=s&&(r.skip(2),s=r.readByte()))),t=s===ee.TagUTC?new Date(Date.UTC(1970,0,1,n,i,a,o)):new Date(1970,0,1,n,i,a,o),e.refer.set(t),t}function R(e){var t=e.stream.readByte();switch(t){case ee.TagNull:return null;case ee.TagTime:return I(e);case ee.TagRef:return K(e);default:r(t)}}function x(e){var t=e.stream,r=m(t,ee.TagQuote),n=t.read(r);return t.skip(1),e.refer.set(n),n}function M(e){var t=e.stream.readByte();switch(t){case ee.TagNull:return null;case ee.TagEmpty:return new Uint8Array(0);case ee.TagBytes:return x(e);case ee.TagRef:return K(e);default:r(t)}}function P(e){return e.stream.readString(1)}function U(e){var t=e.stream,r=t.readString(m(t,ee.TagQuote));return t.skip(1),r}function N(e){var t=U(e);return e.refer.set(t),t}function F(e){var t=e.stream.readByte();switch(t){case ee.TagNull:return null;case ee.TagEmpty:return"";case ee.TagUTF8Char:return P(e);case ee.TagString:return N(e);case ee.TagRef:return K(e);default:r(t)}}function W(e){var t=e.stream;t.skip(1);var r=t.readAsciiString(36);return t.skip(1),e.refer.set(r),r}function L(e){var t=e.stream.readByte();switch(t){case ee.TagNull:return null;case ee.TagGuid:return W(e);case ee.TagRef:return K(e);default:r(t)}}function D(e){var t=e.stream,r=[];e.refer.set(r);for(var n=m(t,ee.TagOpenbrace),i=0;n>i;i++)r[i]=b(e);return t.skip(1),r}function z(e){var t=e.stream.readByte();switch(t){case ee.TagNull:return null;case ee.TagList:return D(e);case ee.TagRef:return K(e);default:r(t)}}function q(e){var t=e.stream,r={};e.refer.set(r);for(var n=m(t,ee.TagOpenbrace),i=0;n>i;i++){var a=b(e),o=b(e);r[a]=o}return t.skip(1),r}function H(e){var t=e.stream.readByte();switch(t){case ee.TagNull:return null;case ee.TagMap:return q(e);case ee.TagRef:return K(e);default:r(t)}}function Q(e){var t=e.stream,r=new X;e.refer.set(r);for(var n=m(t,ee.TagOpenbrace),i=0;n>i;i++){var a=b(e),o=b(e);r.set(a,o)}return t.skip(1),r}function G(e){var t=e.stream.readByte();switch(t){case ee.TagNull:return null;case ee.TagMap:return Q(e);case ee.TagRef:return K(e);default:r(t)}}function Y(e){var t=e.stream,r=e.classref[m(t,ee.TagOpenbrace)],n=new r.classname;e.refer.set(n);for(var i=0;ia;a++)i[a]=F(e);t.skip(1),r=w(r),e.classref.push({classname:r,count:n,fields:i})}function K(e){return e.refer.read(m(e.stream,ee.TagSemicolon))}function V(e,t,r){g.call(this,e),this.useHarmonyMap=!!r,Object.defineProperties(this,{classref:{value:[]},refer:{value:t?re:v()}})}var X=e.Map,Z=e.hprose.BytesIO,ee=e.hprose.Tags,te=e.hprose.ClassManager;e.hprose.RawReader=g;var re=Object.create(null,{set:{value:function(){}},read:{value:function(){r(ee.TagRef)}},reset:{value:function(){}}});Object.defineProperties(p.prototype,{set:{value:function(e){this.ref.push(e)}},read:{value:function(e){return this.ref[e]}},reset:{value:function(){this.ref.length=0}}}),V.prototype=Object.create(g.prototype),V.prototype.constructor=V,Object.defineProperties(V.prototype,{useHarmonyMap:{value:!1,writable:!0},checkTag:{value:function(e,n){n===t&&(n=this.stream.readByte()),n!==e&&r(n,e)}},checkTags:{value:function(e,n){return n===t&&(n=this.stream.readByte()),e.indexOf(n)>=0?n:void r(n,e)}},unserialize:{value:function(){return b(this)}},readInteger:{value:function(){return _(this.stream)}},readLong:{value:function(){return S(this.stream)}},readDouble:{value:function(){return B(this.stream)}},readBoolean:{value:function(){return A(this.stream)}},readDateWithoutTag:{value:function(){return k(this)}},readDate:{value:function(){return C(this)}},readTimeWithoutTag:{value:function(){return I(this)}},readTime:{value:function(){return R(this)}},readBytesWithoutTag:{value:function(){return x(this)}},readBytes:{value:function(){return M(this)}},readStringWithoutTag:{value:function(){return N(this)}},readString:{value:function(){return F(this)}},readGuidWithoutTag:{value:function(){return W(this)}},readGuid:{value:function(){return L(this)}},readListWithoutTag:{value:function(){return D(this)}},readList:{value:function(){return z(this)}},readMapWithoutTag:{value:function(){return this.useHarmonyMap?Q(this):q(this)}},readMap:{value:function(){return this.useHarmonyMap?G(this):H(this)}},readObjectWithoutTag:{value:function(){return Y(this)}},readObject:{value:function(){return J(this)}},reset:{value:function(){this.classref.length=0,this.refer.reset()}}}),e.hprose.Reader=V}(this),function(e){"use strict";function t(e,t){var r=new n,a=new i(r,t);return a.serialize(e),r}function r(e,t,r){return e instanceof n||(e=new n(e)),new a(e,t,r).unserialize()}var n=e.hprose.BytesIO,i=e.hprose.Writer,a=e.hprose.Reader;e.hprose.Formatter={serialize:function(e,r){return t(e,r).bytes},unserialize:r},e.hprose.serialize=t,e.hprose.unserialize=r}(this),function(e){"use strict";e.hprose.ResultMode={Normal:0,Serialized:1,Raw:2,RawWithEndTag:3},e.hprose.Normal=e.hprose.ResultMode.Normal,e.hprose.Serialized=e.hprose.ResultMode.Serialized,e.hprose.Raw=e.hprose.ResultMode.Raw,e.hprose.RawWithEndTag=e.hprose.ResultMode.RawWithEndTag}(this),function(e,t){"use strict";function r(){}function n(n,i,a){function m(e,t){for(var r=0,n=De.length;n>r;r++)e=De[r].outputFilter(e,t);return e}function b(e,t){for(var r=De.length-1;r>=0;r--)e=De[r].inputFilter(e,t);return e}function T(e,t){return e=m(e,t),Ve(e,t).then(function(e){return t.oneway?void 0:b(e,t)})}function _(e,t){return rt.sendAndReceive(e,t)}function O(e,t,r,n){Ke(e,t).then(r,function(i){S(e,t,r,n)||n(i)})}function S(t,r,n,i){if(r.failswitch&&(++Ce>=ke.length&&(Ce=0),Ae=ke[Ce]),r.idempotent&&--r.retry>=0){var a=r.retry>=10?500:500*(10-r.retry);return e.setTimeout(function(){O(t,r,n,i)},a),!0}return!1}function j(e){var t={retry:Me,idempotent:!0,failswitch:!0,timeout:xe,client:rt,userdata:{}},r=function(t){var r=null;try{var n=new c(t),i=new l(n,!0),a=n.readByte();switch(a){case s.TagError:r=new Error(i.readString());break;case s.TagFunctions:var o=i.readList();i.checkTag(s.TagEnd),A(e,o);break;default:r=new Error("Wrong Response:\r\n"+c.toString(t))}}catch(u){r=u}null!==r?He.reject(r):He.resolve(e)};O(g,t,r,He.reject)}function B(e,t){return function(){return ze?M(e,t,Array.slice(arguments),!0):h.all(arguments).then(function(r){return M(e,t,r,!1)})}}function E(e,r,n,i,a){if(r[i]===t&&(r[i]={},(typeof a===v||a.constructor===Object)&&(a=[a]),Array.isArray(a)))for(var o=0;on;++n)t[n]=e[n]}function C(e){return e?{mode:u.Normal,byref:Ie,simple:Re,onsuccess:t,onerror:t,useHarmonyMap:We,client:rt,userdata:{}}:{mode:u.Normal,byref:Ie,simple:Re,timeout:xe,retry:Me,idempotent:Pe,failswitch:Ue,oneway:!1,sync:!1,onsuccess:t,onerror:t,useHarmonyMap:We,client:rt,userdata:{}}}function I(e,t,r,n){var i=C(n);if(t in e){var a=e[t];for(var o in a)o in i&&(i[o]=a[o])}for(var s=0,u=r.length;u>s&&typeof r[s]!==y;++s);if(s===u)return i;var c=r.splice(s,u-s);for(i.onsuccess=c[0],u=c.length,s=1;u>s;++s){var f=c[s];switch(typeof f){case y:i.onerror=f;break;case p:i.byref=f;break;case d:i.mode=f;break;case w:for(var l in f)l in i&&(i[l]=f[l])}}return i}function R(e,t,r){var n=new c;n.writeByte(s.TagCall);var i=new f(n,r.simple);return i.writeString(e),(t.length>0||r.byref)&&(i.reset(),i.writeList(t),r.byref&&i.writeBoolean(!0)),n}function x(e,t,r,n){return Ne?h.promise(function(i,a){Fe.push({batch:n,name:e,args:t,context:r,resolve:i,reject:a})}):n?W(e,t,r):F(e,t,r)}function M(e,t,r,n){return x(t,r,I(e,t,r,n),n)}function P(e,t,r,n){try{r.onerror?r.onerror(e,t):Le(e,t),n(t)}catch(i){n(i)}}function U(e,t,r){var n=R(e,t,r);return n.writeByte(s.TagEnd),h.promise(function(e,i){O(n.bytes,r,function(n){if(r.oneway)return void e();var a=null,o=null;try{if(r.mode===u.RawWithEndTag)a=n;else if(r.mode===u.Raw)a=n.subarray(0,n.byteLength-1);else{var f=new c(n),h=new l(f,!1,r.useHarmonyMap),g=f.readByte();if(g===s.TagResult){if(a=r.mode===u.Serialized?h.readRaw():h.unserialize(),g=f.readByte(),g===s.TagArgument){h.reset();var p=h.readList();k(p,t),g=f.readByte()}}else g===s.TagError&&(o=new Error(h.readString()),g=f.readByte());g!==s.TagEnd&&(o=new Error("Wrong Response:\r\n"+c.toString(n)))}}catch(v){o=v}o?i(o):e(a)},i)})}function N(e){return function(){e&&(Ne=!1,o(function(e){e.forEach(function(e){"settings"in e?q(e.settings).then(e.resolve,e.reject):x(e.name,e.args,e.context,e.batch).then(e.resolve,e.reject)})},Fe),Fe=[])}}function F(e,t,r){r.sync&&(Ne=!0);var n=h.promise(function(n,i){Je(e,t,r).then(function(a){try{if(r.onsuccess)try{r.onsuccess(a,t)}catch(o){r.onerror&&r.onerror(e,o),i(o)}n(a)}catch(o){i(o)}},function(t){P(e,t,r,i)})});return n.whenComplete(N(r.sync)),n}function W(e,t,r){return h.promise(function(n,i){qe.push({args:t,name:e,context:r,resolve:n,reject:i})})}function L(e){var t={timeout:xe,retry:Me,idempotent:Pe,failswitch:Ue,oneway:!1,sync:!1,client:rt,userdata:{}};for(var r in e)r in t&&(t[r]=e[r]);return t}function D(e,t){var r=e.reduce(function(e,t){return e.write(R(t.name,t.args,t.context)),e},new c);return r.writeByte(s.TagEnd),h.promise(function(n,i){O(r.bytes,t,function(r){if(t.oneway)return void n(e);var a=-1,o=new c(r),f=new l(o,!1),h=o.readByte();try{for(;h!==s.TagEnd;){var g=null,p=null,v=e[++a].context.mode;if(v>=u.Raw&&(g=new c),h===s.TagResult){if(v===u.Serialized?g=f.readRaw():v>=u.Raw?(g.writeByte(s.TagResult),g.write(f.readRaw())):(f.useHarmonyMap=e[a].context.useHarmonyMap,f.reset(),g=f.unserialize()),h=o.readByte(),h===s.TagArgument){if(v>=u.Raw)g.writeByte(s.TagArgument),g.write(f.readRaw());else{f.reset();var d=f.readList();k(d,e[a].args)}h=o.readByte()}}else h===s.TagError&&(v>=u.Raw?(g.writeByte(s.TagError),g.write(f.readRaw())):(f.reset(),p=new Error(f.readString())),h=o.readByte());if([s.TagEnd,s.TagResult,s.TagError].indexOf(h)<0)return void i(new Error("Wrong Response:\r\n"+c.toString(r)));v>=u.Raw?(v===u.RawWithEndTag&&g.writeByte(s.TagEnd),e[a].result=g.bytes):e[a].result=g,e[a].error=p}}catch(y){return void i(y)}n(e)},i)})}function z(){ze=!0}function q(e){if(e=e||{},ze=!1,Ne)return h.promise(function(t,r){Fe.push({batch:!0,settings:e,resolve:t,reject:r})});var t=qe.length;if(0===t)return h.value([]);var r=L(e);r.sync&&(Ne=!0);var n=qe;qe=[];var i=h.promise(function(e,t){$e(n,r).then(function(t){t.forEach(function(e){if(e.error)P(e.name,e.error,e.context,e.reject);else try{if(e.context.onsuccess)try{e.context.onsuccess(e.result,e.args)}catch(t){e.context.onerror&&e.context.onerror(e.name,t),e.reject(t)}e.resolve(e.result)}catch(t){e.reject(t)}delete e.context,delete e.resolve,delete e.reject}),e(t)},function(e){n.forEach(function(t){"reject"in t&&P(t.name,e,t.context,t.reject)}),t(e)})});return i.whenComplete(N(r.sync)),i}function H(){return Le}function Q(e){typeof e===y&&(Le=e)}function G(){return Ae}function Y(){return Ue}function J(e){Ue=!!e}function $(){return xe}function K(e){xe="number"==typeof e?0|e:0}function V(){return Me}function X(e){Me="number"==typeof e?0|e:0}function Z(){return Pe}function ee(e){Pe=!!e}function te(e){Ye=!!e}function re(){return Ye}function ne(){return Ie}function ie(e){Ie=!!e}function ae(){return Re}function oe(e){Re=!!e}function se(){return We}function ue(e){We=!!e}function ce(){return 0===De.length?null:1===De.length?De[0]:De.slice()}function fe(e){De.length=0,Array.isArray(e)?e.forEach(function(e){le(e)}):le(e)}function le(e){e&&"function"==typeof e.inputFilter&&"function"==typeof e.outputFilter&&De.push(e)}function he(e){var t=De.indexOf(e);return-1===t?!1:(De.splice(t,1),!0)}function ge(){return De}function pe(e,r,n){n===t&&(typeof r===p&&(n=r,r=!1),r||(typeof e===p?(n=e,e=!1):(e&&e.constructor===Object||Array.isArray(e))&&(r=e,e=!1)));var i=rt;return n&&(i={}),e||Ae?(e&&(Ae=e),(typeof r===v||r&&r.constructor===Object)&&(r=[r]),Array.isArray(r)?(A(i,r),He.resolve(i),i):(o(j,i),He)):new Error("You should set server uri first!")}function ve(e,t,n){var i=arguments.length;if(1>i||typeof e!==v)throw new Error("name must be a string");if(1===i&&(t=[]),2===i&&!Array.isArray(t)){var a=[];typeof t!==y&&a.push(r),a.push(t),t=a}if(i>2){typeof n!==y&&t.push(r);for(var o=2;i>o;o++)t.push(arguments[o])}return M(rt,e,t,ze)}function de(e,t){return He.then(e,t)}function ye(e,t,r){if(Qe[e]){var n=Qe[e];return n[t]?n[t]:null}return r&&(Qe[e]=Object.create(null)),null}function we(e,r,n,i){if(typeof e!==v)throw new TypeError("topic name must be a string.");if(r===t||null===r){if(typeof n!==y)throw new TypeError("callback must be a function.");r=n}if(typeof r===y)return i=n,n=r,null===Ge&&(Ge=_e()),void Ge.then(function(t){we(e,t,n,i)});if(typeof n!==y)throw new TypeError("callback must be a function.");if(h.isPromise(r))return void r.then(function(t){we(e,t,n,i)});i===t&&(i=xe);var a=ye(e,r,!0);if(null===a){var o=function(){M(rt,e,[r,a.handler,o,{idempotent:!0,failswitch:!1,timeout:i}],!1)};a={handler:function(t){var n=ye(e,r,!1);if(n){if(null!==t)for(var i=n.callbacks,a=0,s=i.length;s>a;++a)try{i[a](t)}catch(u){}null!==ye(e,r,!1)&&o()}},callbacks:[n]},Qe[e][r]=a,o()}else a.callbacks.indexOf(n)<0&&a.callbacks.push(n)}function me(e,t,r){if(e)if(typeof r===y){var n=e[t];if(n){var i=n.callbacks,a=i.indexOf(r);a>=0&&(i[a]=i[i.length-1],i.length--),0===i.length&&delete e[t]}}else delete e[t]}function be(e,r,n){if(typeof e!==v)throw new TypeError("topic name must be a string.");if(r===t||null===r){if(typeof n!==y)return void delete Qe[e];r=n}if(typeof r===y&&(n=r,r=null),null===r)if(null===Ge){if(Qe[e]){var i=Qe[e];for(r in i)me(i,r,n)}}else Ge.then(function(t){be(e,t,n)});else h.isPromise(r)?r.then(function(t){be(e,t,n)}):me(Qe[e],r,n)}function Te(){return Ge}function _e(){return M(rt,"#",[],!1)}function Oe(e){Xe.push(e),Je=Xe.reduceRight(function(e,t){return function(r,n,i){return h.sync(function(){return t(r,n,i,e)})}},U)}function Se(e){Ze.push(e),$e=Ze.reduceRight(function(e,t){return function(r,n){return h.sync(function(){return t(r,n,e)})}},D)}function je(e){et.push(e),Ke=et.reduceRight(function(e,t){return function(r,n){return h.sync(function(){return t(r,n,e)})}},T)}function Be(e){tt.push(e),Ve=tt.reduceRight(function(e,t){return function(r,n){return h.sync(function(){return t(r,n,e)})}},_)}function Ee(e){return Oe(e),rt}var Ae,ke=[],Ce=-1,Ie=!1,Re=!1,xe=3e4,Me=10,Pe=!1,Ue=!1,Ne=!1,Fe=[],We=!1,Le=r,De=[],ze=!1,qe=[],He=new h,Qe=Object.create(null),Ge=null,Ye=!0,Je=U,$e=D,Ke=T,Ve=_,Xe=[],Ze=[],et=[],tt=[],rt=this;_e.sync=!0,_e.idempotent=!0,_e.failswitch=!0;var nt=Object.create(null,{begin:{value:z},end:{value:q},use:{value:function(e){return Se(e),nt}}}),it=Object.create(null,{use:{value:function(e){return je(e),it}}}),at=Object.create(null,{use:{value:function(e){return Be(e),at}}});Object.defineProperties(this,{"#":{value:_e},onerror:{get:H,set:Q},uri:{get:G},id:{get:Te},failswitch:{get:Y,set:J},timeout:{get:$,set:K},retry:{get:V,set:X},idempotent:{get:Z,set:ee},keepAlive:{get:re,set:te},byref:{get:ne,set:ie},simple:{get:ae,set:oe},useHarmonyMap:{get:se,set:ue},filter:{get:ce,set:fe},addFilter:{value:le},removeFilter:{value:he},filters:{get:ge},useService:{value:pe},invoke:{value:ve},ready:{value:de},subscribe:{value:we},unsubscribe:{value:be},use:{value:Ee},batch:{value:nt},beforeFilter:{value:it},afterFilter:{value:at}}),a&&typeof a===w&&["failswitch","timeout","retry","idempotent","keepAlive","byref","simple","useHarmonyMap","filter"].forEach(function(e){e in a&&(rt[e]=a[e])}),typeof n===v?(ke=[n],Ce=0,pe(n,i)):Array.isArray(n)&&(ke=n,Ce=Math.floor(Math.random()*ke.length),pe(ke[Ce],i))}function i(e){var t=document.createElement("a");t.href=e;var r=t.protocol;if("http:"!==r&&"https:"!==r&&"tcp:"!==r&&"tcp4:"!==r&&"tcp6:"!==r&&"tcps:"!==r&&"tcp4s:"!==r&&"tcp6s:"!==r&&"tls:"!==r&&"ws:"!==r&&"wss:"!==r)throw new Error("The "+r+" client isn't implemented.")}function a(t,r,n){try{return e.hprose.HttpClient.create(t,r,n)}catch(a){}try{return e.hprose.TcpClient.create(t,r,n)}catch(a){}try{return e.hprose.WebSocketClient.create(t,r,n)}catch(a){}if("string"==typeof t)i(t);else if(Array.isArray(t))throw t.forEach(function(e){i(e)}),new Error("Not support multiple protocol.");throw new Error("You should set server uri first!")}var o=e.setImmediate,s=e.hprose.Tags,u=e.hprose.ResultMode,c=e.hprose.BytesIO,f=e.hprose.Writer,l=e.hprose.Reader,h=e.hprose.Future,g=new Uint8Array(1);g[0]=s.TagEnd;var p="boolean",v="string",d="number",y="function",w="object";Object.defineProperty(n,"create",{value:a}),e.hprose.Client=n}(this),function(e,t){"use strict";function r(){}function n(i,a,f){function l(n,i){var a=new s,o=new XMLHttpRequest;o.open("POST",_.uri,!0),e.location!==t&&"file:"!==e.location.protocol&&(o.withCredentials="true"),o.responseType="arraybuffer";for(var u in m)o.setRequestHeader(u,m[u]);if(o.onload=function(){o.onload=r,o.status&&(200===o.status?a.resolve(new Uint8Array(o.response)):a.reject(new Error(o.status+":"+o.statusText)))},o.onerror=function(){a.reject(new Error("error"))},o.upload!==t&&(o.upload.onprogress=b),o.onprogress=T,i.timeout>0&&(a=a.timeout(i.timeout).catchError(function(e){throw o.onload=r,o.onerror=r,o.abort(),e},function(e){return e instanceof c})),n.constructor===String||ArrayBuffer.isView)o.send(n);else if(n.buffer.slice)o.send(n.buffer.slice(0,n.length));else{var f=new Uint8Array(n.length);f.set(n),o.send(f.buffer)}return a}function h(t,r){var n=new s;return e.api.ajax({url:_.uri(),method:"post",data:{body:u.toString(t)},timeout:r.timeout,dataType:"text",headers:m,certificate:_.certificate},function(e,t){e?n.resolve(new u(e).takeBytes()):n.reject(new Error(t.msg))}),n}function g(t,r){var n="undefined"!=typeof e.api&&"undefined"!=typeof e.api.ajax,i=n?h(t,r):l(t,r);return r.oneway&&i.resolve(),i}function p(e){"function"==typeof e&&(b=e)}function v(){return b}function d(e){"function"==typeof e&&(T=e)}function y(){return T}function w(e,t){"content-type"!==e.toLowerCase()&&"content-length"!==e.toLowerCase()&&(t?m[e]=t:delete m[e])}if(this.constructor!==n)return new n(i,a,f);o.call(this,i,a,f);var m=Object.create(null),b=r,T=r,_=this;Object.defineProperties(this,{onprogress:{get:v,set:p},onRequestProgress:{get:v,set:p},onResponseProgress:{get:y,set:d},setHeader:{value:w},sendAndReceive:{value:g}})}function i(e){var t=document.createElement("a");if(t.href=e,"http:"!==t.protocol&&"https:"!==t.protocol)throw new Error("This client desn't support "+t.protocol+" scheme.")}function a(e,t,r){if("string"==typeof e)i(e);else{if(!Array.isArray(e))throw new Error("You should set server uri first!");e.forEach(function(e){i(e)})}return new n(e,t,r)}var o=e.hprose.Client,s=e.hprose.Future,u=e.hprose.BytesIO,c=e.TimeoutError;Object.defineProperty(n,"create",{value:a}),e.hprose.HttpClient=n}(this),function(e,t){"use strict";function r(){}function n(e,i,a){function l(){return 2147483647>m?++m:m=0}function h(e,t){var r=new o;r.writeInt32BE(e),t.constructor===String?r.writeString(t):r.write(t);var n=r.bytes;ArrayBuffer.isView?S.send(n):n.buffer.slice?S.send(n.buffer.slice(0,n.length)):S.send(n.buffer)}function g(e){O.resolve(e)}function p(e){var r=new o(e.data),n=r.readInt32BE(),i=T[n];if(delete T[n],i!==t&&(--b,i.resolve(r.read(r.length-4))),100>b&&_.length>0){++b;var a=_.pop();O.then(function(){h(a[0],a[1]); +})}0!==b||j.keepAlive||w()}function v(e){T.forEach(function(t,r){t.reject(new Error(e.code+":"+e.reason)),delete T[r]}),b=0,S=null}function d(){O=new u,S=new f(j.uri),S.binaryType="arraybuffer",S.onopen=g,S.onmessage=p,S.onerror=r,S.onclose=v}function y(e,t){(null===S||S.readyState===f.CLOSING||S.readyState===f.CLOSED)&&d();var r=l(),n=new u;return T[r]=n,t.timeout>0&&(n=n.timeout(t.timeout).catchError(function(e){throw delete T[r],--b,e},function(e){return e instanceof c})),100>b?(++b,O.then(function(){h(r,e)})):_.push([r,e]),t.oneway&&n.resolve(),n}function w(){null!==S&&(S.onopen=r,S.onmessage=r,S.onclose=r,S.close())}if("undefined"==typeof f)throw new Error("WebSocket is not supported by this browser.");if(this.constructor!==n)return new n(e,i,a);s.call(this,e,i,a);var m=0,b=0,T=[],_=[],O=null,S=null,j=this;Object.defineProperties(this,{sendAndReceive:{value:y},close:{value:w}})}function i(e){var t=document.createElement("a");if(t.href=e,"ws:"!==t.protocol&&"wss:"!==t.protocol)throw new Error("This client desn't support "+t.protocol+" scheme.")}function a(e,t,r){if("string"==typeof e)i(e);else{if(!Array.isArray(e))throw new Error("You should set server uri first!");e.forEach(function(e){i(e)})}return new n(e,t,r)}var o=e.hprose.BytesIO,s=e.hprose.Client,u=e.hprose.Future,c=e.TimeoutError,f=e.WebSocket||e.MozWebSocket;Object.defineProperty(n,"create",{value:a}),e.hprose.WebSocketClient=n}(this),function(e,t){"use strict";function r(){}function n(e){var t=s[e.socketId];t.onreceive(e.data)}function i(e){var t=s[e.socketId];t.onerror(e.resultCode),t.destroy()}function a(){null===u&&(u=e.chrome.sockets.tcp,u.onReceive.addListener(n),u.onReceiveError.addListener(i)),this.socketId=new o,this.connected=!1,this.timeid=t,this.onclose=r,this.onconnect=r,this.onreceive=r,this.onerror=r}var o=e.hprose.Future,s={},u=null;Object.defineProperties(a.prototype,{connect:{value:function(e,t,r){var n=this;u.create({persistent:r&&r.persistent},function(i){r&&("noDelay"in r&&u.setNoDelay(i.socketId,r.noDelay,function(e){0>e&&(n.socketId.reject(e),u.disconnect(i.socketId),u.close(i.socketId),n.onclose())}),"keepAlive"in r&&u.setKeepAlive(i.socketId,r.keepAlive,function(e){0>e&&(n.socketId.reject(e),u.disconnect(i.socketId),u.close(i.socketId),n.onclose())})),r&&r.tls?u.setPaused(i.socketId,!0,function(){u.connect(i.socketId,e,t,function(e){0>e?(n.socketId.reject(e),u.disconnect(i.socketId),u.close(i.socketId),n.onclose()):u.secure(i.socketId,function(t){0!==t?(n.socketId.reject(e),u.disconnect(i.socketId),u.close(i.socketId),n.onclose()):u.setPaused(i.socketId,!1,function(){n.socketId.resolve(i.socketId)})})})}):u.connect(i.socketId,e,t,function(e){0>e?(n.socketId.reject(e),u.disconnect(i.socketId),u.close(i.socketId),n.onclose()):n.socketId.resolve(i.socketId)})}),this.socketId.then(function(e){s[e]=n,n.connected=!0,n.onconnect(e)},function(e){n.onerror(e)})}},send:{value:function(e){var t=this,r=new o;return this.socketId.then(function(n){u.send(n,e,function(e){e.resultCode<0?(t.onerror(e.resultCode),r.reject(e.resultCode),t.destroy()):r.resolve(e.bytesSent)})}),r}},destroy:{value:function(){var e=this;this.connected=!1,this.socketId.then(function(t){u.disconnect(t),u.close(t),delete s[t],e.onclose()})}},ref:{value:function(){this.socketId.then(function(e){u.setPaused(e,!1)})}},unref:{value:function(){this.socketId.then(function(e){u.setPaused(e,!0)})}},clearTimeout:{value:function(){this.timeid!==t&&e.clearTimeout(this.timeid)}},setTimeout:{value:function(t,r){this.clearTimeout(),this.timeid=e.setTimeout(r,t)}}}),e.hprose.ChromeTcpSocket=a}(this),function(e,t){"use strict";function r(){}function n(){null===f&&(f=e.api.require("socketManager")),this.socketId=new i,this.connected=!1,this.timeid=t,this.onclose=r,this.onconnect=r,this.onreceive=r,this.onerror=r}var i=e.hprose.Future,a=e.atob,o=e.btoa,s=e.hprose.toUint8Array,u=e.hprose.toBinaryString,c={},f=null;Object.defineProperties(n.prototype,{connect:{value:function(e,t,r){var n=this;f.createSocket({type:"tcp",host:e,port:t,timeout:r.timeout,returnBase64:!0},function(e){if(e)switch(e.state){case 101:break;case 102:n.socketId.resolve(e.sid);break;case 103:n.onreceive(s(a(e.data.replace(/\s+/g,""))));break;case 201:n.socketId.reject(new Error("Create TCP socket failed"));break;case 202:n.socketId.reject(new Error("TCP connection failed"));break;case 203:n.onclose(),n.onerror(new Error("Abnormal disconnect connection"));break;case 204:n.onclose();break;case 205:n.onclose(),n.onerror(new Error("Unknown error"))}}),this.socketId.then(function(e){c[e]=n,n.connected=!0,n.onconnect(e)},function(e){n.onerror(e)})}},send:{value:function(e){var t=this,r=new i;return this.socketId.then(function(n){f.write({sid:n,data:o(u(e)),base64:!0},function(e,n){e.status?r.resolve():(t.onerror(new Error(n.msg)),r.reject(n.msg),t.destroy())})}),r}},destroy:{value:function(){var e=this;this.connected=!1,this.socketId.then(function(t){f.closeSocket({sid:t},function(t,r){t.status||e.onerror(new Error(r.msg))}),delete c[t]})}},ref:{value:r},unref:{value:r},clearTimeout:{value:function(){this.timeid!==t&&e.clearTimeout(this.timeid)}},setTimeout:{value:function(t,r){this.clearTimeout(),this.timeid=e.setTimeout(r,t)}}}),e.hprose.APICloudTcpSocket=n}(this),function(e,t){"use strict";function r(){}function n(e,t){e.onreceive=function(r){"receiveEntry"in e||(e.receiveEntry={stream:new g,headerLength:4,dataLength:-1,id:null});var n=e.receiveEntry,i=n.stream,a=n.headerLength,o=n.dataLength,s=n.id;for(i.write(r);;){if(0>o&&i.length>=a&&(o=i.readInt32BE(),0!==(2147483648&o)&&(o&=2147483647,a=8)),8===a&&null===s&&i.length>=a&&(s=i.readInt32BE()),!(o>=0&&i.length-a>=o))break;t(i.read(o),s),a=4,s=null,i.trunc(),o=-1}n.stream=i,n.headerLength=a,n.dataLength=o,n.id=s}}function i(e){e&&(this.client=e,this.uri=this.client.uri,this.size=0,this.pool=[],this.requests=[])}function a(e){i.call(this,e)}function o(e){i.call(this,e)}function s(e,t,r){function n(){return w}function i(e){w=!!e}function u(){return m}function c(e){m=!!e}function f(){return b}function l(e){"number"==typeof e?(b=0|e,1>b&&(b=10)):b=10}function g(){return T}function v(e){T="number"==typeof e?0|e:0}function d(e,t){var r=new p;return m?((null===_||_.uri!==y.uri)&&(_=new a(y)),_.sendAndReceive(e,r,t)):((null===O||O.uri!==y.uri)&&(O=new o(y)),O.sendAndReceive(e,r,t)),t.oneway&&r.resolve(),r}if(this.constructor!==s)return new s(e,t,r);h.call(this,e,t,r);var y=this,w=!0,m=!1,b=10,T=3e4,_=null,O=null;Object.defineProperties(this,{noDelay:{get:n,set:i},fullDuplex:{get:u,set:c},maxPoolSize:{get:f,set:l},poolTimeout:{get:g,set:v},sendAndReceive:{value:d}})}function u(e){var t=document.createElement("a");t.href=e;var r=t.protocol;if("tcp:"!==r&&"tcp4:"!==r&&"tcp6:"!==r&&"tcps:"!==r&&"tcp4s:"!==r&&"tcp6s:"!==r&&"tls:"!==r)throw new Error("This client desn't support "+r+" scheme.")}function c(e,t,r){if("string"==typeof e)u(e);else{if(!Array.isArray(e))throw new Error("You should set server uri first!");e.forEach(function(e){u(e)})}return new s(e,t,r)}var f=e.hprose.ChromeTcpSocket,l=e.hprose.APICloudTcpSocket,h=e.hprose.Client,g=e.hprose.BytesIO,p=e.hprose.Future,v=e.TimeoutError;Object.defineProperties(i.prototype,{create:{value:function(){var t=document.createElement("a");t.href=this.uri;var r=t.protocol;t.protocol="http:";var n,i=t.hostname,a=parseInt(t.port,10);if("tcp:"===r||"tcp4:"===r||"tcp6:"===r)n=!1;else{if("tcps:"!==r&&"tcp4s:"!==r&&"tcp6s:"!==r&&"tls:"!==r)throw new Error("Unsupported "+r+" protocol!");n=!0}var o;if(e.chrome&&e.chrome.sockets&&e.chrome.sockets.tcp)o=new f;else{if(!e.api||!e.api.require)throw new Error("TCP Socket is not supported by this browser or platform.");o=new l}var s=this;return o.connect(i,a,{persistent:!0,tls:n,timeout:this.client.timeout,noDelay:this.client.noDelay,keepAlive:this.client.keepAlive}),o.onclose=function(){--s.size},++this.size,o}}}),a.prototype=Object.create(i.prototype,{fetch:{value:function(){for(var e=this.pool;e.length>0;){var t=e.pop();if(t.connected)return 0===t.count&&(t.clearTimeout(),t.ref()),t}return null}},init:{value:function(e){var t=this;e.count=0,e.futures={},e.timeoutIds={},n(e,function(r,n){var i=e.futures[n];i&&(t.clean(e,n),0===e.count&&t.recycle(e),i.resolve(r))}),e.onerror=function(r){var n=e.futures;for(var i in n){var a=n[i];t.clean(e,i),a.reject(r)}}}},recycle:{value:function(e){e.unref(),e.setTimeout(this.client.poolTimeout,function(){e.destroy()})}},clean:{value:function(r,n){r.timeoutIds[n]!==t&&(e.clearTimeout(r.timeoutIds[n]),delete r.timeoutIds[n]),delete r.futures[n],--r.count,this.sendNext(r)}},sendNext:{value:function(e){if(e.count<10)if(this.requests.length>0){var t=this.requests.pop();t.push(e),this.send.apply(this,t)}else this.pool.lastIndexOf(e)<0&&this.pool.push(e)}},send:{value:function(t,r,n,i,a){var o=this,s=i.timeout;s>0&&(a.timeoutIds[n]=e.setTimeout(function(){o.clean(a,n),0===a.count&&o.recycle(a),r.reject(new v("timeout"))},s)),a.count++,a.futures[n]=r;var u=t.length,c=new g(8+u);c.writeInt32BE(2147483648|u),c.writeInt32BE(n),c.write(t),a.send(c.buffer).then(function(){o.sendNext(a)})}},getNextId:{value:function(){return this.nextid<2147483647?++this.nextid:this.nextid=0}},sendAndReceive:{value:function(e,t,r){var n=this.fetch(),i=this.getNextId();if(n)this.send(e,t,i,r,n);else if(this.size0;){var t=e.pop();if(t.connected)return t.clearTimeout(),t.ref(),t}return null}},recycle:{value:function(e){this.pool.lastIndexOf(e)<0&&(e.unref(),e.setTimeout(this.client.poolTimeout,function(){e.destroy()}),this.pool.push(e))}},clean:{value:function(n){n.onreceive=r,n.onerror=r,n.timeoutId!==t&&(e.clearTimeout(n.timeoutId),delete n.timeoutId)}},sendNext:{value:function(e){if(this.requests.length>0){var t=this.requests.pop();t.push(e),this.send.apply(this,t)}else this.recycle(e)}},send:{value:function(t,r,i,a){var o=this,s=i.timeout;s>0&&(a.timeoutId=e.setTimeout(function(){o.clean(a),o.recycle(a),r.reject(new v("timeout"))},s)),n(a,function(e){o.clean(a),o.sendNext(a),r.resolve(e)}),a.onerror=function(e){o.clean(a),r.reject(e)};var u=t.length,c=new g(4+u);c.writeInt32BE(u),c.write(t),a.send(c.buffer)}},sendAndReceive:{value:function(e,t,r){var n=this.fetch();if(n)this.send(e,t,r,n);else if(this.sizec;++c){var l=a[c];l.error?(s.writeByte(r.TagError),u.writeString(l.error.message)):(s.writeByte(r.TagResult),u.serialize(l.result))}return s.writeByte(r.TagEnd),s.bytes},t.prototype.outputFilter=function(e){var t=[],i=new n(e),u=new a(i,!1,!1),c=i.readByte();do{var f={};c===r.TagCall&&(f.method=u.readString(),c=i.readByte(),c===r.TagList&&(f.params=u.readListWithoutTag(),c=i.readByte()),c===r.TagTrue&&(c=i.readByte())),"1.1"===this.version?f.version="1.1":"2.0"===this.version&&(f.jsonrpc="2.0"),f.id=s++,t.push(f)}while(c===r.TagCall);return t.length>1?o.stringify(t):o.stringify(t[0])},e.hprose.JSONRPCClientFilter=t}(this),function(e){"use strict";e.hprose.common={Completer:e.hprose.Completer,Future:e.hprose.Future,ResultMode:e.hprose.ResultMode},e.hprose.io={BytesIO:e.hprose.BytesIO,ClassManager:e.hprose.ClassManager,Tags:e.hprose.Tags,RawReader:e.hprose.RawReader,Reader:e.hprose.Reader,Writer:e.hprose.Writer,Formatter:e.hprose.Formatter},e.hprose.client={Client:e.hprose.Client,HttpClient:e.hprose.HttpClient,TcpClient:e.hprose.TcpClient,WebSocketClient:e.hprose.WebSocketClient},e.hprose.filter={JSONRPCClientFilter:e.hprose.JSONRPCClientFilter},"function"==typeof define&&(define.cmd?define("hprose",[],e.hprose):define.amd&&define("hprose",[],function(){return e.hprose})),"object"==typeof module&&"object"==typeof module.exports&&(module.exports=e.hprose)}(this); \ No newline at end of file diff --git a/dist/hprose-html5.min.js b/dist/hprose-html5.min.js index cf1d0dd..73fe89f 100644 --- a/dist/hprose-html5.min.js +++ b/dist/hprose-html5.min.js @@ -1 +1 @@ -eval(function(n){"use strict";function r(n){var r=[];return r[n-1]=void 0,r}function u(n,r){return f(n[0]+r[0],n[1]+r[1])}function t(n,r){var u,t;return n[0]==r[0]&&n[1]==r[1]?0:(u=0>n[1],t=0>r[1],u&&!t?-1:!u&&t?1:a(n,r)[1]<0?-1:1)}function f(n,r){var u,t;for(r%=0x10000000000000000,n%=0x10000000000000000,u=r%un,t=Math.floor(n/un)*un,r=r-u+t,n=n-t+u;0>n;)n+=un,r-=un;for(;n>4294967295;)n-=un,r+=un;for(r%=0x10000000000000000;r>0x7fffffff00000000;)r-=0x10000000000000000;for(;-0x8000000000000000>r;)r+=0x10000000000000000;return[n,r]}function i(n){return n>=0?[n,0]:[n+un,-un]}function c(n){return n[0]>=2147483648?~~Math.max(Math.min(n[0]-un,2147483647),-2147483648):~~Math.max(Math.min(n[0],2147483647),-2147483648)}function a(n,r){return f(n[0]-r[0],n[1]-r[1])}function o(n,r){return n.ab=r,n.cb=0,n.O=r.length,n}function e(n){return n.cb>=n.O?-1:255&n.ab[n.cb++]}function v(n){return n.ab=r(32),n.O=0,n}function s(n){var r=n.ab;return r.length=n.O,r}function g(n,r,u,t){l(r,u,n.ab,n.O,t),n.O+=t}function l(n,r,u,t,f){for(var i=0;f>i;++i)u[t+i]=n[r+i]}function C(n,r,u){var t,f,c,a,o="",v=[];for(f=0;5>f;++f){if(c=e(r),-1==c)throw Error("truncated input");v[f]=c<<24>>24}if(t=F({}),!V(t,v))throw Error("corrupted input");for(f=0;64>f;f+=8){if(c=e(r),-1==c)throw Error("truncated input");c=c.toString(16),1==c.length&&(c="0"+c),o=c+""+o}/^0+$|^f+$/i.test(o)?n.M=tn:(a=parseInt(o,16),n.M=a>4294967295?tn:i(a)),n.S=M(t,r,u,n.M)}function z(n,r){return n.Y=v({}),C(n,o({},r),n.Y),n}function p(n,r,u){var t=n.y-r-1;for(0>t&&(t+=n.c);0!=u;--u)t>=n.c&&(t=0),n.x[n.y++]=n.x[t++],n.y>=n.c&&N(n)}function x(n,u){(null==n.x||n.c!=u)&&(n.x=r(u)),n.c=u,n.y=0,n.w=0}function N(n){var r=n.y-n.w;r&&(g(n.T,n.x,n.w,r),n.y>=n.c&&(n.y=0),n.w=n.y)}function d(n,r){var u=n.y-r-1;return 0>u&&(u+=n.c),n.x[u]}function J(n,r){n.x[n.y++]=r,n.y>=n.c&&N(n)}function L(n){N(n),n.T=null}function j(n){return n-=2,4>n?n:3}function B(n){return 4>n?0:10>n?n-3:n-6}function b(n,r){return n.h=r,n.bb=null,n.V=1,n}function k(n){if(!n.V)throw Error("bad state");if(n.bb)throw Error("No encoding");return h(n),n.V}function h(n){var r=U(n.h);if(-1==r)throw Error("corrupted input");n.$=tn,n.Z=n.h.d,(r||t(n.h.U,fn)>=0&&t(n.h.d,n.h.U)>=0)&&(N(n.h.b),L(n.h.b),n.h.a.K=null,n.V=0)}function M(n,r,u,t){return n.a.K=r,L(n.b),n.b.T=u,A(n),n.f=0,n.l=0,n.Q=0,n.R=0,n._=0,n.U=t,n.d=fn,n.G=0,b({},n)}function U(n){var r,f,a,o,e,v;if(v=c(n.d)&n.P,Q(n.a,n.t,(n.f<<4)+v)){if(Q(n.a,n.E,n.f))a=0,Q(n.a,n.r,n.f)?(Q(n.a,n.u,n.f)?(Q(n.a,n.s,n.f)?(f=n._,n._=n.R):f=n.R,n.R=n.Q):f=n.Q,n.Q=n.l,n.l=f):Q(n.a,n.o,(n.f<<4)+v)||(n.f=7>n.f?9:11,a=1),a||(a=q(n.n,n.a,v)+2,n.f=7>n.f?8:11);else if(n._=n.R,n.R=n.Q,n.Q=n.l,a=2+q(n.D,n.a,v),n.f=7>n.f?7:10,e=S(n.k[j(a)],n.a),e>=4){if(o=(e>>1)-1,n.l=(2|1&e)<e)n.l+=X(n.J,n.l-e-1,n.a,o);else if(n.l+=T(n.a,o-4)<<4,n.l+=Y(n.q,n.a),0>n.l)return-1==n.l?1:-1}else n.l=e;if(t(i(n.l),n.d)>=0||n.l>=n.m)return-1;p(n.b,n.l,a),n.d=u(n.d,i(a)),n.G=d(n.b,0)}else r=D(n.j,c(n.d),n.G),n.G=7>n.f?E(r,n.a):R(r,n.a,d(n.b,n.l)),J(n.b,n.G),n.f=B(n.f),n.d=u(n.d,cn);return 0}function F(n){n.b={},n.a={},n.t=r(192),n.E=r(12),n.r=r(12),n.u=r(12),n.s=r(12),n.o=r(192),n.k=r(4),n.J=r(114),n.q=H({},4),n.D=m({}),n.n=m({}),n.j={};for(var u=0;4>u;++u)n.k[u]=H({},6);return n}function A(n){n.b.w=0,n.b.y=0,I(n.t),I(n.o),I(n.E),I(n.r),I(n.u),I(n.s),I(n.J),Z(n.j);for(var r=0;4>r;++r)I(n.k[r].z);w(n.D),w(n.n),I(n.q.z),K(n.a)}function V(n,r){var u,t,f,i,c,a,o;if(5>r.length)return 0;for(o=255&r[0],f=o%9,a=~~(o/9),i=a%5,c=~~(a/5),u=0,t=0;4>t;++t)u+=(255&r[1+t])<<8*t;return u>99999999||!W(n,f,i,c)?0:G(n,u)}function G(n,r){return 0>r?0:(n.A!=r&&(n.A=r,n.m=Math.max(n.A,1),x(n.b,Math.max(n.m,4096))),1)}function W(n,r,u,t){if(r>8||u>4||t>4)return 0;P(n.j,u,r);var f=1<n.e;++n.e)n.I[n.e]=H({},3),n.H[n.e]=H({},3)}function q(n,r,u){if(!Q(r,n.N,0))return S(n.I[u],r);var t=8;return t+=Q(r,n.N,1)?8+S(n.L,r):S(n.H[u],r)}function m(n){return n.N=r(2),n.I=r(16),n.H=r(16),n.L=H({},8),n.e=0,n}function w(n){I(n.N);for(var r=0;n.e>r;++r)I(n.I[r].z),I(n.H[r].z);I(n.L.z)}function P(n,u,t){var f,i;if(null==n.F||n.g!=t||n.B!=u)for(n.B=u,n.X=(1<f;++f)n.F[f]=y({})}function D(n,r,u){return n.F[((r&n.X)<>>8-n.g)]}function Z(n){var r,u;for(u=1<r;++r)I(n.F[r].v)}function E(n,r){var u=1;do u=u<<1|Q(r,n.v,u);while(256>u);return u<<24>>24}function R(n,r,u){var t,f,i=1;do if(f=u>>7&1,u<<=1,t=Q(r,n.v,(1+f<<8)+i),i=i<<1|t,f!=t){for(;256>i;)i=i<<1|Q(r,n.v,i);break}while(256>i);return i<<24>>24}function y(n){return n.v=r(768),n}function H(n,u){return n.C=u,n.z=r(1<t;++t)u=Q(r,n.z,f),f<<=1,f+=u,i|=u<i;++i)f=Q(u,n,r+c),c<<=1,c+=f,a|=f<>>11)*f,(-2147483648^t)>(-2147483648^n.p)?(n.i=t,r[u]=f+(2048-f>>>5)<<16>>16,-16777216&n.i||(n.p=n.p<<8|e(n.K),n.i<<=8),0):(n.i-=t,n.p-=t,r[u]=f-(f>>>5)<<16>>16,-16777216&n.i||(n.p=n.p<<8|e(n.K),n.i<<=8),1)}function T(n,r){var u,t,f=0;for(u=r;0!=u;--u)n.i>>>=1,t=n.p-n.i>>>31,n.p-=n.i&t-1,f=f<<1|1-t,-16777216&n.i||(n.p=n.p<<8|e(n.K),n.i<<=8);return f}function K(n){n.p=0,n.i=-1;for(var r=0;5>r;++r)n.p=n.p<<8|e(n.K)}function I(n){for(var r=n.length-1;r>=0;--r)n[r]=1024}function _(n){for(var r,u,t,f=0,i=0,c=n.length,a=[],o=[];c>f;++f,++i){if(r=255&n[f],128&r)if(192==(224&r)){if(f+1>=n.length)return n;if(u=255&n[++f],128!=(192&u))return n;o[i]=(31&r)<<6|63&u}else{if(224!=(240&r))return n;if(f+2>=n.length)return n;if(u=255&n[++f],128!=(192&u))return n;if(t=255&n[++f],128!=(192&t))return n;o[i]=(15&r)<<12|(63&u)<<6|63&t}else{if(!r)return n;o[i]=r}65535==i&&(a.push(String.fromCharCode.apply(String,o)),i=-1)}return i>0&&(o.length=i,a.push(String.fromCharCode.apply(String,o))),a.join("")}function $(n){return n>64&&91>n?n-65:n>96&&123>n?n-71:n>47&&58>n?n+4:43===n?62:47===n?63:0}function nn(r){for(var u,t,f=r.length,i=3*f+1>>>2,c=new Array(i),a=0,o=0,e=0;f>e;e++)if(t=3&e,a|=$(r.charCodeAt(e))<<18-6*t,3===t||f-e===1){for(u=0;3>u&&i>o;u++,o++)c[o]=a>>>(16>>>u&24)&255;a=0}return c}function rn(n){n=nn(n);var r={};for(r.d=z({},n);k(r.d.S););return _(s(r.d.Y))}var un=4294967296,tn=[4294967295,-un],fn=[0,0],cn=[1,0];return rn}(this)("XQAAAQCTcgMAAAAAAAAXirMnLgKQAhzWPacdlCd/azCsNPOU/0gFHubTigjJ/j1SB/ISPdD2joEPlG2x0/8gtrXDghO984hf6N2J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6jBjQDJN+LbWz0pwVaaLgDS05h83kXKnkPpbP7IIkV04aPcRnSolnXO4Th3wBRvcpWrPYVhFQLx3REX0SD49fKfNP7LrcFntmgos9JzS9OyyYOjbfwwsAJR/OUG15CvwtLJgenHWD+LEBVeJdKtPkf0xjFN5iKYOO02SVhTqg2Mb5v/gT2VLOlGauyxWOytGiLneAmIquRvPOXPW8dNe8OtJAEyAMxZGAGjI3TXbVMqLuxoQKjS/wz3QmhJ5AJAbYsfkQ7vfhevrj3xv/ZbTqj+M9HJCFgjD+3sqpg/FqE3hoY3jsfgWQMV+MwOO0+a0/FiDIEBx/2GwlwY8kadygOF8QYRoGvBlOxI9jumsp3Hr5xjuhZoB30fpA1HsLtsLZR6xqRA3eMLAOMcn5iE/ERrBo63VOE7X8Vx8tLfFBqCLpiTg0MxjvNIocyB0q2LQHx1//dFn34=")); \ No newline at end of file +eval(function(n){"use strict";function r(n){var r=[];return r[n-1]=void 0,r}function u(n,r){return f(n[0]+r[0],n[1]+r[1])}function t(n,r){var u,t;return n[0]==r[0]&&n[1]==r[1]?0:(u=0>n[1],t=0>r[1],u&&!t?-1:!u&&t?1:a(n,r)[1]<0?-1:1)}function f(n,r){var u,t;for(r%=0x10000000000000000,n%=0x10000000000000000,u=r%un,t=Math.floor(n/un)*un,r=r-u+t,n=n-t+u;0>n;)n+=un,r-=un;for(;n>4294967295;)n-=un,r+=un;for(r%=0x10000000000000000;r>0x7fffffff00000000;)r-=0x10000000000000000;for(;-0x8000000000000000>r;)r+=0x10000000000000000;return[n,r]}function i(n){return n>=0?[n,0]:[n+un,-un]}function c(n){return n[0]>=2147483648?~~Math.max(Math.min(n[0]-un,2147483647),-2147483648):~~Math.max(Math.min(n[0],2147483647),-2147483648)}function a(n,r){return f(n[0]-r[0],n[1]-r[1])}function o(n,r){return n.ab=r,n.cb=0,n.O=r.length,n}function e(n){return n.cb>=n.O?-1:255&n.ab[n.cb++]}function v(n){return n.ab=r(32),n.O=0,n}function s(n){var r=n.ab;return r.length=n.O,r}function g(n,r,u,t){l(r,u,n.ab,n.O,t),n.O+=t}function l(n,r,u,t,f){for(var i=0;f>i;++i)u[t+i]=n[r+i]}function C(n,r,u){var t,f,c,a,o="",v=[];for(f=0;5>f;++f){if(c=e(r),-1==c)throw Error("truncated input");v[f]=c<<24>>24}if(t=F({}),!V(t,v))throw Error("corrupted input");for(f=0;64>f;f+=8){if(c=e(r),-1==c)throw Error("truncated input");c=c.toString(16),1==c.length&&(c="0"+c),o=c+""+o}/^0+$|^f+$/i.test(o)?n.M=tn:(a=parseInt(o,16),n.M=a>4294967295?tn:i(a)),n.S=M(t,r,u,n.M)}function z(n,r){return n.Y=v({}),C(n,o({},r),n.Y),n}function p(n,r,u){var t=n.y-r-1;for(0>t&&(t+=n.c);0!=u;--u)t>=n.c&&(t=0),n.x[n.y++]=n.x[t++],n.y>=n.c&&N(n)}function x(n,u){(null==n.x||n.c!=u)&&(n.x=r(u)),n.c=u,n.y=0,n.w=0}function N(n){var r=n.y-n.w;r&&(g(n.T,n.x,n.w,r),n.y>=n.c&&(n.y=0),n.w=n.y)}function d(n,r){var u=n.y-r-1;return 0>u&&(u+=n.c),n.x[u]}function J(n,r){n.x[n.y++]=r,n.y>=n.c&&N(n)}function L(n){N(n),n.T=null}function j(n){return n-=2,4>n?n:3}function B(n){return 4>n?0:10>n?n-3:n-6}function b(n,r){return n.h=r,n.bb=null,n.V=1,n}function k(n){if(!n.V)throw Error("bad state");if(n.bb)throw Error("No encoding");return h(n),n.V}function h(n){var r=U(n.h);if(-1==r)throw Error("corrupted input");n.$=tn,n.Z=n.h.d,(r||t(n.h.U,fn)>=0&&t(n.h.d,n.h.U)>=0)&&(N(n.h.b),L(n.h.b),n.h.a.K=null,n.V=0)}function M(n,r,u,t){return n.a.K=r,L(n.b),n.b.T=u,A(n),n.f=0,n.l=0,n.Q=0,n.R=0,n._=0,n.U=t,n.d=fn,n.G=0,b({},n)}function U(n){var r,f,a,o,e,v;if(v=c(n.d)&n.P,Q(n.a,n.t,(n.f<<4)+v)){if(Q(n.a,n.E,n.f))a=0,Q(n.a,n.r,n.f)?(Q(n.a,n.u,n.f)?(Q(n.a,n.s,n.f)?(f=n._,n._=n.R):f=n.R,n.R=n.Q):f=n.Q,n.Q=n.l,n.l=f):Q(n.a,n.o,(n.f<<4)+v)||(n.f=7>n.f?9:11,a=1),a||(a=q(n.n,n.a,v)+2,n.f=7>n.f?8:11);else if(n._=n.R,n.R=n.Q,n.Q=n.l,a=2+q(n.D,n.a,v),n.f=7>n.f?7:10,e=S(n.k[j(a)],n.a),e>=4){if(o=(e>>1)-1,n.l=(2|1&e)<e)n.l+=X(n.J,n.l-e-1,n.a,o);else if(n.l+=T(n.a,o-4)<<4,n.l+=Y(n.q,n.a),0>n.l)return-1==n.l?1:-1}else n.l=e;if(t(i(n.l),n.d)>=0||n.l>=n.m)return-1;p(n.b,n.l,a),n.d=u(n.d,i(a)),n.G=d(n.b,0)}else r=D(n.j,c(n.d),n.G),n.G=7>n.f?E(r,n.a):R(r,n.a,d(n.b,n.l)),J(n.b,n.G),n.f=B(n.f),n.d=u(n.d,cn);return 0}function F(n){n.b={},n.a={},n.t=r(192),n.E=r(12),n.r=r(12),n.u=r(12),n.s=r(12),n.o=r(192),n.k=r(4),n.J=r(114),n.q=H({},4),n.D=m({}),n.n=m({}),n.j={};for(var u=0;4>u;++u)n.k[u]=H({},6);return n}function A(n){n.b.w=0,n.b.y=0,I(n.t),I(n.o),I(n.E),I(n.r),I(n.u),I(n.s),I(n.J),Z(n.j);for(var r=0;4>r;++r)I(n.k[r].z);w(n.D),w(n.n),I(n.q.z),K(n.a)}function V(n,r){var u,t,f,i,c,a,o;if(5>r.length)return 0;for(o=255&r[0],f=o%9,a=~~(o/9),i=a%5,c=~~(a/5),u=0,t=0;4>t;++t)u+=(255&r[1+t])<<8*t;return u>99999999||!W(n,f,i,c)?0:G(n,u)}function G(n,r){return 0>r?0:(n.A!=r&&(n.A=r,n.m=Math.max(n.A,1),x(n.b,Math.max(n.m,4096))),1)}function W(n,r,u,t){if(r>8||u>4||t>4)return 0;P(n.j,u,r);var f=1<n.e;++n.e)n.I[n.e]=H({},3),n.H[n.e]=H({},3)}function q(n,r,u){if(!Q(r,n.N,0))return S(n.I[u],r);var t=8;return t+=Q(r,n.N,1)?8+S(n.L,r):S(n.H[u],r)}function m(n){return n.N=r(2),n.I=r(16),n.H=r(16),n.L=H({},8),n.e=0,n}function w(n){I(n.N);for(var r=0;n.e>r;++r)I(n.I[r].z),I(n.H[r].z);I(n.L.z)}function P(n,u,t){var f,i;if(null==n.F||n.g!=t||n.B!=u)for(n.B=u,n.X=(1<f;++f)n.F[f]=y({})}function D(n,r,u){return n.F[((r&n.X)<>>8-n.g)]}function Z(n){var r,u;for(u=1<r;++r)I(n.F[r].v)}function E(n,r){var u=1;do u=u<<1|Q(r,n.v,u);while(256>u);return u<<24>>24}function R(n,r,u){var t,f,i=1;do if(f=u>>7&1,u<<=1,t=Q(r,n.v,(1+f<<8)+i),i=i<<1|t,f!=t){for(;256>i;)i=i<<1|Q(r,n.v,i);break}while(256>i);return i<<24>>24}function y(n){return n.v=r(768),n}function H(n,u){return n.C=u,n.z=r(1<t;++t)u=Q(r,n.z,f),f<<=1,f+=u,i|=u<i;++i)f=Q(u,n,r+c),c<<=1,c+=f,a|=f<>>11)*f,(-2147483648^t)>(-2147483648^n.p)?(n.i=t,r[u]=f+(2048-f>>>5)<<16>>16,-16777216&n.i||(n.p=n.p<<8|e(n.K),n.i<<=8),0):(n.i-=t,n.p-=t,r[u]=f-(f>>>5)<<16>>16,-16777216&n.i||(n.p=n.p<<8|e(n.K),n.i<<=8),1)}function T(n,r){var u,t,f=0;for(u=r;0!=u;--u)n.i>>>=1,t=n.p-n.i>>>31,n.p-=n.i&t-1,f=f<<1|1-t,-16777216&n.i||(n.p=n.p<<8|e(n.K),n.i<<=8);return f}function K(n){n.p=0,n.i=-1;for(var r=0;5>r;++r)n.p=n.p<<8|e(n.K)}function I(n){for(var r=n.length-1;r>=0;--r)n[r]=1024}function _(n){for(var r,u,t,f=0,i=0,c=n.length,a=[],o=[];c>f;++f,++i){if(r=255&n[f],128&r)if(192==(224&r)){if(f+1>=n.length)return n;if(u=255&n[++f],128!=(192&u))return n;o[i]=(31&r)<<6|63&u}else{if(224!=(240&r))return n;if(f+2>=n.length)return n;if(u=255&n[++f],128!=(192&u))return n;if(t=255&n[++f],128!=(192&t))return n;o[i]=(15&r)<<12|(63&u)<<6|63&t}else{if(!r)return n;o[i]=r}65535==i&&(a.push(String.fromCharCode.apply(String,o)),i=-1)}return i>0&&(o.length=i,a.push(String.fromCharCode.apply(String,o))),a.join("")}function $(n){return n>64&&91>n?n-65:n>96&&123>n?n-71:n>47&&58>n?n+4:43===n?62:47===n?63:0}function nn(r){for(var u,t,f=r.length,i=3*f+1>>>2,c=new Array(i),a=0,o=0,e=0;f>e;e++)if(t=3&e,a|=$(r.charCodeAt(e))<<18-6*t,3===t||f-e===1){for(u=0;3>u&&i>o;u++,o++)c[o]=a>>>(16>>>u&24)&255;a=0}return c}function rn(n){n=nn(n);var r={};for(r.d=z({},n);k(r.d.S););return _(s(r.d.Y))}var un=4294967296,tn=[4294967295,-un],fn=[0,0],cn=[1,0];return rn}(this)("XQAAAQDLKgEAAAAAAAAzHUn/qWH7EwabADPIOSfRKQfDP5PS/WIum7zHAeJQvA4d9n4POLH6lJgsLP5QlqVDZXChzavjIbyDu+IMZRgJjRkeO7Zf+8FbLd/v4y5knW31OfmeQj7s0YoUOMF6krkyS4BiP7mSKlmmHj541GqWqc+Kb6Vt+wR1/8GSKawin+FUylpP8v7CNFC+mDCtquMLzoSNxAkOHP/4mmPp77dqirceSUVPIf0ggsoJZDB4+Dl5morcA8cLy/qU5f148oavP7/XjHa1i22+EluYFyicNIgRQzuD3nwT7zy8xGTKLs+uiTvELtoRXwr66IFFrGdM1zC3N5pBfn5hezIzb/pEfjIdVoxGPEu40IGq6wjauB4XLrugqViT7Aaug/t2+6qa+/cUyNAx/V29ekV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ff --git a/gulpfile.js b/gulpfile.js index 0b613f1..f93751e 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -36,7 +36,7 @@ gulp.task('uglify', ['clear'], function() { .pipe(jshint()) .pipe(jshint.reporter()) .pipe(concat('hprose-html5.js')) -// .pipe(uglify()) + .pipe(uglify()) .pipe(gulp.dest('dist')); }); diff --git a/package.json b/package.json index c85019b..5b3f1c3 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { "name": "hprose-html5", "filename": "hprose-html5.js", - "version": "2.0.10", - "description": "Hprose is a High Performance Remote Object Service Engine. It is a modern, lightweight, cross-language, cross-platform, object-oriented, high performance, remote dynamic communication middleware.", + "version": "2.0.11", + "description": "Hprose is a High Performance Remote Object Service Engine.", "homepage": "https://github.com/andot/hprose", "keywords": [ "hprose", diff --git a/src/CopyRight.js b/src/CopyRight.js index 4315524..5b12ce7 100644 --- a/src/CopyRight.js +++ b/src/CopyRight.js @@ -1,4 +1,4 @@ -// Hprose for HTML5 v2.0.10 +// Hprose for HTML5 v2.0.11 // Copyright (c) 2008-2016 http://hprose.com // Hprose is freely distributable under the MIT license. // For all details and documentation: