UNPKG

goeasy-im

Version:

www.goeasy.io

1 lines 190 kB
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.GoEasyIM=t():e.GoEasyIM=t()}("undefined"!=typeof self?self:this,function(){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:o})},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=120)}([function(e,t,n){"use strict";t.__esModule=!0,t["default"]=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){"use strict";t.__esModule=!0;var o,r=n(127),i=(o=r)&&o.__esModule?o:{"default":o};t["default"]=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),(0,i["default"])(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}()},function(e,t,n){e.exports={"default":n(152),__esModule:!0}},function(e,t,n){"use strict";t.__esModule=!0;var o,r=n(20),i=(o=r)&&o.__esModule?o:{"default":o};t["default"]=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":(0,i["default"])(t))&&"function"!=typeof t?e:t}},function(e,t,n){"use strict";t.__esModule=!0;var o=s(n(154)),r=s(n(16)),i=s(n(20));function s(e){return e&&e.__esModule?e:{"default":e}}t["default"]=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":(0,i["default"])(t)));e.prototype=(0,r["default"])(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(o["default"]?(0,o["default"])(e,t):e.__proto__=t)}},function(e,t,n){e.exports={"default":n(160),__esModule:!0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.noop=t.GoEasyDomainNumber=t.env=t.goEasyArray=t.UUID=t.calibrator=undefined;var o=n(85),r=n(147),i=n(151),s=n(93),a=n(94);t.calibrator=o.calibrator,t.UUID=r.UUID,t.goEasyArray=i.goEasyArray,t.env=s.env,t.GoEasyDomainNumber=a.GoEasyDomainNumber,t.noop=function(){}},function(e,t){var n=e.exports={version:"2.6.12"};"number"==typeof __e&&(__e=n)},function(e,t,n){"use strict";t.__esModule=!0;var o=i(n(2)),r=i(n(183));function i(e){return e&&e.__esModule?e:{"default":e}}t["default"]=function s(e,t,n){null===e&&(e=Function.prototype);var i=(0,r["default"])(e,t);if(i===undefined){var a=(0,o["default"])(e);return null===a?undefined:s(a,t,n)}if("value"in i)return i.value;var u=i.get;return u===undefined?undefined:u.call(n)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t["default"]={"default":"default",text:"text",image:"image",video:"video",audio:"audio",emoji:"emoji",file:"file"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t["default"]={WRITE:"WRITE",READ:"READ",NONE:"NONE"}},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){var o=n(61)("wks"),r=n(45),i=n(11).Symbol,s="function"==typeof i;(e.exports=function(e){return o[e]||(o[e]=s&&i[e]||(s?i:r)("Symbol."+e))}).store=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=a(n(0)),r=a(n(1)),i=n(6),s=a(n(10));function a(e){return e&&e.__esModule?e:{"default":e}}var u=function(){function e(t){var n=this;(0,o["default"])(this,e),this.uuid=null,this.name="",this.params=null,this.success=null,this.fail=null,this.permission=s["default"].NONE,this.singleTimeout=0,this.totalTimeout=0,this.startTime=0,this.complete=!1,this.retried=0,this.uuid=i.UUID.get(),this.name=t.name,this.params=t.params,this.permission=t.permission,this.totalTimeout=t.totalTimeout,this.singleTimeout=t.singleTimeout,this.success=function(e){n.complete||(n.complete=!0,t.success(e))},this.fail=function(e){n.complete||(n.complete=!0,t.fail(e))}}return(0,r["default"])(e,[{key:"start",value:function(){this.startTime=Date.now()}},{key:"isTimeout",value:function(){return this.startTime+this.totalTimeout<Date.now()}}]),e}();t["default"]=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.EmitType={authorize:"authorize",manualDisconnect:"manualDisconnect",subscribe:"subscribe",unsubscribe:"unsubscribe",publish:"publish",ack:"ack",historyMessages:"historyMessages",hereNow:"hereNow",hereNowByUserIds:"hereNowByUserIds",imLastConversations:"imLastConversations",markPrivateMessageAsRead:"markPrivateMessageAsRead",markGroupMessageAsRead:"markGroupMessageAsRead",imGroupOnlineCount:"imGroupOnlineCount",imHereNow:"imHereNow",imGroupHereNow:"imGroupHereNow",publishIM:"publishIM",imHistory:"imHistory",subscribeUserPresence:"subscribeUserPresence",unsubscribeUserPresence:"unsubscribeUserPresence",subscribeGroupPresence:"subscribeGroupPresence",unsubscribeGroupPresence:"unsubscribeGroupPresence",removeConversation:"removeConversation",topConversation:"topConversation",imData:"imData",subscribeGroups:"subscribeGroups",unsubscribeGroup:"unsubscribeGroup"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.str=t.noop=t.GoEasyDomainNumber=t.env=t.goEasyArray=t.UUID=t.calibrator=undefined;var o=n(181),r=n(6);t.calibrator=r.calibrator,t.UUID=r.UUID,t.goEasyArray=r.goEasyArray,t.env=r.env,t.GoEasyDomainNumber=r.GoEasyDomainNumber,t.noop=r.noop,t.str=o.str},function(e,t,n){e.exports={"default":n(122),__esModule:!0}},function(e,t,n){var o=n(11),r=n(7),i=n(33),s=n(27),a=n(28),u=function(e,t,n){var c,l,f,d=e&u.F,p=e&u.G,h=e&u.S,y=e&u.P,v=e&u.B,m=e&u.W,g=p?r:r[t]||(r[t]={}),b=g.prototype,_=p?o:h?o[t]:(o[t]||{}).prototype;for(c in p&&(n=t),n)(l=!d&&_&&_[c]!==undefined)&&a(g,c)||(f=l?_[c]:n[c],g[c]=p&&"function"!=typeof _[c]?n[c]:v&&l?i(f,o):m&&_[c]==f?function(e){var t=function(t,n,o){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,o)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(f):y&&"function"==typeof f?i(Function.call,f):f,y&&((g.virtual||(g.virtual={}))[c]=f,e&u.R&&b&&!b[c]&&s(b,c,f)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,e.exports=u},function(e,t,n){var o=n(23);e.exports=function(e){if(!o(e))throw TypeError(e+" is not an object!");return e}},function(e,t,n){e.exports=!n(30)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t,n){"use strict";t.__esModule=!0;var o=s(n(131)),r=s(n(138)),i="function"==typeof r["default"]&&"symbol"==typeof o["default"]?function(e){return typeof e}:function(e){return e&&"function"==typeof r["default"]&&e.constructor===r["default"]&&e!==r["default"].prototype?"symbol":typeof e};function s(e){return e&&e.__esModule?e:{"default":e}}t["default"]="function"==typeof r["default"]&&"symbol"===i(o["default"])?function(e){return void 0===e?"undefined":i(e)}:function(e){return e&&"function"==typeof r["default"]&&e.constructor===r["default"]&&e!==r["default"].prototype?"symbol":void 0===e?"undefined":i(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.SocketTimeout={connect:1500,reconnectionDelayMax:3e3,commonQuerySingle:2500,commonQueryTotal:12e3,commonRequestSingle:1700,commonRequestTotal:12e3,commonInfiniteSingle:1700,commonInfiniteTotal:864e5}},function(e,t,n){var o=n(18),r=n(79),i=n(56),s=Object.defineProperty;t.f=n(19)?Object.defineProperty:function(e,t,n){if(o(e),t=i(t,!0),o(n),r)try{return s(e,t,n)}catch(a){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImEventType=t.eventCenter=undefined;var o=n(130),r=n(84);t.eventCenter=o.eventCenter,t.ImEventType=r.ImEventType},function(e,t,n){e.exports={"default":n(175),__esModule:!0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Conversion=t.ConversationType=t.Conversations=undefined;var o=n(100),r=n(69),i=n(176);t.Conversations=i.Conversations,t.ConversationType=r.ConversationType,t.Conversion=o.Conversion},function(e,t,n){var o=n(22),r=n(44);e.exports=n(19)?function(e,t,n){return o.f(e,t,r(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var o=n(81),r=n(58);e.exports=function(e){return o(r(e))}},function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SocketTimeout=t.IMTimeout=undefined;var o=n(21);t.IMTimeout={};t.SocketTimeout=o.SocketTimeout},function(e,t,n){"use strict";var o=n(212),r=n(213),i=n(215),s=n(216);"undefined"!=typeof navigator&&/Android/i.test(navigator.userAgent),"undefined"!=typeof navigator&&/PhantomJS/i.test(navigator.userAgent);t.protocol=3;var a=t.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},u=o(a),c={type:"error",data:"parser error"},l=n(217);t.encodePacket=function(e,t,n,o){"function"==typeof t&&(o=t,t=!1),"function"==typeof n&&(o=n,n=null);e.data===undefined?undefined:e.data.buffer||e.data;var r=a[e.type];return undefined!==e.data&&(r+=n?s.encode(String(e.data),{strict:!1}):String(e.data)),o(""+r)},t.decodePacket=function(e,t,n){if(e===undefined)return c;if("string"==typeof e){if(n&&!1===(e=function(e){try{e=s.decode(e,{strict:!1})}catch(t){return!1}return e}(e)))return c;var o=e.charAt(0);return Number(o)==o&&u[o]?e.length>1?{type:u[o],data:e.substring(1)}:{type:u[o]}:c}o=new Uint8Array(e)[0];var r=sliceBuffer(e,1);return l&&"blob"===t&&(r=new l([r])),{type:u[o],data:r}},t.encodePayload=function(e,n,o){"function"==typeof n&&(o=n,n=null);var s=r(e);if(!e.length)return o("0:");!function(e,t,n){for(var o=new Array(e.length),r=i(e.length,n),s=function(e,n,r){t(n,function(t,n){o[e]=n,r(t,o)})},a=0;a<e.length;a++)s(a,e[a],r)}(e,function(e,o){t.encodePacket(e,!!s&&n,!0,function(e){o(null,function(e){return e.length+":"+e}(e))})},function(e,t){return o(t.join(""))})},t.decodePayload=function(e,n,o){var r;if("function"==typeof n&&(o=n,n=null),""===e)return o(c,0,1);for(var i,s,a="",u=0,l=e.length;u<l;u++){var f=e.charAt(u);if(":"===f){if(""===a||a!=(i=Number(a)))return o(c,0,1);if(a!=(s=e.substr(u+1,i)).length)return o(c,0,1);if(s.length){if(r=t.decodePacket(s,n,!0),c.type===r.type&&c.data===r.data)return o(c,0,1);if(!1===o(r,u+i,l))return}u+=i,a=""}else a+=f}return""!==a?o(c,0,1):void 0}},function(e,t,n){var o=n(43);e.exports=function(e,t,n){if(o(e),t===undefined)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,o){return e.call(t,n,o)};case 3:return function(n,o,r){return e.call(t,n,o,r)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){var o=n(80),r=n(62);e.exports=Object.keys||function(e){return o(e,r)}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){e.exports=!0},function(e,t){e.exports={}},function(e,t,n){var o=n(58);e.exports=function(e){return Object(o(e))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=M(n(5)),r=M(n(25)),i=M(n(0)),s=M(n(1)),a=n(26),u=n(15),c=n(24),l=n(182),f=M(n(9)),d=n(21),p=M(n(196)),h=M(n(230)),y=M(n(231)),v=M(n(247)),m=M(n(117)),g=M(n(248)),b=M(n(249)),_=M(n(250)),C=M(n(251)),k=M(n(252)),w=M(n(253)),E=M(n(254)),T=M(n(255)),O=M(n(256)),S=M(n(41));function M(e){return e&&e.__esModule?e:{"default":e}}var P=function(){function e(t){(0,i["default"])(this,e),this._appKey=undefined,this._host=undefined,this._supportOldBrowser=!1,this._allowNotification=!1,this._forceTLS=!0,this._event=c.eventCenter,this._goEasyUploader=null,this._connection=null,this._goEasySocket=null,this._dataCache=null,this._messageSender=null,this._history=null,this._conversations=null,this._iMReceiver=null,this._groupMessageReceive=null,this._groupPresenceSubscriber=null,this._groupOnlineCount=null,this._groupHereNow=null,this._privateMessageReceive=null,this._userPresenceSubscriber=null,this._userHereNow=null,this._appKey=t.appkey,this._host=t.host,this._supportOldBrowser=t.supportOldBrowser,this._allowNotification=t.allowNotification,this._forceTLS=t.forceTLS}return(0,s["default"])(e,[{key:"on",value:function(e,t){this._event.on(e,t)}},{key:"initialBeforeConnect",value:function(t){var n=this.setUriAndOpts();e.userId=t.id,e.userData=t.data,this._goEasySocket=new p["default"]({appkey:this._appKey,host:this._host,userId:t.id,userData:(0,r["default"])(t.data),otp:t.otp,artifactVersion:"1.2.2",imVersion:e.version,type:"im",opts:n.opts,uri:n.uri,allowNotification:this._allowNotification}),this._dataCache=new O["default"](this,t),this._connection=new h["default"](this),this._messageSender=new y["default"](this),this._history=new v["default"](this),this._goEasyUploader=new m["default"](this),this._userHereNow=new w["default"](this),this._groupHereNow=new E["default"](this),this._groupOnlineCount=new _["default"](this)}},{key:"initialAfterConnect",value:function(){this._iMReceiver=new T["default"](this),this._conversations=new a.Conversations(this),this._groupPresenceSubscriber=new C["default"](this),this._groupMessageReceive=new g["default"](this),this._userPresenceSubscriber=new k["default"](this),this._privateMessageReceive=new b["default"](this)}},{key:"connect",value:function(e){if(this.getStatus()!==S["default"].DISCONNECTED)return o["default"].reject({code:408,content:"IM is connected, don't try again until im.disconnect() is called. "});if(!u.calibrator.isObject(e))return o["default"].reject({code:400,content:"TypeError: user require an object."});if(u.calibrator.isEmpty(e.id)||!u.calibrator.isStringOrNumber(e.id))return o["default"].reject({code:400,content:"TypeError: id require number or string."});if(u.calibrator.isNumber(e.id)&&(e.id=e.id.toString()),e.data=u.calibrator.isDef(e.data)?e.data:{},(u.calibrator.isObject(e.data)?(0,r["default"])(e.data).length:e.data.length)>300)return o["default"].reject({code:400,content:"user.data-length limit 300 byte."});this.initialBeforeConnect(e);var t=this._connection.connect(e);return this.initialAfterConnect(),t}},{key:"disconnect",value:function(){return this._connection.disconnect()}},{key:"getStatus",value:function(){return this._goEasySocket?this._goEasySocket.getStatus():S["default"].DISCONNECTED}},{key:"createTextMessage",value:function(e){return l.messageCreator.create(f["default"].text,e)}},{key:"createImageMessage",value:function(e){return l.messageCreator.create(f["default"].image,e)}},{key:"createFileMessage",value:function(e){return l.messageCreator.create(f["default"].file,e)}},{key:"createAudioMessage",value:function(e){return l.messageCreator.create(f["default"].audio,e)}},{key:"createVideoMessage",value:function(e){return l.messageCreator.create(f["default"].video,e)}},{key:"createCustomMessage",value:function(e){return l.messageCreator.create(e.type,e)}},{key:"latestConversations",value:function(){return this._conversations?this._conversations.latestConversations():o["default"].reject({code:500,content:"Please connect GoEasyIM first."})}},{key:"groupMarkAsRead",value:function(e,t){return this._conversations.groupMarkAsRead(e,t)}},{key:"privateMarkAsRead",value:function(e,t){return this._conversations.privateMarkAsRead(e,t)}},{key:"removePrivateConversation",value:function(e){return this._conversations.removeConversation(e,a.ConversationType.PRIVATE)}},{key:"removeGroupConversation",value:function(e){return this._conversations.removeConversation(e,a.ConversationType.GROUP)}},{key:"topPrivateConversation",value:function(e,t){return this._conversations.topConversation(e,t,a.ConversationType.PRIVATE)}},{key:"topGroupConversation",value:function(e,t){return this._conversations.topConversation(e,t,a.ConversationType.GROUP)}},{key:"history",value:function(e){return this._history.history(e)}},{key:"upload",value:function(e,t,n){return this._goEasyUploader.upload(e,t,n)}},{key:"sendSystemMessage",value:function(e,t){return this._messageSender.send(e,t,a.ConversationType.SYSTEM)}},{key:"sendMessage",value:function(e){return this._messageSender.sendMessage(e)}},{key:"sendPrivateMessage",value:function(e,t){return this._messageSender.send(e,t,a.ConversationType.PRIVATE)}},{key:"subscribeUserPresence",value:function(e){return this._userPresenceSubscriber.presence(e)}},{key:"unsubscribeUserPresence",value:function(e){return this._userPresenceSubscriber.unPresence(e)}},{key:"hereNow",value:function(e){return this._userHereNow.hereNow(e,a.ConversationType.PRIVATE)}},{key:"sendGroupMessage",value:function(e,t){return this._messageSender.send(e,t,a.ConversationType.GROUP)}},{key:"subscribeGroup",value:function(e){return this._groupMessageReceive.subscribe(e)}},{key:"unsubscribeGroup",value:function(e){return this._groupMessageReceive.unsubscribe(e)}},{key:"subscribeGroupPresence",value:function(e){return this._groupPresenceSubscriber.presence(e)}},{key:"unsubscribeGroupPresence",value:function(e){return this._groupPresenceSubscriber.unPresence(e)}},{key:"groupHereNow",value:function(e){return this._groupHereNow.hereNow(e)}},{key:"groupOnlineCount",value:function(e){return this._groupOnlineCount.get(e)}},{key:"setUriAndOpts",value:function(){var e=void 0,t=void 0,n="://"+u.GoEasyDomainNumber.refreshNumber()+this._host;if(u.env.isBrowserClient()){e=!1===this._forceTLS?"http"+n+":80":"https"+n+":443";t={transports:!0===this._supportOldBrowser?["polling","websocket"]:["websocket"],timeout:d.SocketTimeout.connect}}else e="https://wx-"+this._host+":443",t={transports:["websocket"],reconnectionDelayMax:d.SocketTimeout.reconnectionDelayMax};return{uri:e,opts:t}}}]),e}();P.version=null,P.userId=undefined,P.userData=null,t["default"]=P},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=l(n(16)),r=l(n(0)),i=l(n(1)),s=l(n(39)),a=n(6),u=(l(n(9)),l(n(49))),c=n(26);function l(e){return e&&e.__esModule?e:{"default":e}}var f=function(){function e(t){(0,r["default"])(this,e),this.type="",this.to={type:null,id:null,data:null},this.timestamp=Date.now(),this.senderId=null,this.payload=null,this.messageId=a.UUID.get(),this.status=u["default"]["new"],this.validate(t),this.setSenderId(),this.setType(t),this.setNotification(t),this.setPayload(t),this.setTo(t),this.setData()}return(0,i["default"])(e,[{key:"validate",value:function(e){if(!a.calibrator.isObject(e))throw Error("it is an empty message.")}},{key:"setType",value:function(e){throw Error("Abstract method")}},{key:"setNotification",value:function(e){if(e.notification){if(!a.calibrator.isObject(e.notification))throw Error("notification require an object.");if(a.calibrator.isEmpty(e.notification.title))throw Error("notification's title is empty.");if(a.calibrator.isEmpty(e.notification.body))throw Error("notification's body is empty.");if(e.notification.title.length>32)throw Error("notification's title over max length 32");if(e.notification.body.length>50)throw Error("notification's body over max length 50");this.notification=e.notification}}},{key:"setPayload",value:function(e){this.payload=(0,o["default"])(null)}},{key:"setSenderId",value:function(){if(!s["default"].userId)throw Error("please call connect() first.");this.senderId=s["default"].userId}},{key:"setTo",value:function(e){this.to=e.to}},{key:"setData",value:function(){this.to&&this.to.type==c.ConversationType.GROUP&&(this.senderData=s["default"].userData)}}]),e}();t["default"]=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t["default"]={DISCONNECTED:"disconnected",DISCONNECTING:"disconnecting",CONNECTING:"connecting",CONNECTED:"connected",RECONNECTING:"reconnecting",RECONNECTED:"reconnected",EXPIRED_RECONNECTED:"reconnected",CONNECT_FAILED:"connect_failed"}},function(e,t,n){function o(e){if(e)return function(e){for(var t in o.prototype)e[t]=o.prototype[t];return e}(e)}e.exports=o,o.prototype.on=o.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},o.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},o.prototype.off=o.prototype.removeListener=o.prototype.removeAllListeners=o.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,o=this._callbacks["$"+e];if(!o)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var r=0;r<o.length;r++)if((n=o[r])===t||n.fn===t){o.splice(r,1);break}return this},o.prototype.emit=function(e){this._callbacks=this._callbacks||{};var t=[].slice.call(arguments,1),n=this._callbacks["$"+e];if(n)for(var o=0,r=(n=n.slice(0)).length;o<r;++o)n[o].apply(this,t);return this},o.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},o.prototype.hasListeners=function(e){return!!this.listeners(e).length}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t){var n=0,o=Math.random();e.exports=function(e){return"Symbol(".concat(e===undefined?"":e,")_",(++n+o).toString(36))}},function(e,t,n){var o=n(22).f,r=n(28),i=n(12)("toStringTag");e.exports=function(e,t,n){e&&!r(e=n?e:e.prototype,i)&&o(e,i,{configurable:!0,value:t})}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=c(n(16)),r=c(n(0)),i=c(n(1)),s=n(6),a=n(26),u=c(n(49));function c(e){return e&&e.__esModule?e:{"default":e}}var l=function(){function e(){(0,r["default"])(this,e)}return(0,i["default"])(e,null,[{key:"assemble",value:function(e){if(!s.calibrator.isDef(e))return null;try{var t=(0,o["default"])(null);return t.type=e.mt,t.timestamp=e.ts,t.senderId=e.s,t.payload=JSON.parse(e.p),t.messageId=e.i,t.status=u["default"].success,e.t==a.ConversationType.GROUP?(t.groupId=e.r,t.senderData=e.d&&JSON.parse(e.d)):t.receiverId=e.r,t}catch(n){throw Error(n)}}}]),e}();t["default"]=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t["default"]={"new":"new",sending:"sending",success:"success",fail:"fail"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=f(n(2)),r=f(n(0)),i=f(n(1)),s=f(n(3)),a=f(n(8)),u=f(n(4)),c=f(n(70)),l=n(15);function f(e){return e&&e.__esModule?e:{"default":e}}var d=function(e){function t(e){return(0,r["default"])(this,t),(0,s["default"])(this,(t.__proto__||(0,o["default"])(t)).call(this,e))}return(0,u["default"])(t,e),(0,i["default"])(t,[{key:"validate",value:function(e){if((0,a["default"])(t.prototype.__proto__||(0,o["default"])(t.prototype),"validate",this).call(this,e),!l.calibrator.isDef(e.file))throw Error("file is empty.")}},{key:"setPayload",value:function(e){(0,a["default"])(t.prototype.__proto__||(0,o["default"])(t.prototype),"setPayload",this).call(this,e)}}]),t}(c["default"]);t["default"]=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=l(n(2)),r=l(n(0)),i=l(n(1)),s=l(n(3)),a=l(n(8)),u=l(n(4)),c=n(15);function l(e){return e&&e.__esModule?e:{"default":e}}var f=function(e){function t(e){return(0,r["default"])(this,t),(0,s["default"])(this,(t.__proto__||(0,o["default"])(t)).call(this,e))}return(0,u["default"])(t,e),(0,i["default"])(t,[{key:"validate",value:function(e){if((0,a["default"])(t.prototype.__proto__||(0,o["default"])(t.prototype),"validate",this).call(this,e),!c.calibrator.isDef(e.file))throw Error("file is empty.")}},{key:"setPayload",value:function(e){(0,a["default"])(t.prototype.__proto__||(0,o["default"])(t.prototype),"setPayload",this).call(this,e)}}]),t}(l(n(70))["default"]);t["default"]=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=c(n(2)),r=c(n(0)),i=c(n(1)),s=c(n(3)),a=c(n(8)),u=c(n(4));function c(e){return e&&e.__esModule?e:{"default":e}}var l=function(e){function t(e){return(0,r["default"])(this,t),(0,s["default"])(this,(t.__proto__||(0,o["default"])(t)).call(this,e))}return(0,u["default"])(t,e),(0,i["default"])(t,[{key:"validate",value:function(e){if((0,a["default"])(t.prototype.__proto__||(0,o["default"])(t.prototype),"validate",this).call(this,e),!(e.file instanceof File))throw Error("wrong file type.");if(0==e.file.size)throw Error("File size is 0.");if(e.file.size>31457280)throw Error("message-length limit 30mib")}},{key:"setPayload",value:function(e){(0,a["default"])(t.prototype.__proto__||(0,o["default"])(t.prototype),"setPayload",this).call(this,e),this.payload.contentType=e.file.type,this.payload.name=e.file.name,this.payload.size=e.file.size;var n=(window.URL||window.webkitURL).createObjectURL(e.file);this.payload.url=n}}]),t}(c(n(70))["default"]);t["default"]=l},function(e,t,n){(function(o){function r(){var e;try{e=t.storage.debug}catch(n){}return!e&&void 0!==o&&"env"in o&&(e=o.env.DEBUG),e}(t=e.exports=n(200)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),!n)return;var o="color: "+this.color;e.splice(1,0,o,"color: inherit");var r=0,i=0;e[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&"%c"===e&&(i=++r)}),e.splice(i,0,o)},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(n){}},t.load=r,t.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}},t.enable(r())}).call(t,n(71))},function(e,t){t.encode=function(e){var t="";for(var n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t},t.decode=function(e){for(var t={},n=e.split("&"),o=0,r=n.length;o<r;o++){var i=n[o].split("=");t[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return t}},function(e,t,n){var o=n(23),r=n(11).document,i=o(r)&&o(r.createElement);e.exports=function(e){return i?r.createElement(e):{}}},function(e,t,n){var o=n(23);e.exports=function(e,t){if(!o(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!o(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!o(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!o(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){var o=n(18),r=n(124),i=n(62),s=n(60)("IE_PROTO"),a=function(){},u=function(){var e,t=n(55)("iframe"),o=i.length;for(t.style.display="none",n(83).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),u=e.F;o--;)delete u.prototype[i[o]];return u()};e.exports=Object.create||function(e,t){var n;return null!==e?(a.prototype=o(e),n=new a,a.prototype=null,n[s]=e):n=u(),t===undefined?n:r(n,t)}},function(e,t){e.exports=function(e){if(e==undefined)throw TypeError("Can't call method on "+e);return e}},function(e,t){var n=Math.ceil,o=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?o:n)(e)}},function(e,t,n){var o=n(61)("keys"),r=n(45);e.exports=function(e){return o[e]||(o[e]=r(e))}},function(e,t,n){var o=n(7),r=n(11),i=r["__core-js_shared__"]||(r["__core-js_shared__"]={});(e.exports=function(e,t){return i[e]||(i[e]=t!==undefined?t:{})})("versions",[]).push({version:o.version,mode:n(36)?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,n){t.f=n(12)},function(e,t,n){var o=n(11),r=n(7),i=n(36),s=n(63),a=n(22).f;e.exports=function(e){var t=r.Symbol||(r.Symbol=i?{}:o.Symbol||{});"_"==e.charAt(0)||e in t||a(t,e,{value:s.f(e)})}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var o=n(47),r=n(44),i=n(29),s=n(56),a=n(28),u=n(79),c=Object.getOwnPropertyDescriptor;t.f=n(19)?c:function(e,t){if(e=i(e),t=s(t,!0),u)try{return c(e,t)}catch(n){}if(a(e,t))return r(!o.f.call(e,t),e[t])}},function(e,t,n){var o=n(17),r=n(7),i=n(30);e.exports=function(e,t){var n=(r.Object||{})[e]||Object[e],s={};s[e]=t(n),o(o.S+o.F*i(function(){n(1)}),"Object",s)}},function(e,t,n){"use strict";var o=n(43);e.exports.f=function(e){return new function(e){var t,n;this.promise=new e(function(e,o){if(t!==undefined||n!==undefined)throw TypeError("Bad Promise constructor");t=e,n=o}),this.resolve=o(t),this.reject=o(n)}(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.ConversationType={GROUP:"group",PRIVATE:"private"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=f(n(2)),r=f(n(0)),i=f(n(1)),s=f(n(3)),a=f(n(8)),u=f(n(4)),c=f(n(40)),l=f(n(9));function f(e){return e&&e.__esModule?e:{"default":e}}var d=function(e){function t(e){(0,r["default"])(this,t);var n=(0,s["default"])(this,(t.__proto__||(0,o["default"])(t)).call(this,e));return n.file=null,n.onProgress=null,n.setFile(e.file),n.setOnProgress(e.onProgress),n}return(0,u["default"])(t,e),(0,i["default"])(t,[{key:"validate",value:function(e){(0,a["default"])(t.prototype.__proto__||(0,o["default"])(t.prototype),"validate",this).call(this,e)}},{key:"setPayload",value:function(e){(0,a["default"])(t.prototype.__proto__||(0,o["default"])(t.prototype),"setPayload",this).call(this,e),this.payload.size="",this.payload.contentType="",this.payload.name="",this.payload.url=""}},{key:"setType",value:function(e){this.type=l["default"].file}},{key:"setFile",value:function(e){this.file=e}},{key:"setOnProgress",value:function(e){this.onProgress=e}}]),t}(c["default"]);t["default"]=d},function(e,t){var n,o,r=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{o="function"==typeof clearTimeout?clearTimeout:s}catch(e){o=s}}();var u,c=[],l=!1,f=-1;function d(){l&&u&&(l=!1,u.length?c=u.concat(c):f=-1,c.length&&p())}function p(){if(!l){var e=a(d);l=!0;for(var t=c.length;t;){for(u=c,c=[];++f<t;)u&&u[f].run();f=-1,t=c.length}u=null,l=!1,function(e){if(o===clearTimeout)return clearTimeout(e);if((o===s||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(e);try{o(e)}catch(t){try{return o.call(null,e)}catch(t){return o.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function y(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new h(e,t)),1!==c.length||l||a(p)},h.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=y,r.addListener=y,r.once=y,r.off=y,r.removeListener=y,r.removeAllListeners=y,r.emit=y,r.prependListener=y,r.prependOnceListener=y,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},function(e,t,n){"use strict";var o,r=n(25),i=(o=r)&&o.__esModule?o:{"default":o};n(202)("socket.io-parser");var s=n(42),a=n(105);function u(){}t.protocol=4,t.types=["CONNECT","DISCONNECT","EVENT","ACK","ERROR","BINARY_EVENT","BINARY_ACK"],t.CONNECT=0,t.DISCONNECT=1,t.EVENT=2,t.ACK=3,t.ERROR=4,t.BINARY_EVENT=5,t.BINARY_ACK=6,t.Encoder=u,t.Decoder=l;var c=t.ERROR+'"encode error"';function l(){this.reconstructor=null}function f(e){this.reconPack=e,this.buffers=[]}function d(e){return{type:t.ERROR,data:"parser error: "+e}}u.prototype.encode=function(e,n){n([function(e){var n=""+e.type;t.BINARY_EVENT!==e.type&&t.BINARY_ACK!==e.type||(n+=e.attachments+"-");e.nsp&&"/"!==e.nsp&&(n+=e.nsp+",");null!=e.id&&(n+=e.id);if(null!=e.data){var o=function(e){try{return(0,i["default"])(e)}catch(t){return!1}}(e.data);if(!1===o)return c;n+=o}return n}(e)])},s(l.prototype),l.prototype.add=function(e){var n;if("string"!=typeof e)throw new Error("Unknown type: "+e);n=function(e){var n=0,o={type:Number(e.charAt(0))};if(null==t.types[o.type])return d("unknown packet type "+o.type);if(t.BINARY_EVENT===o.type||t.BINARY_ACK===o.type){for(var r="";"-"!==e.charAt(++n)&&(r+=e.charAt(n),n!=e.length););if(r!=Number(r)||"-"!==e.charAt(n))throw new Error("Illegal attachments");o.attachments=Number(r)}if("/"===e.charAt(n+1))for(o.nsp="";++n;){var i=e.charAt(n);if(","===i)break;if(o.nsp+=i,n===e.length)break}else o.nsp="/";var s=e.charAt(n+1);if(""!==s&&Number(s)==s){for(o.id="";++n;){var i=e.charAt(n);if(null==i||Number(i)!=i){--n;break}if(o.id+=e.charAt(n),n===e.length)break}o.id=Number(o.id)}if(e.charAt(++n)){var u=function(e){try{return JSON.parse(e)}catch(t){return!1}}(e.substr(n)),c=!1!==u&&(o.type===t.ERROR||a(u));if(!c)return d("invalid payload");o.data=u}return o}(e),this.emit("decoded",n)},l.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()},f.prototype.takeBinaryData=function(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){var t=binary.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null},f.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]}},function(e,t,n){e.exports={"default":n(207),__esModule:!0}},function(e,t,n){"use strict";var o=n(32),r=n(42);function i(e){this.path=e.path,this.hostname=e.hostname,this.port=e.port,this.secure=e.secure,this.query=e.query,this.timestampParam=e.timestampParam,this.timestampRequests=e.timestampRequests,this.readyState="",this.agent=e.agent||!1,this.socket=e.socket,this.enablesXDR=e.enablesXDR,this.pfx=e.pfx,this.key=e.key,this.passphrase=e.passphrase,this.cert=e.cert,this.ca=e.ca,this.ciphers=e.ciphers,this.rejectUnauthorized=e.rejectUnauthorized,this.forceNode=e.forceNode,this.isReactNative=e.isReactNative,this.extraHeaders=e.extraHeaders,this.localAddress=e.localAddress}e.exports=i,r(i.prototype),i.prototype.onError=function(e,t){var n=new Error(e);return n.type="TransportError",n.description=t,this.emit("error",n),this},i.prototype.open=function(){return"closed"!==this.readyState&&""!==this.readyState||(this.readyState="opening",this.doOpen()),this},i.prototype.close=function(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this},i.prototype.send=function(e){if("open"!==this.readyState)throw new Error("Transport not open");this.write(e)},i.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},i.prototype.onData=function(e){var t=o.decodePacket(e,this.socket.binaryType);this.onPacket(t)},i.prototype.onPacket=function(e){this.emit("packet",e)},i.prototype.onClose=function(){this.readyState="closed",this.emit("close")}},function(e,t){e.exports=function(e,t){var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){(function(o){function r(){var e;try{e=t.storage.debug}catch(n){}return!e&&void 0!==o&&"env"in o&&(e=o.env.DEBUG),e}(t=e.exports=n(218)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),!n)return;var o="color: "+this.color;e.splice(1,0,o,"color: inherit");var r=0,i=0;e[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&"%c"===e&&(i=++r)}),e.splice(i,0,o)},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(n){}},t.load=r,t.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}},t.enable(r())}).call(t,n(71))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=i(n(0)),r=i(n(1));function i(e){return e&&e.__esModule?e:{"default":e}}var s=function(){function e(){(0,o["default"])(this,e)}return(0,r["default"])(e,[{key:"upload",value:function(e){throw Error("Not implementation yet.")}}]),e}();t["default"]=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t["default"]={message:"message",imMessage:"imMessage",userPresence:"userPresence",groupPresence:"groupPresence"}},function(e,t,n){e.exports=!n(19)&&!n(30)(function(){return 7!=Object.defineProperty(n(55)("div"),"a",{get:function(){return 7}}).a})},function(e,t,n){var o=n(28),r=n(29),i=n(125)(!1),s=n(60)("IE_PROTO");e.exports=function(e,t){var n,a=r(e),u=0,c=[];for(n in a)n!=s&&o(a,n)&&c.push(n);for(;t.length>u;)o(a,n=t[u++])&&(~i(c,n)||c.push(n));return c}},function(e,t,n){var o=n(35);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==o(e)?e.split(""):Object(e)}},function(e,t,n){var o=n(59),r=Math.min;e.exports=function(e){return e>0?r(o(e),9007199254740991):0}},function(e,t,n){var o=n(11).document;e.exports=o&&o.documentElement},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImEventType=undefined;var o,r=n(16);var i=(0,((o=r)&&o.__esModule?o:{"default":o})["default"])(null);i.PRIVATE_MESSAGE_RECEIVED="PRIVATE_MESSAGE_RECEIVED",i.GROUP_MESSAGE_RECEIVED="GROUP_MESSAGE_RECEIVED",i.SYSTEM_MESSAGE_RECEIVED="SYSTEM_MESSAGE_RECEIVED",i.CONVERSATIONS_UPDATED="CONVERSATIONS_UPDATED",i.CONNECTED="CONNECTED",i.CONNECTING="CONNECTING",i.DISCONNECTED="DISCONNECTED",i.USER_PRESENCE="USER_PRESENCE",i.GROUP_PRESENCE="GROUP_PRESENCE",t.ImEventType=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calibrator=undefined;var o=s(n(20)),r=s(n(0)),i=s(n(1));function s(e){return e&&e.__esModule?e:{"default":e}}var a=new(function(){function e(){(0,r["default"])(this,e)}return(0,i["default"])(e,[{key:"isUndef",value:function(e){return e===undefined||null===e}},{key:"isTrue",value:function(e){return!0===e}},{key:"isFalse",value:function(e){return!1===e}},{key:"isPrimitive",value:function(e){return"string"==typeof e||"number"==typeof e||"symbol"===(void 0===e?"undefined":(0,o["default"])(e))||"boolean"==typeof e}},{key:"isDef",value:function(e){return e!==undefined&&null!==e}},{key:"isObject",value:function(e){return null!==e&&"object"===(void 0===e?"undefined":(0,o["default"])(e))}},{key:"isPlainObject",value:function(e){return"[object Object]"===Object.prototype.toString.call(e)}},{key:"isRegExp",value:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)}},{key:"isValidArrayIndex",value:function(e){var t=parseFloat(String(e));return t>=0&&Math.floor(t)===t&&isFinite(e)}},{key:"isStringOrNumber",value:function(e){return"string"==typeof e||"number"==typeof e}},{key:"isString",value:function(e){return"string"==typeof e}},{key:"isNumber",value:function(e){return"number"==typeof e}},{key:"isArray",value:function(e){return"[object Array]"==Object.prototype.toString.call(e)}},{key:"isEmpty",value:function(e){return this.isArray(e)?0==e.length:this.isObject(e)?!this.isDef(e):!this.isNumber(e)&&(this.isString(e)?""==e.trim():!this.isDef(e))}},{key:"isNative",value:function(e){return"function"==typeof e&&/native code/.test(e.toString())}},{key:"isFunction",value:function(e){return"function"==typeof e}}]),e}());t.calibrator=a},function(e,t,n){"use strict";var o=n(133)(!0);n(87)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,n=this._i;return n>=t.length?{value:undefined,done:!0}:(e=o(t,n),this._i+=e.length,{value:e,done:!1})})},function(e,t,n){"use strict";var o=n(36),r=n(17),i=n(88),s=n(27),a=n(37),u=n(134),c=n(46),l=n(89),f=n(12)("iterator"),d=!([].keys&&"next"in[].keys()),p=function(){return this};e.exports=function(e,t,n,h,y,v,m){u(n,t,h);var g,b,_,C=function(e){if(!d&&e in T)return T[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},k=t+" Iterator",w="values"==y,E=!1,T=e.prototype,O=T[f]||T["@@iterator"]||y&&T[y],S=O||C(y),M=y?w?C("entries"):S:undefined,P="Array"==t&&T.entries||O;if(P&&(_=l(P.call(new e)))!==Object.prototype&&_.next&&(c(_,k,!0),o||"function"==typeof _[f]||s(_,f,p)),w&&O&&"values"!==O.name&&(E=!0,S=function(){return O.call(this)}),o&&!m||!d&&!E&&T[f]||s(T,f,S),a[t]=S,a[k]=p,y)if(g={values:w?S:C("values"),keys:v?S:C("keys"),entries:M},m)for(b in g)b in T||i(T,b,g[b]);else r(r.P+r.F*(d||E),t,g);return g}},function(e,t,n){e.exports=n(27)},function(e,t,n){var o=n(28),r=n(38),i=n(60)("IE_PROTO"),s=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=r(e),o(e,i)?e[i]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?s:null}},function(e,t,n){n(135);for(var o=n(11),r=n(27),i=n(37),s=n(12)("toStringTag"),a="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),u=0;u<a.length;u++){var c=a[u],l=o[c],f=l&&l.prototype;f&&!f[s]&&r(f,s,c),i[c]=i.Array}},function(e,t,n){var o=n(80),r=n(62).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return o(e,r)}},function(e,t){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.env=undefined;var o=s(n(20)),r=s(n(0)),i=s(n(1));function s(e){return e&&e.__esModule?e:{"default":e}}var a=new(function(){function e(){(0,r["default"])(this,e)}return(0,i["default"])(e,[{key:"isWx",value:function(){return!("undefined"==typeof wx||!wx.getLocation)&&("undefined"!=typeof GameGlobal||("function"!=typeof WebSocket||"function"!=typeof XMLHttpRequest))}},{key:"isUni",value:function(){return!("object"!==("undefined"==typeof uni?"undefined":(0,o["default"])(uni))||!uni.getSystemInfo)}},{key:"isSupportHtmlPlus",value:function(){return!!("object"===("undefined"==typeof plus?"undefined":(0,o["default"])(plus))&&plus.navigator&&plus.navigator.getUserAgent()&&plus.navigator.getUserAgent().indexOf("Html5Plus")>-1)}},{key:"isTT",value:function(){return!("object"!==("undefined"==typeof tt?"undefined":(0,o["default"])(tt))||!tt.getSystemInfo)}},{key:"isBrowserClient",value:function(){return this.isUni()?"function"==typeof WebSocket&&"function"==typeof XMLHttpRequest&&"object"==("undefined"==typeof localStorage?"undefined":(0,o["default"])(localStorage)):!(this.isReactNative()||this.isWx()||this.isTT())}},{key:"isReactNative",value:function(){return"undefined"!=typeof navigator&&"ReactNative"==navigator.product}}]),e}());t.env=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GoEasyDomainNumber=undefined;var o=u(n(0)),r=u(n(1)),i=n(93),s=n(158),a=u(n(159));function u(e){return e&&e.__esModule?e:{"default":e}}var c=function(){function e(){(0,o["default"])(this,e)}return(0,r["default"])(e,null,[{key:"refreshNumber",value:function(){var e=Math.floor(Math.random()*(a["default"].maxNumber-1)+1);return i.env.isBrowserClient()&&(e=parseInt(s.storage.getData("goEasyNode"))||e),e>0&&e<a["default"].maxNumber?e+=1:e==a["default"].maxNumber&&(e=1),i.env.isBrowserClient()&&s.storage.setData("goEasyNode",e),e}}]),e}();t.GoEasyDomainNumber=c},function(e,t,n){var o=n(35),r=n(12)("toStringTag"),i="Arguments"==o(function(){return arguments}());e.exports=function(e){var t,n,s;return e===undefined?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(n){}}(t=Object(e),r))?n:i?o(t):"Object"==(s=o(t))&&"function"==typeof t.callee?"Arguments":s}},function(e,t,n){var o=n(18),r=n(43),i=n(12)("species");e.exports=function(e,t){var n,s=o(e).constructor;return s===undefined||(n=o(s)[i])==undefined?t:r(n)}},function(e,t,n){var o,r,i,s=n(33),a=n(167),u=n(83),c=n(55),l=n(11),f=l.process,d=l.setImmediate,p=l.clearImmediate,h=l.MessageChannel,y=l.Dispatch,v=0,m={},g=function(){var e=+this;if(m.hasOwnProperty(e)){var t=m[e];delete m[e],t()}},b=function(e){g.call(e.data)};d&&p||(d=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return m[++v]=function(){a("function"==typeof e?e:Function(e),t)},o(v),v},p=function(e){delete m[e]},"process"==n(35)(f)?o=function(e){f.nextTick(s(g,e,1))}:y&&y.now?o=function(e){y.now(s(g,e,1))}:h?(i=(r=new h).port2,r.port1.onmessage=b,o=s(i.postMessage,i,1)):l.addEventListener&&"function"==typeof postMessage&&!l.importScripts?(o=function(e){l.postMessage(e+"","*")},l.addEventListener("message",b,!1)):o="onreadystatechange"in c("script")?function(e){u.appendChild(c("script")).onreadystatechange=function(){u.removeChild(this),g.call(e)}}:function(e){setTimeout(s(g,e,1),0)}),e.exports={set:d,clear:p}},function(e,t){e.exports=function(e){try{return{e:!1,v:e()}}catch(t){return{e:!0,v:t}}}},function(e,t,n){var o=n(18),r=n(23),i=n(68);e.exports=function(e,t){if(o(e),r(t)&&t.constructor===e)return t;var n=i.f(e);return(0,n.resolve)(t),n.promise}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Conversion=undefined;var o=u(n(0)),r=u(n(1)),i=n(69),s=u(n(39)),a=u(n(48));function u(e){return e&&e.__esModule?e:{"default":e}}t.Conversion=function(){function e(){(0,o["default"])(this,e),this.type="",this.lastMessage=null,this.unread=0,this.top=!1,this.data=null,this.lc=0,this.lm=0}return(0,r["default"])(e,null,[{key:"buildByInMessage",value:function(t){var n=new e;return n.type=t.t,n.lastMessage=a["default"].assemble(t),n.lc=n.lastMessage.timestamp-1,n.lm=n.lastMessage.timestamp,n.unread=0,t.t==i.ConversationType.GROUP?n.groupId=t.r:s["default"].userId==t.r?n.userId=t.s:n.userId=t.r,n}},{key:"bui