UNPKG

@tencentcloud/ai-desk-customer-uniapp

Version:

uni-app Vue2/Vue3 UIKit for AI Desk

1 lines 880 kB
import e from"tim-upload-plugin";function t(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(o=Object.getOwnPropertySymbols(e);s<o.length;s++)t.indexOf(o[s])<0&&Object.prototype.propertyIsEnumerable.call(e,o[s])&&(n[o[s]]=e[o[s]])}return n}function n(e,t,n,o){return new(n||(n=Promise))((function(s,i){function a(e){try{c(o.next(e))}catch(e){i(e)}}function r(e){try{c(o.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,r)}c((o=o.apply(e,t||[])).next())}))}"function"==typeof SuppressedError&&SuppressedError;var o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function s(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var i,a,r,c,u,l,d,p,g,h={exports:{}},_=s(h.exports=function(){function e(e,t){var n,o=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)),o}function t(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?e(Object(o),!0).forEach((function(e){r(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):e(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}function n(e){return(n="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 s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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,o.key,o)}}function a(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(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&&l(e,t)}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function l(e,t){return(l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function d(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function p(e,t,n){return(p=d()?Reflect.construct.bind():function(e,t,n){var o=[null];return o.push.apply(o,t),t=new(Function.bind.apply(e,o)),n&&l(t,n.prototype),t}).apply(null,arguments)}function g(e){var t="function"==typeof Map?new Map:void 0;return function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return p(e,arguments,u(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),l(n,e)}(e)}function h(e,t){if(null==e)return{};var n,o=function(e,t){if(null==e)return{};for(var n,o={},s=Object.keys(e),i=0;i<s.length;i++)n=s[i],0<=t.indexOf(n)||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols)for(var s=Object.getOwnPropertySymbols(e),i=0;i<s.length;i++)n=s[i],0<=t.indexOf(n)||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}function _(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(e){var t=d();return function(){var n,o=u(e);if(n=t?(n=u(this).constructor,Reflect.construct(o,arguments,n)):o.apply(this,arguments),o=this,n&&("object"==typeof n||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return _(o)}}function m(e,t){return I(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,s,i=[],a=!0,r=!1;try{for(n=n.call(e);!(a=(o=n.next()).done)&&(i.push(o.value),!t||i.length!==t);a=!0);}catch(e){r=!0,s=e}finally{try{a||null==n.return||n.return()}finally{if(r)throw s}}return i}}(e,t)||M(e,t)||C()}function v(e){return function(e){if(Array.isArray(e))return T(e)}(e)||y(e)||M(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 I(e){if(Array.isArray(e))return e}function y(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function M(e,t){var n;if(e)return"string"==typeof e?T(e,t):"Map"===(n="Object"===(n=Object.prototype.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)?T(e,t):void 0}function T(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function C(){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 E(e,t){var n,o,s,i,a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(a)return s=!(o=!0),{s:function(){a=a.call(e)},n:function(){var e=a.next();return o=e.done,e},e:function(e){s=!0,n=e},f:function(){try{o||null==a.return||a.return()}finally{if(s)throw n}}};if(Array.isArray(e)||(a=M(e))||t&&e&&"number"==typeof e.length)return a&&(e=a),i=0,{s:t=function(){},n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},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.")}var D={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",PINNED_GROUP_MESSAGE_UPDATED:"onPinnedGroupMessageUpdated"},S={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"},L={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},R=(a(K,[{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()}}]),K),k=(a(B,[{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}}]),B),O={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"}}},A={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},N="1.7.3",P=537048168,G="CHINA",U={HOST:{CURRENT:{DEFAULT:"wss://wss.im.qcloud.com",STAT:"https://events.im.qcloud.com"},setCurrent:function(){this.CURRENT=O.PRODUCTION[0<arguments.length&&void 0!==arguments[0]?arguments[0]:G]}},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"}},b={SEARCH_GRP_SNS:new k(0,Math.pow(2,1)).toString(),AV_HISTORY_MSG:new k(0,Math.pow(2,2)).toString(),GRP_COMMUNITY:new k(0,Math.pow(2,3)).toString(),MSG_TO_SPECIFIED_GRP_MBR:new k(0,Math.pow(2,4)).toString(),AV_MBR_LIST:new k(0,Math.pow(2,6)).toString(),USER_STATUS:new k(0,Math.pow(2,7)).toString(),CONV_MARK:new k(0,Math.pow(2,9)).toString(),CONV_GROUP:new k(0,Math.pow(2,10)).toString(),AV_BAN_MBR:new k(0,Math.pow(2,11)).toString(),MSG_EXT:new k(0,Math.pow(2,13)).toString(),GRP_COUNTER:new k(0,Math.pow(2,15)).toString(),PLUGIN_TRANSLATE:new k(Math.pow(2,6)).toString(),PLUGIN_VOICE_TO_TEXT:new k(Math.pow(2,7)).toString(),PLUGIN_CS:new k(Math.pow(2,8)).toString(),PLUGIN_PUSH:new k(Math.pow(2,9)).toString(),PLUGIN_BOT:new k(Math.pow(2,10)).toString(),MSG_REACTION:new k(Math.pow(2,16)).toString(),FOLLOW:new k(Math.pow(2,20)).toString()},w="group_profile",F=["Type","Name","Introduction","Notification","FaceUrl","Owner_Account","CreateTime","InfoSeq","LastInfoTime","LastMsgTime","MemberNum","MaxMemberNum","ApplyJoinOption","NextMsgSeq","ShutUpAllMember","InviteJoinOption"],x=["Role","JoinTime","MsgSeq","MsgFlag"],q="web.sdk.qcloud.com",V="web.sdk.cloud.tencent.cn",H="web.sdk.tencent.cn";function B(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0;s(this,B),this.high=e,this.low=t}function K(){s(this,K),this.cache=[],this.options=null}U.HOST.setCurrent(G);for(var j,Y="undefined"!=typeof wx&&"function"==typeof wx.getSystemInfoSync&&("mac"===wx.getSystemInfoSync().platform||"windows"===wx.getSystemInfoSync().platform),W="undefined"!=typeof wx&&"function"==typeof wx.getSystemInfoSync&&Boolean(wx.getSystemInfoSync().fontSizeSetting)||Y,J=W&&"function"==typeof wx.createGamePortal,z="undefined"!=typeof qq&&"function"==typeof qq.getSystemInfoSync&&Boolean(qq.getSystemInfoSync().fontSizeSetting),$="undefined"!=typeof tt&&"function"==typeof tt.getSystemInfoSync&&Boolean(tt.getSystemInfoSync().fontSizeSetting),X="undefined"!=typeof swan&&"function"==typeof swan.getSystemInfoSync&&Boolean(swan.getSystemInfoSync().fontSizeSetting),Z="undefined"!=typeof my&&"function"==typeof my.getSystemInfoSync&&Boolean(my.getSystemInfoSync().fontSizeSetting),Q=(Y="undefined"!=typeof jd&&"function"==typeof jd.getSystemInfoSync,"undefined"!=typeof uni&&"undefined"==typeof window&&"function"==typeof uni.requireNativePlugin),ee=W&&"object"===n(wx.miniapp),te="undefined"!=typeof uni,ne=W||z||$||X||Z||Q||Y,oe="undefined"==typeof window&&!ne&&void 0!==o&&void 0!==o.NativeScriptGlobals,se=void 0!==o&&(void 0!==o.nativeModuleProxy||void 0!==o.ReactNative),ie="undefined"!=typeof uni?!ne:"undefined"!=typeof window&&!ne&&!se,ae=z?qq:$?tt:X?swan:Z?my:W?wx:Q?uni:Y?jd:{},re=ie&&window&&window.navigator&&window.navigator.userAgent||"",ce=(Y="WEB",/(micromessenger|webbrowser)/i.test(re)?Y="WEB":z?Y="QQ_MP":$?Y="TT_MP":X?Y="BAIDU_MP":Z?Y="ALI_MP":W?Y=ee?"DONUT_NATIVE_APP":"WX_MP":Q?Y="UNI_NATIVE_APP":oe?Y="NS_NATIVE_APP":se&&(Y="RN_NATIVE_APP"),A[Y]),ue=(ee=/iPad/i.test(re),oe=/iPhone/i.test(re)&&!ee,Y=/iPod/i.test(re),oe||ee||Y),le=(oe=re.match(/OS (\d+)_/i))&&oe[1]?oe[1]:null,de=/Android/i.test(re),pe=(ee=re.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i))?(Y=ee[1]&&parseFloat(ee[1]),oe=ee[2]&&parseFloat(ee[2]),Y&&oe?parseFloat(ee[1]+"."+ee[2]):Y||null):null,ge=(ee=!(oe=/Edge/i.test(re))&&/Chrome/i.test(re),/MSIE/.test(re)||-1<re.indexOf("Trident")&&-1<re.indexOf("rv:11.0")),he=Y=!(Y=(Y=/MSIE\s(\d+)\.\d/.exec(re))&&parseFloat(Y[1]))&&/Trident\/7.0/i.test(re)&&/rv:11.0/.test(re)?11:Y,_e=(Y=/Safari/i.test(re)&&!ee&&!de&&!oe,/Windows/i.test(re)),fe=/MAC OS X/i.test(re),me=ie&&"undefined"!=typeof Worker&&!ge,ve=de||ue,Ie=ie&&void 0!==window.tencent_cloud_im_csig_flutter_for_web_25F_cy,ye="undefined"!=typeof window&&void 0!==window.navigator&&(ee=window.navigator.standalone,!(!ue||ee||Y)),Me="undefined"!=typeof console?console:void 0!==o&&o.console?o.console:"undefined"!=typeof window&&window.console?window.console:{},Te=function(){},Ce=["assert","clear","count","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","profile","profileEnd","table","time","timeEnd","timeStamp","trace","warn"],Ee=Ce.length;Ee--;)j=Ce[Ee],console[j]||(Me[j]=Te);function De(){var e=new Date;return e.setTime(Oe()),e}function Se(){ke=0}function Le(){return Math.floor(Oe()/1e3)}var Re=Me,ke=0,Oe=function(){return(new Date).getTime()+ke},Ae=0;function Ne(){return jt()?"%c Desk-Chat %c":"Desk-Chat"}function Pe(){var e=De();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 Ge={arguments2String:function(e){var t="";if(1===e.length)t=e[0];else for(var n=0,o=e.length;n<o;n++){if(ht(e[n]))try{t+=_t(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){jt()?Re[e](Ne(),"background:#0abf5b; padding:1px; border-radius:3px; color: #fff","background:transparent",Pe(),t):Re[e]("".concat(Ne()," ").concat(Pe()," ").concat(t))},d:function(){var e;Ae<=-1&&(e=this.arguments2String(arguments),this._exec("debug",e))},l:function(){var e;Ae<=0&&(e=this.arguments2String(arguments),this._exec("log",e))},log:function(){var e;Ae<=0&&(e=this.arguments2String(arguments),this._exec("log",e))},i:function(){var e;Ae<=1&&(e=this.arguments2String(arguments),this._exec("info",e))},w:function(){var e;Ae<=2&&(e=this.arguments2String(arguments),this._exec("warn",e))},e:function(){var e;Ae<=3&&(e=this.arguments2String(arguments),this._exec("error",e))},setLevel:function(e){e<4&&this._exec("log","set level from "+Ae+" to "+e),Ae=e},getLevel:function(){return Ae}},Ue={JPG:1,JPEG:1,GIF:2,PNG:3,BMP:4,UNKNOWN:255},be={NICK:"".concat(oe="Tag_Profile_IM_","Nick"),GENDER:"".concat(oe,"Gender"),BIRTHDAY:"".concat(oe,"BirthDay"),LOCATION:"".concat(oe,"Location"),SELFSIGNATURE:"".concat(oe,"SelfSignature"),ALLOWTYPE:"".concat(oe,"AllowType"),LANGUAGE:"".concat(oe,"Language"),AVATAR:"".concat(oe,"Image"),MESSAGESETTINGS:"".concat(oe,"MsgSettings"),ADMINFORBIDTYPE:"".concat(oe,"AdminForbidType"),LEVEL:"".concat(oe,"Level"),ROLE:"".concat(oe,"Role")},we={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")},Fe={UNKNOWN:"".concat(ee="Gender_Type_","Unknown"),FEMALE:"".concat(ee,"Female"),MALE:"".concat(ee,"Male")},xe={NONE:"".concat("AdminForbid_Type_","None"),SEND_OUT:"".concat("AdminForbid_Type_","SendOut")},qe={NEED_CONFIRM:"".concat("AllowType_Type_","NeedConfirm"),ALLOW_ANY:"".concat("AllowType_Type_","AllowAny"),DENY_ANY:"".concat("AllowType_Type_","DenyAny")},Ve="JoinedSuccess",He="WaitAdminApproval",Be="@TOPIC#_",Ke=Object.prototype.hasOwnProperty;function je(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(Xe(e)){for(var t in e)if(Ke.call(e,t))return!1;return!0}return!!(Ye(e)||We(e)||Je(e))&&0===e.size}function Ye(e){return"map"===ft(e)}function We(e){return"set"===ft(e)}function Je(e){return"file"===ft(e)}function ze(e){return null!==e&&("number"==typeof e&&!isNaN(+e)||"object"===n(e)&&e.constructor===Number)}function $e(e){return null!==e&&"object"===n(e)}function Xe(e){if("object"===n(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 Ze(e){return"function"==typeof Array.isArray?Array.isArray(e):"array"===ft(e)}function Qe(e){return Ze(e)&&0<e.length}function et(e){return"function"==typeof e}function nt(e){return"filelist"===ft(e)}function ot(e){return"string"==typeof e&&(e=e[0],!/[^a-zA-Z0-9]/.test(e))}function st(e,t,n,o){if(!ht(e)||!ht(t))return 0;for(var s,i=0,a=Object.keys(t),r=0,c=a.length;r<c;r++)if(s=a[r],!(gt(t[s])||n&&n.includes(s)))if(ht(e[s])&&ht(t[s]))i+=st(e[s],t[s],n,o);else{if(o&&o.includes(t[s]))continue;e[s]!==t[s]&&(e[s]=t[s],i+=1)}return i}function it(e,t){var n,o=new Map,s=E(e.entries());try{for(s.s();!(n=s.n()).done;){var i=m(n.value,2),a=i[0],r=i[1];r&&o.set(a,t?JSON.stringify(r):JSON.parse(JSON.stringify(r)))}}catch(e){s.e(e)}finally{s.f()}return o}function at(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 rt(e){return e=e||99999999,Math.round(Math.random()*e)}function ct(e,t){for(var n in e)if(e[n]===t)return 1}function ut(e){return-1===e.indexOf("http://")||-1===e.indexOf("https://")?"https://"+e:e.replace(/https|http/,"https")}function lt(e){if(0===Object.getOwnPropertyNames(e).length)return Object.create(null);var t,o,s=Array.isArray(e)?[]:Object.create(null);for(o in e)null!==e[o]?void 0!==e[o]?(t=n(e[o]),0<=["string","number","function","boolean"].indexOf(t)?s[o]=e[o]:s[o]=lt(e[o])):s[o]=void 0:s[o]=null;return s}var dt=["url"],pt=function(e){return"string"==typeof e},gt=function(e){return void 0===e},ht=function(e){return Ze(e)||$e(e)},_t=function(e){return e instanceof Error},ft=function(e){return Object.prototype.toString.call(e).match(/^\[object (.*)\]$/)[1].toLowerCase()},mt=(Date.now||(Date.now=function(){return(new Date).getTime()}),"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"),vt=mt.length,It={};function yt(e,t){var n;return!(!Ze(e)||!Ze(t))&&(n=!1,t.forEach((function(t){var o=t.key,s=(t=t.value,e.find((function(e){return e.key===o})));s?s.value!==t&&(s.value=t,n=!0):(e.push({key:o,value:t}),n=!0)})),n)}function Mt(e){return je(e)?[]:e.filter((function(e){return!0===e.isModified}))}function Tt(e){if(Xe(e)&&Xe(e.webhookInfo)){var t=[];if(e.webhookInfo.disableCloudMessagePreHook&&t.push("ForbidBeforeSendMsgCallback"),e.webhookInfo.disableCloudMessagePostHook&&t.push("ForbidAfterSendMsgCallback"),0!==t.length)return t}}function Ct(e){return je(e)?[]:e.filter((function(e){return!1===e.isModified}))}function Et(e){return e===S.GRP_AVCHATROOM}function Dt(e){var t=e.type;return e=e.groupID,t===S.GRP_COMMUNITY||"".concat(e).startsWith("@TGS#_")&&!"".concat(e).includes(Be)}function St(e){return"".concat(e).startsWith("@TGS#_")&&"".concat(e).includes(Be)}function Lt(e){return pt(e)&&e.slice(0,3)===S.CONV_C2C}function Rt(e){return pt(e)&&e.slice(0,5)===S.CONV_GROUP}function kt(e){return pt(e)&&e===S.CONV_SYSTEM}function Ot(e,t){var n={};return Object.keys(e).forEach((function(o){n[o]=t(e[o],o)})),n}function At(e){return se?Promise.resolve({width:0,height:0}):ne?new Promise((function(t,n){ae.getImageInfo({src:e,success:function(e){t({width:e.width,height:e.height})},fail:function(){t({width:0,height:0})}})})):ge&&9===he?Promise.resolve({width:0,height:0}):new Promise((function(t,n){var o=new Image;o.onload=function(){t({width:this.width,height:this.height}),o=null},o.onerror=function(){t({width:0,height:0}),o=null},o.src=e}))}function Nt(){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 Pt(){var e=de?"android":ue?"ios":_e?"windows":fe?"mac":"unknown";if(ne)try{var t=ae.getSystemInfoSync().platform;void 0!==t&&(e=t)}catch(e){}return e}function Gt(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 s=parseInt(e[o]),i=parseInt(t[o]);if(i<s)return 1;if(s<i)return-1}return 0}function Ut(e){var t=void 0===(t=e.originUrl)?void 0:t,n=e.originWidth,o=e.originHeight,s=(e=void 0===(e=e.min)?198:e,{url:void 0,width:0,height:0});return((n=parseInt(n))<=(o=parseInt(o))?n:o)<=e?(s.url=t,s.width=n,s.height=o):(o<=n?(s.width=Math.ceil(n*e/o),s.height=e):(s.width=e,s.height=Math.ceil(o*e/n)),o=t&&-1<t.indexOf("?")?"".concat(t,"&"):"".concat(t,"?"),s.url="".concat(o,198===e?"imageView2/3/w/198/h/198":"imageView2/3/w/720/h/720")),gt(t)?h(s,dt):s}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 wt(e){return(e=e.servcmd).slice(e.indexOf(".")+1)}function Ft(e,t){return Math.round(Number(e)*Math.pow(10,t))/Math.pow(10,t)}function xt(e,t){return e.includes(t)}function qt(e,t){return e.includes(t)}function Vt(e){return e.split(Be)[0]}var Ht=function(e,t,n){if(gt(t))return"";switch(e){case S.MSG_TEXT:return t.text;case S.MSG_IMAGE:return n?"[Image]":"[图片]";case S.MSG_LOCATION:return n?"[Location]":"[位置]";case S.MSG_AUDIO:return n?"[Voice]":"[语音]";case S.MSG_VIDEO:return n?"[Video]":"[视频]";case S.MSG_FILE:return n?"[File]":"[文件]";case S.MSG_CUSTOM:return n?"[Custom Messages]":"[自定义消息]";case S.MSG_GRP_TIP:return n?"[Group Notification]":"[群提示消息]";case S.MSG_GRP_SYS_NOTICE:return n?"[Group System Message]":"[群系统通知]";case S.MSG_FACE:return n?"[Animated Sticker]":"[动画表情]";case S.MSG_MERGER:return n?"[Chat Record]":"[聊天记录]";default:return""}};function Bt(e){return e===S.MSG_TEXT||e===S.MSG_CUSTOM||e===S.MSG_LOCATION||e===S.MSG_FACE}function Kt(e){var t=[];if(pt(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 jt(){return!ge&&!ne}function Yt(e){return"the length of userIDList cannot exceed ".concat(e)}function Wt(e){var t;if(Ze(e)&&0!==e.length)return t=0,e.forEach((function(e){t+=e})),t.toFixed(0)}function Jt(e){var t;if(Ze(e)&&0!==e.length)return t=0,e.forEach((function(e){t+=e})),(t/e.length).toFixed(0)}function zt(e,t,n){t=!(1<arguments.length&&void 0!==t)||t,n=!(2<arguments.length&&void 0!==n)||n;var 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 $t(e){return!!(e&&1<e)}function Xt(e,t,n,o){var s,i,a;return void 0===t||(s=!0,t.required&&je(e)&&(Ge.e("[".concat(n,'] Missing required params: "').concat(o,'".')),s=!1),je(e)||(i=ft(e))===(a=t.type.toLowerCase())||"asyncfunction"===i&&"function"===a||(Ge.e("[".concat(n,'] Invalid params: type check failed for "').concat(o,'". Expected ').concat(t.type,".")),s=!1),t.validator&&!t.validator(e,n,o)&&(Ge.e("[".concat(n,'] Invalid params: custom validator check failed for "').concat(o,'".')),s=!1),s)}function Zt(e){return!(!e||!(Lt(e)||Rt(e)||kt(e))&&((e=xn("InvalidConversationID",e))&&Ge.w(e),1))}function Qt(e){""!==e.desc&&""!==xn("API_REFER")&&Ge.w("[".concat(e.api,"] | ").concat(e.paramName," | ").concat(e.desc,", ").concat(xn("API_REFER")).concat(e.api))}function en(){return xn("StringRequiredLog")}function tn(e){return xn("NonEmptyStringRequiredLog",e)}function nn(){return xn("NumberRequiredLog")}function on(){return xn("UndefinedNotAllowedLog")}function sn(){return xn("FileRequiredLog")}function an(){return xn("FunctionRequiredLog")}function rn(){return xn("ArrayRequiredLog")}function cn(){return xn("NonEmptyArrayLog")}function un(){return xn("CallbackMissingLog")}function ln(){return xn("PositiveIntegerRequiredLog")}function dn(e,t){return xn("StringNotLongerThanLog",e,t)}function pn(e,t){return xn("NumberGreaterThanLog",e,t)}function gn(e,t){return xn("NumberGreaterOrEqualLog",e,t)}function hn(e){return xn("KeyValueStringRequiredLog",e)}function _n(){return xn("PlainObjectRequiredLog")}function fn(){return xn("NonEmptyContentRequiredLog")}function mn(){return xn("FileNotSelectedLog")}function vn(){return xn("MessageInstanceRequiredLog")}function In(){return xn("NonAnonymousFunctionLog")}function yn(){return xn("MessageExtensionNotAvailableLog")}function Mn(){return xn("MessageReactionRequiredLog")}function Tn(e,t){return xn("ContainsUnsupportedTypeLog",e,t)}function Cn(e,t,n,o){var s=o.allowUndefined,i=o.allowEmpty;return o=o.maxLength,gt(e)?!!s||(Qt({api:t,paramName:n,desc:on()}),!1):Ze(e)?!(0===e.length&&(Qt({api:t,paramName:n,desc:cn()}),!i)||o&&e.length>o&&(Qt({api:t,paramName:n,desc:xn("MaximumArrayLengthLog",n,o)}),1)):(Qt({api:t,paramName:n,desc:rn()}),!1)}function En(e,t,n,o){var s=o.allowUndefined,i=o.min;return o=o.max,gt(e)?!!s||(Qt({api:t,paramName:n,desc:on()}),!1):ze(e)?ze(i)&&e<i?(Qt({api:t,paramName:n,desc:0===i?gn(n,i):pn(n,i-1)}),!1):!(ze(o)&&o<e&&(Qt({api:t,paramName:n,desc:xn("MaximumNumberLog",n,o)}),1)):(Qt({api:t,paramName:n,desc:nn()}),!1)}function Dn(e){return{code:0,data:e||{}}}function Sn(e){return Promise.resolve(Dn(e))}function Ln(e){var t,n=1<arguments.length&&void 0!==arguments[1]&&arguments[1];return e instanceof Hn?(n&&null!==Kn&&Kn.emit(D.ERROR,e),Promise.reject(e)):e instanceof Error?(t=new Hn({code:Bn.UNCAUGHT_ERROR}),n&&null!==Kn&&Kn.emit(D.ERROR,t),Promise.reject(t)):gt(e)||gt(e.code)?Promise.reject(new Hn({code:Bn.UNCAUGHT_ERROR})):(t=new Hn(e),n&&null!==Kn&&Kn.emit(D.ERROR,t),Promise.reject(t))}var Rn,kn="unSend",On="success",An="fail",Nn="notStart",Pn="pending",Gn="resolved",Un="rejected",bn={type:"Boolean",required:!0},wn={type:"number",required:!0},Fn={keywordListForMsg:{type:"Array",required:!1,validator:function(e,t,n){return Cn(e,t,n,{allowUndefined:!0,allowEmpty:!0,maxLength:5})}},keywordListExceptMsg:{type:"Array",required:!0,validator:function(e,t,n){return Cn(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||Qt({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 En(e,t,n,{allowUndefined:!0,min:1,max:100})}},groupTypeList:{type:"Array",required:!1,validator:function(e,t,n){var o;return!e||!(!Cn(e,t,n,{allowUndefined:!0,allowEmpty:!0})||(o=[S.GRP_PUBLIC,S.GRP_COMMUNITY,S.GRP_WORK,S.GRP_MEETING],0<e.filter((function(e){return-1===o.indexOf(e)})).length&&(Qt({api:t,paramName:n,desc:Tn(n,"group")}),1)))}}},xn=null,qn={hookGetAPITips:function(e){xn=e},login:{userID:Y={type:"String",required:!0},userSig:Y},addToBlacklist:{userIDList:oe={type:"Array",required:!0}},removeFromBlacklist:{userIDList:oe},on:[{name:"eventName",type:"String",validator:function(e,t,n){return"string"==typeof e&&0!==e.length||(Qt({api:t,paramName:n,desc:tn(n)}),!1)}},{name:"handler",type:"Function",validator:function(e,t,n){return"function"!=typeof e?(Qt({api:t,paramName:n,desc:an()}),!1):(""===e.name&&Qt({api:t,paramName:n,desc:In()}),!0)}}],once:[{name:"eventName",type:"String",validator:function(e,t,n){return"string"==typeof e&&0!==e.length||(Qt({api:t,paramName:n,desc:tn(n)}),!1)}},{name:"handler",type:"Function",validator:function(e,t,n){return"function"!=typeof e?(Qt({api:t,paramName:n,desc:an()}),!1):(""===e.name&&Qt({api:t,paramName:n,desc:In()}),!0)}}],off:[{name:"eventName",type:"String",validator:function(e,t,n){return"string"==typeof e&&0!==e.length||(Qt({api:t,paramName:n,desc:tn(n)}),!1)}},{name:"handler",type:"Function",validator:function(e,t,n){return"function"!=typeof e?(Qt({api:t,paramName:n,desc:an()}),!1):(""===e.name&&Qt({api:t,paramName:n,desc:In()}),!0)}}],sendMessage:[t({name:"message"},ee={type:"Object",required:!0})],setMessageExtensions:[t(t({name:"message"},ee),{},{validator:function(e,t,n){return e.status===On&&!0===e.isSupportExtension||(Qt({api:t,paramName:n,desc:yn()}),!1)}}),t({name:"extensions"},oe)],getMessageExtensions:[t(t({name:"message"},ee),{},{validator:function(e,t,n){return e.status===On&&!0===e.isSupportExtension||(Qt({api:t,paramName:n,desc:yn()}),!1)}})],deleteMessageExtensions:[t(t({name:"message"},ee),{},{validator:function(e,t,n){return e.status===On&&!0===e.isSupportExtension||(Qt({api:t,paramName:n,desc:yn()}),!1)}})],addMessageReaction:[t(t({name:"message"},ee),{},{validator:function(e,t,n){return e.status===On||(Qt({api:t,paramName:n,desc:Mn()}),!1)}}),t({name:"reactionID"},Y)],removeMessageReaction:[t(t({name:"message"},ee),{},{validator:function(e,t,n){return e.status===On||(Qt({api:t,paramName:n,desc:Mn()}),!1)}}),t({name:"reactionID"},Y)],getMessageReactions:{messageList:t({},oe)},getAllUserListOfMessageReaction:{message:t(t({},ee),{},{validator:function(e,t,n){return e.status===On||(Qt({api:t,paramName:n,desc:Mn()}),!1)}}),reactionID:t({},Y),nextSeq:{type:"Number"},count:{type:"Number"}},getMessageList:{conversationID:t(t({},Y),{},{validator:Zt}),nextReqMessageID:{type:"String"},count:{type:"Number",validator:function(e,t,n){return!(!gt(e)&&!/^[1-9][0-9]*$/.test(e)&&(Qt({api:t,paramName:n,desc:ln()}),1))}}},getMessageListHopping:{conversationID:t(t({},Y),{},{validator:Zt}),sequence:{type:"Number"},time:{type:"Number"},direction:{type:"Number",validator:function(e,t,n){return!(!gt(e)&&0!==e&&1!==e&&(Qt({api:t,paramName:n,desc:xn("0Or1RequiredLog")}),1))}},count:{type:"Number",validator:function(e,t,n){return!(!gt(e)&&!/^[1-9][0-9]*$/.test(e)&&(Qt({api:t,paramName:n,desc:ln}),1))}}},setMessageRead:{conversationID:t(t({},Y),{},{validator:Zt})},setAllMessageRead:{scope:{type:"String",required:!1,validator:function(e,t,n){return!e||-1!==[S.READ_ALL_C2C_MSG,S.READ_ALL_GROUP_MSG,S.READ_ALL_MSG].indexOf(e)||(Qt({api:t,paramName:n,desc:xn("ValidScopeRequired")}),!1)}}},getConversationProfile:[t(t({name:"conversationID"},Y),{},{validator:Zt})],clearHistoryMessage:[t(t({name:"conversationID"},Y),{},{validator:Zt})],pinConversation:{conversationID:t(t({},Y),{},{validator:Zt}),isPinned:t({},bn)},setConversationDraft:{conversationID:t(t({},Y),{},{validator:Zt}),draftText:{type:"String",validator:function(e,t,n){return!!pt(e)||(Qt({api:t,paramName:n,desc:en()}),!1)}}},setConversationCustomData:{conversationIDList:t({},oe),customData:{type:"String",validator:function(e,t,n){return pt(e)?!(256<e.length&&(Qt({api:t,paramName:n,desc:dn(n,256)}),1)):(Qt({api:t,paramName:n,desc:en()}),!1)}}},markConversation:{conversationIDList:t({},oe),markType:{type:"number",validator:function(e,t,n){return ze(e)?e<=0?(Qt({api:t,paramName:n,desc:pn(n,0)}),!1):!(e>=Math.pow(2,64)&&(Qt({api:t,paramName:n,desc:xn("NumberLessThanLog",n,"Math.pow(2,64)")}),1)):(Qt({api:t,paramName:n,desc:nn()}),!1)}},enableMark:t({},bn)},createConversationGroup:{conversationIDList:t({},oe),groupName:t(t({},Y),{},{validator:function(e,t,n){return!(!e||32<e.length&&(Qt({api:t,paramName:n,desc:dn(n,32)}),1))}})},deleteConversationGroup:[t({name:"groupName"},Y)],renameConversationGroup:{oldName:t({},Y),newName:t(t({},Y),{},{validator:function(e,t,n){return!(!e||32<e.length&&(Qt({api:t,paramName:n,desc:dn(n,32)}),1))}})},addConversationsToGroup:{conversationIDList:t({},oe),groupName:t({},Y)},deleteConversationsFromGroup:{conversationIDList:t({},oe),groupName:t({},Y)},getGroupList:{groupProfileFilter:{type:"Array"}},getGroupProfile:{groupID:Y,groupCustomFieldFilter:{type:"Array"},memberCustomFieldFilter:{type:"Array"}},getGroupProfileAdvance:{groupIDList:oe},createGroup:{name:Y},joinGroup:{groupID:Y,type:{type:"String"},applyMessage:{type:"String"}},quitGroup:[t({name:"groupID"},Y)],pinGroupMessage:{groupID:Y,message:ee,isPinned:bn},getPinnedGroupMessageList:[t({name:"groupID"},Y)],handleApplication:{message:ee,handleAction:Y,handleMessage:{type:"String"}},changeGroupOwner:{groupID:Y,newOwnerID:Y},updateGroupProfile:{groupID:Y,muteAllMembers:{type:"Boolean"}},dismissGroup:[t({name:"groupID"},Y)],searchGroupByID:[t({name:"groupID"},Y)],getGroupOnlineMemberCount:[t({name:"groupID"},Y)],initGroupAttributes:{groupID:Y,groupAttributes:t(t({},ee),{},{validator:function(e,t,n){var o=!0;return Object.keys(e).forEach((function(s){if(!pt(e[s]))return Qt({api:t,paramName:n,desc:hn("value")}),o=!1})),o}})},setGroupAttributes:{groupID:Y,groupAttributes:t(t({},ee),{},{validator:function(e,t,n){var o=!0;return Object.keys(e).forEach((function(s){if(!pt(e[s]))return Qt({api:t,paramName:n,desc:hn("value")}),o=!1})),o}})},deleteGroupAttributes:{groupID:Y,keyList:{type:"Array",validator:function(e,t,n){var o;return gt(e)||!Ze(e)?(Qt({api:t,paramName:n,desc:rn()}),!1):!!je(e)||(o=!0,e.forEach((function(e){if(!pt(e))return Qt({api:t,paramName:n,desc:xn("StringArrayRequiredLog")}),o=!1})),o)}}},getGroupAttributes:{groupID:Y,keyList:{type:"Array",validator:function(e,t,n){var o;return gt(e)||!Ze(e)?(Qt({api:t,paramName:n,desc:rn()}),!1):!!je(e)||(o=!0,e.forEach((function(e){if(!pt(e))return Qt({api:t,paramName:n,desc:hn("key")}),o=!1})),o)}}},setGroupCounters:{groupID:Y,counters:ee},increaseGroupCounter:{groupID:Y,key:Y,value:wn},decreaseGroupCounter:{groupID:Y,key:Y,value:wn},getGroupCounters:{groupID:Y},getGroupMemberList:{groupID:Y,count:{type:"Number"}},getGroupMemberProfile:{groupID:Y,userIDList:oe,memberCustomFieldFilter:{type:"Array"}},addGroupMember:{groupID:Y,userIDList:oe},setGroupMemberRole:{groupID:Y,userID:Y,role:Y},setGroupMemberMuteTime:{groupID:Y,userID:Y,muteTime:{type:"Number",validator:function(e){return 0<=e}}},setGroupMemberNameCard:{groupID:Y,userID:{type:"String"},nameCard:{type:"String",validator:function(e,t,n){return pt(e)?(e.length,!0):(Qt({api:t,paramName:n,desc:en()}),!1)}}},setGroupMemberCustomField:{groupID:Y,userID:{type:"String"},memberCustomField:oe},deleteGroupMember:{groupID:Y},markGroupMemberList:{groupID:Y,markType:{type:"number",validator:function(e,t,n){return ze(e)?!(e<1e3&&(Qt({api:t,paramName:n,desc:gn(n,1e3)}),1)):(Qt({api:t,paramName:n,desc:nn()}),!1)}},userIDList:t({},oe),enableMark:t({},bn)},createTextMessage:{to:Y,conversationType:Y,payload:t(t({},ee),{},{validator:function(e,t,n){return Xe(e)?pt(e.text)?0!==e.text.length||(Qt({api:t,paramName:"payload.text",desc:fn()}),!1):(Qt({api:t,paramName:"payload.text",desc:en()}),!1):(Qt({api:t,paramName:n,desc:_n()}),!1)}})},createTextAtMessage:{to:Y,conversationType:Y,payload:t(t({},ee),{},{validator:function(e,t,n){return Xe(e)?pt(e.text)?0===e.text.length?(Qt({api:t,paramName:"payload.text",desc:fn()}),!1):!(e.atUserList&&!Ze(e.atUserList)&&(Qt({api:t,paramName:"payload.atUserList",desc:rn()}),1)):(Qt({api:t,paramName:"payload.text",desc:en()}),!1):(Qt({api:t,paramName:n,desc:_n()}),!1)}})},createCustomMessage:{to:Y,conversationType:Y,payload:t(t({},ee),{},{validator:function(e,t,n){return Xe(e)?e.data&&!pt(e.data)?(Qt({api:t,paramName:"payload.data",desc:en()}),!1):e.description&&!pt(e.description)?(Qt({api:t,paramName:"payload.description",desc:en()}),!1):!(e.extension&&!pt(e.extension)&&(Qt({api:t,paramName:"payload.extension",desc:en()}),1)):(Qt({api:t,paramName:"payload",desc:_n()}),!1)}})},createImageMessage:{to:Y,conversationType:Y,payload:t(t({},ee),{},{validator:function(e,t,n){if(!Xe(e))return Qt({api:t,paramName:n,desc:_n()}),!1;if(gt(e.file))return Qt({api:t,paramName:"payload.file",desc:on()}),!1;if(ie){if(!(e.file instanceof HTMLInputElement||Je(e.file)))return Xe(e.file)&&"undefined"!=typeof uni?0!==e.file.tempFilePaths.length&&0!==e.file.tempFiles.length||(Qt({api:t,paramName:"payload.file",desc:mn()}),!1):(Qt({api:t,paramName:"payload.file",desc:sn()}),!1);if(e.file instanceof HTMLInputElement&&0===e.file.files.length)return Qt({api:t,paramName:"payload.file",desc:mn()}),!1}return!0},onProgress:{type:"Function",required:!1,validator:function(e,t,n){return gt(e)&&Qt({api:t,paramName:n,desc:un()}),!0}}})},createAudioMessage:{to:Y,conversationType:Y,payload:t(t({},ee),{},{validator:function(e,t,n){return!!Xe(e)||(Qt({api:t,paramName:n,desc:_n()}),!1)}}),onProgress:{type:"Function",required:!1,validator:function(e,t,n){return gt(e)&&Qt({api:t,paramName:n,desc:un()}),!0}}},createVideoMessage:{to:Y,conversationType:Y,payload:t(t({},ee),{},{validator:function(e,t,n){if(!Xe(e))return Qt({api:t,paramName:n,desc:_n()}),!1;if(gt(e.file))return Qt({api:t,paramName:"payload.file",desc:on()}),!1;if(ie){if(!(e.file instanceof HTMLInputElement||Je(e.file)))return Xe(e.file)&&"undefined"!=typeof uni?!!Je(e.file.tempFile)||(Qt({api:t,paramName:"payload.file",desc:mn()}),!1):(Qt({api:t,paramName:"payload.file",desc:sn()}),!1);if(e.file instanceof HTMLInputElement&&0===e.file.files.length)return Qt({api:t,paramName:"payload.file",desc:mn()}),!1}return!0}}),onProgress:{type:"Function",required:!1,validator:function(e,t,n){return gt(e)&&Qt({api:t,paramName:n,desc:un()}),!0}}},createFaceMessage:{to:Y,conversationType:Y,payload:t(t({},ee),{},{validator:function(e,t,n){return Xe(e)?ze(e.index)?!!pt(e.data)||(Qt({api:t,paramName:"payload.data",desc:en()}),!1):(Qt({api:t,paramName:"payload.index",desc:nn()}),!1):(Qt({api:t,paramName:n,desc:_n()}),!1)}})},createFileMessage:{to:Y,conversationType:Y,payload:t(t({},ee),{},{validator:function(e,t,n){if(!Xe(e))return Qt({api:t,paramName:n,desc:_n()}),!1;if(gt(e.file))return Qt({api:t,paramName:"payload.file",desc:on()}),!1;if(ie){if(!(e.file instanceof HTMLInputElement||Je(e.file)))return Xe(e.file)&&"undefined"!=typeof uni?0!==e.file.tempFilePaths.length&&0!==e.file.tempFiles.length||(Qt({api:t,paramName:"payload.file",desc:mn()}),!1):(Qt({api:t,paramName:"payload.file",desc:sn()}),!1);if(e.file instanceof HTMLInputElement&&0===e.file.files.length)return Qt({api:t,paramName:"payload.file",desc:mn()}),!1}return!0}}),onProgress:{type:"Function",required:!1,validator:function(e,t,n){return gt(e)&&Qt({api:t,paramName:n,desc:un()}),!0}}},createLocationMessage:{to:Y,conversationType:Y,payload:t(t({},ee),{},{validator:function(e,t,n){return Xe(e)?pt(e.description)?ze(e.longitude)?!!ze(e.latitude)||(Qt({api:t,paramName:"payload.latitude",desc:nn()}),!1):(Qt({api:t,paramName:"payload.longitude",desc:nn()}),!1):(Qt({api:t,paramName:"payload.description",desc:en()}),!1):(Qt({api:t,paramName:n,desc:_n()}),!1)}})},createMergerMessage:{to:Y,conversationType:Y,payload:t(t({},ee),{},{validator:function(e,t,n){var o;return je(e.messageList)?(Qt({api:t,paramName:"payload.messageList",desc:cn()}),!1):je(e.compatibleText)?(Qt({api:t,paramName:"payload.compatibleText",desc:tn("compatibleText")}),!1):(o=!1,e.messageList.forEach((function(e){e.status===An&&(o=!0)})),!o||(Qt({api:t,paramName:"payload.messageList",desc:xn("MergeFailedMessageLog")}),!1))}})},revokeMessage:[t(t({name:"message"},ee),{},{validator:function(e,t,n){return je(e)?(Qt({api:t,paramName:n,desc:vn()}),!1):e.conversationType===S.CONV_SYSTEM?(Qt({api:t,paramName:n,desc:xn("MessageCanBeRevokedDesc")}),!1):!0!==e.isRevoked||(Qt({api:t,paramName:n,desc:xn("MessageRevokedLog")}),!1)}})],deleteMessage:[t(t({name:"messageList"},oe),{},{validator:function(e,t,n){return!je(e)||(Qt({api:t,paramName:n,desc:cn()}),!1)}})],translateText:{sourceTextList:oe,sourceLanguage:Y,targetLanguage:Y},convertVoiceToText:{message:t(t({},ee),{},{validator:function(e,t,n){return je(e)?(Qt({api:t,paramName:n,desc:vn()}),!1):e.type===S.MSG_AUDIO&&e.status===On||(Qt({api:t,paramName:n,desc:xn("AudioMessageRequiredLog")}),!1)}})},modifyMessage:[t(t({name:"message"},ee),{},{validator:function(e,t,n){return je(e)?(Qt({api:t,paramName:n,desc:vn()}),!1):e.conversationType===S.CONV_SYSTEM?(Qt({api:t,paramName:n,desc:xn("MessageCanBeModifiedLog")}),!1):!0!==e._onlineOnlyFlag||(Qt({api:t,paramName:n,desc:xn("OnlineMessageNotSupportLog")}),!1)}})],searchCloudMessages:{keywordList:Fn.keywordListForMsg,keywordListMatchType:Fn.keywordListMatchType,cursor:Fn.cursor,senderUserIDList:{type:"Array",required:!1,validator:function(e,t,n){return Cn(e,t,n,{allowUndefined:!0,allowEmpty:!0,maxLength:5})}},messageTypeList:{type:"Array",required:!1,validator:function(e,t,n){var o;return!e||!(!Cn(e,t,n,{allowUndefined:!0,allowEmpty:!0})||(o=[S.MSG_TEXT,S.MSG_IMAGE,S.MSG_AUDIO,S.MSG_FILE,S.MSG_VIDEO,S.MSG_LOCATION,S.MSG_CUSTOM,S.MSG_MERGER],0<e.filter((function(e){return-1===o.indexOf(e)})).length&&(Qt({api:t,paramName:n,desc:Tn(n,"message")}),1)))}},conversationID:{type:"String",required:!1,validator:function(e){return!e||Zt(e)}},timePosition:{type:"number",required:!1,validator:function(e,t,n){return En(e,t,n,{allowUndefined:!0,min:0})}},timePeriod:{type:"number",required:!1,validator:function(e,t,n){return En(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 En(e,t,n,{allowUndefined:!0,min:0})}},maxBirthday:{type:"Number",required:!1,validator:function(e,t,n){return En(e,t,n,{allowUndefined:!0,min:0})}},gender:{type:"String",required:!1,validator:function(e,t,n){return!e||e===S.GENDER_FEMALE||e===S.GENDER_MALE||Qt({api:t,paramName:n,desc:"".concat(e," is invalid match type")})}}},searchCloudGroups:{keywordList:Fn.keywordListExceptMsg,keywordListMatch