|
|
"use strict";function _get(e,t,n){return(_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var i=_superPropBase(e,t);if(i){var r=Object.getOwnPropertyDescriptor(i,t);return r.get?r.get.call(n):r.value}})(e,t,n||e)}function _superPropBase(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_getPrototypeOf(e)););return e}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function _iterableToArrayLimit(e,t){var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);i=!0);}catch(e){r=!0,o=e}finally{try{i||null==a.return||a.return()}finally{if(r)throw o}}return n}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _wrapNativeSuper(e){var t="function"==typeof Map?new Map:void 0;return(_wrapNativeSuper=function(e){if(null===e||!_isNativeFunction(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return _construct(e,arguments,_getPrototypeOf(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf(n,e)})(e)}function isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}function _construct(e,t,n){return(_construct=isNativeReflectConstruct()?Reflect.construct:function(e,t,n){var i=[null];i.push.apply(i,t);var r=new(Function.bind.apply(e,i));return n&&_setPrototypeOf(r,n.prototype),r}).apply(null,arguments)}function _isNativeFunction(e){return-1!==Function.toString.call(e).indexOf("[native code]")}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?_assertThisInitialized(e):t}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=e.ice||{};e.Ice=e.Ice||{},t.Ice=e.Ice,Ice.Slice=Ice.Slice||{},e.IceMX=e.IceMX||{},t.IceMX=e.IceMX,e.IceSSL=e.IceSSL||{},t.IceSSL=e.IceSSL;var n,i,r,o,s,a,c,u,l,h,_,d,p,f,y,v,g,I,m,k,w,C,S,x,E,b,P,O,M,A,R,T,F,L,D,z,q,B,H,j,U,N=Ice.Slice;!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=function(){function t(){_classCallCheck(this,t)}return _createClass(t,null,[{key:"module",value:function(t){var n=e[t];return void 0===n&&(n={},e[t]=n),n}},{key:"require",value:function(t){return e}},{key:"type",value:function(t){if(void 0!==t){for(var n=t.split("."),i=e,r=0,o=n.length;r<o;++r)if(void 0===(i=i[n[r]]))return;return i}}}]),t}();Ice._require=function(){return e},Ice.Slice=Ice.Slice||{},Ice._ModuleRegistry=t}(),function(){var e=Ice._ModuleRegistry,t=Ice.Slice,n=function e(t,n){return t===n||null!=t&&null!=n&&(t.prototype===n.prototype&&("function"==typeof t.equals?t.equals(n):(t instanceof Array||t instanceof Uint8Array)&&i.equals(t,n,e)))},i=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"clone",value:function(e){return void 0===e?e:null===e?[]:e.slice()}},{key:"equals",value:function(e,t,i){if(e.length!=t.length)return!1;for(var r=i||n,o=0;o<e.length;++o)if(!r.call(r,e[o],t[o]))return!1;return!0}},{key:"shuffle",value:function(e){for(var t=e.length;t>1;--t){var n=e[t-1],i=Math.floor(Math.random()*t);e[t-1]=e[i],e[i]=n}}}]),e}();i.eq=n,t.defineSequence=function(t,n,i,r,o){var s=null;Object.defineProperty(t,n,{get:function(){return null===s&&(s=Ice.StreamHelpers.generateSeqHelper(e.type(i),r,e.type(o))),s}})},Ice.ArrayUtil=i}(),function(){var e=function(){function e(t,n){_classCallCheck(this,e),this._name=t,this._value=n}return _createClass(e,[{key:"equals",value:function(e){return this===e||e instanceof Object.getPrototypeOf(this).constructor&&this._value==e._value}},{key:"hashCode",value:function(){return this._value}},{key:"toString",value:function(){return this._name}},{key:"name",get:function(){return this._name}},{key:"value",get:function(){return this._value}}]),e}();Ice.EnumBase=e;var t=function(){function e(t){_classCallCheck(this,e),this._enumType=t}return _createClass(e,[{key:"write",value:function(e,t){this._enumType._write(e,t)}},{key:"writeOptional",value:function(e,t,n){this._enumType._writeOpt(e,t,n)}},{key:"read",value:function(e){return this._enumType._read(e)}},{key:"readOptional",value:function(e,t){return this._enumType._readOpt(e,t)}}]),e}();Ice.EnumHelper=t,Ice.Slice.defineEnum=function(n){var i=function(t){function n(){return _classCallCheck(this,n),_possibleConstructorReturn(this,_getPrototypeOf(n).apply(this,arguments))}return _inherits(n,e),n}(),r=[],o=0,s=null;for(var a in n){var c=n[a][0],u=n[a][1],l=new i(c,u);r[u]=l,s||(s=l),Object.defineProperty(i,c,{enumerable:!0,value:l}),u>o&&(o=u)}return Object.defineProperty(i,"minWireSize",{get:function(){return 1}}),i._write=function(e,t){t?e.writeEnum(t):e.writeEnum(s)},i._read=function(e){return e.readEnum(i)},i._writeOpt=function(e,t,n){void 0!==n&&e.writeOptional(t,Ice.OptionalFormat.Size)&&i._write(e,n)},i._readOpt=function(e,t){return e.readOptionalEnum(t,i)},i._helper=new t(i),Object.defineProperty(i,"valueOf",{value:function(e){return void 0===e?i:r[e]}}),Object.defineProperty(i,"maxValue",{value:o}),Object.defineProperty(i.prototype,"maxValue",{value:o}),i}}(),(n=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;if(_classCallCheck(this,e),!Number.isSafeInteger(t))throw new RangeError(void 0===n?"Number must be a safe integer":"High word must be a safe integer");if(void 0===n)this.low=t>>>0,this.high=(t-this.low)/e.HIGH_MASK>>>0;else{if(!Number.isSafeInteger(n))throw new RangeError("Low word must be a safe integer");if(n<0||n>e.MAX_UINT32)throw new RangeError("Low word must be between 0 and 0xFFFFFFFF");if(t<0||t>e.MAX_UINT32)throw new RangeError("High word must be between 0 and 0xFFFFFFFF");this.high=t,this.low=n}}return _createClass(e,[{key:"hashCode",value:function(){return this.low}},{key:"equals",value:function(t){return this===t||t instanceof e&&(this.high===t.high&&this.low===t.low)}},{key:"toString",value:function(){return this.high+":"+this.low}},{key:"toNumber",value:function(){if(0!=(this.high&e.SIGN_MASK)){var t=~this.low>>>0,n=~this.high>>>0;return n>e.HIGH_MAX||n==e.HIGH_MAX&&t==e.MAX_UINT32?Number.NEGATIVE_INFINITY:-(n*e.HIGH_MASK+t+1)}return this.high>e.HIGH_MAX?Number.POSITIVE_INFINITY:this.high*e.HIGH_MASK+this.low}}]),e}()).MAX_UINT32=4294967295,n.SIGN_MASK=2147483648,n.HIGH_MASK=4294967296,n.HIGH_MAX=2097151,Ice.Long=n,Ice.AsyncStatus={Queued:0,Sent:1},function(){var e=Ice.Long,t=function(){function t(e){_classCallCheck(this,t),void 0!==e?(this.b=e,this.v=new DataView(this.b),this._limit=this.b.byteLength):(this.b=null,this.v=null,this._limit=0),this._position=0,this._shrinkCounter=0}return _createClass(t,[{key:"empty",value:function(){return 0===this._limit}},{key:"resize",value:function(e){0===e?this.clear():e>this.capacity&&this.reserve(e),this._limit=e}},{key:"clear",value:function(){this.b=null,this.v=null,this._position=0,this._limit=0}},{key:"expand",value:function(e){var t=0===this.capacity?e:this._position+e;t>this._limit&&this.resize(t)}},{key:"reset",value:function(){this._limit>0&&2*this._limit<this.capacity?++this._shrinkCounter>2&&(this.reserve(this._limit),this._shrinkCounter=0):this._shrinkCounter=0,this._limit=this.capacity(),this._position=0}},{key:"reserve",value:function(e){if(e>this.capacity){var t=Math.max(1024,Math.max(e,2*this.capacity));if(this.b){var n=new Uint8Array(t);n.set(new Uint8Array(this.b)),this.b=n.buffer}else this.b=new ArrayBuffer(t);this.v=new DataView(this.b)}else e<this.capacity&&(this.b=this.b.slice(0,e),this.v=new DataView(this.b))}},{key:"put",value:function(e){if(this._position===this._limit)throw new RangeError("BufferOverflowException");this.v.setUint8(this._position,e),this._position++}},{key:"putAt",value:function(e,t){if(e>=this._limit)throw new RangeError("IndexOutOfBoundsException");this.v.setUint8(e,t)}},{key:"putArray",value:function(e){if(!(e instanceof Uint8Array))throw new TypeError("argument is not a Uint8Array");if(e.byteLength>0){if(this._position+e.length>this._limit)throw new RangeError("BufferOverflowException");new Uint8Array(this.b,0,this.b.byteLength).set(e,this._position),this._position+=e.byteLength}}},{key:"putShort",value:function(e){if(this._position+2>this._limit)throw new RangeError("BufferOverflowException");this.v.setInt16(this._position,e,!0),this._position+=2}},{key:"putInt",value:function(e){if(this._position+4>this._limit)throw new RangeError("BufferOverflowException");this.v.setInt32(this._position,e,!0),this._position+=4}},{key:"putIntAt",value:function(e,t){if(e+4>this._limit||e<0)throw new RangeError("IndexOutOfBoundsException");this.v.setInt32(e,t,!0)}},{key:"putFloat",value:function(e){if(this._position+4>this._limit)throw new RangeError("BufferOverflowException");this.v.setFloat32(this._position,e,!0),this._position+=4}},{key:"putDouble",value:function(e){if(this._position+8>this._limit)throw new RangeError("BufferOverflowException");this.v.setFloat64(this._position,e,!0),this._position+=8}},{key:"putLong",value:function(e){if(this._position+8>this._limit)throw new RangeError("BufferOverflowException");this.v.setInt32(this._position,e.low,!0),this._position+=4,this.v.setInt32(this._position,e.high,!0),this._position+=4}},{key:"writeString",value:function(e,t){var n=unescape(encodeURIComponent(t));e.writeSize(n.length),e.expand(n.length),this.putString(n,n.length)}},{key:"putString",value:function(e,t){if(this._position+t>this._limit)throw new RangeError("BufferOverflowException");for(var n=0;n<t;++n)this.v.setUint8(this._position,e.charCodeAt(n)),this._position++}},{key:"get",value:function(){if(this._position>=this._limit)throw new RangeError("BufferUnderflowException");var e=this.v.getUint8(this._position);return this._position++,e}},{key:"getAt",value:function(e){if(e<0||e>=this._limit)throw new RangeError("IndexOutOfBoundsException");return this.v.getUint8(e)}},{key:"getArray",value:function(e){if(this._position+e>this._limit)throw new RangeError("BufferUnderflowException");var t=this.b.slice(this._position,this._position+e);return this._position+=e,new Uint8Array(t)}},{key:"getArrayAt",value:function(e,t){if(e+t>this._limit)throw new RangeError("BufferUnderflowException");return new Uint8Array(this.b.slice(e,e+t===void 0?this.b.byteLength-e:t))}},{key:"getShort",value:function(){if(this._limit-this._position<2)throw new RangeError("BufferUnderflowException");var e=this.v.getInt16(this._position,!0);return this._position+=2,e}},{key:"getInt",value:function(){if(this._limit-this._position<4)throw new RangeError("BufferUnderflowException");var e=this.v.getInt32(this._position,!0);return this._position+=4,e}},{key:"getFloat",value:function(){if(this._limit-this._position<4)throw new RangeError("BufferUnderflowException");var e=this.v.getFloat32(this._position,!0);return this._position+=4,e}},{key:"getDouble",value:function(){if(this._limit-this._position<8)throw new RangeError("BufferUnderflowException");var e=this.v.getFloat64(this._position,!0);return this._position+=8,e}},{key:"getLong",value:function(){if(this._limit-this._position<8)throw new RangeError("BufferUnderflowException");var t=this.v.getUint32(this._position,!0);this._position+=4;var n=this.v.getUint32(this._position,!0);return this._position+=4,new e(n,t)}},{key:"getString",value:function(e){if(this._position+e>this._limit)throw new RangeError("BufferUnderflowException");for(var t=new DataView(this.b,this._position,e),n="",i=0;i<e;++i)n+=String.fromCharCode(t.getUint8(i));return this._position+=e,decodeURIComponent(escape(n))}},{key:"position",get:function(){return this._position},set:function(e){e>=0&&e<=this._limit&&(this._position=e)}},{key:"limit",get:function(){return this._limit},set:function(e){e<=this.capacity&&(this._limit=e,this._position>e&&(this._position=e))}},{key:"capacity",get:function(){return null===this.b?0:this.b.byteLength}},{key:"remaining",get:function(){return this._limit-this._position}}]),t}();Ice.Buffer=t}(),Ice.CompactIdRegistry=new Map,function(){var e=function(t,n,i,r){if(r+=" ",null===n)return"\n"+r+t+": (null)";if(void 0===n)return"\n"+r+t+": (undefined)";if("stack"==t||"function"==typeof n)return"";if("object"!=_typeof(n))return"\n"+r+t+': "'+n+'"';if(-1!=i.indexOf(n))return"\n"+r+t+": (recursive)";i.push(n);var o="\n"+r+t+":";for(var s in n)0!==t.indexOf("_")&&"function"!=typeof n[s]&&(o+=r+e(s,n[s],i,r));return o},t=function(t){function n(e){var t;return _classCallCheck(this,n),t=_possibleConstructorReturn(this,_getPrototypeOf(n).call(this)),e&&(t.ice_cause=e),t}return _inherits(n,_wrapNativeSuper(Error)),_createClass(n,[{key:"ice_name",value:function(){return this.constructor._id.substr(2)}},{key:"ice_id",value:function(){return this.constructor._id}},{key:"toString",value:function(){if(this._inToStringAlready)return"";this._inToStringAlready=!0;var t=this.ice_id();for(var n in this)"_inToStringAlready"!=n&&(t+=e(n,this[n],[],""));return!0===Ice._printStackTraces&&this.stack&&(t+="\n"+this.stack),this._inToStringAlready=!1,t}}],[{key:"captureStackTrace",value:function(e){var t=(new Error).stack;void 0!==t&&Object.defineProperty(e,"stack",{get:function(){return t}})}},{key:"_id",get:function(){return"::Ice::Exception"}}]),n}();Ice.Exception=t;var n=function(e){function n(e){var i;return _classCallCheck(this,n),i=_possibleConstructorReturn(this,_getPrototypeOf(n).call(this,e)),t.captureStackTrace(_assertThisInitialized(i)),i}return _inherits(n,t),_createClass(n,null,[{key:"_id",get:function(){return"::Ice::LocalException"}}]),n}();Ice.LocalException=n;var i=function(e){function n(e){var i;return _classCallCheck(this,n),i=_possibleConstructorReturn(this,_getPrototypeOf(n).call(this,e)),t.captureStackTrace(_assertThisInitialized(i)),i}return _inherits(n,t),_createClass(n,[{key:"ice_getSlicedData",value:function(){return null}},{key:"_write",value:function(e){e.startException(null),r(this,e,this._mostDerivedType()),e.endException()}},{key:"_read",value:function(e){e.startException(),o(this,e,this._mostDerivedType()),e.endException(!1)}},{key:"_usesClasses",value:function(){return!1}},{key:"_mostDerivedType",value:function(){return Ice.UserException}}],[{key:"_id",get:function(){return"::Ice::UserException"}}]),n}();Ice.UserException=i;var r=function e(t,n,r){void 0!==r&&r!==i&&(n.startSlice(r._id,-1,r._parent===i),r.prototype.hasOwnProperty("_writeMemberImpl")&&r.prototype._writeMemberImpl.call(t,n),n.endSlice(),e(t,n,r._parent))},o=function e(t,n,r){void 0!==r&&r!==i&&(n.startSlice(),r.prototype.hasOwnProperty("_readMemberImpl")&&r.prototype._readMemberImpl.call(t,n),n.endSlice(),e(t,n,r._parent))},s=function(e){e.startException(this._slicedData),r(this,e,this._mostDerivedType()),e.endException()},a=function(e){e.startException(),o(this,e,this._mostDerivedType()),this._slicedData=e.endException(!0)},c=function(){return this._slicedData};Ice.Slice.PreservedUserException=function(e){e.prototype.ice_getSlicedData=c,e.prototype._write=s,e.prototype._read=a}}(),Ice.FormatType=Ice.Slice.defineEnum([["DefaultFormat",0],["CompactFormat",1],["SlicedFormat",2]]),function(){var e=function(e){function t(e){var n;return _classCallCheck(this,t),n=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this)),Ice.Exception.captureStackTrace(_assertThisInitialized(n)),n.message=e,n}return _inherits(t,_wrapNativeSuper(Error)),t}();Ice.AssertionFailedException=e;var t=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"assert",value:function(e,t){if(!e)throw console.log(void 0===t?"assertion failed":t),console.log(Error().stack),new Ice.AssertionFailedException(void 0===t?"assertion failed":t)}}]),e}();Ice.Debug=t}(),function(){var e=Ice.Debug;function t(t,n,i,r){switch(t){case 92:n.push("\\\\");break;case 39:n.push("\\'");break;case 34:n.push('\\"');break;case 7:r==Ice.ToStringMode.Compat?n.push("\\007"):n.push("\\a");break;case 8:n.push("\\b");break;case 12:n.push("\\f");break;case 10:n.push("\\n");break;case 13:n.push("\\r");break;case 9:n.push("\\t");break;case 11:r==Ice.ToStringMode.Compat?n.push("\\013"):n.push("\\v");break;default:var o=String.fromCharCode(t);if(null!==i&&-1!==i.indexOf(o))n.push("\\"),n.push(o);else if(t<32||t>126)if(r===Ice.ToStringMode.Compat){e.assert(t<256),n.push("\\");for(var s=t.toString(8),a=s.length;a<3;a++)n.push("0");n.push(s)}else if(t<32||127==t||r===Ice.ToStringMode.ASCII){n.push("\\u");for(var c=t.toString(16),u=c.length;u<4;u++)n.push("0");n.push(c)}else n.push(o);else n.push(o)}}function n(e,t){var n,i=e.charCodeAt(t);if(i<32||127===i)throw n=t>0?"character after `"+e.substring(0,t)+"'":"first character",n+=" has invalid ordinal value"+i,new RangeError(n);return e.charAt(t)}function i(t,i,r,o,s){if(e.assert(i>=0),e.assert(i<r),e.assert(r<=t.length),"\\"!=t.charAt(i))s.push(n(t,i++));else if(i+1===r)++i,s.push("\\");else{var a=t.charAt(++i);switch(a){case"\\":case"'":case'"':case"?":++i,s.push(a);break;case"a":++i,s.append("");break;case"b":++i,s.push("\b");break;case"f":++i,s.push("\f");break;case"n":++i,s.push("\n");break;case"r":++i,s.push("\r");break;case"t":++i,s.push("\t");break;case"v":++i,s.push("\v");break;case"u":case"U":var c=0,u="u"===a,l=u?4:8;for(++i;l>0&&i<r;){var h=t.charCodeAt(i++);if(h>=48&&h<=57)h-=48;else if(h>=97&&h<=102)h+=-87;else{if(!(h>=65&&h<=70))break;h+=-55}c=16*c+h,--l}if(l>0)throw new RangeError("Invalid universal character name: too few hex digits");if(c>=55296&&c<=57343)throw new RangeError("A universal character name cannot designate a surrogate");u||c<=65535?s.push(String.fromCharCode(c)):s.push(String.fromCodePoint(c));break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"x":for(var _=[],d=!0;d;){var p=0;if("x"===a){var f=2;for(++i;f>0&&i<r;){var y=t.charCodeAt(i++);if(y>=48&&y<=57)y-=48;else if(y>=97&&y<=102)y+=-87;else{if(!(y>=65&&y<=70))break;y+=-55}p=16*p+y,--f}if(2===f)throw new RangeError("Invalid \\x escape sequence: no hex digit")}else{for(var v=0;v<3&&i<r;++v){var g=t.charCodeAt(i++)-"0".charCodeAt(0);if(g<0||g>7){--i,e.assert(0!==v);break}p=8*p+g}if(p>255)throw new RangeError("octal value \\"+p.toString(8)+" ("+p+") is out of range")}if(_.push(String.fromCharCode(p)),d=!1,i+1<r&&"\\"===t.charAt(i)){a=t.charAt(i+1);var I=t.charCodeAt(i+1);("x"===a||I>=48&&I<=57)&&(i++,d=!0)}}s.push(decodeURIComponent(escape(_.join(""))));break;default:null!==o&&0!==o.length&&-1!==o.indexOf(a)||s.push("\\"),s.push(n(t,i++))}}return i}Ice.StringUtil=function(){function r(){_classCallCheck(this,r)}return _createClass(r,null,[{key:"findFirstOf",value:function(e,t,n){for(var i=n=void 0===n?0:n;i<e.length;i++){var r=e.charAt(i);if(-1!=t.indexOf(r))return i}return-1}},{key:"findFirstNotOf",value:function(e,t,n){for(var i=n=void 0===n?0:n;i<e.length;i++){var r=e.charAt(i);if(-1==t.indexOf(r))return i}return-1}},{key:"escapeString",value:function(n,i,r){if(null!==(i=void 0===i?null:i))for(var o=0;o<i.length;++o)if(i.charCodeAt(o)<32||i.charCodeAt(o)>126)throw new RangeError("special characters must be in ASCII range 32-126");var s=[];if(r===Ice.ToStringMode.Compat)for(var a=unescape(encodeURIComponent(n)),c=0;c<a.length;++c){t(a.charCodeAt(c),s,i,r)}else for(var u=0;u<n.length;++u){var l=n.charCodeAt(u);if(r===Ice.ToStringMode.Unicode||l<55296||l>57343)t(l,s,i,r);else{if(e.assert(r===Ice.ToStringMode.ASCII&&l>=55296&&l<=57343),u+1===n.length)throw new RangeError("High surrogate without low surrogate");var h=n.codePointAt(u);e.assert(h>65535),u++,s.push("\\U");for(var _=h.toString(16),d=_.length;d<8;d++)s.push("0");s.push(_)}}return s.join("")}},{key:"unescapeString",value:function(t,r,o,s){if(r=void 0===r?0:r,o=void 0===o?t.length:o,s=void 0===s?null:s,e.assert(r>=0&&r<=o&&o<=t.length),null!==s)for(var a=0;a<s.length;++a)if(s.charCodeAt(a)<32||s.charCodeAt(a)>126)throw new RangeError("special characters must be in ASCII range 32-126");var c=t.indexOf("\\",r);if(-1==c||c>=o){for(c=r;c<o;)n(t,c++);return t.substring(r,o)}for(var u=[];r<o;)r=i(t,r,o,s,u);return u.join("")}},{key:"splitString",value:function(e,t){for(var n=[],i="",r=0,o=null;r<e.length;)if(null!==o||'"'!==e.charAt(r)&&"'"!==e.charAt(r)){if(null===o&&"\\"===e.charAt(r)&&r+1<e.length&&('"'===e.charAt(r+1)||"'"===e.charAt(r+1)))++r;else if(null!==o&&"\\"===e.charAt(r)&&r+1<e.length&&e.charAt(r+1)===o)++r;else{if(null!==o&&e.charAt(r)===o){++r,o=null;continue}if(-1!==t.indexOf(e.charAt(r))&&null===o){++r,i.length>0&&(n.push(i),i="");continue}}r<e.length&&(i+=e.charAt(r++))}else o=e.charAt(r++);return i.length>0&&n.push(i),null!==o?null:n}},{key:"checkQuote",value:function(e,t){t=void 0===t?0:t;var n=e.charAt(t);if('"'==n||"'"==n){var i;for(t++;t<e.length&&-1!=(i=e.indexOf(n,t));){if("\\"!=e.charAt(i-1))return i;t=i+1}return-1}return 0}},{key:"hashCode",value:function(e){for(var t=0,n=0;n<e.length;n++)t=31*t+e.charCodeAt(n);return t}},{key:"toInt",value:function(e){var t=parseInt(e,10);if(isNaN(t))throw new RangeError("conversion of `"+e+"' to int failed");return t}}]),r}()}(),Ice.ReferenceMode={ModeTwoway:0,ModeOneway:1,ModeBatchOneway:2,ModeDatagram:3,ModeBatchDatagram:4,ModeLast:4},Ice.OptionalFormat=Ice.Slice.defineEnum([["F1",0],["F2",1],["F4",2],["F8",3],["Size",4],["VSize",5],["FSize",6],["Class",7]]),function(){var e=Object.defineProperty,t=Ice.OptionalFormat,n={FSizeOptHelper:function(){this.writeOptional=function(e,n,i){if(void 0!==i&&e.writeOptional(n,t.FSize)){var r=e.startSize();this.write(e,i),e.endSize(r)}},this.readOptional=function(e,n){var i;return e.readOptional(n,t.FSize)&&(e.skip(4),i=this.read(e)),i}},VSizeOptHelper:function(){this.writeOptional=function(e,n,i){void 0!==i&&e.writeOptional(n,t.VSize)&&(e.writeSize(this.minWireSize),this.write(e,i))},this.readOptional=function(e,n){var i;return e.readOptional(n,t.VSize)&&(e.skipSize(),i=this.read(e)),i}},VSizeContainerOptHelper:function(e){this.writeOptional=function(n,i,r){if(void 0!==r&&n.writeOptional(i,t.VSize)){var o=this.size(r);n.writeSize(o>254?o*e+5:o*e+1),this.write(n,r)}},this.readOptional=function(e,n){var i;return e.readOptional(n,t.VSize)&&(e.skipSize(),i=this.read(e)),i}},VSizeContainer1OptHelper:function(){this.writeOptional=function(e,n,i){void 0!==i&&e.writeOptional(n,t.VSize)&&this.write(e,i)},this.readOptional=function(e,n){var i;return e.readOptional(n,t.VSize)&&(i=this.read(e)),i}}},i=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"write",value:function(e,t){if(null===t||0===t.length)e.writeSize(0);else{var n=this.elementHelper;e.writeSize(t.length);for(var i=0;i<t.length;++i)n.write(e,t[i])}}},{key:"read",value:function(e){var t=this.elementHelper,n=e.readAndCheckSeqSize(t.minWireSize),i=[];i.length=n;for(var r=0;r<n;++r)i[r]=t.read(e);return i}},{key:"size",value:function(e){return null==e?0:e.length}},{key:"minWireSize",get:function(){return 1}}]),e}(),r=new i;r.write=function(e,t){return e.writeByteSeq(t)},r.read=function(e){return e.readByteSeq()},e(r,"elementHelper",{get:function(){return Ice.ByteHelper}}),n.VSizeContainer1OptHelper.call(r);var o=function(e){var t=e.readAndCheckSeqSize(1),n=[];n.length=t;for(var i=this.elementType,r=function(t){e.readValue(function(e){n[t]=e},i)},o=0;o<t;++o)r(o);return n};n.generateSeqHelper=function(t,s,a){if(t===Ice.ByteHelper)return r;var c=new i;return s?1===t.minWireSize?n.VSizeContainer1OptHelper.call(c):n.VSizeContainerOptHelper.call(c,t.minWireSize):n.FSizeOptHelper.call(c),e(c,"elementHelper",{get:function(){return t}}),t==Ice.ObjectHelper&&(e(c,"elementType",{get:function(){return a}}),c.read=o),c};var s=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"write",value:function(e,t){if(null===t||0===t.size)e.writeSize(0);else{var n=this.keyHelper,i=this.valueHelper;e.writeSize(t.size);var r=!0,o=!1,s=void 0;try{for(var a,c=t[Symbol.iterator]();!(r=(a=c.next()).done);r=!0){var u=_slicedToArray(a.value,2),l=u[0],h=u[1];n.write(e,l),i.write(e,h)}}catch(e){o=!0,s=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw s}}}}},{key:"read",value:function(e){for(var t=new(0,this.mapType),n=e.readSize(),i=this.keyHelper,r=this.valueHelper,o=0;o<n;++o)t.set(i.read(e),r.read(e));return t}},{key:"size",value:function(e){return null==e?0:e.size}},{key:"minWireSize",get:function(){return 1}}]),e}(),a=function(e){for(var t=e.readSize(),n=new(0,this.mapType),i=this.valueType,r=function(t){e.readValue(function(e){return n.set(t,e)},i)},o=this.keyHelper,s=0;s<t;++s)r(o.read(e));return n};n.generateDictHelper=function(t,i,r,o,c){var u=new s;return r?n.VSizeContainerOptHelper.call(u,t.minWireSize+i.minWireSize):n.FSizeOptHelper.call(u),e(u,"mapType",{get:function(){return c}}),e(u,"keyHelper",{get:function(){return t}}),e(u,"valueHelper",{get:function(){return i}}),i==Ice.ObjectHelper&&(e(u,"valueType",{get:function(){return o}}),u.read=a),u},Ice.StreamHelpers=n}(),i=Ice.ReferenceMode,r=function(){function e(t,n){_classCallCheck(this,e),this._reference=t,this._response=t.getMode()==i.ModeTwoway,this._connection=n}return _createClass(e,[{key:"update",value:function(e,t){try{if(e===this)return t;if(e.getConnection()===this._connection)return t}catch(e){}return this}},{key:"sendAsyncRequest",value:function(e){return e.invokeRemote(this._connection,this._response)}},{key:"asyncRequestCanceled",value:function(e){return this._connection.asyncRequestCanceled(e)}},{key:"getReference",value:function(){return this._reference}},{key:"getConnection",value:function(){return this._connection}}]),e}(),Ice.ConnectionRequestHandler=r,Ice.Object=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"ice_isA",value:function(e,t){return this._iceMostDerivedType()._iceIds.indexOf(e)>=0}},{key:"ice_ping",value:function(e){}},{key:"ice_ids",value:function(e){return this._iceMostDerivedType()._iceIds}},{key:"ice_id",value:function(e){return this._iceMostDerivedType()._iceId}},{key:"toString",value:function(){return"[object "+this.ice_id()+"]"}},{key:"_iceMostDerivedType",value:function(){return Ice.Object}},{key:"equals",value:function(e){return this===e}}],[{key:"_iceImplements",get:function(){return[]}}]),e}(),function(){Ice.generateUUID=function(){var e=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var n=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"==t?n:3&n|8).toString(16)})}}(),o=Ice.StringUtil,s=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"addBoolean",value:function(e,t){return(e<<5)+e^(t?0:1)}},{key:"addString",value:function(e,t){return null!=t&&(e=(e<<5)+e^o.hashCode(t)),e}},{key:"addNumber",value:function(e,t){return(e<<5)+e^t}},{key:"addHashable",value:function(e,t){return null!=t&&(e=(e<<5)+e^t.hashCode()),e}},{key:"addArray",value:function(e,t,n){if(null!=t)for(var i=0;i<t.length;++i)e=n(e,t[i]);return e}}]),e}(),Ice.HashUtil=s,function(){var e=Ice._ModuleRegistry,t=Ice.StringUtil;function n(e,t,n,i,r){for(var o=e._table[r];null!==o;o=o._nextInBucket)if(o._hash===i&&e.keysEqual(t,o._key))return void(o._value=n);e.add(t,n,i,r)}function i(e,t){return e===t}var r=function(){function e(t,n){var r,o,s;if(_classCallCheck(this,e),"function"==typeof t?(o=t,s=n):t instanceof e&&(o=(r=t).keyComparator,s=r.valueComparator),this._size=0,this._head=null,this._initialCapacity=32,this._loadFactor=.75,this._table=[],this._keyComparator="function"==typeof o?o:i,this._valueComparator="function"==typeof s?s:i,r instanceof e&&r._size>0){this._threshold=r._threshold,this._table.length=r._table.length;for(var a=0;a<r._table.length;a++)this._table[a]=null;this.merge(r)}else{this._threshold=this._initialCapacity*this._loadFactor;for(var c=0;c<this._initialCapacity;c++)this._table[c]=null}}return _createClass(e,[{key:"set",value:function(e,t){var i=this.computeHash(e),r=this.hashIndex(i.hash,this._table.length);return n(this,i.key,t,i.hash,r)}},{key:"get",value:function(e){var t=this.computeHash(e),n=this.findEntry(t.key,t.hash);return void 0!==n?n._value:void 0}},{key:"has",value:function(e){var t=this.computeHash(e);return void 0!==this.findEntry(t.key,t.hash)}},{key:"delete",value:function(e){for(var t=this.computeHash(e),n=this.hashIndex(t.hash,this._table.length),i=null,r=this._table[n];null!==r;r=r._nextInBucket){if(r._hash===t.hash&&this.keysEqual(t.key,r._key))return this._size--,null!==i?i._nextInBucket=r._nextInBucket:this._table[n]=r._nextInBucket,null!==r._prev&&(r._prev._next=r._next),null!==r._next&&(r._next._prev=r._prev),this._head===r&&(this._head=r._next),r._value;i=r}}},{key:"clear",value:function(){for(var e=0;e<this._table.length;++e)this._table[e]=null;this._head=null,this._size=0}},{key:"forEach",value:function(e,t){t=void 0===t?e:t;for(var n=this._head;null!==n;n=n._next)e.call(t,n._value,n._key)}},{key:"entries",value:regeneratorRuntime.mark(function e(){var t;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t=this._head;case 1:if(null===t){e.next=7;break}return e.next=4,[t._key,t._value];case 4:t=t._next,e.next=1;break;case 7:case"end":return e.stop()}},e,this)})},{key:"keys",value:regeneratorRuntime.mark(function e(){var t;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t=this._head;case 1:if(null===t){e.next=7;break}return e.next=4,t._key;case 4:t=t._next,e.next=1;break;case 7:case"end":return e.stop()}},e,this)})},{key:"values",value:regeneratorRuntime.mark(function e(){var t;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t=this._head;case 1:if(null===t){e.next=7;break}return e.next=4,t._value;case 4:t=t._next,e.next=1;break;case 7:case"end":return e.stop()}},e,this)})},{key:"equals",value:function(t,n){var i,r=this;if(null===t||!(t instanceof e)||this._size!==t._size)return!1;i=n||function(e,t){return r._valueComparator.call(r._valueComparator,e,t)};for(var o=this._head;null!==o;o=o._next){var s=t.findEntry(o._key,o._hash);if(void 0===s||!i(o._value,s._value))return!1}return!0}},{key:"merge",value:function(e){for(var t=e._head;null!==t;t=t._next)n(this,t._key,t._value,t._hash,this.hashIndex(t._hash,this._table.length))}},{key:"add",value:function(e,t,n,i){var r=Object.create(null,{key:{enumerable:!0,get:function(){return this._key}},value:{enumerable:!0,get:function(){return this._value}},next:{enumerable:!0,get:function(){return this._next}},_key:{enumerable:!1,writable:!0,value:e},_value:{enumerable:!1,writable:!0,value:t},_prev:{enumerable:!1,writable:!0,value:null},_next:{enumerable:!1,writable:!0,value:null},_nextInBucket:{enumerable:!1,writable:!0,value:null},_hash:{enumerable:!1,writable:!0,value:n}});r._nextInBucket=this._table[i],this._table[i]=r,r._next=this._head,null!==this._head&&(this._head._prev=r),this._head=r,this._size++,this._size>=this._threshold&&this.resize(2*this._table.length)}},{key:"resize",value:function(e){for(var t=new Array(e).fill(null),n=this._head;null!==n;n=n._next){var i=this.hashIndex(n._hash,e);n._nextInBucket=t[i],t[i]=n}this._table=t,this._threshold=e*this._loadFactor}},{key:"findEntry",value:function(e,t){for(var n=this.hashIndex(t,this._table.length),i=this._table[n];null!==i;i=i._nextInBucket)if(i._hash===t&&this.keysEqual(e,i._key))return i}},{key:"hashIndex",value:function(e,t){return e&t-1}},{key:"computeHash",value:function(n){if(0===n)return{key:0,hash:0};if(null===n){if(null===e._null){var i=Ice.generateUUID();e._null={key:i,hash:t.hashCode(i)}}return e._null}if(void 0===n)throw new RangeError("cannot compute hash for undefined value");if("function"==typeof n.hashCode)return{key:n,hash:n.hashCode()};var r=_typeof(n);if("string"===r||n instanceof String)return{key:n,hash:t.hashCode(n)};if("number"===r||n instanceof Number){if(isNaN(n)){if(null===e._nan){var o=Ice.generateUUID();e._nan={key:o,hash:t.hashCode(o)}}return e._nan}return{key:n,hash:n.toFixed(0)}}if("boolean"===r||n instanceof Boolean)return{key:n,hash:n?1:0};throw new RangeError("cannot compute hash for value of type "+r)}},{key:"keysEqual",value:function(e,t){return this._keyComparator.call(this._keyComparator,e,t)}},{key:"size",get:function(){return this._size}}]),e}();r.prototype[Symbol.iterator]=r.prototype.entries,Ice.HashMap=r,r.compareEquals=function(e,t){return e===t||null!=e&&null!=t&&e.equals(t)},r.compareIdentity=i,r._null=null,r._nan=null,Ice.Slice.defineDictionary=function(t,n,i,o,s,a,c,u){t[n]=void 0===c?Map:function(e){return new r(e||c)};var l=null;Object.defineProperty(t,i,{get:function(){return null===l&&(l=Ice.StreamHelpers.generateDictHelper(e.type(o),e.type(s),a,e.type(u),t[n])),l}})}}(),function(){Ice.Value=function(){function n(){_classCallCheck(this,n)}return _createClass(n,[{key:"ice_preMarshal",value:function(){}},{key:"ice_postUnmarshal",value:function(){}},{key:"ice_getSlicedData",value:function(){return null}},{key:"_iceWrite",value:function(t){t.startValue(null),e(this,t,this._iceMostDerivedType()),t.endValue()}},{key:"_iceRead",value:function(e){e.startValue(),t(this,e,this._iceMostDerivedType()),e.endValue(!1)}}],[{key:"write",value:function(e,t){e.writeValue(t)}},{key:"writeOptional",value:function(e,t,n){e.writeOptionalValue(t,n)}},{key:"read",value:function(e){var t={value:null};return e.readValue(function(e){t.value=e},this),t}},{key:"readOptional",value:function(e,t){var n={value:void 0};return e.readOptionalValue(t,function(e){n.value=e},this),n}}]),n}(),Ice.InterfaceByValue=function(e){function t(e){var n;return _classCallCheck(this,t),(n=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this)))._id=e,n}return _inherits(t,Ice.Value),_createClass(t,[{key:"ice_id",value:function(){return this._id}},{key:"_iceWrite",value:function(e){e.startValue(null),e.startSlice(this.ice_id(),-1,!0),e.endSlice(),e.endValue()}},{key:"_iceRead",value:function(e){e.startValue(),e.startSlice(),e.endSlice(),e.endValue(!1)}}]),t}();var e=function e(t,n,i){void 0!==i&&i!==Ice.Value&&(n.startSlice(i.ice_staticId(),Object.prototype.hasOwnProperty.call(i,"_iceCompactId")?i._iceCompactId:-1,Object.getPrototypeOf(i)===Ice.Value),i.prototype.hasOwnProperty("_iceWriteMemberImpl")&&i.prototype._iceWriteMemberImpl.call(t,n),n.endSlice(),e(t,n,Object.getPrototypeOf(i)))},t=function e(t,n,i){void 0!==i&&i!==Ice.Value&&(n.startSlice(),i.prototype.hasOwnProperty("_iceReadMemberImpl")&&i.prototype._iceReadMemberImpl.call(t,n),n.endSlice(),e(t,n,Object.getPrototypeOf(i)))};function n(t){t.startValue(this._iceSlicedData),e(this,t,this._iceMostDerivedType()),t.endValue()}function i(e){e.startValue(),t(this,e,this._iceMostDerivedType()),this._iceSlicedData=e.endValue(!0)}function r(){return this._iceSlicedData}var o=Ice.Slice;o.defineValue=function(e,t,o){var s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;e.prototype.ice_id=function(){return t},e.prototype._iceMostDerivedType=function(){return e},e.ice_staticId=function(){return t},o&&(e.prototype.ice_getSlicedData=r,e.prototype._iceWrite=n,e.prototype._iceRead=i),s>0&&Ice.CompactIdRegistry.set(s,t)},o.defineValue(Ice.Value,"::Ice::Object")}(),function(){var e=Ice.ArrayUtil,t=e.eq;function n(e){if(this===e)return!0;if(null==e)return!1;if(this.prototype!==e.prototype)return!1;for(var n in this){var i=this[n],r=e[n];if("function"!=typeof i&&!t(i,r))return!1}return!0}function i(){var t=new this.constructor;for(var n in this){var i=this[n];if(null==i)t[n]=i;else{if("function"==typeof i)continue;"function"==typeof i.clone?t[n]=i.clone():i instanceof Array?t[n]=e.clone(i):t[n]=i}}return t}function r(e,t){if("function"==typeof t.hashCode)return Ice.HashUtil.addHashable(e,t);if(t instanceof Array)return Ice.HashUtil.addArray(e,t,r);var n=_typeof(t);return t instanceof String||"string"==n?Ice.HashUtil.addString(e,t):t instanceof Number||"number"==n?Ice.HashUtil.addNumber(e,t):t instanceof Boolean||"boolean"==n?Ice.HashUtil.addBoolean(e,t):void 0}function o(){var e=5381;for(var t in this){var n=this[t];null!=n&&"function"!=typeof n&&(e=r(e,n))}return e}Ice.Slice.defineStruct=function(e,t,r){return e.prototype.clone=i,e.prototype.equals=n,t&&(e.prototype.hashCode=o),e.prototype._write&&e.prototype._read&&(e.write=function(t,n){n||(e.prototype._nullMarshalValue||(e.prototype._nullMarshalValue=new this),n=e.prototype._nullMarshalValue),n._write(t)},e.read=function(e,t){return t&&t instanceof this||(t=new this),t._read(e),t},r?Ice.StreamHelpers.FSizeOptHelper.call(e):Ice.StreamHelpers.VSizeOptHelper.call(e)),e}}(),function(){var e="A".charCodeAt(0),t="a".charCodeAt(0),n="0".charCodeAt(0);function i(i){return i<26?String.fromCharCode(e+i):i<52?String.fromCharCode(t+(i-26)):i<62?String.fromCharCode(n+(i-52)):62==i?"+":"/"}function r(i){return i>="A"&&i<="Z"?i.charCodeAt(0)-e:i>="a"&&i<="z"?i.charCodeAt(0)-t+26:i>="0"&&i<="9"?i.charCodeAt(0)-n+52:"+"==i?62:63}var o=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"encode",value:function(e){if(null===e||0===e.length)return"";for(var t,n,r,o,s,a,c,u=[],l=0;l<e.length;l+=3)t=255&e[l],n=0,r=0,l+1<e.length&&(n=255&e[l+1]),l+2<e.length&&(r=255&e[l+2]),o=t>>2&255,s=255&((3&t)<<4|n>>4),a=255&((15&n)<<2|r>>6),c=63&r,u.push(i(o)),u.push(i(s)),l+1<e.length?u.push(i(a)):u.push("="),l+2<e.length?u.push(i(c)):u.push("=");for(var h=u.join(""),_=[],d=0;h.length-d>76;)_.push(h.substring(d,d+76)),_.push("\r\n"),d+=76;return _.push(h.substring(d)),_.join("")}},{key:"decode",value:function(t){for(var n=[],i=0;i<t.length;i++){var o=t.charAt(i);e.isBase64(o)&&n.push(o)}if(0===n.length)return null;var s,a,c,u,l,h,_,d,p=3*n.length/4+1,f=new Ice.Buffer;f.resize(p);for(var y=0;y<n.length;y+=4)"A",h="A",_="A",d="A",l=n[y],y+1<n.length&&(h=n[y+1]),y+2<n.length&&(_=n[y+2]),y+3<n.length&&(d=n[y+3]),s=255&r(l),a=255&r(h),c=255&r(_),u=255&r(d),f.put(s<<2|a>>4),"="!=_&&f.put((15&a)<<4|c>>2),"="!=d&&f.put((3&c)<<6|u);return f.remaining>0?f.getArrayAt(0,f.position):f.getArrayAt(0)}},{key:"isBase64",value:function(e){return e>="A"&&e<="Z"||(e>="a"&&e<="z"||(e>="0"&&e<="9"||("+"==e||("/"==e||"="==e))))}}]),e}();Ice.Base64=o}(),N.defineSequence(Ice,"BoolSeqHelper","Ice.BoolHelper",!0),N.defineSequence(Ice,"ByteSeqHelper","Ice.ByteHelper",!0),N.defineSequence(Ice,"ShortSeqHelper","Ice.ShortHelper",!0),N.defineSequence(Ice,"IntSeqHelper","Ice.IntHelper",!0),N.defineSequence(Ice,"LongSeqHelper","Ice.LongHelper",!0),N.defineSequence(Ice,"FloatSeqHelper","Ice.FloatHelper",!0),N.defineSequence(Ice,"DoubleSeqHelper","Ice.DoubleHelper",!0),N.defineSequence(Ice,"StringSeqHelper","Ice.StringHelper",!1),N.defineSequence(Ice,"ObjectSeqHelper","Ice.ObjectHelper",!1,"Ice.Value"),N.defineSequence(Ice,"ObjectProxySeqHelper","Ice.ObjectPrx",!1),Ice.Identity=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";_classCallCheck(this,e),this.name=t,this.category=n}return _createClass(e,[{key:"_write",value:function(e){e.writeString(this.name),e.writeString(this.category)}},{key:"_read",value:function(e){this.name=e.readString(),this.category=e.readString()}}],[{key:"minWireSize",get:function(){return 2}}]),e}(),N.defineStruct(Ice.Identity,!0,!0),N.defineDictionary(Ice,"ObjectDict","ObjectDictHelper","Ice.Identity","Ice.ObjectHelper",!1,Ice.HashMap.compareEquals,"Ice.Value"),N.defineSequence(Ice,"IdentitySeqHelper","Ice.Identity",!1),Ice.ProtocolVersion=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;_classCallCheck(this,e),this.major=t,this.minor=n}return _createClass(e,[{key:"_write",value:function(e){e.writeByte(this.major),e.writeByte(this.minor)}},{key:"_read",value:function(e){this.major=e.readByte(),this.minor=e.readByte()}}],[{key:"minWireSize",get:function(){return 2}}]),e}(),N.defineStruct(Ice.ProtocolVersion,!0,!1),Ice.EncodingVersion=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;_classCallCheck(this,e),this.major=t,this.minor=n}return _createClass(e,[{key:"_write",value:function(e){e.writeByte(this.major),e.writeByte(this.minor)}},{key:"_read",value:function(e){this.major=e.readByte(),this.minor=e.readByte()}}],[{key:"minWireSize",get:function(){return 2}}]),e}(),N.defineStruct(Ice.EncodingVersion,!0,!1),function(){function e(){return-1!==navigator.userAgent.indexOf("MSIE")||navigator.userAgent.match(/Trident.*rv:11\./)}var t=Number.MAX_SAFE_INTEGER||9007199254740991,n=0,i=function(){return n==t&&(n=0),n++},r=new Map;function o(){var t=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"setTimeout",value:function(e){function t(t,n){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(e,t){return setTimeout(e,t)})},{key:"clearTimeout",value:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(e){return clearTimeout(e)})},{key:"setInterval",value:function(e){function t(t,n){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(e,t){return setInterval(e,t)})},{key:"clearInterval",value:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(e){return clearInterval(e)})}]),e}();if(/Edge/.test(navigator.userAgent)||e())t.setImmediate=function(e){setImmediate(e)};else{var n=new MessageChannel;n.port1.onmessage=function(e){var t=e.data,n=r.get(t);void 0!==n&&(n.call(),r.delete(t))},t.setImmediate=function(e){var t=i();r.set(t,e),n.port2.postMessage(t)}}return t}var s,a=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"setTimeout",value:function(e,t){var n=i();return r.set(n,e),s.postMessage({type:0,id:n,ms:t}),n}},{key:"clearTimeout",value:function(e){r.delete(e),s.postMessage({type:3,id:e})}},{key:"setInterval",value:function(e,t){var n=i();return r.set(n,e),s.postMessage({type:1,id:n,ms:t}),n}},{key:"clearInterval",value:function(e){r.delete(e),s.postMessage({type:4,id:e})}},{key:"setImmediate",value:function(e){var t=i();return r.set(t,e),s.postMessage({type:2,id:t}),t}},{key:"onmessage",value:function(e){var t=r.get(e.data.id);void 0!==t&&(t.call(),1!==e.data.type&&r.delete(e.data.id))}}]),e}();if(e())Ice.Timer=o();else if("undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope)Ice.Timer=o();else if(void 0===s){var c=URL.createObjectURL(new Blob(["("+function(){var e={};self.onmessage=function(t){0==t.data.type?e[t.data.id]=setTimeout(function(){return self.postMessage(t.data)},t.data.ms):1==t.data.type?e[t.data.id]=setInterval(function(){return self.postMessage(t.data)},t.data.ms):2==t.data.type?self.postMessage(t.data):3==t.data.type?(clearTimeout(e[t.data.id]),delete e[t.data.id]):4==t.data.type&&(clearInterval(e[t.data.id]),delete e[t.data.id])}}.toString()+"());"],{type:"text/javascript"}));(s=new Worker(c)).onmessage=a.onmessage,Ice.Timer=a}}(),Ice.InitializationException=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return _classCallCheck(this,t),(e=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,i))).reason=n,e}return _inherits(t,Ice.LocalException),_createClass(t,null,[{key:"_parent",get:function(){return Ice.LocalException}},{key:"_id",get:function(){return"::Ice::InitializationException"}}]),t}(),Ice.PluginInitializationException=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return _classCallCheck(this,t),(e=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,i))).reason=n,e}return _inherits(t,Ice.LocalException),_createClass(t,null,[{key:"_parent",get:function(){return Ice.LocalException}},{key:"_id",get:function(){return"::Ice::PluginInitializationException"}}]),t}(),Ice.CollocationOptimizationException=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e))}return _inherits(t,Ice.LocalException),_createClass(t,null,[{key:"_parent",get:function(){return Ice.LocalException}},{key:"_id",get:function(){return"::Ice::CollocationOptimizationException"}}]),t}(),Ice.AlreadyRegisteredException=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return _classCallCheck(this,t),(e=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,r))).kindOfObject=n,e.id=i,e}return _inherits(t,Ice.LocalException),_createClass(t,null,[{key:"_parent",get:function(){return Ice.LocalException}},{key:"_id",get:function(){return"::Ice::AlreadyRegisteredException"}}]),t}(),Ice.NotRegisteredException=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return _classCallCheck(this,t),(e=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,r))).kindOfObject=n,e.id=i,e}return _inherits(t,Ice.LocalException),_createClass(t,null,[{key:"_parent",get:function(){return Ice.LocalException}},{key:"_id",get:function(){return"::Ice::NotRegisteredException"}}]),t}(),Ice.TwowayOnlyException=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return _classCallCheck(this,t),(e=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,i))).operation=n,e}return _inherits(t,Ice.LocalException),_createClass(t,null,[{key:"_parent",get:function(){return Ice.LocalException}},{key:"_id",get:function(){return"::Ice::TwowayOnlyException"}}]),t}(),Ice.CloneNotImplementedException=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e))}return _inherits(t,Ice.LocalException),_createClass(t,null,[{key:"_parent",get:function(){return Ice.LocalException}},{key:"_id",get:function(){return"::Ice::CloneNotImplementedException"}}]),t}(),Ice.UnknownException=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return _classCallCheck(this,t),(e=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,i))).unknown=n,e}return _inherits(t,Ice.LocalException),_createClass(t,null,[{key:"_parent",get:function(){return Ice.LocalException}},{key:"_id",get:function(){return"::Ice::UnknownException"}}]),t}(),Ice.UnknownLocalException=function(e){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e,n))}return _inherits(t,Ice.UnknownException),_createClass(t,null,[{key:"_parent",get:function(){return Ice.UnknownException}},{key:"_id",get:function(){return"::Ice::UnknownLocalException"}}]),t}(),Ice.UnknownUserException=function(e){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e,n))}return _inherits(t,Ice.UnknownException),_createClass(t,null,[{key:"_parent",get:function(){return Ice.UnknownException}},{key:"_id",get:function(){return"::Ice::UnknownUserException"}}]),t}(),Ice.VersionMismatchException=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e))}return _inherits(t,Ice.LocalException),_createClass(t,null,[{key:"_parent",get:function(){return Ice.LocalException}},{key:"_id",get:function(){return"::Ice::VersionMismatchException"}}]),t}(),Ice.CommunicatorDestroyedException=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e))}return _inherits(t,Ice.LocalException),_createClass(t,null,[{key:"_parent",get:function(){return Ice.LocalException}},{key:"_id",get:function(){return"::Ice::CommunicatorDestroyedException"}}]),t}(),Ice.ObjectAdapterDeactivatedException=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return _classCallCheck(this,t),(e=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,i))).name=n,e}return _inherits(t,Ice.LocalException),_createClass(t,null,[{key:"_parent",get:function(){return Ice.LocalException}},{key:"_id",get:function(){return"::Ice::ObjectAdapterDeactivatedException"}}]),t}(),Ice.ObjectAdapterIdInUseException=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return _classCallCheck(this,t),(e=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,i))).id=n,e}return _inherits(t,Ice.LocalException),_createClass(t,null,[{key:"_parent",get:function(){return Ice.LocalException}},{key:"_id",get:function(){return"::Ice::ObjectAdapterIdInUseException"}}]),t}(),Ice.NoEndpointException=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return _classCallCheck(this,t),(e=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,i))).proxy=n,e}return _inherits(t,Ice.LocalException),_createClass(t,null,[{key:"_parent",get:function(){return Ice.LocalException}},{key:"_id",get:function(){return"::Ice::NoEndpointException"}}]),t}(),Ice.EndpointParseException=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return _classCallCheck(this,t),(e=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,i))).str=n,e}return _inherits(t,Ice.LocalException),_createClass(t,null,[{key:"_parent",get:function(){return Ice.LocalException}},{key:"_id",get:function(){return"::Ice::EndpointParseException"}}]),t}(),Ice.EndpointSelectionTypeParseException=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return _classCallCheck(this,t),(e=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,i))).str=n,e}return _inherits(t,Ice.LocalException),_createClass(t,null,[{key:"_parent",get:function(){return Ice.LocalException}},{key:"_id",get:function(){return"::Ice::EndpointSelectionTypeParseException"}}]),t}(),Ice.VersionParseException=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return _classCallCheck(this,t),(e=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,i))).str=n,e}return _inherits(t,Ice.LocalException),_createClass(t,null,[{key:"_parent",get:function(){return Ice.LocalException}},{key:"_id",get:function(){return"::Ice::VersionParseException"}}]),t}(),Ice.IdentityParseException=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return _classCallCheck(this,t),(e=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,i))).str=n,e}return _inherits(t,Ice.LocalException),_createClass(t,null,[{key:"_parent",get:function(){return Ice.LocalException}},{key:"_id",get:function(){return"::Ice::IdentityParseException"}}]),t}(),Ice.ProxyParseException=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return _classCallCheck(this,t),(e=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,i))).str=n,e}return _inherits(t,Ice.LocalException),_createClass(t,null,[{key:"_parent",get:function(){return Ice.LocalException}},{key:"_id",get:function(){return"::Ice::ProxyParseException"}}]),t}(),Ice.IllegalIdentityException=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Ice.Identity,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return _classCallCheck(this,t),(e=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,i))).id=n,e}return _inherits(t,Ice.LocalException),_createClass(t,null,[{key:"_parent",get:function(){return Ice.LocalException}},{key:"_id",get:function(){return"::Ice::IllegalIdentityException"}}]),t}(),Ice.IllegalServantException=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return _classCallCheck(this,t),(e=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,i))).reason=n,e}return _inherits(t,Ice.LocalException),_createClass(t,null,[{key:"_parent",get:function(){return Ice.LocalException}},{key:"_id",get:function(){return"::Ice::IllegalServantException"}}]),t}(),Ice.RequestFailedException=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Ice.Identity,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";return _classCallCheck(this,t),(e=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,o))).id=n,e.facet=i,e.operation=r,e}return _inherits(t,Ice.LocalException),_createClass(t,null,[{key:"_parent",get:function(){return Ice.LocalException}},{key:"_id",get:function(){return"::Ice::RequestFailedException"}}]),t}(),Ice.ObjectNotExistException=function(e){function t(e,n,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e,n,i,r))}return _inherits(t,Ice.RequestFailedException),_createClass(t,null,[{key:"_parent",get:function(){return Ice.RequestFailedException}},{key:"_id",get:function(){return"::Ice::ObjectNotExistException"}}]),t}(),Ice.FacetNotExistException=function(e){function t(e,n,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e,n,i,r))}return _inherits(t,Ice.RequestFailedException),_createClass(t,null,[{key:"_parent",get:function(){return Ice.RequestFailedException}},{key:"_id",get:function(){return"::Ice::FacetNotExistException"}}]),t}(),Ice.OperationNotExistException=function(e){function t(e,n,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e,n,i,r))}return _inherits(t,Ice.RequestFailedException),_createClass(t,null,[{key:"_parent",get:function(){return Ice.RequestFailedException}},{key:"_id",get:function(){return"::Ice::OperationNotExistException"}}]),t}(),Ice.SyscallException=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return _classCallCheck(this,t),(e=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,i))).error=n,e}return _inherits(t,Ice.LocalException),_createClass(t,null,[{key:"_parent",get:function(){return Ice.LocalException}},{key:"_id",get:function(){return"::Ice::SyscallException"}}]),t}(),Ice.SocketException=function(e){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e,n))}return _inherits(t,Ice.SyscallException),_createClass(t,null,[{key:"_parent",get:function(){return Ice.SyscallException}},{key:"_id",get:function(){return"::Ice::SocketException"}}]),t}(),Ice.CFNetworkException=function(e){function t(e){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return _classCallCheck(this,t),(n=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e,r))).domain=i,n}return _inherits(t,Ice.SocketException),_createClass(t,null,[{key:"_parent",get:function(){return Ice.SocketException}},{key:"_id",get:function(){return"::Ice::CFNetworkException"}}]),t}(),Ice.FileException=function(e){function t(e){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return _classCallCheck(this,t),(n=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e,r))).path=i,n}return _inherits(t,Ice.SyscallException),_createClass(t,null,[{key:"_parent",get:function(){return Ice.SyscallException}},{key:"_id",get:function(){return"::Ice::FileException"}}]),t}(),Ice.ConnectFailedException=function(e){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e,n))}return _inherits(t,Ice.SocketException),_createClass(t,null,[{key:"_parent",get:function(){return Ice.SocketException}},{key:"_id",get:function(){return"::Ice::ConnectFailedException"}}]),t}(),Ice.ConnectionRefusedException=function(e){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e,n))}return _inherits(t,Ice.ConnectFailedException),_createClass(t,null,[{key:"_parent",get:function(){return Ice.ConnectFailedException}},{key:"_id",get:function(){return"::Ice::ConnectionRefusedException"}}]),t}(),Ice.ConnectionLostException=function(e){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e,n))}return _inherits(t,Ice.SocketException),_createClass(t,null,[{key:"_parent",get:function(){return Ice.SocketException}},{key:"_id",get:function(){return"::Ice::ConnectionLostException"}}]),t}(),Ice.DNSException=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return _classCallCheck(this,t),(e=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,r))).error=n,e.host=i,e}return _inherits(t,Ice.LocalException),_createClass(t,null,[{key:"_parent",get:function(){return Ice.LocalException}},{key:"_id",get:function(){return"::Ice::DNSException"}}]),t}(),Ice.OperationInterruptedException=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e))}return _inherits(t,Ice.LocalException),_createClass(t,null,[{key:"_parent",get:function(){return Ice.LocalException}},{key:"_id",get:function(){return"::Ice::OperationInterruptedException"}}]),t}(),Ice.TimeoutException=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e))}return _inherits(t,Ice.LocalException),_createClass(t,null,[{key:"_parent",get:function(){return Ice.LocalException}},{key:"_id",get:function(){return"::Ice::TimeoutException"}}]),t}(),Ice.ConnectTimeoutException=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e))}return _inherits(t,Ice.TimeoutException),_createClass(t,null,[{key:"_parent",get:function(){return Ice.TimeoutException}},{key:"_id",get:function(){return"::Ice::ConnectTimeoutException"}}]),t}(),Ice.CloseTimeoutException=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e))}return _inherits(t,Ice.TimeoutException),_createClass(t,null,[{key:"_parent",get:function(){return Ice.TimeoutException}},{key:"_id",get:function(){return"::Ice::CloseTimeoutException"}}]),t}(),Ice.ConnectionTimeoutException=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e))}return _inherits(t,Ice.TimeoutException),_createClass(t,null,[{key:"_parent",get:function(){return Ice.TimeoutException}},{key:"_id",get:function(){return"::Ice::ConnectionTimeoutException"}}]),t}(),Ice.InvocationTimeoutException=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e))}return _inherits(t,Ice.TimeoutException),_createClass(t,null,[{key:"_parent",get:function(){return Ice.TimeoutException}},{key:"_id",get:function(){return"::Ice::InvocationTimeoutException"}}]),t}(),Ice.InvocationCanceledException=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e))}return _inherits(t,Ice.LocalException),_createClass(t,null,[{key:"_parent",get:function(){return Ice.LocalException}},{key:"_id",get:function(){return"::Ice::InvocationCanceledException"}}]),t}(),Ice.ProtocolException=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return _classCallCheck(this,t),(e=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,i))).reason=n,e}return _inherits(t,Ice.LocalException),_createClass(t,null,[{key:"_parent",get:function(){return Ice.LocalException}},{key:"_id",get:function(){return"::Ice::ProtocolException"}}]),t}(),Ice.BadMagicException=function(e){function t(e){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return _classCallCheck(this,t),(n=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e,r))).badMagic=i,n}return _inherits(t,Ice.ProtocolException),_createClass(t,null,[{key:"_parent",get:function(){return Ice.ProtocolException}},{key:"_id",get:function(){return"::Ice::BadMagicException"}}]),t}(),Ice.UnsupportedProtocolException=function(e){function t(e){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Ice.ProtocolVersion,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Ice.ProtocolVersion,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";return _classCallCheck(this,t),(n=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e,o))).bad=i,n.supported=r,n}return _inherits(t,Ice.ProtocolException),_createClass(t,null,[{key:"_parent",get:function(){return Ice.ProtocolException}},{key:"_id",get:function(){return"::Ice::UnsupportedProtocolException"}}]),t}(),Ice.UnsupportedEncodingException=function(e){function t(e){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Ice.EncodingVersion,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Ice.EncodingVersion,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";return _classCallCheck(this,t),(n=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e,o))).bad=i,n.supported=r,n}return _inherits(t,Ice.ProtocolException),_createClass(t,null,[{key:"_parent",get:function(){return Ice.ProtocolException}},{key:"_id",get:function(){return"::Ice::UnsupportedEncodingException"}}]),t}(),Ice.UnknownMessageException=function(e){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e,n))}return _inherits(t,Ice.ProtocolException),_createClass(t,null,[{key:"_parent",get:function(){return Ice.ProtocolException}},{key:"_id",get:function(){return"::Ice::UnknownMessageException"}}]),t}(),Ice.ConnectionNotValidatedException=function(e){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e,n))}return _inherits(t,Ice.ProtocolException),_createClass(t,null,[{key:"_parent",get:function(){return Ice.ProtocolException}},{key:"_id",get:function(){return"::Ice::ConnectionNotValidatedException"}}]),t}(),Ice.UnknownRequestIdException=function(e){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e,n))}return _inherits(t,Ice.ProtocolException),_createClass(t,null,[{key:"_parent",get:function(){return Ice.ProtocolException}},{key:"_id",get:function(){return"::Ice::UnknownRequestIdException"}}]),t}(),Ice.UnknownReplyStatusException=function(e){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e,n))}return _inherits(t,Ice.ProtocolException),_createClass(t,null,[{key:"_parent",get:function(){return Ice.ProtocolException}},{key:"_id",get:function(){return"::Ice::UnknownReplyStatusException"}}]),t}(),Ice.CloseConnectionException=function(e){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e,n))}return _inherits(t,Ice.ProtocolException),_createClass(t,null,[{key:"_parent",get:function(){return Ice.ProtocolException}},{key:"_id",get:function(){return"::Ice::CloseConnectionException"}}]),t}(),Ice.ConnectionManuallyClosedException=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return _classCallCheck(this,t),(e=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,i))).graceful=n,e}return _inherits(t,Ice.LocalException),_createClass(t,null,[{key:"_parent",get:function(){return Ice.LocalException}},{key:"_id",get:function(){return"::Ice::ConnectionManuallyClosedException"}}]),t}(),Ice.IllegalMessageSizeException=function(e){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e,n))}return _inherits(t,Ice.ProtocolException),_createClass(t,null,[{key:"_parent",get:function(){return Ice.ProtocolException}},{key:"_id",get:function(){return"::Ice::IllegalMessageSizeException"}}]),t}(),Ice.CompressionException=function(e){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e,n))}return _inherits(t,Ice.ProtocolException),_createClass(t,null,[{key:"_parent",get:function(){return Ice.ProtocolException}},{key:"_id",get:function(){return"::Ice::CompressionException"}}]),t}(),Ice.DatagramLimitException=function(e){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e,n))}return _inherits(t,Ice.ProtocolException),_createClass(t,null,[{key:"_parent",get:function(){return Ice.ProtocolException}},{key:"_id",get:function(){return"::Ice::DatagramLimitException"}}]),t}(),Ice.MarshalException=function(e){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e,n))}return _inherits(t,Ice.ProtocolException),_createClass(t,null,[{key:"_parent",get:function(){return Ice.ProtocolException}},{key:"_id",get:function(){return"::Ice::MarshalException"}}]),t}(),Ice.ProxyUnmarshalException=function(e){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e,n))}return _inherits(t,Ice.MarshalException),_createClass(t,null,[{key:"_parent",get:function(){return Ice.MarshalException}},{key:"_id",get:function(){return"::Ice::ProxyUnmarshalException"}}]),t}(),Ice.UnmarshalOutOfBoundsException=function(e){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e,n))}return _inherits(t,Ice.MarshalException),_createClass(t,null,[{key:"_parent",get:function(){return Ice.MarshalException}},{key:"_id",get:function(){return"::Ice::UnmarshalOutOfBoundsException"}}]),t}(),Ice.NoValueFactoryException=function(e){function t(e){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return _classCallCheck(this,t),(n=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e,r))).type=i,n}return _inherits(t,Ice.MarshalException),_createClass(t,null,[{key:"_parent",get:function(){return Ice.MarshalException}},{key:"_id",get:function(){return"::Ice::NoValueFactoryException"}}]),t}(),Ice.UnexpectedObjectException=function(e){function t(e){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";return _classCallCheck(this,t),(n=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e,o))).type=i,n.expectedType=r,n}return _inherits(t,Ice.MarshalException),_createClass(t,null,[{key:"_parent",get:function(){return Ice.MarshalException}},{key:"_id",get:function(){return"::Ice::UnexpectedObjectException"}}]),t}(),Ice.MemoryLimitException=function(e){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e,n))}return _inherits(t,Ice.MarshalException),_createClass(t,null,[{key:"_parent",get:function(){return Ice.MarshalException}},{key:"_id",get:function(){return"::Ice::MemoryLimitException"}}]),t}(),Ice.StringConversionException=function(e){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e,n))}return _inherits(t,Ice.MarshalException),_createClass(t,null,[{key:"_parent",get:function(){return Ice.MarshalException}},{key:"_id",get:function(){return"::Ice::StringConversionException"}}]),t}(),Ice.EncapsulationException=function(e){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e,n))}return _inherits(t,Ice.MarshalException),_createClass(t,null,[{key:"_parent",get:function(){return Ice.MarshalException}},{key:"_id",get:function(){return"::Ice::EncapsulationException"}}]),t}(),Ice.FeatureNotSupportedException=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return _classCallCheck(this,t),(e=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,i))).unsupportedFeature=n,e}return _inherits(t,Ice.LocalException),_createClass(t,null,[{key:"_parent",get:function(){return Ice.LocalException}},{key:"_id",get:function(){return"::Ice::FeatureNotSupportedException"}}]),t}(),Ice.SecurityException=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return _classCallCheck(this,t),(e=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,i))).reason=n,e}return _inherits(t,Ice.LocalException),_createClass(t,null,[{key:"_parent",get:function(){return Ice.LocalException}},{key:"_id",get:function(){return"::Ice::SecurityException"}}]),t}(),Ice.FixedProxyException=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e))}return _inherits(t,Ice.LocalException),_createClass(t,null,[{key:"_parent",get:function(){return Ice.LocalException}},{key:"_id",get:function(){return"::Ice::FixedProxyException"}}]),t}(),Ice.ResponseSentException=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e))}return _inherits(t,Ice.LocalException),_createClass(t,null,[{key:"_parent",get:function(){return Ice.LocalException}},{key:"_id",get:function(){return"::Ice::ResponseSentException"}}]),t}(),a=Ice.CommunicatorDestroyedException,(c=function(){function e(t){_classCallCheck(this,e),this._logger=t,this._destroyed=!1,this._tokenId=0,this._tokens=new Map}return _createClass(e,[{key:"destroy",value:function(){var e=this;this._tokens.forEach(function(t,n){return e.cancel(n)}),this._destroyed=!0,this._tokens.clear()}},{key:"schedule",value:function(t,n){var i=this;if(this._destroyed)throw new a;var r=this._tokenId++,o=e.setTimeout(function(){return i.handleTimeout(r)},n);return this._tokens.set(r,{callback:t,id:o,isInterval:!1}),r}},{key:"scheduleRepeated",value:function(t,n){var i=this;if(this._destroyed)throw new a;var r=this._tokenId++,o=e.setInterval(function(){return i.handleInterval(r)},n);return this._tokens.set(r,{callback:t,id:o,isInterval:!0}),r}},{key:"cancel",value:function(t){if(this._destroyed)return!1;var n=this._tokens.get(t);return void 0!==n&&(this._tokens.delete(t),n.isInterval?e.clearInterval(n.id):e.clearTimeout(n.id),!0)}},{key:"handleTimeout",value:function(e){if(!this._destroyed){var t=this._tokens.get(e);if(void 0!==t){this._tokens.delete(e);try{t.callback()}catch(e){this._logger.warning("uncaught exception while executing timer:\n"+e)}}}}},{key:"handleInterval",value:function(e){if(!this._destroyed){var t=this._tokens.get(e);if(void 0!==t)try{t.callback()}catch(e){this._logger.warning("uncaught exception while executing timer:\n"+e)}}}}]),e}()).setTimeout=Ice.Timer.setTimeout,c.clearTimeout=Ice.Timer.clearTimeout,c.setInterval=Ice.Timer.setInterval,c.clearInterval=Ice.Timer.clearInterval,c.setImmediate=Ice.Timer.setImmediate,Ice.Timer=c,u=Ice.UnexpectedObjectException,l=Ice.MemoryLimitException,Ice.ExUtil={throwUOE:function(e,t){var n=t.ice_id();throw new u("expected element of type `"+e+"' but received `"+n+"'",n,e)},throwMemoryLimitException:function(e,t){throw new l("requested "+e+" bytes, maximum allowed is "+t+" bytes (see Ice.MessageSizeMax)")}},h=function(){function e(t){_classCallCheck(this,e),void 0!==t&&t.length>0?this._prefix=t+": ":this._prefix="",this._dateformat={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!1}}return _createClass(e,[{key:"print",value:function(e){this.write(e,!1)}},{key:"trace",value:function(e,t){var n=[];n.push("-- "),n.push(this.timestamp()),n.push(" "),n.push(this._prefix),n.push(e),n.push(": "),n.push(t),this.write(n.join(""),!0)}},{key:"warning",value:function(e){var t=[];t.push("-! "),t.push(this.timestamp()),t.push(" "),t.push(this._prefix),t.push("warning: "),t.push(e),this.write(t.join(""),!0)}},{key:"error",value:function(e){var t=[];t.push("!! "),t.push(this.timestamp()),t.push(" "),t.push(this._prefix),t.push("error: "),t.push(e),this.write(t.join(""),!0)}},{key:"cloneWithPrefix",value:function(t){return new e(t)}},{key:"write",value:function(e,t){t&&(e=e.replace(/\n/g,"\n ")),console.log(e)}},{key:"timestamp",value:function(){var e=new Date;return e.toLocaleString("en-US",this._dateformat)+"."+e.getMilliseconds()}}]),e}(),Ice.Logger=h,function(){Ice.SliceInfo=function e(){_classCallCheck(this,e),this.typeId="",this.compactId=-1,this.bytes=[],this.instances=[],this.hasOptionalMembers=!1,this.isLastSlice=!1};Ice.SlicedData=function e(t){_classCallCheck(this,e),this.slices=t};var e=function(e){function t(e){var n;return _classCallCheck(this,t),(n=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this)))._unknownTypeId=e,n}return _inherits(t,Ice.Value),_createClass(t,[{key:"ice_getSlicedData",value:function(){return this._slicedData}},{key:"ice_id",value:function(){return this._unknownTypeId}},{key:"_iceWrite",value:function(e){e.startValue(this._slicedData),e.endValue()}},{key:"_iceRead",value:function(e){e.startValue(),this._slicedData=e.endValue(!0)}}]),t}();Ice.UnknownSlicedValue=e}(),function(){var e=Ice.StringUtil,t={};function n(t){var n=t.indexOf(".");if(-1===n)throw new Ice.VersionParseException("malformed version value `"+t+"'");try{var i=e.toInt(t.substring(0,n));if(i<1||i>255)throw new Ice.VersionParseException("range error in version `"+t+"'");return i}catch(e){throw new Ice.VersionParseException("invalid version value `"+t+"'")}}function i(t){var n=t.indexOf(".");if(-1===n)throw new Ice.VersionParseException("malformed version value `"+t+"'");try{var i=e.toInt(t.substring(n+1));if(i<0||i>255)throw new Ice.VersionParseException("range error in version `"+t+"'");return i}catch(e){throw new Ice.VersionParseException("invalid version value `"+t+"'")}}function r(e,t){return e+"."+t}Ice.Encoding_1_0=new Ice.EncodingVersion(1,0),Ice.Encoding_1_1=new Ice.EncodingVersion(1,1),Ice.Protocol_1_0=new Ice.ProtocolVersion(1,0),t.headerSize=14,t.magic=new Uint8Array([73,99,101,80]),t.protocolMajor=1,t.protocolMinor=0,t.protocolEncodingMajor=1,t.protocolEncodingMinor=0,t.encodingMajor=1,t.encodingMinor=1,t.requestMsg=0,t.requestBatchMsg=1,t.replyMsg=2,t.validateConnectionMsg=3,t.closeConnectionMsg=4,t.replyOK=0,t.replyUserException=1,t.replyObjectNotExist=2,t.replyFacetNotExist=3,t.replyOperationNotExist=4,t.replyUnknownLocalException=5,t.replyUnknownUserException=6,t.replyUnknownException=7,t.requestHdr=new Uint8Array([t.magic[0],t.magic[1],t.magic[2],t.magic[3],t.protocolMajor,t.protocolMinor,t.protocolEncodingMajor,t.protocolEncodingMinor,t.requestMsg,0,0,0,0,0,0,0,0,0]),t.requestBatchHdr=new Uint8Array([t.magic[0],t.magic[1],t.magic[2],t.magic[3],t.protocolMajor,t.protocolMinor,t.protocolEncodingMajor,t.protocolEncodingMinor,t.requestBatchMsg,0,0,0,0,0,0,0,0,0]),t.replyHdr=new Uint8Array([t.magic[0],t.magic[1],t.magic[2],t.magic[3],t.protocolMajor,t.protocolMinor,t.protocolEncodingMajor,t.protocolEncodingMinor,t.replyMsg,0,0,0,0,0]),t.currentProtocol=new Ice.ProtocolVersion(t.protocolMajor,t.protocolMinor),t.currentProtocolEncoding=new Ice.EncodingVersion(t.protocolEncodingMajor,t.protocolEncodingMinor),t.currentEncoding=new Ice.EncodingVersion(t.encodingMajor,t.encodingMinor),t.checkSupportedProtocol=function(e){if(e.major!==t.currentProtocol.major||e.minor>t.currentProtocol.minor)throw new Ice.UnsupportedProtocolException("",e,t.currentProtocol)},t.checkSupportedProtocolEncoding=function(e){if(e.major!==t.currentProtocolEncoding.major||e.minor>t.currentProtocolEncoding.minor)throw new Ice.UnsupportedEncodingException("",e,t.currentProtocolEncoding)},t.checkSupportedEncoding=function(e){if(e.major!==t.currentEncoding.major||e.minor>t.currentEncoding.minor)throw new Ice.UnsupportedEncodingException("",e,t.currentEncoding)},t.getCompatibleProtocol=function(e){return e.major!==t.currentProtocol.major?e:e.minor<t.currentProtocol.minor?e:t.currentProtocol},t.getCompatibleEncoding=function(e){return e.major!==t.currentEncoding.major?e:e.minor<t.currentEncoding.minor?e:t.currentEncoding},t.isSupported=function(e,t){return e.major===t.major&&e.minor<=t.minor},Ice.stringToProtocolVersion=function(e){return new Ice.ProtocolVersion(n(e),i(e))},Ice.stringToEncodingVersion=function(e){return new Ice.EncodingVersion(n(e),i(e))},Ice.protocolVersionToString=function(e){return r(e.major,e.minor)},Ice.encodingVersionToString=function(e){return r(e.major,e.minor)},t.OPTIONAL_END_MARKER=255,t.FLAG_HAS_TYPE_ID_STRING=1,t.FLAG_HAS_TYPE_ID_INDEX=2,t.FLAG_HAS_TYPE_ID_COMPACT=3,t.FLAG_HAS_OPTIONAL_MEMBERS=4,t.FLAG_HAS_INDIRECTION_TABLE=8,t.FLAG_HAS_SLICE_SIZE=16,t.FLAG_IS_LAST_SLICE=32,Ice.Protocol=t}(),_=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"equals",value:function(e,t){if(e===t)return!0;if(e.size!=t.size)return!1;var n=!0,i=!1,r=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var a=_slicedToArray(o.value,2),c=a[0],u=a[1];if(void 0===u){if(!t.has(c))return!1;if(t.get(c)!==u)return!1}else if(t.get(c)!==u)return!1}}catch(e){i=!0,r=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw r}}return!0}}]),e}(),Ice.MapUtil=_,N.defineDictionary(Ice,"Context","ContextHelper","Ice.StringHelper","Ice.StringHelper",!1,void 0,void 0),Ice.OperationMode=N.defineEnum([["Normal",0],["Nonmutating",1],["Idempotent",2]]),Ice.Current=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Ice.Identity,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:Ice.OperationMode.Normal,a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:0,u=arguments.length>8&&void 0!==arguments[8]?arguments[8]:new Ice.EncodingVersion;_classCallCheck(this,e),this.adapter=t,this.con=n,this.id=i,this.facet=r,this.operation=o,this.mode=s,this.ctx=a,this.requestId=c,this.encoding=u},N.defineStruct(Ice.Current,!1,!0),Ice.Property=function(){function e(t,n,i){_classCallCheck(this,e),this._pattern=t,this._deprecated=n,this._deprecatedBy=i}return _createClass(e,[{key:"pattern",get:function(){return this._pattern}},{key:"deprecated",get:function(){return this._deprecated}},{key:"deprecatedBy",get:function(){return this._deprecatedBy}}]),e}(),d={},p=Ice.Property,d.IceProps=[new p("/^Ice.ACM.Client/",!0,null),new p("/^Ice.ACM.Server/",!0,null),new p("/^Ice.ACM.Timeout/",!1,null),new p("/^Ice.ACM.Heartbeat/",!1,null),new p("/^Ice.ACM.Close/",!1,null),new p("/^Ice.ACM/",!1,null),new p("/^Ice.ACM.Client.Timeout/",!1,null),new p("/^Ice.ACM.Client.Heartbeat/",!1,null),new p("/^Ice.ACM.Client.Close/",!1,null),new p("/^Ice.ACM.Client/",!1,null),new p("/^Ice.ACM.Server.Timeout/",!1,null),new p("/^Ice.ACM.Server.Heartbeat/",!1,null),new p("/^Ice.ACM.Server.Close/",!1,null),new p("/^Ice.ACM.Server/",!1,null),new p("/^Ice.Admin.ACM.Timeout/",!1,null),new p("/^Ice.Admin.ACM.Heartbeat/",!1,null),new p("/^Ice.Admin.ACM.Close/",!1,null),new p("/^Ice.Admin.ACM/",!1,null),new p("/^Ice.Admin.AdapterId/",!1,null),new p("/^Ice.Admin.Endpoints/",!1,null),new p("/^Ice.Admin.Locator.EndpointSelection/",!1,null),new p("/^Ice.Admin.Locator.ConnectionCached/",!1,null),new p("/^Ice.Admin.Locator.PreferSecure/",!1,null),new p("/^Ice.Admin.Locator.LocatorCacheTimeout/",!1,null),new p("/^Ice.Admin.Locator.InvocationTimeout/",!1,null),new p("/^Ice.Admin.Locator.Locator/",!1,null),new p("/^Ice.Admin.Locator.Router/",!1,null),new p("/^Ice.Admin.Locator.CollocationOptimized/",!1,null),new p("/^Ice.Admin.Locator.Context../",!1,null),new p("/^Ice.Admin.Locator/",!1,null),new p("/^Ice.Admin.PublishedEndpoints/",!1,null),new p("/^Ice.Admin.ReplicaGroupId/",!1,null),new p("/^Ice.Admin.Router.EndpointSelection/",!1,null),new p("/^Ice.Admin.Router.ConnectionCached/",!1,null),new p("/^Ice.Admin.Router.PreferSecure/",!1,null),new p("/^Ice.Admin.Router.LocatorCacheTimeout/",!1,null),new p("/^Ice.Admin.Router.InvocationTimeout/",!1,null),new p("/^Ice.Admin.Router.Locator/",!1,null),new p("/^Ice.Admin.Router.Router/",!1,null),new p("/^Ice.Admin.Router.CollocationOptimized/",!1,null),new p("/^Ice.Admin.Router.Context../",!1,null),new p("/^Ice.Admin.Router/",!1,null),new p("/^Ice.Admin.ProxyOptions/",!1,null),new p("/^Ice.Admin.ThreadPool.Size/",!1,null),new p("/^Ice.Admin.ThreadPool.SizeMax/",!1,null),new p("/^Ice.Admin.ThreadPool.SizeWarn/",!1,null),new p("/^Ice.Admin.ThreadPool.StackSize/",!1,null),new p("/^Ice.Admin.ThreadPool.Serialize/",!1,null),new p("/^Ice.Admin.ThreadPool.ThreadIdleTime/",!1,null),new p("/^Ice.Admin.ThreadPool.ThreadPriority/",!1,null),new p("/^Ice.Admin.MessageSizeMax/",!1,null),new p("/^Ice.Admin.DelayCreation/",!1,null),new p("/^Ice.Admin.Enabled/",!1,null),new p("/^Ice.Admin.Facets/",!1,null),new p("/^Ice.Admin.InstanceName/",!1,null),new p("/^Ice.Admin.Logger.KeepLogs/",!1,null),new p("/^Ice.Admin.Logger.KeepTraces/",!1,null),new p("/^Ice.Admin.Logger.Properties/",!1,null),new p("/^Ice.Admin.ServerId/",!1,null),new p("/^Ice.BackgroundLocatorCacheUpdates/",!1,null),new p("/^Ice.BatchAutoFlush/",!0,null),new p("/^Ice.BatchAutoFlushSize/",!1,null),new p("/^Ice.ChangeUser/",!1,null),new p("/^Ice.ClassGraphDepthMax/",!1,null),new p("/^Ice.ClientAccessPolicyProtocol/",!1,null),new p("/^Ice.Compression.Level/",!1,null),new p("/^Ice.CollectObjects/",!1,null),new p("/^Ice.Config/",!1,null),new p("/^Ice.ConsoleListener/",!1,null),new p("/^Ice.Default.CollocationOptimized/",!1,null),new p("/^Ice.Default.EncodingVersion/",!1,null),new p("/^Ice.Default.EndpointSelection/",!1,null),new p("/^Ice.Default.Host/",!1,null),new p("/^Ice.Default.Locator.EndpointSelection/",!1,null),new p("/^Ice.Default.Locator.ConnectionCached/",!1,null),new p("/^Ice.Default.Locator.PreferSecure/",!1,null),new p("/^Ice.Default.Locator.LocatorCacheTimeout/",!1,null),new p("/^Ice.Default.Locator.InvocationTimeout/",!1,null),new p("/^Ice.Default.Locator.Locator/",!1,null),new p("/^Ice.Default.Locator.Router/",!1,null),new p("/^Ice.Default.Locator.CollocationOptimized/",!1,null),new p("/^Ice.Default.Locator.Context../",!1,null),new p("/^Ice.Default.Locator/",!1,null),new p("/^Ice.Default.LocatorCacheTimeout/",!1,null),new p("/^Ice.Default.InvocationTimeout/",!1,null),new p("/^Ice.Default.Package/",!1,null),new p("/^Ice.Default.PreferSecure/",!1,null),new p("/^Ice.Default.Protocol/",!1,null),new p("/^Ice.Default.Router.EndpointSelection/",!1,null),new p("/^Ice.Default.Router.ConnectionCached/",!1,null),new p("/^Ice.Default.Router.PreferSecure/",!1,null),new p("/^Ice.Default.Router.LocatorCacheTimeout/",!1,null),new p("/^Ice.Default.Router.InvocationTimeout/",!1,null),new p("/^Ice.Default.Router.Locator/",!1,null),new p("/^Ice.Default.Router.Router/",!1,null),new p("/^Ice.Default.Router.CollocationOptimized/",!1,null),new p("/^Ice.Default.Router.Context../",!1,null),new p("/^Ice.Default.Router/",!1,null),new p("/^Ice.Default.SlicedFormat/",!1,null),new p("/^Ice.Default.SourceAddress/",!1,null),new p("/^Ice.Default.Timeout/",!1,null),new p("/^Ice.EventLog.Source/",!1,null),new p("/^Ice.FactoryAssemblies/",!1,null),new p("/^Ice.HTTPProxyHost/",!1,null),new p("/^Ice.HTTPProxyPort/",!1,null),new p("/^Ice.ImplicitContext/",!1,null),new p("/^Ice.InitPlugins/",!1,null),new p("/^Ice.IPv4/",!1,null),new p("/^Ice.IPv6/",!1,null),new p("/^Ice.LogFile/",!1,null),new p("/^Ice.LogFile.SizeMax/",!1,null),new p("/^Ice.LogStdErr.Convert/",!1,null),new p("/^Ice.MessageSizeMax/",!1,null),new p("/^Ice.Nohup/",!1,null),new p("/^Ice.NullHandleAbort/",!1,null),new p("/^Ice.Override.CloseTimeout/",!1,null),new p("/^Ice.Override.Compress/",!1,null),new p("/^Ice.Override.ConnectTimeout/",!1,null),new p("/^Ice.Override.Timeout/",!1,null),new p("/^Ice.Override.Secure/",!1,null),new p("/^Ice.Package../",!1,null),new p("/^Ice.Plugin../",!1,null),new p("/^Ice.PluginLoadOrder/",!1,null),new p("/^Ice.PreferIPv6Address/",!1,null),new p("/^Ice.PreloadAssemblies/",!1,null),new p("/^Ice.PrintAdapterReady/",!1,null),new p("/^Ice.PrintProcessId/",!1,null),new p("/^Ice.PrintStackTraces/",!1,null),new p("/^Ice.ProgramName/",!1,null),new p("/^Ice.RetryIntervals/",!1,null),new p("/^Ice.ServerIdleTime/",!1,null),new p("/^Ice.SOCKSProxyHost/",!1,null),new p("/^Ice.SOCKSProxyPort/",!1,null),new p("/^Ice.StdErr/",!1,null),new p("/^Ice.StdOut/",!1,null),new p("/^Ice.SyslogFacility/",!1,null),new p("/^Ice.ThreadPool.Client.Size/",!1,null),new p("/^Ice.ThreadPool.Client.SizeMax/",!1,null),new p("/^Ice.ThreadPool.Client.SizeWarn/",!1,null),new p("/^Ice.ThreadPool.Client.StackSize/",!1,null),new p("/^Ice.ThreadPool.Client.Serialize/",!1,null),new p("/^Ice.ThreadPool.Client.ThreadIdleTime/",!1,null),new p("/^Ice.ThreadPool.Client.ThreadPriority/",!1,null),new p("/^Ice.ThreadPool.Server.Size/",!1,null),new p("/^Ice.ThreadPool.Server.SizeMax/",!1,null),new p("/^Ice.ThreadPool.Server.SizeWarn/",!1,null),new p("/^Ice.ThreadPool.Server.StackSize/",!1,null),new p("/^Ice.ThreadPool.Server.Serialize/",!1,null),new p("/^Ice.ThreadPool.Server.ThreadIdleTime/",!1,null),new p("/^Ice.ThreadPool.Server.ThreadPriority/",!1,null),new p("/^Ice.ThreadPriority/",!1,null),new p("/^Ice.ToStringMode/",!1,null),new p("/^Ice.Trace.Admin.Properties/",!1,null),new p("/^Ice.Trace.Admin.Logger/",!1,null),new p("/^Ice.Trace.Locator/",!1,null),new p("/^Ice.Trace.Network/",!1,null),new p("/^Ice.Trace.Protocol/",!1,null),new p("/^Ice.Trace.Retry/",!1,null),new p("/^Ice.Trace.Slicing/",!1,null),new p("/^Ice.Trace.ThreadPool/",!1,null),new p("/^Ice.UDP.RcvSize/",!1,null),new p("/^Ice.UDP.SndSize/",!1,null),new p("/^Ice.TCP.Backlog/",!1,null),new p("/^Ice.TCP.RcvSize/",!1,null),new p("/^Ice.TCP.SndSize/",!1,null),new p("/^Ice.UseApplicationClassLoader/",!1,null),new p("/^Ice.UseOSLog/",!1,null),new p("/^Ice.UseSyslog/",!1,null),new p("/^Ice.UseSystemdJournal/",!1,null),new p("/^Ice.Warn.AMICallback/",!1,null),new p("/^Ice.Warn.Connections/",!1,null),new p("/^Ice.Warn.Datagrams/",!1,null),new p("/^Ice.Warn.Dispatch/",!1,null),new p("/^Ice.Warn.Endpoints/",!1,null),new p("/^Ice.Warn.UnknownProperties/",!1,null),new p("/^Ice.Warn.UnusedProperties/",!1,null),new p("/^Ice.CacheMessageBuffers/",!1,null),new p("/^Ice.ThreadInterruptSafe/",!1,null),new p("/^Ice.Voip/",!0,null)],d.validProps=[d.IceProps],d.clPropNames=["Ice"],Ice.PropertyNames=d,function(){var e=Ice.Timer,t=function(t){function n(e){var t,i,r;return _classCallCheck(this,n),(t=_possibleConstructorReturn(this,_getPrototypeOf(n).call(this,function(t,n){i=t,r=n,void 0!==e&&e(t,n)}))).resolve=i,t.reject=r,t}return _inherits(n,_wrapNativeSuper(Promise)),_createClass(n,[{key:"delay",value:function(t){return this.then(function(i){return new n(function(n,r){return e.setTimeout(function(){return n(i)},t)})},function(i){return new n(function(n,r){return e.setTimeout(function(){return r(i)},t)})})}}],[{key:"delay",value:function(t,i){return new n(function(n){return e.setTimeout(function(){return n(i)},t)})}},{key:"try",value:function(e){return n.resolve().then(e)}},{key:Symbol.species,get:function(){return n}}]),n}();Ice.Promise=t}(),f=function(e){function t(e,n,i,r,o){var s;return _classCallCheck(this,t),(s=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this)))._communicator=e,s._instance=null!==e?e.instance:null,s._operation=n,s._connection=i,s._proxy=r,s._adapter=o,s}return _inherits(t,Ice.Promise),_createClass(t,[{key:"communicator",get:function(){return this._communicator}},{key:"connection",get:function(){return this._connection}},{key:"proxy",get:function(){return this._proxy}},{key:"adapter",get:function(){return this._adapter}},{key:"operation",get:function(){return this._operation}}]),t}(),Ice.AsyncResultBase=f,function(){var e=Ice.Debug,t=Ice.Protocol,n=Ice.StringUtil,i=Ice.OperationMode,r=Ice.Identity,o=new Map;function s(e,t){var i=Ice.ToStringMode.Unicode;null!==t.instance&&(i=t.instance.toStringMode());var o=new r;o._read(t),e.push("\nidentity = "+Ice.identityToString(o,i));var s=Ice.StringSeqHelper.read(t);e.push("\nfacet = "),s.length>0&&e.push(n.escapeString(s[0],"",i));var a=t.readString();e.push("\noperation = "+a)}function a(e,t){s(e,t);var n=t.readByte();switch(e.push("\nmode = "+n+" "),i.valueOf(n)){case i.Normal:e.push("(normal)");break;case i.Nonmutating:e.push("(nonmutating)");break;case i.Idempotent:e.push("(idempotent)");break;default:e.push("(unknown)")}var r=t.readSize();for(e.push("\ncontext = ");r-- >0;){var o=t.readString(),a=t.readString();e.push(o+"/"+a),r>0&&e.push(", ")}var c=t.skipEncapsulation();c.equals(Ice.Encoding_1_0)||(e.push("\nencoding = "),e.push(Ice.encodingVersionToString(c)))}function c(n,i){var r=function(e,t){t.readByte(),t.readByte(),t.readByte(),t.readByte(),t.readByte(),t.readByte(),t.readByte(),t.readByte();var n=t.readByte();e.push("\nmessage type = "+n+" ("+u(n)+")");var i=t.readByte();switch(e.push("\ncompression status = "+i+" "),i){case 0:e.push("(not compressed; do not compress response, if any)");break;case 1:e.push("(not compressed; compress response, if any)");break;case 2:e.push("(compressed; compress response, if any)");break;default:e.push("(unknown)")}var r=t.readInt();return e.push("\nmessage size = "+r),n}(n,i);switch(r){case t.closeConnectionMsg:case t.validateConnectionMsg:break;case t.requestMsg:!function(e,t){var n=t.readInt();e.push("\nrequest id = "+n),0===n&&e.push(" (oneway)"),a(e,t)}(n,i);break;case t.requestBatchMsg:!function(e,t){var n=t.readInt();e.push("\nnumber of requests = "+n);for(var i=0;i<n;++i)e.push("\nrequest #"+i+":"),a(e,t)}(n,i);break;case t.replyMsg:!function(n,i){var r=i.readInt();n.push("\nrequest id = "+r);var o=i.readByte();switch(n.push("\nreply status = "+o+" "),o){case t.replyOK:n.push("(ok)");break;case t.replyUserException:n.push("(user exception)");break;case t.replyObjectNotExist:case t.replyFacetNotExist:case t.replyOperationNotExist:switch(o){case t.replyObjectNotExist:n.push("(object not exist)");break;case t.replyFacetNotExist:n.push("(facet not exist)");break;case t.replyOperationNotExist:n.push("(operation not exist)");break;default:e.assert(!1)}s(n,i);break;case t.replyUnknownException:case t.replyUnknownLocalException:case t.replyUnknownUserException:switch(o){case t.replyUnknownException:n.push("(unknown exception)");break;case t.replyUnknownLocalException:n.push("(unknown local exception)");break;case t.replyUnknownUserException:n.push("(unknown user exception)");break;default:e.assert(!1)}var a=i.readString();n.push("\nunknown = "+a);break;default:n.push("(unknown)")}if(o===t.replyOK||o===t.replyUserException){var c=i.skipEncapsulation();c.equals(Ice.Encoding_1_0)||(n.push("\nencoding = "),n.push(Ice.encodingVersionToString(c)))}}(n,i)}return r}function u(e){switch(e){case t.requestMsg:return"request";case t.requestBatchMsg:return"batch request";case t.replyMsg:return"reply";case t.closeConnectionMsg:return"close connection";case t.validateConnectionMsg:return"validate connection";default:return"unknown"}}var l=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"traceSlicing",value:function(e,t,n,i){o.has(t)||(i.trace(n,"unknown ".concat(e," type `").concat(t,"'")),o.set(t,1))}},{key:"traceSend",value:function(e,t,n){if(n.protocol>=1){var i=e.pos,r=new Ice.InputStream(e.instance,e.getEncoding(),e.buffer);r.pos=0;var o=[],s=c(o,r);t.trace(n.protocolCat,"sending "+u(s)+" "+o.join("")),e.pos=i}}},{key:"traceRecv",value:function(e,t,n){if(n.protocol>=1){var i=e.pos;e.pos=0;var r=[],o=c(r,e);t.trace(n.protocolCat,"received "+u(o)+" "+r.join("")),e.pos=i}}},{key:"traceOut",value:function(e,t,n,i){if(i.protocol>=1){var r=t.pos,o=new Ice.InputStream(t.instance,t.getEncoding(),t.buffer);o.pos=0;var s=[];s.push(e),c(s,o),n.trace(i.protocolCat,s.join("")),t.pos=r}}},{key:"traceIn",value:function(e,t,n,i){if(i.protocol>=1){var r=t.pos;t.pos=0;var o=[];o.push(e),c(o,t),n.trace(i.protocolCat,o.join("")),t.pos=r}}},{key:"dumpStream",value:function(t){var n=t.pos;t.pos=0;var i=t.readBlob(t.size());e.dumpOctets(i),t.pos=n}},{key:"dumpOctets",value:function(e){for(var t=[],n=0;n<e.length;n+=8){for(var i=n;i-n<8;i++)if(i<e.length){var r=e[i];r<0&&(r+=256);var o=void 0;o=r<10?" "+r:r<100?" "+r:String(r),t.push(o+" ")}else t.push(" ");t.push('"');for(var s=n;s<e.length&&s-n<8;s++)e[s]>=32&&e[s]<127?t.push(String.fromCharCode(e[s])):t.push(".");t.push('"\n')}console.log(t.join(""))}}]),e}();Ice.TraceUtil=l}(),y=function(e){function t(e){var n;return _classCallCheck(this,t),n=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this)),e instanceof Ice.LocalException?n._ex=e:(Ice.Debug.assert(e instanceof t),n._ex=e._ex),n}return _inherits(t,_wrapNativeSuper(Error)),_createClass(t,[{key:"inner",get:function(){return this._ex}}]),t}(),Ice.RetryException=y,function(){var e=Ice._ModuleRegistry,t=Ice.Debug,n=Ice.ExUtil,i=Ice.FormatType,r=Ice.OptionalFormat,o=Ice.Protocol,s=Ice.TraceUtil,a=Ice.ArrayUtil,c=Ice.SlicedData,u={NoSlice:0,ValueSlice:1,ExceptionSlice:2};Number.isNaN=Number.isNaN||function(e){return"number"==typeof e&&isNaN(e)};var l=function e(t,n){_classCallCheck(this,e),this.index=t,this.cb=n},h=function(){function e(t,n,i,r){_classCallCheck(this,e),this._stream=t,this._encaps=n,this._sliceValues=i,this._valueFactoryManager=r,this._patchMap=null,this._unmarshaledMap=new Map,this._typeIdMap=null,this._typeIdIndex=0,this._valueList=null}return _createClass(e,[{key:"readOptional",value:function(){return!1}},{key:"readPendingValues",value:function(){}},{key:"readTypeId",value:function(e){var t;if(null===this._typeIdMap&&(this._typeIdMap=new Map),e){if(void 0===(t=this._typeIdMap.get(this._stream.readSize())))throw new Ice.UnmarshalOutOfBoundsException}else t=this._stream.readString(),this._typeIdMap.set(++this._typeIdIndex,t);return t}},{key:"newInstance",value:function(e){var t=this._valueFactoryManager.find(e),n=null;return void 0!==t&&(n=t(e)),null==n&&void 0!==(t=this._valueFactoryManager.find(""))&&(n=t(e)),null==n&&(n=this._stream.createInstance(e)),n}},{key:"addPatchEntry",value:function(e,n){t.assert(e>0);var i=this._unmarshaledMap.get(e);if(null==i){null===this._patchMap&&(this._patchMap=new Map);var r=this._patchMap.get(e);void 0===r&&(r=[],this._patchMap.set(e,r)),r.push(n)}else n(i)}},{key:"unmarshal",value:function(e,n){if(this._unmarshaledMap.set(e,n),n._iceRead(this._stream),null!==this._patchMap){var i=this._patchMap.get(e);if(void 0!==i){t.assert(i.length>0);for(var r=0;r<i.length;++r)i[r](n);this._patchMap.delete(e)}}if(null!==this._patchMap&&0!==this._patchMap.size||null!==this._valueList){if(null===this._valueList&&(this._valueList=[]),this._valueList.push(n),null===this._patchMap||0===this._patchMap.size){for(var o=0;o<this._valueList.length;o++)try{this._valueList[o].ice_postUnmarshal()}catch(e){this._stream.instance.initializationData().logger.warning("exception raised by ice_postUnmarshal:\n"+e.toString())}this._valueList=[]}}else try{n.ice_postUnmarshal()}catch(e){this._stream.instance.initializationData().logger.warning("exception raised by ice_postUnmarshal:\n"+e.toString())}}}]),e}(),_=function(e){function n(e,t,i,r){var o;return _classCallCheck(this,n),(o=_possibleConstructorReturn(this,_getPrototypeOf(n).call(this,e,t,i,r)))._sliceType=u.NoSlice,o}return _inherits(n,h),_createClass(n,[{key:"readValue",value:function(e){t.assert(null!==e);var n=this._stream.readInt();if(n>0)throw new Ice.MarshalException("invalid object id");0===(n=-n)?e(null):this.addPatchEntry(n,e)}},{key:"throwException",value:function(){t.assert(this._sliceType===u.NoSlice);var e=this._stream.readBool();this._sliceType=u.ExceptionSlice,this._skipFirstSlice=!1,this.startSlice();for(var n=this._typeId;;){var i=this._stream.createUserException(this._typeId);if(null!==i)throw i._read(this._stream),e&&this.readPendingValues(),i;this.skipSlice();try{this.startSlice()}catch(e){throw e instanceof Ice.UnmarshalOutOfBoundsException&&(e.reason="unknown exception type `"+n+"'"),e}}}},{key:"startInstance",value:function(e){t.assert(this._sliceType===e),this._skipFirstSlice=!0}},{key:"endInstance",value:function(e){if(this._sliceType===u.ValueSlice){if(this.startSlice(),0!==this._stream.readSize())throw new Ice.MarshalException("invalid Object slice");this.endSlice()}return this._sliceType=u.NoSlice,null}},{key:"startSlice",value:function(){if(this._skipFirstSlice)return this._skipFirstSlice=!1,this._typeId;if(this._sliceType===u.ValueSlice){var e=this._stream.readBool();this._typeId=this.readTypeId(e)}else this._typeId=this._stream.readString();if(this._sliceSize=this._stream.readInt(),this._sliceSize<4)throw new Ice.UnmarshalOutOfBoundsException;return this._typeId}},{key:"endSlice",value:function(){}},{key:"skipSlice",value:function(){this._stream.traceSkipSlice(this._typeId,this._sliceType),t.assert(this._sliceSize>=4),this._stream.skip(this._sliceSize-4)}},{key:"readPendingValues",value:function(){var e;do{for(var t=e=this._stream.readSize();t>0;--t)this.readInstance()}while(e>0);if(null!==this._patchMap&&0!==this._patchMap.size)throw new Ice.MarshalException("index for class received, but no instance")}},{key:"readInstance",value:function(){var e=this._stream.readInt(),t=null;if(e<=0)throw new Ice.MarshalException("invalid object id");this._sliceType=u.ValueSlice,this._skipFirstSlice=!1,this.startSlice();for(var n=this._typeId;;){if(this._typeId==Ice.Value.ice_staticId())throw new Ice.NoValueFactoryException("",n);if(t=this.newInstance(this._typeId))break;if(!this._sliceValues)throw new Ice.NoValueFactoryException("no value factory found and slicing is disabled",this._typeId);this.skipSlice(),this.startSlice()}this.unmarshal(e,t)}}]),n}(),d=function(e){function n(e,t,i,r,o){var s;return _classCallCheck(this,n),(s=_possibleConstructorReturn(this,_getPrototypeOf(n).call(this,e,t,i,r)))._compactIdResolver=o,s._current=null,s._valueIdIndex=1,s}return _inherits(n,h),_createClass(n,[{key:"readValue",value:function(e){var t=this._stream.readSize();if(t<0)throw new Ice.MarshalException("invalid object id");0===t?null!==e&&e(null):null!==this._current&&0!=(this._current.sliceFlags&o.FLAG_HAS_INDIRECTION_TABLE)?null!==e&&(null===this._current.indirectPatchList&&(this._current.indirectPatchList=[]),this._current.indirectPatchList.push(new l(t-1,e))):this.readInstance(t,e)}},{key:"throwException",value:function(){t.assert(null===this._current),this.push(u.ExceptionSlice),this.startSlice();for(var e=this._current.typeId;;){var n=this._stream.createUserException(this._current.typeId);if(null!==n)throw n._read(this._stream),n;if(this.skipSlice(),0!=(this._current.sliceFlags&o.FLAG_IS_LAST_SLICE)){if(0===e.indexOf("::"))throw new Ice.UnknownUserException(e.substr(2));throw new Ice.UnknownUserException(e)}this.startSlice()}}},{key:"startInstance",value:function(e){t.assert(void 0!==e),t.assert(null!==this._current.sliceType&&this._current.sliceType===e),this._current.skipFirstSlice=!0}},{key:"endInstance",value:function(e){var t=null;return e&&(t=this.readSlicedData()),null!==this._current.slices&&(this._current.slices.length=0,this._current.indirectionTables.length=0),this._current=this._current.previous,t}},{key:"startSlice",value:function(){if(this._current.skipFirstSlice)return this._current.skipFirstSlice=!1,this._current.typeId;if(this._current.sliceFlags=this._stream.readByte(),this._current.sliceType===u.ValueSlice?(this._current.sliceFlags&o.FLAG_HAS_TYPE_ID_COMPACT)===o.FLAG_HAS_TYPE_ID_COMPACT?(this._current.typeId="",this._current.compactId=this._stream.readSize()):0!=(this._current.sliceFlags&(o.FLAG_HAS_TYPE_ID_INDEX|o.FLAG_HAS_TYPE_ID_STRING))?(this._current.typeId=this.readTypeId(0!=(this._current.sliceFlags&o.FLAG_HAS_TYPE_ID_INDEX)),this._current.compactId=-1):(this._current.typeId="",this._current.compactId=-1):(this._current.typeId=this._stream.readString(),this._current.compactId=-1),0!=(this._current.sliceFlags&o.FLAG_HAS_SLICE_SIZE)){if(this._current.sliceSize=this._stream.readInt(),this._current.sliceSize<4)throw new Ice.UnmarshalOutOfBoundsException}else this._current.sliceSize=0;return this._current.typeId}},{key:"endSlice",value:function(){var e=this;if(0!=(this._current.sliceFlags&o.FLAG_HAS_OPTIONAL_MEMBERS)&&this._stream.skipOptionals(),0!=(this._current.sliceFlags&o.FLAG_HAS_INDIRECTION_TABLE)){for(var n=[],i=this._stream.readAndCheckSeqSize(1),r=0;r<i;++r)n[r]=this.readInstance(this._stream.readSize(),null);if(0===n.length)throw new Ice.MarshalException("empty indirection table");if((null===this._current.indirectPatchList||0===this._current.indirectPatchList.length)&&0==(this._current.sliceFlags&o.FLAG_HAS_OPTIONAL_MEMBERS))throw new Ice.MarshalException("no references to indirection table");null!==this._current.indirectPatchList&&(this._current.indirectPatchList.forEach(function(i){if(t.assert(i.index>=0),i.index>=n.length)throw new Ice.MarshalException("indirection out of range");e.addPatchEntry(n[i.index],i.cb)}),this._current.indirectPatchList.length=0)}}},{key:"skipSlice",value:function(){this._stream.traceSkipSlice(this._current.typeId,this._current.sliceType);var e=this._stream.pos;if(0==(this._current.sliceFlags&o.FLAG_HAS_SLICE_SIZE))throw this._current.sliceType===u.ValueSlice?new Ice.NoValueFactoryException("no value factory found and compact format prevents slicing (the sender should use the sliced format instead)",this._current.typeId):0===this._current.typeId.indexOf("::")?new Ice.UnknownUserException(this._current.typeId.substring(2)):new Ice.UnknownUserException(this._current.typeId);t.assert(this._current.sliceSize>=4),this._stream.skip(this._current.sliceSize-4);var n=new Ice.SliceInfo;n.typeId=this._current.typeId,n.compactId=this._current.compactId,n.hasOptionalMembers=0!=(this._current.sliceFlags&o.FLAG_HAS_OPTIONAL_MEMBERS),n.isLastSlice=0!=(this._current.sliceFlags&o.FLAG_IS_LAST_SLICE);var i=this._stream._buf,r=i.position,s=r;if(n.hasOptionalMembers&&--s,i.position=e,n.bytes=i.getArray(s-e),i.position=r,null===this._current.slices&&(this._current.slices=[],this._current.indirectionTables=[]),0!=(this._current.sliceFlags&o.FLAG_HAS_INDIRECTION_TABLE)){for(var a=this._stream.readAndCheckSeqSize(1),c=[],l=0;l<a;++l)c[l]=this.readInstance(this._stream.readSize(),null);this._current.indirectionTables.push(c)}else this._current.indirectionTables.push(null);this._current.slices.push(n)}},{key:"readOptional",value:function(e,t){return null===this._current?this._stream.readOptImpl(e,t):0!=(this._current.sliceFlags&o.FLAG_HAS_OPTIONAL_MEMBERS)&&this._stream.readOptImpl(e,t)}},{key:"readInstance",value:function(e,n){t.assert(e>0);var i=null;if(e>1)return null!==n&&this.addPatchEntry(e,n),e;this.push(u.ValueSlice),e=++this._valueIdIndex,this.startSlice();for(var r=this._current.typeId;;){if(this._current.compactId>=0){if(this._current.typeId="",null!==this._compactIdResolver)try{this._current.typeId=this._compactIdResolver.call(null,this._current.compactId)}catch(e){if(!(e instanceof Ice.LocalException))throw new Ice.MarshalException("exception in CompactIdResolver for ID "+this._current.compactId,e);throw e}0===this._current.typeId.length&&(this._current.typeId=this._stream.resolveCompactId(this._current.compactId))}if(this._current.typeId.length>0&&(i=this.newInstance(this._current.typeId)),null!=i)break;if(!this._sliceValues)throw new Ice.NoValueFactoryException("no value factory found and slicing is disabled",this._current.typeId);if(this.skipSlice(),0!=(this._current.sliceFlags&o.FLAG_IS_LAST_SLICE)){i=new Ice.UnknownSlicedValue(r);break}this.startSlice()}if(this.unmarshal(e,i),null===this._current&&null!==this._patchMap&&0!==this._patchMap.size)throw new Ice.MarshalException("index for class received, but no instance");return null!==n&&n(i),e}},{key:"readSlicedData",value:function(){if(null===this._current.slices)return null;t.assert(this._current.slices.length===this._current.indirectionTables.length);for(var e=0;e<this._current.slices.length;++e){var n=this._current.indirectionTables[e],i=this._current.slices[e];if(i.instances=[],n)for(var r=0;r<n.length;++r)this.addPatchEntry(n[r],p(i.instances,r,Ice.Value))}return new c(a.clone(this._current.slices))}},{key:"push",value:function(e){null===this._current?this._current=new n.InstanceData(null):this._current=this._current.next?this._current.next:new n.InstanceData(this._current),this._current.sliceType=e,this._current.skipFirstSlice=!1}}]),n}();d.InstanceData=function(){return function e(t){_classCallCheck(this,e),null!==t&&(t.next=this),this.previous=t,this.next=null,this.sliceType=null,this.skipFirstSlice=!1,this.slices=null,this.indirectionTables=null,this.sliceFlags=0,this.sliceSize=0,this.typeId=null,this.compactId=0,this.indirectPatchList=null}}();var p=function(e,t,i){return function(r){null===r||r instanceof i||n.throwUOE(i.ice_staticId(),r),e[t]=r}},f=function(){function e(){_classCallCheck(this,e),this.start=0,this.sz=0,this.encoding=null,this.encoding_1_0=!1,this.decoder=null,this.next=null}return _createClass(e,[{key:"reset",value:function(){this.decoder=null}},{key:"setEncoding",value:function(e){this.encoding=e,this.encoding_1_0=e.equals(Ice.Encoding_1_0)}}]),e}(),y=function(){function i(e,t,n){_classCallCheck(this,i);var r={instance:null,encoding:null,bytes:null,buffer:null};this._checkArgs([e,t,n],r),this._initialize(r)}return _createClass(i,[{key:"_checkArgs",value:function(e,t){if(e.forEach(function(e){if(null!=e)if(e.constructor===Ice.Communicator)t.instance=e.instance;else if(e.constructor===Ice.Instance)t.instance=e;else if(e.constructor===Ice.EncodingVersion)t.encoding=e;else if(e.constructor===Ice.Buffer)t.buffer=e;else if(e.constructor===ArrayBuffer)t.bytes=e;else{if(e.constructor!==Uint8Array)throw new Ice.InitializationException("unknown argument to InputStream constructor");t.bytes=e.buffer}}),null!==t.buffer&&null!==t.bytes)throw new Ice.InitializationException("invalid argument to InputStream constructor")}},{key:"_initialize",value:function(e){this._instance=e.instance,this._encoding=e.encoding,this._encapsStack=null,this._encapsCache=null,this._closure=null,this._sliceValues=!0,this._startSeq=-1,this._sizePos=-1,this._compactIdResolver=null,null!==this._instance?(null===this._encoding&&(this._encoding=this._instance.defaultsAndOverrides().defaultEncoding),this._traceSlicing=this._instance.traceLevels().slicing>0,this._valueFactoryManager=this._instance.initializationData().valueFactoryManager,this._logger=this._instance.initializationData().logger):(null===this._encoding&&(this._encoding=o.currentEncoding),this._traceSlicing=!1,this._valueFactoryManager=null,this._logger=null),null!==e.bytes?this._buf=new Ice.Buffer(e.bytes):null!==e.buffer?this._buf=e.buffer:this._buf=new Ice.Buffer}},{key:"reset",value:function(){this._buf.reset(),this.clear()}},{key:"clear",value:function(){null!==this._encapsStack&&(t.assert(null===this._encapsStack.next),this._encapsStack.next=this._encapsCache,this._encapsCache=this._encapsStack,this._encapsCache.reset(),this._encapsStack=null),this._startSeq=-1,this._sliceValues=!0}},{key:"swap",value:function(e){t.assert(this._instance===e._instance);var n=[this._buf,e._buf];e._buf=n[0],this._buf=n[1];var i=[this._encoding,e._encoding];e._encoding=i[0],this._encoding=i[1];var r=[this._traceSlicing,e._traceSlicing];e._traceSlicing=r[0],this._traceSlicing=r[1];var o=[this._closure,e.closure];e._closure=o[0],this._closure=o[1];var s=[this._sliceValues,e._sliceValues];e._sliceValues=s[0],this._sliceValues=s[1],this.resetEncapsulation(),e.resetEncapsulation();var a=[this._startSeq,e._startSeq];e._startSeq=a[0],this._startSeq=a[1];var c=[this._minSeqSize,e._minSeqSize];e._minSeqSize=c[0],this._minSeqSize=c[1];var u=[this._sizePos,e._sizePos];e._sizePos=u[0],this._sizePos=u[1];var l=[this._valueFactoryManager,e._valueFactoryManager];e._valueFactoryManager=l[0],this._valueFactoryManager=l[1];var h=[this._logger,e._logger];e._logger=h[0],this._logger=h[1];var _=[this._compactIdResolver,e._compactIdResolver];e._compactIdResolver=_[0],this._compactIdResolver=_[1]}},{key:"resetEncapsulation",value:function(){this._encapsStack=null}},{key:"resize",value:function(e){this._buf.resize(e),this._buf.position=e}},{key:"startValue",value:function(){t.assert(null!==this._encapsStack&&null!==this._encapsStack.decoder),this._encapsStack.decoder.startInstance(u.ValueSlice)}},{key:"endValue",value:function(e){return t.assert(null!==this._encapsStack&&null!==this._encapsStack.decoder),this._encapsStack.decoder.endInstance(e)}},{key:"startException",value:function(){t.assert(null!==this._encapsStack&&null!==this._encapsStack.decoder),this._encapsStack.decoder.startInstance(u.ExceptionSlice)}},{key:"endException",value:function(e){return t.assert(null!==this._encapsStack&&null!==this._encapsStack.decoder),this._encapsStack.decoder.endInstance(e)}},{key:"startEncapsulation",value:function(){var e=this._encapsCache;null!==e?(e.reset(),this._encapsCache=this._encapsCache.next):e=new f,e.next=this._encapsStack,this._encapsStack=e,this._encapsStack.start=this._buf.position;var t=this.readInt();if(t<6)throw new Ice.UnmarshalOutOfBoundsException;if(t-4>this._buf.remaining)throw new Ice.UnmarshalOutOfBoundsException;this._encapsStack.sz=t;var n=new Ice.EncodingVersion;return n._read(this),o.checkSupportedEncoding(n),this._encapsStack.setEncoding(n),n}},{key:"endEncapsulation",value:function(){if(t.assert(null!==this._encapsStack),this._encapsStack.encoding_1_0){if(this._buf.position!==this._encapsStack.start+this._encapsStack.sz){if(this._buf.position+1!==this._encapsStack.start+this._encapsStack.sz)throw new Ice.EncapsulationException;try{this._buf.get()}catch(e){throw new Ice.UnmarshalOutOfBoundsException}}}else if(this.skipOptionals(),this._buf.position!==this._encapsStack.start+this._encapsStack.sz)throw new Ice.EncapsulationException;var e=this._encapsStack;this._encapsStack=e.next,e.next=this._encapsCache,this._encapsCache=e,this._encapsCache.reset()}},{key:"skipEmptyEncapsulation",value:function(){var e=this.readInt();if(e<6)throw new Ice.EncapsulationException;if(e-4>this._buf.remaining)throw new Ice.UnmarshalOutOfBoundsException;var t=new Ice.EncodingVersion;if(t._read(this),o.checkSupportedEncoding(t),t.equals(Ice.Encoding_1_0)){if(6!=e)throw new Ice.EncapsulationException}else this._buf.position=this._buf.position+e-6;return t}},{key:"readEncapsulation",value:function(e){t.assert(void 0!==e);var n=this.readInt();if(n<6)throw new Ice.UnmarshalOutOfBoundsException;if(n-4>this._buf.remaining)throw new Ice.UnmarshalOutOfBoundsException;null!==e?(e._read(this),this._buf.position=this._buf.position-6):this._buf.position=this._buf.position-4;try{return this._buf.getArray(n)}catch(e){throw new Ice.UnmarshalOutOfBoundsException}}},{key:"getEncoding",value:function(){return null!==this._encapsStack?this._encapsStack.encoding:this._encoding}},{key:"getEncapsulationSize",value:function(){return t.assert(null!==this._encapsStack),this._encapsStack.sz-6}},{key:"skipEncapsulation",value:function(){var e=this.readInt();if(e<6)throw new Ice.UnmarshalOutOfBoundsException;var t=new Ice.EncodingVersion;t._read(this);try{this._buf.position=this._buf.position+e-6}catch(e){throw new Ice.UnmarshalOutOfBoundsException}return t}},{key:"startSlice",value:function(){return t.assert(null!==this._encapsStack&&null!==this._encapsStack.decoder),this._encapsStack.decoder.startSlice()}},{key:"endSlice",value:function(){t.assert(null!==this._encapsStack&&null!==this._encapsStack.decoder),this._encapsStack.decoder.endSlice()}},{key:"skipSlice",value:function(){t.assert(null!==this._encapsStack&&null!==this._encapsStack.decoder),this._encapsStack.decoder.skipSlice()}},{key:"readPendingValues",value:function(){null!==this._encapsStack&&null!==this._encapsStack.decoder?this._encapsStack.decoder.readPendingValues():(null!==this._encapsStack&&this._encapsStack.encoding_1_0||null===this._encapsStack&&this._encoding.equals(Ice.Encoding_1_0))&&this.skipSize()}},{key:"readSize",value:function(){try{var e=this._buf.get();if(255===e){var t=this._buf.getInt();if(t<0)throw new Ice.UnmarshalOutOfBoundsException;return t}return e}catch(e){throw new Ice.UnmarshalOutOfBoundsException}}},{key:"readAndCheckSeqSize",value:function(e){var t=this.readSize();if(0===t)return t;if(-1===this._startSeq||this._buf.position>this._startSeq+this._minSeqSize?(this._startSeq=this._buf.position,this._minSeqSize=t*e):this._minSeqSize+=t*e,this._startSeq+this._minSeqSize>this._buf.limit)throw new Ice.UnmarshalOutOfBoundsException;return t}},{key:"readBlob",value:function(e){if(this._buf.remaining<e)throw new Ice.UnmarshalOutOfBoundsException;try{return this._buf.getArray(e)}catch(e){throw new Ice.UnmarshalOutOfBoundsException}}},{key:"readOptional",value:function(e,n){return t.assert(null!==this._encapsStack),null!==this._encapsStack.decoder?this._encapsStack.decoder.readOptional(e,n):this.readOptImpl(e,n)}},{key:"readOptionalHelper",value:function(e,t,n){return this.readOptional(e,t)?n.call(this):void 0}},{key:"readByte",value:function(){try{return this._buf.get()}catch(e){throw new Ice.UnmarshalOutOfBoundsException}}},{key:"readByteSeq",value:function(){return this._buf.getArray(this.readAndCheckSeqSize(1))}},{key:"readBool",value:function(){try{return 1===this._buf.get()}catch(e){throw new Ice.UnmarshalOutOfBoundsException}}},{key:"readShort",value:function(){try{return this._buf.getShort()}catch(e){throw new Ice.UnmarshalOutOfBoundsException}}},{key:"readInt",value:function(){try{return this._buf.getInt()}catch(e){throw new Ice.UnmarshalOutOfBoundsException}}},{key:"readLong",value:function(){try{return this._buf.getLong()}catch(e){throw new Ice.UnmarshalOutOfBoundsException}}},{key:"readFloat",value:function(){try{return this._buf.getFloat()}catch(e){throw new Ice.UnmarshalOutOfBoundsException}}},{key:"readDouble",value:function(){try{return this._buf.getDouble()}catch(e){throw new Ice.UnmarshalOutOfBoundsException}}},{key:"readString",value:function(){var e=this.readSize();if(0===e)return"";if(this._buf.remaining<e)throw new Ice.UnmarshalOutOfBoundsException;try{return this._buf.getString(e)}catch(e){throw new Ice.UnmarshalOutOfBoundsException}}},{key:"readProxy",value:function(e){return this._instance.proxyFactory().streamToProxy(this,e)}},{key:"readOptionalProxy",value:function(e,t){return this.readOptional(e,r.FSize)?(this.skip(4),this.readProxy(t)):void 0}},{key:"readEnum",value:function(e){var t;t=this.getEncoding().equals(Ice.Encoding_1_0)?e.maxValue<127?this.readByte():e.maxValue<32767?this.readShort():this.readInt():this.readSize();var n=e.valueOf(t);if(void 0===n)throw new Ice.MarshalException("enumerator value "+t+" is out of range");return n}},{key:"readOptionalEnum",value:function(e,t){return this.readOptional(e,r.Size)?this.readEnum(t):void 0}},{key:"readValue",value:function(e,t){this.initEncaps(),this._encapsStack.decoder.readValue(null===e?null:function(i){null===i||i instanceof t||n.throwUOE(t.ice_staticId(),i),e(i)})}},{key:"readOptionalValue",value:function(e,t,n){this.readOptional(e,r.Class)?this.readValue(t,n):t(void 0)}},{key:"throwException",value:function(){this.initEncaps(),this._encapsStack.decoder.throwException()}},{key:"readOptImpl",value:function(e,t){if(this.isEncoding_1_0())return!1;for(;;){if(this._buf.position>=this._encapsStack.start+this._encapsStack.sz)return!1;var n=this.readByte();if(n===o.OPTIONAL_END_MARKER)return this._buf.position-=1,!1;var i=r.valueOf(7&n),s=n>>3;if(30===s&&(s=this.readSize()),s>e){var a=s<30?1:s<255?2:6;return this._buf.position-=a,!1}if(!(s<e)){if(i!==t)throw new Ice.MarshalException("invalid optional data member `"+s+"': unexpected format");return!0}this.skipOptional(i)}}},{key:"skipOptional",value:function(e){switch(e){case r.F1:this.skip(1);break;case r.F2:this.skip(2);break;case r.F4:this.skip(4);break;case r.F8:this.skip(8);break;case r.Size:this.skipSize();break;case r.VSize:this.skip(this.readSize());break;case r.FSize:this.skip(this.readInt());break;case r.Class:this.readValue(null,Ice.Value);break;default:t.assert(!1)}}},{key:"skipOptionals",value:function(){for(;;){if(this._buf.position>=this._encapsStack.start+this._encapsStack.sz)return;var e=this.readByte(),t=e<0?e+256:e;if(t===o.OPTIONAL_END_MARKER)return;var n=r.valueOf(7&t);t>>3==30&&this.skipSize(),this.skipOptional(n)}}},{key:"skip",value:function(e){if(e>this._buf.remaining)throw new Ice.UnmarshalOutOfBoundsException;this._buf.position+=e}},{key:"skipSize",value:function(){255===this.readByte()&&this.skip(4)}},{key:"isEmpty",value:function(){return this._buf.empty()}},{key:"expand",value:function(e){this._buf.expand(e)}},{key:"createInstance",value:function(t){var n=null;try{var i=t.length>2?t.substr(2).replace(/::/g,"."):"",r=e.type(i);void 0!==r&&(n=new r)}catch(e){throw new Ice.NoValueFactoryException("no value factory",t,e)}return n}},{key:"createUserException",value:function(t){var n=null;try{var i=t.length>2?t.substr(2).replace(/::/g,"."):"",r=e.type(i);void 0!==r&&(n=new r)}catch(e){throw new Ice.MarshalException(e)}return n}},{key:"resolveCompactId",value:function(e){var t=Ice.CompactIdRegistry.get(e);return void 0===t?"":t}},{key:"isEncoding_1_0",value:function(){return null!==this._encapsStack?this._encapsStack.encoding_1_0:this._encoding.equals(Ice.Encoding_1_0)}},{key:"initEncaps",value:function(){null===this._encapsStack&&(this._encapsStack=this._encapsCache,null!==this._encapsStack?this._encapsCache=this._encapsCache.next:this._encapsStack=new f,this._encapsStack.setEncoding(this._encoding),this._encapsStack.sz=this._buf.limit),null===this._encapsStack.decoder&&(this._encapsStack.encoding_1_0?this._encapsStack.decoder=new _(this,this._encapsStack,this._sliceValues,this._valueFactoryManager):this._encapsStack.decoder=new d(this,this._encapsStack,this._sliceValues,this._valueFactoryManager,this._compactIdResolver))}},{key:"traceSkipSlice",value:function(e,t){this._traceSlicing&&null!==this._logger&&s.traceSlicing(t===u.ExceptionSlice?"exception":"object",e,"Slicing",this._logger)}},{key:"valueFactoryManager",get:function(){return this._valueFactoryManager},set:function(e){this._valueFactoryManager=void 0!==e?e:null}},{key:"logger",get:function(){return this._logger},set:function(e){this._logger=void 0!==e?e:null}},{key:"compactIdResolver",get:function(){return this._compactIdResolver},set:function(e){this._compactIdResolver=void 0!==e?e:null}},{key:"sliceValues",get:function(){return this._sliceValues},set:function(e){this._sliceValues=e}},{key:"traceSlicing",get:function(){return this._traceSlicing},set:function(e){this._traceSlicing=e}},{key:"pos",get:function(){return this._buf.position},set:function(e){this._buf.position=e}},{key:"size",get:function(){return this._buf.limit}},{key:"instance",get:function(){return this._instance}},{key:"closure",get:function(){return this._type},set:function(e){this._type=e}},{key:"buffer",get:function(){return this._buf}}]),i}(),v=function(){function e(t,n){_classCallCheck(this,e),this._stream=t,this._encaps=n,this._marshaledMap=new Map,this._typeIdMap=null,this._typeIdIndex=0}return _createClass(e,[{key:"writeOptional",value:function(){return!1}},{key:"writePendingValues",value:function(){}},{key:"registerTypeId",value:function(e){null===this._typeIdMap&&(this._typeIdMap=new Map);var t=this._typeIdMap.get(e);return void 0!==t?t:(this._typeIdMap.set(e,++this._typeIdIndex),-1)}}]),e}(),g=function(e){function n(e,t){var i;return _classCallCheck(this,n),(i=_possibleConstructorReturn(this,_getPrototypeOf(n).call(this,e,t)))._sliceType=u.NoSlice,i._writeSlice=0,i._valueIdIndex=0,i._toBeMarshaledMap=new Map,i}return _inherits(n,v),_createClass(n,[{key:"writeValue",value:function(e){t.assert(void 0!==e),null!==e?this._stream.writeInt(-this.registerValue(e)):this._stream.writeInt(0)}},{key:"writeException",value:function(e){t.assert(null!=e);var n=e._usesClasses();this._stream.writeBool(n),e._write(this._stream),n&&this.writePendingValues()}},{key:"startInstance",value:function(e){this._sliceType=e}},{key:"endInstance",value:function(){this._sliceType===u.ValueSlice&&(this.startSlice(Ice.Value.ice_staticId(),-1,!0),this._stream.writeSize(0),this.endSlice()),this._sliceType=u.NoSlice}},{key:"startSlice",value:function(e){if(this._sliceType===u.ValueSlice){var t=this.registerTypeId(e);t<0?(this._stream.writeBool(!1),this._stream.writeString(e)):(this._stream.writeBool(!0),this._stream.writeSize(t))}else this._stream.writeString(e);this._stream.writeInt(0),this._writeSlice=this._stream.pos}},{key:"endSlice",value:function(){var e=this._stream.pos-this._writeSlice+4;this._stream.rewriteInt(e,this._writeSlice-4)}},{key:"writePendingValues",value:function(){for(var e=this,t=function(t,n){e._stream.writeInt(t);try{n.ice_preMarshal()}catch(t){e._stream.instance.initializationData().logger.warning("exception raised by ice_preMarshal:\n"+t.toString())}n._iceWrite(e._stream)};this._toBeMarshaledMap.size>0;){this._toBeMarshaledMap.forEach(function(t,n){return e._marshaledMap.set(n,t)});var n=this._toBeMarshaledMap;this._toBeMarshaledMap=new Map,this._stream.writeSize(n.size),n.forEach(t)}this._stream.writeSize(0)}},{key:"registerValue",value:function(e){t.assert(null!==e);var n=this._toBeMarshaledMap.get(e);return void 0!==n?n:void 0!==(n=this._marshaledMap.get(e))?n:(this._toBeMarshaledMap.set(e,++this._valueIdIndex),this._valueIdIndex)}}]),n}(),I=function(e){function n(e,t){var i;return _classCallCheck(this,n),(i=_possibleConstructorReturn(this,_getPrototypeOf(n).call(this,e,t)))._current=null,i._valueIdIndex=1,i}return _inherits(n,v),_createClass(n,[{key:"writeValue",value:function(e){if(t.assert(void 0!==e),null===e)this._stream.writeSize(0);else if(null!==this._current&&this._encaps.format===i.SlicedFormat){null===this._current.indirectionTable&&(this._current.indirectionTable=[],this._current.indirectionMap=new Map);var n=this._current.indirectionMap.get(e);if(void 0===n){this._current.indirectionTable.push(e);var r=this._current.indirectionTable.length;this._current.indirectionMap.set(e,r),this._stream.writeSize(r)}else this._stream.writeSize(n)}else this.writeInstance(e)}},{key:"writePendingValues",value:function(){}},{key:"writeException",value:function(e){t.assert(null!=e),e._write(this._stream)}},{key:"startInstance",value:function(e,t){null===this._current?this._current=new n.InstanceData(null):this._current=null===this._current.next?new n.InstanceData(this._current):this._current.next,this._current.sliceType=e,this._current.firstSlice=!0,null!=t&&this.writeSlicedData(t)}},{key:"endInstance",value:function(){this._current=this._current.previous}},{key:"startSlice",value:function(e,n,r){if(t.assert(!(null!==this._current.indirectionTable&&0!==this._current.indirectionTable.length||null!==this._current.indirectionMap&&0!==this._current.indirectionMap.size)),this._current.sliceFlagsPos=this._stream.pos,this._current.sliceFlags=0,this._encaps.format===i.SlicedFormat&&(this._current.sliceFlags|=o.FLAG_HAS_SLICE_SIZE),r&&(this._current.sliceFlags|=o.FLAG_IS_LAST_SLICE),this._stream.writeByte(0),this._current.sliceType===u.ValueSlice){if(this._encaps.format===i.SlicedFormat||this._current.firstSlice)if(n>=0)this._current.sliceFlags|=o.FLAG_HAS_TYPE_ID_COMPACT,this._stream.writeSize(n);else{var s=this.registerTypeId(e);s<0?(this._current.sliceFlags|=o.FLAG_HAS_TYPE_ID_STRING,this._stream.writeString(e)):(this._current.sliceFlags|=o.FLAG_HAS_TYPE_ID_INDEX,this._stream.writeSize(s))}}else this._stream.writeString(e);0!=(this._current.sliceFlags&o.FLAG_HAS_SLICE_SIZE)&&this._stream.writeInt(0),this._current.writeSlice=this._stream.pos,this._current.firstSlice=!1}},{key:"endSlice",value:function(){var e=this;if(0!=(this._current.sliceFlags&o.FLAG_HAS_OPTIONAL_MEMBERS)&&this._stream.writeByte(o.OPTIONAL_END_MARKER),0!=(this._current.sliceFlags&o.FLAG_HAS_SLICE_SIZE)){var n=this._stream.pos-this._current.writeSlice+4;this._stream.rewriteInt(n,this._current.writeSlice-4)}null!==this._current.indirectionTable&&0!==this._current.indirectionTable.length&&(t.assert(this._encaps.format===i.SlicedFormat),this._current.sliceFlags|=o.FLAG_HAS_INDIRECTION_TABLE,this._stream.writeSize(this._current.indirectionTable.length),this._current.indirectionTable.forEach(function(t){return e.writeInstance(t)}),this._current.indirectionTable.length=0,this._current.indirectionMap.clear()),this._stream.rewriteByte(this._current.sliceFlags,this._current.sliceFlagsPos)}},{key:"writeOptional",value:function(e,t){return null===this._current?this._stream.writeOptImpl(e,t):!!this._stream.writeOptImpl(e,t)&&(this._current.sliceFlags|=o.FLAG_HAS_OPTIONAL_MEMBERS,!0)}},{key:"writeSlicedData",value:function(e){var n=this;t.assert(null!=e),this._encaps.format===i.SlicedFormat&&e.slices.forEach(function(e){n.startSlice(e.typeId,e.compactId,e.isLastSlice),n._stream.writeBlob(e.bytes),e.hasOptionalMembers&&(n._current.sliceFlags|=o.FLAG_HAS_OPTIONAL_MEMBERS),null!==e.instances&&e.instances.length>0&&(null===n._current.indirectionTable&&(n._current.indirectionTable=[],n._current.indirectionMap=new Map),e.instances.forEach(function(e){return n._current.indirectionTable.push(e)})),n.endSlice()})}},{key:"writeInstance",value:function(e){t.assert(null!=e);var n=this._marshaledMap.get(e);if(void 0===n){this._marshaledMap.set(e,++this._valueIdIndex);try{e.ice_preMarshal()}catch(e){this._stream.instance.initializationData().logger.warning("exception raised by ice_preMarshal:\n"+e.toString())}this._stream.writeSize(1),e._iceWrite(this._stream)}else this._stream.writeSize(n)}}]),n}();I.InstanceData=function(){return function e(n){_classCallCheck(this,e),t.assert(void 0!==n),null!==n&&(n.next=this),this.previous=n,this.next=null,this.sliceType=null,this.firstSlice=!1,this.sliceFlags=0,this.writeSlice=0,this.sliceFlagsPos=0,this.indirectionTable=null,this.indirectionMap=null}}();var m=function(){function e(){_classCallCheck(this,e),this.start=0,this.format=i.DefaultFormat,this.encoding=null,this.encoding_1_0=!1,this.encoder=null,this.next=null}return _createClass(e,[{key:"reset",value:function(){this.encoder=null}},{key:"setEncoding",value:function(e){this.encoding=e,this.encoding_1_0=e.equals(Ice.Encoding_1_0)}}]),e}(),k=function(){function e(t,n){if(_classCallCheck(this,e),this._instance=null,this._encoding=null,null!=t)if(t.constructor==Ice.Communicator)this._instance=t.instance;else if(t.constructor==Ice.Instance)this._instance=t;else{if(t.constructor!=Ice.EncodingVersion)throw new Ice.InitializationException("unknown argument to OutputStream constructor");this._encoding=t}if(null!=n){if(n.constructor!=Ice.EncodingVersion)throw new Ice.InitializationException("unknown argument to OutputStream constructor");this._encoding=n}this._buf=new Ice.Buffer,this._closure=null,this._encapsStack=null,this._encapsCache=null,null!==this._instance?(null===this._encoding&&(this._encoding=this._instance.defaultsAndOverrides().defaultEncoding),this._format=this._instance.defaultsAndOverrides().defaultFormat):(null===this._encoding&&(this._encoding=o.currentEncoding),this._format=i.CompactFormat)}return _createClass(e,[{key:"reset",value:function(){this._buf.reset(),this.clear()}},{key:"clear",value:function(){null!==this._encapsStack&&(t.assert(this._encapsStack.next),this._encapsStack.next=this._encapsCache,this._encapsCache=this._encapsStack,this._encapsCache.reset(),this._encapsStack=null)}},{key:"finished",value:function(){return this.prepareWrite().getArray(this.size)}},{key:"swap",value:function(e){t.assert(this._instance===e._instance);var n=[this._buf,e._buf];e._buf=n[0],this._buf=n[1];var i=[this._encoding,e._encoding];e._encoding=i[0],this._encoding=i[1];var r=[this._closure,e._closure];e._closure=r[0],this._closure=r[1],this.resetEncapsulation(),e.resetEncapsulation()}},{key:"resetEncapsulation",value:function(){this._encapsStack=null}},{key:"resize",value:function(e){this._buf.resize(e),this._buf.position=e}},{key:"prepareWrite",value:function(){return this._buf.position=0,this._buf}},{key:"startValue",value:function(e){t.assert(null!==this._encapsStack&&null!==this._encapsStack.encoder),this._encapsStack.encoder.startInstance(u.ValueSlice,e)}},{key:"endValue",value:function(){t.assert(null!==this._encapsStack&&null!==this._encapsStack.encoder),this._encapsStack.encoder.endInstance()}},{key:"startException",value:function(e){t.assert(null!==this._encapsStack&&null!==this._encapsStack.encoder),this._encapsStack.encoder.startInstance(u.ExceptionSlice,e)}},{key:"endException",value:function(){t.assert(null!==this._encapsStack&&null!==this._encapsStack.encoder),this._encapsStack.encoder.endInstance()}},{key:"startEncapsulation",value:function(e,t){void 0===e&&(null!==this._encapsStack?(e=this._encapsStack.encoding,t=this._encapsStack.format):(e=this._encoding,t=i.DefaultFormat)),o.checkSupportedEncoding(e);var n=this._encapsCache;null!==n?(n.reset(),this._encapsCache=this._encapsCache.next):n=new m,n.next=this._encapsStack,this._encapsStack=n,this._encapsStack.format=t,this._encapsStack.setEncoding(e),this._encapsStack.start=this._buf.limit,this.writeInt(0),this._encapsStack.encoding._write(this)}},{key:"endEncapsulation",value:function(){t.assert(this._encapsStack);var e=this._encapsStack.start,n=this._buf.limit-e;this._buf.putIntAt(e,n);var i=this._encapsStack;this._encapsStack=i.next,i.next=this._encapsCache,this._encapsCache=i,this._encapsCache.reset()}},{key:"writeEmptyEncapsulation",value:function(e){o.checkSupportedEncoding(e),this.writeInt(6),e._write(this)}},{key:"writeEncapsulation",value:function(e){if(e.length<6)throw new Ice.EncapsulationException;this.expand(e.length),this._buf.putArray(e)}},{key:"getEncoding",value:function(){return null!==this._encapsStack?this._encapsStack.encoding:this._encoding}},{key:"startSlice",value:function(e,n,i){t.assert(null!==this._encapsStack&&null!==this._encapsStack.encoder),this._encapsStack.encoder.startSlice(e,n,i)}},{key:"endSlice",value:function(){t.assert(null!==this._encapsStack&&null!==this._encapsStack.encoder),this._encapsStack.encoder.endSlice()}},{key:"writePendingValues",value:function(){null!==this._encapsStack&&null!==this._encapsStack.encoder?this._encapsStack.encoder.writePendingValues():(null!==this._encapsStack&&this._encapsStack.encoding_1_0||null===this._encapsStack&&this._encoding.equals(Ice.Encoding_1_0))&&this.writeSize(0)}},{key:"writeSize",value:function(e){e>254?(this.expand(5),this._buf.put(255),this._buf.putInt(e)):(this.expand(1),this._buf.put(e))}},{key:"startSize",value:function(){var e=this._buf.position;return this.writeInt(0),e}},{key:"endSize",value:function(e){t.assert(e>=0),this.rewriteInt(this._buf.position-e-4,e)}},{key:"writeBlob",value:function(e){null!==e&&(this.expand(e.length),this._buf.putArray(e))}},{key:"writeOptional",value:function(e,n){return t.assert(null!==this._encapsStack),null!==this._encapsStack.encoder?this._encapsStack.encoder.writeOptional(e,n):this.writeOptImpl(e,n)}},{key:"writeOptionalHelper",value:function(e,t,n,i){void 0!==i&&this.writeOptional(e,t)&&n.call(this,i)}},{key:"writeByte",value:function(e){this.expand(1),this._buf.put(e)}},{key:"rewriteByte",value:function(e,t){this._buf.putAt(t,e)}},{key:"writeByteSeq",value:function(e){null===e||0===e.length?this.writeSize(0):(this.writeSize(e.length),this.expand(e.length),this._buf.putArray(e))}},{key:"writeBool",value:function(e){this.expand(1),this._buf.put(e?1:0)}},{key:"rewriteBool",value:function(e,t){this._buf.putAt(t,e?1:0)}},{key:"writeShort",value:function(e){this.expand(2),this._buf.putShort(e)}},{key:"writeInt",value:function(e){this.expand(4),this._buf.putInt(e)}},{key:"rewriteInt",value:function(e,t){this._buf.putIntAt(t,e)}},{key:"writeLong",value:function(e){this.expand(8),this._buf.putLong(e)}},{key:"writeFloat",value:function(e){this.expand(4),this._buf.putFloat(e)}},{key:"writeDouble",value:function(e){this.expand(8),this._buf.putDouble(e)}},{key:"writeString",value:function(e){null===e||0===e.length?this.writeSize(0):this._buf.writeString(this,e)}},{key:"writeProxy",value:function(e){null!==e?e._write(this):(new Ice.Identity)._write(this)}},{key:"writeOptionalProxy",value:function(e,t){if(void 0!==t&&this.writeOptional(e,r.FSize)){var n=this.startSize();this.writeProxy(t),this.endSize(n)}}},{key:"writeEnum",value:function(e){this.isEncoding_1_0()?e.maxValue<127?this.writeByte(e.value):e.maxValue<32767?this.writeShort(e.value):this.writeInt(e.value):this.writeSize(e.value)}},{key:"writeValue",value:function(e){this.initEncaps(),this._encapsStack.encoder.writeValue(e)}},{key:"writeOptionalValue",value:function(e,t){void 0!==t&&this.writeOptional(e,r.Class)&&this.writeValue(t)}},{key:"writeException",value:function(e){this.initEncaps(),this._encapsStack.encoder.writeException(e)}},{key:"writeUserException",value:function(e){this.WriteException(e)}},{key:"writeOptImpl",value:function(e,t){if(this.isEncoding_1_0())return!1;var n=t.value;return e<30?(n|=e<<3,this.writeByte(n)):(n|=240,this.writeByte(n),this.writeSize(e)),!0}},{key:"isEmpty",value:function(){return this._buf.empty()}},{key:"expand",value:function(e){this._buf.expand(e)}},{key:"isEncoding_1_0",value:function(){return this._encapsStack?this._encapsStack.encoding_1_0:this._encoding.equals(Ice.Encoding_1_0)}},{key:"initEncaps",value:function(){this._encapsStack||(this._encapsStack=this._encapsCache,this._encapsStack?this._encapsCache=this._encapsCache.next:this._encapsStack=new m,this._encapsStack.setEncoding(this._encoding)),this._encapsStack.format===i.DefaultFormat&&(this._encapsStack.format=this._instance.defaultsAndOverrides().defaultFormat),this._encapsStack.encoder||(this._encapsStack.encoding_1_0?this._encapsStack.encoder=new g(this,this._encapsStack):this._encapsStack.encoder=new I(this,this._encapsStack))}},{key:"format",get:function(){return this._format},set:function(e){this._format=e}},{key:"pos",get:function(){return this._buf.position},set:function(e){this._buf.position=e}},{key:"size",get:function(){return this._buf.limit}},{key:"instance",get:function(){return this._instance}},{key:"closure",get:function(){return this._closure},set:function(e){this._closure=e}},{key:"buffer",get:function(){return this._buf}}]),e}(),w=function(e,t,n,i,r,o){var s=function(){function r(){_classCallCheck(this,r)}return _createClass(r,null,[{key:"write",value:function(t,n){return e.call(t,n)}},{key:"read",value:function(e){return t.call(e)}},{key:"writeOptional",value:function(t,n,r){t.writeOptionalHelper(n,i,e,r)}},{key:"readOptional",value:function(e,n){return e.readOptionalHelper(n,i,t)}},{key:"minWireSize",get:function(){return n}}]),r}();return void 0!==r&&void 0!==o&&(s.validate=function(e){return e>=r&&e<=o}),s},C=y.prototype,S=k.prototype;Ice.ByteHelper=w(S.writeByte,C.readByte,1,Ice.OptionalFormat.F1,0,255),Ice.ShortHelper=w(S.writeShort,C.readShort,2,Ice.OptionalFormat.F2,-32768,32767),Ice.IntHelper=w(S.writeInt,C.readInt,4,Ice.OptionalFormat.F4,-2147483648,2147483647),Ice.FloatHelper=w(S.writeFloat,C.readFloat,4,Ice.OptionalFormat.F4,-3.4028234664e38,3.4028234664e38),Ice.FloatHelper.validate=function(e){return Number.isNaN(e)||e==Number.POSITIVE_INFINITY||e==Number.NEGATIVE_INFINITY||e>=-3.4028234664e38&&e<=3.4028234664e38},Ice.DoubleHelper=w(S.writeDouble,C.readDouble,8,Ice.OptionalFormat.F8,-Number.MAX_VALUE,Number.MAX_VALUE),Ice.DoubleHelper.validate=function(e){return Number.isNaN(e)||e==Number.POSITIVE_INFINITY||e==Number.NEGATIVE_INFINITY||e>=-Number.MAX_VALUE&&e<=Number.MAX_VALUE},Ice.BoolHelper=w(S.writeBool,C.readBool,1,Ice.OptionalFormat.F1),Ice.LongHelper=w(S.writeLong,C.readLong,8,Ice.OptionalFormat.F8),Ice.LongHelper.validate=function(e){return e.low>=0&&e.low<=4294967295&&e.high>=0&&e.high<=4294967295},Ice.StringHelper=w(S.writeString,C.readString,1,Ice.OptionalFormat.VSize),Ice.ObjectHelper=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"write",value:function(e,t){e.writeValue(t)}},{key:"read",value:function(e){var t;return e.readValue(function(e){t=e},Ice.Value),t}},{key:"writeOptional",value:function(e,t,n){e.writeOptionalValue(t,Ice.OptionalFormat.Class,S.writeValue,n)}},{key:"readOptional",value:function(e,t){var n;return e.readOptionalValue(t,function(e){n=e},Ice.Value),n}},{key:"minWireSize",get:function(){return 1}}]),e}(),Ice.InputStream=y,Ice.OutputStream=k}(),Ice.SocketOperation={None:0,Read:1,Write:2,Connect:2},function(){var e=Ice.Logger,t=null;Ice.getProcessLogger=function(){return null===t&&(t=new e("","")),t},Ice.setProcessLogger=function(e){t=e}}(),v=Ice.OutputStream,g=Ice.Debug,I=Ice.Protocol,m=28,k=function(){function e(t,n){if(_classCallCheck(this,e),this._batchStreamInUse=!1,this._batchRequestNum=0,this._batchStream=new v(t,I.currentProtocolEncoding),this._batchStream.writeBlob(I.requestBatchHdr),this._batchMarker=this._batchStream.size,this._exception=null,this._maxSize=t.batchAutoFlushSize(),this._maxSize>0&&n){var i=t.initializationData().properties.getPropertyAsIntWithDefault("Ice.UDP.SndSize",65535-m);i<this._maxSize&&(this._maxSize=i)}}return _createClass(e,[{key:"prepareBatchRequest",value:function(e){if(this._exception)throw this._exception;this._batchStream.swap(e)}},{key:"finishBatchRequest",value:function(e,t,n){this._batchStream.swap(e);try{this._maxSize>0&&this._batchStream.size>=this._maxSize&&t.ice_flushBatchRequests(),g.assert(this._batchMarker<this._batchStream.size),this._batchMarker=this._batchStream.size,++this._batchRequestNum}finally{this._batchStream.resize(this._batchMarker)}}},{key:"abortBatchRequest",value:function(e){this._batchStream.swap(e),this._batchStream.resize(this._batchMarker)}},{key:"swap",value:function(e){if(0===this._batchRequestNum)return 0;var t=null;if(this._batchMarker<this._batchStream.size){var n=this._batchStream.size-this._batchMarker;this._batchStream.pos=this._batchMarker,t=this._batchStream.buffer.getArray(n),this._batchStream.resize(this._batchMarker)}var i=this._batchRequestNum;return this._batchStream.swap(e),this._batchRequestNum=0,this._batchStream.writeBlob(I.requestBatchHdr),this._batchMarker=this._batchStream.size,null!==t&&this._batchStream.writeBlob(t),i}},{key:"destroy",value:function(e){this._exception=e}},{key:"isEmpty",value:function(){return this._batchStream.size===I.requestBatchHdr.length}}]),e}(),Ice.BatchRequestQueue=k,function(){var e=Ice.AsyncResultBase,t=Ice.Debug,n=Ice.Protocol,i=Ice.UserException,r=Ice.OutputStream,o=function(o){function s(e,t,i,o,a,c){var u;return _classCallCheck(this,s),(u=_possibleConstructorReturn(this,_getPrototypeOf(s).call(this,e,t,i,o,a)))._completed=c,u._is=null,u._os=null!==e?new r(u._instance,n.currentProtocolEncoding):null,u._state=0,u._exception=null,u._sentSynchronously=!1,u}return _inherits(s,e),_createClass(s,[{key:"cancel",value:function(){this.cancelWithException(new Ice.InvocationCanceledException)}},{key:"isCompleted",value:function(){return(this._state&s.Done)>0}},{key:"isSent",value:function(){return(this._state&s.Sent)>0}},{key:"throwLocalException",value:function(){if(null!==this._exception)throw this._exception}},{key:"sentSynchronously",value:function(){return this._sentSynchronously}},{key:"markSent",value:function(e){t.assert(0==(this._state&s.Done)),this._state|=s.Sent,e&&(this._state|=s.Done|s.OK,this._cancellationHandler=null,this.resolve())}},{key:"markFinished",value:function(e,n){t.assert(0==(this._state&s.Done)),this._state|=s.Done,e&&(this._state|=s.OK),this._cancellationHandler=null,n?n(this):this.resolve()}},{key:"markFinishedEx",value:function(e){t.assert(0==(this._state&s.Done)),this._exception=e,this._state|=s.Done,this._cancellationHandler=null,this.reject(e)}},{key:"cancelWithException",value:function(e){this._cancellationHandler?this._cancellationHandler.asyncRequestCanceled(this,e):this._cancellationException=e}},{key:"cancelable",value:function(e){if(this._cancellationException)try{throw this._cancellationException}finally{this._cancellationException=null}this._cancellationHandler=e}},{key:"getOs",value:function(){return this._os}},{key:"startReadParams",value:function(){return this._is.startEncapsulation(),this._is}},{key:"endReadParams",value:function(){this._is.endEncapsulation()}},{key:"readEmptyParams",value:function(){this._is.skipEmptyEncapsulation()}},{key:"throwUserException",value:function(){if(t.assert(0!=(this._state&s.Done)),0==(this._state&s.OK))try{this._is.startEncapsulation(),this._is.throwException()}catch(e){throw e instanceof i&&this._is.endEncapsulation(),e}}}]),s}();o.OK=1,o.Done=2,o.Sent=4,Ice.AsyncResult=o}(),function(){var e=Ice.StringUtil,t=Ice.Identity,n=Ice.IdentityParseException;Ice.stringToIdentity=function(i){for(var r=new t,o=-1,s=0;-1!==(s=i.indexOf("/",s));){for(var a=0;s-a>0&&"\\"==i.charAt(s-a-1);)a++;if(a%2==0){if(-1!=o)throw new n("unescaped backslash in identity `".concat(i,"'"));o=s}s++}if(-1==o){r.category="";try{r.name=e.unescapeString(i,0,i.length,"/")}catch(e){throw new n("invalid identity name `".concat(i,"': ").concat(e.toString()))}}else{try{r.category=e.unescapeString(i,0,o,"/")}catch(e){throw new n("invalid category in identity `".concat(i,"': ").concat(e.toString()))}if(o+1<i.length)try{r.name=e.unescapeString(i,o+1,i.length,"/")}catch(e){throw new n("invalid name in identity `".concat(i,"': ").concat(e.toString()))}else r.name=""}return r},Ice.identityToString=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ice.ToStringMode.Unicode;return null===t.category||0===t.category.length?e.escapeString(t.name,"/",n):e.escapeString(t.category,"/",n)+"/"+e.escapeString(t.name,"/",n)},Ice.proxyIdentityCompare=function(e,t){if(e===t)return 0;if(null===e&&null!==t)return-1;if(null!==e&&null===t)return 1;var n=e.ice_getIdentity(),i=t.ice_getIdentity(),r=n.name.localeCompare(i.name);return 0!==r?r:n.category.localeCompare(i.category)},Ice.proxyIdentityAndFacetCompare=function(e,t){if(e===t)return 0;if(null===e&&null!==t)return-1;if(null!==e&&null===t)return 1;var n=e.ice_getIdentity(),i=t.ice_getIdentity(),r=n.name.localeCompare(i.name);if(0!==r)return r;if(0!==(r=n.category.localeCompare(i.category)))return r;var o=e.ice_getFacet(),s=t.ice_getFacet();return null===o&&null===s?0:null===o?-1:null===s?1:o.localeCompare(s)}}(),function(){var e=Ice.AsyncStatus,t=Ice.AsyncResult,n=Ice.InputStream,i=Ice.OutputStream,r=Ice.Debug,o=Ice.RetryException,s=Ice.Protocol,a=Ice.Identity,c=function(e){function n(e,t,r,o,a){var c;return _classCallCheck(this,n),(c=_possibleConstructorReturn(this,_getPrototypeOf(n).call(this,e,t,r,o,a)))._os=new i(c._instance,s.currentProtocolEncoding),c}return _inherits(n,t),_createClass(n,[{key:"getOs",value:function(){return this._os}},{key:"sent",value:function(){this.markSent(!0)}},{key:"completedEx",value:function(e){this.markFinishedEx(e)}}]),n}(),u=function(t){function n(e,t){var i;return _classCallCheck(this,n),(i=_possibleConstructorReturn(this,_getPrototypeOf(n).call(this,e.ice_getCommunicator(),t,null,e,null)))._mode=null,i._cnt=0,i._sent=!1,i._handler=null,i}return _inherits(n,c),_createClass(n,[{key:"completedEx",value:function(e){try{this._instance.retryQueue().add(this,this.handleException(e))}catch(e){this.markFinishedEx(e)}}},{key:"retryException",value:function(e){try{this._proxy._updateRequestHandler(this._handler,null),this._instance.retryQueue().add(this,0)}catch(e){this.completedEx(e)}}},{key:"retry",value:function(){this.invokeImpl(!1)}},{key:"abort",value:function(e){this.markFinishedEx(e)}},{key:"invokeImpl",value:function(t){var n=this;try{if(t){var i=this._proxy._getReference().getInvocationTimeout();i>0&&(this._timeoutToken=this._instance.timer().schedule(function(){n.cancelWithException(new Ice.InvocationTimeoutException)},i))}for(;;)try{return this._sent=!1,this._handler=this._proxy._getRequestHandler(),void((this._handler.sendAsyncRequest(this)&e.Sent)>0&&t&&(this._sentSynchronously=!0))}catch(e){if(e instanceof o)this._proxy._updateRequestHandler(this._handler,null);else{var r=this.handleException(e);if(r>0)return void this._instance.retryQueue().add(this,r)}}}catch(e){this.markFinishedEx(e)}}},{key:"markSent",value:function(e){this._sent=!0,e&&this._timeoutToken&&this._instance.timer().cancel(this._timeoutToken),_get(_getPrototypeOf(n.prototype),"markSent",this).call(this,e)}},{key:"markFinishedEx",value:function(e){this._timeoutToken&&this._instance.timer().cancel(this._timeoutToken),_get(_getPrototypeOf(n.prototype),"markFinishedEx",this).call(this,e)}},{key:"handleException",value:function(e){var t={value:0};return this._cnt=this._proxy._handleException(e,this._handler,this._mode,this._sent,t,this._cnt),t.value}}]),n}(),l=function(e){function i(e,t,n){var r;return _classCallCheck(this,i),(r=_possibleConstructorReturn(this,_getPrototypeOf(i).call(this,e,t)))._encoding=s.getCompatibleEncoding(r._proxy._getReference().getEncoding()),r._completed=n,r}return _inherits(i,u),_createClass(i,[{key:"prepare",value:function(e,t,n){s.checkSupportedProtocol(s.getCompatibleProtocol(this._proxy._getReference().getProtocol())),this._mode=t,null===n&&(n=i._emptyContext),this._proxy.ice_isBatchOneway()||this._proxy.ice_isBatchDatagram()?this._proxy._getBatchRequestQueue().prepareBatchRequest(this._os):this._os.writeBlob(s.requestHdr);var r=this._proxy._getReference();r.getIdentity()._write(this._os);var o=r.getFacet();if(null===o||0===o.length?Ice.StringSeqHelper.write(this._os,null):Ice.StringSeqHelper.write(this._os,[o]),this._os.writeString(this._operation),this._os.writeByte(t.value),void 0!==n){if(null!==n&&!(n instanceof Map))throw new RangeError("illegal context value, expecting null or Map");Ice.ContextHelper.write(this._os,n)}else{var a=r.getInstance().getImplicitContext(),c=r.getContext();null===a?Ice.ContextHelper.write(this._os,c):a.write(c,this._os)}}},{key:"sent",value:function(){this.markSent(!this._proxy.ice_isTwoway())}},{key:"invokeRemote",value:function(e,t){return e.sendAsyncRequest(this,t,0)}},{key:"abort",value:function(e){(this._proxy.ice_isBatchOneway()||this._proxy.ice_isBatchDatagram())&&this._proxy._getBatchRequestQueue().abortBatchRequest(this._os),_get(_getPrototypeOf(i.prototype),"abort",this).call(this,e)}},{key:"invoke",value:function(){if(this._proxy.ice_isBatchOneway()||this._proxy.ice_isBatchDatagram())return this._sentSynchronously=!0,this._proxy._getBatchRequestQueue().finishBatchRequest(this._os,this._proxy,this._operation),void this.markFinished(!0);this.invokeImpl(!0)}},{key:"completed",value:function(e){var t;r.assert(this._proxy.ice_isTwoway());try{switch(null===this._is&&(this._is=new n(this._instance,s.currentProtocolEncoding)),this._is.swap(e),t=this._is.readByte()){case s.replyOK:case s.replyUserException:break;case s.replyObjectNotExist:case s.replyFacetNotExist:case s.replyOperationNotExist:var i=new a;i._read(this._is);var o,c=Ice.StringSeqHelper.read(this._is);if(c.length>0){if(c.length>1)throw new Ice.MarshalException;o=c[0]}else o="";var u=this._is.readString(),l=null;switch(t){case s.replyObjectNotExist:l=new Ice.ObjectNotExistException;break;case s.replyFacetNotExist:l=new Ice.FacetNotExistException;break;case s.replyOperationNotExist:l=new Ice.OperationNotExistException;break;default:r.assert(!1)}throw l.id=i,l.facet=o,l.operation=u,l;case s.replyUnknownException:case s.replyUnknownLocalException:case s.replyUnknownUserException:var h=this._is.readString(),_=null;switch(t){case s.replyUnknownException:_=new Ice.UnknownException;break;case s.replyUnknownLocalException:_=new Ice.UnknownLocalException;break;case s.replyUnknownUserException:_=new Ice.UnknownUserException;break;default:r.assert(!1)}throw _.unknown=h,_;default:throw new Ice.UnknownReplyStatusException}this.markFinished(t==s.replyOK,this._completed)}catch(e){this.completedEx(e)}}},{key:"startWriteParams",value:function(e){return this._os.startEncapsulation(this._encoding,e),this._os}},{key:"endWriteParams",value:function(){this._os.endEncapsulation()}},{key:"writeEmptyParams",value:function(){this._os.writeEmptyEncapsulation(this._encoding)}},{key:"startReadParams",value:function(){return this._is.startEncapsulation(),this._is}},{key:"endReadParams",value:function(){this._is.endEncapsulation()}},{key:"readEmptyParams",value:function(){this._is.skipEmptyEncapsulation()}},{key:"throwUserException",value:function(){if(r.assert(0!=(this._state&t.Done)),0==(this._state&t.OK))try{this._is.startEncapsulation(),this._is.throwException()}catch(e){throw e instanceof Ice.UserException&&this._is.endEncapsulation(),e}}}]),i}();l._emptyContext=new Map;var h=function(t){function n(e,t){var i;return _classCallCheck(this,n),(i=_possibleConstructorReturn(this,_getPrototypeOf(n).call(this,e,t)))._batchRequestNum=e._getBatchRequestQueue().swap(i._os),i}return _inherits(n,u),_createClass(n,[{key:"invokeRemote",value:function(t,n){return 0===this._batchRequestNum?(this.sent(),e.Sent):t.sendAsyncRequest(this,n,this._batchRequestNum)}},{key:"invoke",value:function(){s.checkSupportedProtocol(s.getCompatibleProtocol(this._proxy._getReference().getProtocol())),this.invokeImpl(!0)}}]),n}(),_=function(t){function n(){return _classCallCheck(this,n),_possibleConstructorReturn(this,_getPrototypeOf(n).apply(this,arguments))}return _inherits(n,u),_createClass(n,[{key:"invokeRemote",value:function(t,n){return this.markFinished(!0,function(e){return e.resolve(t)}),e.Sent}},{key:"invoke",value:function(){this.invokeImpl(!0)}}]),n}(),d=function(t){function n(e,t,i){return _classCallCheck(this,n),_possibleConstructorReturn(this,_getPrototypeOf(n).call(this,t,i,e,null,null))}return _inherits(n,c),_createClass(n,[{key:"invoke",value:function(){try{var t,n=this._connection.getBatchRequestQueue().swap(this._os);0===n?(this.sent(),t=e.Sent):t=this._connection.sendAsyncRequest(this,!1,n),(t&e.Sent)>0&&(this._sentSynchronously=!0)}catch(e){this.completedEx(e)}}}]),n}(),p=function(t){function n(e,t){return _classCallCheck(this,n),_possibleConstructorReturn(this,_getPrototypeOf(n).call(this,t,"heartbeat",e,null,null))}return _inherits(n,c),_createClass(n,[{key:"invoke",value:function(){try{this._os.writeBlob(s.magic),s.currentProtocol._write(this._os),s.currentProtocolEncoding._write(this._os),this._os.writeByte(s.validateConnectionMsg),this._os.writeByte(0),this._os.writeInt(s.headerSize),(this._connection.sendAsyncRequest(this,!1,0)&e.Sent)>0&&(this._sentSynchronously=!0)}catch(e){this.completedEx(e)}}}]),n}();Ice.OutgoingAsync=l,Ice.ProxyFlushBatch=h,Ice.ProxyGetConnection=_,Ice.ConnectionFlushBatch=d,Ice.HeartbeatAsync=p}(),function(){var e=Ice.ArrayUtil,t=Ice.AsyncResultBase,n=Ice.Debug,i=Ice.OutgoingAsync,r=Ice.ProxyFlushBatch,o=Ice.ProxyGetConnection,s=Ice.ReferenceMode,a=Ice.OperationMode,c=function(){function c(){_classCallCheck(this,c),this._reference=null,this._requestHandler=null}return _createClass(c,[{key:"hashCode",value:function(e){return this._reference.hashCode()}},{key:"ice_getCommunicator",value:function(){return this._reference.getCommunicator()}},{key:"toString",value:function(){return this._reference.toString()}},{key:"ice_getIdentity",value:function(){return this._reference.getIdentity().clone()}},{key:"ice_identity",value:function(e){if(null==e||0===e.name.length)throw new Ice.IllegalIdentityException;if(e.equals(this._reference.getIdentity()))return this;var t=new c;return t._setup(this._reference.changeIdentity(e)),t}},{key:"ice_getContext",value:function(){return new Map(this._reference.getContext())}},{key:"ice_context",value:function(e){return this._newInstance(this._reference.changeContext(e))}},{key:"ice_getFacet",value:function(){return this._reference.getFacet()}},{key:"ice_facet",value:function(e){if(null==e&&(e=""),e===this._reference.getFacet())return this;var t=new c;return t._setup(this._reference.changeFacet(e)),t}},{key:"ice_getAdapterId",value:function(){return this._reference.getAdapterId()}},{key:"ice_adapterId",value:function(e){return null==e&&(e=""),e===this._reference.getAdapterId()?this:this._newInstance(this._reference.changeAdapterId(e))}},{key:"ice_getEndpoints",value:function(){return e.clone(this._reference.getEndpoints())}},{key:"ice_endpoints",value:function(t){return null==t&&(t=[]),e.equals(t,this._reference.getEndpoints())?this:this._newInstance(this._reference.changeEndpoints(t))}},{key:"ice_getLocatorCacheTimeout",value:function(){return this._reference.getLocatorCacheTimeout()}},{key:"ice_locatorCacheTimeout",value:function(e){if(e<-1)throw new RangeError("invalid value passed to ice_locatorCacheTimeout: "+e);return e===this._reference.getLocatorCacheTimeout()?this:this._newInstance(this._reference.changeLocatorCacheTimeout(e))}},{key:"ice_getInvocationTimeout",value:function(){return this._reference.getInvocationTimeout()}},{key:"ice_invocationTimeout",value:function(e){if(e<1&&-1!==e)throw new RangeError("invalid value passed to ice_invocationTimeout: "+e);return e===this._reference.getInvocationTimeout()?this:this._newInstance(this._reference.changeInvocationTimeout(e))}},{key:"ice_isConnectionCached",value:function(){return this._reference.getCacheConnection()}},{key:"ice_connectionCached",value:function(e){return e===this._reference.getCacheConnection()?this:this._newInstance(this._reference.changeCacheConnection(e))}},{key:"ice_getEndpointSelection",value:function(){return this._reference.getEndpointSelection()}},{key:"ice_endpointSelection",value:function(e){return e===this._reference.getEndpointSelection()?this:this._newInstance(this._reference.changeEndpointSelection(e))}},{key:"ice_isSecure",value:function(){return this._reference.getSecure()}},{key:"ice_secure",value:function(e){return e===this._reference.getSecure()?this:this._newInstance(this._reference.changeSecure(e))}},{key:"ice_getEncodingVersion",value:function(){return this._reference.getEncoding().clone()}},{key:"ice_encodingVersion",value:function(e){return e.equals(this._reference.getEncoding())?this:this._newInstance(this._reference.changeEncoding(e))}},{key:"ice_isPreferSecure",value:function(){return this._reference.getPreferSecure()}},{key:"ice_preferSecure",value:function(e){return e===this._reference.getPreferSecure()?this:this._newInstance(this._reference.changePreferSecure(e))}},{key:"ice_getRouter",value:function(){var e=this._reference.getRouterInfo();return null!==e?e.getRouter():null}},{key:"ice_router",value:function(e){var t=this._reference.changeRouter(e);return t.equals(this._reference)?this:this._newInstance(t)}},{key:"ice_getLocator",value:function(){var e=this._reference.getLocatorInfo();return null!==e?e.getLocator():null}},{key:"ice_locator",value:function(e){var t=this._reference.changeLocator(e);return t.equals(this._reference)?this:this._newInstance(t)}},{key:"ice_isTwoway",value:function(){return this._reference.getMode()===s.ModeTwoway}},{key:"ice_twoway",value:function(){return this._reference.getMode()===s.ModeTwoway?this:this._newInstance(this._reference.changeMode(s.ModeTwoway))}},{key:"ice_isOneway",value:function(){return this._reference.getMode()===s.ModeOneway}},{key:"ice_oneway",value:function(){return this._reference.getMode()===s.ModeOneway?this:this._newInstance(this._reference.changeMode(s.ModeOneway))}},{key:"ice_isBatchOneway",value:function(){return this._reference.getMode()===s.ModeBatchOneway}},{key:"ice_batchOneway",value:function(){return this._reference.getMode()===s.ModeBatchOneway?this:this._newInstance(this._reference.changeMode(s.ModeBatchOneway))}},{key:"ice_isDatagram",value:function(){return this._reference.getMode()===s.ModeDatagram}},{key:"ice_datagram",value:function(){return this._reference.getMode()===s.ModeDatagram?this:this._newInstance(this._reference.changeMode(s.ModeDatagram))}},{key:"ice_isBatchDatagram",value:function(){return this._reference.getMode()===s.ModeBatchDatagram}},{key:"ice_batchDatagram",value:function(){return this._reference.getMode()===s.ModeBatchDatagram?this:this._newInstance(this._reference.changeMode(s.ModeBatchDatagram))}},{key:"ice_timeout",value:function(e){if(e<1&&-1!==e)throw new RangeError("invalid value passed to ice_timeout: "+e);var t=this._reference.changeTimeout(e);return t.equals(this._reference)?this:this._newInstance(t)}},{key:"ice_getTimeout",value:function(){return this._reference.getTimeout()}},{key:"ice_fixed",value:function(e){if(null===e)throw new RangeError("invalid null connection passed to ice_fixed");if(!(e instanceof Ice.ConnectionI))throw new RangeError("invalid connection passed to ice_fixed");var t=this._reference.changeConnection(e);return t.equals(this._reference)?this:this._newInstance(t)}},{key:"ice_isFixed",value:function(){return this._reference instanceof Ice.FixedReference}},{key:"ice_getConnectionId",value:function(){return this._reference.getConnectionId()}},{key:"ice_connectionId",value:function(e){var t=this._reference.changeConnectionId(e);return t.equals(this._reference)?this:this._newInstance(t)}},{key:"ice_getConnection",value:function(){var e=new o(this,"ice_getConnection");try{e.invoke()}catch(t){e.abort(t)}return e}},{key:"ice_getCachedConnection",value:function(){return this._requestHandler?this._requestHandler.getConnection():null}},{key:"ice_flushBatchRequests",value:function(){var e=new r(this,"ice_flushBatchRequests");try{e.invoke()}catch(t){e.abort(t)}return e}},{key:"equals",value:function(e){return this===e||e instanceof c&&this._reference.equals(e._reference)}},{key:"_write",value:function(e){this._reference.getIdentity()._write(e),this._reference.streamWrite(e)}},{key:"_getReference",value:function(){return this._reference}},{key:"_copyFrom",value:function(e){n.assert(null===this._reference),n.assert(null===this._requestHandler),this._reference=e._reference,this._requestHandler=e._requestHandler}},{key:"_handleException",value:function(e,t,n,i,r,o){if(this._updateRequestHandler(t,null),!(e instanceof Ice.LocalException&&(!i||n==a.Nonmutating||n==a.Idempotent||e instanceof Ice.CloseConnectionException||e instanceof Ice.ObjectNotExistException)))throw e;try{return this._reference.getInstance().proxyFactory().checkRetryAfterException(e,this._reference,r,o)}catch(t){throw t instanceof Ice.CommunicatorDestroyedException?e:t}}},{key:"_checkAsyncTwowayOnly",value:function(e){if(!this.ice_isTwoway())throw new Ice.TwowayOnlyException(e)}},{key:"_getRequestHandler",value:function(){return this._reference.getCacheConnection()&&this._requestHandler?this._requestHandler:this._reference.getRequestHandler(this)}},{key:"_getBatchRequestQueue",value:function(){return this._batchRequestQueue||(this._batchRequestQueue=this._reference.getBatchRequestQueue()),this._batchRequestQueue}},{key:"_setRequestHandler",value:function(e){return this._reference.getCacheConnection()?(this._requestHandler||(this._requestHandler=e),this._requestHandler):e}},{key:"_updateRequestHandler",value:function(e,t){this._reference.getCacheConnection()&&null!==e&&this._requestHandler&&this._requestHandler!==t&&(this._requestHandler=this._requestHandler.update(e,t))}},{key:"_setup",value:function(e){n.assert(null===this._reference),this._reference=e}},{key:"_newInstance",value:function(e){var t=new this.constructor;return t._setup(e),t}},{key:"ice_instanceof",value:function(e){return!!e&&(this instanceof e||this.constructor._instanceof(e))}}],[{key:"_invoke",value:function(e,t,n,r,o,s,a,c,u){var l=this;(null!==a||c.length>0)&&e._checkAsyncTwowayOnly(t);var h=new i(e,t,function(e){l._completed(e,a,c)});try{if(h.prepare(t,n,o),null===s)h.writeEmptyParams();else s(h.startWriteParams(r),u),h.endWriteParams();h.invoke()}catch(e){h.abort(e)}return h}},{key:"_completed",value:function(e,t,n){if(this._check(e,n))try{null===t?(e.readEmptyParams(),e.resolve()):e.resolve(t(e))}catch(t){this.dispatchLocalException(e,t)}}},{key:"_check",value:function(e,t){try{e.throwUserException()}catch(i){if(i instanceof Ice.UserException){if(null!==t)for(var n=0;n<t.length;++n)if(i instanceof t[n])return e.reject(i),!1;return e.reject(new Ice.UnknownUserException(i.ice_id())),!1}return e.reject(i),!1}return!0}},{key:"dispatchLocalException",value:function(e,t){e.reject(t)}},{key:"checkedCast",value:function(e,n,i){var r=this,o=null;return null==e?(o=new t(null,"checkedCast",null,null,null)).resolve(null):(void 0!==n&&(e=e.ice_facet(n)),o=new t(e.ice_getCommunicator(),"checkedCast",null,e,null),e.ice_isA(this.ice_staticId(),i).then(function(t){if(t){var n=new r;n._copyFrom(e),o.resolve(n)}else o.resolve(null)}).catch(function(e){e instanceof Ice.FacetNotExistException?o.resolve(null):o.reject(e)})),o}},{key:"uncheckedCast",value:function(e,t){var n=null;return null!=e&&(n=new this,void 0!==t&&(e=e.ice_facet(t)),n._copyFrom(e)),n}},{key:"write",value:function(e,t){e.writeProxy(t)}},{key:"read",value:function(e){return e.readProxy(this)}},{key:"writeOptional",value:function(e,t,n){e.writeOptionalProxy(t,n)}},{key:"readOptional",value:function(e,t){return e.readOptionalProxy(t,this)}},{key:"_instanceof",value:function(e){if(e===this)return!0;for(var t in this._implements)if(this._implements[t]._instanceof(e))return!0;return!1}},{key:"ice_staticId",value:function(){return this._id}},{key:"minWireSize",get:function(){return 2}},{key:"_implements",get:function(){return[]}}]),c}();Ice.ObjectPrx=c}(),function(){var e=Ice.StringUtil,t=Ice.PropertyNames,n=Ice.Debug,i=Ice.getProcessLogger,r=Ice.InitializationException,o=function(){function o(e,t){if(_classCallCheck(this,o),this._properties=new Map,null!=t){var n=!0,i=!1,r=void 0;try{for(var s,a=t._properties[Symbol.iterator]();!(n=(s=a.next()).done);n=!0){var c=_slicedToArray(s.value,2),u=c[0],l=c[1];this._properties.set(u,{value:l.value,used:!1})}}catch(e){i=!0,r=e}finally{try{n||null==a.return||a.return()}finally{if(i)throw r}}}if(null!=e){var h=this.parseIceCommandLineOptions(e);e.length=0;for(var _=0;_<h.length;++_)e.push(h[_])}}return _createClass(o,[{key:"getProperty",value:function(e){return this.getPropertyWithDefault(e,"")}},{key:"getPropertyWithDefault",value:function(e,t){var n=this._properties.get(e);return void 0!==n?(n.used=!0,n.value):t}},{key:"getPropertyAsInt",value:function(e){return this.getPropertyAsIntWithDefault(e,0)}},{key:"getPropertyAsIntWithDefault",value:function(e,t){var n=this._properties.get(e);return void 0!==n?(n.used=!0,parseInt(n.value)):t}},{key:"getPropertyAsList",value:function(e){return this.getPropertyAsListWithDefault(e,0)}},{key:"getPropertyAsListWithDefault",value:function(t,n){null==n&&(n=[]);var r=this._properties.get(t);if(void 0!==r){r.used=!0;var o=e.splitString(r.value,", \t\r\n");return null===o?(i().warning("mismatched quotes in property "+t+"'s value, returning default value"),n):(0===o.length&&(o=n),o)}return n}},{key:"getPropertiesForPrefix",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=new Map;return this._properties.forEach(function(n,i){0===i.indexOf(e)&&(n.used=!0,t.set(i,n.value))}),t}},{key:"setProperty",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";null!==e&&(e=e.trim());var s=i();if(null===e||0===e.length)throw new r("Attempt to set property with empty key");var a=e.indexOf(".");if(-1!==a)for(var c=e.substr(0,a),u=0;u<t.validProps.length;++u){var l=t.validProps[u][0].pattern;if(a=l.indexOf("."),n.assert(-1!=a),l.substring(0,a-1)==c){for(var h=!1,_=!1,d=void 0,p=0;p<t.validProps[u][p].length&&!h;++p){l=t.validProps[u][p].pattern();var f=new RegExp(l);if((h=f.test(e))&&t.validProps[u][p].deprecated&&(s.warning("deprecated property: "+e),null!==t.validProps[u][p].deprecatedBy&&(e=t.validProps[u][p].deprecatedBy)),h)break;if(h=(f=new RegExp(l.toUpperCase())).test(e.toUpperCase())){_=!0,d=(d=(d=l.substr(2)).substr(0,d.length-1)).replace(/\\/g,"");break}}h?_&&s.warning("unknown property: `"+e+"'; did you mean `"+d+"'"):s.warning("unknown property: "+e)}}if(null!==o&&o.length>0){var y=this._properties.get(e);void 0!==y?y.value=o:this._properties.set(e,{value:o,used:!1})}else this._properties.delete(e)}},{key:"getCommandLineOptions",value:function(){var e=[];return this._properties.forEach(function(t,n){e.push("--"+n+"="+t.value)}),e}},{key:"parseCommandLineOptions",value:function(e,t){var n=this;e.length>0&&"."!=e.charAt(e.length-1)&&(e+="."),e="--"+e;var i=[];return t.forEach(function(t){0===t.indexOf(e)?(-1===t.indexOf("=")&&(t+="=1"),n.parseLine(t.substring(2))):i.push(t)}),i}},{key:"parseIceCommandLineOptions",value:function(e){for(var n=e.slice(),i=0;i<t.clPropNames.length;++i)n=this.parseCommandLineOptions(t.clPropNames[i],n);return n}},{key:"parse",value:function(e){var t=this;e.match(/[^\r\n]+/g).forEach(function(e){return t.parseLine(e)})}},{key:"parseLine",value:function(e){for(var t="",r="",o=0,s="",a="",c=!1,u=0;u<e.length;++u){var l=e.charAt(u);switch(o){case 0:switch(l){case"\\":if(u<e.length-1)switch(l=e.charAt(++u)){case"\\":case"#":case"=":t+=s,s="",t+=l;break;case" ":0!==t.length&&(s+=l);break;default:t+=s,s="",t+="\\",t+=l}else t+=s,t+=l;break;case" ":case"\t":case"\r":case"\n":0!==t.length&&(s+=l);break;case"=":s="",o=1;break;case"#":c=!0;break;default:t+=s,s="",t+=l}break;case 1:switch(l){case"\\":if(u<e.length-1)switch(l=e.charAt(++u)){case"\\":case"#":case"=":r+=0===r.length?a:s,s="",a="",r+=l;break;case" ":s+=l,a+=l;break;default:r+=0===r.length?a:s,s="",a="",r+="\\",r+=l}else r+=0===r.length?a:s,r+=l;break;case" ":case"\t":case"\r":case"\n":0!==r.length&&(s+=l);break;case"#":c=!0;break;default:r+=0===r.length?a:s,s="",a="",r+=l}break;default:n.assert(!1)}if(c)break}r+=a,0===o&&0!==t.length||1==o&&0===t.length?i().warning('invalid config file entry: "'+e+'"'):0!==t.length&&this.setProperty(t,r)}},{key:"clone",value:function(){return new o(null,this)}},{key:"getUnusedProperties",value:function(){var e=[];return this._properties.forEach(function(t,n){t.used||e.push(n)}),e}}],[{key:"createProperties",value:function(e,t){return new o(e,t)}}]),o}();Ice.Properties=o}(),Ice.EndpointSelectionType=N.defineEnum([["Random",0],["Ordered",1]]),w=function(){function e(t,n,i,r){_classCallCheck(this,e),this._instance=t,this._traceLevel=t.traceLevels().network,this._traceCategory=t.traceLevels().networkCat,this._logger=t.initializationData().logger,this._properties=t.initializationData().properties,this._type=n,this._protocol=i,this._secure=r}return _createClass(e,[{key:"traceLevel",value:function(){return this._traceLevel}},{key:"traceCategory",value:function(){return this._traceCategory}},{key:"logger",value:function(){return this._logger}},{key:"protocol",value:function(){return this._protocol}},{key:"type",value:function(){return this._type}},{key:"secure",value:function(){return this._secure}},{key:"properties",value:function(){return this._properties}},{key:"defaultHost",value:function(){return this._instance.defaultsAndOverrides().defaultHost}},{key:"defaultSourceAddress",value:function(){return this._instance.defaultsAndOverrides().defaultSourceAddress}},{key:"defaultEncoding",value:function(){return this._instance.defaultsAndOverrides().defaultEncoding}},{key:"defaultTimeout",value:function(){return this._instance.defaultsAndOverrides().defaultTimeout}},{key:"messageSizeMax",value:function(){return this._instance.messageSizeMax()}}]),e}(),Ice.ProtocolInstance=w,N.defineSequence(Ice,"EndpointSeqHelper","Ice.ObjectHelper",!1,"Ice.Endpoint"),Object.defineProperty(Ice,"TCPEndpointType",{value:1}),Object.defineProperty(Ice,"SSLEndpointType",{value:2}),Object.defineProperty(Ice,"UDPEndpointType",{value:3}),Object.defineProperty(Ice,"WSEndpointType",{value:4}),Object.defineProperty(Ice,"WSSEndpointType",{value:5}),Object.defineProperty(Ice,"BTEndpointType",{value:6}),Object.defineProperty(Ice,"BTSEndpointType",{value:7}),Object.defineProperty(Ice,"iAPEndpointType",{value:8}),Object.defineProperty(Ice,"iAPSEndpointType",{value:9}),Ice.EndpointInfo=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];_classCallCheck(this,e),this.underlying=t,this.timeout=n,this.compress=i},Ice.IPEndpointInfo=function(e){function t(e,n,i){var r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"";return _classCallCheck(this,t),(r=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e,n,i))).host=o,r.port=s,r.sourceAddress=a,r}return _inherits(t,Ice.EndpointInfo),t}(),Ice.TCPEndpointInfo=function(e){function t(e,n,i,r,o,s){return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e,n,i,r,o,s))}return _inherits(t,Ice.IPEndpointInfo),t}(),Ice.UDPEndpointInfo=function(e){function t(e,n,i,r,o,s){var a,c=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"",u=arguments.length>7&&void 0!==arguments[7]?arguments[7]:0;return _classCallCheck(this,t),(a=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e,n,i,r,o,s))).mcastInterface=c,a.mcastTtl=u,a}return _inherits(t,Ice.IPEndpointInfo),t}(),Ice.WSEndpointInfo=function(e){function t(e,n,i){var r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";return _classCallCheck(this,t),(r=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e,n,i))).resource=o,r}return _inherits(t,Ice.EndpointInfo),t}(),Ice.OpaqueEndpointInfo=function(e){function t(e,n,i){var r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new Ice.EncodingVersion,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;return _classCallCheck(this,t),(r=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e,n,i))).rawEncoding=o,r.rawBytes=s,r}return _inherits(t,Ice.EndpointInfo),t}(),function(){var e=Ice.AsyncStatus,t=Ice.ConnectionRequestHandler,n=Ice.Debug,i=Ice.RetryException,r=Ice.ReferenceMode,o=Ice.LocalException,s=function(){function s(e,t){_classCallCheck(this,s),this._reference=e,this._response=e.getMode()===r.ModeTwoway,this._proxy=t,this._proxies=[],this._initialized=!1,this._connection=null,this._exception=null,this._requests=[]}return _createClass(s,[{key:"connect",value:function(e){return this.initialized()||this._proxies.push(e),this._requestHandler?this._requestHandler:this}},{key:"update",value:function(e,t){return e===this?t:this}},{key:"sendAsyncRequest",value:function(t){return this._initialized||t.cancelable(this),this.initialized()?t.invokeRemote(this._connection,this._response):(this._requests.push(t),e.Queued)}},{key:"asyncRequestCanceled",value:function(e,t){if(null===this._exception){if(!this.initialized()){for(var i=0;i<this._requests.length;i++)if(this._requests[i]===e)return e.completedEx(t),void this._requests.splice(i,1);n.assert(!1)}this._connection.asyncRequestCanceled(e,t)}}},{key:"getReference",value:function(){return this._reference}},{key:"getConnection",value:function(){if(null!==this._exception)throw this._exception;return this._connection}},{key:"setConnection",value:function(e){var t=this;n.assert(null===this._exception&&null===this._connection),this._connection=e;var i=this._reference.getRouterInfo();null===i?this.flushRequests():i.addProxy(this._proxy).then(function(){return t.flushRequests()},function(e){return t.setException(e)})}},{key:"setException",value:function(e){var t=this;n.assert(!this._initialized&&null===this._exception),this._exception=e,this._proxies.length=0,this._proxy=null;try{this._reference.getInstance().requestHandlerFactory().removeRequestHandler(this._reference,this)}catch(e){}this._requests.forEach(function(e){null!==e&&e.completedEx(t._exception)}),this._requests.length=0}},{key:"initialized",value:function(){if(this._initialized)return n.assert(null!==this._connection),!0;if(null!==this._exception){if(null!==this._connection)return!0;throw this._exception}return this._initialized}},{key:"flushRequests",value:function(){var e=this;n.assert(null!==this._connection&&!this._initialized);var r=null;this._requests.forEach(function(t){try{t.invokeRemote(e._connection,e._response)}catch(s){s instanceof i?(r=s.inner,e._reference.getInstance().requestHandlerFactory().removeRequestHandler(e._reference,e),t.retryException(s.inner)):(n.assert(s instanceof o),r=s,t.out.completedEx(s))}}),this._requests.length=0,this._reference.getCacheConnection()&&null===r&&(this._requestHandler=new t(this._reference,this._connection),this._proxies.forEach(function(t){return t._updateRequestHandler(e,e._requestHandler)})),n.assert(!this._initialized),this._exception=r,this._initialized=null===this._exception,this._reference.getInstance().requestHandlerFactory().removeRequestHandler(this._reference,this),this._proxies.length=0,this._proxy=null}}]),s}();Ice.ConnectRequestHandler=s}(),C=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"toString",value:function(){return this.protocol()+this.options()}},{key:"initWithOptions",value:function(e){for(var t=[],n="`"+this.protocol(),i=0;i<e.length;++i)-1!==e[i].search(/[ \t\n\r]+/)?n+=' "'+e[i]+'"':n+=" "+e[i];n+="'";for(var r=0;r<e.length;){var o=e[r++];if(o.length<2||"-"!=o.charAt(0))t.push(o);else{var s=null;r<e.length&&"-"!=e[r].charAt(0)&&(s=e[r++]),this.checkOption(o,s,n)||(t.push(o),null!==s&&t.push(s))}}e.length=0;for(var a=0;a<t.length;a++)e.push(t[a])}},{key:"equals",value:function(t){return t instanceof e&&0===this.compareTo(t)}},{key:"checkOption",value:function(){return!1}}]),e}(),Ice.EndpointI=C,S=function(){function e(t,n,i,r){_classCallCheck(this,e),this._instance=t,this._queue=n,this._outAsync=i}return _createClass(e,[{key:"run",value:function(){this._outAsync.retry(),this._queue.remove(this)}},{key:"destroy",value:function(){try{this._outAsync.abort(new Ice.CommunicatorDestroyedException)}catch(e){}}},{key:"asyncRequestCanceled",value:function(e,t){this._queue.cancel(this)&&(this._instance.traceLevels().retry>=1&&this._instance.initializationData().logger.trace(this._instance.traceLevels().retryCat,"operation retry canceled\n"+t.toString()),this._outAsync.completedEx(t))}}]),e}(),x=function(){function e(t){_classCallCheck(this,e),this._instance=t,this._requests=[]}return _createClass(e,[{key:"add",value:function(e,t){if(null===this._instance)throw new Ice.CommunicatorDestroyedException;var n=new S(this._instance,this,e);e.cancelable(n),n.token=this._instance.timer().schedule(function(){return n.run()},t),this._requests.push(n)}},{key:"destroy",value:function(){var e=this;this._requests.forEach(function(t){e._instance.timer().cancel(t.token),t.destroy()}),this._requests=[],this._instance=null}},{key:"remove",value:function(e){var t=this._requests.indexOf(e);t>=0&&this._requests.splice(t,1)}},{key:"cancel",value:function(e){var t=this._requests.indexOf(e);return t>=0&&(this._requests.splice(t,1),this._instance.timer().cancel(e.token))}}]),e}(),Ice.RetryQueue=x,function(){var e=Ice.Debug,t=Ice.HashMap,n=function(){function n(i){_classCallCheck(this,n),this._router=i,e.assert(null!==this._router),this._clientEndpoints=null,this._adapter=null,this._identities=new t(t.compareEquals),this._evictedIdentities=[],this._hasRoutingTable=!1}return _createClass(n,[{key:"destroy",value:function(){this._clientEndpoints=[],this._adapter=null,this._identities.clear()}},{key:"equals",value:function(e){return this===e||e instanceof n&&this._router.equals(e._router)}},{key:"hashCode",value:function(){return this._router.hashCode()}},{key:"getRouter",value:function(){return this._router}},{key:"getClientEndpoints",value:function(){var e=this,t=new Ice.Promise;return null!==this._clientEndpoints?t.resolve(this._clientEndpoints):this._router.getClientProxy().then(function(n){return e.setClientEndpoints(n[0],void 0===n[1]||n[1],t)}).catch(t.reject),t}},{key:"getServerEndpoints",value:function(){return this._router.getServerProxy().then(function(e){if(null===e)throw new Ice.NoEndpointException;return(e=e.ice_router(null))._getReference().getEndpoints()})}},{key:"addProxy",value:function(t){var n=this;return e.assert(null!==t),this._hasRoutingTable?this._identities.has(t.ice_getIdentity())?Ice.Promise.resolve():this._router.addProxies([t]).then(function(e){n.addAndEvictProxies(t,e)}):Ice.Promise.resolve()}},{key:"setAdapter",value:function(e){this._adapter=e}},{key:"getAdapter",value:function(){return this._adapter}},{key:"clearCache",value:function(e){this._identities.delete(e.getIdentity())}},{key:"setClientEndpoints",value:function(e,t,n){var i=this;null===this._clientEndpoints?(this._hasRoutingTable=t,null===e?(this._clientEndpoints=this._router._getReference().getEndpoints(),n.resolve(this._clientEndpoints)):(e=e.ice_router(null),this._router.ice_getConnection().then(function(t){i._clientEndpoints=e.ice_timeout(t.timeout())._getReference().getEndpoints(),n.resolve(i._clientEndpoints)}).catch(n.reject))):n.resolve(this._clientEndpoints)}},{key:"addAndEvictProxies",value:function(e,t){var n=this,i=this._evictedIdentities.findIndex(function(t){return t.equals(e.ice_getIdentity())});i>=0?this._evictedIdentities.splice(i,1):this._identities.set(e.ice_getIdentity(),1),t.forEach(function(e){n._identities.delete(e.ice_getIdentity())})}}]),n}();Ice.RouterInfo=n}(),Ice.CompressBatch=N.defineEnum([["Yes",0],["No",1],["BasedOnProxy",2]]),Ice.ConnectionInfo=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";_classCallCheck(this,e),this.underlying=t,this.incoming=n,this.adapterName=i,this.connectionId=r},Ice.ACMClose=N.defineEnum([["CloseOff",0],["CloseOnIdle",1],["CloseOnInvocation",2],["CloseOnInvocationAndIdle",3],["CloseOnIdleForceful",4]]),Ice.ACMHeartbeat=N.defineEnum([["HeartbeatOff",0],["HeartbeatOnDispatch",1],["HeartbeatOnIdle",2],["HeartbeatAlways",3]]),Ice.ACM=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ice.ACMClose.CloseOff,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ice.ACMHeartbeat.HeartbeatOff;_classCallCheck(this,e),this.timeout=t,this.close=n,this.heartbeat=i},N.defineStruct(Ice.ACM,!0,!0),Ice.ConnectionClose=N.defineEnum([["Forcefully",0],["Gracefully",1],["GracefullyWithWait",2]]),Ice.IPConnectionInfo=function(e){function t(e,n,i,r){var o,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:-1,c=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"",u=arguments.length>7&&void 0!==arguments[7]?arguments[7]:-1;return _classCallCheck(this,t),(o=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e,n,i,r))).localAddress=s,o.localPort=a,o.remoteAddress=c,o.remotePort=u,o}return _inherits(t,Ice.ConnectionInfo),t}(),Ice.TCPConnectionInfo=function(e){function t(e,n,i,r,o,s,a,c){var u,l=arguments.length>8&&void 0!==arguments[8]?arguments[8]:0,h=arguments.length>9&&void 0!==arguments[9]?arguments[9]:0;return _classCallCheck(this,t),(u=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e,n,i,r,o,s,a,c))).rcvSize=l,u.sndSize=h,u}return _inherits(t,Ice.IPConnectionInfo),t}(),Ice.UDPConnectionInfo=function(e){function t(e,n,i,r,o,s,a,c){var u,l=arguments.length>8&&void 0!==arguments[8]?arguments[8]:"",h=arguments.length>9&&void 0!==arguments[9]?arguments[9]:-1,_=arguments.length>10&&void 0!==arguments[10]?arguments[10]:0,d=arguments.length>11&&void 0!==arguments[11]?arguments[11]:0;return _classCallCheck(this,t),(u=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e,n,i,r,o,s,a,c))).mcastAddress=l,u.mcastPort=h,u.rcvSize=_,u.sndSize=d,u}return _inherits(t,Ice.IPConnectionInfo),t}(),N.defineDictionary(Ice,"HeaderDict","HeaderDictHelper","Ice.StringHelper","Ice.StringHelper",!1,void 0,void 0),Ice.WSConnectionInfo=function(e){function t(e,n,i,r){var o,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;return _classCallCheck(this,t),(o=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e,n,i,r))).headers=s,o}return _inherits(t,Ice.ConnectionInfo),t}(),function(){var e=Ice._ModuleRegistry,t=[Ice.ByteHelper,Ice.BoolHelper,Ice.ShortHelper,Ice.IntHelper,Ice.LongHelper,Ice.FloatHelper,Ice.DoubleHelper,Ice.StringHelper,Ice.Value,Ice.ObjectPrx,Ice.Value];function n(n){var i=n[0],r=_typeof(i);return"number"===r?i=t[n[0]]:"string"===r&&(i=e.type(i)),{type:i,isObject:!0===n[1],tag:n[2]}}function i(e,t){var i,r={};r.name=e,r.servantMethod=t[0]?t[0]:e,r.mode=t[1]?Ice.OperationMode.valueOf(t[1]):Ice.OperationMode.Normal,r.sendMode=t[2]?Ice.OperationMode.valueOf(t[2]):Ice.OperationMode.Normal,r.format=t[3]?Ice.FormatType.valueOf(t[3]):Ice.FormatType.DefaultFormat,t[4]&&((i=n(t[4])).pos=0),r.returns=i;var o=[],s=[];if(t[5])for(var a=0;a<t[5].length;++a){var c=n(t[5][a]);c.pos=a,o.push(c),c.tag&&s.push(c)}s.sort(function(e,t){return e.tag-t.tag}),r.inParams=o,r.inParamsOpt=s;var u=[],l=[];if(t[6])for(var h=i?1:0,_=0;_<t[6].length;++_){var d=n(t[6][_]);d.pos=_+h,u.push(d),d.tag&&l.push(d)}i&&i.tag&&l.push(i),l.sort(function(e,t){return e.tag-t.tag}),r.outParams=u,r.outParamsOpt=l;var p=[];if(t[7])for(var f=0;f<t[7].length;++f)p.push(t[7][f]);return r.exceptions=p,r.sendsClasses=!0===t[8],r.returnsClasses=!0===t[9],r}var r=function(){function e(t){_classCallCheck(this,e),this.raw=t,this.parsed={}}return _createClass(e,[{key:"find",value:function(e){var t=this.parsed[e];return void 0===t&&void 0!==this.raw[e]&&(t=i(e,this.raw[e]),this.parsed[e]=t),t}}]),e}();function o(e,t,n,i,r,o,s){for(var a=function(t,n){n?t.isObject?e.readOptionalValue(t.tag,function(e){o[t.pos+s]=e},t.type):o[t.pos+s]=t.type.readOptional(e,t.tag):t.isObject?e.readValue(function(e){o[t.pos+s]=e},t.type):o[t.pos+s]=t.type.read(e)},c=0;c<n.length;++c)n[c].tag||a(n[c],!1);t&&a(t,!1);for(var u=0;u<i.length;++u)a(i[u],!0);r&&e.readPendingValues()}function s(e,t,n,i,r,o){for(var s=0;s<i.length;++s){var a=i[s];a.tag||a.type.write(e,t[a.pos])}n&&n.type.write(e,t[n.pos]);for(var c=0;c<r.length;++c){var u=r[c];u.type.writeOptional(e,u.tag,t[u.pos])}o&&e.writePendingValues()}function a(e,t,n){for(var i,r=0;void 0===i&&r<e.length;++r){var o=e[r];void 0===(i=o[t])&&(-1===n.indexOf(o)&&n.push(o),o._iceImplements&&(i=a(o._iceImplements,t,n)))}return i}var c="_iceD_";function u(e,t){var n,i=c+t,r=e[i];if(void 0===r){n=[];for(var u=e;u&&void 0===r;)u._iceImplements&&(r=a(u._iceImplements,i,n)),u=Object.getPrototypeOf(u);void 0!==r&&(e[i]=r)}if(void 0===r){var l,h;if(e._iceOps&&(l=e._iceOps.find(t)),void 0===l){for(var _=Object.getPrototypeOf(e);void 0===l&&_;)_._iceOps&&void 0!==(l=_._iceOps.find(t))&&(h=_),_=Object.getPrototypeOf(_);for(var d=0;void 0===l&&d<n.length;++d){var p=n[d];p._iceOps&&void 0!==(l=p._iceOps.find(t))&&(h=p)}}void 0!==l&&(r=function(e,t,n){return function(e,t,n,i){var r=e[t.servantMethod];if(void 0===r||"function"!=typeof r)throw new Ice.UnknownException("servant for identity "+i.adapter.getCommunicator().identityToString(i.id)+" does not define operation `"+t.servantMethod+"'");var a=[];0===t.inParams.length?n.readEmptyParams():(o(n.startReadParams(),void 0,t.inParams,t.inParamsOpt,t.sendsClasses,a,0),n.endReadParams()),a.push(i),n.setFormat(t.format);var c=function(e){var i=t.outParams.length+(t.returns?1:0);if(i>1&&!(e instanceof Array))throw new Ice.MarshalException("operation `"+t.servantMethod+"' should return an array");if(1===i&&(e=[e]),void 0===t.returns&&0===t.outParams.length){if(e&&e.length>0)throw new Ice.MarshalException("operation `"+t.servantMethod+"' shouldn't return any value");n.writeEmptyParams()}else{var r;t.returns&&!t.returns.tag&&(r=t.returns),s(n.startWriteParams(),e,r,t.outParams,t.outParamsOpt,t.returnsClasses),n.endWriteParams()}},u=r.apply(e,a);return u instanceof Promise?u.then(c):(c(u),null)}(e,l,t,n)},e[i]=r,h&&(h[i]=r))}return r}function l(e,t,n){var r=n[0]?n[0]:t,a=null;e.prototype[r]=function(){null===a&&(a=i(t,n));for(var e=arguments.length,r=new Array(e),c=0;c<e;c++)r[c]=arguments[c];var u=r[a.inParams.length],l=null;a.inParams.length>0&&(l=function(e,t){for(var n=0;n<a.inParams.length;++n){var i=a.inParams[n],r=t[i.pos];if(!(i.tag&&void 0===r||"function"!=typeof i.type.validate||i.type.validate(r)))throw new Ice.MarshalException("invalid value for argument "+(n+1)+" in operation `"+a.servantMethod+"'")}s(e,t,void 0,a.inParams,a.inParamsOpt,a.sendsClasses)});var h=null;return(a.returns||a.outParams.length>0)&&(h=function(e){var t,n=[],i=e.startReadParams();return a.returns&&!a.returns.tag&&(t=a.returns),o(i,t,a.outParams,a.outParamsOpt,a.returnsClasses,n,0),e.endReadParams(),1==n.length?n[0]:n}),Ice.ObjectPrx._invoke(this,a.name,a.sendMode,a.format,u,l,h,a.exceptions,Array.prototype.slice.call(r))}}var h=Ice.Slice;h.defineOperations=function(e,t,n,i,o){if(o&&(e._iceOps=new r(o)),e.prototype._iceDispatch=function(t,n){var i=u(e,n.operation);if(void 0===i||"function"!=typeof i)throw new Ice.OperationNotExistException(n.id,n.facet,n.operation);return i.call(i,this,t,n)},e.prototype._iceMostDerivedType=function(){return e},Object.defineProperty(e,"_iceIds",{get:function(){return n}}),Object.defineProperty(e,"_iceId",{get:function(){return n[i]}}),e.ice_staticId=function(){return e._iceId},void 0!==t){if(o)for(var s in o)l(t,s,o[s]);if(t._implements)for(var a in t._implements){var c=t._implements[a].prototype;for(var h in c)"function"==typeof c[h]&&void 0===t.prototype[h]&&(t.prototype[h]=c[h])}Object.defineProperty(t,"_id",{get:function(){return n[i]}})}},h.defineOperations(Ice.Object,Ice.ObjectPrx,["::Ice::Object"],0,{ice_ping:[void 0,1,1,void 0,void 0,void 0,void 0,void 0],ice_isA:[void 0,1,1,void 0,[1],[[7]],void 0,void 0],ice_id:[void 0,1,1,void 0,[7],void 0,void 0,void 0],ice_ids:[void 0,1,1,void 0,["Ice.StringSeqHelper"],void 0,void 0,void 0]})}(),function(){Ice.Router=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).apply(this,arguments))}return _inherits(t,Ice.Object),t}(),Ice.RouterPrx=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).apply(this,arguments))}return _inherits(t,Ice.ObjectPrx),t}(),N.defineOperations(Ice.Router,Ice.RouterPrx,["::Ice::Object","::Ice::Router"],1,{getClientProxy:[,2,1,,[9],,[[1,,1]],,,],getServerProxy:[,2,1,,[9],,,,,],addProxies:[,2,2,,["Ice.ObjectProxySeqHelper"],[["Ice.ObjectProxySeqHelper"]],,,,]});Ice.RouterFinder=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).apply(this,arguments))}return _inherits(t,Ice.Object),t}(),Ice.RouterFinderPrx=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).apply(this,arguments))}return _inherits(t,Ice.ObjectPrx),t}(),N.defineOperations(Ice.RouterFinder,Ice.RouterFinderPrx,["::Ice::Object","::Ice::RouterFinder"],1,{getRouter:[,,,,["Ice.RouterPrx"],,,,,]})}(),function(){var e=Ice.OutputStream,t=Ice.Current,n=Ice.Debug,i=Ice.Context,r=Ice.Identity,o=Ice.Protocol,s=Ice.StringUtil,a=function(){function a(e,n,i,o,s){_classCallCheck(this,a),this._instance=e,this._response=o,this._connection=n,this._format=Ice.FormatType.DefaultFormat,this._current=new t,this._current.id=new r,this._current.adapter=i,this._current.con=this._connection,this._current.requestId=s,this._servant=null,this._locator=null,this._cookie={value:null},this._os=null,this._is=null}return _createClass(a,[{key:"startWriteParams",value:function(){if(!this._response)throw new Ice.MarshalException("can't marshal out parameters for oneway dispatch");return n.assert(null!==this._current.encoding),this._os=new e(this._instance,o.currentProtocolEncoding),this._os.writeBlob(o.replyHdr),this._os.writeInt(this._current.requestId),this._os.writeByte(0),this._os.startEncapsulation(this._current.encoding,this._format),this._os}},{key:"endWriteParams",value:function(){this._response&&this._os.endEncapsulation()}},{key:"writeEmptyParams",value:function(){this._response&&(n.assert(null!==this._current.encoding),this._os=new e(this._instance,o.currentProtocolEncoding),this._os.writeBlob(o.replyHdr),this._os.writeInt(this._current.requestId),this._os.writeByte(o.replyOK),this._os.writeEmptyEncapsulation(this._current.encoding))}},{key:"writeParamEncaps",value:function(t,i){this._response&&(n.assert(null!==this._current.encoding),this._os=new e(this._instance,o.currentProtocolEncoding),this._os.writeBlob(o.replyHdr),this._os.writeInt(this._current.requestId),this._os.writeByte(i?o.replyOK:o.replyUserException),null===t||0===t.length?this._os.writeEmptyEncapsulation(this._current.encoding):this._os.writeEncapsulation(t))}},{key:"setFormat",value:function(e){this._format=e}},{key:"warning",value:function(e){n.assert(null!==this._instance);var t=[];if(t.push("dispatch exception:"),t.push("\nidentity: "+Ice.identityToString(this._current.id,this._instance.toStringMode())),t.push("\nfacet: "+s.escapeString(this._current.facet,"",this._instance.toStringMode())),t.push("\noperation: "+this._current.operation),null!==this._connection)try{for(var i=this._connection.getInfo();i;i=i.underlying)i instanceof Ice.IPConnectionInfo&&t.push("\nremote host: "+i.remoteAddress+" remote port: "+i.remotePort)}catch(e){}e.stack&&(t.push("\n"),t.push(e.stack)),this._instance.initializationData().logger.warning(t.join(""))}},{key:"handleException",value:function(t,i){n.assert(null!==this._connection);var r=this._instance.initializationData().properties;if(t instanceof Ice.RequestFailedException)null===t.id&&(t.id=this._current.id),null===t.facet&&(t.facet=this._current.facet),null!==t.operation&&0!==t.operation.length||(t.operation=this._current.operation),r.getPropertyAsIntWithDefault("Ice.Warn.Dispatch",1)>1&&this.warning(t),this._response?(this._os=new e(this._instance,o.currentProtocolEncoding),this._os.writeBlob(o.replyHdr),this._os.writeInt(this._current.requestId),t instanceof Ice.ObjectNotExistException?this._os.writeByte(o.replyObjectNotExist):t instanceof Ice.FacetNotExistException?this._os.writeByte(o.replyFacetNotExist):t instanceof Ice.OperationNotExistException?this._os.writeByte(o.replyOperationNotExist):n.assert(!1),t.id._write(this._os),null===t.facet||0===t.facet.length?Ice.StringSeqHelper.write(this._os,null):Ice.StringSeqHelper.write(this._os,[t.facet]),this._os.writeString(t.operation),this._connection.sendResponse(this._os)):this._connection.sendNoResponse();else if(t instanceof Ice.UnknownLocalException)r.getPropertyAsIntWithDefault("Ice.Warn.Dispatch",1)>0&&this.warning(t),this._response?(this._os=new e(this._instance,o.currentProtocolEncoding),this._os.writeBlob(o.replyHdr),this._os.writeInt(this._current.requestId),this._os.writeByte(o.replyUnknownLocalException),this._os.writeString(t.unknown),this._connection.sendResponse(this._os)):this._connection.sendNoResponse();else if(t instanceof Ice.UnknownUserException)r.getPropertyAsIntWithDefault("Ice.Warn.Dispatch",1)>0&&this.warning(t),this._response?(this._os=new e(this._instance,o.currentProtocolEncoding),this._os.writeBlob(o.replyHdr),this._os.writeInt(this._current.requestId),this._os.writeByte(o.replyUnknownUserException),this._os.writeString(t.unknown),this._connection.sendResponse(this._os)):this._connection.sendNoResponse();else if(t instanceof Ice.UnknownException)r.getPropertyAsIntWithDefault("Ice.Warn.Dispatch",1)>0&&this.warning(t),this._response?(this._os=new e(this._instance,o.currentProtocolEncoding),this._os.writeBlob(o.replyHdr),this._os.writeInt(this._current.requestId),this._os.writeByte(o.replyUnknownException),this._os.writeString(t.unknown),this._connection.sendResponse(this._os)):this._connection.sendNoResponse();else if(t instanceof Ice.LocalException)if(r.getPropertyAsIntWithDefault("Ice.Warn.Dispatch",1)>0&&this.warning(t),this._response){this._os=new e(this._instance,o.currentProtocolEncoding),this._os.writeBlob(o.replyHdr),this._os.writeInt(this._current.requestId),this._os.writeByte(o.replyUnknownLocalException);var s=[t.ice_id()];t.stack&&(s.push("\n"),s.push(t.stack)),this._os.writeString(s.join("")),this._connection.sendResponse(this._os)}else this._connection.sendNoResponse();else t instanceof Ice.UserException?this._response?(this._os=new e(this._instance,o.currentProtocolEncoding),this._os.writeBlob(o.replyHdr),this._os.writeInt(this._current.requestId),this._os.writeByte(o.replyUserException),this._os.startEncapsulation(this._current.encoding,this._format),this._os.writeException(t),this._os.endEncapsulation(),this._connection.sendResponse(this._os)):this._connection.sendNoResponse():(r.getPropertyAsIntWithDefault("Ice.Warn.Dispatch",1)>0&&this.warning(t),this._response?(this._os=new e(this._instance,o.currentProtocolEncoding),this._os.writeBlob(o.replyHdr),this._os.writeInt(this._current.requestId),this._os.writeByte(o.replyUnknownException),this._os.writeString(t.toString()+(t.stack?"\n"+t.stack:"")),this._connection.sendResponse(this._os)):this._connection.sendNoResponse());this._connection=null}},{key:"invoke",value:function(e,t){var r=this;this._is=t,this._current.id._read(this._is);var o=Ice.StringSeqHelper.read(this._is);if(o.length>0){if(o.length>1)throw new Ice.MarshalException;this._current.facet=o[0]}else this._current.facet="";this._current.operation=this._is.readString(),this._current.mode=Ice.OperationMode.valueOf(this._is.readByte()),this._current.ctx=new i;for(var s=this._is.readSize();s-- >0;)this._current.ctx.set(this._is.readString(),this._is.readString());if(null!==e&&(this._servant=e.findServant(this._current.id,this._current.facet),null===this._servant&&(this._locator=e.findServantLocator(this._current.id.category),null===this._locator&&this._current.id.category.length>0&&(this._locator=e.findServantLocator("")),null!==this._locator)))try{this._servant=this._locator.locate(this._current,this._cookie)}catch(e){return this.skipReadParams(),void this.handleException(e,!1)}if(null===this._servant)try{throw null!==e&&e.hasServant(this._current.id)?new Ice.FacetNotExistException(this._current.id,this._current.facet,this._current.operation):new Ice.ObjectNotExistException(this._current.id,this._current.facet,this._current.operation)}catch(e){return this.skipReadParams(),void this.handleException(e,!1)}try{n.assert(null!==this._servant);var a=this._servant._iceDispatch(this,this._current);if(null!==a)return void a.then(function(){return r.completed(null,!0)},function(e){return r.completed(e,!0)});n.assert(!this._response||null!==this._os),this.completed(null,!1)}catch(e){this.completed(e,!1)}}},{key:"startReadParams",value:function(){return this._current.encoding=this._is.startEncapsulation(),this._is}},{key:"endReadParams",value:function(){this._is.endEncapsulation()}},{key:"readEmptyParams",value:function(){this._current.encoding=this._is.skipEmptyEncapsulation()}},{key:"readParamEncaps",value:function(){return this._current.encoding=new Ice.EncodingVersion,this._is.readEncapsulation(this._current.encoding)}},{key:"skipReadParams",value:function(){this._current.encoding=this._is.skipEncapsulation()}},{key:"completed",value:function(e,t){try{if(null!==this._locator){n.assert(null!==this._locator&&null!==this._servant);try{this._locator.finished(this._current,this._servant,this._cookie.value)}catch(e){return void this.handleException(e,t)}}n.assert(null!==this._connection),null!==e?this.handleException(e,t):this._response?this._connection.sendResponse(this._os):this._connection.sendNoResponse()}catch(e){if(!(e instanceof Ice.LocalException))throw e;this._connection.invokeException(e,1)}this._connection=null}}]),a}();Ice.IncomingAsync=a}(),function(){var e=Ice.Debug,t=function e(t,n,i,r){if(_classCallCheck(this,e),void 0===t)return this.timeout=6e4,this.heartbeat=Ice.ACMHeartbeat.HeartbeatOnDispatch,void(this.close=Ice.ACMClose.CloseOnInvocationAndIdle);var o;o="Ice.ACM.Client"!=i&&"Ice.ACM.Server"!=i||0!==t.getProperty(i+".Timeout").length?i+".Timeout":i,this.timeout=1e3*t.getPropertyAsIntWithDefault(o,r.timeout/1e3),this.timeout<0&&(n.warning("invalid value for property `"+o+"', default value will be used instead"),this.timeout=r.timeout);var s=t.getPropertyAsIntWithDefault(i+".Heartbeat",r.heartbeat.value);s>=0&&s<=Ice.ACMHeartbeat.maxValue?this.heartbeat=Ice.ACMHeartbeat.valueOf(s):(n.warning("invalid value for property `"+i+".Heartbeat', default value will be used instead"),this.heartbeat=r.heartbeat);var a=t.getPropertyAsIntWithDefault(i+".Close",r.close.value);a>=0&&a<=Ice.ACMClose.maxValue?this.close=Ice.ACMClose.valueOf(a):(n.warning("invalid value for property `"+i+".Close', default value will be used instead"),this.close=r.close)},n=function(){function n(e,t){_classCallCheck(this,n),this._instance=e,this._config=t,this._reapedConnections=[],this._connections=[]}return _createClass(n,[{key:"destroy",value:function(){null!==this._instance&&(this._instance=null)}},{key:"add",value:function(e){var t=this;0!==this._config.timeout&&(this._connections.push(e),1==this._connections.length&&(this._timerToken=this._instance.timer().scheduleRepeated(function(){return t.runTimerTask()},this._config.timeout/2)))}},{key:"remove",value:function(t){if(0!==this._config.timeout){var n=this._connections.indexOf(t);e.assert(n>=0),this._connections.splice(n,1),0===this._connections.length&&this._instance.timer().cancel(this._timerToken)}}},{key:"reap",value:function(e){this._reapedConnections.push(e)}},{key:"acm",value:function(n,r,o){e.assert(null!==this._instance);var s=new t;return s.timeout=this._config.timeout,s.close=this._config.close,s.heartbeat=this._config.heartbeat,void 0!==n&&(s.timeout=1e3*n),void 0!==r&&(s.close=r),void 0!==o&&(s.heartbeat=o),new i(this,this._instance.timer(),s)}},{key:"getACM",value:function(){return new Ice.ACM(this._config.timeout/1e3,this._config.close,this._config.heartbeat)}},{key:"swapReapedConnections",value:function(){if(0===this._reapedConnections.length)return null;var e=this._reapedConnections;return this._reapedConnections=[],e}},{key:"runTimerTask",value:function(){var e=this;if(null!==this._instance){var t=Date.now();this._connections.forEach(function(n){try{n.monitor(t,e._config)}catch(t){e.handleException(t)}})}else this._connections=null}},{key:"handleException",value:function(e){null!==this._instance&&this._instance.initializationData().logger.error("exception in connection monitor:\n"+e)}}]),n}(),i=function(){function t(e,n,i){_classCallCheck(this,t),this._parent=e,this._timer=n,this._config=i,this._connection=null}return _createClass(t,[{key:"add",value:function(t){var n=this;e.assert(null===this._connection),this._connection=t,this._config.timeout>0&&(this._timerToken=this._timer.scheduleRepeated(function(){return n.runTimerTask()},this._config.timeout/2))}},{key:"remove",value:function(t){e.assert(this._connection===t),this._connection=null,this._config.timeout>0&&this._timer.cancel(this._timerToken)}},{key:"reap",value:function(e){this._parent.reap(e)}},{key:"acm",value:function(e,t,n){return this._parent.acm(e,t,n)}},{key:"getACM",value:function(){return new Ice.ACM(this._config.timeout/1e3,this._config.close,this._config.heartbeat)}},{key:"runTimerTask",value:function(){try{this._connection.monitor(Date.now(),this._config)}catch(e){this._parent.handleException(e)}}}]),t}();Ice.FactoryACMMonitor=n,Ice.ACMConfig=t}(),Ice.Process=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).apply(this,arguments))}return _inherits(t,Ice.Object),t}(),Ice.ProcessPrx=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).apply(this,arguments))}return _inherits(t,Ice.ObjectPrx),t}(),N.defineOperations(Ice.Process,Ice.ProcessPrx,["::Ice::Object","::Ice::Process"],1,{shutdown:[,,,,,,,,,],writeMessage:[,,,,,[[7],[3]],,,,]}),function(){var e=Ice.HashMap,t=Ice.Debug,n=function e(t,n){_classCallCheck(this,e),this.time=t,this.endpoints=n},i=function e(t,n){_classCallCheck(this,e),this.time=t,this.reference=n},r=function(){function r(){_classCallCheck(this,r),this._adapterEndpointsTable=new Map,this._objectTable=new e(e.compareEquals)}return _createClass(r,[{key:"clear",value:function(){this._adapterEndpointsTable.clear(),this._objectTable.clear()}},{key:"getAdapterEndpoints",value:function(e,t,n){if(0===t)return n.value=!1,null;var i=this._adapterEndpointsTable.get(e);return void 0!==i?(n.value=this.checkTTL(i.time,t),i.endpoints):(n.value=!1,null)}},{key:"addAdapterEndpoints",value:function(e,t){this._adapterEndpointsTable.set(e,new n(Date.now(),t))}},{key:"removeAdapterEndpoints",value:function(e){var t=this._adapterEndpointsTable.get(e);return this._adapterEndpointsTable.delete(e),void 0!==t?t.endpoints:null}},{key:"getObjectReference",value:function(e,t,n){if(0===t)return n.value=!1,null;var i=this._objectTable.get(e);return void 0!==i?(n.value=this.checkTTL(i.time,t),i.reference):(n.value=!1,null)}},{key:"addObjectReference",value:function(e,t){this._objectTable.set(e,new i(Date.now(),t))}},{key:"removeObjectReference",value:function(e){var t=this._objectTable.get(e);return this._objectTable.delete(e),void 0!==t?t.reference:null}},{key:"checkTTL",value:function(e,n){return t.assert(0!==n),n<0||Date.now()-e<=1e3*n}}]),r}();Ice.LocatorTable=r}(),Ice.Address=function e(t,n){_classCallCheck(this,e),this.host=t,this.port=n},function(){var e=Ice.Address,t=Ice.HashUtil,n=Ice.StringUtil,i=Ice.EndpointParseException,r=function(r){function o(e,t,n,i,r){var s;return _classCallCheck(this,o),(s=_possibleConstructorReturn(this,_getPrototypeOf(o).call(this)))._instance=e,s._host=void 0===t?null:t,s._port=void 0===n?0:n,s._sourceAddr=void 0===i?null:i,s._connectionId=void 0===r?"":r,s}return _inherits(o,Ice.EndpointI),_createClass(o,[{key:"streamWrite",value:function(e){e.startEncapsulation(),this.streamWriteImpl(e),e.endEncapsulation()}},{key:"getInfo",value:function(){var e=new Ice.IPEndpointInfo;return this.fillEndpointInfo(e),e}},{key:"type",value:function(){return this._instance.type()}},{key:"protocol",value:function(){return this._instance.protocol()}},{key:"secure",value:function(){return this._instance.secure()}},{key:"connectionId",value:function(){return this._connectionId}},{key:"changeConnectionId",value:function(e){return e===this._connectionId?this:this.createEndpoint(this._host,this._port,e)}},{key:"hashCode",value:function(){return void 0===this._hashCode&&(this._hashCode=this.hashInit(5381)),this._hashCode}},{key:"options",value:function(){var e="";if(null!==this._host&&this._host.length>0){e+=" -h ";var t=-1!=this._host.indexOf(":");t&&(e+='"'),e+=this._host,t&&(e+='"')}if(e+=" -p "+this._port,null!==this._sourceAddr&&this._sourceAddr.length>0){e+=" --sourceAddress ";var n=-1!=this._sourceAddr.indexOf(":");n&&(e+='"'),e+=this._sourceAddr,n&&(e+='"')}return e}},{key:"compareTo",value:function(e){return this===e?0:null===e?1:e instanceof o?this._port<e._port?-1:e._port<this._port?1:this._host!=e._host?this._host<e._host?-1:1:this._sourceAddr!=e._sourceAddr?this._sourceAddr<e._sourceAddr?-1:1:this._connectionId!=e._connectionId?this._connectionId<e._connectionId?-1:1:0:this.type()<e.type()?-1:1}},{key:"getAddress",value:function(){return new e(this._host,this._port)}},{key:"toConnectorString",value:function(){return this._host+":"+this._port}},{key:"streamWriteImpl",value:function(e){e.writeString(this._host),e.writeInt(this._port)}},{key:"hashInit",value:function(e){return e=t.addNumber(e,this.type()),e=t.addString(e,this._host),e=t.addNumber(e,this._port),e=t.addString(e,this._sourceAddr),e=t.addString(e,this._connectionId)}},{key:"fillEndpointInfo",value:function(e){var t=this;e.type=function(){return t.type()},e.datagram=function(){return t.datagram()},e.secure=function(){return t.secure()},e.host=this._host,e.port=this._port,e.sourceAddress=this._sourceAddr}},{key:"initWithOptions",value:function(e,t){if(_get(_getPrototypeOf(o.prototype),"initWithOptions",this).call(this,e),null===this._host||0===this._host.length)this._host=this._instance.defaultHost();else if("*"==this._host){if(!t)throw new i("`-h *' not valid for proxy endpoint `"+this+"'");this._host=""}if(null===this._host&&(this._host=""),null===this._sourceAddr)t||(this._sourceAddr=this._instance.defaultSourceAddress());else if(t)throw new i("`--sourceAddress not valid for object adapter endpoint `"+this+"'")}},{key:"initWithStream",value:function(e){this._host=e.readString(),this._port=e.readInt()}},{key:"checkOption",value:function(e,t,r){if("-h"===e){if(null===t)throw new i("no argument provided for -h option in endpoint "+r);this._host=t}else if("-p"===e){if(null===t)throw new i("no argument provided for -p option in endpoint "+r);try{this._port=n.toInt(t)}catch(e){throw new i("invalid port value `"+t+"' in endpoint "+r)}if(this._port<0||this._port>65535)throw new i("port value `"+t+"' out of range in endpoint "+r)}else{if("--sourceAddress"!==e)return!1;if(null===t)throw new i("no argument provided for --sourceAddress option in endpoint "+r);this._sourceAddr=t}return!0}}]),o}();Ice.IPEndpointI=r}(),IceSSL.EndpointInfo=function(e){function t(e,n,i){return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e,n,i))}return _inherits(t,Ice.EndpointInfo),t}(),Ice.ToStringMode=Ice.Slice.defineEnum([["Unicode",0],["ASCII",1],["Compat",2]]),Ice.TraceLevels=function(e){var t="Ice.Trace.",n=e.getPropertyAsInt(t+"Network"),i=e.getPropertyAsInt(t+"Protocol"),r=e.getPropertyAsInt(t+"Retry"),o=e.getPropertyAsInt(t+"Locator"),s=e.getPropertyAsInt(t+"Slicing");return e.getPropertyAsInt(t+"ThreadPool"),function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"network",get:function(){return n}},{key:"networkCat",get:function(){return"Network"}},{key:"protocol",get:function(){return i}},{key:"protocolCat",get:function(){return"Protocol"}},{key:"retry",get:function(){return r}},{key:"retryCat",get:function(){return"Retry"}},{key:"location",get:function(){return o}},{key:"locationCat",get:function(){return"Locator"}},{key:"slicing",get:function(){return s}},{key:"slicingCat",get:function(){return"Slicing"}}]),e}()},function(){var e=Ice.AsyncStatus,t=Ice.AsyncResultBase,n=Ice.InputStream,i=Ice.OutputStream,r=Ice.BatchRequestQueue,o=Ice.ConnectionFlushBatch,s=Ice.HeartbeatAsync,a=Ice.Debug,c=Ice.ExUtil,u=Ice.HashMap,l=Ice.IncomingAsync,h=Ice.RetryException,_=Ice.Protocol,d=Ice.SocketOperation,p=Ice.Timer,f=Ice.TraceUtil,y=Ice.ProtocolVersion,v=Ice.EncodingVersion,g=Ice.ACM,I=Ice.ACMClose,m=Ice.ACMHeartbeat,k=Ice.ConnectionClose,w=0,C=function e(t){_classCallCheck(this,e),this.stream=new n(t,_.currentProtocolEncoding),this.invokeNum=0,this.requestId=0,this.servantManager=null,this.adapter=null,this.outAsync=null,this.heartbeatCallback=null},S=function(){function S(e,t,o,s,a,c,l){_classCallCheck(this,S),this._communicator=e,this._instance=t,this._monitor=o,this._transceiver=s,this._desc=s.toString(),this._type=s.type(),this._endpoint=a,this._incoming=c,this._adapter=l;var h=t.initializationData();this._logger=h.logger,this._traceLevels=t.traceLevels(),this._timer=t.timer(),this._writeTimeoutId=0,this._writeTimeoutScheduled=!1,this._readTimeoutId=0,this._readTimeoutScheduled=!1,this._hasMoreData={value:!1},this._warn=h.properties.getPropertyAsInt("Ice.Warn.Connections")>0,this._warnUdp=t.initializationData().properties.getPropertyAsInt("Ice.Warn.Datagrams")>0,this._acmLastActivity=null!==this._monitor&&this._monitor.getACM().timeout>0?Date.now():-1,this._nextRequestId=1,this._messageSizeMax=l?l.messageSizeMax():t.messageSizeMax(),this._batchRequestQueue=new r(t,a.datagram()),this._sendStreams=[],this._readStream=new n(t,_.currentProtocolEncoding),this._readHeader=!1,this._writeStream=new i(t,_.currentProtocolEncoding),this._readStreamPos=-1,this._writeStreamPos=-1,this._dispatchCount=0,this._state=w,this._shutdownInitiated=!1,this._initialized=!1,this._validated=!1,this._readProtocol=new y,this._readProtocolEncoding=new v,this._asyncRequests=new u,this._exception=null,this._startPromise=null,this._closePromises=[],this._finishedPromises=[],null!==this._adapter?this._servantManager=this._adapter.getServantManager():this._servantManager=null,this._closeCallback=null,this._heartbeatCallback=null}return _createClass(S,[{key:"start",value:function(){var e=this;a.assert(null===this._startPromise);try{if(this._state>=5)return a.assert(null!==this._exception),Ice.Promise.reject(this._exception);this._startPromise=new Ice.Promise,this._transceiver.setCallbacks(function(){return e.message(d.Write)},function(){return e.message(d.Read)},function(){return e.message(d.Write)}),this.initialize()}catch(e){var t=this._startPromise;return this.exception(e),t}return this._startPromise}},{key:"activate",value:function(){this._state<=1||(this._acmLastActivity>0&&(this._acmLastActivity=Date.now()),this.setState(2))}},{key:"hold",value:function(){this._state<=1||this.setState(3)}},{key:"destroy",value:function(e){switch(e){case S.ObjectAdapterDeactivated:this.setState(4,new Ice.ObjectAdapterDeactivatedException);break;case S.CommunicatorDestroyed:this.setState(4,new Ice.CommunicatorDestroyedException);break;default:a.assert(!1)}}},{key:"close",value:function(e){var n=new t(this._communicator,"close",this,null,null);return e==k.Forcefully?(this.setState(5,new Ice.ConnectionManuallyClosedException(!1)),n.resolve()):e==k.Gracefully?(this.setState(4,new Ice.ConnectionManuallyClosedException(!0)),n.resolve()):(a.assert(e==k.GracefullyWithWait),this._closePromises.push(n),this.checkClose()),n}},{key:"checkClose",value:function(){var e=this;0===this._asyncRequests.size&&this._closePromises.length>0&&p.setImmediate(function(){e.setState(4,new Ice.ConnectionManuallyClosedException(!0)),e._closePromises.forEach(function(e){return e.resolve()}),e._closePromises=[]})}},{key:"isActiveOrHolding",value:function(){return this._state>1&&this._state<4}},{key:"isFinished",value:function(){return 6===this._state&&0===this._dispatchCount&&(a.assert(6===this._state),!0)}},{key:"throwException",value:function(){if(null!==this._exception)throw a.assert(this._state>=4),this._exception}},{key:"waitUntilFinished",value:function(){var e=new Ice.Promise;return this._finishedPromises.push(e),this.checkState(),e}},{key:"monitor",value:function(e,t){2===this._state&&((t.heartbeat==Ice.ACMHeartbeat.HeartbeatAlways||t.heartbeat!=Ice.ACMHeartbeat.HeartbeatOff&&this._writeStream.isEmpty()&&e>=this._acmLastActivity+t.timeout/4)&&(t.heartbeat!=Ice.ACMHeartbeat.HeartbeatOnDispatch||this._dispatchCount>0)&&this.sendHeartbeatNow(),this._readStream.size>_.headerSize||!this._writeStream.isEmpty()||t.close!=Ice.ACMClose.CloseOff&&e>=this._acmLastActivity+t.timeout&&(t.close==Ice.ACMClose.CloseOnIdleForceful||t.close!=Ice.ACMClose.CloseOnIdle&&this._asyncRequests.size>0?this.setState(5,new Ice.ConnectionTimeoutException):t.close!=Ice.ACMClose.CloseOnInvocation&&0===this._dispatchCount&&this._batchRequestQueue.isEmpty()&&0===this._asyncRequests.size&&this.setState(4,new Ice.ConnectionTimeoutException)))}},{key:"sendAsyncRequest",value:function(e,t,n){var i,r=0,o=e.getOs();if(null!==this._exception)throw new h(this._exception);a.assert(this._state>1),a.assert(this._state<4),this._transceiver.checkSendSize(o),e.cancelable(this),t?((r=this._nextRequestId++)<=0&&(this._nextRequestId=1,r=this._nextRequestId++),o.pos=_.headerSize,o.writeInt(r)):n>0&&(o.pos=_.headerSize,o.writeInt(n));try{i=this.sendMessage(x.create(e,e.getOs(),r))}catch(e){throw e instanceof Ice.LocalException?(this.setState(5,e),a.assert(null!==this._exception),this._exception):e}return t&&this._asyncRequests.set(r,e),i}},{key:"getBatchRequestQueue",value:function(){return this._batchRequestQueue}},{key:"flushBatchRequests",value:function(){var e=new o(this,this._communicator,"flushBatchRequests");return e.invoke(),e}},{key:"setCloseCallback",value:function(e){var t=this;this._state>=5?null!==e&&p.setImmediate(function(){try{e(t)}catch(e){t._logger.error("connection callback exception:\n"+e+"\n"+t._desc)}}):this._closeCallback=e}},{key:"setHeartbeatCallback",value:function(e){this._state>=5||(this._heartbeatCallback=e)}},{key:"heartbeat",value:function(){var e=new s(this,this._communicator);return e.invoke(),e}},{key:"setACM",value:function(e,t,n){if(void 0!==e&&e<0)throw new RangeError("invalid negative ACM timeout value");null===this._monitor||this._state>=5||(2==this._state&&this._monitor.remove(this),this._monitor=this._monitor.acm(e,t,n),2==this._state&&this._monitor.add(this),this._monitor.getACM().timeout<=0?this._acmLastActivity=-1:2==this._state&&-1==this._acmLastActivity&&(this._acmLastActivity=Date.now()))}},{key:"getACM",value:function(){return null!==this._monitor?this._monitor.getACM():new g(0,I.CloseOff,m.HeartbeatOff)}},{key:"asyncRequestCanceled",value:function(e,t){for(var n=0;n<this._sendStreams.length;n++){var i=this._sendStreams[n];if(i.outAsync===e)return i.requestId>0&&this._asyncRequests.delete(i.requestId),i.canceled(),0!==n&&this._sendStreams.splice(n,1),e.completedEx(t),void this.checkClose()}if(e instanceof Ice.OutgoingAsync){var r=!0,o=!1,s=void 0;try{for(var a,c=this._asyncRequests[Symbol.iterator]();!(r=(a=c.next()).done);r=!0){var u=_slicedToArray(a.value,2),l=u[0];if(u[1]===e)return this._asyncRequests.delete(l),e.completedEx(t),void this.checkClose()}}catch(e){o=!0,s=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw s}}}}},{key:"sendResponse",value:function(e){a.assert(this._state>1);try{if(0==--this._dispatchCount&&(6===this._state&&this.reap(),this.checkState()),this._state>=5)throw a.assert(null!==this._exception),this._exception;this.sendMessage(x.createForStream(e,!0)),4===this._state&&0===this._dispatchCount&&this.initiateShutdown()}catch(e){if(!(e instanceof Ice.LocalException))throw e;this.setState(5,e)}}},{key:"sendNoResponse",value:function(){a.assert(this._state>1);try{if(0==--this._dispatchCount&&(6===this._state&&this.reap(),this.checkState()),this._state>=5)throw a.assert(null!==this._exception),this._exception;4===this._state&&0===this._dispatchCount&&this.initiateShutdown()}catch(e){if(!(e instanceof Ice.LocalException))throw e;this.setState(5,e)}}},{key:"endpoint",value:function(){return this._endpoint}},{key:"setAdapter",value:function(e){if(null!==e){if(e.checkForDeactivation(),this._state<=1||this._state>=4)return;this._adapter=e,this._servantManager=e.getServantManager()}else{if(this._state<=1||this._state>=4)return;this._adapter=null,this._servantManager=null}}},{key:"getAdapter",value:function(){return this._adapter}},{key:"getEndpoint",value:function(){return this._endpoint}},{key:"createProxy",value:function(e){return this._instance.proxyFactory().referenceToProxy(this._instance.referenceFactory().createFixed(e,this))}},{key:"message",value:function(e){var t=this;if(!(this._state>=5)){this.unscheduleTimeout(e),this._hasMoreData.value=0!=(e&d.Read);var n=null;try{if(0!=(e&d.Write)&&this._writeStream.buffer.remaining>0){if(!this.write(this._writeStream.buffer))return a.assert(!this._writeStream.isEmpty()),void this.scheduleTimeout(d.Write);a.assert(0===this._writeStream.buffer.remaining)}if(0!=(e&d.Read)&&!this._readStream.isEmpty()){if(this._readHeader){if(!this.read(this._readStream.buffer))return;a.assert(0===this._readStream.buffer.remaining),this._readHeader=!1,this._validated=!0;var i=this._readStream.pos;if(i<_.headerSize)throw new Ice.IllegalMessageSizeException;this._readStream.pos=0;var r=this._readStream.readByte(),o=this._readStream.readByte(),s=this._readStream.readByte(),u=this._readStream.readByte();if(r!==_.magic[0]||o!==_.magic[1]||s!==_.magic[2]||u!==_.magic[3])throw new Ice.BadMagicException("",new Uint8Array([r,o,s,u]));this._readProtocol._read(this._readStream),_.checkSupportedProtocol(this._readProtocol),this._readProtocolEncoding._read(this._readStream),_.checkSupportedProtocolEncoding(this._readProtocolEncoding),this._readStream.readByte(),this._readStream.readByte();var l=this._readStream.readInt();if(l<_.headerSize)throw new Ice.IllegalMessageSizeException;l>this._messageSizeMax&&c.throwMemoryLimitException(l,this._messageSizeMax),l>this._readStream.size&&this._readStream.resize(l),this._readStream.pos=i}if(this._readStream.pos!=this._readStream.size){if(this._endpoint.datagram())throw new Ice.DatagramLimitException;if(!this.read(this._readStream.buffer))return a.assert(!this._readStream.isEmpty()),void this.scheduleTimeout(d.Read);a.assert(0===this._readStream.buffer.remaining)}}if(this._state<=1){if(this._state===w&&!this.initialize())return;if(this._state<=1&&!this.validate())return;this._transceiver.unregister(),this.setState(3),null!==this._startPromise&&++this._dispatchCount}else a.assert(this._state<=4),0!=(e&d.Read)&&(n=this.parseMessage()),0!=(e&d.Write)&&this.sendNextMessage()}catch(e){if(e instanceof Ice.DatagramLimitException)return this._warnUdp&&this._logger.warning("maximum datagram size of "+this._readStream.pos+" exceeded"),this._readStream.resize(_.headerSize),this._readStream.pos=0,void(this._readHeader=!0);if(e instanceof Ice.SocketException)return void this.setState(5,e);if(e instanceof Ice.LocalException)return void(this._endpoint.datagram()?(this._warn&&this._logger.warning("datagram connection exception:\n"+e+"\n"+this._desc),this._readStream.resize(_.headerSize),this._readStream.pos=0,this._readHeader=!0):this.setState(5,e));throw e}this._acmLastActivity>0&&(this._acmLastActivity=Date.now()),this.dispatch(n),this._hasMoreData.value&&p.setImmediate(function(){return t.message(d.Read)})}}},{key:"dispatch",value:function(e){var t=0;if(null!==this._startPromise&&(this._startPromise.resolve(),this._startPromise=null,++t),null!==e&&(null!==e.outAsync&&(e.outAsync.completed(e.stream),++t),e.invokeNum>0&&this.invokeAll(e.stream,e.invokeNum,e.requestId,e.servantManager,e.adapter),e.heartbeatCallback)){try{e.heartbeatCallback(this)}catch(e){this._logger.error("connection callback exception:\n"+e+"\n"+this._desc)}e.heartbeatCallback=null,++t}if(t>0&&(this._dispatchCount-=t,0===this._dispatchCount)){if(4===this._state)try{this.initiateShutdown()}catch(e){if(!(e instanceof Ice.LocalException))throw e;this.setState(5,e)}else 6===this._state&&this.reap();this.checkState()}}},{key:"finish",value:function(){a.assert(5===this._state),this.unscheduleTimeout(d.Read|d.Write|d.Connect);var e=this._instance.traceLevels();if(this._initialized){if(e.network>=1){var t=[];t.push("closed "),t.push(this._endpoint.protocol()),t.push(" connection\n"),t.push(this.toString()),this._exception instanceof Ice.CloseConnectionException||this._exception instanceof Ice.ConnectionManuallyClosedException||this._exception instanceof Ice.ConnectionTimeoutException||this._exception instanceof Ice.CommunicatorDestroyedException||this._exception instanceof Ice.ObjectAdapterDeactivatedException||(t.push("\n"),t.push(this._exception.toString())),this._instance.initializationData().logger.trace(e.networkCat,t.join(""))}}else if(e.network>=2){var n=[];n.push("failed to establish "),n.push(this._endpoint.protocol()),n.push(" connection\n"),n.push(this.toString()),n.push("\n"),n.push(this._exception.toString()),this._instance.initializationData().logger.trace(e.networkCat,n.join(""))}if(null!==this._startPromise&&(this._startPromise.reject(this._exception),this._startPromise=null),this._sendStreams.length>0){this._writeStream.isEmpty()||this._writeStream.swap(this._sendStreams[0].stream);for(var i=0;i<this._sendStreams.length;++i){var r=this._sendStreams[i];r.requestId>0&&this._asyncRequests.delete(r.requestId),r.completed(this._exception)}this._sendStreams=[]}var o=!0,s=!1,c=void 0;try{for(var u,l=this._asyncRequests.values()[Symbol.iterator]();!(o=(u=l.next()).done);o=!0){u.value.completedEx(this._exception)}}catch(e){s=!0,c=e}finally{try{o||null==l.return||l.return()}finally{if(s)throw c}}if(this._asyncRequests.clear(),this.checkClose(),this._readStream.clear(),this._readStream.buffer.clear(),this._writeStream.clear(),this._writeStream.buffer.clear(),null!==this._closeCallback){try{this._closeCallback(this)}catch(e){this._logger.error("connection callback exception:\n"+e+"\n"+this._desc)}this._closeCallback=null}this._heartbeatCallback=null,0===this._dispatchCount&&this.reap(),this.setState(6)}},{key:"toString",value:function(){return this._desc}},{key:"timedOut",value:function(e){this._state<=1?this.setState(5,new Ice.ConnectTimeoutException):this._state<4?this.setState(5,new Ice.TimeoutException):4===this._state&&this.setState(5,new Ice.CloseTimeoutException)}},{key:"type",value:function(){return this._type}},{key:"timeout",value:function(){return this._endpoint.timeout()}},{key:"getInfo",value:function(){if(this._state>=5)throw this._exception;for(var e=this._transceiver.getInfo(),t=e;null!==t;t=t.underlying)t.adapterName=null!==this._adapter?this._adapter.getName():"",t.incoming=this._incoming;return e}},{key:"setBufferSize",value:function(e,t){if(this._state>=5)throw this._exception;this._transceiver.setBufferSize(e,t)}},{key:"exception",value:function(e){this.setState(5,e)}},{key:"invokeException",value:function(e,t){this.setState(5,e),t>0&&(a.assert(this._dispatchCount>0),this._dispatchCount-=t,a.assert(this._dispatchCount>=0),0===this._dispatchCount&&(6===this._state&&this.reap(),this.checkState()))}},{key:"setState",value:function(e,t){if(void 0!==t){if(a.assert(t instanceof Ice.LocalException),a.assert(e>=4),this._state===e)return;null===this._exception&&(this._exception=t,this._warn&&this._validated&&(this._exception instanceof Ice.CloseConnectionException||this._exception instanceof Ice.ConnectionManuallyClosedException||this._exception instanceof Ice.ConnectionTimeoutException||this._exception instanceof Ice.CommunicatorDestroyedException||this._exception instanceof Ice.ObjectAdapterDeactivatedException||this._exception instanceof Ice.ConnectionLostException&&4===this._state||this.warning("connection exception",this._exception)))}if(this._endpoint.datagram()&&4===e&&(e=5),this._state<=1&&4===e&&(e=5),this._state!==e){try{switch(e){case w:a.assert(!1);break;case 1:if(this._state!==w)return void a.assert(5===this._state);this._endpoint.datagram()||this._incoming||this._transceiver.register();break;case 2:if(3!==this._state&&1!==this._state)return;this._transceiver.register();break;case 3:if(2!==this._state&&1!==this._state)return;2===this._state&&this._transceiver.unregister();break;case 4:if(this._state>=5)return;3===this._state&&this._transceiver.register();break;case 5:if(6===this._state)return;this._batchRequestQueue.destroy(this._exception),this._transceiver.unregister();break;case 6:a.assert(5===this._state),this._transceiver.close(),this._communicator=null;break;default:a.assert(!1)}}catch(t){if(!(t instanceof Ice.LocalException))throw t;this._instance.initializationData().logger.error("unexpected connection exception:\n".concat(this._desc,"\n").concat(t.toString()))}if(null!==this._monitor&&(2===e?(this._monitor.add(this),this._acmLastActivity>0&&(this._acmLastActivity=Date.now())):2===this._state&&this._monitor.remove(this)),this._state=e,4===this._state&&0===this._dispatchCount)try{this.initiateShutdown()}catch(t){if(!(t instanceof Ice.LocalException))throw t;this.setState(5,t)}else 5===this._state&&this.finish();this.checkState()}}},{key:"initiateShutdown",value:function(){if(a.assert(4===this._state&&0===this._dispatchCount),!this._shutdownInitiated&&(this._shutdownInitiated=!0,!this._endpoint.datagram())){var t=new i(this._instance,_.currentProtocolEncoding);t.writeBlob(_.magic),_.currentProtocol._write(t),_.currentProtocolEncoding._write(t),t.writeByte(_.closeConnectionMsg),t.writeByte(0),t.writeInt(_.headerSize),(this.sendMessage(x.createForStream(t,!1))&e.Sent)>0&&this.scheduleTimeout(d.Read)}}},{key:"sendHeartbeatNow",value:function(){if(a.assert(2===this._state),!this._endpoint.datagram()){var e=new i(this._instance,_.currentProtocolEncoding);e.writeBlob(_.magic),_.currentProtocol._write(e),_.currentProtocolEncoding._write(e),e.writeByte(_.validateConnectionMsg),e.writeByte(0),e.writeInt(_.headerSize);try{this.sendMessage(x.createForStream(e,!1))}catch(e){this.setState(5,e),a.assert(null!==this._exception)}}}},{key:"initialize",value:function(){var e=this._transceiver.initialize(this._readStream.buffer,this._writeStream.buffer);return e!=d.None?(this.scheduleTimeout(e),!1):(this._desc=this._transceiver.toString(),this._initialized=!0,this.setState(1),!0)}},{key:"validate",value:function(){if(!this._endpoint.datagram())if(null!==this._adapter){if(0===this._writeStream.size&&(this._writeStream.writeBlob(_.magic),_.currentProtocol._write(this._writeStream),_.currentProtocolEncoding._write(this._writeStream),this._writeStream.writeByte(_.validateConnectionMsg),this._writeStream.writeByte(0),this._writeStream.writeInt(_.headerSize),f.traceSend(this._writeStream,this._logger,this._traceLevels),this._writeStream.prepareWrite()),this._writeStream.pos!=this._writeStream.size&&!this.write(this._writeStream.buffer))return this.scheduleTimeout(d.Write),!1}else{if(0===this._readStream.size&&(this._readStream.resize(_.headerSize),this._readStream.pos=0),this._readStream.pos!==this._readStream.size&&!this.read(this._readStream.buffer))return this.scheduleTimeout(d.Read),!1;this._validated=!0,a.assert(this._readStream.pos===_.headerSize),this._readStream.pos=0;var e=this._readStream.readBlob(4);if(e[0]!==_.magic[0]||e[1]!==_.magic[1]||e[2]!==_.magic[2]||e[3]!==_.magic[3])throw new Ice.BadMagicException("",e);if(this._readProtocol._read(this._readStream),_.checkSupportedProtocol(this._readProtocol),this._readProtocolEncoding._read(this._readStream),_.checkSupportedProtocolEncoding(this._readProtocolEncoding),this._readStream.readByte()!==_.validateConnectionMsg)throw new Ice.ConnectionNotValidatedException;if(this._readStream.readByte(),this._readStream.readInt()!==_.headerSize)throw new Ice.IllegalMessageSizeException;f.traceRecv(this._readStream,this._logger,this._traceLevels)}this._writeStream.resize(0),this._writeStream.pos=0,this._readStream.resize(_.headerSize),this._readHeader=!0,this._readStream.pos=0;var t=this._instance.traceLevels();if(t.network>=1){var n=[];this._endpoint.datagram()?(n.push("starting to send "),n.push(this._endpoint.protocol()),n.push(" messages\n"),n.push(this._transceiver.toDetailedString())):(n.push("established "),n.push(this._endpoint.protocol()),n.push(" connection\n"),n.push(this.toString())),this._instance.initializationData().logger.trace(t.networkCat,n.join(""))}return!0}},{key:"sendNextMessage",value:function(){if(0!==this._sendStreams.length){a.assert(!this._writeStream.isEmpty()&&this._writeStream.pos===this._writeStream.size);try{for(;;){var e=this._sendStreams.shift();if(this._writeStream.swap(e.stream),e.sent(),0===this._sendStreams.length)break;if(this._state>=5)return;e=this._sendStreams[0],a.assert(!e.prepared);var t=e.stream;if(t.pos=10,t.writeInt(t.size),t.prepareWrite(),e.prepared=!0,f.traceSend(t,this._logger,this._traceLevels),this._writeStream.swap(e.stream),this._writeStream.pos!=this._writeStream.size&&!this.write(this._writeStream.buffer))return a.assert(!this._writeStream.isEmpty()),void this.scheduleTimeout(d.Write)}}catch(e){if(e instanceof Ice.LocalException)return void this.setState(5,e);throw e}a.assert(this._writeStream.isEmpty()),4===this._state&&this._shutdownInitiated&&this.scheduleTimeout(d.Read)}}},{key:"sendMessage",value:function(t){if(this._sendStreams.length>0)return t.doAdopt(),this._sendStreams.push(t),e.Queued;a.assert(this._state<5),a.assert(!t.prepared);var n=t.stream;return n.pos=10,n.writeInt(n.size),n.prepareWrite(),t.prepared=!0,f.traceSend(n,this._logger,this._traceLevels),this.write(n.buffer)?(t.sent(),this._acmLastActivity>0&&(this._acmLastActivity=Date.now()),e.Sent):(t.doAdopt(),this._writeStream.swap(t.stream),this._sendStreams.push(t),this.scheduleTimeout(d.Write),e.Queued)}},{key:"parseMessage",value:function(){a.assert(this._state>1&&this._state<5);var e=new C(this._instance);this._readStream.swap(e.stream),this._readStream.resize(_.headerSize),this._readStream.pos=0,this._readHeader=!0,a.assert(e.stream.pos===e.stream.size);try{e.stream.pos=8;var t=e.stream.readByte();if(2===e.stream.readByte())throw new Ice.FeatureNotSupportedException("Cannot uncompress compressed message");switch(e.stream.pos=_.headerSize,t){case _.closeConnectionMsg:f.traceRecv(e.stream,this._logger,this._traceLevels),this._endpoint.datagram()?this._warn&&this._logger.warning("ignoring close connection message for datagram connection:\n"+this._desc):this.setState(5,new Ice.CloseConnectionException);break;case _.requestMsg:4===this._state?f.traceIn("received request during closing\n(ignored by server, client will retry)",e.stream,this._logger,this._traceLevels):(f.traceRecv(e.stream,this._logger,this._traceLevels),e.requestId=e.stream.readInt(),e.invokeNum=1,e.servantManager=this._servantManager,e.adapter=this._adapter,++this._dispatchCount);break;case _.requestBatchMsg:if(4===this._state)f.traceIn("received batch request during closing\n(ignored by server, client will retry)",e.stream,this._logger,this._traceLevels);else{if(f.traceRecv(e.stream,this._logger,this._traceLevels),e.invokeNum=e.stream.readInt(),e.invokeNum<0)throw e.invokeNum=0,new Ice.UnmarshalOutOfBoundsException;e.servantManager=this._servantManager,e.adapter=this._adapter,this._dispatchCount+=e.invokeNum}break;case _.replyMsg:f.traceRecv(e.stream,this._logger,this._traceLevels),e.requestId=e.stream.readInt(),e.outAsync=this._asyncRequests.get(e.requestId),e.outAsync?(this._asyncRequests.delete(e.requestId),++this._dispatchCount):e=null,this.checkClose();break;case _.validateConnectionMsg:f.traceRecv(e.stream,this._logger,this._traceLevels),null!==this._heartbeatCallback&&(e.heartbeatCallback=this._heartbeatCallback,++this._dispatchCount);break;default:throw f.traceIn("received unknown message\n(invalid, closing connection)",e.stream,this._logger,this._traceLevels),new Ice.UnknownMessageException}}catch(e){if(!(e instanceof Ice.LocalException))throw e;this._endpoint.datagram()?this._warn&&this._logger.warning("datagram connection exception:\n"+e+"\n"+this._desc):this.setState(5,e)}return e}},{key:"invokeAll",value:function(e,t,n,i,r){try{for(;t>0;){new l(this._instance,this,r,!this._endpoint.datagram()&&0!==n,n).invoke(i,e),--t}e.clear()}catch(e){e instanceof Ice.LocalException?this.invokeException(e,t):(this._logger.error("unexpected exception:\n"+e.toString()),this.invokeException(new Ice.UnknownException(e),t))}}},{key:"scheduleTimeout",value:function(e){var t,n=this;if(this._state<2){var i=this._instance.defaultsAndOverrides();t=i.overrideConnectTimeout?i.overrideConnectTimeoutValue:this._endpoint.timeout()}else if(this._state<4)this._readHeader&&(e&=~d.Read),t=this._endpoint.timeout();else{var r=this._instance.defaultsAndOverrides();t=r.overrideCloseTimeout?r.overrideCloseTimeoutValue:this._endpoint.timeout()}t<0||(0!=(e&d.Read)&&(this._readTimeoutScheduled&&this._timer.cancel(this._readTimeoutId),this._readTimeoutId=this._timer.schedule(function(){return n.timedOut()},t),this._readTimeoutScheduled=!0),0!=(e&(d.Write|d.Connect))&&(this._writeTimeoutScheduled&&this._timer.cancel(this._writeTimeoutId),this._writeTimeoutId=this._timer.schedule(function(){return n.timedOut()},t),this._writeTimeoutScheduled=!0))}},{key:"unscheduleTimeout",value:function(e){0!=(e&d.Read)&&this._readTimeoutScheduled&&(this._timer.cancel(this._readTimeoutId),this._readTimeoutScheduled=!1),0!=(e&(d.Write|d.Connect))&&this._writeTimeoutScheduled&&(this._timer.cancel(this._writeTimeoutId),this._writeTimeoutScheduled=!1)}},{key:"warning",value:function(e,t){this._logger.warning(e+":\n"+this._desc+"\n"+t.toString())}},{key:"checkState",value:function(){this._state<3||this._dispatchCount>0||6===this._state&&this._finishedPromises.length>0&&(this._adapter=null,this._finishedPromises.forEach(function(e){return e.resolve()}),this._finishedPromises=[])}},{key:"reap",value:function(){null!==this._monitor&&this._monitor.reap(this)}},{key:"read",value:function(e){var t=e.position,n=this._transceiver.read(e,this._hasMoreData);if(this._instance.traceLevels().network>=3&&e.position!=t){var i=[];i.push("received "),this._endpoint.datagram()?i.push(e.limit):(i.push(e.position-t),i.push(" of "),i.push(e.limit-t)),i.push(" bytes via "),i.push(this._endpoint.protocol()),i.push("\n"),i.push(this.toString()),this._instance.initializationData().logger.trace(this._instance.traceLevels().networkCat,i.join(""))}return n}},{key:"write",value:function(e){var t=e.position,n=this._transceiver.write(e);if(this._instance.traceLevels().network>=3&&e.position!=t){var i=[];i.push("sent "),i.push(e.position-t),this._endpoint.datagram()||(i.push(" of "),i.push(e.limit-t)),i.push(" bytes via "),i.push(this._endpoint.protocol()),i.push("\n"),i.push(this.toString()),this._instance.initializationData().logger.trace(this._instance.traceLevels().networkCat,i.join(""))}return n}}]),S}();S.ObjectAdapterDeactivated=0,S.CommunicatorDestroyed=1,Ice.ConnectionI=S;var x=function(){function e(){_classCallCheck(this,e),this.stream=null,this.outAsync=null,this.requestId=0,this.prepared=!1}return _createClass(e,[{key:"canceled",value:function(){a.assert(null!==this.outAsync),this.outAsync=null}},{key:"doAdopt",value:function(){if(this.adopt){var e=new i(this.stream.instance,_.currentProtocolEncoding);e.swap(this.stream),this.stream=e,this.adopt=!1}}},{key:"sent",value:function(){null!==this.outAsync&&this.outAsync.sent()}},{key:"completed",value:function(e){null!==this.outAsync&&this.outAsync.completedEx(e)}}],[{key:"createForStream",value:function(t,n){var i=new e;return i.stream=t,i.adopt=n,i.isSent=!1,i.requestId=0,i.outAsync=null,i}},{key:"create",value:function(t,n,i){var r=new e;return r.stream=n,r.outAsync=t,r.requestId=i,r.isSent=!1,r.adopt=!1,r}}]),e}()}(),function(){var e=Ice.Base64,t=Ice.Debug,n=Ice.HashUtil,i=Ice.StringUtil,r=Ice.EndpointParseException,o=function(o){function a(e){var t;return _classCallCheck(this,a),(t=_possibleConstructorReturn(this,_getPrototypeOf(a).call(this)))._rawEncoding=Ice.Encoding_1_0,t._type=void 0===e?-1:e,t._rawBytes=null,t}return _inherits(a,Ice.EndpointI),_createClass(a,[{key:"streamWrite",value:function(e){e.startEncapsulation(this._rawEncoding,Ice.FormatType.DefaultFormat),e.writeBlob(this._rawBytes),e.endEncapsulation()}},{key:"getInfo",value:function(){return new s(null,-1,!1,this._rawEncoding,this._rawBytes,this._type)}},{key:"type",value:function(){return this._type}},{key:"protocol",value:function(){return"opaque"}},{key:"timeout",value:function(){return-1}},{key:"changeTimeout",value:function(e){return this}},{key:"changeConnectionId",value:function(e){return this}},{key:"compress",value:function(){return!1}},{key:"changeCompress",value:function(e){return this}},{key:"datagram",value:function(){return!1}},{key:"secure",value:function(){return!1}},{key:"rawBytes",value:function(){return this._rawBytes}},{key:"transceiver",value:function(e){return e.value=null,null}},{key:"acceptor",value:function(e,t){return e.value=this,null}},{key:"connect",value:function(){return null}},{key:"hashCode",value:function(){if(void 0===this._hashCode){var e=5381;e=n.addNumber(e,this._type),e=n.addHashable(e,this._rawEncoding),e=n.addArray(e,this._rawBytes,n.addNumber),this._hashCode=e}return this._hashCode}},{key:"options",value:function(){var t="";return t+=" -t "+this._type,t+=" -e "+Ice.encodingVersionToString(this._rawEncoding),t+=" -v "+e.encode(this._rawBytes)}},{key:"equals",value:function(e){if(!(e instanceof a))return!1;if(this===e)return!0;if(this._type!==e._type)return!1;if(!this._rawEncoding.equals(e._rawEncoding))return!1;if(this._rawBytes.length!==e._rawBytes.length)return!1;for(var t=0;t<this._rawBytes.length;t++)if(this._rawBytes[t]!==e._rawBytes[t])return!1;return!0}},{key:"compareTo",value:function(e){if(this===e)return 0;if(null===e)return 1;if(!(e instanceof a))return this.type()<e.type()?-1:1;if(this._type<e._type)return-1;if(e._type<this._type)return 1;if(this._rawEncoding.major<e._rawEncoding.major)return-1;if(e._rawEncoding.major<this._rawEncoding.major)return 1;if(this._rawEncoding.minor<e._rawEncoding.minor)return-1;if(e._rawEncoding.minor<this._rawEncoding.minor)return 1;if(this._rawBytes.length<e._rawBytes.length)return-1;if(e._rawBytes.length<this._rawBytes.length)return 1;for(var t=0;t<this._rawBytes.length;t++){if(this._rawBytes[t]<e._rawBytes[t])return-1;if(e._rawBytes[t]<this._rawBytes[t])return 1}return 0}},{key:"checkOption",value:function(t,n,o){switch(t.charAt(1)){case"t":if(this._type>-1)throw new r("multiple -t options in endpoint "+o);if(null===n)throw new r("no argument provided for -t option in endpoint "+o);var s;try{s=i.toInt(n)}catch(e){throw new r("invalid type value `"+n+"' in endpoint "+o)}if(s<0||s>65535)throw new r("type value `"+n+"' out of range in endpoint "+o);return this._type=s,!0;case"v":if(this._rawBytes)throw new r("multiple -v options in endpoint "+o);if(null===n||0===n.length)throw new r("no argument provided for -v option in endpoint "+o);for(var a=0;a<n.length;++a)if(!e.isBase64(n.charAt(a)))throw new r("invalid base64 character `"+n.charAt(a)+"' (ordinal "+n.charCodeAt(a)+") in endpoint "+o);return this._rawBytes=e.decode(n),!0;case"e":if(null===n)throw new r("no argument provided for -e option in endpoint "+o);try{this._rawEncoding=Ice.stringToEncodingVersion(n)}catch(e){throw new r("invalid encoding version `"+n+"' in endpoint "+o+":\n"+e.str)}return!0;default:return!1}}},{key:"initWithOptions",value:function(e){if(_get(_getPrototypeOf(a.prototype),"initWithOptions",this).call(this,e),t.assert(this._rawEncoding),this._type<0)throw new r("no -t option in endpoint `"+this+"'");if(null===this._rawBytes||0===this._rawBytes.length)throw new r("no -v option in endpoint `"+this+"'")}},{key:"initWithStream",value:function(e){this._rawEncoding=e.getEncoding(),this._rawBytes=e.readBlob(e.getEncapsulationSize())}}]),a}(),s=function(e){function t(e,n,i,r,o){var s;return _classCallCheck(this,t),(s=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,-1,!1,i,r)))._type=o,s}return _inherits(t,Ice.OpaqueEndpointInfo),_createClass(t,[{key:"type",value:function(){return this._type}},{key:"datagram",value:function(){return!1}},{key:"secure",value:function(){return!1}}]),t}();Ice.OpaqueEndpointI=o}(),function(){Ice.AdapterNotFoundException=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e))}return _inherits(t,Ice.UserException),_createClass(t,[{key:"_mostDerivedType",value:function(){return Ice.AdapterNotFoundException}}],[{key:"_parent",get:function(){return Ice.UserException}},{key:"_id",get:function(){return"::Ice::AdapterNotFoundException"}}]),t}(),Ice.InvalidReplicaGroupIdException=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e))}return _inherits(t,Ice.UserException),_createClass(t,[{key:"_mostDerivedType",value:function(){return Ice.InvalidReplicaGroupIdException}}],[{key:"_parent",get:function(){return Ice.UserException}},{key:"_id",get:function(){return"::Ice::InvalidReplicaGroupIdException"}}]),t}(),Ice.AdapterAlreadyActiveException=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e))}return _inherits(t,Ice.UserException),_createClass(t,[{key:"_mostDerivedType",value:function(){return Ice.AdapterAlreadyActiveException}}],[{key:"_parent",get:function(){return Ice.UserException}},{key:"_id",get:function(){return"::Ice::AdapterAlreadyActiveException"}}]),t}(),Ice.ObjectNotFoundException=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e))}return _inherits(t,Ice.UserException),_createClass(t,[{key:"_mostDerivedType",value:function(){return Ice.ObjectNotFoundException}}],[{key:"_parent",get:function(){return Ice.UserException}},{key:"_id",get:function(){return"::Ice::ObjectNotFoundException"}}]),t}(),Ice.ServerNotFoundException=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e))}return _inherits(t,Ice.UserException),_createClass(t,[{key:"_mostDerivedType",value:function(){return Ice.ServerNotFoundException}}],[{key:"_parent",get:function(){return Ice.UserException}},{key:"_id",get:function(){return"::Ice::ServerNotFoundException"}}]),t}();Ice.Locator=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).apply(this,arguments))}return _inherits(t,Ice.Object),t}(),Ice.LocatorPrx=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).apply(this,arguments))}return _inherits(t,Ice.ObjectPrx),t}(),N.defineOperations(Ice.Locator,Ice.LocatorPrx,["::Ice::Locator","::Ice::Object"],0,{findObjectById:[,2,1,,[9],[[Ice.Identity]],,[Ice.ObjectNotFoundException],,],findAdapterById:[,2,1,,[9],[[7]],,[Ice.AdapterNotFoundException],,],getRegistry:[,2,1,,["Ice.LocatorRegistryPrx"],,,,,]});Ice.LocatorRegistry=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).apply(this,arguments))}return _inherits(t,Ice.Object),t}(),Ice.LocatorRegistryPrx=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).apply(this,arguments))}return _inherits(t,Ice.ObjectPrx),t}(),N.defineOperations(Ice.LocatorRegistry,Ice.LocatorRegistryPrx,["::Ice::LocatorRegistry","::Ice::Object"],0,{setAdapterDirectProxy:[,2,2,,,[[7],[9]],,[Ice.AdapterAlreadyActiveException,Ice.AdapterNotFoundException],,],setReplicatedAdapterDirectProxy:[,2,2,,,[[7],[7],[9]],,[Ice.AdapterAlreadyActiveException,Ice.AdapterNotFoundException,Ice.InvalidReplicaGroupIdException],,],setServerProcessProxy:[,2,2,,,[[7],["Ice.ProcessPrx"]],,[Ice.ServerNotFoundException],,]});Ice.LocatorFinder=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).apply(this,arguments))}return _inherits(t,Ice.Object),t}(),Ice.LocatorFinderPrx=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).apply(this,arguments))}return _inherits(t,Ice.ObjectPrx),t}(),N.defineOperations(Ice.LocatorFinder,Ice.LocatorFinderPrx,["::Ice::LocatorFinder","::Ice::Object"],0,{getLocator:[,,,,["Ice.LocatorPrx"],,,,,]})}(),E=Ice.AlreadyRegisteredException,b=function(){function e(){_classCallCheck(this,e),this._factoryMap=new Map}return _createClass(e,[{key:"add",value:function(e,t){if(this._factoryMap.has(t))throw new E("value factory",t);this._factoryMap.set(t,e)}},{key:"find",value:function(e){return this._factoryMap.get(e)}},{key:"destroy",value:function(){this._factoryMap=new Map}}]),e}(),Ice.ValueFactoryManagerI=b,IceSSL.ConnectionInfo=function(e){function t(e,n,i,r){var o,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,c=arguments.length>6&&void 0!==arguments[6]&&arguments[6];return _classCallCheck(this,t),(o=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e,n,i,r))).cipher=s,o.certs=a,o.verified=c,o}return _inherits(t,Ice.ConnectionInfo),t}(),N.defineDictionary(Ice,"FacetMap","FacetMapHelper","Ice.StringHelper","Ice.ObjectHelper",!1,void 0,"Ice.Value"),function(){var e=Ice._ModuleRegistry.module("IceSSL"),t=-1===navigator.userAgent.indexOf("Edge/")&&-1!==navigator.userAgent.indexOf("Chrome/"),n=/^((?!chrome).)*safari/i.test(navigator.userAgent),i=Ice.Debug,r=Ice.SocketOperation,o=Ice.Timer,s=2,a=function(){function a(e){_classCallCheck(this,a),this._readBuffers=[],this._readPosition=0,this._maxSendPacketSize=e.properties().getPropertyAsIntWithDefault("Ice.TCP.SndSize",524288),this._writeReadyTimeout=0}return _createClass(a,[{key:"writeReadyTimeout",value:function(){var e=Math.round(this._writeReadyTimeout);return this._writeReadyTimeout+=this._writeReadyTimeout>=5?5:.2,Math.min(e,25)}},{key:"setCallbacks",value:function(e,t,n){this._connectedCallback=e,this._bytesAvailableCallback=t,this._bytesWrittenCallback=n}},{key:"initialize",value:function(e,t){var n,o=this;try{if(this._exception)throw this._exception;if(0===this._state)return this._state=1,this._fd=new WebSocket(this._url,"ice.zeroc.com"),this._fd.binaryType="arraybuffer",this._fd.onopen=function(e){return o.socketConnected(e)},this._fd.onmessage=function(e){return o.socketBytesAvailable(e.data)},this._fd.onclose=function(e){return o.socketClosed(e)},r.Connect;1===this._state&&(this._desc="local address = <not available>\nremote address = "+(n=this._addr).host+":"+n.port,this._state=s)}catch(e){throw this._exception||(this._exception=c(this._state,e)),this._exception}return i.assert(this._state===s),r.None}},{key:"register",value:function(){var e=this;this._registered=!0,(this._hasBytesAvailable||this._exception)&&(this._hasBytesAvailable=!1,o.setTimeout(function(){return e._bytesAvailableCallback()},0))}},{key:"unregister",value:function(){this._registered=!1}},{key:"close",value:function(){if(null!==this._fd)if(!t&&!n||this._fd.readyState!==WebSocket.CONNECTING){i.assert(null!==this._fd);try{this._state=4,this._fd.close()}catch(e){throw c(this._state,e)}finally{this._fd=null}}else this._state=3;else i.assert(this._exception)}},{key:"write",value:function(e){var t=this;if(this._exception)throw this._exception;if(0===e.remaining)return!0;i.assert(this._fd);for(var r=function n(){if(t._fd){var i=t._maxSendPacketSize>0&&e.remaining>t._maxSendPacketSize?t._maxSendPacketSize:e.remaining;t._fd.bufferedAmount+i<=t._maxSendPacketSize?t._bytesWrittenCallback(0,0):o.setTimeout(n,t.writeReadyTimeout())}};;){var s=this._maxSendPacketSize>0&&e.remaining>this._maxSendPacketSize?this._maxSendPacketSize:e.remaining;if(0===e.remaining)break;if(i.assert(s>0),this._fd.bufferedAmount+s>this._maxSendPacketSize)return o.setTimeout(r,this.writeReadyTimeout()),!1;this._writeReadyTimeout=0;var a=e.b.slice(e.position,e.position+s);if(this._fd.send(a),e.position+=s,n&&e.remaining>0)return o.setTimeout(r,this.writeReadyTimeout()),!1}return!0}},{key:"read",value:function(e,t){if(this._exception)throw this._exception;if(t.value=!1,0===this._readBuffers.length)return!1;var n=this._readBuffers[0].byteLength-this._readPosition;for(i.assert(n>0);e.remaining>0;)if(n>e.remaining&&(n=e.remaining),new Uint8Array(e.b).set(new Uint8Array(this._readBuffers[0],this._readPosition,n),e.position),e.position+=n,this._readPosition+=n,this._readPosition===this._readBuffers[0].byteLength){if(this._readPosition=0,this._readBuffers.shift(),0===this._readBuffers.length)break;n=this._readBuffers[0].byteLength}return t.value=this._readBuffers.length>0,0===e.remaining}},{key:"type",value:function(){return this._secure?"wss":"ws"}},{key:"getInfo",value:function(){i.assert(null!==this._fd);var t=new Ice.WSConnectionInfo,n=new Ice.TCPConnectionInfo;return n.localAddress="",n.localPort=-1,n.remoteAddress=this._addr.host,n.remotePort=this._addr.port,t.underlying=this._secure?new e.ConnectionInfo(n,n.timeout,n.compress):n,t.rcvSize=-1,t.sndSize=this._maxSendPacketSize,t.headers={},t}},{key:"checkSendSize",value:function(e){}},{key:"setBufferSize",value:function(e,t){this._maxSendPacketSize=t}},{key:"toString",value:function(){return this._desc}},{key:"socketConnected",value:function(e){3!=this._state?(i.assert(null!==this._connectedCallback),this._connectedCallback()):this.close()}},{key:"socketBytesAvailable",value:function(e){i.assert(null!==this._bytesAvailableCallback),e.byteLength>0&&(this._readBuffers.push(e),this._registered?this._bytesAvailableCallback():this._hasBytesAvailable||(this._hasBytesAvailable=!0))}},{key:"socketClosed",value:function(e){3!=this._state?(this._exception=c(this._state,e),this._state<s?this._connectedCallback():this._registered&&this._bytesAvailableCallback()):this.close()}}],[{key:"createOutgoing",value:function(e,t,n,i){var r=new a(e),o=t?"wss":"ws";return o+="://"+n.host,80!==n.port&&(o+=":"+n.port),o+=i||"/",r._url=o,r._fd=null,r._addr=n,r._desc="local address = <not available>\nremote address = "+n.host+":"+n.port,r._state=0,r._secure=t,r._exception=null,r}}]),a}();function c(e,t){return e<s?new Ice.ConnectFailedException(t.code,t):1e3===t.code||1006===t.code?new Ice.ConnectionLostException:new Ice.SocketException(t.code,t)}Ice.WSTransceiver=a}(),function(){var e=Ice.AsyncResultBase,t=Ice.ConnectionI,n=Ice.Debug,i=Ice.HashMap,r=Ice.FactoryACMMonitor,o=function(){function o(e,t){_classCallCheck(this,o),this._communicator=e,this._instance=t,this._destroyed=!1,this._monitor=new r(this._instance,this._instance.clientACM()),this._connectionsByEndpoint=new s,this._pending=new i(i.compareEquals),this._pendingConnectCount=0,this._waitPromise=null}return _createClass(o,[{key:"destroy",value:function(){this._destroyed||(this._connectionsByEndpoint.forEach(function(e){return e.destroy(t.CommunicatorDestroyed)}),this._destroyed=!0,this._communicator=null,this.checkFinished())}},{key:"waitUntilFinished",value:function(){return this._waitPromise=new Ice.Promise,this.checkFinished(),this._waitPromise}},{key:"create",value:function(e,t,i){n.assert(e.length>0);var r=this.applyOverrides(e);try{var o=this.findConnectionByEndpoint(r);if(null!==o)return Ice.Promise.resolve(o)}catch(e){return Ice.Promise.reject(e)}return new a(this,r,t,i).start()}},{key:"setRouterInfo",value:function(e){var t=this;return Ice.Promise.try(function(){if(t._destroyed)throw new Ice.CommunicatorDestroyedException;return e.getClientEndpoints()}).then(function(n){var i=e.getAdapter(),r=t._instance.defaultsAndOverrides();n.forEach(function(e){r.overrideTimeout&&(e=e.changeTimeout(r.overrideTimeoutValue)),e=e.changeCompress(!1),t._connectionsByEndpoint.forEach(function(t){t.endpoint().equals(e)&&t.setAdapter(i)})})})}},{key:"removeAdapter",value:function(e){this._destroyed||this._connectionsByEndpoint.forEach(function(t){t.getAdapter()===e&&t.setAdapter(null)})}},{key:"flushAsyncBatchRequests",value:function(){var t=new e(this._communicator,"flushBatchRequests",null,null,null);return this._destroyed?(t.resolve(),t):(Ice.Promise.all(this._connectionsByEndpoint.map(function(e){if(e.isActiveOrHolding())return e.flushBatchRequests().catch(function(e){if(!(e instanceof Ice.LocalException))throw e})})).then(t.resolve,t.reject),t)}},{key:"applyOverrides",value:function(e){var t=this._instance.defaultsAndOverrides();return e.map(function(e){return t.overrideTimeout?e.changeTimeout(t.overrideTimeoutValue):e})}},{key:"findConnectionByEndpoint",value:function(e){if(this._destroyed)throw new Ice.CommunicatorDestroyedException;n.assert(e.length>0);for(var t=0;t<e.length;++t){var i=e[t];if(!this._pending.has(i)){var r=this._connectionsByEndpoint.get(i);if(void 0!==r)for(var o=0;o<r.length;++o)if(r[o].isActiveOrHolding())return r[o]}}return null}},{key:"incPendingConnectCount",value:function(){if(this._destroyed)throw new Ice.CommunicatorDestroyedException;++this._pendingConnectCount}},{key:"decPendingConnectCount",value:function(){--this._pendingConnectCount,n.assert(this._pendingConnectCount>=0),this._destroyed&&0===this._pendingConnectCount&&this.checkFinished()}},{key:"getConnection",value:function(e,t){var n=this;if(this._destroyed)throw new Ice.CommunicatorDestroyedException;var i=this._monitor.swapReapedConnections();for(null!==i&&i.forEach(function(e){n._connectionsByEndpoint.removeConnection(e.endpoint(),e),n._connectionsByEndpoint.removeConnection(e.endpoint().changeCompress(!0),e)});;){if(this._destroyed)throw new Ice.CommunicatorDestroyedException;var r=this.findConnectionByEndpoint(e);if(null!==r)return r;if(this.addToPending(t,e))return null;break}return t.nextEndpoint(),null}},{key:"createConnection",value:function(e,i){n.assert(this._pending.has(i)&&null!==e);var r=null;try{if(this._destroyed)throw new Ice.CommunicatorDestroyedException;r=new t(this._communicator,this._instance,this._monitor,e,i.changeCompress(!1),!1,null)}catch(t){if(t instanceof Ice.LocalException)try{e.close()}catch(e){}throw t}return this._connectionsByEndpoint.set(r.endpoint(),r),this._connectionsByEndpoint.set(r.endpoint().changeCompress(!0),r),r}},{key:"finishGetConnection",value:function(e,t,n,i){var r=this,o=[];null!==i&&o.push(i);var s=[];e.forEach(function(e){var n=r._pending.get(e);void 0!==n&&(r._pending.delete(e),n.forEach(function(e){e.hasEndpoint(t)?-1===o.indexOf(e)&&o.push(e):-1===s.indexOf(e)&&s.push(e)}))}),o.forEach(function(e){e.removeFromPending();var t=s.indexOf(e);-1!==t&&s.splice(t,1)}),s.forEach(function(e){return e.removeFromPending()}),s.forEach(function(e){return e.getConnection()}),o.forEach(function(e){return e.setConnection(n)}),this.checkFinished()}},{key:"finishGetConnectionEx",value:function(e,t,i){var r=this,o=[];null!==i&&o.push(i);var s=[];e.forEach(function(t){var n=r._pending.get(t);void 0!==n&&(r._pending.delete(t),n.forEach(function(t){t.removeEndpoints(e)?-1===o.indexOf(t)&&o.push(t):-1===s.indexOf(t)&&s.push(t)}))}),s.forEach(function(e){n.assert(-1===o.indexOf(e)),e.removeFromPending()}),this.checkFinished(),s.forEach(function(e){return e.getConnection()}),o.forEach(function(e){return e.setException(t)})}},{key:"addToPending",value:function(e,t){var n=this,i=!1;return null!==e&&t.forEach(function(t){var r=n._pending.get(t);void 0!==r&&(i=!0,-1===r.indexOf(e)&&r.push(e))}),!!i||(t.forEach(function(e){n._pending.has(e)||n._pending.set(e,[])}),!1)}},{key:"removeFromPending",value:function(e,t){var n=this;t.forEach(function(t){var i=n._pending.get(t);if(void 0!==i){var r=i.indexOf(e);-1!==r&&i.splice(r,1)}})}},{key:"handleConnectionException",value:function(e,t){var n=this._instance.traceLevels();if(n.network>=2){var i=[];i.push("connection to endpoint failed"),e instanceof Ice.CommunicatorDestroyedException?i.push("\n"):t?i.push(", trying next endpoint\n"):i.push(" and no more endpoints to try\n"),i.push(e.toString()),this._instance.initializationData().logger.trace(n.networkCat,i.join(""))}}},{key:"handleException",value:function(e,t){var n=this._instance.traceLevels();if(n.network>=2){var i=[];i.push("couldn't resolve endpoint host"),e instanceof Ice.CommunicatorDestroyedException?i.push("\n"):t?i.push(", trying next endpoint\n"):i.push(" and no more endpoints to try\n"),i.push(e.toString()),this._instance.initializationData().logger.trace(n.networkCat,i.join(""))}}},{key:"checkFinished",value:function(){var e=this;!this._waitPromise||!this._destroyed||this._pending.size>0||this._pendingConnectCount>0||Ice.Promise.all(this._connectionsByEndpoint.map(function(e){return e.waitUntilFinished().catch(function(e){return n.assert(!1)})})).then(function(){var t=e._monitor.swapReapedConnections();if(null!==t){var i=[];e._connectionsByEndpoint.forEach(function(e){-1===i.indexOf(e)&&i.push(e)}),n.assert(t.length===i.length),e._connectionsByEndpoint.clear()}else n.assert(0===e._connectionsByEndpoint.size);n.assert(null!==e._waitPromise),e._waitPromise.resolve(),e._monitor.destroy()})}}]),o}();Ice.OutgoingConnectionFactory=o;var s=function(e){function r(e){return _classCallCheck(this,r),_possibleConstructorReturn(this,_getPrototypeOf(r).call(this,e||i.compareEquals))}return _inherits(r,i),_createClass(r,[{key:"set",value:function(e,i){var o=this.get(e);void 0===o&&(o=[],_get(_getPrototypeOf(r.prototype),"set",this).call(this,e,o)),n.assert(i instanceof t),o.push(i)}},{key:"removeConnection",value:function(e,t){var i=this.get(e);n.assert(null!==i);var r=i.indexOf(t);n.assert(-1!==r),i.splice(r,1),0===i.length&&this.delete(e)}},{key:"map",value:function(e){var t=[];return this.forEach(function(n){return t.push(e(n))}),t}},{key:"forEach",value:function(e){var t=!0,n=!1,i=void 0;try{for(var r,o=this.values()[Symbol.iterator]();!(t=(r=o.next()).done);t=!0){r.value.forEach(e)}}catch(e){n=!0,i=e}finally{try{t||null==o.return||o.return()}finally{if(n)throw i}}}}]),r}(),a=function(){function e(t,n,i,r){_classCallCheck(this,e),this._factory=t,this._endpoints=n,this._hasMore=i,this._selType=r,this._promise=new Ice.Promise,this._index=0,this._current=null}return _createClass(e,[{key:"connectionStartCompleted",value:function(e){e.activate(),this._factory.finishGetConnection(this._endpoints,this._current,e,this)}},{key:"connectionStartFailed",value:function(e,t){n.assert(null!==this._current),this.connectionStartFailedImpl(t)&&this.nextEndpoint()}},{key:"setConnection",value:function(e){this._promise.resolve(e),this._factory.decPendingConnectCount()}},{key:"setException",value:function(e){this._promise.reject(e),this._factory.decPendingConnectCount()}},{key:"hasEndpoint",value:function(e){return-1!==this.findEndpoint(e)}},{key:"findEndpoint",value:function(e){return this._endpoints.findIndex(function(t){return e.equals(t)})}},{key:"removeEndpoints",value:function(e){var t=this;return e.forEach(function(e){var n=t.findEndpoint(e);-1!==n&&t._endpoints.splice(n,1)}),this._index=0,0===this._endpoints.length}},{key:"removeFromPending",value:function(){this._factory.removeFromPending(this,this._endpoints)}},{key:"start",value:function(){try{this._factory.incPendingConnectCount()}catch(e){return void this._promise.reject(e)}return this.getConnection(),this._promise}},{key:"getConnection",value:function(){try{var e=this._factory.getConnection(this._endpoints,this);if(null===e)return;this._promise.resolve(e),this._factory.decPendingConnectCount()}catch(e){this._promise.reject(e),this._factory.decPendingConnectCount()}}},{key:"nextEndpoint",value:function(){for(var e=this,t=function(t){t.start().then(function(){e.connectionStartCompleted(t)},function(n){e.connectionStartFailed(t,n)})};;){var i=this._factory._instance.traceLevels();try{if(n.assert(this._index<this._endpoints.length),this._current=this._endpoints[this._index++],i.network>=2){var r=[];r.push("trying to establish "),r.push(this._current.protocol()),r.push(" connection to "),r.push(this._current.toConnectorString()),this._factory._instance.initializationData().logger.trace(i.networkCat,r.join(""))}t(this._factory.createConnection(this._current.connect(),this._current))}catch(e){if(i.network>=2){var o=[];o.push("failed to establish "),o.push(this._current.protocol()),o.push(" connection to "),o.push(this._current.toString()),o.push("\n"),o.push(e.toString()),this._factory._instance.initializationData().logger.trace(i.networkCat,o.join(""))}if(this.connectionStartFailedImpl(e))continue}break}}},{key:"connectionStartFailedImpl",value:function(e){if(e instanceof Ice.LocalException)if(this._factory.handleConnectionException(e,this._hasMore||this._index<this._endpoints.length),e instanceof Ice.CommunicatorDestroyedException)this._factory.finishGetConnectionEx(this._endpoints,e,this);else{if(this._index<this._endpoints.length)return!0;this._factory.finishGetConnectionEx(this._endpoints,e,this)}else this._factory.finishGetConnectionEx(this._endpoints,e,this);return!1}}]),e}()}(),function(){var e=Ice.Debug,t=Ice.HashUtil,n=Ice.StringUtil,i=void 0!==Ice.TcpTransceiver?Ice.TcpTransceiver:null,r=function(r){function o(e,t,n,i,r,s,a){var c;return _classCallCheck(this,o),(c=_possibleConstructorReturn(this,_getPrototypeOf(o).call(this,e,t,n,i,s)))._timeout=void 0===r?e?e.defaultTimeout():void 0:r,c._compress=void 0!==a&&a,c}return _inherits(o,Ice.IPEndpointI),_createClass(o,[{key:"getInfo",value:function(){var e=new Ice.TCPEndpointInfo;return this.fillEndpointInfo(e),this.secure()?new IceSSL.EndpointInfo(e,e.timeout,e.compress):e}},{key:"timeout",value:function(){return this._timeout}},{key:"changeTimeout",value:function(e){return e===this._timeout?this:new o(this._instance,this._host,this._port,this._sourceAddr,e,this._connectionId,this._compress)}},{key:"changeConnectionId",value:function(e){return e===this._connectionId?this:new o(this._instance,this._host,this._port,this._sourceAddr,this._timeout,e,this._compress)}},{key:"compress",value:function(){return this._compress}},{key:"changeCompress",value:function(e){return e===this._compress?this:new o(this._instance,this._host,this._port,this._sourceAddr,this._timeout,this._connectionId,e)}},{key:"datagram",value:function(){return!1}},{key:"connectable",value:function(){return null!==i&&!this.secure()}},{key:"connect",value:function(){return e.assert(!this.secure()),i.createOutgoing(this._instance,this.getAddress(),this._sourceAddr)}},{key:"options",value:function(){var e=_get(_getPrototypeOf(o.prototype),"options",this).call(this);return-1==this._timeout?e+=" -t infinite":e+=" -t "+this._timeout,this._compress&&(e+=" -z"),e}},{key:"compareTo",value:function(e){return this===e?0:null===e?1:e instanceof o?this._timeout<e._timeout?-1:e._timeout<this._timeout?1:!this._compress&&e._compress?-1:!e._compress&&this._compress?1:_get(_getPrototypeOf(o.prototype),"compareTo",this).call(this,e):this.type()<e.type()?-1:1}},{key:"streamWriteImpl",value:function(e){_get(_getPrototypeOf(o.prototype),"streamWriteImpl",this).call(this,e),e.writeInt(this._timeout),e.writeBool(this._compress)}},{key:"hashInit",value:function(e){return e=_get(_getPrototypeOf(o.prototype),"hashInit",this).call(this,e),e=t.addNumber(e,this._timeout),e=t.addBoolean(e,this._compress)}},{key:"fillEndpointInfo",value:function(e){_get(_getPrototypeOf(o.prototype),"fillEndpointInfo",this).call(this,e),e.timeout=this._timeout,e.compress=this._compress}},{key:"initWithStream",value:function(e){_get(_getPrototypeOf(o.prototype),"initWithStream",this).call(this,e),this._timeout=e.readInt(),this._compress=e.readBool()}},{key:"checkOption",value:function(e,t,i){if(_get(_getPrototypeOf(o.prototype),"checkOption",this).call(this,e,t,i))return!0;if("-t"===e){if(null===t)throw new Ice.EndpointParseException("no argument provided for -t option in endpoint "+i);if("infinite"==t)this._timeout=-1;else{var r=!1;try{this._timeout=n.toInt(t)}catch(e){r=!0}if(r||this._timeout<1)throw new Ice.EndpointParseException("invalid timeout value `"+t+"' in endpoint "+i)}}else{if("-z"!==e)return!1;if(null!==t)throw new Ice.EndpointParseException("unexpected argument `"+t+"' provided for -z option in "+i);this._compress=!0}return!0}},{key:"createEndpoint",value:function(e,t,n){return new o(this._instance,e,t,this._sourceAddr,this._timeout,n,this._compress)}}]),o}();Ice.TcpEndpointI=r}(),function(){var e=Ice.ArrayUtil,t=Ice.Debug,n=Ice.BatchRequestQueue,i=Ice.HashUtil,r=Ice.OpaqueEndpointI,o=Ice.ReferenceMode,s=Ice.StringUtil,a=Ice.StringSeqHelper,c=Ice.EndpointSelectionType,u=Ice.Identity,l=Ice.RouterPrx,h=Ice.LocatorPrx,_=Ice.PropertyNames,d=Ice.ConnectionRequestHandler,p=Ice.MapUtil,f=["EndpointSelection","ConnectionCached","PreferSecure","EncodingVersion","LocatorCacheTimeout","InvocationTimeout","Locator","Router","CollocationOptimized"],y=function(){function e(t,n){_classCallCheck(this,e),this._instance=t,this._communicator=n,this._defaultRouter=null,this._defaultLocator=null}return _createClass(e,[{key:"create",value:function(e,t,n,i){return 0===e.name.length&&0===e.category.length?null:this.createImpl(e,t,n.getMode(),n.getSecure(),n.getProtocol(),n.getEncoding(),i,null,null)}},{key:"createWithAdapterId",value:function(e,t,n,i){return 0===e.name.length&&0===e.category.length?null:this.createImpl(e,t,n.getMode(),n.getSecure(),n.getProtocol(),n.getEncoding(),null,i,null)}},{key:"createFixed",value:function(e,t){return 0===e.name.length&&0===e.category.length?null:new g(this._instance,this._communicator,e,"",t.endpoint().datagram()?o.ModeDatagram:o.ModeTwoway,t.endpoint().secure(),Ice.Protocol_1_0,this._instance.defaultsAndOverrides().defaultEncoding,t,-1,null)}},{key:"copy",value:function(e){var t=e.getIdentity();return 0===t.name.length&&0===t.category.length?null:e.clone()}},{key:"createFromString",value:function(e,n){if(null==e||0===e.length)return null;var i=" \t\n\r",r=0,a=s.findFirstNotOf(e,i,r);if(-1==a)throw new Ice.ProxyParseException("no non-whitespace characters found in `"+e+"'");var c=null;if(-1===(r=s.checkQuote(e,a)))throw new Ice.ProxyParseException("mismatched quotes around identity in `"+e+"'");if(0===r?(-1===(r=s.findFirstOf(e,i+":@",a))&&(r=e.length),c=e.substring(a,r)):(a++,c=e.substring(a,r),r++),a===r)throw new Ice.ProxyParseException("no identity in `"+e+"'");var u=Ice.stringToIdentity(c);if(0===u.name.length){if(u.category.length>0)throw new Ice.IllegalIdentityException(u);if(-1!=s.findFirstNotOf(e,i,r))throw new Ice.ProxyParseException("invalid characters after identity in `"+e+"'");return null}for(var l="",h=o.ModeTwoway,_=!1,d=this._instance.defaultsAndOverrides().defaultEncoding,p=Ice.Protocol_1_0,f="";-1!==(a=s.findFirstNotOf(e,i,r))&&":"!=e.charAt(a)&&"@"!=e.charAt(a)&&(-1==(r=s.findFirstOf(e,i+":@",a))&&(r=e.length),a!=r);){var y=e.substring(a,r);if(2!=y.length||"-"!=y.charAt(0))throw new Ice.ProxyParseException("expected a proxy option but found `"+y+"' in `"+e+"'");var v=null,g=s.findFirstNotOf(e,i,r);if(-1!=g){var I=e.charAt(g);if("@"!=I&&":"!=I&&"-"!=I){if(a=g,-1==(r=s.checkQuote(e,a)))throw new Ice.ProxyParseException("mismatched quotes around value for "+y+" option in `"+e+"'");0===r?(-1===(r=s.findFirstOf(e,i+":@",a))&&(r=e.length),v=e.substring(a,r)):(a++,v=e.substring(a,r),r++)}}switch(y.charAt(1)){case"f":if(null===v)throw new Ice.ProxyParseException("no argument provided for -f option in `"+e+"'");try{l=s.unescapeString(v,0,v.length)}catch(t){throw new Ice.ProxyParseException("invalid facet in `"+e+"': "+t.message)}break;case"t":if(null!==v)throw new Ice.ProxyParseException("unexpected argument `"+v+"' provided for -t option in `"+e+"'");h=o.ModeTwoway;break;case"o":if(null!==v)throw new Ice.ProxyParseException("unexpected argument `"+v+"' provided for -o option in `"+e+"'");h=o.ModeOneway;break;case"O":if(null!==v)throw new Ice.ProxyParseException("unexpected argument `"+v+"' provided for -O option in `"+e+"'");h=o.ModeBatchOneway;break;case"d":if(null!==v)throw new Ice.ProxyParseException("unexpected argument `"+v+"' provided for -d option in `"+e+"'");h=o.ModeDatagram;break;case"D":if(null!==v)throw new Ice.ProxyParseException("unexpected argument `"+v+"' provided for -D option in `"+e+"'");h=o.ModeBatchDatagram;break;case"s":if(null!==v)throw new Ice.ProxyParseException("unexpected argument `"+v+"' provided for -s option in `"+e+"'");_=!0;break;case"e":if(null===v)throw new Ice.ProxyParseException("no argument provided for -e option in `"+e+"'");try{d=Ice.stringToEncodingVersion(v)}catch(t){throw new Ice.ProxyParseException("invalid encoding version `"+v+"' in `"+e+"':\n"+t.str)}break;case"p":if(null===v)throw new Ice.ProxyParseException("no argument provided for -p option in `"+e+"'");try{p=Ice.stringToProtocolVersion(v)}catch(t){throw new Ice.ProxyParseException("invalid protocol version `"+v+"' in `"+e+"':\n"+t.str)}break;default:throw new Ice.ProxyParseException("unknown option `"+y+"' in `"+e+"'")}}if(-1===a)return this.createImpl(u,l,h,_,p,d,null,null,n);var m=[];if(":"==e.charAt(a)){var k=[];for(r=a;r<e.length&&":"==e.charAt(r);){for(r=a=r+1;;){if(-1==(r=e.indexOf(":",r))){r=e.length;break}for(var w=!1,C=a;!(-1==(C=e.indexOf('"',C))||r<C)&&-1!=(C=e.indexOf('"',++C));){if(r<C){w=!0;break}++C}if(!w)break;++r}var S=e.substring(a,r),x=this._instance.endpointFactoryManager().create(S,!1);null!==x?m.push(x):k.push(S)}if(0===m.length)throw t.assert(k.length>0),new Ice.EndpointParseException("invalid endpoint `"+k[0]+"' in `"+e+"'");if(0!==k.length&&this._instance.initializationData().properties.getPropertyAsIntWithDefault("Ice.Warn.Endpoints",1)>0){var E=[];E.push("Proxy contains unknown endpoints:"),k.forEach(function(e){E.push(" `"),E.push(e),E.push("'")}),this._instance.initializationData().logger.warning(E.join(""))}return this.createImpl(u,l,h,_,p,d,m,null,n)}if("@"==e.charAt(a)){if(-1==(a=s.findFirstNotOf(e,i,a+1)))throw new Ice.ProxyParseException("missing adapter id in `"+e+"'");var b=null;if(-1===(r=s.checkQuote(e,a)))throw new Ice.ProxyParseException("mismatched quotes around adapter id in `"+e+"'");if(0===r?(-1===(r=s.findFirstOf(e,i,a))&&(r=e.length),b=e.substring(a,r)):(a++,b=e.substring(a,r),r++),r!==e.length&&-1!==s.findFirstNotOf(e,i,r))throw new Ice.ProxyParseException("invalid trailing characters after `"+e.substring(0,r+1)+"' in `"+e+"'");try{f=s.unescapeString(b,0,b.length)}catch(t){throw new Ice.ProxyParseException("invalid adapter id in `"+e+"': "+t.message)}if(0===f.length)throw new Ice.ProxyParseException("empty adapter id in `"+e+"'");return this.createImpl(u,l,h,_,p,d,null,f,n)}throw new Ice.ProxyParseException("malformed proxy `"+e+"'")}},{key:"createFromStream",value:function(e,t){if(0===e.name.length&&0===e.category.length)return null;var n,i=a.read(t);if(i.length>0){if(i.length>1)throw new Ice.ProxyUnmarshalException;n=i[0]}else n="";var r=t.readByte();if(r<0||r>o.ModeLast)throw new Ice.ProxyUnmarshalException;var s=t.readBool(),c=null,u=null;t.getEncoding().equals(Ice.Encoding_1_0)?(c=Ice.Protocol_1_0,u=Ice.Encoding_1_0):((c=new Ice.ProtocolVersion)._read(t),(u=new Ice.EncodingVersion)._read(t));var l=null,h=null,_=t.readSize();if(_>0){l=[];for(var d=0;d<_;d++)l[d]=this._instance.endpointFactoryManager().read(t)}else h=t.readString();return this.createImpl(e,n,r,s,c,u,l,h,null)}},{key:"setDefaultRouter",value:function(t){if(null===this._defaultRouter?null===t:this._defaultRouter.equals(t))return this;var n=new e(this._instance,this._communicator);return n._defaultLocator=this._defaultLocator,n._defaultRouter=t,n}},{key:"getDefaultRouter",value:function(){return this._defaultRouter}},{key:"setDefaultLocator",value:function(t){if(null===this._defaultLocator?null===t:this._defaultLocator.equals(t))return this;var n=new e(this._instance,this._communicator);return n._defaultRouter=this._defaultRouter,n._defaultLocator=t,n}},{key:"getDefaultLocator",value:function(){return this._defaultLocator}},{key:"checkForUnknownProperties",value:function(e){for(var t=[],n=0;n<_.clPropNames.length;++n)if(0===e.indexOf(_.clPropNames[n]+"."))return;var i=this._instance.initializationData().properties.getPropertiesForPrefix(e+".");if((t=t.concat(Array.from(i.keys()).filter(function(t){return!f.some(function(n){return t===e+"."+n})}))).length>0){var r=[];r.push("found unknown properties for proxy '"),r.push(e),r.push("':"),t.forEach(function(e){return r.push("\n ",e)}),this._instance.initializationData().logger.warning(r.join(""))}}},{key:"createImpl",value:function(e,t,n,i,r,o,s,a,u){var _=this._instance.defaultsAndOverrides(),d=null;null!==this._defaultLocator&&(d=this._defaultLocator._getReference().getEncoding().equals(o)?this._instance.locatorManager().find(this._defaultLocator):this._instance.locatorManager().find(this._defaultLocator.ice_encodingVersion(o)));var p=this._instance.routerManager().find(this._defaultRouter),f=!0,y=_.defaultPreferSecure,v=_.defaultEndpointSelection,g=_.defaultLocatorCacheTimeout,m=_.defaultInvocationTimeout;if(null!==u&&u.length>0){var k=this._instance.initializationData().properties;k.getPropertyAsIntWithDefault("Ice.Warn.UnknownProperties",1)>0&&this.checkForUnknownProperties(u);var w=u+".Locator",C=h.uncheckedCast(this._communicator.propertyToProxy(w));null!==C&&(d=C._getReference().getEncoding().equals(o)?this._instance.locatorManager().find(C):this._instance.locatorManager().find(C.ice_encodingVersion(o))),w=u+".Router";var S=l.uncheckedCast(this._communicator.propertyToProxy(w));if(null!==S){u.lastIndexOf(".Router")==u.length-".Router".length?this._instance.initializationData().logger.warning("`"+w+"="+k.getProperty(w)+"': cannot set a router on a router; setting ignored"):p=this._instance.routerManager().find(S)}if(w=u+".ConnectionCached",f=k.getPropertyAsIntWithDefault(w,f?1:0)>0,w=u+".PreferSecure",y=k.getPropertyAsIntWithDefault(w,y?1:0)>0,w=u+".EndpointSelection",k.getProperty(w).length>0){var x=k.getProperty(w);if("Random"==x)v=c.Random;else{if("Ordered"!=x)throw new Ice.EndpointSelectionTypeParseException("illegal value `"+x+"'; expected `Random' or `Ordered'");v=c.Ordered}}w=u+".LocatorCacheTimeout";var E=k.getProperty(w);0!==E.length&&(g=k.getPropertyAsIntWithDefault(w,g))<-1&&(g=-1,this._instance.initializationData().logger.warning("invalid value for"+w+"`"+k.getProperty(w)+"': defaulting to -1")),w=u+".InvocationTimeout",0!==(E=k.getProperty(w)).length&&(m=k.getPropertyAsIntWithDefault(w,m))<1&&-1!==m&&(m=-1,this._instance.initializationData().logger.warning("invalid value for"+w+"`"+k.getProperty(w)+"': defaulting to -1"))}return new I(this._instance,this._communicator,e,t,n,i,r,o,s,a,d,p,f,y,v,g,m)}}]),e}();Ice.ReferenceFactory=y;var v=function(){function e(n,i,r,o,s,a,c,u,l,h){_classCallCheck(this,e),t.assert(void 0===r||null!==r.name),t.assert(void 0===r||null!==r.category),t.assert(void 0===o||null!==o),this._instance=n,this._communicator=i,this._mode=s,this._secure=a,this._identity=r,this._context=void 0===h?e._emptyContext:h,this._facet=o,this._protocol=c,this._encoding=u,this._invocationTimeout=l,this._hashInitialized=!1}return _createClass(e,[{key:"getMode",value:function(){return this._mode}},{key:"getSecure",value:function(){return this._secure}},{key:"getProtocol",value:function(){return this._protocol}},{key:"getEncoding",value:function(){return this._encoding}},{key:"getIdentity",value:function(){return this._identity}},{key:"getFacet",value:function(){return this._facet}},{key:"getInstance",value:function(){return this._instance}},{key:"getContext",value:function(){return this._context}},{key:"getInvocationTimeout",value:function(){return this._invocationTimeout}},{key:"getCommunicator",value:function(){return this._communicator}},{key:"getEndpoints",value:function(){return t.assert(!1),null}},{key:"getAdapterId",value:function(){return t.assert(!1),""}},{key:"getRouterInfo",value:function(){return t.assert(!1),null}},{key:"getLocatorInfo",value:function(){return t.assert(!1),null}},{key:"getCacheConnection",value:function(){return t.assert(!1),!1}},{key:"getPreferSecure",value:function(){return t.assert(!1),!1}},{key:"getEndpointSelection",value:function(){return t.assert(!1),null}},{key:"getLocatorCacheTimeout",value:function(){return t.assert(!1),0}},{key:"getConnectionId",value:function(){return t.assert(!1),""}},{key:"getTimeout",value:function(){return t.assert(!1),""}},{key:"changeContext",value:function(t){null==t&&(t=e._emptyContext);var n=this._instance.referenceFactory().copy(this);return 0===t.size?n._context=e._emptyContext:n._context=new Map(t),n}},{key:"changeMode",value:function(e){if(e===this._mode)return this;var t=this._instance.referenceFactory().copy(this);return t._mode=e,t}},{key:"changeSecure",value:function(e){if(e===this._secure)return this;var t=this._instance.referenceFactory().copy(this);return t._secure=e,t}},{key:"changeIdentity",value:function(e){if(e.equals(this._identity))return this;var t=this._instance.referenceFactory().copy(this);return t._identity=new u(e.name,e.category),t}},{key:"changeFacet",value:function(e){if(e===this._facet)return this;var t=this._instance.referenceFactory().copy(this);return t._facet=e,t}},{key:"changeInvocationTimeout",value:function(e){if(e===this._invocationTimeout)return this;var t=this._instance.referenceFactory().copy(this);return t._invocationTimeout=e,t}},{key:"changeEncoding",value:function(e){if(e.equals(this._encoding))return this;var t=this._instance.referenceFactory().copy(this);return t._encoding=e,t}},{key:"changeAdapterId",value:function(e){return t.assert(!1),null}},{key:"changeEndpoints",value:function(e){return t.assert(!1),null}},{key:"changeLocator",value:function(e){return t.assert(!1),null}},{key:"changeRouter",value:function(e){return t.assert(!1),null}},{key:"changeCacheConnection",value:function(e){return t.assert(!1),null}},{key:"changePreferSecure",value:function(e){return t.assert(!1),null}},{key:"changeEndpointSelection",value:function(e){return t.assert(!1),null}},{key:"changeLocatorCacheTimeout",value:function(e){return t.assert(!1),null}},{key:"changeTimeout",value:function(e){return t.assert(!1),null}},{key:"changeConnectionId",value:function(e){return t.assert(!1),null}},{key:"changeConnection",value:function(e){return t.assert(!1),null}},{key:"hashCode",value:function(){if(this._hashInitialized)return this._hashValue;var e=5381;if(e=i.addNumber(e,this._mode),e=i.addBoolean(e,this._secure),e=i.addHashable(e,this._identity),null!==this._context&&void 0!==this._context){var t=!0,n=!1,r=void 0;try{for(var o,s=this._context[Symbol.iterator]();!(t=(o=s.next()).done);t=!0){var a=_slicedToArray(o.value,2),c=a[0],u=a[1];e=i.addString(e,c),e=i.addString(e,u)}}catch(e){n=!0,r=e}finally{try{t||null==s.return||s.return()}finally{if(n)throw r}}}return e=i.addString(e,this._facet),e=i.addHashable(e,this._protocol),e=i.addHashable(e,this._encoding),e=i.addNumber(e,this._invocationTimeout),this._hashValue=e,this._hashInitialized=!0,this._hashValue}},{key:"isIndirect",value:function(){return t.assert(!1),!1}},{key:"isWellKnown",value:function(){return t.assert(!1),!1}},{key:"streamWrite",value:function(e){0===this._facet.length?e.writeSize(0):(e.writeSize(1),e.writeString(this._facet)),e.writeByte(this._mode),e.writeBool(this._secure),e.getEncoding().equals(Ice.Encoding_1_0)||(this._protocol._write(e),this._encoding._write(e))}},{key:"toString",value:function(){var e=[],n=this._instance.toStringMode(),i=Ice.identityToString(this._identity,n);if(-1!=i.search(/[ :@]/)?(e.push('"'),e.push(i),e.push('"')):e.push(i),this._facet.length>0){e.push(" -f ");var r=s.escapeString(this._facet,"",n);-1!=r.search(/[ :@]/)?(e.push('"'),e.push(r),e.push('"')):e.push(r)}switch(this._mode){case o.ModeTwoway:e.push(" -t");break;case o.ModeOneway:e.push(" -o");break;case o.ModeBatchOneway:e.push(" -O");break;case o.ModeDatagram:e.push(" -d");break;case o.ModeBatchDatagram:e.push(" -D");break;default:t.assert(!1)}return this._secure&&e.push(" -s"),this._protocol.equals(Ice.Protocol_1_0)||(e.push(" -p "),e.push(Ice.protocolVersionToString(this._protocol))),e.push(" -e "),e.push(Ice.encodingVersionToString(this._encoding)),e.join("")}},{key:"toProperty",value:function(e){return t.assert(!1),null}},{key:"getRequestHandler",value:function(e){t.assert(!1)}},{key:"getBatchRequestQueue",value:function(){t.assert(!1)}},{key:"equals",value:function(e){return this._mode===e._mode&&(this._secure===e._secure&&(!!this._identity.equals(e._identity)&&(!!p.equals(this._context,e._context)&&(this._facet===e._facet&&(!!this._protocol.equals(e._protocol)&&(!!this._encoding.equals(e._encoding)&&this._invocationTimeout===e._invocationTimeout))))))}},{key:"clone",value:function(){return t.assert(!1),null}},{key:"copyMembers",value:function(e){e._context=this._context}}]),e}();v._emptyContext=new Map,v._emptyEndpoints=[],Ice.Reference=v;var g=function(e){function n(e,t,i,r,o,s,a,c,u,l,h){var _;return _classCallCheck(this,n),(_=_possibleConstructorReturn(this,_getPrototypeOf(n).call(this,e,t,i,r,o,s,a,c,l,h)))._fixedConnection=u,_}return _inherits(n,v),_createClass(n,[{key:"getEndpoints",value:function(){return v._emptyEndpoints}},{key:"getAdapterId",value:function(){return""}},{key:"getRouterInfo",value:function(){return null}},{key:"getLocatorInfo",value:function(){return null}},{key:"getCacheConnection",value:function(){return!0}},{key:"getPreferSecure",value:function(){return!1}},{key:"getEndpointSelection",value:function(){return c.Random}},{key:"getLocatorCacheTimeout",value:function(){return 0}},{key:"getConnectionId",value:function(){return""}},{key:"getTimeout",value:function(){}},{key:"changeAdapterId",value:function(e){throw new Ice.FixedProxyException}},{key:"changeEndpoints",value:function(e){throw new Ice.FixedProxyException}},{key:"changeLocato",value:function(e){throw new Ice.FixedProxyException}},{key:"changeRouter",value:function(e){throw new Ice.FixedProxyException}},{key:"changeCacheConnection",value:function(e){throw new Ice.FixedProxyException}},{key:"changePreferSecure",value:function(e){throw new Ice.FixedProxyException}},{key:"changeEndpointSelection",value:function(e){throw new Ice.FixedProxyException}},{key:"changeLocatorCacheTimeout",value:function(e){throw new Ice.FixedProxyException}},{key:"changeTimeout",value:function(e){throw new Ice.FixedProxyException}},{key:"changeConnectionId",value:function(e){throw new Ice.FixedProxyException}},{key:"changeConnection",value:function(e){if(e==this._fixedConnection)return this;var t=this.getInstance().referenceFactory().copy(this);return t._fixedConnection=e,t}},{key:"isIndirect",value:function(){return!1}},{key:"isWellKnown",value:function(){return!1}},{key:"streamWrite",value:function(e){throw new Ice.FixedProxyException}},{key:"toProperty",value:function(e){throw new Ice.FixedProxyException}},{key:"clone",value:function(){var e=new n(this.getInstance(),this.getCommunicator(),this.getIdentity(),this.getFacet(),this.getMode(),this.getSecure(),this.getProtocol(),this.getEncoding(),this._fixedConnection,this.getInvocationTimeout(),this.getContext());return this.copyMembers(e),e}},{key:"getRequestHandler",value:function(e){switch(this.getMode()){case o.ModeTwoway:case o.ModeOneway:case o.ModeBatchOneway:if(this._fixedConnection.endpoint().datagram())throw new Ice.NoEndpointException(this.toString());break;case o.ModeDatagram:case o.ModeBatchDatagram:if(!this._fixedConnection.endpoint().datagram())throw new Ice.NoEndpointException(this.toString());break;default:t.assert(!1)}var n=this.getInstance().defaultsAndOverrides();if((n.overrideSecure?n.overrideSecureValue:this.getSecure())&&!this._fixedConnection.endpoint().secure())throw new Ice.NoEndpointException(this.toString());return this._fixedConnection.throwException(),e._setRequestHandler(new d(this,this._fixedConnection))}},{key:"getBatchRequestQueue",value:function(){return this._fixedConnection.getBatchRequestQueue()}},{key:"equals",value:function(e){return this===e||e instanceof n&&(!!_get(_getPrototypeOf(n.prototype),"equals",this).call(this,e)&&this._fixedConnection==e._fixedConnection)}}]),n}();Ice.FixedReference=g;var I=function(a){function u(e,n,i,r,o,s,a,c,l,h,_,d,p,f,y,g,I,m){var k;return _classCallCheck(this,u),(k=_possibleConstructorReturn(this,_getPrototypeOf(u).call(this,e,n,i,r,o,s,a,c,I,m)))._endpoints=l,k._adapterId=h,k._locatorInfo=_,k._routerInfo=d,k._cacheConnection=p,k._preferSecure=f,k._endpointSelection=y,k._locatorCacheTimeout=g,k._overrideTimeout=!1,k._timeout=-1,null===k._endpoints&&(k._endpoints=v._emptyEndpoints),null===k._adapterId&&(k._adapterId=""),k._connectionId="",t.assert(0===k._adapterId.length||0===k._endpoints.length),k}return _inherits(u,v),_createClass(u,[{key:"getEndpoints",value:function(){return this._endpoints}},{key:"getAdapterId",value:function(){return this._adapterId}},{key:"getRouterInfo",value:function(){return this._routerInfo}},{key:"getLocatorInfo",value:function(){return this._locatorInfo}},{key:"getCacheConnection",value:function(){return this._cacheConnection}},{key:"getPreferSecure",value:function(){return this._preferSecure}},{key:"getEndpointSelection",value:function(){return this._endpointSelection}},{key:"getLocatorCacheTimeout",value:function(){return this._locatorCacheTimeout}},{key:"getConnectionId",value:function(){return this._connectionId}},{key:"getTimeout",value:function(){return this._overrideTimeout?this._timeout:void 0}},{key:"changeEncoding",value:function(e){var t=_get(_getPrototypeOf(u.prototype),"changeEncoding",this).call(this,e);return t!==this&&(null===t._locatorInfo||t._locatorInfo.getLocator().ice_getEncodingVersion().equals(e)||(t._locatorInfo=this.getInstance().locatorManager().find(t._locatorInfo.getLocator().ice_encodingVersion(e)))),t}},{key:"changeAdapterId",value:function(e){if(this._adapterId===e)return this;var t=this.getInstance().referenceFactory().copy(this);return t._adapterId=e,t._endpoints=v._emptyEndpoints,t}},{key:"changeEndpoints",value:function(t){if(e.equals(t,this._endpoints,function(e,t){return e.equals(t)}))return this;var n=this.getInstance().referenceFactory().copy(this);return n._endpoints=t,n._adapterId="",n.applyOverrides(n._endpoints),n}},{key:"changeLocator",value:function(e){var t=this.getInstance().locatorManager().find(e);if(null!==t&&null!==this._locatorInfo&&t.equals(this._locatorInfo))return this;var n=this.getInstance().referenceFactory().copy(this);return n._locatorInfo=t,n}},{key:"changeRouter",value:function(e){var t=this.getInstance().routerManager().find(e);if(null!==t&&null!==this._routerInfo&&t.equals(this._routerInfo))return this;var n=this.getInstance().referenceFactory().copy(this);return n._routerInfo=t,n}},{key:"changeCacheConnection",value:function(e){if(e===this._cacheConnection)return this;var t=this.getInstance().referenceFactory().copy(this);return t._cacheConnection=e,t}},{key:"changePreferSecure",value:function(e){if(e===this._preferSecure)return this;var t=this.getInstance().referenceFactory().copy(this);return t._preferSecure=e,t}},{key:"changeEndpointSelection",value:function(e){if(e===this._endpointSelection)return this;var t=this.getInstance().referenceFactory().copy(this);return t._endpointSelection=e,t}},{key:"changeLocatorCacheTimeout",value:function(e){if(this._locatorCacheTimeout===e)return this;var t=this.getInstance().referenceFactory().copy(this);return t._locatorCacheTimeout=e,t}},{key:"changeTimeout",value:function(e){if(this._overrideTimeout&&this._timeout===e)return this;var t=this.getInstance().referenceFactory().copy(this);return t._timeout=e,t._overrideTimeout=!0,t._endpoints=this._endpoints.map(function(t){return t.changeTimeout(e)}),t}},{key:"changeConnectionId",value:function(e){if(this._connectionId===e)return this;var t=this.getInstance().referenceFactory().copy(this);return t._connectionId=e,t._endpoints=this._endpoints.map(function(t){return t.changeConnectionId(e)}),t}},{key:"changeConnection",value:function(e){return new g(this.getInstance(),this.getCommunicator(),this.getIdentity(),this.getFacet(),this.getMode(),this.getSecure(),this.getProtocol(),this.getEncoding(),e,this.getInvocationTimeout(),this.getContext())}},{key:"isIndirect",value:function(){return 0===this._endpoints.length}},{key:"isWellKnown",value:function(){return 0===this._endpoints.length&&0===this._adapterId.length}},{key:"streamWrite",value:function(e){_get(_getPrototypeOf(u.prototype),"streamWrite",this).call(this,e),e.writeSize(this._endpoints.length),this._endpoints.length>0?(t.assert(0===this._adapterId.length),this._endpoints.forEach(function(t){e.writeShort(t.type()),t.streamWrite(e)})):e.writeString(this._adapterId)}},{key:"toString",value:function(){var e=[];if(e.push(_get(_getPrototypeOf(u.prototype),"toString",this).call(this)),this._endpoints.length>0)this._endpoints.forEach(function(t){var n=t.toString();null!==n&&n.length>0&&(e.push(":"),e.push(n))});else if(this._adapterId.length>0){e.push(" @ ");var t=s.escapeString(this._adapterId,null,this._instance.toStringMode());-1!=t.search(/[ :@]/)?(e.push('"'),e.push(t),e.push('"')):e.push(t)}return e.join("")}},{key:"toProperty",value:function(e){var t=new Map;return t.set(e,this.toString()),t.set(e+".CollocationOptimized","0"),t.set(e+".ConnectionCached",this._cacheConnection?"1":"0"),t.set(e+".PreferSecure",this._preferSecure?"1":"0"),t.set(e+".EndpointSelection",this._endpointSelection===c.Random?"Random":"Ordered"),t.set(e+".LocatorCacheTimeout",String(this._locatorCacheTimeout)),t.set(e+".InvocationTimeout",String(this.getInvocationTimeout())),null!==this._routerInfo&&this._routerInfo.getRouter()._getReference().toProperty(e+".Router").forEach(function(e,n){return t.set(n,e)}),null!==this._locatorInfo&&this._locatorInfo.getLocator()._getReference().toProperty(e+".Locator").forEach(function(e,n){return t.set(n,e)}),t}},{key:"hashCode",value:function(){return this._hashInitialized||(_get(_getPrototypeOf(u.prototype),"hashCode",this).call(this),this._hashValue=i.addString(this._hashValue,this._adapterId)),this._hashValue}},{key:"equals",value:function(t){return this===t||t instanceof u&&(!!_get(_getPrototypeOf(u.prototype),"equals",this).call(this,t)&&(!(null===this._locatorInfo?null!==t._locatorInfo:!this._locatorInfo.equals(t._locatorInfo))&&(!(null===this._routerInfo?null!==t._routerInfo:!this._routerInfo.equals(t._routerInfo))&&(this._cacheConnection===t._cacheConnection&&(this._preferSecure===t._preferSecure&&(this._endpointSelection===t._endpointSelection&&(this._locatorCacheTimeout===t._locatorCacheTimeout&&(this._connectionId===t._connectionId&&(this._overrideTimeout===t._overrideTimeout&&((!this._overrideTimeout||this._timeout===t._timeout)&&(!!e.equals(this._endpoints,t._endpoints,function(e,t){return e.equals(t)})&&this._adapterId===t._adapterId)))))))))))}},{key:"getRequestHandler",value:function(e){return this._instance.requestHandlerFactory().getRequestHandler(this,e)}},{key:"getBatchRequestQueue",value:function(){return new n(this._instance,this._mode===o.ModeBatchDatagram)}},{key:"getConnection",value:function(){var e=this,t=new Ice.Promise;return null!==this._routerInfo?this._routerInfo.getClientEndpoints().then(function(n){n.length>0?(e.applyOverrides(n),e.createConnection(n).then(t.resolve,t.reject)):e.getConnectionNoRouterInfo(t)}).catch(t.reject):this.getConnectionNoRouterInfo(t),t}},{key:"getConnectionNoRouterInfo",value:function(e){var n=this;this._endpoints.length>0?this.createConnection(this._endpoints).then(e.resolve).catch(e.reject):null!==this._locatorInfo?this._locatorInfo.getEndpoints(this,null,this._locatorCacheTimeout).then(function(i){var r=_slicedToArray(i,2),o=r[0],s=r[1];0!==o.length?(n.applyOverrides(o),n.createConnection(o).then(e.resolve,function(i){if(i instanceof Ice.NoEndpointException)e.reject(i);else{if(t.assert(null!==n._locatorInfo),n.getLocatorInfo().clearCache(n),s){var r=n.getInstance().traceLevels();return r.retry>=2&&n.getInstance().initializationData().logger.trace(r.retryCat,"connection to cached endpoints failed\nremoving endpoints from cache and trying again\n"+i.toString()),void n.getConnectionNoRouterInfo(e)}e.reject(i)}})):e.reject(new Ice.NoEndpointException(n.toString()))}).catch(e.reject):e.reject(new Ice.NoEndpointException(this.toString()))}},{key:"clone",value:function(){var e=new u(this.getInstance(),this.getCommunicator(),this.getIdentity(),this.getFacet(),this.getMode(),this.getSecure(),this.getProtocol(),this.getEncoding(),this._endpoints,this._adapterId,this._locatorInfo,this._routerInfo,this._cacheConnection,this._preferSecure,this._endpointSelection,this._locatorCacheTimeout,this._invocationTimeout);return this.copyMembers(e),e}},{key:"copyMembers",value:function(e){_get(_getPrototypeOf(u.prototype),"copyMembers",this).call(this,e),e._overrideTimeout=this._overrideTimeout,e._timeout=this._timeout,e._connectionId=this._connectionId}},{key:"applyOverrides",value:function(e){for(var t=0;t<e.length;++t)e[t]=e[t].changeConnectionId(this._connectionId),this._overrideTimeout&&(e[t]=e[t].changeTimeout(this._timeout))}},{key:"filterEndpoints",value:function(n){var i=n.filter(function(e){return!(e instanceof r)&&e.connectable()});switch(this.getMode()){case o.ModeTwoway:case o.ModeOneway:case o.ModeBatchOneway:i=i.filter(function(e){return!e.datagram()});break;case o.ModeDatagram:case o.ModeBatchDatagram:i=i.filter(function(e){return e.datagram()});break;default:t.assert(!1)}switch(this.getEndpointSelection()){case c.Random:e.shuffle(i);break;case c.Ordered:break;default:t.assert(!1)}var s=this.getInstance().defaultsAndOverrides();if(s.overrideSecure?s.overrideSecureValue:this.getSecure())i=i.filter(function(e){return e.secure()});else{var a=this.getPreferSecure();i.sort(function(e,t){var n=e.secure(),i=t.secure();return n&&i||!n&&!i?0:!n&&i?a?1:-1:a?-1:1})}return i}},{key:"createConnection",value:function(e){var t=this.filterEndpoints(e);if(0===t.length)return Ice.Promise.reject(new Ice.NoEndpointException(this.toString()));var n=new Ice.Promise,i=this.getInstance().outgoingConnectionFactory();if(this.getCacheConnection()||1==t.length){var r=new m(this,null,n);i.create(t,!1,this.getEndpointSelection()).then(function(e){return r.setConnection(e)}).catch(function(e){return r.setException(e)})}else{var o=new m(this,t,n);i.create([t[0]],!0,this.getEndpointSelection()).then(function(e){return o.setConnection(e)}).catch(function(e){return o.setException(e)})}return n}}]),u}();Ice.RoutableReference=I;var m=function(){function e(t,n,i){_classCallCheck(this,e),this.ref=t,this.endpoints=n,this.promise=i,this.i=0,this.exception=null}return _createClass(e,[{key:"setConnection",value:function(e){null!==this.ref.getRouterInfo()&&null!==this.ref.getRouterInfo().getAdapter()&&e.setAdapter(this.ref.getRouterInfo().getAdapter()),this.promise.resolve(e)}},{key:"setException",value:function(e){var t=this;null===this.exception&&(this.exception=e),null!==this.endpoints&&++this.i!==this.endpoints.length?this.ref.getInstance().outgoingConnectionFactory().create([this.endpoints[this.i]],this.i!=this.endpoints.length-1,this.ref.getEndpointSelection()).then(function(e){return t.setConnection(e)}).catch(function(e){return t.setException(e)}):this.promise.reject(this.exception)}}]),e}()}(),function(){var e=Ice.HashUtil,t=Ice.EndpointI,n=function(n){function i(e,t,n){var r;return _classCallCheck(this,i),(r=_possibleConstructorReturn(this,_getPrototypeOf(i).call(this)))._instance=e,r._delegate=t,r._resource=n||"/",r}return _inherits(i,t),_createClass(i,[{key:"getInfo",value:function(){var e=this,t=new Ice.WSEndpointInfo;return t.type=function(){return e.type()},t.datagram=function(){return e.datagram()},t.secure=function(){return e.secure()},t.resource=this._resource,t.underlying=this._delegate.getInfo(),t.timeout=t.underlying.timeout,t.compress=t.underlying.compress,t}},{key:"type",value:function(){return this._delegate.type()}},{key:"protocol",value:function(){return this._delegate.protocol()}},{key:"streamWrite",value:function(e){e.startEncapsulation(),this._delegate.streamWriteImpl(e),e.writeString(this._resource),e.endEncapsulation()}},{key:"timeout",value:function(){return this._delegate.timeout()}},{key:"changeTimeout",value:function(e){return e===this._delegate.timeout()?this:new i(this._instance,this._delegate.changeTimeout(e),this._resource)}},{key:"changeConnectionId",value:function(e){return e===this._delegate.connectionId()?this:new i(this._instance,this._delegate.changeConnectionId(e),this._resource)}},{key:"compress",value:function(){return this._delegate.compress()}},{key:"changeCompress",value:function(e){return e===this._delegate.compress()?this:new i(this._instance,this._delegate.changeCompress(e),this._resource)}},{key:"datagram",value:function(){return this._delegate.datagram()}},{key:"secure",value:function(){return this._delegate.secure()}},{key:"connect",value:function(){return Ice.WSTransceiver.createOutgoing(this._instance,this._delegate.secure(),this._delegate.getAddress(),this._resource)}},{key:"hashCode",value:function(){return void 0===this._hashCode&&(this._hashCode=this._delegate.hashCode(),this._hashCode=e.addString(this._hashCode,this._resource)),this._hashCode}},{key:"compareTo",value:function(e){if(this===e)return 0;if(null===e)return 1;if(!(e instanceof i))return this.type()<e.type()?-1:1;var t=this._delegate.compareTo(e._delegate);return 0!==t?t:this._resource!==e._resource?this._resource<e._resource?-1:1:0}},{key:"options",value:function(){var e=this._delegate.options();return null!==this._resource&&this._resource.length>0&&(e+=" -r ",e+=-1!==this._resource.indexOf(":")?'"'+this._resource+'"':this._resource),e}},{key:"toConnectorString",value:function(){return this._delegate.toConnectorString()}},{key:"initWithStream",value:function(e){this._resource=e.readString()}},{key:"checkOption",value:function(e,t,n){if("-r"!==e)return!1;if(null===t)throw new Ice.EndpointParseException("no argument provided for -r option in endpoint "+n);return this._resource=t,!0}},{key:"connectable",value:function(){return void 0!==Ice.WSTransceiver}}]),i}();Ice.WSEndpoint=n}(),function(){var e=Ice.Debug,t=Ice.StringUtil,n=Ice.HashMap,i=function(){function i(e,t){_classCallCheck(this,i),this._instance=e,this._adapterName=t,this._servantMapMap=new n(n.compareEquals),this._defaultServantMap=new Map,this._locatorMap=new Map}return _createClass(i,[{key:"addServant",value:function(n,i,r){e.assert(null!==this._instance),null===r&&(r="");var o=this._servantMapMap.get(i);if(void 0===o)o=new Map,this._servantMapMap.set(i,o);else if(o.has(r)){var s=new Ice.AlreadyRegisteredException;throw s.id=Ice.identityToString(i,this._instance.toStringMode()),s.kindOfObject="servant",r.length>0&&(s.id+=" -f "+t.escapeString(r,"",this._instance.toStringMode())),s}o.set(r,n)}},{key:"addDefaultServant",value:function(t,n){if(e.assert(null!==this._instance),this._defaultServantMap.has(n)){var i=new Ice.AlreadyRegisteredException;throw i.kindOfObject="default servant",i.id=n,i}this._defaultServantMap.set(n,t)}},{key:"removeServant",value:function(n,i){e.assert(null!==this._instance),null===i&&(i="");var r=this._servantMapMap.get(n);if(void 0===r||!r.has(i)){var o=new Ice.NotRegisteredException;throw o.id=Ice.identityToString(n,this._instance.toStringMode()),o.kindOfObject="servant",i.length>0&&(o.id+=" -f "+t.escapeString(i,"",this._instance.toStringMode())),o}var s=r.get(i);return r.delete(i),0===r.size&&this._servantMapMap.delete(n),s}},{key:"removeDefaultServant",value:function(t){e.assert(null!==this._instance);var n=this._defaultServantMap.get(t);if(void 0===n){var i=new Ice.NotRegisteredException;throw i.kindOfObject="default servant",i.id=t,i}return this._defaultServantMap.delete(t),n}},{key:"removeAllFacets",value:function(t){e.assert(null!==this._instance);var n=this._servantMapMap.get(t);if(void 0===n){var i=new Ice.NotRegisteredException;throw i.id=Ice.identityToString(t,this._instance.toStringMode()),i.kindOfObject="servant",i}return this._servantMapMap.delete(t),n}},{key:"findServant",value:function(e,t){null===t&&(t="");var n=this._servantMapMap.get(e),i=null;return void 0===n?void 0===(i=this._defaultServantMap.get(e.category))&&(i=this._defaultServantMap.get("")):i=n.get(t),void 0===i?null:i}},{key:"findDefaultServant",value:function(t){e.assert(null!==this._instance);var n=this._defaultServantMap.get(t);return void 0===n?null:n}},{key:"findAllFacets",value:function(t){e.assert(null!==this._instance);var n=this._servantMapMap.get(t);return void 0!==n?new Map(n):new Map}},{key:"hasServant",value:function(t){var n=this._servantMapMap.get(t);return void 0!==n&&(e.assert(n.size>0),!0)}},{key:"addServantLocator",value:function(n,i){if(e.assert(null!==this._instance),this._locatorMap.has(i)){var r=new Ice.AlreadyRegisteredException;throw r.id=t.escapeString(i,"",this._instance.toStringMode()),r.kindOfObject="servant locator",r}this._locatorMap.set(i,n)}},{key:"removeServantLocator",value:function(n){e.assert(null!==this._instance);var i=this._locatorMap.get(n);if(void 0===i){var r=new Ice.NotRegisteredException;throw r.id=t.escapeString(n,"",this._instance.toStringMode()),r.kindOfObject="servant locator",r}return this._locatorMap.delete(n),i}},{key:"findServantLocator",value:function(e){var t=this._locatorMap.get(e);return void 0===t?null:t}},{key:"destroy",value:function(){e.assert(null!==this._instance);var t=this._instance.initializationData().logger;this._servantMapMap.clear(),this._defaultServantMap.clear();var n=new Map(this._locatorMap);this._locatorMap.clear(),this._instance=null;var i=!0,r=!1,o=void 0;try{for(var s,a=n[Symbol.iterator]();!(i=(s=a.next()).done);i=!0){var c=_slicedToArray(s.value,2),u=c[0],l=c[1];try{l.deactivate(u)}catch(e){t.error("exception during locator deactivation:\nobject adapter: `"+this._adapterName+"'\nlocator category: `"+u+"'\n"+e.toString())}}}catch(e){r=!0,o=e}finally{try{i||null==a.return||a.return()}finally{if(r)throw o}}}}]),i}();Ice.ServantManager=i}(),P=Ice.Context,O=Ice.InitializationException,M=function(){function e(){_classCallCheck(this,e),this._context=new P}return _createClass(e,[{key:"getContext",value:function(){return new P(this._context)}},{key:"setContext",value:function(e){null!==e&&e.size>0?this._context=new P(e):this._context.clear()}},{key:"containsKey",value:function(e){return null===e&&(e=""),this._context.has(e)}},{key:"get",value:function(e){null===e&&(e="");var t=this._context.get(e);return null===t&&(t=""),t}},{key:"put",value:function(e,t){null===e&&(e=""),null===t&&(t="");var n=this._context.get(e);return null===n&&(n=""),this._context.set(e,t),n}},{key:"remove",value:function(e){null===e&&(e="");var t=this._context.get(e);return this._context.delete(e),null===t&&(t=""),t}},{key:"write",value:function(e,t){if(0===e.size)Ice.ContextHelper.write(t,this._context);else{var n=null;if(0===this._context.size)n=e;else{n=new P(this._context);var i=!0,r=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(i=(s=a.next()).done);i=!0){var c=_slicedToArray(s.value,2),u=c[0],l=c[1];n.set(u,l)}}catch(e){r=!0,o=e}finally{try{i||null==a.return||a.return()}finally{if(r)throw o}}}Ice.ContextHelper.write(t,n)}}}],[{key:"create",value:function(t){if(0===t.length||"None"===t)return null;if("Shared"===t)return new e;throw new O("'"+t+"' is not a valid value for Ice.ImplicitContext")}}]),e}(),Ice.ImplicitContextI=M,function(){var e=Ice.Debug,t=Ice.ObjectPrx,n=Ice.StringUtil,i=Ice.Identity,r=function(){function r(e){_classCallCheck(this,r),this._instance=e;var t=this._instance.initializationData().properties.getPropertyAsList("Ice.RetryIntervals");if(t.length>0){this._retryIntervals=[];for(var i=0;i<t.length;i++){var o=void 0;try{o=n.toInt(t[i])}catch(e){o=0}if(0===i&&-1===o)break;this._retryIntervals[i]=o>0?o:0}}else this._retryIntervals=[0]}return _createClass(r,[{key:"stringToProxy",value:function(e){return this.referenceToProxy(this._instance.referenceFactory().createFromString(e,null))}},{key:"proxyToString",value:function(e){return null===e?"":e._getReference().toString()}},{key:"propertyToProxy",value:function(e){var t=this._instance.initializationData().properties.getProperty(e),n=this._instance.referenceFactory().createFromString(t,e);return this.referenceToProxy(n)}},{key:"proxyToProperty",value:function(e,t){return null===e?new Map:e._getReference().toProperty(t)}},{key:"streamToProxy",value:function(e,t){var n=new i;return n._read(e),this.referenceToProxy(this._instance.referenceFactory().createFromStream(n,e),t)}},{key:"referenceToProxy",value:function(e,n){if(null!==e){var i=n?new n:new t;return i._setup(e),i}return null}},{key:"checkRetryAfterException",value:function(t,n,i,r){var o,s=this._instance.traceLevels(),a=this._instance.initializationData().logger;if(n.getMode()===Ice.Reference.ModeBatchOneway||n.getMode()===Ice.Reference.ModeBatchDatagram)throw t;if(t instanceof Ice.ObjectNotExistException){if(null!==n.getRouterInfo()&&"ice_add_proxy"===t.operation)return n.getRouterInfo().clearCache(n),s.retry>=1&&a.trace(s.retryCat,"retrying operation call to add proxy to router\n"+t.toString()),null!==i&&(i.value=0),r;if(!n.isIndirect())throw t;if(n.isWellKnown()){var c=n.getLocatorInfo();null!==c&&c.clearCache(n)}}else if(t instanceof Ice.RequestFailedException)throw t;if(t instanceof Ice.MarshalException)throw t;if(t instanceof Ice.CommunicatorDestroyedException||t instanceof Ice.ObjectAdapterDeactivatedException||t instanceof Ice.ConnectionManuallyClosedException)throw t;if(t instanceof Ice.InvocationTimeoutException||t instanceof Ice.InvocationCanceledException)throw t;if(++r,e.assert(r>0),r===this._retryIntervals.length+1&&t instanceof Ice.CloseConnectionException)o=0;else{if(r>this._retryIntervals.length)throw s.retry>=1&&a.trace(s.retryCat,"cannot retry operation call because retry limit has been exceeded\n"+t.toString()),t;o=this._retryIntervals[r-1]}if(s.retry>=1){var u="retrying operation call";o>0&&(u+=" in "+o+"ms"),u+=" because of exception\n"+t.toString(),a.trace(s.retryCat,u)}return e.assert(null!==i),i.value=o,r}}]),r}();Ice.ProxyFactory=r}(),function(){var e=Ice.Debug,t=Ice.InputStream,n=Ice.OutputStream,i=Ice.EndpointParseException,r=Ice.OpaqueEndpointI,o=Ice.Protocol,s=Ice.StringUtil,a=function(){function a(e){_classCallCheck(this,a),this._instance=e,this._factories=[]}return _createClass(a,[{key:"add",value:function(t){e.assert(void 0===this._factories.find(function(e){return t.type()==e.type()})),this._factories.push(t)}},{key:"get",value:function(e){return this._factories.find(function(t){return e==t.type()})||null}},{key:"create",value:function(e,a){var c=e.trim();if(0===c.length)throw new i("value has no non-whitespace characters");var u=s.splitString(c," \t\n\r");if(0===u.length)throw new i("value has no non-whitespace characters");var l=u[0];u.splice(0,1),"default"===l&&(l=this._instance.defaultsAndOverrides().defaultProtocol);for(var h=0,_=this._factories.length;h<_;++h)if(this._factories[h].protocol()===l){var d=this._factories[h].create(u,a);if(u.length>0)throw new i("unrecognized argument `"+u[0]+"' in endpoint `"+e+"'");return d}if("opaque"===l){var p=new r;if(p.initWithOptions(u),u.length>0)throw new i("unrecognized argument `"+u[0]+"' in endpoint `"+e+"'");for(var f=0,y=this._factories.length;f<y;++f)if(this._factories[f].type()==p.type()){var v=new n(this._instance,o.currentProtocolEncoding);v.writeShort(p.type()),p.streamWrite(v);var g=new t(this._instance,o.currentProtocolEncoding,v.buffer);g.pos=0,g.readShort(),g.startEncapsulation();var I=this._factories[f].read(g);return g.endEncapsulation(),I}return p}return null}},{key:"read",value:function(e){var t=e.readShort(),n=this.get(t),i=null;return e.startEncapsulation(),n&&(i=n.read(e)),i||(i=new r(t)).initWithStream(e),e.endEncapsulation(),i}},{key:"destroy",value:function(){this._factories.forEach(function(e){return e.destroy()}),this._factories=[]}}]),a}();Ice.EndpointFactoryManager=a}(),function(){var e=Ice.FormatType,t=Ice.EndpointSelectionType,n=Ice.Protocol;Ice.DefaultsAndOverrides=function i(r,o){_classCallCheck(this,i),this.defaultProtocol=r.getPropertyWithDefault("Ice.Default.Protocol",void 0!==Ice.TcpEndpointFactory?"tcp":"ws");var s=r.getProperty("Ice.Default.Host");if(this.defaultHost=s.length>0?s:null,s=r.getProperty("Ice.Default.SourceAddress"),this.defaultSourceAddress=s.length>0?s:null,(s=r.getProperty("Ice.Override.Timeout")).length>0?(this.overrideTimeout=!0,this.overrideTimeoutValue=r.getPropertyAsInt("Ice.Override.Timeout"),this.overrideTimeoutValue<1&&-1!==this.overrideTimeoutValue&&(this.overrideTimeoutValue=-1,o.warning("invalid value for Ice.Override.Timeout `"+r.getProperty("Ice.Override.Timeout")+"': defaulting to -1"))):(this.overrideTimeout=!1,this.overrideTimeoutValue=-1),(s=r.getProperty("Ice.Override.ConnectTimeout")).length>0?(this.overrideConnectTimeout=!0,this.overrideConnectTimeoutValue=r.getPropertyAsInt("Ice.Override.ConnectTimeout"),this.overrideConnectTimeoutValue<1&&-1!==this.overrideConnectTimeoutValue&&(this.overrideConnectTimeoutValue=-1,o.warning("invalid value for Ice.Override.ConnectTimeout `"+r.getProperty("Ice.Override.ConnectTimeout")+"': defaulting to -1"))):(this.overrideConnectTimeout=!1,this.overrideConnectTimeoutValue=-1),(s=r.getProperty("Ice.Override.CloseTimeout")).length>0?(this.overrideCloseTimeout=!0,this.overrideCloseTimeoutValue=r.getPropertyAsInt("Ice.Override.CloseTimeout"),this.overrideCloseTimeoutValue<1&&-1!==this.overrideCloseTimeoutValue&&(this.overrideCloseTimeoutValue=-1,o.warning("invalid value for Ice.Override.CloseTimeout `"+r.getProperty("Ice.Override.CloseTimeout")+"': defaulting to -1"))):(this.overrideCloseTimeout=!1,this.overrideCloseTimeoutValue=-1),this.overrideSecure=!1,"Random"===(s=r.getPropertyWithDefault("Ice.Default.EndpointSelection","Random")))this.defaultEndpointSelection=t.Random;else{if("Ordered"!==s){var a=new Ice.EndpointSelectionTypeParseException;throw a.str="illegal value `"+s+"'; expected `Random' or `Ordered'",a}this.defaultEndpointSelection=t.Ordered}this.defaultTimeout=r.getPropertyAsIntWithDefault("Ice.Default.Timeout",6e4),this.defaultTimeout<1&&-1!==this.defaultTimeout&&(this.defaultTimeout=6e4,o.warning("invalid value for Ice.Default.Timeout `"+r.getProperty("Ice.Default.Timeout")+"': defaulting to 60000")),this.defaultLocatorCacheTimeout=r.getPropertyAsIntWithDefault("Ice.Default.LocatorCacheTimeout",-1),this.defaultLocatorCacheTimeout<-1&&(this.defaultLocatorCacheTimeout=-1,o.warning("invalid value for Ice.Default.LocatorCacheTimeout `"+r.getProperty("Ice.Default.LocatorCacheTimeout")+"': defaulting to -1")),this.defaultInvocationTimeout=r.getPropertyAsIntWithDefault("Ice.Default.InvocationTimeout",-1),this.defaultInvocationTimeout<1&&-1!==this.defaultInvocationTimeout&&(this.defaultInvocationTimeout=-1,o.warning("invalid value for Ice.Default.InvocationTimeout `"+r.getProperty("Ice.Default.InvocationTimeout")+"': defaulting to -1")),this.defaultPreferSecure=r.getPropertyAsIntWithDefault("Ice.Default.PreferSecure",0)>0,s=r.getPropertyWithDefault("Ice.Default.EncodingVersion",Ice.encodingVersionToString(n.currentEncoding)),this.defaultEncoding=Ice.stringToEncodingVersion(s),n.checkSupportedEncoding(this.defaultEncoding);var c=r.getPropertyAsIntWithDefault("Ice.Default.SlicedFormat",0)>0;this.defaultFormat=c?e.SlicedFormat:e.CompactFormat}}(),function(){var e=Ice.Debug,t=Ice.Protocol,n=Ice.LocatorRegisterPrx,i=Ice.HashMap,r=function(){function t(e,n,r){_classCallCheck(this,t),this._locator=e,this._locatorRegistry=null,this._table=n,this._background=r,this._adapterRequests=new Map,this._objectRequests=new i(i.compareEquals)}return _createClass(t,[{key:"destroy",value:function(){this._locatorRegistry=null,this._table.clear()}},{key:"equals",value:function(e){return this===e||e instanceof t&&this._locator.equals(e._locator)}},{key:"hashCode",value:function(){return this._locator.hashCode()}},{key:"getLocator",value:function(){return this._locator}},{key:"getLocatorRegistry",value:function(){var e=this;return null!==this._locatorRegistry?Ice.Promise.resolve(this._locatorRegistry):this._locator.getRegistry().then(function(t){return e._locatorRegistry=n.uncheckedCast(t.ice_locator(null).ice_endpointSelection(Ice.EndpointSelectionType.Ordered)),e._locatorRegistry})}},{key:"getEndpoints",value:function(t,n,i,r){var o=r||new Ice.Promise;e.assert(t.isIndirect());var s=null,a={value:!1};if(t.isWellKnown()){var c=this._table.getObjectReference(t.getIdentity(),i,a);if(!a.value){if(!this._background||null===c)return this.getObjectRequest(t).addCallback(t,null,i,o),o;this.getObjectRequest(t).addCallback(t,null,i,null)}if(c.isIndirect()){if(!c.isWellKnown())return t.getInstance().traceLevels().location>=1&&this.traceWellKnown("found adapter for well-known object in locator cache",t,c),this.getEndpoints(c,t,i,o),o}else s=c.getEndpoints()}else if(s=this._table.getAdapterEndpoints(t.getAdapterId(),i,a),!a.value){if(!this._background||null===s)return this.getAdapterRequest(t).addCallback(t,n,i,o),o;this.getAdapterRequest(t).addCallback(t,n,i,null)}return e.assert(null!==s),t.getInstance().traceLevels().location>=1&&this.getEndpointsTrace(t,s,!0),o.resolve([s,!0]),o}},{key:"clearCache",value:function(t){if(e.assert(t.isIndirect()),t.isWellKnown()){var n=this._table.removeObjectReference(t.getIdentity());null!==n&&(n.isIndirect()?n.isWellKnown()||(t.getInstance().traceLevels().location>=2&&this.traceWellKnown("removed adapter for well-known object from locator cache",t,n),this.clearCache(n)):t.getInstance().traceLevels().location>=2&&this.trace("removed endpoints for well-known object from locator cache",t,n.getEndpoints()))}else{var i=this._table.removeAdapterEndpoints(t.getAdapterId());null!==i&&t.getInstance().traceLevels().location>=2&&this.trace("removed endpoints for adapter from locator cache",t,i)}}},{key:"trace",value:function(t,n,i){e.assert(n.isIndirect());var r=[];r.push(t),r.push("\n"),n.isWellKnown()?(r.push("well-known proxy = "),r.push(n.toString()),r.push("\n")):(r.push("adapter = "),r.push(n.getAdapterId()),r.push("\n")),r.push("endpoints = "),r.push(i.map(function(e){return e.toString()}).join(":")),n.getInstance().initializationData().logger.trace(n.getInstance().traceLevels().locationCat,r.join(""))}},{key:"traceWellKnown",value:function(t,n,i){e.assert(n.isWellKnown());var r=[];r.push(t),r.push("\n"),r.push("well-known proxy = "),r.push(n.toString()),r.push("\n"),r.push("adapter = "),r.push(i.getAdapterId()),n.getInstance().initializationData().logger.trace(n.getInstance().traceLevels().locationCat,r.join(""))}},{key:"getEndpointsException",value:function(t,n){e.assert(t.isIndirect());var i=t.getInstance();try{throw n}catch(n){if(n instanceof Ice.AdapterNotFoundException){if(i.traceLevels().location>=1){var r=[];r.push("adapter not found\n"),r.push("adapter = "),r.push(t.getAdapterId()),i.initializationData().logger.trace(i.traceLevels().locationCat,r.join(""))}var o=new Ice.NotRegisteredException;throw o.kindOfObject="object adapter",o.id=t.getAdapterId(),o}if(n instanceof Ice.ObjectNotFoundException){if(i.traceLevels().location>=1){var s=[];s.push("object not found\n"),s.push("object = "),s.push(Ice.identityToString(t.getIdentity(),i.toStringMode())),i.initializationData().logger.trace(i.traceLevels().locationCat,s.join(""))}var a=new Ice.NotRegisteredException;throw a.kindOfObject="object",a.id=Ice.identityToString(t.getIdentity(),i.toStringMode()),a}if(n instanceof Ice.NotRegisteredException)throw n;if(n instanceof Ice.LocalException){if(i.traceLevels().location>=1){var c=[];c.push("couldn't contact the locator to retrieve endpoints\n"),t.getAdapterId().length>0?(c.push("adapter = "),c.push(t.getAdapterId()),c.push("\n")):(c.push("well-known proxy = "),c.push(t.toString()),c.push("\n")),c.push("reason = "+n.toString()),i.initializationData().logger.trace(i.traceLevels().locationCat,c.join(""))}throw n}e.assert(!1)}}},{key:"getEndpointsTrace",value:function(e,t,n){if(null!==t&&t.length>0)n?e.isWellKnown()?this.trace("found endpoints for well-known proxy in locator cache",e,t):this.trace("found endpoints for adapter in locator cache",e,t):e.isWellKnown()?this.trace("retrieved endpoints for well-known proxy from locator, adding to locator cache",e,t):this.trace("retrieved endpoints for adapter from locator, adding to locator cache",e,t);else{var i=e.getInstance(),r=[];r.push("no endpoints configured for "),e.getAdapterId().length>0?(r.push("adapter\n"),r.push("adapter = "),r.push(e.getAdapterId()),r.push("\n")):(r.push("well-known object\n"),r.push("well-known proxy = "),r.push(e.toString()),r.push("\n")),i.initializationData().logger.trace(i.traceLevels().locationCat,r.join(""))}}},{key:"getAdapterRequest",value:function(e){if(e.getInstance().traceLevels().location>=1){var t=e.getInstance(),n=[];n.push("searching for adapter by id\n"),n.push("adapter = "),n.push(e.getAdapterId()),t.initializationData().logger.trace(t.traceLevels().locationCat,n.join(""))}var i=this._adapterRequests.get(e.getAdapterId());return void 0!==i?i:(i=new c(this,e),this._adapterRequests.set(e.getAdapterId(),i),i)}},{key:"getObjectRequest",value:function(e){if(e.getInstance().traceLevels().location>=1){var t=e.getInstance(),n=[];n.push("searching for well-known object\n"),n.push("well-known proxy = "),n.push(e.toString()),t.initializationData().logger.trace(t.traceLevels().locationCat,n.join(""))}var i=this._objectRequests.get(e.getIdentity());return void 0!==i?i:(i=new a(this,e),this._objectRequests.set(e.getIdentity(),i),i)}},{key:"finishRequest",value:function(t,n,i,r){if(null===i||i._getReference().isIndirect())for(var o=0;o<n.length;++o)this._table.removeObjectReference(n[o].getIdentity());t.isWellKnown()?(null===i||i._getReference().isWellKnown()?r&&this._table.removeObjectReference(t.getIdentity()):this._table.addObjectReference(t.getIdentity(),i._getReference()),e.assert(this._objectRequests.has(t.getIdentity())),this._objectRequests.delete(t.getIdentity())):(null===i||i._getReference().isIndirect()?r&&this._table.removeAdapterEndpoints(t.getAdapterId()):this._table.addAdapterEndpoints(t.getAdapterId(),i._getReference().getEndpoints()),e.assert(this._adapterRequests.has(t.getAdapterId())),this._adapterRequests.delete(t.getAdapterId()))}}]),t}();Ice.LocatorInfo=r;var o=function(){function e(t,n,i){_classCallCheck(this,e),this._ref=t,this._ttl=n,this._promise=i}return _createClass(e,[{key:"response",value:function(e,n){var i=this,r=null;if(null!==n){var o=n._getReference();if(this._ref.isWellKnown()&&!t.isSupported(this._ref.getEncoding(),o.getEncoding()));else if(o.isIndirect()){if(this._ref.isWellKnown()&&!o.isWellKnown())return this._ref.getInstance().traceLevels().location>=1&&e.traceWellKnown("retrieved adapter for well-known object from locator, adding to locator cache",this._ref,o),void e.getEndpoints(o,this._ref,this._ttl).then(function(e){null!==i._promise&&i._promise.resolve(e)},function(e){null!==i._promise&&i._promise.reject(e)})}else r=o.getEndpoints()}this._ref.getInstance().traceLevels().location>=1&&e.getEndpointsTrace(this._ref,r,!1),null!==this._promise&&this._promise.resolve(null===r?[[],!1]:[r,!1])}},{key:"exception",value:function(e,t){try{e.getEndpointsException(this._ref,t)}catch(e){null!==this._promise&&this._promise.reject(e)}}}]),e}(),s=function(){function e(t,n){_classCallCheck(this,e),this._locatorInfo=t,this._ref=n,this._callbacks=[],this._wellKnownRefs=[],this._sent=!1,this._response=!1,this._proxy=null,this._exception=null}return _createClass(e,[{key:"addCallback",value:function(e,t,n,i){var r=new o(e,n,i);this._response?r.response(this._locatorInfo,this._proxy):null!==this._exception?r.exception(this._locatorInfo,this._exception):(this._callbacks.push(r),null!==t&&this._wellKnownRefs.push(t),this._sent||(this._sent=!0,this.send()))}},{key:"response",value:function(e){this._locatorInfo.finishRequest(this._ref,this._wellKnownRefs,e,!1),this._response=!0,this._proxy=e;for(var t=0;t<this._callbacks.length;++t)this._callbacks[t].response(this._locatorInfo,e)}},{key:"exception",value:function(e){this._locatorInfo.finishRequest(this._ref,this._wellKnownRefs,null,e instanceof Ice.UserException),this._exception=e;for(var t=0;t<this._callbacks.length;++t)this._callbacks[t].exception(this._locatorInfo,e)}}]),e}(),a=function(t){function n(t,i){var r;return _classCallCheck(this,n),r=_possibleConstructorReturn(this,_getPrototypeOf(n).call(this,t,i)),e.assert(i.isWellKnown()),r}return _inherits(n,s),_createClass(n,[{key:"send",value:function(){var e=this;try{this._locatorInfo.getLocator().findObjectById(this._ref.getIdentity()).then(function(t){return e.response(t)},function(t){return e.exception(t)})}catch(e){this.exception(e)}}}]),n}(),c=function(t){function n(t,i){var r;return _classCallCheck(this,n),r=_possibleConstructorReturn(this,_getPrototypeOf(n).call(this,t,i)),e.assert(i.isIndirect()),r}return _inherits(n,s),_createClass(n,[{key:"send",value:function(){var e=this;try{this._locatorInfo.getLocator().findAdapterById(this._ref.getAdapterId()).then(function(t){return e.response(t)},function(t){return e.exception(t)})}catch(e){this.exception(e)}}}]),n}()}(),function(){N.defineDictionary(Ice,"PropertyDict","PropertyDictHelper","Ice.StringHelper","Ice.StringHelper",!1,void 0,void 0);Ice.PropertiesAdmin=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).apply(this,arguments))}return _inherits(t,Ice.Object),t}(),Ice.PropertiesAdminPrx=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).apply(this,arguments))}return _inherits(t,Ice.ObjectPrx),t}(),N.defineOperations(Ice.PropertiesAdmin,Ice.PropertiesAdminPrx,["::Ice::Object","::Ice::PropertiesAdmin"],1,{getProperty:[,,,,[7],[[7]],,,,],getPropertiesForPrefix:[,,,,["Ice.PropertyDictHelper"],[[7]],,,,],setProperties:[,,,,,[["Ice.PropertyDictHelper"]],,,,]})}(),A=Ice.HashMap,R=Ice.LocatorInfo,T=Ice.LocatorTable,F=Ice.LocatorPrx,L=function(){function e(t){_classCallCheck(this,e),this._background=t.getPropertyAsInt("Ice.BackgroundLocatorCacheUpdates")>0,this._table=new A(A.compareEquals),this._locatorTables=new A(A.compareEquals)}return _createClass(e,[{key:"destroy",value:function(){var e=!0,t=!1,n=void 0;try{for(var i,r=this._table.values()[Symbol.iterator]();!(e=(i=r.next()).done);e=!0){i.value.destroy()}}catch(e){t=!0,n=e}finally{try{e||null==r.return||r.return()}finally{if(t)throw n}}this._table.clear(),this._locatorTables.clear()}},{key:"find",value:function(e){if(null===e)return null;var t=F.uncheckedCast(e.ice_locator(null)),n=this._table.get(t);if(void 0===n){var i=this._locatorTables.get(t.ice_getIdentity());void 0===i&&(i=new T,this._locatorTables.set(t.ice_getIdentity(),i)),n=new R(t,i,this._background),this._table.set(t,n)}return n}}]),e}(),Ice.LocatorManager=L,function(){var e=Ice.HashMap,t=Ice.RouterInfo,n=Ice.RouterPrx,i=function(){function i(){_classCallCheck(this,i),this._table=new e(e.compareEquals)}return _createClass(i,[{key:"destroy",value:function(){var e=!0,t=!1,n=void 0;try{for(var i,r=this._table.values()[Symbol.iterator]();!(e=(i=r.next()).done);e=!0){i.value.destroy()}}catch(e){t=!0,n=e}finally{try{e||null==r.return||r.return()}finally{if(t)throw n}}this._table.clear()}},{key:"find",value:function(e){if(null===e)return null;var i=n.uncheckedCast(e.ice_router(null)),r=this._table.get(i);return void 0===r&&(r=new t(i),this._table.set(i,r)),r}},{key:"erase",value:function(e){var t=null;if(null!==e){var i=n.uncheckedCast(e.ice_router(null));t=this._table.get(i),this._table.delete(i)}return t}}]),i}();Ice.RouterManager=i}(),function(){var e=Ice.HashMap,t=Ice.ConnectRequestHandler,n=function(){function n(t){_classCallCheck(this,n),this._instance=t,this._handlers=new e(e.compareEquals)}return _createClass(n,[{key:"getRequestHandler",value:function(e,n){var i,r=!1;return e.getCacheConnection()?(i=this._handlers.get(e))||(i=new t(e,n),this._handlers.set(e,i),r=!0):(r=!0,i=new t(e,n)),r&&e.getConnection().then(function(e){i.setConnection(e)},function(e){i.setException(e)}),n._setRequestHandler(i.connect(n))}},{key:"removeRequestHandler",value:function(e,t){e.getCacheConnection()&&this._handlers.get(e)===t&&this._handlers.delete(e)}}]),n}();Ice.RequestHandlerFactory=n}(),function(){N.defineDictionary(IceMX,"StringIntDict","StringIntDictHelper","Ice.StringHelper","Ice.IntHelper",!1,void 0,void 0);IceMX.Metrics=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Ice.Long(0,0),r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new Ice.Long(0,0),s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;return _classCallCheck(this,t),(e=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this))).id=n,e.total=i,e.current=r,e.totalLifetime=o,e.failures=s,e}return _inherits(t,Ice.Value),_createClass(t,[{key:"_iceWriteMemberImpl",value:function(e){e.writeString(this.id),e.writeLong(this.total),e.writeInt(this.current),e.writeLong(this.totalLifetime),e.writeInt(this.failures)}},{key:"_iceReadMemberImpl",value:function(e){this.id=e.readString(),this.total=e.readLong(),this.current=e.readInt(),this.totalLifetime=e.readLong(),this.failures=e.readInt()}}]),t}(),N.defineValue(IceMX.Metrics,"::IceMX::Metrics",!1),IceMX.MetricsFailures=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;_classCallCheck(this,e),this.id=t,this.failures=n}return _createClass(e,[{key:"_write",value:function(e){e.writeString(this.id),IceMX.StringIntDictHelper.write(e,this.failures)}},{key:"_read",value:function(e){this.id=e.readString(),this.failures=IceMX.StringIntDictHelper.read(e)}}],[{key:"minWireSize",get:function(){return 2}}]),e}(),N.defineStruct(IceMX.MetricsFailures,!1,!0),N.defineSequence(IceMX,"MetricsFailuresSeqHelper","IceMX.MetricsFailures",!1),N.defineSequence(IceMX,"MetricsMapHelper","Ice.ObjectHelper",!1,"IceMX.Metrics"),N.defineDictionary(IceMX,"MetricsView","MetricsViewHelper","Ice.StringHelper","IceMX.MetricsMapHelper",!1,void 0,void 0,Ice.ArrayUtil.equals),IceMX.UnknownMetricsView=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e))}return _inherits(t,Ice.UserException),_createClass(t,[{key:"_mostDerivedType",value:function(){return IceMX.UnknownMetricsView}}],[{key:"_parent",get:function(){return Ice.UserException}},{key:"_id",get:function(){return"::IceMX::UnknownMetricsView"}}]),t}();IceMX.MetricsAdmin=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).apply(this,arguments))}return _inherits(t,Ice.Object),t}(),IceMX.MetricsAdminPrx=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).apply(this,arguments))}return _inherits(t,Ice.ObjectPrx),t}(),N.defineOperations(IceMX.MetricsAdmin,IceMX.MetricsAdminPrx,["::Ice::Object","::IceMX::MetricsAdmin"],1,{getMetricsViewNames:[,,,2,["Ice.StringSeqHelper"],,[["Ice.StringSeqHelper"]],,,],enableMetricsView:[,,,2,,[[7]],,[IceMX.UnknownMetricsView],,],disableMetricsView:[,,,2,,[[7]],,[IceMX.UnknownMetricsView],,],getMetricsView:[,,,2,["IceMX.MetricsViewHelper"],[[7]],[[4]],[IceMX.UnknownMetricsView],,!0],getMapMetricsFailures:[,,,2,["IceMX.MetricsFailuresSeqHelper"],[[7],[7]],,[IceMX.UnknownMetricsView],,],getMetricsFailures:[,,,2,[IceMX.MetricsFailures],[[7],[7],[7]],,[IceMX.UnknownMetricsView],,]});IceMX.ThreadMetrics=function(e){function t(e,n,i,r,o){var s,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,c=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,u=arguments.length>7&&void 0!==arguments[7]?arguments[7]:0;return _classCallCheck(this,t),(s=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e,n,i,r,o))).inUseForIO=a,s.inUseForUser=c,s.inUseForOther=u,s}return _inherits(t,IceMX.Metrics),_createClass(t,[{key:"_iceWriteMemberImpl",value:function(e){e.writeInt(this.inUseForIO),e.writeInt(this.inUseForUser),e.writeInt(this.inUseForOther)}},{key:"_iceReadMemberImpl",value:function(e){this.inUseForIO=e.readInt(),this.inUseForUser=e.readInt(),this.inUseForOther=e.readInt()}}]),t}(),N.defineValue(IceMX.ThreadMetrics,"::IceMX::ThreadMetrics",!1);IceMX.DispatchMetrics=function(e){function t(e,n,i,r,o){var s,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,c=arguments.length>6&&void 0!==arguments[6]?arguments[6]:new Ice.Long(0,0),u=arguments.length>7&&void 0!==arguments[7]?arguments[7]:new Ice.Long(0,0);return _classCallCheck(this,t),(s=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e,n,i,r,o))).userException=a,s.size=c,s.replySize=u,s}return _inherits(t,IceMX.Metrics),_createClass(t,[{key:"_iceWriteMemberImpl",value:function(e){e.writeInt(this.userException),e.writeLong(this.size),e.writeLong(this.replySize)}},{key:"_iceReadMemberImpl",value:function(e){this.userException=e.readInt(),this.size=e.readLong(),this.replySize=e.readLong()}}]),t}(),N.defineValue(IceMX.DispatchMetrics,"::IceMX::DispatchMetrics",!1);IceMX.ChildInvocationMetrics=function(e){function t(e,n,i,r,o){var s,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:new Ice.Long(0,0),c=arguments.length>6&&void 0!==arguments[6]?arguments[6]:new Ice.Long(0,0);return _classCallCheck(this,t),(s=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e,n,i,r,o))).size=a,s.replySize=c,s}return _inherits(t,IceMX.Metrics),_createClass(t,[{key:"_iceWriteMemberImpl",value:function(e){e.writeLong(this.size),e.writeLong(this.replySize)}},{key:"_iceReadMemberImpl",value:function(e){this.size=e.readLong(),this.replySize=e.readLong()}}]),t}(),N.defineValue(IceMX.ChildInvocationMetrics,"::IceMX::ChildInvocationMetrics",!1);IceMX.CollocatedMetrics=function(e){function t(e,n,i,r,o,s,a){return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e,n,i,r,o,s,a))}return _inherits(t,IceMX.ChildInvocationMetrics),t}(),N.defineValue(IceMX.CollocatedMetrics,"::IceMX::CollocatedMetrics",!1);IceMX.RemoteMetrics=function(e){function t(e,n,i,r,o,s,a){return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e,n,i,r,o,s,a))}return _inherits(t,IceMX.ChildInvocationMetrics),t}(),N.defineValue(IceMX.RemoteMetrics,"::IceMX::RemoteMetrics",!1);IceMX.InvocationMetrics=function(e){function t(e,n,i,r,o){var s,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,c=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,u=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,l=arguments.length>8&&void 0!==arguments[8]?arguments[8]:null;return _classCallCheck(this,t),(s=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e,n,i,r,o))).retry=a,s.userException=c,s.remotes=u,s.collocated=l,s}return _inherits(t,IceMX.Metrics),_createClass(t,[{key:"_iceWriteMemberImpl",value:function(e){e.writeInt(this.retry),e.writeInt(this.userException),IceMX.MetricsMapHelper.write(e,this.remotes),IceMX.MetricsMapHelper.write(e,this.collocated)}},{key:"_iceReadMemberImpl",value:function(e){this.retry=e.readInt(),this.userException=e.readInt(),this.remotes=IceMX.MetricsMapHelper.read(e),this.collocated=IceMX.MetricsMapHelper.read(e)}}]),t}(),N.defineValue(IceMX.InvocationMetrics,"::IceMX::InvocationMetrics",!1);IceMX.ConnectionMetrics=function(e){function t(e,n,i,r,o){var s,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:new Ice.Long(0,0),c=arguments.length>6&&void 0!==arguments[6]?arguments[6]:new Ice.Long(0,0);return _classCallCheck(this,t),(s=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e,n,i,r,o))).receivedBytes=a,s.sentBytes=c,s}return _inherits(t,IceMX.Metrics),_createClass(t,[{key:"_iceWriteMemberImpl",value:function(e){e.writeLong(this.receivedBytes),e.writeLong(this.sentBytes)}},{key:"_iceReadMemberImpl",value:function(e){this.receivedBytes=e.readLong(),this.sentBytes=e.readLong()}}]),t}(),N.defineValue(IceMX.ConnectionMetrics,"::IceMX::ConnectionMetrics",!1)}(),function(){var e=Ice.AsyncResultBase,t=Ice.Debug,n=Ice.Identity,i=Ice.PropertyNames,r=Ice.ServantManager,o=Ice.StringUtil,s=Ice.ArrayUtil,a=Ice.Timer,c=["ACM","AdapterId","Endpoints","Locator","Locator.EncodingVersion","Locator.EndpointSelection","Locator.ConnectionCached","Locator.PreferSecure","Locator.CollocationOptimized","Locator.Router","MessageSizeMax","PublishedEndpoints","ReplicaGroupId","Router","Router.EncodingVersion","Router.EndpointSelection","Router.ConnectionCached","Router.PreferSecure","Router.CollocationOptimized","Router.Locator","Router.Locator.EndpointSelection","Router.Locator.ConnectionCached","Router.Locator.PreferSecure","Router.Locator.CollocationOptimized","Router.Locator.LocatorCacheTimeout","Router.Locator.InvocationTimeout","Router.LocatorCacheTimeout","Router.InvocationTimeout","ProxyOptions","ThreadPool.Size","ThreadPool.SizeMax","ThreadPool.SizeWarn","ThreadPool.StackSize","ThreadPool.Serialize"],u=0,l=function(){function l(e,n,i,o,s,a,c){var h=this;if(_classCallCheck(this,l),this._instance=e,this._communicator=n,this._objectAdapterFactory=i,this._servantManager=new r(e,o),this._name=o,this._publishedEndpoints=[],this._routerInfo=null,this._state=u,this._noConfig=a,this._statePromises=[],this._noConfig)return this._reference=this._instance.referenceFactory().createFromString("dummy -t",""),this._messageSizeMax=this._instance.messageSizeMax(),void c.resolve(this);var _=this._instance.initializationData().properties,d=[],p=this.filterProperties(d);if(0!==d.length&&_.getPropertyAsIntWithDefault("Ice.Warn.UnknownProperties",1)>0){var f=["found unknown properties for object adapter `"+o+"':"];d.forEach(function(e){return f.push("\n "+e)}),this._instance.initializationData().logger.warning(f.join(""))}if(null===s&&p)throw new Ice.InitializationException("object adapter `".concat(this._name,"' requires configuration"));var y=_.getPropertyWithDefault(this._name+".ProxyOptions","-t");try{this._reference=this._instance.referenceFactory().createFromString("dummy "+y,"")}catch(e){throw e instanceof Ice.ProxyParseException?new Ice.InitializationException("invalid proxy options `".concat(y,"' for object adapter `").concat(o,"'")):e}var v=this._instance.messageSizeMax()/1024,g=_.getPropertyAsIntWithDefault(this._name+".MessageSizeMax",v);this._messageSizeMax=g<1||g>2147483647/1024?2147483647:1024*g;try{var I;if(null===s&&(s=Ice.RouterPrx.uncheckedCast(this._instance.proxyFactory().propertyToProxy(this._name+".Router"))),null!==s){if(this._routerInfo=this._instance.routerManager().find(s),t.assert(null!==this._routerInfo),null!==this._routerInfo.getAdapter())throw new Ice.AlreadyRegisteredException("object adapter with router",Ice.identityToString(s.ice_getIdentity(),this._instance.toStringMode()));this._routerInfo.setAdapter(this),I=this._instance.outgoingConnectionFactory().setRouterInfo(this._routerInfo)}else{if(_.getProperty(this._name+".Endpoints").length>0)throw new Ice.FeatureNotSupportedException("object adapter endpoints not supported");I=Ice.Promise.resolve()}I.then(function(){return h.computePublishedEndpoints()}).then(function(e){h._publishedEndpoints=e,c.resolve(h)},function(e){h.destroy(),c.reject(e)})}catch(e){throw this.destroy(),e}}return _createClass(l,[{key:"getName",value:function(){return this._noConfig?"":this._name}},{key:"getCommunicator",value:function(){return this._communicator}},{key:"activate",value:function(){var t=new e(this._communicator,"activate",null,null,this);return this.setState(3),t.resolve(),t}},{key:"hold",value:function(){this.checkForDeactivation(),this.setState(1)}},{key:"waitForHold",value:function(){var t=new e(this._communicator,"waitForHold",null,null,this);try{this.checkForDeactivation(),this.waitState(1,t)}catch(e){t.reject(e)}return t}},{key:"deactivate",value:function(){var t=new e(this._communicator,"deactivate",null,null,this);return this._state<5&&(this.setState(5),this._instance.outgoingConnectionFactory().removeAdapter(this)),t.resolve(),t}},{key:"waitForDeactivate",value:function(){var t=new e(this._communicator,"waitForDeactivate",null,null,this);return this.waitState(5,t),t}},{key:"isDeactivated",value:function(){return this._state>=5}},{key:"destroy",value:function(){var t=this;return this.deactivate().then(function(){t._state<6&&(t.setState(6),t._servantManager.destroy(),t._objectAdapterFactory.removeObjectAdapter(t),t._publishedEndpoints=[]);var n=new e(t._communicator,"destroy",null,null,t);return n.resolve(),n})}},{key:"add",value:function(e,t){return this.addFacet(e,t,"")}},{key:"addFacet",value:function(e,t,n){this.checkForDeactivation(),this.checkIdentity(t),this.checkServant(e);var i=t.clone();return this._servantManager.addServant(e,i,n),this.newProxy(i,n)}},{key:"addWithUUID",value:function(e){return this.addFacetWithUUID(e,"")}},{key:"addFacetWithUUID",value:function(e,t){return this.addFacet(e,new n(Ice.generateUUID(),""),t)}},{key:"addDefaultServant",value:function(e,t){this.checkServant(e),this.checkForDeactivation(),this._servantManager.addDefaultServant(e,t)}},{key:"remove",value:function(e){return this.removeFacet(e,"")}},{key:"removeFacet",value:function(e,t){return this.checkForDeactivation(),this.checkIdentity(e),this._servantManager.removeServant(e,t)}},{key:"removeAllFacets",value:function(e){return this.checkForDeactivation(),this.checkIdentity(e),this._servantManager.removeAllFacets(e)}},{key:"removeDefaultServant",value:function(e){return this.checkForDeactivation(),this._servantManager.removeDefaultServant(e)}},{key:"find",value:function(e){return this.findFacet(e,"")}},{key:"findFacet",value:function(e,t){return this.checkForDeactivation(),this.checkIdentity(e),this._servantManager.findServant(e,t)}},{key:"findAllFacets",value:function(e){return this.checkForDeactivation(),this.checkIdentity(e),this._servantManager.findAllFacets(e)}},{key:"findByProxy",value:function(e){this.checkForDeactivation();var t=e._getReference();return this.findFacet(t.getIdentity(),t.getFacet())}},{key:"findDefaultServant",value:function(e){return this.checkForDeactivation(),this._servantManager.findDefaultServant(e)}},{key:"addServantLocator",value:function(e,t){this.checkForDeactivation(),this._servantManager.addServantLocator(e,t)}},{key:"removeServantLocator",value:function(e){return this.checkForDeactivation(),this._servantManager.removeServantLocator(e)}},{key:"findServantLocator",value:function(e){return this.checkForDeactivation(),this._servantManager.findServantLocator(e)}},{key:"createProxy",value:function(e){return this.checkForDeactivation(),this.checkIdentity(e),this.newProxy(e,"")}},{key:"createDirectProxy",value:function(e){return this.createProxy(e)}},{key:"createIndirectProxy",value:function(e){throw new Ice.FeatureNotSupportedException("createIndirectProxy not supported")}},{key:"setLocator",value:function(e){throw new Ice.FeatureNotSupportedException("setLocator not supported")}},{key:"getEndpoints",value:function(){return[]}},{key:"refreshPublishedEndpoints",value:function(){var e=this;return this.checkForDeactivation(),this.computePublishedEndpoints().then(function(t){e._publishedEndpoints=t})}},{key:"getPublishedEndpoints",value:function(){return s.clone(this._publishedEndpoints)}},{key:"setPublishedEndpoints",value:function(e){if(this.checkForDeactivation(),null!==this._routerInfo)throw new Error("can't set published endpoints on object adapter associated with a router");this._publishedEndpoints=s.clone(e)}},{key:"getServantManager",value:function(){return this._servantManager}},{key:"setAdapterOnConnection",value:function(e){this.checkForDeactivation(),e.setAdapterAndServantManager(this,this._servantManager)}},{key:"messageSizeMax",value:function(){return this._messageSizeMax}},{key:"newProxy",value:function(e,t){return this._instance.proxyFactory().referenceToProxy(this._instance.referenceFactory().create(e,t,this._reference,this._publishedEndpoints))}},{key:"checkForDeactivation",value:function(){if(this._state>=5){var e=new Ice.ObjectAdapterDeactivatedException;throw e.name=this.getName(),e}}},{key:"checkIdentity",value:function(e){if(void 0===e.name||null===e.name||0===e.name.length)throw new Ice.IllegalIdentityException(e);void 0!==e.category&&null!==e.category||(e.category="")}},{key:"checkServant",value:function(e){if(null==e)throw new Ice.IllegalServantException("cannot add null servant to Object Adapter")}},{key:"computePublishedEndpoints",value:function(){var e,t=this;if(null!==this._routerInfo)e=this._routerInfo.getServerEndpoints().then(function(e){var t=[];return e.forEach(function(e){-1===t.findIndex(function(t){return e.equals(t)})&&t.push(e)}),t});else{for(var n,i=[],r=this._instance.initializationData().properties.getProperty(this._name+".PublishedEndpoints"),s=0;s<r.length;){if(-1===(n=o.findFirstNotOf(r," \t\n\r",s))){if(""!=r)throw new Ice.EndpointParseException("invalid empty object adapter endpoint");break}for(s=n;;){if(-1==(s=r.indexOf(":",s))){s=r.length;break}for(var a=!1,c=n;!(-1==(c=r.indexOf('"',c))||s<c)&&-1!=(c=r.indexOf('"',++c));){if(s<c){a=!0;break}++c}if(!a)break;++s}var u=r.substring(n,s),l=this._instance.endpointFactoryManager().create(u,!1);if(null===l)throw new Ice.EndpointParseException("invalid object adapter endpoint `"+r+"'");i.push(l)}e=Ice.Promise.resolve(i)}return e.then(function(e){if(t._instance.traceLevels().network>=1&&e.length>0){var n=[];n.push("published endpoints for object adapter `"),n.push(t._name),n.push("':\n");var i=!0;e.forEach(function(e){i||n.push(":"),n.push(e.toString()),i=!1}),t._instance.initializationData().logger.trace(t._instance.traceLevels().networkCat,n.toString())}return e})}},{key:"filterProperties",value:function(e){for(var t=!0,n=this._name+".",r=0;r<i.clPropNames.length;++r)if(0===n.indexOf(i.clPropNames[r]+".")){t=!1;break}var o=!0,s=this._instance.initializationData().properties.getPropertiesForPrefix(n),a=!0,u=!1,l=void 0;try{for(var h,_=s.keys()[Symbol.iterator]();!(a=(h=_.next()).done);a=!0){for(var d=h.value,p=!1,f=0;f<c.length;++f)if(d===n+c[f]){o=!1,p=!0;break}!p&&t&&e.push(d)}}catch(e){u=!0,l=e}finally{try{a||null==_.return||_.return()}finally{if(u)throw l}}return o}},{key:"setState",value:function(e){var t=this;if(this._state!==e){this._state=e;var n=[];(e<5?[e]:[1,5]).forEach(function(e){t._statePromises[e]&&(n=n.concat(t._statePromises[e]),delete t._statePromises[e])}),n.length>0&&a.setImmediate(function(){return n.forEach(function(e){return e.resolve()})})}}},{key:"waitState",value:function(e,t){this._state<5&&(1===e&&1!==this._state||5===e)?this._statePromises[e]?this._statePromises[e].push(t):this._statePromises[e]=[t]:t.resolve()}}]),l}();Ice.ObjectAdapterI=l}(),D=Ice.ObjectAdapterI,z=Ice.Promise,q=function(){function e(t,n){_classCallCheck(this,e),this._instance=t,this._communicator=n,this._adapters=[],this._adapterNamesInUse=[],this._shutdownPromise=new z}return _createClass(e,[{key:"shutdown",value:function(){var e=this;return null===this._instance?this._shutdownPromise:(this._instance=null,this._communicator=null,z.all(this._adapters.map(function(e){return e.deactivate()})).then(function(){return e._shutdownPromise.resolve()}),this._shutdownPromise)}},{key:"waitForShutdown",value:function(){var e=this;return this._shutdownPromise.then(function(){return z.all(e._adapters.map(function(e){return e.waitForDeactivate()}))})}},{key:"isShutdown",value:function(){return null===this._instance}},{key:"destroy",value:function(){var e=this;return this.waitForShutdown().then(function(){return z.all(e._adapters.map(function(e){return e.destroy()}))})}},{key:"createObjectAdapter",value:function(e,t,n){if(null===this._instance)throw new Ice.ObjectAdapterDeactivatedException;var i=null;try{if(0===e.length)i=new D(this._instance,this._communicator,this,Ice.generateUUID(),null,!0,n);else{if(-1!==this._adapterNamesInUse.indexOf(e))throw new Ice.AlreadyRegisteredException("object adapter",e);i=new D(this._instance,this._communicator,this,e,t,!1,n),this._adapterNamesInUse.push(e)}this._adapters.push(i)}catch(e){n.reject(e)}}},{key:"removeObjectAdapter",value:function(e){if(null!==this._instance){var t=this._adapters.indexOf(e);-1!==t&&this._adapters.splice(t,1),-1!==(t=this._adapterNamesInUse.indexOf(e.getName()))&&this._adapterNamesInUse.splice(t,1)}}}]),e}(),Ice.ObjectAdapterFactory=q,Ice.ToStringMode=N.defineEnum([["Unicode",0],["ASCII",1],["Compat",2]]),function(){Ice.LogMessageType=N.defineEnum([["PrintMessage",0],["TraceMessage",1],["WarningMessage",2],["ErrorMessage",3]]),N.defineSequence(Ice,"LogMessageTypeSeqHelper","Ice.LogMessageType._helper",!1),Ice.LogMessage=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ice.LogMessageType.PrintMessage,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Ice.Long(0,0),i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";_classCallCheck(this,e),this.type=t,this.timestamp=n,this.traceCategory=i,this.message=r}return _createClass(e,[{key:"_write",value:function(e){Ice.LogMessageType._write(e,this.type),e.writeLong(this.timestamp),e.writeString(this.traceCategory),e.writeString(this.message)}},{key:"_read",value:function(e){this.type=Ice.LogMessageType._read(e),this.timestamp=e.readLong(),this.traceCategory=e.readString(),this.message=e.readString()}}],[{key:"minWireSize",get:function(){return 11}}]),e}(),N.defineStruct(Ice.LogMessage,!0,!0),N.defineSequence(Ice,"LogMessageSeqHelper","Ice.LogMessage",!1);Ice.RemoteLogger=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).apply(this,arguments))}return _inherits(t,Ice.Object),t}(),Ice.RemoteLoggerPrx=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).apply(this,arguments))}return _inherits(t,Ice.ObjectPrx),t}(),N.defineOperations(Ice.RemoteLogger,Ice.RemoteLoggerPrx,["::Ice::Object","::Ice::RemoteLogger"],1,{init:[,,,,,[[7],["Ice.LogMessageSeqHelper"]],,,,],log:[,,,,,[[Ice.LogMessage]],,,,]}),Ice.RemoteLoggerAlreadyAttachedException=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e))}return _inherits(t,Ice.UserException),_createClass(t,[{key:"_mostDerivedType",value:function(){return Ice.RemoteLoggerAlreadyAttachedException}}],[{key:"_parent",get:function(){return Ice.UserException}},{key:"_id",get:function(){return"::Ice::RemoteLoggerAlreadyAttachedException"}}]),t}();Ice.LoggerAdmin=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).apply(this,arguments))}return _inherits(t,Ice.Object),t}(),Ice.LoggerAdminPrx=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).apply(this,arguments))}return _inherits(t,Ice.ObjectPrx),t}(),N.defineOperations(Ice.LoggerAdmin,Ice.LoggerAdminPrx,["::Ice::LoggerAdmin","::Ice::Object"],0,{attachRemoteLogger:[,,,,,[["Ice.RemoteLoggerPrx"],["Ice.LogMessageTypeSeqHelper"],["Ice.StringSeqHelper"],[3]],,[Ice.RemoteLoggerAlreadyAttachedException],,],detachRemoteLogger:[,,,,[1],[["Ice.RemoteLoggerPrx"]],,,,],getLog:[,,,,["Ice.LogMessageSeqHelper"],[["Ice.LogMessageTypeSeqHelper"],["Ice.StringSeqHelper"],[3]],[[7]],,,]})}(),B=Ice.WSEndpoint,H=function(){function e(t,n){_classCallCheck(this,e),this._instance=t,this._delegate=n}return _createClass(e,[{key:"type",value:function(){return this._instance.type()}},{key:"protocol",value:function(){return this._instance.protocol()}},{key:"create",value:function(e,t){var n=new B(this._instance,this._delegate.create(e,t));return n.initWithOptions(e),n}},{key:"read",value:function(e){var t=new B(this._instance,this._delegate.read(e));return t.initWithStream(e),t}},{key:"destroy",value:function(){this._delegate.destroy(),this._instance=null}}]),e}(),Ice.WSEndpointFactory=H,N.defineDictionary(Ice,"SliceChecksumDict","SliceChecksumDictHelper","Ice.StringHelper","Ice.StringHelper",!1,void 0,void 0),function(){var e=Ice.Protocol;Ice.InitializationData=function(){function e(){_classCallCheck(this,e),this.properties=null,this.logger=null,this.valueFactoryManager=null}return _createClass(e,[{key:"clone",value:function(){var e=new Ice.InitializationData;return e.properties=this.properties,e.logger=this.logger,e.valueFactoryManager=this.valueFactoryManager,e}}]),e}(),Ice.initialize=function(e,t){var n=null,i=null;if(e instanceof Array)n=e;else if(e instanceof Ice.InitializationData)i=e;else if(null!=e)throw new Ice.InitializationException("invalid argument to initialize");if(null!=t){if(!(t instanceof Ice.InitializationData&&null===i))throw new Ice.InitializationException("invalid argument to initialize");i=t}(i=null===i?new Ice.InitializationData:i.clone()).properties=Ice.createProperties(n,i.properties);var r=new Ice.Communicator(i);return r.finishSetup(null),r},Ice.createProperties=function(e,t){return new Ice.Properties(e,t)},Ice.currentProtocol=function(){return e.currentProtocol.clone()},Ice.currentEncoding=function(){return e.currentEncoding.clone()},Ice.stringVersion=function(){return"3.7.3"},Ice.intVersion=function(){return 30703}}(),j=Ice.TcpEndpointI,U=function(){function e(t){_classCallCheck(this,e),this._instance=t}return _createClass(e,[{key:"type",value:function(){return this._instance.type()}},{key:"protocol",value:function(){return this._instance.protocol()}},{key:"create",value:function(e,t){var n=new j(this._instance);return n.initWithOptions(e,t),n}},{key:"read",value:function(e){var t=new j(this._instance);return t.initWithStream(e),t}},{key:"destroy",value:function(){this._instance=null}},{key:"clone",value:function(t){return new e(t)}}]),e}(),Ice.TcpEndpointFactory=U,function(){var e=Ice.AsyncResultBase,t=Ice.Debug,n=Ice.DefaultsAndOverrides,i=Ice.EndpointFactoryManager,r=Ice.ImplicitContextI,o=Ice.LocatorManager,s=Ice.ObjectAdapterFactory,a=Ice.ValueFactoryManagerI,c=Ice.OutgoingConnectionFactory,u=Ice.Properties,l=Ice.ProxyFactory,h=Ice.RetryQueue,_=Ice.RouterManager,d=Ice.Timer,p=Ice.TraceLevels,f=Ice.ReferenceFactory,y=Ice.RequestHandlerFactory,v=Ice.ACMConfig,g=0,I=function(){function I(e){_classCallCheck(this,I),this._state=g,this._initData=e,this._traceLevels=null,this._defaultsAndOverrides=null,this._messageSizeMax=0,this._batchAutoFlushSize=0,this._clientACM=null,this._toStringMode=Ice.ToStringMode.Unicode,this._implicitContext=null,this._routerManager=null,this._locatorManager=null,this._referenceFactory=null,this._requestHandlerFactory=null,this._proxyFactory=null,this._outgoingConnectionFactory=null,this._objectAdapterFactory=null,this._retryQueue=null,this._endpointHostResolver=null,this._endpointFactoryManager=null,this._objectFactoryMap=null}return _createClass(I,[{key:"initializationData",value:function(){return this._initData}},{key:"traceLevels",value:function(){return t.assert(null!==this._traceLevels),this._traceLevels}},{key:"defaultsAndOverrides",value:function(){return t.assert(null!==this._defaultsAndOverrides),this._defaultsAndOverrides}},{key:"routerManager",value:function(){if(2===this._state)throw new Ice.CommunicatorDestroyedException;return t.assert(null!==this._routerManager),this._routerManager}},{key:"locatorManager",value:function(){if(2===this._state)throw new Ice.CommunicatorDestroyedException;return t.assert(null!==this._locatorManager),this._locatorManager}},{key:"referenceFactory",value:function(){if(2===this._state)throw new Ice.CommunicatorDestroyedException;return t.assert(null!==this._referenceFactory),this._referenceFactory}},{key:"requestHandlerFactory",value:function(){if(2===this._state)throw new Ice.CommunicatorDestroyedException;return t.assert(null!==this._requestHandlerFactory),this._requestHandlerFactory}},{key:"proxyFactory",value:function(){if(2===this._state)throw new Ice.CommunicatorDestroyedException;return t.assert(null!==this._proxyFactory),this._proxyFactory}},{key:"outgoingConnectionFactory",value:function(){if(2===this._state)throw new Ice.CommunicatorDestroyedException;return t.assert(null!==this._outgoingConnectionFactory),this._outgoingConnectionFactory}},{key:"objectAdapterFactory",value:function(){if(2===this._state)throw new Ice.CommunicatorDestroyedException;return t.assert(null!==this._objectAdapterFactory),this._objectAdapterFactory}},{key:"retryQueue",value:function(){if(2===this._state)throw new Ice.CommunicatorDestroyedException;return t.assert(null!==this._retryQueue),this._retryQueue}},{key:"timer",value:function(){if(2===this._state)throw new Ice.CommunicatorDestroyedException;return t.assert(null!==this._timer),this._timer}},{key:"endpointFactoryManager",value:function(){if(2===this._state)throw new Ice.CommunicatorDestroyedException;return t.assert(null!==this._endpointFactoryManager),this._endpointFactoryManager}},{key:"messageSizeMax",value:function(){return this._messageSizeMax}},{key:"batchAutoFlushSize",value:function(){return this._batchAutoFlushSize}},{key:"clientACM",value:function(){return this._clientACM}},{key:"toStringMode",value:function(){return this._toStringMode}},{key:"getImplicitContext",value:function(){return this._implicitContext}},{key:"setDefaultLocator",value:function(e){if(2==this._state)throw new Ice.CommunicatorDestroyedException;this._referenceFactory=this._referenceFactory.setDefaultLocator(e)}},{key:"setDefaultRouter",value:function(e){if(2==this._state)throw new Ice.CommunicatorDestroyedException;this._referenceFactory=this._referenceFactory.setDefaultRouter(e)}},{key:"setLogger",value:function(e){this._initData.logger=e}},{key:"finishSetup",value:function(e,t){try{null===this._initData.properties&&(this._initData.properties=u.createProperties()),void 0===Ice._oneOfDone&&(Ice._printStackTraces=this._initData.properties.getPropertyAsIntWithDefault("Ice.PrintStackTraces",0)>0,Ice._oneOfDone=!0),null===this._initData.logger&&(this._initData.logger=Ice.getProcessLogger()),this._traceLevels=new p(this._initData.properties),this._defaultsAndOverrides=new n(this._initData.properties,this._initData.logger);var g=this._initData.properties.getPropertyAsIntWithDefault("Ice.MessageSizeMax",1024);this._messageSizeMax=g<1||g>2147483647/1024?2147483647:1024*g,0===this._initData.properties.getProperty("Ice.BatchAutoFlushSize").length&&this._initData.properties.getProperty("Ice.BatchAutoFlush").length>0?this._initData.properties.getPropertyAsInt("Ice.BatchAutoFlush")>0&&(this._batchAutoFlushSize=this._messageSizeMax):(g=this._initData.properties.getPropertyAsIntWithDefault("Ice.BatchAutoFlushSize",1024),this._batchAutoFlushSize=g<1?g:g>2147483647/1024?2147483647:1024*g),this._clientACM=new v(this._initData.properties,this._initData.logger,"Ice.ACM.Client",new v(this._initData.properties,this._initData.logger,"Ice.ACM",new v));var I=this._initData.properties.getPropertyWithDefault("Ice.ToStringMode","Unicode");if("ASCII"===I)this._toStringMode=Ice.ToStringMode.ASCII;else if("Compat"===I)this._toStringMode=Ice.ToStringMode.Compat;else if("Unicode"!==I)throw new Ice.InitializationException("The value for Ice.ToStringMode must be Unicode, ASCII or Compat");this._implicitContext=r.create(this._initData.properties.getProperty("Ice.ImplicitContext")),this._routerManager=new _,this._locatorManager=new o(this._initData.properties),this._referenceFactory=new f(this,e),this._requestHandlerFactory=new y(this,e),this._proxyFactory=new l(this),this._endpointFactoryManager=new i(this);var m=new Ice.ProtocolInstance(this,Ice.TCPEndpointType,"tcp",!1),k=new Ice.TcpEndpointFactory(m);this._endpointFactoryManager.add(k);var w=new Ice.ProtocolInstance(this,Ice.WSEndpointType,"ws",!1),C=new Ice.WSEndpointFactory(w,k.clone(w));this._endpointFactoryManager.add(C);var S=new Ice.ProtocolInstance(this,Ice.SSLEndpointType,"ssl",!0),x=new Ice.TcpEndpointFactory(S);this._endpointFactoryManager.add(x);var E=new Ice.ProtocolInstance(this,Ice.WSSEndpointType,"wss",!0),b=new Ice.WSEndpointFactory(E,x.clone(E));this._endpointFactoryManager.add(b),this._outgoingConnectionFactory=new c(e,this),null===this._initData.valueFactoryManager&&(this._initData.valueFactoryManager=new a),this._objectAdapterFactory=new s(this,e),this._retryQueue=new h(this),this._timer=new d(this._initData.logger);var P=Ice.RouterPrx.uncheckedCast(this._proxyFactory.propertyToProxy("Ice.Default.Router"));null!==P&&(this._referenceFactory=this._referenceFactory.setDefaultRouter(P));var O=Ice.LocatorPrx.uncheckedCast(this._proxyFactory.propertyToProxy("Ice.Default.Locator"));null!==O&&(this._referenceFactory=this._referenceFactory.setDefaultLocator(O)),null!==t&&t.resolve(e)}catch(e){if(null===t)throw e instanceof Ice.LocalException&&this.destroy(),e;e instanceof Ice.LocalException?this.destroy().finally(function(){return t.reject(e)}):t.reject(e)}}},{key:"destroy",value:function(){var t=this,n=new e(null,"destroy",null,this,null);return 1==this._state?(this._destroyPromises||(this._destroyPromises=[]),this._destroyPromises.push(n),n):(this._state=1,Ice.Promise.try(function(){if(t._objectAdapterFactory)return t._objectAdapterFactory.shutdown()}).then(function(){if(null!==t._outgoingConnectionFactory&&t._outgoingConnectionFactory.destroy(),null!==t._objectAdapterFactory)return t._objectAdapterFactory.destroy()}).then(function(){if(null!==t._outgoingConnectionFactory)return t._outgoingConnectionFactory.waitUntilFinished()}).then(function(){if(t._retryQueue&&t._retryQueue.destroy(),t._timer&&t._timer.destroy(),null!==t._objectFactoryMap&&(t._objectFactoryMap.forEach(function(e){return e.destroy()}),t._objectFactoryMap.clear()),t._routerManager&&t._routerManager.destroy(),t._locatorManager&&t._locatorManager.destroy(),t._endpointFactoryManager&&t._endpointFactoryManager.destroy(),t._initData.properties.getPropertyAsInt("Ice.Warn.UnusedProperties")>0){var e=t._initData.properties.getUnusedProperties();if(e.length>0){var i=[];i.push("The following properties were set but never read:"),e.forEach(function(e){return i.push("\n ",e)}),t._initData.logger.warning(i.join(""))}}t._objectAdapterFactory=null,t._outgoingConnectionFactory=null,t._retryQueue=null,t._timer=null,t._referenceFactory=null,t._requestHandlerFactory=null,t._proxyFactory=null,t._routerManager=null,t._locatorManager=null,t._endpointFactoryManager=null,t._state=2,t._destroyPromises&&t._destroyPromises.forEach(function(e){return e.resolve()}),n.resolve()}).catch(function(e){t._destroyPromises&&t._destroyPromises.forEach(function(t){return t.reject(e)}),n.reject(e)}),n)}},{key:"addObjectFactory",value:function(e,t){this._initData.valueFactoryManager.add(function(t){return e.create(t)},t),null===this._objectFactoryMap&&(this._objectFactoryMap=new Map),this._objectFactoryMap.set(t,e)}},{key:"findObjectFactory",value:function(e){var t=null;return null!==this._objectFactoryMap&&(t=this._objectFactoryMap.get(e)),void 0!==t?t:null}}]),I}();Ice.Instance=I}(),function(){var e=Ice.Instance,t=Ice.Debug,n=function(){function n(t){_classCallCheck(this,n),this._instance=new e(t)}return _createClass(n,[{key:"finishSetup",value:function(e){this._instance.finishSetup(this,e)}},{key:"destroy",value:function(){return this._instance.destroy()}},{key:"shutdown",value:function(){try{return this._instance.objectAdapterFactory().shutdown()}catch(e){return t.assert(e instanceof Ice.CommunicatorDestroyedException),Ice.Promise.resolve()}}},{key:"waitForShutdown",value:function(){try{return this._instance.objectAdapterFactory().waitForShutdown()}catch(e){return t.assert(e instanceof Ice.CommunicatorDestroyedException),Ice.Promise.resolve()}}},{key:"isShutdown",value:function(){try{return this._instance.objectAdapterFactory().isShutdown()}catch(e){if(!(e instanceof Ice.CommunicatorDestroyedException))throw e;return!0}}},{key:"stringToProxy",value:function(e){return this._instance.proxyFactory().stringToProxy(e)}},{key:"proxyToString",value:function(e){return this._instance.proxyFactory().proxyToString(e)}},{key:"propertyToProxy",value:function(e){return this._instance.proxyFactory().propertyToProxy(e)}},{key:"proxyToProperty",value:function(e,t){return this._instance.proxyFactory().proxyToProperty(e,t)}},{key:"stringToIdentity",value:function(e){return Ice.stringToIdentity(e)}},{key:"identityToString",value:function(e){return Ice.identityToString(e,this._instance.toStringMode())}},{key:"createObjectAdapter",value:function(e){var t=new Ice.AsyncResultBase(this,"createObjectAdapter",this,null,null);return this._instance.objectAdapterFactory().createObjectAdapter(e,null,t),t}},{key:"createObjectAdapterWithEndpoints",value:function(e,t){0===e.length&&(e=Ice.generateUUID()),this.getProperties().setProperty(e+".Endpoints",t);var n=new Ice.AsyncResultBase(this,"createObjectAdapterWithEndpoints",this,null,null);return this._instance.objectAdapterFactory().createObjectAdapter(e,null,n),n}},{key:"createObjectAdapterWithRouter",value:function(e,t){var n=this;0===e.length&&(e=Ice.generateUUID());var i=new Ice.AsyncResultBase(this,"createObjectAdapterWithRouter",this,null,null);return this.proxyToProperty(t,e+".Router").forEach(function(e,t){n.getProperties().setProperty(t,e)}),this._instance.objectAdapterFactory().createObjectAdapter(e,t,i),i}},{key:"addObjectFactory",value:function(e,t){this._instance.addObjectFactory(e,t)}},{key:"findObjectFactory",value:function(e){return this._instance.findObjectFactory(e)}},{key:"getValueFactoryManager",value:function(){return this._instance.initializationData().valueFactoryManager}},{key:"getImplicitContext",value:function(){return this._instance.getImplicitContext()}},{key:"getProperties",value:function(){return this._instance.initializationData().properties}},{key:"getLogger",value:function(){return this._instance.initializationData().logger}},{key:"getDefaultRouter",value:function(){return this._instance.referenceFactory().getDefaultRouter()}},{key:"setDefaultRouter",value:function(e){this._instance.setDefaultRouter(e)}},{key:"getDefaultLocator",value:function(){return this._instance.referenceFactory().getDefaultLocator()}},{key:"setDefaultLocator",value:function(e){this._instance.setDefaultLocator(e)}},{key:"flushBatchRequests",value:function(){return this._instance.outgoingConnectionFactory().flushAsyncBatchRequests()}},{key:"instance",get:function(){return this._instance}}]),n}();Ice.Communicator=n}(),e.Ice=Ice,e.IceMX=IceMX,e.IceSSL=IceSSL,e.ice=t}(); |