@univerjs-pro/thread-comment-datasource 0.10.6-nightly.202509060614 → 0.10.6-nightly.202509060832
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/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +7 -7
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x227edd=_0x1df7;(function(_0xe50811,_0x2801c0){const _0x10416c=_0x1df7,_0x44ff63=_0xe50811();while(!![]){try{const _0xb6bbc3=parseInt(_0x10416c(0xb0))/0x1+-parseInt(_0x10416c(0xbc))/0x2+-parseInt(_0x10416c(0x90))/0x3+parseInt(_0x10416c(0xf2))/0x4*(parseInt(_0x10416c(0xa6))/0x5)+parseInt(_0x10416c(0xd3))/0x6+parseInt(_0x10416c(0xad))/0x7+parseInt(_0x10416c(0xdc))/0x8;if(_0xb6bbc3===_0x2801c0)break;else _0x44ff63['push'](_0x44ff63['shift']());}catch(_0x1717d5){_0x44ff63['push'](_0x44ff63['shift']());}}}(_0x4357,0x4461e));Object[_0x227edd(0xd6)](exports,Symbol['toStringTag'],{'value':_0x227edd(0xe0)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x29031d=>(_0x29031d[_0x29031d[_0x227edd(0xe1)]=0x0]=_0x227edd(0xe1),_0x29031d[_0x29031d['Solved']=0x1]=_0x227edd(0x8f),_0x29031d[_0x29031d[_0x227edd(0x88)]=-0x1]=_0x227edd(0x88),_0x29031d))(I||{}),v=(_0x11d639=>(_0x11d639[_0x11d639[_0x227edd(0x100)]=0x0]='Unknown',_0x11d639[_0x11d639[_0x227edd(0xfd)]=0x1]=_0x227edd(0xfd),_0x11d639[_0x11d639[_0x227edd(0xda)]=0x2]=_0x227edd(0xda),_0x11d639[_0x11d639['Edit']=0x3]='Edit',_0x11d639[_0x11d639[_0x227edd(0xc3)]=0x4]=_0x227edd(0xc3),_0x11d639[_0x11d639[_0x227edd(0xf4)]=0x5]='Solve',_0x11d639[_0x11d639[_0x227edd(0x88)]=-0x1]=_0x227edd(0x88),_0x11d639))(v||{});const f=_0x55c94f=>c[_0x227edd(0xfe)](new Date(+_0x55c94f))[_0x227edd(0xe6)](_0x227edd(0x9f)),R=async(_0x49147d,_0x478e36)=>{const _0x100404=_0x227edd,_0x4e4c7e=_0x49147d['get'](c['UserManagerService']),_0x106b17=_0x49147d[_0x100404(0xf6)](P[_0x100404(0xbb)]);_0x478e36['forEach'](_0x21ecc4=>{const _0x13d56b=_0x100404;_0x4e4c7e[_0x13d56b(0x91)](_0x21ecc4)&&_0x478e36[_0x13d56b(0xa3)](_0x21ecc4);}),_0x478e36[_0x100404(0x8a)]&&(await _0x106b17[_0x100404(0xf6)](_0x100404(0xec),{'params':{'userIDs':[..._0x478e36]}}))['body'][_0x100404(0xba)][_0x100404(0xe7)](_0xbb7e31=>{const _0x468c16=_0x100404;_0xbb7e31&&_0x4e4c7e[_0x468c16(0xe3)](_0xbb7e31);});};function _0x1df7(_0x106166,_0x5a73b3){const _0x43571f=_0x4357();return _0x1df7=function(_0x1df78f,_0x2e23b9){_0x1df78f=_0x1df78f-0x86;let _0x6af59f=_0x43571f[_0x1df78f];return _0x6af59f;},_0x1df7(_0x106166,_0x5a73b3);}var $=Object[_0x227edd(0x96)],E=(_0x3e2ad5,_0x20f3b1,_0x1fff68,_0x375f51)=>{for(var _0x2952eb=_0x375f51>0x1?void 0x0:_0x375f51?$(_0x20f3b1,_0x1fff68):_0x20f3b1,_0x54e27a=_0x3e2ad5['length']-0x1,_0x2ff53d;_0x54e27a>=0x0;_0x54e27a--)(_0x2ff53d=_0x3e2ad5[_0x54e27a])&&(_0x2952eb=_0x2ff53d(_0x2952eb)||_0x2952eb);return _0x2952eb;},S=(_0x5f1aa5,_0x4806c0)=>(_0x56ffdd,_0x45fc34)=>_0x4806c0(_0x56ffdd,_0x45fc34,_0x5f1aa5);let _=class extends c[_0x227edd(0xb8)]{constructor(_0x5f0e28,_0x54ef82,_0x556d8b,_0x224624){const _0x2339a5=_0x227edd;super(),this[_0x2339a5(0xee)]=_0x5f0e28,this[_0x2339a5(0xc1)]=_0x54ef82,this[_0x2339a5(0xa0)]=_0x556d8b,this[_0x2339a5(0xa2)]=_0x224624,this['_init'](),this[_0x2339a5(0xd1)]();}[_0x227edd(0xd1)](){const _0xfdf85=_0x227edd;this[_0xfdf85(0xa5)](this[_0xfdf85(0xc1)]['commentUpdate$'][_0xfdf85(0xaf)](j[_0xfdf85(0xb4)](0x10))[_0xfdf85(0x9c)](_0x4f51f3=>{const _0x237ea2=_0xfdf85,_0x55210b=new Set();_0x4f51f3[_0x237ea2(0xe7)](_0x3f69ce=>{const _0x16e805=_0x237ea2;switch(_0x3f69ce[_0x16e805(0xd2)]){case'add':{const _0x228787=_0x3f69ce[_0x16e805(0xa9)][_0x16e805(0xe5)];_0x55210b[_0x16e805(0xf1)](_0x228787);break;}}}),R(this['_injector'],_0x55210b);}));}['_init'](){const _0x249c9e=_0x227edd;this[_0x249c9e(0xa5)](this[_0x249c9e(0xee)][_0x249c9e(0xa4)][_0x249c9e(0x9c)](async _0x31b859=>{const _0x27dae2=_0x249c9e;var _0x19f9a0,_0x194228,_0x26e289,_0x1061b0;const _0x5bb966=(_0x19f9a0=this[_0x27dae2(0xc1)]['getUnit'](_0x31b859['unitId'])[_0x27dae2(0xf3)](_0xe919f4=>_0xe919f4[_0x27dae2(0xb6)]===_0x31b859['threadId']))==null?void 0x0:_0x19f9a0[_0x27dae2(0xde)];if(!_0x5bb966)return;const {unitId:_0x51655f,subUnitId:_0x4db418}=_0x5bb966;switch(_0x31b859[_0x27dae2(0xdf)]&&this['_userService'][_0x27dae2(0xe3)](_0x31b859[_0x27dae2(0xdf)]),_0x31b859[_0x27dae2(0xd2)]){case v[_0x27dae2(0xfd)]:break;case v['Reply']:{this[_0x27dae2(0xc1)]['addComment'](_0x51655f,_0x4db418,{'unitId':_0x51655f,'subUnitId':_0x4db418,'ref':'','id':_0x31b859['replyId'],'dT':f(+_0x31b859[_0x27dae2(0xc9)]),'threadId':_0x31b859[_0x27dae2(0xb6)],'personId':(_0x26e289=(_0x194228=_0x31b859[_0x27dae2(0xdf)])==null?void 0x0:_0x194228['userID'])!=null?_0x26e289:_0x31b859[_0x27dae2(0xa8)],'text':JSON['parse'](_0x31b859[_0x27dae2(0xc2)]),'parentId':_0x5bb966['id']});break;}case v[_0x27dae2(0xc3)]:{const _0x1f05d5=this[_0x27dae2(0xc1)][_0x27dae2(0x86)](_0x51655f,_0x4db418,_0x31b859['replyId']);_0x1f05d5&&_0x1f05d5[_0x27dae2(0xed)]&&this[_0x27dae2(0xc1)][_0x27dae2(0xac)](_0x51655f,_0x4db418,_0x31b859[_0x27dae2(0x101)]);break;}case v['Edit']:{this[_0x27dae2(0xc1)][_0x27dae2(0xbe)](_0x51655f,_0x4db418,{'commentId':_0x31b859[_0x27dae2(0x101)],'text':JSON[_0x27dae2(0x102)](_0x31b859[_0x27dae2(0xc2)])});break;}case v[_0x27dae2(0xf4)]:{const _0x45fb5c=(_0x1061b0=this['_threadCommentModel'][_0x27dae2(0x87)](_0x31b859[_0x27dae2(0xdb)])[_0x27dae2(0xf3)](_0x18d5a1=>_0x18d5a1[_0x27dae2(0xb6)]===_0x31b859['threadId']))==null?void 0x0:_0x1061b0[_0x27dae2(0xde)];_0x45fb5c&&this[_0x27dae2(0xc1)][_0x27dae2(0xbf)](_0x51655f,_0x4db418,_0x45fb5c['id'],_0x31b859[_0x27dae2(0xe9)]===I[_0x27dae2(0x8f)]);break;}}}));}};function _0x4357(){const _0x386bf9=['/solved','error','_initDataSource','resolved','_initUserSync','type','238776yWJEJY','code','replies','defineProperty','getMemberID','requireSession','map','Reply','unitId','1479152iQlrBl','thread-comment-data-source.config','root','user','Module','OpenOrReOpen','syncUpdateMutationToColla','addUser','/edit','personId','format','forEach','listComments','solved','Inject','setConfig','/universer-api/user/list','parentId','_commentService','onReady','slice','add','444DVVXIk','find','Solve','comments','get','values','length','UserManagerService','DependentOn','CommentService','UniverCollaborationClientPlugin','Add','dayjs','_threadCommentDataSourceService','Unknown','replyId','parse','getComment','getUnit','UNRECOGNIZED','stringify','size','addComment','userID','merge','symbol','Solved','1011414JiDOLQ','getUser','getCurrentUser','reply','ThreadCommentModel','UniverThreadCommentUIPlugin','getOwnPropertyDescriptor','pluginName','UniverThreadCommentDataSourcePlugin','UNIVER_UNKNOWN','post','body','subscribe','Plugin','_config','YYYY/MM/DD\x20HH:mm','_userService','_configService','_injector','delete','commentUpdate$','disposeWithMe','10055FhiqKf','UniverLicensePlugin','userId','payload','IThreadCommentDataSourceService','comment','deleteComment','2124500znSEkk','saveCommentToSnapshot','pipe','128510eYVEST','/universer-api/comment/unit/','UniverInstanceType','filter','bufferTime','CustomRangeType','threadId','IConfigService','Disposable','/list','users','HTTPService','525378YXlRoo','rangeId','updateComment','resolveComment','onStarting','_threadCommentModel','content','Delete','/reply','/add','_httpService','_sessionService','rangeType','createTimestamp','COMMENT','Injector','_threadCommentDataSource'];_0x4357=function(){return _0x386bf9;};return _0x4357();}_=E([S(0x0,c[_0x227edd(0xea)](b[_0x227edd(0xfb)])),S(0x1,c[_0x227edd(0xea)](M[_0x227edd(0x94)])),S(0x2,c['Inject'](c[_0x227edd(0xf9)])),S(0x3,c[_0x227edd(0xea)](c[_0x227edd(0xcb)]))],_);const q=_0x227edd(0xdd),D={};var A=Object[_0x227edd(0x96)],x=(_0x74eb29,_0x2a548d,_0x3841f5,_0x1acc2c)=>{for(var _0x1a2867=_0x1acc2c>0x1?void 0x0:_0x1acc2c?A(_0x2a548d,_0x3841f5):_0x2a548d,_0xc40343=_0x74eb29['length']-0x1,_0x574059;_0xc40343>=0x0;_0xc40343--)(_0x574059=_0x74eb29[_0xc40343])&&(_0x1a2867=_0x574059(_0x1a2867)||_0x1a2867);return _0x1a2867;},C=(_0x3a1087,_0x5db34b)=>(_0x3e18f5,_0x5208ea)=>_0x5db34b(_0x3e18f5,_0x5208ea,_0x3a1087);function Y(_0x3006d5,_0x3315b4){const _0x3cbe58=_0x227edd,_0x3853fd=_0x3006d5[_0x3cbe58(0xd5)][0x0];return{..._0x3315b4,'id':_0x3853fd[_0x3cbe58(0x101)],'resolved':_0x3006d5[_0x3cbe58(0xe9)]===0x1,'dT':f(_0x3853fd['createTimestamp']),'personId':_0x3853fd[_0x3cbe58(0xa8)],'threadId':_0x3853fd[_0x3cbe58(0xb6)]};}function G(_0x100100,_0x55a284,_0x59a41b){const _0x4d7ac3=_0x227edd;var _0x427318,_0x349be2;if(((_0x349be2=(_0x427318=_0x100100==null?void 0x0:_0x100100[_0x4d7ac3(0xd5)])==null?void 0x0:_0x427318['length'])!=null?_0x349be2:0x0)>0x0){const _0x4e3cbb=(_0x52b5a6,_0x58c6a9)=>({'id':_0x52b5a6[_0x4d7ac3(0x101)],'threadId':_0x52b5a6[_0x4d7ac3(0xb6)],'dT':f(_0x52b5a6[_0x4d7ac3(0xc9)]),'personId':_0x52b5a6[_0x4d7ac3(0xa8)],'resolved':_0x100100[_0x4d7ac3(0xe9)]===I[_0x4d7ac3(0x8f)],'unitId':_0x55a284,'subUnitId':_0x59a41b,'text':JSON[_0x4d7ac3(0x102)](_0x52b5a6[_0x4d7ac3(0xc2)]),'parentId':_0x58c6a9}),_0xe09e6e=_0x4e3cbb(_0x100100['replies'][0x0]);return{..._0xe09e6e,'children':_0x100100[_0x4d7ac3(0xd5)][_0x4d7ac3(0xf0)](0x1)[_0x4d7ac3(0xd9)](_0x5582b5=>_0x4e3cbb(_0x5582b5,_0xe09e6e['id']))};}return null;}let p=class{constructor(_0x378392,_0xd75963,_0xce9783){const _0x4a3e0a=_0x227edd;this[_0x4a3e0a(0xc6)]=_0x378392,this[_0x4a3e0a(0xa0)]=_0xd75963,this['_sessionService']=_0xce9783;}async[_0x227edd(0x8b)](_0x456ee6){const _0x277ca2=_0x227edd;var _0x4ba9d7,_0x20dec4;const {parentId:_0x421c70,unitId:_0x2dff38,text:_0x1a6c10,threadId:_0x521243}=_0x456ee6,_0x48f6ee=(_0x20dec4=(_0x4ba9d7=_0x1a6c10['customRanges'])==null?void 0x0:_0x4ba9d7[_0x277ca2(0xb3)](_0x4e60a2=>_0x4e60a2[_0x277ca2(0xc8)]===c[_0x277ca2(0xb5)]['COMMENT'])[_0x277ca2(0xd9)](_0x1d9049=>_0x1d9049[_0x277ca2(0xbd)]))!=null?_0x20dec4:[],_0xeb1b09=JSON[_0x277ca2(0x89)](_0x1a6c10),_0x23ac4c=(await this['_sessionService'][_0x277ca2(0xd8)](_0x2dff38))['getMemberID']();if(_0x421c70){const _0x20ac35={'memberId':_0x23ac4c,'unitId':_0x2dff38,'content':_0xeb1b09,'mention':_0x48f6ee,'threadId':_0x521243},_0x1b70a2=(await this['_httpService']['post'](_0x277ca2(0xb1)+_0x2dff38+_0x277ca2(0xc4),{'body':_0x20ac35}))[_0x277ca2(0x9b)][_0x277ca2(0x93)];return{..._0x456ee6,'id':_0x1b70a2[_0x277ca2(0x101)],'dT':c[_0x277ca2(0xfe)](+_0x1b70a2[_0x277ca2(0xc9)])[_0x277ca2(0xe6)](_0x277ca2(0x9f)),'personId':_0x1b70a2['userId']};}else{const _0x2fafd6={'memberId':_0x23ac4c,'unitId':_0x2dff38,'content':_0xeb1b09,'mention':_0x48f6ee},_0x49d2c3=await this[_0x277ca2(0xc6)]['post'](_0x277ca2(0xb1)+_0x2dff38+_0x277ca2(0xc5),{'body':_0x2fafd6});return Y(_0x49d2c3['body'][_0x277ca2(0xab)],_0x456ee6);}}async[_0x227edd(0xbe)](_0x400510){const _0x342671=_0x227edd;var _0x19173d,_0x8459e;const {text:_0x13f18c,unitId:_0x22f55e}=_0x400510,_0x303526=(_0x8459e=(_0x19173d=_0x13f18c['customRanges'])==null?void 0x0:_0x19173d[_0x342671(0xb3)](_0x4c6fdb=>_0x4c6fdb[_0x342671(0xc8)]===c[_0x342671(0xb5)][_0x342671(0xca)])[_0x342671(0xd9)](_0x16426f=>_0x16426f[_0x342671(0xbd)]))!=null?_0x8459e:[],_0x32b771=JSON[_0x342671(0x89)](_0x13f18c),_0x377fcb=_0x400510[_0x342671(0xb6)],_0x5ef42d=_0x400510['id'],_0x21ff7d={'memberId':(await this['_sessionService'][_0x342671(0xd8)](_0x22f55e))[_0x342671(0xd7)](),'unitId':_0x22f55e,'threadId':_0x377fcb,'mention':_0x303526,'content':_0x32b771,'replyId':_0x5ef42d},_0x54179b=await this[_0x342671(0xc6)][_0x342671(0x9a)](_0x342671(0xb1)+_0x22f55e+_0x342671(0xe4),{'body':_0x21ff7d});return!_0x54179b[_0x342671(0x9b)][_0x342671(0xce)]||_0x54179b[_0x342671(0x9b)][_0x342671(0xce)][_0x342671(0xd4)]===0x1;}async[_0x227edd(0xbf)](_0x52a446){const _0x2025d7=_0x227edd,{unitId:_0x3c9ebc}=_0x52a446,_0x396b93=_0x52a446[_0x2025d7(0xb6)],_0x22eee8={'memberId':this['_userService'][_0x2025d7(0x92)]()[_0x2025d7(0x8c)],'unitId':_0x3c9ebc,'threadId':_0x396b93,'solved':_0x52a446[_0x2025d7(0xd0)]?I[_0x2025d7(0x8f)]:I[_0x2025d7(0xe1)]},_0x2d9dc7=await this[_0x2025d7(0xc6)][_0x2025d7(0x9a)](_0x2025d7(0xb1)+_0x3c9ebc+_0x2025d7(0xcd),{'body':_0x22eee8});return!_0x2d9dc7[_0x2025d7(0x9b)]['error']||_0x2d9dc7[_0x2025d7(0x9b)][_0x2025d7(0xce)][_0x2025d7(0xd4)]===0x1;}async[_0x227edd(0xac)](_0x3acea1,_0x3397ab,_0x176847,_0x25048a){const _0x46cefa=_0x227edd,_0x115db3={'memberId':(await this[_0x46cefa(0xc7)][_0x46cefa(0xd8)](_0x3acea1))[_0x46cefa(0xd7)](),'threadId':_0x176847,'replyId':_0x25048a,'unitId':_0x3acea1},_0x24f556=await this[_0x46cefa(0xc6)]['post'](_0x46cefa(0xb1)+_0x3acea1+'/delete',{'body':_0x115db3});return!_0x24f556['body'][_0x46cefa(0xce)]||_0x24f556[_0x46cefa(0x9b)]['error'][_0x46cefa(0xd4)]===0x1;}async[_0x227edd(0xe8)](_0x45591b,_0x5a7edc,_0x1aac7f){const _0x30cb14=_0x227edd,_0x11adb={'unitId':_0x45591b,'threadId':_0x1aac7f},_0x354fa5=await this['_httpService'][_0x30cb14(0x9a)](_0x30cb14(0xb1)+_0x45591b+_0x30cb14(0xb9),{'body':_0x11adb}),_0x287f6c=_0x1aac7f[_0x30cb14(0xd9)](_0x39aa40=>G(_0x354fa5[_0x30cb14(0x9b)][_0x30cb14(0xf5)][_0x39aa40],_0x45591b,_0x5a7edc))[_0x30cb14(0xb3)](Boolean);return Object[_0x30cb14(0xf7)](_0x354fa5[_0x30cb14(0x9b)]['users'])[_0x30cb14(0xe7)](_0x25f036=>{const _0x50e7f4=_0x30cb14;this[_0x50e7f4(0xa0)][_0x50e7f4(0xe3)](_0x25f036);}),_0x287f6c;}[_0x227edd(0xae)](_0x145144){return{'id':_0x145144['id'],'threadId':_0x145144['threadId'],'ref':_0x145144['ref']};}};p=x([C(0x0,c[_0x227edd(0xea)](P[_0x227edd(0xbb)])),C(0x1,c['Inject'](c[_0x227edd(0xf9)])),C(0x2,c['Inject'](b['CollaborationSessionService']))],p);var H=Object[_0x227edd(0x96)],J=(_0x4126ce,_0x331cf7,_0x510f81,_0x16f1ec)=>{const _0x2c2e3c=_0x227edd;for(var _0x43b8ea=_0x16f1ec>0x1?void 0x0:_0x16f1ec?H(_0x331cf7,_0x510f81):_0x331cf7,_0x4ce0ae=_0x4126ce[_0x2c2e3c(0xf8)]-0x1,_0xec602;_0x4ce0ae>=0x0;_0x4ce0ae--)(_0xec602=_0x4126ce[_0x4ce0ae])&&(_0x43b8ea=_0xec602(_0x43b8ea)||_0x43b8ea);return _0x43b8ea;},y=(_0x1f0eb8,_0x13423e)=>(_0x5811e8,_0x58bd21)=>_0x13423e(_0x5811e8,_0x58bd21,_0x1f0eb8);let g=class extends c['Disposable']{constructor(_0x12d72d,_0x1044de){const _0x4fbb19=_0x227edd;super(),this[_0x4fbb19(0xff)]=_0x12d72d,this[_0x4fbb19(0xcc)]=_0x1044de,this[_0x4fbb19(0xcf)]();}[_0x227edd(0xcf)](){const _0x7780e3=_0x227edd;this[_0x7780e3(0xff)]['dataSource']=this['_threadCommentDataSource'],this[_0x7780e3(0xff)][_0x7780e3(0xe2)]=!0x1;}};g=J([y(0x0,M[_0x227edd(0xaa)]),y(0x1,c['Inject'](p))],g);var F=Object[_0x227edd(0xd6)],L=Object['getOwnPropertyDescriptor'],Z=(_0x16867e,_0x2b112b,_0x4a0fab)=>_0x2b112b in _0x16867e?F(_0x16867e,_0x2b112b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4a0fab}):_0x16867e[_0x2b112b]=_0x4a0fab,W=(_0x36611f,_0x590679,_0x2c8830,_0x7448a7)=>{const _0x2d5fba=_0x227edd;for(var _0x4b4350=_0x7448a7>0x1?void 0x0:_0x7448a7?L(_0x590679,_0x2c8830):_0x590679,_0x53dd5f=_0x36611f[_0x2d5fba(0xf8)]-0x1,_0x5ef625;_0x53dd5f>=0x0;_0x53dd5f--)(_0x5ef625=_0x36611f[_0x53dd5f])&&(_0x4b4350=_0x5ef625(_0x4b4350)||_0x4b4350);return _0x4b4350;},O=(_0xa63dc6,_0x15858a)=>(_0x23ac57,_0x3d58a7)=>_0x15858a(_0x23ac57,_0x3d58a7,_0xa63dc6),N=(_0x1dae0c,_0x14c89d,_0x3abd36)=>Z(_0x1dae0c,typeof _0x14c89d!=_0x227edd(0x8e)?_0x14c89d+'':_0x14c89d,_0x3abd36);exports[_0x227edd(0x98)]=class extends c[_0x227edd(0x9d)]{constructor(_0x29ad6d=D,_0x451dd3,_0x3ab936){const _0x17c491=_0x227edd;super(),this[_0x17c491(0x9e)]=_0x29ad6d,this[_0x17c491(0xa2)]=_0x451dd3,this['_configService']=_0x3ab936;const {..._0x21c50d}=c[_0x17c491(0x8d)]({},D,this[_0x17c491(0x9e)]);this[_0x17c491(0xa1)][_0x17c491(0xeb)](q,_0x21c50d);}[_0x227edd(0xc0)](){const _0x4f2323=_0x227edd;[[p],[g],[_]][_0x4f2323(0xe7)](_0x36c37f=>{const _0x260194=_0x4f2323;this[_0x260194(0xa2)][_0x260194(0xf1)](_0x36c37f);});}[_0x227edd(0xef)](){const _0x5121ac=_0x227edd;this['_injector'][_0x5121ac(0xf6)](g),this[_0x5121ac(0xa2)]['get'](_);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x227edd(0x97),U),N(exports[_0x227edd(0x98)],_0x227edd(0xd2),c[_0x227edd(0xb2)][_0x227edd(0x99)]),exports[_0x227edd(0x98)]=W([c[_0x227edd(0xfa)](w[_0x227edd(0x95)],b[_0x227edd(0xfc)],T[_0x227edd(0xa7)]),O(0x1,c[_0x227edd(0xea)](c['Injector'])),O(0x2,c[_0x227edd(0xb7)])],exports[_0x227edd(0x98)]);
|
|
1
|
+
'use strict';const _0x570388=_0x24a2;(function(_0x260439,_0x2522d5){const _0x46572d=_0x24a2,_0x355940=_0x260439();while(!![]){try{const _0x128269=-parseInt(_0x46572d(0xac))/0x1+parseInt(_0x46572d(0xe9))/0x2+parseInt(_0x46572d(0xfe))/0x3*(-parseInt(_0x46572d(0xa2))/0x4)+parseInt(_0x46572d(0xbf))/0x5*(parseInt(_0x46572d(0xa1))/0x6)+parseInt(_0x46572d(0xc1))/0x7+-parseInt(_0x46572d(0xfc))/0x8+-parseInt(_0x46572d(0xf3))/0x9*(-parseInt(_0x46572d(0x96))/0xa);if(_0x128269===_0x2522d5)break;else _0x355940['push'](_0x355940['shift']());}catch(_0x4047b9){_0x355940['push'](_0x355940['shift']());}}}(_0x41f5,0x4cd06));Object[_0x570388(0x98)](exports,Symbol[_0x570388(0xdf)],{'value':_0x570388(0x97)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x570388(0xa9);function _0x24a2(_0x4abfef,_0x5bf3a8){const _0x41f5f8=_0x41f5();return _0x24a2=function(_0x24a205,_0x1f6f9d){_0x24a205=_0x24a205-0x94;let _0x2850b3=_0x41f5f8[_0x24a205];return _0x2850b3;},_0x24a2(_0x4abfef,_0x5bf3a8);}var I=(_0x1e08bc=>(_0x1e08bc[_0x1e08bc['OpenOrReOpen']=0x0]=_0x570388(0xd7),_0x1e08bc[_0x1e08bc[_0x570388(0xdc)]=0x1]=_0x570388(0xdc),_0x1e08bc[_0x1e08bc[_0x570388(0xf7)]=-0x1]=_0x570388(0xf7),_0x1e08bc))(I||{}),v=(_0xce858f=>(_0xce858f[_0xce858f[_0x570388(0xa4)]=0x0]=_0x570388(0xa4),_0xce858f[_0xce858f[_0x570388(0xdd)]=0x1]=_0x570388(0xdd),_0xce858f[_0xce858f['Reply']=0x2]=_0x570388(0x102),_0xce858f[_0xce858f[_0x570388(0x10f)]=0x3]=_0x570388(0x10f),_0xce858f[_0xce858f[_0x570388(0xae)]=0x4]=_0x570388(0xae),_0xce858f[_0xce858f[_0x570388(0x110)]=0x5]=_0x570388(0x110),_0xce858f[_0xce858f[_0x570388(0xf7)]=-0x1]=_0x570388(0xf7),_0xce858f))(v||{});const f=_0xeeee4c=>c[_0x570388(0xdb)](new Date(+_0xeeee4c))[_0x570388(0xc5)](_0x570388(0x108)),R=async(_0x53b8a9,_0x1cb4b4)=>{const _0x4ec091=_0x570388,_0x2e6fb4=_0x53b8a9[_0x4ec091(0x104)](c['UserManagerService']),_0x46ea82=_0x53b8a9[_0x4ec091(0x104)](P[_0x4ec091(0xf2)]);_0x1cb4b4[_0x4ec091(0x9d)](_0x198cbd=>{const _0x2e9204=_0x4ec091;_0x2e6fb4[_0x2e9204(0xda)](_0x198cbd)&&_0x1cb4b4[_0x2e9204(0x9f)](_0x198cbd);}),_0x1cb4b4[_0x4ec091(0xaa)]&&(await _0x46ea82['get'](_0x4ec091(0xaf),{'params':{'userIDs':[..._0x1cb4b4]}}))[_0x4ec091(0xe2)]['users'][_0x4ec091(0x9d)](_0x42bbf2=>{_0x42bbf2&&_0x2e6fb4['addUser'](_0x42bbf2);});};var $=Object[_0x570388(0xc7)],E=(_0x42397a,_0x436ff9,_0x3495e1,_0x4a5af6)=>{const _0xcd27b2=_0x570388;for(var _0x18ac51=_0x4a5af6>0x1?void 0x0:_0x4a5af6?$(_0x436ff9,_0x3495e1):_0x436ff9,_0x56fdd9=_0x42397a[_0xcd27b2(0xba)]-0x1,_0x2ce21d;_0x56fdd9>=0x0;_0x56fdd9--)(_0x2ce21d=_0x42397a[_0x56fdd9])&&(_0x18ac51=_0x2ce21d(_0x18ac51)||_0x18ac51);return _0x18ac51;},S=(_0x3a541f,_0x3a5a5a)=>(_0x5b185a,_0x47b7c5)=>_0x3a5a5a(_0x5b185a,_0x47b7c5,_0x3a541f);let _=class extends c[_0x570388(0x107)]{constructor(_0x1c996d,_0x52515c,_0x2470e1,_0x470777){const _0x1707a3=_0x570388;super(),this[_0x1707a3(0xc0)]=_0x1c996d,this['_threadCommentModel']=_0x52515c,this['_userService']=_0x2470e1,this[_0x1707a3(0xc6)]=_0x470777,this[_0x1707a3(0xb8)](),this[_0x1707a3(0x10a)]();}[_0x570388(0x10a)](){const _0x154435=_0x570388;this[_0x154435(0x113)](this[_0x154435(0xb6)][_0x154435(0x95)][_0x154435(0xfa)](j[_0x154435(0xe0)](0x10))[_0x154435(0xe8)](_0x36b362=>{const _0x1596da=_0x154435,_0x2d9d0d=new Set();_0x36b362[_0x1596da(0x9d)](_0x84759f=>{const _0xf089d6=_0x1596da;switch(_0x84759f[_0xf089d6(0xcd)]){case _0xf089d6(0xc9):{const _0x55b9ec=_0x84759f[_0xf089d6(0x9c)]['personId'];_0x2d9d0d[_0xf089d6(0xc9)](_0x55b9ec);break;}}}),R(this[_0x1596da(0xc6)],_0x2d9d0d);}));}[_0x570388(0xb8)](){const _0x139e6c=_0x570388;this[_0x139e6c(0x113)](this[_0x139e6c(0xc0)][_0x139e6c(0x95)][_0x139e6c(0xe8)](async _0x3280a4=>{const _0x3fd12e=_0x139e6c;var _0xd5c2b5,_0x20c297,_0x41f6d8,_0x393fd4;const _0x1630fa=(_0xd5c2b5=this['_threadCommentModel'][_0x3fd12e(0xbd)](_0x3280a4[_0x3fd12e(0xc3)])[_0x3fd12e(0x101)](_0x1a9c95=>_0x1a9c95[_0x3fd12e(0x10b)]===_0x3280a4[_0x3fd12e(0x10b)]))==null?void 0x0:_0xd5c2b5['root'];if(!_0x1630fa)return;const {unitId:_0x5ae795,subUnitId:_0x397441}=_0x1630fa;switch(_0x3280a4[_0x3fd12e(0xa5)]&&this[_0x3fd12e(0xa0)]['addUser'](_0x3280a4[_0x3fd12e(0xa5)]),_0x3280a4[_0x3fd12e(0xcd)]){case v[_0x3fd12e(0xdd)]:break;case v[_0x3fd12e(0x102)]:{this[_0x3fd12e(0xb6)][_0x3fd12e(0xd6)](_0x5ae795,_0x397441,{'unitId':_0x5ae795,'subUnitId':_0x397441,'ref':'','id':_0x3280a4[_0x3fd12e(0x9b)],'dT':f(+_0x3280a4[_0x3fd12e(0xbc)]),'threadId':_0x3280a4[_0x3fd12e(0x10b)],'personId':(_0x41f6d8=(_0x20c297=_0x3280a4['user'])==null?void 0x0:_0x20c297[_0x3fd12e(0xec)])!=null?_0x41f6d8:_0x3280a4[_0x3fd12e(0x112)],'text':JSON[_0x3fd12e(0xce)](_0x3280a4[_0x3fd12e(0x106)]),'parentId':_0x1630fa['id']});break;}case v[_0x3fd12e(0xae)]:{const _0x30f94e=this[_0x3fd12e(0xb6)][_0x3fd12e(0x10d)](_0x5ae795,_0x397441,_0x3280a4[_0x3fd12e(0x9b)]);_0x30f94e&&_0x30f94e[_0x3fd12e(0xe6)]&&this[_0x3fd12e(0xb6)][_0x3fd12e(0xb4)](_0x5ae795,_0x397441,_0x3280a4[_0x3fd12e(0x9b)]);break;}case v[_0x3fd12e(0x10f)]:{this[_0x3fd12e(0xb6)][_0x3fd12e(0xb0)](_0x5ae795,_0x397441,{'commentId':_0x3280a4['replyId'],'text':JSON[_0x3fd12e(0xce)](_0x3280a4[_0x3fd12e(0x106)])});break;}case v[_0x3fd12e(0x110)]:{const _0x30a62e=(_0x393fd4=this[_0x3fd12e(0xb6)][_0x3fd12e(0xbd)](_0x3280a4[_0x3fd12e(0xc3)])[_0x3fd12e(0x101)](_0x1bf325=>_0x1bf325[_0x3fd12e(0x10b)]===_0x3280a4[_0x3fd12e(0x10b)]))==null?void 0x0:_0x393fd4[_0x3fd12e(0x103)];_0x30a62e&&this[_0x3fd12e(0xb6)][_0x3fd12e(0xb9)](_0x5ae795,_0x397441,_0x30a62e['id'],_0x3280a4[_0x3fd12e(0xd2)]===I[_0x3fd12e(0xdc)]);break;}}}));}};_=E([S(0x0,c[_0x570388(0xf5)](b[_0x570388(0xcf)])),S(0x1,c[_0x570388(0xf5)](M[_0x570388(0xee)])),S(0x2,c[_0x570388(0xf5)](c[_0x570388(0xfd)])),S(0x3,c[_0x570388(0xf5)](c[_0x570388(0x105)]))],_);const q=_0x570388(0xf4),D={};var A=Object[_0x570388(0xc7)],x=(_0x13b5d9,_0x1e48e8,_0x5a6fcc,_0xbfa912)=>{for(var _0x1ac175=_0xbfa912>0x1?void 0x0:_0xbfa912?A(_0x1e48e8,_0x5a6fcc):_0x1e48e8,_0x3d8ee1=_0x13b5d9['length']-0x1,_0x32a170;_0x3d8ee1>=0x0;_0x3d8ee1--)(_0x32a170=_0x13b5d9[_0x3d8ee1])&&(_0x1ac175=_0x32a170(_0x1ac175)||_0x1ac175);return _0x1ac175;},C=(_0x38fd7c,_0x8b7afb)=>(_0x4038da,_0x35f570)=>_0x8b7afb(_0x4038da,_0x35f570,_0x38fd7c);function Y(_0x354bda,_0x476ca0){const _0x574ea0=_0x570388,_0x1883a6=_0x354bda['replies'][0x0];return{..._0x476ca0,'id':_0x1883a6[_0x574ea0(0x9b)],'resolved':_0x354bda['solved']===0x1,'dT':f(_0x1883a6['createTimestamp']),'personId':_0x1883a6[_0x574ea0(0x112)],'threadId':_0x1883a6['threadId']};}function _0x41f5(){const _0x27c3b0=['deleteComment','COMMENT','_threadCommentModel','IConfigService','_init','resolveComment','length','/universer-api/comment/unit/','createTimestamp','getUnit','_configService','625iJuwGC','_commentService','3457797uGLieO','CustomRangeType','unitId','/edit','format','_injector','getOwnPropertyDescriptor','/list','add','UniverCollaborationClientPlugin','_threadCommentDataSourceService','map','type','parse','CommentService','_threadCommentDataSource','UniverThreadCommentDataSourcePlugin','solved','getMemberID','onReady','_initDataSource','addComment','OpenOrReOpen','rangeType','rangeId','getUser','dayjs','Solved','Add','comments','toStringTag','bufferTime','slice','body','code','/solved','filter','parentId','requireSession','subscribe','910142RPXXSj','/delete','comment','userID','getCurrentUser','ThreadCommentModel','stringify','_config','pluginName','HTTPService','2127429NbLNib','thread-comment-data-source.config','Inject','addUser','UNRECOGNIZED','UniverInstanceType','_sessionService','pipe','dataSource','4807248PuiLnW','UserManagerService','39rpaGrX','CollaborationSessionService','replies','find','Reply','root','get','Injector','content','Disposable','YYYY/MM/DD\x20HH:mm','users','_initUserSync','threadId','UniverLicensePlugin','getComment','symbol','Edit','Solve','ref','userId','disposeWithMe','setConfig','commentUpdate$','30CviGvZ','Module','defineProperty','syncUpdateMutationToColla','_httpService','replyId','payload','forEach','resolved','delete','_userService','3726QOyZkf','61592rwHaqa','error','Unknown','user','/add','post','values','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','size','UNIVER_UNKNOWN','620100RUidER','saveCommentToSnapshot','Delete','/universer-api/user/list','updateComment','merge','customRanges','DependentOn'];_0x41f5=function(){return _0x27c3b0;};return _0x41f5();}function G(_0x4dbd94,_0x6e46,_0x545057){const _0x5b40a9=_0x570388;var _0x2ab8c3,_0x2ecc36;if(((_0x2ecc36=(_0x2ab8c3=_0x4dbd94==null?void 0x0:_0x4dbd94[_0x5b40a9(0x100)])==null?void 0x0:_0x2ab8c3['length'])!=null?_0x2ecc36:0x0)>0x0){const _0xab2e=(_0x17278c,_0x41d3e3)=>({'id':_0x17278c[_0x5b40a9(0x9b)],'threadId':_0x17278c[_0x5b40a9(0x10b)],'dT':f(_0x17278c[_0x5b40a9(0xbc)]),'personId':_0x17278c['userId'],'resolved':_0x4dbd94['solved']===I['Solved'],'unitId':_0x6e46,'subUnitId':_0x545057,'text':JSON[_0x5b40a9(0xce)](_0x17278c[_0x5b40a9(0x106)]),'parentId':_0x41d3e3}),_0x3e948d=_0xab2e(_0x4dbd94['replies'][0x0]);return{..._0x3e948d,'children':_0x4dbd94[_0x5b40a9(0x100)][_0x5b40a9(0xe1)](0x1)[_0x5b40a9(0xcc)](_0x4d7993=>_0xab2e(_0x4d7993,_0x3e948d['id']))};}return null;}let p=class{constructor(_0x590aa7,_0x2a83e6,_0x3b1604){const _0x4250e4=_0x570388;this[_0x4250e4(0x9a)]=_0x590aa7,this[_0x4250e4(0xa0)]=_0x2a83e6,this[_0x4250e4(0xf9)]=_0x3b1604;}async[_0x570388(0xd6)](_0xf4d42e){const _0xe07f29=_0x570388;var _0x814272,_0x3e24fe;const {parentId:_0x2ddf8b,unitId:_0x547552,text:_0x512a17,threadId:_0x59440b}=_0xf4d42e,_0xfbae8f=(_0x3e24fe=(_0x814272=_0x512a17['customRanges'])==null?void 0x0:_0x814272[_0xe07f29(0xe5)](_0x5f2ab0=>_0x5f2ab0[_0xe07f29(0xd8)]===c[_0xe07f29(0xc2)]['COMMENT'])[_0xe07f29(0xcc)](_0x4194d5=>_0x4194d5[_0xe07f29(0xd9)]))!=null?_0x3e24fe:[],_0x348408=JSON[_0xe07f29(0xef)](_0x512a17),_0x12d779=(await this[_0xe07f29(0xf9)][_0xe07f29(0xe7)](_0x547552))[_0xe07f29(0xd3)]();if(_0x2ddf8b){const _0x58b8f1={'memberId':_0x12d779,'unitId':_0x547552,'content':_0x348408,'mention':_0xfbae8f,'threadId':_0x59440b},_0x192037=(await this[_0xe07f29(0x9a)]['post'](_0xe07f29(0xbb)+_0x547552+'/reply',{'body':_0x58b8f1}))[_0xe07f29(0xe2)]['reply'];return{..._0xf4d42e,'id':_0x192037[_0xe07f29(0x9b)],'dT':c[_0xe07f29(0xdb)](+_0x192037[_0xe07f29(0xbc)])[_0xe07f29(0xc5)](_0xe07f29(0x108)),'personId':_0x192037[_0xe07f29(0x112)]};}else{const _0x32c742={'memberId':_0x12d779,'unitId':_0x547552,'content':_0x348408,'mention':_0xfbae8f},_0x452ba6=await this[_0xe07f29(0x9a)][_0xe07f29(0xa7)]('/universer-api/comment/unit/'+_0x547552+_0xe07f29(0xa6),{'body':_0x32c742});return Y(_0x452ba6[_0xe07f29(0xe2)][_0xe07f29(0xeb)],_0xf4d42e);}}async[_0x570388(0xb0)](_0x308c52){const _0x6ccecc=_0x570388;var _0x308888,_0x2538f9;const {text:_0x176954,unitId:_0x14d24f}=_0x308c52,_0x49ccfa=(_0x2538f9=(_0x308888=_0x176954[_0x6ccecc(0xb2)])==null?void 0x0:_0x308888[_0x6ccecc(0xe5)](_0xa5e419=>_0xa5e419[_0x6ccecc(0xd8)]===c[_0x6ccecc(0xc2)][_0x6ccecc(0xb5)])[_0x6ccecc(0xcc)](_0x4bc6fb=>_0x4bc6fb[_0x6ccecc(0xd9)]))!=null?_0x2538f9:[],_0x2c271c=JSON[_0x6ccecc(0xef)](_0x176954),_0x2cb8c3=_0x308c52['threadId'],_0x517225=_0x308c52['id'],_0x4eaead={'memberId':(await this[_0x6ccecc(0xf9)]['requireSession'](_0x14d24f))[_0x6ccecc(0xd3)](),'unitId':_0x14d24f,'threadId':_0x2cb8c3,'mention':_0x49ccfa,'content':_0x2c271c,'replyId':_0x517225},_0x5a26ac=await this[_0x6ccecc(0x9a)][_0x6ccecc(0xa7)](_0x6ccecc(0xbb)+_0x14d24f+_0x6ccecc(0xc4),{'body':_0x4eaead});return!_0x5a26ac['body'][_0x6ccecc(0xa3)]||_0x5a26ac[_0x6ccecc(0xe2)][_0x6ccecc(0xa3)][_0x6ccecc(0xe3)]===0x1;}async[_0x570388(0xb9)](_0x3f2cfc){const _0x24743e=_0x570388,{unitId:_0x40d77e}=_0x3f2cfc,_0x130122=_0x3f2cfc[_0x24743e(0x10b)],_0x2f608c={'memberId':this['_userService'][_0x24743e(0xed)]()[_0x24743e(0xec)],'unitId':_0x40d77e,'threadId':_0x130122,'solved':_0x3f2cfc[_0x24743e(0x9e)]?I['Solved']:I[_0x24743e(0xd7)]},_0x2095e0=await this[_0x24743e(0x9a)][_0x24743e(0xa7)]('/universer-api/comment/unit/'+_0x40d77e+_0x24743e(0xe4),{'body':_0x2f608c});return!_0x2095e0['body'][_0x24743e(0xa3)]||_0x2095e0['body'][_0x24743e(0xa3)][_0x24743e(0xe3)]===0x1;}async[_0x570388(0xb4)](_0x129b76,_0x4ffee3,_0x2db611,_0x40d899){const _0x31defb=_0x570388,_0x371ba9={'memberId':(await this[_0x31defb(0xf9)][_0x31defb(0xe7)](_0x129b76))[_0x31defb(0xd3)](),'threadId':_0x2db611,'replyId':_0x40d899,'unitId':_0x129b76},_0x8f9f7c=await this[_0x31defb(0x9a)][_0x31defb(0xa7)](_0x31defb(0xbb)+_0x129b76+_0x31defb(0xea),{'body':_0x371ba9});return!_0x8f9f7c['body'][_0x31defb(0xa3)]||_0x8f9f7c['body'][_0x31defb(0xa3)][_0x31defb(0xe3)]===0x1;}async['listComments'](_0x34490d,_0x48389b,_0xb7af50){const _0x206a81=_0x570388,_0x46d878={'unitId':_0x34490d,'threadId':_0xb7af50},_0x13f1f0=await this[_0x206a81(0x9a)]['post']('/universer-api/comment/unit/'+_0x34490d+_0x206a81(0xc8),{'body':_0x46d878}),_0x1fbb18=_0xb7af50[_0x206a81(0xcc)](_0x42ed2e=>G(_0x13f1f0[_0x206a81(0xe2)][_0x206a81(0xde)][_0x42ed2e],_0x34490d,_0x48389b))['filter'](Boolean);return Object[_0x206a81(0xa8)](_0x13f1f0[_0x206a81(0xe2)][_0x206a81(0x109)])[_0x206a81(0x9d)](_0x2fe6a5=>{const _0x5d4fef=_0x206a81;this[_0x5d4fef(0xa0)][_0x5d4fef(0xf6)](_0x2fe6a5);}),_0x1fbb18;}[_0x570388(0xad)](_0x56c9b7){const _0x13bced=_0x570388;return{'id':_0x56c9b7['id'],'threadId':_0x56c9b7['threadId'],'ref':_0x56c9b7[_0x13bced(0x111)]};}};p=x([C(0x0,c[_0x570388(0xf5)](P[_0x570388(0xf2)])),C(0x1,c['Inject'](c[_0x570388(0xfd)])),C(0x2,c[_0x570388(0xf5)](b[_0x570388(0xff)]))],p);var H=Object[_0x570388(0xc7)],J=(_0x5a9159,_0x28f027,_0x2bce42,_0x3e3e91)=>{const _0x34bd03=_0x570388;for(var _0x4cfb62=_0x3e3e91>0x1?void 0x0:_0x3e3e91?H(_0x28f027,_0x2bce42):_0x28f027,_0x345e35=_0x5a9159[_0x34bd03(0xba)]-0x1,_0x337597;_0x345e35>=0x0;_0x345e35--)(_0x337597=_0x5a9159[_0x345e35])&&(_0x4cfb62=_0x337597(_0x4cfb62)||_0x4cfb62);return _0x4cfb62;},y=(_0x3dd2cd,_0x36b059)=>(_0x3e946a,_0x3d22c1)=>_0x36b059(_0x3e946a,_0x3d22c1,_0x3dd2cd);let g=class extends c[_0x570388(0x107)]{constructor(_0x9cecbd,_0x195d7f){const _0xdadb6e=_0x570388;super(),this['_threadCommentDataSourceService']=_0x9cecbd,this[_0xdadb6e(0xd0)]=_0x195d7f,this[_0xdadb6e(0xd5)]();}[_0x570388(0xd5)](){const _0x4cdba7=_0x570388;this[_0x4cdba7(0xcb)][_0x4cdba7(0xfb)]=this[_0x4cdba7(0xd0)],this[_0x4cdba7(0xcb)][_0x4cdba7(0x99)]=!0x1;}};g=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x570388(0xf5)](p))],g);var F=Object[_0x570388(0x98)],L=Object['getOwnPropertyDescriptor'],Z=(_0x5b6ff5,_0x5c00f6,_0x2a0ada)=>_0x5c00f6 in _0x5b6ff5?F(_0x5b6ff5,_0x5c00f6,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2a0ada}):_0x5b6ff5[_0x5c00f6]=_0x2a0ada,W=(_0x2cbd83,_0x1d7650,_0x551676,_0xdde6ed)=>{const _0x46cc65=_0x570388;for(var _0x5e0974=_0xdde6ed>0x1?void 0x0:_0xdde6ed?L(_0x1d7650,_0x551676):_0x1d7650,_0xd478b2=_0x2cbd83[_0x46cc65(0xba)]-0x1,_0x6beb59;_0xd478b2>=0x0;_0xd478b2--)(_0x6beb59=_0x2cbd83[_0xd478b2])&&(_0x5e0974=_0x6beb59(_0x5e0974)||_0x5e0974);return _0x5e0974;},O=(_0x50559a,_0x547d1e)=>(_0x105111,_0xb0ff6b)=>_0x547d1e(_0x105111,_0xb0ff6b,_0x50559a),N=(_0x32731b,_0x119ffd,_0x583d1d)=>Z(_0x32731b,typeof _0x119ffd!=_0x570388(0x10e)?_0x119ffd+'':_0x119ffd,_0x583d1d);exports[_0x570388(0xd1)]=class extends c['Plugin']{constructor(_0x551c14=D,_0xa6bc0c,_0x40f86c){const _0x3177fe=_0x570388;super(),this[_0x3177fe(0xf0)]=_0x551c14,this[_0x3177fe(0xc6)]=_0xa6bc0c,this[_0x3177fe(0xbe)]=_0x40f86c;const {..._0x103a89}=c[_0x3177fe(0xb1)]({},D,this[_0x3177fe(0xf0)]);this['_configService'][_0x3177fe(0x94)](q,_0x103a89);}['onStarting'](){const _0x2c7646=_0x570388;[[p],[g],[_]][_0x2c7646(0x9d)](_0x1a0cb0=>{const _0x4e19df=_0x2c7646;this[_0x4e19df(0xc6)]['add'](_0x1a0cb0);});}[_0x570388(0xd4)](){const _0x33ce4c=_0x570388;this['_injector'][_0x33ce4c(0x104)](g),this[_0x33ce4c(0xc6)]['get'](_);}},N(exports[_0x570388(0xd1)],_0x570388(0xf1),U),N(exports[_0x570388(0xd1)],_0x570388(0xcd),c[_0x570388(0xf8)][_0x570388(0xab)]),exports[_0x570388(0xd1)]=W([c[_0x570388(0xb3)](w['UniverThreadCommentUIPlugin'],b[_0x570388(0xca)],T[_0x570388(0x10c)]),O(0x1,c[_0x570388(0xf5)](c['Injector'])),O(0x2,c[_0x570388(0xb7)])],exports[_0x570388(0xd1)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x5217f6=_0x46e1;(function(_0x136ed1,_0x48d7dd){const _0x132085=_0x46e1,_0x379130=_0x136ed1();while(!![]){try{const _0x31df3b=parseInt(_0x132085(0x206))/0x1+-parseInt(_0x132085(0x1f3))/0x2+-parseInt(_0x132085(0x1e3))/0x3*(parseInt(_0x132085(0x1c1))/0x4)+parseInt(_0x132085(0x1d6))/0x5*(parseInt(_0x132085(0x1f9))/0x6)+parseInt(_0x132085(0x1db))/0x7+parseInt(_0x132085(0x1d5))/0x8+-parseInt(_0x132085(0x211))/0x9*(parseInt(_0x132085(0x205))/0xa);if(_0x31df3b===_0x48d7dd)break;else _0x379130['push'](_0x379130['shift']());}catch(_0x558070){_0x379130['push'](_0x379130['shift']());}}}(_0x3d63,0x6c34d));import{CommentService as _0x51572b,CollaborationSessionService as _0x53374a,UniverCollaborationClientPlugin as _0x2e346e}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1090de}from'@univerjs-pro/license';import{dayjs as _0x564153,UserManagerService as _0x3b92a5,Inject as _0x2c3e49,Injector as _0x212dfe,Disposable as _0x12c7bd,CustomRangeType as _0x29b135,UniverInstanceType as _0x2bdb63,DependentOn as _0x31e70c,IConfigService as _0x3ed13f,Plugin as _0x4954dd,merge as _0x5a4b2a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3c7c4c}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x267e96,IThreadCommentDataSourceService as _0x209dac}from'@univerjs/thread-comment';import{bufferTime as _0x57ac75}from'rxjs';import{HTTPService as _0x2fdef9}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x2d1a80=>(_0x2d1a80[_0x2d1a80['OpenOrReOpen']=0x0]=_0x5217f6(0x213),_0x2d1a80[_0x2d1a80[_0x5217f6(0x1f8)]=0x1]=_0x5217f6(0x1f8),_0x2d1a80[_0x2d1a80[_0x5217f6(0x1e8)]=-0x1]=_0x5217f6(0x1e8),_0x2d1a80))(I||{}),v=(_0x3d9884=>(_0x3d9884[_0x3d9884['Unknown']=0x0]='Unknown',_0x3d9884[_0x3d9884[_0x5217f6(0x209)]=0x1]=_0x5217f6(0x209),_0x3d9884[_0x3d9884[_0x5217f6(0x1ca)]=0x2]=_0x5217f6(0x1ca),_0x3d9884[_0x3d9884[_0x5217f6(0x1e2)]=0x3]=_0x5217f6(0x1e2),_0x3d9884[_0x3d9884['Delete']=0x4]=_0x5217f6(0x1e9),_0x3d9884[_0x3d9884[_0x5217f6(0x1b9)]=0x5]=_0x5217f6(0x1b9),_0x3d9884[_0x3d9884[_0x5217f6(0x1e8)]=-0x1]='UNRECOGNIZED',_0x3d9884))(v||{});const y=_0xb741b3=>_0x564153(new Date(+_0xb741b3))[_0x5217f6(0x217)](_0x5217f6(0x20d)),B=async(_0x4934be,_0x5a3cba)=>{const _0x482743=_0x5217f6,_0x50d590=_0x4934be['get'](_0x3b92a5),_0x2511a8=_0x4934be['get'](_0x2fdef9);_0x5a3cba[_0x482743(0x1c4)](_0x2b9f16=>{const _0x5ea147=_0x482743;_0x50d590[_0x5ea147(0x204)](_0x2b9f16)&&_0x5a3cba[_0x5ea147(0x1e1)](_0x2b9f16);}),_0x5a3cba[_0x482743(0x1dd)]&&(await _0x2511a8[_0x482743(0x1c2)](_0x482743(0x220),{'params':{'userIDs':[..._0x5a3cba]}}))[_0x482743(0x1e7)]['users']['forEach'](_0x57ad25=>{const _0x45bd0b=_0x482743;_0x57ad25&&_0x50d590[_0x45bd0b(0x21c)](_0x57ad25);});};var K=Object[_0x5217f6(0x1bf)],V=(_0x1942ab,_0x5bc842,_0x5d5385,_0x1dae7f)=>{const _0x313b33=_0x5217f6;for(var _0x17c7d5=_0x1dae7f>0x1?void 0x0:_0x1dae7f?K(_0x5bc842,_0x5d5385):_0x5bc842,_0x4923a6=_0x1942ab[_0x313b33(0x214)]-0x1,_0xe73dc0;_0x4923a6>=0x0;_0x4923a6--)(_0xe73dc0=_0x1942ab[_0x4923a6])&&(_0x17c7d5=_0xe73dc0(_0x17c7d5)||_0x17c7d5);return _0x17c7d5;},p=(_0x177fe3,_0x16416e)=>(_0x2d930b,_0x4a6caa)=>_0x16416e(_0x2d930b,_0x4a6caa,_0x177fe3);let _=class extends _0x12c7bd{constructor(_0x8914b9,_0x4941dc,_0xc00740,_0x1b8e38){const _0x4bc2d9=_0x5217f6;super(),this['_commentService']=_0x8914b9,this[_0x4bc2d9(0x1ff)]=_0x4941dc,this[_0x4bc2d9(0x1c7)]=_0xc00740,this['_injector']=_0x1b8e38,this[_0x4bc2d9(0x216)](),this[_0x4bc2d9(0x210)]();}[_0x5217f6(0x210)](){const _0x4880c5=_0x5217f6;this[_0x4880c5(0x21e)](this[_0x4880c5(0x1ff)][_0x4880c5(0x1cb)][_0x4880c5(0x1cd)](_0x57ac75(0x10))[_0x4880c5(0x202)](_0x845ee9=>{const _0x31f459=_0x4880c5,_0x2afdba=new Set();_0x845ee9[_0x31f459(0x1c4)](_0x551cff=>{const _0x40a84e=_0x31f459;switch(_0x551cff[_0x40a84e(0x1ba)]){case _0x40a84e(0x1df):{const _0x3fcef2=_0x551cff[_0x40a84e(0x1ea)]['personId'];_0x2afdba['add'](_0x3fcef2);break;}}}),B(this[_0x31f459(0x1fe)],_0x2afdba);}));}[_0x5217f6(0x216)](){const _0x1d1462=_0x5217f6;this[_0x1d1462(0x21e)](this[_0x1d1462(0x1d7)][_0x1d1462(0x1cb)][_0x1d1462(0x202)](async _0x1f8ce2=>{const _0x4ff678=_0x1d1462;var _0x3157ea,_0x44fdeb,_0x56557f,_0x26655a;const _0xf9049a=(_0x3157ea=this[_0x4ff678(0x1ff)][_0x4ff678(0x1bd)](_0x1f8ce2[_0x4ff678(0x1cf)])[_0x4ff678(0x20e)](_0x232fdb=>_0x232fdb[_0x4ff678(0x218)]===_0x1f8ce2['threadId']))==null?void 0x0:_0x3157ea[_0x4ff678(0x1eb)];if(!_0xf9049a)return;const {unitId:_0x4c5981,subUnitId:_0x1c417e}=_0xf9049a;switch(_0x1f8ce2['user']&&this[_0x4ff678(0x1c7)][_0x4ff678(0x21c)](_0x1f8ce2[_0x4ff678(0x1ee)]),_0x1f8ce2[_0x4ff678(0x1ba)]){case v[_0x4ff678(0x209)]:break;case v[_0x4ff678(0x1ca)]:{this[_0x4ff678(0x1ff)]['addComment'](_0x4c5981,_0x1c417e,{'unitId':_0x4c5981,'subUnitId':_0x1c417e,'ref':'','id':_0x1f8ce2[_0x4ff678(0x1f6)],'dT':y(+_0x1f8ce2[_0x4ff678(0x1d3)]),'threadId':_0x1f8ce2[_0x4ff678(0x218)],'personId':(_0x56557f=(_0x44fdeb=_0x1f8ce2[_0x4ff678(0x1ee)])==null?void 0x0:_0x44fdeb[_0x4ff678(0x1fa)])!=null?_0x56557f:_0x1f8ce2[_0x4ff678(0x200)],'text':JSON[_0x4ff678(0x1e4)](_0x1f8ce2[_0x4ff678(0x1c8)]),'parentId':_0xf9049a['id']});break;}case v[_0x4ff678(0x1e9)]:{const _0x4da42d=this[_0x4ff678(0x1ff)][_0x4ff678(0x21a)](_0x4c5981,_0x1c417e,_0x1f8ce2['replyId']);_0x4da42d&&_0x4da42d[_0x4ff678(0x207)]&&this[_0x4ff678(0x1ff)][_0x4ff678(0x20b)](_0x4c5981,_0x1c417e,_0x1f8ce2[_0x4ff678(0x1f6)]);break;}case v[_0x4ff678(0x1e2)]:{this[_0x4ff678(0x1ff)][_0x4ff678(0x1f4)](_0x4c5981,_0x1c417e,{'commentId':_0x1f8ce2[_0x4ff678(0x1f6)],'text':JSON[_0x4ff678(0x1e4)](_0x1f8ce2[_0x4ff678(0x1c8)])});break;}case v['Solve']:{const _0x5f48a0=(_0x26655a=this[_0x4ff678(0x1ff)][_0x4ff678(0x1bd)](_0x1f8ce2[_0x4ff678(0x1cf)])[_0x4ff678(0x20e)](_0x4c9c5a=>_0x4c9c5a[_0x4ff678(0x218)]===_0x1f8ce2['threadId']))==null?void 0x0:_0x26655a['root'];_0x5f48a0&&this['_threadCommentModel']['resolveComment'](_0x4c5981,_0x1c417e,_0x5f48a0['id'],_0x1f8ce2['solved']===I[_0x4ff678(0x1f8)]);break;}}}));}};_=V([p(0x0,_0x2c3e49(_0x51572b)),p(0x1,_0x2c3e49(_0x267e96)),p(0x2,_0x2c3e49(_0x3b92a5)),p(0x3,_0x2c3e49(_0x212dfe))],_);const z=_0x5217f6(0x21d),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x1ebdd3,_0x2be77c,_0x5f1bca,_0x234ada)=>{for(var _0x4ece15=_0x234ada>0x1?void 0x0:_0x234ada?k(_0x2be77c,_0x5f1bca):_0x2be77c,_0x5e5732=_0x1ebdd3['length']-0x1,_0x2c1b96;_0x5e5732>=0x0;_0x5e5732--)(_0x2c1b96=_0x1ebdd3[_0x5e5732])&&(_0x4ece15=_0x2c1b96(_0x4ece15)||_0x4ece15);return _0x4ece15;},b=(_0x2076a7,_0x3051e7)=>(_0x67ff0b,_0x2b3c51)=>_0x3051e7(_0x67ff0b,_0x2b3c51,_0x2076a7);function _0x46e1(_0x13f753,_0x23b17a){const _0x3d63a0=_0x3d63();return _0x46e1=function(_0x46e1e1,_0x3787ef){_0x46e1e1=_0x46e1e1-0x1b9;let _0x41597a=_0x3d63a0[_0x46e1e1];return _0x41597a;},_0x46e1(_0x13f753,_0x23b17a);}function X(_0x4cd29b,_0x3b50ad){const _0x5064e9=_0x5217f6,_0x12e025=_0x4cd29b['replies'][0x0];return{..._0x3b50ad,'id':_0x12e025[_0x5064e9(0x1f6)],'resolved':_0x4cd29b[_0x5064e9(0x1d4)]===0x1,'dT':y(_0x12e025['createTimestamp']),'personId':_0x12e025[_0x5064e9(0x200)],'threadId':_0x12e025['threadId']};}function ee(_0x1f01b3,_0x33701c,_0x5eff72){const _0xc15393=_0x5217f6;var _0x50a6b7,_0x3edf60;if(((_0x3edf60=(_0x50a6b7=_0x1f01b3==null?void 0x0:_0x1f01b3[_0xc15393(0x208)])==null?void 0x0:_0x50a6b7[_0xc15393(0x214)])!=null?_0x3edf60:0x0)>0x0){const _0x1a2af4=(_0x4ba215,_0x5abf90)=>({'id':_0x4ba215[_0xc15393(0x1f6)],'threadId':_0x4ba215[_0xc15393(0x218)],'dT':y(_0x4ba215[_0xc15393(0x1d3)]),'personId':_0x4ba215['userId'],'resolved':_0x1f01b3['solved']===I[_0xc15393(0x1f8)],'unitId':_0x33701c,'subUnitId':_0x5eff72,'text':JSON[_0xc15393(0x1e4)](_0x4ba215[_0xc15393(0x1c8)]),'parentId':_0x5abf90}),_0x51c8d4=_0x1a2af4(_0x1f01b3[_0xc15393(0x208)][0x0]);return{..._0x51c8d4,'children':_0x1f01b3['replies'][_0xc15393(0x1bb)](0x1)[_0xc15393(0x212)](_0x519daa=>_0x1a2af4(_0x519daa,_0x51c8d4['id']))};}return null;}let S=class{constructor(_0x56290a,_0x2938c5,_0x21731b){const _0x53b944=_0x5217f6;this[_0x53b944(0x1e0)]=_0x56290a,this[_0x53b944(0x1c7)]=_0x2938c5,this['_sessionService']=_0x21731b;}async[_0x5217f6(0x1d2)](_0x228790){const _0x108f86=_0x5217f6;var _0x744c78,_0x76eb95;const {parentId:_0x1e679c,unitId:_0x2ae555,text:_0x376cac,threadId:_0xa58f7e}=_0x228790,_0x490cef=(_0x76eb95=(_0x744c78=_0x376cac[_0x108f86(0x1d9)])==null?void 0x0:_0x744c78[_0x108f86(0x1ce)](_0x1d86ef=>_0x1d86ef[_0x108f86(0x21f)]===_0x29b135[_0x108f86(0x1ef)])[_0x108f86(0x212)](_0x5d47c3=>_0x5d47c3[_0x108f86(0x1f5)]))!=null?_0x76eb95:[],_0x2a0cfc=JSON[_0x108f86(0x1cc)](_0x376cac),_0x20c200=(await this[_0x108f86(0x1dc)]['requireSession'](_0x2ae555))[_0x108f86(0x1d1)]();if(_0x1e679c){const _0xf3d7e9={'memberId':_0x20c200,'unitId':_0x2ae555,'content':_0x2a0cfc,'mention':_0x490cef,'threadId':_0xa58f7e},_0x2a6785=(await this['_httpService'][_0x108f86(0x20c)](_0x108f86(0x219)+_0x2ae555+'/reply',{'body':_0xf3d7e9}))[_0x108f86(0x1e7)][_0x108f86(0x1f2)];return{..._0x228790,'id':_0x2a6785['replyId'],'dT':_0x564153(+_0x2a6785[_0x108f86(0x1d3)])[_0x108f86(0x217)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x2a6785[_0x108f86(0x200)]};}else{const _0x2fbcf6={'memberId':_0x20c200,'unitId':_0x2ae555,'content':_0x2a0cfc,'mention':_0x490cef},_0xe31fb9=await this[_0x108f86(0x1e0)]['post'](_0x108f86(0x219)+_0x2ae555+_0x108f86(0x215),{'body':_0x2fbcf6});return X(_0xe31fb9['body'][_0x108f86(0x1c3)],_0x228790);}}async[_0x5217f6(0x1f4)](_0x45d234){const _0x274e65=_0x5217f6;var _0x42b779,_0x55ac9b;const {text:_0x3ee27d,unitId:_0x4011c4}=_0x45d234,_0x31cc13=(_0x55ac9b=(_0x42b779=_0x3ee27d[_0x274e65(0x1d9)])==null?void 0x0:_0x42b779[_0x274e65(0x1ce)](_0x4b7ec9=>_0x4b7ec9['rangeType']===_0x29b135[_0x274e65(0x1ef)])['map'](_0x43820b=>_0x43820b[_0x274e65(0x1f5)]))!=null?_0x55ac9b:[],_0x4229ca=JSON['stringify'](_0x3ee27d),_0x2454ca=_0x45d234[_0x274e65(0x218)],_0xae0006=_0x45d234['id'],_0x2a4104={'memberId':(await this[_0x274e65(0x1dc)][_0x274e65(0x1de)](_0x4011c4))[_0x274e65(0x1d1)](),'unitId':_0x4011c4,'threadId':_0x2454ca,'mention':_0x31cc13,'content':_0x4229ca,'replyId':_0xae0006},_0x4eb718=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x4011c4+'/edit',{'body':_0x2a4104});return!_0x4eb718['body'][_0x274e65(0x1f1)]||_0x4eb718[_0x274e65(0x1e7)]['error'][_0x274e65(0x21b)]===0x1;}async[_0x5217f6(0x1da)](_0x295c03){const _0x36a4b4=_0x5217f6,{unitId:_0x22f4df}=_0x295c03,_0x3f6e2f=_0x295c03[_0x36a4b4(0x218)],_0x1235ac={'memberId':this[_0x36a4b4(0x1c7)][_0x36a4b4(0x1fd)]()[_0x36a4b4(0x1fa)],'unitId':_0x22f4df,'threadId':_0x3f6e2f,'solved':_0x295c03['resolved']?I[_0x36a4b4(0x1f8)]:I[_0x36a4b4(0x213)]},_0x28d2d6=await this[_0x36a4b4(0x1e0)][_0x36a4b4(0x20c)](_0x36a4b4(0x219)+_0x22f4df+_0x36a4b4(0x1fb),{'body':_0x1235ac});return!_0x28d2d6[_0x36a4b4(0x1e7)][_0x36a4b4(0x1f1)]||_0x28d2d6['body'][_0x36a4b4(0x1f1)][_0x36a4b4(0x21b)]===0x1;}async[_0x5217f6(0x20b)](_0x58b23f,_0x3432b5,_0x3677d1,_0x6a88d9){const _0x693924=_0x5217f6,_0x422775={'memberId':(await this[_0x693924(0x1dc)][_0x693924(0x1de)](_0x58b23f))[_0x693924(0x1d1)](),'threadId':_0x3677d1,'replyId':_0x6a88d9,'unitId':_0x58b23f},_0x429207=await this['_httpService'][_0x693924(0x20c)](_0x693924(0x219)+_0x58b23f+_0x693924(0x201),{'body':_0x422775});return!_0x429207[_0x693924(0x1e7)][_0x693924(0x1f1)]||_0x429207['body'][_0x693924(0x1f1)][_0x693924(0x21b)]===0x1;}async[_0x5217f6(0x1bc)](_0x3457d8,_0x4b9210,_0x3a2bd1){const _0x2232e3=_0x5217f6,_0x2651ed={'unitId':_0x3457d8,'threadId':_0x3a2bd1},_0x2da76d=await this['_httpService'][_0x2232e3(0x20c)]('/universer-api/comment/unit/'+_0x3457d8+_0x2232e3(0x203),{'body':_0x2651ed}),_0x314e5a=_0x3a2bd1[_0x2232e3(0x212)](_0x36382e=>ee(_0x2da76d[_0x2232e3(0x1e7)][_0x2232e3(0x1fc)][_0x36382e],_0x3457d8,_0x4b9210))[_0x2232e3(0x1ce)](Boolean);return Object['values'](_0x2da76d[_0x2232e3(0x1e7)]['users'])[_0x2232e3(0x1c4)](_0x2d5e37=>{const _0x34478f=_0x2232e3;this[_0x34478f(0x1c7)][_0x34478f(0x21c)](_0x2d5e37);}),_0x314e5a;}[_0x5217f6(0x1be)](_0x4d225b){const _0x260344=_0x5217f6;return{'id':_0x4d225b['id'],'threadId':_0x4d225b['threadId'],'ref':_0x4d225b[_0x260344(0x1e5)]};}};S=Q([b(0x0,_0x2c3e49(_0x2fdef9)),b(0x1,_0x2c3e49(_0x3b92a5)),b(0x2,_0x2c3e49(_0x53374a))],S);function _0x3d63(){const _0x4777e0=['add','_httpService','delete','Edit','3WxQitK','parse','ref','_initDataSource','body','UNRECOGNIZED','Delete','payload','root','defineProperty','symbol','user','COMMENT','_configService','error','reply','1409570foznvy','updateComment','rangeId','replyId','UNIVER_UNKNOWN','Solved','3354uswTPl','userID','/solved','comments','getCurrentUser','_injector','_threadCommentModel','userId','/delete','subscribe','/list','getUser','60TqKGJi','698287YVwflq','parentId','replies','Add','syncUpdateMutationToColla','deleteComment','post','YYYY/MM/DD\x20HH:mm','find','onReady','_initUserSync','366759tujEqg','map','OpenOrReOpen','length','/add','_init','format','threadId','/universer-api/comment/unit/','getComment','code','addUser','thread-comment-data-source.config','disposeWithMe','rangeType','/universer-api/user/list','Solve','type','slice','listComments','getUnit','saveCommentToSnapshot','getOwnPropertyDescriptor','dataSource','1284808KAXtDx','get','comment','forEach','_config','setConfig','_userService','content','_threadCommentDataSource','Reply','commentUpdate$','stringify','pipe','filter','unitId','onStarting','getMemberID','addComment','createTimestamp','solved','6467488QvRrrv','1745TIhTDc','_commentService','_threadCommentDataSourceService','customRanges','resolveComment','83244bMdlsB','_sessionService','size','requireSession'];_0x3d63=function(){return _0x4777e0;};return _0x3d63();}var re=Object[_0x5217f6(0x1bf)],te=(_0x471b37,_0x1e0152,_0x51373c,_0x3d3dfd)=>{const _0x39abf7=_0x5217f6;for(var _0x2a55ff=_0x3d3dfd>0x1?void 0x0:_0x3d3dfd?re(_0x1e0152,_0x51373c):_0x1e0152,_0x23e9b3=_0x471b37[_0x39abf7(0x214)]-0x1,_0x35bef2;_0x23e9b3>=0x0;_0x23e9b3--)(_0x35bef2=_0x471b37[_0x23e9b3])&&(_0x2a55ff=_0x35bef2(_0x2a55ff)||_0x2a55ff);return _0x2a55ff;},M=(_0x2e786b,_0x4637a9)=>(_0x18bca9,_0x208798)=>_0x4637a9(_0x18bca9,_0x208798,_0x2e786b);let f=class extends _0x12c7bd{constructor(_0x7bcd1a,_0x2c709d){const _0x27808e=_0x5217f6;super(),this['_threadCommentDataSourceService']=_0x7bcd1a,this[_0x27808e(0x1c9)]=_0x2c709d,this[_0x27808e(0x1e6)]();}['_initDataSource'](){const _0x2e4f16=_0x5217f6;this[_0x2e4f16(0x1d8)][_0x2e4f16(0x1c0)]=this[_0x2e4f16(0x1c9)],this[_0x2e4f16(0x1d8)][_0x2e4f16(0x20a)]=!0x1;}};f=te([M(0x0,_0x209dac),M(0x1,_0x2c3e49(S))],f);var se=Object[_0x5217f6(0x1ec)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x49be57,_0x1a5a71,_0x48f653)=>_0x1a5a71 in _0x49be57?se(_0x49be57,_0x1a5a71,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x48f653}):_0x49be57[_0x1a5a71]=_0x48f653,ie=(_0x3808e5,_0x20b569,_0x3c7274,_0x4c2a3b)=>{const _0x1fd0a1=_0x5217f6;for(var _0x19186f=_0x4c2a3b>0x1?void 0x0:_0x4c2a3b?oe(_0x20b569,_0x3c7274):_0x20b569,_0x60ac64=_0x3808e5[_0x1fd0a1(0x214)]-0x1,_0x408703;_0x60ac64>=0x0;_0x60ac64--)(_0x408703=_0x3808e5[_0x60ac64])&&(_0x19186f=_0x408703(_0x19186f)||_0x19186f);return _0x19186f;},N=(_0x3cccba,_0x2f7687)=>(_0xe5652b,_0x394add)=>_0x2f7687(_0xe5652b,_0x394add,_0x3cccba),$=(_0x1cef2a,_0x26522e,_0x4f7552)=>ne(_0x1cef2a,typeof _0x26522e!=_0x5217f6(0x1ed)?_0x26522e+'':_0x26522e,_0x4f7552);let g=class extends _0x4954dd{constructor(_0x1123e5=O,_0x4223fa,_0x29be50){const _0x208f40=_0x5217f6;super(),this['_config']=_0x1123e5,this[_0x208f40(0x1fe)]=_0x4223fa,this['_configService']=_0x29be50;const {..._0x1978c2}=_0x5a4b2a({},O,this[_0x208f40(0x1c5)]);this[_0x208f40(0x1f0)][_0x208f40(0x1c6)](z,_0x1978c2);}[_0x5217f6(0x1d0)](){const _0x58dff6=_0x5217f6;[[S],[f],[_]][_0x58dff6(0x1c4)](_0x266af4=>{const _0x2026a7=_0x58dff6;this['_injector'][_0x2026a7(0x1df)](_0x266af4);});}[_0x5217f6(0x20f)](){const _0x3271dc=_0x5217f6;this[_0x3271dc(0x1fe)][_0x3271dc(0x1c2)](f),this[_0x3271dc(0x1fe)]['get'](_);}};$(g,'pluginName',W),$(g,_0x5217f6(0x1ba),_0x2bdb63[_0x5217f6(0x1f7)]),g=ie([_0x31e70c(_0x3c7c4c,_0x2e346e,_0x1090de),N(0x1,_0x2c3e49(_0x212dfe)),N(0x2,_0x3ed13f)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x59ea57=_0x264e;function _0x264e(_0x359968,_0x411b3){const _0x7619d4=_0x7619();return _0x264e=function(_0x264ef0,_0x15444f){_0x264ef0=_0x264ef0-0x16e;let _0x2aaf03=_0x7619d4[_0x264ef0];return _0x2aaf03;},_0x264e(_0x359968,_0x411b3);}(function(_0x1f465c,_0x3b303){const _0xdc7ff7=_0x264e,_0x1dc9f3=_0x1f465c();while(!![]){try{const _0x538dba=parseInt(_0xdc7ff7(0x1b4))/0x1+parseInt(_0xdc7ff7(0x1ca))/0x2+parseInt(_0xdc7ff7(0x1b3))/0x3+parseInt(_0xdc7ff7(0x1bd))/0x4+-parseInt(_0xdc7ff7(0x1c4))/0x5+-parseInt(_0xdc7ff7(0x1b8))/0x6*(parseInt(_0xdc7ff7(0x1a1))/0x7)+-parseInt(_0xdc7ff7(0x174))/0x8*(-parseInt(_0xdc7ff7(0x172))/0x9);if(_0x538dba===_0x3b303)break;else _0x1dc9f3['push'](_0x1dc9f3['shift']());}catch(_0x483c7d){_0x1dc9f3['push'](_0x1dc9f3['shift']());}}}(_0x7619,0x4e0d8));import{CommentService as _0x3cd1f3,CollaborationSessionService as _0x250336,UniverCollaborationClientPlugin as _0x3f0de4}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x53e585}from'@univerjs-pro/license';import{dayjs as _0x30ebdb,UserManagerService as _0x11e1a7,Inject as _0x305425,Injector as _0x55b98c,Disposable as _0x3b5b07,CustomRangeType as _0x52cc13,UniverInstanceType as _0x1acf5a,DependentOn as _0x5f16f5,IConfigService as _0x1dbb73,Plugin as _0x465844,merge as _0x148cba}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x260dd3}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x43c617,IThreadCommentDataSourceService as _0x4e5a4c}from'@univerjs/thread-comment';import{bufferTime as _0x5376a3}from'rxjs';import{HTTPService as _0x4fcb94}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0xf85ada=>(_0xf85ada[_0xf85ada[_0x59ea57(0x182)]=0x0]=_0x59ea57(0x182),_0xf85ada[_0xf85ada[_0x59ea57(0x1b2)]=0x1]=_0x59ea57(0x1b2),_0xf85ada[_0xf85ada[_0x59ea57(0x1d0)]=-0x1]=_0x59ea57(0x1d0),_0xf85ada))(I||{}),v=(_0x4ea0ac=>(_0x4ea0ac[_0x4ea0ac[_0x59ea57(0x1ba)]=0x0]=_0x59ea57(0x1ba),_0x4ea0ac[_0x4ea0ac[_0x59ea57(0x1cc)]=0x1]=_0x59ea57(0x1cc),_0x4ea0ac[_0x4ea0ac[_0x59ea57(0x1d1)]=0x2]=_0x59ea57(0x1d1),_0x4ea0ac[_0x4ea0ac[_0x59ea57(0x1a5)]=0x3]=_0x59ea57(0x1a5),_0x4ea0ac[_0x4ea0ac[_0x59ea57(0x19e)]=0x4]=_0x59ea57(0x19e),_0x4ea0ac[_0x4ea0ac[_0x59ea57(0x1a3)]=0x5]=_0x59ea57(0x1a3),_0x4ea0ac[_0x4ea0ac[_0x59ea57(0x1d0)]=-0x1]='UNRECOGNIZED',_0x4ea0ac))(v||{});const y=_0x52eb61=>_0x30ebdb(new Date(+_0x52eb61))[_0x59ea57(0x176)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x463959,_0xc06963)=>{const _0x27d60f=_0x59ea57,_0x36c378=_0x463959[_0x27d60f(0x1cf)](_0x11e1a7),_0x344afa=_0x463959['get'](_0x4fcb94);_0xc06963[_0x27d60f(0x185)](_0xc43dd4=>{const _0x3aeff7=_0x27d60f;_0x36c378[_0x3aeff7(0x18b)](_0xc43dd4)&&_0xc06963[_0x3aeff7(0x195)](_0xc43dd4);}),_0xc06963[_0x27d60f(0x183)]&&(await _0x344afa[_0x27d60f(0x1cf)](_0x27d60f(0x1ab),{'params':{'userIDs':[..._0xc06963]}}))[_0x27d60f(0x19c)][_0x27d60f(0x197)]['forEach'](_0x58ee22=>{const _0x25ef9c=_0x27d60f;_0x58ee22&&_0x36c378[_0x25ef9c(0x1c1)](_0x58ee22);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x2e5a42,_0x505724,_0x3a9326,_0x4cbdb0)=>{const _0x1ec23e=_0x59ea57;for(var _0x4c9b72=_0x4cbdb0>0x1?void 0x0:_0x4cbdb0?K(_0x505724,_0x3a9326):_0x505724,_0x5e4417=_0x2e5a42[_0x1ec23e(0x1b1)]-0x1,_0x19900f;_0x5e4417>=0x0;_0x5e4417--)(_0x19900f=_0x2e5a42[_0x5e4417])&&(_0x4c9b72=_0x19900f(_0x4c9b72)||_0x4c9b72);return _0x4c9b72;},p=(_0x266256,_0x149c7c)=>(_0x1a89f9,_0x2c6fe7)=>_0x149c7c(_0x1a89f9,_0x2c6fe7,_0x266256);let _=class extends _0x3b5b07{constructor(_0x180cbb,_0x4b7acb,_0x31e234,_0x519c8a){const _0xbe32b5=_0x59ea57;super(),this['_commentService']=_0x180cbb,this['_threadCommentModel']=_0x4b7acb,this[_0xbe32b5(0x1c5)]=_0x31e234,this[_0xbe32b5(0x1b0)]=_0x519c8a,this[_0xbe32b5(0x193)](),this[_0xbe32b5(0x17e)]();}[_0x59ea57(0x17e)](){const _0x1c963e=_0x59ea57;this['disposeWithMe'](this[_0x1c963e(0x1c6)][_0x1c963e(0x1c2)][_0x1c963e(0x171)](_0x5376a3(0x10))[_0x1c963e(0x1a4)](_0x2ab37e=>{const _0x351837=_0x1c963e,_0x279584=new Set();_0x2ab37e['forEach'](_0x267458=>{const _0x2dc0a6=_0x264e;switch(_0x267458['type']){case'add':{const _0x515725=_0x267458['payload'][_0x2dc0a6(0x17a)];_0x279584[_0x2dc0a6(0x17c)](_0x515725);break;}}}),B(this[_0x351837(0x1b0)],_0x279584);}));}[_0x59ea57(0x193)](){const _0x5538fc=_0x59ea57;this[_0x5538fc(0x1cd)](this[_0x5538fc(0x190)]['commentUpdate$'][_0x5538fc(0x1a4)](async _0x44f446=>{const _0xb80720=_0x5538fc;var _0xff2834,_0x4bd814,_0x465202,_0x37673f;const _0x58025a=(_0xff2834=this[_0xb80720(0x1c6)][_0xb80720(0x191)](_0x44f446[_0xb80720(0x1ce)])['find'](_0x43a2b0=>_0x43a2b0['threadId']===_0x44f446[_0xb80720(0x1aa)]))==null?void 0x0:_0xff2834[_0xb80720(0x199)];if(!_0x58025a)return;const {unitId:_0x1251e5,subUnitId:_0xdcb03c}=_0x58025a;switch(_0x44f446[_0xb80720(0x1a9)]&&this[_0xb80720(0x1c5)]['addUser'](_0x44f446[_0xb80720(0x1a9)]),_0x44f446['type']){case v[_0xb80720(0x1cc)]:break;case v[_0xb80720(0x1d1)]:{this[_0xb80720(0x1c6)][_0xb80720(0x1c8)](_0x1251e5,_0xdcb03c,{'unitId':_0x1251e5,'subUnitId':_0xdcb03c,'ref':'','id':_0x44f446[_0xb80720(0x1d3)],'dT':y(+_0x44f446['createTimestamp']),'threadId':_0x44f446[_0xb80720(0x1aa)],'personId':(_0x465202=(_0x4bd814=_0x44f446[_0xb80720(0x1a9)])==null?void 0x0:_0x4bd814['userID'])!=null?_0x465202:_0x44f446[_0xb80720(0x1bc)],'text':JSON['parse'](_0x44f446['content']),'parentId':_0x58025a['id']});break;}case v[_0xb80720(0x19e)]:{const _0x3a966d=this[_0xb80720(0x1c6)]['getComment'](_0x1251e5,_0xdcb03c,_0x44f446[_0xb80720(0x1d3)]);_0x3a966d&&_0x3a966d[_0xb80720(0x1af)]&&this[_0xb80720(0x1c6)][_0xb80720(0x192)](_0x1251e5,_0xdcb03c,_0x44f446[_0xb80720(0x1d3)]);break;}case v['Edit']:{this[_0xb80720(0x1c6)][_0xb80720(0x181)](_0x1251e5,_0xdcb03c,{'commentId':_0x44f446['replyId'],'text':JSON[_0xb80720(0x1c0)](_0x44f446[_0xb80720(0x1bb)])});break;}case v[_0xb80720(0x1a3)]:{const _0x4313cc=(_0x37673f=this[_0xb80720(0x1c6)][_0xb80720(0x191)](_0x44f446[_0xb80720(0x1ce)])[_0xb80720(0x1a6)](_0xb94a3c=>_0xb94a3c[_0xb80720(0x1aa)]===_0x44f446[_0xb80720(0x1aa)]))==null?void 0x0:_0x37673f[_0xb80720(0x199)];_0x4313cc&&this[_0xb80720(0x1c6)][_0xb80720(0x19f)](_0x1251e5,_0xdcb03c,_0x4313cc['id'],_0x44f446['solved']===I[_0xb80720(0x1b2)]);break;}}}));}};_=V([p(0x0,_0x305425(_0x3cd1f3)),p(0x1,_0x305425(_0x43c617)),p(0x2,_0x305425(_0x11e1a7)),p(0x3,_0x305425(_0x55b98c))],_);const z=_0x59ea57(0x18a),O={};var k=Object[_0x59ea57(0x1b7)],Q=(_0x4414ef,_0x418a93,_0x433852,_0x4d2d5b)=>{for(var _0x5043d0=_0x4d2d5b>0x1?void 0x0:_0x4d2d5b?k(_0x418a93,_0x433852):_0x418a93,_0x32e476=_0x4414ef['length']-0x1,_0x4f3393;_0x32e476>=0x0;_0x32e476--)(_0x4f3393=_0x4414ef[_0x32e476])&&(_0x5043d0=_0x4f3393(_0x5043d0)||_0x5043d0);return _0x5043d0;},b=(_0x2d3e20,_0x10368b)=>(_0x41b6cd,_0x11d852)=>_0x10368b(_0x41b6cd,_0x11d852,_0x2d3e20);function X(_0x3bd5bf,_0x1aae86){const _0x55de61=_0x59ea57,_0x8c3315=_0x3bd5bf[_0x55de61(0x1ae)][0x0];return{..._0x1aae86,'id':_0x8c3315['replyId'],'resolved':_0x3bd5bf[_0x55de61(0x18f)]===0x1,'dT':y(_0x8c3315[_0x55de61(0x1b9)]),'personId':_0x8c3315[_0x55de61(0x1bc)],'threadId':_0x8c3315[_0x55de61(0x1aa)]};}function ee(_0x2e6878,_0x25c9de,_0x2c3112){const _0x537dea=_0x59ea57;var _0x4a6bed,_0x1f3183;if(((_0x1f3183=(_0x4a6bed=_0x2e6878==null?void 0x0:_0x2e6878['replies'])==null?void 0x0:_0x4a6bed['length'])!=null?_0x1f3183:0x0)>0x0){const _0x13edb9=(_0x1547cd,_0x54a702)=>({'id':_0x1547cd['replyId'],'threadId':_0x1547cd[_0x537dea(0x1aa)],'dT':y(_0x1547cd[_0x537dea(0x1b9)]),'personId':_0x1547cd[_0x537dea(0x1bc)],'resolved':_0x2e6878[_0x537dea(0x18f)]===I[_0x537dea(0x1b2)],'unitId':_0x25c9de,'subUnitId':_0x2c3112,'text':JSON[_0x537dea(0x1c0)](_0x1547cd[_0x537dea(0x1bb)]),'parentId':_0x54a702}),_0x337bc1=_0x13edb9(_0x2e6878[_0x537dea(0x1ae)][0x0]);return{..._0x337bc1,'children':_0x2e6878[_0x537dea(0x1ae)][_0x537dea(0x1ad)](0x1)[_0x537dea(0x1ac)](_0x482275=>_0x13edb9(_0x482275,_0x337bc1['id']))};}return null;}let S=class{constructor(_0xd4a196,_0x2e6c75,_0x32deab){const _0x5ceab4=_0x59ea57;this[_0x5ceab4(0x16f)]=_0xd4a196,this[_0x5ceab4(0x1c5)]=_0x2e6c75,this['_sessionService']=_0x32deab;}async[_0x59ea57(0x1c8)](_0x509388){const _0x4ce1db=_0x59ea57;var _0x190b80,_0x5d7e9b;const {parentId:_0x40412d,unitId:_0x39f96b,text:_0x5450a4,threadId:_0x2c5143}=_0x509388,_0xb94365=(_0x5d7e9b=(_0x190b80=_0x5450a4['customRanges'])==null?void 0x0:_0x190b80[_0x4ce1db(0x17b)](_0x87eb07=>_0x87eb07['rangeType']===_0x52cc13[_0x4ce1db(0x186)])['map'](_0x7a4d19=>_0x7a4d19[_0x4ce1db(0x189)]))!=null?_0x5d7e9b:[],_0x2917ca=JSON[_0x4ce1db(0x1c3)](_0x5450a4),_0x37b411=(await this[_0x4ce1db(0x1be)][_0x4ce1db(0x196)](_0x39f96b))[_0x4ce1db(0x1b5)]();if(_0x40412d){const _0x3cb96d={'memberId':_0x37b411,'unitId':_0x39f96b,'content':_0x2917ca,'mention':_0xb94365,'threadId':_0x2c5143},_0x1550cb=(await this['_httpService'][_0x4ce1db(0x184)](_0x4ce1db(0x1cb)+_0x39f96b+_0x4ce1db(0x1b6),{'body':_0x3cb96d}))[_0x4ce1db(0x19c)][_0x4ce1db(0x178)];return{..._0x509388,'id':_0x1550cb[_0x4ce1db(0x1d3)],'dT':_0x30ebdb(+_0x1550cb[_0x4ce1db(0x1b9)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x1550cb[_0x4ce1db(0x1bc)]};}else{const _0x39a8fe={'memberId':_0x37b411,'unitId':_0x39f96b,'content':_0x2917ca,'mention':_0xb94365},_0x296fab=await this['_httpService'][_0x4ce1db(0x184)](_0x4ce1db(0x1cb)+_0x39f96b+_0x4ce1db(0x1c9),{'body':_0x39a8fe});return X(_0x296fab[_0x4ce1db(0x19c)][_0x4ce1db(0x17d)],_0x509388);}}async[_0x59ea57(0x181)](_0x5a2659){const _0x4f3961=_0x59ea57;var _0x26b8c6,_0x2fc754;const {text:_0x54fae8,unitId:_0x33630b}=_0x5a2659,_0x635e11=(_0x2fc754=(_0x26b8c6=_0x54fae8[_0x4f3961(0x175)])==null?void 0x0:_0x26b8c6[_0x4f3961(0x17b)](_0x358c60=>_0x358c60[_0x4f3961(0x1a2)]===_0x52cc13[_0x4f3961(0x186)])[_0x4f3961(0x1ac)](_0x276776=>_0x276776[_0x4f3961(0x189)]))!=null?_0x2fc754:[],_0x339f28=JSON[_0x4f3961(0x1c3)](_0x54fae8),_0x11e090=_0x5a2659[_0x4f3961(0x1aa)],_0x17c5e7=_0x5a2659['id'],_0x4f4296={'memberId':(await this['_sessionService'][_0x4f3961(0x196)](_0x33630b))['getMemberID'](),'unitId':_0x33630b,'threadId':_0x11e090,'mention':_0x635e11,'content':_0x339f28,'replyId':_0x17c5e7},_0x296ed3=await this['_httpService'][_0x4f3961(0x184)](_0x4f3961(0x1cb)+_0x33630b+_0x4f3961(0x180),{'body':_0x4f4296});return!_0x296ed3['body']['error']||_0x296ed3['body']['error'][_0x4f3961(0x1c7)]===0x1;}async['resolveComment'](_0xd27023){const _0x3f427d=_0x59ea57,{unitId:_0x59457b}=_0xd27023,_0x46e734=_0xd27023[_0x3f427d(0x1aa)],_0x50a8f7={'memberId':this[_0x3f427d(0x1c5)][_0x3f427d(0x19d)]()[_0x3f427d(0x173)],'unitId':_0x59457b,'threadId':_0x46e734,'solved':_0xd27023['resolved']?I[_0x3f427d(0x1b2)]:I[_0x3f427d(0x182)]},_0x4e4ec7=await this[_0x3f427d(0x16f)]['post'](_0x3f427d(0x1cb)+_0x59457b+'/solved',{'body':_0x50a8f7});return!_0x4e4ec7[_0x3f427d(0x19c)]['error']||_0x4e4ec7[_0x3f427d(0x19c)]['error'][_0x3f427d(0x1c7)]===0x1;}async[_0x59ea57(0x192)](_0x1e31d1,_0x1c21ed,_0x258733,_0x1e8ee2){const _0xeafe29=_0x59ea57,_0x267288={'memberId':(await this['_sessionService']['requireSession'](_0x1e31d1))[_0xeafe29(0x1b5)](),'threadId':_0x258733,'replyId':_0x1e8ee2,'unitId':_0x1e31d1},_0x282b85=await this['_httpService'][_0xeafe29(0x184)](_0xeafe29(0x1cb)+_0x1e31d1+_0xeafe29(0x18c),{'body':_0x267288});return!_0x282b85[_0xeafe29(0x19c)][_0xeafe29(0x179)]||_0x282b85[_0xeafe29(0x19c)][_0xeafe29(0x179)]['code']===0x1;}async[_0x59ea57(0x170)](_0xecbe23,_0x139476,_0xc2f44e){const _0x31b2f8=_0x59ea57,_0x5445ae={'unitId':_0xecbe23,'threadId':_0xc2f44e},_0xc88335=await this['_httpService'][_0x31b2f8(0x184)]('/universer-api/comment/unit/'+_0xecbe23+_0x31b2f8(0x187),{'body':_0x5445ae}),_0x44e8a0=_0xc2f44e[_0x31b2f8(0x1ac)](_0x45a7c1=>ee(_0xc88335[_0x31b2f8(0x19c)][_0x31b2f8(0x18d)][_0x45a7c1],_0xecbe23,_0x139476))['filter'](Boolean);return Object['values'](_0xc88335['body'][_0x31b2f8(0x197)])[_0x31b2f8(0x185)](_0x33241c=>{const _0x334e38=_0x31b2f8;this['_userService'][_0x334e38(0x1c1)](_0x33241c);}),_0x44e8a0;}[_0x59ea57(0x19b)](_0x2accbb){const _0x5c4543=_0x59ea57;return{'id':_0x2accbb['id'],'threadId':_0x2accbb[_0x5c4543(0x1aa)],'ref':_0x2accbb[_0x5c4543(0x17f)]};}};function _0x7619(){const _0xb92e9c=['user','threadId','/universer-api/user/list','map','slice','replies','parentId','_injector','length','Solved','648744pchXYX','241366sZmiDl','getMemberID','/reply','getOwnPropertyDescriptor','192150lcNakw','createTimestamp','Unknown','content','userId','1897176okHVAa','_sessionService','type','parse','addUser','commentUpdate$','stringify','2814485mmSRJs','_userService','_threadCommentModel','code','addComment','/add','465450ZLrGIX','/universer-api/comment/unit/','Add','disposeWithMe','unitId','get','UNRECOGNIZED','Reply','onStarting','replyId','defineProperty','_httpService','listComments','pipe','632187rayOhg','userID','8SZaTuj','customRanges','format','_configService','reply','error','personId','filter','add','comment','_initUserSync','ref','/edit','updateComment','OpenOrReOpen','size','post','forEach','COMMENT','/list','symbol','rangeId','thread-comment-data-source.config','getUser','/delete','comments','pluginName','solved','_commentService','getUnit','deleteComment','_init','_threadCommentDataSourceService','delete','requireSession','users','_threadCommentDataSource','root','syncUpdateMutationToColla','saveCommentToSnapshot','body','getCurrentUser','Delete','resolveComment','_initDataSource','77XeUbbE','rangeType','Solve','subscribe','Edit','find','_config','UNIVER_UNKNOWN'];_0x7619=function(){return _0xb92e9c;};return _0x7619();}S=Q([b(0x0,_0x305425(_0x4fcb94)),b(0x1,_0x305425(_0x11e1a7)),b(0x2,_0x305425(_0x250336))],S);var re=Object[_0x59ea57(0x1b7)],te=(_0x316dfd,_0x570ad9,_0x291029,_0x10a655)=>{const _0x56e817=_0x59ea57;for(var _0xa60318=_0x10a655>0x1?void 0x0:_0x10a655?re(_0x570ad9,_0x291029):_0x570ad9,_0x210d36=_0x316dfd[_0x56e817(0x1b1)]-0x1,_0x5b6d7c;_0x210d36>=0x0;_0x210d36--)(_0x5b6d7c=_0x316dfd[_0x210d36])&&(_0xa60318=_0x5b6d7c(_0xa60318)||_0xa60318);return _0xa60318;},M=(_0x5a8ffe,_0x7b1d7c)=>(_0x730be2,_0x33f244)=>_0x7b1d7c(_0x730be2,_0x33f244,_0x5a8ffe);let f=class extends _0x3b5b07{constructor(_0x35e734,_0x207612){const _0x1c32a9=_0x59ea57;super(),this[_0x1c32a9(0x194)]=_0x35e734,this[_0x1c32a9(0x198)]=_0x207612,this[_0x1c32a9(0x1a0)]();}[_0x59ea57(0x1a0)](){const _0x2399f4=_0x59ea57;this[_0x2399f4(0x194)]['dataSource']=this[_0x2399f4(0x198)],this['_threadCommentDataSourceService'][_0x2399f4(0x19a)]=!0x1;}};f=te([M(0x0,_0x4e5a4c),M(0x1,_0x305425(S))],f);var se=Object[_0x59ea57(0x16e)],oe=Object[_0x59ea57(0x1b7)],ne=(_0x585d99,_0xb0bfd6,_0x4e5e26)=>_0xb0bfd6 in _0x585d99?se(_0x585d99,_0xb0bfd6,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4e5e26}):_0x585d99[_0xb0bfd6]=_0x4e5e26,ie=(_0x57f88b,_0x40ff86,_0x580d67,_0xabce1)=>{const _0x51fd5b=_0x59ea57;for(var _0x95fdfd=_0xabce1>0x1?void 0x0:_0xabce1?oe(_0x40ff86,_0x580d67):_0x40ff86,_0x13fe48=_0x57f88b[_0x51fd5b(0x1b1)]-0x1,_0x82b9e0;_0x13fe48>=0x0;_0x13fe48--)(_0x82b9e0=_0x57f88b[_0x13fe48])&&(_0x95fdfd=_0x82b9e0(_0x95fdfd)||_0x95fdfd);return _0x95fdfd;},N=(_0x4b1065,_0x55c98b)=>(_0x563a7e,_0x53df8c)=>_0x55c98b(_0x563a7e,_0x53df8c,_0x4b1065),$=(_0x3f0ec9,_0x4d5904,_0x3f5e43)=>ne(_0x3f0ec9,typeof _0x4d5904!=_0x59ea57(0x188)?_0x4d5904+'':_0x4d5904,_0x3f5e43);let g=class extends _0x465844{constructor(_0x414b94=O,_0x4ba7ed,_0x6b66d6){const _0x128580=_0x59ea57;super(),this[_0x128580(0x1a7)]=_0x414b94,this[_0x128580(0x1b0)]=_0x4ba7ed,this[_0x128580(0x177)]=_0x6b66d6;const {..._0x3b932c}=_0x148cba({},O,this[_0x128580(0x1a7)]);this['_configService']['setConfig'](z,_0x3b932c);}[_0x59ea57(0x1d2)](){[[S],[f],[_]]['forEach'](_0x147e24=>{const _0x4e12ee=_0x264e;this['_injector'][_0x4e12ee(0x17c)](_0x147e24);});}['onReady'](){const _0x4ee148=_0x59ea57;this[_0x4ee148(0x1b0)][_0x4ee148(0x1cf)](f),this[_0x4ee148(0x1b0)][_0x4ee148(0x1cf)](_);}};$(g,_0x59ea57(0x18e),W),$(g,_0x59ea57(0x1bf),_0x1acf5a[_0x59ea57(0x1a8)]),g=ie([_0x5f16f5(_0x260dd3,_0x3f0de4,_0x53e585),N(0x1,_0x305425(_0x55b98c)),N(0x2,_0x1dbb73)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x5217f6=_0x46e1;(function(_0x136ed1,_0x48d7dd){const _0x132085=_0x46e1,_0x379130=_0x136ed1();while(!![]){try{const _0x31df3b=parseInt(_0x132085(0x206))/0x1+-parseInt(_0x132085(0x1f3))/0x2+-parseInt(_0x132085(0x1e3))/0x3*(parseInt(_0x132085(0x1c1))/0x4)+parseInt(_0x132085(0x1d6))/0x5*(parseInt(_0x132085(0x1f9))/0x6)+parseInt(_0x132085(0x1db))/0x7+parseInt(_0x132085(0x1d5))/0x8+-parseInt(_0x132085(0x211))/0x9*(parseInt(_0x132085(0x205))/0xa);if(_0x31df3b===_0x48d7dd)break;else _0x379130['push'](_0x379130['shift']());}catch(_0x558070){_0x379130['push'](_0x379130['shift']());}}}(_0x3d63,0x6c34d));import{CommentService as _0x51572b,CollaborationSessionService as _0x53374a,UniverCollaborationClientPlugin as _0x2e346e}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1090de}from'@univerjs-pro/license';import{dayjs as _0x564153,UserManagerService as _0x3b92a5,Inject as _0x2c3e49,Injector as _0x212dfe,Disposable as _0x12c7bd,CustomRangeType as _0x29b135,UniverInstanceType as _0x2bdb63,DependentOn as _0x31e70c,IConfigService as _0x3ed13f,Plugin as _0x4954dd,merge as _0x5a4b2a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3c7c4c}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x267e96,IThreadCommentDataSourceService as _0x209dac}from'@univerjs/thread-comment';import{bufferTime as _0x57ac75}from'rxjs';import{HTTPService as _0x2fdef9}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x2d1a80=>(_0x2d1a80[_0x2d1a80['OpenOrReOpen']=0x0]=_0x5217f6(0x213),_0x2d1a80[_0x2d1a80[_0x5217f6(0x1f8)]=0x1]=_0x5217f6(0x1f8),_0x2d1a80[_0x2d1a80[_0x5217f6(0x1e8)]=-0x1]=_0x5217f6(0x1e8),_0x2d1a80))(I||{}),v=(_0x3d9884=>(_0x3d9884[_0x3d9884['Unknown']=0x0]='Unknown',_0x3d9884[_0x3d9884[_0x5217f6(0x209)]=0x1]=_0x5217f6(0x209),_0x3d9884[_0x3d9884[_0x5217f6(0x1ca)]=0x2]=_0x5217f6(0x1ca),_0x3d9884[_0x3d9884[_0x5217f6(0x1e2)]=0x3]=_0x5217f6(0x1e2),_0x3d9884[_0x3d9884['Delete']=0x4]=_0x5217f6(0x1e9),_0x3d9884[_0x3d9884[_0x5217f6(0x1b9)]=0x5]=_0x5217f6(0x1b9),_0x3d9884[_0x3d9884[_0x5217f6(0x1e8)]=-0x1]='UNRECOGNIZED',_0x3d9884))(v||{});const y=_0xb741b3=>_0x564153(new Date(+_0xb741b3))[_0x5217f6(0x217)](_0x5217f6(0x20d)),B=async(_0x4934be,_0x5a3cba)=>{const _0x482743=_0x5217f6,_0x50d590=_0x4934be['get'](_0x3b92a5),_0x2511a8=_0x4934be['get'](_0x2fdef9);_0x5a3cba[_0x482743(0x1c4)](_0x2b9f16=>{const _0x5ea147=_0x482743;_0x50d590[_0x5ea147(0x204)](_0x2b9f16)&&_0x5a3cba[_0x5ea147(0x1e1)](_0x2b9f16);}),_0x5a3cba[_0x482743(0x1dd)]&&(await _0x2511a8[_0x482743(0x1c2)](_0x482743(0x220),{'params':{'userIDs':[..._0x5a3cba]}}))[_0x482743(0x1e7)]['users']['forEach'](_0x57ad25=>{const _0x45bd0b=_0x482743;_0x57ad25&&_0x50d590[_0x45bd0b(0x21c)](_0x57ad25);});};var K=Object[_0x5217f6(0x1bf)],V=(_0x1942ab,_0x5bc842,_0x5d5385,_0x1dae7f)=>{const _0x313b33=_0x5217f6;for(var _0x17c7d5=_0x1dae7f>0x1?void 0x0:_0x1dae7f?K(_0x5bc842,_0x5d5385):_0x5bc842,_0x4923a6=_0x1942ab[_0x313b33(0x214)]-0x1,_0xe73dc0;_0x4923a6>=0x0;_0x4923a6--)(_0xe73dc0=_0x1942ab[_0x4923a6])&&(_0x17c7d5=_0xe73dc0(_0x17c7d5)||_0x17c7d5);return _0x17c7d5;},p=(_0x177fe3,_0x16416e)=>(_0x2d930b,_0x4a6caa)=>_0x16416e(_0x2d930b,_0x4a6caa,_0x177fe3);let _=class extends _0x12c7bd{constructor(_0x8914b9,_0x4941dc,_0xc00740,_0x1b8e38){const _0x4bc2d9=_0x5217f6;super(),this['_commentService']=_0x8914b9,this[_0x4bc2d9(0x1ff)]=_0x4941dc,this[_0x4bc2d9(0x1c7)]=_0xc00740,this['_injector']=_0x1b8e38,this[_0x4bc2d9(0x216)](),this[_0x4bc2d9(0x210)]();}[_0x5217f6(0x210)](){const _0x4880c5=_0x5217f6;this[_0x4880c5(0x21e)](this[_0x4880c5(0x1ff)][_0x4880c5(0x1cb)][_0x4880c5(0x1cd)](_0x57ac75(0x10))[_0x4880c5(0x202)](_0x845ee9=>{const _0x31f459=_0x4880c5,_0x2afdba=new Set();_0x845ee9[_0x31f459(0x1c4)](_0x551cff=>{const _0x40a84e=_0x31f459;switch(_0x551cff[_0x40a84e(0x1ba)]){case _0x40a84e(0x1df):{const _0x3fcef2=_0x551cff[_0x40a84e(0x1ea)]['personId'];_0x2afdba['add'](_0x3fcef2);break;}}}),B(this[_0x31f459(0x1fe)],_0x2afdba);}));}[_0x5217f6(0x216)](){const _0x1d1462=_0x5217f6;this[_0x1d1462(0x21e)](this[_0x1d1462(0x1d7)][_0x1d1462(0x1cb)][_0x1d1462(0x202)](async _0x1f8ce2=>{const _0x4ff678=_0x1d1462;var _0x3157ea,_0x44fdeb,_0x56557f,_0x26655a;const _0xf9049a=(_0x3157ea=this[_0x4ff678(0x1ff)][_0x4ff678(0x1bd)](_0x1f8ce2[_0x4ff678(0x1cf)])[_0x4ff678(0x20e)](_0x232fdb=>_0x232fdb[_0x4ff678(0x218)]===_0x1f8ce2['threadId']))==null?void 0x0:_0x3157ea[_0x4ff678(0x1eb)];if(!_0xf9049a)return;const {unitId:_0x4c5981,subUnitId:_0x1c417e}=_0xf9049a;switch(_0x1f8ce2['user']&&this[_0x4ff678(0x1c7)][_0x4ff678(0x21c)](_0x1f8ce2[_0x4ff678(0x1ee)]),_0x1f8ce2[_0x4ff678(0x1ba)]){case v[_0x4ff678(0x209)]:break;case v[_0x4ff678(0x1ca)]:{this[_0x4ff678(0x1ff)]['addComment'](_0x4c5981,_0x1c417e,{'unitId':_0x4c5981,'subUnitId':_0x1c417e,'ref':'','id':_0x1f8ce2[_0x4ff678(0x1f6)],'dT':y(+_0x1f8ce2[_0x4ff678(0x1d3)]),'threadId':_0x1f8ce2[_0x4ff678(0x218)],'personId':(_0x56557f=(_0x44fdeb=_0x1f8ce2[_0x4ff678(0x1ee)])==null?void 0x0:_0x44fdeb[_0x4ff678(0x1fa)])!=null?_0x56557f:_0x1f8ce2[_0x4ff678(0x200)],'text':JSON[_0x4ff678(0x1e4)](_0x1f8ce2[_0x4ff678(0x1c8)]),'parentId':_0xf9049a['id']});break;}case v[_0x4ff678(0x1e9)]:{const _0x4da42d=this[_0x4ff678(0x1ff)][_0x4ff678(0x21a)](_0x4c5981,_0x1c417e,_0x1f8ce2['replyId']);_0x4da42d&&_0x4da42d[_0x4ff678(0x207)]&&this[_0x4ff678(0x1ff)][_0x4ff678(0x20b)](_0x4c5981,_0x1c417e,_0x1f8ce2[_0x4ff678(0x1f6)]);break;}case v[_0x4ff678(0x1e2)]:{this[_0x4ff678(0x1ff)][_0x4ff678(0x1f4)](_0x4c5981,_0x1c417e,{'commentId':_0x1f8ce2[_0x4ff678(0x1f6)],'text':JSON[_0x4ff678(0x1e4)](_0x1f8ce2[_0x4ff678(0x1c8)])});break;}case v['Solve']:{const _0x5f48a0=(_0x26655a=this[_0x4ff678(0x1ff)][_0x4ff678(0x1bd)](_0x1f8ce2[_0x4ff678(0x1cf)])[_0x4ff678(0x20e)](_0x4c9c5a=>_0x4c9c5a[_0x4ff678(0x218)]===_0x1f8ce2['threadId']))==null?void 0x0:_0x26655a['root'];_0x5f48a0&&this['_threadCommentModel']['resolveComment'](_0x4c5981,_0x1c417e,_0x5f48a0['id'],_0x1f8ce2['solved']===I[_0x4ff678(0x1f8)]);break;}}}));}};_=V([p(0x0,_0x2c3e49(_0x51572b)),p(0x1,_0x2c3e49(_0x267e96)),p(0x2,_0x2c3e49(_0x3b92a5)),p(0x3,_0x2c3e49(_0x212dfe))],_);const z=_0x5217f6(0x21d),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x1ebdd3,_0x2be77c,_0x5f1bca,_0x234ada)=>{for(var _0x4ece15=_0x234ada>0x1?void 0x0:_0x234ada?k(_0x2be77c,_0x5f1bca):_0x2be77c,_0x5e5732=_0x1ebdd3['length']-0x1,_0x2c1b96;_0x5e5732>=0x0;_0x5e5732--)(_0x2c1b96=_0x1ebdd3[_0x5e5732])&&(_0x4ece15=_0x2c1b96(_0x4ece15)||_0x4ece15);return _0x4ece15;},b=(_0x2076a7,_0x3051e7)=>(_0x67ff0b,_0x2b3c51)=>_0x3051e7(_0x67ff0b,_0x2b3c51,_0x2076a7);function _0x46e1(_0x13f753,_0x23b17a){const _0x3d63a0=_0x3d63();return _0x46e1=function(_0x46e1e1,_0x3787ef){_0x46e1e1=_0x46e1e1-0x1b9;let _0x41597a=_0x3d63a0[_0x46e1e1];return _0x41597a;},_0x46e1(_0x13f753,_0x23b17a);}function X(_0x4cd29b,_0x3b50ad){const _0x5064e9=_0x5217f6,_0x12e025=_0x4cd29b['replies'][0x0];return{..._0x3b50ad,'id':_0x12e025[_0x5064e9(0x1f6)],'resolved':_0x4cd29b[_0x5064e9(0x1d4)]===0x1,'dT':y(_0x12e025['createTimestamp']),'personId':_0x12e025[_0x5064e9(0x200)],'threadId':_0x12e025['threadId']};}function ee(_0x1f01b3,_0x33701c,_0x5eff72){const _0xc15393=_0x5217f6;var _0x50a6b7,_0x3edf60;if(((_0x3edf60=(_0x50a6b7=_0x1f01b3==null?void 0x0:_0x1f01b3[_0xc15393(0x208)])==null?void 0x0:_0x50a6b7[_0xc15393(0x214)])!=null?_0x3edf60:0x0)>0x0){const _0x1a2af4=(_0x4ba215,_0x5abf90)=>({'id':_0x4ba215[_0xc15393(0x1f6)],'threadId':_0x4ba215[_0xc15393(0x218)],'dT':y(_0x4ba215[_0xc15393(0x1d3)]),'personId':_0x4ba215['userId'],'resolved':_0x1f01b3['solved']===I[_0xc15393(0x1f8)],'unitId':_0x33701c,'subUnitId':_0x5eff72,'text':JSON[_0xc15393(0x1e4)](_0x4ba215[_0xc15393(0x1c8)]),'parentId':_0x5abf90}),_0x51c8d4=_0x1a2af4(_0x1f01b3[_0xc15393(0x208)][0x0]);return{..._0x51c8d4,'children':_0x1f01b3['replies'][_0xc15393(0x1bb)](0x1)[_0xc15393(0x212)](_0x519daa=>_0x1a2af4(_0x519daa,_0x51c8d4['id']))};}return null;}let S=class{constructor(_0x56290a,_0x2938c5,_0x21731b){const _0x53b944=_0x5217f6;this[_0x53b944(0x1e0)]=_0x56290a,this[_0x53b944(0x1c7)]=_0x2938c5,this['_sessionService']=_0x21731b;}async[_0x5217f6(0x1d2)](_0x228790){const _0x108f86=_0x5217f6;var _0x744c78,_0x76eb95;const {parentId:_0x1e679c,unitId:_0x2ae555,text:_0x376cac,threadId:_0xa58f7e}=_0x228790,_0x490cef=(_0x76eb95=(_0x744c78=_0x376cac[_0x108f86(0x1d9)])==null?void 0x0:_0x744c78[_0x108f86(0x1ce)](_0x1d86ef=>_0x1d86ef[_0x108f86(0x21f)]===_0x29b135[_0x108f86(0x1ef)])[_0x108f86(0x212)](_0x5d47c3=>_0x5d47c3[_0x108f86(0x1f5)]))!=null?_0x76eb95:[],_0x2a0cfc=JSON[_0x108f86(0x1cc)](_0x376cac),_0x20c200=(await this[_0x108f86(0x1dc)]['requireSession'](_0x2ae555))[_0x108f86(0x1d1)]();if(_0x1e679c){const _0xf3d7e9={'memberId':_0x20c200,'unitId':_0x2ae555,'content':_0x2a0cfc,'mention':_0x490cef,'threadId':_0xa58f7e},_0x2a6785=(await this['_httpService'][_0x108f86(0x20c)](_0x108f86(0x219)+_0x2ae555+'/reply',{'body':_0xf3d7e9}))[_0x108f86(0x1e7)][_0x108f86(0x1f2)];return{..._0x228790,'id':_0x2a6785['replyId'],'dT':_0x564153(+_0x2a6785[_0x108f86(0x1d3)])[_0x108f86(0x217)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x2a6785[_0x108f86(0x200)]};}else{const _0x2fbcf6={'memberId':_0x20c200,'unitId':_0x2ae555,'content':_0x2a0cfc,'mention':_0x490cef},_0xe31fb9=await this[_0x108f86(0x1e0)]['post'](_0x108f86(0x219)+_0x2ae555+_0x108f86(0x215),{'body':_0x2fbcf6});return X(_0xe31fb9['body'][_0x108f86(0x1c3)],_0x228790);}}async[_0x5217f6(0x1f4)](_0x45d234){const _0x274e65=_0x5217f6;var _0x42b779,_0x55ac9b;const {text:_0x3ee27d,unitId:_0x4011c4}=_0x45d234,_0x31cc13=(_0x55ac9b=(_0x42b779=_0x3ee27d[_0x274e65(0x1d9)])==null?void 0x0:_0x42b779[_0x274e65(0x1ce)](_0x4b7ec9=>_0x4b7ec9['rangeType']===_0x29b135[_0x274e65(0x1ef)])['map'](_0x43820b=>_0x43820b[_0x274e65(0x1f5)]))!=null?_0x55ac9b:[],_0x4229ca=JSON['stringify'](_0x3ee27d),_0x2454ca=_0x45d234[_0x274e65(0x218)],_0xae0006=_0x45d234['id'],_0x2a4104={'memberId':(await this[_0x274e65(0x1dc)][_0x274e65(0x1de)](_0x4011c4))[_0x274e65(0x1d1)](),'unitId':_0x4011c4,'threadId':_0x2454ca,'mention':_0x31cc13,'content':_0x4229ca,'replyId':_0xae0006},_0x4eb718=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x4011c4+'/edit',{'body':_0x2a4104});return!_0x4eb718['body'][_0x274e65(0x1f1)]||_0x4eb718[_0x274e65(0x1e7)]['error'][_0x274e65(0x21b)]===0x1;}async[_0x5217f6(0x1da)](_0x295c03){const _0x36a4b4=_0x5217f6,{unitId:_0x22f4df}=_0x295c03,_0x3f6e2f=_0x295c03[_0x36a4b4(0x218)],_0x1235ac={'memberId':this[_0x36a4b4(0x1c7)][_0x36a4b4(0x1fd)]()[_0x36a4b4(0x1fa)],'unitId':_0x22f4df,'threadId':_0x3f6e2f,'solved':_0x295c03['resolved']?I[_0x36a4b4(0x1f8)]:I[_0x36a4b4(0x213)]},_0x28d2d6=await this[_0x36a4b4(0x1e0)][_0x36a4b4(0x20c)](_0x36a4b4(0x219)+_0x22f4df+_0x36a4b4(0x1fb),{'body':_0x1235ac});return!_0x28d2d6[_0x36a4b4(0x1e7)][_0x36a4b4(0x1f1)]||_0x28d2d6['body'][_0x36a4b4(0x1f1)][_0x36a4b4(0x21b)]===0x1;}async[_0x5217f6(0x20b)](_0x58b23f,_0x3432b5,_0x3677d1,_0x6a88d9){const _0x693924=_0x5217f6,_0x422775={'memberId':(await this[_0x693924(0x1dc)][_0x693924(0x1de)](_0x58b23f))[_0x693924(0x1d1)](),'threadId':_0x3677d1,'replyId':_0x6a88d9,'unitId':_0x58b23f},_0x429207=await this['_httpService'][_0x693924(0x20c)](_0x693924(0x219)+_0x58b23f+_0x693924(0x201),{'body':_0x422775});return!_0x429207[_0x693924(0x1e7)][_0x693924(0x1f1)]||_0x429207['body'][_0x693924(0x1f1)][_0x693924(0x21b)]===0x1;}async[_0x5217f6(0x1bc)](_0x3457d8,_0x4b9210,_0x3a2bd1){const _0x2232e3=_0x5217f6,_0x2651ed={'unitId':_0x3457d8,'threadId':_0x3a2bd1},_0x2da76d=await this['_httpService'][_0x2232e3(0x20c)]('/universer-api/comment/unit/'+_0x3457d8+_0x2232e3(0x203),{'body':_0x2651ed}),_0x314e5a=_0x3a2bd1[_0x2232e3(0x212)](_0x36382e=>ee(_0x2da76d[_0x2232e3(0x1e7)][_0x2232e3(0x1fc)][_0x36382e],_0x3457d8,_0x4b9210))[_0x2232e3(0x1ce)](Boolean);return Object['values'](_0x2da76d[_0x2232e3(0x1e7)]['users'])[_0x2232e3(0x1c4)](_0x2d5e37=>{const _0x34478f=_0x2232e3;this[_0x34478f(0x1c7)][_0x34478f(0x21c)](_0x2d5e37);}),_0x314e5a;}[_0x5217f6(0x1be)](_0x4d225b){const _0x260344=_0x5217f6;return{'id':_0x4d225b['id'],'threadId':_0x4d225b['threadId'],'ref':_0x4d225b[_0x260344(0x1e5)]};}};S=Q([b(0x0,_0x2c3e49(_0x2fdef9)),b(0x1,_0x2c3e49(_0x3b92a5)),b(0x2,_0x2c3e49(_0x53374a))],S);function _0x3d63(){const _0x4777e0=['add','_httpService','delete','Edit','3WxQitK','parse','ref','_initDataSource','body','UNRECOGNIZED','Delete','payload','root','defineProperty','symbol','user','COMMENT','_configService','error','reply','1409570foznvy','updateComment','rangeId','replyId','UNIVER_UNKNOWN','Solved','3354uswTPl','userID','/solved','comments','getCurrentUser','_injector','_threadCommentModel','userId','/delete','subscribe','/list','getUser','60TqKGJi','698287YVwflq','parentId','replies','Add','syncUpdateMutationToColla','deleteComment','post','YYYY/MM/DD\x20HH:mm','find','onReady','_initUserSync','366759tujEqg','map','OpenOrReOpen','length','/add','_init','format','threadId','/universer-api/comment/unit/','getComment','code','addUser','thread-comment-data-source.config','disposeWithMe','rangeType','/universer-api/user/list','Solve','type','slice','listComments','getUnit','saveCommentToSnapshot','getOwnPropertyDescriptor','dataSource','1284808KAXtDx','get','comment','forEach','_config','setConfig','_userService','content','_threadCommentDataSource','Reply','commentUpdate$','stringify','pipe','filter','unitId','onStarting','getMemberID','addComment','createTimestamp','solved','6467488QvRrrv','1745TIhTDc','_commentService','_threadCommentDataSourceService','customRanges','resolveComment','83244bMdlsB','_sessionService','size','requireSession'];_0x3d63=function(){return _0x4777e0;};return _0x3d63();}var re=Object[_0x5217f6(0x1bf)],te=(_0x471b37,_0x1e0152,_0x51373c,_0x3d3dfd)=>{const _0x39abf7=_0x5217f6;for(var _0x2a55ff=_0x3d3dfd>0x1?void 0x0:_0x3d3dfd?re(_0x1e0152,_0x51373c):_0x1e0152,_0x23e9b3=_0x471b37[_0x39abf7(0x214)]-0x1,_0x35bef2;_0x23e9b3>=0x0;_0x23e9b3--)(_0x35bef2=_0x471b37[_0x23e9b3])&&(_0x2a55ff=_0x35bef2(_0x2a55ff)||_0x2a55ff);return _0x2a55ff;},M=(_0x2e786b,_0x4637a9)=>(_0x18bca9,_0x208798)=>_0x4637a9(_0x18bca9,_0x208798,_0x2e786b);let f=class extends _0x12c7bd{constructor(_0x7bcd1a,_0x2c709d){const _0x27808e=_0x5217f6;super(),this['_threadCommentDataSourceService']=_0x7bcd1a,this[_0x27808e(0x1c9)]=_0x2c709d,this[_0x27808e(0x1e6)]();}['_initDataSource'](){const _0x2e4f16=_0x5217f6;this[_0x2e4f16(0x1d8)][_0x2e4f16(0x1c0)]=this[_0x2e4f16(0x1c9)],this[_0x2e4f16(0x1d8)][_0x2e4f16(0x20a)]=!0x1;}};f=te([M(0x0,_0x209dac),M(0x1,_0x2c3e49(S))],f);var se=Object[_0x5217f6(0x1ec)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x49be57,_0x1a5a71,_0x48f653)=>_0x1a5a71 in _0x49be57?se(_0x49be57,_0x1a5a71,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x48f653}):_0x49be57[_0x1a5a71]=_0x48f653,ie=(_0x3808e5,_0x20b569,_0x3c7274,_0x4c2a3b)=>{const _0x1fd0a1=_0x5217f6;for(var _0x19186f=_0x4c2a3b>0x1?void 0x0:_0x4c2a3b?oe(_0x20b569,_0x3c7274):_0x20b569,_0x60ac64=_0x3808e5[_0x1fd0a1(0x214)]-0x1,_0x408703;_0x60ac64>=0x0;_0x60ac64--)(_0x408703=_0x3808e5[_0x60ac64])&&(_0x19186f=_0x408703(_0x19186f)||_0x19186f);return _0x19186f;},N=(_0x3cccba,_0x2f7687)=>(_0xe5652b,_0x394add)=>_0x2f7687(_0xe5652b,_0x394add,_0x3cccba),$=(_0x1cef2a,_0x26522e,_0x4f7552)=>ne(_0x1cef2a,typeof _0x26522e!=_0x5217f6(0x1ed)?_0x26522e+'':_0x26522e,_0x4f7552);let g=class extends _0x4954dd{constructor(_0x1123e5=O,_0x4223fa,_0x29be50){const _0x208f40=_0x5217f6;super(),this['_config']=_0x1123e5,this[_0x208f40(0x1fe)]=_0x4223fa,this['_configService']=_0x29be50;const {..._0x1978c2}=_0x5a4b2a({},O,this[_0x208f40(0x1c5)]);this[_0x208f40(0x1f0)][_0x208f40(0x1c6)](z,_0x1978c2);}[_0x5217f6(0x1d0)](){const _0x58dff6=_0x5217f6;[[S],[f],[_]][_0x58dff6(0x1c4)](_0x266af4=>{const _0x2026a7=_0x58dff6;this['_injector'][_0x2026a7(0x1df)](_0x266af4);});}[_0x5217f6(0x20f)](){const _0x3271dc=_0x5217f6;this[_0x3271dc(0x1fe)][_0x3271dc(0x1c2)](f),this[_0x3271dc(0x1fe)]['get'](_);}};$(g,'pluginName',W),$(g,_0x5217f6(0x1ba),_0x2bdb63[_0x5217f6(0x1f7)]),g=ie([_0x31e70c(_0x3c7c4c,_0x2e346e,_0x1090de),N(0x1,_0x2c3e49(_0x212dfe)),N(0x2,_0x3ed13f)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x59ea57=_0x264e;function _0x264e(_0x359968,_0x411b3){const _0x7619d4=_0x7619();return _0x264e=function(_0x264ef0,_0x15444f){_0x264ef0=_0x264ef0-0x16e;let _0x2aaf03=_0x7619d4[_0x264ef0];return _0x2aaf03;},_0x264e(_0x359968,_0x411b3);}(function(_0x1f465c,_0x3b303){const _0xdc7ff7=_0x264e,_0x1dc9f3=_0x1f465c();while(!![]){try{const _0x538dba=parseInt(_0xdc7ff7(0x1b4))/0x1+parseInt(_0xdc7ff7(0x1ca))/0x2+parseInt(_0xdc7ff7(0x1b3))/0x3+parseInt(_0xdc7ff7(0x1bd))/0x4+-parseInt(_0xdc7ff7(0x1c4))/0x5+-parseInt(_0xdc7ff7(0x1b8))/0x6*(parseInt(_0xdc7ff7(0x1a1))/0x7)+-parseInt(_0xdc7ff7(0x174))/0x8*(-parseInt(_0xdc7ff7(0x172))/0x9);if(_0x538dba===_0x3b303)break;else _0x1dc9f3['push'](_0x1dc9f3['shift']());}catch(_0x483c7d){_0x1dc9f3['push'](_0x1dc9f3['shift']());}}}(_0x7619,0x4e0d8));import{CommentService as _0x3cd1f3,CollaborationSessionService as _0x250336,UniverCollaborationClientPlugin as _0x3f0de4}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x53e585}from'@univerjs-pro/license';import{dayjs as _0x30ebdb,UserManagerService as _0x11e1a7,Inject as _0x305425,Injector as _0x55b98c,Disposable as _0x3b5b07,CustomRangeType as _0x52cc13,UniverInstanceType as _0x1acf5a,DependentOn as _0x5f16f5,IConfigService as _0x1dbb73,Plugin as _0x465844,merge as _0x148cba}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x260dd3}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x43c617,IThreadCommentDataSourceService as _0x4e5a4c}from'@univerjs/thread-comment';import{bufferTime as _0x5376a3}from'rxjs';import{HTTPService as _0x4fcb94}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0xf85ada=>(_0xf85ada[_0xf85ada[_0x59ea57(0x182)]=0x0]=_0x59ea57(0x182),_0xf85ada[_0xf85ada[_0x59ea57(0x1b2)]=0x1]=_0x59ea57(0x1b2),_0xf85ada[_0xf85ada[_0x59ea57(0x1d0)]=-0x1]=_0x59ea57(0x1d0),_0xf85ada))(I||{}),v=(_0x4ea0ac=>(_0x4ea0ac[_0x4ea0ac[_0x59ea57(0x1ba)]=0x0]=_0x59ea57(0x1ba),_0x4ea0ac[_0x4ea0ac[_0x59ea57(0x1cc)]=0x1]=_0x59ea57(0x1cc),_0x4ea0ac[_0x4ea0ac[_0x59ea57(0x1d1)]=0x2]=_0x59ea57(0x1d1),_0x4ea0ac[_0x4ea0ac[_0x59ea57(0x1a5)]=0x3]=_0x59ea57(0x1a5),_0x4ea0ac[_0x4ea0ac[_0x59ea57(0x19e)]=0x4]=_0x59ea57(0x19e),_0x4ea0ac[_0x4ea0ac[_0x59ea57(0x1a3)]=0x5]=_0x59ea57(0x1a3),_0x4ea0ac[_0x4ea0ac[_0x59ea57(0x1d0)]=-0x1]='UNRECOGNIZED',_0x4ea0ac))(v||{});const y=_0x52eb61=>_0x30ebdb(new Date(+_0x52eb61))[_0x59ea57(0x176)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x463959,_0xc06963)=>{const _0x27d60f=_0x59ea57,_0x36c378=_0x463959[_0x27d60f(0x1cf)](_0x11e1a7),_0x344afa=_0x463959['get'](_0x4fcb94);_0xc06963[_0x27d60f(0x185)](_0xc43dd4=>{const _0x3aeff7=_0x27d60f;_0x36c378[_0x3aeff7(0x18b)](_0xc43dd4)&&_0xc06963[_0x3aeff7(0x195)](_0xc43dd4);}),_0xc06963[_0x27d60f(0x183)]&&(await _0x344afa[_0x27d60f(0x1cf)](_0x27d60f(0x1ab),{'params':{'userIDs':[..._0xc06963]}}))[_0x27d60f(0x19c)][_0x27d60f(0x197)]['forEach'](_0x58ee22=>{const _0x25ef9c=_0x27d60f;_0x58ee22&&_0x36c378[_0x25ef9c(0x1c1)](_0x58ee22);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x2e5a42,_0x505724,_0x3a9326,_0x4cbdb0)=>{const _0x1ec23e=_0x59ea57;for(var _0x4c9b72=_0x4cbdb0>0x1?void 0x0:_0x4cbdb0?K(_0x505724,_0x3a9326):_0x505724,_0x5e4417=_0x2e5a42[_0x1ec23e(0x1b1)]-0x1,_0x19900f;_0x5e4417>=0x0;_0x5e4417--)(_0x19900f=_0x2e5a42[_0x5e4417])&&(_0x4c9b72=_0x19900f(_0x4c9b72)||_0x4c9b72);return _0x4c9b72;},p=(_0x266256,_0x149c7c)=>(_0x1a89f9,_0x2c6fe7)=>_0x149c7c(_0x1a89f9,_0x2c6fe7,_0x266256);let _=class extends _0x3b5b07{constructor(_0x180cbb,_0x4b7acb,_0x31e234,_0x519c8a){const _0xbe32b5=_0x59ea57;super(),this['_commentService']=_0x180cbb,this['_threadCommentModel']=_0x4b7acb,this[_0xbe32b5(0x1c5)]=_0x31e234,this[_0xbe32b5(0x1b0)]=_0x519c8a,this[_0xbe32b5(0x193)](),this[_0xbe32b5(0x17e)]();}[_0x59ea57(0x17e)](){const _0x1c963e=_0x59ea57;this['disposeWithMe'](this[_0x1c963e(0x1c6)][_0x1c963e(0x1c2)][_0x1c963e(0x171)](_0x5376a3(0x10))[_0x1c963e(0x1a4)](_0x2ab37e=>{const _0x351837=_0x1c963e,_0x279584=new Set();_0x2ab37e['forEach'](_0x267458=>{const _0x2dc0a6=_0x264e;switch(_0x267458['type']){case'add':{const _0x515725=_0x267458['payload'][_0x2dc0a6(0x17a)];_0x279584[_0x2dc0a6(0x17c)](_0x515725);break;}}}),B(this[_0x351837(0x1b0)],_0x279584);}));}[_0x59ea57(0x193)](){const _0x5538fc=_0x59ea57;this[_0x5538fc(0x1cd)](this[_0x5538fc(0x190)]['commentUpdate$'][_0x5538fc(0x1a4)](async _0x44f446=>{const _0xb80720=_0x5538fc;var _0xff2834,_0x4bd814,_0x465202,_0x37673f;const _0x58025a=(_0xff2834=this[_0xb80720(0x1c6)][_0xb80720(0x191)](_0x44f446[_0xb80720(0x1ce)])['find'](_0x43a2b0=>_0x43a2b0['threadId']===_0x44f446[_0xb80720(0x1aa)]))==null?void 0x0:_0xff2834[_0xb80720(0x199)];if(!_0x58025a)return;const {unitId:_0x1251e5,subUnitId:_0xdcb03c}=_0x58025a;switch(_0x44f446[_0xb80720(0x1a9)]&&this[_0xb80720(0x1c5)]['addUser'](_0x44f446[_0xb80720(0x1a9)]),_0x44f446['type']){case v[_0xb80720(0x1cc)]:break;case v[_0xb80720(0x1d1)]:{this[_0xb80720(0x1c6)][_0xb80720(0x1c8)](_0x1251e5,_0xdcb03c,{'unitId':_0x1251e5,'subUnitId':_0xdcb03c,'ref':'','id':_0x44f446[_0xb80720(0x1d3)],'dT':y(+_0x44f446['createTimestamp']),'threadId':_0x44f446[_0xb80720(0x1aa)],'personId':(_0x465202=(_0x4bd814=_0x44f446[_0xb80720(0x1a9)])==null?void 0x0:_0x4bd814['userID'])!=null?_0x465202:_0x44f446[_0xb80720(0x1bc)],'text':JSON['parse'](_0x44f446['content']),'parentId':_0x58025a['id']});break;}case v[_0xb80720(0x19e)]:{const _0x3a966d=this[_0xb80720(0x1c6)]['getComment'](_0x1251e5,_0xdcb03c,_0x44f446[_0xb80720(0x1d3)]);_0x3a966d&&_0x3a966d[_0xb80720(0x1af)]&&this[_0xb80720(0x1c6)][_0xb80720(0x192)](_0x1251e5,_0xdcb03c,_0x44f446[_0xb80720(0x1d3)]);break;}case v['Edit']:{this[_0xb80720(0x1c6)][_0xb80720(0x181)](_0x1251e5,_0xdcb03c,{'commentId':_0x44f446['replyId'],'text':JSON[_0xb80720(0x1c0)](_0x44f446[_0xb80720(0x1bb)])});break;}case v[_0xb80720(0x1a3)]:{const _0x4313cc=(_0x37673f=this[_0xb80720(0x1c6)][_0xb80720(0x191)](_0x44f446[_0xb80720(0x1ce)])[_0xb80720(0x1a6)](_0xb94a3c=>_0xb94a3c[_0xb80720(0x1aa)]===_0x44f446[_0xb80720(0x1aa)]))==null?void 0x0:_0x37673f[_0xb80720(0x199)];_0x4313cc&&this[_0xb80720(0x1c6)][_0xb80720(0x19f)](_0x1251e5,_0xdcb03c,_0x4313cc['id'],_0x44f446['solved']===I[_0xb80720(0x1b2)]);break;}}}));}};_=V([p(0x0,_0x305425(_0x3cd1f3)),p(0x1,_0x305425(_0x43c617)),p(0x2,_0x305425(_0x11e1a7)),p(0x3,_0x305425(_0x55b98c))],_);const z=_0x59ea57(0x18a),O={};var k=Object[_0x59ea57(0x1b7)],Q=(_0x4414ef,_0x418a93,_0x433852,_0x4d2d5b)=>{for(var _0x5043d0=_0x4d2d5b>0x1?void 0x0:_0x4d2d5b?k(_0x418a93,_0x433852):_0x418a93,_0x32e476=_0x4414ef['length']-0x1,_0x4f3393;_0x32e476>=0x0;_0x32e476--)(_0x4f3393=_0x4414ef[_0x32e476])&&(_0x5043d0=_0x4f3393(_0x5043d0)||_0x5043d0);return _0x5043d0;},b=(_0x2d3e20,_0x10368b)=>(_0x41b6cd,_0x11d852)=>_0x10368b(_0x41b6cd,_0x11d852,_0x2d3e20);function X(_0x3bd5bf,_0x1aae86){const _0x55de61=_0x59ea57,_0x8c3315=_0x3bd5bf[_0x55de61(0x1ae)][0x0];return{..._0x1aae86,'id':_0x8c3315['replyId'],'resolved':_0x3bd5bf[_0x55de61(0x18f)]===0x1,'dT':y(_0x8c3315[_0x55de61(0x1b9)]),'personId':_0x8c3315[_0x55de61(0x1bc)],'threadId':_0x8c3315[_0x55de61(0x1aa)]};}function ee(_0x2e6878,_0x25c9de,_0x2c3112){const _0x537dea=_0x59ea57;var _0x4a6bed,_0x1f3183;if(((_0x1f3183=(_0x4a6bed=_0x2e6878==null?void 0x0:_0x2e6878['replies'])==null?void 0x0:_0x4a6bed['length'])!=null?_0x1f3183:0x0)>0x0){const _0x13edb9=(_0x1547cd,_0x54a702)=>({'id':_0x1547cd['replyId'],'threadId':_0x1547cd[_0x537dea(0x1aa)],'dT':y(_0x1547cd[_0x537dea(0x1b9)]),'personId':_0x1547cd[_0x537dea(0x1bc)],'resolved':_0x2e6878[_0x537dea(0x18f)]===I[_0x537dea(0x1b2)],'unitId':_0x25c9de,'subUnitId':_0x2c3112,'text':JSON[_0x537dea(0x1c0)](_0x1547cd[_0x537dea(0x1bb)]),'parentId':_0x54a702}),_0x337bc1=_0x13edb9(_0x2e6878[_0x537dea(0x1ae)][0x0]);return{..._0x337bc1,'children':_0x2e6878[_0x537dea(0x1ae)][_0x537dea(0x1ad)](0x1)[_0x537dea(0x1ac)](_0x482275=>_0x13edb9(_0x482275,_0x337bc1['id']))};}return null;}let S=class{constructor(_0xd4a196,_0x2e6c75,_0x32deab){const _0x5ceab4=_0x59ea57;this[_0x5ceab4(0x16f)]=_0xd4a196,this[_0x5ceab4(0x1c5)]=_0x2e6c75,this['_sessionService']=_0x32deab;}async[_0x59ea57(0x1c8)](_0x509388){const _0x4ce1db=_0x59ea57;var _0x190b80,_0x5d7e9b;const {parentId:_0x40412d,unitId:_0x39f96b,text:_0x5450a4,threadId:_0x2c5143}=_0x509388,_0xb94365=(_0x5d7e9b=(_0x190b80=_0x5450a4['customRanges'])==null?void 0x0:_0x190b80[_0x4ce1db(0x17b)](_0x87eb07=>_0x87eb07['rangeType']===_0x52cc13[_0x4ce1db(0x186)])['map'](_0x7a4d19=>_0x7a4d19[_0x4ce1db(0x189)]))!=null?_0x5d7e9b:[],_0x2917ca=JSON[_0x4ce1db(0x1c3)](_0x5450a4),_0x37b411=(await this[_0x4ce1db(0x1be)][_0x4ce1db(0x196)](_0x39f96b))[_0x4ce1db(0x1b5)]();if(_0x40412d){const _0x3cb96d={'memberId':_0x37b411,'unitId':_0x39f96b,'content':_0x2917ca,'mention':_0xb94365,'threadId':_0x2c5143},_0x1550cb=(await this['_httpService'][_0x4ce1db(0x184)](_0x4ce1db(0x1cb)+_0x39f96b+_0x4ce1db(0x1b6),{'body':_0x3cb96d}))[_0x4ce1db(0x19c)][_0x4ce1db(0x178)];return{..._0x509388,'id':_0x1550cb[_0x4ce1db(0x1d3)],'dT':_0x30ebdb(+_0x1550cb[_0x4ce1db(0x1b9)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x1550cb[_0x4ce1db(0x1bc)]};}else{const _0x39a8fe={'memberId':_0x37b411,'unitId':_0x39f96b,'content':_0x2917ca,'mention':_0xb94365},_0x296fab=await this['_httpService'][_0x4ce1db(0x184)](_0x4ce1db(0x1cb)+_0x39f96b+_0x4ce1db(0x1c9),{'body':_0x39a8fe});return X(_0x296fab[_0x4ce1db(0x19c)][_0x4ce1db(0x17d)],_0x509388);}}async[_0x59ea57(0x181)](_0x5a2659){const _0x4f3961=_0x59ea57;var _0x26b8c6,_0x2fc754;const {text:_0x54fae8,unitId:_0x33630b}=_0x5a2659,_0x635e11=(_0x2fc754=(_0x26b8c6=_0x54fae8[_0x4f3961(0x175)])==null?void 0x0:_0x26b8c6[_0x4f3961(0x17b)](_0x358c60=>_0x358c60[_0x4f3961(0x1a2)]===_0x52cc13[_0x4f3961(0x186)])[_0x4f3961(0x1ac)](_0x276776=>_0x276776[_0x4f3961(0x189)]))!=null?_0x2fc754:[],_0x339f28=JSON[_0x4f3961(0x1c3)](_0x54fae8),_0x11e090=_0x5a2659[_0x4f3961(0x1aa)],_0x17c5e7=_0x5a2659['id'],_0x4f4296={'memberId':(await this['_sessionService'][_0x4f3961(0x196)](_0x33630b))['getMemberID'](),'unitId':_0x33630b,'threadId':_0x11e090,'mention':_0x635e11,'content':_0x339f28,'replyId':_0x17c5e7},_0x296ed3=await this['_httpService'][_0x4f3961(0x184)](_0x4f3961(0x1cb)+_0x33630b+_0x4f3961(0x180),{'body':_0x4f4296});return!_0x296ed3['body']['error']||_0x296ed3['body']['error'][_0x4f3961(0x1c7)]===0x1;}async['resolveComment'](_0xd27023){const _0x3f427d=_0x59ea57,{unitId:_0x59457b}=_0xd27023,_0x46e734=_0xd27023[_0x3f427d(0x1aa)],_0x50a8f7={'memberId':this[_0x3f427d(0x1c5)][_0x3f427d(0x19d)]()[_0x3f427d(0x173)],'unitId':_0x59457b,'threadId':_0x46e734,'solved':_0xd27023['resolved']?I[_0x3f427d(0x1b2)]:I[_0x3f427d(0x182)]},_0x4e4ec7=await this[_0x3f427d(0x16f)]['post'](_0x3f427d(0x1cb)+_0x59457b+'/solved',{'body':_0x50a8f7});return!_0x4e4ec7[_0x3f427d(0x19c)]['error']||_0x4e4ec7[_0x3f427d(0x19c)]['error'][_0x3f427d(0x1c7)]===0x1;}async[_0x59ea57(0x192)](_0x1e31d1,_0x1c21ed,_0x258733,_0x1e8ee2){const _0xeafe29=_0x59ea57,_0x267288={'memberId':(await this['_sessionService']['requireSession'](_0x1e31d1))[_0xeafe29(0x1b5)](),'threadId':_0x258733,'replyId':_0x1e8ee2,'unitId':_0x1e31d1},_0x282b85=await this['_httpService'][_0xeafe29(0x184)](_0xeafe29(0x1cb)+_0x1e31d1+_0xeafe29(0x18c),{'body':_0x267288});return!_0x282b85[_0xeafe29(0x19c)][_0xeafe29(0x179)]||_0x282b85[_0xeafe29(0x19c)][_0xeafe29(0x179)]['code']===0x1;}async[_0x59ea57(0x170)](_0xecbe23,_0x139476,_0xc2f44e){const _0x31b2f8=_0x59ea57,_0x5445ae={'unitId':_0xecbe23,'threadId':_0xc2f44e},_0xc88335=await this['_httpService'][_0x31b2f8(0x184)]('/universer-api/comment/unit/'+_0xecbe23+_0x31b2f8(0x187),{'body':_0x5445ae}),_0x44e8a0=_0xc2f44e[_0x31b2f8(0x1ac)](_0x45a7c1=>ee(_0xc88335[_0x31b2f8(0x19c)][_0x31b2f8(0x18d)][_0x45a7c1],_0xecbe23,_0x139476))['filter'](Boolean);return Object['values'](_0xc88335['body'][_0x31b2f8(0x197)])[_0x31b2f8(0x185)](_0x33241c=>{const _0x334e38=_0x31b2f8;this['_userService'][_0x334e38(0x1c1)](_0x33241c);}),_0x44e8a0;}[_0x59ea57(0x19b)](_0x2accbb){const _0x5c4543=_0x59ea57;return{'id':_0x2accbb['id'],'threadId':_0x2accbb[_0x5c4543(0x1aa)],'ref':_0x2accbb[_0x5c4543(0x17f)]};}};function _0x7619(){const _0xb92e9c=['user','threadId','/universer-api/user/list','map','slice','replies','parentId','_injector','length','Solved','648744pchXYX','241366sZmiDl','getMemberID','/reply','getOwnPropertyDescriptor','192150lcNakw','createTimestamp','Unknown','content','userId','1897176okHVAa','_sessionService','type','parse','addUser','commentUpdate$','stringify','2814485mmSRJs','_userService','_threadCommentModel','code','addComment','/add','465450ZLrGIX','/universer-api/comment/unit/','Add','disposeWithMe','unitId','get','UNRECOGNIZED','Reply','onStarting','replyId','defineProperty','_httpService','listComments','pipe','632187rayOhg','userID','8SZaTuj','customRanges','format','_configService','reply','error','personId','filter','add','comment','_initUserSync','ref','/edit','updateComment','OpenOrReOpen','size','post','forEach','COMMENT','/list','symbol','rangeId','thread-comment-data-source.config','getUser','/delete','comments','pluginName','solved','_commentService','getUnit','deleteComment','_init','_threadCommentDataSourceService','delete','requireSession','users','_threadCommentDataSource','root','syncUpdateMutationToColla','saveCommentToSnapshot','body','getCurrentUser','Delete','resolveComment','_initDataSource','77XeUbbE','rangeType','Solve','subscribe','Edit','find','_config','UNIVER_UNKNOWN'];_0x7619=function(){return _0xb92e9c;};return _0x7619();}S=Q([b(0x0,_0x305425(_0x4fcb94)),b(0x1,_0x305425(_0x11e1a7)),b(0x2,_0x305425(_0x250336))],S);var re=Object[_0x59ea57(0x1b7)],te=(_0x316dfd,_0x570ad9,_0x291029,_0x10a655)=>{const _0x56e817=_0x59ea57;for(var _0xa60318=_0x10a655>0x1?void 0x0:_0x10a655?re(_0x570ad9,_0x291029):_0x570ad9,_0x210d36=_0x316dfd[_0x56e817(0x1b1)]-0x1,_0x5b6d7c;_0x210d36>=0x0;_0x210d36--)(_0x5b6d7c=_0x316dfd[_0x210d36])&&(_0xa60318=_0x5b6d7c(_0xa60318)||_0xa60318);return _0xa60318;},M=(_0x5a8ffe,_0x7b1d7c)=>(_0x730be2,_0x33f244)=>_0x7b1d7c(_0x730be2,_0x33f244,_0x5a8ffe);let f=class extends _0x3b5b07{constructor(_0x35e734,_0x207612){const _0x1c32a9=_0x59ea57;super(),this[_0x1c32a9(0x194)]=_0x35e734,this[_0x1c32a9(0x198)]=_0x207612,this[_0x1c32a9(0x1a0)]();}[_0x59ea57(0x1a0)](){const _0x2399f4=_0x59ea57;this[_0x2399f4(0x194)]['dataSource']=this[_0x2399f4(0x198)],this['_threadCommentDataSourceService'][_0x2399f4(0x19a)]=!0x1;}};f=te([M(0x0,_0x4e5a4c),M(0x1,_0x305425(S))],f);var se=Object[_0x59ea57(0x16e)],oe=Object[_0x59ea57(0x1b7)],ne=(_0x585d99,_0xb0bfd6,_0x4e5e26)=>_0xb0bfd6 in _0x585d99?se(_0x585d99,_0xb0bfd6,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4e5e26}):_0x585d99[_0xb0bfd6]=_0x4e5e26,ie=(_0x57f88b,_0x40ff86,_0x580d67,_0xabce1)=>{const _0x51fd5b=_0x59ea57;for(var _0x95fdfd=_0xabce1>0x1?void 0x0:_0xabce1?oe(_0x40ff86,_0x580d67):_0x40ff86,_0x13fe48=_0x57f88b[_0x51fd5b(0x1b1)]-0x1,_0x82b9e0;_0x13fe48>=0x0;_0x13fe48--)(_0x82b9e0=_0x57f88b[_0x13fe48])&&(_0x95fdfd=_0x82b9e0(_0x95fdfd)||_0x95fdfd);return _0x95fdfd;},N=(_0x4b1065,_0x55c98b)=>(_0x563a7e,_0x53df8c)=>_0x55c98b(_0x563a7e,_0x53df8c,_0x4b1065),$=(_0x3f0ec9,_0x4d5904,_0x3f5e43)=>ne(_0x3f0ec9,typeof _0x4d5904!=_0x59ea57(0x188)?_0x4d5904+'':_0x4d5904,_0x3f5e43);let g=class extends _0x465844{constructor(_0x414b94=O,_0x4ba7ed,_0x6b66d6){const _0x128580=_0x59ea57;super(),this[_0x128580(0x1a7)]=_0x414b94,this[_0x128580(0x1b0)]=_0x4ba7ed,this[_0x128580(0x177)]=_0x6b66d6;const {..._0x3b932c}=_0x148cba({},O,this[_0x128580(0x1a7)]);this['_configService']['setConfig'](z,_0x3b932c);}[_0x59ea57(0x1d2)](){[[S],[f],[_]]['forEach'](_0x147e24=>{const _0x4e12ee=_0x264e;this['_injector'][_0x4e12ee(0x17c)](_0x147e24);});}['onReady'](){const _0x4ee148=_0x59ea57;this[_0x4ee148(0x1b0)][_0x4ee148(0x1cf)](f),this[_0x4ee148(0x1b0)][_0x4ee148(0x1cf)](_);}};$(g,_0x59ea57(0x18e),W),$(g,_0x59ea57(0x1bf),_0x1acf5a[_0x59ea57(0x1a8)]),g=ie([_0x5f16f5(_0x260dd3,_0x3f0de4,_0x53e585),N(0x1,_0x305425(_0x55b98c)),N(0x2,_0x1dbb73)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x1ae1(_0xdc8ddc,_0x45d461){const _0x5e754f=_0x5e75();return _0x1ae1=function(_0x1ae1f4,_0x33bc08){_0x1ae1f4=_0x1ae1f4-0x12f;let _0x3af3ec=_0x5e754f[_0x1ae1f4];return _0x3af3ec;},_0x1ae1(_0xdc8ddc,_0x45d461);}function _0x5e75(){const _0x4c7720=['getOwnPropertyDescriptor','/delete','find','unitId','ref','add','get','2565708uwIyiB','UNRECOGNIZED','format','_threadCommentDataSourceService','disposeWithMe','Inject','_initDataSource','deleteComment','onStarting','getUser','UniverProLicense','UniverThreadCommentDataSourcePlugin','265048SoVdSE','commentUpdate$','10WVFqgb','slice','/universer-api/comment/unit/','132UXzGDz','object','@univerjs/network','toStringTag','threadId','addComment','@univerjs-pro/collaboration-client','solved','YYYY/MM/DD\x20HH:mm','listComments','HTTPService','_threadCommentModel','parse','delete','createTimestamp','IConfigService','_httpService','content','Delete','/reply','OpenOrReOpen','_initUserSync','values','length','Add','amd','resolveComment','_configService','dataSource','getUnit','UniverProCollaborationClient','parentId','getMemberID','Edit','subscribe','userId','body','33OvPtxC','DependentOn','IThreadCommentDataSourceService','@univerjs/core','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_config','6hlTVyk','Solve','@univerjs/thread-comment-ui','code','filter','_injector','Module','CollaborationSessionService','type','ThreadCommentModel','UniverInstanceType','setConfig','pipe','UNIVER_UNKNOWN','customRanges','dayjs','error','getCurrentUser','function','2rxZCWe','saveCommentToSnapshot','_commentService','users','511057mNGBXu','post','replies','payload','727302iKVrVK','rangeId','stringify','personId','Injector','@univerjs/thread-comment','updateComment','requireSession','map','CommentService','UniverNetwork','CustomRangeType','2769389pyMivA','_userService','exports','userID','UniverThreadComment','symbol','reply','COMMENT','getComment','UserManagerService','/add','_sessionService','_threadCommentDataSource','defineProperty','rxjs','forEach','syncUpdateMutationToColla','Reply','Solved','UniverThreadCommentUIPlugin','5330898eOKmgm','pluginName','UniverCollaborationClientPlugin','replyId','/universer-api/user/list','Unknown','rangeType','size','root','addUser','163085IaihsI'];_0x5e75=function(){return _0x4c7720;};return _0x5e75();}(function(_0x306704,_0x48f0bf){const _0x13a082=_0x1ae1,_0xf94805=_0x306704();while(!![]){try{const _0x1e8235=-parseInt(_0x13a082(0x1a7))/0x1*(-parseInt(_0x13a082(0x1a3))/0x2)+parseInt(_0x13a082(0x1ab))/0x3+-parseInt(_0x13a082(0x165))/0x4*(parseInt(_0x13a082(0x14c))/0x5)+-parseInt(_0x13a082(0x190))/0x6*(parseInt(_0x13a082(0x1b7))/0x7)+parseInt(_0x13a082(0x160))/0x8+parseInt(_0x13a082(0x142))/0x9*(parseInt(_0x13a082(0x162))/0xa)+parseInt(_0x13a082(0x18a))/0xb*(parseInt(_0x13a082(0x154))/0xc);if(_0x1e8235===_0x48f0bf)break;else _0xf94805['push'](_0xf94805['shift']());}catch(_0x559963){_0xf94805['push'](_0xf94805['shift']());}}}(_0x5e75,0x85e1f),function(_0x3ccd7a,_0x4939b9){const _0x468c22=_0x1ae1;typeof exports==_0x468c22(0x166)&&typeof module<'u'?_0x4939b9(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x468c22(0x1a2)&&define[_0x468c22(0x17e)]?define([_0x468c22(0x130),_0x468c22(0x16b),'@univerjs-pro/license',_0x468c22(0x18d),_0x468c22(0x192),_0x468c22(0x1b0),_0x468c22(0x13c),_0x468c22(0x167)],_0x4939b9):(_0x3ccd7a=typeof globalThis<'u'?globalThis:_0x3ccd7a||self,_0x4939b9(_0x3ccd7a['UniverProThreadCommentDatasource']={},_0x3ccd7a[_0x468c22(0x183)],_0x3ccd7a[_0x468c22(0x15e)],_0x3ccd7a['UniverCore'],_0x3ccd7a['UniverThreadCommentUi'],_0x3ccd7a[_0x468c22(0x132)],_0x3ccd7a['rxjs'],_0x3ccd7a[_0x468c22(0x1b5)]));}(this,function(_0x2c8503,_0x3fde3a,_0x3d7711,_0x57609a,_0x1d79b6,_0x43beee,_0x2d51ab,_0x3d5d51){'use strict';const _0x486e2f=_0x1ae1;const _0x34e907=_0x486e2f(0x18e);var _0x300a5d=(_0x1637b9=>(_0x1637b9[_0x1637b9[_0x486e2f(0x179)]=0x0]='OpenOrReOpen',_0x1637b9[_0x1637b9[_0x486e2f(0x140)]=0x1]=_0x486e2f(0x140),_0x1637b9[_0x1637b9[_0x486e2f(0x155)]=-0x1]=_0x486e2f(0x155),_0x1637b9))(_0x300a5d||{}),_0x5b9427=(_0x10333a=>(_0x10333a[_0x10333a['Unknown']=0x0]=_0x486e2f(0x147),_0x10333a[_0x10333a[_0x486e2f(0x17d)]=0x1]=_0x486e2f(0x17d),_0x10333a[_0x10333a[_0x486e2f(0x13f)]=0x2]=_0x486e2f(0x13f),_0x10333a[_0x10333a[_0x486e2f(0x186)]=0x3]=_0x486e2f(0x186),_0x10333a[_0x10333a[_0x486e2f(0x177)]=0x4]=_0x486e2f(0x177),_0x10333a[_0x10333a['Solve']=0x5]=_0x486e2f(0x191),_0x10333a[_0x10333a[_0x486e2f(0x155)]=-0x1]='UNRECOGNIZED',_0x10333a))(_0x5b9427||{});const _0x4e2950=_0x1c3df9=>_0x57609a[_0x486e2f(0x19f)](new Date(+_0x1c3df9))[_0x486e2f(0x156)](_0x486e2f(0x16d)),_0x212e81=async(_0x14c44e,_0x125cf6)=>{const _0x3419b5=_0x486e2f,_0x5c9c98=_0x14c44e[_0x3419b5(0x153)](_0x57609a['UserManagerService']),_0x19bdbf=_0x14c44e[_0x3419b5(0x153)](_0x3d5d51[_0x3419b5(0x16f)]);_0x125cf6[_0x3419b5(0x13d)](_0x3b5f4a=>{const _0x14cc85=_0x3419b5;_0x5c9c98[_0x14cc85(0x15d)](_0x3b5f4a)&&_0x125cf6[_0x14cc85(0x172)](_0x3b5f4a);}),_0x125cf6[_0x3419b5(0x149)]&&(await _0x19bdbf['get'](_0x3419b5(0x146),{'params':{'userIDs':[..._0x125cf6]}}))[_0x3419b5(0x189)][_0x3419b5(0x1a6)][_0x3419b5(0x13d)](_0x957225=>{const _0x273a0e=_0x3419b5;_0x957225&&_0x5c9c98[_0x273a0e(0x14b)](_0x957225);});};var _0x2c66e7=Object[_0x486e2f(0x14d)],_0x3d0056=(_0x5e4985,_0x54c5e0,_0x64a827,_0x241d36)=>{const _0x4f92ba=_0x486e2f;for(var _0x426b33=_0x241d36>0x1?void 0x0:_0x241d36?_0x2c66e7(_0x54c5e0,_0x64a827):_0x54c5e0,_0x26ea2d=_0x5e4985[_0x4f92ba(0x17c)]-0x1,_0x35f960;_0x26ea2d>=0x0;_0x26ea2d--)(_0x35f960=_0x5e4985[_0x26ea2d])&&(_0x426b33=_0x35f960(_0x426b33)||_0x426b33);return _0x426b33;},_0x3fc455=(_0x290257,_0x235a36)=>(_0x5a6b3f,_0x107218)=>_0x235a36(_0x5a6b3f,_0x107218,_0x290257);let _0x766041=class extends _0x57609a['Disposable']{constructor(_0x9262ff,_0x7c21a1,_0xa26c02,_0x2c7e7c){const _0x2e2329=_0x486e2f;super(),this['_commentService']=_0x9262ff,this[_0x2e2329(0x170)]=_0x7c21a1,this[_0x2e2329(0x12f)]=_0xa26c02,this['_injector']=_0x2c7e7c,this['_init'](),this[_0x2e2329(0x17a)]();}['_initUserSync'](){const _0x2feadc=_0x486e2f;this[_0x2feadc(0x158)](this[_0x2feadc(0x170)][_0x2feadc(0x161)][_0x2feadc(0x19c)](_0x2d51ab['bufferTime'](0x10))['subscribe'](_0x39e1be=>{const _0x9df09d=new Set();_0x39e1be['forEach'](_0x27ef33=>{const _0x471e0e=_0x1ae1;switch(_0x27ef33['type']){case _0x471e0e(0x152):{const _0x266f12=_0x27ef33[_0x471e0e(0x1aa)][_0x471e0e(0x1ae)];_0x9df09d['add'](_0x266f12);break;}}}),_0x212e81(this['_injector'],_0x9df09d);}));}['_init'](){const _0x40550a=_0x486e2f;this[_0x40550a(0x158)](this[_0x40550a(0x1a5)][_0x40550a(0x161)][_0x40550a(0x187)](async _0x25d405=>{const _0x245284=_0x40550a;var _0x484d34,_0x30d7f3,_0x572241,_0x304731;const _0x6867d=(_0x484d34=this['_threadCommentModel']['getUnit'](_0x25d405['unitId'])[_0x245284(0x14f)](_0x5d5a25=>_0x5d5a25[_0x245284(0x169)]===_0x25d405[_0x245284(0x169)]))==null?void 0x0:_0x484d34[_0x245284(0x14a)];if(!_0x6867d)return;const {unitId:_0x277607,subUnitId:_0x5e9e10}=_0x6867d;switch(_0x25d405['user']&&this[_0x245284(0x12f)][_0x245284(0x14b)](_0x25d405['user']),_0x25d405[_0x245284(0x198)]){case _0x5b9427[_0x245284(0x17d)]:break;case _0x5b9427['Reply']:{this[_0x245284(0x170)][_0x245284(0x16a)](_0x277607,_0x5e9e10,{'unitId':_0x277607,'subUnitId':_0x5e9e10,'ref':'','id':_0x25d405['replyId'],'dT':_0x4e2950(+_0x25d405[_0x245284(0x173)]),'threadId':_0x25d405[_0x245284(0x169)],'personId':(_0x572241=(_0x30d7f3=_0x25d405['user'])==null?void 0x0:_0x30d7f3['userID'])!=null?_0x572241:_0x25d405['userId'],'text':JSON[_0x245284(0x171)](_0x25d405['content']),'parentId':_0x6867d['id']});break;}case _0x5b9427[_0x245284(0x177)]:{const _0x5b76a5=this[_0x245284(0x170)][_0x245284(0x136)](_0x277607,_0x5e9e10,_0x25d405[_0x245284(0x145)]);_0x5b76a5&&_0x5b76a5[_0x245284(0x184)]&&this[_0x245284(0x170)][_0x245284(0x15b)](_0x277607,_0x5e9e10,_0x25d405[_0x245284(0x145)]);break;}case _0x5b9427[_0x245284(0x186)]:{this[_0x245284(0x170)][_0x245284(0x1b1)](_0x277607,_0x5e9e10,{'commentId':_0x25d405[_0x245284(0x145)],'text':JSON[_0x245284(0x171)](_0x25d405[_0x245284(0x176)])});break;}case _0x5b9427[_0x245284(0x191)]:{const _0x439b57=(_0x304731=this[_0x245284(0x170)][_0x245284(0x182)](_0x25d405[_0x245284(0x150)])[_0x245284(0x14f)](_0xf20313=>_0xf20313[_0x245284(0x169)]===_0x25d405['threadId']))==null?void 0x0:_0x304731['root'];_0x439b57&&this[_0x245284(0x170)][_0x245284(0x17f)](_0x277607,_0x5e9e10,_0x439b57['id'],_0x25d405[_0x245284(0x16c)]===_0x300a5d[_0x245284(0x140)]);break;}}}));}};_0x766041=_0x3d0056([_0x3fc455(0x0,_0x57609a['Inject'](_0x3fde3a[_0x486e2f(0x1b4)])),_0x3fc455(0x1,_0x57609a[_0x486e2f(0x159)](_0x43beee[_0x486e2f(0x199)])),_0x3fc455(0x2,_0x57609a[_0x486e2f(0x159)](_0x57609a[_0x486e2f(0x137)])),_0x3fc455(0x3,_0x57609a['Inject'](_0x57609a[_0x486e2f(0x1af)]))],_0x766041);const _0x520d4d='thread-comment-data-source.config',_0x125602={};var _0x3ac494=Object[_0x486e2f(0x14d)],_0x2d0999=(_0x335e62,_0xb932d9,_0x27bd39,_0x12c96a)=>{const _0x4060b9=_0x486e2f;for(var _0x5b6b7b=_0x12c96a>0x1?void 0x0:_0x12c96a?_0x3ac494(_0xb932d9,_0x27bd39):_0xb932d9,_0x2008ff=_0x335e62[_0x4060b9(0x17c)]-0x1,_0x265016;_0x2008ff>=0x0;_0x2008ff--)(_0x265016=_0x335e62[_0x2008ff])&&(_0x5b6b7b=_0x265016(_0x5b6b7b)||_0x5b6b7b);return _0x5b6b7b;},_0x310d43=(_0x546128,_0x410f92)=>(_0x20488a,_0x2f7a0b)=>_0x410f92(_0x20488a,_0x2f7a0b,_0x546128);function _0x46a117(_0x222f2a,_0x53455b){const _0x1ed5d1=_0x486e2f,_0xc86b3a=_0x222f2a['replies'][0x0];return{..._0x53455b,'id':_0xc86b3a[_0x1ed5d1(0x145)],'resolved':_0x222f2a[_0x1ed5d1(0x16c)]===0x1,'dT':_0x4e2950(_0xc86b3a[_0x1ed5d1(0x173)]),'personId':_0xc86b3a['userId'],'threadId':_0xc86b3a[_0x1ed5d1(0x169)]};}function _0x1bcd37(_0x2ca056,_0x210c4d,_0x29aa50){const _0x1f590a=_0x486e2f;var _0x61bca1,_0x53c2a6;if(((_0x53c2a6=(_0x61bca1=_0x2ca056==null?void 0x0:_0x2ca056[_0x1f590a(0x1a9)])==null?void 0x0:_0x61bca1[_0x1f590a(0x17c)])!=null?_0x53c2a6:0x0)>0x0){const _0x1648e9=(_0x3e4b51,_0x4a352c)=>({'id':_0x3e4b51[_0x1f590a(0x145)],'threadId':_0x3e4b51[_0x1f590a(0x169)],'dT':_0x4e2950(_0x3e4b51[_0x1f590a(0x173)]),'personId':_0x3e4b51[_0x1f590a(0x188)],'resolved':_0x2ca056['solved']===_0x300a5d[_0x1f590a(0x140)],'unitId':_0x210c4d,'subUnitId':_0x29aa50,'text':JSON['parse'](_0x3e4b51['content']),'parentId':_0x4a352c}),_0x2089fb=_0x1648e9(_0x2ca056[_0x1f590a(0x1a9)][0x0]);return{..._0x2089fb,'children':_0x2ca056[_0x1f590a(0x1a9)][_0x1f590a(0x163)](0x1)[_0x1f590a(0x1b3)](_0x42f1c0=>_0x1648e9(_0x42f1c0,_0x2089fb['id']))};}return null;}let _0x52b4bb=class{constructor(_0x2f4ea6,_0x21a619,_0x459de0){const _0x5df01e=_0x486e2f;this['_httpService']=_0x2f4ea6,this['_userService']=_0x21a619,this[_0x5df01e(0x139)]=_0x459de0;}async[_0x486e2f(0x16a)](_0x154fcf){const _0x24c539=_0x486e2f;var _0x381e04,_0x46d0b9;const {parentId:_0x7bf2f4,unitId:_0x4e30eb,text:_0x476c0d,threadId:_0x559ce2}=_0x154fcf,_0x224c76=(_0x46d0b9=(_0x381e04=_0x476c0d[_0x24c539(0x19e)])==null?void 0x0:_0x381e04[_0x24c539(0x194)](_0x2d3e53=>_0x2d3e53['rangeType']===_0x57609a['CustomRangeType'][_0x24c539(0x135)])[_0x24c539(0x1b3)](_0x338dd5=>_0x338dd5[_0x24c539(0x1ac)]))!=null?_0x46d0b9:[],_0x49ffa7=JSON[_0x24c539(0x1ad)](_0x476c0d),_0x4e68fb=(await this['_sessionService'][_0x24c539(0x1b2)](_0x4e30eb))[_0x24c539(0x185)]();if(_0x7bf2f4){const _0x29c577={'memberId':_0x4e68fb,'unitId':_0x4e30eb,'content':_0x49ffa7,'mention':_0x224c76,'threadId':_0x559ce2},_0x16905a=(await this[_0x24c539(0x175)][_0x24c539(0x1a8)]('/universer-api/comment/unit/'+_0x4e30eb+_0x24c539(0x178),{'body':_0x29c577}))[_0x24c539(0x189)][_0x24c539(0x134)];return{..._0x154fcf,'id':_0x16905a['replyId'],'dT':_0x57609a[_0x24c539(0x19f)](+_0x16905a['createTimestamp'])[_0x24c539(0x156)](_0x24c539(0x16d)),'personId':_0x16905a[_0x24c539(0x188)]};}else{const _0x402869={'memberId':_0x4e68fb,'unitId':_0x4e30eb,'content':_0x49ffa7,'mention':_0x224c76},_0x185ac4=await this[_0x24c539(0x175)][_0x24c539(0x1a8)](_0x24c539(0x164)+_0x4e30eb+_0x24c539(0x138),{'body':_0x402869});return _0x46a117(_0x185ac4[_0x24c539(0x189)]['comment'],_0x154fcf);}}async[_0x486e2f(0x1b1)](_0x1ca54a){const _0x5c9ac2=_0x486e2f;var _0x46e015,_0x388115;const {text:_0x4edabb,unitId:_0x26bc76}=_0x1ca54a,_0xfc4ea5=(_0x388115=(_0x46e015=_0x4edabb[_0x5c9ac2(0x19e)])==null?void 0x0:_0x46e015[_0x5c9ac2(0x194)](_0x1623d1=>_0x1623d1[_0x5c9ac2(0x148)]===_0x57609a[_0x5c9ac2(0x1b6)][_0x5c9ac2(0x135)])[_0x5c9ac2(0x1b3)](_0x5b4c48=>_0x5b4c48[_0x5c9ac2(0x1ac)]))!=null?_0x388115:[],_0x25f7b3=JSON[_0x5c9ac2(0x1ad)](_0x4edabb),_0x1f2dfc=_0x1ca54a['threadId'],_0x58baf9=_0x1ca54a['id'],_0x466528={'memberId':(await this[_0x5c9ac2(0x139)][_0x5c9ac2(0x1b2)](_0x26bc76))[_0x5c9ac2(0x185)](),'unitId':_0x26bc76,'threadId':_0x1f2dfc,'mention':_0xfc4ea5,'content':_0x25f7b3,'replyId':_0x58baf9},_0x6575b7=await this[_0x5c9ac2(0x175)][_0x5c9ac2(0x1a8)]('/universer-api/comment/unit/'+_0x26bc76+'/edit',{'body':_0x466528});return!_0x6575b7['body'][_0x5c9ac2(0x1a0)]||_0x6575b7['body'][_0x5c9ac2(0x1a0)][_0x5c9ac2(0x193)]===0x1;}async[_0x486e2f(0x17f)](_0x12dbe4){const _0x8e407f=_0x486e2f,{unitId:_0x2cd664}=_0x12dbe4,_0xbe0e8b=_0x12dbe4[_0x8e407f(0x169)],_0x5cf2e1={'memberId':this['_userService'][_0x8e407f(0x1a1)]()[_0x8e407f(0x131)],'unitId':_0x2cd664,'threadId':_0xbe0e8b,'solved':_0x12dbe4['resolved']?_0x300a5d[_0x8e407f(0x140)]:_0x300a5d[_0x8e407f(0x179)]},_0x5d1f04=await this[_0x8e407f(0x175)][_0x8e407f(0x1a8)]('/universer-api/comment/unit/'+_0x2cd664+'/solved',{'body':_0x5cf2e1});return!_0x5d1f04[_0x8e407f(0x189)][_0x8e407f(0x1a0)]||_0x5d1f04['body'][_0x8e407f(0x1a0)][_0x8e407f(0x193)]===0x1;}async[_0x486e2f(0x15b)](_0x2d3f32,_0x1c2348,_0x4bb488,_0x2ee6dc){const _0x47824c=_0x486e2f,_0xcb856f={'memberId':(await this['_sessionService'][_0x47824c(0x1b2)](_0x2d3f32))[_0x47824c(0x185)](),'threadId':_0x4bb488,'replyId':_0x2ee6dc,'unitId':_0x2d3f32},_0x39beef=await this['_httpService']['post'](_0x47824c(0x164)+_0x2d3f32+_0x47824c(0x14e),{'body':_0xcb856f});return!_0x39beef[_0x47824c(0x189)][_0x47824c(0x1a0)]||_0x39beef['body'][_0x47824c(0x1a0)][_0x47824c(0x193)]===0x1;}async[_0x486e2f(0x16e)](_0x331e16,_0x54996,_0x563fd9){const _0x357292=_0x486e2f,_0xd7347a={'unitId':_0x331e16,'threadId':_0x563fd9},_0x3dd0de=await this[_0x357292(0x175)]['post']('/universer-api/comment/unit/'+_0x331e16+'/list',{'body':_0xd7347a}),_0x162673=_0x563fd9['map'](_0x223662=>_0x1bcd37(_0x3dd0de[_0x357292(0x189)]['comments'][_0x223662],_0x331e16,_0x54996))[_0x357292(0x194)](Boolean);return Object[_0x357292(0x17b)](_0x3dd0de[_0x357292(0x189)]['users'])[_0x357292(0x13d)](_0x2cc217=>{const _0x32b6ee=_0x357292;this['_userService'][_0x32b6ee(0x14b)](_0x2cc217);}),_0x162673;}[_0x486e2f(0x1a4)](_0x30fb99){const _0xdefe1c=_0x486e2f;return{'id':_0x30fb99['id'],'threadId':_0x30fb99[_0xdefe1c(0x169)],'ref':_0x30fb99[_0xdefe1c(0x151)]};}};_0x52b4bb=_0x2d0999([_0x310d43(0x0,_0x57609a[_0x486e2f(0x159)](_0x3d5d51[_0x486e2f(0x16f)])),_0x310d43(0x1,_0x57609a[_0x486e2f(0x159)](_0x57609a[_0x486e2f(0x137)])),_0x310d43(0x2,_0x57609a[_0x486e2f(0x159)](_0x3fde3a[_0x486e2f(0x197)]))],_0x52b4bb);var _0x144d9f=Object[_0x486e2f(0x14d)],_0x3b1f02=(_0x498fa3,_0x4ebd86,_0x212b99,_0xe0db65)=>{const _0x1afecf=_0x486e2f;for(var _0x23722d=_0xe0db65>0x1?void 0x0:_0xe0db65?_0x144d9f(_0x4ebd86,_0x212b99):_0x4ebd86,_0x249c6e=_0x498fa3[_0x1afecf(0x17c)]-0x1,_0x5c1db0;_0x249c6e>=0x0;_0x249c6e--)(_0x5c1db0=_0x498fa3[_0x249c6e])&&(_0x23722d=_0x5c1db0(_0x23722d)||_0x23722d);return _0x23722d;},_0x32b753=(_0x48e343,_0x2212a6)=>(_0x3994b8,_0x36d3f4)=>_0x2212a6(_0x3994b8,_0x36d3f4,_0x48e343);let _0x89b23e=class extends _0x57609a['Disposable']{constructor(_0x112929,_0x552933){const _0x458ea7=_0x486e2f;super(),this[_0x458ea7(0x157)]=_0x112929,this[_0x458ea7(0x13a)]=_0x552933,this[_0x458ea7(0x15a)]();}[_0x486e2f(0x15a)](){const _0x155441=_0x486e2f;this[_0x155441(0x157)][_0x155441(0x181)]=this[_0x155441(0x13a)],this[_0x155441(0x157)][_0x155441(0x13e)]=!0x1;}};_0x89b23e=_0x3b1f02([_0x32b753(0x0,_0x43beee[_0x486e2f(0x18c)]),_0x32b753(0x1,_0x57609a[_0x486e2f(0x159)](_0x52b4bb))],_0x89b23e);var _0x11422d=Object[_0x486e2f(0x13b)],_0x271c15=Object[_0x486e2f(0x14d)],_0x238b4b=(_0x3ef37c,_0x1fa114,_0x51b11c)=>_0x1fa114 in _0x3ef37c?_0x11422d(_0x3ef37c,_0x1fa114,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x51b11c}):_0x3ef37c[_0x1fa114]=_0x51b11c,_0x318f6b=(_0x5ba93a,_0x204e47,_0x2757b9,_0x32fb51)=>{const _0x13f965=_0x486e2f;for(var _0x5ac274=_0x32fb51>0x1?void 0x0:_0x32fb51?_0x271c15(_0x204e47,_0x2757b9):_0x204e47,_0x5302f8=_0x5ba93a[_0x13f965(0x17c)]-0x1,_0x1ee000;_0x5302f8>=0x0;_0x5302f8--)(_0x1ee000=_0x5ba93a[_0x5302f8])&&(_0x5ac274=_0x1ee000(_0x5ac274)||_0x5ac274);return _0x5ac274;},_0x57ee16=(_0x1de799,_0x260d45)=>(_0x4193fa,_0x230422)=>_0x260d45(_0x4193fa,_0x230422,_0x1de799),_0x42223b=(_0x3dd335,_0x313383,_0x5e6fbb)=>_0x238b4b(_0x3dd335,typeof _0x313383!=_0x486e2f(0x133)?_0x313383+'':_0x313383,_0x5e6fbb);_0x2c8503[_0x486e2f(0x15f)]=class extends _0x57609a['Plugin']{constructor(_0x19cb02=_0x125602,_0xc00bec,_0x2eb92f){const _0x43de54=_0x486e2f;super(),this[_0x43de54(0x18f)]=_0x19cb02,this[_0x43de54(0x195)]=_0xc00bec,this[_0x43de54(0x180)]=_0x2eb92f;const {..._0x47cf55}=_0x57609a['merge']({},_0x125602,this[_0x43de54(0x18f)]);this[_0x43de54(0x180)][_0x43de54(0x19b)](_0x520d4d,_0x47cf55);}[_0x486e2f(0x15c)](){[[_0x52b4bb],[_0x89b23e],[_0x766041]]['forEach'](_0x1ac28c=>{const _0x3dce23=_0x1ae1;this['_injector'][_0x3dce23(0x152)](_0x1ac28c);});}['onReady'](){const _0x5f485c=_0x486e2f;this['_injector'][_0x5f485c(0x153)](_0x89b23e),this['_injector'][_0x5f485c(0x153)](_0x766041);}},_0x42223b(_0x2c8503[_0x486e2f(0x15f)],_0x486e2f(0x143),_0x34e907),_0x42223b(_0x2c8503[_0x486e2f(0x15f)],_0x486e2f(0x198),_0x57609a[_0x486e2f(0x19a)][_0x486e2f(0x19d)]),_0x2c8503[_0x486e2f(0x15f)]=_0x318f6b([_0x57609a[_0x486e2f(0x18b)](_0x1d79b6[_0x486e2f(0x141)],_0x3fde3a[_0x486e2f(0x144)],_0x3d7711['UniverLicensePlugin']),_0x57ee16(0x1,_0x57609a[_0x486e2f(0x159)](_0x57609a['Injector'])),_0x57ee16(0x2,_0x57609a[_0x486e2f(0x174)])],_0x2c8503[_0x486e2f(0x15f)]),Object[_0x486e2f(0x13b)](_0x2c8503,Symbol[_0x486e2f(0x168)],{'value':_0x486e2f(0x196)});}));
|
|
1
|
+
function _0x56ab(_0x471bc9,_0x5686ed){const _0x25a912=_0x25a9();return _0x56ab=function(_0x56abbc,_0x5d50a5){_0x56abbc=_0x56abbc-0xee;let _0x109938=_0x25a912[_0x56abbc];return _0x109938;},_0x56ab(_0x471bc9,_0x5686ed);}(function(_0x366883,_0x1f1f41){const _0x1b7e39=_0x56ab,_0x2a860e=_0x366883();while(!![]){try{const _0x5ce1cb=-parseInt(_0x1b7e39(0x16e))/0x1+-parseInt(_0x1b7e39(0x116))/0x2*(parseInt(_0x1b7e39(0x143))/0x3)+-parseInt(_0x1b7e39(0x126))/0x4*(parseInt(_0x1b7e39(0x176))/0x5)+parseInt(_0x1b7e39(0xf7))/0x6*(parseInt(_0x1b7e39(0x13f))/0x7)+parseInt(_0x1b7e39(0x12b))/0x8*(-parseInt(_0x1b7e39(0x135))/0x9)+-parseInt(_0x1b7e39(0x13c))/0xa+parseInt(_0x1b7e39(0x118))/0xb;if(_0x5ce1cb===_0x1f1f41)break;else _0x2a860e['push'](_0x2a860e['shift']());}catch(_0xf2602f){_0x2a860e['push'](_0x2a860e['shift']());}}}(_0x25a9,0x3e2a6),function(_0x4d673b,_0x5468fa){const _0x1b983b=_0x56ab;typeof exports==_0x1b983b(0x119)&&typeof module<'u'?_0x5468fa(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x1b983b(0x130)&&define['amd']?define(['exports',_0x1b983b(0x160),_0x1b983b(0xfb),_0x1b983b(0x16c),_0x1b983b(0xf5),_0x1b983b(0x123),_0x1b983b(0x14c),_0x1b983b(0x109)],_0x5468fa):(_0x4d673b=typeof globalThis<'u'?globalThis:_0x4d673b||self,_0x5468fa(_0x4d673b[_0x1b983b(0x132)]={},_0x4d673b[_0x1b983b(0x13d)],_0x4d673b[_0x1b983b(0x122)],_0x4d673b[_0x1b983b(0x11a)],_0x4d673b['UniverThreadCommentUi'],_0x4d673b[_0x1b983b(0x103)],_0x4d673b[_0x1b983b(0x14c)],_0x4d673b[_0x1b983b(0x10a)]));}(this,function(_0x6df14e,_0x5ee949,_0x4b12ee,_0x1abb0c,_0x1b3bd0,_0x2333db,_0x19affa,_0x2d1d10){'use strict';const _0x4640e0=_0x56ab;const _0x302e71=_0x4640e0(0x152);var _0x4f964b=(_0x300cca=>(_0x300cca[_0x300cca[_0x4640e0(0x145)]=0x0]=_0x4640e0(0x145),_0x300cca[_0x300cca[_0x4640e0(0x10f)]=0x1]=_0x4640e0(0x10f),_0x300cca[_0x300cca[_0x4640e0(0x10b)]=-0x1]=_0x4640e0(0x10b),_0x300cca))(_0x4f964b||{}),_0x46c1be=(_0x31e787=>(_0x31e787[_0x31e787[_0x4640e0(0x178)]=0x0]='Unknown',_0x31e787[_0x31e787[_0x4640e0(0x173)]=0x1]='Add',_0x31e787[_0x31e787[_0x4640e0(0x11d)]=0x2]=_0x4640e0(0x11d),_0x31e787[_0x31e787['Edit']=0x3]=_0x4640e0(0x129),_0x31e787[_0x31e787[_0x4640e0(0x164)]=0x4]=_0x4640e0(0x164),_0x31e787[_0x31e787[_0x4640e0(0x11b)]=0x5]=_0x4640e0(0x11b),_0x31e787[_0x31e787[_0x4640e0(0x10b)]=-0x1]=_0x4640e0(0x10b),_0x31e787))(_0x46c1be||{});const _0x3bd3f6=_0xd5f750=>_0x1abb0c[_0x4640e0(0x10c)](new Date(+_0xd5f750))[_0x4640e0(0x153)](_0x4640e0(0x10d)),_0x386473=async(_0x56a14a,_0x46ac76)=>{const _0x5901cf=_0x4640e0,_0x47e425=_0x56a14a[_0x5901cf(0x15d)](_0x1abb0c[_0x5901cf(0x140)]),_0x30e17b=_0x56a14a['get'](_0x2d1d10[_0x5901cf(0x14b)]);_0x46ac76[_0x5901cf(0x170)](_0x233c82=>{const _0x483f01=_0x5901cf;_0x47e425[_0x483f01(0x101)](_0x233c82)&&_0x46ac76[_0x483f01(0x169)](_0x233c82);}),_0x46ac76[_0x5901cf(0x12d)]&&(await _0x30e17b[_0x5901cf(0x15d)](_0x5901cf(0x16d),{'params':{'userIDs':[..._0x46ac76]}}))['body'][_0x5901cf(0x162)]['forEach'](_0x13a28e=>{const _0xd3f2d6=_0x5901cf;_0x13a28e&&_0x47e425[_0xd3f2d6(0xef)](_0x13a28e);});};var _0x169ba6=Object['getOwnPropertyDescriptor'],_0x3726c6=(_0x4fd7e0,_0x48459a,_0x27bda6,_0x6297fc)=>{const _0x1c2807=_0x4640e0;for(var _0x2a37df=_0x6297fc>0x1?void 0x0:_0x6297fc?_0x169ba6(_0x48459a,_0x27bda6):_0x48459a,_0x55f433=_0x4fd7e0[_0x1c2807(0x157)]-0x1,_0x59f9c7;_0x55f433>=0x0;_0x55f433--)(_0x59f9c7=_0x4fd7e0[_0x55f433])&&(_0x2a37df=_0x59f9c7(_0x2a37df)||_0x2a37df);return _0x2a37df;},_0x38d4f1=(_0x23f6cf,_0x37232b)=>(_0x12ea3a,_0x265653)=>_0x37232b(_0x12ea3a,_0x265653,_0x23f6cf);let _0x15487d=class extends _0x1abb0c['Disposable']{constructor(_0x5e70c6,_0x3d4905,_0x57362a,_0x562689){const _0x45705b=_0x4640e0;super(),this[_0x45705b(0x106)]=_0x5e70c6,this[_0x45705b(0x147)]=_0x3d4905,this[_0x45705b(0x112)]=_0x57362a,this['_injector']=_0x562689,this[_0x45705b(0xee)](),this['_initUserSync']();}[_0x4640e0(0x14a)](){const _0x15affc=_0x4640e0;this[_0x15affc(0x11f)](this[_0x15affc(0x147)][_0x15affc(0x12c)][_0x15affc(0x12f)](_0x19affa[_0x15affc(0x175)](0x10))[_0x15affc(0x15f)](_0x4403bc=>{const _0x5b4de7=_0x15affc,_0x35c780=new Set();_0x4403bc[_0x5b4de7(0x170)](_0x1a93de=>{const _0x3a34d2=_0x5b4de7;switch(_0x1a93de[_0x3a34d2(0x100)]){case _0x3a34d2(0x12a):{const _0x233d37=_0x1a93de['payload']['personId'];_0x35c780[_0x3a34d2(0x12a)](_0x233d37);break;}}}),_0x386473(this[_0x5b4de7(0x144)],_0x35c780);}));}[_0x4640e0(0xee)](){const _0x1bdac9=_0x4640e0;this[_0x1bdac9(0x11f)](this[_0x1bdac9(0x106)][_0x1bdac9(0x12c)]['subscribe'](async _0x3dac1b=>{const _0x11b8c9=_0x1bdac9;var _0x28ceb1,_0x4dcb2c,_0x3cbb86,_0x5268bb;const _0x5d63d3=(_0x28ceb1=this[_0x11b8c9(0x147)][_0x11b8c9(0x108)](_0x3dac1b['unitId'])[_0x11b8c9(0x15e)](_0x3c16f8=>_0x3c16f8[_0x11b8c9(0x179)]===_0x3dac1b[_0x11b8c9(0x179)]))==null?void 0x0:_0x28ceb1[_0x11b8c9(0x120)];if(!_0x5d63d3)return;const {unitId:_0x327ce1,subUnitId:_0x187e41}=_0x5d63d3;switch(_0x3dac1b['user']&&this[_0x11b8c9(0x112)]['addUser'](_0x3dac1b[_0x11b8c9(0xfa)]),_0x3dac1b[_0x11b8c9(0x100)]){case _0x46c1be[_0x11b8c9(0x173)]:break;case _0x46c1be['Reply']:{this[_0x11b8c9(0x147)][_0x11b8c9(0x165)](_0x327ce1,_0x187e41,{'unitId':_0x327ce1,'subUnitId':_0x187e41,'ref':'','id':_0x3dac1b[_0x11b8c9(0x117)],'dT':_0x3bd3f6(+_0x3dac1b[_0x11b8c9(0x141)]),'threadId':_0x3dac1b['threadId'],'personId':(_0x3cbb86=(_0x4dcb2c=_0x3dac1b[_0x11b8c9(0xfa)])==null?void 0x0:_0x4dcb2c[_0x11b8c9(0x125)])!=null?_0x3cbb86:_0x3dac1b[_0x11b8c9(0xff)],'text':JSON[_0x11b8c9(0x115)](_0x3dac1b[_0x11b8c9(0x148)]),'parentId':_0x5d63d3['id']});break;}case _0x46c1be['Delete']:{const _0x2030a0=this[_0x11b8c9(0x147)][_0x11b8c9(0x149)](_0x327ce1,_0x187e41,_0x3dac1b[_0x11b8c9(0x117)]);_0x2030a0&&_0x2030a0[_0x11b8c9(0x121)]&&this['_threadCommentModel'][_0x11b8c9(0x14f)](_0x327ce1,_0x187e41,_0x3dac1b[_0x11b8c9(0x117)]);break;}case _0x46c1be[_0x11b8c9(0x129)]:{this[_0x11b8c9(0x147)][_0x11b8c9(0x172)](_0x327ce1,_0x187e41,{'commentId':_0x3dac1b['replyId'],'text':JSON['parse'](_0x3dac1b[_0x11b8c9(0x148)])});break;}case _0x46c1be[_0x11b8c9(0x11b)]:{const _0x4f0f5d=(_0x5268bb=this[_0x11b8c9(0x147)][_0x11b8c9(0x108)](_0x3dac1b[_0x11b8c9(0x16b)])[_0x11b8c9(0x15e)](_0x8e5e85=>_0x8e5e85[_0x11b8c9(0x179)]===_0x3dac1b[_0x11b8c9(0x179)]))==null?void 0x0:_0x5268bb[_0x11b8c9(0x120)];_0x4f0f5d&&this[_0x11b8c9(0x147)][_0x11b8c9(0x151)](_0x327ce1,_0x187e41,_0x4f0f5d['id'],_0x3dac1b['solved']===_0x4f964b[_0x11b8c9(0x10f)]);break;}}}));}};_0x15487d=_0x3726c6([_0x38d4f1(0x0,_0x1abb0c[_0x4640e0(0x171)](_0x5ee949[_0x4640e0(0x136)])),_0x38d4f1(0x1,_0x1abb0c[_0x4640e0(0x171)](_0x2333db[_0x4640e0(0x13a)])),_0x38d4f1(0x2,_0x1abb0c[_0x4640e0(0x171)](_0x1abb0c[_0x4640e0(0x140)])),_0x38d4f1(0x3,_0x1abb0c[_0x4640e0(0x171)](_0x1abb0c[_0x4640e0(0x15c)]))],_0x15487d);const _0x1239a3=_0x4640e0(0x16a),_0x4d25c5={};var _0x8dc64a=Object[_0x4640e0(0x14d)],_0x2fddeb=(_0x2475f5,_0x4006a4,_0x813567,_0x114c19)=>{for(var _0x20ed2a=_0x114c19>0x1?void 0x0:_0x114c19?_0x8dc64a(_0x4006a4,_0x813567):_0x4006a4,_0x39aa5d=_0x2475f5['length']-0x1,_0x5c79cd;_0x39aa5d>=0x0;_0x39aa5d--)(_0x5c79cd=_0x2475f5[_0x39aa5d])&&(_0x20ed2a=_0x5c79cd(_0x20ed2a)||_0x20ed2a);return _0x20ed2a;},_0x51112c=(_0x3214e0,_0x11034d)=>(_0x50363b,_0xce8d7d)=>_0x11034d(_0x50363b,_0xce8d7d,_0x3214e0);function _0x1ceabd(_0x22b122,_0x8fe12){const _0x5991f9=_0x4640e0,_0x1217e0=_0x22b122[_0x5991f9(0x111)][0x0];return{..._0x8fe12,'id':_0x1217e0[_0x5991f9(0x117)],'resolved':_0x22b122[_0x5991f9(0x161)]===0x1,'dT':_0x3bd3f6(_0x1217e0[_0x5991f9(0x141)]),'personId':_0x1217e0[_0x5991f9(0xff)],'threadId':_0x1217e0[_0x5991f9(0x179)]};}function _0x20c343(_0x496656,_0x457ea7,_0x2110ee){const _0xe4c489=_0x4640e0;var _0x484f1b,_0x17ea3b;if(((_0x17ea3b=(_0x484f1b=_0x496656==null?void 0x0:_0x496656[_0xe4c489(0x111)])==null?void 0x0:_0x484f1b[_0xe4c489(0x157)])!=null?_0x17ea3b:0x0)>0x0){const _0x225965=(_0x13bbc8,_0x4b1b06)=>({'id':_0x13bbc8[_0xe4c489(0x117)],'threadId':_0x13bbc8[_0xe4c489(0x179)],'dT':_0x3bd3f6(_0x13bbc8[_0xe4c489(0x141)]),'personId':_0x13bbc8[_0xe4c489(0xff)],'resolved':_0x496656[_0xe4c489(0x161)]===_0x4f964b[_0xe4c489(0x10f)],'unitId':_0x457ea7,'subUnitId':_0x2110ee,'text':JSON[_0xe4c489(0x115)](_0x13bbc8[_0xe4c489(0x148)]),'parentId':_0x4b1b06}),_0x5c1ed1=_0x225965(_0x496656[_0xe4c489(0x111)][0x0]);return{..._0x5c1ed1,'children':_0x496656[_0xe4c489(0x111)]['slice'](0x1)[_0xe4c489(0x156)](_0xbb3b3d=>_0x225965(_0xbb3b3d,_0x5c1ed1['id']))};}return null;}let _0x3d829a=class{constructor(_0x4d2307,_0x4fad93,_0x9ccafe){const _0x257f94=_0x4640e0;this[_0x257f94(0x14e)]=_0x4d2307,this[_0x257f94(0x112)]=_0x4fad93,this['_sessionService']=_0x9ccafe;}async[_0x4640e0(0x165)](_0x1eadaa){const _0x43d41a=_0x4640e0;var _0x10ead3,_0xb49a04;const {parentId:_0xc1ec2d,unitId:_0x76ab4d,text:_0x5c3c02,threadId:_0x2d206f}=_0x1eadaa,_0x536abe=(_0xb49a04=(_0x10ead3=_0x5c3c02[_0x43d41a(0x102)])==null?void 0x0:_0x10ead3[_0x43d41a(0xf4)](_0x1b3f10=>_0x1b3f10['rangeType']===_0x1abb0c[_0x43d41a(0x128)][_0x43d41a(0x134)])[_0x43d41a(0x156)](_0x5a1624=>_0x5a1624[_0x43d41a(0x105)]))!=null?_0xb49a04:[],_0x48ea40=JSON[_0x43d41a(0x11c)](_0x5c3c02),_0x43105b=(await this[_0x43d41a(0x13b)][_0x43d41a(0x177)](_0x76ab4d))[_0x43d41a(0x11e)]();if(_0xc1ec2d){const _0x47292b={'memberId':_0x43105b,'unitId':_0x76ab4d,'content':_0x48ea40,'mention':_0x536abe,'threadId':_0x2d206f},_0xa242e3=(await this['_httpService'][_0x43d41a(0x113)](_0x43d41a(0x168)+_0x76ab4d+_0x43d41a(0x142),{'body':_0x47292b}))[_0x43d41a(0x13e)][_0x43d41a(0xfe)];return{..._0x1eadaa,'id':_0xa242e3[_0x43d41a(0x117)],'dT':_0x1abb0c[_0x43d41a(0x10c)](+_0xa242e3['createTimestamp'])['format'](_0x43d41a(0x10d)),'personId':_0xa242e3[_0x43d41a(0xff)]};}else{const _0x1c0bc6={'memberId':_0x43105b,'unitId':_0x76ab4d,'content':_0x48ea40,'mention':_0x536abe},_0x5d295e=await this[_0x43d41a(0x14e)]['post'](_0x43d41a(0x168)+_0x76ab4d+'/add',{'body':_0x1c0bc6});return _0x1ceabd(_0x5d295e[_0x43d41a(0x13e)][_0x43d41a(0x155)],_0x1eadaa);}}async[_0x4640e0(0x172)](_0x569f83){const _0x1033f9=_0x4640e0;var _0x40beb4,_0x2792a3;const {text:_0x2a5940,unitId:_0x1f223c}=_0x569f83,_0x46bd1d=(_0x2792a3=(_0x40beb4=_0x2a5940[_0x1033f9(0x102)])==null?void 0x0:_0x40beb4[_0x1033f9(0xf4)](_0x3a5e29=>_0x3a5e29['rangeType']===_0x1abb0c['CustomRangeType'][_0x1033f9(0x134)])[_0x1033f9(0x156)](_0x37c91b=>_0x37c91b[_0x1033f9(0x105)]))!=null?_0x2792a3:[],_0x5cd58e=JSON['stringify'](_0x2a5940),_0x397f0d=_0x569f83[_0x1033f9(0x179)],_0x354c60=_0x569f83['id'],_0x34265c={'memberId':(await this['_sessionService'][_0x1033f9(0x177)](_0x1f223c))[_0x1033f9(0x11e)](),'unitId':_0x1f223c,'threadId':_0x397f0d,'mention':_0x46bd1d,'content':_0x5cd58e,'replyId':_0x354c60},_0x561978=await this[_0x1033f9(0x14e)][_0x1033f9(0x113)](_0x1033f9(0x168)+_0x1f223c+_0x1033f9(0xfc),{'body':_0x34265c});return!_0x561978[_0x1033f9(0x13e)]['error']||_0x561978[_0x1033f9(0x13e)][_0x1033f9(0x150)]['code']===0x1;}async[_0x4640e0(0x151)](_0x8f3c9c){const _0x3eef28=_0x4640e0,{unitId:_0x5952f2}=_0x8f3c9c,_0x50e50c=_0x8f3c9c[_0x3eef28(0x179)],_0x4dd4cd={'memberId':this[_0x3eef28(0x112)][_0x3eef28(0x107)]()[_0x3eef28(0x125)],'unitId':_0x5952f2,'threadId':_0x50e50c,'solved':_0x8f3c9c[_0x3eef28(0xf0)]?_0x4f964b[_0x3eef28(0x10f)]:_0x4f964b[_0x3eef28(0x145)]},_0x28d2c3=await this[_0x3eef28(0x14e)]['post'](_0x3eef28(0x168)+_0x5952f2+_0x3eef28(0x139),{'body':_0x4dd4cd});return!_0x28d2c3[_0x3eef28(0x13e)][_0x3eef28(0x150)]||_0x28d2c3[_0x3eef28(0x13e)][_0x3eef28(0x150)][_0x3eef28(0xfd)]===0x1;}async[_0x4640e0(0x14f)](_0x279cb2,_0x1a3da3,_0x2babee,_0x2c5ed7){const _0x3abd22=_0x4640e0,_0x3b6d3c={'memberId':(await this[_0x3abd22(0x13b)]['requireSession'](_0x279cb2))[_0x3abd22(0x11e)](),'threadId':_0x2babee,'replyId':_0x2c5ed7,'unitId':_0x279cb2},_0x46789c=await this[_0x3abd22(0x14e)][_0x3abd22(0x113)](_0x3abd22(0x168)+_0x279cb2+'/delete',{'body':_0x3b6d3c});return!_0x46789c['body'][_0x3abd22(0x150)]||_0x46789c[_0x3abd22(0x13e)]['error'][_0x3abd22(0xfd)]===0x1;}async[_0x4640e0(0x137)](_0x15969e,_0xafc77b,_0x3ae58b){const _0x6f0b4a=_0x4640e0,_0x3d6269={'unitId':_0x15969e,'threadId':_0x3ae58b},_0x25a845=await this[_0x6f0b4a(0x14e)]['post']('/universer-api/comment/unit/'+_0x15969e+_0x6f0b4a(0x104),{'body':_0x3d6269}),_0x352f3a=_0x3ae58b['map'](_0x3a5745=>_0x20c343(_0x25a845[_0x6f0b4a(0x13e)][_0x6f0b4a(0x167)][_0x3a5745],_0x15969e,_0xafc77b))['filter'](Boolean);return Object[_0x6f0b4a(0x110)](_0x25a845[_0x6f0b4a(0x13e)]['users'])[_0x6f0b4a(0x170)](_0x5387d7=>{const _0x531b10=_0x6f0b4a;this[_0x531b10(0x112)][_0x531b10(0xef)](_0x5387d7);}),_0x352f3a;}[_0x4640e0(0x15b)](_0x22299b){const _0x64ab2c=_0x4640e0;return{'id':_0x22299b['id'],'threadId':_0x22299b['threadId'],'ref':_0x22299b[_0x64ab2c(0x146)]};}};_0x3d829a=_0x2fddeb([_0x51112c(0x0,_0x1abb0c[_0x4640e0(0x171)](_0x2d1d10[_0x4640e0(0x14b)])),_0x51112c(0x1,_0x1abb0c[_0x4640e0(0x171)](_0x1abb0c[_0x4640e0(0x140)])),_0x51112c(0x2,_0x1abb0c[_0x4640e0(0x171)](_0x5ee949[_0x4640e0(0xf3)]))],_0x3d829a);var _0x5d4d29=Object[_0x4640e0(0x14d)],_0xadb1b8=(_0x3c96a1,_0x3dcfed,_0xc42e68,_0x312d72)=>{const _0x3a084a=_0x4640e0;for(var _0x29251a=_0x312d72>0x1?void 0x0:_0x312d72?_0x5d4d29(_0x3dcfed,_0xc42e68):_0x3dcfed,_0x4e5ff3=_0x3c96a1[_0x3a084a(0x157)]-0x1,_0x154c37;_0x4e5ff3>=0x0;_0x4e5ff3--)(_0x154c37=_0x3c96a1[_0x4e5ff3])&&(_0x29251a=_0x154c37(_0x29251a)||_0x29251a);return _0x29251a;},_0x143330=(_0x2be7bc,_0x5e1f9e)=>(_0x1dcdb1,_0x3985b1)=>_0x5e1f9e(_0x1dcdb1,_0x3985b1,_0x2be7bc);let _0x1eb9e7=class extends _0x1abb0c[_0x4640e0(0xf8)]{constructor(_0x4f4c9e,_0x2f14fa){const _0x2e46c9=_0x4640e0;super(),this['_threadCommentDataSourceService']=_0x4f4c9e,this['_threadCommentDataSource']=_0x2f14fa,this[_0x2e46c9(0x163)]();}[_0x4640e0(0x163)](){const _0x2f1854=_0x4640e0;this[_0x2f1854(0x158)][_0x2f1854(0x154)]=this[_0x2f1854(0x12e)],this[_0x2f1854(0x158)]['syncUpdateMutationToColla']=!0x1;}};_0x1eb9e7=_0xadb1b8([_0x143330(0x0,_0x2333db['IThreadCommentDataSourceService']),_0x143330(0x1,_0x1abb0c[_0x4640e0(0x171)](_0x3d829a))],_0x1eb9e7);var _0x226f9e=Object[_0x4640e0(0xf1)],_0x33295a=Object['getOwnPropertyDescriptor'],_0xe79c23=(_0x445898,_0x451bfb,_0x34da65)=>_0x451bfb in _0x445898?_0x226f9e(_0x445898,_0x451bfb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x34da65}):_0x445898[_0x451bfb]=_0x34da65,_0x1c44a7=(_0xef34a7,_0x5b1cca,_0x5c29cb,_0x378b8b)=>{for(var _0x37debc=_0x378b8b>0x1?void 0x0:_0x378b8b?_0x33295a(_0x5b1cca,_0x5c29cb):_0x5b1cca,_0x276e7e=_0xef34a7['length']-0x1,_0x3a2b0a;_0x276e7e>=0x0;_0x276e7e--)(_0x3a2b0a=_0xef34a7[_0x276e7e])&&(_0x37debc=_0x3a2b0a(_0x37debc)||_0x37debc);return _0x37debc;},_0x4a93b9=(_0x482487,_0x421919)=>(_0x555208,_0x5ca049)=>_0x421919(_0x555208,_0x5ca049,_0x482487),_0x440ed7=(_0x2c600f,_0x42da6d,_0x72a460)=>_0xe79c23(_0x2c600f,typeof _0x42da6d!=_0x4640e0(0xf9)?_0x42da6d+'':_0x42da6d,_0x72a460);_0x6df14e[_0x4640e0(0x10e)]=class extends _0x1abb0c[_0x4640e0(0xf2)]{constructor(_0x4666d2=_0x4d25c5,_0xff3b8c,_0x423d7e){const _0x25fc55=_0x4640e0;super(),this[_0x25fc55(0x15a)]=_0x4666d2,this[_0x25fc55(0x144)]=_0xff3b8c,this[_0x25fc55(0x127)]=_0x423d7e;const {..._0x3eecc6}=_0x1abb0c[_0x25fc55(0x114)]({},_0x4d25c5,this[_0x25fc55(0x15a)]);this['_configService']['setConfig'](_0x1239a3,_0x3eecc6);}[_0x4640e0(0x166)](){const _0x39bf92=_0x4640e0;[[_0x3d829a],[_0x1eb9e7],[_0x15487d]][_0x39bf92(0x170)](_0x43af92=>{const _0x4b1fda=_0x39bf92;this[_0x4b1fda(0x144)][_0x4b1fda(0x12a)](_0x43af92);});}[_0x4640e0(0x138)](){const _0x1c91a0=_0x4640e0;this[_0x1c91a0(0x144)][_0x1c91a0(0x15d)](_0x1eb9e7),this[_0x1c91a0(0x144)][_0x1c91a0(0x15d)](_0x15487d);}},_0x440ed7(_0x6df14e[_0x4640e0(0x10e)],_0x4640e0(0x124),_0x302e71),_0x440ed7(_0x6df14e[_0x4640e0(0x10e)],_0x4640e0(0x100),_0x1abb0c[_0x4640e0(0x133)]['UNIVER_UNKNOWN']),_0x6df14e['UniverThreadCommentDataSourcePlugin']=_0x1c44a7([_0x1abb0c[_0x4640e0(0x131)](_0x1b3bd0[_0x4640e0(0x16f)],_0x5ee949['UniverCollaborationClientPlugin'],_0x4b12ee['UniverLicensePlugin']),_0x4a93b9(0x1,_0x1abb0c[_0x4640e0(0x171)](_0x1abb0c[_0x4640e0(0x15c)])),_0x4a93b9(0x2,_0x1abb0c[_0x4640e0(0x174)])],_0x6df14e[_0x4640e0(0x10e)]),Object['defineProperty'](_0x6df14e,Symbol[_0x4640e0(0x159)],{'value':_0x4640e0(0xf6)});}));function _0x25a9(){const _0x289ed6=['/reply','18cXkQeH','_injector','OpenOrReOpen','ref','_threadCommentModel','content','getComment','_initUserSync','HTTPService','rxjs','getOwnPropertyDescriptor','_httpService','deleteComment','error','resolveComment','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','format','dataSource','comment','map','length','_threadCommentDataSourceService','toStringTag','_config','saveCommentToSnapshot','Injector','get','find','subscribe','@univerjs-pro/collaboration-client','solved','users','_initDataSource','Delete','addComment','onStarting','comments','/universer-api/comment/unit/','delete','thread-comment-data-source.config','unitId','@univerjs/core','/universer-api/user/list','401740fFlrTh','UniverThreadCommentUIPlugin','forEach','Inject','updateComment','Add','IConfigService','bufferTime','30EZFMgt','requireSession','Unknown','threadId','_init','addUser','resolved','defineProperty','Plugin','CollaborationSessionService','filter','@univerjs/thread-comment-ui','Module','2326794KBKjfr','Disposable','symbol','user','@univerjs-pro/license','/edit','code','reply','userId','type','getUser','customRanges','UniverThreadComment','/list','rangeId','_commentService','getCurrentUser','getUnit','@univerjs/network','UniverNetwork','UNRECOGNIZED','dayjs','YYYY/MM/DD\x20HH:mm','UniverThreadCommentDataSourcePlugin','Solved','values','replies','_userService','post','merge','parse','13180UYddaC','replyId','14826966Eutema','object','UniverCore','Solve','stringify','Reply','getMemberID','disposeWithMe','root','parentId','UniverProLicense','@univerjs/thread-comment','pluginName','userID','132476yCkGCH','_configService','CustomRangeType','Edit','add','1205416OUKQLQ','commentUpdate$','size','_threadCommentDataSource','pipe','function','DependentOn','UniverProThreadCommentDatasource','UniverInstanceType','COMMENT','27HfAMyA','CommentService','listComments','onReady','/solved','ThreadCommentModel','_sessionService','3890500SFJDwH','UniverProCollaborationClient','body','7dmmyWN','UserManagerService','createTimestamp'];_0x25a9=function(){return _0x289ed6;};return _0x25a9();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.10.6-nightly.
|
|
3
|
+
"version": "0.10.6-nightly.202509060832",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.10.6-nightly.
|
|
49
|
-
"@univerjs-pro/license": "0.10.6-nightly.
|
|
50
|
-
"@univerjs/core": "0.10.6-nightly.
|
|
51
|
-
"@univerjs/network": "0.10.6-nightly.202509060614",
|
|
52
|
-
"@univerjs/thread-comment": "0.10.6-nightly.202509060614",
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.10.6-nightly.202509060832",
|
|
49
|
+
"@univerjs-pro/license": "0.10.6-nightly.202509060832",
|
|
50
|
+
"@univerjs/core": "0.10.6-nightly.202509060832",
|
|
53
51
|
"@univerjs/protocol": "0.1.47-alpha.0",
|
|
54
|
-
"@univerjs/
|
|
52
|
+
"@univerjs/network": "0.10.6-nightly.202509060832",
|
|
53
|
+
"@univerjs/thread-comment": "0.10.6-nightly.202509060832",
|
|
54
|
+
"@univerjs/thread-comment-ui": "0.10.6-nightly.202509060832"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|