@rongcloud/imlib-next 5.32.0-c-rtc-alpha.3 → 5.32.0-c-dq.2

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 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,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={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};return T.conversationType===e.ConversationType.ULTRA_GROUP&&(T.firstUnreadMessage=t.firstUnreadMessage,T.channelType=t.channelType,T.unreadMentionedMeCount=t.unreadMentionedMeCount),T}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",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)},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-c-rtc-alpha.3");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 I=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})},R=function(e){function t(t,n,r){return e.call(this,t,r,n.isPersited,n.isCounted)||this}return n(t,e),t}(I);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}(R),P=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}(R),O=function(t){function r(n){return t.call(this,"RC:CmdMsg",e.getMessageTypeDescription("RC:CmdMsg"),n)||this}return n(r,t),r}(R),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}(R),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}(R),D=function(t){function r(n){return t.call(this,"RC:GrpNtf",e.getMessageTypeDescription("RC:GrpNtf"),n)||this}return n(r,t),r}(R),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}(R),F=function(t){function r(n){return t.call(this,"RC:InfoNtf",e.getMessageTypeDescription("RC:InfoNtf"),n)||this}return n(r,t),r}(R),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}(R),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}(R),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}(R),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}(R),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}(R),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}(R),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}(R);!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,x,T,b;return u(this,(function(u){switch(u.label){case 0:n=t.file,r=t.fileType,u.label=1;case 1:return u.trys.push([1,3,,4]),[4,this._getFileToken(r,n.name,"POST","uploads",void 0,K(n.size))];case 2:return o=u.sent(),[3,4];case 3:return i=u.sent(),[2,e.fail(i)];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 c=u.sent(),f=c.status,d=c.data,this._promise=null,l=null===(b=null==d?void 0:d.match(/(?:<UploadId>)(\S*?)(?:<\/UploadId>)/))||void 0===b?void 0:b[1],200!==f&&204!==f||!l?[2,e.fail(e.ErrorCode.UPLOAD_FAIL,"start upload fail")]:(p=[],[4,this.requestUploadPart(s,n,l,o.fileName,t,p)]);case 6:if(v=u.sent(),h=v.code,g=v.msg,h!==e.ErrorCode.SUCCESS)return[2,e.fail(h,g)];u.label=7;case 7:return u.trys.push([7,9,,10]),[4,this._getFileToken(r,o.fileName,"POST","uploadId=".concat(l),void 0,K(n.size))];case 8:return o=u.sent(),[3,10];case 9:return m=u.sent(),[2,e.fail(m)];case 10:return E=p.map((function(e,t){return"<Part><PartNumber>".concat(t+1,"</PartNumber><ETag>").concat(e,"</ETag></Part>")})).join(""),E="<CompleteMultipartUpload xmlns='http://s3.amazonaws.com/doc/2006-03-01/'>".concat(E,"</CompleteMultipartUpload>"),x=this.getBaseHeaders(n,o,t),this._promise=e.httpRequest({url:"".concat(s,"?uploadId=").concat(l),headers:x,method:"POST",body:E,timeout:0}),[4,this._promise.result()];case 11:return T=u.sent().status,this._promise=null,200===T||204===T?[2,e.ok({uniqueName:o.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:if(f>=5)return[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),u.label=1;case 1:return u.trys.push([1,3,,4]),[4,this._getFileToken(i.fileType,o,"PUT",l,void 0,K(n.size))];case 2:return p=u.sent(),[3,4];case 3:return v=u.sent(),[2,e.fail(v)];case 4:return h=n.slice(s,c*e.UPLOAD_FILE_CHUNK_SIZE),g=this.getBaseHeaders(n,p,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()];case 5: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).isValueOf("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 Ie(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 Re=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 Pe(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 Oe(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,Oe(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 I?[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:Pe,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,Oe(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,Oe(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,"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=I,exports.CombineMessage=A,exports.CombineV2Message=P,exports.CommandMessage=O,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=Re,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.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).isValueOf("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.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,Ie([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.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.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=Ie,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){return s(this,void 0,void 0,(function(){return u(this,(function(t){return[2,b().next((function(t){return t.chatroom.quitChatroom(e)}))]}))}))},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 I(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,Pe(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;
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=function(){return o=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},o.apply(this,arguments)};function i(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 s(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 u(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 c(e){return o(o({},e),{channelId:e.channelId||""})}function f(t){var n=t.conversationType,r=t.targetId,o=t.latestMessage,i=t.unreadMessageCount,s=t.hasMentioned,u=t.mentionedInfo,a=t.lastUnreadTime,f=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&&c(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:f,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 d(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";var l=new e.EventEmitter,p={connection:function(t,n){switch(t){case e.RCConnectionStatus.CONNECTED:l.emit(exports.Events.CONNECTED);break;case e.RCConnectionStatus.CONNECTING:l.emit(exports.Events.CONNECTING);break;case e.RCConnectionStatus.SUSPENDED:l.emit(exports.Events.SUSPEND,n);break;case e.RCConnectionStatus.DISCONNECTED:l.emit(exports.Events.DISCONNECT,n)}},batchMessage:function(e){l.emit(exports.Events.MESSAGES,{messages:e.map((function(e){return c(e)}))})},typingState:function(e){l.emit(exports.Events.TYPING_STATUS,{status:e})},readReceiptReceived:function(e,t,n,r){l.emit(exports.Events.READ_RECEIPT_RECEIVED,{conversation:e,messageUId:t,sentTime:n,sendUserId:r})},messageReceiptRequest:function(e,t,n){l.emit(exports.Events.MESSAGE_RECEIPT_REQUEST,{conversation:e,messageUId:t,senderUserId:n})},messageReceiptResponse:function(e,t,n){l.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=f(n);return o===e.ConversationType.ULTRA_GROUP&&(i.versionTime=n.versionTime,i.unreadMessageCount=v(n.unreadMessageCount||0),i.unreadMentionedCount=v(n.unreadMentionedCount||0),i.unreadMentionedMeCount=v(n.unreadMentionedMeCount||0)),{conversation:i,updatedItems:r}}));l.emit(exports.Events.CONVERSATION,{conversationList:n})},chatroomState:function(e){l.emit(exports.Events.CHATROOM,e)},expansion:function(e){l.emit(exports.Events.EXPANSION,e)},pullFinished:function(){l.emit(exports.Events.PULL_OFFLINE_MESSAGE_FINISHED)},tag:function(){l.emit(exports.Events.TAG)},userSettingsSynced:function(e){l.emit(exports.Events.USER_SETTINGS_SYNCED,e)},userSettingsChanged:function(e){l.emit(exports.Events.USER_SETTINGS_CHANGED,e)},conversationStatusSynced:function(e){l.emit(exports.Events.CONVERSATIONS_SETTINGS_SYNCED,e)},robotsSynced:function(e,t){l.emit(exports.Events.ROBOTS_SYNCED,e,t)},conversationTagChanged:function(){l.emit(exports.Events.CONVERSATION_TAG)},messageBlocked:function(e){l.emit(exports.Events.MESSAGE_BLOCKED,e)},ultraGroupEnable:function(){l.emit(exports.Events.ULTRA_GROUP_ENABLE)},sgRelationsSynced:function(e){l.emit(exports.Events.CONVERSATIONS_SYNCED,e)},operateStatus:function(e){l.emit(exports.Events.OPERATE_STATUS,e)},ultraGroupMessageExpansionUpdated:function(e){l.emit(exports.Events.ULTRA_GROUP_MESSAGE_EXPANSION_UPDATED,e.map((function(e){return c(e)})))},ultraGroupMessageRecalled:function(e){l.emit(exports.Events.ULTRA_GROUP_MESSAGE_RECALLED,e.map((function(e){return c(e)})))},ultraGroupChannelChangeType:function(e){l.emit(exports.Events.ULTRA_GROUP_CHANNEL_TYPE_CHANGE,e)},ultraGroupChannelUserKicked:function(e){l.emit(exports.Events.ULTRA_GROUP_CHANNEL_USER_KICKED,e)},ultraGroupChannelDelete:function(e){l.emit(exports.Events.ULTRA_GROUP_CHANNEL_DELETE,e)},userGroupStatus:function(e){l.emit(exports.Events.USER_GROUP_STATUS,e)},messageReadReceipt:function(e){l.emit(exports.Events.MESSAGE_READ_RECEIPT_V4,e)},syncReadStatus:function(e){l.emit(exports.Events.SYNC_READ_STATUS,e)},subscribedUserStatusChange:function(e){l.emit(exports.Events.SUBSCRIBED_USER_STATUS_CHANGE,e)},subscribedRelationChange:function(e){l.emit(exports.Events.SUBSCRIBED_RELATION_CHANGE,e)},syncSubscribedUserStatusFinished:function(e){l.emit(exports.Events.SYNC_SUBSCRIBED_USER_STATUS_FINISHED,e)},ownUserProfileChanged:function(e){l.emit(exports.Events.OWN_USER_PROFILE_CHANGED,e)},groupOperation:function(e){l.emit(exports.Events.GROUP_OPERATION,e)},groupInfoChanged:function(e){l.emit(exports.Events.GROUP_INFO_CHANGED,e)},groupMemberInfoChanged:function(e){l.emit(exports.Events.GROUP_MEMBER_INFO_CHANGED,e)},groupApplicationEvent:function(e){l.emit(exports.Events.GROUP_APPLICATION_EVENT,e)},groupRemarkChangedSync:function(e){l.emit(exports.Events.GROUP_REMARK_CHANGED_SYNC,e)},groupFollowsChangedSync:function(e){l.emit(exports.Events.GROUP_FOLLOWS_CHANGED_SYNC,e)},friendAdd:function(e){l.emit(exports.Events.FRIEND_ADDED,e)},friendDelete:function(e){l.emit(exports.Events.FRIEND_DELETE,e)},friendApplicationStatusChanged:function(e){l.emit(exports.Events.FRIEND_APPLICATION_STATUS_CHANGED,e)},friendCleared:function(e){l.emit(exports.Events.FRIEND_CLEARED,e)},friendInfoChangedSync:function(e){l.emit(exports.Events.FRIEND_INFO_CHANGED_SYNC,e)},databaseOpened:function(e,t){l.emit(exports.Events.DATABASE_OPENED,e,t)},databaseUpgradeWillStart:function(){l.emit(exports.Events.DATABASE_UPGRADE_WILL_START)},databaseUpgrading:function(e){l.emit(exports.Events.DATABASE_UPGRADING,e)},databaseUpgradeDidComplete:function(e){l.emit(exports.Events.DATABASE_UPGRADE_DID_COMPLETE,e)},readReceiptResponseV5:function(e){l.emit(exports.Events.MESSAGE_RECEIPT_RESPONSE_V5,e)},speechToTextResponse:function(e){l.emit(exports.Events.SPEECH_TO_TEXT_RESPONSE,e)},translateResponse:function(e){l.emit(exports.Events.TRANSLATE_RESPONSE,e)},messagesModified:function(e){l.emit(exports.Events.MESSAGE_MODIFIED,e.map((function(e){return c(e)})))},messageModifiedSyncCompleted:function(){l.emit(exports.Events.MESSAGE_MODIFIED_SYNC_COMPLETED)}};function v(e){return e>999?999:e}e.VersionManage.add("imlib-next","5.32.0-c-dq.2");var h=null,g=null,m=null;function E(){return i(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return h?[4,e.APIContext.destroy()]:[2];case 1:return t.sent(),g=null,h=null,m=null,[2]}}))}))}function x(e){if(!h)throw new Error("Not initialized yet!");return e(h,m,g)}function T(){return h?e.ok(h):e.fail(e.ErrorCode.BIZ_ERROR_CLIENT_NOT_INIT)}var b=0,C=new Map;function S(e,t){var n=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var o=[],i=[];a([],u(C.values()),!1).forEach((function(e){var t=u(e,3),r=t[0],s=t[1],a=t[2];r===n&&(i.push(s),a&&o.push(a))})),o.forEach((function(t){e=t(e)}));var s=t.apply(void 0,a([],u(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 y=S("disconnect",(function(e,t){return x((function(n){return n.disconnect(e,t)}))}));function M(){l.clear()}var _=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})},R=function(e){function t(t,n,r){return e.call(this,t,r,n.isPersited,n.isCounted)||this}return n(t,e),t}(_);var I,U=function(t){function r(n){return t.call(this,e.MessageType.COMBINE,e.getMessageTypeDescription(e.MessageType.COMBINE),n)||this}return n(r,t),r}(R),A=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}(R),P=function(t){function r(n){return t.call(this,"RC:CmdMsg",e.getMessageTypeDescription("RC:CmdMsg"),n)||this}return n(r,t),r}(R),O=function(t){function r(n){return t.call(this,e.MessageType.FILE,e.getMessageTypeDescription(e.MessageType.FILE),n)||this}return n(r,t),r}(R),N=function(t){function r(n){return t.call(this,e.MessageType.GIF,e.getMessageTypeDescription(e.MessageType.GIF),n)||this}return n(r,t),r}(R),L=function(t){function r(n){return t.call(this,"RC:GrpNtf",e.getMessageTypeDescription("RC:GrpNtf"),n)||this}return n(r,t),r}(R),D=function(t){function r(n){return t.call(this,e.MessageType.IMAGE,e.getMessageTypeDescription(e.MessageType.IMAGE),n)||this}return n(r,t),r}(R),G=function(t){function r(n){return t.call(this,"RC:InfoNtf",e.getMessageTypeDescription("RC:InfoNtf"),n)||this}return n(r,t),r}(R),F=function(t){function r(n){return t.call(this,e.MessageType.LOCATION,e.getMessageTypeDescription(e.MessageType.LOCATION),n)||this}return n(r,t),r}(R),w=function(t){function r(n){return t.call(this,e.MessageType.REFERENCE,e.getMessageTypeDescription(e.MessageType.REFERENCE),n)||this}return n(r,t),r}(R),B=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}(R),H=function(t){function r(n){return t.call(this,e.MessageType.SIGHT,e.getMessageTypeDescription(e.MessageType.SIGHT),n)||this}return n(r,t),r}(R),j=function(t){function r(n){return t.call(this,e.MessageType.TEXT,e.getMessageTypeDescription(e.MessageType.TEXT),n)||this}return n(r,t),r}(R),k=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}(R),V=function(t){function r(n){return t.call(this,e.MessageType.VOICE,e.getMessageTypeDescription(e.MessageType.VOICE),n)||this}return n(r,t),r}(R);!function(e){e.ALIYUN="aliyun",e.S3="s3",e.MINIO="minio",e.QINIU="qiniu",e.RCX="rcx"}(I||(I={}));var q=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 i(this,void 0,void 0,(function(){var n,r,o,i,u,a;return s(this,(function(s){switch(s.label){case 0:return n=t.file,r=t.onProgress,t.fileType,o=this._authInfo,i={},(u=new FormData).set("token",o.token),u.set("key",o.fileName),u.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:u,timeout:0}),[4,this._promise.result()];case 1:return a=s.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}(q),W=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 i(this,void 0,void 0,(function(){var n,r,o,i,u,a;return s(this,(function(s){switch(s.label){case 0:return n=t.file,r=t.onProgress,t.fileType,o=this._authInfo,i=e.fixUrlProtocol("".concat(o.ossBucketName,".").concat(this._url)),(u=new FormData).set("token",o.token),u.set("OSSAccessKeyId",o.osskeyId),u.set("policy",o.ossPolicy),u.set("Signature",o.ossSign),u.set("success_action_status","200"),u.set("key",o.fileName),u.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:u,timeout:0}),[4,this._promise.result()];case 1:return a=s.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}(q);function z(e){return Math.ceil(e/1024)||0}var K,Q=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 i(n,void 0,void 0,(function(){var n,r,o,i,u,a,c,f,d,l,p,v,h,g,m,E;return s(this,(function(s){switch(s.label){case 0:return n=t.file,r=t.fileType,[4,this._getFileToken(r,n.name,"POST","uploads",void 0,z(n.size))];case 1:return(o=s.sent()).isOk?(i=o.data,u=e.fixUrlProtocol("".concat(this._url,"/").concat(i.minioBucketName,"/").concat(i.fileName)),a=this.getBaseHeaders(n,i,t),this._promise=e.httpRequest({url:"".concat(u,"?uploads"),headers:a,method:"POST"}),[4,this._promise.result()]):[2,o.wipe()];case 2:return c=s.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(u,n,l,i.fileName,t,p)]);case 3:return(v=s.sent()).isOk?[4,this._getFileToken(r,i.fileName,"POST","uploadId=".concat(l),void 0,z(n.size))]:[2,v.wipe()];case 4:return(o=s.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(u,"?uploadId=").concat(l),headers:g,method:"POST",body:h,timeout:0}),[4,this._promise.result()]):[2,o.wipe()];case 5:return m=s.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 i(this,void 0,void 0,(function(){var n,r,o,i,u,a;return s(this,(function(s){switch(s.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)),u=this.getBaseHeaders(n,o,t),this._promise=e.httpRequest({url:i,headers:u,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=s.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,u,a,c,f){return void 0===c&&(c=1),void 0===f&&(f=0),i(this,void 0,void 0,(function(){var i,d,l,p,v,h,g,m,E,x;return s(this,(function(s){switch(s.label){case 0:return f>=5?[2,e.fail(e.ErrorCode.UPLOAD_FAIL,"Upload retry times exceeded 5. Procedure")]:(i=(c-1)*e.UPLOAD_FILE_CHUNK_SIZE,d=Math.min(e.UPLOAD_FILE_CHUNK_SIZE,n.size-i),l="partNumber=".concat(c,"&uploadId=").concat(r),[4,this._getFileToken(u.fileType,o,"PUT",l,void 0,z(n.size))]);case 1:return(p=s.sent()).isOk?(v=p.data,h=n.slice(i,c*e.UPLOAD_FILE_CHUNK_SIZE),g=this.getBaseHeaders(n,v,u),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==u?void 0:u.onProgress)||void 0===t?void 0:t.call(u,i+e.loaded,n.size)}}),[4,this._promise.result()]):[2,p.wipe()];case 2:return m=s.sent(),E=m.status,x=m.xhr,this._promise=null,200===E||204===E?(a.push((null==x?void 0:x.getResponseHeader("ETag"))||""),i+d<n.size?[2,this.requestUploadPart(t,n,r,o,u,a,c+1,0)]:[2,e.ok()]):[2,this.requestUploadPart(t,n,r,o,u,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}(q),X=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 i(n,void 0,void 0,(function(){var n,r,o,i;return s(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 i(this,void 0,void 0,(function(){var n,r,o,i,u,a,c,f,d,l;return s(this,(function(s){switch(s.label){case 0:return n=t.file,r=t.onProgress,t.fileType,o=this._authInfo,i={},(u=new FormData).set("token",o.token),u.set("key",o.fileName),u.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:u,timeout:0}),[4,this._promise.result()];case 1:return c=s.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,u){return void 0===u&&(u=0),i(this,void 0,void 0,(function(){var i,a,c,f,d,l,p,v,h,g;return s(this,(function(s){switch(s.label){case 0:return i=Math.min(e.UPLOAD_FILE_CHUNK_SIZE,n.size-u),a=t+n.name.substring(n.name.lastIndexOf(".")),c={Range:"bytes=".concat(u,"-").concat(u+i),"X-File-TransactionId":a,"X-File-Total-Size":n.size.toString()},f=n.slice(u,u+i),(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(u+e.loaded,n.size)},method:"POST",body:d,timeout:0}),[4,this._promise.result()];case 1:return p=s.sent(),v=p.status,h=p.data,this._promise=null,200===v||204===v?u+i<n.size?[2,this._requestUploadPart(t,n,r,o,u+i)]:(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}(q),J=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 i(this,void 0,void 0,(function(){var n,r,o,i,u,a,c,f,d;return s(this,(function(s){switch(s.label){case 0:return n=t.file,r=t.onProgress,t.fileType,o=t.contentDisposition,i=this._authInfo,u={},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:u,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=s.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}(q);function Z(t,n){var r=new AudioContext({sampleRate:16e3}),i=e.promiseWithResolvers(),s=i.promise,u=i.resolve;return r.decodeAudioData(t,(function(t){var r,i;u(e.ok(o(o({},n),{duration:t.duration,length:t.length,sampleRate:null!==(r=t.sampleRate)&&void 0!==r?r:void 0,numberOfChannels:null!==(i=t.numberOfChannels)&&void 0!==i?i:void 0})))}),(function(t){u(e.fail(e.ErrorCode.UPLOAD_FAIL,"get audio info fail:".concat(JSON.stringify(t))))})),s}var $=((K={})[I.QINIU]=Y,K[I.ALIYUN]=W,K[I.S3]=J,K[I.MINIO]=Q,K[I.RCX]=X,K);function ee(t,n,r){var i=e.promiseWithResolvers(),s=i.promise,u=i.resolve,a=document.createElement("canvas"),c=a.getContext("2d"),f=new Image;return f.onload=function(t){var i=r||{},s=i.maxHeight,d=void 0===s?160:s,l=i.maxWidth,p=void 0===l?160:l,v=i.quality,h=void 0===v?1:v,g=i.scale,m=void 0===g?1:g,E=ne(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=te(a,h);x=x.replace(/data:image\/[^;]+;base64,/,""),u(e.ok(o(o({},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 te(t,n){var r=t.toDataURL("image/jpeg",n);return r.length>e.MAX_MESSAGE_CONTENT_BYTES-10240?te(t,n-.1):r}var ne=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})},re=0,oe=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:++re}),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,u){return void 0===u&&(u=[]),i(this,void 0,void 0,(function(){var i,a,c,f,d;return s(this,(function(s){switch(s.label){case 0:i=0,s.label=1;case 1:return i<t.length?(a=t[i],(c=$[a.type])?(this._client=new c(a.url,r,o),[4,this._client.upload(n)]):(u.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=s.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,u.push({type:a.type,url:a.url,code:d,msg:f.msg}),s.label=3;case 3:return i++,[3,1];case 4:return[2,e.fail(e.ErrorCode.UPLOAD_FAIL,"Failed to upload all channels, msg: ".concat(JSON.stringify(u)))]}}))}))}}),Object.defineProperty(t.prototype,"_handleUpload",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){return i(this,void 0,void 0,(function(){var r,o,i,u,a,c,f,d,l,p,v,h,g,m,E,x,T,b,C;return s(this,(function(s){switch(s.label){case 0:return r=n.getFileToken,o=n.customDomain,i=n.uploadServer,u=n.ossConfig,a=t.file,c=t.fileType,f=t.thumbnailConfig,[4,r(c,a.name,void 0,void 0,void 0,z(a.size))];case 1:return(d=s.sent()).isOk?(l=d.data,p=function(e,t,n){if(t)return[{type:I.RCX,url:t,p:"1"}];if(e)return JSON.parse(e).map((function(e){var t={type:I.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:I.QINIU,url:n,p:"1"}),r}(l.ossConfig||u,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=s.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=s.sent()).isOk)return[2,e.fail(b.code,"Get download url fail")];x=b.data.downloadUrl,s.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,Z(s.sent(),C)];case 6:return c===e.FileType.IMAGE?[2,ee(a,C,f)]:[2,e.ok(C)]}}))}))}}),Object.defineProperty(t.prototype,"awaitResult",{enumerable:!1,configurable:!0,writable:!0,value:function(){return i(this,void 0,void 0,(function(){return s(this,(function(e){return[2,this._promise]}))}))}}),t}(),ie={};function se(e,t){var n=new oe(e,t);return function(e){i(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return ie[e.id]=e,[4,e.awaitResult()];case 1:return t.sent(),delete ie[e.id],[2]}}))}))}(n),n}function ue(e){var t=ie[e];return!!t&&(t.abort(),!0)}var ae=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 ce(t){return i(this,void 0,void 0,(function(){var n,r,o,u=this;return s(this,(function(a){return n=t.contentDisposition,r=t.fileType,o=t.file,[2,T().next((function(a){return i(u,void 0,void 0,(function(){return s(this,(function(u){switch(u.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 i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,new oe(e,t).awaitResult()]}))}))}(t,ae(a,a.getOptions().uploadDomain))}))];case 1:return[2,u.sent()]}}))}))}))]}))}))}var fe=Be,de=S("sendMessage",(function(t,n,r){return i(void 0,void 0,void 0,(function(){var i,u,a,f,d,l,p,v,h,g,m,E,x;return s(this,(function(s){switch(s.label){case 0:return u=(i=r||{}).disableNotification,a=i.isMentioned,f=i.directionalUserIdList,d=i.canIncludeExpansion,l=i.onSendBefore,p=i.expansion,v=i.pushConfig,h=i.isStatusMessage,g=i.disableUpdateLastMessage,m=function(e,t){var n=e.disableNotification,r=e.pushContent,i=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 o({disableNotification:n,pushContent:r,pushData:i,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=o(o({},t),{isMentioned:!!a,content:n.content,messageType:n.messageType,isPersited:!!n.isPersited,isCounted:!!n.isCounted,disableNotification:!!u,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:f||[],disableUpdateLastMessage:g}),[4,T().next((function(n){E.senderUserId=n.getCurrentUserId();return n.sendMessage(t,m,(function(t){E.messageId=t;try{l&&l(c(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=s.sent()).isOk?[2,x.trans((function(e){return c(e)}))]:(E.sentStatus=e.SentStatus.FAILED,[2,e.fail(x.code,x.msg,c(E))])}}))}))}));function le(t,n){var r=this;return function(u,a,c,f){return i(r,void 0,void 0,(function(){var r,i,d,l,p,v,h,g,m,E,x,b,C;return s(this,(function(s){switch(s.label){case 0:if(!(r=T()).isOk)return[2,r.wipe()];if(i=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===(b=f)||void 0===b?void 0:b.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=i.logger,v=p.createTraceId(),p.info(e.LogTagId.L_MEDIA_UPLOAD_T,JSON.stringify({filesize:a.file.size,type:t}),v),[4,ce({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=s.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,o({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,de(u,x,f)]):[2,e.fail(g,E)]}}))}))}}var pe=le(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 O(o)})),ve=le(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 D(n)})),he=le(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 N(n)})),ge=le(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 k(r)})),me=le(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 H(n)}));le(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 U(n)}));var Ee=S("recallMessage",(function(e,t){return i(void 0,void 0,void 0,(function(){return s(this,(function(n){return[2,T().next((function(n){return i(void 0,void 0,void 0,(function(){return s(this,(function(r){switch(r.label){case 0:return[4,n.recallMessage(e,t)];case 1:return[2,r.sent().trans((function(e){return c(e)}))]}}))}))}))]}))}))}));function xe(e,t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,T().next((function(n){return n.updateMessageExpansion(e,t)}))]}))}))}function Te(e,t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,T().next((function(n){return n.removeMessageExpansion(e,t)}))]}))}))}function be(e){return T().next((function(t){return t.modifyMessageWithParams(e)}))}function Ce(e){return i(this,void 0,void 0,(function(){var t=this;return s(this,(function(n){switch(n.label){case 0:return[4,T().next((function(n){return i(t,void 0,void 0,(function(){return s(this,(function(t){return[2,n.getAllConversationList(e)]}))}))}))];case 1:return[2,n.sent().trans((function(e){return e.map(f)}))]}}))}))}var Se=S("removeConversation",(function(e,t){return i(void 0,void 0,void 0,(function(){return s(this,(function(n){return[2,T().next((function(n){return n.removeConversation(e,t)}))]}))}))}));function ye(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,T().next((function(t){return t.batchDeleteConversations(e)}))]}))}))}function Me(e,t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,T().next((function(n){return n.getTotalUnreadCountByLevels(e,t)}))]}))}))}function _e(e,t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,T().next((function(n){return n.getTotalUnreadCountByLevels(e,t,!0)}))]}))}))}var Re=S("clearMessagesUnreadStatus",(function(e){return i(void 0,void 0,void 0,(function(){return s(this,(function(t){return[2,T().next((function(t){return t.chat.clearUnreadCount(e)}))]}))}))}));var Ie=S("setConversationNotificationLevel",(function(e,t){return i(void 0,void 0,void 0,(function(){return s(this,(function(n){return[2,T().next((function(n){return n.batchSetConversationNotificationLevel([e],t)}))]}))}))}));var Ue=S("setConversationToTop",(function(e,t,n,r){return void 0===t&&(t=!0),void 0===n&&(n=!0),void 0===r&&(r=!1),i(void 0,void 0,void 0,(function(){return s(this,(function(o){return[2,T().next((function(o){return o.batchSetConversationToTop([e],!!t,n,r)}))]}))}))}));function Ae(e,t,n,r){return i(this,void 0,void 0,(function(){var o=this;return s(this,(function(u){return[2,T().next((function(u){return i(o,void 0,void 0,(function(){return s(this,(function(o){switch(o.label){case 0:return[4,u.searchConversationByContent(e,t,n,r)];case 1:return[2,o.sent().trans((function(e){return e.map((function(e){return f(e)}))}))]}}))}))}))]}))}))}function Pe(e,t){return i(this,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return[4,T().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 c(e)}))}}))]}}))}))}function Oe(t,n,r,o,u){return i(this,void 0,void 0,(function(){return s(this,(function(i){return d("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:u}})]}))}))}function Ne(e,t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return d("setMessageReceivedStatus","setMessageReceivedStatusInfo"),[2,T().next((function(n){return n.setMessageReceivedStatus(e,t)}))]}))}))}function Le(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,T().next((function(t){return t.clearLocalMessages(e)}))]}))}))}function De(e,t,n){return i(this,void 0,void 0,(function(){return s(this,(function(r){return[2,T().next((function(r){return r.deleteLocalMessagesByTimestamp(e,t,n)}))]}))}))}function Ge(e,t,n){return void 0===n&&(n={}),i(this,void 0,void 0,(function(){return s(this,(function(r){return t instanceof _?[2,we(e,t,n)]:[2,Fe(e,t,n)]}))}))}function Fe(t,n,r){return void 0===r&&(r={}),i(this,void 0,void 0,(function(){var o,i,u,a;return s(this,(function(s){switch(s.label){case 0:return o=!!(null==r?void 0:r.isUnread),i=null==r?void 0:r.searchContent,u=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)||u},[4,T().next((function(e){return e.insertMessage(t,a)}))];case 1:return[2,s.sent().trans(c)]}}))}))}function we(t,n,r){return void 0===r&&(r={}),i(this,void 0,void 0,(function(){var o,i,u,a;return s(this,(function(s){switch(s.label){case 0:return o=!!(null==r?void 0:r.isUnread),i=null==r?void 0:r.searchContent,u=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:u},[4,T().next((function(e){return e.insertMessage(t,a)}))];case 1:return[2,s.sent().trans(c)]}}))}))}function Be(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,T().next((function(t){return t.getLocalMessage(e)}))];case 1:return[2,t.sent().trans((function(e){return c(e)}))]}}))}))}var He=Object.freeze({__proto__:null,getAllConversationList:function(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){return d("electronExtension.getAllConversationList","getAllConversationList"),[2,Ce(e)]}))}))},getConversationList:function(e,t,n,r){return i(this,void 0,void 0,(function(){var o=this;return s(this,(function(u){switch(u.label){case 0:return d("electronExtension.getConversationList","getAllConversationList or getConversationListByTimestamp"),[4,T().next((function(u){return i(o,void 0,void 0,(function(){return s(this,(function(o){return[2,u.getConversationList({startTime:e,count:t,channelId:n,topPriority:r})]}))}))}))];case 1:return[2,u.sent().trans((function(e){return e.map((function(e){return f(e)}))}))]}}))}))},searchConversationByContent:Ae,getConversations:function(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,T().next((function(t){return t.getConversations(e)}))];case 1:return[2,t.sent().trans((function(e){return e.map(f)}))]}}))}))},getUntaggedConversationListByPage:function(e,t,n){return i(this,void 0,void 0,(function(){var r=this;return s(this,(function(o){return[2,T().next((function(o){return i(r,void 0,void 0,(function(){return s(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 f(e)}))}))]}}))}))}))]}))}))},getRemoteConversations:function(){return i(this,void 0,void 0,(function(){return s(this,(function(e){return[2,T().next((function(e){return e.syncRemoteConversations()}))]}))}))},saveEditedMessageDraft:function(e,t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,T().next((function(n){return n.chat.saveEditedMessageDraft(e,t)}))]}))}))},getEditedMessageDraft:function(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,T().next((function(t){return t.chat.getEditedMessageDraft(e)}))]}))}))},clearEditedMessageDraft:function(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,T().next((function(t){return t.chat.clearEditedMessageDraft(e)}))]}))}))},searchMessages:Oe,searchMessageInTimeRange:function(e,t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return d("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 i(this,void 0,void 0,(function(){return s(this,(function(o){switch(o.label){case 0:return d("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 i(this,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return[4,T().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(c);return{messages:r,hasMore:n,list:r}}))]}}))}))},getContinuousMessages:function(e,t){return i(this,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return[4,T().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(c),timestamp:r}}))]}}))}))},setMessageStatusToRead:function(e,t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,T().next((function(n){return n.setMessageStatusToRead(e,t)}))]}))}))},setMessageReceivedStatus:Ne,setMessageReceivedStatusInfo:function(t,n){return i(this,void 0,void 0,(function(){var r;return s(this,(function(o){return r=e.transformReceivedStatusFlag(n||{}),[2,T().next((function(e){return e.setMessageReceivedStatus(t,r)}))]}))}))},setMessageSentStatus:function(e,t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,T().next((function(n){return n.setMessageSentStatus(e,t)}))]}))}))},setMessageContent:function(e,t,n){return i(this,void 0,void 0,(function(){return s(this,(function(r){return[2,T().next((function(r){return r.setMessageContent(e,t,n)}))]}))}))},deleteMessages:function(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,T().next((function(t){return t.deleteLocalMessages(e)}))]}))}))},clearMessages:Le,deleteMessagesByTimestamp:De,batchClearMessagesByTimestamp:function(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,T().next((function(t){return t.batchClearLocalMessagesByTimestamp(e)}))]}))}))},insertMessage:Ge,batchInsertMessage:function(e,t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,T().next((function(n){return n.batchInsertMessage(e,t)}))]}))}))},getMessageCount:function(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,T().next((function(t){return t.getLocalMessageCount(e)}))]}))}))},setCheckDuplicateMessage:function(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,T().next((function(t){return t.setCheckDuplicateMessage(e)}))]}))}))},setCheckChatRoomDuplicateMessage:function(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,T().next((function(t){return t.chatroom.setCheckChatRoomDuplicateMessage(!!e)}))]}))}))},getMessagesAroundTimestamp:function(e,t){return i(this,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return[4,T().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(c)}))]}}))}))},getLocalMessage:Be,searchMessagesWithParams:function(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,T().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 c(e)}))}}))]}}))}))},setMessageSpeechToTextVisible:function(e,t){return T().next((function(n){return n.setMessageSpeechToTextVisible(e,t)}))},deleteUltraGroupMessagesForAllChannel:function(e,t){return T().next((function(n){return n.deleteLocalUGMessagesForAllChannel(e,t)}))},getUnreadMentionedMessages:function(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,T().next((function(t){return t.getUnreadMentionedMessages(e)}))];case 1:return[2,t.sent().trans((function(e){return e.map(c)}))]}}))}))},clearLocalData:function(){return i(this,void 0,void 0,(function(){return s(this,(function(e){return[2,T().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=_,exports.CombineMessage=U,exports.CombineV2Message=A,exports.CommandMessage=P,exports.ConnectType={COMET:"_",WEBSOCKET:"_"},exports.FileMessage=O,exports.GIFMessage=N,exports.GroupNotificationMessage=L,exports.HQVoiceMessage=k,exports.ImageMessage=D,exports.InformationNotificationMessage=G,exports.LocationMessage=F,exports.ReferenceMessage=w,exports.RichContentMessage=B,exports.SightMessage=H,exports.TextMessage=j,exports.UploadTask=oe,exports.VoiceMessage=V,exports.__addSDKVersion=function(t,n){e.VersionManage.add(t,n)},exports.acceptFriendApplication=function(e){return T().next((function(t){return t.dataHosting.acceptFriendRequest(e)}))},exports.acceptGroupApplication=function(e,t,n){return i(this,void 0,void 0,(function(){return s(this,(function(r){return[2,T().next((function(r){return r.dataHosting.acceptGroupApplication(e,t,n)}))]}))}))},exports.acceptGroupInvite=function(e,t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,T().next((function(n){return n.dataHosting.acceptGroupInvite(e,t)}))]}))}))},exports.addConversationsToTag=function(e,t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,T().next((function(n){return n.addTagForConversations(e,t)}))]}))}))},exports.addEventListener=function(e,t,n){l.on(e,t,n)},exports.addFriend=function(e,t,n){return T().next((function(r){return r.dataHosting.addFriend(e,t,n)}))},exports.addGroupFollows=function(e,t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,T().next((function(n){return n.dataHosting.addGroupFollows(e,t)}))]}))}))},exports.addGroupManagers=function(e,t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,T().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=++b;return C.set(r,[e,t,n]),r},exports.addTag=function(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,T().next((function(t){return t.createTag(e)}))]}))}))},exports.addToBlacklist=function(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,T().next((function(t){return t.addToBlacklist(e)}))]}))}))},exports.batchClearRemoteHistoryMessages=function(e,t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,T().next((function(n){return n.batchClearRemoteHistoryMessages(e,t)}))]}))}))},exports.batchDeleteConversations=ye,exports.batchGetMessageReadReceiptInfoV4=function(e,t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,T().next((function(n){return n.chat.batchGetMessageReadReceiptInfoV4(e,t)}))]}))}))},exports.batchRemoveConversation=function(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){return d("batchRemoveConversation","batchDeleteConversations"),[2,ye({identifiers:e,deleteRemotely:!1,deleteMessages:!1})]}))}))},exports.batchSetConversationNotificationLevel=function(e,t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,T().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),i(this,void 0,void 0,(function(){return s(this,(function(o){return[2,T().next((function(o){return o.batchSetConversationToTop(e,!!t,r,n)}))]}))}))},exports.batchSetConversationTranslateStrategy=function(e,t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,T().next((function(n){return n.batchSetConversationTranslateStrategy(e,t)}))]}))}))},exports.bindRTCRoomForChatroom=function(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,T().next((function(t){return t.chatroom.bindRTCRoomForChatroom(e)}))]}))}))},exports.checkFriends=function(e,t){return T().next((function(n){return n.dataHosting.checkFriends(e,t)}))},exports.clearAllMessagesUnreadStatus=function(){return i(this,void 0,void 0,(function(){return s(this,(function(e){return[2,T().next((function(e){return e.chat.clearAllUnreadCount()}))]}))}))},exports.clearEventListeners=M,exports.clearHistoryMessages=function(e,t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,T().next((function(n){return n.deleteRemoteMessageByTimestamp(e,t)}))]}))}))},exports.clearMessages=function(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){return d("RongIMLib.clearMessages","RongIMLib.electronExtension.clearMessages"),[2,Le(e)]}))}))},exports.clearMessagesUnreadStatus=Re,exports.clearRealtimeConUnreadCount=function(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,T().next((function(t){return t.clearRealtimeConUnreadCount(e)}))]}))}))},exports.clearTextMessageDraft=function(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,T().next((function(t){return t.clearTextMessageDraft(e)}))]}))}))},exports.clearUnreadCountByTimestamp=function(e,t){return i(this,void 0,void 0,(function(){var n=this;return s(this,(function(r){return[2,T().next((function(r){return i(n,void 0,void 0,(function(){return s(this,(function(n){return[2,r.chat.clearUnreadCountByTimestamp(e,t)]}))}))}))]}))}))},exports.connect=function(e,t){return i(this,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return[4,T().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 i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,T().next((function(t){return t.chat.createConversationListLoader(e)}))]}))}))},exports.createGroup=function(e,t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,T().next((function(n){return n.dataHosting.createGroup(e,t)}))]}))}))},exports.createUploadTask=function(t){return i(this,void 0,void 0,(function(){var n=this;return s(this,(function(r){return[2,T().next((function(r){return i(n,void 0,void 0,(function(){var n,o,i;return s(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 se(t,ae(r,r.getOptions().uploadDomain))}))]}))}))}))]}))}))},exports.deleteFriends=function(e,t){return T().next((function(n){return n.dataHosting.deleteFriends(e,t)}))},exports.deleteLocalMessagesByTimestamp=function(e,t,n){return i(this,void 0,void 0,(function(){return s(this,(function(r){return d("RongIMLib.deleteLocalMessagesByTimestamp","RongIMLib.electronExtension.deleteMessagesByTimestamp"),[2,De(e,t,n)]}))}))},exports.deleteMessages=function(e,t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,T().next((function(n){return n.deleteRemoteMessage(e,t)}))]}))}))},exports.destroy=function(){return i(this,void 0,void 0,(function(){return s(this,(function(e){return M(),[2,E()]}))}))},exports.disconnect=y,exports.dismissGroup=function(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,T().next((function(t){return t.dataHosting.dismissGroup(e)}))]}))}))},exports.electronExtension=He,exports.forceRemoveChatRoomEntry=function(e,t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,T().next((function(n){return n.chatroom.removeChatroomEntry(e,t,!0)}))]}))}))},exports.forceSetChatRoomEntry=function(e,t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,T().next((function(n){return n.chatroom.setChatroomEntry(e,t,!0)}))]}))}))},exports.getAllChatRoomEntries=function(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,T().next((function(t){return t.chatroom.getAllChatroomEntries(e)}))]}))}))},exports.getAllConversationList=Ce,exports.getAllRobots=function(){return T().next((function(e){return e.getAllRobots()}))},exports.getAllUltraGroupUnreadCount=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){return d("getAllUltraGroupUnreadCount","getTotalUnreadCountByLevels"),[2,Me([e.ConversationType.ULTRA_GROUP],[])]}))}))},exports.getAllUltraGroupUnreadMentionedCount=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){return d("getAllUltraGroupUnreadMentionedCount","getTotalUnreadMentionedCountByLevels"),[2,_e([e.ConversationType.ULTRA_GROUP],[])]}))}))},exports.getAllUnreadMentionedCount=function(){return i(this,void 0,void 0,(function(){return s(this,(function(e){return[2,T().next((function(e){return e.getAllUnreadMentionedCount()}))]}))}))},exports.getAppSettings=function(){var e=T().tryTrans((function(e){return e.getAppSettings()}));return e.isOk?e.data:null},exports.getAutoTranslateEnabled=function(){return i(this,void 0,void 0,(function(){return s(this,(function(e){return[2,T().next((function(e){return e.getAutoTranslateEnabled()}))]}))}))},exports.getBlacklist=function(){return i(this,void 0,void 0,(function(){return s(this,(function(e){return[2,T().next((function(e){return e.getBlacklist()}))]}))}))},exports.getBlacklistStatus=function(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,T().next((function(t){return t.getBlacklistStatus(e)}))];case 1:return[2,t.sent().trans((function(e){return 0===e}))]}}))}))},exports.getBlockUltraGroupList=function(){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,T().next((function(e){return e.getBlockedUGList()}))];case 1:return[2,e.sent().trans((function(e){return e.map((function(e){return f(e)}))}))]}}))}))},exports.getBlockedConversationList=function(){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,T().next((function(e){return e.getBlockedConversationList()}))];case 1:return[2,e.sent().trans((function(e){return e.map(f)}))]}}))}))},exports.getChatRoomEntry=function(e,t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,T().next((function(n){return n.chatroom.getChatroomEntry(e,t)}))]}))}))},exports.getChatRoomInfo=function(e,t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,T().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 i(this,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return[4,T().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 c(e)}))}}))]}}))}))},exports.getConnectionStatus=function(){return x((function(e){return e.getConnectionStatus()}))},exports.getConversation=function(e){return i(this,void 0,void 0,(function(){var t=this;return s(this,(function(n){return[2,T().next((function(n){return i(t,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,n.getConversation(e)];case 1:return[2,t.sent().trans((function(e){return f(e)}))]}}))}))}))]}))}))},exports.getConversationList=function(e,t){return i(this,void 0,void 0,(function(){var n=this;return s(this,(function(r){switch(r.label){case 0:return d("getConversationList","getConversationListByTimestamp"),[4,T().next((function(r){return i(n,void 0,void 0,(function(){return s(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(f)}))]}}))}))},exports.getConversationListByTimestamp=function(e){return i(this,void 0,void 0,(function(){var t=this;return s(this,(function(n){switch(n.label){case 0:return[4,T().next((function(n){return i(t,void 0,void 0,(function(){return s(this,(function(t){return[2,n.getConversationListByTimestamp(e)]}))}))}))];case 1:return[2,n.sent().trans((function(e){return e.map(f)}))]}}))}))},exports.getConversationNotificationLevel=function(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,T().next((function(t){return t.getConversationNotificationLevel(e)}))]}))}))},exports.getConversationNotificationStatus=function(t){return i(this,void 0,void 0,(function(){var n=this;return s(this,(function(r){return[2,T().next((function(r){return i(n,void 0,void 0,(function(){return s(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 i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,T().next((function(t){return t.getConversationTypeNotificationLevel(e)}))]}))}))},exports.getConversationsFromTagByPage=function(e,t,n){return i(this,void 0,void 0,(function(){return s(this,(function(r){switch(r.label){case 0:return d("getConversationsFromTagByPage","createConversationListLoader"),[4,T().next((function(r){return r.getConversationListByTag(e,n,t)}))];case 1:return[2,r.sent().trans((function(e){return e.map((function(e){return o(o({},f(t=e)),{isTopInTag:t.isTopInTag});var t}))}))]}}))}))},exports.getConversationsIncludingRobots=function(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,T().next((function(t){return t.chat.getConversationsIncludingRobots(e)}))];case 1:return[2,t.sent().trans((function(e){return e.map(f)}))]}}))}))},exports.getCurrentUserId=function(){return x((function(e){return e.getCurrentUserId()}))},exports.getDeviceId=function(){return x((function(e){return e.getDeviceId()}))},exports.getDownloadAuth=function(t){var n=this;return T().next((function(r){return i(n,void 0,void 0,(function(){return s(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 T().next((function(o){return o.getFileToken(e,t,n,r)}))},exports.getFileUrl=function(t,n,r,o,u){return i(this,void 0,void 0,(function(){return s(this,(function(i){return(null==o?void 0:o.isBosRes)?[2,e.ok(o)]:[2,T().next((function(o){return o.getFileUrl(t,n,u||e.UploadMethod.QINIU,r)}))]}))}))},exports.getFirstUnreadMessage=function(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,T().next((function(t){return t.getFirstUnreadMessage(e)}))];case 1:return[2,t.sent().trans((function(e){return e?c(e):null}))]}}))}))},exports.getFirstUnreadMessageInfo=function(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,T().next((function(t){return t.getFirstUnreadMessageDigest(e)}))]}))}))},exports.getFriendAddPermission=function(){return T().next((function(e){return e.dataHosting.getFriendAddPermission()}))},exports.getFriendApplications=function(e,t,n){return T().next((function(r){return r.dataHosting.getFriendApplications(e,t,n)}))},exports.getFriends=function(e,t){return T().next((function(n){return n.dataHosting.getFriends(e,t)}))},exports.getFriendsInfo=function(e){return T().next((function(t){return t.dataHosting.getFriendsInfo(e)}))},exports.getGroupApplications=function(e,t,n){return i(this,void 0,void 0,(function(){return s(this,(function(r){return[2,T().next((function(r){return r.dataHosting.getGroupApplications(e,t,n)}))]}))}))},exports.getGroupFollows=function(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,T().next((function(t){return t.dataHosting.getGroupFollows(e)}))]}))}))},exports.getGroupMembers=function(e,t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,T().next((function(n){return n.dataHosting.getGroupMembers(e,t)}))]}))}))},exports.getGroupMembersByRole=function(e,t,n){return i(this,void 0,void 0,(function(){return s(this,(function(r){return[2,T().next((function(r){return r.dataHosting.getGroupMembersByRole(e,t,n)}))]}))}))},exports.getGroupsInfo=function(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,T().next((function(t){return t.dataHosting.getGroupsInfo(e)}))]}))}))},exports.getHistoryMessages=function(e,t){return i(this,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return[4,T().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 c(e)}))}}))]}}))}))},exports.getJoinedGroups=function(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,T().next((function(t){return t.dataHosting.getJoinedGroups(e)}))]}))}))},exports.getJoinedGroupsByRole=function(e,t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,T().next((function(n){return n.dataHosting.getJoinedGroupsByRole(t,e)}))]}))}))},exports.getMessage=fe,exports.getMessageReadReceiptInfoV5=function(e,t){return i(this,void 0,void 0,(function(){var n=this;return s(this,(function(r){return[2,T().next((function(r){return i(n,void 0,void 0,(function(){return s(this,(function(n){return[2,r.getMessageReadReceiptInfoV5(e,t)]}))}))}))]}))}))},exports.getMessageReadReceiptInfoV5ByIdentifiers=function(e){return i(this,void 0,void 0,(function(){var t=this;return s(this,(function(n){return[2,T().next((function(n){return i(t,void 0,void 0,(function(){return s(this,(function(t){return[2,n.getMessageReadReceiptInfoV5ByIdentifiers(e)]}))}))}))]}))}))},exports.getMessageReadReceiptV4=function(e,t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,T().next((function(n){return n.chat.getMessageReadReceiptV4(e,t)}))]}))}))},exports.getMessageReader=function(e,t,n){return i(this,void 0,void 0,(function(){var r=this;return s(this,(function(o){return[2,T().next((function(o){return i(r,void 0,void 0,(function(){return s(this,(function(r){return[2,o.chat.getMessageReader(e,t,n)]}))}))}))]}))}))},exports.getMessagesReadReceiptByUsersV5=function(e,t,n){return i(this,void 0,void 0,(function(){var r=this;return s(this,(function(o){return[2,T().next((function(o){return i(r,void 0,void 0,(function(){return s(this,(function(r){return[2,o.getMessagesReadReceiptByUsersV5(e,t,n)]}))}))}))]}))}))},exports.getMessagesReadReceiptUsersByPageV5=function(e,t,n){return i(this,void 0,void 0,(function(){var r=this;return s(this,(function(o){return[2,T().next((function(o){return i(r,void 0,void 0,(function(){return s(this,(function(r){return[2,o.getMessagesReadReceiptUsersByPageV5(e,t,n)]}))}))}))]}))}))},exports.getMyUserProfile=function(){return T().next((function(e){return e.getMyUserProfile()}))},exports.getMyUserProfileVisibility=function(){return T().next((function(e){return e.dataHosting.getMyUserProfileVisibility()}))},exports.getNotificationQuietHoursSetting=function(){return T().next((function(e){return e.getNotificationQuietHoursSetting()}))},exports.getProxy=function(){return i(this,void 0,void 0,(function(){return s(this,(function(e){return[2,T().next((function(e){return e.getProxy()}))]}))}))},exports.getRealtimeConTotalUnreadCount=function(){return i(this,void 0,void 0,(function(){return s(this,(function(e){return[2,T().next((function(e){return e.getRealtimeConTotalUnreadCount()}))]}))}))},exports.getRealtimeConUnreadCounts=function(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,T().next((function(t){return t.batchGetRealtimeConUnreadCount(e)}))]}))}))},exports.getRealtimeConversations=function(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,T().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(f)}))]}}))}))},exports.getRemoteHistoryMessages=function(e,t){return i(this,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return[4,T().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 c(e)}))}}))]}}))}))},exports.getRobotById=function(e){return T().next((function(t){return t.getRobotById(e)}))},exports.getServerTime=function(){return x((function(e){return e.getServerTime()}))},exports.getSubscribeUserList=function(e,t,n){return i(this,void 0,void 0,(function(){return s(this,(function(r){return[2,T().next((function(r){return r.getSubscribeUserList(e,t,n)}))]}))}))},exports.getSubscribeUserStatus=function(e,t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,T().next((function(n){return n.getSubscribeUserStatus(e,t)}))]}))}))},exports.getSubscribeUsersOnlineStatus=function(e){return T().next((function(t){return t.getSubscribeUsersOnlineStatus(e)}))},exports.getTags=function(){return i(this,void 0,void 0,(function(){return s(this,(function(e){return[2,T().next((function(e){return e.getTagList()}))]}))}))},exports.getTagsFromConversation=function(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,T().next((function(t){return t.getTagsForConversation(e)}))]}))}))},exports.getTextMessageDraft=function(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,T().next((function(t){return t.getTextMessageDraft(e)}))]}))}))},exports.getTopConversationList=function(e,t){return i(this,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return[4,T().next((function(n){return n.getTopConversationList(e,t)}))];case 1:return[2,n.sent().trans((function(e){return e.map(f)}))]}}))}))},exports.getTotalUnreadCount=function(e,t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,T().next((function(n){return n.getTotalUnreadCount(t,e)}))]}))}))},exports.getTotalUnreadCountByLevels=Me,exports.getTotalUnreadMentionedCountByLevels=_e,exports.getTranslationLanguage=function(){return i(this,void 0,void 0,(function(){return s(this,(function(e){return[2,T().next((function(e){return e.getTranslationLanguage()}))]}))}))},exports.getUltraGroupDefaultNotificationLevel=function(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,T().next((function(t){return t.getUltraGroupDefaultNotificationLevel(null==e?void 0:e.targetId,null==e?void 0:e.channelId)}))]}))}))},exports.getUltraGroupFirstUnreadMessageTimestamp=function(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,T().next((function(t){return t.getUGFirstUnreadMessageDigest(e)}))]}))}))},exports.getUltraGroupList=function(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,T().next((function(t){return t.getUltraGroupList(e)}))]}))}))},exports.getUltraGroupMessageListByMessageUId=function(e,t){return i(this,void 0,void 0,(function(){var n=this;return s(this,(function(r){switch(r.label){case 0:return[4,T().next((function(r){return i(n,void 0,void 0,(function(){return s(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]?c(e[n]):void 0;return t}))]}}))}))},exports.getUltraGroupUnreadCountByTargetId=function(e,t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,T().next((function(n){return n.getUGUnreadCountForAllChannels(e,!1,t)}))]}))}))},exports.getUltraGroupUnreadInfoList=function(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,T().next((function(t){return t.getUGUnreadInfoList(e)}))]}))}))},exports.getUltraGroupUnreadMentionedCountByTargetId=function(e,t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,T().next((function(n){return n.getUGUnreadCountForAllChannels(e,!0,t)}))]}))}))},exports.getUltraGroupUnreadMentionedMessages=function(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,T().next((function(t){return t.getUGUnreadMentionedDigest(e)}))]}))}))},exports.getUnreadConversationList=function(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,T().next((function(t){return t.getUnreadConversationList(e)}))];case 1:return[2,t.sent().trans((function(e){return e.map(f)}))]}}))}))},exports.getUnreadCount=function(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,T().next((function(t){return t.getUnreadCount(e)}))]}))}))},exports.getUnreadCountByTag=function(e,t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,T().next((function(n){return n.getUnreadCountByTag(e,t)}))]}))}))},exports.getUnreadMentionMeConversationList=function(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,T().next((function(t){return t.getUnreadMentionMeConversationList(e)}))];case 1:return[2,t.sent().trans((function(e){return e.map(f)}))]}}))}))},exports.getUnreadMentionedCount=function(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,T().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 T().next((function(t){return t.getUserProfiles(e)}))},exports.init=function(t){!function(t){var n,r,i;h?m.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})),g=t,h=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!==(i=t.useNaviV2)&&void 0!==i&&i,loggerProxy:t.loggerProxy}),m=h.logger,h.assignWatcher(p),e.logger.init(m),h.sse.on("message",(function(e,t){var n=o(o({},t),{message:t.message?c(t.message):void 0});l.emit(exports.Events.STREAM_MESSAGE_RESPONSE,n)})))}(t)},exports.insertMessage=function(e,t,n){return void 0===n&&(n={}),i(this,void 0,void 0,(function(){return s(this,(function(r){return d("insertMessage","electronExtension.insertMessage"),[2,Ge(e,t,n)]}))}))},exports.installPlugin=function(e,t){return x((function(n){return n.install(e,t)}))},exports.inviteUsersToGroup=function(e,t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,T().next((function(n){return n.dataHosting.inviteUsersToGroup(e,t)}))]}))}))},exports.joinChatRoom=function(e,t){return i(this,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return[4,T().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 i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,T().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 i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,T().next((function(t){return t.dataHosting.joinGroup(e)}))]}))}))},exports.kickGroupMembers=function(e,t,n){return i(this,void 0,void 0,(function(){return s(this,(function(r){return[2,T().next((function(r){return r.dataHosting.kickGroupMembers(e,t,n)}))]}))}))},exports.markRemoteConversationAsRead=function(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,T().next((function(t){return t.chat.markRemoteConversationAsRead(e)}))]}))}))},exports.modifyMessage=function(e,t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return d("modifyMessage","modifyMessageWithParams"),[2,be({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=be,exports.onceEventListener=function(e,t,n){l.once(e,t,n)},exports.quitChatRoom=function(e,t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,T().next((function(n){return n.chatroom.quitChatroom(e,t)}))]}))}))},exports.quitGroup=function(e,t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,T().next((function(n){return n.dataHosting.quitGroup(e,t)}))]}))}))},exports.recallMessage=Ee,exports.refreshReferenceMessageWithParams=function(e){return T().next((function(t){var n=function(e){return e.map((function(e){return{messageUId:e.messageUId,message:e.message?c(e.message):void 0,code:e.code}}))};return t.refreshReferenceMessageWithParams(o(o({},e),{remoteMessageBlock:function(t){e.remoteMessageBlock&&e.remoteMessageBlock(n(t))},localMessageBlock:function(t){e.localMessageBlock&&e.localMessageBlock(n(t))}}))}))},exports.refuseFriendApplication=function(e){return T().next((function(t){return t.dataHosting.refuseFriendRequest(e)}))},exports.refuseGroupApplication=function(e,t,n,r){return i(this,void 0,void 0,(function(){return s(this,(function(o){return[2,T().next((function(o){return o.dataHosting.refuseGroupApplication(e,t,n,r)}))]}))}))},exports.refuseGroupInvite=function(e,t,n){return i(this,void 0,void 0,(function(){return s(this,(function(r){return[2,T().next((function(r){return r.dataHosting.refuseGroupInvite(e,t,n)}))]}))}))},exports.registerMessageType=function(t,n,r,o,i){return x((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 _(e,r,t,n)}}(t,n,r)}))},exports.removeAllExpansionForUltraGroupMessage=function(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,T().next((function(t){return t.removeAllMessageExpansion(e)}))]}))}))},exports.removeChatRoomEntries=function(e,t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,T().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 i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,T().next((function(n){return n.chatroom.removeChatroomEntry(e,t,!1)}))]}))}))},exports.removeConversation=Se,exports.removeConversationsFromTag=function(e,t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,T().next((function(n){return n.removeTagForConversations(e,t)}))]}))}))},exports.removeEventListener=function(e,t,n){l.off(e,t,n)},exports.removeEventListeners=function(e){l.removeAll(e)},exports.removeExpansionForUltraGroupMessage=function(e,t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return d("removeExpansionForUltraGroupMessage","removeMessageExpansionForKey"),[2,Te(e,t)]}))}))},exports.removeFromBlacklist=function(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,T().next((function(t){return t.removeFromBlacklist(e)}))]}))}))},exports.removeGroupFollows=function(e,t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,T().next((function(n){return n.dataHosting.removeGroupFollows(e,t)}))]}))}))},exports.removeGroupManagers=function(e,t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,T().next((function(n){return n.dataHosting.removeGroupManagers(e,t)}))]}))}))},exports.removeMessageExpansionForKey=Te,exports.removeMonitor=function(e){C.delete(e)},exports.removeNotificationQuietHoursSetting=function(){return T().next((function(e){return e.removeNotificationQuietHoursSetting()}))},exports.removeRealtimeConversations=function(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,T().next((function(t){return t.removeRealtimeConversations(e)}))]}))}))},exports.removeTag=function(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,T().next((function(t){return t.removeTag(e)}))]}))}))},exports.removeTagFromConversations=function(e,t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,T().next((function(n){return n.removeTagForConversations(e,t)}))]}))}))},exports.removeTagsFromConversation=function(e,t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,T().next((function(n){return n.removeTagsForConversation(e,t)}))]}))}))},exports.requestSpeechToTextForMessage=function(e,t){return T().next((function(n){return n.requestSpeechToTextForMessage(e,t)}))},exports.requestStreamMessageContent=function(e){return T().next((function(t){return t.sse.requestStreamMessageContent(e)}))},exports.saveTextMessageDraft=function(e,t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,T().next((function(n){return n.saveTextMessageDraft(e,t)}))]}))}))},exports.searchConversationByContent=function(t,n,r,o){return i(this,void 0,void 0,(function(){return s(this,(function(i){return d("searchConversationByContent","electronExtension.searchConversationByContent"),[2,Ae(t,null!=r?r:[e.MessageType.TEXT,e.MessageType.FILE],o,n)]}))}))},exports.searchFriendsInfo=function(e){return T().next((function(t){return t.dataHosting.searchFriendsInfo(e)}))},exports.searchGroupMembers=function(e,t,n){return i(this,void 0,void 0,(function(){return s(this,(function(r){return[2,T().next((function(r){return r.dataHosting.searchGroupMembers(e,t,n)}))]}))}))},exports.searchJoinedGroups=function(e,t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,T().next((function(n){return n.dataHosting.searchJoinedGroups(e,t)}))]}))}))},exports.searchMessages=function(e,t,n,r){return i(this,void 0,void 0,(function(){return s(this,(function(o){return d("RongIMLib.searchMessages","RongIMLib.ElectronExtension.searchMessagesWithParams"),[2,Oe(e,t,n,r)]}))}))},exports.searchUserProfileByUniqueId=function(e){return T().next((function(t){return t.dataHosting.searchUserProfileByUniqueId(e)}))},exports.sendFileMessage=pe,exports.sendGIFMessage=he,exports.sendHQVoiceMessage=ge,exports.sendImageMessage=ve,exports.sendMessage=de,exports.sendReadReceiptMessage=function(t,n,r,o){return i(this,void 0,void 0,(function(){return s(this,(function(i){return[2,T().next((function(i){return i.chat.sendReadReceiptMessage({targetId:t,conversationType:e.ConversationType.PRIVATE,channelId:o},n,r)}))]}))}))},exports.sendReadReceiptMessageV4=function(e,t,n){return i(this,void 0,void 0,(function(){return s(this,(function(r){return[2,T().next((function(r){return r.chat.sendReadReceiptMessageV4(e,t,n)}))]}))}))},exports.sendReadReceiptRequest=function(t,n,r){return i(this,void 0,void 0,(function(){return s(this,(function(o){return[2,T().next((function(o){return o.chat.sendReadReceiptRequest({targetId:t,conversationType:e.ConversationType.GROUP,channelId:r},n)}))]}))}))},exports.sendReadReceiptResponse=function(e,t,n){return i(this,void 0,void 0,(function(){return s(this,(function(e){throw new Error("This method is deprecated, please use method sendReadReceiptResponseV2.")}))}))},exports.sendReadReceiptResponseV2=function(t,n,r){return i(this,void 0,void 0,(function(){return s(this,(function(o){return[2,T().next((function(o){return o.chat.sendReadReceipt({targetId:t,conversationType:e.ConversationType.GROUP,channelId:r},n)}))]}))}))},exports.sendReadReceiptResponseV5=function(e,t){return i(this,void 0,void 0,(function(){var n=this;return s(this,(function(r){return[2,T().next((function(r){return i(n,void 0,void 0,(function(){return s(this,(function(n){return[2,r.sendReadReceiptResponseV5(e,t)]}))}))}))]}))}))},exports.sendSightMessage=me,exports.sendSyncReadStatusMessage=function(e,t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,T().next((function(n){return n.chat.sendSyncReadStatusMessage(e,t)}))]}))}))},exports.sendTextMessage=function(e,t,n){return de(e,new j(t),n)},exports.sendTypingStatusMessage=function(e,t){return i(this,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return[4,T().next((function(n){return n.chat.sendTypingStatus(e,t)}))];case 1:return[2,n.sent().trans(c)]}}))}))},exports.sendUltraGroupTypingStatus=function(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,T().next((function(t){return t.chat.sendUltraGroupTypingStatus(e)}))]}))}))},exports.setAutoTranslateEnabled=function(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,T().next((function(t){return t.setAutoTranslateEnabled(e)}))]}))}))},exports.setChatRoomEntries=function(e,t){return i(this,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return[4,T().next((function(n){return n.chatroom.setChatroomEntries(e,t)}))];case 1:return[2,n.sent().wipe()]}}))}))},exports.setChatRoomEntry=function(e,t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,T().next((function(n){return n.chatroom.setChatroomEntry(e,t,!1)}))]}))}))},exports.setConversationNotificationLevel=Ie,exports.setConversationNotificationStatus=function(t,n){return i(this,void 0,void 0,(function(){var r=this;return s(this,(function(o){return[2,T().next((function(o){return i(r,void 0,void 0,(function(){var r;return s(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=Ue,exports.setConversationToTopInTag=function(e,t,n){return i(this,void 0,void 0,(function(){return s(this,(function(r){return[2,T().next((function(r){return r.setConversationStatusInTag(e,t,{isTop:n})}))]}))}))},exports.setConversationTypeNotificationLevel=function(e,t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,T().next((function(n){return n.setConversationTypeNotificationLevel(e,t)}))]}))}))},exports.setFriendAddPermission=function(e){return T().next((function(t){return t.dataHosting.setFriendAddPermission(e)}))},exports.setFriendInfo=function(e,t,n){return T().next((function(r){return r.dataHosting.setFriendInfo(e,t||"",n)}))},exports.setGroupMemberInfo=function(e,t,n,r){return i(this,void 0,void 0,(function(){return s(this,(function(o){return[2,T().next((function(o){return o.dataHosting.setGroupMemberInfo(e,t,n,r)}))]}))}))},exports.setGroupRemark=function(e,t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,T().next((function(n){return n.dataHosting.setGroupRemark(e,t)}))]}))}))},exports.setMessageReceivedStatus=function(e,t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,Ne(e,t)]}))}))},exports.setNotificationQuietHoursWithSetting=function(e){return T().next((function(t){return t.setNotificationQuietHoursWithSetting(e)}))},exports.setProxy=function(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,T().next((function(t){return t.setProxy(e)}))]}))}))},exports.setTranslationLanguage=function(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,T().next((function(t){return t.setTranslationLanguage(e)}))]}))}))},exports.setUltraGroupDefaultNotificationLevel=function(e,t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,T().next((function(n){return n.setUltraGroupDefaultNotificationLevel(null==e?void 0:e.targetId,t,null==e?void 0:e.channelId)}))]}))}))},exports.stopUploadTask=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,e.ok(ue(t))]}))}))},exports.subscribeUserStatus=function(e,t,n){return i(this,void 0,void 0,(function(){return s(this,(function(r){return[2,T().next((function(r){return r.subscribeUser(e,t,n)}))]}))}))},exports.testProxy=function(e,t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,T().next((function(n){return n.testProxy(e,t)}))]}))}))},exports.transferGroupOwner=function(e,t,n,r){return i(this,void 0,void 0,(function(){return s(this,(function(o){return[2,T().next((function(o){return o.dataHosting.transferGroupOwner(e,t,!!n,r)}))]}))}))},exports.translateMessagesWithParams=function(e){return T().next((function(t){return t.translateMessagesWithParams(e)}))},exports.translateTextsWithParams=function(e){return T().next((function(t){return t.translateTextsWithParams(e)}))},exports.unSubscribeUserStatus=function(e,t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,T().next((function(n){return n.unSubscribeUser(e,t)}))]}))}))},exports.updateExpansionForUltraGroupMessage=function(e,t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return d("updateExpansionForUltraGroupMessage","updateMessageExpansion"),[2,xe(e,t)]}))}))},exports.updateGroupInfo=function(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,T().next((function(t){return t.dataHosting.updateGroupInfo(e)}))]}))}))},exports.updateMessageExpansion=xe,exports.updateMyUserProfile=function(e){return T().next((function(t){return t.updateMyUserProfile(e)}))},exports.updateMyUserProfileVisibility=function(e){return T().next((function(t){return t.dataHosting.updateMyUserProfileVisibility(e)}))},exports.updateTag=function(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,T().next((function(t){return t.updateTag(e)}))]}))}))},exports.upload=ce;