12 |
- function oe(){return typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope}function de(n){return(s,d,e)=>{if(oe())throw new Error("`startWorkerFromMain` should only be called from the main thread");if(typeof Worker>"u")throw new Error("Web workers not available. sqlite3 requires web workers to work.");n().then(({default:t})=>{let o=new t;o.postMessage({type:"init",buffers:[s,d]}),o.addEventListener("message",a=>{e.postMessage(a.data)})})}}function ae(n,s){const d=de(s);return e=>{e.addEventListener("message",t=>{switch(t.data.type){case n:d(t.data.argBuffer,t.data.resultBuffer,e);break}})}}const ue=ae("__absurd:spawn-idb-worker",()=>Promise.resolve().then(function(){return Ae}));var le=Object.defineProperty,ce=Object.defineProperties,ge=Object.getOwnPropertyDescriptors,A=Object.getOwnPropertySymbols,pe=Object.prototype.hasOwnProperty,we=Object.prototype.propertyIsEnumerable,C=(n,s,d)=>s in n?le(n,s,{enumerable:!0,configurable:!0,writable:!0,value:d}):n[s]=d,Z=(n,s)=>{for(var d in s||(s={}))pe.call(s,d)&&C(n,d,s[d]);if(A)for(var d of A(s))we.call(s,d)&&C(n,d,s[d]);return n},L=(n,s)=>ce(n,ge(s)),g=(n,s,d)=>(C(n,typeof s!="symbol"?s+"":s,d),d);const v={CONNECT_TIMEOUT:{code:-32300,message:"Connect timeout"},APPLICATION_ERROR:{code:-32500,message:"Application error"},METHOD_NOT_FOUND:{code:-32601,message:"Method not found"}};class he{constructor(s){g(this,"_currentEndpoint"),g(this,"_targetEndpoint"),g(this,"_events"),g(this,"_originOnmessage"),g(this,"_receiveMessage"),g(this,"onerror",null),g(this,"config"),g(this,"sendAdapter"),g(this,"receiveAdapter"),this._events={},this._currentEndpoint=s.currentEndpoint,this._targetEndpoint=s.targetEndpoint,this._originOnmessage=null,this.config=s.config,this.receiveAdapter=s.receiveAdapter,this.sendAdapter=s.sendAdapter;const d=e=>{const t=this.receiveAdapter?this.receiveAdapter(e):e.data;if(t&&typeof t.event=="string"){const o=this._events[t.event]||[];if(o.length){o.forEach(a=>{a(...t.args||[])});return}this.onerror&&this.onerror(L(Z({},v.METHOD_NOT_FOUND),{data:t}))}};if(this._currentEndpoint.addEventListener){"start"in this._currentEndpoint&&this._currentEndpoint.start&&this._currentEndpoint.start(),this._currentEndpoint.addEventListener("message",d,!1),this._receiveMessage=d;return}this._originOnmessage=this._currentEndpoint.onmessage,this._currentEndpoint.onmessage=e=>{this._originOnmessage&&this._originOnmessage(e),d(e)},this._receiveMessage=this._currentEndpoint.onmessage}emit(s,...d){const e={event:s,args:d},t=this.sendAdapter?this.sendAdapter(e,this._targetEndpoint):{data:e},o=t.data||e,a=this.config?typeof this.config=="function"?this.config(o,this._targetEndpoint)||{}:this.config||{}:{};Array.isArray(t.transfer)&&t.transfer.length&&(a.transfer=t.transfer),this._targetEndpoint.postMessage(o,a)}on(s,d){this._events[s]||(this._events[s]=[]),this._events[s].push(d)}off(s,d){if(!this._events[s])return;if(!d){this._events[s]=[];return}const e=this._events[s]||[];this._events[s]=e.filter(t=>t!==d)}destroy(){if(this._currentEndpoint.removeEventListener){this._currentEndpoint.removeEventListener("message",this._receiveMessage,!1);return}try{this._currentEndpoint.onmessage=this._originOnmessage}catch(s){console.warn(s)}}}const m=class{constructor(n){g(this,"_event"),g(this,"_methods",{}),g(this,"_timeout",0),g(this,"_$connect",null),this._event=n.event,this._timeout=n.timeout||0,n.methods&&Object.entries(n.methods).forEach(([s,d])=>{this.registerMethod(s,d)}),this._event.onerror=s=>{const{code:d,message:e,data:t}=s;if(t.event&&Array.isArray(t.args)&&t.args.length){const o=t.args[0],a=this._getAckEventName(o.method),u={jsonrpc:"2.0",id:o==null?void 0:o.id,error:{code:d,message:e,data:o}};this._event.emit(a,u)}else console.error(s)},this.connect()}static uuid(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,n=>{const s=Math.random()*16|0;return(n=="x"?s:s&3|8).toString(16)})}_getSynEventName(n){return`${m.EVENT.SYN_SIGN}${n}`}_getAckEventName(n){return`${m.EVENT.ACK_SIGN}${n}`}connect(n){return this._$connect?this._$connect:(this._$connect=new Promise((s,d)=>{const e=n||this._timeout;let t;e&&(t=setTimeout(()=>{const S=L(Z({},v.TIMEOUT),{data:{timeout:e}});d(S)},e));const o=m.EVENT.CONNECT,a=this._getAckEventName(o),u=this._getSynEventName(o),l=()=>{clearTimeout(t),s()};this._event.on(a,l);const w=()=>{this._event.emit(a),l()};this._event.on(u,w),this._event.emit(u)}),this._$connect)}registerMethod(n,s){if(this._methods[n])throw new Error(`${n} already registered`);this._methods[n]=s;const d=this._getSynEventName(n),e=t=>{const o=this._getAckEventName(n);if(!t.id){s(...t.params);return}Promise.resolve(s(...t.params)).then(a=>{const u={jsonrpc:"2.0",result:a,id:t.id};this._event.emit(o,u)}).catch(a=>{const u={jsonrpc:"2.0",id:t.id,error:{code:(a==null?void 0:a.code)||v.APPLICATION_ERROR.code,message:(a==null?void 0:a.message)||v.APPLICATION_ERROR.message,data:null}};this._event.emit(o,u)})};this._event.on(d,e)}removeMethod(n){this._methods[n]||delete this._methods[n];const s=this._getSynEventName(n);this._event.off(s)}invoke(n,...s){return new Promise((d,e)=>{const t=s[s.length-1],o=t&&typeof t=="object"&&(Reflect.has(t,"isNotify")||Reflect.has(t,"timeout")),a=o?t:{isNotify:!1,timeout:0},u=o?s.slice(0,-1):s,l=this._getSynEventName(n),w=m.uuid(),S={jsonrpc:"2.0",method:n,params:u,id:w};if(this._event.emit(l,S),a.isNotify)d(void 0);else{const O=this._getAckEventName(n),f=a.timeout||this._timeout;let W;f&&(W=setTimeout(()=>{const M=L(Z({},v.CONNECT_TIMEOUT),{data:{timeout:f}});e(M)},f));const N=M=>{M.id===w&&(clearTimeout(W),this._event.off(O,N),M.error?e(M.error):d(M.result))};this._event.on(O,N)}})}destroy(){Object.entries(this._methods).forEach(([d])=>{const e=this._getSynEventName(d);this._event.off(e)});const n=this._getAckEventName(m.EVENT.CONNECT),s=this._getSynEventName(m.EVENT.CONNECT);this._event.off(s),this._event.off(n),this._event.destroy&&this._event.destroy()}};let R=m;g(R,"CODES",v);g(R,"EVENT",{SYN_SIGN:"syn:",ACK_SIGN:"ack:",CONNECT:"__rpc_connect_event",SYNC_METHODS:"__rpc_sync_methods_event"});const me={ErrorInit:10001,ErrorNoRecord:10002,ErrorDBTimeout:10003};var F;(function(n){n.Login="Login",n.OnConnectFailed="OnConnectFailed",n.OnConnectSuccess="OnConnectSuccess",n.OnConnecting="OnConnecting",n.OnKickedOffline="OnKickedOffline",n.OnSelfInfoUpdated="OnSelfInfoUpdated",n.OnUserTokenExpired="OnUserTokenExpired",n.OnProgress="OnProgress",n.OnRecvNewMessage="OnRecvNewMessage",n.OnRecvNewMessages="OnRecvNewMessages",n.OnRecvMessageRevoked="OnRecvMessageRevoked",n.OnNewRecvMessageRevoked="OnNewRecvMessageRevoked",n.OnRecvC2CReadReceipt="OnRecvC2CReadReceipt",n.OnRecvGroupReadReceipt="OnRecvGroupReadReceipt",n.OnConversationChanged="OnConversationChanged",n.OnNewConversation="OnNewConversation",n.OnSyncServerFailed="OnSyncServerFailed",n.OnSyncServerFinish="OnSyncServerFinish",n.OnSyncServerStart="OnSyncServerStart",n.OnTotalUnreadMessageCountChanged="OnTotalUnreadMessageCountChanged",n.OnBlackAdded="OnBlackAdded",n.OnBlackDeleted="OnBlackDeleted",n.OnFriendApplicationAccepted="OnFriendApplicationAccepted",n.OnFriendApplicationAdded="OnFriendApplicationAdded",n.OnFriendApplicationDeleted="OnFriendApplicationDeleted",n.OnFriendApplicationRejected="OnFriendApplicationRejected",n.OnFriendInfoChanged="OnFriendInfoChanged",n.OnFriendAdded="OnFriendAdded",n.OnFriendDeleted="OnFriendDeleted",n.OnJoinedGroupAdded="OnJoinedGroupAdded",n.OnJoinedGroupDeleted="OnJoinedGroupDeleted",n.OnGroupDismissed="OnGroupDismissed",n.OnGroupMemberAdded="OnGroupMemberAdded",n.OnGroupMemberDeleted="OnGroupMemberDeleted",n.OnGroupApplicationAdded="OnGroupApplicationAdded",n.OnGroupApplicationDeleted="OnGroupApplicationDeleted",n.OnGroupInfoChanged="OnGroupInfoChanged",n.OnGroupMemberInfoChanged="OnGroupMemberInfoChanged",n.OnGroupApplicationAccepted="OnGroupApplicationAccepted",n.OnGroupApplicationRejected="OnGroupApplicationRejected",n.UploadComplete="UploadComplete",n.OnRecvCustomBusinessMessage="OnRecvCustomBusinessMessage",n.OnUserStatusChanged="OnUserStatusChanged",n.OnReceiveNewInvitation="OnReceiveNewInvitation",n.OnInviteeAccepted="OnInviteeAccepted",n.OnInviteeRejected="OnInviteeRejected",n.OnInvitationCancelled="OnInvitationCancelled",n.OnHangUp="OnHangUp",n.OnInvitationTimeout="OnInvitationTimeout",n.OnInviteeAcceptedByOtherDevice="OnInviteeAcceptedByOtherDevice",n.OnInviteeRejectedByOtherDevice="OnInviteeRejectedByOtherDevice",n.OnStreamChange="OnStreamChange",n.OnRoomParticipantConnected="OnRoomParticipantConnected",n.OnRoomParticipantDisconnected="OnRoomParticipantDisconnected",n.OnReceiveCustomSignal="OnReceiveCustomSignal"})(F||(F={}));let p,h,ie=!1;function Ge(){if(typeof Worker<"u"&&"type"in Worker.prototype)return!0;try{const n=new Blob([""],{type:"text/javascript"}),s=URL.createObjectURL(n);return new Worker(s,{type:"module"}),URL.revokeObjectURL(s),!0}catch{return!1}}function X(){if(typeof window>"u")return;const n=import.meta.url.includes(".vite/deps"),s=Ge(),d=t=>t.href.replace(".vite/deps","open-im-sdk-wasm/lib"),e=s?new URL("/assets/worker-b58982d4.js",self.location):new URL("/assets/worker-legacy-5a2deb55.js",self.location);h=new Worker(n?d(e):e,{type:s?"module":"classic"}),ue(h),p=new R({event:new he({currentEndpoint:h,targetEndpoint:h})})}function Me(){p&&(p.destroy(),p=void 0),h&&(h.terminate(),h=void 0)}X();function se(n){if(n.code===-32300)return Me(),JSON.stringify({data:"",errCode:me.ErrorDBTimeout,errMsg:"database maybe damaged"});throw n}function y(...n){ie&&console.info(...n)}function i(n,s,d=!0){return y(`=> (database api) registe ${s??n}`),async(...e)=>{if((!p||!h)&&X(),!!p)try{y(`=> (invoked by go wasm) run ${s??n} method with args ${JSON.stringify(e)}`);const t=await p.invoke(n,...e,{timeout:5e6});return y(`=> (invoked by go wasm) run ${s??n} method with response `,JSON.stringify(t)),d?JSON.stringify(t):t}catch(t){se(t)}}}function ve(n=!0){p&&(ie=n,window.wasmOpen=i("wasmOpen"),window.wasmClose=i("wasmClose"),window.wasmRead=i("wasmRead","wasmRead",!1),window.getUpload=i("getUpload"),window.insertUpload=i("insertUpload"),window.updateUpload=i("updateUpload"),window.deleteUpload=i("deleteUpload"),window.fileMapSet=i("fileMapSet"),window.fileMapClear=i("fileMapClear"),window.setSqlWasmPath=i("setSqlWasmPath"),window.initDB=i("initDB"),window.close=i("close"),window.getMessage=i("getMessage"),window.getMultipleMessage=i("getMultipleMessage"),window.getSendingMessageList=i("getSendingMessageList"),window.getNormalMsgSeq=i("getNormalMsgSeq"),window.updateMessageTimeAndStatus=i("updateMessageTimeAndStatus"),window.updateMessage=i("updateMessage"),window.updateMessageBySeq=i("updateMessageBySeq"),window.updateColumnsMessage=i("updateColumnsMessage"),window.insertMessage=i("insertMessage"),window.batchInsertMessageList=i("batchInsertMessageList"),window.getMessageList=i("getMessageList"),window.getMessageListNoTime=i("getMessageListNoTime"),window.messageIfExists=i("messageIfExists"),window.messageIfExistsBySeq=i("messageIfExistsBySeq"),window.getAbnormalMsgSeq=i("getAbnormalMsgSeq"),window.getAbnormalMsgSeqList=i("getAbnormalMsgSeqList"),window.batchInsertExceptionMsg=i("batchInsertExceptionMsg"),window.searchMessageByKeyword=i("searchMessageByKeyword"),window.searchMessageByContentType=i("searchMessageByContentType"),window.searchMessageByContentTypeAndKeyword=i("searchMessageByContentTypeAndKeyword"),window.updateMsgSenderNickname=i("updateMsgSenderNickname"),window.updateMsgSenderFaceURL=i("updateMsgSenderFaceURL"),window.updateMsgSenderFaceURLAndSenderNickname=i("updateMsgSenderFaceURLAndSenderNickname"),window.getMsgSeqByClientMsgID=i("getMsgSeqByClientMsgID"),window.getMsgSeqListByGroupID=i("getMsgSeqListByGroupID"),window.getMsgSeqListByPeerUserID=i("getMsgSeqListByPeerUserID"),window.getMsgSeqListBySelfUserID=i("getMsgSeqListBySelfUserID"),window.deleteAllMessage=i("deleteAllMessage"),window.getAllUnDeleteMessageSeqList=i("getAllUnDeleteMessageSeqList"),window.updateSingleMessageHasRead=i("updateSingleMessageHasRead"),window.updateGroupMessageHasRead=i("updateGroupMessageHasRead"),window.updateMessageStatusBySourceID=i("updateMessageStatusBySourceID"),window.getAlreadyExistSeqList=i("getAlreadyExistSeqList"),window.getMessageBySeq=i("getMessageBySeq"),window.getMessagesByClientMsgIDs=i("getMessagesByClientMsgIDs"),window.getMessagesBySeqs=i("getMessagesBySeqs"),window.getConversationNormalMsgSeq=i("getConversationNormalMsgSeq"),window.getConversationPeerNormalMsgSeq=i("getConversationPeerNormalMsgSeq"),window.deleteConversationAllMessages=i("deleteConversationAllMessages"),window.markDeleteConversationAllMessages=i("markDeleteConversationAllMessages"),window.getUnreadMessage=i("getUnreadMessage"),window.markConversationMessageAsReadBySeqs=i("markConversationMessageAsReadBySeqs"),window.markConversationMessageAsReadDB=i("markConversationMessageAsRead"),window.deleteConversationMsgs=i("deleteConversationMsgs"),window.markConversationAllMessageAsRead=i("markConversationAllMessageAsRead"),window.searchAllMessageByContentType=i("searchAllMessageByContentType"),window.insertSendingMessage=i("insertSendingMessage"),window.deleteSendingMessage=i("deleteSendingMessage"),window.getAllSendingMessages=i("getAllSendingMessages"),window.getAllConversationListDB=i("getAllConversationList"),window.getAllConversationListToSync=i("getAllConversationListToSync"),window.getHiddenConversationList=i("getHiddenConversationList"),window.getConversation=i("getConversation"),window.getMultipleConversationDB=i("getMultipleConversation"),window.updateColumnsConversation=i("updateColumnsConversation"),window.updateConversation=i("updateColumnsConversation","updateConversation"),window.updateConversationForSync=i("updateColumnsConversation","updateConversationForSync"),window.decrConversationUnreadCount=i("decrConversationUnreadCount"),window.batchInsertConversationList=i("batchInsertConversationList"),window.insertConversation=i("insertConversation"),window.getTotalUnreadMsgCountDB=i("getTotalUnreadMsgCount"),window.getConversationByUserID=i("getConversationByUserID"),window.getConversationListSplitDB=i("getConversationListSplit"),window.deleteConversation=i("deleteConversation"),window.batchUpdateConversationList=i("batchUpdateConversationList"),window.conversationIfExists=i("conversationIfExists"),window.resetConversation=i("resetConversation"),window.resetAllConversation=i("resetAllConversation"),window.clearConversation=i("clearConversation"),window.clearAllConversation=i("clearAllConversation"),window.setConversationDraftDB=i("setConversationDraft"),window.removeConversationDraft=i("removeConversationDraft"),window.unPinConversation=i("unPinConversation"),window.incrConversationUnreadCount=i("incrConversationUnreadCount"),window.setMultipleConversationRecvMsgOpt=i("setMultipleConversationRecvMsgOpt"),window.getAllSingleConversationIDList=i("getAllSingleConversationIDList"),window.getAllConversationIDList=i("getAllConversationIDList"),window.getAllConversations=i("getAllConversations"),window.searchConversations=i("searchConversations"),window.getLoginUser=i("getLoginUser"),window.insertLoginUser=i("insertLoginUser"),window.updateLoginUser=i("updateLoginUser"),window.getStrangerInfo=i("getStrangerInfo"),window.setStrangerInfo=i("setStrangerInfo"),window.getJoinedSuperGroupList=i("getJoinedSuperGroupList"),window.getJoinedSuperGroupIDList=i("getJoinedSuperGroupIDList"),window.getSuperGroupInfoByGroupID=i("getSuperGroupInfoByGroupID"),window.deleteSuperGroup=i("deleteSuperGroup"),window.insertSuperGroup=i("insertSuperGroup"),window.updateSuperGroup=i("updateSuperGroup"),window.deleteConversationUnreadMessageList=i("deleteConversationUnreadMessageList"),window.batchInsertConversationUnreadMessageList=i("batchInsertConversationUnreadMessageList"),window.superGroupGetMessage=i("superGroupGetMessage"),window.superGroupGetMultipleMessage=i("superGroupGetMultipleMessage"),window.superGroupGetNormalMinSeq=i("superGroupGetNormalMinSeq"),window.getSuperGroupNormalMsgSeq=i("getSuperGroupNormalMsgSeq"),window.superGroupUpdateMessageTimeAndStatus=i("superGroupUpdateMessageTimeAndStatus"),window.superGroupUpdateMessage=i("superGroupUpdateMessage"),window.superGroupInsertMessage=i("superGroupInsertMessage"),window.superGroupBatchInsertMessageList=i("superGroupBatchInsertMessageList"),window.superGroupGetMessageListNoTime=i("superGroupGetMessageListNoTime"),window.superGroupGetMessageList=i("superGroupGetMessageList"),window.superGroupUpdateColumnsMessage=i("superGroupUpdateColumnsMessage"),window.superGroupDeleteAllMessage=i("superGroupDeleteAllMessage"),window.superGroupSearchMessageByKeyword=i("superGroupSearchMessageByKeyword"),window.superGroupSearchMessageByContentType=i("superGroupSearchMessageByContentType"),window.superGroupSearchMessageByContentTypeAndKeyword=i("superGroupSearchMessageByContentTypeAndKeyword"),window.superGroupUpdateMessageStatusBySourceID=i("superGroupUpdateMessageStatusBySourceID"),window.superGroupGetSendingMessageList=i("superGroupGetSendingMessageList"),window.superGroupUpdateGroupMessageHasRead=i("superGroupUpdateGroupMessageHasRead"),window.superGroupGetMsgSeqByClientMsgID=i("superGroupGetMsgSeqByClientMsgID"),window.superGroupUpdateMsgSenderFaceURLAndSenderNickname=i("superGroupUpdateMsgSenderFaceURLAndSenderNickname"),window.superGroupSearchAllMessageByContentType=i("superGroupSearchAllMessageByContentType"),window.exec=i("exec"),window.getRowsModified=i("getRowsModified"),window.exportDB=async()=>{if((!p||!h)&&X(),!!p)try{y("=> (invoked by go wasm) run exportDB method ");const s=await p.invoke("exportDB",void 0,{timeout:5e3});return y("=> (invoked by go wasm) run exportDB method with response ",JSON.stringify(s)),s}catch(s){se(s)}},window.getBlackListDB=i("getBlackList"),window.getBlackListUserID=i("getBlackListUserID"),window.getBlackInfoByBlockUserID=i("getBlackInfoByBlockUserID"),window.getBlackInfoList=i("getBlackInfoList"),window.insertBlack=i("insertBlack"),window.deleteBlack=i("deleteBlack"),window.updateBlack=i("updateBlack"),window.insertFriendRequest=i("insertFriendRequest"),window.deleteFriendRequestBothUserID=i("deleteFriendRequestBothUserID"),window.updateFriendRequest=i("updateFriendRequest"),window.getRecvFriendApplication=i("getRecvFriendApplication"),window.getSendFriendApplication=i("getSendFriendApplication"),window.getFriendApplicationByBothID=i("getFriendApplicationByBothID"),window.getBothFriendReq=i("getBothFriendReq"),window.insertFriend=i("insertFriend"),window.deleteFriendDB=i("deleteFriend"),window.updateFriend=i("updateFriend"),window.getAllFriendList=i("getAllFriendList"),window.searchFriendList=i("searchFriendList"),window.getFriendInfoByFriendUserID=i("getFriendInfoByFriendUserID"),window.getFriendInfoList=i("getFriendInfoList"),window.getPageFriendList=i("getPageFriendList"),window.updateColumnsFriend=i("updateColumnsFriend"),window.insertGroup=i("insertGroup"),window.deleteGroup=i("deleteGroup"),window.updateGroup=i("updateGroup"),window.getJoinedGroupListDB=i("getJoinedGroupList"),window.getGroupInfoByGroupID=i("getGroupInfoByGroupID"),window.getAllGroupInfoByGroupIDOrGroupName=i("getAllGroupInfoByGroupIDOrGroupName"),window.subtractMemberCount=i("subtractMemberCount"),window.addMemberCount=i("addMemberCount"),window.getJoinedWorkingGroupIDList=i("getJoinedWorkingGroupIDList"),window.getJoinedWorkingGroupList=i("getJoinedWorkingGroupList"),window.getGroupMemberAllGroupIDs=i("getGroupMemberAllGroupIDs"),window.getUserJoinedGroupIDs=i("getUserJoinedGroupIDs"),window.getGroups=i("getGroups"),window.insertGroupRequest=i("insertGroupRequest"),window.deleteGroupRequest=i("deleteGroupRequest"),window.updateGroupRequest=i("updateGroupRequest"),window.getSendGroupApplication=i("getSendGroupApplication"),window.insertAdminGroupRequest=i("insertAdminGroupRequest"),window.deleteAdminGroupRequest=i("deleteAdminGroupRequest"),window.updateAdminGroupRequest=i("updateAdminGroupRequest"),window.getAdminGroupApplication=i("getAdminGroupApplication"),window.getGroupMemberInfoByGroupIDUserID=i("getGroupMemberInfoByGroupIDUserID"),window.getAllGroupMemberList=i("getAllGroupMemberList"),window.getAllGroupMemberUserIDList=i("getAllGroupMemberUserIDList"),window.getGroupMemberCount=i("getGroupMemberCount"),window.getGroupSomeMemberInfo=i("getGroupSomeMemberInfo"),window.getGroupAdminID=i("getGroupAdminID"),window.getGroupMemberListByGroupID=i("getGroupMemberListByGroupID"),window.getGroupMemberListSplit=i("getGroupMemberListSplit"),window.getGroupMemberOwnerAndAdminDB=i("getGroupMemberOwnerAndAdmin"),window.getGroupMemberOwner=i("getGroupMemberOwner"),window.getGroupMemberListSplitByJoinTimeFilter=i("getGroupMemberListSplitByJoinTimeFilter"),window.getGroupOwnerAndAdminByGroupID=i("getGroupOwnerAndAdminByGroupID"),window.getGroupMemberUIDListByGroupID=i("getGroupMemberUIDListByGroupID"),window.insertGroupMember=i("insertGroupMember"),window.batchInsertGroupMember=i("batchInsertGroupMember"),window.deleteGroupMember=i("deleteGroupMember"),window.deleteGroupAllMembers=i("deleteGroupAllMembers"),window.updateGroupMember=i("updateGroupMember"),window.updateGroupMemberField=i("updateGroupMemberField"),window.searchGroupMembersDB=i("searchGroupMembers","searchGroupMembersDB"),window.batchInsertTempCacheMessageList=i("batchInsertTempCacheMessageList"),window.InsertTempCacheMessage=i("InsertTempCacheMessage"),window.getNotificationAllSeqs=i("getNotificationAllSeqs"),window.setNotificationSeq=i("setNotificationSeq"))}const ye=p==null?void 0:p.connect(5e3);class Se{constructor(){this.events={}}emit(s,d){return this.events[s]&&this.events[s].forEach(e=>e(d)),this}on(s,d){return this.events[s]?this.events[s].push(d):this.events[s]=[d],this}off(s,d){if(s&&typeof d=="function"&&this.events[s]){const e=this.events[s];if(!e||e.length===0)return;const t=e.findIndex(o=>o===d);t!==-1&&e.splice(t,1)}return this}}let b;const be=new Uint8Array(16);function Ie(){if(!b&&(b=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!b))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return b(be)}const c=[];for(let n=0;n<256;++n)c.push((n+256).toString(16).slice(1));function fe(n,s=0){return(c[n[s+0]]+c[n[s+1]]+c[n[s+2]]+c[n[s+3]]+"-"+c[n[s+4]]+c[n[s+5]]+"-"+c[n[s+6]]+c[n[s+7]]+"-"+c[n[s+8]]+c[n[s+9]]+"-"+c[n[s+10]]+c[n[s+11]]+c[n[s+12]]+c[n[s+13]]+c[n[s+14]]+c[n[s+15]]).toLowerCase()}const ke=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var U={randomUUID:ke};function r(n,s,d){if(U.randomUUID&&!s&&!n)return U.randomUUID();n=n||{};const e=n.random||(n.rng||Ie)();if(e[6]=e[6]&15|64,e[8]=e[8]&63|128,s){d=d||0;for(let t=0;t<16;++t)s[d+t]=e[t];return s}return fe(e)}async function Ce(n){return new Promise(s=>{const d=setTimeout(()=>{clearTimeout(d),s(null)},n)})}function k(n,s){return`font-size:14px; background:${n??"#ffffff"}; color:${s??"#000000"}; border-radius:4px; padding-inline:4px;`}let G,re;async function Ze(n){if(typeof window>"u")return Promise.resolve(null);if(G=new Go,"instantiateStreaming"in WebAssembly){const s=await WebAssembly.instantiateStreaming(fetch(n),G.importObject);G.run(s.instance)}else{const s=await fetch(n).then(e=>e.arrayBuffer()),d=await WebAssembly.instantiate(s,G.importObject);re=G.run(d.instance)}return await Ce(100),G}function D(){return G}function Le(){return re}class Re extends Se{constructor(s="/openIM.wasm",d=!0){super(),this.goExisted=!1,this.tryParse=!0,this.isLogStandardOutput=!0,this.login=async(e,t=r())=>{var o,a;this._logWrap(`SDK => (invoked by js) run login with args ${JSON.stringify({params:e,operationID:t})}`),await ye,await this.wasmInitializedPromise,window.commonEventFunc(l=>{try{this._logWrap(`%cSDK =>%c received event %c${l}%c `,k("#282828","#ffffff"),"","color: #4f2398;","");const w=JSON.parse(l);if(this.tryParse)try{w.data=JSON.parse(w.data)}catch{}this.emit(w.event,w)}catch(w){console.error(w)}});const u={platformID:e.platformID,apiAddr:e.apiAddr,wsAddr:e.wsAddr,dataDir:"./",logLevel:e.logLevel||5,isLogStandardOutput:(o=e.isLogStandardOutput)!==null&&o!==void 0?o:this.isLogStandardOutput,logFilePath:"./",isExternalExtensions:e.isExternalExtensions||!1};return this.tryParse=(a=e.tryParse)!==null&&a!==void 0?a:!0,window.initSDK(t,JSON.stringify(u)),await window.login(t,e.userID,e.token)},this.logout=(e=r())=>(window.fileMapClear(),this._invoker("logout",window.logout,[e])),this.getAllConversationList=(e=r())=>this._invoker("getAllConversationList",window.getAllConversationList,[e]),this.getOneConversation=(e,t=r())=>this._invoker("getOneConversation",window.getOneConversation,[t,e.sessionType,e.sourceID]),this.getAdvancedHistoryMessageList=(e,t=r())=>this._invoker("getAdvancedHistoryMessageList",window.getAdvancedHistoryMessageList,[t,JSON.stringify(e)]),this.getAdvancedHistoryMessageListReverse=(e,t=r())=>this._invoker("getAdvancedHistoryMessageListReverse",window.getAdvancedHistoryMessageListReverse,[t,JSON.stringify(e)]),this.getSpecifiedGroupsInfo=(e,t=r())=>this._invoker("getSpecifiedGroupsInfo",window.getSpecifiedGroupsInfo,[t,JSON.stringify(e)]),this.deleteConversationAndDeleteAllMsg=(e,t=r())=>this._invoker("deleteConversationAndDeleteAllMsg",window.deleteConversationAndDeleteAllMsg,[t,e]),this.markConversationMessageAsRead=(e,t=r())=>this._invoker("markConversationMessageAsRead",window.markConversationMessageAsRead,[t,e]),this.sendGroupMessageReadReceipt=(e,t=r())=>this._invoker("sendGroupMessageReadReceipt",window.sendGroupMessageReadReceipt,[t,e.conversationID,JSON.stringify(e.clientMsgIDList)]),this.getGroupMessageReaderList=(e,t=r())=>this._invoker("getGroupMessageReaderList",window.getGroupMessageReaderList,[t,e.conversationID,e.clientMsgID,e.filter,e.offset,e.count]),this.getGroupMemberList=(e,t=r())=>this._invoker("getGroupMemberList",window.getGroupMemberList,[t,e.groupID,e.filter,e.offset,e.count]),this.createTextMessage=(e,t=r())=>this._invoker("createTextMessage",window.createTextMessage,[t,e],o=>o[0]),this.createImageMessage=(e,t=r())=>this._invoker("createImageMessage",window.createImageMessageByURL,[t,e.sourcePath,JSON.stringify(e.sourcePicture),JSON.stringify(e.bigPicture),JSON.stringify(e.snapshotPicture)],o=>o[0]),this.createImageMessageByFile=(e,t=r())=>(e.sourcePicture.uuid=`${e.sourcePicture.uuid}/${e.file.name}`,window.fileMapSet(e.sourcePicture.uuid,e.file),this._invoker("createImageMessageByFile",window.createImageMessageByURL,[t,e.sourcePath,JSON.stringify(e.sourcePicture),JSON.stringify(e.bigPicture),JSON.stringify(e.snapshotPicture)],o=>o[0])),this.createCustomMessage=(e,t=r())=>this._invoker("createCustomMessage",window.createCustomMessage,[t,e.data,e.extension,e.description],o=>o[0]),this.createQuoteMessage=(e,t=r())=>this._invoker("createQuoteMessage",window.createQuoteMessage,[t,e.text,e.message],o=>o[0]),this.createAdvancedQuoteMessage=(e,t=r())=>this._invoker("createAdvancedQuoteMessage",window.createAdvancedQuoteMessage,[t,e.text,JSON.stringify(e.message),JSON.stringify(e.messageEntityList)],o=>o[0]),this.createAdvancedTextMessage=(e,t=r())=>this._invoker("createAdvancedTextMessage",window.createAdvancedTextMessage,[t,e.text,JSON.stringify(e.messageEntityList)],o=>o[0]),this.sendMessage=(e,t=r())=>{var o,a;const u=(o=e.offlinePushInfo)!==null&&o!==void 0?o:{title:"你有一条新消息",desc:"",ex:"",iOSPushSound:"+1",iOSBadgeCount:!0};return this._invoker("sendMessage",window.sendMessage,[t,JSON.stringify(e.message),e.recvID,e.groupID,JSON.stringify(u),(a=e.isOnlineOnly)!==null&&a!==void 0?a:!1])},this.sendMessageNotOss=(e,t=r())=>{var o,a;const u=(o=e.offlinePushInfo)!==null&&o!==void 0?o:{title:"你有一条新消息",desc:"",ex:"",iOSPushSound:"+1",iOSBadgeCount:!0};return this._invoker("sendMessageNotOss",window.sendMessageNotOss,[t,JSON.stringify(e.message),e.recvID,e.groupID,JSON.stringify(u),(a=e.isOnlineOnly)!==null&&a!==void 0?a:!1])},this.setMessageLocalEx=(e,t=r())=>this._invoker("setMessageLocalEx",window.setMessageLocalEx,[t,e.conversationID,e.clientMsgID,e.localEx]),this.getHistoryMessageListReverse=(e,t=r())=>this._invoker("getHistoryMessageListReverse",window.getHistoryMessageListReverse,[t,JSON.stringify(e)]),this.revokeMessage=(e,t=r())=>this._invoker("revokeMessage",window.revokeMessage,[t,e.conversationID,e.clientMsgID]),this.setConversationPrivateChat=(e,t=r())=>this._invoker("setConversationPrivateChat",window.setConversationPrivateChat,[t,e.conversationID,e.isPrivate]),this.setConversationBurnDuration=(e,t=r())=>this._invoker("setConversationBurnDuration",window.setConversationBurnDuration,[t,e.conversationID,e.burnDuration]),this.getLoginStatus=(e=r())=>this._invoker("getLoginStatus",window.getLoginStatus,[e],t=>t[0]),this.setAppBackgroundStatus=(e,t=r())=>this._invoker("setAppBackgroundStatus",window.setAppBackgroundStatus,[t,e]),this.networkStatusChanged=(e=r())=>this._invoker("networkStatusChanged ",window.networkStatusChanged,[e]),this.getLoginUserID=(e=r())=>this._invoker("getLoginUserID",window.getLoginUserID,[e]),this.getSelfUserInfo=(e=r())=>this._invoker("getSelfUserInfo",window.getSelfUserInfo,[e]),this.getUsersInfo=(e,t=r())=>this._invoker("getUsersInfo",window.getUsersInfo,[t,JSON.stringify(e)]),this.getUsersInfoWithCache=(e,t=r())=>this._invoker("getUsersInfoWithCache",window.getUsersInfoWithCache,[t,JSON.stringify(e.userIDList),e.groupID]),this.setSelfInfo=(e,t=r())=>this._invoker("setSelfInfo",window.setSelfInfo,[t,JSON.stringify(e)]),this.createTextAtMessage=(e,t=r())=>{var o;return this._invoker("createTextAtMessage",window.createTextAtMessage,[t,e.text,JSON.stringify(e.atUserIDList),JSON.stringify(e.atUsersInfo),(o=JSON.stringify(e.message))!==null&&o!==void 0?o:""],a=>a[0])},this.createSoundMessage=(e,t=r())=>this._invoker("createSoundMessage",window.createSoundMessageByURL,[t,JSON.stringify(e)],o=>o[0]),this.createSoundMessageByFile=(e,t=r())=>(e.uuid=`${e.uuid}/${e.file.name}`,window.fileMapSet(e.uuid,e.file),this._invoker("createSoundMessageByFile",window.createSoundMessageByURL,[t,JSON.stringify(e)],o=>o[0])),this.createVideoMessage=(e,t=r())=>this._invoker("createVideoMessage",window.createVideoMessageByURL,[t,JSON.stringify(e)],o=>o[0]),this.createVideoMessageByFile=(e,t=r())=>(e.videoUUID=`${e.videoUUID}/${e.videoFile.name}`,e.snapshotUUID=`${e.snapshotUUID}/${e.snapshotFile.name}`,window.fileMapSet(e.videoUUID,e.videoFile),window.fileMapSet(e.snapshotUUID,e.snapshotFile),this._invoker("createVideoMessageByFile",window.createVideoMessageByURL,[t,JSON.stringify(e)],o=>o[0])),this.createFileMessage=(e,t=r())=>this._invoker("createFileMessage",window.createFileMessageByURL,[t,JSON.stringify(e)],o=>o[0]),this.createFileMessageByFile=(e,t=r())=>(e.uuid=`${e.uuid}/${e.file.name}`,window.fileMapSet(e.uuid,e.file),this._invoker("createFileMessageByFile",window.createFileMessageByURL,[t,JSON.stringify(e)],o=>o[0])),this.createFileMessageFromFullPath=(e,t=r())=>this._invoker("createFileMessageFromFullPath",window.createFileMessageFromFullPath,[t,e.fileFullPath,e.fileName],o=>o[0]),this.createImageMessageFromFullPath=(e,t=r())=>this._invoker("createImageMessageFromFullPath ",window.createImageMessageFromFullPath,[t,e],o=>o[0]),this.createSoundMessageFromFullPath=(e,t=r())=>this._invoker("createSoundMessageFromFullPath ",window.createSoundMessageFromFullPath,[t,e.soundPath,e.duration],o=>o[0]),this.createVideoMessageFromFullPath=(e,t=r())=>this._invoker("createVideoMessageFromFullPath ",window.createVideoMessageFromFullPath,[t,e.videoFullPath,e.videoType,e.duration,e.snapshotFullPath],o=>o[0]),this.createMergerMessage=(e,t=r())=>this._invoker("createMergerMessage ",window.createMergerMessage,[t,JSON.stringify(e.messageList),e.title,JSON.stringify(e.summaryList)],o=>o[0]),this.createForwardMessage=(e,t=r())=>this._invoker("createForwardMessage ",window.createForwardMessage,[t,JSON.stringify(e)],o=>o[0]),this.createFaceMessage=(e,t=r())=>this._invoker("createFaceMessage ",window.createFaceMessage,[t,e.index,e.data],o=>o[0]),this.createLocationMessage=(e,t=r())=>this._invoker("createLocationMessage ",window.createLocationMessage,[t,e.description,e.longitude,e.latitude],o=>o[0]),this.createCardMessage=(e,t=r())=>this._invoker("createCardMessage ",window.createCardMessage,[t,JSON.stringify(e)],o=>o[0]),this.deleteMessageFromLocalStorage=(e,t=r())=>this._invoker("deleteMessageFromLocalStorage ",window.deleteMessageFromLocalStorage,[t,e.conversationID,e.clientMsgID]),this.deleteMessage=(e,t=r())=>this._invoker("deleteMessage ",window.deleteMessage,[t,e.conversationID,e.clientMsgID]),this.deleteAllConversationFromLocal=(e=r())=>this._invoker("deleteAllConversationFromLocal ",window.deleteAllConversationFromLocal,[e]),this.deleteAllMsgFromLocal=(e=r())=>this._invoker("deleteAllMsgFromLocal ",window.deleteAllMsgFromLocal,[e]),this.deleteAllMsgFromLocalAndSvr=(e=r())=>this._invoker("deleteAllMsgFromLocalAndSvr ",window.deleteAllMsgFromLocalAndSvr,[e]),this.insertSingleMessageToLocalStorage=(e,t=r())=>this._invoker("insertSingleMessageToLocalStorage ",window.insertSingleMessageToLocalStorage,[t,JSON.stringify(e.message),e.recvID,e.sendID]),this.insertGroupMessageToLocalStorage=(e,t=r())=>this._invoker("insertGroupMessageToLocalStorage ",window.insertGroupMessageToLocalStorage,[t,JSON.stringify(e.message),e.groupID,e.sendID]),this.typingStatusUpdate=(e,t=r())=>this._invoker("typingStatusUpdate ",window.typingStatusUpdate,[t,e.recvID,e.msgTip]),this.clearConversationAndDeleteAllMsg=(e,t=r())=>this._invoker("clearConversationAndDeleteAllMsg ",window.clearConversationAndDeleteAllMsg,[t,e]),this.hideConversation=(e,t=r())=>this._invoker("hideConversation ",window.hideConversation,[t,e]),this.getConversationListSplit=(e,t=r())=>this._invoker("getConversationListSplit ",window.getConversationListSplit,[t,e.offset,e.count]),this.setConversationEx=(e,t=r())=>this._invoker("setConversationEx ",window.setConversationEx,[t,e.conversationID,e.ex]),this.getConversationIDBySessionType=(e,t=r())=>this._invoker("getConversationIDBySessionType ",window.getConversationIDBySessionType,[t,e.sourceID,e.sessionType]),this.getMultipleConversation=(e,t=r())=>this._invoker("getMultipleConversation ",window.getMultipleConversation,[t,JSON.stringify(e)]),this.deleteConversation=(e,t=r())=>this._invoker("deleteConversation ",window.deleteConversation,[t,e]),this.setConversationDraft=(e,t=r())=>this._invoker("setConversationDraft ",window.setConversationDraft,[t,e.conversationID,e.draftText]),this.pinConversation=(e,t=r())=>this._invoker("pinConversation ",window.pinConversation,[t,e.conversationID,e.isPinned]),this.getTotalUnreadMsgCount=(e=r())=>this._invoker("getTotalUnreadMsgCount ",window.getTotalUnreadMsgCount,[e]),this.getConversationRecvMessageOpt=(e,t=r())=>this._invoker("getConversationRecvMessageOpt ",window.getConversationRecvMessageOpt,[t,JSON.stringify(e)]),this.setConversationRecvMessageOpt=(e,t=r())=>this._invoker("setConversationRecvMessageOpt ",window.setConversationRecvMessageOpt,[t,e.conversationID,e.opt]),this.searchLocalMessages=(e,t=r())=>this._invoker("searchLocalMessages ",window.searchLocalMessages,[t,JSON.stringify(e)]),this.addFriend=(e,t=r())=>this._invoker("addFriend ",window.addFriend,[t,JSON.stringify(e)]),this.searchFriends=(e,t=r())=>this._invoker("searchFriends ",window.searchFriends,[t,JSON.stringify(e)]),this.getSpecifiedFriendsInfo=(e,t=r())=>this._invoker("getSpecifiedFriendsInfo ",window.getSpecifiedFriendsInfo,[t,JSON.stringify(e)]),this.getFriendApplicationListAsRecipient=(e=r())=>this._invoker("getFriendApplicationListAsRecipient ",window.getFriendApplicationListAsRecipient,[e]),this.getFriendApplicationListAsApplicant=(e=r())=>this._invoker("getFriendApplicationListAsApplicant ",window.getFriendApplicationListAsApplicant,[e]),this.getFriendList=(e=r())=>this._invoker("getFriendList ",window.getFriendList,[e]),this.setFriendRemark=(e,t=r())=>this._invoker("setFriendRemark ",window.setFriendRemark,[t,JSON.stringify(e)]),this.pinFriends=(e,t=r())=>this._invoker("pinFriends ",window.pinFriends,[t,JSON.stringify(e)]),this.setFriendsEx=(e,t=r())=>this._invoker("setFriendsEx ",window.setFriendsEx,[t,JSON.stringify(e.toUserIDs),e.ex]),this.checkFriend=(e,t=r())=>this._invoker("checkFriend",window.checkFriend,[t,JSON.stringify(e)]),this.acceptFriendApplication=(e,t=r())=>this._invoker("acceptFriendApplication",window.acceptFriendApplication,[t,JSON.stringify(e)]),this.refuseFriendApplication=(e,t=r())=>this._invoker("refuseFriendApplication ",window.refuseFriendApplication,[t,JSON.stringify(e)]),this.deleteFriend=(e,t=r())=>this._invoker("deleteFriend ",window.deleteFriend,[t,e]),this.addBlack=(e,t=r())=>{var o;return this._invoker("addBlack ",window.addBlack,[t,e.toUserID,(o=e.ex)!==null&&o!==void 0?o:""])},this.removeBlack=(e,t=r())=>this._invoker("removeBlack ",window.removeBlack,[t,e]),this.getBlackList=(e=r())=>this._invoker("getBlackList ",window.getBlackList,[e]),this.inviteUserToGroup=(e,t=r())=>this._invoker("inviteUserToGroup ",window.inviteUserToGroup,[t,e.groupID,e.reason,JSON.stringify(e.userIDList)]),this.kickGroupMember=(e,t=r())=>this._invoker("kickGroupMember ",window.kickGroupMember,[t,e.groupID,e.reason,JSON.stringify(e.userIDList)]),this.isJoinGroup=(e,t=r())=>this._invoker("isJoinGroup ",window.isJoinGroup,[t,e]),this.getSpecifiedGroupMembersInfo=(e,t=r())=>this._invoker("getSpecifiedGroupMembersInfo ",window.getSpecifiedGroupMembersInfo,[t,e.groupID,JSON.stringify(e.userIDList)]),this.getGroupMemberListByJoinTimeFilter=(e,t=r())=>this._invoker("getGroupMemberListByJoinTimeFilter ",window.getGroupMemberListByJoinTimeFilter,[t,e.groupID,e.offset,e.count,e.joinTimeBegin,e.joinTimeEnd,JSON.stringify(e.filterUserIDList)]),this.searchGroupMembers=(e,t=r())=>this._invoker("searchGroupMembers ",window.searchGroupMembers,[t,JSON.stringify(e)]),this.setGroupApplyMemberFriend=(e,t=r())=>this._invoker("setGroupApplyMemberFriend ",window.setGroupApplyMemberFriend,[t,e.groupID,e.rule]),this.setGroupLookMemberInfo=(e,t=r())=>this._invoker("setGroupLookMemberInfo ",window.setGroupLookMemberInfo,[t,e.groupID,e.rule]),this.getJoinedGroupList=(e=r())=>this._invoker("getJoinedGroupList ",window.getJoinedGroupList,[e]),this.createGroup=(e,t=r())=>this._invoker("createGroup ",window.createGroup,[t,JSON.stringify(e)]),this.setGroupInfo=(e,t=r())=>this._invoker("setGroupInfo ",window.setGroupInfo,[t,JSON.stringify(e)]),this.setGroupMemberNickname=(e,t=r())=>this._invoker("setGroupMemberNickname ",window.setGroupMemberNickname,[t,e.groupID,e.userID,e.groupMemberNickname]),this.setGroupMemberInfo=(e,t=r())=>this._invoker("setGroupMemberInfo ",window.setGroupMemberInfo,[t,JSON.stringify(e)]),this.joinGroup=(e,t=r())=>{var o;return this._invoker("joinGroup ",window.joinGroup,[t,e.groupID,e.reqMsg,e.joinSource,(o=e.ex)!==null&&o!==void 0?o:""])},this.searchGroups=(e,t=r())=>this._invoker("searchGroups ",window.searchGroups,[t,JSON.stringify(e)]),this.quitGroup=(e,t=r())=>this._invoker("quitGroup ",window.quitGroup,[t,e]),this.dismissGroup=(e,t=r())=>this._invoker("dismissGroup ",window.dismissGroup,[t,e]),this.changeGroupMute=(e,t=r())=>this._invoker("changeGroupMute ",window.changeGroupMute,[t,e.groupID,e.isMute]),this.changeGroupMemberMute=(e,t=r())=>this._invoker("changeGroupMemberMute ",window.changeGroupMemberMute,[t,e.groupID,e.userID,e.mutedSeconds]),this.transferGroupOwner=(e,t=r())=>this._invoker("transferGroupOwner ",window.transferGroupOwner,[t,e.groupID,e.newOwnerUserID]),this.getGroupApplicationListAsApplicant=(e=r())=>this._invoker("getGroupApplicationListAsApplicant ",window.getGroupApplicationListAsApplicant,[e]),this.getGroupApplicationListAsRecipient=(e=r())=>this._invoker("getGroupApplicationListAsRecipient ",window.getGroupApplicationListAsRecipient,[e]),this.acceptGroupApplication=(e,t=r())=>this._invoker("acceptGroupApplication ",window.acceptGroupApplication,[t,e.groupID,e.fromUserID,e.handleMsg]),this.refuseGroupApplication=(e,t=r())=>this._invoker("refuseGroupApplication ",window.refuseGroupApplication,[t,e.groupID,e.fromUserID,e.handleMsg]),this.resetConversationGroupAtType=(e,t=r())=>this._invoker("resetConversationGroupAtType ",window.resetConversationGroupAtType,[t,e]),this.setGroupMemberRoleLevel=(e,t=r())=>this._invoker("setGroupMemberRoleLevel ",window.setGroupMemberRoleLevel,[t,e.groupID,e.userID,e.roleLevel]),this.setGroupVerification=(e,t=r())=>this._invoker("setGroupVerification ",window.setGroupVerification,[t,e.groupID,e.verification]),this.getGroupMemberOwnerAndAdmin=(e,t=r())=>this._invoker("getGroupMemberOwnerAndAdmin ",window.getGroupMemberOwnerAndAdmin,[t,e]),this.setGlobalRecvMessageOpt=(e,t=r())=>this._invoker("setGlobalRecvMessageOpt ",window.setGlobalRecvMessageOpt,[t,e]),this.findMessageList=(e,t=r())=>this._invoker("findMessageList ",window.findMessageList,[t,JSON.stringify(e)]),this.uploadFile=(e,t=r())=>(e.uuid=`${e.uuid}/${e.file.name}`,window.fileMapSet(e.uuid,e.file),this._invoker("uploadFile ",window.uploadFile,[t,JSON.stringify({...e,filepath:"",cause:""})])),this.subscribeUsersStatus=(e,t=r())=>this._invoker("subscribeUsersStatus ",window.subscribeUsersStatus,[t,JSON.stringify(e)]),this.unsubscribeUsersStatus=(e,t=r())=>this._invoker("unsubscribeUsersStatus ",window.unsubscribeUsersStatus,[t,JSON.stringify(e)]),this.getUserStatus=(e=r())=>this._invoker("getUserStatus ",window.getUserStatus,[e]),this.getSubscribeUsersStatus=(e=r())=>this._invoker("getSubscribeUsersStatus ",window.getSubscribeUsersStatus,[e]),this.signalingInvite=(e,t=r())=>this._invoker("signalingInvite ",window.signalingInvite,[t,JSON.stringify(e)]),this.signalingInviteInGroup=(e,t=r())=>this._invoker("signalingInviteInGroup ",window.signalingInviteInGroup,[t,JSON.stringify(e)]),this.signalingAccept=(e,t=r())=>this._invoker("signalingAccept ",window.signalingAccept,[t,JSON.stringify(e)]),this.signalingReject=(e,t=r())=>this._invoker("signalingReject ",window.signalingReject,[t,JSON.stringify(e)]),this.signalingCancel=(e,t=r())=>this._invoker("signalingCancel ",window.signalingCancel,[t,JSON.stringify(e)]),this.signalingHungUp=(e,t=r())=>this._invoker("signalingHungUp ",window.signalingHungUp,[t,JSON.stringify(e)]),this.signalingGetRoomByGroupID=(e,t=r())=>this._invoker("signalingGetRoomByGroupID ",window.signalingGetRoomByGroupID,[t,e]),this.signalingGetTokenByRoomID=(e,t=r())=>this._invoker("signalingGetTokenByRoomID ",window.signalingGetTokenByRoomID,[t,e]),this.signalingSendCustomSignal=(e,t=r())=>this._invoker("signalingSendCustomSignal ",window.signalingSendCustomSignal,[t,e.customInfo,e.roomID]),this.signalingCreateMeeting=(e,t=r())=>this._invoker("signalingCreateMeeting ",window.signalingCreateMeeting,[t,JSON.stringify(e)]),this.signalingJoinMeeting=(e,t=r())=>this._invoker("signalingJoinMeeting ",window.signalingJoinMeeting,[t,JSON.stringify({roomID:e})]),this.signalingUpdateMeetingInfo=(e,t=r())=>this._invoker("signalingUpdateMeetingInfo ",window.signalingUpdateMeetingInfo,[t,JSON.stringify(e)]),this.signalingCloseRoom=(e,t=r())=>this._invoker("signalingCloseRoom ",window.signalingCloseRoom,[t,e]),this.signalingGetMeetings=(e=r())=>this._invoker("signalingGetMeetings ",window.signalingGetMeetings,[e]),this.signalingOperateStream=(e,t=r())=>this._invoker("signalingOperateStream ",window.signalingOperateStream,[t,e.streamType,e.roomID,e.userID,e.mute,e.muteAll]),this.setConversationIsMsgDestruct=(e,t=r())=>this._invoker("setConversationIsMsgDestruct ",window.setConversationIsMsgDestruct,[t,e.conversationID,e.isMsgDestruct]),this.setConversationMsgDestructTime=(e,t=r())=>this._invoker("setConversationMsgDestructTime ",window.setConversationMsgDestructTime,[t,e.conversationID,e.msgDestructTime]),this.fileMapSet=(e,t)=>window.fileMapSet(e,t),ve(d),this.isLogStandardOutput=d,this.wasmInitializedPromise=Ze(s),this.goExitPromise=Le(),this.goExitPromise&&this.goExitPromise.then(()=>{this._logWrap("SDK => wasm exist")}).catch(e=>{this._logWrap("SDK => wasm with error ",e)}).finally(()=>{this.goExisted=!0})}_logWrap(...s){this.isLogStandardOutput&&console.info(...s)}_invoker(s,d,e,t){return new Promise(async(o,a)=>{this._logWrap(`%cSDK =>%c [OperationID:${e[0]}] (invoked by js) run ${s} with args ${JSON.stringify(e)}`,"font-size:14px; background:#7CAEFF; border-radius:4px; padding-inline:4px;","");let u={operationID:e[0],event:s.slice(0,1).toUpperCase()+s.slice(1).toLowerCase()};try{if(!D()||D().exited||this.goExisted)throw"wasm exist already, fail to run";let l=await d(...e);if(t&&(this._logWrap(`%cSDK =>%c [OperationID:${e[0]}] (invoked by js) run ${s} with response before processor ${JSON.stringify(l)}`,k("#FFDC19"),""),l=t(l)),this.tryParse)try{l=JSON.parse(l)}catch{}u.data=l,o(u)}catch(l){this._logWrap(`%cSDK =>%c [OperationID:${e[0]}] (invoked by js) run ${s} with error ${JSON.stringify(l)}`,k("#EE4245"),""),u={...u,...l},a(u)}})}exportDB(s=r()){return this._invoker("exportDB",window.exportDB,[s])}}let I;function Fe(n){const{sqlWasmPath:s,coreWasmPath:d="/openIM.wasm",debug:e=!0}=n||{};return typeof window>"u"?{}:I||(I=new Re(d,e),s&&window.setSqlWasmPath(s),I)}var V;(function(n){n[n.Nomal=0]="Nomal",n[n.NotReceive=1]="NotReceive",n[n.NotNotify=2]="NotNotify"})(V||(V={}));var B;(function(n){n[n.Allowed=0]="Allowed",n[n.NotAllowed=1]="NotAllowed"})(B||(B={}));var x;(function(n){n[n.Group=2]="Group",n[n.WorkingGroup=2]="WorkingGroup"})(x||(x={}));var K;(function(n){n[n.Invitation=2]="Invitation",n[n.Search=3]="Search",n[n.QrCode=4]="QrCode"})(K||(K={}));var _;(function(n){n[n.Nomal=20]="Nomal",n[n.Admin=60]="Admin",n[n.Owner=100]="Owner"})(_||(_={}));var J;(function(n){n[n.ApplyNeedInviteNot=0]="ApplyNeedInviteNot",n[n.AllNeed=1]="AllNeed",n[n.AllNot=2]="AllNot"})(J||(J={}));var Y;(function(n){n[n.Sending=1]="Sending",n[n.Succeed=2]="Succeed",n[n.Failed=3]="Failed"})(Y||(Y={}));var z;(function(n){n[n.iOS=1]="iOS",n[n.Android=2]="Android",n[n.Windows=3]="Windows",n[n.MacOSX=4]="MacOSX",n[n.Web=5]="Web",n[n.Linux=7]="Linux",n[n.AndroidPad=8]="AndroidPad",n[n.iPad=9]="iPad"})(z||(z={}));var H;(function(n){n[n.Debug=5]="Debug",n[n.Info=4]="Info",n[n.Warn=3]="Warn",n[n.Error=2]="Error",n[n.Fatal=1]="Fatal",n[n.Panic=0]="Panic"})(H||(H={}));var P;(function(n){n[n.Unprocessed=0]="Unprocessed",n[n.Agree=1]="Agree",n[n.Reject=-1]="Reject"})(P||(P={}));var Q;(function(n){n[n.TextMessage=101]="TextMessage",n[n.PictureMessage=102]="PictureMessage",n[n.VoiceMessage=103]="VoiceMessage",n[n.VideoMessage=104]="VideoMessage",n[n.FileMessage=105]="FileMessage",n[n.AtTextMessage=106]="AtTextMessage",n[n.MergeMessage=107]="MergeMessage",n[n.CardMessage=108]="CardMessage",n[n.LocationMessage=109]="LocationMessage",n[n.CustomMessage=110]="CustomMessage",n[n.TypingMessage=113]="TypingMessage",n[n.QuoteMessage=114]="QuoteMessage",n[n.FaceMessage=115]="FaceMessage",n[n.FriendAdded=1201]="FriendAdded",n[n.OANotification=1400]="OANotification",n[n.GroupCreated=1501]="GroupCreated",n[n.GroupInfoUpdated=1502]="GroupInfoUpdated",n[n.MemberQuit=1504]="MemberQuit",n[n.GroupOwnerTransferred=1507]="GroupOwnerTransferred",n[n.MemberKicked=1508]="MemberKicked",n[n.MemberInvited=1509]="MemberInvited",n[n.MemberEnter=1510]="MemberEnter",n[n.GroupDismissed=1511]="GroupDismissed",n[n.GroupMemberMuted=1512]="GroupMemberMuted",n[n.GroupMemberCancelMuted=1513]="GroupMemberCancelMuted",n[n.GroupMuted=1514]="GroupMuted",n[n.GroupCancelMuted=1515]="GroupCancelMuted",n[n.GroupAnnouncementUpdated=1519]="GroupAnnouncementUpdated",n[n.GroupNameUpdated=1520]="GroupNameUpdated",n[n.BurnMessageChange=1701]="BurnMessageChange",n[n.RevokeMessage=2101]="RevokeMessage"})(Q||(Q={}));var T;(function(n){n[n.Single=1]="Single",n[n.Group=3]="Group",n[n.WorkingGroup=3]="WorkingGroup",n[n.Notification=4]="Notification"})(T||(T={}));var E;(function(n){n[n.Nomal=0]="Nomal",n[n.Baned=1]="Baned",n[n.Dismissed=2]="Dismissed",n[n.Muted=3]="Muted"})(E||(E={}));var j;(function(n){n[n.AtNormal=0]="AtNormal",n[n.AtMe=1]="AtMe",n[n.AtAll=2]="AtAll",n[n.AtAllAtMe=3]="AtAllAtMe",n[n.AtGroupNotice=4]="AtGroupNotice"})(j||(j={}));var q;(function(n){n[n.All=0]="All",n[n.Owner=1]="Owner",n[n.Admin=2]="Admin",n[n.Nomal=3]="Nomal",n[n.AdminAndNomal=4]="AdminAndNomal",n[n.AdminAndOwner=5]="AdminAndOwner"})(q||(q={}));var $;(function(n){n[n.isBlack=0]="isBlack",n[n.isFriend=1]="isFriend"})($||($={}));var ee;(function(n){n[n.Logout=1]="Logout",n[n.Logging=2]="Logging",n[n.Logged=3]="Logged"})(ee||(ee={}));var ne;(function(n){n[n.Online=1]="Online",n[n.Offline=0]="Offline"})(ne||(ne={}));var te;(function(n){n[n.Readed=0]="Readed",n[n.UnRead=1]="UnRead"})(te||(te={}));function Xe(n,s){var d=atob(n);if(s){for(var e=new Uint8Array(d.length),t=0,o=d.length;t<o;++t)e[t]=d.charCodeAt(t);return String.fromCharCode.apply(null,new Uint16Array(e.buffer))}return d}function Oe(n,s,d){var e=s===void 0?null:s,t=d===void 0?!1:d,o=Xe(n,t),a=o.indexOf(`
- `,10)+1,u=o.substring(a)+(e?"//# sourceMappingURL="+e:""),l=new Blob([u],{type:"application/javascript"});return URL.createObjectURL(l)}function We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BoKHMubG9ja1R5cGU9PT1pLGBEb3duZ3JhZGluZyBsb2NrIHRvICR7aX0gaXMgaW52YWxpZGApLHQuaW50MzIoMCksdC5maW5hbGl6ZSgpO2Vsc2V7aChpPT09cixgTmV3IGxvY2tzIG11c3Qgc3RhcnQgYXMgU0hBUkVEIGluc3RlYWQgb2YgJHtpfWApO2xldCBzPW5ldyBmKGF3YWl0IHUoZSkpO2F3YWl0IHMucHJlZmV0Y2hGaXJzdEJsb2NrKDUwMCksYy5zZXQoZSxzKSx0LmludDMyKDApLHQuZmluYWxpemUoKX19KGUsaSxzKSxnKHQsZSk7YnJlYWt9Y2FzZSJ1bmxvY2tGaWxlIjp7bGV0IGk9dC5zdHJpbmcoKSxzPXQuaW50MzIoKTt0LmRvbmUoKSxhd2FpdCBkKGUsaSxzKSxnKHQsZSk7YnJlYWt9ZGVmYXVsdDp0aHJvdyBuZXcgRXJyb3IoIlVua25vd24gbWV0aG9kOiAiK2kpfX1zZWxmLm9ubWVzc2FnZT10PT57c3dpdGNoKHQuZGF0YS50eXBlKXtjYXNlImluaXQiOntsZXRbcyxyXT10LmRhdGEuYnVmZmVycztnKG5ldyBlKHMse25hbWU6ImFyZ3MiLGRlYnVnOiExfSksbmV3IGkocix7bmFtZToicmVzdWx0cyIsZGVidWc6ITF9KSk7YnJlYWt9fX19KCk7Cgo=",null,!1),Ae=Object.freeze({__proto__:null,default:Ne});export{B as A,F as C,x as G,ee as L,Q as M,ne as O,T as S,V as a,j as b,E as c,Y as d,_ as e,K as f,Fe as g};
|