@rongcloud/imlib-next 5.30.1 → 5.32.0-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.cjs +1 -1
- package/index.cjs.js +1 -1
- package/index.d.ts +642 -654
- package/index.esm.js +2 -2
- package/index.mjs +2 -2
- package/package.json +2 -2
package/index.cjs
CHANGED
|
@@ -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 n(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}var r=function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)};function o(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(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((r=r.apply(e,t||[])).next())}))}function i(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}function s(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s}function a(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}function u(e){return r(r({},e),{channelId:e.channelId||""})}function d(t){var n=t.conversationType,r=t.targetId,o=t.latestMessage,i=t.unreadMessageCount,s=t.hasMentioned,a=t.mentionedInfo,d=t.lastUnreadTime,c=t.notificationStatus,_=t.notificationLevel,l=t.isTop,E=t.channelId,f=t.unreadMentionedCount,R=t.matchCount,A=t.operationTime,T=t.draft,v=t.translateStrategy,I=t.editedMessageDraft,p={conversationType:n,targetId:r,latestMessage:o&&u(o),unreadMessageCount:i,hasMentioned:s,mentionedInfo:s?{type:null==a?void 0:a.type,userIdList:null==a?void 0:a.userIdList}:void 0,lastUnreadTime:d,notificationStatus:c,notificationLevel:_,isTop:l,channelId:E,unreadMentionedCount:f,matchCount:R,operationTime:A,draft:T||"",translateStrategy:v,editedMessageDraft:I};return p.conversationType===e.ConversationType.ULTRA_GROUP&&(p.firstUnreadMessage=t.firstUnreadMessage,p.channelType=t.channelType,p.unreadMentionedMeCount=t.unreadMentionedMeCount),p}function c(e,t){null===console||void 0===console||console.warn("Method '".concat(e,"' is deprecated, please use '").concat(t,"' instead"))}var _,l={groupName:"name",portraitUri:"portraitUrl",introduction:"introduction",notice:"announcement",joinPermission:"joinPerm",removeMemberPermission:"removePerm",invitePermission:"memInvitePerm",inviteHandlePermission:"invitePerm",groupInfoEditPermission:"profilePerm",memberInfoEditPermission:"memProfilePerm"};exports.Events=void 0,(_=exports.Events||(exports.Events={})).CONNECTING="CONNECTING",_.CONNECTED="CONNECTED",_.DISCONNECT="DISCONNECT",_.SUSPEND="SUSPEND",_.MESSAGES="MESSAGES",_.READ_RECEIPT_RECEIVED="READ_RECEIPT_RECEIVED",_.MESSAGE_RECEIPT_REQUEST="MESSAGE_RECEIPT_REQUEST",_.MESSAGE_RECEIPT_RESPONSE="MESSAGE_RECEIPT_RESPONSE",_.MESSAGE_READ_RECEIPT_V4="MESSAGE_READ_RECEIPT_V4",_.SYNC_READ_STATUS="SYNC_READ_STATUS",_.CONVERSATION="CONVERSATION",_.CHATROOM="CHATROOM",_.EXPANSION="EXPANSION",_.PULL_OFFLINE_MESSAGE_FINISHED="PULL_OFFLINE_MESSAGE_FINISHED",_.TAG="TAG",_.USER_SETTINGS_SYNCED="USER_SETTINGS_SYNCED",_.USER_SETTINGS_CHANGED="USER_SETTINGS_CHANGED",_.CONVERSATIONS_SETTINGS_SYNCED="CONVERSATIONS_SETTINGS_SYNCED",_.CONVERSATION_TAG="CONVERSATION_TAG",_.TYPING_STATUS="TYPING_STATUS",_.MESSAGE_BLOCKED="MESSAGE_BLOCKED",_.ULTRA_GROUP_ENABLE="ULTRA_GROUP_ENABLE",_.CONVERSATIONS_SYNCED="CONVERSATIONS_SYNCED",_.OPERATE_STATUS="OPERATE_STATUS",_.ULTRA_GROUP_MESSAGE_EXPANSION_UPDATED="ULTRA_GROUP_MESSAGE_EXPANSION_UPDATED",_.ULTRA_GROUP_MESSAGE_MODIFIED="MESSAGE_MODIFIED",_.ULTRA_GROUP_MESSAGE_RECALLED="ULTRA_GROUP_MESSAGE_RECALLED",_.ULTRA_GROUP_CHANNEL_TYPE_CHANGE="ULTRA_GROUP_CHANNEL_TYPE_CHANGE",_.ULTRA_GROUP_CHANNEL_DELETE="ULTRA_GROUP_CHANNEL_DELETE",_.ULTRA_GROUP_CHANNEL_USER_KICKED="ULTRA_GROUP_CHANNEL_USER_KICKED",_.USER_GROUP_STATUS="USER_GROUP_STATUS",_.SUBSCRIBED_USER_STATUS_CHANGE="SUBSCRIBED_USER_STATUS_CHANGE",_.SUBSCRIBED_RELATION_CHANGE="SUBSCRIBED_RELATION_CHANGE",_.SYNC_SUBSCRIBED_USER_STATUS_FINISHED="SYNC_SUBSCRIBED_USER_STATUS_FINISHED",_.OWN_USER_PROFILE_CHANGED="OWN_USER_PROFILE_CHANGED",_.GROUP_OPERATION="GROUP_OPERATION",_.GROUP_INFO_CHANGED="GROUP_INFO_CHANGED",_.GROUP_MEMBER_INFO_CHANGED="GROUP_MEMBER_INFO_CHANGED",_.GROUP_APPLICATION_EVENT="GROUP_APPLICATION_EVENT",_.GROUP_REMARK_CHANGED_SYNC="GROUP_REMARK_CHANGED_SYNC",_.GROUP_FOLLOWS_CHANGED_SYNC="GROUP_FOLLOWS_CHANGED_SYNC",_.FRIEND_ADDED="FRIEND_ADDED",_.FRIEND_DELETE="FRIEND_DELETE",_.FRIEND_APPLICATION_STATUS_CHANGED="FRIEND_APPLICATION_STATUS_CHANGED",_.FRIEND_CLEARED="FRIEND_CLEARED",_.FRIEND_INFO_CHANGED_SYNC="FRIEND_INFO_CHANGED_SYNC",_.DATABASE_OPENED="DATABASE_OPENED",_.DATABASE_UPGRADE_WILL_START="DATABASE_UPGRADE_WILL_START",_.DATABASE_UPGRADING="DATABASE_UPGRADING",_.DATABASE_UPGRADE_DID_COMPLETE="DATABASE_UPGRADE_DID_COMPLETE",_.STREAM_MESSAGE_RESPONSE="STREAM_MESSAGE_RESPONSE",_.MESSAGE_RECEIPT_RESPONSE_V5="MESSAGE_RECEIPT_RESPONSE_V5",_.SPEECH_TO_TEXT_RESPONSE="SPEECH_TO_TEXT_RESPONSE",_.TRANSLATE_RESPONSE="TRANSLATE_RESPONSE",_.MESSAGE_MODIFIED="MESSAGE_MODIFIED",_.MESSAGE_MODIFIED_SYNC_COMPLETED="MESSAGE_MODIFIED_SYNC_COMPLETED";var E,f={A_ADD_TO_BLACKLIST_T:"A-add_to_blacklist-T",A_ADD_TO_BLACKLIST_R:"A-add_to_blacklist-R",A_REMOVE_FROM_BLACKLIST_T:"A-remove_from_blacklist-T",A_REMOVE_FROM_BLACKLIST_R:"A-remove_from_blacklist-R",A_GET_BLACKLIST_T:"A-get_blacklist-T",A_GET_BLACKLIST_R:"A-get_blacklist-R",A_GET_BLACKLIST_STATUS_T:"A-get_blacklist_status-T",A_GET_BLACKLIST_STATUS_R:"A-get_blacklist_status-R",A_GET_ALL_UNREAD_MENTIONED_COUNT_T:"A-get_all_unread_mentioned_count-T",A_GET_ALL_UNREAD_MENTIONED_COUNT_R:"A-get_all_unread_mentioned_count-R",A_E_SET_MESSAGE_STATUS_TO_READ_T:"A-e_set_message_status_to_read-T",A_E_SET_MESSAGE_STATUS_TO_READ_R:"A-e_set_message_status_to_read-R",A_E_SET_MESSAGE_RECEIVED_STATUS_T:"A-e_set_message_received_status-T",A_E_SET_MESSAGE_RECEIVED_STATUS_R:"A-e_set_message_received_status-R",A_E_SET_MESSAGE_SENT_STATUS_T:"A-e_set_message_sent_status-T",A_E_SET_MESSAGE_SENT_STATUS_R:"A-e_set_message_sent_status-R",A_E_SET_MESSAGE_SENT_STATUS_INFO_T:"A-e_set_message_sent_status_info-T",A_E_SET_MESSAGE_SENT_STATUS_INFO_R:"A-e_set_message_sent_status_info-R",A_E_SET_CHECK_DUPLICATE_MESSAGE_T:"A-e_set_check_duplicate_message-T",A_E_SET_CHECK_DUPLICATE_MESSAGE_R:"A-e_set_check_duplicate_message-R",A_BATCH_SET_CON_NOTIFI_LEVEL_T:"A-batch_set_con_notifi_level-T",A_BATCH_SET_CON_NOTIFI_LEVEL_R:"A-batch_set_con_notifi_level-R",A_BATCH_SET_CON_TO_TOP_T:"A-batch_set_con_to_top-T",A_BATCH_SET_CON_TO_TOP_R:"A-batch_set_con_to_top-R",A_RECALL_MESSAGE_T:"A-recall_message-T",A_RECALL_MESSAGE_R:"A-recall_message-R",A_GET_MESSAGE_READER_T:"A-get_message_reader-T",A_GET_MESSAGE_READER_R:"A-get_message_reader-R",A_GET_UNREAD_MENTIONED_MESSAGES_T:"A-get_unread_mentioned_messages-T",A_GET_UNREAD_MENTIONED_MESSAGES_R:"A-get_unread_mentioned_messages-R",A_SEARCH_CONVERSATION_BY_CONTENT_T:"A-search_conversation_by_content-T",A_SEARCH_CONVERSATION_BY_CONTENT_R:"A-search_conversation_by_content-R",A_CLEAR_UNREAD_COUNT_BY_TIMESTAMP_T:"A-clear_unread_count_by_timestamp-T",A_CLEAR_UNREAD_COUNT_BY_TIMESTAMP_R:"A-clear_unread_count_by_timestamp-R",A_SET_PROXY_T:"A-set_proxy-T",A_SET_PROXY_R:"A-set_proxy-R",A_GET_PROXY_T:"A-get_proxy-T",A_GET_PROXY_R:"A-get_proxy-R",A_TEST_PROXY_T:"A-test_proxy-T",A_TEST_PROXY_R:"A-test_proxy-R",A_SUBSCRIBE_USER_STATUS_T:"A-subscribe_user_status-T",A_SUBSCRIBE_USER_STATUS_R:"A-subscribe_user_status-R",A_UNSUBSCRIBE_USER_STATUS_T:"A-unsubscribe_user_status-T",A_UNSUBSCRIBE_USER_STATUS_R:"A-unsubscribe_user_status-R",A_GET_SUBSCRIBE_USER_STATUS_LIST_T:"A-get_subscribe_user_status_list-T",A_GET_SUBSCRIBE_USER_STATUS_LIST_R:"A-get_subscribe_user_status_list-R",A_UPDATE_MY_USER_PROFILE_T:"A-update_my_user_profile-T",A_UPDATE_MY_USER_PROFILE_R:"A-update_my_user_profile-R",A_GET_MY_USER_PROFILE_T:"A-get_my_user_profile-T",A_GET_MY_USER_PROFILE_R:"A-get_my_user_profile-R",A_UPDATE_MY_USER_PROFILE_VISIBILITY_T:"A-update_my_user_profile_visibility-T",A_UPDATE_MY_USER_PROFILE_VISIBILITY_R:"A-update_my_user_profile_visibility-R",A_GET_MY_USER_PROFILE_VISIBILITY_T:"A-get_my_user_profile_visibility-T",A_GET_MY_USER_PROFILE_VISIBILITY_R:"A-get_my_user_profile_visibility-R",A_SEARCH_USER_PROFILE_BY_UNIQUE_ID_T:"A-search_user_profile_by_unique_id-T",A_SEARCH_USER_PROFILE_BY_UNIQUE_ID_R:"A-search_user_profile_by_unique_id-R",A_CREATE_GROUP_T:"A-create_group-T",A_CREATE_GROUP_R:"A-create_group-R",A_UPDATE_GROUP_INFO_T:"A-update_group_info-T",A_UPDATE_GROUP_INFO_R:"A-update_group_info-R",A_GET_GROUPS_INFO_T:"A-get_groups_info-T",A_GET_GROUPS_INFO_R:"A-get_groups_info-R",A_KICK_GROUP_MEMBERS_T:"A-kick_group_members-T",A_KICK_GROUP_MEMBERS_R:"A-kick_group_members-R",A_QUIT_GROUP_T:"A-quit_group-T",A_QUIT_GROUP_R:"A-quit_group-R",A_DISMISS_GROUP_T:"A-dismiss_group-T",A_DISMISS_GROUP_R:"A-dismiss_group-R",A_TRANSFER_GROUP_OWNER_T:"A-transfer_group_owner-T",A_TRANSFER_GROUP_OWNER_R:"A-transfer_group_owner-R",A_ADD_GROUP_MANAGERS_T:"A-add_group_managers-T",A_ADD_GROUP_MANAGERS_R:"A-add_group_managers-R",A_REMOVE_GROUP_MANAGERS_T:"A-remove_group_managers-T",A_REMOVE_GROUP_MANAGERS_R:"A-remove_group_managers-R",A_GET_GROUP_MEMBERS_BY_ROLES_T:"A-get_group_members_by_roles-T",A_GET_GROUP_MEMBERS_BY_ROLES_R:"A-get_group_members_by_roles-R",A_GET_GROUP_MEMBERS_T:"A-get_group_members-T",A_GET_GROUP_MEMBERS_R:"A-get_group_members-R",A_SET_GROUP_MEMBER_INFO_T:"A-set_group_member_info-T",A_SET_GROUP_MEMBER_INFO_R:"A-set_group_member_info-R",A_SEARCH_GROUP_MEMBERS_T:"A-search_group_members-T",A_SEARCH_GROUP_MEMBERS_R:"A-search_group_members-R",A_JOIN_GROUP_T:"A-join_group-T",A_JOIN_GROUP_R:"A-join_group-R",A_INVITE_USERS_TO_GROUP_T:"A-invite_users_to_group-T",A_INVITE_USERS_TO_GROUP_R:"A-invite_users_to_group-R",A_ACCEPT_GROUP_INVITE_T:"A-accept_group_invite-T",A_ACCEPT_GROUP_INVITE_R:"A-accept_group_invite-R",A_REFUSE_GROUP_INVITE_T:"A-refuse_group_invite-T",A_REFUSE_GROUP_INVITE_R:"A-refuse_group_invite-R",A_ACCEPT_GROUP_APPLICATION_T:"A-accept_group_application-T",A_ACCEPT_GROUP_APPLICATION_R:"A-accept_group_application-R",A_REFUSE_GROUP_APPLICATION_T:"A-refuse_group_application-T",A_REFUSE_GROUP_APPLICATION_R:"A-refuse_group_application-R",A_GET_GROUP_APPLICATIONS_T:"A-get_group_applications-T",A_GET_GROUP_APPLICATIONS_R:"A-get_group_applications-R",A_GET_JOINED_GROUPS_BY_ROLES_T:"A-get_joined_groups_by_roles-T",A_GET_JOINED_GROUPS_BY_ROLES_R:"A-get_joined_groups_by_roles-R",A_SEARCH_JOINED_GROUPS_T:"A-search_joined_groups-T",A_SEARCH_JOINED_GROUPS_R:"A-search_joined_groups-R",A_GET_JOINED_GROUPS_T:"A-get_joined_groups-T",A_GET_JOINED_GROUPS_R:"A-get_joined_groups-R",A_SET_GROUP_REMARK_T:"A-set_group_remark-T",A_SET_GROUP_REMARK_R:"A-set_group_remark-R",A_GET_GROUP_REMARK_T:"A-get_group_remark-T",A_GET_GROUP_REMARK_R:"A-get_group_remark-R",A_ADD_GROUP_FOLLOWS_T:"A-add_group_follows-T",A_ADD_GROUP_FOLLOWS_R:"A-add_group_follows-R",A_REMOVE_GROUP_FOLLOWS_T:"A-remove_group_follows-T",A_REMOVE_GROUP_FOLLOWS_R:"A-remove_group_follows-R",A_GET_GROUP_FOLLOWS_T:"A-get_group_follows-T",A_GET_GROUP_FOLLOWS_R:"A-get_group_follows-R",A_ADD_FRIEND_T:"A-add_friend-T",A_ADD_FRIEND_R:"A-add_friend-R",A_DELETE_FRIENDS_T:"A-delete_friends-T",A_DELETE_FRIENDS_R:"A-delete_friends-R",A_ACCEPT_FRIEND_APPLICATION_T:"A-accept_friend_application-T",A_ACCEPT_FRIEND_APPLICATION_R:"A-accept_friend_application-R",A_REFUSE_FRIEND_APPLICATION_T:"A-refuse_friend_application-T",A_REFUSE_FRIEND_APPLICATION_R:"A-refuse_friend_application-R",A_SET_FRIEND_INFO_T:"A-set_friend_info-T",A_SET_FRIEND_INFO_R:"A-set_friend_info-R",A_CHECK_FRIENDS_T:"A-check_friends-T",A_CHECK_FRIENDS_R:"A-check_friends-R",A_GET_FRIENDS_T:"A-get_friends-T",A_GET_FRIENDS_R:"A-get_friends-R",A_GET_FRIEND_APPLICATIONS_T:"A-get_friend_applications-T",A_GET_FRIEND_APPLICATIONS_R:"A-get_friend_applications-R",A_DELETE_FRIEND_APPLICATION_T:"A-delete_friend_application-T",A_DELETE_FRIEND_APPLICATION_R:"A-delete_friend_application-R",A_GET_FRIENDS_INFO_T:"A-get_friends_info-T",A_GET_FRIENDS_INFO_R:"A-get_friends_info-R",A_SEARCH_FRIENDS_INFO_T:"A-search_friends_info-T",A_SEARCH_FRIENDS_INFO_R:"A-search_friends_info-R",A_SET_ADD_FRIEND_PERMISSION_T:"A-set_add_friend_permission-T",A_SET_ADD_FRIEND_PERMISSION_R:"A-set_add_friend_permission-R",A_GET_ADD_FRIEND_PERMISSION_T:"A-get_add_friend_permission-T",A_GET_ADD_FRIEND_PERMISSION_R:"A-get_add_friend_permission-R"};!function(e){e[e.DISALLOW=0]="DISALLOW",e[e.ALLOW=1]="ALLOW"}(E||(E={}));var R=new e.EventEmitter,A={connection:function(t,n){switch(t){case e.RCConnectionStatus.CONNECTED:R.emit(exports.Events.CONNECTED);break;case e.RCConnectionStatus.CONNECTING:R.emit(exports.Events.CONNECTING);break;case e.RCConnectionStatus.SUSPENDED:R.emit(exports.Events.SUSPEND,n);break;case e.RCConnectionStatus.DISCONNECTED:R.emit(exports.Events.DISCONNECT,n)}},batchMessage:function(e){R.emit(exports.Events.MESSAGES,{messages:e.map((function(e){return u(e)}))})},typingState:function(e){R.emit(exports.Events.TYPING_STATUS,{status:e})},readReceiptReceived:function(e,t,n,r){R.emit(exports.Events.READ_RECEIPT_RECEIVED,{conversation:e,messageUId:t,sentTime:n,sendUserId:r})},messageReceiptRequest:function(e,t,n){R.emit(exports.Events.MESSAGE_RECEIPT_REQUEST,{conversation:e,messageUId:t,senderUserId:n})},messageReceiptResponse:function(e,t,n){R.emit(exports.Events.MESSAGE_RECEIPT_RESPONSE,{conversation:e,receivedUserId:t,messageUIdList:n})},conversationState:function(t){var n=t.map((function(t){var n=t.conversation,r=t.updatedItems,o=n.conversationType,i=d(n);return o===e.ConversationType.ULTRA_GROUP&&(i.versionTime=n.versionTime,i.unreadMessageCount=T(n.unreadMessageCount||0),i.unreadMentionedCount=T(n.unreadMentionedCount||0),i.unreadMentionedMeCount=T(n.unreadMentionedMeCount||0)),{conversation:i,updatedItems:r}}));R.emit(exports.Events.CONVERSATION,{conversationList:n})},chatroomState:function(e){R.emit(exports.Events.CHATROOM,e)},expansion:function(e){R.emit(exports.Events.EXPANSION,e)},pullFinished:function(){R.emit(exports.Events.PULL_OFFLINE_MESSAGE_FINISHED)},tag:function(){R.emit(exports.Events.TAG)},userSettingsSynced:function(e){R.emit(exports.Events.USER_SETTINGS_SYNCED,e)},userSettingsChanged:function(e){R.emit(exports.Events.USER_SETTINGS_CHANGED,e)},conversationStatusSynced:function(e){R.emit(exports.Events.CONVERSATIONS_SETTINGS_SYNCED,e)},conversationTagChanged:function(){R.emit(exports.Events.CONVERSATION_TAG)},messageBlocked:function(e){R.emit(exports.Events.MESSAGE_BLOCKED,e)},ultraGroupEnable:function(){R.emit(exports.Events.ULTRA_GROUP_ENABLE)},sgRelationsSynced:function(e){R.emit(exports.Events.CONVERSATIONS_SYNCED,e)},operateStatus:function(e){R.emit(exports.Events.OPERATE_STATUS,e)},ultraGroupMessageExpansionUpdated:function(e){R.emit(exports.Events.ULTRA_GROUP_MESSAGE_EXPANSION_UPDATED,e.map((function(e){return u(e)})))},ultraGroupMessageRecalled:function(e){R.emit(exports.Events.ULTRA_GROUP_MESSAGE_RECALLED,e.map((function(e){return u(e)})))},ultraGroupChannelChangeType:function(e){R.emit(exports.Events.ULTRA_GROUP_CHANNEL_TYPE_CHANGE,e)},ultraGroupChannelUserKicked:function(e){R.emit(exports.Events.ULTRA_GROUP_CHANNEL_USER_KICKED,e)},ultraGroupChannelDelete:function(e){R.emit(exports.Events.ULTRA_GROUP_CHANNEL_DELETE,e)},userGroupStatus:function(e){R.emit(exports.Events.USER_GROUP_STATUS,e)},messageReadReceipt:function(e){R.emit(exports.Events.MESSAGE_READ_RECEIPT_V4,e)},syncReadStatus:function(e){R.emit(exports.Events.SYNC_READ_STATUS,e)},subscribedUserStatusChange:function(e){R.emit(exports.Events.SUBSCRIBED_USER_STATUS_CHANGE,e)},subscribedRelationChange:function(e){R.emit(exports.Events.SUBSCRIBED_RELATION_CHANGE,e)},syncSubscribedUserStatusFinished:function(e){R.emit(exports.Events.SYNC_SUBSCRIBED_USER_STATUS_FINISHED,e)},ownUserProfileChanged:function(e){R.emit(exports.Events.OWN_USER_PROFILE_CHANGED,e)},groupOperation:function(e){R.emit(exports.Events.GROUP_OPERATION,e)},groupInfoChanged:function(e){R.emit(exports.Events.GROUP_INFO_CHANGED,e)},groupMemberInfoChanged:function(e){R.emit(exports.Events.GROUP_MEMBER_INFO_CHANGED,e)},groupApplicationEvent:function(e){R.emit(exports.Events.GROUP_APPLICATION_EVENT,e)},groupRemarkChangedSync:function(e){R.emit(exports.Events.GROUP_REMARK_CHANGED_SYNC,e)},groupFollowsChangedSync:function(e){R.emit(exports.Events.GROUP_FOLLOWS_CHANGED_SYNC,e)},friendAdd:function(e){R.emit(exports.Events.FRIEND_ADDED,e)},friendDelete:function(e){R.emit(exports.Events.FRIEND_DELETE,e)},friendApplicationStatusChanged:function(e){R.emit(exports.Events.FRIEND_APPLICATION_STATUS_CHANGED,e)},friendCleared:function(e){R.emit(exports.Events.FRIEND_CLEARED,e)},friendInfoChangedSync:function(e){R.emit(exports.Events.FRIEND_INFO_CHANGED_SYNC,e)},databaseOpened:function(e,t){R.emit(exports.Events.DATABASE_OPENED,e,t)},databaseUpgradeWillStart:function(){R.emit(exports.Events.DATABASE_UPGRADE_WILL_START)},databaseUpgrading:function(e){R.emit(exports.Events.DATABASE_UPGRADING,e)},databaseUpgradeDidComplete:function(e){R.emit(exports.Events.DATABASE_UPGRADE_DID_COMPLETE,e)},readReceiptResponseV5:function(e){R.emit(exports.Events.MESSAGE_RECEIPT_RESPONSE_V5,e)},speechToTextResponse:function(e){R.emit(exports.Events.SPEECH_TO_TEXT_RESPONSE,e)},translateResponse:function(e){R.emit(exports.Events.TRANSLATE_RESPONSE,e)},messagesModified:function(e){R.emit(exports.Events.MESSAGE_MODIFIED,e.map((function(e){return u(e)})))},messageModifiedSyncCompleted:function(){R.emit(exports.Events.MESSAGE_MODIFIED_SYNC_COMPLETED)}};function T(e){return e>999?999:e}e.VersionManage.add("imlib-next","5.30.1");var v=null,I=null,p=null;function S(){return o(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return v?[4,e.APIContext.destroy()]:[2];case 1:return t.sent(),I=null,v=null,p=null,[2]}}))}))}function g(e){if(!v)throw new Error("Not initialized yet!");return e(v,p,I)}function m(t){return o(this,void 0,void 0,(function(){return i(this,(function(n){return v?[2,t(v,p,I)]:[2,e.fail(e.ErrorCode.BIZ_ERROR_CLIENT_NOT_INIT)]}))}))}function h(){return v?e.ok(v):e.fail(e.ErrorCode.BIZ_ERROR_CLIENT_NOT_INIT)}var C={TIMEOUT:{code:-1,msg:"Network timeout"},REJECTED_BY_BLACKLIST:{code:405,msg:"Blacklisted by the other party"},SEND_TOO_FAST:{code:20604,msg:"Sending messages too quickly"},NOT_IN_GROUP:{code:22406,msg:"Not in group"},ULTRA_GROUP_USER_NOT_IN_PRIVATE_CHANNEL:{code:e.ErrorCode.ULTRA_GROUP_USER_NOT_IN_PRIVATE_CHANNEL,msg:"ultra group user not in private channel"},FORBIDDEN_IN_GROUP:{code:22408,msg:"Forbbiden from speaking in the group"},NOT_IN_CHATROOM:{code:23406,msg:"Not in chatRoom"},FORBIDDEN_IN_CHATROOM:{code:23408,msg:"Forbbiden from speaking in the chatRoom"},KICKED_FROM_CHATROOM:{code:23409,msg:"Kicked out and forbbiden from joining the chatRoom"},CHATROOM_NOT_EXIST:{code:23410,msg:"ChatRoom does not exist"},CHATROOM_IS_FULL:{code:23411,msg:"ChatRoom members exceeded"},PARAMETER_INVALID_CHATROOM:{code:23412,msg:"Invalid chatRoom parameters"},ROAMING_SERVICE_UNAVAILABLE_CHATROOM:{code:23414,msg:"ChatRoom message roaming service is not open, Please go to the developer to open this service"},RECALLMESSAGE_PARAMETER_INVALID:{code:25101,msg:"Invalid recall message parameter"},ROAMING_SERVICE_UNAVAILABLE_MESSAGE:{code:25102,msg:"Single group chat roaming service is not open, Please go to the developer to open this service"},PUSHSETTING_PARAMETER_INVALID:{code:26001,msg:"Invalid push parameter"},OPERATION_BLOCKED:{code:20605,msg:"Operation is blocked"},OPERATION_NOT_SUPPORT:{code:20606,msg:"Operation is not supported"},MSG_BLOCKED_SENSITIVE_WORD:{code:21501,msg:"The sent message contains sensitive words"},REPLACED_SENSITIVE_WORD:{code:21502,msg:"Sensitive words in the message have been replaced"},NOT_CONNECTED:{code:30001,msg:"Please connect successfully first"},NAVI_REQUEST_ERROR:{code:30007,msg:"Navigation http request failed"},CMP_REQUEST_ERROR:{code:30010,msg:"CMP sniff http request failed"},CONN_APPKEY_FAKE:{code:31002,msg:"Your appkey is fake"},CONN_MINI_SERVICE_NOT_OPEN:{code:31003,msg:"Mini program service is not open, Please go to the developer to open this service"},CONN_ACK_TIMEOUT:{code:31e3,msg:"Connection ACK timeout"},CONN_TOKEN_INCORRECT:{code:31004,msg:"Your token is not valid or expired"},CONN_NOT_AUTHRORIZED:{code:31005,msg:"AppKey and Token do not match"},CONN_REDIRECTED:{code:31006,msg:"Connection redirection"},CONN_APP_BLOCKED_OR_DELETED:{code:31008,msg:"AppKey is banned or deleted"},CONN_USER_BLOCKED:{code:31009,msg:"User blocked"},CONN_DOMAIN_INCORRECT:{code:31012,msg:"Connect domain error, Please check the set security domain"},ROAMING_SERVICE_UNAVAILABLE:{code:33007,msg:"Roaming service cloud is not open, Please go to the developer to open this service"},RC_CONNECTION_EXIST:{code:34001,msg:"Connection already exists"},CHATROOM_KV_EXCEED:{code:23423,msg:"ChatRoom KV setting exceeds maximum"},CHATROOM_KV_OVERWRITE_INVALID:{code:23424,msg:"ChatRoom KV already exists"},CHATROOM_KV_STORE_NOT_OPEN:{code:23426,msg:"ChatRoom KV storage service is not open, Please go to the developer to open this service"},CHATROOM_KEY_NOT_EXIST:{code:23427,msg:"ChatRoom key does not exist"},MSG_KV_NOT_SUPPORT:{code:34008,msg:"The message cannot be extended"},SEND_MESSAGE_KV_FAIL:{code:34009,msg:"Sending RC expansion message fail"},EXPANSION_LIMIT_EXCEET:{code:34010,msg:"The message expansion size is beyond the limit"},ILLGAL_PARAMS:{code:33003,msg:"Incorrect parameters passed in while calling the interface"},UPLOAD_FILE_FAILED:{code:35020,msg:"File upload failed"},CHATROOM_KV_STORE_NOT_ALL_SUCCESS:{code:23428,msg:"Chatroom kv store not all success"},CHATROOM_KV_STORE_OUT_LIMIT:{code:23429,msg:"Chatroom kv's length is out of limit"},TAG_EXISTS:{code:33101,msg:"The tag already exists"},TAG_NOT_EXIST:{code:33100,msg:"The tag does not exist"},NOT_SUPPORT:{code:e.ErrorCode.NOT_SUPPORT,msg:"The method is not supported in a browser!"}},O={};for(var P in C){var N=C[P].code;O[N]=P}var U=0,M=new Map;function y(e,t){var n=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var o=[],i=[];a([],s(M.values()),!1).forEach((function(e){var t=s(e,3),r=t[0],a=t[1],u=t[2];r===n&&(i.push(a),u&&o.push(u))})),o.forEach((function(t){e=t(e)}));var u=t.apply(void 0,a([],s(e),!1));return i.forEach((function(t){t(e,u)})),u};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}var L=y("disconnect",(function(t,n){return g((function(r,o){return o.info(e.LogTagId.A_DISCONNECT_O),r.disconnect(t,n)}))}));function G(){R.clear()}var D=function(e,t,n,r){void 0===n&&(n=!0),void 0===r&&(r=!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:r})},b=function(e){function t(t,n,r){return e.call(this,t,r,n.isPersited,n.isCounted)||this}return n(t,e),t}(D);var x,V=function(t){function r(n){return t.call(this,e.MessageType.COMBINE,e.getMessageTypeDescription(e.MessageType.COMBINE),n)||this}return n(r,t),r}(b),F=function(t){function r(n){return t.call(this,e.MessageType.COMBINE_V2,e.getMessageTypeDescription(e.MessageType.COMBINE_V2),n)||this}return n(r,t),r}(b),w=function(t){function r(n){return t.call(this,"RC:CmdMsg",e.getMessageTypeDescription("RC:CmdMsg"),n)||this}return n(r,t),r}(b),B=function(t){function r(n){return t.call(this,e.MessageType.FILE,e.getMessageTypeDescription(e.MessageType.FILE),n)||this}return n(r,t),r}(b),H=function(t){function r(n){return t.call(this,e.MessageType.GIF,e.getMessageTypeDescription(e.MessageType.GIF),n)||this}return n(r,t),r}(b),k=function(t){function r(n){return t.call(this,"RC:GrpNtf",e.getMessageTypeDescription("RC:GrpNtf"),n)||this}return n(r,t),r}(b),J=function(t){function r(n){return t.call(this,e.MessageType.IMAGE,e.getMessageTypeDescription(e.MessageType.IMAGE),n)||this}return n(r,t),r}(b),Y=function(t){function r(n){return t.call(this,"RC:InfoNtf",e.getMessageTypeDescription("RC:InfoNtf"),n)||this}return n(r,t),r}(b),j=function(t){function r(n){return t.call(this,e.MessageType.LOCATION,e.getMessageTypeDescription(e.MessageType.LOCATION),n)||this}return n(r,t),r}(b),K=function(t){function r(n){return t.call(this,e.MessageType.REFERENCE,e.getMessageTypeDescription(e.MessageType.REFERENCE),n)||this}return n(r,t),r}(b),W=function(t){function r(n){return t.call(this,e.MessageType.RICH_CONTENT,e.getMessageTypeDescription(e.MessageType.RICH_CONTENT),n)||this}return n(r,t),r}(b),Q=function(t){function r(n){return t.call(this,e.MessageType.SIGHT,e.getMessageTypeDescription(e.MessageType.SIGHT),n)||this}return n(r,t),r}(b),q=function(t){function r(n){return t.call(this,e.MessageType.TEXT,e.getMessageTypeDescription(e.MessageType.TEXT),n)||this}return n(r,t),r}(b),X=function(t){function r(n){return t.call(this,e.MessageType.HQ_VOICE,e.getMessageTypeDescription(e.MessageType.HQ_VOICE),n)||this}return n(r,t),r}(b),z=function(t){function r(n){return t.call(this,e.MessageType.VOICE,e.getMessageTypeDescription(e.MessageType.VOICE),n)||this}return n(r,t),r}(b);!function(e){e.ALIYUN="aliyun",e.S3="s3",e.MINIO="minio",e.QINIU="qiniu",e.RCX="rcx"}(x||(x={}));var Z=function(){function t(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})}return Object.defineProperty(t.prototype,"isAbort",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._isAbort}}),Object.defineProperty(t.prototype,"abort",{enumerable:!1,configurable:!0,writable:!0,value:function(){this._isAbort=!0,this._abortHandler()}}),Object.defineProperty(t.prototype,"upload",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return t.file.size>e.MAX_UPLOAD_FILE_SIZE?Promise.resolve({code:e.ErrorCode.UPLOAD_FAIL,msg:"the file size is over 5GB!"}):t.file.size>e.UPLOAD_FILE_CHUNK_SIZE&&this.multipartUpload?this.multipartUpload(t):this.commonUpload(t)}}),t}(),$=function(t){function r(){var e=null!==t&&t.apply(this,arguments)||this;return Object.defineProperty(e,"_promise",{enumerable:!0,configurable:!0,writable:!0,value:null}),e}return n(r,t),Object.defineProperty(r.prototype,"commonUpload",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return o(this,void 0,void 0,(function(){var n,r,o,s,a,u;return i(this,(function(i){switch(i.label){case 0:return n=t.file,r=t.onProgress,o=this._authInfo,s={},(a=new FormData).set("token",o.token),a.set("key",o.fileName),a.set("file",n),this._promise=e.httpRequest({url:e.fixUrlProtocol(this._url),headers:s,onProgress:function(e){return null==r?void 0:r(e.loaded,e.total)},method:"POST",body:a,timeout:0}),[4,this._promise.result()];case 1:return u=i.sent().status,this._promise=null,200===u||204===u?[2,{code:e.ErrorCode.SUCCESS,data:{uniqueName:o.fileName,uploadMethod:e.UploadMethod.QINIU}}]:[2,{code:e.ErrorCode.UPLOAD_FAIL,msg:u.toString()}]}}))}))}}),Object.defineProperty(r.prototype,"_abortHandler",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e;null===(e=this._promise)||void 0===e||e.abort()}}),r}(Z),ee=function(t){function r(){var e=null!==t&&t.apply(this,arguments)||this;return Object.defineProperty(e,"_promise",{enumerable:!0,configurable:!0,writable:!0,value:null}),e}return n(r,t),Object.defineProperty(r.prototype,"commonUpload",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return o(this,void 0,void 0,(function(){var n,r,o,s,a,u;return i(this,(function(i){switch(i.label){case 0:return n=t.file,r=t.onProgress,o=this._authInfo,s=e.fixUrlProtocol("".concat(o.ossBucketName,".").concat(this._url)),(a=new FormData).set("token",o.token),a.set("OSSAccessKeyId",o.osskeyId),a.set("policy",o.ossPolicy),a.set("Signature",o.ossSign),a.set("success_action_status","200"),a.set("key",o.fileName),a.set("file",n),this._promise=e.httpRequest({url:s,onProgress:function(e){return null==r?void 0:r(e.loaded,e.total)},method:"POST",body:a,timeout:0}),[4,this._promise.result()];case 1:return u=i.sent().status,this._promise=null,200===u||204===u?[2,{code:e.ErrorCode.SUCCESS,data:{uniqueName:o.fileName,uploadMethod:e.UploadMethod.ALI}}]:[2,{code:e.ErrorCode.UPLOAD_FAIL,msg:u.toString()}]}}))}))}}),Object.defineProperty(r.prototype,"_abortHandler",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e;null===(e=this._promise)||void 0===e||e.abort()}}),r}(Z);function te(e){return Math.ceil(e/1024)||0}var ne,re=function(t){function r(){var n=null!==t&&t.apply(this,arguments)||this;return Object.defineProperty(n,"_promise",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(n,"isSupportMultipart",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(n,"multipartUpload",{enumerable:!0,configurable:!0,writable:!0,value:function(t){return o(n,void 0,void 0,(function(){var n,r,o,s,a,u,d,c,_,l,E,f,R,A,T,v,I;return i(this,(function(i){switch(i.label){case 0:n=t.file,r=t.fileType,i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this._getFileToken(r,n.name,"POST","uploads",void 0,te(n.size))];case 2:return o=i.sent(),[3,4];case 3:return[2,{code:i.sent()}];case 4:return s=e.fixUrlProtocol("".concat(this._url,"/").concat(o.minioBucketName,"/").concat(o.fileName)),a=this.getBaseHeaders(n,o,t),this._promise=e.httpRequest({url:"".concat(s,"?uploads"),headers:a,method:"POST"}),[4,this._promise.result()];case 5:return u=i.sent(),d=u.status,c=u.data,this._promise=null,_=null===(I=null==c?void 0:c.match(/(?:<UploadId>)(\S*?)(?:<\/UploadId>)/))||void 0===I?void 0:I[1],200!==d&&204!==d||!_?[2,{code:e.ErrorCode.UPLOAD_FAIL,msg:"start upload fail"}]:(l=[],[4,this.requestUploadPart(s,n,_,o.fileName,t,l)]);case 6:if(E=i.sent(),f=E.code,R=E.msg,f!==e.ErrorCode.SUCCESS)return[2,{code:f,msg:R}];i.label=7;case 7:return i.trys.push([7,9,,10]),[4,this._getFileToken(r,o.fileName,"POST","uploadId=".concat(_),void 0,te(n.size))];case 8:return o=i.sent(),[3,10];case 9:return[2,{code:i.sent()}];case 10:return A=l.map((function(e,t){return"<Part><PartNumber>".concat(t+1,"</PartNumber><ETag>").concat(e,"</ETag></Part>")})).join(""),A="<CompleteMultipartUpload xmlns='http://s3.amazonaws.com/doc/2006-03-01/'>".concat(A,"</CompleteMultipartUpload>"),T=this.getBaseHeaders(n,o,t),this._promise=e.httpRequest({url:"".concat(s,"?uploadId=").concat(_),headers:T,method:"POST",body:A,timeout:0}),[4,this._promise.result()];case 11:return v=i.sent().status,this._promise=null,200===v||204===v?[2,{code:e.ErrorCode.SUCCESS,data:{uniqueName:o.fileName,uploadMethod:e.UploadMethod.MINIO}}]:[2,{code:e.ErrorCode.UPLOAD_FAIL,msg:"end upload fail"}]}}))}))}}),n}return n(r,t),Object.defineProperty(r.prototype,"commonUpload",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return o(this,void 0,void 0,(function(){var n,r,o,s,a,u;return i(this,(function(i){switch(i.label){case 0:return n=t.file,r=t.onProgress,o=this._authInfo,s=e.fixUrlProtocol("".concat(this._url,"/").concat(o.minioBucketName,"/").concat(o.fileName)),a=this.getBaseHeaders(n,o,t),this._promise=e.httpRequest({url:s,headers:a,onProgress:function(e){return null==r?void 0:r(e.loaded,e.total)},method:"PUT",body:n,timeout:0}),[4,this._promise.result()];case 1:return u=i.sent().status,this._promise=null,200===u||204===u?[2,{code:e.ErrorCode.SUCCESS,data:{uniqueName:o.fileName,uploadMethod:e.UploadMethod.MINIO}}]:[2,{code:e.ErrorCode.UPLOAD_FAIL,msg:u.toString()}]}}))}))}}),Object.defineProperty(r.prototype,"requestUploadPart",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,r,s,a,u,d,c){return void 0===d&&(d=1),void 0===c&&(c=0),o(this,void 0,void 0,(function(){var o,_,l,E,f,R,A,T,v;return i(this,(function(i){switch(i.label){case 0:if(c>=5)return[2,{code:e.ErrorCode.UPLOAD_FAIL,msg:"Upload retry times exceeded 5. Procedure"}];o=(d-1)*e.UPLOAD_FILE_CHUNK_SIZE,_=Math.min(e.UPLOAD_FILE_CHUNK_SIZE,n.size-o),l="partNumber=".concat(d,"&uploadId=").concat(r),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this._getFileToken(a.fileType,s,"PUT",l,void 0,te(n.size))];case 2:return E=i.sent(),[3,4];case 3:return[2,{code:i.sent()}];case 4:return f=n.slice(o,d*e.UPLOAD_FILE_CHUNK_SIZE),R=this.getBaseHeaders(n,E,a),this._promise=e.httpRequest({url:"".concat(t,"?").concat(l),headers:R,method:"PUT",body:f,timeout:0,onProgress:function(e){var t;return null===(t=null==a?void 0:a.onProgress)||void 0===t?void 0:t.call(a,o+e.loaded,n.size)}}),[4,this._promise.result()];case 5:return A=i.sent(),T=A.status,v=A.xhr,this._promise=null,200===T||204===T?(u.push((null==v?void 0:v.getResponseHeader("ETag"))||""),o+_<n.size?[2,this.requestUploadPart(t,n,r,s,a,u,d+1,0)]:[2,{code:e.ErrorCode.SUCCESS}]):[2,this.requestUploadPart(t,n,r,s,a,u,d,c+1)]}}))}))}}),Object.defineProperty(r.prototype,"getBaseHeaders",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n){var r=n.contentDisposition||("text/html"===e.type?"inline":"attachment");return{"Content-Disposition":"".concat(r,"; filename=").concat(encodeURIComponent(e.name),";"),Authorization:t.minioAuthorization,"x-amz-content-sha256":t.minioContentSha256,"x-amz-date":t.minioDate,"Content-Type":e.type||"text/plain"}}}),Object.defineProperty(r.prototype,"_abortHandler",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e;null===(e=this._promise)||void 0===e||e.abort()}}),r}(Z),oe=function(t){function r(){var n=null!==t&&t.apply(this,arguments)||this;return Object.defineProperty(n,"isSupportMultipart",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(n,"_promise",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(n,"multipartUpload",{enumerable:!0,configurable:!0,writable:!0,value:function(t){return o(n,void 0,void 0,(function(){var n,r,o,s;return i(this,(function(i){return n=t.file,r=t.onProgress,o=e.UUId.gen(),s=this._authInfo,[2,this._requestUploadPart(o,n,s.token,r)]}))}))}}),n}return n(r,t),Object.defineProperty(r.prototype,"commonUpload",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return o(this,void 0,void 0,(function(){var n,r,o,s,a,u,d,c,_,l;return i(this,(function(i){switch(i.label){case 0:return n=t.file,r=t.onProgress,o=this._authInfo,s={},(a=new FormData).set("token",o.token),a.set("key",o.fileName),a.set("file",n),u=e.fixUrlProtocol(this._url),this._promise=e.httpRequest({url:u,headers:s,onProgress:function(e){return null==r?void 0:r(e.loaded,e.total)},method:"POST",body:a,timeout:0}),[4,this._promise.result()];case 1:return d=i.sent(),c=d.status,_=d.data,this._promise=null,200!==c&&204!==c||!_?[2,{code:e.ErrorCode.UPLOAD_FAIL,msg:c.toString()}]:(l=JSON.parse(_),[2,{code:e.ErrorCode.SUCCESS,data:{uniqueName:l.rc_url.file_name,downloadUrl:"".concat(u,"/").concat(l.rc_url.path),uploadMethod:e.UploadMethod.QINIU}}])}}))}))}}),Object.defineProperty(r.prototype,"_requestUploadPart",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,r,s,a){return void 0===a&&(a=0),o(this,void 0,void 0,(function(){var o,u,d,c,_,l,E,f,R,A;return i(this,(function(i){switch(i.label){case 0:return o=Math.min(e.UPLOAD_FILE_CHUNK_SIZE,n.size-a),u=t+n.name.substring(n.name.lastIndexOf(".")),d={Range:"bytes=".concat(a,"-").concat(a+o),"X-File-TransactionId":u,"X-File-Total-Size":n.size.toString()},c=n.slice(a,a+o),(_=new FormData).set("file",c,n.name),_.set("key",u),_.set("name",u),_.set("token",r),l=e.fixUrlProtocol(this._url),this._promise=e.httpRequest({url:l,headers:d,onProgress:function(e){return null==s?void 0:s(a+e.loaded,n.size)},method:"POST",body:_,timeout:0}),[4,this._promise.result()];case 1:return E=i.sent(),f=E.status,R=E.data,this._promise=null,200===f||204===f?a+o<n.size?[2,this._requestUploadPart(t,n,r,s,a+o)]:(A=JSON.parse(R),[2,{code:e.ErrorCode.SUCCESS,data:{uniqueName:A.rc_url.file_name,downloadUrl:"".concat(l,"/").concat(A.rc_url.path),uploadMethod:e.UploadMethod.QINIU}}]):[2,{code:e.ErrorCode.UPLOAD_FAIL,msg:f.toString()}]}}))}))}}),Object.defineProperty(r.prototype,"_abortHandler",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e;null===(e=this._promise)||void 0===e||e.abort()}}),r}(Z),ie=function(t){function r(){var e=null!==t&&t.apply(this,arguments)||this;return Object.defineProperty(e,"_promise",{enumerable:!0,configurable:!0,writable:!0,value:null}),e}return n(r,t),Object.defineProperty(r.prototype,"commonUpload",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return o(this,void 0,void 0,(function(){var n,r,o,s,a,u,d,c,_;return i(this,(function(i){switch(i.label){case 0:return n=t.file,r=t.onProgress,o=t.contentDisposition,s=this._authInfo,a={},u=e.fixUrlProtocol("".concat(s.s3BucketName,".").concat(this._url)),d=new FormData,o?d.set("Content-Disposition",o):d.set("Content-Disposition","text/html"===n.type?"inline;":"attachment;"),d.set("Content-Type",n.type),d.set("x-amz-credential",s.s3Credential),d.set("x-amz-algorithm",s.s3Algorithm),d.set("x-amz-date",s.s3Date),d.set("policy",s.s3Policy),d.set("x-amz-signature",s.s3Signature),d.set("key",s.fileName),d.set("file",n),this._promise=e.httpRequest({url:u,headers:a,onProgress:function(e){return null==r?void 0:r(e.loaded,e.total)},method:"POST",body:d,timeout:0}),[4,this._promise.result()];case 1:return c=i.sent(),_=c.status,this._promise=null,200===_||204===_?[2,e.ok({uniqueName:s.fileName,uploadMethod:e.UploadMethod.AWS})]:[2,e.fail(e.ErrorCode.UPLOAD_FAIL,_.toString())]}}))}))}}),Object.defineProperty(r.prototype,"_abortHandler",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e;null===(e=this._promise)||void 0===e||e.abort()}}),r}(Z);var se=((ne={})[x.QINIU]=$,ne[x.ALIYUN]=ee,ne[x.S3]=ie,ne[x.MINIO]=re,ne[x.RCX]=oe,ne);function ae(t,n,o,i){var s=document.createElement("canvas"),a=s.getContext("2d"),u=new Image;u.onload=function(n){var d=i||{},c=d.maxHeight,_=void 0===c?160:c,l=d.maxWidth,E=void 0===l?160:l,f=d.quality,R=void 0===f?1:f,A=d.scale,T=void 0===A?1:A,v=de(u.width,u.height,{maxHeight:_,maxWidth:E,scale:T});s.width=Math.min(v.w,E),s.height=Math.min(v.h,_),a.drawImage(u,v.x,v.y,v.w,v.h);var I=ue(s,R);I=I.replace(/data:image\/[^;]+;base64,/,""),t({code:e.ErrorCode.SUCCESS,data:r(r({},o),{thumbnail:I,width:Math.ceil(v.w),height:Math.ceil(v.h)})})},u.onerror=function(n){t({code:e.ErrorCode.UPLOAD_FAIL,msg:"get image info fail:".concat(JSON.stringify(n))})},u.src=(window.URL||window.webkitURL).createObjectURL(n)}function ue(t,n){var r=t.toDataURL("image/jpeg",n);return r.length>e.MAX_MESSAGE_CONTENT_BYTES-10240?ue(t,n-.1):r}var de=function(e,t,n){var r,o,i=n.maxHeight,s=void 0===i?160:i,a=n.maxWidth,u=void 0===a?160:a,d=n.scale,c=e<t,_=0,l=0;return(c?t/e:e/t)>(void 0===d?1:d)?(c?(r=160,(o=t/(e/160))>s&&(l=(o-s)/2)):(o=160,(r=e/(t/160))>u&&(_=(r-u)/2)),{w:r,h:o,x:-_,y:-l}):(c?(o=s,r=e/(t/s)):(r=u,o=t/(e/u)),{w:r,h:o,x:-_,y:-l})},ce=0,_e=function(){function t(e,t){Object.defineProperty(this,"_promise",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_resolve",{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:++ce}),this._promise=this._handleUpload(e,t)}return Object.defineProperty(t.prototype,"abort",{enumerable:!1,configurable:!0,writable:!0,value:function(){var t;this._resolve({code:e.ErrorCode.UPLOAD_FAIL,msg:"upload abort"}),null===(t=this._client)||void 0===t||t.abort()}}),Object.defineProperty(t.prototype,"_uploadInLoop",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,r,s,a){return void 0===a&&(a=[]),o(this,void 0,void 0,(function(){var o,u,d,c,_,l,E;return i(this,(function(i){switch(i.label){case 0:o=0,i.label=1;case 1:return o<t.length?(u=t[o],(d=se[u.type])?(this._client=new d(u.url,r,s),[4,this._client.upload(n)]):(a.push({type:u.type,url:u.url,code:e.ErrorCode.UPLOAD_FAIL,msg:"Upload type not supported"}),[3,3])):[3,4];case 2:if(c=i.sent(),_=c.code,l=c.data,E=c.msg,_===e.ErrorCode.SUCCESS)return[2,{code:_,data:l}];if(_===e.ErrorCode.RC_FILE_SIZE_EXCEED_LIMIT)return[2,{code:_,msg:"File size exceeds the limit"}];if(_===e.ErrorCode.INVALID_PARAMETER_SIZE_NOT_FOUND)return[2,{code:_,msg:"File size not found"}];if(this._client.isAbort())return this._client=null,[2,{code:_,data:l,msg:E}];this._client=null,a.push({type:u.type,url:u.url,code:_,msg:E}),i.label=3;case 3:return o++,[3,1];case 4:return[2,{code:e.ErrorCode.UPLOAD_FAIL,msg:"Failed to upload all channels, msg: ".concat(JSON.stringify(a))}]}}))}))}}),Object.defineProperty(t.prototype,"_handleUpload",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){return o(this,void 0,void 0,(function(){var s=this;return i(this,(function(a){return[2,new Promise((function(a){return o(s,void 0,void 0,(function(){var o,s,u,d,c,_,l,E,f,R,A,T,v,I,p,S,g,m;return i(this,(function(i){switch(i.label){case 0:return this._resolve=a,o=n.getFileToken,s=n.customDomain,u=n.uploadServer,d=n.ossConfig,c=t.file,_=t.fileType,l=t.thumbnailConfig,[4,o(_,c.name,void 0,void 0,void 0,te(c.size))];case 1:return E=i.sent(),f=function(e,t,n){if(t)return[{type:x.RCX,url:t,p:"1"}];if(e)return JSON.parse(e).map((function(e){var t={type:x.QINIU,url:"",p:""};return Object.keys(e).forEach((function(n){"p"===n?t.p=e[n]:(t.type=n,t.url=e[n])})),t})).sort((function(e,t){return e.p-t.p}));var r=[];return n&&r.push({type:x.QINIU,url:n,p:"1"}),r}(E.ossConfig||d,s,u),0===f.length?(a({code:e.ErrorCode.INVALID_PARAMETER_MEDIA_URL,msg:"uploadUrlList is empty"}),[2]):[4,this._uploadInLoop(f,t,E,o)];case 2:return R=i.sent(),A=R.code,T=R.data,v=R.msg,A===e.ErrorCode.SUCCESS&&T?(I=T.downloadUrl,p=T.uploadMethod,I?[3,4]:[4,n.getFileUrl(_,T.uniqueName,p,c.name)]):(a({code:A,msg:v}),[2]);case 3:if(!(S=i.sent()).isOk)return a({code:S.code,msg:"Get download url fail"}),[2];I=S.data.downloadUrl,i.label=4;case 4:return I?(g={downloadUrl:I,uniqueName:(null==T?void 0:T.uniqueName)||"",name:c.name,size:c.size,type:c.type},_!==e.FileType.AUDIO?[3,6]:[4,c.arrayBuffer()]):(a({code:e.ErrorCode.UPLOAD_FAIL,msg:"Get download url fail"}),[2]);case 5:return m=i.sent(),function(t,n,o){new AudioContext({sampleRate:16e3}).decodeAudioData(n,(function(n){var i,s;t({code:e.ErrorCode.SUCCESS,data:r(r({},o),{duration:n.duration,length:n.length,sampleRate:null!==(i=n.sampleRate)&&void 0!==i?i:void 0,numberOfChannels:null!==(s=n.numberOfChannels)&&void 0!==s?s:void 0})})}),(function(n){t({code:e.ErrorCode.UPLOAD_FAIL,msg:"get audio info fail:".concat(JSON.stringify(n))})}))}(a,m,g),[2];case 6:return _===e.FileType.IMAGE?(ae(a,c,g,l),[2]):(a({code:A,data:g}),[2])}}))}))}))]}))}))}}),Object.defineProperty(t.prototype,"awaitResult",{enumerable:!1,configurable:!0,writable:!0,value:function(){return o(this,void 0,void 0,(function(){return i(this,(function(e){return[2,this._promise]}))}))}}),t}(),le={};function Ee(e,t){var n=new _e(e,t);return function(e){o(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return le[e.id]=e,[4,e.awaitResult()];case 1:return t.sent(),delete le[e.id],[2]}}))}))}(n),n}function fe(e){var t=le[e];return!!t&&(t.abort(),!0)}var Re=function(e,t){var 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 Ae(t){return o(this,void 0,void 0,(function(){var n,r,s;return i(this,(function(a){return n=t.contentDisposition,r=t.fileType,s=t.file,[2,new e.ValidatorManage("","").validate("contentDisposition",n,(function(e){return"inline"===e||"attachment"===e}),!1).validate("fileType",r,(function(t){return!!e.FileType[t]}),!0).validate("file",s,(function(t){return t instanceof File&&(!(r===e.FileType.IMAGE&&!t.type.match(/^image\//))&&!(r===e.FileType.AUDIO&&!t.type.match(/^audio\//)))}),!0).ifReady((function(e,n,r){return function(e,t){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,new _e(e,t).awaitResult()]}))}))}(t,Re(e,r.uploadDomain))}))]}))}))}var Te=Ke,ve=y("sendMessage",(function(t,n,s){return o(void 0,void 0,void 0,(function(){return i(this,(function(a){return[2,new e.ValidatorManage(e.LogTagId.A_SEND_MSG_T,e.LogTagId.A_SEND_MSG_R).validate("message",n,(function(){return n instanceof D}),!0).validate("message",n,(function(){if(!e.isObject(n.content))return!1;if(!(null==s?void 0:s.isMentioned))return!0;var t=n.content.mentionedInfo||{type:null==s?void 0:s.mentionedType,userIdList:null==s?void 0:s.mentionedUserIdList};if(!e.isObject(t))return!1;var r=t.type,o=t.userIdList,i=void 0===o?[]:o,a=t.mentionedContent;return!![e.MentionedType.ALL,e.MentionedType.SINGAL].includes(r)&&(("string"==typeof a||void 0===a)&&(e.isArray(i)&&i.every((function(t){return e.isValidTargetId(t)}))))}),!0).validate("conversation",t,e.AssertRules.OBJECT,!0).validate("conversationType",null==t?void 0:t.conversationType,e.AssertRules.CONVERSATION_TYPE,!0).validate("targetId",null==t?void 0:t.targetId,e.isValidTargetId,!0).validate("channelId",null==t?void 0:t.channelId,e.AssertRules.CHANNEL_ID).validate("isStatusMessage",null==s?void 0:s.isStatusMessage,e.AssertRules.BOOLEAN).validate("disableNotification",null==s?void 0:s.disableNotification,e.AssertRules.BOOLEAN).validate("pushContent",null==s?void 0:s.pushContent,e.AssertRules.STRING).validate("pushData",null==s?void 0:s.pushData,e.AssertRules.STRING).validate("isMentioned",null==s?void 0:s.isMentioned,e.AssertRules.BOOLEAN).validate("mentionedType",null==s?void 0:s.mentionedType,e.AssertRules.NUMBER).validate("mentionedUserIdList",null==s?void 0:s.mentionedUserIdList,e.isLimitedArray({itemValidator:e.isValidTargetId})).validate("directionalUserIdList",null==s?void 0:s.directionalUserIdList,e.isLimitedArray({maxLength:300,itemValidator:e.isValidTargetId})).validate("isVoipPush",null==s?void 0:s.isVoipPush,e.AssertRules.BOOLEAN).validate("canIncludeExpansion",null==s?void 0:s.canIncludeExpansion,e.AssertRules.BOOLEAN).validate("expansion",null==s?void 0:s.expansion,e.AssertRules.OBJECT).validate("pushConfig",null==s?void 0:s.pushConfig,e.AssertRules.OBJECT).validate("messageId",null==s?void 0:s.messageId,e.AssertRules.NUMBER).validate("disableUpdateLastMessage",null==s?void 0:s.disableUpdateLastMessage,e.AssertRules.BOOLEAN).ifReady((function(a,d){return o(void 0,void 0,void 0,(function(){var o,c,_,l,E,f,R,A,T,v,I,p,S,g,m,h,C,P,N,U,M,y;return i(this,(function(i){switch(i.label){case 0:return c=(o=s||{}).disableNotification,_=o.isMentioned,l=o.directionalUserIdList,E=o.canIncludeExpansion,f=o.onSendBefore,R=o.expansion,A=o.pushConfig,T=o.isStatusMessage,v=o.disableUpdateLastMessage,I=d.createTraceId(),p=t.conversationType,S=t.targetId,g=t.channelId,l&&l.length>0&&![3,7,8,10].includes(p)?[2,{code:e.ErrorCode.RC_DIRECTIONAL_MESSAGE_INVALID_CONVERSATION_TYPE}]:v&&p===e.ConversationType.ULTRA_GROUP?[2,{code:e.ErrorCode.INVALID_DISABLE_UPDATE_LAST_MESSAGE}]:(m=function(e,t,n){var o=e.isStatusMessage,i=e.disableNotification,s=e.pushContent,a=e.pushData,u=e.isMentioned,d=e.mentionedType,c=e.mentionedUserIdList,_=e.directionalUserIdList,l=e.isVoipPush,E=e.canIncludeExpansion,f=e.expansion,R=e.isFilerWhiteBlacklist,A=e.pushConfig,T=e.messageId,v=e.disableUpdateLastMessage,I=e.needReceipt,p=n.channelId;return r({isStatusMessage:o,disableNotification:i,pushContent:s,pushData:a,isMentioned:u,mentionedType:d,mentionedUserIdList:c,directionalUserIdList:_,isVoipPush:l,canIncludeExpansion:E,expansion:f,isFilerWhiteBlacklist:R,pushConfig:A,channelId:p||"",messageId:T,disableUpdateLastMessage:v,needReceipt:I},t)}(s||{},n,t),h={isMentioned:!!_,content:n.content,messageType:n.messageType,isPersited:!!n.isPersited,isCounted:!!n.isCounted,disableNotification:!!c,canIncludeExpansion:!!E,expansion:R||null,conversationType:t.conversationType,targetId:t.targetId,channelId:t.channelId,senderUserId:a.getCurrentUserId(),messageUId:"",messageDirection:e.MessageDirection.SEND,receivedTime:0,isStatusMessage:!!T,receivedStatus:e.ReceivedStatus.UNREAD,isOffLineMessage:!1,pushConfig:A,sentStatus:e.SentStatus.SENDING,sentTime:0,directedUserIds:l||[],disableUpdateLastMessage:v},p!==e.ConversationType.ULTRA_GROUP&&(h.isOffLineMessage=!1),C=function(t){h.messageId=t;try{f&&f(u(h))}catch(t){d.error(e.LogTagId.A_SEND_MSG_T,'Callback method "onSendBefore" execution error.\n'.concat(null==t?void 0:t.stack),I)}},d.info(e.LogTagId.A_SEND_MSG_T,JSON.stringify({messageType:n.messageType,conversationType:p,targetId:S,channelId:g}),I),[4,a.sendMessage(p,S,m,I,C)]);case 1:return P=i.sent(),N=P.code,U=P.data,M=P.msg,N===e.ErrorCode.SUCCESS?(d.info(e.LogTagId.A_SEND_MSG_R,JSON.stringify({code:N,messageUId:U.messageUId,messageId:U.messageId}),I),y=u(U),[2,{code:N,data:y}]):(d.warn(e.LogTagId.A_SEND_MSG_R,JSON.stringify({code:N}),I),h.sentTime=(null==U?void 0:U.sentTime)||0,h.sentStatus=null==U?void 0:U.sentStatus,[2,{code:N,msg:M||O[N],data:u(h)}])}}))}))}))]}))}))}));function Ie(t,n){return function(o,i,s,a){var u;if(!e.validate("sendOptions.contentDisposition",null==a?void 0:a.contentDisposition,(function(e){return["inline","attachment"].includes(e)})))return Promise.resolve({code:e.ErrorCode.INVALID_PARAMETER_SENDOPTIONS});var d={contentDisposition:null==a?void 0:a.contentDisposition};if(a&&"thumbnailConfig"in a){var c=null===(u=a)||void 0===u?void 0:u.thumbnailConfig;if(!(e.validate("sendOptions.maxHeight",null==c?void 0:c.maxHeight,e.AssertRules.NUMBER)&&e.validate("sendOptions.maxWidth",null==c?void 0:c.maxWidth,e.AssertRules.NUMBER)&&e.validate("sendOptions.quality",null==c?void 0:c.quality,e.AssertRules.NUMBER)&&e.validate("sendOptions.scale",null==c?void 0:c.scale,e.AssertRules.NUMBER)))return Promise.resolve({code:e.ErrorCode.INVALID_PARAMETER_SENDOPTIONS});d.thumbnailConfig=c}return m((function(u,c,_){return new Promise((function(u){var _=c.createTraceId();c.info(e.LogTagId.L_MEDIA_UPLOAD_T,JSON.stringify({filesize:i.file.size,type:t}),_),Ae({file:i.file,fileType:t,onProgress:function(e,t){var n;null===(n=null==s?void 0:s.onProgress)||void 0===n||n.call(s,Math.floor(e/t*100))},contentDisposition:d.contentDisposition,thumbnailConfig:d.thumbnailConfig}).then((function(t){var d,l=t.code,E=t.data,f=t.msg;if(l===e.ErrorCode.SUCCESS&&E){var R=(null===(d=null==s?void 0:s.onComplete)||void 0===d?void 0:d.call(s,r({url:E.downloadUrl},E)))||n(E,i);return c.info(e.LogTagId.L_MEDIA_UPLOAD_R,JSON.stringify({downurl:E.downloadUrl,code:e.ErrorCode.SUCCESS}),_),void ve(o,R,a).then(u)}u({code:l,msg:f})}))}))}))}}var pe=Ie(e.FileType.FILE,(function(e,t){var n,r,o={name:e.name,size:t.file.size,type:(n=e.name,r=n.match(/\.(\w+)$/),r?r[1]:"bin"),fileUrl:e.downloadUrl};return t.user&&(o.user=t.user),t.extra&&(o.extra=t.extra),t.mentionedInfo&&(o.mentionedInfo=t.mentionedInfo),new B(o)})),Se=Ie(e.FileType.IMAGE,(function(e,t){var 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 J(n)})),ge=Ie(e.FileType.IMAGE,(function(e,t){var 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 H(n)})),me=Ie(e.FileType.AUDIO,(function(e,t){var n,r={remoteUrl:e.downloadUrl,duration:Math.floor(null!==(n=e.duration)&&void 0!==n?n:0),sampleRate:e.sampleRate,numberOfChannels:e.numberOfChannels};return t.user&&(r.user=t.user),t.extra&&(r.extra=t.extra),t.mentionedInfo&&(r.mentionedInfo=t.mentionedInfo),t.audit&&(r.audit=t.audit),new X(r)})),he=Ie(e.FileType.SIGHT,(function(e,t){var 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 Q(n)}));Ie(e.FileType.COMBINE_HTML,(function(e,t){var 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 V(n)}));var Ce=y("recallMessage",(function(e,t){return o(void 0,void 0,void 0,(function(){return i(this,(function(n){return[2,h().next((function(n){return o(void 0,void 0,void 0,(function(){return i(this,(function(r){switch(r.label){case 0:return[4,n.recallMessage(e,t)];case 1:return[2,r.sent().trans((function(e){return u(e)}))]}}))}))}))]}))}))}));function Oe(e,t){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,h().next((function(n){return n.updateMessageExpansion(e,t)}))]}))}))}function Pe(e,t){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,h().next((function(n){return n.removeMessageExpansion(e,t)}))]}))}))}function Ne(e){return h().next((function(t){return t.modifyMessageWithParams(e)}))}function Ue(e){return o(this,void 0,void 0,(function(){var t=this;return i(this,(function(n){switch(n.label){case 0:return[4,h().next((function(n){return o(t,void 0,void 0,(function(){return i(this,(function(t){return[2,n.getAllConversationList(e)]}))}))}))];case 1:return[2,n.sent().trans((function(e){return e.map(d)}))]}}))}))}var Me=y("removeConversation",(function(e,t){return o(void 0,void 0,void 0,(function(){return i(this,(function(n){return[2,h().next((function(n){return n.removeConversation(e,t)}))]}))}))}));function ye(e){return o(this,void 0,void 0,(function(){return i(this,(function(t){return[2,h().next((function(t){return t.batchDeleteConversations(e)}))]}))}))}function Le(e,t){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,h().next((function(n){return n.getTotalUnreadCountByLevels(e,t)}))]}))}))}function Ge(e,t){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,h().next((function(n){return n.getTotalUnreadCountByLevels(e,t,!0)}))]}))}))}var De=y("clearMessagesUnreadStatus",(function(e){return o(void 0,void 0,void 0,(function(){return i(this,(function(t){return[2,h().next((function(t){return t.clearUnreadCount(e)}))]}))}))}));var be=y("setConversationNotificationLevel",(function(e,t){return o(void 0,void 0,void 0,(function(){return i(this,(function(n){return[2,h().next((function(n){return n.batchSetConversationNotificationLevel([e],t)}))]}))}))}));var xe=y("setConversationToTop",(function(e,t,n,r){return void 0===t&&(t=!0),void 0===n&&(n=!0),void 0===r&&(r=!1),o(void 0,void 0,void 0,(function(){return i(this,(function(o){return[2,h().next((function(o){return o.batchSetConversationToTop([e],!!t,n,r)}))]}))}))}));function Ve(e,t,n,r){return o(this,void 0,void 0,(function(){var s=this;return i(this,(function(a){return[2,h().next((function(a){return o(s,void 0,void 0,(function(){return i(this,(function(o){switch(o.label){case 0:return[4,a.searchConversationByContent(e,t,n,r)];case 1:return[2,o.sent().trans((function(e){return e.map((function(e){return d(e)}))}))]}}))}))}))]}))}))}function Fe(e,t){return o(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,h().next((function(n){return n.searchMessages(e,t)}))];case 1:return[2,n.sent().trans((function(e){var t=e.totalMatched,n=e.messages;return e.conditionsMatched,{count:t,messages:n.map((function(e){return u(e)}))}}))]}}))}))}function we(t,n,r,s,a){return o(this,void 0,void 0,(function(){return i(this,(function(o){return c("RongIMLib.electronExtension.searchMessages","RongIMLib.electronExtension.searchMessagesWithParams"),[2,Fe(t,{keyword:n,limit:s||e.MAX_U32_INTEGER,order:0,timeRange:{endTime:r?r-1:r||0},messageFilter:{objectNames:a}})]}))}))}function Be(t,n){return o(this,void 0,void 0,(function(){var r=this;return i(this,(function(s){return console.warn("`setMessageReceivedStatus` has being deprecated, use `setMessageReceivedStatusInfo` instead."),e.usingCppEngine()?[2,new e.ValidatorManage(f.A_E_SET_MESSAGE_RECEIVED_STATUS_T,f.A_E_SET_MESSAGE_RECEIVED_STATUS_R).validate("messageId",t,e.AssertRules.NUMBER,!0).validate("receivedStatus",n,(function(t){return!e.isUndefined(e.ReceivedStatus[t])}),!0).ifReady((function(e,s){return o(r,void 0,void 0,(function(){var r,o;return i(this,(function(i){switch(i.label){case 0:return r=s.createTraceId(),s.info(f.A_E_SET_MESSAGE_RECEIVED_STATUS_T,JSON.stringify({messageId:t,receivedStatus:n}),r),[4,e.setMessageReceivedStatus(t,n)];case 1:return o=i.sent(),s.info(f.A_E_SET_MESSAGE_RECEIVED_STATUS_R,JSON.stringify({code:o}),r),[2,{code:o}]}}))}))}))]:[2,{code:e.ErrorCode.NOT_SUPPORT,msg:O[e.ErrorCode.NOT_SUPPORT]}]}))}))}function He(e){return o(this,void 0,void 0,(function(){return i(this,(function(t){return[2,h().next((function(t){return t.clearLocalMessages(e)}))]}))}))}function ke(e,t,n){return o(this,void 0,void 0,(function(){return i(this,(function(r){return[2,h().next((function(r){return r.deleteLocalMessagesByTimestamp(e,t,n)}))]}))}))}function Je(e,t,n){return void 0===n&&(n={}),o(this,void 0,void 0,(function(){return i(this,(function(r){return t instanceof D?[2,je(e,t,n)]:[2,Ye(e,t,n)]}))}))}function Ye(t,n,r){return void 0===r&&(r={}),o(this,void 0,void 0,(function(){var o,s,a,d;return i(this,(function(i){switch(i.label){case 0:return o=!!(null==r?void 0:r.isUnread),s=null==r?void 0:r.searchContent,a=null==r?void 0:r.disableUpdateLastMessage,d={senderUserId:null==n?void 0:n.senderUserId,messageType:null==n?void 0:n.messageType,content:null==n?void 0:n.content,messageDirection:null==n?void 0:n.messageDirection,readStatus:"object"==typeof(null==n?void 0:n.receivedStatusInfo)?e.transformReceivedStatusFlag(n.receivedStatusInfo):null==n?void 0:n.receivedStatus,sentTime:null==n?void 0:n.sentTime,sentStatus:null==n?void 0:n.sentStatus,searchContent:s,messageUId:"",isUnread:o,disableNotification:null==n?void 0:n.disableNotification,canIncludeExpansion:null==n?void 0:n.canIncludeExpansion,expansion:(null==n?void 0:n.expansion)||void 0,directedUserIds:null==n?void 0:n.directedUserIds,disableUpdateLastMessage:(null==n?void 0:n.disableUpdateLastMessage)||a},[4,h().next((function(e){return e.insertMessage(t,d)}))];case 1:return[2,i.sent().trans(u)]}}))}))}function je(t,n,r){return void 0===r&&(r={}),o(this,void 0,void 0,(function(){var o,s,a,d;return i(this,(function(i){switch(i.label){case 0:return o=!!(null==r?void 0:r.isUnread),s=null==r?void 0:r.searchContent,a=null==r?void 0:r.disableUpdateLastMessage,d={senderUserId:"",messageType:null==n?void 0:n.messageType,content:null==n?void 0:n.content,searchContent:s,messageDirection:e.MessageDirection.SEND,isUnread:o,messageUId:"",disableUpdateLastMessage:a},[4,h().next((function(e){return e.insertMessage(t,d)}))];case 1:return[2,i.sent().trans(u)]}}))}))}function Ke(e){return o(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,h().next((function(t){return t.getLocalMessage(e)}))];case 1:return[2,t.sent().trans((function(e){return u(e)}))]}}))}))}var We=Object.freeze({__proto__:null,getAllConversationList:function(e){return o(this,void 0,void 0,(function(){return i(this,(function(t){return c("electronExtension.getAllConversationList","getAllConversationList"),[2,Ue(e)]}))}))},getConversationList:function(e,t,n,r){return o(this,void 0,void 0,(function(){var s=this;return i(this,(function(a){switch(a.label){case 0:return c("electronExtension.getConversationList","getAllConversationList or getConversationListByTimestamp"),[4,h().next((function(a){return o(s,void 0,void 0,(function(){return i(this,(function(o){return[2,a.getConversationList({startTime:e,count:t,channelId:n,topPriority:r})]}))}))}))];case 1:return[2,a.sent().trans((function(e){return e.map((function(e){return d(e)}))}))]}}))}))},searchConversationByContent:Ve,getConversations:function(e){return o(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,h().next((function(t){return t.getConversations(e)}))];case 1:return[2,t.sent().trans((function(e){return e.map(d)}))]}}))}))},getUntaggedConversationListByPage:function(e,t,n){return o(this,void 0,void 0,(function(){var r=this;return i(this,(function(s){return[2,h().next((function(s){return o(r,void 0,void 0,(function(){return i(this,(function(r){switch(r.label){case 0:return[4,s.getUntaggedConversationListByPage(e,t,n)];case 1:return[2,r.sent().trans((function(e){return e.map((function(e){return d(e)}))}))]}}))}))}))]}))}))},getRemoteConversations:function(){return o(this,void 0,void 0,(function(){return i(this,(function(e){return[2,h().next((function(e){return e.syncRemoteConversations()}))]}))}))},saveEditedMessageDraft:function(e,t){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,h().next((function(n){return n.chat.saveEditedMessageDraft(e,t)}))]}))}))},getEditedMessageDraft:function(e){return o(this,void 0,void 0,(function(){return i(this,(function(t){return[2,h().next((function(t){return t.chat.getEditedMessageDraft(e)}))]}))}))},clearEditedMessageDraft:function(e){return o(this,void 0,void 0,(function(){return i(this,(function(t){return[2,h().next((function(t){return t.chat.clearEditedMessageDraft(e)}))]}))}))},searchMessages:we,searchMessageInTimeRange:function(e,t){return o(this,void 0,void 0,(function(){return i(this,(function(n){return c("RongIMLib.electronExtension.searchMessageInTimeRange","RongIMLib.electronExtension.searchMessagesWithParams"),[2,Fe(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,r){return o(this,void 0,void 0,(function(){return i(this,(function(o){switch(o.label){case 0:return c("RongIMLib.electronExtension.searchMessagesByUser","RongIMLib.electronExtension.searchMessagesWithParams"),[4,Fe(e,{limit:r,keyword:"",order:0,timeRange:{endTime:n?n-1:n||0},messageFilter:{senderIds:[t]}})];case 1:return[2,o.sent().trans((function(e){return{messages:e.messages}}))]}}))}))},getHistoryMessagesByMessageTypes:function(e,t){return o(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,h().next((function(n){return n.getHistoryMessagesByObjectNames(e,t)}))];case 1:return[2,n.sent().trans((function(e){var t=e.list,n=e.hasMore,r=t.map(u);return{messages:r,hasMore:n,list:r}}))]}}))}))},getContinuousMessages:function(e,t){return o(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,h().next((function(n){return n.getContinuousMessages(e,t)}))];case 1:return[2,n.sent().trans((function(e){var t=e.list,n=e.hasMore,r=e.timestamp;return{hasMore:n,list:t.map(u),timestamp:r}}))]}}))}))},setMessageStatusToRead:function(e,t){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,h().next((function(n){return n.setMessageStatusToRead(e,t)}))]}))}))},setMessageReceivedStatus:Be,setMessageReceivedStatusInfo:function(t,n){return o(this,void 0,void 0,(function(){var r=this;return i(this,(function(s){return e.usingCppEngine()?[2,new e.ValidatorManage(f.A_E_SET_MESSAGE_SENT_STATUS_INFO_T,f.A_E_SET_MESSAGE_SENT_STATUS_INFO_R).validate("messageId",t,e.AssertRules.NUMBER,!0).validate("receivedStatusInfo",n,e.AssertRules.OBJECT,!0).validate("receivedStatusInfo",null==n?void 0:n.isRead,e.AssertRules.BOOLEAN).validate("receivedStatusInfo",null==n?void 0:n.isListened,e.AssertRules.BOOLEAN).validate("receivedStatusInfo",null==n?void 0:n.isDownload,e.AssertRules.BOOLEAN).validate("receivedStatusInfo",null==n?void 0:n.isRetrieved,e.AssertRules.BOOLEAN).ifReady((function(s,a){return o(r,void 0,void 0,(function(){var r,o,u;return i(this,(function(i){switch(i.label){case 0:return r=e.transformReceivedStatusFlag(n),o=a.createTraceId(),a.info(f.A_E_SET_MESSAGE_SENT_STATUS_INFO_T,JSON.stringify({messageId:t,sentStatus:r}),o),[4,s.setMessageReceivedStatus(t,r)];case 1:return u=i.sent(),a.info(f.A_E_SET_MESSAGE_SENT_STATUS_INFO_R,JSON.stringify({code:u}),o),[2,{code:u}]}}))}))}))]:[2,{code:e.ErrorCode.NOT_SUPPORT,msg:O[e.ErrorCode.NOT_SUPPORT]}]}))}))},setMessageSentStatus:function(t,n){return o(this,void 0,void 0,(function(){var r=this;return i(this,(function(s){return e.usingCppEngine()?[2,new e.ValidatorManage(f.A_E_SET_MESSAGE_SENT_STATUS_T,f.A_E_SET_MESSAGE_SENT_STATUS_T).validate("messageId",t,e.AssertRules.NUMBER,!0).validate("sentStatus",n,(function(t){return e.isNumber(t)&&!e.isUndefined(e.SentStatus[t])}),!0).ifReady((function(e,s){return o(r,void 0,void 0,(function(){var r,o;return i(this,(function(i){switch(i.label){case 0:return r=s.createTraceId(),s.info(f.A_E_SET_MESSAGE_SENT_STATUS_T,JSON.stringify({messageId:t,sentStatus:n}),r),[4,e.setMessageSentStatus(t,n)];case 1:return o=i.sent(),s.info(f.A_E_SET_MESSAGE_SENT_STATUS_R,JSON.stringify({code:o}),r),[2,{code:o}]}}))}))}))]:[2,{code:e.ErrorCode.NOT_SUPPORT,msg:O[e.ErrorCode.NOT_SUPPORT]}]}))}))},setMessageContent:function(e,t,n){return o(this,void 0,void 0,(function(){return i(this,(function(r){return[2,h().next((function(r){return r.setMessageContent(e,t,n)}))]}))}))},deleteMessages:function(e){return o(this,void 0,void 0,(function(){return i(this,(function(t){return[2,h().next((function(t){return t.deleteLocalMessages(e)}))]}))}))},clearMessages:He,deleteMessagesByTimestamp:ke,batchClearMessagesByTimestamp:function(e){return o(this,void 0,void 0,(function(){return i(this,(function(t){return[2,h().next((function(t){return t.batchClearLocalMessagesByTimestamp(e)}))]}))}))},insertMessage:Je,batchInsertMessage:function(e,t){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,h().next((function(n){return n.batchInsertMessage(e,t)}))]}))}))},getMessageCount:function(e){return o(this,void 0,void 0,(function(){return i(this,(function(t){return[2,h().next((function(t){return t.getLocalMessageCount(e)}))]}))}))},setCheckDuplicateMessage:function(t){return o(this,void 0,void 0,(function(){var n=this;return i(this,(function(r){return e.usingCppEngine()?[2,new e.ValidatorManage(f.A_E_SET_CHECK_DUPLICATE_MESSAGE_T,f.A_E_SET_CHECK_DUPLICATE_MESSAGE_R).validate("checkDuplicate",t,e.AssertRules.BOOLEAN).ifReady((function(e,r){return o(n,void 0,void 0,(function(){var n,o,s,a;return i(this,(function(i){switch(i.label){case 0:return n=r.createTraceId(),r.info(f.A_E_SET_CHECK_DUPLICATE_MESSAGE_T,JSON.stringify({checkDuplicate:t}),n),[4,e.setCheckDuplicateMessage(!!t)];case 1:return o=i.sent(),s=o.code,a=o.data,r.info(f.A_E_SET_CHECK_DUPLICATE_MESSAGE_R,JSON.stringify({code:s,data:a}),n),[2,{code:s}]}}))}))}))]:[2,{code:e.ErrorCode.NOT_SUPPORT,msg:O[e.ErrorCode.NOT_SUPPORT]}]}))}))},setCheckChatRoomDuplicateMessage:function(e){return o(this,void 0,void 0,(function(){return i(this,(function(t){return[2,h().next((function(t){return t.chatroom.setCheckChatRoomDuplicateMessage(!!e)}))]}))}))},getMessagesAroundTimestamp:function(e,t){return o(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,h().next((function(n){var r=null==t?void 0:t.timestamp,o=null==t?void 0:t.beforeCount,i=null==t?void 0:t.afterCount;return n.getMessagesAroundTimestamp(e,r,o,i)}))];case 1:return[2,n.sent().trans((function(e){return e.map(u)}))]}}))}))},getLocalMessage:Ke,searchMessagesWithParams:function(e){return o(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,h().next((function(t){return t.searchMessagesWithParams(e)}))];case 1:return[2,t.sent().trans((function(e){e.totalMatched;var t=e.messages;return{count:e.conditionsMatched,messages:t.map((function(e){return u(e)}))}}))]}}))}))},setMessageSpeechToTextVisible:function(e,t){return h().next((function(n){return n.setMessageSpeechToTextVisible(e,t)}))},deleteUltraGroupMessagesForAllChannel:function(e,t){return h().next((function(n){return n.deleteLocalUGMessagesForAllChannel(e,t)}))},getUnreadMentionedMessages:function(e){return o(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,h().next((function(t){return t.getUnreadMentionedMessages(e)}))];case 1:return[2,t.sent().trans((function(e){return e.map(u)}))]}}))}))},clearLocalData:function(){return o(this,void 0,void 0,(function(){return i(this,(function(e){return[2,h().next((function(e){return e.clearLocalData()}))]}))}))},enable:function(){return e.usingCppEngine()}});var Qe=function(e){var t=e.count,n=e.pageToken,r=void 0===n?"":n,o=e.order;return{count:t,pageToken:r,order:void 0!==o&&o}};Object.defineProperty(exports,"AreaCode",{enumerable:!0,get:function(){return e.AreaCode}}),Object.defineProperty(exports,"ChatroomEntryType",{enumerable:!0,get:function(){return e.ChatroomEntryType}}),Object.defineProperty(exports,"ChatroomSyncStatusReason",{enumerable:!0,get:function(){return e.ChatroomSyncStatusReason}}),Object.defineProperty(exports,"ChatroomUserChangeType",{enumerable:!0,get:function(){return e.ChatroomUserChangeType}}),Object.defineProperty(exports,"ChrmMemBanType",{enumerable:!0,get:function(){return e.ChrmMemBanType}}),Object.defineProperty(exports,"ChrmMemOperateType",{enumerable:!0,get:function(){return e.ChrmMemOperateType}}),Object.defineProperty(exports,"ChrmSyncStatus",{enumerable:!0,get:function(){return e.ChrmSyncStatus}}),Object.defineProperty(exports,"ConnectionStatus",{enumerable:!0,get:function(){return e.ConnectionStatus}}),Object.defineProperty(exports,"ConversationType",{enumerable:!0,get:function(){return e.ConversationType}}),Object.defineProperty(exports,"DirectionType",{enumerable:!0,get:function(){return e.DirectionType}}),Object.defineProperty(exports,"ErrorCode",{enumerable:!0,get:function(){return e.ErrorCode}}),Object.defineProperty(exports,"FileType",{enumerable:!0,get:function(){return e.FileType}}),Object.defineProperty(exports,"FriendAddPermission",{enumerable:!0,get:function(){return e.FriendAddPermission}}),Object.defineProperty(exports,"FriendApplicationStatus",{enumerable:!0,get:function(){return e.FriendApplicationStatus}}),Object.defineProperty(exports,"FriendApplicationType",{enumerable:!0,get:function(){return e.FriendApplicationType}}),Object.defineProperty(exports,"FriendRelationType",{enumerable:!0,get:function(){return e.FriendRelationType}}),Object.defineProperty(exports,"GroupApplicationDirection",{enumerable:!0,get:function(){return e.GroupApplicationDirection}}),Object.defineProperty(exports,"GroupApplicationStatus",{enumerable:!0,get:function(){return e.GroupApplicationStatus}}),Object.defineProperty(exports,"GroupApplicationType",{enumerable:!0,get:function(){return e.GroupApplicationType}}),Object.defineProperty(exports,"GroupInviteHandlePermission",{enumerable:!0,get:function(){return e.GroupInviteHandlePermission}}),Object.defineProperty(exports,"GroupJoinPermission",{enumerable:!0,get:function(){return e.GroupJoinPermission}}),Object.defineProperty(exports,"GroupMemberInfoEditPermission",{enumerable:!0,get:function(){return e.GroupMemberInfoEditPermission}}),Object.defineProperty(exports,"GroupMemberRole",{enumerable:!0,get:function(){return e.GroupMemberRole}}),Object.defineProperty(exports,"GroupOperation",{enumerable:!0,get:function(){return e.GroupOperation}}),Object.defineProperty(exports,"GroupOperationPermission",{enumerable:!0,get:function(){return e.GroupOperationPermission}}),Object.defineProperty(exports,"GroupOperationType",{enumerable:!0,get:function(){return e.GroupOperationType}}),Object.defineProperty(exports,"GroupReadReceiptVersion",{enumerable:!0,get:function(){return e.GroupReadReceiptVersion}}),Object.defineProperty(exports,"InterruptionLevel",{enumerable:!0,get:function(){return e.InterruptionLevel}}),Object.defineProperty(exports,"LogL",{enumerable:!0,get:function(){return e.LogL}}),Object.defineProperty(exports,"LogLevel",{enumerable:!0,get:function(){return e.LogLevel}}),Object.defineProperty(exports,"MentionedType",{enumerable:!0,get:function(){return e.MentionedType}}),Object.defineProperty(exports,"MessageAuditType",{enumerable:!0,get:function(){return e.MessageAuditType}}),Object.defineProperty(exports,"MessageBlockSourceType",{enumerable:!0,get:function(){return e.MessageBlockSourceType}}),Object.defineProperty(exports,"MessageBlockType",{enumerable:!0,get:function(){return e.MessageBlockType}}),Object.defineProperty(exports,"MessageDirection",{enumerable:!0,get:function(){return e.MessageDirection}}),Object.defineProperty(exports,"MessageType",{enumerable:!0,get:function(){return e.MessageType}}),Object.defineProperty(exports,"NotificationLevel",{enumerable:!0,get:function(){return e.NotificationLevel}}),Object.defineProperty(exports,"NotificationStatus",{enumerable:!0,get:function(){return e.NotificationStatus}}),Object.defineProperty(exports,"OnlineStatus",{enumerable:!0,get:function(){return e.OnlineStatus}}),Object.defineProperty(exports,"OperateStatus",{enumerable:!0,get:function(){return e.OperateStatus}}),Object.defineProperty(exports,"Platform",{enumerable:!0,get:function(){return e.Platform}}),Object.defineProperty(exports,"PlatformInfo",{enumerable:!0,get:function(){return e.Platform}}),Object.defineProperty(exports,"PushImportanceHonor",{enumerable:!0,get:function(){return e.PushImportanceHonor}}),Object.defineProperty(exports,"PushNotificationQuietHoursLevel",{enumerable:!0,get:function(){return e.PushNotificationQuietHoursLevel}}),Object.defineProperty(exports,"QueryFriendsDirectionType",{enumerable:!0,get:function(){return e.QueryFriendsDirectionType}}),Object.defineProperty(exports,"RCConnectionStatus",{enumerable:!0,get:function(){return e.RCConnectionStatus}}),Object.defineProperty(exports,"ReceivedStatus",{enumerable:!0,get:function(){return e.ReceivedStatus}}),Object.defineProperty(exports,"ReferenceMessageStatus",{enumerable:!0,get:function(){return e.ReferenceMessageStatus}}),Object.defineProperty(exports,"SentStatus",{enumerable:!0,get:function(){return e.SentStatus}}),Object.defineProperty(exports,"SpeechToTextStatus",{enumerable:!0,get:function(){return e.SpeechToTextStatus}}),Object.defineProperty(exports,"StreamMessageResponseEventType",{enumerable:!0,get:function(){return e.StreamMessageResponseEventType}}),Object.defineProperty(exports,"SubscribeOperationType",{enumerable:!0,get:function(){return e.SubscribeOperationType}}),Object.defineProperty(exports,"SubscribeType",{enumerable:!0,get:function(){return e.SubscribeType}}),Object.defineProperty(exports,"TranslateMessageParam",{enumerable:!0,get:function(){return e.TranslateMessageParam}}),Object.defineProperty(exports,"TranslateMode",{enumerable:!0,get:function(){return e.TranslateMode}}),Object.defineProperty(exports,"TranslateStatus",{enumerable:!0,get:function(){return e.TranslateStatus}}),Object.defineProperty(exports,"TranslateStrategy",{enumerable:!0,get:function(){return e.TranslateStrategy}}),Object.defineProperty(exports,"TranslateTextParam",{enumerable:!0,get:function(){return e.TranslateTextParam}}),Object.defineProperty(exports,"UltraGroupChannelChangeType",{enumerable:!0,get:function(){return e.UltraGroupChannelChangeType}}),Object.defineProperty(exports,"UltraGroupChannelType",{enumerable:!0,get:function(){return e.UltraGroupChannelType}}),Object.defineProperty(exports,"UploadMethod",{enumerable:!0,get:function(){return e.UploadMethod}}),Object.defineProperty(exports,"UserProfileVisibility",{enumerable:!0,get:function(){return e.UserProfileVisibility}}),Object.defineProperty(exports,"UserSettingsChangedKey",{enumerable:!0,get:function(){return e.UserSettingsChangedKey}}),Object.defineProperty(exports,"UserType",{enumerable:!0,get:function(){return e.UserType}}),Object.defineProperty(exports,"createLogDBProxy",{enumerable:!0,get:function(){return e.createLogDBProxy}}),Object.defineProperty(exports,"fail",{enumerable:!0,get:function(){return e.fail}}),Object.defineProperty(exports,"ok",{enumerable:!0,get:function(){return e.ok}}),exports.BaseMessage=D,exports.CombineMessage=V,exports.CombineV2Message=F,exports.CommandMessage=w,exports.ConnectType={COMET:"_",WEBSOCKET:"_"},exports.FileMessage=B,exports.GIFMessage=H,exports.GroupNotificationMessage=k,exports.HQVoiceMessage=X,exports.ImageMessage=J,exports.InformationNotificationMessage=Y,exports.LocationMessage=j,exports.ReferenceMessage=K,exports.RichContentMessage=W,exports.SightMessage=Q,exports.TextMessage=q,exports.UploadTask=_e,exports.VoiceMessage=z,exports.__addSDKVersion=function(t,n){e.VersionManage.add(t,n)},exports.acceptFriendApplication=function(t){var n=this;return new e.ValidatorManage(f.A_ACCEPT_FRIEND_APPLICATION_T,f.A_ACCEPT_FRIEND_APPLICATION_R).validateParameters("userId",t,e.isValidTargetId,e.ErrorCode.INVALID_PARAMETER_USER_ID,!0).ifReady((function(r,s){return o(n,void 0,void 0,(function(){var n;return i(this,(function(o){switch(o.label){case 0:return s.info(f.A_ACCEPT_FRIEND_APPLICATION_T,t),[4,r.acceptFriendApplication(t)];case 1:return n=o.sent().code,s[n===e.ErrorCode.SUCCESS?"info":"warn"](f.A_ACCEPT_FRIEND_APPLICATION_R,n),[2,{code:n}]}}))}))}))},exports.acceptGroupApplication=function(t,n,r){return o(this,void 0,void 0,(function(){var s=this;return i(this,(function(a){return[2,new e.ValidatorManage(f.A_ACCEPT_GROUP_APPLICATION_T,f.A_ACCEPT_GROUP_APPLICATION_R).validateParameters("groupId",t,e.isValidTargetId,e.ErrorCode.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("applicantId",n,e.isValidTargetId,e.ErrorCode.INVALID_PARAMETER_USER_ID,!0).validateParameters("inviterId",r,e.isValidTargetId,e.ErrorCode.INVALID_PARAMETER_USER_ID).ifReady((function(a,u){return o(s,void 0,void 0,(function(){var o,s,d,c,_;return i(this,(function(i){switch(i.label){case 0:return o=u.createTraceId(),u.info(f.A_ACCEPT_GROUP_APPLICATION_T,JSON.stringify({groupId:t,inviterId:r,applicantId:n}),o),[4,a.acceptGroupApplication(t,n,null!=r?r:"")];case 1:return s=i.sent(),d=s.code,c=s.data,_=d===e.ErrorCode.SUCCESS?"info":"warn",u[_](f.A_ACCEPT_GROUP_APPLICATION_R,JSON.stringify({code:d}),o),d!==e.ErrorCode.SUCCESS?[2,{code:d}]:[2,{code:d,data:c}]}}))}))}))]}))}))},exports.acceptGroupInvite=function(t,n){return o(this,void 0,void 0,(function(){var r=this;return i(this,(function(s){return[2,new e.ValidatorManage(f.A_ACCEPT_GROUP_INVITE_T,f.A_ACCEPT_GROUP_INVITE_R).validateParameters("groupId",t,e.isValidTargetId,e.ErrorCode.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("inviterId",n,e.isValidTargetId,e.ErrorCode.INVALID_PARAMETER_USER_ID,!0).ifReady((function(s,a){return o(r,void 0,void 0,(function(){var r,o,u;return i(this,(function(i){switch(i.label){case 0:return r=a.createTraceId(),a.info(f.A_ACCEPT_GROUP_INVITE_T,JSON.stringify({groupId:t,inviterId:n}),r),[4,s.acceptGroupInvite(t,n)];case 1:return o=i.sent().code,u=o===e.ErrorCode.SUCCESS?"info":"warn",a[u](f.A_ACCEPT_GROUP_INVITE_R,JSON.stringify({code:o}),r),[2,{code:o}]}}))}))}))]}))}))},exports.addConversationsToTag=function(e,t){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,h().next((function(n){return n.addTagForConversations(e,t)}))]}))}))},exports.addEventListener=function(e,t,n){R.on(e,t,n)},exports.addFriend=function(t,n,r){var s=this;return new e.ValidatorManage(f.A_ADD_FRIEND_T,f.A_ADD_FRIEND_R).validateParameters("userId",t,e.isValidTargetId,e.ErrorCode.INVALID_PARAMETER_USER_ID,!0).validateParameters("directionType",n,(function(t){return e.isValidEnum({value:t,type:e.DirectionType})}),e.ErrorCode.INVALID_PARAMETER_DIRECTION_TYPE,!0).validateParameters("extra",r,e.isLimitedString({maxLength:128}),e.ErrorCode.INVALID_PARAMETER_EXTRA).ifReady((function(a,u){return o(s,void 0,void 0,(function(){var o,s,d;return i(this,(function(i){switch(i.label){case 0:return u.info(f.A_ADD_FRIEND_T,JSON.stringify({userId:t,directionType:n,extra:r})),[4,a.addFriend(t,n,r||"")];case 1:return o=i.sent(),s=o.code,d=o.data,u[s===e.ErrorCode.SUCCESS?"info":"warn"](f.A_ADD_FRIEND_R,s),s!==e.ErrorCode.SUCCESS?[2,{code:s}]:[2,{code:s,data:d}]}}))}))}))},exports.addGroupFollows=function(t,n){return o(this,void 0,void 0,(function(){var r=this;return i(this,(function(s){return[2,new e.ValidatorManage(f.A_ADD_GROUP_FOLLOWS_T,f.A_ADD_GROUP_FOLLOWS_R).validateParameters("groupId",t,e.isValidTargetId,e.ErrorCode.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("userIds",n,e.isLimitedArray({minLength:1,maxLength:100,itemValidator:e.isValidTargetId}),e.ErrorCode.INVALID_PARAMETER_USERIDLIST,!0).ifReady((function(s,a){return o(r,void 0,void 0,(function(){var r,o,u;return i(this,(function(i){switch(i.label){case 0:return r=a.createTraceId(),a.info(f.A_ADD_GROUP_FOLLOWS_T,JSON.stringify({groupId:t,userIds:n}),r),[4,s.addGroupFollows(t,n)];case 1:return o=i.sent().code,u=o===e.ErrorCode.SUCCESS?"info":"warn",a[u](f.A_ADD_GROUP_FOLLOWS_R,JSON.stringify({code:o}),r),[2,{code:o}]}}))}))}))]}))}))},exports.addGroupManagers=function(t,n){return o(this,void 0,void 0,(function(){var r=this;return i(this,(function(s){return[2,new e.ValidatorManage(f.A_ADD_GROUP_MANAGERS_T,f.A_ADD_GROUP_MANAGERS_R).validateParameters("groupId",t,e.isValidTargetId,e.ErrorCode.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("userIds",n,e.isLimitedArray({minLength:1,maxLength:10,itemValidator:e.isValidTargetId}),e.ErrorCode.INVALID_PARAMETER_USERIDLIST,!0).ifReady((function(s,a){return o(r,void 0,void 0,(function(){var r,o,u;return i(this,(function(i){switch(i.label){case 0:return r=a.createTraceId(),a.info(f.A_ADD_GROUP_MANAGERS_T,JSON.stringify({groupId:t,userIds:n}),r),[4,s.setGroupManagers(1,t,n)];case 1:return o=i.sent().code,u=o===e.ErrorCode.SUCCESS?"info":"warn",a[u](f.A_ADD_GROUP_MANAGERS_R,JSON.stringify({code:o}),r),[2,{code:o}]}}))}))}))]}))}))},exports.addMonitor=function(e,t,n){if(!e.monitorable)throw new Error("Not monitorable API: ".concat(e.name));var r=++U;return M.set(r,[e,t,n]),r},exports.addTag=function(e){return o(this,void 0,void 0,(function(){return i(this,(function(t){return[2,h().next((function(t){return t.createTag(e)}))]}))}))},exports.addToBlacklist=function(t){return o(this,void 0,void 0,(function(){var n=this;return i(this,(function(r){return[2,new e.ValidatorManage(f.A_ADD_TO_BLACKLIST_T,f.A_ADD_TO_BLACKLIST_R).validate("userId",t,e.AssertRules.STRING,!0).ifReady((function(r,s){return o(n,void 0,void 0,(function(){var n,o,a;return i(this,(function(i){switch(i.label){case 0:return n=s.createTraceId(),s.info(f.A_ADD_TO_BLACKLIST_T,JSON.stringify({userId:t}),n),[4,r.addToBlacklist(t)];case 1:return o=i.sent(),a=o===e.ErrorCode.SUCCESS?"info":"warn",s[a](f.A_ADD_TO_BLACKLIST_R,JSON.stringify({code:o}),n),[2,{code:o}]}}))}))}))]}))}))},exports.batchClearRemoteHistoryMessages=function(e,t){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,h().next((function(n){return n.batchClearRemoteHistoryMessages(e,t)}))]}))}))},exports.batchDeleteConversations=ye,exports.batchGetMessageReadReceiptInfoV4=function(t,n){return o(this,void 0,void 0,(function(){var r=this;return i(this,(function(s){return[2,new e.ValidatorManage(e.LogTagId.A_BATCH_GET_MESSAGE_READ_RECEIPT_INFO_V4_T,e.LogTagId.A_BATCH_GET_MESSAGE_READ_RECEIPT_INFO_V4_R).validate("conversation",t,e.AssertRules.OBJECT,!0).validate("conversationType",null==t?void 0:t.conversationType,(function(t){return t===e.ConversationType.GROUP}),!0,"It should be ConversationType.GROUP").validate("targetId",null==t?void 0:t.targetId,e.AssertRules.STRING,!0).validate("channelId",null==t?void 0:t.channelId,e.AssertRules.CHANNEL_ID).validate("messageUId",n,(function(t){return!!e.validate("messageUIds",t,e.AssertRules.ARRAY,!0)&&!t.some((function(t){return!e.isString(t)}))}),!0).ifReady((function(s,a){return o(r,void 0,void 0,(function(){var r,o,u,d,c,_,l;return i(this,(function(i){switch(i.label){case 0:return r="conversationType:".concat(t.conversationType,",targetId:").concat(t.targetId,",\n channelId: ").concat(t.channelId,", messageUid:").concat(n.toString()),o=a.createTraceId(),a.info(e.LogTagId.A_BATCH_GET_MESSAGE_READ_RECEIPT_INFO_V4_T,r,o),3!==(null==(u=s.getNaviInfoFromCache())?void 0:u.grpRRVer)?[2,{code:e.ErrorCode.READ_RECEIPT_V4_NOT_SUPPORT}]:[4,s.batchGetMessageReadReceiptInfoV4(t,n)];case 1:return d=i.sent(),c=d.code,_=d.msg,l=d.data,a[c===e.ErrorCode.SUCCESS?"info":"warn"](e.LogTagId.A_BATCH_GET_MESSAGE_READ_RECEIPT_INFO_V4_R,"code: ".concat(c,", msg: ").concat(_),o),c===e.ErrorCode.SUCCESS?[2,{code:c,data:l}]:[2,{code:c,msg:_}]}}))}))}))]}))}))},exports.batchRemoveConversation=function(e){return o(this,void 0,void 0,(function(){return i(this,(function(t){return c("batchRemoveConversation","batchDeleteConversations"),[2,ye({identifiers:e,deleteRemotely:!1,deleteMessages:!1})]}))}))},exports.batchSetConversationNotificationLevel=function(e,t){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,h().next((function(n){return n.batchSetConversationNotificationLevel(e,t)}))]}))}))},exports.batchSetConversationToTop=function(e,t,n,r){return void 0===n&&(n=!0),void 0===r&&(r=!0),o(this,void 0,void 0,(function(){return i(this,(function(o){return[2,h().next((function(o){return o.batchSetConversationToTop(e,!!t,r,n)}))]}))}))},exports.batchSetConversationTranslateStrategy=function(e,t){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,h().next((function(n){return n.batchSetConversationTranslateStrategy(e,t)}))]}))}))},exports.bindRTCRoomForChatroom=function(e){return o(this,void 0,void 0,(function(){return i(this,(function(t){return[2,h().next((function(t){return t.chatroom.bindRTCRoomForChatroom(e)}))]}))}))},exports.checkFriends=function(t,n){var r=this;return new e.ValidatorManage(f.A_CHECK_FRIENDS_T,f.A_CHECK_FRIENDS_R).validateParameters("userIds",t,e.isLimitedArray({minLength:1,maxLength:20,itemValidator:e.isValidTargetId}),e.ErrorCode.INVALID_PARAMETER_USERIDLIST,!0).validateParameters("directionType",n,(function(t){return e.isValidEnum({value:t,type:e.DirectionType})}),e.ErrorCode.INVALID_PARAMETER_DIRECTION_TYPE,!0).ifReady((function(s,a){return o(r,void 0,void 0,(function(){var r,o,u;return i(this,(function(i){switch(i.label){case 0:return a.info(f.A_CHECK_FRIENDS_T,JSON.stringify({userIds:t,directionType:n})),[4,s.checkFriends(t,n)];case 1:return r=i.sent(),o=r.code,u=r.data,a[o===e.ErrorCode.SUCCESS?"info":"warn"](f.A_CHECK_FRIENDS_R,JSON.stringify({code:o,data:u})),o!==e.ErrorCode.SUCCESS?[2,{code:o}]:[2,{code:o,data:u}]}}))}))}))},exports.clearAllMessagesUnreadStatus=function(){return o(this,void 0,void 0,(function(){return i(this,(function(e){return[2,h().next((function(e){return e.clearAllUnreadCount()}))]}))}))},exports.clearEventListeners=G,exports.clearHistoryMessages=function(e,t){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,h().next((function(n){return n.deleteRemoteMessageByTimestamp(e,t)}))]}))}))},exports.clearMessages=function(e){return o(this,void 0,void 0,(function(){return i(this,(function(t){return c("RongIMLib.clearMessages","RongIMLib.electronExtension.clearMessages"),[2,He(e)]}))}))},exports.clearMessagesUnreadStatus=De,exports.clearRealtimeConUnreadCount=function(e){return o(this,void 0,void 0,(function(){return i(this,(function(t){return[2,h().next((function(t){return t.clearRealtimeConUnreadCount(e)}))]}))}))},exports.clearTextMessageDraft=function(e){return o(this,void 0,void 0,(function(){return i(this,(function(t){return[2,h().next((function(t){return t.clearTextMessageDraft(e)}))]}))}))},exports.clearUnreadCountByTimestamp=function(t,n){return o(this,void 0,void 0,(function(){var r=this;return i(this,(function(s){return e.usingCppEngine()?[2,new e.ValidatorManage(f.A_CLEAR_UNREAD_COUNT_BY_TIMESTAMP_T,f.A_CLEAR_UNREAD_COUNT_BY_TIMESTAMP_R).validate("conversation",t,e.AssertRules.OBJECT,!0).validate("conversationType",null==t?void 0:t.conversationType,e.AssertRules.CONVERSATION_TYPE,!0).validate("targetId",null==t?void 0:t.targetId,e.AssertRules.STRING,!0).validate("channelId",null==t?void 0:t.channelId,e.AssertRules.CHANNEL_ID).validate("timestamp",n,e.AssertRules.NUMBER).ifReady((function(s,a){return o(r,void 0,void 0,(function(){var r,o,u,d,c,_,l;return i(this,(function(i){switch(i.label){case 0:return r=t.conversationType,o=t.targetId,u=t.channelId,d=void 0===u?"":u,c=a.createTraceId(),a.info(f.A_CLEAR_UNREAD_COUNT_BY_TIMESTAMP_T,JSON.stringify({conversationType:r,targetId:o,channelId:d,timestamp:n}),c),[4,s.clearUnreadCountByTimestamp(r,o,n,d)];case 1:return _=i.sent(),l=_===e.ErrorCode.SUCCESS?"info":"warn",a[l](f.A_CLEAR_UNREAD_COUNT_BY_TIMESTAMP_R,JSON.stringify({code:_}),c),_===e.ErrorCode.SUCCESS?[2,{code:_}]:[2,{code:_,msg:O[_]}]}}))}))}))]:[2,{code:e.ErrorCode.NOT_SUPPORT,msg:O[e.ErrorCode.NOT_SUPPORT]}]}))}))},exports.connect=function(t,n){return o(this,void 0,void 0,(function(){var r=this;return i(this,(function(s){return[2,new e.ValidatorManage(e.LogTagId.A_CONNECT_T,e.LogTagId.A_CONNECT_R).validate("token",t,e.AssertRules.STRING,!0).ifReady((function(s,a){return o(r,void 0,void 0,(function(){var r,o,u;return i(this,(function(i){switch(i.label){case 0:return r=a.createTraceId(),a.info(e.LogTagId.A_CONNECT_T,JSON.stringify({token:t,reconnectKickEnable:n}),r),[4,s.connect(t,!!n,r)];case 1:return o=i.sent(),u=o.code===e.ErrorCode.SUCCESS?"info":"warn",a[u](e.LogTagId.A_CONNECT_R,JSON.stringify({code:o.code,userId:o.userId}),r),o.code===e.ErrorCode.SUCCESS?[2,{code:o.code,data:{userId:o.userId}}]:[2,{code:o.code,msg:O[o.code]}]}}))}))}))]}))}))},exports.createGroup=function(t,n){return o(this,void 0,void 0,(function(){var r=this;return i(this,(function(s){return[2,new e.ValidatorManage(f.A_CREATE_GROUP_T,f.A_CREATE_GROUP_R).validateParameters("groupId",t.groupId,e.isValidGroupId,e.ErrorCode.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("groupName",t.groupName,e.isLimitedString({isTrim:!0,minLength:1,maxLength:64}),e.ErrorCode.INVALID_PARAMETER_GROUP_NAME,!0).validateParameters("groupInfo.portraitUri",null==t?void 0:t.portraitUri,e.AssertRules.ONLY_STRING,e.ErrorCode.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.introduction",null==t?void 0:t.introduction,e.AssertRules.ONLY_STRING,e.ErrorCode.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.notice",null==t?void 0:t.notice,e.AssertRules.ONLY_STRING,e.ErrorCode.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.extProfile",null==t?void 0:t.extProfile,e.AssertRules.OBJECT,e.ErrorCode.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.extProfile",null==t?void 0:t.extProfile,(function(e){for(var t in e)if("string"!=typeof e[t])return!1;return!0}),e.ErrorCode.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.joinPermission",null==t?void 0:t.joinPermission,(function(t){return e.isValidEnum({value:t,type:e.GroupJoinPermission})}),e.ErrorCode.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.removeMemberPermission",null==t?void 0:t.removeMemberPermission,(function(t){return e.isValidEnum({value:t,type:e.GroupOperationPermission})}),e.ErrorCode.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.invitePermission",null==t?void 0:t.invitePermission,(function(t){return e.isValidEnum({value:t,type:e.GroupOperationPermission})}),e.ErrorCode.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.inviteHandlePermission",null==t?void 0:t.inviteHandlePermission,(function(t){return e.isValidEnum({value:t,type:e.GroupInviteHandlePermission})}),e.ErrorCode.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.groupInfoEditPermission",null==t?void 0:t.groupInfoEditPermission,(function(t){return e.isValidEnum({value:t,type:e.GroupOperationPermission})}),e.ErrorCode.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.memberInfoEditPermission",null==t?void 0:t.memberInfoEditPermission,(function(t){return e.isValidEnum({value:t,type:e.GroupMemberInfoEditPermission})}),e.ErrorCode.INVALID_PARAMETER_GROUP_INFO).validateParameters("inviteeUserIds",n,e.isLimitedArray({minLength:0,maxLength:30,itemValidator:e.isValidTargetId}),e.ErrorCode.INVALID_PARAMETER_USERIDLIST).ifReady((function(s,a){return o(r,void 0,void 0,(function(){var r,o,u,d,c,_,E,R,A,T,v;return i(this,(function(i){switch(i.label){case 0:return r=a.createTraceId(),a.info(f.A_CREATE_GROUP_T,JSON.stringify({groupInfo:t,inviteeUserIds:n}),r),o=t.groupId,u=t.extProfile,d={},c=Object.keys(l),Object.keys(t).forEach((function(e){c.includes(e)&&(d[l[e]]=t[e])})),[4,s.createGroup(o,d,u,n)];case 1:return _=i.sent(),E=_.code,R=_.msg,A=void 0===R?"":R,T=_.data,v=E===e.ErrorCode.SUCCESS?"info":"warn",a[v](f.A_CREATE_GROUP_R,JSON.stringify({code:E}),r),E!==e.ErrorCode.SUCCESS?[2,{code:E,msg:A,data:T}]:[2,{code:E,data:T}]}}))}))}))]}))}))},exports.createUploadTask=function(t){return o(this,void 0,void 0,(function(){var n,r,o;return i(this,(function(i){return n=t.contentDisposition,r=t.fileType,o=t.file,[2,new e.ValidatorManage("","").validate("contentDisposition",n,(function(e){return"inline"===e||"attachment"===e}),!1).validate("fileType",r,(function(t){return!!e.FileType[t]}),!0).validate("file",o,(function(t){return t instanceof File&&(!(r===e.FileType.IMAGE&&!t.type.match(/^image\//))&&!(r===e.FileType.AUDIO&&!t.type.match(/^audio\//)))}),!0).ifReadySync((function(n,r,o){var i=Ee(t,Re(n,o.uploadDomain));return{code:e.ErrorCode.SUCCESS,data:i}}))]}))}))},exports.deleteFriends=function(t,n){var r=this;return new e.ValidatorManage(f.A_DELETE_FRIENDS_T,f.A_DELETE_FRIENDS_R).validateParameters("userIds",t,e.isLimitedArray({minLength:1,maxLength:100,itemValidator:e.isValidTargetId}),e.ErrorCode.INVALID_PARAMETER_USERIDLIST,!0).validateParameters("directionType",n,(function(t){return e.isValidEnum({value:t,type:e.DirectionType})}),e.ErrorCode.INVALID_PARAMETER_DIRECTION_TYPE,!0).ifReady((function(s,a){return o(r,void 0,void 0,(function(){var r;return i(this,(function(o){switch(o.label){case 0:return a.info(f.A_DELETE_FRIENDS_T,JSON.stringify({userIds:t,directionType:n})),[4,s.deleteFriends(t,n)];case 1:return r=o.sent().code,a[r===e.ErrorCode.SUCCESS?"info":"warn"](f.A_DELETE_FRIENDS_R,r),[2,{code:r}]}}))}))}))},exports.deleteLocalMessagesByTimestamp=function(e,t,n){return o(this,void 0,void 0,(function(){return i(this,(function(r){return c("RongIMLib.deleteLocalMessagesByTimestamp","RongIMLib.electronExtension.deleteMessagesByTimestamp"),[2,ke(e,t,n)]}))}))},exports.deleteMessages=function(e,t){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,h().next((function(n){return n.deleteRemoteMessage(e,t)}))]}))}))},exports.destroy=function(){return o(this,void 0,void 0,(function(){return i(this,(function(e){return G(),[2,S()]}))}))},exports.disconnect=L,exports.dismissGroup=function(t){return o(this,void 0,void 0,(function(){var n=this;return i(this,(function(r){return[2,new e.ValidatorManage(f.A_DISMISS_GROUP_T,f.A_DISMISS_GROUP_R).validateParameters("groupId",t,e.isValidTargetId,e.ErrorCode.INVALID_PARAMETER_GROUP_ID,!0).ifReady((function(r,s){return o(n,void 0,void 0,(function(){var n,o,a;return i(this,(function(i){switch(i.label){case 0:return n=s.createTraceId(),s.info(f.A_DISMISS_GROUP_T,JSON.stringify({groupId:t}),n),[4,r.dismissGroup(t)];case 1:return o=i.sent().code,a=o===e.ErrorCode.SUCCESS?"info":"warn",s[a](f.A_DISMISS_GROUP_R,JSON.stringify({code:o}),n),[2,{code:o}]}}))}))}))]}))}))},exports.electronExtension=We,exports.forceRemoveChatRoomEntry=function(e,t){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,h().next((function(n){return n.chatroom.removeChatroomEntry(e,t,!0)}))]}))}))},exports.forceSetChatRoomEntry=function(e,t){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,h().next((function(n){return n.chatroom.setChatroomEntry(e,t,!0)}))]}))}))},exports.getAllChatRoomEntries=function(e){return o(this,void 0,void 0,(function(){return i(this,(function(t){return[2,h().next((function(t){return t.chatroom.getAllChatroomEntries(e)}))]}))}))},exports.getAllConversationList=Ue,exports.getAllUltraGroupUnreadCount=function(){return o(this,void 0,void 0,(function(){return i(this,(function(t){return c("getAllUltraGroupUnreadCount","getTotalUnreadCountByLevels"),[2,Le([e.ConversationType.ULTRA_GROUP],[])]}))}))},exports.getAllUltraGroupUnreadMentionedCount=function(){return o(this,void 0,void 0,(function(){return i(this,(function(t){return c("getAllUltraGroupUnreadMentionedCount","getTotalUnreadMentionedCountByLevels"),[2,Ge([e.ConversationType.ULTRA_GROUP],[])]}))}))},exports.getAllUnreadMentionedCount=function(){return o(this,void 0,void 0,(function(){return i(this,(function(e){return[2,h().next((function(e){return e.getAllUnreadMentionedCount()}))]}))}))},exports.getAppSettings=function(){var e=h().tryTrans((function(e){return e.getAppSettings()}));return e.isOk?e.data:null},exports.getAutoTranslateEnabled=function(){return o(this,void 0,void 0,(function(){return i(this,(function(e){return[2,h().next((function(e){return e.getAutoTranslateEnabled()}))]}))}))},exports.getBlacklist=function(){return o(this,void 0,void 0,(function(){var t=this;return i(this,(function(n){return[2,new e.ValidatorManage(f.A_GET_BLACKLIST_T,f.A_GET_BLACKLIST_R).ifReady((function(n,r){return o(t,void 0,void 0,(function(){var t,o,s,a;return i(this,(function(i){switch(i.label){case 0:return t=r.createTraceId(),r.info(f.A_GET_BLACKLIST_T,"getBlacklist -> ",t),[4,n.getBlacklist()];case 1:return o=i.sent(),s=o.code,a=o.data,s===e.ErrorCode.SUCCESS&&a?(r.info(f.A_GET_BLACKLIST_R,JSON.stringify({code:s,data:a}),t),[2,{code:s,data:a}]):(r.warn(f.A_GET_BLACKLIST_R,JSON.stringify({code:s}),t),[2,{code:s}])}}))}))}))]}))}))},exports.getBlacklistStatus=function(t){return o(this,void 0,void 0,(function(){var n=this;return i(this,(function(r){return[2,new e.ValidatorManage(f.A_GET_BLACKLIST_STATUS_T,f.A_GET_BLACKLIST_STATUS_R).validate("userId",t,e.AssertRules.STRING,!0).ifReady((function(r,s){return o(n,void 0,void 0,(function(){var n,o,a,u;return i(this,(function(i){switch(i.label){case 0:return n=s.createTraceId(),s.info(f.A_GET_BLACKLIST_STATUS_T,JSON.stringify({userId:t}),n),[4,r.getBlacklistStatus(t)];case 1:return o=i.sent(),a=o.code,u=o.data,a===e.ErrorCode.SUCCESS?(s.info(f.A_GET_BLACKLIST_STATUS_R,JSON.stringify({code:a,data:0===u}),n),[2,{code:a,data:0===u}]):(s.warn(f.A_GET_BLACKLIST_STATUS_R,JSON.stringify({code:a}),n),[2,{code:a}])}}))}))}))]}))}))},exports.getBlockUltraGroupList=function(){return o(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,h().next((function(e){return e.getBlockedUGList()}))];case 1:return[2,e.sent().trans((function(e){return e.map((function(e){return d(e)}))}))]}}))}))},exports.getBlockedConversationList=function(){return o(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,h().next((function(e){return e.getBlockedConversationList()}))];case 1:return[2,e.sent().trans((function(e){return e.map(d)}))]}}))}))},exports.getChatRoomEntry=function(e,t){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,h().next((function(n){return n.chatroom.getChatroomEntry(e,t)}))]}))}))},exports.getChatRoomInfo=function(e,t){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,h().next((function(n){return n.chatroom.getChatroomInfo(e,null==t?void 0:t.count,null==t?void 0:t.order)}))]}))}))},exports.getChatroomHistoryMessages=function(e,t){return o(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,h().next((function(n){return n.chatroom.getChatroomHistoryMessages(e,null==t?void 0:t.count,null==t?void 0:t.order,null==t?void 0:t.timestamp)}))];case 1:return[2,n.sent().trans((function(e){var t=e.list;return{hasMore:e.hasMore,list:t.map((function(e){return u(e)}))}}))]}}))}))},exports.getConnectionStatus=function(){return g((function(e){return e.getConnectionStatus()}))},exports.getConversation=function(e){return o(this,void 0,void 0,(function(){var t=this;return i(this,(function(n){return[2,h().next((function(n){return o(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,n.getConversation(e)];case 1:return[2,t.sent().trans((function(e){return d(e)}))]}}))}))}))]}))}))},exports.getConversationList=function(e,t){return o(this,void 0,void 0,(function(){var n=this;return i(this,(function(r){switch(r.label){case 0:return c("getConversationList","getConversationListByTimestamp"),[4,h().next((function(r){return o(n,void 0,void 0,(function(){return i(this,(function(n){return[2,r.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})]}))}))}))];case 1:return[2,r.sent().trans((function(e){return e.map(d)}))]}}))}))},exports.getConversationListByTimestamp=function(e){return o(this,void 0,void 0,(function(){var t=this;return i(this,(function(n){switch(n.label){case 0:return[4,h().next((function(n){return o(t,void 0,void 0,(function(){return i(this,(function(t){return[2,n.getConversationListByTimestamp(e)]}))}))}))];case 1:return[2,n.sent().trans((function(e){return e.map(d)}))]}}))}))},exports.getConversationNotificationLevel=function(e){return o(this,void 0,void 0,(function(){return i(this,(function(t){return[2,h().next((function(t){return t.getConversationNotificationLevel(e)}))]}))}))},exports.getConversationNotificationStatus=function(t){return o(this,void 0,void 0,(function(){var n=this;return i(this,(function(r){return[2,h().next((function(r){return o(n,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,r.getConversationNotificationLevel(t)];case 1:return[2,n.sent().trans((function(t){return e.trans2NotificationStatus(t)}))]}}))}))}))]}))}))},exports.getConversationTypeNotificationLevel=function(e){return o(this,void 0,void 0,(function(){return i(this,(function(t){return[2,h().next((function(t){return t.getConversationTypeNotificationLevel(e)}))]}))}))},exports.getConversationsFromTagByPage=function(e,t,n){return o(this,void 0,void 0,(function(){return i(this,(function(o){switch(o.label){case 0:return[4,h().next((function(r){return r.getConversationListByTag(e,n,t)}))];case 1:return[2,o.sent().trans((function(e){return e.map((function(e){return r(r({},d(t=e)),{isTopInTag:t.isTopInTag});var t}))}))]}}))}))},exports.getCurrentUserId=function(){return g((function(e){return e.getCurrentUserId()}))},exports.getDeviceId=function(){return g((function(e){return e.getDeviceId()}))},exports.getDownloadAuth=function(t){return new e.ValidatorManage("","").validate("mediaUrl",t,e.AssertRules.STRING,!0).ifReady((function(n){return new Promise((function(r){n.getFileToken(1,void 0,void 0,void 0,t).then((function(t){var n=t.token,o=t.downloadAuthInfo,i=t.deadline;r({code:e.ErrorCode.SUCCESS,data:{token:n,downloadAuthInfo:o,deadline:i}})})).catch((function(e){r({code:e,msg:O[e]})}))}))}))},exports.getFileToken=function(t,n,r,o){return m((function(i){return new Promise((function(s){i.getFileToken(t,n,r,o).then((function(t){s({code:e.ErrorCode.SUCCESS,data:t})})).catch((function(e){s({code:e,msg:O[e]})}))}))}))},exports.getFileUrl=function(t,n,r,s,a){return o(this,void 0,void 0,(function(){return i(this,(function(o){return(null==s?void 0:s.isBosRes)?[2,e.ok(s)]:[2,new e.ValidatorManage("","").validate("fileType",t,e.isValidFileType,!0).validate("filename",n,e.AssertRules.STRING,!0).validate("saveName",r,e.AssertRules.STRING).validate("serverType",a,e.AssertRules.NUMBER).ifReady((function(o){return o.getFileUrl(t,n,a||e.UploadMethod.QINIU,r)}))]}))}))},exports.getFirstUnreadMessage=function(e){return o(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,h().next((function(t){return t.getFirstUnreadMessage(e)}))];case 1:return[2,t.sent().trans((function(e){return e?u(e):null}))]}}))}))},exports.getFirstUnreadMessageInfo=function(e){return o(this,void 0,void 0,(function(){return i(this,(function(t){return[2,h().next((function(t){return t.getFirstUnreadMessageDigest(e)}))]}))}))},exports.getFriendAddPermission=function(){var t=this;return new e.ValidatorManage(f.A_GET_ADD_FRIEND_PERMISSION_T,f.A_GET_ADD_FRIEND_PERMISSION_R).ifReady((function(n,r){return o(t,void 0,void 0,(function(){var t,o,s;return i(this,(function(i){switch(i.label){case 0:return r.info(f.A_GET_ADD_FRIEND_PERMISSION_T),[4,n.getFriendAddPermission()];case 1:return t=i.sent(),o=t.code,s=t.data,r[o===e.ErrorCode.SUCCESS?"info":"warn"](f.A_GET_ADD_FRIEND_PERMISSION_R,JSON.stringify({code:o,data:s})),o!==e.ErrorCode.SUCCESS?[2,{code:o}]:[2,{code:o,data:s}]}}))}))}))},exports.getFriendApplications=function(t,n,r){var s=this;return void 0===t&&(t={count:50,pageToken:"",order:!1}),new e.ValidatorManage(f.A_GET_FRIEND_APPLICATIONS_T,f.A_GET_FRIEND_APPLICATIONS_R).validateParameters("types",n,e.isLimitedArray({itemValidator:function(t){return e.isValidEnum({value:t,type:e.FriendApplicationType})}}),e.ErrorCode.INVALID_PARAMETER_FRIEND_APPLICATION_TYPE).validateParameters("option.count",t.count,e.isInteger({min:1,max:100}),e.ErrorCode.INVALID_PARAMETER_COUNT,!0).validateParameters("option.pageToken",t.pageToken,e.AssertRules.ONLY_STRING,e.ErrorCode.INVALID_PARAMETER_PAGING_QUERY_OPTION).validateParameters("option.order",t.order,e.AssertRules.BOOLEAN,e.ErrorCode.INVALID_PARAMETER_PAGING_QUERY_OPTION).validateParameters("status",r,e.isLimitedArray({itemValidator:function(t){return e.isValidEnum({value:t,type:e.FriendApplicationStatus})}}),e.ErrorCode.INVALID_PARAMETER_FRIEND_APPLICATION_STATUS).ifReady((function(a,u){return o(s,void 0,void 0,(function(){var o,s,d,c,_;return i(this,(function(i){switch(i.label){case 0:return u.info(f.A_GET_FRIEND_APPLICATIONS_T,JSON.stringify({types:n,status:r,option:t})),[4,a.getFriendApplications({count:t.count,pageToken:null!==(c=null==t?void 0:t.pageToken)&&void 0!==c?c:"",order:null!==(_=null==t?void 0:t.order)&&void 0!==_&&_},n,r)];case 1:return o=i.sent(),s=o.code,d=o.data,u[s===e.ErrorCode.SUCCESS?"info":"warn"](f.A_GET_FRIEND_APPLICATIONS_R,JSON.stringify({code:s,data:d})),s!==e.ErrorCode.SUCCESS?[2,{code:s}]:[2,{code:s,data:d}]}}))}))}))},exports.getFriends=function(t,n){var r=this;return void 0===n&&(n={count:50,pageToken:"",order:!1}),new e.ValidatorManage(f.A_GET_FRIENDS_T,f.A_GET_FRIENDS_R).validateParameters("directionType",t,(function(t){return e.isValidEnum({value:t,type:e.QueryFriendsDirectionType})}),e.ErrorCode.INVALID_PARAMETER_QUERY_FRIENDS_DIRECTION_TYPE,!0).validateParameters("option.count",null==n?void 0:n.count,e.isInteger({min:1,max:100}),e.ErrorCode.INVALID_PARAMETER_COUNT,!e.usingCppEngine()).validateParameters("option.pageToken",null==n?void 0:n.pageToken,e.AssertRules.ONLY_STRING,e.ErrorCode.INVALID_PARAMETER_PAGING_QUERY_OPTION).validateParameters("option.order",null==n?void 0:n.order,e.AssertRules.BOOLEAN,e.ErrorCode.INVALID_PARAMETER_PAGING_QUERY_OPTION).ifReady((function(s,a){return o(r,void 0,void 0,(function(){var r,o,u;return i(this,(function(i){switch(i.label){case 0:return a.info(f.A_GET_FRIENDS_T,JSON.stringify({directionType:t,option:n})),[4,s.getFriends(t,n)];case 1:return r=i.sent(),o=r.code,u=r.data,a[o===e.ErrorCode.SUCCESS?"info":"warn"](f.A_GET_FRIENDS_R,JSON.stringify({code:o,data:u})),o!==e.ErrorCode.SUCCESS?[2,{code:o}]:[2,{code:o,data:u}]}}))}))}))},exports.getFriendsInfo=function(t){var n=this;return new e.ValidatorManage(f.A_GET_FRIENDS_INFO_T,f.A_GET_FRIENDS_INFO_R).validateParameters("userIds",t,e.isLimitedArray({minLength:1,maxLength:100,itemValidator:e.isValidTargetId}),e.ErrorCode.INVALID_PARAMETER_USERIDLIST,!0).ifReady((function(r,s){return o(n,void 0,void 0,(function(){var n,o,a;return i(this,(function(i){switch(i.label){case 0:return s.info(f.A_GET_FRIENDS_INFO_T,JSON.stringify({userIds:t})),[4,r.getFriendsInfo(t)];case 1:return n=i.sent(),o=n.code,a=n.data,s[o===e.ErrorCode.SUCCESS?"info":"warn"](f.A_GET_FRIENDS_INFO_R,JSON.stringify({code:o,data:a})),o!==e.ErrorCode.SUCCESS?[2,{code:o}]:[2,{code:o,data:a}]}}))}))}))},exports.getGroupApplications=function(t,n,r){return o(this,void 0,void 0,(function(){var s=this;return i(this,(function(a){return[2,new e.ValidatorManage(f.A_GET_GROUP_APPLICATIONS_T,f.A_GET_GROUP_APPLICATIONS_R).validateParameters("option",t,e.AssertRules.OBJECT,e.ErrorCode.INVALID_PARAMETER_PAGING_QUERY_OPTION,!0).validateParameters("option.count",t.count,e.isInteger({min:1,max:200}),e.ErrorCode.INVALID_PARAMETER_COUNT,!0).validateParameters("option.pageToken",null==t?void 0:t.pageToken,e.AssertRules.ONLY_STRING,e.ErrorCode.INVALID_PARAMETER_PAGING_QUERY_OPTION).validateParameters("option.order",null==t?void 0:t.order,e.AssertRules.BOOLEAN,e.ErrorCode.INVALID_PARAMETER_PAGING_QUERY_OPTION).validateParameters("directions",n,e.isLimitedArray({minLength:1,itemValidator:function(t){return e.isValidEnum({value:t,type:e.GroupApplicationDirection})}}),e.ErrorCode.INVALID_PARAMETER_GROUP_APPLICATION_DIRECTION,e.usingCppEngine()).validateParameters("status",r,e.isLimitedArray({minLength:1,itemValidator:function(t){return e.isValidEnum({value:t,type:e.GroupApplicationStatus})}}),e.ErrorCode.INVALID_PARAMETER_GROUP_APPLICATION_STATUS,e.usingCppEngine()).ifReady((function(a,u){return o(s,void 0,void 0,(function(){var o,s,d,c,_;return i(this,(function(i){switch(i.label){case 0:return o=u.createTraceId(),u.info(f.A_GET_GROUP_APPLICATIONS_T,JSON.stringify({status:r,option:t,formatOption:Qe(t)}),o),[4,a.getGroupApplications(Qe(t),n,r)];case 1:return s=i.sent(),d=s.code,c=s.data,_=d===e.ErrorCode.SUCCESS?"info":"warn",u[_](f.A_GET_GROUP_APPLICATIONS_R,JSON.stringify({code:d,data:c}),o),d!==e.ErrorCode.SUCCESS?[2,{code:d}]:[2,{code:d,data:c}]}}))}))}))]}))}))},exports.getGroupFollows=function(t){return o(this,void 0,void 0,(function(){var n=this;return i(this,(function(r){return[2,new e.ValidatorManage(f.A_GET_GROUP_FOLLOWS_T,f.A_GET_GROUP_FOLLOWS_R).validateParameters("groupId",t,e.isValidTargetId,e.ErrorCode.INVALID_PARAMETER_GROUP_ID,!0).ifReady((function(r,s){return o(n,void 0,void 0,(function(){var n,o,a,u,d;return i(this,(function(i){switch(i.label){case 0:return n=s.createTraceId(),s.info(f.A_GET_GROUP_FOLLOWS_T,JSON.stringify({groupId:t}),n),[4,r.getGroupFollows(t)];case 1:return o=i.sent(),a=o.code,u=o.data,d=a===e.ErrorCode.SUCCESS?"info":"warn",s[d](f.A_GET_GROUP_FOLLOWS_R,JSON.stringify({code:a}),n),a!==e.ErrorCode.SUCCESS?[2,{code:a}]:[2,{code:a,data:u}]}}))}))}))]}))}))},exports.getGroupMembers=function(t,n){return o(this,void 0,void 0,(function(){var r=this;return i(this,(function(s){return[2,new e.ValidatorManage(f.A_GET_GROUP_MEMBERS_T,f.A_GET_GROUP_MEMBERS_R).validateParameters("groupId",t,e.isValidTargetId,e.ErrorCode.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("userIds",n,e.isLimitedArray({minLength:1,maxLength:100,itemValidator:e.isValidTargetId}),e.ErrorCode.INVALID_PARAMETER_USERIDLIST,!0).ifReady((function(s,a){return o(r,void 0,void 0,(function(){var r,o,u,d,c;return i(this,(function(i){switch(i.label){case 0:return r=a.createTraceId(),a.info(f.A_GET_GROUP_MEMBERS_T,JSON.stringify({groupId:t,userIds:n}),r),[4,s.getGroupMembers(t,n)];case 1:return o=i.sent(),u=o.code,d=o.data,c=u===e.ErrorCode.SUCCESS?"info":"warn",a[c](f.A_GET_GROUP_MEMBERS_R,JSON.stringify({code:u,data:d}),r),u!==e.ErrorCode.SUCCESS?[2,{code:u}]:[2,{code:u,data:d}]}}))}))}))]}))}))},exports.getGroupMembersByRole=function(t,n,r){return o(this,void 0,void 0,(function(){var s=this;return i(this,(function(a){return[2,new e.ValidatorManage(f.A_GET_GROUP_MEMBERS_BY_ROLES_T,f.A_GET_GROUP_MEMBERS_BY_ROLES_R).validateParameters("groupId",t,e.isValidTargetId,e.ErrorCode.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("role",n,(function(t){return e.isValidEnum({value:t,type:e.GroupMemberRole})}),e.ErrorCode.INVALID_PARAMETER_GROUP_MEMBER_ROLE,!0).validateParameters("option",r,e.AssertRules.OBJECT,e.ErrorCode.INVALID_PARAMETER_PAGING_QUERY_OPTION,!0).validateParameters("option.count",r.count,e.isInteger({min:1,max:100}),e.ErrorCode.INVALID_PARAMETER_COUNT,!0).validateParameters("option.pageToken",null==r?void 0:r.pageToken,e.AssertRules.ONLY_STRING,e.ErrorCode.INVALID_PARAMETER_PAGING_QUERY_OPTION).validateParameters("option.order",null==r?void 0:r.order,e.AssertRules.BOOLEAN,e.ErrorCode.INVALID_PARAMETER_PAGING_QUERY_OPTION).ifReady((function(a,u){return o(s,void 0,void 0,(function(){var o,s,d,c,_;return i(this,(function(i){switch(i.label){case 0:return o=u.createTraceId(),u.info(f.A_GET_GROUP_MEMBERS_BY_ROLES_T,JSON.stringify({groupId:t,role:n,option:r,formatOption:Qe(r)}),o),[4,a.getGroupMembersByRole(t,n,Qe(r))];case 1:return s=i.sent(),d=s.code,c=s.data,_=d===e.ErrorCode.SUCCESS?"info":"warn",u[_](f.A_GET_GROUP_MEMBERS_BY_ROLES_R,JSON.stringify({code:d,data:c}),o),d!==e.ErrorCode.SUCCESS?[2,{code:d}]:[2,{code:d,data:c}]}}))}))}))]}))}))},exports.getGroupsInfo=function(t){return o(this,void 0,void 0,(function(){var n=this;return i(this,(function(r){return[2,new e.ValidatorManage(f.A_GET_GROUPS_INFO_T,f.A_GET_GROUPS_INFO_R).validateParameters("groupIds",t,e.isLimitedArray({minLength:1,maxLength:20,itemValidator:e.isValidTargetId}),e.ErrorCode.INVALID_PARAMETER_GROUP_IDS,!0).ifReady((function(r,s){return o(n,void 0,void 0,(function(){var n,o,a,u,d;return i(this,(function(i){switch(i.label){case 0:return n=s.createTraceId(),s.info(f.A_GET_GROUPS_INFO_T,JSON.stringify({groupIds:t}),n),[4,r.getGroupsInfo(t)];case 1:return o=i.sent(),a=o.code,u=o.data,d=a===e.ErrorCode.SUCCESS?"info":"warn",s[d](f.A_GET_GROUPS_INFO_R,JSON.stringify({code:a,data:u}),n),a!==e.ErrorCode.SUCCESS?[2,{code:a}]:[2,{code:a,data:u}]}}))}))}))]}))}))},exports.getHistoryMessages=function(e,t){return o(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,h().next((function(n){return n.getHistoryMessage(e,t)}))];case 1:return[2,n.sent().trans((function(e){var t=e.list;return{hasMore:e.hasMore,list:t.map((function(e){return u(e)}))}}))]}}))}))},exports.getJoinedGroups=function(t){return o(this,void 0,void 0,(function(){var n=this;return i(this,(function(r){return[2,new e.ValidatorManage(f.A_GET_JOINED_GROUPS_T,f.A_GET_JOINED_GROUPS_R).validateParameters("groupIds",t,e.isLimitedArray({minLength:1,maxLength:20,itemValidator:e.isValidTargetId}),e.ErrorCode.INVALID_PARAMETER_GROUP_IDS,!0).ifReady((function(r,s){return o(n,void 0,void 0,(function(){var n,o,a,u,d;return i(this,(function(i){switch(i.label){case 0:return n=s.createTraceId(),s.info(f.A_GET_JOINED_GROUPS_T,JSON.stringify({groupIds:t}),n),[4,r.getJoinedGroups(t)];case 1:return o=i.sent(),a=o.code,u=o.data,d=a===e.ErrorCode.SUCCESS?"info":"warn",s[d](f.A_GET_JOINED_GROUPS_R,JSON.stringify({code:a}),n),a!==e.ErrorCode.SUCCESS?[2,{code:a}]:[2,{code:a,data:u}]}}))}))}))]}))}))},exports.getJoinedGroupsByRole=function(t,n){return o(this,void 0,void 0,(function(){var r=this;return i(this,(function(s){return[2,new e.ValidatorManage(f.A_GET_JOINED_GROUPS_BY_ROLES_T,f.A_GET_JOINED_GROUPS_BY_ROLES_R).validateParameters("option",t,e.AssertRules.OBJECT,e.ErrorCode.INVALID_PARAMETER_PAGING_QUERY_OPTION,!0).validateParameters("option.count",t.count,e.isInteger({min:1,max:100}),e.ErrorCode.INVALID_PARAMETER_COUNT,!0).validateParameters("option.pageToken",null==t?void 0:t.pageToken,e.AssertRules.ONLY_STRING,e.ErrorCode.INVALID_PARAMETER_PAGING_QUERY_OPTION).validateParameters("option.order",null==t?void 0:t.order,e.AssertRules.BOOLEAN,e.ErrorCode.INVALID_PARAMETER_PAGING_QUERY_OPTION).validateParameters("role",n,(function(t){return e.isValidEnum({value:t,type:e.GroupMemberRole})}),e.ErrorCode.INVALID_PARAMETER_GROUP_MEMBER_ROLE).ifReady((function(s,a){return o(r,void 0,void 0,(function(){var r,o,u,d,c;return i(this,(function(i){switch(i.label){case 0:return r=a.createTraceId(),a.info(f.A_GET_JOINED_GROUPS_BY_ROLES_T,JSON.stringify({role:n,option:t,formatOption:Qe(t)}),r),[4,s.getJoinedGroupsByRole(n,Qe(t))];case 1:return o=i.sent(),u=o.code,d=o.data,c=u===e.ErrorCode.SUCCESS?"info":"warn",a[c](f.A_GET_JOINED_GROUPS_BY_ROLES_R,JSON.stringify({code:u,data:d}),r),u!==e.ErrorCode.SUCCESS?[2,{code:u}]:[2,{code:u,data:d}]}}))}))}))]}))}))},exports.getMessage=Te,exports.getMessageReadReceiptInfoV5=function(e,t){return o(this,void 0,void 0,(function(){var n=this;return i(this,(function(r){return[2,h().next((function(r){return o(n,void 0,void 0,(function(){return i(this,(function(n){return[2,r.getMessageReadReceiptInfoV5(e,t)]}))}))}))]}))}))},exports.getMessageReadReceiptInfoV5ByIdentifiers=function(e){return o(this,void 0,void 0,(function(){var t=this;return i(this,(function(n){return[2,h().next((function(n){return o(t,void 0,void 0,(function(){return i(this,(function(t){return[2,n.getMessageReadReceiptInfoV5ByIdentifiers(e)]}))}))}))]}))}))},exports.getMessageReadReceiptV4=function(t,n){return o(this,void 0,void 0,(function(){var r=this;return i(this,(function(s){return[2,new e.ValidatorManage(e.LogTagId.A_GET_MESSAGE_READ_RECEIPT_V4_T,e.LogTagId.A_GET_MESSAGE_READ_RECEIPT_V4_R).validate("conversation",t,e.AssertRules.OBJECT,!0).validate("conversationType",null==t?void 0:t.conversationType,(function(t){return t===e.ConversationType.GROUP}),!0,"It should be ConversationType.GROUP").validate("targetId",null==t?void 0:t.targetId,e.AssertRules.STRING,!0).validate("channelId",null==t?void 0:t.channelId,e.AssertRules.CHANNEL_ID).validate("messageUId",n,e.AssertRules.STRING,!0).ifReady((function(s,a){return o(r,void 0,void 0,(function(){var r,o,u,d,c,_,l;return i(this,(function(i){switch(i.label){case 0:return r="conversationType:".concat(t.conversationType,",targetId:").concat(t.targetId,",\n channelId: ").concat(t.channelId,", messageUid:").concat(n),o=a.createTraceId(),a.info(e.LogTagId.A_GET_MESSAGE_READ_RECEIPT_V4_T,r,o),3!==(null==(u=s.getNaviInfoFromCache())?void 0:u.grpRRVer)?[2,{code:e.ErrorCode.READ_RECEIPT_V4_NOT_SUPPORT}]:[4,s.getMessageReadReceiptV4(t,n)];case 1:return d=i.sent(),c=d.code,_=d.msg,l=d.data,a[c===e.ErrorCode.SUCCESS?"info":"warn"](e.LogTagId.A_GET_MESSAGE_READ_RECEIPT_V4_R,"code: ".concat(c,", msg: ").concat(_),o),c===e.ErrorCode.SUCCESS&&l?[2,{code:c,data:l}]:[2,{code:c,msg:_}]}}))}))}))]}))}))},exports.getMessageReader=function(t,n,r){return o(this,void 0,void 0,(function(){var s=this;return i(this,(function(a){return[2,new e.ValidatorManage(f.A_GET_MESSAGE_READER_T,f.A_GET_MESSAGE_READER_R).validate("messageUId",n,e.AssertRules.STRING,!0).validate("targetId",t,e.AssertRules.STRING,!0).validate("channelId",r,e.AssertRules.CHANNEL_ID).ifReady((function(a,u){return o(s,void 0,void 0,(function(){var o,s,d,c;return i(this,(function(i){switch(i.label){case 0:return o=u.createTraceId(),u.info(f.A_GET_MESSAGE_READER_T,JSON.stringify({targetId:t,messageUId:n,channelId:r}),o),[4,a.getMessageReader(t,n,r)];case 1:return s=i.sent(),d=s.code,c=s.data,d===e.ErrorCode.SUCCESS?(u.info(f.A_GET_MESSAGE_READER_R,JSON.stringify({code:d,totalMemberCount:null==c?void 0:c.totalMemberCount}),o),[2,{code:d,data:c}]):(u.warn(f.A_GET_MESSAGE_READER_R,JSON.stringify({code:d})),[2,{code:d,msg:O[d]}])}}))}))}))]}))}))},exports.getMessagesReadReceiptByUsersV5=function(e,t,n){return o(this,void 0,void 0,(function(){var r=this;return i(this,(function(s){return[2,h().next((function(s){return o(r,void 0,void 0,(function(){return i(this,(function(r){return[2,s.getMessagesReadReceiptByUsersV5(e,t,n)]}))}))}))]}))}))},exports.getMessagesReadReceiptUsersByPageV5=function(e,t,n){return o(this,void 0,void 0,(function(){var r=this;return i(this,(function(s){return[2,h().next((function(s){return o(r,void 0,void 0,(function(){return i(this,(function(r){return[2,s.getMessagesReadReceiptUsersByPageV5(e,t,n)]}))}))}))]}))}))},exports.getMyUserProfile=function(){var t=this;return new e.ValidatorManage(f.A_GET_MY_USER_PROFILE_T,f.A_GET_MY_USER_PROFILE_R).ifReady((function(n,r){return o(t,void 0,void 0,(function(){var t,o,s,a,u;return i(this,(function(i){switch(i.label){case 0:return t=r.createTraceId(),r.info(f.A_GET_MY_USER_PROFILE_T,"",t),[4,n.getMyUserProfile()];case 1:return o=i.sent(),s=o.code,a=o.data,u=s===e.ErrorCode.SUCCESS?"info":"warn",r[u](f.A_GET_MY_USER_PROFILE_R,JSON.stringify({code:s,data:a}),t),[2,{code:s,data:a}]}}))}))}))},exports.getMyUserProfileVisibility=function(){var t=this;return new e.ValidatorManage(f.A_GET_MY_USER_PROFILE_VISIBILITY_T,f.A_GET_MY_USER_PROFILE_VISIBILITY_R).ifReady((function(n,r){return o(t,void 0,void 0,(function(){var t,o,s,a,u;return i(this,(function(i){switch(i.label){case 0:return t=r.createTraceId(),r.info(f.A_GET_MY_USER_PROFILE_VISIBILITY_T,"",t),[4,n.getMyUserProfileVisibility()];case 1:return o=i.sent(),s=o.code,a=o.data,u=s===e.ErrorCode.SUCCESS?"info":"warn",r[u](f.A_GET_MY_USER_PROFILE_VISIBILITY_R,JSON.stringify({code:s,data:a}),t),[2,{code:s,data:a}]}}))}))}))},exports.getNotificationQuietHoursSetting=function(){return h().next((function(e){return e.getNotificationQuietHoursSetting()}))},exports.getProxy=function(){return o(this,void 0,void 0,(function(){var t=this;return i(this,(function(n){return[2,new e.ValidatorManage(f.A_GET_PROXY_T,f.A_GET_PROXY_R).ifReady((function(n,r){return o(t,void 0,void 0,(function(){var t,o,s,a;return i(this,(function(i){switch(i.label){case 0:return t=r.createTraceId(),r.info(f.A_GET_PROXY_T,"",t),[4,n.getProxy()];case 1:return o=i.sent(),s=o.code,a=o.data,s===e.ErrorCode.SUCCESS?(r.info(f.A_GET_PROXY_R,JSON.stringify({code:s,data:a}),t),[2,{code:s,data:a}]):(r.warn(f.A_GET_PROXY_R,JSON.stringify({code:s}),t),[2,{code:s,msg:O[s]}])}}))}))}))]}))}))},exports.getRealtimeConTotalUnreadCount=function(){return o(this,void 0,void 0,(function(){return i(this,(function(e){return[2,h().next((function(e){return e.getRealtimeConTotalUnreadCount()}))]}))}))},exports.getRealtimeConUnreadCounts=function(e){return o(this,void 0,void 0,(function(){return i(this,(function(t){return[2,h().next((function(t){return t.batchGetRealtimeConUnreadCount(e)}))]}))}))},exports.getRealtimeConversations=function(e){return o(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,h().next((function(t){var n,r,o;return t.getRealtimeConversations(null!==(n=null==e?void 0:e.count)&&void 0!==n?n:30,null!==(r=null==e?void 0:e.startTime)&&void 0!==r?r:0,null!==(o=null==e?void 0:e.order)&&void 0!==o?o:0)}))];case 1:return[2,t.sent().trans((function(e){return e.map(d)}))]}}))}))},exports.getRemoteHistoryMessages=function(e,t){return o(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,h().next((function(n){return n.getRemoteHistoryMessages(e,t)}))];case 1:return[2,n.sent().trans((function(e){var t=e.list;return{hasMore:e.hasMore,list:t.map((function(e){return u(e)}))}}))]}}))}))},exports.getServerTime=function(){return g((function(e){return e.getServerTime()}))},exports.getSubscribeUserList=function(t,n,r){return o(this,void 0,void 0,(function(){var s=this;return i(this,(function(a){return[2,new e.ValidatorManage(f.A_GET_SUBSCRIBE_USER_STATUS_LIST_T,f.A_GET_SUBSCRIBE_USER_STATUS_LIST_R).validate("subscribeType",t,(function(t){return[e.SubscribeType.ONLINE_STATUS,e.SubscribeType.USER_PROFILE].includes(t)}),!0).validate("subscribePageSize",n,e.isInteger({min:1,max:200}),!0).validate("offset",r,e.isInteger({min:0}),!0).ifReady((function(a,u){return o(s,void 0,void 0,(function(){var o,s,d,c,_;return i(this,(function(i){switch(i.label){case 0:return o=u.createTraceId(),u.info(f.A_GET_SUBSCRIBE_USER_STATUS_LIST_T,JSON.stringify({pageSize:n,offset:r}),o),[4,a.getSubscribeUserList(t,n,r)];case 1:return s=i.sent(),d=s.code,c=s.data,_=d===e.ErrorCode.SUCCESS?"info":"warn",u[_](f.A_GET_SUBSCRIBE_USER_STATUS_LIST_R,JSON.stringify({code:d,data:c}),o),d===e.ErrorCode.SUCCESS?[2,{code:d,data:c}]:[2,{code:d}]}}))}))}))]}))}))},exports.getSubscribeUserStatus=function(e,t){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,h().next((function(n){return n.getSubscribeUserStatus(e,t)}))]}))}))},exports.getSubscribeUsersOnlineStatus=function(e){return h().next((function(t){return t.getSubscribeUsersOnlineStatus(e)}))},exports.getTags=function(){return o(this,void 0,void 0,(function(){return i(this,(function(e){return[2,h().next((function(e){return e.getTagList()}))]}))}))},exports.getTagsFromConversation=function(e){return o(this,void 0,void 0,(function(){return i(this,(function(t){return[2,h().next((function(t){return t.getTagsForConversation(e)}))]}))}))},exports.getTextMessageDraft=function(e){return o(this,void 0,void 0,(function(){return i(this,(function(t){return[2,h().next((function(t){return t.getTextMessageDraft(e)}))]}))}))},exports.getTopConversationList=function(e,t){return o(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,h().next((function(n){return n.getTopConversationList(e,t)}))];case 1:return[2,n.sent().trans((function(e){return e.map(d)}))]}}))}))},exports.getTotalUnreadCount=function(e,t){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,h().next((function(n){return n.getTotalUnreadCount(t,e)}))]}))}))},exports.getTotalUnreadCountByLevels=Le,exports.getTotalUnreadMentionedCountByLevels=Ge,exports.getTranslationLanguage=function(){return o(this,void 0,void 0,(function(){return i(this,(function(e){return[2,h().next((function(e){return e.getTranslationLanguage()}))]}))}))},exports.getUltraGroupDefaultNotificationLevel=function(e){return o(this,void 0,void 0,(function(){return i(this,(function(t){return[2,h().next((function(t){return t.getUltraGroupDefaultNotificationLevel(null==e?void 0:e.targetId,null==e?void 0:e.channelId)}))]}))}))},exports.getUltraGroupFirstUnreadMessageTimestamp=function(e){return o(this,void 0,void 0,(function(){return i(this,(function(t){return[2,h().next((function(t){return t.getUGFirstUnreadMessageDigest(e)}))]}))}))},exports.getUltraGroupList=function(e){return o(this,void 0,void 0,(function(){return i(this,(function(t){return[2,h().next((function(t){return t.getUltraGroupList(e)}))]}))}))},exports.getUltraGroupMessageListByMessageUId=function(e,t){return o(this,void 0,void 0,(function(){var n=this;return i(this,(function(r){switch(r.label){case 0:return[4,h().next((function(r){return o(n,void 0,void 0,(function(){return i(this,(function(n){return[2,r.getUltraGroupMessageListByMessageUId(e,t)]}))}))}))];case 1:return[2,r.sent().trans((function(e){var t={};for(var n in e)t[n]=e[n]?u(e[n]):void 0;return t}))]}}))}))},exports.getUltraGroupUnreadCountByTargetId=function(e,t){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,h().next((function(n){return n.getUGUnreadCountForAllChannels(e,!1,t)}))]}))}))},exports.getUltraGroupUnreadInfoList=function(e){return o(this,void 0,void 0,(function(){return i(this,(function(t){return[2,h().next((function(t){return t.getUGUnreadInfoList(e)}))]}))}))},exports.getUltraGroupUnreadMentionedCountByTargetId=function(e,t){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,h().next((function(n){return n.getUGUnreadCountForAllChannels(e,!0,t)}))]}))}))},exports.getUltraGroupUnreadMentionedMessages=function(e){return o(this,void 0,void 0,(function(){return i(this,(function(t){return[2,h().next((function(t){return t.getUGUnreadMentionedDigest(e)}))]}))}))},exports.getUnreadConversationList=function(e){return o(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,h().next((function(t){return t.getUnreadConversationList(e)}))];case 1:return[2,t.sent().trans((function(e){return e.map(d)}))]}}))}))},exports.getUnreadCount=function(e){return o(this,void 0,void 0,(function(){return i(this,(function(t){return[2,h().next((function(t){return t.getUnreadCount(e)}))]}))}))},exports.getUnreadCountByTag=function(e,t){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,h().next((function(n){return n.getUnreadCountByTag(e,t)}))]}))}))},exports.getUnreadMentionMeConversationList=function(e){return o(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,h().next((function(t){return t.getUnreadMentionMeConversationList(e)}))];case 1:return[2,t.sent().trans((function(e){return e.map(d)}))]}}))}))},exports.getUnreadMentionedCount=function(e){return o(this,void 0,void 0,(function(){return i(this,(function(t){return[2,h().next((function(t){return t.getUnreadMentionedCount(e)}))]}))}))},exports.getUnreadMentionedMessages=function(e){throw new Error("getUnreadMentionedMessages is deprecated, please use electronExtension.getUnreadMentionedMessages instead")},exports.getUserProfiles=function(e){return h().next((function(t){return t.getUserProfiles(e)}))},exports.init=function(t){!function(t){var n,o,i;v?p.warn(e.LogTagId.A_INIT_REPEAT_O):(e.assert("options.appkey",t.appkey,e.AssertRules.STRING,!0),e.assert("options.navigators",t.navigators,(function(t){return e.isArray(t)&&(0===t.length||t.every(e.isHttpUrl))})),e.assert("options.loggerProxy",t.loggerProxy,(function(t){return t instanceof e.LogDBProxy})),I=t,v=e.APIContext.init({appkey:t.appkey,navigators:t.navigators||[],miniCMPProxy:t.customCMP||[],logOutputLevel:t.logOutputLevel,httpInMainProcess:!!t.httpInMainProcess,logExpireTime:t.logExpireTime,areaCode:t.areaCode,logServerUrl:t.logServerUrl,uploadDomain:t.uploadDomain,environment:null!==(n=t.environment)&&void 0!==n?n:"default",eventLoopBlockingCheck:t.eventLoopBlockingCheck,enableReadReceiptStorage:null===(o=t.enableReadReceiptStorage)||void 0===o||o,useNaviV2:null!==(i=t.useNaviV2)&&void 0!==i&&i,loggerProxy:t.loggerProxy}),p=v.logger,v.assignWatcher(A),e.logger.init(p),v.sse.on("message",(function(e,t){var n=r(r({},t),{message:t.message?u(t.message):void 0});R.emit(exports.Events.STREAM_MESSAGE_RESPONSE,n)})))}(t)},exports.insertMessage=function(e,t,n){return void 0===n&&(n={}),o(this,void 0,void 0,(function(){return i(this,(function(r){return c("insertMessage","electronExtension.insertMessage"),[2,Je(e,t,n)]}))}))},exports.installPlugin=function(e,t){return g((function(n){return n.install(e,t)}))},exports.inviteUsersToGroup=function(t,n){return o(this,void 0,void 0,(function(){var r=this;return i(this,(function(s){return[2,new e.ValidatorManage(f.A_INVITE_USERS_TO_GROUP_T,f.A_INVITE_USERS_TO_GROUP_R).validateParameters("groupId",t,e.isValidTargetId,e.ErrorCode.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("userIds",n,e.isLimitedArray({minLength:1,maxLength:30,itemValidator:e.isValidTargetId}),e.ErrorCode.INVALID_PARAMETER_USERIDLIST).ifReady((function(s,a){return o(r,void 0,void 0,(function(){var r,o,u,d,c;return i(this,(function(i){switch(i.label){case 0:return r=a.createTraceId(),a.info(f.A_INVITE_USERS_TO_GROUP_T,JSON.stringify({groupId:t,userIds:n}),r),[4,s.inviteUsersToGroup(t,n)];case 1:return o=i.sent(),u=o.code,d=o.data,c=u===e.ErrorCode.SUCCESS?"info":"warn",a[c](f.A_INVITE_USERS_TO_GROUP_R,JSON.stringify({code:u}),r),u!==e.ErrorCode.SUCCESS?[2,{code:u}]:[2,{code:u,data:d}]}}))}))}))]}))}))},exports.joinChatRoom=function(e,t){return o(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,h().next((function(n){return n.chatroom.joinChatroom(e,null==t?void 0:t.count,!0,null==t?void 0:t.extra)}))];case 1:return[2,n.sent().wipe()]}}))}))},exports.joinExistChatRoom=function(e,t){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,h().next((function(n){return n.chatroom.joinChatroom(e,null==t?void 0:t.count,!1,null==t?void 0:t.extra)}))]}))}))},exports.joinGroup=function(t){return o(this,void 0,void 0,(function(){var n=this;return i(this,(function(r){return[2,new e.ValidatorManage(f.A_JOIN_GROUP_T,f.A_JOIN_GROUP_R).validateParameters("groupId",t,e.isValidTargetId,e.ErrorCode.INVALID_PARAMETER_GROUP_ID,!0).ifReady((function(r,s){return o(n,void 0,void 0,(function(){var n,o,a,u,d;return i(this,(function(i){switch(i.label){case 0:return n=s.createTraceId(),s.info(f.A_JOIN_GROUP_T,JSON.stringify({groupId:t}),n),[4,r.joinGroup(t)];case 1:return o=i.sent(),a=o.code,u=o.data,d=a===e.ErrorCode.SUCCESS?"info":"warn",s[d](f.A_JOIN_GROUP_R,JSON.stringify({code:a}),n),a!==e.ErrorCode.SUCCESS?[2,{code:a}]:[2,{code:a,data:u}]}}))}))}))]}))}))},exports.kickGroupMembers=function(t,n,r){return void 0===r&&(r={removeMuteStatus:!0,removeWhiteList:!0,removeFollow:!0}),o(this,void 0,void 0,(function(){var s=this;return i(this,(function(a){return[2,new e.ValidatorManage(f.A_KICK_GROUP_MEMBERS_T,f.A_KICK_GROUP_MEMBERS_R).validateParameters("groupId",t,e.isValidTargetId,e.ErrorCode.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("userIds",n,e.isLimitedArray({minLength:1,maxLength:100,itemValidator:e.isValidTargetId}),e.ErrorCode.INVALID_PARAMETER_USERIDLIST,!0).ifReady((function(a,u){return o(s,void 0,void 0,(function(){var o,s,d;return i(this,(function(i){switch(i.label){case 0:return o=u.createTraceId(),u.info(f.A_KICK_GROUP_MEMBERS_T,JSON.stringify({groupId:t,userIds:n,config:r}),o),[4,a.kickGroupMembers(t,n,r)];case 1:return s=i.sent().code,d=s===e.ErrorCode.SUCCESS?"info":"warn",u[d](f.A_KICK_GROUP_MEMBERS_R,JSON.stringify({code:s}),o),[2,{code:s}]}}))}))}))]}))}))},exports.modifyMessage=function(e,t){return o(this,void 0,void 0,(function(){return i(this,(function(n){return c("modifyMessage","modifyMessageWithParams"),[2,Ne({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}})]}))}))},exports.modifyMessageWithParams=Ne,exports.onceEventListener=function(e,t,n){R.once(e,t,n)},exports.quitChatRoom=function(e,t){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,h().next((function(n){return n.chatroom.quitChatroom(e,t)}))]}))}))},exports.quitGroup=function(t,n){return void 0===n&&(n={removeMuteStatus:!0,removeWhiteList:!0,removeFollow:!0}),o(this,void 0,void 0,(function(){var r=this;return i(this,(function(s){return[2,new e.ValidatorManage(f.A_QUIT_GROUP_T,f.A_QUIT_GROUP_R).validateParameters("groupId",t,e.isValidTargetId,e.ErrorCode.INVALID_PARAMETER_GROUP_ID,!0).ifReady((function(s,a){return o(r,void 0,void 0,(function(){var r,o,u;return i(this,(function(i){switch(i.label){case 0:return r=a.createTraceId(),a.info(f.A_QUIT_GROUP_T,JSON.stringify({groupId:t,config:n}),r),[4,s.quitGroup(t,n)];case 1:return o=i.sent().code,u=o===e.ErrorCode.SUCCESS?"info":"warn",a[u](f.A_QUIT_GROUP_R,JSON.stringify({code:o}),r),[2,{code:o}]}}))}))}))]}))}))},exports.recallMessage=Ce,exports.refreshReferenceMessageWithParams=function(e){return h().next((function(t){var n=function(e){return e.map((function(e){return{messageUId:e.messageUId,message:e.message?u(e.message):void 0,code:e.code}}))};return t.refreshReferenceMessageWithParams(r(r({},e),{remoteMessageBlock:function(t){e.remoteMessageBlock&&e.remoteMessageBlock(n(t))},localMessageBlock:function(t){e.localMessageBlock&&e.localMessageBlock(n(t))}}))}))},exports.refuseFriendApplication=function(t){var n=this;return new e.ValidatorManage(f.A_REFUSE_FRIEND_APPLICATION_T,f.A_REFUSE_FRIEND_APPLICATION_R).validateParameters("userId",t,e.isValidTargetId,e.ErrorCode.INVALID_PARAMETER_USER_ID,!0).ifReady((function(r,s){return o(n,void 0,void 0,(function(){var n;return i(this,(function(o){switch(o.label){case 0:return s.info(f.A_REFUSE_FRIEND_APPLICATION_T,JSON.stringify({userId:t})),[4,r.refuseFriendApplication(t,"")];case 1:return n=o.sent().code,s[n===e.ErrorCode.SUCCESS?"info":"warn"](f.A_REFUSE_FRIEND_APPLICATION_R,n),[2,{code:n}]}}))}))}))},exports.refuseGroupApplication=function(t,n,r,s){return o(this,void 0,void 0,(function(){var a=this;return i(this,(function(u){return[2,new e.ValidatorManage(f.A_REFUSE_GROUP_APPLICATION_T,f.A_REFUSE_GROUP_APPLICATION_R).validateParameters("groupId",t,e.isValidTargetId,e.ErrorCode.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("applicantId",n,e.isValidTargetId,e.ErrorCode.INVALID_PARAMETER_USER_ID,!0).validateParameters("inviterId",r,e.isValidTargetId,e.ErrorCode.INVALID_PARAMETER_USER_ID).validateParameters("reason",s,e.isLimitedString({maxLength:128}),e.ErrorCode.INVALID_PARAMETER_REASON).ifReady((function(u,d){return o(a,void 0,void 0,(function(){var o,a,c;return i(this,(function(i){switch(i.label){case 0:return o=d.createTraceId(),d.info(f.A_REFUSE_GROUP_APPLICATION_T,JSON.stringify({groupId:t,applicantId:n,reason:s}),o),[4,u.refuseGroupApplication(t,n,null!=r?r:"",null!=s?s:"")];case 1:return a=i.sent().code,c=a===e.ErrorCode.SUCCESS?"info":"warn",d[c](f.A_REFUSE_GROUP_APPLICATION_R,JSON.stringify({code:a}),o),[2,{code:a}]}}))}))}))]}))}))},exports.refuseGroupInvite=function(t,n,r){return o(this,void 0,void 0,(function(){var s=this;return i(this,(function(a){return[2,new e.ValidatorManage(f.A_REFUSE_GROUP_INVITE_T,f.A_REFUSE_GROUP_INVITE_R).validateParameters("groupId",t,e.isValidTargetId,e.ErrorCode.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("inviterId",n,e.isValidTargetId,e.ErrorCode.INVALID_PARAMETER_USER_ID,!0).validateParameters("reason",r,e.isLimitedString({maxLength:128}),e.ErrorCode.INVALID_PARAMETER_REASON).ifReady((function(a,u){return o(s,void 0,void 0,(function(){var o,s,d;return i(this,(function(i){switch(i.label){case 0:return o=u.createTraceId(),u.info(f.A_REFUSE_GROUP_INVITE_T,JSON.stringify({groupId:t,inviterId:n,reason:r}),o),[4,a.refuseGroupInvite(t,n,null!=r?r:"")];case 1:return s=i.sent().code,d=s===e.ErrorCode.SUCCESS?"info":"warn",u[d](f.A_REFUSE_GROUP_INVITE_R,JSON.stringify({code:s}),o),[2,{code:s}]}}))}))}))]}))}))},exports.registerMessageType=function(t,n,r,o,i){return g((function(s,a){return e.assert("messageType",t,e.AssertRules.STRING,!0),e.assert("isPersited",n,e.AssertRules.BOOLEAN,!0),e.assert("isCounted",r,e.AssertRules.BOOLEAN,!0),e.assert("isStatusMessage",i,e.AssertRules.BOOLEAN,!1),e.assert("searchProps",o,e.AssertRules.ARRAY),a.info(e.LogTagId.A_REGTYP_O,JSON.stringify({messageType:t,isCounted:r,isStatusMessage:i,isPersited:n})),s.registerMessageType(t,n,r,o,i),function(e,t,n){return void 0===t&&(t=!0),void 0===n&&(n=!0),function(r){return new D(e,r,t,n)}}(t,n,r)}))},exports.removeAllExpansionForUltraGroupMessage=function(e){return o(this,void 0,void 0,(function(){return i(this,(function(t){return[2,h().next((function(t){return t.removeAllMessageExpansion(e)}))]}))}))},exports.removeChatRoomEntries=function(e,t){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,h().next((function(n){return n.chatroom.removeChatroomEntries(e,{keys:null==t?void 0:t.entries,notificationExtra:null==t?void 0:t.notificationExtra})}))]}))}))},exports.removeChatRoomEntry=function(e,t){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,h().next((function(n){return n.chatroom.removeChatroomEntry(e,t,!1)}))]}))}))},exports.removeConversation=Me,exports.removeConversationsFromTag=function(e,t){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,h().next((function(n){return n.removeTagForConversations(e,t)}))]}))}))},exports.removeEventListener=function(e,t,n){R.off(e,t,n)},exports.removeEventListeners=function(e){R.removeAll(e)},exports.removeExpansionForUltraGroupMessage=function(e,t){return o(this,void 0,void 0,(function(){return i(this,(function(n){return c("removeExpansionForUltraGroupMessage","removeMessageExpansionForKey"),[2,Pe(e,t)]}))}))},exports.removeFromBlacklist=function(t){return o(this,void 0,void 0,(function(){var n=this;return i(this,(function(r){return[2,new e.ValidatorManage(f.A_REMOVE_FROM_BLACKLIST_T,f.A_REMOVE_FROM_BLACKLIST_R).validate("userId",t,e.AssertRules.STRING,!0).ifReady((function(r,s){return o(n,void 0,void 0,(function(){var n,o,a;return i(this,(function(i){switch(i.label){case 0:return n=s.createTraceId(),s.info(f.A_REMOVE_FROM_BLACKLIST_T,JSON.stringify({userId:t}),n),[4,r.removeFromBlacklist(t)];case 1:return o=i.sent(),a=o===e.ErrorCode.SUCCESS?"info":"warn",s[a](f.A_REMOVE_FROM_BLACKLIST_R,JSON.stringify({code:o}),n),[2,{code:o}]}}))}))}))]}))}))},exports.removeGroupFollows=function(t,n){return o(this,void 0,void 0,(function(){var r=this;return i(this,(function(s){return[2,new e.ValidatorManage(f.A_REMOVE_GROUP_FOLLOWS_T,f.A_REMOVE_GROUP_FOLLOWS_R).validateParameters("groupId",t,e.isValidTargetId,e.ErrorCode.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("userIds",n,e.isLimitedArray({minLength:1,maxLength:100,itemValidator:e.isValidTargetId}),e.ErrorCode.INVALID_PARAMETER_USERIDLIST,!0).ifReady((function(s,a){return o(r,void 0,void 0,(function(){var r,o,u;return i(this,(function(i){switch(i.label){case 0:return r=a.createTraceId(),a.info(f.A_REMOVE_GROUP_FOLLOWS_T,JSON.stringify({groupId:t,userIds:n}),r),[4,s.removeGroupFollows(t,n)];case 1:return o=i.sent().code,u=o===e.ErrorCode.SUCCESS?"info":"warn",a[u](f.A_REMOVE_GROUP_FOLLOWS_R,JSON.stringify({code:o}),r),[2,{code:o}]}}))}))}))]}))}))},exports.removeGroupManagers=function(t,n){return o(this,void 0,void 0,(function(){var r=this;return i(this,(function(s){return[2,new e.ValidatorManage(f.A_REMOVE_GROUP_MANAGERS_T,f.A_REMOVE_GROUP_MANAGERS_R).validateParameters("groupId",t,e.isValidTargetId,e.ErrorCode.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("userIds",n,e.isLimitedArray({minLength:1,maxLength:10,itemValidator:e.isValidTargetId}),e.ErrorCode.INVALID_PARAMETER_USERIDLIST,!0).ifReady((function(s,a){return o(r,void 0,void 0,(function(){var r,o,u;return i(this,(function(i){switch(i.label){case 0:return r=a.createTraceId(),a.info(f.A_REMOVE_GROUP_MANAGERS_T,JSON.stringify({groupId:t,userIds:n}),r),[4,s.setGroupManagers(2,t,n)];case 1:return o=i.sent().code,u=o===e.ErrorCode.SUCCESS?"info":"warn",a[u](f.A_REMOVE_GROUP_MANAGERS_R,JSON.stringify({code:o}),r),[2,{code:o}]}}))}))}))]}))}))},exports.removeMessageExpansionForKey=Pe,exports.removeMonitor=function(e){M.delete(e)},exports.removeNotificationQuietHoursSetting=function(){return h().next((function(e){return e.removeNotificationQuietHoursSetting()}))},exports.removeRealtimeConversations=function(e){return o(this,void 0,void 0,(function(){return i(this,(function(t){return[2,h().next((function(t){return t.removeRealtimeConversations(e)}))]}))}))},exports.removeTag=function(e){return o(this,void 0,void 0,(function(){return i(this,(function(t){return[2,h().next((function(t){return t.removeTag(e)}))]}))}))},exports.removeTagFromConversations=function(e,t){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,h().next((function(n){return n.removeTagForConversations(e,t)}))]}))}))},exports.removeTagsFromConversation=function(e,t){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,h().next((function(n){return n.removeTagsForConversation(e,t)}))]}))}))},exports.requestSpeechToTextForMessage=function(e,t){return h().next((function(n){return n.requestSpeechToTextForMessage(e,t)}))},exports.requestStreamMessageContent=function(e){return h().next((function(t){return t.sse.requestStreamMessageContent(e)}))},exports.saveTextMessageDraft=function(e,t){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,h().next((function(n){return n.saveTextMessageDraft(e,t)}))]}))}))},exports.searchConversationByContent=function(t,n,r,s){return o(this,void 0,void 0,(function(){return i(this,(function(o){return c("searchConversationByContent","electronExtension.searchConversationByContent"),[2,Ve(t,null!=r?r:[e.MessageType.TEXT,e.MessageType.FILE],s,n)]}))}))},exports.searchFriendsInfo=function(t){var n=this;return new e.ValidatorManage(f.A_SEARCH_FRIENDS_INFO_T,f.A_SEARCH_FRIENDS_INFO_R).validateParameters("name",t,e.isLimitedString({isTrim:!0,minLength:1,maxLength:64}),e.ErrorCode.INVALID_PARAMETER_NICK_NAME,!0).ifReady((function(r,s){return o(n,void 0,void 0,(function(){var n,o,a;return i(this,(function(i){switch(i.label){case 0:return s.info(f.A_SEARCH_FRIENDS_INFO_T,JSON.stringify({name:t})),[4,r.searchFriendsInfo(t)];case 1:return n=i.sent(),o=n.code,a=n.data,s[o===e.ErrorCode.SUCCESS?"info":"warn"](f.A_SEARCH_FRIENDS_INFO_R,JSON.stringify({code:o,data:a})),[2,{code:o,data:a}]}}))}))}))},exports.searchGroupMembers=function(t,n,r){return o(this,void 0,void 0,(function(){var s=this;return i(this,(function(a){return[2,new e.ValidatorManage(f.A_SEARCH_GROUP_MEMBERS_T,f.A_SEARCH_GROUP_MEMBERS_R).validateParameters("groupId",t,e.isValidTargetId,e.ErrorCode.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("name",n,e.isLimitedString({isTrim:!0,minLength:1,maxLength:64}),e.ErrorCode.INVALID_PARAMETER_NICK_NAME,!0).validateParameters("option",r,e.AssertRules.OBJECT,e.ErrorCode.INVALID_PARAMETER_PAGING_QUERY_OPTION,!0).validateParameters("option.count",r.count,e.isInteger({min:1,max:200}),e.ErrorCode.INVALID_PARAMETER_COUNT,!0).validateParameters("option.pageToken",null==r?void 0:r.pageToken,e.AssertRules.ONLY_STRING,e.ErrorCode.INVALID_PARAMETER_PAGING_QUERY_OPTION).validateParameters("option.order",null==r?void 0:r.order,e.AssertRules.BOOLEAN,e.ErrorCode.INVALID_PARAMETER_PAGING_QUERY_OPTION).ifReady((function(a,u){return o(s,void 0,void 0,(function(){var o,s,d,c,_;return i(this,(function(i){switch(i.label){case 0:return o=u.createTraceId(),u.info(f.A_SEARCH_GROUP_MEMBERS_T,JSON.stringify({groupId:t,name:n,option:r,formatOption:Qe(r)}),o),[4,a.searchGroupMembers(t,n,Qe(r))];case 1:return s=i.sent(),d=s.code,c=s.data,_=d===e.ErrorCode.SUCCESS?"info":"warn",u[_](f.A_SEARCH_GROUP_MEMBERS_R,JSON.stringify({code:d,data:c}),o),d!==e.ErrorCode.SUCCESS?[2,{code:d}]:[2,{code:d,data:c}]}}))}))}))]}))}))},exports.searchJoinedGroups=function(t,n){return o(this,void 0,void 0,(function(){var r=this;return i(this,(function(s){return[2,new e.ValidatorManage(f.A_SEARCH_JOINED_GROUPS_T,f.A_SEARCH_JOINED_GROUPS_R).validateParameters("groupName",t,e.isLimitedString({isTrim:!0,minLength:1,maxLength:64}),e.ErrorCode.INVALID_PARAMETER_GROUP_NAME,!0).validateParameters("option",n,e.AssertRules.OBJECT,e.ErrorCode.INVALID_PARAMETER_PAGING_QUERY_OPTION,!0).validateParameters("option.count",n.count,e.isInteger({min:1,max:200}),e.ErrorCode.INVALID_PARAMETER_COUNT,!0).validateParameters("option.pageToken",null==n?void 0:n.pageToken,e.AssertRules.ONLY_STRING,e.ErrorCode.INVALID_PARAMETER_PAGING_QUERY_OPTION).validateParameters("option.order",null==n?void 0:n.order,e.AssertRules.BOOLEAN,e.ErrorCode.INVALID_PARAMETER_PAGING_QUERY_OPTION).ifReady((function(s,a){return o(r,void 0,void 0,(function(){var r,o,u,d,c;return i(this,(function(i){switch(i.label){case 0:return r=a.createTraceId(),a.info(f.A_SEARCH_JOINED_GROUPS_T,JSON.stringify({groupName:t,option:n,formatOption:Qe(n)}),r),[4,s.searchJoinedGroups(t,Qe(n))];case 1:return o=i.sent(),u=o.code,d=o.data,c=u===e.ErrorCode.SUCCESS?"info":"warn",a[c](f.A_SEARCH_JOINED_GROUPS_R,JSON.stringify({code:u}),r),u!==e.ErrorCode.SUCCESS?[2,{code:u}]:[2,{code:u,data:d}]}}))}))}))]}))}))},exports.searchMessages=function(e,t,n,r){return o(this,void 0,void 0,(function(){return i(this,(function(o){return c("RongIMLib.searchMessages","RongIMLib.ElectronExtension.searchMessagesWithParams"),[2,we(e,t,n,r)]}))}))},exports.searchUserProfileByUniqueId=function(t){var n=this;return new e.ValidatorManage(f.A_SEARCH_USER_PROFILE_BY_UNIQUE_ID_T,f.A_SEARCH_USER_PROFILE_BY_UNIQUE_ID_R).validate("uniqueId",t,e.AssertRules.STRING,!0).ifReady((function(r,s){return o(n,void 0,void 0,(function(){var n,o,a,u,d;return i(this,(function(i){switch(i.label){case 0:return n=s.createTraceId(),s.info(f.A_SEARCH_USER_PROFILE_BY_UNIQUE_ID_T,t,n),[4,r.searchUserProfileByUniqueId(t)];case 1:return o=i.sent(),a=o.code,u=o.data,d=a===e.ErrorCode.SUCCESS?"info":"warn",s[d](f.A_SEARCH_USER_PROFILE_BY_UNIQUE_ID_R,JSON.stringify({code:a,data:u}),n),[2,{code:a,data:u}]}}))}))}))},exports.sendFileMessage=pe,exports.sendGIFMessage=ge,exports.sendHQVoiceMessage=me,exports.sendImageMessage=Se,exports.sendMessage=ve,exports.sendReadReceiptMessage=function(t,n,r,s){return o(this,void 0,void 0,(function(){var a=this;return i(this,(function(u){return[2,new e.ValidatorManage(e.LogTagId.A_SEND_MSG_T,e.LogTagId.A_SEND_MSG_R).validate("targetId",t,e.AssertRules.STRING,!0).validate("messageUId",n,e.AssertRules.STRING,!0).validate("timestamp",r,(function(t){return e.isNumber(t)&&t>0}),!0).validate("channelId",s,e.AssertRules.CHANNEL_ID).ifReady((function(u){return o(a,void 0,void 0,(function(){var o,a,u,d,c;return i(this,(function(i){switch(i.label){case 0:return o={targetId:t,conversationType:e.ConversationType.PRIVATE,channelId:s},a=new D("RC:ReadNtf",{messageUId:n,lastMessageSendTime:r,type:1}),[4,ve(o,a)];case 1:return u=i.sent(),d=u.code,c=u.msg,0===d?[2,{code:d}]:[2,{code:d,msg:c}]}}))}))}))]}))}))},exports.sendReadReceiptMessageV4=function(t,n,r){return void 0===r&&(r=""),o(this,void 0,void 0,(function(){var s=this;return i(this,(function(a){return[2,new e.ValidatorManage(e.LogTagId.A_SEND_MESSAGE_READ_RECEIPT_V4_T,e.LogTagId.A_SEND_MESSAGE_READ_RECEIPT_V4_R).validate("conversation",t,e.AssertRules.OBJECT,!0).validate("conversationType",null==t?void 0:t.conversationType,(function(t){return t===e.ConversationType.GROUP||t===e.ConversationType.PRIVATE}),!0,"It should be ConversationType.GROUP or ConversationType.PRIVATE").validate("targetId",null==t?void 0:t.targetId,e.AssertRules.STRING,!0).validate("channelId",null==t?void 0:t.channelId,e.AssertRules.CHANNEL_ID).validate("startMsgUId",r,e.AssertRules.ONLY_STRING,!0).validate("endMsgUId",n,e.AssertRules.STRING,!0).ifReady((function(a,u){return o(s,void 0,void 0,(function(){var o,s,d,c,_,l;return i(this,(function(i){switch(i.label){case 0:return o=u.createTraceId(),s="conversationType:".concat(t.conversationType,",targetId:").concat(t.targetId,",\n channelId: ").concat(t.channelId,", startMsgUId:").concat(r,", endMsgUId: ").concat(n),u.info(e.LogTagId.A_SEND_MESSAGE_READ_RECEIPT_V4_T,s,o),3!==(null==(d=a.getNaviInfoFromCache())?void 0:d.grpRRVer)?[2,{code:e.ErrorCode.READ_RECEIPT_V4_NOT_SUPPORT}]:[4,a.sendReadReceiptMessageV4(t,r,n)];case 1:return c=i.sent(),_=c.code,l=c.msg,u[_===e.ErrorCode.SUCCESS?"info":"warn"](e.LogTagId.A_SEND_MESSAGE_READ_RECEIPT_V4_R,"code: ".concat(_,", msg: ").concat(l),o),[2,{code:_,msg:l}]}}))}))}))]}))}))},exports.sendReadReceiptRequest=function(t,n,r){return o(this,void 0,void 0,(function(){var s=this;return i(this,(function(a){return[2,new e.ValidatorManage(e.LogTagId.A_SEND_MSG_T,e.LogTagId.A_SEND_MSG_R).validate("targetId",t,e.AssertRules.STRING,!0).validate("messageUId",n,e.AssertRules.STRING,!0).validate("channelId",r,e.AssertRules.CHANNEL_ID).ifReady((function(a,u){return o(s,void 0,void 0,(function(){var o,s,a,d,c,_;return i(this,(function(i){switch(i.label){case 0:return o="messageUId:".concat(n,",targetId:").concat(t),u.debug(e.LogTagId.A_SEND_MSG_T,"send read receipt message ->".concat(o)),s=new D("RC:RRReqMsg",{messageUId:n}),a={targetId:t,conversationType:e.ConversationType.GROUP,channelId:r},[4,ve(a,s)];case 1:return d=i.sent(),c=d.code,_=d.msg,0===c?[2,{code:c}]:[2,{code:c,msg:_}]}}))}))}))]}))}))},exports.sendReadReceiptResponse=function(e,t,n){return o(this,void 0,void 0,(function(){return i(this,(function(e){throw new Error("This method is deprecated, please use method sendReadReceiptResponseV2.")}))}))},exports.sendReadReceiptResponseV2=function(e,t,n){return o(this,void 0,void 0,(function(){return i(this,(function(r){return[2,h().next((function(r){return r.sendReadReceipt(e,t,n)}))]}))}))},exports.sendReadReceiptResponseV5=function(e,t){return o(this,void 0,void 0,(function(){var n=this;return i(this,(function(r){return[2,h().next((function(r){return o(n,void 0,void 0,(function(){return i(this,(function(n){return[2,r.sendReadReceiptResponseV5(e,t)]}))}))}))]}))}))},exports.sendSightMessage=he,exports.sendSyncReadStatusMessage=function(t,n){return o(this,void 0,void 0,(function(){var r=this;return i(this,(function(s){return[2,new e.ValidatorManage(e.LogTagId.A_SYNC_READ_STATUS_T,e.LogTagId.A_SYNC_READ_STATUS_R).validate("timestamp",n,e.AssertRules.NUMBER,!0).validate("conversation",t,e.AssertRules.OBJECT,!0).validate("conversationType",null==t?void 0:t.conversationType,(function(t){return[e.ConversationType.GROUP,e.ConversationType.PRIVATE,e.ConversationType.APP_PUBLIC_SERVICE,e.ConversationType.PUBLIC_SERVICE,e.ConversationType.SYSTEM].includes(t)}),!0).validate("targetId",null==t?void 0:t.targetId,e.AssertRules.STRING,!0).validate("channelId",null==t?void 0:t.channelId,e.AssertRules.CHANNEL_ID).ifReady((function(s,a){return o(r,void 0,void 0,(function(){var r,o,u,d,c,_,l;return i(this,(function(i){switch(i.label){case 0:return r="conversationType:".concat(t.conversationType,",targetId:").concat(t.targetId,",\n channelId: ").concat(t.channelId,", timestamp:").concat(n),o=a.createTraceId(),a.info(e.LogTagId.A_SYNC_READ_STATUS_T,r,o),1!==(null==(u=s.getNaviInfoFromCache())?void 0:u.sesDriven)?[3,2]:[4,s.updateConversationReadTime(t,n)];case 1:return d=i.sent(),[3,4];case 2:return c=new D(e.MessageType.SYNC_READ_STATUS,{lastMessageSendTime:n}),[4,ve(t,c)];case 3:d=i.sent(),i.label=4;case 4:return _=d.code,l=d.msg,a[_===e.ErrorCode.SUCCESS?"info":"warn"](e.LogTagId.A_SYNC_READ_STATUS_R,"code: ".concat(_,", msg: ").concat(l),o),[2,{code:_,msg:l}]}}))}))}))]}))}))},exports.sendTextMessage=function(e,t,n){var r=new q(t);return ve(e,r,n)},exports.sendTypingStatusMessage=function(t,n){return o(this,void 0,void 0,(function(){var r=this;return i(this,(function(s){return[2,new e.ValidatorManage(e.LogTagId.A_SEND_MSG_T,e.LogTagId.A_SEND_MSG_R).validate("conversation",t,e.AssertRules.OBJECT,!0).validate("conversationType",null==t?void 0:t.conversationType,e.AssertRules.CONVERSATION_TYPE,!0).validate("targetId",null==t?void 0:t.targetId,e.AssertRules.STRING,!0).validate("channelId",null==t?void 0:t.channelId,e.AssertRules.CHANNEL_ID).validate("messageType",n,e.AssertRules.STRING,!0).ifReady((function(s,a){return o(r,void 0,void 0,(function(){var r,o,d,c,_,l;return i(this,(function(i){switch(i.label){case 0:return r={messageType:"RC:TypSts",content:{typingContentType:n},isStatusMessage:!0,channelId:t.channelId},o=a.createTraceId(),a.info(e.LogTagId.A_SEND_MSG_T,JSON.stringify({messageType:r.messageType,conversationType:t.conversationType,targetId:t.targetId,channelId:t.channelId}),o),[4,s.sendMessage(t.conversationType,t.targetId,r,o)];case 1:return d=i.sent(),c=d.code,_=d.data,l=c===e.ErrorCode.SUCCESS?"info":"warn",a[l](e.LogTagId.A_SEND_MSG_R,JSON.stringify({code:c,messageUId:_?_.messageUId:"",messageId:_?_.messageId:""}),o),c===e.ErrorCode.SUCCESS?[2,{code:c,data:u(_)}]:[2,{code:c,msg:O[c]}]}}))}))}))]}))}))},exports.sendUltraGroupTypingStatus=function(e){return o(this,void 0,void 0,(function(){return i(this,(function(t){return[2,h().next((function(t){return t.sendUltraGroupTypingStatus(e)}))]}))}))},exports.setAutoTranslateEnabled=function(e){return o(this,void 0,void 0,(function(){return i(this,(function(t){return[2,h().next((function(t){return t.setAutoTranslateEnabled(e)}))]}))}))},exports.setChatRoomEntries=function(e,t){return o(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,h().next((function(n){return n.chatroom.setChatroomEntries(e,t)}))];case 1:return[2,n.sent().wipe()]}}))}))},exports.setChatRoomEntry=function(e,t){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,h().next((function(n){return n.chatroom.setChatroomEntry(e,t,!1)}))]}))}))},exports.setConversationNotificationLevel=be,exports.setConversationNotificationStatus=function(t,n){return o(this,void 0,void 0,(function(){var r=this;return i(this,(function(s){return[2,h().next((function(s){return o(r,void 0,void 0,(function(){var r;return i(this,(function(o){return n!==e.NotificationStatus.CLOSE&&n!==e.NotificationStatus.OPEN?[2,e.fail(e.ErrorCode.INVALID_PARAMETER_NOTIFICATION_LEVEL)]:(r=e.trans2NotificationLevel(n),[2,s.batchSetConversationNotificationLevel([t],r)])}))}))}))]}))}))},exports.setConversationToTop=xe,exports.setConversationToTopInTag=function(e,t,n){return o(this,void 0,void 0,(function(){return i(this,(function(r){return[2,h().next((function(r){return r.setConversationStatusInTag(e,t,{isTop:n})}))]}))}))},exports.setConversationTypeNotificationLevel=function(e,t){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,h().next((function(n){return n.setConversationTypeNotificationLevel(e,t)}))]}))}))},exports.setFriendAddPermission=function(t){var n=this;return new e.ValidatorManage(f.A_SET_ADD_FRIEND_PERMISSION_T,f.A_SET_ADD_FRIEND_PERMISSION_R).validateParameters("permission",t,(function(t){return e.isValidEnum({value:t,type:e.FriendAddPermission})}),e.ErrorCode.INVALID_PARAMETER_FRIEND_ADD_PERMISSION,!0).ifReady((function(r,s){return o(n,void 0,void 0,(function(){var n,o,a;return i(this,(function(i){switch(i.label){case 0:return s.info(f.A_SET_ADD_FRIEND_PERMISSION_T,JSON.stringify(t)),[4,r.setFriendAddPermission(t)];case 1:return n=i.sent(),o=n.code,a=n.data,s[o===e.ErrorCode.SUCCESS?"info":"warn"](f.A_SET_ADD_FRIEND_PERMISSION_R,JSON.stringify({code:o,data:a})),[2,{code:o}]}}))}))}))},exports.setFriendInfo=function(t,n,r){var s=this;return void 0===n&&(n=""),void 0===r&&(r={}),new e.ValidatorManage(f.A_SET_FRIEND_INFO_T,f.A_SET_FRIEND_INFO_R).validateParameters("userId",t,e.isValidTargetId,e.ErrorCode.INVALID_PARAMETER_USER_ID,!0).validateParameters("remark",n,e.isLimitedString({isTrim:!0,maxLength:64}),e.ErrorCode.INVALID_PARAMETER_REMARK).validateParameters("extProfile",r,e.AssertRules.OBJECT,e.ErrorCode.INVALID_PARAMETER_FRIEND_INFO_EXT_FIELDS).validateParameters("extProfile",r,(function(t){for(var n in t)if(!e.isString(t[n]))return!1;return!0}),e.ErrorCode.INVALID_PARAMETER_FRIEND_INFO_EXT_FIELDS).ifReady((function(a,u){return o(s,void 0,void 0,(function(){var o,s,d;return i(this,(function(i){switch(i.label){case 0:return u.info(f.A_SET_FRIEND_INFO_T,JSON.stringify({userId:t,remark:n,extProfile:r})),[4,a.setFriendInfo(t,n,r)];case 1:return o=i.sent(),s=o.code,d=o.data,u[s===e.ErrorCode.SUCCESS?"info":"warn"](f.A_SET_FRIEND_INFO_R,s),[2,{code:s,data:d}]}}))}))}))},exports.setGroupMemberInfo=function(t,n,r,s){return o(this,void 0,void 0,(function(){var a=this;return i(this,(function(u){return[2,new e.ValidatorManage(f.A_SET_GROUP_MEMBER_INFO_T,f.A_SET_GROUP_MEMBER_INFO_R).validateParameters("groupId",t,e.isValidTargetId,e.ErrorCode.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("userId",n,e.isValidTargetId,e.ErrorCode.INVALID_PARAMETER_USER_ID,!0).validateParameters("nickname",r,e.isLimitedString({isTrim:!0,maxLength:64}),e.ErrorCode.INVALID_PARAMETER_NICK_NAME,!0).validateParameters("extra",s,e.isLimitedString({maxLength:128}),e.ErrorCode.INVALID_PARAMETER_EXTRA).ifReady((function(u,d){return o(a,void 0,void 0,(function(){var o,a,c,_,l;return i(this,(function(i){switch(i.label){case 0:return o=d.createTraceId(),d.info(f.A_SET_GROUP_MEMBER_INFO_T,JSON.stringify({groupId:t,userId:n,nickname:r,extra:s}),o),[4,u.setGroupMemberInfo(t,n,r,s)];case 1:return a=i.sent(),c=a.code,_=a.data,l=c===e.ErrorCode.SUCCESS?"info":"warn",d[l](f.A_SET_GROUP_MEMBER_INFO_R,JSON.stringify({code:c}),o),c===e.ErrorCode.SUCCESS?[2,{code:c}]:[2,{code:c,data:_}]}}))}))}))]}))}))},exports.setGroupRemark=function(t,n){return o(this,void 0,void 0,(function(){var r=this;return i(this,(function(s){return[2,new e.ValidatorManage(f.A_SET_GROUP_REMARK_T,f.A_SET_GROUP_REMARK_R).validateParameters("groupId",t,e.isValidTargetId,e.ErrorCode.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("remark",n,e.isLimitedString({isTrim:!0,maxLength:64}),e.ErrorCode.INVALID_PARAMETER_REMARK,!0).ifReady((function(s,a){return o(r,void 0,void 0,(function(){var r,o,u;return i(this,(function(i){switch(i.label){case 0:return r=a.createTraceId(),a.info(f.A_SET_GROUP_REMARK_T,JSON.stringify({groupId:t,remark:n}),r),[4,s.setGroupRemark(t,n)];case 1:return o=i.sent().code,u=o===e.ErrorCode.SUCCESS?"info":"warn",a[u](f.A_SET_GROUP_REMARK_R,JSON.stringify({code:o}),r),[2,{code:o}]}}))}))}))]}))}))},exports.setMessageReceivedStatus=function(e,t){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,Be(e,t)]}))}))},exports.setNotificationQuietHoursWithSetting=function(e){return h().next((function(t){return t.setNotificationQuietHoursWithSetting(e)}))},exports.setProxy=function(t){return o(this,void 0,void 0,(function(){var n=this;return i(this,(function(r){return[2,new e.ValidatorManage(f.A_SET_PROXY_T,f.A_SET_PROXY_R).validate("set.proxy",t,(function(n){return!!(!t||e.validate("proxy.socksHost",t.socksHost,e.AssertRules.STRING,!0)&&e.validate("proxy.socksPort",t.socksPort,e.AssertRules.NUMBER,!0))})).ifReady((function(r,s){return o(n,void 0,void 0,(function(){var n,o,a;return i(this,(function(i){switch(i.label){case 0:return n=s.createTraceId(),s.info(f.A_SET_PROXY_T,JSON.stringify({socksHost:null==t?void 0:t.socksHost,socksPort:null==t?void 0:t.socksPort}),n),[4,r.setProxy(t)];case 1:return o=i.sent().code,a=o===e.ErrorCode.SUCCESS?"info":"warn",s[a](f.A_SET_PROXY_R,JSON.stringify({code:o}),n),o===e.ErrorCode.SUCCESS?[2,{code:o}]:[2,{code:o,msg:O[o]}]}}))}))}))]}))}))},exports.setTranslationLanguage=function(e){return o(this,void 0,void 0,(function(){return i(this,(function(t){return[2,h().next((function(t){return t.setTranslationLanguage(e)}))]}))}))},exports.setUltraGroupDefaultNotificationLevel=function(e,t){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,h().next((function(n){return n.setUltraGroupDefaultNotificationLevel(null==e?void 0:e.targetId,t,null==e?void 0:e.channelId)}))]}))}))},exports.stopUploadTask=function(t){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,{code:e.ErrorCode.SUCCESS,data:fe(t)}]}))}))},exports.subscribeUserStatus=function(t,n,r){return o(this,void 0,void 0,(function(){var s=this;return i(this,(function(a){return[2,new e.ValidatorManage(f.A_SUBSCRIBE_USER_STATUS_T,f.A_SUBSCRIBE_USER_STATUS_R).validate("subscribeUserIds",t,e.isLimitedArray({maxLength:200,minLength:1,itemValidator:e.isValidTargetId}),!0).validate("subscribeType",n,(function(t){return[e.SubscribeType.ONLINE_STATUS,e.SubscribeType.USER_PROFILE].includes(t)}),!0).validate("expiry",r,e.isInteger({min:60,max:2592e3}),!0).ifReady((function(a,u){return o(s,void 0,void 0,(function(){var o,s,d,c,_;return i(this,(function(i){switch(i.label){case 0:return o=u.createTraceId(),u.info(f.A_SUBSCRIBE_USER_STATUS_T,JSON.stringify({userIds:t,subscribeType:n,expiry:r}),o),[4,a.subscribeUser(t,n,r)];case 1:return s=i.sent(),d=s.code,c=s.data,_=d===e.ErrorCode.SUCCESS?"info":"warn",u[_](f.A_SUBSCRIBE_USER_STATUS_R,JSON.stringify({code:d,data:c}),o),[2,{code:d,data:c}]}}))}))}))]}))}))},exports.testProxy=function(t,n){return o(this,void 0,void 0,(function(){var r=this;return i(this,(function(s){return[2,new e.ValidatorManage(f.A_TEST_PROXY_T,f.A_TEST_PROXY_R).validate("test.proxy",t,e.AssertRules.OBJECT,!0).validate("test.proxy.socksHost",null==t?void 0:t.socksHost,e.AssertRules.STRING,!0).validate("test.proxy.socksPort",null==t?void 0:t.socksPort,e.AssertRules.NUMBER,!0).ifReady((function(s,a){return o(r,void 0,void 0,(function(){var r,o,u,d;return i(this,(function(i){switch(i.label){case 0:return r=a.createTraceId(),a.info(f.A_TEST_PROXY_T,JSON.stringify({socksHost:null==t?void 0:t.socksHost,socksPort:null==t?void 0:t.socksPort}),r),[4,s.testProxy(t,n)];case 1:return o=i.sent(),u=o.status,d=o.data,u===e.ErrorCode.SUCCESS?[2,{code:u,msg:d}]:(a.warn(f.A_TEST_PROXY_R,JSON.stringify({status:u}),r),[2,{code:u,msg:O[u]}])}}))}))}))]}))}))},exports.transferGroupOwner=function(t,n,r,s){return void 0===r&&(r=!1),void 0===s&&(s={removeMuteStatus:!0,removeWhiteList:!0,removeFollow:!0}),o(this,void 0,void 0,(function(){var a=this;return i(this,(function(u){return[2,new e.ValidatorManage(f.A_TRANSFER_GROUP_OWNER_T,f.A_TRANSFER_GROUP_OWNER_R).validateParameters("groupId",t,e.isValidTargetId,e.ErrorCode.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("newOwnerId",n,e.isValidTargetId,e.ErrorCode.INVALID_PARAMETER_USER_ID,!0).ifReady((function(u,d){return o(a,void 0,void 0,(function(){var o,a,c;return i(this,(function(i){switch(i.label){case 0:return o=d.createTraceId(),d.info(f.A_TRANSFER_GROUP_OWNER_T,JSON.stringify({groupId:t,newOwnerId:n,quitGroup:r,config:s}),o),[4,u.transferGroupOwner(t,n,s,r)];case 1:return a=i.sent().code,c=a===e.ErrorCode.SUCCESS?"info":"warn",d[c](f.A_TRANSFER_GROUP_OWNER_R,JSON.stringify({code:a}),o),[2,{code:a}]}}))}))}))]}))}))},exports.translateMessagesWithParams=function(e){return h().next((function(t){return t.translateMessagesWithParams(e)}))},exports.translateTextsWithParams=function(e){return h().next((function(t){return t.translateTextsWithParams(e)}))},exports.unSubscribeUserStatus=function(t,n){return o(this,void 0,void 0,(function(){var r=this;return i(this,(function(s){return[2,new e.ValidatorManage(f.A_UNSUBSCRIBE_USER_STATUS_T,f.A_UNSUBSCRIBE_USER_STATUS_R).validate("subscribeUserIds",t,e.isLimitedArray({maxLength:200,minLength:1,itemValidator:e.isValidTargetId}),!0).validate("subscribeType",n,(function(t){return[e.SubscribeType.ONLINE_STATUS,e.SubscribeType.USER_PROFILE].includes(t)}),!0).ifReady((function(s,a){return o(r,void 0,void 0,(function(){var r,o,u;return i(this,(function(i){switch(i.label){case 0:return r=a.createTraceId(),a.info(f.A_UNSUBSCRIBE_USER_STATUS_T,JSON.stringify({userIds:t,subscribeType:n}),r),[4,s.unSubscribeUser(t,n)];case 1:return o=i.sent().code,u=o===e.ErrorCode.SUCCESS?"info":"warn",a[u](f.A_UNSUBSCRIBE_USER_STATUS_R,JSON.stringify({code:o}),r),[2,{code:o}]}}))}))}))]}))}))},exports.updateExpansionForUltraGroupMessage=function(e,t){return o(this,void 0,void 0,(function(){return i(this,(function(n){return c("updateExpansionForUltraGroupMessage","updateMessageExpansion"),[2,Oe(e,t)]}))}))},exports.updateGroupInfo=function(t){return o(this,void 0,void 0,(function(){var n=this;return i(this,(function(r){return[2,new e.ValidatorManage(f.A_UPDATE_GROUP_INFO_T,f.A_UPDATE_GROUP_INFO_R).validateParameters("groupId",t.groupId,e.isValidTargetId,e.ErrorCode.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("groupName",t.groupName,e.isLimitedString({isTrim:!0,maxLength:64}),e.ErrorCode.INVALID_PARAMETER_GROUP_NAME).validateParameters("groupInfo.portraitUri",null==t?void 0:t.portraitUri,e.AssertRules.ONLY_STRING,e.ErrorCode.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.introduction",null==t?void 0:t.introduction,e.AssertRules.ONLY_STRING,e.ErrorCode.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.notice",null==t?void 0:t.notice,e.AssertRules.ONLY_STRING,e.ErrorCode.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.extProfile",null==t?void 0:t.extProfile,e.AssertRules.OBJECT,e.ErrorCode.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.extProfile",null==t?void 0:t.extProfile,(function(e){for(var t in e)if("string"!=typeof e[t])return!1;return!0}),e.ErrorCode.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.joinPermission",null==t?void 0:t.joinPermission,(function(t){return e.isValidEnum({value:t,type:e.GroupJoinPermission})}),e.ErrorCode.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.removeMemberPermission",null==t?void 0:t.removeMemberPermission,(function(t){return e.isValidEnum({value:t,type:e.GroupOperationPermission})}),e.ErrorCode.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.invitePermission",null==t?void 0:t.invitePermission,(function(t){return e.isValidEnum({value:t,type:e.GroupOperationPermission})}),e.ErrorCode.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.inviteHandlePermission",null==t?void 0:t.inviteHandlePermission,(function(t){return e.isValidEnum({value:t,type:e.GroupInviteHandlePermission})}),e.ErrorCode.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.groupInfoEditPermission",null==t?void 0:t.groupInfoEditPermission,(function(t){return e.isValidEnum({value:t,type:e.GroupOperationPermission})}),e.ErrorCode.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.memberInfoEditPermission",null==t?void 0:t.memberInfoEditPermission,(function(t){return e.isValidEnum({value:t,type:e.GroupMemberInfoEditPermission})}),e.ErrorCode.INVALID_PARAMETER_GROUP_INFO).ifReady((function(r,s){return o(n,void 0,void 0,(function(){var n,o,a,u,d,c,_,E,R,A,T;return i(this,(function(i){switch(i.label){case 0:return n=s.createTraceId(),s.info(f.A_UPDATE_GROUP_INFO_T,JSON.stringify({groupInfo:t}),n),o=t.groupId,a=t.extProfile,u={},d=Object.keys(l),Object.keys(t).forEach((function(e){d.includes(e)&&(u[l[e]]=t[e])})),[4,r.updateGroupInfo(o,u,a)];case 1:return c=i.sent(),_=c.code,E=c.msg,R=void 0===E?"":E,A=c.data,T=_===e.ErrorCode.SUCCESS?"info":"warn",s[T](f.A_UPDATE_GROUP_INFO_R,JSON.stringify({code:_}),n),_!==e.ErrorCode.SUCCESS?[2,{code:_,msg:R,data:A}]:[2,{code:_}]}}))}))}))]}))}))},exports.updateMessageExpansion=Oe,exports.updateMyUserProfile=function(t){var n=this;return new e.ValidatorManage(f.A_UPDATE_MY_USER_PROFILE_T,f.A_UPDATE_MY_USER_PROFILE_R).validate("profile",t,e.AssertRules.OBJECT,!0).validate("profile",t.name,e.AssertRules.ONLY_STRING).validate("profile",t.portraitUri,e.AssertRules.ONLY_STRING).validate("profile",t.email,e.AssertRules.ONLY_STRING).validate("profile",t.birthday,e.AssertRules.ONLY_STRING).validate("profile",t.gender,e.AssertRules.NUMBER).validate("profile",t.location,e.AssertRules.ONLY_STRING).validate("profile",t.role,e.AssertRules.NUMBER).validate("profile",t.level,e.AssertRules.NUMBER).validate("profile",t.extraProfile,e.AssertRules.OBJECT).validate("profile",t.extraProfile,(function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&"string"!=typeof e[t])return!1;return!0})).ifReady((function(s,a){return o(n,void 0,void 0,(function(){var n,o,u,d,c,_,l;return i(this,(function(i){switch(i.label){case 0:return n=a.createTraceId(),a.info(f.A_UPDATE_MY_USER_PROFILE_T,JSON.stringify({profile:t}),n),o=t.extraProfile,u={},["name","portraitUri","email","birthday","gender","location","role","level"].forEach((function(n){e.isUndefined(t[n])||(u[n]=t[n])})),e.isUndefined(o)||(u.extraProfile=r({},o)),[4,s.updateMyUserProfile(u)];case 1:return d=i.sent(),c=d.code,_=d.data,l=c===e.ErrorCode.SUCCESS?"info":"warn",a[l](f.A_UPDATE_MY_USER_PROFILE_R,JSON.stringify({code:c,data:_}),n),[2,{code:c,data:_}]}}))}))}))},exports.updateMyUserProfileVisibility=function(t){var n=this;return new e.ValidatorManage(f.A_UPDATE_MY_USER_PROFILE_VISIBILITY_T,f.A_UPDATE_MY_USER_PROFILE_VISIBILITY_R).validate("userProfileVisibility",t,(function(t){return e.isValidEnum({value:t,type:e.UserProfileVisibility})}),!0).ifReady((function(r,s){return o(n,void 0,void 0,(function(){var n,o,a,u,d;return i(this,(function(i){switch(i.label){case 0:return n=s.createTraceId(),s.info(f.A_UPDATE_MY_USER_PROFILE_VISIBILITY_T,t,n),[4,r.updateMyUserProfileVisibility(t)];case 1:return o=i.sent(),a=o.code,u=o.data,d=a===e.ErrorCode.SUCCESS?"info":"warn",s[d](f.A_UPDATE_MY_USER_PROFILE_VISIBILITY_R,JSON.stringify({code:a,data:u}),n),[2,{code:a,data:u}]}}))}))}))},exports.updateTag=function(e){return o(this,void 0,void 0,(function(){return i(this,(function(t){return[2,h().next((function(t){return t.updateTag(e)}))]}))}))},exports.upload=Ae;
|
|
15
|
+
***************************************************************************** */function n(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}var r,o,i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};function s(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{a(r.next(e))}catch(e){i(e)}}function u(e){try{a(r.throw(e))}catch(e){i(e)}}function a(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,u)}a((r=r.apply(e,t||[])).next())}))}function u(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function a(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s}function c(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}function f(e){return i(i({},e),{channelId:e.channelId||""})}function d(t){var n=t.conversationType,r=t.targetId,o=t.latestMessage,i=t.unreadMessageCount,s=t.hasMentioned,u=t.mentionedInfo,a=t.lastUnreadTime,c=t.notificationStatus,d=t.notificationLevel,l=t.isTop,p=t.channelId,v=t.unreadMentionedCount,h=t.matchCount,g=t.operationTime,m=t.draft,E=t.translateStrategy,x=t.editedMessageDraft,T=t.includeRobot,b={conversationType:n,targetId:r,latestMessage:o&&f(o),unreadMessageCount:i,hasMentioned:s,mentionedInfo:s?{type:null==u?void 0:u.type,userIdList:null==u?void 0:u.userIdList}:void 0,lastUnreadTime:a,notificationStatus:c,notificationLevel:d,isTop:l,channelId:p,unreadMentionedCount:v,matchCount:h,operationTime:g,draft:m||"",translateStrategy:E,editedMessageDraft:x,includeRobot:T};return b.conversationType===e.ConversationType.ULTRA_GROUP&&(b.firstUnreadMessage=t.firstUnreadMessage,b.channelType=t.channelType,b.unreadMentionedMeCount=t.unreadMentionedMeCount),b}function l(e,t){null===console||void 0===console||console.warn("Method '".concat(e,"' is deprecated, please use '").concat(t,"' instead"))}exports.Events=void 0,(r=exports.Events||(exports.Events={})).CONNECTING="CONNECTING",r.CONNECTED="CONNECTED",r.DISCONNECT="DISCONNECT",r.SUSPEND="SUSPEND",r.MESSAGES="MESSAGES",r.READ_RECEIPT_RECEIVED="READ_RECEIPT_RECEIVED",r.MESSAGE_RECEIPT_REQUEST="MESSAGE_RECEIPT_REQUEST",r.MESSAGE_RECEIPT_RESPONSE="MESSAGE_RECEIPT_RESPONSE",r.MESSAGE_READ_RECEIPT_V4="MESSAGE_READ_RECEIPT_V4",r.SYNC_READ_STATUS="SYNC_READ_STATUS",r.CONVERSATION="CONVERSATION",r.CHATROOM="CHATROOM",r.EXPANSION="EXPANSION",r.PULL_OFFLINE_MESSAGE_FINISHED="PULL_OFFLINE_MESSAGE_FINISHED",r.TAG="TAG",r.USER_SETTINGS_SYNCED="USER_SETTINGS_SYNCED",r.USER_SETTINGS_CHANGED="USER_SETTINGS_CHANGED",r.CONVERSATIONS_SETTINGS_SYNCED="CONVERSATIONS_SETTINGS_SYNCED",r.CONVERSATION_TAG="CONVERSATION_TAG",r.TYPING_STATUS="TYPING_STATUS",r.MESSAGE_BLOCKED="MESSAGE_BLOCKED",r.ULTRA_GROUP_ENABLE="ULTRA_GROUP_ENABLE",r.CONVERSATIONS_SYNCED="CONVERSATIONS_SYNCED",r.OPERATE_STATUS="OPERATE_STATUS",r.ULTRA_GROUP_MESSAGE_EXPANSION_UPDATED="ULTRA_GROUP_MESSAGE_EXPANSION_UPDATED",r.ULTRA_GROUP_MESSAGE_MODIFIED="MESSAGE_MODIFIED",r.ULTRA_GROUP_MESSAGE_RECALLED="ULTRA_GROUP_MESSAGE_RECALLED",r.ULTRA_GROUP_CHANNEL_TYPE_CHANGE="ULTRA_GROUP_CHANNEL_TYPE_CHANGE",r.ULTRA_GROUP_CHANNEL_DELETE="ULTRA_GROUP_CHANNEL_DELETE",r.ULTRA_GROUP_CHANNEL_USER_KICKED="ULTRA_GROUP_CHANNEL_USER_KICKED",r.USER_GROUP_STATUS="USER_GROUP_STATUS",r.SUBSCRIBED_USER_STATUS_CHANGE="SUBSCRIBED_USER_STATUS_CHANGE",r.SUBSCRIBED_RELATION_CHANGE="SUBSCRIBED_RELATION_CHANGE",r.SYNC_SUBSCRIBED_USER_STATUS_FINISHED="SYNC_SUBSCRIBED_USER_STATUS_FINISHED",r.OWN_USER_PROFILE_CHANGED="OWN_USER_PROFILE_CHANGED",r.GROUP_OPERATION="GROUP_OPERATION",r.GROUP_INFO_CHANGED="GROUP_INFO_CHANGED",r.GROUP_MEMBER_INFO_CHANGED="GROUP_MEMBER_INFO_CHANGED",r.GROUP_APPLICATION_EVENT="GROUP_APPLICATION_EVENT",r.GROUP_REMARK_CHANGED_SYNC="GROUP_REMARK_CHANGED_SYNC",r.GROUP_FOLLOWS_CHANGED_SYNC="GROUP_FOLLOWS_CHANGED_SYNC",r.FRIEND_ADDED="FRIEND_ADDED",r.FRIEND_DELETE="FRIEND_DELETE",r.FRIEND_APPLICATION_STATUS_CHANGED="FRIEND_APPLICATION_STATUS_CHANGED",r.FRIEND_CLEARED="FRIEND_CLEARED",r.FRIEND_INFO_CHANGED_SYNC="FRIEND_INFO_CHANGED_SYNC",r.DATABASE_OPENED="DATABASE_OPENED",r.DATABASE_UPGRADE_WILL_START="DATABASE_UPGRADE_WILL_START",r.DATABASE_UPGRADING="DATABASE_UPGRADING",r.DATABASE_UPGRADE_DID_COMPLETE="DATABASE_UPGRADE_DID_COMPLETE",r.STREAM_MESSAGE_RESPONSE="STREAM_MESSAGE_RESPONSE",r.MESSAGE_RECEIPT_RESPONSE_V5="MESSAGE_RECEIPT_RESPONSE_V5",r.SPEECH_TO_TEXT_RESPONSE="SPEECH_TO_TEXT_RESPONSE",r.TRANSLATE_RESPONSE="TRANSLATE_RESPONSE",r.MESSAGE_MODIFIED="MESSAGE_MODIFIED",r.MESSAGE_MODIFIED_SYNC_COMPLETED="MESSAGE_MODIFIED_SYNC_COMPLETED",r.ROBOTS_SYNCED="ROBOTS_SYNCED",function(e){e[e.DISALLOW=0]="DISALLOW",e[e.ALLOW=1]="ALLOW"}(o||(o={}));var p=new e.EventEmitter,v={connection:function(t,n){switch(t){case e.RCConnectionStatus.CONNECTED:p.emit(exports.Events.CONNECTED);break;case e.RCConnectionStatus.CONNECTING:p.emit(exports.Events.CONNECTING);break;case e.RCConnectionStatus.SUSPENDED:p.emit(exports.Events.SUSPEND,n);break;case e.RCConnectionStatus.DISCONNECTED:p.emit(exports.Events.DISCONNECT,n)}},batchMessage:function(e){p.emit(exports.Events.MESSAGES,{messages:e.map((function(e){return f(e)}))})},typingState:function(e){p.emit(exports.Events.TYPING_STATUS,{status:e})},readReceiptReceived:function(e,t,n,r){p.emit(exports.Events.READ_RECEIPT_RECEIVED,{conversation:e,messageUId:t,sentTime:n,sendUserId:r})},messageReceiptRequest:function(e,t,n){p.emit(exports.Events.MESSAGE_RECEIPT_REQUEST,{conversation:e,messageUId:t,senderUserId:n})},messageReceiptResponse:function(e,t,n){p.emit(exports.Events.MESSAGE_RECEIPT_RESPONSE,{conversation:e,receivedUserId:t,messageUIdList:n})},conversationState:function(t){var n=t.map((function(t){var n=t.conversation,r=t.updatedItems,o=n.conversationType,i=d(n);return o===e.ConversationType.ULTRA_GROUP&&(i.versionTime=n.versionTime,i.unreadMessageCount=h(n.unreadMessageCount||0),i.unreadMentionedCount=h(n.unreadMentionedCount||0),i.unreadMentionedMeCount=h(n.unreadMentionedMeCount||0)),{conversation:i,updatedItems:r}}));p.emit(exports.Events.CONVERSATION,{conversationList:n})},chatroomState:function(e){p.emit(exports.Events.CHATROOM,e)},expansion:function(e){p.emit(exports.Events.EXPANSION,e)},pullFinished:function(){p.emit(exports.Events.PULL_OFFLINE_MESSAGE_FINISHED)},tag:function(){p.emit(exports.Events.TAG)},userSettingsSynced:function(e){p.emit(exports.Events.USER_SETTINGS_SYNCED,e)},userSettingsChanged:function(e){p.emit(exports.Events.USER_SETTINGS_CHANGED,e)},conversationStatusSynced:function(e){p.emit(exports.Events.CONVERSATIONS_SETTINGS_SYNCED,e)},robotsSynced:function(e,t){p.emit(exports.Events.ROBOTS_SYNCED,e,t)},conversationTagChanged:function(){p.emit(exports.Events.CONVERSATION_TAG)},messageBlocked:function(e){p.emit(exports.Events.MESSAGE_BLOCKED,e)},ultraGroupEnable:function(){p.emit(exports.Events.ULTRA_GROUP_ENABLE)},sgRelationsSynced:function(e){p.emit(exports.Events.CONVERSATIONS_SYNCED,e)},operateStatus:function(e){p.emit(exports.Events.OPERATE_STATUS,e)},ultraGroupMessageExpansionUpdated:function(e){p.emit(exports.Events.ULTRA_GROUP_MESSAGE_EXPANSION_UPDATED,e.map((function(e){return f(e)})))},ultraGroupMessageRecalled:function(e){p.emit(exports.Events.ULTRA_GROUP_MESSAGE_RECALLED,e.map((function(e){return f(e)})))},ultraGroupChannelChangeType:function(e){p.emit(exports.Events.ULTRA_GROUP_CHANNEL_TYPE_CHANGE,e)},ultraGroupChannelUserKicked:function(e){p.emit(exports.Events.ULTRA_GROUP_CHANNEL_USER_KICKED,e)},ultraGroupChannelDelete:function(e){p.emit(exports.Events.ULTRA_GROUP_CHANNEL_DELETE,e)},userGroupStatus:function(e){p.emit(exports.Events.USER_GROUP_STATUS,e)},messageReadReceipt:function(e){p.emit(exports.Events.MESSAGE_READ_RECEIPT_V4,e)},syncReadStatus:function(e){p.emit(exports.Events.SYNC_READ_STATUS,e)},subscribedUserStatusChange:function(e){p.emit(exports.Events.SUBSCRIBED_USER_STATUS_CHANGE,e)},subscribedRelationChange:function(e){p.emit(exports.Events.SUBSCRIBED_RELATION_CHANGE,e)},syncSubscribedUserStatusFinished:function(e){p.emit(exports.Events.SYNC_SUBSCRIBED_USER_STATUS_FINISHED,e)},ownUserProfileChanged:function(e){p.emit(exports.Events.OWN_USER_PROFILE_CHANGED,e)},groupOperation:function(e){p.emit(exports.Events.GROUP_OPERATION,e)},groupInfoChanged:function(e){p.emit(exports.Events.GROUP_INFO_CHANGED,e)},groupMemberInfoChanged:function(e){p.emit(exports.Events.GROUP_MEMBER_INFO_CHANGED,e)},groupApplicationEvent:function(e){p.emit(exports.Events.GROUP_APPLICATION_EVENT,e)},groupRemarkChangedSync:function(e){p.emit(exports.Events.GROUP_REMARK_CHANGED_SYNC,e)},groupFollowsChangedSync:function(e){p.emit(exports.Events.GROUP_FOLLOWS_CHANGED_SYNC,e)},friendAdd:function(e){p.emit(exports.Events.FRIEND_ADDED,e)},friendDelete:function(e){p.emit(exports.Events.FRIEND_DELETE,e)},friendApplicationStatusChanged:function(e){p.emit(exports.Events.FRIEND_APPLICATION_STATUS_CHANGED,e)},friendCleared:function(e){p.emit(exports.Events.FRIEND_CLEARED,e)},friendInfoChangedSync:function(e){p.emit(exports.Events.FRIEND_INFO_CHANGED_SYNC,e)},databaseOpened:function(e,t){p.emit(exports.Events.DATABASE_OPENED,e,t)},databaseUpgradeWillStart:function(){p.emit(exports.Events.DATABASE_UPGRADE_WILL_START)},databaseUpgrading:function(e){p.emit(exports.Events.DATABASE_UPGRADING,e)},databaseUpgradeDidComplete:function(e){p.emit(exports.Events.DATABASE_UPGRADE_DID_COMPLETE,e)},readReceiptResponseV5:function(e){p.emit(exports.Events.MESSAGE_RECEIPT_RESPONSE_V5,e)},speechToTextResponse:function(e){p.emit(exports.Events.SPEECH_TO_TEXT_RESPONSE,e)},translateResponse:function(e){p.emit(exports.Events.TRANSLATE_RESPONSE,e)},messagesModified:function(e){p.emit(exports.Events.MESSAGE_MODIFIED,e.map((function(e){return f(e)})))},messageModifiedSyncCompleted:function(){p.emit(exports.Events.MESSAGE_MODIFIED_SYNC_COMPLETED)}};function h(e){return e>999?999:e}e.VersionManage.add("imlib-next","5.32.0-alpha.1");var g=null,m=null,E=null;function x(){return s(this,void 0,void 0,(function(){return u(this,(function(t){switch(t.label){case 0:return g?[4,e.APIContext.destroy()]:[2];case 1:return t.sent(),m=null,g=null,E=null,[2]}}))}))}function T(e){if(!g)throw new Error("Not initialized yet!");return e(g,E,m)}function b(){return g?e.ok(g):e.fail(e.ErrorCode.BIZ_ERROR_CLIENT_NOT_INIT)}var C=0,S=new Map;function y(e,t){var n=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var o=[],i=[];c([],a(S.values()),!1).forEach((function(e){var t=a(e,3),r=t[0],s=t[1],u=t[2];r===n&&(i.push(s),u&&o.push(u))})),o.forEach((function(t){e=t(e)}));var s=t.apply(void 0,c([],a(e),!1));return i.forEach((function(t){t(e,s)})),s};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}var M=y("disconnect",(function(e,t){return T((function(n){return n.disconnect(e,t)}))}));function _(){p.clear()}var R=function(e,t,n,r){void 0===n&&(n=!0),void 0===r&&(r=!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:r})},I=function(e){function t(t,n,r){return e.call(this,t,r,n.isPersited,n.isCounted)||this}return n(t,e),t}(R);var U,A=function(t){function r(n){return t.call(this,e.MessageType.COMBINE,e.getMessageTypeDescription(e.MessageType.COMBINE),n)||this}return n(r,t),r}(I),O=function(t){function r(n){return t.call(this,e.MessageType.COMBINE_V2,e.getMessageTypeDescription(e.MessageType.COMBINE_V2),n)||this}return n(r,t),r}(I),P=function(t){function r(n){return t.call(this,"RC:CmdMsg",e.getMessageTypeDescription("RC:CmdMsg"),n)||this}return n(r,t),r}(I),N=function(t){function r(n){return t.call(this,e.MessageType.FILE,e.getMessageTypeDescription(e.MessageType.FILE),n)||this}return n(r,t),r}(I),L=function(t){function r(n){return t.call(this,e.MessageType.GIF,e.getMessageTypeDescription(e.MessageType.GIF),n)||this}return n(r,t),r}(I),D=function(t){function r(n){return t.call(this,"RC:GrpNtf",e.getMessageTypeDescription("RC:GrpNtf"),n)||this}return n(r,t),r}(I),G=function(t){function r(n){return t.call(this,e.MessageType.IMAGE,e.getMessageTypeDescription(e.MessageType.IMAGE),n)||this}return n(r,t),r}(I),F=function(t){function r(n){return t.call(this,"RC:InfoNtf",e.getMessageTypeDescription("RC:InfoNtf"),n)||this}return n(r,t),r}(I),w=function(t){function r(n){return t.call(this,e.MessageType.LOCATION,e.getMessageTypeDescription(e.MessageType.LOCATION),n)||this}return n(r,t),r}(I),B=function(t){function r(n){return t.call(this,e.MessageType.REFERENCE,e.getMessageTypeDescription(e.MessageType.REFERENCE),n)||this}return n(r,t),r}(I),H=function(t){function r(n){return t.call(this,e.MessageType.RICH_CONTENT,e.getMessageTypeDescription(e.MessageType.RICH_CONTENT),n)||this}return n(r,t),r}(I),j=function(t){function r(n){return t.call(this,e.MessageType.SIGHT,e.getMessageTypeDescription(e.MessageType.SIGHT),n)||this}return n(r,t),r}(I),k=function(t){function r(n){return t.call(this,e.MessageType.TEXT,e.getMessageTypeDescription(e.MessageType.TEXT),n)||this}return n(r,t),r}(I),V=function(t){function r(n){return t.call(this,e.MessageType.HQ_VOICE,e.getMessageTypeDescription(e.MessageType.HQ_VOICE),n)||this}return n(r,t),r}(I),q=function(t){function r(n){return t.call(this,e.MessageType.VOICE,e.getMessageTypeDescription(e.MessageType.VOICE),n)||this}return n(r,t),r}(I);!function(e){e.ALIYUN="aliyun",e.S3="s3",e.MINIO="minio",e.QINIU="qiniu",e.RCX="rcx"}(U||(U={}));var W=function(){function t(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})}return Object.defineProperty(t.prototype,"isAbort",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._isAbort}}),Object.defineProperty(t.prototype,"abort",{enumerable:!1,configurable:!0,writable:!0,value:function(){this._isAbort=!0,this._abortHandler()}}),Object.defineProperty(t.prototype,"upload",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return t.file.size>e.MAX_UPLOAD_FILE_SIZE?Promise.resolve(e.fail(e.ErrorCode.UPLOAD_FAIL,"the file size is over 5GB!")):t.file.size>e.UPLOAD_FILE_CHUNK_SIZE&&this.multipartUpload?this.multipartUpload(t):this.commonUpload(t)}}),t}(),Y=function(t){function r(){var e=null!==t&&t.apply(this,arguments)||this;return Object.defineProperty(e,"_promise",{enumerable:!0,configurable:!0,writable:!0,value:null}),e}return n(r,t),Object.defineProperty(r.prototype,"commonUpload",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return s(this,void 0,void 0,(function(){var n,r,o,i,s,a;return u(this,(function(u){switch(u.label){case 0:return n=t.file,r=t.onProgress,t.fileType,o=this._authInfo,i={},(s=new FormData).set("token",o.token),s.set("key",o.fileName),s.set("file",n),this._promise=e.httpRequest({url:e.fixUrlProtocol(this._url),headers:i,onProgress:function(e){return null==r?void 0:r(e.loaded,e.total)},method:"POST",body:s,timeout:0}),[4,this._promise.result()];case 1:return a=u.sent().status,this._promise=null,200===a||204===a?[2,e.ok({uniqueName:o.fileName,uploadMethod:e.UploadMethod.QINIU})]:[2,e.fail(e.ErrorCode.UPLOAD_FAIL,a.toString())]}}))}))}}),Object.defineProperty(r.prototype,"_abortHandler",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e;null===(e=this._promise)||void 0===e||e.abort()}}),r}(W),z=function(t){function r(){var e=null!==t&&t.apply(this,arguments)||this;return Object.defineProperty(e,"_promise",{enumerable:!0,configurable:!0,writable:!0,value:null}),e}return n(r,t),Object.defineProperty(r.prototype,"commonUpload",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return s(this,void 0,void 0,(function(){var n,r,o,i,s,a;return u(this,(function(u){switch(u.label){case 0:return n=t.file,r=t.onProgress,t.fileType,o=this._authInfo,i=e.fixUrlProtocol("".concat(o.ossBucketName,".").concat(this._url)),(s=new FormData).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",n),this._promise=e.httpRequest({url:i,onProgress:function(e){return null==r?void 0:r(e.loaded,e.total)},method:"POST",body:s,timeout:0}),[4,this._promise.result()];case 1:return a=u.sent().status,this._promise=null,200===a||204===a?[2,e.ok({uniqueName:o.fileName,uploadMethod:e.UploadMethod.ALI})]:[2,e.fail(e.ErrorCode.UPLOAD_FAIL,a.toString())]}}))}))}}),Object.defineProperty(r.prototype,"_abortHandler",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e;null===(e=this._promise)||void 0===e||e.abort()}}),r}(W);function K(e){return Math.ceil(e/1024)||0}var Q,X=function(t){function r(){var n=null!==t&&t.apply(this,arguments)||this;return Object.defineProperty(n,"_promise",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(n,"isSupportMultipart",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(n,"multipartUpload",{enumerable:!0,configurable:!0,writable:!0,value:function(t){return s(n,void 0,void 0,(function(){var n,r,o,i,s,a,c,f,d,l,p,v,h,g,m,E;return u(this,(function(u){switch(u.label){case 0:return n=t.file,r=t.fileType,[4,this._getFileToken(r,n.name,"POST","uploads",void 0,K(n.size))];case 1:return(o=u.sent()).isOk?(i=o.data,s=e.fixUrlProtocol("".concat(this._url,"/").concat(i.minioBucketName,"/").concat(i.fileName)),a=this.getBaseHeaders(n,i,t),this._promise=e.httpRequest({url:"".concat(s,"?uploads"),headers:a,method:"POST"}),[4,this._promise.result()]):[2,o.wipe()];case 2:return c=u.sent(),f=c.status,d=c.data,this._promise=null,l=null===(E=null==d?void 0:d.match(/(?:<UploadId>)(\S*?)(?:<\/UploadId>)/))||void 0===E?void 0:E[1],200!==f&&204!==f||!l?[2,e.fail(e.ErrorCode.UPLOAD_FAIL,"start upload fail")]:(p=[],[4,this.requestUploadPart(s,n,l,i.fileName,t,p)]);case 3:return(v=u.sent()).isOk?[4,this._getFileToken(r,i.fileName,"POST","uploadId=".concat(l),void 0,K(n.size))]:[2,v.wipe()];case 4:return(o=u.sent()).isOk?(i=o.data,h=p.map((function(e,t){return"<Part><PartNumber>".concat(t+1,"</PartNumber><ETag>").concat(e,"</ETag></Part>")})).join(""),h="<CompleteMultipartUpload xmlns='http://s3.amazonaws.com/doc/2006-03-01/'>".concat(h,"</CompleteMultipartUpload>"),g=this.getBaseHeaders(n,i,t),this._promise=e.httpRequest({url:"".concat(s,"?uploadId=").concat(l),headers:g,method:"POST",body:h,timeout:0}),[4,this._promise.result()]):[2,o.wipe()];case 5:return m=u.sent().status,this._promise=null,200===m||204===m?[2,e.ok({uniqueName:i.fileName,uploadMethod:e.UploadMethod.MINIO})]:[2,e.fail(e.ErrorCode.UPLOAD_FAIL,"end upload fail")]}}))}))}}),n}return n(r,t),Object.defineProperty(r.prototype,"commonUpload",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return s(this,void 0,void 0,(function(){var n,r,o,i,s,a;return u(this,(function(u){switch(u.label){case 0:return n=t.file,r=t.onProgress,t.fileType,o=this._authInfo,i=e.fixUrlProtocol("".concat(this._url,"/").concat(o.minioBucketName,"/").concat(o.fileName)),s=this.getBaseHeaders(n,o,t),this._promise=e.httpRequest({url:i,headers:s,onProgress:function(e){return null==r?void 0:r(e.loaded,e.total)},method:"PUT",body:n,timeout:0}),[4,this._promise.result()];case 1:return a=u.sent().status,this._promise=null,200===a||204===a?[2,e.ok({uniqueName:o.fileName,uploadMethod:e.UploadMethod.MINIO})]:[2,e.fail(e.ErrorCode.UPLOAD_FAIL,a.toString())]}}))}))}}),Object.defineProperty(r.prototype,"requestUploadPart",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,r,o,i,a,c,f){return void 0===c&&(c=1),void 0===f&&(f=0),s(this,void 0,void 0,(function(){var s,d,l,p,v,h,g,m,E,x;return u(this,(function(u){switch(u.label){case 0:return f>=5?[2,e.fail(e.ErrorCode.UPLOAD_FAIL,"Upload retry times exceeded 5. Procedure")]:(s=(c-1)*e.UPLOAD_FILE_CHUNK_SIZE,d=Math.min(e.UPLOAD_FILE_CHUNK_SIZE,n.size-s),l="partNumber=".concat(c,"&uploadId=").concat(r),[4,this._getFileToken(i.fileType,o,"PUT",l,void 0,K(n.size))]);case 1:return(p=u.sent()).isOk?(v=p.data,h=n.slice(s,c*e.UPLOAD_FILE_CHUNK_SIZE),g=this.getBaseHeaders(n,v,i),this._promise=e.httpRequest({url:"".concat(t,"?").concat(l),headers:g,method:"PUT",body:h,timeout:0,onProgress:function(e){var t;return null===(t=null==i?void 0:i.onProgress)||void 0===t?void 0:t.call(i,s+e.loaded,n.size)}}),[4,this._promise.result()]):[2,p.wipe()];case 2:return m=u.sent(),E=m.status,x=m.xhr,this._promise=null,200===E||204===E?(a.push((null==x?void 0:x.getResponseHeader("ETag"))||""),s+d<n.size?[2,this.requestUploadPart(t,n,r,o,i,a,c+1,0)]:[2,e.ok()]):[2,this.requestUploadPart(t,n,r,o,i,a,c,f+1)]}}))}))}}),Object.defineProperty(r.prototype,"getBaseHeaders",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n){var r=n.contentDisposition||("text/html"===e.type?"inline":"attachment");return{"Content-Disposition":"".concat(r,"; filename=").concat(encodeURIComponent(e.name),";"),Authorization:t.minioAuthorization,"x-amz-content-sha256":t.minioContentSha256,"x-amz-date":t.minioDate,"Content-Type":e.type||"text/plain"}}}),Object.defineProperty(r.prototype,"_abortHandler",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e;null===(e=this._promise)||void 0===e||e.abort()}}),r}(W),J=function(t){function r(){var n=null!==t&&t.apply(this,arguments)||this;return Object.defineProperty(n,"isSupportMultipart",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(n,"_promise",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(n,"multipartUpload",{enumerable:!0,configurable:!0,writable:!0,value:function(t){return s(n,void 0,void 0,(function(){var n,r,o,i;return u(this,(function(s){return n=t.file,r=t.onProgress,t.fileType,o=e.UUId.gen(),i=this._authInfo,[2,this._requestUploadPart(o,n,i.token,r)]}))}))}}),n}return n(r,t),Object.defineProperty(r.prototype,"commonUpload",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return s(this,void 0,void 0,(function(){var n,r,o,i,s,a,c,f,d,l;return u(this,(function(u){switch(u.label){case 0:return n=t.file,r=t.onProgress,t.fileType,o=this._authInfo,i={},(s=new FormData).set("token",o.token),s.set("key",o.fileName),s.set("file",n),a=e.fixUrlProtocol(this._url),this._promise=e.httpRequest({url:a,headers:i,onProgress:function(e){return null==r?void 0:r(e.loaded,e.total)},method:"POST",body:s,timeout:0}),[4,this._promise.result()];case 1:return c=u.sent(),f=c.status,d=c.data,this._promise=null,200!==f&&204!==f||!d?[2,e.fail(e.ErrorCode.UPLOAD_FAIL,f.toString())]:(l=JSON.parse(d),[2,e.ok({uniqueName:l.rc_url.file_name,downloadUrl:"".concat(a,"/").concat(l.rc_url.path),uploadMethod:e.UploadMethod.QINIU})])}}))}))}}),Object.defineProperty(r.prototype,"_requestUploadPart",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,r,o,i){return void 0===i&&(i=0),s(this,void 0,void 0,(function(){var s,a,c,f,d,l,p,v,h,g;return u(this,(function(u){switch(u.label){case 0:return s=Math.min(e.UPLOAD_FILE_CHUNK_SIZE,n.size-i),a=t+n.name.substring(n.name.lastIndexOf(".")),c={Range:"bytes=".concat(i,"-").concat(i+s),"X-File-TransactionId":a,"X-File-Total-Size":n.size.toString()},f=n.slice(i,i+s),(d=new FormData).set("file",f,n.name),d.set("key",a),d.set("name",a),d.set("token",r),l=e.fixUrlProtocol(this._url),this._promise=e.httpRequest({url:l,headers:c,onProgress:function(e){return null==o?void 0:o(i+e.loaded,n.size)},method:"POST",body:d,timeout:0}),[4,this._promise.result()];case 1:return p=u.sent(),v=p.status,h=p.data,this._promise=null,200===v||204===v?i+s<n.size?[2,this._requestUploadPart(t,n,r,o,i+s)]:(g=JSON.parse(h),[2,e.ok({uniqueName:g.rc_url.file_name,downloadUrl:"".concat(l,"/").concat(g.rc_url.path),uploadMethod:e.UploadMethod.QINIU})]):[2,e.fail(e.ErrorCode.UPLOAD_FAIL,v.toString())]}}))}))}}),Object.defineProperty(r.prototype,"_abortHandler",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e;null===(e=this._promise)||void 0===e||e.abort()}}),r}(W),Z=function(t){function r(){var e=null!==t&&t.apply(this,arguments)||this;return Object.defineProperty(e,"_promise",{enumerable:!0,configurable:!0,writable:!0,value:null}),e}return n(r,t),Object.defineProperty(r.prototype,"commonUpload",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return s(this,void 0,void 0,(function(){var n,r,o,i,s,a,c,f,d;return u(this,(function(u){switch(u.label){case 0:return n=t.file,r=t.onProgress,t.fileType,o=t.contentDisposition,i=this._authInfo,s={},a=e.fixUrlProtocol("".concat(i.s3BucketName,".").concat(this._url)),c=new FormData,o?c.set("Content-Disposition",o):c.set("Content-Disposition","text/html"===n.type?"inline;":"attachment;"),c.set("Content-Type",n.type),c.set("x-amz-credential",i.s3Credential),c.set("x-amz-algorithm",i.s3Algorithm),c.set("x-amz-date",i.s3Date),c.set("policy",i.s3Policy),c.set("x-amz-signature",i.s3Signature),c.set("key",i.fileName),c.set("file",n),this._promise=e.httpRequest({url:a,headers:s,onProgress:function(e){return null==r?void 0:r(e.loaded,e.total)},method:"POST",body:c,timeout:0}),[4,this._promise.result()];case 1:return f=u.sent(),d=f.status,f.data,this._promise=null,200===d||204===d?[2,e.ok({uniqueName:i.fileName,uploadMethod:e.UploadMethod.AWS})]:[2,e.fail(e.ErrorCode.UPLOAD_FAIL,d.toString())]}}))}))}}),Object.defineProperty(r.prototype,"_abortHandler",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e;null===(e=this._promise)||void 0===e||e.abort()}}),r}(W);function $(t,n){var r=new AudioContext({sampleRate:16e3}),o=e.promiseWithResolvers(),s=o.promise,u=o.resolve;return r.decodeAudioData(t,(function(t){var r,o;u(e.ok(i(i({},n),{duration:t.duration,length:t.length,sampleRate:null!==(r=t.sampleRate)&&void 0!==r?r:void 0,numberOfChannels:null!==(o=t.numberOfChannels)&&void 0!==o?o:void 0})))}),(function(t){u(e.fail(e.ErrorCode.UPLOAD_FAIL,"get audio info fail:".concat(JSON.stringify(t))))})),s}var ee=((Q={})[U.QINIU]=Y,Q[U.ALIYUN]=z,Q[U.S3]=Z,Q[U.MINIO]=X,Q[U.RCX]=J,Q);function te(t,n,r){var o=e.promiseWithResolvers(),s=o.promise,u=o.resolve,a=document.createElement("canvas"),c=a.getContext("2d"),f=new Image;return f.onload=function(t){var o=r||{},s=o.maxHeight,d=void 0===s?160:s,l=o.maxWidth,p=void 0===l?160:l,v=o.quality,h=void 0===v?1:v,g=o.scale,m=void 0===g?1:g,E=re(f.width,f.height,{maxHeight:d,maxWidth:p,scale:m});a.width=Math.min(E.w,p),a.height=Math.min(E.h,d),c.drawImage(f,E.x,E.y,E.w,E.h);var x=ne(a,h);x=x.replace(/data:image\/[^;]+;base64,/,""),u(e.ok(i(i({},n),{thumbnail:x,width:Math.ceil(E.w),height:Math.ceil(E.h)})))},f.onerror=function(t){u(e.fail(e.ErrorCode.UPLOAD_FAIL,"get image info fail:".concat(JSON.stringify(t))))},f.src=(window.URL||window.webkitURL).createObjectURL(t),s}function ne(t,n){var r=t.toDataURL("image/jpeg",n);return r.length>e.MAX_MESSAGE_CONTENT_BYTES-10240?ne(t,n-.1):r}var re=function(e,t,n){var r,o,i=n.maxHeight,s=void 0===i?160:i,u=n.maxWidth,a=void 0===u?160:u,c=n.scale,f=e<t,d=0,l=0;return(f?t/e:e/t)>(void 0===c?1:c)?(f?(r=160,(o=t/(e/160))>s&&(l=(o-s)/2)):(o=160,(r=e/(t/160))>a&&(d=(r-a)/2)),{w:r,h:o,x:-d,y:-l}):(f?(o=s,r=e/(t/s)):(r=a,o=t/(e/a)),{w:r,h:o,x:-d,y:-l})},oe=0,ie=function(){function t(e,t){Object.defineProperty(this,"_promise",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_resolve",{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:++oe}),this._promise=this._handleUpload(e,t)}return Object.defineProperty(t.prototype,"abort",{enumerable:!1,configurable:!0,writable:!0,value:function(){var t;this._resolve(e.fail(e.ErrorCode.UPLOAD_FAIL,"upload abort")),null===(t=this._client)||void 0===t||t.abort()}}),Object.defineProperty(t.prototype,"_uploadInLoop",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,r,o,i){return void 0===i&&(i=[]),s(this,void 0,void 0,(function(){var s,a,c,f,d;return u(this,(function(u){switch(u.label){case 0:s=0,u.label=1;case 1:return s<t.length?(a=t[s],(c=ee[a.type])?(this._client=new c(a.url,r,o),[4,this._client.upload(n)]):(i.push({type:a.type,url:a.url,code:e.ErrorCode.UPLOAD_FAIL,msg:"Upload type not supported"}),[3,3])):[3,4];case 2:if((f=u.sent()).isOk)return[2,f];if(d=f.code,[e.ErrorCode.RC_FILE_SIZE_EXCEED_LIMIT,e.ErrorCode.INVALID_PARAMETER_SIZE_NOT_FOUND].includes(f.code))return[2,f];if(this._client.isAbort())return this._client=null,[2,f];this._client=null,i.push({type:a.type,url:a.url,code:d,msg:f.msg}),u.label=3;case 3:return s++,[3,1];case 4:return[2,e.fail(e.ErrorCode.UPLOAD_FAIL,"Failed to upload all channels, msg: ".concat(JSON.stringify(i)))]}}))}))}}),Object.defineProperty(t.prototype,"_handleUpload",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){return s(this,void 0,void 0,(function(){var r,o,i,s,a,c,f,d,l,p,v,h,g,m,E,x,T,b,C;return u(this,(function(u){switch(u.label){case 0:return r=n.getFileToken,o=n.customDomain,i=n.uploadServer,s=n.ossConfig,a=t.file,c=t.fileType,f=t.thumbnailConfig,[4,r(c,a.name,void 0,void 0,void 0,K(a.size))];case 1:return(d=u.sent()).isOk?(l=d.data,p=function(e,t,n){if(t)return[{type:U.RCX,url:t,p:"1"}];if(e)return JSON.parse(e).map((function(e){var t={type:U.QINIU,url:"",p:""};return Object.keys(e).forEach((function(n){"p"===n?t.p=e[n]:(t.type=n,t.url=e[n])})),t})).sort((function(e,t){return e.p-t.p}));var r=[];return n&&r.push({type:U.QINIU,url:n,p:"1"}),r}(l.ossConfig||s,o,i),0===p.length?[2,e.fail(e.ErrorCode.INVALID_PARAMETER_MEDIA_URL,"uploadUrlList is empty")]:[4,this._uploadInLoop(p,t,l,r)]):[2,d.wipe()];case 2:return v=u.sent(),h=v.code,g=v.data,m=v.msg,v.isOk?(x=(E=g).downloadUrl,T=E.uploadMethod,x?[3,4]:[4,n.getFileUrl(c,g.uniqueName,T,a.name)]):[2,e.fail(h,m)];case 3:if(!(b=u.sent()).isOk)return[2,e.fail(b.code,"Get download url fail")];x=b.data.downloadUrl,u.label=4;case 4:return x?(C={downloadUrl:x,uniqueName:(null==g?void 0:g.uniqueName)||"",name:a.name,size:a.size,type:a.type},c!==e.FileType.AUDIO?[3,6]:[4,a.arrayBuffer()]):[2,e.fail(e.ErrorCode.UPLOAD_FAIL,"Get download url fail")];case 5:return[2,$(u.sent(),C)];case 6:return c===e.FileType.IMAGE?[2,te(a,C,f)]:[2,e.ok(C)]}}))}))}}),Object.defineProperty(t.prototype,"awaitResult",{enumerable:!1,configurable:!0,writable:!0,value:function(){return s(this,void 0,void 0,(function(){return u(this,(function(e){return[2,this._promise]}))}))}}),t}(),se={};function ue(e,t){var n=new ie(e,t);return function(e){s(this,void 0,void 0,(function(){return u(this,(function(t){switch(t.label){case 0:return se[e.id]=e,[4,e.awaitResult()];case 1:return t.sent(),delete se[e.id],[2]}}))}))}(n),n}function ae(e){var t=se[e];return!!t&&(t.abort(),!0)}var ce=function(e,t){var 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 fe(t){return s(this,void 0,void 0,(function(){var n,r,o,i=this;return u(this,(function(a){return n=t.contentDisposition,r=t.fileType,o=t.file,[2,b().next((function(a){return s(i,void 0,void 0,(function(){return u(this,(function(i){switch(i.label){case 0:return[4,e.Validator.create("upload").validate("contentDisposition",n,(function(e){return"inline"===e||"attachment"===e}),!1).fail(e.ErrorCode.INVALID_PARAMETER_CONTENT_DISPOSITION).isNumberEnum("fileType",r,e.FileType,!0).fail(e.ErrorCode.INVALID_PARAMETER_MEDIA_TYPE).validate("file",o,(function(t){return t instanceof File&&(!(r===e.FileType.IMAGE&&!t.type.match(/^image\//))&&!(r===e.FileType.AUDIO&&!t.type.match(/^audio\//)))}),!0).fail(e.ErrorCode.MEDIA_EXCEPTION).result().next((function(){return function(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){return[2,new ie(e,t).awaitResult()]}))}))}(t,ce(a,a.getOptions().uploadDomain))}))];case 1:return[2,i.sent()]}}))}))}))]}))}))}var de=He,le=y("sendMessage",(function(t,n,r){return s(void 0,void 0,void 0,(function(){var o,s,a,c,d,l,p,v,h,g,m,E,x;return u(this,(function(u){switch(u.label){case 0:return s=(o=r||{}).disableNotification,a=o.isMentioned,c=o.directionalUserIdList,d=o.canIncludeExpansion,l=o.onSendBefore,p=o.expansion,v=o.pushConfig,h=o.isStatusMessage,g=o.disableUpdateLastMessage,m=function(e,t){var n=e.disableNotification,r=e.pushContent,o=e.pushData,s=e.isMentioned,u=e.mentionedType,a=e.mentionedUserIdList,c=e.directionalUserIdList,f=e.isVoipPush,d=e.canIncludeExpansion,l=e.expansion,p=e.isFilerWhiteBlacklist,v=e.pushConfig,h=e.messageId,g=e.disableUpdateLastMessage,m=e.needReceipt;return i({disableNotification:n,pushContent:r,pushData:o,isMentioned:s,mentionedType:u,mentionedUserIdList:a,directionalUserIdList:c,isVoipPush:f,canIncludeExpansion:d,expansion:l,isFilerWhiteBlacklist:p,pushConfig:v,messageId:h,disableUpdateLastMessage:g,needReceipt:m},t)}(r||{},n),E=i(i({},t),{isMentioned:!!a,content:n.content,messageType:n.messageType,isPersited:!!n.isPersited,isCounted:!!n.isCounted,disableNotification:!!s,canIncludeExpansion:!!d,expansion:p||null,senderUserId:"",messageUId:"",messageDirection:e.MessageDirection.SEND,receivedTime:0,isStatusMessage:!!h,receivedStatus:e.ReceivedStatus.UNREAD,isOffLineMessage:!1,pushConfig:v,sentStatus:e.SentStatus.SENDING,sentTime:0,directedUserIds:c||[],disableUpdateLastMessage:g}),[4,b().next((function(n){E.senderUserId=n.getCurrentUserId();return n.sendMessage(t,m,(function(t){E.messageId=t;try{l&&l(f(E))}catch(t){n.logger.error(e.LogTagId.L_CALLBACK_E,'Callback method "onSendBefore" execution error.\n'.concat(null==t?void 0:t.stack)),console.error(t)}}))}))];case 1:return(x=u.sent()).isOk?[2,x.trans((function(e){return f(e)}))]:(E.sentStatus=e.SentStatus.FAILED,[2,e.fail(x.code,x.msg,f(E))])}}))}))}));function pe(t,n){var r=this;return function(o,a,c,f){return s(r,void 0,void 0,(function(){var r,s,d,l,p,v,h,g,m,E,x,T,C;return u(this,(function(u){switch(u.label){case 0:if(!(r=b()).isOk)return[2,r.wipe()];if(s=r.data,!e.validate("sendOptions.contentDisposition",null==f?void 0:f.contentDisposition,(function(e){return["inline","attachment"].includes(e)})))return[2,e.fail(e.ErrorCode.INVALID_PARAMETER_SENDOPTIONS)];if(d={contentDisposition:null==f?void 0:f.contentDisposition},f&&"thumbnailConfig"in f){if(l=null===(T=f)||void 0===T?void 0:T.thumbnailConfig,!(e.validate("sendOptions.maxHeight",null==l?void 0:l.maxHeight,e.AssertRules.NUMBER)&&e.validate("sendOptions.maxWidth",null==l?void 0:l.maxWidth,e.AssertRules.NUMBER)&&e.validate("sendOptions.quality",null==l?void 0:l.quality,e.AssertRules.NUMBER)&&e.validate("sendOptions.scale",null==l?void 0:l.scale,e.AssertRules.NUMBER)))return[2,e.fail(e.ErrorCode.INVALID_PARAMETER_SENDOPTIONS)];d.thumbnailConfig=l}return p=s.logger,v=p.createTraceId(),p.info(e.LogTagId.L_MEDIA_UPLOAD_T,JSON.stringify({filesize:a.file.size,type:t}),v),[4,fe({file:a.file,fileType:t,onProgress:function(e,t){var n;null===(n=null==c?void 0:c.onProgress)||void 0===n||n.call(c,Math.floor(e/t*100))},contentDisposition:d.contentDisposition,thumbnailConfig:d.thumbnailConfig})];case 1:return h=u.sent(),g=h.code,m=h.data,E=h.msg,g===e.ErrorCode.SUCCESS&&m?(x=(null===(C=null==c?void 0:c.onComplete)||void 0===C?void 0:C.call(c,i({url:m.downloadUrl},m)))||n(m,a),p.info(e.LogTagId.L_MEDIA_UPLOAD_R,JSON.stringify({downurl:m.downloadUrl,code:e.ErrorCode.SUCCESS}),v),[2,le(o,x,f)]):[2,e.fail(g,E)]}}))}))}}var ve=pe(e.FileType.FILE,(function(e,t){var n,r,o={name:e.name,size:t.file.size,type:(n=e.name,r=n.match(/\.(\w+)$/),r?r[1]:"bin"),fileUrl:e.downloadUrl};return t.user&&(o.user=t.user),t.extra&&(o.extra=t.extra),t.mentionedInfo&&(o.mentionedInfo=t.mentionedInfo),new N(o)})),he=pe(e.FileType.IMAGE,(function(e,t){var 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 G(n)})),ge=pe(e.FileType.IMAGE,(function(e,t){var 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 L(n)})),me=pe(e.FileType.AUDIO,(function(e,t){var n,r={remoteUrl:e.downloadUrl,duration:Math.floor(null!==(n=e.duration)&&void 0!==n?n:0),sampleRate:e.sampleRate,numberOfChannels:e.numberOfChannels};return t.user&&(r.user=t.user),t.extra&&(r.extra=t.extra),t.mentionedInfo&&(r.mentionedInfo=t.mentionedInfo),t.audit&&(r.audit=t.audit),new V(r)})),Ee=pe(e.FileType.SIGHT,(function(e,t){var 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 j(n)}));pe(e.FileType.COMBINE_HTML,(function(e,t){var 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 A(n)}));var xe=y("recallMessage",(function(e,t){return s(void 0,void 0,void 0,(function(){return u(this,(function(n){return[2,b().next((function(n){return s(void 0,void 0,void 0,(function(){return u(this,(function(r){switch(r.label){case 0:return[4,n.recallMessage(e,t)];case 1:return[2,r.sent().trans((function(e){return f(e)}))]}}))}))}))]}))}))}));function Te(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){return[2,b().next((function(n){return n.updateMessageExpansion(e,t)}))]}))}))}function be(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){return[2,b().next((function(n){return n.removeMessageExpansion(e,t)}))]}))}))}function Ce(e){return b().next((function(t){return t.modifyMessageWithParams(e)}))}function Se(e){return s(this,void 0,void 0,(function(){var t=this;return u(this,(function(n){switch(n.label){case 0:return[4,b().next((function(n){return s(t,void 0,void 0,(function(){return u(this,(function(t){return[2,n.getAllConversationList(e)]}))}))}))];case 1:return[2,n.sent().trans((function(e){return e.map(d)}))]}}))}))}var ye=y("removeConversation",(function(e,t){return s(void 0,void 0,void 0,(function(){return u(this,(function(n){return[2,b().next((function(n){return n.removeConversation(e,t)}))]}))}))}));function Me(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){return[2,b().next((function(t){return t.batchDeleteConversations(e)}))]}))}))}function _e(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){return[2,b().next((function(n){return n.getTotalUnreadCountByLevels(e,t)}))]}))}))}function Re(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){return[2,b().next((function(n){return n.getTotalUnreadCountByLevels(e,t,!0)}))]}))}))}var Ie=y("clearMessagesUnreadStatus",(function(e){return s(void 0,void 0,void 0,(function(){return u(this,(function(t){return[2,b().next((function(t){return t.clearUnreadCount(e)}))]}))}))}));var Ue=y("setConversationNotificationLevel",(function(e,t){return s(void 0,void 0,void 0,(function(){return u(this,(function(n){return[2,b().next((function(n){return n.batchSetConversationNotificationLevel([e],t)}))]}))}))}));var Ae=y("setConversationToTop",(function(e,t,n,r){return void 0===t&&(t=!0),void 0===n&&(n=!0),void 0===r&&(r=!1),s(void 0,void 0,void 0,(function(){return u(this,(function(o){return[2,b().next((function(o){return o.batchSetConversationToTop([e],!!t,n,r)}))]}))}))}));function Oe(e,t,n,r){return s(this,void 0,void 0,(function(){var o=this;return u(this,(function(i){return[2,b().next((function(i){return s(o,void 0,void 0,(function(){return u(this,(function(o){switch(o.label){case 0:return[4,i.searchConversationByContent(e,t,n,r)];case 1:return[2,o.sent().trans((function(e){return e.map((function(e){return d(e)}))}))]}}))}))}))]}))}))}function Pe(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return[4,b().next((function(n){return n.searchMessages(e,t)}))];case 1:return[2,n.sent().trans((function(e){var t=e.totalMatched,n=e.messages;return e.conditionsMatched,{count:t,messages:n.map((function(e){return f(e)}))}}))]}}))}))}function Ne(t,n,r,o,i){return s(this,void 0,void 0,(function(){return u(this,(function(s){return l("RongIMLib.electronExtension.searchMessages","RongIMLib.electronExtension.searchMessagesWithParams"),[2,Pe(t,{keyword:n,limit:o||e.MAX_U32_INTEGER,order:0,timeRange:{endTime:r?r-1:r||0},messageFilter:{objectNames:i}})]}))}))}function Le(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){return l("setMessageReceivedStatus","setMessageReceivedStatusInfo"),[2,b().next((function(n){return n.setMessageReceivedStatus(e,t)}))]}))}))}function De(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){return[2,b().next((function(t){return t.clearLocalMessages(e)}))]}))}))}function Ge(e,t,n){return s(this,void 0,void 0,(function(){return u(this,(function(r){return[2,b().next((function(r){return r.deleteLocalMessagesByTimestamp(e,t,n)}))]}))}))}function Fe(e,t,n){return void 0===n&&(n={}),s(this,void 0,void 0,(function(){return u(this,(function(r){return t instanceof R?[2,Be(e,t,n)]:[2,we(e,t,n)]}))}))}function we(t,n,r){return void 0===r&&(r={}),s(this,void 0,void 0,(function(){var o,i,s,a;return u(this,(function(u){switch(u.label){case 0:return o=!!(null==r?void 0:r.isUnread),i=null==r?void 0:r.searchContent,s=null==r?void 0:r.disableUpdateLastMessage,a={senderUserId:null==n?void 0:n.senderUserId,messageType:null==n?void 0:n.messageType,content:null==n?void 0:n.content,messageDirection:null==n?void 0:n.messageDirection,readStatus:"object"==typeof(null==n?void 0:n.receivedStatusInfo)?e.transformReceivedStatusFlag(n.receivedStatusInfo):null==n?void 0:n.receivedStatus,sentTime:null==n?void 0:n.sentTime,sentStatus:null==n?void 0:n.sentStatus,searchContent:i,messageUId:"",isUnread:o,disableNotification:null==n?void 0:n.disableNotification,canIncludeExpansion:null==n?void 0:n.canIncludeExpansion,expansion:(null==n?void 0:n.expansion)||void 0,directedUserIds:null==n?void 0:n.directedUserIds,disableUpdateLastMessage:(null==n?void 0:n.disableUpdateLastMessage)||s},[4,b().next((function(e){return e.insertMessage(t,a)}))];case 1:return[2,u.sent().trans(f)]}}))}))}function Be(t,n,r){return void 0===r&&(r={}),s(this,void 0,void 0,(function(){var o,i,s,a;return u(this,(function(u){switch(u.label){case 0:return o=!!(null==r?void 0:r.isUnread),i=null==r?void 0:r.searchContent,s=null==r?void 0:r.disableUpdateLastMessage,a={senderUserId:"",messageType:null==n?void 0:n.messageType,content:null==n?void 0:n.content,searchContent:i,messageDirection:e.MessageDirection.SEND,isUnread:o,messageUId:"",disableUpdateLastMessage:s},[4,b().next((function(e){return e.insertMessage(t,a)}))];case 1:return[2,u.sent().trans(f)]}}))}))}function He(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){switch(t.label){case 0:return[4,b().next((function(t){return t.getLocalMessage(e)}))];case 1:return[2,t.sent().trans((function(e){return f(e)}))]}}))}))}var je=Object.freeze({__proto__:null,getAllConversationList:function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){return l("electronExtension.getAllConversationList","getAllConversationList"),[2,Se(e)]}))}))},getConversationList:function(e,t,n,r){return s(this,void 0,void 0,(function(){var o=this;return u(this,(function(i){switch(i.label){case 0:return l("electronExtension.getConversationList","getAllConversationList or getConversationListByTimestamp"),[4,b().next((function(i){return s(o,void 0,void 0,(function(){return u(this,(function(o){return[2,i.getConversationList({startTime:e,count:t,channelId:n,topPriority:r})]}))}))}))];case 1:return[2,i.sent().trans((function(e){return e.map((function(e){return d(e)}))}))]}}))}))},searchConversationByContent:Oe,getConversations:function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){switch(t.label){case 0:return[4,b().next((function(t){return t.getConversations(e)}))];case 1:return[2,t.sent().trans((function(e){return e.map(d)}))]}}))}))},getUntaggedConversationListByPage:function(e,t,n){return s(this,void 0,void 0,(function(){var r=this;return u(this,(function(o){return[2,b().next((function(o){return s(r,void 0,void 0,(function(){return u(this,(function(r){switch(r.label){case 0:return[4,o.getUntaggedConversationListByPage(e,t,n)];case 1:return[2,r.sent().trans((function(e){return e.map((function(e){return d(e)}))}))]}}))}))}))]}))}))},getRemoteConversations:function(){return s(this,void 0,void 0,(function(){return u(this,(function(e){return[2,b().next((function(e){return e.syncRemoteConversations()}))]}))}))},saveEditedMessageDraft:function(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){return[2,b().next((function(n){return n.chat.saveEditedMessageDraft(e,t)}))]}))}))},getEditedMessageDraft:function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){return[2,b().next((function(t){return t.chat.getEditedMessageDraft(e)}))]}))}))},clearEditedMessageDraft:function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){return[2,b().next((function(t){return t.chat.clearEditedMessageDraft(e)}))]}))}))},searchMessages:Ne,searchMessageInTimeRange:function(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){return l("RongIMLib.electronExtension.searchMessageInTimeRange","RongIMLib.electronExtension.searchMessagesWithParams"),[2,Pe(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,r){return s(this,void 0,void 0,(function(){return u(this,(function(o){switch(o.label){case 0:return l("RongIMLib.electronExtension.searchMessagesByUser","RongIMLib.electronExtension.searchMessagesWithParams"),[4,Pe(e,{limit:r,keyword:"",order:0,timeRange:{endTime:n?n-1:n||0},messageFilter:{senderIds:[t]}})];case 1:return[2,o.sent().trans((function(e){return{messages:e.messages}}))]}}))}))},getHistoryMessagesByMessageTypes:function(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return[4,b().next((function(n){return n.getHistoryMessagesByObjectNames(e,t)}))];case 1:return[2,n.sent().trans((function(e){var t=e.list,n=e.hasMore,r=t.map(f);return{messages:r,hasMore:n,list:r}}))]}}))}))},getContinuousMessages:function(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return[4,b().next((function(n){return n.getContinuousMessages(e,t)}))];case 1:return[2,n.sent().trans((function(e){var t=e.list,n=e.hasMore,r=e.timestamp;return{hasMore:n,list:t.map(f),timestamp:r}}))]}}))}))},setMessageStatusToRead:function(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){return[2,b().next((function(n){return n.setMessageStatusToRead(e,t)}))]}))}))},setMessageReceivedStatus:Le,setMessageReceivedStatusInfo:function(t,n){return s(this,void 0,void 0,(function(){var r;return u(this,(function(o){return r=e.transformReceivedStatusFlag(n||{}),[2,b().next((function(e){return e.setMessageReceivedStatus(t,r)}))]}))}))},setMessageSentStatus:function(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){return[2,b().next((function(n){return n.setMessageSentStatus(e,t)}))]}))}))},setMessageContent:function(e,t,n){return s(this,void 0,void 0,(function(){return u(this,(function(r){return[2,b().next((function(r){return r.setMessageContent(e,t,n)}))]}))}))},deleteMessages:function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){return[2,b().next((function(t){return t.deleteLocalMessages(e)}))]}))}))},clearMessages:De,deleteMessagesByTimestamp:Ge,batchClearMessagesByTimestamp:function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){return[2,b().next((function(t){return t.batchClearLocalMessagesByTimestamp(e)}))]}))}))},insertMessage:Fe,batchInsertMessage:function(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){return[2,b().next((function(n){return n.batchInsertMessage(e,t)}))]}))}))},getMessageCount:function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){return[2,b().next((function(t){return t.getLocalMessageCount(e)}))]}))}))},setCheckDuplicateMessage:function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){return[2,b().next((function(t){return t.setCheckDuplicateMessage(e)}))]}))}))},setCheckChatRoomDuplicateMessage:function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){return[2,b().next((function(t){return t.chatroom.setCheckChatRoomDuplicateMessage(!!e)}))]}))}))},getMessagesAroundTimestamp:function(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return[4,b().next((function(n){var r=null==t?void 0:t.timestamp,o=null==t?void 0:t.beforeCount,i=null==t?void 0:t.afterCount;return n.getMessagesAroundTimestamp(e,r,o,i)}))];case 1:return[2,n.sent().trans((function(e){return e.map(f)}))]}}))}))},getLocalMessage:He,searchMessagesWithParams:function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){switch(t.label){case 0:return[4,b().next((function(t){return t.searchMessagesWithParams(e)}))];case 1:return[2,t.sent().trans((function(e){e.totalMatched;var t=e.messages;return{count:e.conditionsMatched,messages:t.map((function(e){return f(e)}))}}))]}}))}))},setMessageSpeechToTextVisible:function(e,t){return b().next((function(n){return n.setMessageSpeechToTextVisible(e,t)}))},deleteUltraGroupMessagesForAllChannel:function(e,t){return b().next((function(n){return n.deleteLocalUGMessagesForAllChannel(e,t)}))},getUnreadMentionedMessages:function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){switch(t.label){case 0:return[4,b().next((function(t){return t.getUnreadMentionedMessages(e)}))];case 1:return[2,t.sent().trans((function(e){return e.map(f)}))]}}))}))},clearLocalData:function(){return s(this,void 0,void 0,(function(){return u(this,(function(e){return[2,b().next((function(e){return e.clearLocalData()}))]}))}))},enable:function(){return e.usingCppEngine()}});Object.defineProperty(exports,"AreaCode",{enumerable:!0,get:function(){return e.AreaCode}}),Object.defineProperty(exports,"ChatroomEntryType",{enumerable:!0,get:function(){return e.ChatroomEntryType}}),Object.defineProperty(exports,"ChatroomSyncStatusReason",{enumerable:!0,get:function(){return e.ChatroomSyncStatusReason}}),Object.defineProperty(exports,"ChatroomUserChangeType",{enumerable:!0,get:function(){return e.ChatroomUserChangeType}}),Object.defineProperty(exports,"ChrmMemBanType",{enumerable:!0,get:function(){return e.ChrmMemBanType}}),Object.defineProperty(exports,"ChrmMemOperateType",{enumerable:!0,get:function(){return e.ChrmMemOperateType}}),Object.defineProperty(exports,"ChrmSyncStatus",{enumerable:!0,get:function(){return e.ChrmSyncStatus}}),Object.defineProperty(exports,"ConnectionStatus",{enumerable:!0,get:function(){return e.ConnectionStatus}}),Object.defineProperty(exports,"ConversationType",{enumerable:!0,get:function(){return e.ConversationType}}),Object.defineProperty(exports,"DirectionType",{enumerable:!0,get:function(){return e.DirectionType}}),Object.defineProperty(exports,"ErrorCode",{enumerable:!0,get:function(){return e.ErrorCode}}),Object.defineProperty(exports,"FileType",{enumerable:!0,get:function(){return e.FileType}}),Object.defineProperty(exports,"FilterRobotType",{enumerable:!0,get:function(){return e.FilterRobotType}}),Object.defineProperty(exports,"FriendAddPermission",{enumerable:!0,get:function(){return e.FriendAddPermission}}),Object.defineProperty(exports,"FriendApplicationStatus",{enumerable:!0,get:function(){return e.FriendApplicationStatus}}),Object.defineProperty(exports,"FriendApplicationType",{enumerable:!0,get:function(){return e.FriendApplicationType}}),Object.defineProperty(exports,"FriendRelationType",{enumerable:!0,get:function(){return e.FriendRelationType}}),Object.defineProperty(exports,"GroupApplicationDirection",{enumerable:!0,get:function(){return e.GroupApplicationDirection}}),Object.defineProperty(exports,"GroupApplicationStatus",{enumerable:!0,get:function(){return e.GroupApplicationStatus}}),Object.defineProperty(exports,"GroupApplicationType",{enumerable:!0,get:function(){return e.GroupApplicationType}}),Object.defineProperty(exports,"GroupInviteHandlePermission",{enumerable:!0,get:function(){return e.GroupInviteHandlePermission}}),Object.defineProperty(exports,"GroupJoinPermission",{enumerable:!0,get:function(){return e.GroupJoinPermission}}),Object.defineProperty(exports,"GroupMemberInfoEditPermission",{enumerable:!0,get:function(){return e.GroupMemberInfoEditPermission}}),Object.defineProperty(exports,"GroupMemberRole",{enumerable:!0,get:function(){return e.GroupMemberRole}}),Object.defineProperty(exports,"GroupOperation",{enumerable:!0,get:function(){return e.GroupOperation}}),Object.defineProperty(exports,"GroupOperationPermission",{enumerable:!0,get:function(){return e.GroupOperationPermission}}),Object.defineProperty(exports,"GroupReadReceiptVersion",{enumerable:!0,get:function(){return e.GroupReadReceiptVersion}}),Object.defineProperty(exports,"InterruptionLevel",{enumerable:!0,get:function(){return e.InterruptionLevel}}),Object.defineProperty(exports,"LogL",{enumerable:!0,get:function(){return e.LogL}}),Object.defineProperty(exports,"LogLevel",{enumerable:!0,get:function(){return e.LogLevel}}),Object.defineProperty(exports,"MentionedType",{enumerable:!0,get:function(){return e.MentionedType}}),Object.defineProperty(exports,"MessageAuditType",{enumerable:!0,get:function(){return e.MessageAuditType}}),Object.defineProperty(exports,"MessageBlockSourceType",{enumerable:!0,get:function(){return e.MessageBlockSourceType}}),Object.defineProperty(exports,"MessageBlockType",{enumerable:!0,get:function(){return e.MessageBlockType}}),Object.defineProperty(exports,"MessageDirection",{enumerable:!0,get:function(){return e.MessageDirection}}),Object.defineProperty(exports,"MessageType",{enumerable:!0,get:function(){return e.MessageType}}),Object.defineProperty(exports,"NotificationLevel",{enumerable:!0,get:function(){return e.NotificationLevel}}),Object.defineProperty(exports,"NotificationStatus",{enumerable:!0,get:function(){return e.NotificationStatus}}),Object.defineProperty(exports,"OnlineStatus",{enumerable:!0,get:function(){return e.OnlineStatus}}),Object.defineProperty(exports,"OperateStatus",{enumerable:!0,get:function(){return e.OperateStatus}}),Object.defineProperty(exports,"Platform",{enumerable:!0,get:function(){return e.Platform}}),Object.defineProperty(exports,"PlatformInfo",{enumerable:!0,get:function(){return e.Platform}}),Object.defineProperty(exports,"PushImportanceHonor",{enumerable:!0,get:function(){return e.PushImportanceHonor}}),Object.defineProperty(exports,"PushNotificationQuietHoursLevel",{enumerable:!0,get:function(){return e.PushNotificationQuietHoursLevel}}),Object.defineProperty(exports,"QueryFriendsDirectionType",{enumerable:!0,get:function(){return e.QueryFriendsDirectionType}}),Object.defineProperty(exports,"RCConnectionStatus",{enumerable:!0,get:function(){return e.RCConnectionStatus}}),Object.defineProperty(exports,"ReceivedStatus",{enumerable:!0,get:function(){return e.ReceivedStatus}}),Object.defineProperty(exports,"ReferenceMessageStatus",{enumerable:!0,get:function(){return e.ReferenceMessageStatus}}),Object.defineProperty(exports,"SentStatus",{enumerable:!0,get:function(){return e.SentStatus}}),Object.defineProperty(exports,"SpeechToTextStatus",{enumerable:!0,get:function(){return e.SpeechToTextStatus}}),Object.defineProperty(exports,"StreamMessageResponseEventType",{enumerable:!0,get:function(){return e.StreamMessageResponseEventType}}),Object.defineProperty(exports,"SubscribeOperationType",{enumerable:!0,get:function(){return e.SubscribeOperationType}}),Object.defineProperty(exports,"SubscribeType",{enumerable:!0,get:function(){return e.SubscribeType}}),Object.defineProperty(exports,"TranslateMessageParam",{enumerable:!0,get:function(){return e.TranslateMessageParam}}),Object.defineProperty(exports,"TranslateMode",{enumerable:!0,get:function(){return e.TranslateMode}}),Object.defineProperty(exports,"TranslateStatus",{enumerable:!0,get:function(){return e.TranslateStatus}}),Object.defineProperty(exports,"TranslateStrategy",{enumerable:!0,get:function(){return e.TranslateStrategy}}),Object.defineProperty(exports,"TranslateTextParam",{enumerable:!0,get:function(){return e.TranslateTextParam}}),Object.defineProperty(exports,"UltraGroupChannelChangeType",{enumerable:!0,get:function(){return e.UltraGroupChannelChangeType}}),Object.defineProperty(exports,"UltraGroupChannelType",{enumerable:!0,get:function(){return e.UltraGroupChannelType}}),Object.defineProperty(exports,"UploadMethod",{enumerable:!0,get:function(){return e.UploadMethod}}),Object.defineProperty(exports,"UserProfileVisibility",{enumerable:!0,get:function(){return e.UserProfileVisibility}}),Object.defineProperty(exports,"UserSettingsChangedKey",{enumerable:!0,get:function(){return e.UserSettingsChangedKey}}),Object.defineProperty(exports,"UserType",{enumerable:!0,get:function(){return e.UserType}}),Object.defineProperty(exports,"createLogDBProxy",{enumerable:!0,get:function(){return e.createLogDBProxy}}),Object.defineProperty(exports,"fail",{enumerable:!0,get:function(){return e.fail}}),Object.defineProperty(exports,"ok",{enumerable:!0,get:function(){return e.ok}}),exports.BaseMessage=R,exports.CombineMessage=A,exports.CombineV2Message=O,exports.CommandMessage=P,exports.ConnectType={COMET:"_",WEBSOCKET:"_"},exports.FileMessage=N,exports.GIFMessage=L,exports.GroupNotificationMessage=D,exports.HQVoiceMessage=V,exports.ImageMessage=G,exports.InformationNotificationMessage=F,exports.LocationMessage=w,exports.ReferenceMessage=B,exports.RichContentMessage=H,exports.SightMessage=j,exports.TextMessage=k,exports.UploadTask=ie,exports.VoiceMessage=q,exports.__addSDKVersion=function(t,n){e.VersionManage.add(t,n)},exports.acceptFriendApplication=function(e){return b().next((function(t){return t.dataHosting.acceptFriendRequest(e)}))},exports.acceptGroupApplication=function(e,t,n){return s(this,void 0,void 0,(function(){return u(this,(function(r){return[2,b().next((function(r){return r.dataHosting.acceptGroupApplication(e,t,n)}))]}))}))},exports.acceptGroupInvite=function(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){return[2,b().next((function(n){return n.dataHosting.acceptGroupInvite(e,t)}))]}))}))},exports.addConversationsToTag=function(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){return[2,b().next((function(n){return n.addTagForConversations(e,t)}))]}))}))},exports.addEventListener=function(e,t,n){p.on(e,t,n)},exports.addFriend=function(e,t,n){return b().next((function(r){return r.dataHosting.addFriend(e,t,n)}))},exports.addGroupFollows=function(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){return[2,b().next((function(n){return n.dataHosting.addGroupFollows(e,t)}))]}))}))},exports.addGroupManagers=function(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){return[2,b().next((function(n){return n.dataHosting.addGroupManagers(e,t)}))]}))}))},exports.addMonitor=function(e,t,n){if(!e.monitorable)throw new Error("Not monitorable API: ".concat(e.name));var r=++C;return S.set(r,[e,t,n]),r},exports.addTag=function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){return[2,b().next((function(t){return t.createTag(e)}))]}))}))},exports.addToBlacklist=function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){return[2,b().next((function(t){return t.addToBlacklist(e)}))]}))}))},exports.batchClearRemoteHistoryMessages=function(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){return[2,b().next((function(n){return n.batchClearRemoteHistoryMessages(e,t)}))]}))}))},exports.batchDeleteConversations=Me,exports.batchGetMessageReadReceiptInfoV4=function(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){return[2,b().next((function(n){return n.chat.batchGetMessageReadReceiptInfoV4(e,t)}))]}))}))},exports.batchRemoveConversation=function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){return l("batchRemoveConversation","batchDeleteConversations"),[2,Me({identifiers:e,deleteRemotely:!1,deleteMessages:!1})]}))}))},exports.batchSetConversationNotificationLevel=function(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){return[2,b().next((function(n){return n.batchSetConversationNotificationLevel(e,t)}))]}))}))},exports.batchSetConversationToTop=function(e,t,n,r){return void 0===n&&(n=!0),void 0===r&&(r=!0),s(this,void 0,void 0,(function(){return u(this,(function(o){return[2,b().next((function(o){return o.batchSetConversationToTop(e,!!t,r,n)}))]}))}))},exports.batchSetConversationTranslateStrategy=function(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){return[2,b().next((function(n){return n.batchSetConversationTranslateStrategy(e,t)}))]}))}))},exports.bindRTCRoomForChatroom=function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){return[2,b().next((function(t){return t.chatroom.bindRTCRoomForChatroom(e)}))]}))}))},exports.checkFriends=function(e,t){return b().next((function(n){return n.dataHosting.checkFriends(e,t)}))},exports.clearAllMessagesUnreadStatus=function(){return s(this,void 0,void 0,(function(){return u(this,(function(e){return[2,b().next((function(e){return e.clearAllUnreadCount()}))]}))}))},exports.clearEventListeners=_,exports.clearHistoryMessages=function(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){return[2,b().next((function(n){return n.deleteRemoteMessageByTimestamp(e,t)}))]}))}))},exports.clearMessages=function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){return l("RongIMLib.clearMessages","RongIMLib.electronExtension.clearMessages"),[2,De(e)]}))}))},exports.clearMessagesUnreadStatus=Ie,exports.clearRealtimeConUnreadCount=function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){return[2,b().next((function(t){return t.clearRealtimeConUnreadCount(e)}))]}))}))},exports.clearTextMessageDraft=function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){return[2,b().next((function(t){return t.clearTextMessageDraft(e)}))]}))}))},exports.clearUnreadCountByTimestamp=function(e,t){return s(this,void 0,void 0,(function(){var n=this;return u(this,(function(r){return[2,b().next((function(r){return s(n,void 0,void 0,(function(){return u(this,(function(n){return[2,r.chat.clearUnreadCountByTimestamp(e,t)]}))}))}))]}))}))},exports.connect=function(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return[4,b().next((function(n){return n.connect(e,!!t)}))];case 1:return[2,n.sent().trans((function(e){return{userId:e}}))]}}))}))},exports.createConversationListLoader=function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){return[2,b().next((function(t){return t.chat.createConversationListLoader(e)}))]}))}))},exports.createGroup=function(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){return[2,b().next((function(n){return n.dataHosting.createGroup(e,t)}))]}))}))},exports.createUploadTask=function(t){return s(this,void 0,void 0,(function(){var n=this;return u(this,(function(r){return[2,b().next((function(r){return s(n,void 0,void 0,(function(){var n,o,i;return u(this,(function(s){return n=t.contentDisposition,o=t.fileType,i=t.file,[2,e.Validator.create("createUploadTask").validate("contentDisposition",n,(function(e){return"inline"===e||"attachment"===e}),!1).fail(e.ErrorCode.INVALID_PARAMETER_CONTENT_DISPOSITION).isNumberEnum("fileType",o,e.FileType,!0).fail(e.ErrorCode.INVALID_PARAMETER_MEDIA_TYPE).validate("file",i,(function(t){return t instanceof File&&(!(o===e.FileType.IMAGE&&!t.type.match(/^image\//))&&!(o===e.FileType.AUDIO&&!t.type.match(/^audio\//)))}),!0).fail(e.ErrorCode.MEDIA_EXCEPTION).result().trans((function(){return ue(t,ce(r,r.getOptions().uploadDomain))}))]}))}))}))]}))}))},exports.deleteFriends=function(e,t){return b().next((function(n){return n.dataHosting.deleteFriends(e,t)}))},exports.deleteLocalMessagesByTimestamp=function(e,t,n){return s(this,void 0,void 0,(function(){return u(this,(function(r){return l("RongIMLib.deleteLocalMessagesByTimestamp","RongIMLib.electronExtension.deleteMessagesByTimestamp"),[2,Ge(e,t,n)]}))}))},exports.deleteMessages=function(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){return[2,b().next((function(n){return n.deleteRemoteMessage(e,t)}))]}))}))},exports.destroy=function(){return s(this,void 0,void 0,(function(){return u(this,(function(e){return _(),[2,x()]}))}))},exports.disconnect=M,exports.dismissGroup=function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){return[2,b().next((function(t){return t.dataHosting.dismissGroup(e)}))]}))}))},exports.electronExtension=je,exports.forceRemoveChatRoomEntry=function(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){return[2,b().next((function(n){return n.chatroom.removeChatroomEntry(e,t,!0)}))]}))}))},exports.forceSetChatRoomEntry=function(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){return[2,b().next((function(n){return n.chatroom.setChatroomEntry(e,t,!0)}))]}))}))},exports.getAllChatRoomEntries=function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){return[2,b().next((function(t){return t.chatroom.getAllChatroomEntries(e)}))]}))}))},exports.getAllConversationList=Se,exports.getAllRobots=function(){return b().next((function(e){return e.getAllRobots()}))},exports.getAllUltraGroupUnreadCount=function(){return s(this,void 0,void 0,(function(){return u(this,(function(t){return l("getAllUltraGroupUnreadCount","getTotalUnreadCountByLevels"),[2,_e([e.ConversationType.ULTRA_GROUP],[])]}))}))},exports.getAllUltraGroupUnreadMentionedCount=function(){return s(this,void 0,void 0,(function(){return u(this,(function(t){return l("getAllUltraGroupUnreadMentionedCount","getTotalUnreadMentionedCountByLevels"),[2,Re([e.ConversationType.ULTRA_GROUP],[])]}))}))},exports.getAllUnreadMentionedCount=function(){return s(this,void 0,void 0,(function(){return u(this,(function(e){return[2,b().next((function(e){return e.getAllUnreadMentionedCount()}))]}))}))},exports.getAppSettings=function(){var e=b().tryTrans((function(e){return e.getAppSettings()}));return e.isOk?e.data:null},exports.getAutoTranslateEnabled=function(){return s(this,void 0,void 0,(function(){return u(this,(function(e){return[2,b().next((function(e){return e.getAutoTranslateEnabled()}))]}))}))},exports.getBlacklist=function(){return s(this,void 0,void 0,(function(){return u(this,(function(e){return[2,b().next((function(e){return e.getBlacklist()}))]}))}))},exports.getBlacklistStatus=function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){switch(t.label){case 0:return[4,b().next((function(t){return t.getBlacklistStatus(e)}))];case 1:return[2,t.sent().trans((function(e){return 0===e}))]}}))}))},exports.getBlockUltraGroupList=function(){return s(this,void 0,void 0,(function(){return u(this,(function(e){switch(e.label){case 0:return[4,b().next((function(e){return e.getBlockedUGList()}))];case 1:return[2,e.sent().trans((function(e){return e.map((function(e){return d(e)}))}))]}}))}))},exports.getBlockedConversationList=function(){return s(this,void 0,void 0,(function(){return u(this,(function(e){switch(e.label){case 0:return[4,b().next((function(e){return e.getBlockedConversationList()}))];case 1:return[2,e.sent().trans((function(e){return e.map(d)}))]}}))}))},exports.getChatRoomEntry=function(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){return[2,b().next((function(n){return n.chatroom.getChatroomEntry(e,t)}))]}))}))},exports.getChatRoomInfo=function(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){return[2,b().next((function(n){return n.chatroom.getChatroomInfo(e,null==t?void 0:t.count,null==t?void 0:t.order)}))]}))}))},exports.getChatroomHistoryMessages=function(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return[4,b().next((function(n){return n.chatroom.getChatroomHistoryMessages(e,null==t?void 0:t.count,null==t?void 0:t.order,null==t?void 0:t.timestamp)}))];case 1:return[2,n.sent().trans((function(e){var t=e.list;return{hasMore:e.hasMore,list:t.map((function(e){return f(e)}))}}))]}}))}))},exports.getConnectionStatus=function(){return T((function(e){return e.getConnectionStatus()}))},exports.getConversation=function(e){return s(this,void 0,void 0,(function(){var t=this;return u(this,(function(n){return[2,b().next((function(n){return s(t,void 0,void 0,(function(){return u(this,(function(t){switch(t.label){case 0:return[4,n.getConversation(e)];case 1:return[2,t.sent().trans((function(e){return d(e)}))]}}))}))}))]}))}))},exports.getConversationList=function(e,t){return s(this,void 0,void 0,(function(){var n=this;return u(this,(function(r){switch(r.label){case 0:return l("getConversationList","getConversationListByTimestamp"),[4,b().next((function(r){return s(n,void 0,void 0,(function(){return u(this,(function(n){return[2,r.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})]}))}))}))];case 1:return[2,r.sent().trans((function(e){return e.map(d)}))]}}))}))},exports.getConversationListByTimestamp=function(e){return s(this,void 0,void 0,(function(){var t=this;return u(this,(function(n){switch(n.label){case 0:return[4,b().next((function(n){return s(t,void 0,void 0,(function(){return u(this,(function(t){return[2,n.getConversationListByTimestamp(e)]}))}))}))];case 1:return[2,n.sent().trans((function(e){return e.map(d)}))]}}))}))},exports.getConversationNotificationLevel=function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){return[2,b().next((function(t){return t.getConversationNotificationLevel(e)}))]}))}))},exports.getConversationNotificationStatus=function(t){return s(this,void 0,void 0,(function(){var n=this;return u(this,(function(r){return[2,b().next((function(r){return s(n,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return[4,r.getConversationNotificationLevel(t)];case 1:return[2,n.sent().trans((function(t){return e.trans2NotificationStatus(t)}))]}}))}))}))]}))}))},exports.getConversationTypeNotificationLevel=function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){return[2,b().next((function(t){return t.getConversationTypeNotificationLevel(e)}))]}))}))},exports.getConversationsFromTagByPage=function(e,t,n){return s(this,void 0,void 0,(function(){return u(this,(function(r){switch(r.label){case 0:return[4,b().next((function(r){return r.getConversationListByTag(e,n,t)}))];case 1:return[2,r.sent().trans((function(e){return e.map((function(e){return i(i({},d(t=e)),{isTopInTag:t.isTopInTag});var t}))}))]}}))}))},exports.getConversationsIncludingRobots=function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){switch(t.label){case 0:return[4,b().next((function(t){return t.chat.getConversationsIncludingRobots(e)}))];case 1:return[2,t.sent().trans((function(e){return e.map(d)}))]}}))}))},exports.getCurrentUserId=function(){return T((function(e){return e.getCurrentUserId()}))},exports.getDeviceId=function(){return T((function(e){return e.getDeviceId()}))},exports.getDownloadAuth=function(t){var n=this;return b().next((function(r){return s(n,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return[4,e.Validator.create("getDownloadAuth").isNotEmptyString("url",t,!0).fail(e.ErrorCode.INVALID_PARAMETER_MEDIA_URL).result().next((function(){return r.getFileToken(1,void 0,void 0,void 0,t)}))];case 1:return[2,n.sent().trans((function(e){return{deadline:e.deadline,token:e.token,downloadAuthInfo:e.downloadAuthInfo}}))]}}))}))}))},exports.getFileToken=function(e,t,n,r){return b().next((function(o){return o.getFileToken(e,t,n,r)}))},exports.getFileUrl=function(t,n,r,o,i){return s(this,void 0,void 0,(function(){return u(this,(function(s){return(null==o?void 0:o.isBosRes)?[2,e.ok(o)]:[2,b().next((function(o){return o.getFileUrl(t,n,i||e.UploadMethod.QINIU,r)}))]}))}))},exports.getFirstUnreadMessage=function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){switch(t.label){case 0:return[4,b().next((function(t){return t.getFirstUnreadMessage(e)}))];case 1:return[2,t.sent().trans((function(e){return e?f(e):null}))]}}))}))},exports.getFirstUnreadMessageInfo=function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){return[2,b().next((function(t){return t.getFirstUnreadMessageDigest(e)}))]}))}))},exports.getFriendAddPermission=function(){return b().next((function(e){return e.dataHosting.getFriendAddPermission()}))},exports.getFriendApplications=function(e,t,n){return b().next((function(r){return r.dataHosting.getFriendApplications(e,t,n)}))},exports.getFriends=function(e,t){return b().next((function(n){return n.dataHosting.getFriends(e,t)}))},exports.getFriendsInfo=function(e){return b().next((function(t){return t.dataHosting.getFriendsInfo(e)}))},exports.getGroupApplications=function(e,t,n){return s(this,void 0,void 0,(function(){return u(this,(function(r){return[2,b().next((function(r){return r.dataHosting.getGroupApplications(e,t,n)}))]}))}))},exports.getGroupFollows=function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){return[2,b().next((function(t){return t.dataHosting.getGroupFollows(e)}))]}))}))},exports.getGroupMembers=function(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){return[2,b().next((function(n){return n.dataHosting.getGroupMembers(e,t)}))]}))}))},exports.getGroupMembersByRole=function(e,t,n){return s(this,void 0,void 0,(function(){return u(this,(function(r){return[2,b().next((function(r){return r.dataHosting.getGroupMembersByRole(e,t,n)}))]}))}))},exports.getGroupsInfo=function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){return[2,b().next((function(t){return t.dataHosting.getGroupsInfo(e)}))]}))}))},exports.getHistoryMessages=function(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return[4,b().next((function(n){return n.getHistoryMessage(e,t)}))];case 1:return[2,n.sent().trans((function(e){var t=e.list;return{hasMore:e.hasMore,list:t.map((function(e){return f(e)}))}}))]}}))}))},exports.getJoinedGroups=function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){return[2,b().next((function(t){return t.dataHosting.getJoinedGroups(e)}))]}))}))},exports.getJoinedGroupsByRole=function(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){return[2,b().next((function(n){return n.dataHosting.getJoinedGroupsByRole(t,e)}))]}))}))},exports.getMessage=de,exports.getMessageReadReceiptInfoV5=function(e,t){return s(this,void 0,void 0,(function(){var n=this;return u(this,(function(r){return[2,b().next((function(r){return s(n,void 0,void 0,(function(){return u(this,(function(n){return[2,r.getMessageReadReceiptInfoV5(e,t)]}))}))}))]}))}))},exports.getMessageReadReceiptInfoV5ByIdentifiers=function(e){return s(this,void 0,void 0,(function(){var t=this;return u(this,(function(n){return[2,b().next((function(n){return s(t,void 0,void 0,(function(){return u(this,(function(t){return[2,n.getMessageReadReceiptInfoV5ByIdentifiers(e)]}))}))}))]}))}))},exports.getMessageReadReceiptV4=function(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){return[2,b().next((function(n){return n.chat.getMessageReadReceiptV4(e,t)}))]}))}))},exports.getMessageReader=function(e,t,n){return s(this,void 0,void 0,(function(){var r=this;return u(this,(function(o){return[2,b().next((function(o){return s(r,void 0,void 0,(function(){return u(this,(function(r){return[2,o.chat.getMessageReader(e,t,n)]}))}))}))]}))}))},exports.getMessagesReadReceiptByUsersV5=function(e,t,n){return s(this,void 0,void 0,(function(){var r=this;return u(this,(function(o){return[2,b().next((function(o){return s(r,void 0,void 0,(function(){return u(this,(function(r){return[2,o.getMessagesReadReceiptByUsersV5(e,t,n)]}))}))}))]}))}))},exports.getMessagesReadReceiptUsersByPageV5=function(e,t,n){return s(this,void 0,void 0,(function(){var r=this;return u(this,(function(o){return[2,b().next((function(o){return s(r,void 0,void 0,(function(){return u(this,(function(r){return[2,o.getMessagesReadReceiptUsersByPageV5(e,t,n)]}))}))}))]}))}))},exports.getMyUserProfile=function(){return b().next((function(e){return e.getMyUserProfile()}))},exports.getMyUserProfileVisibility=function(){return b().next((function(e){return e.dataHosting.getMyUserProfileVisibility()}))},exports.getNotificationQuietHoursSetting=function(){return b().next((function(e){return e.getNotificationQuietHoursSetting()}))},exports.getProxy=function(){return s(this,void 0,void 0,(function(){return u(this,(function(e){return[2,b().next((function(e){return e.getProxy()}))]}))}))},exports.getRealtimeConTotalUnreadCount=function(){return s(this,void 0,void 0,(function(){return u(this,(function(e){return[2,b().next((function(e){return e.getRealtimeConTotalUnreadCount()}))]}))}))},exports.getRealtimeConUnreadCounts=function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){return[2,b().next((function(t){return t.batchGetRealtimeConUnreadCount(e)}))]}))}))},exports.getRealtimeConversations=function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){switch(t.label){case 0:return[4,b().next((function(t){var n,r,o;return t.getRealtimeConversations(null!==(n=null==e?void 0:e.count)&&void 0!==n?n:30,null!==(r=null==e?void 0:e.startTime)&&void 0!==r?r:0,null!==(o=null==e?void 0:e.order)&&void 0!==o?o:0)}))];case 1:return[2,t.sent().trans((function(e){return e.map(d)}))]}}))}))},exports.getRemoteHistoryMessages=function(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return[4,b().next((function(n){return n.getRemoteHistoryMessages(e,t)}))];case 1:return[2,n.sent().trans((function(e){var t=e.list;return{hasMore:e.hasMore,list:t.map((function(e){return f(e)}))}}))]}}))}))},exports.getRobotById=function(e){return b().next((function(t){return t.getRobotById(e)}))},exports.getServerTime=function(){return T((function(e){return e.getServerTime()}))},exports.getSubscribeUserList=function(e,t,n){return s(this,void 0,void 0,(function(){return u(this,(function(r){return[2,b().next((function(r){return r.getSubscribeUserList(e,t,n)}))]}))}))},exports.getSubscribeUserStatus=function(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){return[2,b().next((function(n){return n.getSubscribeUserStatus(e,t)}))]}))}))},exports.getSubscribeUsersOnlineStatus=function(e){return b().next((function(t){return t.getSubscribeUsersOnlineStatus(e)}))},exports.getTags=function(){return s(this,void 0,void 0,(function(){return u(this,(function(e){return[2,b().next((function(e){return e.getTagList()}))]}))}))},exports.getTagsFromConversation=function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){return[2,b().next((function(t){return t.getTagsForConversation(e)}))]}))}))},exports.getTextMessageDraft=function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){return[2,b().next((function(t){return t.getTextMessageDraft(e)}))]}))}))},exports.getTopConversationList=function(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return[4,b().next((function(n){return n.getTopConversationList(e,t)}))];case 1:return[2,n.sent().trans((function(e){return e.map(d)}))]}}))}))},exports.getTotalUnreadCount=function(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){return[2,b().next((function(n){return n.getTotalUnreadCount(t,e)}))]}))}))},exports.getTotalUnreadCountByLevels=_e,exports.getTotalUnreadMentionedCountByLevels=Re,exports.getTranslationLanguage=function(){return s(this,void 0,void 0,(function(){return u(this,(function(e){return[2,b().next((function(e){return e.getTranslationLanguage()}))]}))}))},exports.getUltraGroupDefaultNotificationLevel=function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){return[2,b().next((function(t){return t.getUltraGroupDefaultNotificationLevel(null==e?void 0:e.targetId,null==e?void 0:e.channelId)}))]}))}))},exports.getUltraGroupFirstUnreadMessageTimestamp=function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){return[2,b().next((function(t){return t.getUGFirstUnreadMessageDigest(e)}))]}))}))},exports.getUltraGroupList=function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){return[2,b().next((function(t){return t.getUltraGroupList(e)}))]}))}))},exports.getUltraGroupMessageListByMessageUId=function(e,t){return s(this,void 0,void 0,(function(){var n=this;return u(this,(function(r){switch(r.label){case 0:return[4,b().next((function(r){return s(n,void 0,void 0,(function(){return u(this,(function(n){return[2,r.getUltraGroupMessageListByMessageUId(e,t)]}))}))}))];case 1:return[2,r.sent().trans((function(e){var t={};for(var n in e)t[n]=e[n]?f(e[n]):void 0;return t}))]}}))}))},exports.getUltraGroupUnreadCountByTargetId=function(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){return[2,b().next((function(n){return n.getUGUnreadCountForAllChannels(e,!1,t)}))]}))}))},exports.getUltraGroupUnreadInfoList=function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){return[2,b().next((function(t){return t.getUGUnreadInfoList(e)}))]}))}))},exports.getUltraGroupUnreadMentionedCountByTargetId=function(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){return[2,b().next((function(n){return n.getUGUnreadCountForAllChannels(e,!0,t)}))]}))}))},exports.getUltraGroupUnreadMentionedMessages=function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){return[2,b().next((function(t){return t.getUGUnreadMentionedDigest(e)}))]}))}))},exports.getUnreadConversationList=function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){switch(t.label){case 0:return[4,b().next((function(t){return t.getUnreadConversationList(e)}))];case 1:return[2,t.sent().trans((function(e){return e.map(d)}))]}}))}))},exports.getUnreadCount=function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){return[2,b().next((function(t){return t.getUnreadCount(e)}))]}))}))},exports.getUnreadCountByTag=function(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){return[2,b().next((function(n){return n.getUnreadCountByTag(e,t)}))]}))}))},exports.getUnreadMentionMeConversationList=function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){switch(t.label){case 0:return[4,b().next((function(t){return t.getUnreadMentionMeConversationList(e)}))];case 1:return[2,t.sent().trans((function(e){return e.map(d)}))]}}))}))},exports.getUnreadMentionedCount=function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){return[2,b().next((function(t){return t.getUnreadMentionedCount(e)}))]}))}))},exports.getUnreadMentionedMessages=function(e){throw new Error("getUnreadMentionedMessages is deprecated, please use electronExtension.getUnreadMentionedMessages instead")},exports.getUserProfiles=function(e){return b().next((function(t){return t.getUserProfiles(e)}))},exports.init=function(t){!function(t){var n,r,o;g?E.warn(e.LogTagId.A_INIT_REPEAT_O):(e.assert("options.appkey",t.appkey,e.AssertRules.STRING,!0),e.assert("options.navigators",t.navigators,(function(t){return e.isArray(t)&&(0===t.length||t.every(e.isHttpUrl))})),e.assert("options.loggerProxy",t.loggerProxy,(function(t){return t instanceof e.LogDBProxy})),m=t,g=e.APIContext.init({appkey:t.appkey,navigators:t.navigators||[],miniCMPProxy:t.customCMP||[],logOutputLevel:t.logOutputLevel,httpInMainProcess:!!t.httpInMainProcess,logExpireTime:t.logExpireTime,areaCode:t.areaCode,logServerUrl:t.logServerUrl,uploadDomain:t.uploadDomain,environment:null!==(n=t.environment)&&void 0!==n?n:"default",eventLoopBlockingCheck:t.eventLoopBlockingCheck,enableReadReceiptStorage:null===(r=t.enableReadReceiptStorage)||void 0===r||r,useNaviV2:null!==(o=t.useNaviV2)&&void 0!==o&&o,loggerProxy:t.loggerProxy}),E=g.logger,g.assignWatcher(v),e.logger.init(E),g.sse.on("message",(function(e,t){var n=i(i({},t),{message:t.message?f(t.message):void 0});p.emit(exports.Events.STREAM_MESSAGE_RESPONSE,n)})))}(t)},exports.insertMessage=function(e,t,n){return void 0===n&&(n={}),s(this,void 0,void 0,(function(){return u(this,(function(r){return l("insertMessage","electronExtension.insertMessage"),[2,Fe(e,t,n)]}))}))},exports.installPlugin=function(e,t){return T((function(n){return n.install(e,t)}))},exports.inviteUsersToGroup=function(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){return[2,b().next((function(n){return n.dataHosting.inviteUsersToGroup(e,t)}))]}))}))},exports.joinChatRoom=function(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return[4,b().next((function(n){return n.chatroom.joinChatroom(e,null==t?void 0:t.count,!0,null==t?void 0:t.extra)}))];case 1:return[2,n.sent().wipe()]}}))}))},exports.joinExistChatRoom=function(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){return[2,b().next((function(n){return n.chatroom.joinChatroom(e,null==t?void 0:t.count,!1,null==t?void 0:t.extra)}))]}))}))},exports.joinGroup=function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){return[2,b().next((function(t){return t.dataHosting.joinGroup(e)}))]}))}))},exports.kickGroupMembers=function(e,t,n){return s(this,void 0,void 0,(function(){return u(this,(function(r){return[2,b().next((function(r){return r.dataHosting.kickGroupMembers(e,t,n)}))]}))}))},exports.modifyMessage=function(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){return l("modifyMessage","modifyMessageWithParams"),[2,Ce({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}})]}))}))},exports.modifyMessageWithParams=Ce,exports.onceEventListener=function(e,t,n){p.once(e,t,n)},exports.quitChatRoom=function(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){return[2,b().next((function(n){return n.chatroom.quitChatroom(e,t)}))]}))}))},exports.quitGroup=function(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){return[2,b().next((function(n){return n.dataHosting.quitGroup(e,t)}))]}))}))},exports.recallMessage=xe,exports.refreshReferenceMessageWithParams=function(e){return b().next((function(t){var n=function(e){return e.map((function(e){return{messageUId:e.messageUId,message:e.message?f(e.message):void 0,code:e.code}}))};return t.refreshReferenceMessageWithParams(i(i({},e),{remoteMessageBlock:function(t){e.remoteMessageBlock&&e.remoteMessageBlock(n(t))},localMessageBlock:function(t){e.localMessageBlock&&e.localMessageBlock(n(t))}}))}))},exports.refuseFriendApplication=function(e){return b().next((function(t){return t.dataHosting.refuseFriendRequest(e)}))},exports.refuseGroupApplication=function(e,t,n,r){return s(this,void 0,void 0,(function(){return u(this,(function(o){return[2,b().next((function(o){return o.dataHosting.refuseGroupApplication(e,t,n,r)}))]}))}))},exports.refuseGroupInvite=function(e,t,n){return s(this,void 0,void 0,(function(){return u(this,(function(r){return[2,b().next((function(r){return r.dataHosting.refuseGroupInvite(e,t,n)}))]}))}))},exports.registerMessageType=function(t,n,r,o,i){return T((function(s,u){return e.assert("messageType",t,e.AssertRules.STRING,!0),e.assert("isPersited",n,e.AssertRules.BOOLEAN,!0),e.assert("isCounted",r,e.AssertRules.BOOLEAN,!0),e.assert("isStatusMessage",i,e.AssertRules.BOOLEAN),e.assert("searchProps",o,e.AssertRules.ARRAY),u.info(e.LogTagId.A_REGTYP_O,JSON.stringify({messageType:t,isCounted:r,isStatusMessage:i,isPersited:n,searchProps:o})),s.registerMessageType(t,n,r,o,i),function(e,t,n){return void 0===t&&(t=!0),void 0===n&&(n=!0),function(r){return new R(e,r,t,n)}}(t,n,r)}))},exports.removeAllExpansionForUltraGroupMessage=function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){return[2,b().next((function(t){return t.removeAllMessageExpansion(e)}))]}))}))},exports.removeChatRoomEntries=function(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){return[2,b().next((function(n){return n.chatroom.removeChatroomEntries(e,{keys:null==t?void 0:t.entries,notificationExtra:null==t?void 0:t.notificationExtra})}))]}))}))},exports.removeChatRoomEntry=function(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){return[2,b().next((function(n){return n.chatroom.removeChatroomEntry(e,t,!1)}))]}))}))},exports.removeConversation=ye,exports.removeConversationsFromTag=function(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){return[2,b().next((function(n){return n.removeTagForConversations(e,t)}))]}))}))},exports.removeEventListener=function(e,t,n){p.off(e,t,n)},exports.removeEventListeners=function(e){p.removeAll(e)},exports.removeExpansionForUltraGroupMessage=function(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){return l("removeExpansionForUltraGroupMessage","removeMessageExpansionForKey"),[2,be(e,t)]}))}))},exports.removeFromBlacklist=function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){return[2,b().next((function(t){return t.removeFromBlacklist(e)}))]}))}))},exports.removeGroupFollows=function(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){return[2,b().next((function(n){return n.dataHosting.removeGroupFollows(e,t)}))]}))}))},exports.removeGroupManagers=function(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){return[2,b().next((function(n){return n.dataHosting.removeGroupManagers(e,t)}))]}))}))},exports.removeMessageExpansionForKey=be,exports.removeMonitor=function(e){S.delete(e)},exports.removeNotificationQuietHoursSetting=function(){return b().next((function(e){return e.removeNotificationQuietHoursSetting()}))},exports.removeRealtimeConversations=function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){return[2,b().next((function(t){return t.removeRealtimeConversations(e)}))]}))}))},exports.removeTag=function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){return[2,b().next((function(t){return t.removeTag(e)}))]}))}))},exports.removeTagFromConversations=function(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){return[2,b().next((function(n){return n.removeTagForConversations(e,t)}))]}))}))},exports.removeTagsFromConversation=function(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){return[2,b().next((function(n){return n.removeTagsForConversation(e,t)}))]}))}))},exports.requestSpeechToTextForMessage=function(e,t){return b().next((function(n){return n.requestSpeechToTextForMessage(e,t)}))},exports.requestStreamMessageContent=function(e){return b().next((function(t){return t.sse.requestStreamMessageContent(e)}))},exports.saveTextMessageDraft=function(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){return[2,b().next((function(n){return n.saveTextMessageDraft(e,t)}))]}))}))},exports.searchConversationByContent=function(t,n,r,o){return s(this,void 0,void 0,(function(){return u(this,(function(i){return l("searchConversationByContent","electronExtension.searchConversationByContent"),[2,Oe(t,null!=r?r:[e.MessageType.TEXT,e.MessageType.FILE],o,n)]}))}))},exports.searchFriendsInfo=function(e){return b().next((function(t){return t.dataHosting.searchFriendsInfo(e)}))},exports.searchGroupMembers=function(e,t,n){return s(this,void 0,void 0,(function(){return u(this,(function(r){return[2,b().next((function(r){return r.dataHosting.searchGroupMembers(e,t,n)}))]}))}))},exports.searchJoinedGroups=function(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){return[2,b().next((function(n){return n.dataHosting.searchJoinedGroups(e,t)}))]}))}))},exports.searchMessages=function(e,t,n,r){return s(this,void 0,void 0,(function(){return u(this,(function(o){return l("RongIMLib.searchMessages","RongIMLib.ElectronExtension.searchMessagesWithParams"),[2,Ne(e,t,n,r)]}))}))},exports.searchUserProfileByUniqueId=function(e){return b().next((function(t){return t.dataHosting.searchUserProfileByUniqueId(e)}))},exports.sendFileMessage=ve,exports.sendGIFMessage=ge,exports.sendHQVoiceMessage=me,exports.sendImageMessage=he,exports.sendMessage=le,exports.sendReadReceiptMessage=function(t,n,r,o){return s(this,void 0,void 0,(function(){return u(this,(function(i){return[2,b().next((function(i){return i.chat.sendReadReceiptMessage({targetId:t,conversationType:e.ConversationType.PRIVATE,channelId:o},n,r)}))]}))}))},exports.sendReadReceiptMessageV4=function(e,t,n){return s(this,void 0,void 0,(function(){return u(this,(function(r){return[2,b().next((function(r){return r.chat.sendReadReceiptMessageV4(e,t,n)}))]}))}))},exports.sendReadReceiptRequest=function(t,n,r){return s(this,void 0,void 0,(function(){return u(this,(function(o){return[2,b().next((function(o){return o.chat.sendReadReceiptRequest({targetId:t,conversationType:e.ConversationType.GROUP,channelId:r},n)}))]}))}))},exports.sendReadReceiptResponse=function(e,t,n){return s(this,void 0,void 0,(function(){return u(this,(function(e){throw new Error("This method is deprecated, please use method sendReadReceiptResponseV2.")}))}))},exports.sendReadReceiptResponseV2=function(t,n,r){return s(this,void 0,void 0,(function(){return u(this,(function(o){return[2,b().next((function(o){return o.chat.sendReadReceipt({targetId:t,conversationType:e.ConversationType.GROUP,channelId:r},n)}))]}))}))},exports.sendReadReceiptResponseV5=function(e,t){return s(this,void 0,void 0,(function(){var n=this;return u(this,(function(r){return[2,b().next((function(r){return s(n,void 0,void 0,(function(){return u(this,(function(n){return[2,r.sendReadReceiptResponseV5(e,t)]}))}))}))]}))}))},exports.sendSightMessage=Ee,exports.sendSyncReadStatusMessage=function(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){return[2,b().next((function(n){return n.chat.sendSyncReadStatusMessage(e,t)}))]}))}))},exports.sendTextMessage=function(e,t,n){return le(e,new k(t),n)},exports.sendTypingStatusMessage=function(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return[4,b().next((function(n){return n.chat.sendTypingStatus(e,t)}))];case 1:return[2,n.sent().trans(f)]}}))}))},exports.sendUltraGroupTypingStatus=function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){return[2,b().next((function(t){return t.chat.sendUltraGroupTypingStatus(e)}))]}))}))},exports.setAutoTranslateEnabled=function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){return[2,b().next((function(t){return t.setAutoTranslateEnabled(e)}))]}))}))},exports.setChatRoomEntries=function(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return[4,b().next((function(n){return n.chatroom.setChatroomEntries(e,t)}))];case 1:return[2,n.sent().wipe()]}}))}))},exports.setChatRoomEntry=function(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){return[2,b().next((function(n){return n.chatroom.setChatroomEntry(e,t,!1)}))]}))}))},exports.setConversationNotificationLevel=Ue,exports.setConversationNotificationStatus=function(t,n){return s(this,void 0,void 0,(function(){var r=this;return u(this,(function(o){return[2,b().next((function(o){return s(r,void 0,void 0,(function(){var r;return u(this,(function(i){return n!==e.NotificationStatus.CLOSE&&n!==e.NotificationStatus.OPEN?[2,e.fail(e.ErrorCode.INVALID_PARAMETER_NOTIFICATION_LEVEL)]:(r=e.trans2NotificationLevel(n),[2,o.batchSetConversationNotificationLevel([t],r)])}))}))}))]}))}))},exports.setConversationToTop=Ae,exports.setConversationToTopInTag=function(e,t,n){return s(this,void 0,void 0,(function(){return u(this,(function(r){return[2,b().next((function(r){return r.setConversationStatusInTag(e,t,{isTop:n})}))]}))}))},exports.setConversationTypeNotificationLevel=function(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){return[2,b().next((function(n){return n.setConversationTypeNotificationLevel(e,t)}))]}))}))},exports.setFriendAddPermission=function(e){return b().next((function(t){return t.dataHosting.setFriendAddPermission(e)}))},exports.setFriendInfo=function(e,t,n){return b().next((function(r){return r.dataHosting.setFriendInfo(e,t||"",n)}))},exports.setGroupMemberInfo=function(e,t,n,r){return s(this,void 0,void 0,(function(){return u(this,(function(o){return[2,b().next((function(o){return o.dataHosting.setGroupMemberInfo(e,t,n,r)}))]}))}))},exports.setGroupRemark=function(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){return[2,b().next((function(n){return n.dataHosting.setGroupRemark(e,t)}))]}))}))},exports.setMessageReceivedStatus=function(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){return[2,Le(e,t)]}))}))},exports.setNotificationQuietHoursWithSetting=function(e){return b().next((function(t){return t.setNotificationQuietHoursWithSetting(e)}))},exports.setProxy=function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){return[2,b().next((function(t){return t.setProxy(e)}))]}))}))},exports.setTranslationLanguage=function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){return[2,b().next((function(t){return t.setTranslationLanguage(e)}))]}))}))},exports.setUltraGroupDefaultNotificationLevel=function(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){return[2,b().next((function(n){return n.setUltraGroupDefaultNotificationLevel(null==e?void 0:e.targetId,t,null==e?void 0:e.channelId)}))]}))}))},exports.stopUploadTask=function(t){return s(this,void 0,void 0,(function(){return u(this,(function(n){return[2,e.ok(ae(t))]}))}))},exports.subscribeUserStatus=function(e,t,n){return s(this,void 0,void 0,(function(){return u(this,(function(r){return[2,b().next((function(r){return r.subscribeUser(e,t,n)}))]}))}))},exports.testProxy=function(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){return[2,b().next((function(n){return n.testProxy(e,t)}))]}))}))},exports.transferGroupOwner=function(e,t,n,r){return s(this,void 0,void 0,(function(){return u(this,(function(o){return[2,b().next((function(o){return o.dataHosting.transferGroupOwner(e,t,!!n,r)}))]}))}))},exports.translateMessagesWithParams=function(e){return b().next((function(t){return t.translateMessagesWithParams(e)}))},exports.translateTextsWithParams=function(e){return b().next((function(t){return t.translateTextsWithParams(e)}))},exports.unSubscribeUserStatus=function(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){return[2,b().next((function(n){return n.unSubscribeUser(e,t)}))]}))}))},exports.updateExpansionForUltraGroupMessage=function(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){return l("updateExpansionForUltraGroupMessage","updateMessageExpansion"),[2,Te(e,t)]}))}))},exports.updateGroupInfo=function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){return[2,b().next((function(t){return t.dataHosting.updateGroupInfo(e)}))]}))}))},exports.updateMessageExpansion=Te,exports.updateMyUserProfile=function(e){return b().next((function(t){return t.updateMyUserProfile(e)}))},exports.updateMyUserProfileVisibility=function(e){return b().next((function(t){return t.dataHosting.updateMyUserProfileVisibility(e)}))},exports.updateTag=function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){return[2,b().next((function(t){return t.updateTag(e)}))]}))}))},exports.upload=fe;
|