UNPKG

@tencentcloud/chat

Version:

Tencent Cloud Chat SDK for Web/Mini Program/uni-app/React Native/Donut

1 lines 710 kB
!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,a,s="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(s)return i=!(o=!0),{s:function(){s=s.call(e)},n:function(){var e=s.next();return o=e.done,e},e:function(e){i=!0,n=e},f:function(){try{o||null==s.return||s.return()}finally{if(i)throw n}}};if(Array.isArray(e)||(s=X(e))||t&&e&&"number"==typeof e.length)return s&&(e=s),a=0,{s:t=function(){},n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},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),a=0;a<i.length;a++)n=i[a],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,a,s,r=[],c=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(o=a.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&&(s=n.return(),Object(s)!==s))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",SERVER_CONFIG_UPDATED:"onServerConfigUpdated"},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,ae="CHINA",a={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]:ae]}},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()},se="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"],ue="web.sdk.qcloud.com",le="web.sdk.cloud.tencent.cn",de="web.sdk.tencent.cn";a.HOST.setCurrent(ae);for(var pe,_e="undefined"!=typeof wx&&"function"==typeof wx.getSystemInfoSync&&Boolean(wx.getSystemInfoSync().fontSizeSetting),he=_e&&"function"==typeof wx.createGamePortal,ge="undefined"!=typeof qq&&"function"==typeof qq.getSystemInfoSync&&Boolean(qq.getSystemInfoSync().fontSizeSetting),fe="undefined"!=typeof tt&&"function"==typeof tt.getSystemInfoSync&&Boolean(tt.getSystemInfoSync().fontSizeSetting),me="undefined"!=typeof swan&&"function"==typeof swan.getSystemInfoSync&&Boolean(swan.getSystemInfoSync().fontSizeSetting),ve="undefined"!=typeof my&&"function"==typeof my.getSystemInfoSync&&Boolean(my.getSystemInfoSync().fontSizeSetting),n="undefined"!=typeof jd&&"function"==typeof jd.getSystemInfoSync,Ie="undefined"!=typeof uni&&"undefined"==typeof window&&"function"==typeof uni.requireNativePlugin,o=_e&&"object"===z(wx.miniapp),Me="undefined"!=typeof uni,v=_e||ge||fe||me||ve||Ie||n,s="undefined"==typeof window&&!v&&"undefined"!=typeof global&&void 0!==global.NativeScriptGlobals,ye="undefined"!=typeof global&&(void 0!==global.nativeModuleProxy||void 0!==global.ReactNative),Ce="undefined"!=typeof uni?!v:"undefined"!=typeof window&&!v&&!ye,I=ge?qq:fe?tt:me?swan:ve?my:_e?wx:Ie?uni:n?jd:{},Te=Ce&&window&&window.navigator&&window.navigator.userAgent||"",De=(n="WEB",/(micromessenger|webbrowser)/i.test(Te)?n="WEB":ge?n="QQ_MP":fe?n="TT_MP":me?n="BAIDU_MP":ve?n="ALI_MP":_e?n=o?"DONUT_NATIVE_APP":"WX_MP":Ie?n="UNI_NATIVE_APP":s?n="NS_NATIVE_APP":ye&&(n="RN_NATIVE_APP"),te[n]),o=/iPad/i.test(Te),s=/iPhone/i.test(Te)&&!o,n=/iPod/i.test(Te),Ee=s||o||n,Le=(s=Te.match(/OS (\d+)_/i))&&s[1]?s[1]:null,Se=/Android/i.test(Te),ke=(o=Te.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i))?(n=o[1]&&parseFloat(o[1]),s=o[2]&&parseFloat(o[2]),n&&s?parseFloat(o[1]+"."+o[2]):n||null):null,s=/Edge/i.test(Te),o=!s&&/Chrome/i.test(Te),Re=/MSIE/.test(Te)||-1<Te.indexOf("Trident")&&-1<Te.indexOf("rv:11.0"),Ae=n=!(n=(n=/MSIE\s(\d+)\.\d/.exec(Te))&&parseFloat(n[1]))&&/Trident\/7.0/i.test(Te)&&/rv:11.0/.test(Te)?11:n,n=/Safari/i.test(Te)&&!o&&!Se&&!s,Oe=/Windows/i.test(Te),Ne=/MAC OS X/i.test(Te),Ge=Ce&&"undefined"!=typeof Worker&&!Re,Pe=Se||Ee,Ue=Ce&&void 0!==window.tencent_cloud_im_csig_flutter_for_web_25F_cy,be="undefined"!=typeof window&&void 0!==window.navigator&&(o=window.navigator.standalone,!(!Ee||o||n)),we="undefined"!=typeof console?console:"undefined"!=typeof global&&global.console?global.console:"undefined"!=typeof window&&window.console?window.console:{},Fe=function(){},qe=["assert","clear","count","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","profile","profileEnd","table","time","timeEnd","timeStamp","trace","warn"],xe=qe.length;xe--;)pe=qe[xe],console[pe]||(we[pe]=Fe);function Ve(){var e=new Date;return e.setTime(Ye()),e}function Be(){We=0}function He(){return Math.floor(Ye()/1e3)}var Ke=we,We=0,Ye=function(){return(new Date).getTime()+We},je=0;function Je(){return en()?"%c Chat %c":"Chat"}function ze(){var e=Ve();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(Tt(e[n]))try{t+=Dt(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){en()?Ke[e](Je(),"background:#0abf5b; padding:1px; border-radius:3px; color: #fff","background:transparent",ze(),t):Ke[e]("".concat(Je()," ").concat(ze()," ").concat(t))},d:function(){var e;je<=-1&&(e=this.arguments2String(arguments),this._exec("debug",e))},l:function(){var e;je<=0&&(e=this.arguments2String(arguments),this._exec("log",e))},log:function(){var e;je<=0&&(e=this.arguments2String(arguments),this._exec("log",e))},i:function(){var e;je<=1&&(e=this.arguments2String(arguments),this._exec("info",e))},w:function(){var e;je<=2&&(e=this.arguments2String(arguments),this._exec("warn",e))},e:function(){var e;je<=3&&(e=this.arguments2String(arguments),this._exec("error",e))},setLevel:function(e){e<4&&this._exec("log","set level from "+je+" to "+e),je=e},getLevel:function(){return je}},Xe={JPG:1,JPEG:1,GIF:2,PNG:3,BMP:4,UNKNOWN:255},s="Tag_Profile_IM_",f={NICK:"".concat(s,"Nick"),GENDER:"".concat(s,"Gender"),BIRTHDAY:"".concat(s,"BirthDay"),LOCATION:"".concat(s,"Location"),SELFSIGNATURE:"".concat(s,"SelfSignature"),ALLOWTYPE:"".concat(s,"AllowType"),LANGUAGE:"".concat(s,"Language"),AVATAR:"".concat(s,"Image"),MESSAGESETTINGS:"".concat(s,"MsgSettings"),ADMINFORBIDTYPE:"".concat(s,"AdminForbidType"),LEVEL:"".concat(s,"Level"),ROLE:"".concat(s,"Role")},Ze={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_",Qe={UNKNOWN:"".concat(o,"Unknown"),FEMALE:"".concat(o,"Female"),MALE:"".concat(o,"Male")},$e={NONE:"".concat("AdminForbid_Type_","None"),SEND_OUT:"".concat("AdminForbid_Type_","SendOut")},et={NEED_CONFIRM:"".concat("AllowType_Type_","NeedConfirm"),ALLOW_ANY:"".concat("AllowType_Type_","AllowAny"),DENY_ANY:"".concat("AllowType_Type_","DenyAny")},nt="JoinedSuccess",ot="WaitAdminApproval",it="@TOPIC#_",at=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(at.call(e,t))return!1;return!0}return!!(st(e)||rt(e)||ct(e))&&0===e.size}function st(e){return"map"===Et(e)}function rt(e){return"set"===Et(e)}function ct(e){return"file"===Et(e)}function A(e){return null!==e&&("number"==typeof e&&!isNaN(+e)||"object"===z(e)&&e.constructor===Number)}function ut(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"===Et(e)}function lt(e){return O(e)&&0<e.length}function dt(e){return"function"==typeof e}function pt(e){return"filelist"===Et(e)}function _t(e){return"string"==typeof e&&(e=e[0],!/[^a-zA-Z0-9]/.test(e))}function ht(e,t,n,o){if(!Tt(e)||!Tt(t))return 0;for(var i,a=0,s=Object.keys(t),r=0,c=s.length;r<c;r++)if(i=s[r],!(N(t[i])||n&&n.includes(i)))if(Tt(e[i])&&Tt(t[i]))a+=ht(e[i],t[i],n,o);else{if(o&&o.includes(t[i]))continue;e[i]!==t[i]&&(e[i]=t[i],a+=1)}return a}function gt(e,t){var n,o=new Map,i=F(e.entries());try{for(i.s();!(n=i.n()).done;){var a=j(n.value,2),s=a[0],r=a[1];r&&o.set(s,t?JSON.stringify(r):JSON.parse(JSON.stringify(r)))}}catch(e){i.e(e)}finally{i.f()}return o}function ft(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 mt(e){return e=e||99999999,Math.round(Math.random()*e)}function vt(){for(var e="",t=32;0<t;--t)e+=Lt[Math.floor(Math.random()*St)];return e}function It(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 yt(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]=yt(e[n])):o[n]=void 0:o[n]=null;return o}var Ct=["url"],C=function(e){return"string"==typeof e},N=function(e){return void 0===e},Tt=function(e){return O(e)||ut(e)},Dt=function(e){return e instanceof Error},Et=function(e){return Object.prototype.toString.call(e).match(/^\[object (.*)\]$/)[1].toLowerCase()},Lt=(Date.now||(Date.now=function(){return(new Date).getTime()}),"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"),St=Lt.length,kt={};function Rt(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 At(e){return S(e)?[]:e.filter(function(e){return!0===e.isModified})}function Ot(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 Nt(e){return S(e)?[]:e.filter(function(e){return!1===e.isModified})}function Gt(e){return e===R.GRP_AVCHATROOM}function Pt(e){var t=e.type,e=e.groupID;return t===R.GRP_COMMUNITY||"".concat(e).startsWith("@TGS#_")&&!"".concat(e).includes(it)}function Ut(e){return"".concat(e).startsWith("@TGS#_")&&"".concat(e).includes(it)}function bt(e){return C(e)&&e.slice(0,3)===R.CONV_C2C}function wt(e){return C(e)&&e.slice(0,5)===R.CONV_GROUP}function Ft(e){return C(e)&&e===R.CONV_SYSTEM}function qt(t,n){var o={};return Object.keys(t).forEach(function(e){o[e]=n(t[e],e)}),o}function xt(o){return ye?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})}})}):Re&&9===Ae?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 Vt(){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 Bt(){var e=Se?"android":Ee?"ios":Oe?"windows":Ne?"mac":"unknown";if(v)try{var t=I.getSystemInfoSync().platform;void 0!==t&&(e=t)}catch(e){}return e}function Ht(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]),a=parseInt(t[o]);if(a<i)return 1;if(i<a)return-1}return 0}function Kt(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,Ct):i}function Wt(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 Yt(e){e=e.servcmd;return e.slice(e.indexOf(".")+1)}function jt(e,t){return Math.round(Number(e)*Math.pow(10,t))/Math.pow(10,t)}function Jt(e,t){return e.includes(t)}function zt(e,t){return e.includes(t)}function Xt(e){return e.split(it)[0]}function Zt(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 Qt(e){return e===R.MSG_TEXT||e===R.MSG_CUSTOM||e===R.MSG_LOCATION||e===R.MSG_FACE}function $t(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 en(){return!Re&&!v}function tn(e){return"the length of userIDList cannot exceed ".concat(e)}function nn(e){var t;if(O(e)&&0!==e.length)return t=0,e.forEach(function(e){t+=e}),t.toFixed(0)}function on(e){var t;if(O(e)&&0!==e.length)return t=0,e.forEach(function(e){t+=e}),(t/e.length).toFixed(0)}function an(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 sn(e){return e&&1<e?!0:!1}function rn(e,t,n,o){var i,a,s;return void 0===t||(i=!0,t.required&&S(e)&&(M.e("[".concat(n,'] Missing required params: "').concat(o,'".')),i=!1),S(e)||(a=Et(e))===(s=t.type.toLowerCase())||"asyncfunction"===a&&"function"===s||(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 cn(e){return!(!e||!(bt(e)||wt(e)||Ft(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 un(){return u("StringRequiredLog")}function ln(e){return u("NonEmptyStringRequiredLog",e)}function dn(){return u("NumberRequiredLog")}function pn(){return u("UndefinedNotAllowedLog")}function _n(){return u("FileRequiredLog")}function hn(){return u("FunctionRequiredLog")}function gn(){return u("ArrayRequiredLog")}function fn(){return u("NonEmptyArrayLog")}function mn(){return u("CallbackMissingLog")}function vn(){return u("PositiveIntegerRequiredLog")}function In(e,t){return u("StringNotLongerThanLog",e,t)}function Mn(e,t){return u("NumberGreaterThanLog",e,t)}function yn(e,t){return u("NumberGreaterOrEqualLog",e,t)}function Cn(e){return u("KeyValueStringRequiredLog",e)}function Tn(){return u("PlainObjectRequiredLog")}function Dn(){return u("NonEmptyContentRequiredLog")}function En(){return u("FileNotSelectedLog")}function Ln(){return u("MessageInstanceRequiredLog")}function Sn(){return u("NonAnonymousFunctionLog")}function kn(){return u("MessageExtensionNotAvailableLog")}function Rn(){return u("MessageReactionRequiredLog")}function An(e,t){return u("ContainsUnsupportedTypeLog",e,t)}function On(e,t,n,o){var i=o.allowUndefined,a=o.allowEmpty,o=o.maxLength;return N(e)?!!i||(r({api:t,paramName:n,desc:pn()}),!1):O(e)?!(0===e.length&&(r({api:t,paramName:n,desc:fn()}),!a)||o&&e.length>o&&(r({api:t,paramName:n,desc:u("MaximumArrayLengthLog",n,o)}),1)):(r({api:t,paramName:n,desc:gn()}),!1)}function Nn(e,t,n,o){var i=o.allowUndefined,a=o.min,o=o.max;return N(e)?!!i||(r({api:t,paramName:n,desc:pn()}),!1):A(e)?A(a)&&e<a?(r({api:t,paramName:n,desc:0===a?yn(n,a):Mn(n,a-1)}),!1):!(A(o)&&o<e&&(r({api:t,paramName:n,desc:u("MaximumNumberLog",n,o)}),1)):(r({api:t,paramName:n,desc:dn()}),!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!==Kn&&Kn.emit(h.ERROR,e),Promise.reject(e)):e instanceof Error?(t=new L({code:k.UNCAUGHT_ERROR}),n&&null!==Kn&&Kn.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!==Kn&&Kn.emit(h.ERROR,t),Promise.reject(t))}var Gn="unSend",Pn="success",Un="fail",bn="notStart",wn="pending",Fn="resolved",qn="rejected",n={type:"String",required:!0},s={type:"Array",required:!0},o={type:"Object",required:!0},xn={type:"Boolean",required:!0},c={type:"number",required:!0},Vn={keywordListForMsg:{type:"Array",required:!1,validator:function(e,t,n){return On(e,t,n,{allowUndefined:!0,allowEmpty:!0,maxLength:5})}},keywordListExceptMsg:{type:"Array",required:!0,validator:function(e,t,n){return On(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 Nn(e,t,n,{allowUndefined:!0,min:1,max:100})}},groupTypeList:{type:"Array",required:!1,validator:function(e,t,n){var o;return!e||!(!On(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:An(n,"group")}),1)))}}},u=null,Bn={hookGetAPITips:function(e){u=e},login:{userID:n,userSig:n},addToBlacklist:{userIDList:s},removeFromBlacklist:{userIDList:s},on:[{name:"eventName",type:"String",validator:function(e,t,n){return"string"==typeof e&&0!==e.length||(r({api:t,paramName:n,desc:ln(n)}),!1)}},{name:"handler",type:"Function",validator:function(e,t,n){return"function"!=typeof e?(r({api:t,paramName:n,desc:hn()}),!1):(""===e.name&&r({api:t,paramName:n,desc:Sn()}),!0)}}],once:[{name:"eventName",type:"String",validator:function(e,t,n){return"string"==typeof e&&0!==e.length||(r({api:t,paramName:n,desc:ln(n)}),!1)}},{name:"handler",type:"Function",validator:function(e,t,n){return"function"!=typeof e?(r({api:t,paramName:n,desc:hn()}),!1):(""===e.name&&r({api:t,paramName:n,desc:Sn()}),!0)}}],off:[{name:"eventName",type:"String",validator:function(e,t,n){return"string"==typeof e&&0!==e.length||(r({api:t,paramName:n,desc:ln(n)}),!1)}},{name:"handler",type:"Function",validator:function(e,t,n){return"function"!=typeof e?(r({api:t,paramName:n,desc:hn()}),!1):(""===e.name&&r({api:t,paramName:n,desc:Sn()}),!0)}}],sendMessage:[y({name:"message"},o)],setMessageExtensions:[y(y({name:"message"},o),{},{validator:function(e,t,n){return e.status===Pn&&!0===e.isSupportExtension||(r({api:t,paramName:n,desc:kn()}),!1)}}),y({name:"extensions"},s)],getMessageExtensions:[y(y({name:"message"},o),{},{validator:function(e,t,n){return e.status===Pn&&!0===e.isSupportExtension||(r({api:t,paramName:n,desc:kn()}),!1)}})],deleteMessageExtensions:[y(y({name:"message"},o),{},{validator:function(e,t,n){return e.status===Pn&&!0===e.isSupportExtension||(r({api:t,paramName:n,desc:kn()}),!1)}})],addMessageReaction:[y(y({name:"message"},o),{},{validator:function(e,t,n){return e.status===Pn||(r({api:t,paramName:n,desc:Rn()}),!1)}}),y({name:"reactionID"},n)],removeMessageReaction:[y(y({name:"message"},o),{},{validator:function(e,t,n){return e.status===Pn||(r({api:t,paramName:n,desc:Rn()}),!1)}}),y({name:"reactionID"},n)],getMessageReactions:{messageList:y({},s)},getAllUserListOfMessageReaction:{message:y(y({},o),{},{validator:function(e,t,n){return e.status===Pn||(r({api:t,paramName:n,desc:Rn()}),!1)}}),reactionID:y({},n),nextSeq:{type:"Number"},count:{type:"Number"}},getMessageList:{conversationID:y(y({},n),{},{validator:cn}),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:vn()}),1))}}},getMessageListHopping:{conversationID:y(y({},n),{},{validator:cn}),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:vn}),1))}}},setMessageRead:{conversationID:y(y({},n),{},{validator:cn})},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:cn})],clearHistoryMessage:[y(y({name:"conversationID"},n),{},{validator:cn})],pinConversation:{conversationID:y(y({},n),{},{validator:cn}),isPinned:y({},xn)},setConversationDraft:{conversationID:y(y({},n),{},{validator:cn}),draftText:{type:"String",validator:function(e,t,n){return!!C(e)||(r({api:t,paramName:n,desc:un()}),!1)}}},setConversationCustomData:{conversationIDList:y({},s),customData:{type:"String",validator:function(e,t,n){return C(e)?!(256<e.length&&(r({api:t,paramName:n,desc:In(n,256)}),1)):(r({api:t,paramName:n,desc:un()}),!1)}}},markConversation:{conversationIDList:y({},s),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:dn()}),!1)}},enableMark:y({},xn)},createConversationGroup:{conversationIDList:y({},s),groupName:y(y({},n),{},{validator:function(e,t,n){return!(!e||32<e.length&&(r({api:t,paramName:n,desc:In(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:In(n,32)}),1))}})},addConversationsToGroup:{conversationIDList:y({},s),groupName:y({},n)},deleteConversationsFromGroup:{conversationIDList:y({},s),groupName:y({},n)},getGroupList:{groupProfileFilter:{type:"Array"}},getGroupProfile:{groupID:n,groupCustomFieldFilter:{type:"Array"},memberCustomFieldFilter:{type:"Array"}},getGroupProfileAdvance:{groupIDList:s},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:Cn("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:Cn("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:gn()}),!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:gn()}),!1):!!S(e)||(o=!0,e.forEach(function(e){if(!C(e))return r({api:t,paramName:n,desc:Cn("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:s,memberCustomFieldFilter:{type:"Array"}},addGroupMember:{groupID:n,userIDList:s},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:un()}),!1)}}},setGroupMemberCustomField:{groupID:n,userID:{type:"String"},memberCustomField:s},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:yn(n,1e3)}),1)):(r({api:t,paramName:n,desc:dn()}),!1)}},userIDList:y({},s),enableMark:y({},xn)},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:Dn()}),!1):(r({api:t,paramName:"payload.text",desc:un()}),!1):(r({api:t,paramName:n,desc:Tn()}),!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:Dn()}),!1):!(e.atUserList&&!O(e.atUserList)&&(r({api:t,paramName:"payload.atUserList",desc:gn()}),1)):(r({api:t,paramName:"payload.text",desc:un()}),!1):(r({api:t,paramName:n,desc:Tn()}),!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:un()}),!1):e.description&&!C(e.description)?(r({api:t,paramName:"payload.description",desc:un()}),!1):!(e.extension&&!C(e.extension)&&(r({api:t,paramName:"payload.extension",desc:un()}),1)):(r({api:t,paramName:"payload",desc:Tn()}),!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:Tn()}),!1;if(N(e.file))return r({api:t,paramName:"payload.file",desc:pn()}),!1;if(Ce){if(!(e.file instanceof HTMLInputElement||ct(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:En()}),!1):(r({api:t,paramName:"payload.file",desc:_n()}),!1);if(e.file instanceof HTMLInputElement&&0===e.file.files.length)return r({api:t,paramName:"payload.file",desc:En()}),!1}return!0},onProgress:{type:"Function",required:!1,validator:function(e,t,n){return N(e)&&r({api:t,paramName:n,desc:mn()}),!0}}})},createAudioMessage:{to:n,conversationType:n,payload:y(y({},o),{},{validator:function(e,t,n){return!!m(e)||(r({api:t,paramName:n,desc:Tn()}),!1)}}),onProgress:{type:"Function",required:!1,validator:function(e,t,n){return N(e)&&r({api:t,paramName:n,desc:mn()}),!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:Tn()}),!1;if(N(e.file))return r({api:t,paramName:"payload.file",desc:pn()}),!1;if(Ce){if(!(e.file instanceof HTMLInputElement||ct(e.file)))return m(e.file)&&"undefined"!=typeof uni?!!ct(e.file.tempFile)||(r({api:t,paramName:"payload.file",desc:En()}),!1):(r({api:t,paramName:"payload.file",desc:_n()}),!1);if(e.file instanceof HTMLInputElement&&0===e.file.files.length)return r({api:t,paramName:"payload.file",desc:En()}),!1}return!0}}),onProgress:{type:"Function",required:!1,validator:function(e,t,n){return N(e)&&r({api:t,paramName:n,desc:mn()}),!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:un()}),!1):(r({api:t,paramName:"payload.index",desc:dn()}),!1):(r({api:t,paramName:n,desc:Tn()}),!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:Tn()}),!1;if(N(e.file))return r({api:t,paramName:"payload.file",desc:pn()}),!1;if(Ce){if(!(e.file instanceof HTMLInputElement||ct(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:En()}),!1):(r({api:t,paramName:"payload.file",desc:_n()}),!1);if(e.file instanceof HTMLInputElement&&0===e.file.files.length)return r({api:t,paramName:"payload.file",desc:En()}),!1}return!0}}),onProgress:{type:"Function",required:!1,validator:function(e,t,n){return N(e)&&r({api:t,paramName:n,desc:mn()}),!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:dn()}),!1):(r({api:t,paramName:"payload.longitude",desc:dn()}),!1):(r({api:t,paramName:"payload.description",desc:un()}),!1):(r({api:t,paramName:n,desc:Tn()}),!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:fn()}),!1):S(e.compatibleText)?(r({api:t,paramName:"payload.compatibleText",desc:ln("compatibleText")}),!1):(o=!1,e.messageList.forEach(function(e){e.status===Un&&(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:Ln()}),!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"},s),{},{validator:function(e,t,n){return!S(e)||(r({api:t,paramName:n,desc:fn()}),!1)}})],translateText:{sourceTextList:s,sourceLanguage:n,targetLanguage:n},convertVoiceToText:{message:y(y({},o),{},{validator:function(e,t,n){return S(e)?(r({api:t,paramName:n,desc:Ln()}),!1):e.type===R.MSG_AUDIO&&e.status===Pn||(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:Ln()}),!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:Vn.keywordListForMsg,keywordListMatchType:Vn.keywordListMatchType,cursor:Vn.cursor,senderUserIDList:{type:"Array",required:!1,validator:function(e,t,n){return On(e,t,n,{allowUndefined:!0,allowEmpty:!0,maxLength:5})}},messageTypeList:{type:"Array",required:!1,validator:function(e,t,n){var o;return!e||!(!On(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:An(n,"message")}),1)))}},conversationID:{type:"String",required:!1,validator:function(e){return!e||cn(e)}},timePosition:{type:"number",required:!1,validator:function(e,t,n){return Nn(e,t,n,{allowUndefined:!0,min:0})}},timePeriod:{type:"number",required:!1,validator:function(e,t,n){return Nn(e,t,n,{allowUndefined:!0,min:0})}}},searchCloudUsers:{keywordList:Vn.keywordListExceptMsg,keywordListMatchType:Vn.keywordListMatchType,cursor:Vn.cursor,count:Vn.count,miniBirthday:{type:"Number",required:!1,validator:function(e,t,n){return Nn(e,t,n,{allowUndefined:!0,min:0})}},maxBirthday:{type:"Number",required:!1,validator:function(e,t,n){return Nn(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:Vn.keywordListExceptMsg,keywordListMatchType:Vn.keywordListMatchType,cursor:Vn.cursor,count:Vn.count,groupTypeList:Vn.groupTypeList},searchCloudGroupMembers:{keywordList:Vn.keywordListExceptMsg,keywordListMatchType:Vn.keywordListMatchType,cursor:Vn.cursor,count:Vn.count,groupTypeList:Vn.groupTypeList,groupIDList:{type:"Array",required:!1,validator:function(e,t,n){return On(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:fn()}),!0):(r({api:t,paramName:n,desc:gn()}),!1)}}},updateMyProfile:{profileCustomField:{type:"Array",validator:function(e,t,n){return!!N(e)||!!O(e)||(r({api:t,paramName:n,desc:gn()}),!1)}}},setSelfStatus:{customStatus:{type:"String",validator:function(e,t,n){return!!C(e)||(r({api:t,paramName:n,desc:un()}),!1)}}},getUserStatus:{userIDList:{type:"Array",validator:function(e,t,n){return O(e)?0!==e.length||(r({api:t,paramName:n,desc:fn()}),!1):(r({api:t,paramName:n,desc:gn()}),!1)}}},subscribeUserStatus:{userIDList:{type:"Array",validator:function(e,t,n){return O(e)?0!==e.length||(r({api:t,paramName:n,desc:fn()}),!1):(r({api:t,paramN