@rongcloud/imlib-next 5.46.0-enterprise-alpha.4 → 5.46.1-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import{ConversationType as e,EventEmitter as t,RCConnectionStatus as n,VersionManage as i,assert as o,AssertRules as r,isArray as s,isHttpUrl as a,LogDBProxy as u,APIContext as d,fail as c,ErrorCode as l,ok as f,LogTagId as v,MessageType as h,getMessageTypeDescription as g,MAX_UPLOAD_FILE_SIZE as E,UPLOAD_FILE_CHUNK_SIZE as m,httpRequest as p,fixUrlProtocol as S,UploadMethod as _,UUId as T,FileType as I,promiseWithResolvers as C,MAX_MESSAGE_CONTENT_BYTES as A,Validator as R,validate as N,MessageDirection as M,ReceivedStatus as U,SentStatus as O,NotificationStatus as x,trans2NotificationLevel as y,trans2NotificationStatus as P,transformReceivedStatusFlag as D,MAX_U32_INTEGER as L,usingCppEngine as b}from"@rongcloud/engine";export{AreaCode,ChatroomEntryType,ChatroomSyncStatusReason,ChatroomUserChangeType,ChrmMemBanType,ChrmMemOperateType,ChrmSyncStatus,ConnectionStatus,ConversationType,ConversationUnreadCountFilter,DirectionType,ErrorCode,FileType,FilterRobotType,FriendAddPermission,FriendApplicationStatus,FriendApplicationType,FriendRelationType,GroupApplicationDirection,GroupApplicationStatus,GroupApplicationType,GroupInviteHandlePermission,GroupJoinPermission,GroupMemberInfoEditPermission,GroupMemberRole,GroupOperation,GroupOperationPermission,GroupReadReceiptVersion,InterruptionLevel,LogL,LogLevel,MentionedType,MessageAuditType,MessageBlockSourceType,MessageBlockType,MessageDirection,MessageReactionOperationType,MessageType,NotificationLevel,NotificationStatus,OnlineStatus,OperateStatus,Platform,Platform as PlatformInfo,PushImportanceHonor,PushNotificationQuietHoursLevel,QueryFriendsDirectionType,QuoteMessageStatus,RCConnectionStatus,ReceivedStatus,ReferenceMessageStatus,SentStatus,SpeechToTextStatus,StreamMessageResponseEventType,SubscribeOperationType,SubscribeType,TranslateMessageParam,TranslateMode,TranslateStatus,TranslateStrategy,TranslateTextParam,UltraGroupChannelChangeType,UltraGroupChannelType,UploadMethod,UserProfileVisibility,UserSettingsChangedKey,UserType,createLogDBProxy,fail,ok}from"@rongcloud/engine";
1
+ import{ConversationType as e,EventEmitter as t,RCConnectionStatus as n,VersionManage as i,APIContext as o,assert as r,AssertRules as s,isArray as a,isHttpUrl as u,LogDBProxy as d,LogTagId as c,MessageType as l,getMessageTypeDescription as f,MAX_UPLOAD_FILE_SIZE as v,fail as E,ErrorCode as h,UPLOAD_FILE_CHUNK_SIZE as m,httpRequest as p,fixUrlProtocol as g,ok as S,UploadMethod as _,UUId as I,FileType as T,promiseWithResolvers as A,MAX_MESSAGE_CONTENT_BYTES as R,Validator as C,getFileUrl as N,getFileToken as M,batchClearLocalMessagesByTimestamp as O,batchInsertMessage as U,clearLocalMessages as y,deleteLocalMessages as P,deleteLocalMessagesByTimestamp as D,deleteLocalUGMessagesForAllChannel as b,getContinuousMessages as L,getHistoryMessagesByObjectNames as G,getLocalMessage as x,getLocalMessageCount as F,getMessagesAroundTimestamp as w,getUnreadMentionedMessages as B,searchMessagesWithParams as H,setCheckChatRoomDuplicateMessage as k,setCheckDuplicateMessage as V,setMessageContent as j,setMessageReceivedStatus as Y,transformReceivedStatusFlag as z,setMessageSentStatus as $,setMessageSpeechToTextVisible as q,setMessageStatusToRead as W,MessageDirection as X,insertMessage as Q,searchMessages as K,MAX_U32_INTEGER as J,batchDeleteConversations as Z,batchSetConversationNotificationLevel as ee,batchSetConversationToTop as te,batchSetConversationTranslateStrategy as ne,clearAllUnreadCount as ie,clearUnreadCount as oe,clearRealtimeConUnreadCount as re,clearTextMessageDraft as se,createConversationListLoader as ae,getAllConversationList as ue,getAllUnreadMentionedCount as de,getBlockedConversationList as ce,getConversation as le,getConversationList as fe,getConversationListByTimestamp as ve,getConversationNotificationLevel as Ee,trans2NotificationStatus as he,getConversationTypeNotificationLevel as me,getConversationsIncludingRobots as pe,getRealtimeConTotalUnreadCount as ge,batchGetRealtimeConUnreadCount as Se,getRealtimeConversations as _e,getTextMessageDraft as Ie,getTopConversationList as Te,getTotalUnreadCount as Ae,getTotalUnreadCountByLevels as Re,getUnreadConversationList as Ce,getConversationUnreadCount as Ne,getUnreadMentionMeConversationList as Me,getUnreadMentionedCount as Oe,markRemoteConversationAsRead as Ue,removeConversation as ye,removeRealtimeConversations as Pe,saveTextMessageDraft as De,NotificationStatus as be,trans2NotificationLevel as Le,setConversationTypeNotificationLevel as Ge,clearEditedMessageDraft as xe,getConversations as Fe,getEditedMessageDraft as we,syncRemoteConversations as Be,getUntaggedConversationListByPage as He,saveEditedMessageDraft as ke,searchConversationByContent as Ve,validate as je,batchClearRemoteHistoryMessages as Ye,batchGetMessageReadReceiptInfoV4 as ze,deleteRemoteMessageByTimestamp as $e,clearUnreadCountByTimestamp as qe,deleteRemoteMessage as We,getFirstUnreadMessage as Xe,getFirstUnreadMessageDigest as Qe,getHistoryMessage as Ke,getMessageReadReceiptInfoV5 as Je,getMessageReadReceiptInfoV5ByIdentifiers as Ze,getMessageReadReceiptV4 as et,getMessageReader as tt,getMessagesByUIds as nt,getMessagesReadReceiptByUsersV5 as it,getMessagesReadReceiptUsersByPageV5 as ot,getRemoteHistoryMessages as rt,modifyMessageWithParams as st,recallMessage as at,refreshReferenceMessageWithParams as ut,removeMessageExpansion as dt,requestSpeechToTextForMessage as ct,requestStreamMessageContent as lt,sendReadReceiptMessage as ft,sendReadReceiptMessageV4 as vt,sendReadReceiptRequest as Et,sendReadReceipt as ht,sendReadReceiptResponseV5 as mt,sendSyncReadStatusMessage as pt,sendTypingStatus as gt,translateMessagesWithParams as St,translateTextsWithParams as _t,updateMessageExpansion as It,SentStatus as Tt,ReceivedStatus as At,getBlockedUGList as Rt,getUGDefaultNotificationLevel as Ct,getUGFirstUnreadMessageDigest as Nt,getUltraGroupList as Mt,getRemoteMessagesByUIds as Ot,getUGUnreadCountForAllChannels as Ut,getUGUnreadInfoList as yt,getUGUnreadMentionedDigest as Pt,removeAllMessageExpansion as Dt,sendUltraGroupTypingStatus as bt,setUGDefaultNotificationLevel as Lt,addToBlacklist as Gt,getBlacklist as xt,getBlacklistStatus as Ft,removeFromBlacklist as wt,addTagForConversations as Bt,createTag as Ht,getConversationListByTag as kt,getTagList as Vt,getTagsForConversation as jt,getUnreadCountByTag as Yt,removeTagForConversations as zt,removeTag as $t,removeTagsForConversation as qt,setConversationStatusInTag as Wt,updateTag as Xt,clearLocalData as Qt,usingCppEngine as Kt,getProxy as Jt,setProxy as Zt,testProxy as en,getMyUserProfile as tn,getMyUserProfileVisibility as nn,getSubscribeUserList as on,getSubscribeUserStatus as rn,getSubscribeUsersOnlineStatus as sn,getUserProfiles as an,searchUserProfileByUniqueId as un,subscribeUser as dn,unSubscribeUser as cn,updateMyUserProfile as ln,updateMyUserProfileVisibility as fn,acceptGroupApplication as vn,acceptGroupInvite as En,addGroupFollows as hn,addGroupManagers as mn,createGroup as pn,dismissGroup as gn,getGroupApplications as Sn,getGroupFollows as _n,getGroupMembers as In,getGroupMembersByRole as Tn,getGroupsInfo as An,getJoinedGroups as Rn,getJoinedGroupsByRole as Cn,inviteUsersToGroup as Nn,joinGroup as Mn,kickGroupMembers as On,quitGroup as Un,refuseGroupApplication as yn,refuseGroupInvite as Pn,removeGroupFollows as Dn,removeGroupManagers as bn,searchGroupMembers as Ln,searchJoinedGroups as Gn,setGroupMemberInfo as xn,setGroupRemark as Fn,transferGroupOwner as wn,updateGroupInfo as Bn,acceptFriendRequest as Hn,addFriend as kn,checkFriends as Vn,deleteFriends as jn,getFriendAddPermission as Yn,getFriendApplications as zn,getFriends as $n,getFriendsInfo as qn,refuseFriendRequest as Wn,searchFriendsInfo as Xn,setFriendAddPermission as Qn,setFriendInfo as Kn,getAppSettings as Jn,getNotificationQuietHoursSetting as Zn,removeNotificationQuietHoursSetting as ei,setNotificationQuietHoursWithSetting as ti,bindRTCRoomForChatroom as ni,removeChatroomEntry as ii,setChatroomEntry as oi,getAllChatroomEntries as ri,getChatroomEntry as si,getChatroomInfo as ai,getChatroomHistoryMessages as ui,joinChatroom as di,quitChatroom as ci,removeChatroomEntries as li,setChatroomEntries as fi,getAutoTranslateEnabled as vi,getTranslationLanguage as Ei,setAutoTranslateEnabled as hi,setTranslationLanguage as mi,getAllRobots as pi,getRobotById as gi,addMessageReaction as Si,batchGetMessageReactionSummaries as _i,getMessageReactionUsers as Ii,getMessageReactions as Ti,removeMessageReaction as Ai}from"@rongcloud/engine";export{AreaCode,ChatroomEntryType,ChatroomSyncStatusReason,ChatroomUserChangeType,ChrmMemBanType,ChrmMemOperateType,ChrmSyncStatus,ConnectionStatus,ConversationType,ConversationUnreadCountFilter,DirectionType,ErrorCode,FileType,FilterRobotType,FriendAddPermission,FriendApplicationStatus,FriendApplicationType,FriendRelationType,GroupApplicationDirection,GroupApplicationStatus,GroupApplicationType,GroupInviteHandlePermission,GroupJoinPermission,GroupMemberInfoEditPermission,GroupMemberRole,GroupOperation,GroupOperationPermission,GroupReadReceiptVersion,InterruptionLevel,LogL,LogLevel,MentionedType,MessageAuditType,MessageBlockSourceType,MessageBlockType,MessageDirection,MessageReactionOperationType,MessageType,NotificationLevel,NotificationStatus,OnlineStatus,OperateStatus,Platform,Platform as PlatformInfo,PushImportanceHonor,PushNotificationQuietHoursLevel,QueryFriendsDirectionType,QuoteMessageStatus,RCConnectionStatus,ReceivedStatus,ReferenceMessageStatus,SentStatus,SpeechToTextStatus,StreamMessageResponseEventType,SubscribeOperationType,SubscribeType,TranslateMessageParam,TranslateMode,TranslateStatus,TranslateStrategy,TranslateTextParam,UltraGroupChannelChangeType,UltraGroupChannelType,UploadMethod,UserProfileVisibility,UserSettingsChangedKey,UserType,createLogDBProxy,fail,ok}from"@rongcloud/engine";
2
2
  /*! *****************************************************************************
3
3
  Copyright (c) Microsoft Corporation.
4
4
 
@@ -12,4 +12,4 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12
12
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
13
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
14
  PERFORMANCE OF THIS SOFTWARE.
15
- ***************************************************************************** */function G(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{u(i.next(e))}catch(e){r(e)}}function a(e){try{u(i.throw(e))}catch(e){r(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((i=i.apply(e,t||[])).next())}))}function F(e){return Object.assign(Object.assign({},e),{channelId:e.channelId||""})}function H(t){const{conversationType:n,targetId:i,latestMessage:o,unreadMessageCount:r,hasMentioned:s,mentionedInfo:a,lastUnreadTime:u,notificationStatus:d,notificationLevel:c,isTop:l,channelId:f,unreadMentionedCount:v,matchCount:h,operationTime:g,draft:E,translateStrategy:m,editedMessageDraft:p,includeRobot:S,dataMgmtInfo:_}=t,T=o&&F(o);let I;I=s?{type:null==a?void 0:a.type,userIdList:null==a?void 0:a.userIdList}:void 0;const C={conversationType:n,targetId:i,latestMessage:T,unreadMessageCount:r,hasMentioned:s,mentionedInfo:I,lastUnreadTime:u,notificationStatus:d,notificationLevel:c,isTop:l,channelId:f,unreadMentionedCount:v,matchCount:h,operationTime:g,draft:E||"",translateStrategy:m,editedMessageDraft:p,includeRobot:S,dataMgmtInfo:_};return C.conversationType===e.ULTRA_GROUP&&(C.firstUnreadMessage=t.firstUnreadMessage,C.channelType=t.channelType,C.unreadMentionedMeCount=t.unreadMentionedMeCount),C}function B(e,t){null===console||void 0===console||console.warn(`Method '${e}' is deprecated, please use '${t}' instead`)}var w;!function(e){e.CONNECTING="CONNECTING",e.CONNECTED="CONNECTED",e.DISCONNECT="DISCONNECT",e.SUSPEND="SUSPEND",e.MESSAGES="MESSAGES",e.READ_RECEIPT_RECEIVED="READ_RECEIPT_RECEIVED",e.MESSAGE_RECEIPT_REQUEST="MESSAGE_RECEIPT_REQUEST",e.MESSAGE_RECEIPT_RESPONSE="MESSAGE_RECEIPT_RESPONSE",e.MESSAGE_READ_RECEIPT_V4="MESSAGE_READ_RECEIPT_V4",e.SYNC_READ_STATUS="SYNC_READ_STATUS",e.CONVERSATION="CONVERSATION",e.CHATROOM="CHATROOM",e.EXPANSION="EXPANSION",e.PULL_OFFLINE_MESSAGE_FINISHED="PULL_OFFLINE_MESSAGE_FINISHED",e.TAG="TAG",e.USER_SETTINGS_SYNCED="USER_SETTINGS_SYNCED",e.USER_SETTINGS_CHANGED="USER_SETTINGS_CHANGED",e.CONVERSATIONS_SETTINGS_SYNCED="CONVERSATIONS_SETTINGS_SYNCED",e.CONVERSATION_TAG="CONVERSATION_TAG",e.TYPING_STATUS="TYPING_STATUS",e.MESSAGE_BLOCKED="MESSAGE_BLOCKED",e.ULTRA_GROUP_ENABLE="ULTRA_GROUP_ENABLE",e.CONVERSATIONS_SYNCED="CONVERSATIONS_SYNCED",e.OPERATE_STATUS="OPERATE_STATUS",e.ULTRA_GROUP_MESSAGE_EXPANSION_UPDATED="ULTRA_GROUP_MESSAGE_EXPANSION_UPDATED",e.ULTRA_GROUP_MESSAGE_MODIFIED="MESSAGE_MODIFIED",e.ULTRA_GROUP_MESSAGE_RECALLED="ULTRA_GROUP_MESSAGE_RECALLED",e.ULTRA_GROUP_CHANNEL_TYPE_CHANGE="ULTRA_GROUP_CHANNEL_TYPE_CHANGE",e.ULTRA_GROUP_CHANNEL_DELETE="ULTRA_GROUP_CHANNEL_DELETE",e.ULTRA_GROUP_CHANNEL_USER_KICKED="ULTRA_GROUP_CHANNEL_USER_KICKED",e.USER_GROUP_STATUS="USER_GROUP_STATUS",e.SUBSCRIBED_USER_STATUS_CHANGE="SUBSCRIBED_USER_STATUS_CHANGE",e.SUBSCRIBED_RELATION_CHANGE="SUBSCRIBED_RELATION_CHANGE",e.SYNC_SUBSCRIBED_USER_STATUS_FINISHED="SYNC_SUBSCRIBED_USER_STATUS_FINISHED",e.OWN_USER_PROFILE_CHANGED="OWN_USER_PROFILE_CHANGED",e.GROUP_OPERATION="GROUP_OPERATION",e.GROUP_INFO_CHANGED="GROUP_INFO_CHANGED",e.GROUP_MEMBER_INFO_CHANGED="GROUP_MEMBER_INFO_CHANGED",e.GROUP_APPLICATION_EVENT="GROUP_APPLICATION_EVENT",e.GROUP_REMARK_CHANGED_SYNC="GROUP_REMARK_CHANGED_SYNC",e.GROUP_FOLLOWS_CHANGED_SYNC="GROUP_FOLLOWS_CHANGED_SYNC",e.FRIEND_ADDED="FRIEND_ADDED",e.FRIEND_DELETE="FRIEND_DELETE",e.FRIEND_APPLICATION_STATUS_CHANGED="FRIEND_APPLICATION_STATUS_CHANGED",e.FRIEND_CLEARED="FRIEND_CLEARED",e.FRIEND_INFO_CHANGED_SYNC="FRIEND_INFO_CHANGED_SYNC",e.DATABASE_OPENED="DATABASE_OPENED",e.DATABASE_UPGRADE_WILL_START="DATABASE_UPGRADE_WILL_START",e.DATABASE_UPGRADING="DATABASE_UPGRADING",e.DATABASE_UPGRADE_DID_COMPLETE="DATABASE_UPGRADE_DID_COMPLETE",e.STREAM_MESSAGE_RESPONSE="STREAM_MESSAGE_RESPONSE",e.MESSAGE_RECEIPT_RESPONSE_V5="MESSAGE_RECEIPT_RESPONSE_V5",e.SPEECH_TO_TEXT_RESPONSE="SPEECH_TO_TEXT_RESPONSE",e.TRANSLATE_RESPONSE="TRANSLATE_RESPONSE",e.MESSAGE_MODIFIED="MESSAGE_MODIFIED",e.MESSAGE_MODIFIED_SYNC_COMPLETED="MESSAGE_MODIFIED_SYNC_COMPLETED",e.ROBOTS_SYNCED="ROBOTS_SYNCED",e.SYNC_SERVER_SAVE_UNREAD_COMPLETED="SYNC_SERVER_SAVE_UNREAD_COMPLETED",e.MESSAGE_REACTION_CHANGED="MESSAGE_REACTION_CHANGED"}(w||(w={}));const k=new t,V={connection(e,t){switch(e){case n.CONNECTED:k.emit(w.CONNECTED);break;case n.CONNECTING:k.emit(w.CONNECTING);break;case n.SUSPENDED:k.emit(w.SUSPEND,t);break;case n.DISCONNECTED:k.emit(w.DISCONNECT,t)}},batchMessage:e=>{k.emit(w.MESSAGES,{messages:e.map((e=>F(e)))})},typingState:e=>{k.emit(w.TYPING_STATUS,{status:e})},readReceiptReceived:(e,t,n,i)=>{k.emit(w.READ_RECEIPT_RECEIVED,{conversation:e,messageUId:t,sentTime:n,sendUserId:i})},messageReceiptRequest:(e,t,n)=>{k.emit(w.MESSAGE_RECEIPT_REQUEST,{conversation:e,messageUId:t,senderUserId:n})},messageReceiptResponse:(e,t,n)=>{k.emit(w.MESSAGE_RECEIPT_RESPONSE,{conversation:e,receivedUserId:t,messageUIdList:n})},conversationState:t=>{const n=t.map((({conversation:t,updatedItems:n})=>{const{conversationType:i}=t,o=H(t);return i===e.ULTRA_GROUP&&(o.versionTime=t.versionTime,o.unreadMessageCount=j(t.unreadMessageCount||0),o.unreadMentionedCount=j(t.unreadMentionedCount||0),o.unreadMentionedMeCount=j(t.unreadMentionedMeCount||0)),{conversation:o,updatedItems:n}}));k.emit(w.CONVERSATION,{conversationList:n})},chatroomState:e=>{k.emit(w.CHATROOM,e)},expansion:e=>{k.emit(w.EXPANSION,e)},pullFinished:()=>{k.emit(w.PULL_OFFLINE_MESSAGE_FINISHED)},tag:()=>{k.emit(w.TAG)},userSettingsSynced:e=>{k.emit(w.USER_SETTINGS_SYNCED,e)},userSettingsChanged:e=>{k.emit(w.USER_SETTINGS_CHANGED,e)},conversationStatusSynced:e=>{k.emit(w.CONVERSATIONS_SETTINGS_SYNCED,e)},robotsSynced:(e,t)=>{k.emit(w.ROBOTS_SYNCED,e,t)},conversationTagChanged:()=>{k.emit(w.CONVERSATION_TAG)},messageBlocked:e=>{k.emit(w.MESSAGE_BLOCKED,e)},ultraGroupEnable:()=>{k.emit(w.ULTRA_GROUP_ENABLE)},sgRelationsSynced:e=>{k.emit(w.CONVERSATIONS_SYNCED,e)},operateStatus:e=>{k.emit(w.OPERATE_STATUS,e)},ultraGroupMessageExpansionUpdated:e=>{k.emit(w.ULTRA_GROUP_MESSAGE_EXPANSION_UPDATED,e.map((e=>F(e))))},ultraGroupMessageRecalled:e=>{k.emit(w.ULTRA_GROUP_MESSAGE_RECALLED,e.map((e=>F(e))))},ultraGroupChannelChangeType:e=>{k.emit(w.ULTRA_GROUP_CHANNEL_TYPE_CHANGE,e)},ultraGroupChannelUserKicked:e=>{k.emit(w.ULTRA_GROUP_CHANNEL_USER_KICKED,e)},ultraGroupChannelDelete:e=>{k.emit(w.ULTRA_GROUP_CHANNEL_DELETE,e)},userGroupStatus:e=>{k.emit(w.USER_GROUP_STATUS,e)},messageReadReceipt:e=>{k.emit(w.MESSAGE_READ_RECEIPT_V4,e)},syncReadStatus:e=>{k.emit(w.SYNC_READ_STATUS,e)},subscribedUserStatusChange:e=>{k.emit(w.SUBSCRIBED_USER_STATUS_CHANGE,e)},subscribedRelationChange:e=>{k.emit(w.SUBSCRIBED_RELATION_CHANGE,e)},syncSubscribedUserStatusFinished:e=>{k.emit(w.SYNC_SUBSCRIBED_USER_STATUS_FINISHED,e)},ownUserProfileChanged:e=>{k.emit(w.OWN_USER_PROFILE_CHANGED,e)},groupOperation:e=>{k.emit(w.GROUP_OPERATION,e)},groupInfoChanged:e=>{k.emit(w.GROUP_INFO_CHANGED,e)},groupMemberInfoChanged:e=>{k.emit(w.GROUP_MEMBER_INFO_CHANGED,e)},groupApplicationEvent:e=>{k.emit(w.GROUP_APPLICATION_EVENT,e)},groupRemarkChangedSync:e=>{k.emit(w.GROUP_REMARK_CHANGED_SYNC,e)},groupFollowsChangedSync:e=>{k.emit(w.GROUP_FOLLOWS_CHANGED_SYNC,e)},friendAdd:e=>{k.emit(w.FRIEND_ADDED,e)},friendDelete:e=>{k.emit(w.FRIEND_DELETE,e)},friendApplicationStatusChanged:e=>{k.emit(w.FRIEND_APPLICATION_STATUS_CHANGED,e)},friendCleared:e=>{k.emit(w.FRIEND_CLEARED,e)},friendInfoChangedSync:e=>{k.emit(w.FRIEND_INFO_CHANGED_SYNC,e)},databaseOpened:(e,t)=>{k.emit(w.DATABASE_OPENED,e,t)},databaseUpgradeWillStart:()=>{k.emit(w.DATABASE_UPGRADE_WILL_START)},databaseUpgrading:e=>{k.emit(w.DATABASE_UPGRADING,e)},databaseUpgradeDidComplete:e=>{k.emit(w.DATABASE_UPGRADE_DID_COMPLETE,e)},readReceiptResponseV5:e=>{k.emit(w.MESSAGE_RECEIPT_RESPONSE_V5,e)},speechToTextResponse:e=>{k.emit(w.SPEECH_TO_TEXT_RESPONSE,e)},translateResponse:e=>{k.emit(w.TRANSLATE_RESPONSE,e)},messagesModified:e=>{k.emit(w.MESSAGE_MODIFIED,e.map((e=>F(e))))},messageModifiedSyncCompleted:()=>{k.emit(w.MESSAGE_MODIFIED_SYNC_COMPLETED)},syncServerSaveUnreadCompleted:()=>{k.emit(w.SYNC_SERVER_SAVE_UNREAD_COMPLETED)},messageReaction(e){k.emit(w.MESSAGE_REACTION_CHANGED,e)}};function j(e){return e>999?999:e}i.add("imlib-next","5.46.0-enterprise-alpha.4");let Y=null,q=null,z=null;function $(e){if(!Y)throw new Error("Not initialized yet!");return e(Y,z,q)}function W(){return Y?f(Y):c(l.BIZ_ERROR_CLIENT_NOT_INIT)}function X(e,t){return $((n=>n.install(e,t)))}let Q=0;const K=new Map;function J(e,t){const n=(...e)=>{const i=[],o=[];[...K.values()].forEach((([e,t,r])=>{e===n&&(o.push(t),r&&i.push(r))})),i.forEach((t=>{e=t(e)}));const r=t(...e);return o.forEach((t=>{t(e,r)})),r};return Object.defineProperty(n,"original",{value:t,writable:!1,enumerable:!1,configurable:!1}),Object.defineProperty(n,"name",{value:e,writable:!1,enumerable:!1,configurable:!1}),Object.defineProperty(n,"monitorable",{value:!0,writable:!1,enumerable:!1,configurable:!1}),n}function Z(e,t,n){if(!e.monitorable)throw new Error(`Not monitorable API: ${e.name}`);const i=++Q;return K.set(i,[e,t,n]),i}function ee(e){K.delete(e)}function te(e,t){return G(this,void 0,void 0,(function*(){return(yield W().next((n=>n.connect(e,!!t)))).trans((e=>({userId:e})))}))}const ne=J("disconnect",((e,t)=>$((n=>n.disconnect(e,t)))));function ie(e,t,n){k.on(e,t,n)}function oe(e,t,n){k.once(e,t,n)}function re(e,t,n){k.off(e,t,n)}function se(e){k.removeAll(e)}function ae(){k.clear()}class ue{constructor(e,t,n=!0,i=!0){Object.defineProperty(this,"messageType",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"content",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"isPersited",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(this,"isCounted",{enumerable:!0,configurable:!0,writable:!0,value:i})}}class de extends ue{constructor(e,t,n){super(e,n,t.isPersited,t.isCounted)}}class ce extends de{constructor(e){super(h.COMBINE,g(h.COMBINE),e)}}class le extends de{constructor(e){super(h.COMBINE_V2,g(h.COMBINE_V2),e)}}class fe extends de{constructor(e){super(h.COMMAND,g(h.COMMAND),e)}}class ve extends de{constructor(e){super(h.FILE,g(h.FILE),e)}}class he extends de{constructor(e){super(h.GIF,g(h.GIF),e)}}const ge=h.GROUP_NOTIFICATION;class Ee extends de{constructor(e){super(ge,g(ge),e)}}class me extends de{constructor(e){super(h.IMAGE,g(h.IMAGE),e)}}const pe=h.INFORMATION_NOTIFICATION;class Se extends de{constructor(e){super(pe,g(pe),e)}}class _e extends de{constructor(e){super(h.LOCATION,g(h.LOCATION),e)}}class Te extends de{constructor(e){super(h.REFERENCE,g(h.REFERENCE),e)}}class Ie extends de{constructor(e){super(h.RICH_CONTENT,g(h.RICH_CONTENT),e)}}class Ce extends de{constructor(e){super(h.SIGHT,g(h.SIGHT),e)}}class Ae extends de{constructor(e){super(h.TEXT,g(h.TEXT),e)}}class Re extends de{constructor(e){super(h.HQ_VOICE,g(h.HQ_VOICE),e)}}class Ne extends de{constructor(e){super(h.VOICE,g(h.VOICE),e)}}var Me;!function(e){e.ALIYUN="aliyun",e.S3="s3",e.MINIO="minio",e.QINIU="qiniu",e.RCX="rcx"}(Me||(Me={}));class Ue{constructor(e,t,n){Object.defineProperty(this,"_url",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"_authInfo",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"_getFileToken",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(this,"multipartUpload",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_isAbort",{enumerable:!0,configurable:!0,writable:!0,value:!1})}isAbort(){return this._isAbort}abort(){this._isAbort=!0,this._abortHandler()}upload(e){return e.file.size>E?Promise.resolve(c(l.UPLOAD_FAIL,"the file size is over 5GB!")):e.file.size>m&&this.multipartUpload?this.multipartUpload(e):this.commonUpload(e)}}function Oe(e){return Math.ceil(e/1024)||0}const xe={[Me.QINIU]:class extends Ue{constructor(){super(...arguments),Object.defineProperty(this,"_promise",{enumerable:!0,configurable:!0,writable:!0,value:null})}commonUpload(e){return G(this,void 0,void 0,(function*(){const{file:t,onProgress:n,fileType:i}=e;let o=this._authInfo;const r=new FormData;r.set("token",o.token),r.set("key",o.fileName),r.set("file",t),this._promise=p({url:S(this._url),headers:{},onProgress:e=>null==n?void 0:n(e.loaded,e.total),method:"POST",body:r,timeout:0});const{status:s}=yield this._promise.result();return this._promise=null,200===s||204===s?f({uniqueName:o.fileName,uploadMethod:_.QINIU}):c(l.UPLOAD_FAIL,s.toString())}))}_abortHandler(){var e;null===(e=this._promise)||void 0===e||e.abort()}},[Me.ALIYUN]:class extends Ue{constructor(){super(...arguments),Object.defineProperty(this,"_promise",{enumerable:!0,configurable:!0,writable:!0,value:null})}commonUpload(e){return G(this,void 0,void 0,(function*(){const{file:t,onProgress:n,fileType:i}=e;let o=this._authInfo;const r=S(`${o.ossBucketName}.${this._url}`),s=new FormData;s.set("token",o.token),s.set("OSSAccessKeyId",o.osskeyId),s.set("policy",o.ossPolicy),s.set("Signature",o.ossSign),s.set("success_action_status","200"),s.set("key",o.fileName),s.set("file",t),this._promise=p({url:r,onProgress:e=>null==n?void 0:n(e.loaded,e.total),method:"POST",body:s,timeout:0});const{status:a}=yield this._promise.result();return this._promise=null,200===a||204===a?f({uniqueName:o.fileName,uploadMethod:_.ALI}):c(l.UPLOAD_FAIL,a.toString())}))}_abortHandler(){var e;null===(e=this._promise)||void 0===e||e.abort()}},[Me.S3]:class extends Ue{constructor(){super(...arguments),Object.defineProperty(this,"_promise",{enumerable:!0,configurable:!0,writable:!0,value:null})}commonUpload(e){return G(this,void 0,void 0,(function*(){const{file:t,onProgress:n,fileType:i,contentDisposition:o}=e;let r=this._authInfo;const s=S(`${r.s3BucketName}.${this._url}`),a=new FormData;o?a.set("Content-Disposition",o):a.set("Content-Disposition","text/html"===t.type?"inline;":"attachment;"),a.set("Content-Type",t.type),a.set("x-amz-credential",r.s3Credential),a.set("x-amz-algorithm",r.s3Algorithm),a.set("x-amz-date",r.s3Date),a.set("policy",r.s3Policy),a.set("x-amz-signature",r.s3Signature),a.set("key",r.fileName),a.set("file",t),this._promise=p({url:s,headers:{},onProgress:e=>null==n?void 0:n(e.loaded,e.total),method:"POST",body:a,timeout:0});const{status:u,data:d}=yield this._promise.result();return this._promise=null,200===u||204===u?f({uniqueName:r.fileName,uploadMethod:_.AWS}):c(l.UPLOAD_FAIL,u.toString())}))}_abortHandler(){var e;null===(e=this._promise)||void 0===e||e.abort()}},[Me.MINIO]:class extends Ue{constructor(){super(...arguments),Object.defineProperty(this,"_promise",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"isSupportMultipart",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"multipartUpload",{enumerable:!0,configurable:!0,writable:!0,value:e=>G(this,void 0,void 0,(function*(){var t;const{file:n,fileType:i}=e;let o=yield this._getFileToken(i,n.name,"POST","uploads",void 0,Oe(n.size));if(!o.isOk)return o.wipe();let r=o.data;const s=S(`${this._url}/${r.minioBucketName}/${r.fileName}`),a=this.getBaseHeaders(n,r,e);this._promise=p({url:`${s}?uploads`,headers:a,method:"POST"});const{status:u,data:d}=yield this._promise.result();this._promise=null;const v=null===(t=null==d?void 0:d.match(/(?:<UploadId>)(\S*?)(?:<\/UploadId>)/))||void 0===t?void 0:t[1];if(200!==u&&204!==u||!v)return c(l.UPLOAD_FAIL,"start upload fail");const h=[],g=yield this.requestUploadPart(s,n,v,r.fileName,e,h);if(!g.isOk)return g.wipe();if(o=yield this._getFileToken(i,r.fileName,"POST",`uploadId=${v}`,void 0,Oe(n.size)),!o.isOk)return o.wipe();r=o.data;let E=h.map(((e,t)=>`<Part><PartNumber>${t+1}</PartNumber><ETag>${e}</ETag></Part>`)).join("");E=`<CompleteMultipartUpload xmlns='http://s3.amazonaws.com/doc/2006-03-01/'>${E}</CompleteMultipartUpload>`;const m=this.getBaseHeaders(n,r,e);this._promise=p({url:`${s}?uploadId=${v}`,headers:m,method:"POST",body:E,timeout:0});const{status:T}=yield this._promise.result();return this._promise=null,200===T||204===T?f({uniqueName:r.fileName,uploadMethod:_.MINIO}):c(l.UPLOAD_FAIL,"end upload fail")}))})}commonUpload(e){return G(this,void 0,void 0,(function*(){const{file:t,onProgress:n,fileType:i}=e;let o=this._authInfo;const r=S(`${this._url}/${o.minioBucketName}/${o.fileName}`),s=this.getBaseHeaders(t,o,e);this._promise=p({url:r,headers:s,onProgress:e=>null==n?void 0:n(e.loaded,e.total),method:"PUT",body:t,timeout:0});const{status:a}=yield this._promise.result();return this._promise=null,200===a||204===a?f({uniqueName:o.fileName,uploadMethod:_.MINIO}):c(l.UPLOAD_FAIL,a.toString())}))}requestUploadPart(e,t,n,i,o,r,s=1,a=0){return G(this,void 0,void 0,(function*(){if(a>=5)return c(l.UPLOAD_FAIL,"Upload retry times exceeded 5. Procedure");const u=(s-1)*m,d=Math.min(m,t.size-u),v=`partNumber=${s}&uploadId=${n}`,h=yield this._getFileToken(o.fileType,i,"PUT",v,void 0,Oe(t.size));if(!h.isOk)return h.wipe();const g=h.data,E=t.slice(u,s*m),S=this.getBaseHeaders(t,g,o);this._promise=p({url:`${e}?${v}`,headers:S,method:"PUT",body:E,timeout:0,onProgress:e=>{var n;return null===(n=null==o?void 0:o.onProgress)||void 0===n?void 0:n.call(o,u+e.loaded,t.size)}});const{status:_,xhr:T}=yield this._promise.result();return this._promise=null,200===_||204===_?(r.push((null==T?void 0:T.getResponseHeader("ETag"))||""),u+d<t.size?this.requestUploadPart(e,t,n,i,o,r,s+1,0):f()):this.requestUploadPart(e,t,n,i,o,r,s,a+1)}))}getBaseHeaders(e,t,n){const{contentDisposition:i}=n;return{"Content-Disposition":`${i||("text/html"===e.type?"inline":"attachment")}; filename=${encodeURIComponent(e.name)};`,Authorization:t.minioAuthorization,"x-amz-content-sha256":t.minioContentSha256,"x-amz-date":t.minioDate,"Content-Type":e.type||"text/plain"}}_abortHandler(){var e;null===(e=this._promise)||void 0===e||e.abort()}},[Me.RCX]:class extends Ue{constructor(){super(...arguments),Object.defineProperty(this,"isSupportMultipart",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"_promise",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"multipartUpload",{enumerable:!0,configurable:!0,writable:!0,value:e=>G(this,void 0,void 0,(function*(){const{file:t,onProgress:n,fileType:i}=e,o=T.gen();let r=this._authInfo;return this._requestUploadPart(o,t,r.token,n)}))})}commonUpload(e){return G(this,void 0,void 0,(function*(){const{file:t,onProgress:n,fileType:i}=e;let o=this._authInfo;const r=new FormData;r.set("token",o.token),r.set("key",o.fileName),r.set("file",t);const s=S(this._url);this._promise=p({url:s,headers:{},onProgress:e=>null==n?void 0:n(e.loaded,e.total),method:"POST",body:r,timeout:0});const{status:a,data:u}=yield this._promise.result();if(this._promise=null,(200===a||204===a)&&u){const e=JSON.parse(u);return f({uniqueName:e.rc_url.file_name,downloadUrl:`${s}/${e.rc_url.path}`,uploadMethod:_.QINIU})}return c(l.UPLOAD_FAIL,a.toString())}))}_requestUploadPart(e,t,n,i,o=0){return G(this,void 0,void 0,(function*(){const r=Math.min(m,t.size-o),s=e+t.name.substring(t.name.lastIndexOf(".")),a={Range:`bytes=${o}-${o+r}`,"X-File-TransactionId":s,"X-File-Total-Size":t.size.toString()},u=t.slice(o,o+r),d=new FormData;d.set("file",u,t.name),d.set("key",s),d.set("name",s),d.set("token",n);const v=S(this._url);this._promise=p({url:v,headers:a,onProgress:e=>null==i?void 0:i(o+e.loaded,t.size),method:"POST",body:d,timeout:0});const{status:h,data:g}=yield this._promise.result();if(this._promise=null,200===h||204===h){if(o+r<t.size)return this._requestUploadPart(e,t,n,i,o+r);const s=JSON.parse(g);return f({uniqueName:s.rc_url.file_name,downloadUrl:`${v}/${s.rc_url.path}`,uploadMethod:_.QINIU})}return c(l.UPLOAD_FAIL,h.toString())}))}_abortHandler(){var e;null===(e=this._promise)||void 0===e||e.abort()}}};function ye(e,t,n){const{promise:i,resolve:o}=C(),r=document.createElement("canvas"),s=r.getContext("2d"),a=new Image;return a.onload=e=>{const{maxHeight:i=160,maxWidth:u=160,quality:d=1,scale:c=1}=n||{},l=De(a.width,a.height,{maxHeight:i,maxWidth:u,scale:c});r.width=Math.min(l.w,u),r.height=Math.min(l.h,i),s.drawImage(a,l.x,l.y,l.w,l.h);let v=Pe(r,d);v=v.replace(/data:image\/[^;]+;base64,/,""),o(f(Object.assign(Object.assign({},t),{thumbnail:v,width:Math.ceil(l.w),height:Math.ceil(l.h)})))},a.onerror=e=>{o(c(l.UPLOAD_FAIL,`get image info fail:${JSON.stringify(e)}`))},a.src=(window.URL||window.webkitURL).createObjectURL(e),i}function Pe(e,t){let n=e.toDataURL("image/jpeg",t);return n.length>A-10240?Pe(e,t-.1):n}const De=(e,t,n)=>{const{maxHeight:i=160,maxWidth:o=160,scale:r=1}=n,s=e<t;let a,u,d,c=0,l=0;return(s?t/e:e/t)>r?(s?(a=e/160,u=160,d=t/a,d>i&&(l=(d-i)/2)):(a=t/160,d=160,u=e/a,u>o&&(c=(u-o)/2)),{w:u,h:d,x:-c,y:-l}):(s?(a=t/i,d=i,u=e/a):(a=e/o,u=o,d=t/a),{w:u,h:d,x:-c,y:-l})};let Le=0;class be{constructor(e,t){Object.defineProperty(this,"_promise",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"id",{enumerable:!0,configurable:!0,writable:!0,value:++Le}),this._promise=this._handleUpload(e,t)}abort(){var e;null===(e=this._client)||void 0===e||e.abort()}_uploadInLoop(e,t,n,i,o=[]){return G(this,void 0,void 0,(function*(){for(let r=0;r<e.length;r++){const s=e[r],a=xe[s.type];if(!a){o.push({type:s.type,url:s.url,code:l.UPLOAD_FAIL,msg:"Upload type not supported"});continue}this._client=new a(s.url,n,i);const u=yield this._client.upload(t);if(u.isOk)return u;const{code:d}=u;if([l.RC_FILE_SIZE_EXCEED_LIMIT,l.INVALID_PARAMETER_SIZE_NOT_FOUND].includes(u.code))return u;if(this._client.isAbort())return this._client=null,u;this._client=null,o.push({type:s.type,url:s.url,code:d,msg:u.msg})}return c(l.UPLOAD_FAIL,`Failed to upload all channels, msg: ${JSON.stringify(o)}`)}))}_handleUpload(e,t){return G(this,void 0,void 0,(function*(){const{getFileToken:n,customDomain:i,uploadServer:o,ossConfig:r}=t,{file:s,fileType:a,thumbnailConfig:u}=e,d=yield n(a,s.name,void 0,void 0,void 0,Oe(s.size));if(!d.isOk)return d.wipe();const v=d.data,h=function(e,t,n){if(t)return[{type:Me.RCX,url:t,p:"1"}];if(e)return JSON.parse(e).map((e=>{const t={type:Me.QINIU,url:"",p:""};return Object.keys(e).forEach((n=>{"p"===n?t.p=e[n]:(t.type=n,t.url=e[n])})),t})).sort(((e,t)=>e.p-t.p));const i=[];return n&&i.push({type:Me.QINIU,url:n,p:"1"}),i}(v.ossConfig||r,i,o);if(0===h.length)return c(l.INVALID_PARAMETER_MEDIA_URL,"uploadUrlList is empty");const{code:g,data:E,msg:m,isOk:p}=yield this._uploadInLoop(h,e,v,n);if(!p)return c(g,m);let{downloadUrl:S,uploadMethod:_}=E;if(!S){const e=yield t.getFileUrl(a,E.uniqueName,_,s.name);if(!e.isOk)return c(e.code,"Get download url fail");S=e.data.downloadUrl}if(!S)return c(l.UPLOAD_FAIL,"Get download url fail");const T={downloadUrl:S,uniqueName:(null==E?void 0:E.uniqueName)||"",name:s.name,size:s.size,type:s.type};if(a===I.AUDIO){return function(e,t){const n=new AudioContext({sampleRate:16e3}),{promise:i,resolve:o}=C();return n.decodeAudioData(e,(e=>{var n,i;o(f(Object.assign(Object.assign({},t),{duration:e.duration,length:e.length,sampleRate:null!==(n=e.sampleRate)&&void 0!==n?n:void 0,numberOfChannels:null!==(i=e.numberOfChannels)&&void 0!==i?i:void 0})))}),(e=>{o(c(l.UPLOAD_FAIL,`get audio info fail:${JSON.stringify(e)}`))})),i}(yield s.arrayBuffer(),T)}return a===I.IMAGE?ye(s,T,u):f(T)}))}awaitResult(){return G(this,void 0,void 0,(function*(){return this._promise}))}}const Ge={};function Fe(e,t){const n=new be(e,t);return function(e){G(this,void 0,void 0,(function*(){Ge[e.id]=e,yield e.awaitResult(),delete Ge[e.id]}))}(n),n}const He=(e,t)=>{const n=e.getNaviInfoFromCache();return{getFileToken:e.getFileToken.bind(e),getFileUrl:e.getFileUrl.bind(e),customDomain:t||"",ossConfig:null==n?void 0:n.ossConfig,uploadServer:null==n?void 0:n.uploadServer}};function Be(e){return G(this,void 0,void 0,(function*(){return W().next((t=>G(this,void 0,void 0,(function*(){const{contentDisposition:n,fileType:i,file:o}=e;return R.create("createUploadTask").validate("contentDisposition",n,(e=>"inline"===e||"attachment"===e),!1).fail(l.INVALID_PARAMETER_CONTENT_DISPOSITION).isNumberEnum("fileType",i,I,!0).fail(l.INVALID_PARAMETER_MEDIA_TYPE).validate("file",o,(e=>e instanceof File&&(!(i===I.IMAGE&&!e.type.match(/^image\//))&&!(i===I.AUDIO&&!e.type.match(/^audio\//)))),!0).fail(l.MEDIA_EXCEPTION).result().trans((()=>Fe(e,He(t,t.getOptions().uploadDomain))))}))))}))}function we(e){return G(this,void 0,void 0,(function*(){return f(function(e){const t=Ge[e];return!!t&&(t.abort(),!0)}(e))}))}function ke(e){return G(this,void 0,void 0,(function*(){const{contentDisposition:t,fileType:n,file:i}=e;return W().next((o=>G(this,void 0,void 0,(function*(){const r=yield R.create("upload").validate("contentDisposition",t,(e=>"inline"===e||"attachment"===e),!1).fail(l.INVALID_PARAMETER_CONTENT_DISPOSITION).isNumberEnum("fileType",n,I,!0).fail(l.INVALID_PARAMETER_MEDIA_TYPE).validate("file",i,(e=>e instanceof File&&(!(n===I.IMAGE&&!e.type.match(/^image\//))&&!(n===I.AUDIO&&!e.type.match(/^audio\//)))),!0).fail(l.MEDIA_EXCEPTION).result().next((()=>function(e,t){return G(this,void 0,void 0,(function*(){return new be(e,t).awaitResult()}))}(e,He(o,o.getOptions().uploadDomain))));return r}))))}))}function Ve(e,t,n,i){return W().next((o=>o.getFileToken(e,t,n,i)))}function je(e){return W().next((t=>G(this,void 0,void 0,(function*(){return(yield R.create("getDownloadAuth").isNotEmptyString("url",e,!0).fail(l.INVALID_PARAMETER_MEDIA_URL).result().next((()=>t.getFileToken(1,void 0,void 0,void 0,e)))).trans((({deadline:e,token:t,downloadAuthInfo:n})=>({deadline:e,token:t,downloadAuthInfo:n})))}))))}function Ye(e,t,n,i,o){return G(this,void 0,void 0,(function*(){return(null==i?void 0:i.isBosRes)?f(i):W().next((i=>i.getFileUrl(e,t,o||_.QINIU,n)))}))}const qe=gi,ze=J("sendMessage",((e,t,n)=>G(void 0,void 0,void 0,(function*(){const{disableNotification:i,isMentioned:o,directionalUserIdList:r,canIncludeExpansion:s,onSendBefore:a,expansion:u,pushConfig:d,isStatusMessage:l,disableUpdateLastMessage:f}=n||{},h=function(e,t){const{disableNotification:n,pushContent:i,pushData:o,isMentioned:r,mentionedType:s,mentionedUserIdList:a,directionalUserIdList:u,isVoipPush:d,canIncludeExpansion:c,expansion:l,isFilerWhiteBlacklist:f,pushConfig:v,messageId:h,disableUpdateLastMessage:g,needReceipt:E,quoteInfo:m}=e;return Object.assign({disableNotification:n,pushContent:i,pushData:o,isMentioned:r,mentionedType:s,mentionedUserIdList:a,directionalUserIdList:u,isVoipPush:d,canIncludeExpansion:c,expansion:l,isFilerWhiteBlacklist:f,pushConfig:v,messageId:h,disableUpdateLastMessage:g,needReceipt:E,quoteInfo:m},t)}(n||{},t),g=Object.assign(Object.assign({},e),{isMentioned:!!o,content:t.content,messageType:t.messageType,isPersited:!!t.isPersited,isCounted:!!t.isCounted,disableNotification:!!i,canIncludeExpansion:!!s,expansion:u||null,senderUserId:"",messageUId:"",messageDirection:M.SEND,receivedTime:0,isStatusMessage:!!l,receivedStatus:U.UNREAD,isOffLineMessage:!1,pushConfig:d,sentStatus:O.SENDING,sentTime:0,directedUserIds:r||[],disableUpdateLastMessage:f,quoteInfo:h.quoteInfo}),E=yield W().next((t=>{g.senderUserId=t.getCurrentUserId();return t.sendMessage(e,h,(e=>{g.messageId=e;try{a&&a(F(g))}catch(e){t.logger.error(v.L_CALLBACK_E,`Callback method "onSendBefore" execution error.\n${null==e?void 0:e.stack}`),console.error(e)}}))}));return E.isOk?E.trans((e=>F(e))):(g.sentStatus=O.FAILED,c(E.code,E.msg,F(g)))}))));function $e(e,t,n){return ze(e,new Ae(t),n)}function We(e,t){return(n,i,o,s)=>G(this,void 0,void 0,(function*(){var a,u;const d=W();if(!d.isOk)return d.wipe();const f=d.data;if(!N("sendOptions.contentDisposition",null==s?void 0:s.contentDisposition,(e=>["inline","attachment"].includes(e))))return c(l.INVALID_PARAMETER_SENDOPTIONS);const h={contentDisposition:null==s?void 0:s.contentDisposition};if(s&&"thumbnailConfig"in s){const e=null===(a=s)||void 0===a?void 0:a.thumbnailConfig;if(!(N("sendOptions.maxHeight",null==e?void 0:e.maxHeight,r.NUMBER)&&N("sendOptions.maxWidth",null==e?void 0:e.maxWidth,r.NUMBER)&&N("sendOptions.quality",null==e?void 0:e.quality,r.NUMBER)&&N("sendOptions.scale",null==e?void 0:e.scale,r.NUMBER)))return c(l.INVALID_PARAMETER_SENDOPTIONS);h.thumbnailConfig=e}const{logger:g}=f,E=g.createTraceId();g.info(v.L_MEDIA_UPLOAD_T,JSON.stringify({filesize:i.file.size,type:e}),E);const m=yield ke({file:i.file,fileType:e,onProgress:(e,t)=>{var n;null===(n=null==o?void 0:o.onProgress)||void 0===n||n.call(o,Math.floor(e/t*100))},contentDisposition:h.contentDisposition,thumbnailConfig:h.thumbnailConfig}),{code:p,data:S,msg:_}=m;if(p===l.SUCCESS&&S){const e=(null===(u=null==o?void 0:o.onComplete)||void 0===u?void 0:u.call(o,Object.assign({url:S.downloadUrl},S)))||t(S,i);return g.info(v.L_MEDIA_UPLOAD_R,JSON.stringify({downurl:S.downloadUrl,code:l.SUCCESS}),E),ze(n,e,s)}return c(p,_)}))}const Xe=e=>{const t=e.match(/\.(\w+)$/);return t?t[1]:"bin"},Qe=We(I.FILE,((e,t)=>{const n={name:e.name,size:t.file.size,type:Xe(e.name),fileUrl:e.downloadUrl};return t.user&&(n.user=t.user),t.extra&&(n.extra=t.extra),t.mentionedInfo&&(n.mentionedInfo=t.mentionedInfo),new ve(n)})),Ke=We(I.IMAGE,((e,t)=>{const n={content:e.thumbnail,imageUri:e.downloadUrl,thumWidth:e.width,thumHeight:e.height};return t.user&&(n.user=t.user),t.extra&&(n.extra=t.extra),t.mentionedInfo&&(n.mentionedInfo=t.mentionedInfo),t.audit&&(n.audit=t.audit),new me(n)})),Je=We(I.IMAGE,((e,t)=>{const n={gifDataSize:e.size,remoteUrl:e.downloadUrl,width:e.width,height:e.height};return t.user&&(n.user=t.user),t.extra&&(n.extra=t.extra),t.mentionedInfo&&(n.mentionedInfo=t.mentionedInfo),t.audit&&(n.audit=t.audit),new he(n)})),Ze=We(I.AUDIO,((e,t)=>{var n;const i={remoteUrl:e.downloadUrl,duration:Math.floor(null!==(n=e.duration)&&void 0!==n?n:0),sampleRate:e.sampleRate,numberOfChannels:e.numberOfChannels};return t.user&&(i.user=t.user),t.extra&&(i.extra=t.extra),t.mentionedInfo&&(i.mentionedInfo=t.mentionedInfo),t.audit&&(i.audit=t.audit),new Re(i)})),et=We(I.SIGHT,((e,t)=>{const n={sightUrl:e.downloadUrl,content:t.thumbnail,duration:t.duration,size:t.file.size||e.size,name:t.name||e.name};return t.user&&(n.user=t.user),t.extra&&(n.extra=t.extra),t.mentionedInfo&&(n.mentionedInfo=t.mentionedInfo),t.audit&&(n.audit=t.audit),new Ce(n)}));function tt(e,t){return G(this,void 0,void 0,(function*(){return(yield W().next((n=>n.getHistoryMessage(e,t)))).trans((({list:e,hasMore:t})=>({hasMore:t,list:e.map((e=>F(e)))})))}))}function nt(e,t){return G(this,void 0,void 0,(function*(){return(yield W().next((n=>n.getRemoteHistoryMessages(e,t)))).trans((({list:e,hasMore:t})=>({hasMore:t,list:e.map((e=>F(e)))})))}))}function it(t,n,i,o){return G(this,void 0,void 0,(function*(){return W().next((r=>r.chat.sendReadReceiptMessage({targetId:t,conversationType:e.PRIVATE,channelId:o},n,i)))}))}function ot(t,n,i){return G(this,void 0,void 0,(function*(){return W().next((o=>o.chat.sendReadReceiptRequest({targetId:t,conversationType:e.GROUP,channelId:i},n)))}))}function rt(e,t,n){return G(this,void 0,void 0,(function*(){throw new Error("This method is deprecated, please use method sendReadReceiptResponseV2.")}))}function st(t,n,i){return G(this,void 0,void 0,(function*(){return W().next((o=>o.chat.sendReadReceipt({targetId:t,conversationType:e.GROUP,channelId:i},n)))}))}function at(e,t){return G(this,void 0,void 0,(function*(){return W().next((n=>n.chat.sendSyncReadStatusMessage(e,t)))}))}function ut(e,t,n){return G(this,void 0,void 0,(function*(){return W().next((i=>i.chat.sendReadReceiptMessageV4(e,t,n)))}))}function dt(e,t){return G(this,void 0,void 0,(function*(){return W().next((n=>n.chat.getMessageReadReceiptV4(e,t)))}))}function ct(e,t){return G(this,void 0,void 0,(function*(){return W().next((n=>n.chat.batchGetMessageReadReceiptInfoV4(e,t)))}))}We(I.COMBINE_HTML,((e,t)=>{const n={remoteUrl:e.downloadUrl,nameList:t.nameList,summaryList:t.summaryList,conversationType:t.conversationType};return t.user&&(n.user=t.user),t.extra&&(n.extra=t.extra),t.mentionedInfo&&(n.mentionedInfo=t.mentionedInfo),new ce(n)}));const lt=J("recallMessage",((e,t)=>G(void 0,void 0,void 0,(function*(){return W().next((n=>G(void 0,void 0,void 0,(function*(){return(yield n.recallMessage(e,t)).trans((e=>F(e)))}))))}))));function ft(e,t){return G(this,void 0,void 0,(function*(){return W().next((n=>n.deleteRemoteMessage(e,t)))}))}function vt(e,t){return G(this,void 0,void 0,(function*(){return W().next((n=>n.deleteRemoteMessageByTimestamp(e,t)))}))}function ht(e,t){return G(this,void 0,void 0,(function*(){return W().next((n=>n.batchClearRemoteHistoryMessages(e,t)))}))}function gt(e,t){return G(this,void 0,void 0,(function*(){return W().next((n=>n.updateMessageExpansion(e,t)))}))}function Et(e,t){return G(this,void 0,void 0,(function*(){return W().next((n=>n.removeMessageExpansion(e,t)))}))}function mt(e,t){return G(this,void 0,void 0,(function*(){return(yield W().next((n=>n.chat.sendTypingStatus(e,t)))).trans(F)}))}function pt(e,t,n){return G(this,void 0,void 0,(function*(){return W().next((i=>G(this,void 0,void 0,(function*(){return i.chat.getMessageReader(e,t,n)}))))}))}function St(e,t,n,i,s){return $(((a,u)=>(o("messageType",e,r.STRING,!0),o("isPersited",t,r.BOOLEAN,!0),o("isCounted",n,r.BOOLEAN,!0),o("isStatusMessage",s,r.BOOLEAN),o("searchProps",i,r.ARRAY),u.info(v.A_REGTYP_O,JSON.stringify({messageType:e,isCounted:n,isStatusMessage:s,isPersited:t,searchProps:i})),a.registerMessageType(e,t,n,i,s),function(e,t=!0,n=!0){return function(i){return new ue(e,i,t,n)}}(e,t,n))))}function _t(e){return G(this,void 0,void 0,(function*(){return(yield W().next((t=>t.getFirstUnreadMessage(e)))).trans((e=>e?F(e):null))}))}function Tt(e){return G(this,void 0,void 0,(function*(){return W().next((t=>t.getFirstUnreadMessageDigest(e)))}))}function It(e,t,n={}){return G(this,void 0,void 0,(function*(){return B("insertMessage","electronExtension.insertMessage"),hi(e,t,n)}))}function Ct(e){throw new Error("getUnreadMentionedMessages is deprecated, please use electronExtension.getUnreadMentionedMessages instead")}function At(e,t,n,i){return G(this,void 0,void 0,(function*(){return B("RongIMLib.searchMessages","RongIMLib.ElectronExtension.searchMessagesWithParams"),ci(e,t,n,i)}))}function Rt(e,t,n){return G(this,void 0,void 0,(function*(){return B("RongIMLib.deleteLocalMessagesByTimestamp","RongIMLib.electronExtension.deleteMessagesByTimestamp"),vi(e,t,n)}))}function Nt(e){return G(this,void 0,void 0,(function*(){return B("RongIMLib.clearMessages","RongIMLib.electronExtension.clearMessages"),fi(e)}))}function Mt(e,t,n,i){return G(this,void 0,void 0,(function*(){return B("searchConversationByContent","electronExtension.searchConversationByContent"),ui(e,null!=n?n:[h.TEXT,h.FILE],i,t)}))}function Ut(e,t){return G(this,void 0,void 0,(function*(){return W().next((n=>G(this,void 0,void 0,(function*(){return n.chat.clearUnreadCountByTimestamp(e,t)}))))}))}function Ot(e,t){return G(this,void 0,void 0,(function*(){return li(e,t)}))}function xt(e){return W().next((t=>t.sse.requestStreamMessageContent(e)))}function yt(e,t){return G(this,void 0,void 0,(function*(){return W().next((n=>G(this,void 0,void 0,(function*(){return n.sendReadReceiptResponseV5(e,t)}))))}))}function Pt(e,t){return G(this,void 0,void 0,(function*(){return W().next((n=>G(this,void 0,void 0,(function*(){return n.getMessageReadReceiptInfoV5(e,t)}))))}))}function Dt(e){return G(this,void 0,void 0,(function*(){return W().next((t=>G(this,void 0,void 0,(function*(){return t.getMessageReadReceiptInfoV5ByIdentifiers(e)}))))}))}function Lt(e,t,n){return G(this,void 0,void 0,(function*(){return W().next((i=>G(this,void 0,void 0,(function*(){return i.getMessagesReadReceiptUsersByPageV5(e,t,n)}))))}))}function bt(e,t,n){return G(this,void 0,void 0,(function*(){return W().next((i=>G(this,void 0,void 0,(function*(){return i.getMessagesReadReceiptByUsersV5(e,t,n)}))))}))}function Gt(e,t){return W().next((n=>n.requestSpeechToTextForMessage(e,t)))}function Ft(e){return W().next((t=>t.translateMessagesWithParams(e)))}function Ht(e){return W().next((t=>t.translateTextsWithParams(e)))}function Bt(e,t){return G(this,void 0,void 0,(function*(){return B("modifyMessage","modifyMessageWithParams"),wt({messageUId:null==t?void 0:t.messageUId,messageContent:e,conversation:{conversationType:null==t?void 0:t.conversationType,targetId:null==t?void 0:t.targetId,channelId:null==t?void 0:t.channelId}})}))}function wt(e){return W().next((t=>t.modifyMessageWithParams(e)))}function kt(e){return W().next((t=>{const n=e=>e.map((e=>({messageUId:e.messageUId,message:e.message?F(e.message):void 0,code:e.code})));return t.refreshReferenceMessageWithParams(Object.assign(Object.assign({},e),{remoteMessageBlock:t=>{e.remoteMessageBlock&&e.remoteMessageBlock(n(t))},localMessageBlock:t=>{e.localMessageBlock&&e.localMessageBlock(n(t))}}))}))}function Vt(e){return G(this,void 0,void 0,(function*(){return(yield W().next((t=>t.getMessagesByUIds(e.conversationIdentifier,e.messageUIds)))).trans((e=>e.map((e=>({messageUId:e.messageUId,message:e.message?F(e.message):void 0,code:e.code})))))}))}function jt(e,t){return G(this,void 0,void 0,(function*(){B("getConversationList","getConversationListByTimestamp");return(yield W().next((n=>G(this,void 0,void 0,(function*(){return n.getConversationList({count:(null==e?void 0:e.count)||300,startTime:(null==e?void 0:e.startTime)||0,order:null==e?void 0:e.order,channelId:t})}))))).trans((e=>e.map(H)))}))}function Yt(e){return G(this,void 0,void 0,(function*(){return(yield W().next((t=>G(this,void 0,void 0,(function*(){return t.getAllConversationList(e)}))))).trans((e=>e.map(H)))}))}function qt(e){return G(this,void 0,void 0,(function*(){return(yield W().next((t=>G(this,void 0,void 0,(function*(){return t.getConversationListByTimestamp(e)}))))).trans((e=>e.map(H)))}))}function zt(e){return G(this,void 0,void 0,(function*(){return W().next((t=>G(this,void 0,void 0,(function*(){return(yield t.getConversation(e)).trans((e=>H(e)))}))))}))}const $t=J("removeConversation",((e,t)=>G(void 0,void 0,void 0,(function*(){return W().next((n=>n.removeConversation(e,t)))}))));function Wt(e){return G(this,void 0,void 0,(function*(){return B("batchRemoveConversation","batchDeleteConversations"),Xt({identifiers:e,deleteRemotely:!1,deleteMessages:!1})}))}function Xt(e){return G(this,void 0,void 0,(function*(){return W().next((t=>t.batchDeleteConversations(e)))}))}function Qt(e){return G(this,void 0,void 0,(function*(){return W().next((t=>t.getTextMessageDraft(e)))}))}function Kt(e,t){return G(this,void 0,void 0,(function*(){return W().next((n=>n.saveTextMessageDraft(e,t)))}))}function Jt(e){return G(this,void 0,void 0,(function*(){return W().next((t=>t.clearTextMessageDraft(e)))}))}function Zt(e,t){return G(this,void 0,void 0,(function*(){return W().next((n=>n.getTotalUnreadCount(t,e)))}))}function en(e,t){return G(this,void 0,void 0,(function*(){return W().next((n=>n.getTotalUnreadCountByLevels(e,t)))}))}function tn(e,t){return G(this,void 0,void 0,(function*(){return W().next((n=>n.getTotalUnreadCountByLevels(e,t,!0)))}))}function nn(e){return G(this,void 0,void 0,(function*(){return W().next((t=>t.getUnreadCount(e)))}))}const on=J("clearMessagesUnreadStatus",(e=>G(void 0,void 0,void 0,(function*(){return W().next((t=>t.chat.clearUnreadCount(e)))}))));function rn(){return G(this,void 0,void 0,(function*(){return W().next((e=>e.chat.clearAllUnreadCount()))}))}const sn=J("setConversationNotificationLevel",((e,t)=>G(void 0,void 0,void 0,(function*(){return W().next((n=>n.batchSetConversationNotificationLevel([e],t)))}))));function an(e,t){return G(this,void 0,void 0,(function*(){return W().next((n=>n.batchSetConversationNotificationLevel(e,t)))}))}function un(e,t){return G(this,void 0,void 0,(function*(){return W().next((n=>n.batchSetConversationTranslateStrategy(e,t)))}))}function dn(e,t){return G(this,void 0,void 0,(function*(){return W().next((n=>G(this,void 0,void 0,(function*(){if(t!==x.CLOSE&&t!==x.OPEN)return c(l.INVALID_PARAMETER_NOTIFICATION_LEVEL);const i=y(t);return n.batchSetConversationNotificationLevel([e],i)}))))}))}function cn(e){return G(this,void 0,void 0,(function*(){return W().next((t=>t.getConversationNotificationLevel(e)))}))}function ln(e){return G(this,void 0,void 0,(function*(){return W().next((t=>G(this,void 0,void 0,(function*(){return(yield t.getConversationNotificationLevel(e)).trans((e=>P(e)))}))))}))}function fn(){return G(this,void 0,void 0,(function*(){return(yield W().next((e=>e.getBlockedConversationList()))).trans((e=>e.map(H)))}))}function vn(e,t){return G(this,void 0,void 0,(function*(){return W().next((n=>n.setConversationTypeNotificationLevel(e,t)))}))}function hn(e){return G(this,void 0,void 0,(function*(){return W().next((t=>t.getConversationTypeNotificationLevel(e)))}))}const gn=J("setConversationToTop",((e,t=!0,n=!0,i=!1)=>G(void 0,void 0,void 0,(function*(){return W().next((o=>o.batchSetConversationToTop([e],!!t,n,i)))}))));function En(e,t,n=!0,i=!0){return G(this,void 0,void 0,(function*(){return W().next((o=>o.batchSetConversationToTop(e,!!t,i,n)))}))}function mn(e,t){return G(this,void 0,void 0,(function*(){return(yield W().next((n=>n.getTopConversationList(e,t)))).trans((e=>e.map(H)))}))}function pn(e){return G(this,void 0,void 0,(function*(){return(yield W().next((t=>t.getUnreadConversationList(e)))).trans((e=>e.map(H)))}))}function Sn(e){return G(this,void 0,void 0,(function*(){return W().next((t=>t.getUnreadMentionedCount(e)))}))}function _n(){return G(this,void 0,void 0,(function*(){return W().next((e=>e.getAllUnreadMentionedCount()))}))}function Tn(e){return G(this,void 0,void 0,(function*(){return(yield W().next((t=>{var n,i,o;return t.getRealtimeConversations(null!==(n=null==e?void 0:e.count)&&void 0!==n?n:30,null!==(i=null==e?void 0:e.startTime)&&void 0!==i?i:0,null!==(o=null==e?void 0:e.order)&&void 0!==o?o:0)}))).trans((e=>e.map(H)))}))}function In(){return G(this,void 0,void 0,(function*(){return W().next((e=>e.getRealtimeConTotalUnreadCount()))}))}function Cn(e){return G(this,void 0,void 0,(function*(){return W().next((t=>t.clearRealtimeConUnreadCount(e)))}))}function An(e){return G(this,void 0,void 0,(function*(){return W().next((t=>t.removeRealtimeConversations(e)))}))}function Rn(e){return G(this,void 0,void 0,(function*(){return W().next((t=>t.batchGetRealtimeConUnreadCount(e)))}))}function Nn(e){return G(this,void 0,void 0,(function*(){return(yield W().next((t=>t.getUnreadMentionMeConversationList(e)))).trans((e=>e.map(H)))}))}function Mn(e){return G(this,void 0,void 0,(function*(){return W().next((t=>t.chat.createConversationListLoader(e)))}))}function Un(e){return G(this,void 0,void 0,(function*(){return(yield W().next((t=>t.chat.getConversationsIncludingRobots(e)))).trans((e=>e.map(H)))}))}function On(e){return G(this,void 0,void 0,(function*(){return W().next((t=>t.chat.markRemoteConversationAsRead(e)))}))}function xn(e){return G(this,void 0,void 0,(function*(){return W().next((t=>t.getUltraGroupList(e)))}))}function yn(){return G(this,void 0,void 0,(function*(){return(yield W().next((e=>e.getBlockedUGList()))).trans((e=>e.map((e=>H(e)))))}))}function Pn(e){return G(this,void 0,void 0,(function*(){return W().next((t=>t.chat.sendUltraGroupTypingStatus(e)))}))}function Dn(e,t){return G(this,void 0,void 0,(function*(){return(yield W().next((n=>G(this,void 0,void 0,(function*(){return n.getUltraGroupMessageListByMessageUId(e,t)}))))).trans((e=>{const t={};for(const n in e)t[n]=e[n]?F(e[n]):void 0;return t}))}))}function Ln(e,t){return G(this,void 0,void 0,(function*(){return B("updateExpansionForUltraGroupMessage","updateMessageExpansion"),gt(e,t)}))}function bn(e,t){return G(this,void 0,void 0,(function*(){return B("removeExpansionForUltraGroupMessage","removeMessageExpansionForKey"),Et(e,t)}))}function Gn(e){return G(this,void 0,void 0,(function*(){return W().next((t=>t.removeAllMessageExpansion(e)))}))}function Fn(e,t){return G(this,void 0,void 0,(function*(){return W().next((n=>n.getUGUnreadCountForAllChannels(e,!0,t)))}))}function Hn(e){return G(this,void 0,void 0,(function*(){return W().next((t=>t.getUltraGroupDefaultNotificationLevel(null==e?void 0:e.targetId,null==e?void 0:e.channelId)))}))}function Bn(e,t){return G(this,void 0,void 0,(function*(){return W().next((n=>n.setUltraGroupDefaultNotificationLevel(null==e?void 0:e.targetId,t,null==e?void 0:e.channelId)))}))}function wn(e,t){return G(this,void 0,void 0,(function*(){return W().next((n=>n.getUGUnreadCountForAllChannels(e,!1,t)))}))}function kn(){return G(this,void 0,void 0,(function*(){return B("getAllUltraGroupUnreadCount","getTotalUnreadCountByLevels"),en([e.ULTRA_GROUP],[])}))}function Vn(){return G(this,void 0,void 0,(function*(){return B("getAllUltraGroupUnreadMentionedCount","getTotalUnreadMentionedCountByLevels"),tn([e.ULTRA_GROUP],[])}))}function jn(e){return G(this,void 0,void 0,(function*(){return W().next((t=>t.getUGUnreadMentionedDigest(e)))}))}function Yn(e){return G(this,void 0,void 0,(function*(){return W().next((t=>t.getUGFirstUnreadMessageDigest(e)))}))}function qn(e){return G(this,void 0,void 0,(function*(){return W().next((t=>t.getUGUnreadInfoList(e)))}))}function zn(e){return G(this,void 0,void 0,(function*(){return W().next((t=>t.addToBlacklist(e)))}))}function $n(e){return G(this,void 0,void 0,(function*(){return W().next((t=>t.removeFromBlacklist(e)))}))}function Wn(){return G(this,void 0,void 0,(function*(){return W().next((e=>e.getBlacklist()))}))}function Xn(e){return G(this,void 0,void 0,(function*(){return(yield W().next((t=>t.getBlacklistStatus(e)))).trans((e=>0===e))}))}function Qn(e){return G(this,void 0,void 0,(function*(){return W().next((t=>t.createTag(e)))}))}function Kn(e){return G(this,void 0,void 0,(function*(){return W().next((t=>t.removeTag(e)))}))}function Jn(e){return G(this,void 0,void 0,(function*(){return W().next((t=>t.updateTag(e)))}))}function Zn(){return G(this,void 0,void 0,(function*(){return W().next((e=>e.getTagList()))}))}function ei(e){return G(this,void 0,void 0,(function*(){return W().next((t=>t.getTagsForConversation(e)))}))}function ti(e,t){return G(this,void 0,void 0,(function*(){return W().next((n=>n.addTagForConversations(e,t)))}))}function ni(e,t){return G(this,void 0,void 0,(function*(){return W().next((n=>n.removeTagForConversations(e,t)))}))}function ii(e,t){return G(this,void 0,void 0,(function*(){return W().next((n=>n.removeTagsForConversation(e,t)))}))}function oi(e,t){return G(this,void 0,void 0,(function*(){return W().next((n=>n.removeTagForConversations(e,t)))}))}function ri(e,t,n){return G(this,void 0,void 0,(function*(){B("getConversationsFromTagByPage","createConversationListLoader");return(yield W().next((i=>i.getConversationListByTag(e,n,t)))).trans((e=>e.map((e=>{return t=e,Object.assign(Object.assign({},H(t)),{isTopInTag:t.isTopInTag});var t}))))}))}function si(e,t){return G(this,void 0,void 0,(function*(){return W().next((n=>n.getUnreadCountByTag(e,t)))}))}function ai(e,t,n){return G(this,void 0,void 0,(function*(){return W().next((i=>i.setConversationStatusInTag(e,t,{isTop:n})))}))}function ui(e,t,n,i){return G(this,void 0,void 0,(function*(){return W().next((o=>G(this,void 0,void 0,(function*(){return(yield o.searchConversationByContent(e,t,n,i)).trans((e=>e.map((e=>H(e)))))}))))}))}function di(e,t){return G(this,void 0,void 0,(function*(){return(yield W().next((n=>n.searchMessages(e,t)))).trans((({totalMatched:e,messages:t,conditionsMatched:n})=>({count:e,messages:t.map((e=>F(e)))})))}))}function ci(e,t,n,i,o){return G(this,void 0,void 0,(function*(){return B("RongIMLib.electronExtension.searchMessages","RongIMLib.electronExtension.searchMessagesWithParams"),di(e,{keyword:t,limit:i||L,order:0,timeRange:{endTime:n?n-1:n||0},messageFilter:{objectNames:o}})}))}function li(e,t){return G(this,void 0,void 0,(function*(){return B("setMessageReceivedStatus","setMessageReceivedStatusInfo"),W().next((n=>n.setMessageReceivedStatus(e,t)))}))}function fi(e){return G(this,void 0,void 0,(function*(){return W().next((t=>t.clearLocalMessages(e)))}))}function vi(e,t,n){return G(this,void 0,void 0,(function*(){return W().next((i=>i.deleteLocalMessagesByTimestamp(e,t,n)))}))}function hi(e,t,n={}){return G(this,void 0,void 0,(function*(){return t instanceof ue?function(e,t,n={}){return G(this,void 0,void 0,(function*(){const i=!!(null==n?void 0:n.isUnread),o=null==n?void 0:n.searchContent,r=null==n?void 0:n.disableUpdateLastMessage,s={senderUserId:"",messageType:null==t?void 0:t.messageType,content:null==t?void 0:t.content,searchContent:o,messageDirection:M.SEND,isUnread:i,messageUId:"",disableUpdateLastMessage:r,quoteInfo:n.quoteInfo};return(yield W().next((t=>t.insertMessage(e,s)))).trans(F)}))}(e,t,n):function(e,t,n={}){return G(this,void 0,void 0,(function*(){const i=!!(null==n?void 0:n.isUnread),o=null==n?void 0:n.searchContent,r=null==n?void 0:n.disableUpdateLastMessage,s={senderUserId:null==t?void 0:t.senderUserId,messageType:null==t?void 0:t.messageType,content:null==t?void 0:t.content,messageDirection:null==t?void 0:t.messageDirection,readStatus:"object"==typeof(null==t?void 0:t.receivedStatusInfo)?D(t.receivedStatusInfo):null==t?void 0:t.receivedStatus,sentTime:null==t?void 0:t.sentTime,sentStatus:null==t?void 0:t.sentStatus,searchContent:o,messageUId:"",isUnread:i,disableNotification:null==t?void 0:t.disableNotification,canIncludeExpansion:null==t?void 0:t.canIncludeExpansion,expansion:(null==t?void 0:t.expansion)||void 0,directedUserIds:null==t?void 0:t.directedUserIds,disableUpdateLastMessage:(null==t?void 0:t.disableUpdateLastMessage)||r,quoteInfo:null==t?void 0:t.quoteInfo};return(yield W().next((t=>t.insertMessage(e,s)))).trans(F)}))}(e,t,n)}))}function gi(e){return G(this,void 0,void 0,(function*(){return(yield W().next((t=>t.getLocalMessage(e)))).trans((e=>F(e)))}))}var Ei=Object.freeze({__proto__:null,getAllConversationList:function(e){return G(this,void 0,void 0,(function*(){return B("electronExtension.getAllConversationList","getAllConversationList"),Yt(e)}))},getConversationList:function(e,t,n,i){return G(this,void 0,void 0,(function*(){B("electronExtension.getConversationList","getAllConversationList or getConversationListByTimestamp");return(yield W().next((o=>G(this,void 0,void 0,(function*(){return o.getConversationList({startTime:e,count:t,channelId:n,topPriority:i})}))))).trans((e=>e.map((e=>H(e)))))}))},searchConversationByContent:ui,getConversations:function(e){return G(this,void 0,void 0,(function*(){return(yield W().next((t=>t.getConversations(e)))).trans((e=>e.map(H)))}))},getUntaggedConversationListByPage:function(e,t,n){return G(this,void 0,void 0,(function*(){return W().next((i=>G(this,void 0,void 0,(function*(){return(yield i.getUntaggedConversationListByPage(e,t,n)).trans((e=>e.map((e=>H(e)))))}))))}))},getRemoteConversations:function(){return G(this,void 0,void 0,(function*(){return W().next((e=>e.syncRemoteConversations()))}))},saveEditedMessageDraft:function(e,t){return G(this,void 0,void 0,(function*(){return W().next((n=>n.chat.saveEditedMessageDraft(e,t)))}))},getEditedMessageDraft:function(e){return G(this,void 0,void 0,(function*(){return W().next((t=>t.chat.getEditedMessageDraft(e)))}))},clearEditedMessageDraft:function(e){return G(this,void 0,void 0,(function*(){return W().next((t=>t.chat.clearEditedMessageDraft(e)))}))},searchMessages:ci,searchMessageInTimeRange:function(e,t){return G(this,void 0,void 0,(function*(){return B("RongIMLib.electronExtension.searchMessageInTimeRange","RongIMLib.electronExtension.searchMessagesWithParams"),di(e,{keyword:null==t?void 0:t.keyword,limit:(null==t?void 0:t.limit)||5,offset:null==t?void 0:t.offset,order:0,timeRange:{startTime:null==t?void 0:t.startTime,endTime:null==t?void 0:t.endTime}})}))},searchMessagesByUser:function(e,t,n,i){return G(this,void 0,void 0,(function*(){B("RongIMLib.electronExtension.searchMessagesByUser","RongIMLib.electronExtension.searchMessagesWithParams");return(yield di(e,{limit:i,keyword:"",order:0,timeRange:{endTime:n?n-1:n||0},messageFilter:{senderIds:[t]}})).trans((({messages:e})=>({messages:e})))}))},getHistoryMessagesByMessageTypes:function(e,t){return G(this,void 0,void 0,(function*(){return(yield W().next((n=>n.getHistoryMessagesByObjectNames(e,t)))).trans((({list:e,hasMore:t})=>{const n=e.map(F);return{messages:n,hasMore:t,list:n}}))}))},getContinuousMessages:function(e,t){return G(this,void 0,void 0,(function*(){return(yield W().next((n=>n.getContinuousMessages(e,t)))).trans((({list:e,hasMore:t,timestamp:n})=>({hasMore:t,list:e.map(F),timestamp:n})))}))},setMessageStatusToRead:function(e,t){return G(this,void 0,void 0,(function*(){return W().next((n=>n.setMessageStatusToRead(e,t)))}))},setMessageReceivedStatus:li,setMessageReceivedStatusInfo:function(e,t){return G(this,void 0,void 0,(function*(){const n=D(t||{});return W().next((t=>t.setMessageReceivedStatus(e,n)))}))},setMessageSentStatus:function(e,t){return G(this,void 0,void 0,(function*(){return W().next((n=>n.setMessageSentStatus(e,t)))}))},setMessageContent:function(e,t,n){return G(this,void 0,void 0,(function*(){return W().next((i=>i.setMessageContent(e,t,n)))}))},deleteMessages:function(e){return G(this,void 0,void 0,(function*(){return W().next((t=>t.deleteLocalMessages(e)))}))},clearMessages:fi,deleteMessagesByTimestamp:vi,batchClearMessagesByTimestamp:function(e){return G(this,void 0,void 0,(function*(){return W().next((t=>t.batchClearLocalMessagesByTimestamp(e)))}))},insertMessage:hi,batchInsertMessage:function(e,t){return G(this,void 0,void 0,(function*(){return W().next((n=>n.batchInsertMessage(e,t)))}))},getMessageCount:function(e){return G(this,void 0,void 0,(function*(){return W().next((t=>t.getLocalMessageCount(e)))}))},setCheckDuplicateMessage:function(e){return G(this,void 0,void 0,(function*(){return W().next((t=>t.setCheckDuplicateMessage(e)))}))},setCheckChatRoomDuplicateMessage:function(e){return G(this,void 0,void 0,(function*(){return W().next((t=>t.chatroom.setCheckChatRoomDuplicateMessage(!!e)))}))},getMessagesAroundTimestamp:function(e,t){return G(this,void 0,void 0,(function*(){return(yield W().next((n=>{const i=null==t?void 0:t.timestamp,o=null==t?void 0:t.beforeCount,r=null==t?void 0:t.afterCount;return n.getMessagesAroundTimestamp(e,i,o,r)}))).trans((e=>e.map(F)))}))},getLocalMessage:gi,searchMessagesWithParams:function(e){return G(this,void 0,void 0,(function*(){return(yield W().next((t=>t.searchMessagesWithParams(e)))).trans((({totalMatched:e,messages:t,conditionsMatched:n})=>({count:n,messages:t.map((e=>F(e)))})))}))},setMessageSpeechToTextVisible:function(e,t){return W().next((n=>n.setMessageSpeechToTextVisible(e,t)))},deleteUltraGroupMessagesForAllChannel:function(e,t){return W().next((n=>n.deleteLocalUGMessagesForAllChannel(e,t)))},getUnreadMentionedMessages:function(e){return G(this,void 0,void 0,(function*(){return(yield W().next((t=>t.getUnreadMentionedMessages(e)))).trans((e=>e.map(F)))}))},clearLocalData:function(){return G(this,void 0,void 0,(function*(){return W().next((e=>e.clearLocalData()))}))},enable:function(){return b()}});function mi(e){return G(this,void 0,void 0,(function*(){return W().next((t=>t.setProxy(e)))}))}function pi(){return G(this,void 0,void 0,(function*(){return W().next((e=>e.getProxy()))}))}function Si(e,t){return G(this,void 0,void 0,(function*(){return W().next((n=>n.testProxy(e,t)))}))}function _i(e,t,n){return G(this,void 0,void 0,(function*(){return W().next((i=>i.subscribeUser(e,t,n)))}))}function Ti(e,t){return G(this,void 0,void 0,(function*(){return(yield W().next((n=>n.unSubscribeUser(e,t)))).wipe()}))}function Ii(e,t,n){return G(this,void 0,void 0,(function*(){return W().next((i=>i.getSubscribeUserList(e,t,n)))}))}function Ci(e,t){return G(this,void 0,void 0,(function*(){return W().next((n=>n.getSubscribeUserStatus(e,t)))}))}function Ai(e){return W().next((t=>t.updateMyUserProfile(e)))}function Ri(e){return W().next((t=>t.getUserProfiles(e)))}function Ni(){return W().next((e=>e.getMyUserProfile()))}function Mi(e){return W().next((t=>t.dataHosting.updateMyUserProfileVisibility(e)))}function Ui(){return W().next((e=>e.dataHosting.getMyUserProfileVisibility()))}function Oi(e){return W().next((t=>t.dataHosting.searchUserProfileByUniqueId(e)))}function xi(e){return W().next((t=>t.getSubscribeUsersOnlineStatus(e)))}function yi(e,t){return G(this,void 0,void 0,(function*(){return W().next((n=>n.dataHosting.createGroup(e,t)))}))}function Pi(e){return G(this,void 0,void 0,(function*(){return W().next((t=>t.dataHosting.updateGroupInfo(e)))}))}function Di(e){return G(this,void 0,void 0,(function*(){return W().next((t=>t.dataHosting.getGroupsInfo(e)))}))}function Li(e,t,n){return G(this,void 0,void 0,(function*(){return W().next((i=>i.dataHosting.kickGroupMembers(e,t,n)))}))}function bi(e,t){return G(this,void 0,void 0,(function*(){return W().next((n=>n.dataHosting.quitGroup(e,t)))}))}function Gi(e){return G(this,void 0,void 0,(function*(){return W().next((t=>t.dataHosting.dismissGroup(e)))}))}function Fi(e,t,n,i){return G(this,void 0,void 0,(function*(){return W().next((o=>o.dataHosting.transferGroupOwner(e,t,!!n,i)))}))}function Hi(e,t){return G(this,void 0,void 0,(function*(){return W().next((n=>n.dataHosting.addGroupManagers(e,t)))}))}function Bi(e,t){return G(this,void 0,void 0,(function*(){return W().next((n=>n.dataHosting.removeGroupManagers(e,t)))}))}function wi(e,t,n){return G(this,void 0,void 0,(function*(){return W().next((i=>i.dataHosting.getGroupMembersByRole(e,t,n)))}))}function ki(e,t){return G(this,void 0,void 0,(function*(){return W().next((n=>n.dataHosting.getGroupMembers(e,t)))}))}function Vi(e,t,n,i){return G(this,void 0,void 0,(function*(){return W().next((o=>o.dataHosting.setGroupMemberInfo(e,t,n,i)))}))}function ji(e,t,n){return G(this,void 0,void 0,(function*(){return W().next((i=>i.dataHosting.searchGroupMembers(e,t,n)))}))}function Yi(e){return G(this,void 0,void 0,(function*(){return W().next((t=>t.dataHosting.joinGroup(e)))}))}function qi(e,t){return G(this,void 0,void 0,(function*(){return W().next((n=>n.dataHosting.inviteUsersToGroup(e,t)))}))}function zi(e,t){return G(this,void 0,void 0,(function*(){return W().next((n=>n.dataHosting.acceptGroupInvite(e,t)))}))}function $i(e,t,n){return G(this,void 0,void 0,(function*(){return W().next((i=>i.dataHosting.refuseGroupInvite(e,t,n)))}))}function Wi(e,t,n){return G(this,void 0,void 0,(function*(){return W().next((i=>i.dataHosting.acceptGroupApplication(e,t,n)))}))}function Xi(e,t,n,i){return G(this,void 0,void 0,(function*(){return W().next((o=>o.dataHosting.refuseGroupApplication(e,t,n,i)))}))}function Qi(e,t,n){return G(this,void 0,void 0,(function*(){return W().next((i=>i.dataHosting.getGroupApplications(e,t,n)))}))}function Ki(e,t){return G(this,void 0,void 0,(function*(){return W().next((n=>n.dataHosting.getJoinedGroupsByRole(t,e)))}))}function Ji(e,t){return G(this,void 0,void 0,(function*(){return W().next((n=>n.dataHosting.searchJoinedGroups(e,t)))}))}function Zi(e){return G(this,void 0,void 0,(function*(){return W().next((t=>t.dataHosting.getJoinedGroups(e)))}))}function eo(e,t){return G(this,void 0,void 0,(function*(){return W().next((n=>n.dataHosting.setGroupRemark(e,t)))}))}function to(e,t){return G(this,void 0,void 0,(function*(){return W().next((n=>n.dataHosting.addGroupFollows(e,t)))}))}function no(e,t){return G(this,void 0,void 0,(function*(){return W().next((n=>n.dataHosting.removeGroupFollows(e,t)))}))}function io(e){return G(this,void 0,void 0,(function*(){return W().next((t=>t.dataHosting.getGroupFollows(e)))}))}function oo(e,t,n){return W().next((i=>i.dataHosting.addFriend(e,t,n)))}function ro(e,t){return W().next((n=>n.dataHosting.deleteFriends(e,t)))}function so(e){return W().next((t=>t.dataHosting.acceptFriendRequest(e)))}function ao(e){return W().next((t=>t.dataHosting.refuseFriendRequest(e)))}function uo(e,t,n){return W().next((i=>i.dataHosting.setFriendInfo(e,t||"",n)))}function co(e,t){return W().next((n=>n.dataHosting.checkFriends(e,t)))}function lo(e,t){return W().next((n=>n.dataHosting.getFriends(e,t)))}function fo(e,t,n){return W().next((i=>i.dataHosting.getFriendApplications(e,t,n)))}function vo(e){return W().next((t=>t.dataHosting.getFriendsInfo(e)))}function ho(e){return W().next((t=>t.dataHosting.searchFriendsInfo(e)))}function go(e){return W().next((t=>t.dataHosting.setFriendAddPermission(e)))}function Eo(){return W().next((e=>e.dataHosting.getFriendAddPermission()))}function mo(e){!function(e){var t,n,i;Y?z.warn(v.A_INIT_REPEAT_O):(o("options.appkey",e.appkey,r.STRING,!0),o("options.navigators",e.navigators,(e=>s(e)&&(0===e.length||e.every(a)))),o("options.loggerProxy",e.loggerProxy,(e=>e instanceof u)),q=e,Y=d.init({appkey:e.appkey,navigators:e.navigators||[],miniCMPProxy:e.customCMP||[],logOutputLevel:e.logOutputLevel,httpInMainProcess:!!e.httpInMainProcess,logExpireTime:e.logExpireTime,areaCode:e.areaCode,logServerUrl:e.logServerUrl,uploadDomain:e.uploadDomain,environment:null!==(t=e.environment)&&void 0!==t?t:"default",eventLoopBlockingCheck:e.eventLoopBlockingCheck,enableReadReceiptStorage:null!==(n=e.enableReadReceiptStorage)&&void 0!==n&&n,useNaviV2:null!==(i=e.useNaviV2)&&void 0!==i&&i,loggerProxy:e.loggerProxy,conversationCachePolicy:e.conversationCachePolicy}),z=Y.logger,Y.assignWatcher(V),Y.sse.on("message",((e,t)=>{const n=Object.assign(Object.assign({},t),{message:t.message?F(t.message):void 0});k.emit(w.STREAM_MESSAGE_RESPONSE,n)})))}(e)}function po(){return G(this,void 0,void 0,(function*(){return ae(),function(){return G(this,void 0,void 0,(function*(){Y&&(yield d.destroy(),q=null,Y=null,z=null)}))}()}))}function So(){return $((e=>e.getConnectionStatus()))}function _o(){return $((e=>e.getServerTime()))}function To(){return $((e=>e.getCurrentUserId()))}function Io(e,t){i.add(e,t)}function Co(){return $((e=>e.getDeviceId()))}function Ao(){const e=W().tryTrans((e=>e.getAppSettings()));return e.isOk?e.data:null}const Ro={COMET:"_",WEBSOCKET:"_"};function No(e){return W().next((t=>t.setNotificationQuietHoursWithSetting(e)))}function Mo(){return W().next((e=>e.removeNotificationQuietHoursSetting()))}function Uo(){return W().next((e=>e.getNotificationQuietHoursSetting()))}function Oo(e,t){return G(this,void 0,void 0,(function*(){return(yield W().next((n=>n.chatroom.joinChatroom(e,null==t?void 0:t.count,!0,null==t?void 0:t.extra)))).wipe()}))}function xo(e,t){return G(this,void 0,void 0,(function*(){return W().next((n=>n.chatroom.joinChatroom(e,null==t?void 0:t.count,!1,null==t?void 0:t.extra)))}))}function yo(e,t){return G(this,void 0,void 0,(function*(){return W().next((n=>n.chatroom.quitChatroom(e,t)))}))}function Po(e,t){return G(this,void 0,void 0,(function*(){return W().next((n=>n.chatroom.getChatroomInfo(e,null==t?void 0:t.count,null==t?void 0:t.order)))}))}function Do(e,t){return G(this,void 0,void 0,(function*(){return W().next((n=>n.chatroom.setChatroomEntry(e,t,!1)))}))}function Lo(e,t){return G(this,void 0,void 0,(function*(){return(yield W().next((n=>n.chatroom.setChatroomEntries(e,t)))).wipe()}))}function bo(e,t){return G(this,void 0,void 0,(function*(){return W().next((n=>n.chatroom.setChatroomEntry(e,t,!0)))}))}function Go(e,t){return G(this,void 0,void 0,(function*(){return W().next((n=>n.chatroom.removeChatroomEntry(e,t,!1)))}))}function Fo(e,t){return G(this,void 0,void 0,(function*(){return W().next((n=>n.chatroom.removeChatroomEntries(e,{keys:null==t?void 0:t.entries,notificationExtra:null==t?void 0:t.notificationExtra})))}))}function Ho(e,t){return G(this,void 0,void 0,(function*(){return W().next((n=>n.chatroom.removeChatroomEntry(e,t,!0)))}))}function Bo(e,t){return G(this,void 0,void 0,(function*(){return W().next((n=>n.chatroom.getChatroomEntry(e,t)))}))}function wo(e){return G(this,void 0,void 0,(function*(){return W().next((t=>t.chatroom.getAllChatroomEntries(e)))}))}function ko(e,t){return G(this,void 0,void 0,(function*(){return(yield W().next((n=>n.chatroom.getChatroomHistoryMessages(e,null==t?void 0:t.count,null==t?void 0:t.order,null==t?void 0:t.timestamp)))).trans((({list:e,hasMore:t})=>({hasMore:t,list:e.map((e=>F(e)))})))}))}function Vo(e){return G(this,void 0,void 0,(function*(){return W().next((t=>t.chatroom.bindRTCRoomForChatroom(e)))}))}function jo(e){return G(this,void 0,void 0,(function*(){return W().next((t=>t.setTranslationLanguage(e)))}))}function Yo(){return G(this,void 0,void 0,(function*(){return W().next((e=>e.getTranslationLanguage()))}))}function qo(e){return G(this,void 0,void 0,(function*(){return W().next((t=>t.setAutoTranslateEnabled(e)))}))}function zo(){return G(this,void 0,void 0,(function*(){return W().next((e=>e.getAutoTranslateEnabled()))}))}function $o(){return W().next((e=>e.getAllRobots()))}function Wo(e){return W().next((t=>t.getRobotById(e)))}function Xo(e){return W().next((t=>t.chat.addMessageReaction(e)))}function Qo(e){return W().next((t=>t.chat.removeMessageReaction(e)))}function Ko(e){return W().next((t=>t.chat.batchGetMessageReactionSummaries(e)))}function Jo(e){return W().next((t=>t.chat.getMessageReactions(e)))}function Zo(e){return W().next((t=>t.chat.getMessageReactionUsers(e)))}export{ue as BaseMessage,ce as CombineMessage,le as CombineV2Message,fe as CommandMessage,Ro as ConnectType,w as Events,ve as FileMessage,he as GIFMessage,Ee as GroupNotificationMessage,Re as HQVoiceMessage,me as ImageMessage,Se as InformationNotificationMessage,_e as LocationMessage,Te as ReferenceMessage,Ie as RichContentMessage,Ce as SightMessage,Ae as TextMessage,be as UploadTask,Ne as VoiceMessage,Io as __addSDKVersion,so as acceptFriendApplication,Wi as acceptGroupApplication,zi as acceptGroupInvite,ti as addConversationsToTag,ie as addEventListener,oo as addFriend,to as addGroupFollows,Hi as addGroupManagers,Xo as addMessageReaction,Z as addMonitor,Qn as addTag,zn as addToBlacklist,ht as batchClearRemoteHistoryMessages,Xt as batchDeleteConversations,Ko as batchGetMessageReactionSummaries,ct as batchGetMessageReadReceiptInfoV4,Wt as batchRemoveConversation,an as batchSetConversationNotificationLevel,En as batchSetConversationToTop,un as batchSetConversationTranslateStrategy,Vo as bindRTCRoomForChatroom,co as checkFriends,rn as clearAllMessagesUnreadStatus,ae as clearEventListeners,vt as clearHistoryMessages,Nt as clearMessages,on as clearMessagesUnreadStatus,Cn as clearRealtimeConUnreadCount,Jt as clearTextMessageDraft,Ut as clearUnreadCountByTimestamp,te as connect,Mn as createConversationListLoader,yi as createGroup,Be as createUploadTask,ro as deleteFriends,Rt as deleteLocalMessagesByTimestamp,ft as deleteMessages,po as destroy,ne as disconnect,Gi as dismissGroup,Ei as electronExtension,Ho as forceRemoveChatRoomEntry,bo as forceSetChatRoomEntry,wo as getAllChatRoomEntries,Yt as getAllConversationList,$o as getAllRobots,kn as getAllUltraGroupUnreadCount,Vn as getAllUltraGroupUnreadMentionedCount,_n as getAllUnreadMentionedCount,Ao as getAppSettings,zo as getAutoTranslateEnabled,Wn as getBlacklist,Xn as getBlacklistStatus,yn as getBlockUltraGroupList,fn as getBlockedConversationList,Bo as getChatRoomEntry,Po as getChatRoomInfo,ko as getChatroomHistoryMessages,So as getConnectionStatus,zt as getConversation,jt as getConversationList,qt as getConversationListByTimestamp,cn as getConversationNotificationLevel,ln as getConversationNotificationStatus,hn as getConversationTypeNotificationLevel,ri as getConversationsFromTagByPage,Un as getConversationsIncludingRobots,To as getCurrentUserId,Co as getDeviceId,je as getDownloadAuth,Ve as getFileToken,Ye as getFileUrl,_t as getFirstUnreadMessage,Tt as getFirstUnreadMessageInfo,Eo as getFriendAddPermission,fo as getFriendApplications,lo as getFriends,vo as getFriendsInfo,Qi as getGroupApplications,io as getGroupFollows,ki as getGroupMembers,wi as getGroupMembersByRole,Di as getGroupsInfo,tt as getHistoryMessages,Zi as getJoinedGroups,Ki as getJoinedGroupsByRole,qe as getMessage,Zo as getMessageReactionUsers,Jo as getMessageReactions,Pt as getMessageReadReceiptInfoV5,Dt as getMessageReadReceiptInfoV5ByIdentifiers,dt as getMessageReadReceiptV4,pt as getMessageReader,Vt as getMessagesByUIds,bt as getMessagesReadReceiptByUsersV5,Lt as getMessagesReadReceiptUsersByPageV5,Ni as getMyUserProfile,Ui as getMyUserProfileVisibility,Uo as getNotificationQuietHoursSetting,pi as getProxy,In as getRealtimeConTotalUnreadCount,Rn as getRealtimeConUnreadCounts,Tn as getRealtimeConversations,nt as getRemoteHistoryMessages,Wo as getRobotById,_o as getServerTime,Ii as getSubscribeUserList,Ci as getSubscribeUserStatus,xi as getSubscribeUsersOnlineStatus,Zn as getTags,ei as getTagsFromConversation,Qt as getTextMessageDraft,mn as getTopConversationList,Zt as getTotalUnreadCount,en as getTotalUnreadCountByLevels,tn as getTotalUnreadMentionedCountByLevels,Yo as getTranslationLanguage,Hn as getUltraGroupDefaultNotificationLevel,Yn as getUltraGroupFirstUnreadMessageTimestamp,xn as getUltraGroupList,Dn as getUltraGroupMessageListByMessageUId,wn as getUltraGroupUnreadCountByTargetId,qn as getUltraGroupUnreadInfoList,Fn as getUltraGroupUnreadMentionedCountByTargetId,jn as getUltraGroupUnreadMentionedMessages,pn as getUnreadConversationList,nn as getUnreadCount,si as getUnreadCountByTag,Nn as getUnreadMentionMeConversationList,Sn as getUnreadMentionedCount,Ct as getUnreadMentionedMessages,Ri as getUserProfiles,mo as init,It as insertMessage,X as installPlugin,qi as inviteUsersToGroup,Oo as joinChatRoom,xo as joinExistChatRoom,Yi as joinGroup,Li as kickGroupMembers,On as markRemoteConversationAsRead,Bt as modifyMessage,wt as modifyMessageWithParams,oe as onceEventListener,yo as quitChatRoom,bi as quitGroup,lt as recallMessage,kt as refreshReferenceMessageWithParams,ao as refuseFriendApplication,Xi as refuseGroupApplication,$i as refuseGroupInvite,St as registerMessageType,Gn as removeAllExpansionForUltraGroupMessage,Fo as removeChatRoomEntries,Go as removeChatRoomEntry,$t as removeConversation,ni as removeConversationsFromTag,re as removeEventListener,se as removeEventListeners,bn as removeExpansionForUltraGroupMessage,$n as removeFromBlacklist,no as removeGroupFollows,Bi as removeGroupManagers,Et as removeMessageExpansionForKey,Qo as removeMessageReaction,ee as removeMonitor,Mo as removeNotificationQuietHoursSetting,An as removeRealtimeConversations,Kn as removeTag,oi as removeTagFromConversations,ii as removeTagsFromConversation,Gt as requestSpeechToTextForMessage,xt as requestStreamMessageContent,Kt as saveTextMessageDraft,Mt as searchConversationByContent,ho as searchFriendsInfo,ji as searchGroupMembers,Ji as searchJoinedGroups,At as searchMessages,Oi as searchUserProfileByUniqueId,Qe as sendFileMessage,Je as sendGIFMessage,Ze as sendHQVoiceMessage,Ke as sendImageMessage,ze as sendMessage,it as sendReadReceiptMessage,ut as sendReadReceiptMessageV4,ot as sendReadReceiptRequest,rt as sendReadReceiptResponse,st as sendReadReceiptResponseV2,yt as sendReadReceiptResponseV5,et as sendSightMessage,at as sendSyncReadStatusMessage,$e as sendTextMessage,mt as sendTypingStatusMessage,Pn as sendUltraGroupTypingStatus,qo as setAutoTranslateEnabled,Lo as setChatRoomEntries,Do as setChatRoomEntry,sn as setConversationNotificationLevel,dn as setConversationNotificationStatus,gn as setConversationToTop,ai as setConversationToTopInTag,vn as setConversationTypeNotificationLevel,go as setFriendAddPermission,uo as setFriendInfo,Vi as setGroupMemberInfo,eo as setGroupRemark,Ot as setMessageReceivedStatus,No as setNotificationQuietHoursWithSetting,mi as setProxy,jo as setTranslationLanguage,Bn as setUltraGroupDefaultNotificationLevel,we as stopUploadTask,_i as subscribeUserStatus,Si as testProxy,Fi as transferGroupOwner,Ft as translateMessagesWithParams,Ht as translateTextsWithParams,Ti as unSubscribeUserStatus,Ln as updateExpansionForUltraGroupMessage,Pi as updateGroupInfo,gt as updateMessageExpansion,Ai as updateMyUserProfile,Mi as updateMyUserProfileVisibility,Jn as updateTag,ke as upload};
15
+ ***************************************************************************** */function Ri(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{u(i.next(e))}catch(e){r(e)}}function a(e){try{u(i.throw(e))}catch(e){r(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((i=i.apply(e,t||[])).next())}))}function Ci(e){return Object.assign(Object.assign({},e),{channelId:e.channelId||""})}function Ni(t){const{conversationType:n,targetId:i,latestMessage:o,unreadMessageCount:r,hasMentioned:s,mentionedInfo:a,lastUnreadTime:u,notificationStatus:d,notificationLevel:c,isTop:l,channelId:f,unreadMentionedCount:v,matchCount:E,operationTime:h,draft:m,translateStrategy:p,editedMessageDraft:g,includeRobot:S,dataMgmtInfo:_}=t,I=o&&Ci(o);let T;T=s?{type:null==a?void 0:a.type,userIdList:null==a?void 0:a.userIdList}:void 0;const A={conversationType:n,targetId:i,latestMessage:I,unreadMessageCount:r,hasMentioned:s,mentionedInfo:T,lastUnreadTime:u,notificationStatus:d,notificationLevel:c,isTop:l,channelId:f,unreadMentionedCount:v,matchCount:E,operationTime:h,draft:m||"",translateStrategy:p,editedMessageDraft:g,includeRobot:S,dataMgmtInfo:_};return A.conversationType===e.ULTRA_GROUP&&(A.firstUnreadMessage=t.firstUnreadMessage,A.channelType=t.channelType,A.unreadMentionedMeCount=t.unreadMentionedMeCount),A}function Mi(e,t){null===console||void 0===console||console.warn(`Method '${e}' is deprecated, please use '${t}' instead`)}var Oi;!function(e){e.CONNECTING="CONNECTING",e.CONNECTED="CONNECTED",e.DISCONNECT="DISCONNECT",e.SUSPEND="SUSPEND",e.MESSAGES="MESSAGES",e.READ_RECEIPT_RECEIVED="READ_RECEIPT_RECEIVED",e.MESSAGE_RECEIPT_REQUEST="MESSAGE_RECEIPT_REQUEST",e.MESSAGE_RECEIPT_RESPONSE="MESSAGE_RECEIPT_RESPONSE",e.MESSAGE_READ_RECEIPT_V4="MESSAGE_READ_RECEIPT_V4",e.SYNC_READ_STATUS="SYNC_READ_STATUS",e.CONVERSATION="CONVERSATION",e.CHATROOM="CHATROOM",e.EXPANSION="EXPANSION",e.PULL_OFFLINE_MESSAGE_FINISHED="PULL_OFFLINE_MESSAGE_FINISHED",e.TAG="TAG",e.USER_SETTINGS_SYNCED="USER_SETTINGS_SYNCED",e.USER_SETTINGS_CHANGED="USER_SETTINGS_CHANGED",e.CONVERSATIONS_SETTINGS_SYNCED="CONVERSATIONS_SETTINGS_SYNCED",e.CONVERSATION_TAG="CONVERSATION_TAG",e.TYPING_STATUS="TYPING_STATUS",e.MESSAGE_BLOCKED="MESSAGE_BLOCKED",e.ULTRA_GROUP_ENABLE="ULTRA_GROUP_ENABLE",e.CONVERSATIONS_SYNCED="CONVERSATIONS_SYNCED",e.OPERATE_STATUS="OPERATE_STATUS",e.ULTRA_GROUP_MESSAGE_EXPANSION_UPDATED="ULTRA_GROUP_MESSAGE_EXPANSION_UPDATED",e.ULTRA_GROUP_MESSAGE_MODIFIED="MESSAGE_MODIFIED",e.ULTRA_GROUP_MESSAGE_RECALLED="ULTRA_GROUP_MESSAGE_RECALLED",e.ULTRA_GROUP_CHANNEL_TYPE_CHANGE="ULTRA_GROUP_CHANNEL_TYPE_CHANGE",e.ULTRA_GROUP_CHANNEL_DELETE="ULTRA_GROUP_CHANNEL_DELETE",e.ULTRA_GROUP_CHANNEL_USER_KICKED="ULTRA_GROUP_CHANNEL_USER_KICKED",e.USER_GROUP_STATUS="USER_GROUP_STATUS",e.SUBSCRIBED_USER_STATUS_CHANGE="SUBSCRIBED_USER_STATUS_CHANGE",e.SUBSCRIBED_RELATION_CHANGE="SUBSCRIBED_RELATION_CHANGE",e.SYNC_SUBSCRIBED_USER_STATUS_FINISHED="SYNC_SUBSCRIBED_USER_STATUS_FINISHED",e.OWN_USER_PROFILE_CHANGED="OWN_USER_PROFILE_CHANGED",e.GROUP_OPERATION="GROUP_OPERATION",e.GROUP_INFO_CHANGED="GROUP_INFO_CHANGED",e.GROUP_MEMBER_INFO_CHANGED="GROUP_MEMBER_INFO_CHANGED",e.GROUP_APPLICATION_EVENT="GROUP_APPLICATION_EVENT",e.GROUP_REMARK_CHANGED_SYNC="GROUP_REMARK_CHANGED_SYNC",e.GROUP_FOLLOWS_CHANGED_SYNC="GROUP_FOLLOWS_CHANGED_SYNC",e.FRIEND_ADDED="FRIEND_ADDED",e.FRIEND_DELETE="FRIEND_DELETE",e.FRIEND_APPLICATION_STATUS_CHANGED="FRIEND_APPLICATION_STATUS_CHANGED",e.FRIEND_CLEARED="FRIEND_CLEARED",e.FRIEND_INFO_CHANGED_SYNC="FRIEND_INFO_CHANGED_SYNC",e.DATABASE_OPENED="DATABASE_OPENED",e.DATABASE_UPGRADE_WILL_START="DATABASE_UPGRADE_WILL_START",e.DATABASE_UPGRADING="DATABASE_UPGRADING",e.DATABASE_UPGRADE_DID_COMPLETE="DATABASE_UPGRADE_DID_COMPLETE",e.STREAM_MESSAGE_RESPONSE="STREAM_MESSAGE_RESPONSE",e.MESSAGE_RECEIPT_RESPONSE_V5="MESSAGE_RECEIPT_RESPONSE_V5",e.SPEECH_TO_TEXT_RESPONSE="SPEECH_TO_TEXT_RESPONSE",e.TRANSLATE_RESPONSE="TRANSLATE_RESPONSE",e.MESSAGE_MODIFIED="MESSAGE_MODIFIED",e.MESSAGE_MODIFIED_SYNC_COMPLETED="MESSAGE_MODIFIED_SYNC_COMPLETED",e.ROBOTS_SYNCED="ROBOTS_SYNCED",e.SYNC_SERVER_SAVE_UNREAD_COMPLETED="SYNC_SERVER_SAVE_UNREAD_COMPLETED",e.MESSAGE_REACTION_CHANGED="MESSAGE_REACTION_CHANGED"}(Oi||(Oi={}));const Ui=new t,yi={connection(e,t){switch(e){case n.CONNECTED:Ui.emit(Oi.CONNECTED);break;case n.CONNECTING:Ui.emit(Oi.CONNECTING);break;case n.SUSPENDED:Ui.emit(Oi.SUSPEND,t);break;case n.DISCONNECTED:Ui.emit(Oi.DISCONNECT,t)}},batchMessage:e=>{Ui.emit(Oi.MESSAGES,{messages:e.map((e=>Ci(e)))})},typingState:e=>{Ui.emit(Oi.TYPING_STATUS,{status:e})},readReceiptReceived:(e,t,n,i)=>{Ui.emit(Oi.READ_RECEIPT_RECEIVED,{conversation:e,messageUId:t,sentTime:n,sendUserId:i})},messageReceiptRequest:(e,t,n)=>{Ui.emit(Oi.MESSAGE_RECEIPT_REQUEST,{conversation:e,messageUId:t,senderUserId:n})},messageReceiptResponse:(e,t,n)=>{Ui.emit(Oi.MESSAGE_RECEIPT_RESPONSE,{conversation:e,receivedUserId:t,messageUIdList:n})},conversationState:t=>{const n=t.map((({conversation:t,updatedItems:n})=>{const{conversationType:i}=t,o=Ni(t);return i===e.ULTRA_GROUP&&(o.versionTime=t.versionTime,o.unreadMessageCount=Pi(t.unreadMessageCount||0),o.unreadMentionedCount=Pi(t.unreadMentionedCount||0),o.unreadMentionedMeCount=Pi(t.unreadMentionedMeCount||0)),{conversation:o,updatedItems:n}}));Ui.emit(Oi.CONVERSATION,{conversationList:n})},chatroomState:e=>{Ui.emit(Oi.CHATROOM,e)},expansion:e=>{Ui.emit(Oi.EXPANSION,e)},pullFinished:()=>{Ui.emit(Oi.PULL_OFFLINE_MESSAGE_FINISHED)},tag:()=>{Ui.emit(Oi.TAG)},userSettingsSynced:e=>{Ui.emit(Oi.USER_SETTINGS_SYNCED,e)},userSettingsChanged:e=>{Ui.emit(Oi.USER_SETTINGS_CHANGED,e)},conversationStatusSynced:e=>{Ui.emit(Oi.CONVERSATIONS_SETTINGS_SYNCED,e)},robotsSynced:(e,t)=>{Ui.emit(Oi.ROBOTS_SYNCED,e,t)},conversationTagChanged:()=>{Ui.emit(Oi.CONVERSATION_TAG)},messageBlocked:e=>{Ui.emit(Oi.MESSAGE_BLOCKED,e)},ultraGroupEnable:()=>{Ui.emit(Oi.ULTRA_GROUP_ENABLE)},sgRelationsSynced:e=>{Ui.emit(Oi.CONVERSATIONS_SYNCED,e)},operateStatus:e=>{Ui.emit(Oi.OPERATE_STATUS,e)},ultraGroupMessageExpansionUpdated:e=>{Ui.emit(Oi.ULTRA_GROUP_MESSAGE_EXPANSION_UPDATED,e.map((e=>Ci(e))))},ultraGroupMessageRecalled:e=>{Ui.emit(Oi.ULTRA_GROUP_MESSAGE_RECALLED,e.map((e=>Ci(e))))},ultraGroupChannelChangeType:e=>{Ui.emit(Oi.ULTRA_GROUP_CHANNEL_TYPE_CHANGE,e)},ultraGroupChannelUserKicked:e=>{Ui.emit(Oi.ULTRA_GROUP_CHANNEL_USER_KICKED,e)},ultraGroupChannelDelete:e=>{Ui.emit(Oi.ULTRA_GROUP_CHANNEL_DELETE,e)},userGroupStatus:e=>{Ui.emit(Oi.USER_GROUP_STATUS,e)},messageReadReceipt:e=>{Ui.emit(Oi.MESSAGE_READ_RECEIPT_V4,e)},syncReadStatus:e=>{Ui.emit(Oi.SYNC_READ_STATUS,e)},subscribedUserStatusChange:e=>{Ui.emit(Oi.SUBSCRIBED_USER_STATUS_CHANGE,e)},subscribedRelationChange:e=>{Ui.emit(Oi.SUBSCRIBED_RELATION_CHANGE,e)},syncSubscribedUserStatusFinished:e=>{Ui.emit(Oi.SYNC_SUBSCRIBED_USER_STATUS_FINISHED,e)},ownUserProfileChanged:e=>{Ui.emit(Oi.OWN_USER_PROFILE_CHANGED,e)},groupOperation:e=>{Ui.emit(Oi.GROUP_OPERATION,e)},groupInfoChanged:e=>{Ui.emit(Oi.GROUP_INFO_CHANGED,e)},groupMemberInfoChanged:e=>{Ui.emit(Oi.GROUP_MEMBER_INFO_CHANGED,e)},groupApplicationEvent:e=>{Ui.emit(Oi.GROUP_APPLICATION_EVENT,e)},groupRemarkChangedSync:e=>{Ui.emit(Oi.GROUP_REMARK_CHANGED_SYNC,e)},groupFollowsChangedSync:e=>{Ui.emit(Oi.GROUP_FOLLOWS_CHANGED_SYNC,e)},friendAdd:e=>{Ui.emit(Oi.FRIEND_ADDED,e)},friendDelete:e=>{Ui.emit(Oi.FRIEND_DELETE,e)},friendApplicationStatusChanged:e=>{Ui.emit(Oi.FRIEND_APPLICATION_STATUS_CHANGED,e)},friendCleared:e=>{Ui.emit(Oi.FRIEND_CLEARED,e)},friendInfoChangedSync:e=>{Ui.emit(Oi.FRIEND_INFO_CHANGED_SYNC,e)},databaseOpened:(e,t)=>{Ui.emit(Oi.DATABASE_OPENED,e,t)},databaseUpgradeWillStart:()=>{Ui.emit(Oi.DATABASE_UPGRADE_WILL_START)},databaseUpgrading:e=>{Ui.emit(Oi.DATABASE_UPGRADING,e)},databaseUpgradeDidComplete:e=>{Ui.emit(Oi.DATABASE_UPGRADE_DID_COMPLETE,e)},readReceiptResponseV5:e=>{Ui.emit(Oi.MESSAGE_RECEIPT_RESPONSE_V5,e)},speechToTextResponse:e=>{Ui.emit(Oi.SPEECH_TO_TEXT_RESPONSE,e)},translateResponse:e=>{Ui.emit(Oi.TRANSLATE_RESPONSE,e)},messagesModified:e=>{Ui.emit(Oi.MESSAGE_MODIFIED,e.map((e=>Ci(e))))},messageModifiedSyncCompleted:()=>{Ui.emit(Oi.MESSAGE_MODIFIED_SYNC_COMPLETED)},syncServerSaveUnreadCompleted:()=>{Ui.emit(Oi.SYNC_SERVER_SAVE_UNREAD_COMPLETED)},messageReaction(e){Ui.emit(Oi.MESSAGE_REACTION_CHANGED,e)},streamMessageResponse(e){const t=Object.assign(Object.assign({},e),{message:e.message?Ci(e.message):void 0});Ui.emit(Oi.STREAM_MESSAGE_RESPONSE,t)}};function Pi(e){return e>999?999:e}i.add("imlib-next","5.46.1-alpha.1");let Di=null,bi=null,Li=null;function Gi(e){if(!Di)throw new Error("Not initialized yet!");return e(Di,Li,bi)}const{setup:xi}=o;function Fi(e,t){return Gi((n=>n.install(e,t)))}let wi=0;const Bi=new Map;function Hi(e,t){const n=(...e)=>{const i=[],o=[];[...Bi.values()].forEach((([e,t,r])=>{e===n&&(o.push(t),r&&i.push(r))})),i.forEach((t=>{e=t(e)}));const r=t(...e);return o.forEach((t=>{t(e,r)})),r};return Object.defineProperty(n,"original",{value:t,writable:!1,enumerable:!1,configurable:!1}),Object.defineProperty(n,"name",{value:e,writable:!1,enumerable:!1,configurable:!1}),Object.defineProperty(n,"monitorable",{value:!0,writable:!1,enumerable:!1,configurable:!1}),n}function ki(e,t,n){if(!e.monitorable)throw new Error(`Not monitorable API: ${e.name}`);const i=++wi;return Bi.set(i,[e,t,n]),i}function Vi(e){Bi.delete(e)}function ji(e,t){return Ri(this,void 0,void 0,(function*(){return(yield xi().next((n=>n.connect(e,!!t)))).trans((e=>({userId:e})))}))}const Yi=Hi("disconnect",((e,t)=>Gi((n=>n.disconnect(e,t)))));function zi(e,t,n){Ui.on(e,t,n)}function $i(e,t,n){Ui.once(e,t,n)}function qi(e,t,n){Ui.off(e,t,n)}function Wi(e){Ui.removeAll(e)}function Xi(){Ui.clear()}class Qi{constructor(e,t,n=!0,i=!0){Object.defineProperty(this,"messageType",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"content",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"isPersited",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(this,"isCounted",{enumerable:!0,configurable:!0,writable:!0,value:i})}}class Ki extends Qi{constructor(e,t,n){super(e,n,t.isPersited,t.isCounted)}}class Ji extends Ki{constructor(e){super(l.COMBINE,f(l.COMBINE),e)}}class Zi extends Ki{constructor(e){super(l.COMBINE_V2,f(l.COMBINE_V2),e)}}class eo extends Ki{constructor(e){super(l.COMMAND,f(l.COMMAND),e)}}class to extends Ki{constructor(e){super(l.FILE,f(l.FILE),e)}}class no extends Ki{constructor(e){super(l.GIF,f(l.GIF),e)}}const io=l.GROUP_NOTIFICATION;class oo extends Ki{constructor(e){super(io,f(io),e)}}class ro extends Ki{constructor(e){super(l.IMAGE,f(l.IMAGE),e)}}const so=l.INFORMATION_NOTIFICATION;class ao extends Ki{constructor(e){super(so,f(so),e)}}class uo extends Ki{constructor(e){super(l.LOCATION,f(l.LOCATION),e)}}class co extends Ki{constructor(e){super(l.REFERENCE,f(l.REFERENCE),e)}}class lo extends Ki{constructor(e){super(l.RICH_CONTENT,f(l.RICH_CONTENT),e)}}class fo extends Ki{constructor(e){super(l.SIGHT,f(l.SIGHT),e)}}class vo extends Ki{constructor(e){super(l.TEXT,f(l.TEXT),e)}}class Eo extends Ki{constructor(e){super(l.HQ_VOICE,f(l.HQ_VOICE),e)}}class ho extends Ki{constructor(e){super(l.VOICE,f(l.VOICE),e)}}var mo;!function(e){e.ALIYUN="aliyun",e.S3="s3",e.MINIO="minio",e.QINIU="qiniu",e.RCX="rcx"}(mo||(mo={}));class po{constructor(e,t,n){Object.defineProperty(this,"_url",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"_authInfo",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"_getFileToken",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(this,"multipartUpload",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_isAbort",{enumerable:!0,configurable:!0,writable:!0,value:!1})}isAbort(){return this._isAbort}abort(){this._isAbort=!0,this._abortHandler()}upload(e){return e.file.size>v?Promise.resolve(E(h.UPLOAD_FAIL,"the file size is over 5GB!")):e.file.size>m&&this.multipartUpload?this.multipartUpload(e):this.commonUpload(e)}}function go(e){return Math.ceil(e/1024)||0}const So={[mo.QINIU]:class extends po{constructor(){super(...arguments),Object.defineProperty(this,"_promise",{enumerable:!0,configurable:!0,writable:!0,value:null})}commonUpload(e){return Ri(this,void 0,void 0,(function*(){const{file:t,onProgress:n,fileType:i}=e;let o=this._authInfo;const r=new FormData;r.set("token",o.token),r.set("key",o.fileName),r.set("file",t),this._promise=p({url:g(this._url),headers:{},onProgress:e=>null==n?void 0:n(e.loaded,e.total),method:"POST",body:r,timeout:0});const{status:s}=yield this._promise.result();return this._promise=null,200===s||204===s?S({uniqueName:o.fileName,uploadMethod:_.QINIU}):E(h.UPLOAD_FAIL,s.toString())}))}_abortHandler(){var e;null===(e=this._promise)||void 0===e||e.abort()}},[mo.ALIYUN]:class extends po{constructor(){super(...arguments),Object.defineProperty(this,"_promise",{enumerable:!0,configurable:!0,writable:!0,value:null})}commonUpload(e){return Ri(this,void 0,void 0,(function*(){const{file:t,onProgress:n,fileType:i}=e;let o=this._authInfo;const r=g(`${o.ossBucketName}.${this._url}`),s=new FormData;s.set("token",o.token),s.set("OSSAccessKeyId",o.osskeyId),s.set("policy",o.ossPolicy),s.set("Signature",o.ossSign),s.set("success_action_status","200"),s.set("key",o.fileName),s.set("file",t),this._promise=p({url:r,onProgress:e=>null==n?void 0:n(e.loaded,e.total),method:"POST",body:s,timeout:0});const{status:a}=yield this._promise.result();return this._promise=null,200===a||204===a?S({uniqueName:o.fileName,uploadMethod:_.ALI}):E(h.UPLOAD_FAIL,a.toString())}))}_abortHandler(){var e;null===(e=this._promise)||void 0===e||e.abort()}},[mo.S3]:class extends po{constructor(){super(...arguments),Object.defineProperty(this,"_promise",{enumerable:!0,configurable:!0,writable:!0,value:null})}commonUpload(e){return Ri(this,void 0,void 0,(function*(){const{file:t,onProgress:n,fileType:i,contentDisposition:o}=e;let r=this._authInfo;const s=g(`${r.s3BucketName}.${this._url}`),a=new FormData;o?a.set("Content-Disposition",o):a.set("Content-Disposition","text/html"===t.type?"inline;":"attachment;"),a.set("Content-Type",t.type),a.set("x-amz-credential",r.s3Credential),a.set("x-amz-algorithm",r.s3Algorithm),a.set("x-amz-date",r.s3Date),a.set("policy",r.s3Policy),a.set("x-amz-signature",r.s3Signature),a.set("key",r.fileName),a.set("file",t),this._promise=p({url:s,headers:{},onProgress:e=>null==n?void 0:n(e.loaded,e.total),method:"POST",body:a,timeout:0});const{status:u,data:d}=yield this._promise.result();return this._promise=null,200===u||204===u?S({uniqueName:r.fileName,uploadMethod:_.AWS}):E(h.UPLOAD_FAIL,u.toString())}))}_abortHandler(){var e;null===(e=this._promise)||void 0===e||e.abort()}},[mo.MINIO]:class extends po{constructor(){super(...arguments),Object.defineProperty(this,"_promise",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"isSupportMultipart",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"multipartUpload",{enumerable:!0,configurable:!0,writable:!0,value:e=>Ri(this,void 0,void 0,(function*(){var t;const{file:n,fileType:i}=e;let o=yield this._getFileToken(i,n.name,"POST","uploads",void 0,go(n.size));if(!o.isOk)return o.wipe();let r=o.data;const s=g(`${this._url}/${r.minioBucketName}/${r.fileName}`),a=this.getBaseHeaders(n,r,e);this._promise=p({url:`${s}?uploads`,headers:a,method:"POST"});const{status:u,data:d}=yield this._promise.result();this._promise=null;const c=null===(t=null==d?void 0:d.match(/(?:<UploadId>)(\S*?)(?:<\/UploadId>)/))||void 0===t?void 0:t[1];if(200!==u&&204!==u||!c)return E(h.UPLOAD_FAIL,"start upload fail");const l=[],f=yield this.requestUploadPart(s,n,c,r.fileName,e,l);if(!f.isOk)return f.wipe();if(o=yield this._getFileToken(i,r.fileName,"POST",`uploadId=${c}`,void 0,go(n.size)),!o.isOk)return o.wipe();r=o.data;let v=l.map(((e,t)=>`<Part><PartNumber>${t+1}</PartNumber><ETag>${e}</ETag></Part>`)).join("");v=`<CompleteMultipartUpload xmlns='http://s3.amazonaws.com/doc/2006-03-01/'>${v}</CompleteMultipartUpload>`;const m=this.getBaseHeaders(n,r,e);this._promise=p({url:`${s}?uploadId=${c}`,headers:m,method:"POST",body:v,timeout:0});const{status:I}=yield this._promise.result();return this._promise=null,200===I||204===I?S({uniqueName:r.fileName,uploadMethod:_.MINIO}):E(h.UPLOAD_FAIL,"end upload fail")}))})}commonUpload(e){return Ri(this,void 0,void 0,(function*(){const{file:t,onProgress:n,fileType:i}=e;let o=this._authInfo;const r=g(`${this._url}/${o.minioBucketName}/${o.fileName}`),s=this.getBaseHeaders(t,o,e);this._promise=p({url:r,headers:s,onProgress:e=>null==n?void 0:n(e.loaded,e.total),method:"PUT",body:t,timeout:0});const{status:a}=yield this._promise.result();return this._promise=null,200===a||204===a?S({uniqueName:o.fileName,uploadMethod:_.MINIO}):E(h.UPLOAD_FAIL,a.toString())}))}requestUploadPart(e,t,n,i,o,r){return Ri(this,arguments,void 0,(function*(e,t,n,i,o,r,s=1,a=0){if(a>=5)return E(h.UPLOAD_FAIL,"Upload retry times exceeded 5. Procedure");const u=(s-1)*m,d=Math.min(m,t.size-u),c=`partNumber=${s}&uploadId=${n}`,l=yield this._getFileToken(o.fileType,i,"PUT",c,void 0,go(t.size));if(!l.isOk)return l.wipe();const f=l.data,v=t.slice(u,s*m),g=this.getBaseHeaders(t,f,o);this._promise=p({url:`${e}?${c}`,headers:g,method:"PUT",body:v,timeout:0,onProgress:e=>{var n;return null===(n=null==o?void 0:o.onProgress)||void 0===n?void 0:n.call(o,u+e.loaded,t.size)}});const{status:_,xhr:I}=yield this._promise.result();return this._promise=null,200===_||204===_?(r.push((null==I?void 0:I.getResponseHeader("ETag"))||""),u+d<t.size?this.requestUploadPart(e,t,n,i,o,r,s+1,0):S()):this.requestUploadPart(e,t,n,i,o,r,s,a+1)}))}getBaseHeaders(e,t,n){const{contentDisposition:i}=n;return{"Content-Disposition":`${i||("text/html"===e.type?"inline":"attachment")}; filename=${encodeURIComponent(e.name)};`,Authorization:t.minioAuthorization,"x-amz-content-sha256":t.minioContentSha256,"x-amz-date":t.minioDate,"Content-Type":e.type||"text/plain"}}_abortHandler(){var e;null===(e=this._promise)||void 0===e||e.abort()}},[mo.RCX]:class extends po{constructor(){super(...arguments),Object.defineProperty(this,"isSupportMultipart",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"_promise",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"multipartUpload",{enumerable:!0,configurable:!0,writable:!0,value:e=>Ri(this,void 0,void 0,(function*(){const{file:t,onProgress:n,fileType:i}=e,o=I.gen();let r=this._authInfo;return this._requestUploadPart(o,t,r.token,n)}))})}commonUpload(e){return Ri(this,void 0,void 0,(function*(){const{file:t,onProgress:n,fileType:i}=e;let o=this._authInfo;const r=new FormData;r.set("token",o.token),r.set("key",o.fileName),r.set("file",t);const s=g(this._url);this._promise=p({url:s,headers:{},onProgress:e=>null==n?void 0:n(e.loaded,e.total),method:"POST",body:r,timeout:0});const{status:a,data:u}=yield this._promise.result();if(this._promise=null,(200===a||204===a)&&u){const e=JSON.parse(u);return S({uniqueName:e.rc_url.file_name,downloadUrl:`${s}/${e.rc_url.path}`,uploadMethod:_.QINIU})}return E(h.UPLOAD_FAIL,a.toString())}))}_requestUploadPart(e,t,n,i){return Ri(this,arguments,void 0,(function*(e,t,n,i,o=0){const r=Math.min(m,t.size-o),s=e+t.name.substring(t.name.lastIndexOf(".")),a={Range:`bytes=${o}-${o+r}`,"X-File-TransactionId":s,"X-File-Total-Size":t.size.toString()},u=t.slice(o,o+r),d=new FormData;d.set("file",u,t.name),d.set("key",s),d.set("name",s),d.set("token",n);const c=g(this._url);this._promise=p({url:c,headers:a,onProgress:e=>null==i?void 0:i(o+e.loaded,t.size),method:"POST",body:d,timeout:0});const{status:l,data:f}=yield this._promise.result();if(this._promise=null,200===l||204===l){if(o+r<t.size)return this._requestUploadPart(e,t,n,i,o+r);const s=JSON.parse(f);return S({uniqueName:s.rc_url.file_name,downloadUrl:`${c}/${s.rc_url.path}`,uploadMethod:_.QINIU})}return E(h.UPLOAD_FAIL,l.toString())}))}_abortHandler(){var e;null===(e=this._promise)||void 0===e||e.abort()}}};function _o(e,t,n){const{promise:i,resolve:o}=A(),r=document.createElement("canvas"),s=r.getContext("2d"),a=new Image;return a.onload=e=>{const{maxHeight:i=160,maxWidth:u=160,quality:d=1,scale:c=1}=n||{},l=To(a.width,a.height,{maxHeight:i,maxWidth:u,scale:c});r.width=Math.min(l.w,u),r.height=Math.min(l.h,i),s.drawImage(a,l.x,l.y,l.w,l.h);let f=Io(r,d);f=f.replace(/data:image\/[^;]+;base64,/,""),o(S(Object.assign(Object.assign({},t),{thumbnail:f,width:Math.ceil(l.w),height:Math.ceil(l.h)})))},a.onerror=e=>{o(E(h.UPLOAD_FAIL,`get image info fail:${JSON.stringify(e)}`))},a.src=(window.URL||window.webkitURL).createObjectURL(e),i}function Io(e,t){let n=e.toDataURL("image/jpeg",t);return n.length>R-10240?Io(e,t-.1):n}const To=(e,t,n)=>{const{maxHeight:i=160,maxWidth:o=160,scale:r=1}=n,s=e<t;let a,u,d,c=0,l=0;return(s?t/e:e/t)>r?(s?(a=e/160,u=160,d=t/a,d>i&&(l=(d-i)/2)):(a=t/160,d=160,u=e/a,u>o&&(c=(u-o)/2)),{w:u,h:d,x:-c,y:-l}):(s?(a=t/i,d=i,u=e/a):(a=e/o,u=o,d=t/a),{w:u,h:d,x:-c,y:-l})};let Ao=0;class Ro{constructor(e,t){Object.defineProperty(this,"_promise",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"id",{enumerable:!0,configurable:!0,writable:!0,value:++Ao}),this._promise=this._handleUpload(e,t)}abort(){var e;null===(e=this._client)||void 0===e||e.abort()}_uploadInLoop(e,t,n,i){return Ri(this,arguments,void 0,(function*(e,t,n,i,o=[]){for(let r=0;r<e.length;r++){const s=e[r],a=So[s.type];if(!a){o.push({type:s.type,url:s.url,code:h.UPLOAD_FAIL,msg:"Upload type not supported"});continue}this._client=new a(s.url,n,i);const u=yield this._client.upload(t);if(u.isOk)return u;const{code:d}=u;if([h.RC_FILE_SIZE_EXCEED_LIMIT,h.INVALID_PARAMETER_SIZE_NOT_FOUND].includes(u.code))return u;if(this._client.isAbort())return this._client=null,u;this._client=null,o.push({type:s.type,url:s.url,code:d,msg:u.msg})}return E(h.UPLOAD_FAIL,`Failed to upload all channels, msg: ${JSON.stringify(o)}`)}))}_handleUpload(e,t){return Ri(this,void 0,void 0,(function*(){const{getFileToken:n,customDomain:i,uploadServer:o,ossConfig:r}=t,{file:s,fileType:a,thumbnailConfig:u}=e,d=yield n(a,s.name,void 0,void 0,void 0,go(s.size));if(!d.isOk)return d.wipe();const c=d.data,l=function(e,t,n){if(t)return[{type:mo.RCX,url:t,p:"1"}];if(e)return JSON.parse(e).map((e=>{const t={type:mo.QINIU,url:"",p:""};return Object.keys(e).forEach((n=>{"p"===n?t.p=e[n]:(t.type=n,t.url=e[n])})),t})).sort(((e,t)=>e.p-t.p));const i=[];return n&&i.push({type:mo.QINIU,url:n,p:"1"}),i}(c.ossConfig||r,i,o);if(0===l.length)return E(h.INVALID_PARAMETER_MEDIA_URL,"uploadUrlList is empty");const{code:f,data:v,msg:m,isOk:p}=yield this._uploadInLoop(l,e,c,n);if(!p)return E(f,m);let{downloadUrl:g,uploadMethod:_}=v;if(!g){const e=yield t.getFileUrl(a,v.uniqueName,_,s.name);if(!e.isOk)return E(e.code,"Get download url fail");g=e.data.downloadUrl}if(!g)return E(h.UPLOAD_FAIL,"Get download url fail");const I={downloadUrl:g,uniqueName:(null==v?void 0:v.uniqueName)||"",name:s.name,size:s.size,type:s.type};if(a===T.AUDIO){return function(e,t){const n=new AudioContext({sampleRate:16e3}),{promise:i,resolve:o}=A();return n.decodeAudioData(e,(e=>{var n,i;o(S(Object.assign(Object.assign({},t),{duration:e.duration,length:e.length,sampleRate:null!==(n=e.sampleRate)&&void 0!==n?n:void 0,numberOfChannels:null!==(i=e.numberOfChannels)&&void 0!==i?i:void 0})))}),(e=>{o(E(h.UPLOAD_FAIL,`get audio info fail:${JSON.stringify(e)}`))})),i}(yield s.arrayBuffer(),I)}return a===T.IMAGE?_o(s,I,u):S(I)}))}awaitResult(){return Ri(this,void 0,void 0,(function*(){return this._promise}))}}const Co={};function No(e,t){const n=new Ro(e,t);return function(e){Ri(this,void 0,void 0,(function*(){Co[e.id]=e,yield e.awaitResult(),delete Co[e.id]}))}(n),n}const Mo=(e,t)=>{const n=e.getNaviInfoFromCache();return{getFileToken:M,getFileUrl:N,customDomain:t||"",ossConfig:null==n?void 0:n.ossConfig,uploadServer:null==n?void 0:n.uploadServer}};function Oo(e){return Ri(this,void 0,void 0,(function*(){return xi().next((t=>Ri(this,void 0,void 0,(function*(){const{contentDisposition:n,fileType:i,file:o}=e;return C.create("createUploadTask").validate("contentDisposition",n,(e=>"inline"===e||"attachment"===e),!1).fail(h.INVALID_PARAMETER_CONTENT_DISPOSITION).isNumberEnum("fileType",i,T,!0).fail(h.INVALID_PARAMETER_MEDIA_TYPE).validate("file",o,(e=>e instanceof File&&(!(i===T.IMAGE&&!e.type.match(/^image\//))&&!(i===T.AUDIO&&!e.type.match(/^audio\//)))),!0).fail(h.MEDIA_EXCEPTION).result().trans((()=>No(e,Mo(t,t.getOptions().uploadDomain))))}))))}))}function Uo(e){return Ri(this,void 0,void 0,(function*(){return S(function(e){const t=Co[e];return!!t&&(t.abort(),!0)}(e))}))}function yo(e){return Ri(this,void 0,void 0,(function*(){const{contentDisposition:t,fileType:n,file:i}=e;return xi().next((o=>Ri(this,void 0,void 0,(function*(){const r=yield C.create("upload").validate("contentDisposition",t,(e=>"inline"===e||"attachment"===e),!1).fail(h.INVALID_PARAMETER_CONTENT_DISPOSITION).isNumberEnum("fileType",n,T,!0).fail(h.INVALID_PARAMETER_MEDIA_TYPE).validate("file",i,(e=>e instanceof File&&(!(n===T.IMAGE&&!e.type.match(/^image\//))&&!(n===T.AUDIO&&!e.type.match(/^audio\//)))),!0).fail(h.MEDIA_EXCEPTION).result().next((()=>function(e,t){return Ri(this,void 0,void 0,(function*(){return new Ro(e,t).awaitResult()}))}(e,Mo(o,o.getOptions().uploadDomain))));return r}))))}))}function Po(e,t,n,i){return M(e,t,n,i)}function Do(e){return xi().next((t=>Ri(this,void 0,void 0,(function*(){return(yield C.create("getDownloadAuth").isNotEmptyString("url",e,!0).fail(h.INVALID_PARAMETER_MEDIA_URL).result().next((()=>M(1,void 0,void 0,void 0,e)))).trans((({deadline:e,token:t,downloadAuthInfo:n})=>({deadline:e,token:t,downloadAuthInfo:n})))}))))}function bo(e,t,n,i,o){return Ri(this,void 0,void 0,(function*(){return(null==i?void 0:i.isBosRes)?S(i):N(e,t,o||_.QINIU,n)}))}function Lo(e,t){return Ri(this,void 0,void 0,(function*(){return(yield K(e,t)).trans((({totalMatched:e,messages:t,conditionsMatched:n})=>({count:e,messages:t.map((e=>Ci(e)))})))}))}function Go(e,t,n,i,o){return Ri(this,void 0,void 0,(function*(){return Mi("RongIMLib.electronExtension.searchMessages","RongIMLib.electronExtension.searchMessagesWithParams"),Lo(e,{keyword:t,limit:i||J,order:0,timeRange:{endTime:n?n-1:n||0},messageFilter:{objectNames:o}})}))}function xo(e,t){return Ri(this,void 0,void 0,(function*(){return Mi("setMessageReceivedStatus","setMessageReceivedStatusInfo"),Y(e,t)}))}function Fo(e){return Ri(this,void 0,void 0,(function*(){return y(e)}))}function wo(e,t,n){return Ri(this,void 0,void 0,(function*(){return D(e,t,n)}))}function Bo(e,t){return Ri(this,arguments,void 0,(function*(e,t,n={}){return t instanceof Qi?function(e,t){return Ri(this,arguments,void 0,(function*(e,t,n={}){const i=!!(null==n?void 0:n.isUnread),o=null==n?void 0:n.searchContent,r=null==n?void 0:n.disableUpdateLastMessage,s={senderUserId:"",messageType:null==t?void 0:t.messageType,content:null==t?void 0:t.content,searchContent:o,messageDirection:X.SEND,isUnread:i,messageUId:"",disableUpdateLastMessage:r,quoteInfo:n.quoteInfo};return(yield Q(e,s)).trans(Ci)}))}(e,t,n):function(e,t){return Ri(this,arguments,void 0,(function*(e,t,n={}){const i=!!(null==n?void 0:n.isUnread),o=null==n?void 0:n.searchContent,r=null==n?void 0:n.disableUpdateLastMessage,s={senderUserId:null==t?void 0:t.senderUserId,messageType:null==t?void 0:t.messageType,content:null==t?void 0:t.content,messageDirection:null==t?void 0:t.messageDirection,readStatus:"object"==typeof(null==t?void 0:t.receivedStatusInfo)?z(t.receivedStatusInfo):null==t?void 0:t.receivedStatus,sentTime:null==t?void 0:t.sentTime,sentStatus:null==t?void 0:t.sentStatus,searchContent:o,messageUId:"",isUnread:i,disableNotification:null==t?void 0:t.disableNotification,canIncludeExpansion:null==t?void 0:t.canIncludeExpansion,expansion:(null==t?void 0:t.expansion)||void 0,directedUserIds:null==t?void 0:t.directedUserIds,disableUpdateLastMessage:(null==t?void 0:t.disableUpdateLastMessage)||r,quoteInfo:null==t?void 0:t.quoteInfo};return(yield Q(e,s)).trans(Ci)}))}(e,t,n)}))}function Ho(e){return Ri(this,void 0,void 0,(function*(){return(yield x(e)).trans((e=>Ci(e)))}))}function ko(e,t){return Ri(this,void 0,void 0,(function*(){Mi("getConversationList","getConversationListByTimestamp");return(yield fe({count:(null==e?void 0:e.count)||300,startTime:(null==e?void 0:e.startTime)||0,order:null==e?void 0:e.order,channelId:t})).trans((e=>e.map(Ni)))}))}function Vo(e){return Ri(this,void 0,void 0,(function*(){return(yield ue(e)).trans((e=>e.map(Ni)))}))}function jo(e){return Ri(this,void 0,void 0,(function*(){return(yield ve(e)).trans((e=>e.map(Ni)))}))}function Yo(e){return Ri(this,void 0,void 0,(function*(){return(yield le(e)).trans((e=>Ni(e)))}))}const zo=Hi("removeConversation",((e,t)=>Ri(void 0,void 0,void 0,(function*(){return ye(e,t)}))));function $o(e){return Ri(this,void 0,void 0,(function*(){return Mi("batchRemoveConversation","batchDeleteConversations"),qo({identifiers:e,deleteRemotely:!1,deleteMessages:!1})}))}function qo(e){return Ri(this,void 0,void 0,(function*(){return Z(e)}))}function Wo(e){return Ri(this,void 0,void 0,(function*(){return Ie(e)}))}function Xo(e,t){return Ri(this,void 0,void 0,(function*(){return De(e,t)}))}function Qo(e){return Ri(this,void 0,void 0,(function*(){return se(e)}))}function Ko(e,t){return Ri(this,void 0,void 0,(function*(){return Ae(t,e)}))}function Jo(e,t){return Ri(this,void 0,void 0,(function*(){return Re(e,t)}))}function Zo(e,t){return Ri(this,void 0,void 0,(function*(){return Re(e,t,!0)}))}function er(e){return Ri(this,void 0,void 0,(function*(){return Ne(e)}))}const tr=Hi("clearMessagesUnreadStatus",(e=>Ri(void 0,void 0,void 0,(function*(){return oe(e)}))));function nr(){return Ri(this,void 0,void 0,(function*(){return ie()}))}const ir=Hi("setConversationNotificationLevel",((e,t)=>Ri(void 0,void 0,void 0,(function*(){return ee([e],t)}))));function or(e,t){return Ri(this,void 0,void 0,(function*(){return ee(e,t)}))}function rr(e,t){return Ri(this,void 0,void 0,(function*(){return ne(e,t)}))}function sr(e,t){return Ri(this,void 0,void 0,(function*(){return xi().next((n=>Ri(this,void 0,void 0,(function*(){if(t!==be.CLOSE&&t!==be.OPEN)return E(h.INVALID_PARAMETER_NOTIFICATION_LEVEL);const n=Le(t);return ee([e],n)}))))}))}function ar(e){return Ri(this,void 0,void 0,(function*(){return Ee(e)}))}function ur(e){return Ri(this,void 0,void 0,(function*(){return(yield Ee(e)).trans((e=>he(e)))}))}function dr(){return Ri(this,void 0,void 0,(function*(){return(yield ce()).trans((e=>e.map(Ni)))}))}function cr(e,t){return Ri(this,void 0,void 0,(function*(){return Ge(e,t)}))}function lr(e){return Ri(this,void 0,void 0,(function*(){return me(e)}))}const fr=Hi("setConversationToTop",((e,...t)=>Ri(void 0,[e,...t],void 0,(function*(e,t=!0,n=!0,i=!1){return te([e],!!t,n,i)}))));function vr(e,t){return Ri(this,arguments,void 0,(function*(e,t,n=!0,i=!0){return te(e,!!t,i,n)}))}function Er(e,t){return Ri(this,void 0,void 0,(function*(){return(yield Te(e,t)).trans((e=>e.map(Ni)))}))}function hr(e){return Ri(this,void 0,void 0,(function*(){return(yield Ce(e)).trans((e=>e.map(Ni)))}))}function mr(e){return Ri(this,void 0,void 0,(function*(){return Oe(e)}))}function pr(){return Ri(this,void 0,void 0,(function*(){return de()}))}function gr(e){return Ri(this,void 0,void 0,(function*(){var t,n,i;return(yield _e(null!==(t=null==e?void 0:e.count)&&void 0!==t?t:30,null!==(n=null==e?void 0:e.startTime)&&void 0!==n?n:0,null!==(i=null==e?void 0:e.order)&&void 0!==i?i:0)).trans((e=>e.map(Ni)))}))}function Sr(){return Ri(this,void 0,void 0,(function*(){return ge()}))}function _r(e){return Ri(this,void 0,void 0,(function*(){return re(e)}))}function Ir(e){return Ri(this,void 0,void 0,(function*(){return Pe(e)}))}function Tr(e){return Ri(this,void 0,void 0,(function*(){return Se(e)}))}function Ar(e){return Ri(this,void 0,void 0,(function*(){return(yield Me(e)).trans((e=>e.map(Ni)))}))}function Rr(e){return Ri(this,void 0,void 0,(function*(){return ae(e)}))}function Cr(e){return Ri(this,void 0,void 0,(function*(){return(yield pe(e)).trans((e=>e.map(Ni)))}))}function Nr(e){return Ri(this,void 0,void 0,(function*(){return Ue(e)}))}function Mr(e,t,n,i){return Ri(this,void 0,void 0,(function*(){return(yield Ve(e,t,n,i)).trans((e=>e.map((e=>Ni(e)))))}))}const Or=Ho,Ur=Hi("sendMessage",((e,t,n)=>Ri(void 0,void 0,void 0,(function*(){const{disableNotification:i,isMentioned:o,directionalUserIdList:r,canIncludeExpansion:s,onSendBefore:a,expansion:u,pushConfig:d,isStatusMessage:l,disableUpdateLastMessage:f}=n||{},v=function(e,t){const{disableNotification:n,pushContent:i,pushData:o,isMentioned:r,mentionedType:s,mentionedUserIdList:a,directionalUserIdList:u,isVoipPush:d,canIncludeExpansion:c,expansion:l,isFilerWhiteBlacklist:f,pushConfig:v,messageId:E,disableUpdateLastMessage:h,needReceipt:m,quoteInfo:p}=e;return Object.assign({disableNotification:n,pushContent:i,pushData:o,isMentioned:r,mentionedType:s,mentionedUserIdList:a,directionalUserIdList:u,isVoipPush:d,canIncludeExpansion:c,expansion:l,isFilerWhiteBlacklist:f,pushConfig:v,messageId:E,disableUpdateLastMessage:h,needReceipt:m,quoteInfo:p},t)}(n||{},t),h=Object.assign(Object.assign({},e),{isMentioned:!!o,content:t.content,messageType:t.messageType,isPersited:!!t.isPersited,isCounted:!!t.isCounted,disableNotification:!!i,canIncludeExpansion:!!s,expansion:u||null,senderUserId:"",messageUId:"",messageDirection:X.SEND,receivedTime:0,isStatusMessage:!!l,receivedStatus:At.UNREAD,isOffLineMessage:!1,pushConfig:d,sentStatus:Tt.SENDING,sentTime:0,directedUserIds:r||[],disableUpdateLastMessage:f,quoteInfo:v.quoteInfo}),m=yield xi().next((t=>{h.senderUserId=t.getCurrentUserId();return t.sendMessage(e,v,(e=>{h.messageId=e;try{a&&a(Ci(h))}catch(e){t.logger.error(c.L_CALLBACK_E,`Callback method "onSendBefore" execution error.\n${null==e?void 0:e.stack}`),console.error(e)}}))}));return m.isOk?m.trans((e=>Ci(e))):(h.sentStatus=Tt.FAILED,E(m.code,m.msg,Ci(h)))}))));function yr(e,t,n){return Ur(e,new vo(t),n)}function Pr(e,t){return(n,i,o,r)=>Ri(this,void 0,void 0,(function*(){var a;const u=xi();if(!u.isOk)return u.wipe();const d=u.data;if(!je("sendOptions.contentDisposition",null==r?void 0:r.contentDisposition,(e=>["inline","attachment"].includes(e))))return E(h.INVALID_PARAMETER_SENDOPTIONS);const c={contentDisposition:null==r?void 0:r.contentDisposition};if(r&&"thumbnailConfig"in r){const e=null==r?void 0:r.thumbnailConfig;if(!(je("sendOptions.maxHeight",null==e?void 0:e.maxHeight,s.NUMBER)&&je("sendOptions.maxWidth",null==e?void 0:e.maxWidth,s.NUMBER)&&je("sendOptions.quality",null==e?void 0:e.quality,s.NUMBER)&&je("sendOptions.scale",null==e?void 0:e.scale,s.NUMBER)))return E(h.INVALID_PARAMETER_SENDOPTIONS);c.thumbnailConfig=e}const{logger:l}=d,f=l.createTraceId();l.info("L-media_upload-T",JSON.stringify({filesize:i.file.size,type:e}),f);const v=yield yo({file:i.file,fileType:e,onProgress:(e,t)=>{var n;null===(n=null==o?void 0:o.onProgress)||void 0===n||n.call(o,Math.floor(e/t*100))},contentDisposition:c.contentDisposition,thumbnailConfig:c.thumbnailConfig}),{code:m,data:p,msg:g}=v;if(m===h.SUCCESS&&p){const e=(null===(a=null==o?void 0:o.onComplete)||void 0===a?void 0:a.call(o,Object.assign({url:p.downloadUrl},p)))||t(p,i);return l.info("L-media_upload-R",JSON.stringify({downurl:p.downloadUrl,code:h.SUCCESS}),f),Ur(n,e,r)}return E(m,g)}))}const Dr=e=>{const t=e.match(/\.(\w+)$/);return t?t[1]:"bin"},br=Pr(T.FILE,((e,t)=>{const n={name:e.name,size:t.file.size,type:Dr(e.name),fileUrl:e.downloadUrl};return t.user&&(n.user=t.user),t.extra&&(n.extra=t.extra),t.mentionedInfo&&(n.mentionedInfo=t.mentionedInfo),new to(n)})),Lr=Pr(T.IMAGE,((e,t)=>{const n={content:e.thumbnail,imageUri:e.downloadUrl,thumWidth:e.width,thumHeight:e.height};return t.user&&(n.user=t.user),t.extra&&(n.extra=t.extra),t.mentionedInfo&&(n.mentionedInfo=t.mentionedInfo),t.audit&&(n.audit=t.audit),new ro(n)})),Gr=Pr(T.IMAGE,((e,t)=>{const n={gifDataSize:e.size,remoteUrl:e.downloadUrl,width:e.width,height:e.height};return t.user&&(n.user=t.user),t.extra&&(n.extra=t.extra),t.mentionedInfo&&(n.mentionedInfo=t.mentionedInfo),t.audit&&(n.audit=t.audit),new no(n)})),xr=Pr(T.AUDIO,((e,t)=>{var n;const i={remoteUrl:e.downloadUrl,duration:Math.floor(null!==(n=e.duration)&&void 0!==n?n:0),sampleRate:e.sampleRate,numberOfChannels:e.numberOfChannels};return t.user&&(i.user=t.user),t.extra&&(i.extra=t.extra),t.mentionedInfo&&(i.mentionedInfo=t.mentionedInfo),t.audit&&(i.audit=t.audit),new Eo(i)})),Fr=Pr(T.SIGHT,((e,t)=>{const n={sightUrl:e.downloadUrl,content:t.thumbnail,duration:t.duration,size:t.file.size||e.size,name:t.name||e.name};return t.user&&(n.user=t.user),t.extra&&(n.extra=t.extra),t.mentionedInfo&&(n.mentionedInfo=t.mentionedInfo),t.audit&&(n.audit=t.audit),new fo(n)}));function wr(e,t){return Ri(this,void 0,void 0,(function*(){return(yield Ke(e,t)).trans((({list:e,hasMore:t})=>({hasMore:t,list:e.map((e=>Ci(e)))})))}))}function Br(e,t){return Ri(this,void 0,void 0,(function*(){return(yield rt(e,t)).trans((({list:e,hasMore:t})=>({hasMore:t,list:e.map((e=>Ci(e)))})))}))}function Hr(t,n,i,o){return Ri(this,void 0,void 0,(function*(){return ft({targetId:t,conversationType:e.PRIVATE,channelId:o},n,i)}))}function kr(t,n,i){return Ri(this,void 0,void 0,(function*(){return Et({targetId:t,conversationType:e.GROUP,channelId:i},n)}))}function Vr(e,t,n){return Ri(this,void 0,void 0,(function*(){throw new Error("This method is deprecated, please use method sendReadReceiptResponseV2.")}))}function jr(t,n,i){return Ri(this,void 0,void 0,(function*(){return ht({targetId:t,conversationType:e.GROUP,channelId:i},n)}))}function Yr(e,t){return Ri(this,void 0,void 0,(function*(){return pt(e,t)}))}function zr(e,t,n){return Ri(this,void 0,void 0,(function*(){return vt(e,t,n)}))}function $r(e,t){return Ri(this,void 0,void 0,(function*(){return et(e,t)}))}function qr(e,t){return Ri(this,void 0,void 0,(function*(){return ze(e,t)}))}Pr(T.COMBINE_HTML,((e,t)=>{const n={remoteUrl:e.downloadUrl,nameList:t.nameList,summaryList:t.summaryList,conversationType:t.conversationType};return t.user&&(n.user=t.user),t.extra&&(n.extra=t.extra),t.mentionedInfo&&(n.mentionedInfo=t.mentionedInfo),new Ji(n)}));const Wr=Hi("recallMessage",((e,t)=>Ri(void 0,void 0,void 0,(function*(){return(yield at(e,t)).trans((e=>Ci(e)))}))));function Xr(e,t){return Ri(this,void 0,void 0,(function*(){return We(e,t)}))}function Qr(e,t){return Ri(this,void 0,void 0,(function*(){return $e(e,t)}))}function Kr(e,t){return Ri(this,void 0,void 0,(function*(){return Ye(e,t)}))}function Jr(e,t){return Ri(this,void 0,void 0,(function*(){return It(e,t)}))}function Zr(e,t){return Ri(this,void 0,void 0,(function*(){return dt(e,t)}))}function es(e,t){return Ri(this,void 0,void 0,(function*(){return(yield gt(e,t)).trans(Ci)}))}function ts(e,t,n){return Ri(this,void 0,void 0,(function*(){return tt(e,t,n)}))}function ns(e,t,n,i,o){return Gi(((a,u)=>(r("messageType",e,s.STRING,!0),r("isPersited",t,s.BOOLEAN,!0),r("isCounted",n,s.BOOLEAN,!0),r("isStatusMessage",o,s.BOOLEAN),r("searchProps",i,s.ARRAY),u.info("A-regtyp-O",JSON.stringify({messageType:e,isCounted:n,isStatusMessage:o,isPersited:t,searchProps:i})),a.registerMessageType(e,t,n,i,o),function(e,t=!0,n=!0){return function(i){return new Qi(e,i,t,n)}}(e,t,n))))}function is(e){return Ri(this,void 0,void 0,(function*(){return(yield Xe(e)).trans((e=>e?Ci(e):null))}))}function os(e){return Ri(this,void 0,void 0,(function*(){return Qe(e)}))}function rs(e,t){return Ri(this,arguments,void 0,(function*(e,t,n={}){return Mi("insertMessage","electronExtension.insertMessage"),Bo(e,t,n)}))}function ss(e){throw new Error("getUnreadMentionedMessages is deprecated, please use electronExtension.getUnreadMentionedMessages instead")}function as(e,t,n,i){return Ri(this,void 0,void 0,(function*(){return Mi("RongIMLib.searchMessages","RongIMLib.ElectronExtension.searchMessagesWithParams"),Go(e,t,n,i)}))}function us(e,t,n){return Ri(this,void 0,void 0,(function*(){return Mi("RongIMLib.deleteLocalMessagesByTimestamp","RongIMLib.electronExtension.deleteMessagesByTimestamp"),wo(e,t,n)}))}function ds(e){return Ri(this,void 0,void 0,(function*(){return Mi("RongIMLib.clearMessages","RongIMLib.electronExtension.clearMessages"),Fo(e)}))}function cs(e,t,n,i){return Ri(this,void 0,void 0,(function*(){return Mi("searchConversationByContent","electronExtension.searchConversationByContent"),Mr(e,null!=n?n:[l.TEXT,l.FILE],i,t)}))}function ls(e,t){return Ri(this,void 0,void 0,(function*(){return qe(e,t)}))}function fs(e,t){return Ri(this,void 0,void 0,(function*(){return xo(e,t)}))}function vs(e){return lt(e)}function Es(e,t){return Ri(this,void 0,void 0,(function*(){return mt(e,t)}))}function hs(e,t){return Ri(this,void 0,void 0,(function*(){return Je(e,t)}))}function ms(e){return Ri(this,void 0,void 0,(function*(){return Ze(e)}))}function ps(e,t,n){return Ri(this,void 0,void 0,(function*(){return ot(e,t,n)}))}function gs(e,t,n){return Ri(this,void 0,void 0,(function*(){return it(e,t,n)}))}function Ss(e,t){return ct(e,t)}function _s(e){return St(e)}function Is(e){return _t(e)}function Ts(e,t){return Ri(this,void 0,void 0,(function*(){return Mi("modifyMessage","modifyMessageWithParams"),As({messageUId:null==t?void 0:t.messageUId,messageContent:e,conversation:{conversationType:null==t?void 0:t.conversationType,targetId:null==t?void 0:t.targetId,channelId:null==t?void 0:t.channelId}})}))}function As(e){return st(e)}function Rs(e){const t=e=>e.map((e=>({messageUId:e.messageUId,message:e.message?Ci(e.message):void 0,code:e.code})));return ut(Object.assign(Object.assign({},e),{remoteMessageBlock:n=>{e.remoteMessageBlock&&e.remoteMessageBlock(t(n))},localMessageBlock:n=>{e.localMessageBlock&&e.localMessageBlock(t(n))}}))}function Cs(e){return Ri(this,void 0,void 0,(function*(){return(yield nt(e.conversationIdentifier,e.messageUIds)).trans((e=>e.map((e=>({messageUId:e.messageUId,message:e.message?Ci(e.message):void 0,code:e.code})))))}))}function Ns(e){return Ri(this,void 0,void 0,(function*(){return(yield Mt(e)).trans((e=>e))}))}function Ms(){return Ri(this,void 0,void 0,(function*(){return(yield Rt()).trans((e=>e.map((e=>Ni(e)))))}))}function Os(e){return Ri(this,void 0,void 0,(function*(){return bt(e)}))}function Us(e,t){return Ri(this,void 0,void 0,(function*(){const n=Array.isArray(t)?t.map((e=>null==e?void 0:e.messageUId)):t;return(yield Ot(e,n)).trans((e=>{const n={};return e.forEach((e=>{n[e.messageUId]=Ci(e)})),t.forEach((({messageUId:e})=>{e in n||(n[e]=void 0)})),n}))}))}function ys(e,t){return Ri(this,void 0,void 0,(function*(){return Mi("updateExpansionForUltraGroupMessage","updateMessageExpansion"),Jr(e,t)}))}function Ps(e,t){return Ri(this,void 0,void 0,(function*(){return Mi("removeExpansionForUltraGroupMessage","removeMessageExpansionForKey"),Zr(e,t)}))}function Ds(e){return Ri(this,void 0,void 0,(function*(){return Dt(e)}))}function bs(e,t){return Ri(this,void 0,void 0,(function*(){return Ut(e,t,!0)}))}function Ls(e){return Ri(this,void 0,void 0,(function*(){return Ct(null==e?void 0:e.targetId,null==e?void 0:e.channelId)}))}function Gs(e,t){return Ri(this,void 0,void 0,(function*(){return Lt(null==e?void 0:e.targetId,t,null==e?void 0:e.channelId)}))}function xs(e,t){return Ri(this,void 0,void 0,(function*(){return Ut(e,t,!1)}))}function Fs(){return Ri(this,void 0,void 0,(function*(){return Mi("getAllUltraGroupUnreadCount","getTotalUnreadCountByLevels"),Jo([e.ULTRA_GROUP],[])}))}function ws(){return Ri(this,void 0,void 0,(function*(){return Mi("getAllUltraGroupUnreadMentionedCount","getTotalUnreadMentionedCountByLevels"),Zo([e.ULTRA_GROUP],[])}))}function Bs(e){return Ri(this,void 0,void 0,(function*(){return Pt(e)}))}function Hs(t){return Ri(this,void 0,void 0,(function*(){return Nt(Object.assign(Object.assign({},t),{conversationType:e.ULTRA_GROUP}))}))}function ks(e){return Ri(this,void 0,void 0,(function*(){return yt(e)}))}function Vs(e){return Ri(this,void 0,void 0,(function*(){return Gt(e)}))}function js(e){return Ri(this,void 0,void 0,(function*(){return wt(e)}))}function Ys(){return Ri(this,void 0,void 0,(function*(){return xt()}))}function zs(e){return Ri(this,void 0,void 0,(function*(){return(yield Ft(e)).trans((e=>0===e))}))}function $s(e){return Ri(this,void 0,void 0,(function*(){return Ht(e)}))}function qs(e){return Ri(this,void 0,void 0,(function*(){return $t(e)}))}function Ws(e){return Ri(this,void 0,void 0,(function*(){return Xt(e)}))}function Xs(){return Ri(this,void 0,void 0,(function*(){return Vt()}))}function Qs(e){return Ri(this,void 0,void 0,(function*(){return jt(e)}))}function Ks(e,t){return Ri(this,void 0,void 0,(function*(){return Bt(e,t)}))}function Js(e,t){return Ri(this,void 0,void 0,(function*(){return zt(e,t)}))}function Zs(e,t){return Ri(this,void 0,void 0,(function*(){return qt(e,t)}))}function ea(e,t){return Ri(this,void 0,void 0,(function*(){return zt(e,t)}))}function ta(e,t,n){return Ri(this,void 0,void 0,(function*(){Mi("getConversationsFromTagByPage","createConversationListLoader");return(yield kt(e,n,t)).trans((e=>e.map((e=>{return t=e,Object.assign(Object.assign({},Ni(t)),{isTopInTag:t.isTopInTag});var t}))))}))}function na(e,t){return Ri(this,void 0,void 0,(function*(){return Yt(e,t)}))}function ia(e,t,n){return Ri(this,void 0,void 0,(function*(){return Wt(e,t,{isTop:n})}))}var oa=Object.freeze({__proto__:null,batchClearMessagesByTimestamp:function(e){return Ri(this,void 0,void 0,(function*(){return O(e)}))},batchInsertMessage:function(e,t){return Ri(this,void 0,void 0,(function*(){return U(e,t)}))},clearEditedMessageDraft:function(e){return Ri(this,void 0,void 0,(function*(){return xe(e)}))},clearLocalData:function(){return Ri(this,void 0,void 0,(function*(){return Qt()}))},clearMessages:Fo,deleteMessages:function(e){return Ri(this,void 0,void 0,(function*(){return P(e)}))},deleteMessagesByTimestamp:wo,deleteUltraGroupMessagesForAllChannel:function(e,t){return b(e,t)},enable:function(){return Kt()},getAllConversationList:function(e){return Ri(this,void 0,void 0,(function*(){return Mi("electronExtension.getAllConversationList","getAllConversationList"),Vo(e)}))},getContinuousMessages:function(e,t){return Ri(this,void 0,void 0,(function*(){return(yield L(e,t)).trans((({list:e,hasMore:t,timestamp:n})=>({hasMore:t,list:e.map(Ci),timestamp:n})))}))},getConversationList:function(e,t,n,i){return Ri(this,void 0,void 0,(function*(){Mi("electronExtension.getConversationList","getAllConversationList or getConversationListByTimestamp");return(yield fe({startTime:e,count:t,channelId:n,topPriority:i})).trans((e=>e.map((e=>Ni(e)))))}))},getConversations:function(e){return Ri(this,void 0,void 0,(function*(){return(yield Fe(e)).trans((e=>e.map(Ni)))}))},getEditedMessageDraft:function(e){return Ri(this,void 0,void 0,(function*(){return we(e)}))},getHistoryMessagesByMessageTypes:function(e,t){return Ri(this,void 0,void 0,(function*(){return(yield G(e,t)).trans((({list:e,hasMore:t})=>{const n=e.map(Ci);return{messages:n,hasMore:t,list:n}}))}))},getLocalMessage:Ho,getMessageCount:function(e){return Ri(this,void 0,void 0,(function*(){return F(e)}))},getMessagesAroundTimestamp:function(e,t){return Ri(this,void 0,void 0,(function*(){const n=null==t?void 0:t.timestamp,i=null==t?void 0:t.beforeCount,o=null==t?void 0:t.afterCount;return(yield w(e,n,i,o)).trans((e=>e.map(Ci)))}))},getRemoteConversations:function(){return Ri(this,void 0,void 0,(function*(){return Be()}))},getUnreadMentionedMessages:function(e){return Ri(this,void 0,void 0,(function*(){return(yield B(e)).trans((e=>e.map(Ci)))}))},getUntaggedConversationListByPage:function(e,t,n){return Ri(this,void 0,void 0,(function*(){return(yield He(e,t,n)).trans((e=>e.map((e=>Ni(e)))))}))},insertMessage:Bo,saveEditedMessageDraft:function(e,t){return Ri(this,void 0,void 0,(function*(){return ke(e,t)}))},searchConversationByContent:Mr,searchMessageInTimeRange:function(e,t){return Ri(this,void 0,void 0,(function*(){return Mi("RongIMLib.electronExtension.searchMessageInTimeRange","RongIMLib.electronExtension.searchMessagesWithParams"),Lo(e,{keyword:null==t?void 0:t.keyword,limit:(null==t?void 0:t.limit)||5,offset:null==t?void 0:t.offset,order:0,timeRange:{startTime:null==t?void 0:t.startTime,endTime:null==t?void 0:t.endTime}})}))},searchMessages:Go,searchMessagesByUser:function(e,t,n,i){return Ri(this,void 0,void 0,(function*(){Mi("RongIMLib.electronExtension.searchMessagesByUser","RongIMLib.electronExtension.searchMessagesWithParams");return(yield Lo(e,{limit:i,keyword:"",order:0,timeRange:{endTime:n?n-1:n||0},messageFilter:{senderIds:[t]}})).trans((({messages:e})=>({messages:e})))}))},searchMessagesWithParams:function(e){return Ri(this,void 0,void 0,(function*(){return(yield H(e)).trans((({totalMatched:e,messages:t,conditionsMatched:n})=>({count:n,messages:t.map((e=>Ci(e)))})))}))},setCheckChatRoomDuplicateMessage:function(e){return Ri(this,void 0,void 0,(function*(){return k(!!e)}))},setCheckDuplicateMessage:function(e){return Ri(this,void 0,void 0,(function*(){return V(e)}))},setMessageContent:function(e,t,n){return Ri(this,void 0,void 0,(function*(){return j(e,t,n)}))},setMessageReceivedStatus:xo,setMessageReceivedStatusInfo:function(e,t){return Ri(this,void 0,void 0,(function*(){const n=z(t||{});return Y(e,n)}))},setMessageSentStatus:function(e,t){return Ri(this,void 0,void 0,(function*(){return $(e,t)}))},setMessageSpeechToTextVisible:function(e,t){return q(e,t)},setMessageStatusToRead:function(e,t){return Ri(this,void 0,void 0,(function*(){return W(e,t)}))}});function ra(e){return Ri(this,void 0,void 0,(function*(){return Zt(e)}))}function sa(){return Ri(this,void 0,void 0,(function*(){return Jt()}))}function aa(e,t){return Ri(this,void 0,void 0,(function*(){return en(e,t)}))}function ua(e,t,n){return Ri(this,void 0,void 0,(function*(){return dn(e,t,n)}))}function da(e,t){return Ri(this,void 0,void 0,(function*(){return(yield cn(e,t)).wipe()}))}function ca(e,t,n){return Ri(this,void 0,void 0,(function*(){return on(e,t,n)}))}function la(e,t){return Ri(this,void 0,void 0,(function*(){return rn(e,t)}))}function fa(e){return ln(e)}function va(e){return an(e)}function Ea(){return tn()}function ha(e){return fn(e)}function ma(){return nn()}function pa(e){return un(e)}function ga(e){return sn(e)}function Sa(e,t){return Ri(this,void 0,void 0,(function*(){return pn(e,t)}))}function _a(e){return Ri(this,void 0,void 0,(function*(){return Bn(e)}))}function Ia(e){return Ri(this,void 0,void 0,(function*(){return An(e)}))}function Ta(e,t,n){return Ri(this,void 0,void 0,(function*(){return On(e,t,n)}))}function Aa(e,t){return Ri(this,void 0,void 0,(function*(){return Un(e,t)}))}function Ra(e){return Ri(this,void 0,void 0,(function*(){return gn(e)}))}function Ca(e,t,n,i){return Ri(this,void 0,void 0,(function*(){return wn(e,t,!!n,i)}))}function Na(e,t){return Ri(this,void 0,void 0,(function*(){return mn(e,t)}))}function Ma(e,t){return Ri(this,void 0,void 0,(function*(){return bn(e,t)}))}function Oa(e,t,n){return Ri(this,void 0,void 0,(function*(){return Tn(e,t,n)}))}function Ua(e,t){return Ri(this,void 0,void 0,(function*(){return In(e,t)}))}function ya(e,t,n,i){return Ri(this,void 0,void 0,(function*(){return xn(e,t,n,i)}))}function Pa(e,t,n){return Ri(this,void 0,void 0,(function*(){return Ln(e,t,n)}))}function Da(e){return Ri(this,void 0,void 0,(function*(){return Mn(e)}))}function ba(e,t){return Ri(this,void 0,void 0,(function*(){return Nn(e,t)}))}function La(e,t){return Ri(this,void 0,void 0,(function*(){return(yield En(e,t)).wipe()}))}function Ga(e,t,n){return Ri(this,void 0,void 0,(function*(){return(yield Pn(e,t,n)).wipe()}))}function xa(e,t,n){return Ri(this,void 0,void 0,(function*(){return vn(e,t,n)}))}function Fa(e,t,n,i){return Ri(this,void 0,void 0,(function*(){return(yield yn(e,t,n,i)).wipe()}))}function wa(e,t,n){return Ri(this,void 0,void 0,(function*(){return Sn(e,t,n)}))}function Ba(e,t){return Ri(this,void 0,void 0,(function*(){return Cn(t,e)}))}function Ha(e,t){return Ri(this,void 0,void 0,(function*(){return Gn(e,t)}))}function ka(e){return Ri(this,void 0,void 0,(function*(){return Rn(e)}))}function Va(e,t){return Ri(this,void 0,void 0,(function*(){return Fn(e,t)}))}function ja(e,t){return Ri(this,void 0,void 0,(function*(){return hn(e,t)}))}function Ya(e,t){return Ri(this,void 0,void 0,(function*(){return Dn(e,t)}))}function za(e){return Ri(this,void 0,void 0,(function*(){return _n(e)}))}function $a(e,t,n){return kn(e,t,n)}function qa(e,t){return jn(e,t)}function Wa(e){return Hn(e)}function Xa(e){return Wn(e)}function Qa(e,t,n){return Kn(e,t||"",n)}function Ka(e,t){return Vn(e,t)}function Ja(e,t){return $n(e,t)}function Za(e,t,n){return zn(e,t,n)}function eu(e){return qn(e)}function tu(e){return Xn(e)}function nu(e){return Qn(e)}function iu(){return Yn()}function ou(e){!function(e){var t,n,i;Di?Li.warn(c.A_INIT_REPEAT_O):(r("options.appkey",e.appkey,s.STRING,!0),r("options.navigators",e.navigators,(e=>a(e)&&(0===e.length||e.every(u)))),r("options.loggerProxy",e.loggerProxy,(e=>e instanceof d)),bi=e,Di=o.init({appkey:e.appkey,navigators:e.navigators||[],miniCMPProxy:e.customCMP||[],logOutputLevel:e.logOutputLevel,httpInMainProcess:!!e.httpInMainProcess,logExpireTime:e.logExpireTime,areaCode:e.areaCode,logServerUrl:e.logServerUrl,uploadDomain:e.uploadDomain,environment:null!==(t=e.environment)&&void 0!==t?t:"default",eventLoopBlockingCheck:e.eventLoopBlockingCheck,enableReadReceiptStorage:null===(n=e.enableReadReceiptStorage)||void 0===n||n,useNaviV2:null!==(i=e.useNaviV2)&&void 0!==i&&i,loggerProxy:e.loggerProxy,conversationCachePolicy:e.conversationCachePolicy}),Li=Di.logger,Di.assignWatcher(yi))}(e)}function ru(){return Ri(this,void 0,void 0,(function*(){return Xi(),function(){return Ri(this,void 0,void 0,(function*(){Di&&(yield o.destroy(),bi=null,Di=null,Li=null)}))}()}))}function su(){return Gi((e=>e.getConnectionStatus()))}function au(){return Gi((e=>e.getServerTime()))}function uu(){return Gi((e=>e.getCurrentUserId()))}function du(e,t){i.add(e,t)}function cu(){return Gi((e=>e.getDeviceId()))}function lu(){const e=Jn();return e.isOk?e.data:null}const fu={COMET:"_",WEBSOCKET:"_"};function vu(e){return ti(e)}function Eu(){return ei()}function hu(){return Zn()}function mu(e,t){return Ri(this,void 0,void 0,(function*(){return(yield di(e,null==t?void 0:t.count,!0,null==t?void 0:t.extra)).wipe()}))}function pu(e,t){return Ri(this,void 0,void 0,(function*(){return di(e,null==t?void 0:t.count,!1,null==t?void 0:t.extra)}))}function gu(e,t){return Ri(this,void 0,void 0,(function*(){return ci(e,t)}))}function Su(e,t){return Ri(this,void 0,void 0,(function*(){return ai(e,null==t?void 0:t.count,null==t?void 0:t.order)}))}function _u(e,t){return Ri(this,void 0,void 0,(function*(){return oi(e,t,!1)}))}function Iu(e,t){return Ri(this,void 0,void 0,(function*(){return(yield fi(e,t)).wipe()}))}function Tu(e,t){return Ri(this,void 0,void 0,(function*(){return oi(e,t,!0)}))}function Au(e,t){return Ri(this,void 0,void 0,(function*(){return ii(e,t,!1)}))}function Ru(e,t){return Ri(this,void 0,void 0,(function*(){return li(e,{keys:null==t?void 0:t.entries,notificationExtra:null==t?void 0:t.notificationExtra})}))}function Cu(e,t){return Ri(this,void 0,void 0,(function*(){return ii(e,t,!0)}))}function Nu(e,t){return Ri(this,void 0,void 0,(function*(){return si(e,t)}))}function Mu(e){return Ri(this,void 0,void 0,(function*(){return ri(e)}))}function Ou(e,t){return Ri(this,void 0,void 0,(function*(){return(yield ui(e,null==t?void 0:t.count,null==t?void 0:t.order,null==t?void 0:t.timestamp)).trans((({list:e,hasMore:t})=>({hasMore:t,list:e.map((e=>Ci(e)))})))}))}function Uu(e){return Ri(this,void 0,void 0,(function*(){return ni(e)}))}function yu(e){return Ri(this,void 0,void 0,(function*(){return mi(e)}))}function Pu(){return Ri(this,void 0,void 0,(function*(){return Ei()}))}function Du(e){return Ri(this,void 0,void 0,(function*(){return hi(e)}))}function bu(){return Ri(this,void 0,void 0,(function*(){return vi()}))}function Lu(){return pi()}function Gu(e){return gi(e)}function xu(e){return Si(e)}function Fu(e){return Ai(e)}function wu(e){return _i(e)}function Bu(e){return Ti(e)}function Hu(e){return Ii(e)}export{Qi as BaseMessage,Ji as CombineMessage,Zi as CombineV2Message,eo as CommandMessage,fu as ConnectType,Oi as Events,to as FileMessage,no as GIFMessage,oo as GroupNotificationMessage,Eo as HQVoiceMessage,ro as ImageMessage,ao as InformationNotificationMessage,uo as LocationMessage,co as ReferenceMessage,lo as RichContentMessage,fo as SightMessage,vo as TextMessage,Ro as UploadTask,ho as VoiceMessage,du as __addSDKVersion,Wa as acceptFriendApplication,xa as acceptGroupApplication,La as acceptGroupInvite,Ks as addConversationsToTag,zi as addEventListener,$a as addFriend,ja as addGroupFollows,Na as addGroupManagers,xu as addMessageReaction,ki as addMonitor,$s as addTag,Vs as addToBlacklist,Kr as batchClearRemoteHistoryMessages,qo as batchDeleteConversations,wu as batchGetMessageReactionSummaries,qr as batchGetMessageReadReceiptInfoV4,$o as batchRemoveConversation,or as batchSetConversationNotificationLevel,vr as batchSetConversationToTop,rr as batchSetConversationTranslateStrategy,Uu as bindRTCRoomForChatroom,Ka as checkFriends,nr as clearAllMessagesUnreadStatus,Xi as clearEventListeners,Qr as clearHistoryMessages,ds as clearMessages,tr as clearMessagesUnreadStatus,_r as clearRealtimeConUnreadCount,Qo as clearTextMessageDraft,ls as clearUnreadCountByTimestamp,ji as connect,Rr as createConversationListLoader,Sa as createGroup,Oo as createUploadTask,qa as deleteFriends,us as deleteLocalMessagesByTimestamp,Xr as deleteMessages,ru as destroy,Yi as disconnect,Ra as dismissGroup,oa as electronExtension,Cu as forceRemoveChatRoomEntry,Tu as forceSetChatRoomEntry,Mu as getAllChatRoomEntries,Vo as getAllConversationList,Lu as getAllRobots,Fs as getAllUltraGroupUnreadCount,ws as getAllUltraGroupUnreadMentionedCount,pr as getAllUnreadMentionedCount,lu as getAppSettings,bu as getAutoTranslateEnabled,Ys as getBlacklist,zs as getBlacklistStatus,Ms as getBlockUltraGroupList,dr as getBlockedConversationList,Nu as getChatRoomEntry,Su as getChatRoomInfo,Ou as getChatroomHistoryMessages,su as getConnectionStatus,Yo as getConversation,ko as getConversationList,jo as getConversationListByTimestamp,ar as getConversationNotificationLevel,ur as getConversationNotificationStatus,lr as getConversationTypeNotificationLevel,ta as getConversationsFromTagByPage,Cr as getConversationsIncludingRobots,uu as getCurrentUserId,cu as getDeviceId,Do as getDownloadAuth,Po as getFileToken,bo as getFileUrl,is as getFirstUnreadMessage,os as getFirstUnreadMessageInfo,iu as getFriendAddPermission,Za as getFriendApplications,Ja as getFriends,eu as getFriendsInfo,wa as getGroupApplications,za as getGroupFollows,Ua as getGroupMembers,Oa as getGroupMembersByRole,Ia as getGroupsInfo,wr as getHistoryMessages,ka as getJoinedGroups,Ba as getJoinedGroupsByRole,Or as getMessage,Hu as getMessageReactionUsers,Bu as getMessageReactions,hs as getMessageReadReceiptInfoV5,ms as getMessageReadReceiptInfoV5ByIdentifiers,$r as getMessageReadReceiptV4,ts as getMessageReader,Cs as getMessagesByUIds,gs as getMessagesReadReceiptByUsersV5,ps as getMessagesReadReceiptUsersByPageV5,Ea as getMyUserProfile,ma as getMyUserProfileVisibility,hu as getNotificationQuietHoursSetting,sa as getProxy,Sr as getRealtimeConTotalUnreadCount,Tr as getRealtimeConUnreadCounts,gr as getRealtimeConversations,Br as getRemoteHistoryMessages,Gu as getRobotById,au as getServerTime,ca as getSubscribeUserList,la as getSubscribeUserStatus,ga as getSubscribeUsersOnlineStatus,Xs as getTags,Qs as getTagsFromConversation,Wo as getTextMessageDraft,Er as getTopConversationList,Ko as getTotalUnreadCount,Jo as getTotalUnreadCountByLevels,Zo as getTotalUnreadMentionedCountByLevels,Pu as getTranslationLanguage,Ls as getUltraGroupDefaultNotificationLevel,Hs as getUltraGroupFirstUnreadMessageTimestamp,Ns as getUltraGroupList,Us as getUltraGroupMessageListByMessageUId,xs as getUltraGroupUnreadCountByTargetId,ks as getUltraGroupUnreadInfoList,bs as getUltraGroupUnreadMentionedCountByTargetId,Bs as getUltraGroupUnreadMentionedMessages,hr as getUnreadConversationList,er as getUnreadCount,na as getUnreadCountByTag,Ar as getUnreadMentionMeConversationList,mr as getUnreadMentionedCount,ss as getUnreadMentionedMessages,va as getUserProfiles,ou as init,rs as insertMessage,Fi as installPlugin,ba as inviteUsersToGroup,mu as joinChatRoom,pu as joinExistChatRoom,Da as joinGroup,Ta as kickGroupMembers,Nr as markRemoteConversationAsRead,Ts as modifyMessage,As as modifyMessageWithParams,$i as onceEventListener,gu as quitChatRoom,Aa as quitGroup,Wr as recallMessage,Rs as refreshReferenceMessageWithParams,Xa as refuseFriendApplication,Fa as refuseGroupApplication,Ga as refuseGroupInvite,ns as registerMessageType,Ds as removeAllExpansionForUltraGroupMessage,Ru as removeChatRoomEntries,Au as removeChatRoomEntry,zo as removeConversation,Js as removeConversationsFromTag,qi as removeEventListener,Wi as removeEventListeners,Ps as removeExpansionForUltraGroupMessage,js as removeFromBlacklist,Ya as removeGroupFollows,Ma as removeGroupManagers,Zr as removeMessageExpansionForKey,Fu as removeMessageReaction,Vi as removeMonitor,Eu as removeNotificationQuietHoursSetting,Ir as removeRealtimeConversations,qs as removeTag,ea as removeTagFromConversations,Zs as removeTagsFromConversation,Ss as requestSpeechToTextForMessage,vs as requestStreamMessageContent,Xo as saveTextMessageDraft,cs as searchConversationByContent,tu as searchFriendsInfo,Pa as searchGroupMembers,Ha as searchJoinedGroups,as as searchMessages,pa as searchUserProfileByUniqueId,br as sendFileMessage,Gr as sendGIFMessage,xr as sendHQVoiceMessage,Lr as sendImageMessage,Ur as sendMessage,Hr as sendReadReceiptMessage,zr as sendReadReceiptMessageV4,kr as sendReadReceiptRequest,Vr as sendReadReceiptResponse,jr as sendReadReceiptResponseV2,Es as sendReadReceiptResponseV5,Fr as sendSightMessage,Yr as sendSyncReadStatusMessage,yr as sendTextMessage,es as sendTypingStatusMessage,Os as sendUltraGroupTypingStatus,Du as setAutoTranslateEnabled,Iu as setChatRoomEntries,_u as setChatRoomEntry,ir as setConversationNotificationLevel,sr as setConversationNotificationStatus,fr as setConversationToTop,ia as setConversationToTopInTag,cr as setConversationTypeNotificationLevel,nu as setFriendAddPermission,Qa as setFriendInfo,ya as setGroupMemberInfo,Va as setGroupRemark,fs as setMessageReceivedStatus,vu as setNotificationQuietHoursWithSetting,ra as setProxy,yu as setTranslationLanguage,Gs as setUltraGroupDefaultNotificationLevel,Uo as stopUploadTask,ua as subscribeUserStatus,aa as testProxy,Ca as transferGroupOwner,_s as translateMessagesWithParams,Is as translateTextsWithParams,da as unSubscribeUserStatus,ys as updateExpansionForUltraGroupMessage,_a as updateGroupInfo,Jr as updateMessageExpansion,fa as updateMyUserProfile,ha as updateMyUserProfileVisibility,Ws as updateTag,yo as upload};
package/package.json CHANGED
@@ -19,7 +19,7 @@
19
19
  "types": "./index.d.ts"
20
20
  }
21
21
  },
22
- "version": "5.46.0-enterprise-alpha.4",
22
+ "version": "5.46.1-alpha.1",
23
23
  "author": "pass-web@rongcloud.cn",
24
24
  "license": "SEE LICENSE IN LICENSE",
25
25
  "homepage": "https://www.rongcloud.cn",
@@ -36,6 +36,6 @@
36
36
  "globals": "RongIMLib"
37
37
  },
38
38
  "peerDependencies": {
39
- "@rongcloud/engine": "=5.46.0-enterprise-alpha.4"
39
+ "@rongcloud/engine": "=5.46.1-alpha.1"
40
40
  }
41
41
  }