@tencentcloud/chat
Version:
Tencent Cloud Chat SDK for Web/Mini Program/uni-app/React Native/Donut
1 lines • 708 kB
JavaScript
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).TencentCloudChat=t()}(this,function(){function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function b(e){if(Array.isArray(e))return e}function i(e,t,n){t=x(t);var o=e,t=V()?Reflect.construct(t,n||[],x(e).constructor):t.apply(e,n);if(!t||"object"!=typeof t&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=o))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function w(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),Object.defineProperty(e,J(o.key),o)}}function e(e,t,n){return t&&w(e.prototype,t),n&&w(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function F(e,t){var n,o,i,s,a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(a)return i=!(o=!0),{s:function(){a=a.call(e)},n:function(){var e=a.next();return o=e.done,e},e:function(e){i=!0,n=e},f:function(){try{o||null==a.return||a.return()}finally{if(i)throw n}}};if(Array.isArray(e)||(a=X(e))||t&&e&&"number"==typeof e.length)return a&&(e=a),s=0,{s:t=function(){},n:function(){return s>=e.length?{done:!0}:{done:!1,value:e[s++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function q(e,t,n){return(t=J(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x(e){return(x=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function t(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Y(e,t)}function V(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(V=function(){return!!e})()}function B(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function H(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function K(t,e){var n,o=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),o.push.apply(o,n)),o}function y(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?K(Object(n),!0).forEach(function(e){q(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):K(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function W(e,t){if(null==e)return{};var n,o=function(e,t){if(null==e)return{};var n,o={};for(n in e)if({}.hasOwnProperty.call(e,n)){if(0<=t.indexOf(n))continue;o[n]=e[n]}return o}(e,t);if(Object.getOwnPropertySymbols)for(var i=Object.getOwnPropertySymbols(e),s=0;s<i.length;s++)n=i[s],0<=t.indexOf(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}function Y(e,t){return(Y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function j(e,t){return b(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,i,s,a,r=[],c=!0,u=!1;try{if(s=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(o=s.call(n)).done)&&(r.push(o.value),r.length!==t);c=!0);}catch(e){u=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return r}}(e,t)||X(e,t)||H()}function d(e){return function(e){if(Array.isArray(e))return l(e)}(e)||B(e)||X(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function J(e){e=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0===t)return String(e);t=t.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}(e);return"symbol"==typeof e?e:e+""}function z(e){return(z="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 X(e,t){var n;if(e)return"string"==typeof e?l(e,t):"Map"===(n="Object"===(n={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}function Z(e){var n="function"==typeof Map?new Map:void 0;return function(e){if(null===e||!function(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(e){return"function"==typeof t}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return function(e,t,n){var o;return V()?Reflect.construct.apply(null,arguments):((o=[null]).push.apply(o,t),t=new(e.bind.apply(e,o)),n&&Y(t,n.prototype),t)}(e,arguments,x(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),Y(t,e)}(e)}var h={SDK_READY:"sdkStateReady",SDK_NOT_READY:"sdkStateNotReady",SDK_DESTROY:"sdkDestroy",MESSAGE_RECEIVED:"onMessageReceived",ROOM_CUSTOM_DATA_RECEIVED:"onRoomCustomDataReceived",MESSAGE_MODIFIED:"onMessageModified",MESSAGE_REVOKED:"onMessageRevoked",MESSAGE_READ_BY_PEER:"onMessageReadByPeer",MESSAGE_READ_RECEIPT_RECEIVED:"onMessageReadReceiptReceived",MESSAGE_EXTENSIONS_UPDATED:"onMessageExtensionsUpdated",MESSAGE_EXTENSIONS_DELETED:"onMessageExtensionsDeleted",MESSAGE_REACTIONS_UPDATED:"onMessageReactionsUpdated",CONVERSATION_LIST_UPDATED:"onConversationListUpdated",TOTAL_UNREAD_MESSAGE_COUNT_UPDATED:"onTotalUnreadMessageCountUpdated",CONVERSATION_GROUP_LIST_UPDATED:"onConversationGroupListUpdated",CONVERSATION_IN_GROUP_UPDATED:"onConversationInGroupUpdated",GROUP_LIST_UPDATED:"onGroupListUpdated",GROUP_ATTRIBUTES_UPDATED:"groupAttributesUpdated",GROUP_COUNTER_UPDATED:"onGroupCounterUpdated",TOPIC_CREATED:"onTopicCreated",TOPIC_DELETED:"onTopicDeleted",TOPIC_UPDATED:"onTopicUpdated",PROFILE_UPDATED:"onProfileUpdated",USER_STATUS_UPDATED:"onUserStatusUpdated",BLACKLIST_UPDATED:"blacklistUpdated",FRIEND_LIST_UPDATED:"onFriendListUpdated",FRIEND_GROUP_LIST_UPDATED:"onFriendGroupListUpdated",FRIEND_APPLICATION_LIST_UPDATED:"onFriendApplicationListUpdated",MY_FOLLOWERS_LIST_UPDATED:"onMyFollowersListUpdated",MY_FOLLOWING_LIST_UPDATED:"onMyFollowingListUpdated",MUTUAL_FOLLOWERS_LIST_UPDATED:"onMutualFollowersListUpdated",KICKED_OUT:"kickedOut",ERROR:"error",NET_STATE_CHANGE:"netStateChange",ALL_RECEIVE_MESSAGE_OPT_UPDATED:"onAllReceiveMessageOptUpdated"},R={MSG_TEXT:"TIMTextElem",MSG_IMAGE:"TIMImageElem",MSG_SOUND:"TIMSoundElem",MSG_AUDIO:"TIMSoundElem",MSG_FILE:"TIMFileElem",MSG_FACE:"TIMFaceElem",MSG_VIDEO:"TIMVideoFileElem",MSG_GEO:"TIMLocationElem",MSG_LOCATION:"TIMLocationElem",MSG_GRP_TIP:"TIMGroupTipElem",MSG_GRP_SYS_NOTICE:"TIMGroupSystemNoticeElem",MSG_CUSTOM:"TIMCustomElem",MSG_MERGER:"TIMRelayElem",MSG_PRIORITY_HIGH:"High",MSG_PRIORITY_NORMAL:"Normal",MSG_PRIORITY_LOW:"Low",MSG_PRIORITY_LOWEST:"Lowest",CONV_C2C:"C2C",CONV_GROUP:"GROUP",CONV_TOPIC:"TOPIC",CONV_SYSTEM:"@TIM#SYSTEM",CONV_AT_ME:1,CONV_AT_ALL:2,CONV_AT_ALL_AT_ME:3,CONV_MARK_TYPE_STAR:1,CONV_MARK_TYPE_UNREAD:2,CONV_MARK_TYPE_FOLD:4,CONV_MARK_TYPE_HIDE:8,GRP_PRIVATE:"Private",GRP_WORK:"Private",GRP_PUBLIC:"Public",GRP_CHATROOM:"ChatRoom",GRP_MEETING:"ChatRoom",GRP_AVCHATROOM:"AVChatRoom",GRP_COMMUNITY:"Community",GRP_ROOM:"Room",GRP_LIVE:"Live",GRP_MBR_ROLE_OWNER:"Owner",GRP_MBR_ROLE_ADMIN:"Admin",GRP_MBR_ROLE_MEMBER:"Member",GRP_MBR_ROLE_CUSTOM:"Custom",GRP_TIP_MBR_JOIN:1,GRP_TIP_MBR_QUIT:2,GRP_TIP_MBR_KICKED_OUT:3,GRP_TIP_MBR_SET_ADMIN:4,GRP_TIP_MBR_CANCELED_ADMIN:5,GRP_TIP_GRP_PROFILE_UPDATED:6,GRP_TIP_MBR_PROFILE_UPDATED:7,GRP_TIP_BAN_AVCHATROOM_MEMBER:10,GRP_TIP_UNBAN_AVCHATROOM_MEMBER:11,MSG_REMIND_ACPT_AND_NOTE:"AcceptAndNotify",MSG_REMIND_ACPT_NOT_NOTE:"AcceptNotNotify",MSG_REMIND_DISCARD:"Discard",RECEIVE_WITH_OFFLINE_PUSH_EXCEPT_AT:"AcceptNotNotifyExceptAt",NOT_RECEIVE_OFFLINE_PUSH_EXCEPT_AT:"AcceptNotNotifyExceptAt",NOT_RECEIVE_MSG_EXCEPT_AT:"NotReceiveMsgExceptAt",GENDER_UNKNOWN:"Gender_Type_Unknown",GENDER_FEMALE:"Gender_Type_Female",GENDER_MALE:"Gender_Type_Male",KICKED_OUT_MULT_ACCOUNT:"multipleAccount",KICKED_OUT_MULT_DEVICE:"multipleDevice",KICKED_OUT_USERSIG_EXPIRED:"userSigExpired",KICKED_OUT_REST_API:"REST_API_Kick",ALLOW_TYPE_ALLOW_ANY:"AllowType_Type_AllowAny",ALLOW_TYPE_NEED_CONFIRM:"AllowType_Type_NeedConfirm",ALLOW_TYPE_DENY_ANY:"AllowType_Type_DenyAny",FORBID_TYPE_NONE:"AdminForbid_Type_None",FORBID_TYPE_SEND_OUT:"AdminForbid_Type_SendOut",JOIN_OPTIONS_FREE_ACCESS:"FreeAccess",JOIN_OPTIONS_NEED_PERMISSION:"NeedPermission",JOIN_OPTIONS_DISABLE_APPLY:"DisableApply",JOIN_STATUS_SUCCESS:"JoinedSuccess",JOIN_STATUS_ALREADY_IN_GROUP:"AlreadyInGroup",JOIN_STATUS_WAIT_APPROVAL:"WaitAdminApproval",INVITE_OPTIONS_DISABLE_INVITE:"DisableInvite",INVITE_OPTIONS_NEED_PERMISSION:"NeedPermission",INVITE_OPTIONS_FREE_ACCESS:"FreeAccess",GRP_PROFILE_OWNER_ID:"ownerID",GRP_PROFILE_CREATE_TIME:"createTime",GRP_PROFILE_LAST_INFO_TIME:"lastInfoTime",GRP_PROFILE_MEMBER_NUM:"memberNum",GRP_PROFILE_MAX_MEMBER_NUM:"maxMemberNum",GRP_PROFILE_JOIN_OPTION:"joinOption",GRP_PROFILE_INVITE_OPTION:"inviteOption",GRP_PROFILE_INTRODUCTION:"introduction",GRP_PROFILE_NOTIFICATION:"notification",GRP_PROFILE_MUTE_ALL_MBRS:"muteAllMembers",SNS_ADD_TYPE_SINGLE:"Add_Type_Single",SNS_ADD_TYPE_BOTH:"Add_Type_Both",SNS_DELETE_TYPE_SINGLE:"Delete_Type_Single",SNS_DELETE_TYPE_BOTH:"Delete_Type_Both",SNS_APPLICATION_TYPE_BOTH:"Pendency_Type_Both",SNS_APPLICATION_SENT_TO_ME:"Pendency_Type_ComeIn",SNS_APPLICATION_SENT_BY_ME:"Pendency_Type_SendOut",SNS_APPLICATION_AGREE:"Response_Action_Agree",SNS_APPLICATION_AGREE_AND_ADD:"Response_Action_AgreeAndAdd",SNS_CHECK_TYPE_BOTH:"CheckResult_Type_Both",SNS_CHECK_TYPE_SINGLE:"CheckResult_Type_Single",SNS_TYPE_NO_RELATION:"CheckResult_Type_NoRelation",SNS_TYPE_A_WITH_B:"CheckResult_Type_AWithB",SNS_TYPE_B_WITH_A:"CheckResult_Type_BWithA",SNS_TYPE_BOTH_WAY:"CheckResult_Type_BothWay",NET_STATE_CONNECTED:"connected",NET_STATE_CONNECTING:"connecting",NET_STATE_DISCONNECTED:"disconnected",MSG_AT_ALL:"__kImSDK_MesssageAtALL__",READ_ALL_C2C_MSG:"readAllC2CMessage",READ_ALL_GROUP_MSG:"readAllGroupMessage",READ_ALL_MSG:"readAllMessage",USER_STATUS_UNKNOWN:0,USER_STATUS_ONLINE:1,USER_STATUS_OFFLINE:2,USER_STATUS_UNLOGINED:3,IOS_OFFLINE_PUSH_NO_SOUND:"push.no_sound",IOS_OFFLINE_PUSH_DEFAULT_SOUND:"default"},_={NEW_INVITATION_RECEIVED:"newInvitationReceived",INVITEE_ACCEPTED:"ts_invitee_accepted",INVITEE_REJECTED:"ts_invitee_rejected",INVITATION_CANCELLED:"ts_invitation_cancelled",INVITATION_TIMEOUT:"ts_invitation_timeout",INVITATION_MODIFIED:"ts_invitation_modified",ACTION_TYPE_UNKNOWN:0,ACTION_TYPE_INVITE:1,ACTION_TYPE_CANCEL_INVITE:2,ACTION_TYPE_ACCEPT_INVITE:3,ACTION_TYPE_REJECT_INVITE:4,ACTION_TYPE_INVITE_TIMEOUT:5},Q=e(function e(){p(this,e),this.cache=[],this.options=null},[{key:"use",value:function(e){if("function"!=typeof e)throw"middleware must be a function";return this.cache.push(e),this}},{key:"next",value:function(e){if(this.middlewares&&0<this.middlewares.length)return this.middlewares.shift().call(this,this.options,this.next.bind(this))}},{key:"run",value:function(e){return this.middlewares=this.cache.map(function(e){return e}),this.options=e,this.next()}}]),$=e(function e(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0;p(this,e),this.high=t,this.low=n},[{key:"equal",value:function(e){return null!==e&&this.low===e.low&&this.high===e.high}},{key:"toString",value:function(){var e=Number(this.high).toString(16),t=Number(this.low).toString(16);if(t.length<8)for(var n=8-t.length;n;)t="0"+t,n--;return e+t}}]),ee={TEST:{CHINA:{DEFAULT:"wss://wss-dev.tim.qq.com"},OVERSEA:{DEFAULT:"wss://wss-dev.tim.qq.com"},SINGAPORE:{DEFAULT:"wss://wsssgp-dev.im.qcloud.com"},KOREA:{DEFAULT:"wss://wsskr-dev.im.qcloud.com"},GERMANY:{DEFAULT:"wss://wssger-dev.im.qcloud.com"},IND:{DEFAULT:"wss://wssind-dev.im.qcloud.com"},JPN:{DEFAULT:"wss://wssjpn-dev.im.qcloud.com"},USA:{DEFAULT:"wss://wssusa-dev.im.qcloud.com"},INDONESIA:{DEFAULT:"wss://wssidn-dev.im.qcloud.com"}},PRODUCTION:{CHINA:{DEFAULT0:"wss://*w4c.my-imcloud.com",DEFAULT:"wss://wss.im.qcloud.com",IPV6:"wss://wssv6.im.qcloud.com",BACKUP:"wss://wss.tim.qq.com",BACKUP_WEB:"wss://*w4c.my-cpaas.com",STAT:"https://events.im.qcloud.com",ANYCAST:"wss://162.14.13.203"},OVERSEA:{DEFAULT0:"wss://*w4c.my-imcloud.com",DEFAULT:"wss://wss.im.qcloud.com",IPV6:"wss://wssv6.im.qcloud.com",BACKUP:"wss://wss.my-imcloud.com",BACKUP_WEB:"wss://*w4c.my-cpaas.com",STAT:"https://api.my-imcloud.com"},SINGAPORE:{DEFAULT0:"wss://*w4s.my-imcloud.com",DEFAULT:"wss://wsssgp.im.qcloud.com",IPV6:"wss://wsssgpv6.im.qcloud.com",BACKUP:"wss://wsssgp.my-imcloud.com",BACKUP_WEB:"wss://*w4s.my-cpaas.com",STAT:"https://apisgp.my-imcloud.com",ANYCAST:"wss://162.14.19.159"},KOREA:{DEFAULT0:"wss://*w4k.my-imcloud.com",DEFAULT:"wss://wsskr.im.qcloud.com",IPV6:"wss://wsskrv6.im.qcloud.com",BACKUP:"wss://wsskr.my-imcloud.com",BACKUP_WEB:"wss://*w4k.my-cpaas.com",STAT:"https://apikr.my-imcloud.com",ANYCAST:"wss://162.14.13.104"},GERMANY:{DEFAULT0:"wss://*w4g.my-imcloud.com",DEFAULT:"wss://wssger.im.qcloud.com",IPV6:"wss://wssgerv6.im.qcloud.com",BACKUP:"wss://wssger.my-imcloud.com",BACKUP_WEB:"wss://*w4g.my-cpaas.com",STAT:"https://apiger.my-imcloud.com",ANYCAST:"wss://162.14.3.17"},IND:{DEFAULT0:"wss://*w4i.my-imcloud.com",DEFAULT:"wss://wssind.my-imcloud.com",IPV6:"wss://wssindv6.im.qcloud.com",BACKUP:"wss://wssind.im.qcloud.com",BACKUP_WEB:"wss://*w4i.my-cpaas.com",STAT:"https://apiind.my-imcloud.com",ANYCAST:"wss://162.14.19.46"},JPN:{DEFAULT0:"wss://*w4j.my-imcloud.com",DEFAULT:"wss://wssjpn.im.qcloud.com",IPV6:"wss://wssjpnv6.im.qcloud.com",BACKUP:"wss://wssjpn.my-imcloud.com",BACKUP_WEB:"wss://*w4j.my-cpaas.com",STAT:"https://apijpn.my-imcloud.com"},USA:{DEFAULT0:"wss://*w4u.my-imcloud.com",DEFAULT:"wss://wssusa.im.qcloud.com",IPV6:"wss://wssusav6.im.qcloud.com",BACKUP:"wss://wssusa.my-imcloud.com",BACKUP_WEB:"wss://*w4u.my-cpaas.com",STAT:"https://apiusa.my-imcloud.com",ANYCAST:"wss://162.14.10.42"},INDONESIA:{DEFAULT0:"wss://*w4y.my-imcloud.com",DEFAULT:"wss://wssidn.im.qcloud.com",IPV6:"wss://wssidnv6.im.qcloud.com",BACKUP:"wss://wssidn.my-imcloud.com",BACKUP_WEB:"wss://*w4y.my-cpaas.com",STAT:"https://apiidn.my-imcloud.com",ANYCAST:"wss://43.129.34.169"}}},te={ANDROID:2,IOS:3,MAC:4,WEB:7,WX_MP:8,QQ_MP:9,TT_MP:10,BAIDU_MP:11,ALI_MP:12,IPAD:13,UNI_NATIVE_APP:15,DONUT_NATIVE_APP:19,NS_NATIVE_APP:20,RN_NATIVE_APP:21},ne="1.7.3",oe=537048168,se="CHINA",s={HOST:{CURRENT:{DEFAULT:"wss://wss.im.qcloud.com",STAT:"https://events.im.qcloud.com"},setCurrent:function(){this.CURRENT=ee.PRODUCTION[0<arguments.length&&void 0!==arguments[0]?arguments[0]:se]}},NAME:{OPEN_IM:"openim",OPEN_IM_MSG_EXT:"openim_msg_ext_http_svc",GRP:"group_open_http_svc",GRP_AV:"group_open_avchatroom_http_svc",GRP_COMMUNITY:"million_group_open_http_svc",GRP_ATTR:"group_open_attr_http_svc",FD:"sns",PROFILE:"profile",RECENT_CONTACT:"recentcontact",PIC:"openpic",BIG_GRP_NO_AUTH:"group_open_http_noauth_svc",BIG_GRP_POLLING:"group_open_long_polling_http_svc",BIG_GRP_POLLING_NO_AUTH:"group_open_long_polling_http_noauth_svc",IM_OPEN_STAT:"imopenstat",WEB_IM:"webim",IM_COS_SIGN:"im_cos_sign_svr",CUSTOM_UPLOAD:"im_cos_msg",HEARTBEAT:"heartbeat",IM_OPEN_PUSH:"im_open_push",IM_OPEN_STATUS:"im_open_status",IM_LONG_MSG:"im_long_msg",IM_CONFIG_MANAGER:"im_sdk_config_mgr",STAT_SERVICE:"StatSvc",OVERLOAD_PUSH:"OverLoadPush",IM_MSG_AUDIT_MGR:"im_msg_audit_mgr",TUIROOM_SVR:"tui_room_svr",IM_OPEN_TRANSLATE:"im_open_translate",IM_OPEN_SPEECH:"im_open_speech",MSG_SEARCH:"message_search",GRP_SEARCH:"group_search",GRP_MEMBER_SEARCH:"group_member_search",USER_SEARCH:"user_search",FOLLOW:"follow",OFFLINE_PUSH_REPORT:"offline_push_report",IM_MSG_LOGIC:"im_msg_db_logic"}},g={SEARCH_GRP_SNS:new $(0,Math.pow(2,1)).toString(),AV_HISTORY_MSG:new $(0,Math.pow(2,2)).toString(),GRP_COMMUNITY:new $(0,Math.pow(2,3)).toString(),MSG_TO_SPECIFIED_GRP_MBR:new $(0,Math.pow(2,4)).toString(),AV_MBR_LIST:new $(0,Math.pow(2,6)).toString(),USER_STATUS:new $(0,Math.pow(2,7)).toString(),CONV_MARK:new $(0,Math.pow(2,9)).toString(),CONV_GROUP:new $(0,Math.pow(2,10)).toString(),AV_BAN_MBR:new $(0,Math.pow(2,11)).toString(),MSG_EXT:new $(0,Math.pow(2,13)).toString(),GRP_COUNTER:new $(0,Math.pow(2,15)).toString(),PLUGIN_TRANSLATE:new $(Math.pow(2,6)).toString(),PLUGIN_VOICE_TO_TEXT:new $(Math.pow(2,7)).toString(),PLUGIN_CS:new $(Math.pow(2,8)).toString(),PLUGIN_PUSH:new $(Math.pow(2,9)).toString(),PLUGIN_BOT:new $(Math.pow(2,10)).toString(),MSG_REACTION:new $(Math.pow(2,16)).toString(),FOLLOW:new $(Math.pow(2,20)).toString()},ae="group_profile",re=["Type","Name","Introduction","Notification","FaceUrl","Owner_Account","CreateTime","InfoSeq","LastInfoTime","LastMsgTime","MemberNum","MaxMemberNum","ApplyJoinOption","NextMsgSeq","ShutUpAllMember","InviteJoinOption"],ce=["Role","JoinTime","MsgSeq","MsgFlag"];s.HOST.setCurrent(se);for(var ue,le="undefined"!=typeof wx&&"function"==typeof wx.getSystemInfoSync&&Boolean(wx.getSystemInfoSync().fontSizeSetting),de=le&&"function"==typeof wx.createGamePortal,pe="undefined"!=typeof qq&&"function"==typeof qq.getSystemInfoSync&&Boolean(qq.getSystemInfoSync().fontSizeSetting),_e="undefined"!=typeof tt&&"function"==typeof tt.getSystemInfoSync&&Boolean(tt.getSystemInfoSync().fontSizeSetting),he="undefined"!=typeof swan&&"function"==typeof swan.getSystemInfoSync&&Boolean(swan.getSystemInfoSync().fontSizeSetting),ge="undefined"!=typeof my&&"function"==typeof my.getSystemInfoSync&&Boolean(my.getSystemInfoSync().fontSizeSetting),n="undefined"!=typeof jd&&"function"==typeof jd.getSystemInfoSync,fe="undefined"!=typeof uni&&"undefined"==typeof window&&"function"==typeof uni.requireNativePlugin,o=le&&"object"===z(wx.miniapp),me="undefined"!=typeof uni,v=le||pe||_e||he||ge||fe||n,a="undefined"==typeof window&&!v&&"undefined"!=typeof global&&void 0!==global.NativeScriptGlobals,ve="undefined"!=typeof global&&(void 0!==global.nativeModuleProxy||void 0!==global.ReactNative),Ie="undefined"!=typeof uni?!v:"undefined"!=typeof window&&!v&&!ve,I=pe?qq:_e?tt:he?swan:ge?my:le?wx:fe?uni:n?jd:{},Me=Ie&&window&&window.navigator&&window.navigator.userAgent||"",ye=(n="WEB",/(micromessenger|webbrowser)/i.test(Me)?n="WEB":pe?n="QQ_MP":_e?n="TT_MP":he?n="BAIDU_MP":ge?n="ALI_MP":le?n=o?"DONUT_NATIVE_APP":"WX_MP":fe?n="UNI_NATIVE_APP":a?n="NS_NATIVE_APP":ve&&(n="RN_NATIVE_APP"),te[n]),o=/iPad/i.test(Me),a=/iPhone/i.test(Me)&&!o,n=/iPod/i.test(Me),Ce=a||o||n,Te=(a=Me.match(/OS (\d+)_/i))&&a[1]?a[1]:null,De=/Android/i.test(Me),Ee=(o=Me.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i))?(n=o[1]&&parseFloat(o[1]),a=o[2]&&parseFloat(o[2]),n&&a?parseFloat(o[1]+"."+o[2]):n||null):null,a=/Edge/i.test(Me),o=!a&&/Chrome/i.test(Me),Le=/MSIE/.test(Me)||-1<Me.indexOf("Trident")&&-1<Me.indexOf("rv:11.0"),Se=n=!(n=(n=/MSIE\s(\d+)\.\d/.exec(Me))&&parseFloat(n[1]))&&/Trident\/7.0/i.test(Me)&&/rv:11.0/.test(Me)?11:n,n=/Safari/i.test(Me)&&!o&&!De&&!a,ke=/Windows/i.test(Me),Re=/MAC OS X/i.test(Me),Ae=Ie&&"undefined"!=typeof Worker&&!Le,Oe=De||Ce,Ne=Ie&&void 0!==window.tencent_cloud_im_csig_flutter_for_web_25F_cy,Ge="undefined"!=typeof window&&void 0!==window.navigator&&(o=window.navigator.standalone,!(!Ce||o||n)),Pe="undefined"!=typeof console?console:"undefined"!=typeof global&&global.console?global.console:"undefined"!=typeof window&&window.console?window.console:{},Ue=function(){},be=["assert","clear","count","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","profile","profileEnd","table","time","timeEnd","timeStamp","trace","warn"],we=be.length;we--;)ue=be[we],console[ue]||(Pe[ue]=Ue);function Fe(){var e=new Date;return e.setTime(He()),e}function qe(){Be=0}function xe(){return Math.floor(He()/1e3)}var Ve=Pe,Be=0,He=function(){return(new Date).getTime()+Be},Ke=0;function We(){return Zt()?"%c Chat %c":"Chat"}function Ye(){var e=Fe();return e.toLocaleTimeString("en-US",{hour12:!1})+"."+function(e){var t;switch(e.toString().length){case 1:t="00"+e;break;case 2:t="0"+e;break;default:t=e}return t}(e.getMilliseconds())}var M={arguments2String:function(e){var t="";if(1===e.length)t=e[0];else for(var n=0,o=e.length;n<o;n++){if(Mt(e[n]))try{t+=yt(e[n])?JSON.stringify(e[n],["message","code"]):JSON.stringify(e[n])}catch(e){t+=e?e.message:"";break}else t+=e[n];t+=" "}return t},_exec:function(e,t){Zt()?Ve[e](We(),"background:#0abf5b; padding:1px; border-radius:3px; color: #fff","background:transparent",Ye(),t):Ve[e]("".concat(We()," ").concat(Ye()," ").concat(t))},d:function(){var e;Ke<=-1&&(e=this.arguments2String(arguments),this._exec("debug",e))},l:function(){var e;Ke<=0&&(e=this.arguments2String(arguments),this._exec("log",e))},log:function(){var e;Ke<=0&&(e=this.arguments2String(arguments),this._exec("log",e))},i:function(){var e;Ke<=1&&(e=this.arguments2String(arguments),this._exec("info",e))},w:function(){var e;Ke<=2&&(e=this.arguments2String(arguments),this._exec("warn",e))},e:function(){var e;Ke<=3&&(e=this.arguments2String(arguments),this._exec("error",e))},setLevel:function(e){e<4&&this._exec("log","set level from "+Ke+" to "+e),Ke=e},getLevel:function(){return Ke}},je={JPG:1,JPEG:1,GIF:2,PNG:3,BMP:4,UNKNOWN:255},a="Tag_Profile_IM_",f={NICK:"".concat(a,"Nick"),GENDER:"".concat(a,"Gender"),BIRTHDAY:"".concat(a,"BirthDay"),LOCATION:"".concat(a,"Location"),SELFSIGNATURE:"".concat(a,"SelfSignature"),ALLOWTYPE:"".concat(a,"AllowType"),LANGUAGE:"".concat(a,"Language"),AVATAR:"".concat(a,"Image"),MESSAGESETTINGS:"".concat(a,"MsgSettings"),ADMINFORBIDTYPE:"".concat(a,"AdminForbidType"),LEVEL:"".concat(a,"Level"),ROLE:"".concat(a,"Role")},Je={GROUP:"".concat("Tag_SNS_IM_","Group"),REMARK:"".concat("Tag_SNS_IM_","Remark"),ADDSOURCE:"".concat("Tag_SNS_IM_","AddSource"),ADDWORDING:"".concat("Tag_SNS_IM_","Wording"),ADDTIME:"".concat("Tag_SNS_IM_","AddTime")},o="Gender_Type_",ze={UNKNOWN:"".concat(o,"Unknown"),FEMALE:"".concat(o,"Female"),MALE:"".concat(o,"Male")},Xe={NONE:"".concat("AdminForbid_Type_","None"),SEND_OUT:"".concat("AdminForbid_Type_","SendOut")},Ze={NEED_CONFIRM:"".concat("AllowType_Type_","NeedConfirm"),ALLOW_ANY:"".concat("AllowType_Type_","AllowAny"),DENY_ANY:"".concat("AllowType_Type_","DenyAny")},Qe="JoinedSuccess",$e="WaitAdminApproval",et="@TOPIC#_",nt=Object.prototype.hasOwnProperty;function S(e){if(null==e)return!0;if("boolean"==typeof e)return!1;if("number"==typeof e)return 0===e;if("string"==typeof e)return 0===e.length;if("function"==typeof e)return 0===e.length;if(Array.isArray(e))return 0===e.length;if(e instanceof Error)return""===e.message;if(m(e)){for(var t in e)if(nt.call(e,t))return!1;return!0}return!!(ot(e)||it(e)||st(e))&&0===e.size}function ot(e){return"map"===Ct(e)}function it(e){return"set"===Ct(e)}function st(e){return"file"===Ct(e)}function A(e){return null!==e&&("number"==typeof e&&!isNaN(+e)||"object"===z(e)&&e.constructor===Number)}function at(e){return null!==e&&"object"===z(e)}function m(e){if("object"===z(e)&&null!==e){if(null===(e=Object.getPrototypeOf(e)))return 1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return e===t}}function O(e){return"function"==typeof Array.isArray?Array.isArray(e):"array"===Ct(e)}function rt(e){return O(e)&&0<e.length}function ct(e){return"function"==typeof e}function ut(e){return"filelist"===Ct(e)}function lt(e){return"string"==typeof e&&(e=e[0],!/[^a-zA-Z0-9]/.test(e))}function dt(e,t,n,o){if(!Mt(e)||!Mt(t))return 0;for(var i,s=0,a=Object.keys(t),r=0,c=a.length;r<c;r++)if(i=a[r],!(N(t[i])||n&&n.includes(i)))if(Mt(e[i])&&Mt(t[i]))s+=dt(e[i],t[i],n,o);else{if(o&&o.includes(t[i]))continue;e[i]!==t[i]&&(e[i]=t[i],s+=1)}return s}function pt(e,t){var n,o=new Map,i=F(e.entries());try{for(i.s();!(n=i.n()).done;){var s=j(n.value,2),a=s[0],r=s[1];r&&o.set(a,t?JSON.stringify(r):JSON.parse(JSON.stringify(r)))}}catch(e){i.e(e)}finally{i.f()}return o}function _t(e){if(0===e.length)return 0;for(var t=0,n=0,o="undefined"!=typeof document&&void 0!==document.characterSet?document.characterSet:"UTF-8";void 0!==e[t];)n+=e[t++].charCodeAt[t]<=255?1:!1===o?3:2;return n}function ht(e){return e=e||99999999,Math.round(Math.random()*e)}function gt(){for(var e="",t=32;0<t;--t)e+=Tt[Math.floor(Math.random()*Dt)];return e}function ft(e,t){for(var n in e)if(e[n]===t)return 1}function mt(e){return-1===e.indexOf("http://")||-1===e.indexOf("https://")?"https://"+e:e.replace(/https|http/,"https")}function vt(e){if(0===Object.getOwnPropertyNames(e).length)return Object.create(null);var t,n,o=Array.isArray(e)?[]:Object.create(null);for(n in e)null!==e[n]?void 0!==e[n]?(t=z(e[n]),0<=["string","number","function","boolean"].indexOf(t)?o[n]=e[n]:o[n]=vt(e[n])):o[n]=void 0:o[n]=null;return o}var It=["url"],C=function(e){return"string"==typeof e},N=function(e){return void 0===e},Mt=function(e){return O(e)||at(e)},yt=function(e){return e instanceof Error},Ct=function(e){return Object.prototype.toString.call(e).match(/^\[object (.*)\]$/)[1].toLowerCase()},Tt=(Date.now||(Date.now=function(){return(new Date).getTime()}),"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"),Dt=Tt.length,Et={};function Lt(o,e){var i;return!(!O(o)||!O(e))&&(i=!1,e.forEach(function(e){var t=e.key,e=e.value,n=o.find(function(e){return e.key===t});n?n.value!==e&&(n.value=e,i=!0):(o.push({key:t,value:e}),i=!0)}),i)}function St(e){return S(e)?[]:e.filter(function(e){return!0===e.isModified})}function kt(e){if(m(e)&&m(e.webhookInfo)){var t=[];if(e.webhookInfo.disableCloudMessagePreHook&&t.push("ForbidBeforeSendMsgCallback"),e.webhookInfo.disableCloudMessagePostHook&&t.push("ForbidAfterSendMsgCallback"),0!==t.length)return t}}function Rt(e){return S(e)?[]:e.filter(function(e){return!1===e.isModified})}function At(e){return e===R.GRP_AVCHATROOM}function Ot(e){var t=e.type,e=e.groupID;return t===R.GRP_COMMUNITY||"".concat(e).startsWith("@TGS#_")&&!"".concat(e).includes(et)}function Nt(e){return"".concat(e).startsWith("@TGS#_")&&"".concat(e).includes(et)}function Gt(e){return C(e)&&e.slice(0,3)===R.CONV_C2C}function Pt(e){return C(e)&&e.slice(0,5)===R.CONV_GROUP}function Ut(e){return C(e)&&e===R.CONV_SYSTEM}function bt(t,n){var o={};return Object.keys(t).forEach(function(e){o[e]=n(t[e],e)}),o}function wt(o){return ve?Promise.resolve({width:0,height:0}):v?new Promise(function(t,e){I.getImageInfo({src:o,success:function(e){t({width:e.width,height:e.height})},fail:function(){t({width:0,height:0})}})}):Le&&9===Se?Promise.resolve({width:0,height:0}):new Promise(function(e,t){var n=new Image;n.onload=function(){e({width:this.width,height:this.height}),n=null},n.onerror=function(){e({width:0,height:0}),n=null},n.src=o})}function Ft(){function e(){return(65536*(1+Math.random())|0).toString(16).substring(1)}return"".concat(e()+e()).concat(e()).concat(e()).concat(e()).concat(e()).concat(e()).concat(e())}function qt(){var e=De?"android":Ce?"ios":ke?"windows":Re?"mac":"unknown";if(v)try{var t=I.getSystemInfoSync().platform;void 0!==t&&(e=t)}catch(e){}return e}function xt(e,t){e=e.split("."),t=t.split(".");for(var n=Math.max(e.length,t.length);e.length<n;)e.push("0");for(;t.length<n;)t.push("0");for(var o=0;o<n;o++){var i=parseInt(e[o]),s=parseInt(t[o]);if(s<i)return 1;if(i<s)return-1}return 0}function Vt(e){var t=e.originUrl,t=void 0===t?void 0:t,n=e.originWidth,o=e.originHeight,e=e.min,e=void 0===e?198:e,n=parseInt(n),o=parseInt(o),i={url:void 0,width:0,height:0};return(n<=o?n:o)<=e?(i.url=t,i.width=n,i.height=o):(o<=n?(i.width=Math.ceil(n*e/o),i.height=e):(i.width=e,i.height=Math.ceil(o*e/n)),o=t&&-1<t.indexOf("?")?"".concat(t,"&"):"".concat(t,"?"),i.url="".concat(o,198===e?"imageView2/3/w/198/h/198":"imageView2/3/w/720/h/720")),N(t)?W(i,It):i}function Bt(e){var t=e[2];e[2]=e[1],e[1]=t;for(var n=0;n<e.length;n++)e[n].setType(n)}function Ht(e){e=e.servcmd;return e.slice(e.indexOf(".")+1)}function Kt(e,t){return Math.round(Number(e)*Math.pow(10,t))/Math.pow(10,t)}function Wt(e,t){return e.includes(t)}function Yt(e,t){return e.includes(t)}function jt(e){return e.split(et)[0]}function Jt(e,t,n){if(N(t))return"";switch(e){case R.MSG_TEXT:return t.text;case R.MSG_IMAGE:return n?"[Image]":"[图片]";case R.MSG_LOCATION:return n?"[Location]":"[位置]";case R.MSG_AUDIO:return n?"[Voice]":"[语音]";case R.MSG_VIDEO:return n?"[Video]":"[视频]";case R.MSG_FILE:return n?"[File]":"[文件]";case R.MSG_CUSTOM:return n?"[Custom Messages]":"[自定义消息]";case R.MSG_GRP_TIP:return n?"[Group Notification]":"[群提示消息]";case R.MSG_GRP_SYS_NOTICE:return n?"[Group System Message]":"[群系统通知]";case R.MSG_FACE:return n?"[Animated Sticker]":"[动画表情]";case R.MSG_MERGER:return n?"[Chat Record]":"[聊天记录]";default:return""}}function zt(e){return e===R.MSG_TEXT||e===R.MSG_CUSTOM||e===R.MSG_LOCATION||e===R.MSG_FACE}function Xt(e){var t=[];if(C(e)){var n=e.length;if(0!==n)for(var o=n-1;0<=o;o--)"1"===e[o]&&t.push(Math.pow(2,n-o-1))}return t}function Zt(){return!Le&&!v}function Qt(e){return"the length of userIDList cannot exceed ".concat(e)}function $t(e){var t;if(O(e)&&0!==e.length)return t=0,e.forEach(function(e){t+=e}),t.toFixed(0)}function en(e){var t;if(O(e)&&0!==e.length)return t=0,e.forEach(function(e){t+=e}),(t/e.length).toFixed(0)}function tn(e,t,n){var t=!(1<arguments.length&&void 0!==t)||t,n=!(2<arguments.length&&void 0!==n)||n,o=Date.now();return t?n?"".concat(o-e," ms"):"".concat(Math.round((o-e)/1e3)," s"):n?o-e:Math.round((o-e)/1e3)}function nn(e){return e&&1<e?!0:!1}function on(e,t,n,o){var i,s,a;return void 0===t||(i=!0,t.required&&S(e)&&(M.e("[".concat(n,'] Missing required params: "').concat(o,'".')),i=!1),S(e)||(s=Ct(e))===(a=t.type.toLowerCase())||"asyncfunction"===s&&"function"===a||(M.e("[".concat(n,'] Invalid params: type check failed for "').concat(o,'". Expected ').concat(t.type,".")),i=!1),t.validator&&!t.validator(e,n,o)&&(M.e("[".concat(n,'] Invalid params: custom validator check failed for "').concat(o,'".')),i=!1),i)}function sn(e){return!(!e||!(Gt(e)||Pt(e)||Ut(e))&&((e=u("InvalidConversationID",e))&&M.w(e),1))}function r(e){""!==e.desc&&""!==u("API_REFER")&&M.w("[".concat(e.api,"] | ").concat(e.paramName," | ").concat(e.desc,", ").concat(u("API_REFER")).concat(e.api))}function an(){return u("StringRequiredLog")}function rn(e){return u("NonEmptyStringRequiredLog",e)}function cn(){return u("NumberRequiredLog")}function un(){return u("UndefinedNotAllowedLog")}function ln(){return u("FileRequiredLog")}function dn(){return u("FunctionRequiredLog")}function pn(){return u("ArrayRequiredLog")}function _n(){return u("NonEmptyArrayLog")}function hn(){return u("CallbackMissingLog")}function gn(){return u("PositiveIntegerRequiredLog")}function fn(e,t){return u("StringNotLongerThanLog",e,t)}function mn(e,t){return u("NumberGreaterThanLog",e,t)}function vn(e,t){return u("NumberGreaterOrEqualLog",e,t)}function In(e){return u("KeyValueStringRequiredLog",e)}function Mn(){return u("PlainObjectRequiredLog")}function yn(){return u("NonEmptyContentRequiredLog")}function Cn(){return u("FileNotSelectedLog")}function Tn(){return u("MessageInstanceRequiredLog")}function Dn(){return u("NonAnonymousFunctionLog")}function En(){return u("MessageExtensionNotAvailableLog")}function Ln(){return u("MessageReactionRequiredLog")}function Sn(e,t){return u("ContainsUnsupportedTypeLog",e,t)}function kn(e,t,n,o){var i=o.allowUndefined,s=o.allowEmpty,o=o.maxLength;return N(e)?!!i||(r({api:t,paramName:n,desc:un()}),!1):O(e)?!(0===e.length&&(r({api:t,paramName:n,desc:_n()}),!s)||o&&e.length>o&&(r({api:t,paramName:n,desc:u("MaximumArrayLengthLog",n,o)}),1)):(r({api:t,paramName:n,desc:pn()}),!1)}function Rn(e,t,n,o){var i=o.allowUndefined,s=o.min,o=o.max;return N(e)?!!i||(r({api:t,paramName:n,desc:un()}),!1):A(e)?A(s)&&e<s?(r({api:t,paramName:n,desc:0===s?vn(n,s):mn(n,s-1)}),!1):!(A(o)&&o<e&&(r({api:t,paramName:n,desc:u("MaximumNumberLog",n,o)}),1)):(r({api:t,paramName:n,desc:cn()}),!1)}function T(e){return{code:0,data:e||{}}}function D(e){return Promise.resolve(T(e))}function E(e){var t,n=1<arguments.length&&void 0!==arguments[1]&&arguments[1];return e instanceof L?(n&&null!==Vn&&Vn.emit(h.ERROR,e),Promise.reject(e)):e instanceof Error?(t=new L({code:k.UNCAUGHT_ERROR}),n&&null!==Vn&&Vn.emit(h.ERROR,t),Promise.reject(t)):N(e)||N(e.code)?Promise.reject(new L({code:k.UNCAUGHT_ERROR})):(t=new L(e),n&&null!==Vn&&Vn.emit(h.ERROR,t),Promise.reject(t))}var An="unSend",On="success",Nn="fail",Gn="notStart",Pn="pending",Un="resolved",bn="rejected",n={type:"String",required:!0},a={type:"Array",required:!0},o={type:"Object",required:!0},wn={type:"Boolean",required:!0},c={type:"number",required:!0},Fn={keywordListForMsg:{type:"Array",required:!1,validator:function(e,t,n){return kn(e,t,n,{allowUndefined:!0,allowEmpty:!0,maxLength:5})}},keywordListExceptMsg:{type:"Array",required:!0,validator:function(e,t,n){return kn(e,t,n,{allowUndefined:!1,allowEmpty:!1,maxLength:5})}},keywordListMatchType:{type:"String",required:!1,validator:function(e,t,n){return!e||"or"===e||"and"===e||r({api:t,paramName:n,desc:"".concat(e," is invalid match type")})}},cursor:{type:"String",required:!1},count:{type:"Number",required:!1,validator:function(e,t,n){return Rn(e,t,n,{allowUndefined:!0,min:1,max:100})}},groupTypeList:{type:"Array",required:!1,validator:function(e,t,n){var o;return!e||!(!kn(e,t,n,{allowUndefined:!0,allowEmpty:!0})||(o=[R.GRP_PUBLIC,R.GRP_COMMUNITY,R.GRP_WORK,R.GRP_MEETING],0<e.filter(function(e){return-1===o.indexOf(e)}).length&&(r({api:t,paramName:n,desc:Sn(n,"group")}),1)))}}},u=null,qn={hookGetAPITips:function(e){u=e},login:{userID:n,userSig:n},addToBlacklist:{userIDList:a},removeFromBlacklist:{userIDList:a},on:[{name:"eventName",type:"String",validator:function(e,t,n){return"string"==typeof e&&0!==e.length||(r({api:t,paramName:n,desc:rn(n)}),!1)}},{name:"handler",type:"Function",validator:function(e,t,n){return"function"!=typeof e?(r({api:t,paramName:n,desc:dn()}),!1):(""===e.name&&r({api:t,paramName:n,desc:Dn()}),!0)}}],once:[{name:"eventName",type:"String",validator:function(e,t,n){return"string"==typeof e&&0!==e.length||(r({api:t,paramName:n,desc:rn(n)}),!1)}},{name:"handler",type:"Function",validator:function(e,t,n){return"function"!=typeof e?(r({api:t,paramName:n,desc:dn()}),!1):(""===e.name&&r({api:t,paramName:n,desc:Dn()}),!0)}}],off:[{name:"eventName",type:"String",validator:function(e,t,n){return"string"==typeof e&&0!==e.length||(r({api:t,paramName:n,desc:rn(n)}),!1)}},{name:"handler",type:"Function",validator:function(e,t,n){return"function"!=typeof e?(r({api:t,paramName:n,desc:dn()}),!1):(""===e.name&&r({api:t,paramName:n,desc:Dn()}),!0)}}],sendMessage:[y({name:"message"},o)],setMessageExtensions:[y(y({name:"message"},o),{},{validator:function(e,t,n){return e.status===On&&!0===e.isSupportExtension||(r({api:t,paramName:n,desc:En()}),!1)}}),y({name:"extensions"},a)],getMessageExtensions:[y(y({name:"message"},o),{},{validator:function(e,t,n){return e.status===On&&!0===e.isSupportExtension||(r({api:t,paramName:n,desc:En()}),!1)}})],deleteMessageExtensions:[y(y({name:"message"},o),{},{validator:function(e,t,n){return e.status===On&&!0===e.isSupportExtension||(r({api:t,paramName:n,desc:En()}),!1)}})],addMessageReaction:[y(y({name:"message"},o),{},{validator:function(e,t,n){return e.status===On||(r({api:t,paramName:n,desc:Ln()}),!1)}}),y({name:"reactionID"},n)],removeMessageReaction:[y(y({name:"message"},o),{},{validator:function(e,t,n){return e.status===On||(r({api:t,paramName:n,desc:Ln()}),!1)}}),y({name:"reactionID"},n)],getMessageReactions:{messageList:y({},a)},getAllUserListOfMessageReaction:{message:y(y({},o),{},{validator:function(e,t,n){return e.status===On||(r({api:t,paramName:n,desc:Ln()}),!1)}}),reactionID:y({},n),nextSeq:{type:"Number"},count:{type:"Number"}},getMessageList:{conversationID:y(y({},n),{},{validator:sn}),nextReqMessageID:{type:"String"},count:{type:"Number",validator:function(e,t,n){return!(!N(e)&&!/^[1-9][0-9]*$/.test(e)&&(r({api:t,paramName:n,desc:gn()}),1))}}},getMessageListHopping:{conversationID:y(y({},n),{},{validator:sn}),sequence:{type:"Number"},time:{type:"Number"},direction:{type:"Number",validator:function(e,t,n){return!(!N(e)&&0!==e&&1!==e&&(r({api:t,paramName:n,desc:u("0Or1RequiredLog")}),1))}},count:{type:"Number",validator:function(e,t,n){return!(!N(e)&&!/^[1-9][0-9]*$/.test(e)&&(r({api:t,paramName:n,desc:gn}),1))}}},setMessageRead:{conversationID:y(y({},n),{},{validator:sn})},setAllMessageRead:{scope:{type:"String",required:!1,validator:function(e,t,n){return!e||-1!==[R.READ_ALL_C2C_MSG,R.READ_ALL_GROUP_MSG,R.READ_ALL_MSG].indexOf(e)||(r({api:t,paramName:n,desc:u("ValidScopeRequired")}),!1)}}},getConversationProfile:[y(y({name:"conversationID"},n),{},{validator:sn})],clearHistoryMessage:[y(y({name:"conversationID"},n),{},{validator:sn})],pinConversation:{conversationID:y(y({},n),{},{validator:sn}),isPinned:y({},wn)},setConversationDraft:{conversationID:y(y({},n),{},{validator:sn}),draftText:{type:"String",validator:function(e,t,n){return!!C(e)||(r({api:t,paramName:n,desc:an()}),!1)}}},setConversationCustomData:{conversationIDList:y({},a),customData:{type:"String",validator:function(e,t,n){return C(e)?!(256<e.length&&(r({api:t,paramName:n,desc:fn(n,256)}),1)):(r({api:t,paramName:n,desc:an()}),!1)}}},markConversation:{conversationIDList:y({},a),markType:{type:"number",validator:function(e,t,n){return A(e)?e<=0?(r({api:t,paramName:n,desc:mn(n,0)}),!1):!(e>=Math.pow(2,64)&&(r({api:t,paramName:n,desc:u("NumberLessThanLog",n,"Math.pow(2,64)")}),1)):(r({api:t,paramName:n,desc:cn()}),!1)}},enableMark:y({},wn)},createConversationGroup:{conversationIDList:y({},a),groupName:y(y({},n),{},{validator:function(e,t,n){return!(!e||32<e.length&&(r({api:t,paramName:n,desc:fn(n,32)}),1))}})},deleteConversationGroup:[y({name:"groupName"},n)],renameConversationGroup:{oldName:y({},n),newName:y(y({},n),{},{validator:function(e,t,n){return!(!e||32<e.length&&(r({api:t,paramName:n,desc:fn(n,32)}),1))}})},addConversationsToGroup:{conversationIDList:y({},a),groupName:y({},n)},deleteConversationsFromGroup:{conversationIDList:y({},a),groupName:y({},n)},getGroupList:{groupProfileFilter:{type:"Array"}},getGroupProfile:{groupID:n,groupCustomFieldFilter:{type:"Array"},memberCustomFieldFilter:{type:"Array"}},getGroupProfileAdvance:{groupIDList:a},createGroup:{name:n},joinGroup:{groupID:n,type:{type:"String"},applyMessage:{type:"String"}},quitGroup:[y({name:"groupID"},n)],handleApplication:{message:o,handleAction:n,handleMessage:{type:"String"}},changeGroupOwner:{groupID:n,newOwnerID:n},updateGroupProfile:{groupID:n,muteAllMembers:{type:"Boolean"}},dismissGroup:[y({name:"groupID"},n)],searchGroupByID:[y({name:"groupID"},n)],getGroupOnlineMemberCount:[y({name:"groupID"},n)],initGroupAttributes:{groupID:n,groupAttributes:y(y({},o),{},{validator:function(t,n,o){var i=!0;return Object.keys(t).forEach(function(e){if(!C(t[e]))return r({api:n,paramName:o,desc:In("value")}),i=!1}),i}})},setGroupAttributes:{groupID:n,groupAttributes:y(y({},o),{},{validator:function(t,n,o){var i=!0;return Object.keys(t).forEach(function(e){if(!C(t[e]))return r({api:n,paramName:o,desc:In("value")}),i=!1}),i}})},deleteGroupAttributes:{groupID:n,keyList:{type:"Array",validator:function(e,t,n){var o;return N(e)||!O(e)?(r({api:t,paramName:n,desc:pn()}),!1):!!S(e)||(o=!0,e.forEach(function(e){if(!C(e))return r({api:t,paramName:n,desc:u("StringArrayRequiredLog")}),o=!1}),o)}}},getGroupAttributes:{groupID:n,keyList:{type:"Array",validator:function(e,t,n){var o;return N(e)||!O(e)?(r({api:t,paramName:n,desc:pn()}),!1):!!S(e)||(o=!0,e.forEach(function(e){if(!C(e))return r({api:t,paramName:n,desc:In("key")}),o=!1}),o)}}},setGroupCounters:{groupID:n,counters:o},increaseGroupCounter:{groupID:n,key:n,value:c},decreaseGroupCounter:{groupID:n,key:n,value:c},getGroupCounters:{groupID:n},getGroupMemberList:{groupID:n,count:{type:"Number"}},getGroupMemberProfile:{groupID:n,userIDList:a,memberCustomFieldFilter:{type:"Array"}},addGroupMember:{groupID:n,userIDList:a},setGroupMemberRole:{groupID:n,userID:n,role:n},setGroupMemberMuteTime:{groupID:n,userID:n,muteTime:{type:"Number",validator:function(e){return 0<=e}}},setGroupMemberNameCard:{groupID:n,userID:{type:"String"},nameCard:{type:"String",validator:function(e,t,n){return C(e)?(e.length,!0):(r({api:t,paramName:n,desc:an()}),!1)}}},setGroupMemberCustomField:{groupID:n,userID:{type:"String"},memberCustomField:a},deleteGroupMember:{groupID:n},markGroupMemberList:{groupID:n,markType:{type:"number",validator:function(e,t,n){return A(e)?!(e<1e3&&(r({api:t,paramName:n,desc:vn(n,1e3)}),1)):(r({api:t,paramName:n,desc:cn()}),!1)}},userIDList:y({},a),enableMark:y({},wn)},createTextMessage:{to:n,conversationType:n,payload:y(y({},o),{},{validator:function(e,t,n){return m(e)?C(e.text)?0!==e.text.length||(r({api:t,paramName:"payload.text",desc:yn()}),!1):(r({api:t,paramName:"payload.text",desc:an()}),!1):(r({api:t,paramName:n,desc:Mn()}),!1)}})},createTextAtMessage:{to:n,conversationType:n,payload:y(y({},o),{},{validator:function(e,t,n){return m(e)?C(e.text)?0===e.text.length?(r({api:t,paramName:"payload.text",desc:yn()}),!1):!(e.atUserList&&!O(e.atUserList)&&(r({api:t,paramName:"payload.atUserList",desc:pn()}),1)):(r({api:t,paramName:"payload.text",desc:an()}),!1):(r({api:t,paramName:n,desc:Mn()}),!1)}})},createCustomMessage:{to:n,conversationType:n,payload:y(y({},o),{},{validator:function(e,t,n){return m(e)?e.data&&!C(e.data)?(r({api:t,paramName:"payload.data",desc:an()}),!1):e.description&&!C(e.description)?(r({api:t,paramName:"payload.description",desc:an()}),!1):!(e.extension&&!C(e.extension)&&(r({api:t,paramName:"payload.extension",desc:an()}),1)):(r({api:t,paramName:"payload",desc:Mn()}),!1)}})},createImageMessage:{to:n,conversationType:n,payload:y(y({},o),{},{validator:function(e,t,n){if(!m(e))return r({api:t,paramName:n,desc:Mn()}),!1;if(N(e.file))return r({api:t,paramName:"payload.file",desc:un()}),!1;if(Ie){if(!(e.file instanceof HTMLInputElement||st(e.file)))return m(e.file)&&"undefined"!=typeof uni?0!==e.file.tempFilePaths.length&&0!==e.file.tempFiles.length||(r({api:t,paramName:"payload.file",desc:Cn()}),!1):(r({api:t,paramName:"payload.file",desc:ln()}),!1);if(e.file instanceof HTMLInputElement&&0===e.file.files.length)return r({api:t,paramName:"payload.file",desc:Cn()}),!1}return!0},onProgress:{type:"Function",required:!1,validator:function(e,t,n){return N(e)&&r({api:t,paramName:n,desc:hn()}),!0}}})},createAudioMessage:{to:n,conversationType:n,payload:y(y({},o),{},{validator:function(e,t,n){return!!m(e)||(r({api:t,paramName:n,desc:Mn()}),!1)}}),onProgress:{type:"Function",required:!1,validator:function(e,t,n){return N(e)&&r({api:t,paramName:n,desc:hn()}),!0}}},createVideoMessage:{to:n,conversationType:n,payload:y(y({},o),{},{validator:function(e,t,n){if(!m(e))return r({api:t,paramName:n,desc:Mn()}),!1;if(N(e.file))return r({api:t,paramName:"payload.file",desc:un()}),!1;if(Ie){if(!(e.file instanceof HTMLInputElement||st(e.file)))return m(e.file)&&"undefined"!=typeof uni?!!st(e.file.tempFile)||(r({api:t,paramName:"payload.file",desc:Cn()}),!1):(r({api:t,paramName:"payload.file",desc:ln()}),!1);if(e.file instanceof HTMLInputElement&&0===e.file.files.length)return r({api:t,paramName:"payload.file",desc:Cn()}),!1}return!0}}),onProgress:{type:"Function",required:!1,validator:function(e,t,n){return N(e)&&r({api:t,paramName:n,desc:hn()}),!0}}},createFaceMessage:{to:n,conversationType:n,payload:y(y({},o),{},{validator:function(e,t,n){return m(e)?A(e.index)?!!C(e.data)||(r({api:t,paramName:"payload.data",desc:an()}),!1):(r({api:t,paramName:"payload.index",desc:cn()}),!1):(r({api:t,paramName:n,desc:Mn()}),!1)}})},createFileMessage:{to:n,conversationType:n,payload:y(y({},o),{},{validator:function(e,t,n){if(!m(e))return r({api:t,paramName:n,desc:Mn()}),!1;if(N(e.file))return r({api:t,paramName:"payload.file",desc:un()}),!1;if(Ie){if(!(e.file instanceof HTMLInputElement||st(e.file)))return m(e.file)&&"undefined"!=typeof uni?0!==e.file.tempFilePaths.length&&0!==e.file.tempFiles.length||(r({api:t,paramName:"payload.file",desc:Cn()}),!1):(r({api:t,paramName:"payload.file",desc:ln()}),!1);if(e.file instanceof HTMLInputElement&&0===e.file.files.length)return r({api:t,paramName:"payload.file",desc:Cn()}),!1}return!0}}),onProgress:{type:"Function",required:!1,validator:function(e,t,n){return N(e)&&r({api:t,paramName:n,desc:hn()}),!0}}},createLocationMessage:{to:n,conversationType:n,payload:y(y({},o),{},{validator:function(e,t,n){return m(e)?C(e.description)?A(e.longitude)?!!A(e.latitude)||(r({api:t,paramName:"payload.latitude",desc:cn()}),!1):(r({api:t,paramName:"payload.longitude",desc:cn()}),!1):(r({api:t,paramName:"payload.description",desc:an()}),!1):(r({api:t,paramName:n,desc:Mn()}),!1)}})},createMergerMessage:{to:n,conversationType:n,payload:y(y({},o),{},{validator:function(e,t,n){var o;return S(e.messageList)?(r({api:t,paramName:"payload.messageList",desc:_n()}),!1):S(e.compatibleText)?(r({api:t,paramName:"payload.compatibleText",desc:rn("compatibleText")}),!1):(o=!1,e.messageList.forEach(function(e){e.status===Nn&&(o=!0)}),!o||(r({api:t,paramName:"payload.messageList",desc:u("MergeFailedMessageLog")}),!1))}})},revokeMessage:[y(y({name:"message"},o),{},{validator:function(e,t,n){return S(e)?(r({api:t,paramName:n,desc:Tn()}),!1):e.conversationType===R.CONV_SYSTEM?(r({api:t,paramName:n,desc:u("MessageCanBeRevokedDesc")}),!1):!0!==e.isRevoked||(r({api:t,paramName:n,desc:u("MessageRevokedLog")}),!1)}})],deleteMessage:[y(y({name:"messageList"},a),{},{validator:function(e,t,n){return!S(e)||(r({api:t,paramName:n,desc:_n()}),!1)}})],translateText:{sourceTextList:a,sourceLanguage:n,targetLanguage:n},convertVoiceToText:{message:y(y({},o),{},{validator:function(e,t,n){return S(e)?(r({api:t,paramName:n,desc:Tn()}),!1):e.type===R.MSG_AUDIO&&e.status===On||(r({api:t,paramName:n,desc:u("AudioMessageRequiredLog")}),!1)}})},modifyMessage:[y(y({name:"message"},o),{},{validator:function(e,t,n){return S(e)?(r({api:t,paramName:n,desc:Tn()}),!1):e.conversationType===R.CONV_SYSTEM?(r({api:t,paramName:n,desc:u("MessageCanBeModifiedLog")}),!1):!0!==e._onlineOnlyFlag||(r({api:t,paramName:n,desc:u("OnlineMessageNotSupportLog")}),!1)}})],searchCloudMessages:{keywordList:Fn.keywordListForMsg,keywordListMatchType:Fn.keywordListMatchType,cursor:Fn.cursor,senderUserIDList:{type:"Array",required:!1,validator:function(e,t,n){return kn(e,t,n,{allowUndefined:!0,allowEmpty:!0,maxLength:5})}},messageTypeList:{type:"Array",required:!1,validator:function(e,t,n){var o;return!e||!(!kn(e,t,n,{allowUndefined:!0,allowEmpty:!0})||(o=[R.MSG_TEXT,R.MSG_IMAGE,R.MSG_AUDIO,R.MSG_FILE,R.MSG_VIDEO,R.MSG_LOCATION,R.MSG_CUSTOM,R.MSG_MERGER],0<e.filter(function(e){return-1===o.indexOf(e)}).length&&(r({api:t,paramName:n,desc:Sn(n,"message")}),1)))}},conversationID:{type:"String",required:!1,validator:function(e){return!e||sn(e)}},timePosition:{type:"number",required:!1,validator:function(e,t,n){return Rn(e,t,n,{allowUndefined:!0,min:0})}},timePeriod:{type:"number",required:!1,validator:function(e,t,n){return Rn(e,t,n,{allowUndefined:!0,min:0})}}},searchCloudUsers:{keywordList:Fn.keywordListExceptMsg,keywordListMatchType:Fn.keywordListMatchType,cursor:Fn.cursor,count:Fn.count,miniBirthday:{type:"Number",required:!1,validator:function(e,t,n){return Rn(e,t,n,{allowUndefined:!0,min:0})}},maxBirthday:{type:"Number",required:!1,validator:function(e,t,n){return Rn(e,t,n,{allowUndefined:!0,min:0})}},gender:{type:"String",required:!1,validator:function(e,t,n){return!e||e===R.GENDER_FEMALE||e===R.GENDER_MALE||r({api:t,paramName:n,desc:"".concat(e," is invalid match type")})}}},searchCloudGroups:{keywordList:Fn.keywordListExceptMsg,keywordListMatchType:Fn.keywordListMatchType,cursor:Fn.cursor,count:Fn.count,groupTypeList:Fn.groupTypeList},searchCloudGroupMembers:{keywordList:Fn.keywordListExceptMsg,keywordListMatchType:Fn.keywordListMatchType,cursor:Fn.cursor,count:Fn.count,groupTypeList:Fn.groupTypeList,groupIDList:{type:"Array",required:!1,validator:function(e,t,n){return kn(e,t,n,{allowUndefined:!0,allowEmpty:!0})}}},getUserProfile:{userIDList:{type:"Array",validator:function(e,t,n){return O(e)?(0===e.length&&r({api:t,paramName:n,desc:_n()}),!0):(r({api:t,paramName:n,desc:pn()}),!1)}}},updateMyProfile:{profileCustomField:{type:"Array",validator:function(e,t,n){return!!N(e)||!!O(e)||(r({api:t,paramName:n,desc:pn()}),!1)}}},setSelfStatus:{customStatus:{type:"String",validator:function(e,t,n){return!!C(e)||(r({api:t,paramName:n,desc:an()}),!1)}}},getUserStatus:{userIDList:{type:"Array",validator:function(e,t,n){return O(e)?0!==e.length||(r({api:t,paramName:n,desc:_n()}),!1):(r({api:t,paramName:n,desc:pn()}),!1)}}},subscribeUserStatus:{userIDList:{type:"Array",validator:function(e,t,n){return O(e)?0!==e.length||(r({api:t,paramName:n,desc:_n()}),!1):(r({api:t,paramName:n,desc:pn()}),!1)}}},unsubscribeUserStatus:{userIDList:{type:"Array",validator:function(e,t,n){return!e||!!O(e)||(r({api