@univerjs-pro/thread-comment-datasource 0.6.10-nightly.202504151606 → 0.6.10-nightly.202504161609

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 CHANGED
@@ -1 +1 @@
1
- 'use strict';const _0x1c049f=_0x295f;(function(_0x28ff90,_0xb0ea8e){const _0x2abf20=_0x295f,_0x4a47bc=_0x28ff90();while(!![]){try{const _0x467df3=parseInt(_0x2abf20(0x213))/0x1*(-parseInt(_0x2abf20(0x218))/0x2)+-parseInt(_0x2abf20(0x260))/0x3+-parseInt(_0x2abf20(0x1fd))/0x4*(parseInt(_0x2abf20(0x202))/0x5)+-parseInt(_0x2abf20(0x25e))/0x6*(parseInt(_0x2abf20(0x25a))/0x7)+-parseInt(_0x2abf20(0x21f))/0x8+parseInt(_0x2abf20(0x25d))/0x9+-parseInt(_0x2abf20(0x268))/0xa*(-parseInt(_0x2abf20(0x1ec))/0xb);if(_0x467df3===_0xb0ea8e)break;else _0x4a47bc['push'](_0x4a47bc['shift']());}catch(_0x34158b){_0x4a47bc['push'](_0x4a47bc['shift']());}}}(_0x3a23,0x928c4));Object[_0x1c049f(0x1fc)](exports,Symbol[_0x1c049f(0x212)],{'value':_0x1c049f(0x225)});const b=require(_0x1c049f(0x220)),T=require(_0x1c049f(0x266)),c=require(_0x1c049f(0x243)),j=require(_0x1c049f(0x20d)),M=require(_0x1c049f(0x21c)),w=require(_0x1c049f(0x204)),P=require(_0x1c049f(0x20b)),U=_0x1c049f(0x1eb);var I=(_0x54f33f=>(_0x54f33f[_0x54f33f[_0x1c049f(0x210)]=0x0]=_0x1c049f(0x210),_0x54f33f[_0x54f33f[_0x1c049f(0x201)]=0x1]=_0x1c049f(0x201),_0x54f33f[_0x54f33f['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x54f33f))(I||{}),v=(_0x70358b=>(_0x70358b[_0x70358b['Unknown']=0x0]='Unknown',_0x70358b[_0x70358b[_0x1c049f(0x1f3)]=0x1]=_0x1c049f(0x1f3),_0x70358b[_0x70358b['Reply']=0x2]=_0x1c049f(0x222),_0x70358b[_0x70358b[_0x1c049f(0x255)]=0x3]=_0x1c049f(0x255),_0x70358b[_0x70358b[_0x1c049f(0x1ed)]=0x4]=_0x1c049f(0x1ed),_0x70358b[_0x70358b[_0x1c049f(0x227)]=0x5]=_0x1c049f(0x227),_0x70358b[_0x70358b[_0x1c049f(0x219)]=-0x1]=_0x1c049f(0x219),_0x70358b))(v||{});const f=_0x525d6f=>c['dayjs'](new Date(+_0x525d6f))[_0x1c049f(0x216)](_0x1c049f(0x234)),R=async(_0x1fc6ac,_0x4cb50d)=>{const _0x53c2c0=_0x1c049f,_0x3d1fc0=_0x1fc6ac[_0x53c2c0(0x206)](c[_0x53c2c0(0x241)]),_0x24a257=_0x1fc6ac[_0x53c2c0(0x206)](P['HTTPService']);_0x4cb50d[_0x53c2c0(0x23a)](_0xb9f8a8=>{const _0x37f40c=_0x53c2c0;_0x3d1fc0[_0x37f40c(0x20a)](_0xb9f8a8)&&_0x4cb50d[_0x37f40c(0x1f7)](_0xb9f8a8);}),_0x4cb50d[_0x53c2c0(0x256)]&&(await _0x24a257[_0x53c2c0(0x206)](_0x53c2c0(0x22a),{'params':{'userIDs':[..._0x4cb50d]}}))[_0x53c2c0(0x21b)][_0x53c2c0(0x233)]['forEach'](_0xb146e5=>{_0xb146e5&&_0x3d1fc0['addUser'](_0xb146e5);});};var $=Object[_0x1c049f(0x245)],E=(_0x48414b,_0x118e69,_0x2242b5,_0x43552b)=>{const _0xa2ed9=_0x1c049f;for(var _0xfc72c2=_0x43552b>0x1?void 0x0:_0x43552b?$(_0x118e69,_0x2242b5):_0x118e69,_0x2b5952=_0x48414b[_0xa2ed9(0x24b)]-0x1,_0x59c9ed;_0x2b5952>=0x0;_0x2b5952--)(_0x59c9ed=_0x48414b[_0x2b5952])&&(_0xfc72c2=_0x59c9ed(_0xfc72c2)||_0xfc72c2);return _0xfc72c2;},S=(_0x251473,_0x1aa895)=>(_0x274e3d,_0xd99bf6)=>_0x1aa895(_0x274e3d,_0xd99bf6,_0x251473);let p=class extends c[_0x1c049f(0x1f2)]{constructor(_0x3ec85d,_0x1c0ff8,_0xd13962,_0xb71843){const _0xbd85e4=_0x1c049f;super(),this['_commentService']=_0x3ec85d,this[_0xbd85e4(0x239)]=_0x1c0ff8,this['_userService']=_0xd13962,this[_0xbd85e4(0x1f4)]=_0xb71843,this[_0xbd85e4(0x24a)](),this[_0xbd85e4(0x209)]();}[_0x1c049f(0x209)](){const _0x48bc56=_0x1c049f;this['disposeWithMe'](this['_threadCommentModel'][_0x48bc56(0x258)][_0x48bc56(0x22e)](w[_0x48bc56(0x229)](0x10))[_0x48bc56(0x259)](_0x520c1e=>{const _0x3c9f89=_0x48bc56,_0x2acf5d=new Set();_0x520c1e[_0x3c9f89(0x23a)](_0x51d918=>{const _0x3ea8fe=_0x3c9f89;switch(_0x51d918[_0x3ea8fe(0x214)]){case _0x3ea8fe(0x1ff):{const _0x523833=_0x51d918[_0x3ea8fe(0x217)][_0x3ea8fe(0x23e)];_0x2acf5d['add'](_0x523833);break;}}}),R(this['_injector'],_0x2acf5d);}));}['_init'](){const _0x31c5df=_0x1c049f;this[_0x31c5df(0x21a)](this[_0x31c5df(0x23c)][_0x31c5df(0x258)]['subscribe'](async _0x375480=>{const _0x17eaa9=_0x31c5df;var _0x252b9a,_0x1b92c1,_0x463c11,_0xff0c9f;const _0x2d52ed=(_0x252b9a=this[_0x17eaa9(0x239)][_0x17eaa9(0x25b)](_0x375480[_0x17eaa9(0x237)])[_0x17eaa9(0x1ee)](_0x3d7b59=>_0x3d7b59[_0x17eaa9(0x26a)]===_0x375480[_0x17eaa9(0x26a)]))==null?void 0x0:_0x252b9a[_0x17eaa9(0x207)];if(!_0x2d52ed)return;const {unitId:_0x288f07,subUnitId:_0x20f120}=_0x2d52ed;switch(_0x375480['user']&&this[_0x17eaa9(0x23d)][_0x17eaa9(0x248)](_0x375480[_0x17eaa9(0x1f5)]),_0x375480[_0x17eaa9(0x214)]){case v['Add']:break;case v[_0x17eaa9(0x222)]:{this[_0x17eaa9(0x239)][_0x17eaa9(0x1fb)](_0x288f07,_0x20f120,{'unitId':_0x288f07,'subUnitId':_0x20f120,'ref':'','id':_0x375480[_0x17eaa9(0x22f)],'dT':f(+_0x375480[_0x17eaa9(0x24d)]),'threadId':_0x375480[_0x17eaa9(0x26a)],'personId':(_0x463c11=(_0x1b92c1=_0x375480['user'])==null?void 0x0:_0x1b92c1['userID'])!=null?_0x463c11:_0x375480[_0x17eaa9(0x21d)],'text':JSON['parse'](_0x375480[_0x17eaa9(0x238)]),'parentId':_0x2d52ed['id']});break;}case v[_0x17eaa9(0x1ed)]:{const _0x532b66=this[_0x17eaa9(0x239)][_0x17eaa9(0x22b)](_0x288f07,_0x20f120,_0x375480[_0x17eaa9(0x22f)]);_0x532b66&&_0x532b66[_0x17eaa9(0x22c)]&&this['_threadCommentModel'][_0x17eaa9(0x26b)](_0x288f07,_0x20f120,_0x375480[_0x17eaa9(0x22f)]);break;}case v[_0x17eaa9(0x255)]:{this[_0x17eaa9(0x239)][_0x17eaa9(0x263)](_0x288f07,_0x20f120,{'commentId':_0x375480['replyId'],'text':JSON[_0x17eaa9(0x20f)](_0x375480[_0x17eaa9(0x238)])});break;}case v[_0x17eaa9(0x227)]:{const _0x4eaa37=(_0xff0c9f=this[_0x17eaa9(0x239)][_0x17eaa9(0x25b)](_0x375480['unitId'])[_0x17eaa9(0x1ee)](_0x322fe4=>_0x322fe4[_0x17eaa9(0x26a)]===_0x375480[_0x17eaa9(0x26a)]))==null?void 0x0:_0xff0c9f[_0x17eaa9(0x207)];_0x4eaa37&&this[_0x17eaa9(0x239)]['resolveComment'](_0x288f07,_0x20f120,_0x4eaa37['id'],_0x375480[_0x17eaa9(0x265)]===I[_0x17eaa9(0x201)]);break;}}}));}};function _0x295f(_0x42bdf0,_0x59136b){const _0x3a2384=_0x3a23();return _0x295f=function(_0x295fb2,_0x4259e5){_0x295fb2=_0x295fb2-0x1e7;let _0x57ce92=_0x3a2384[_0x295fb2];return _0x57ce92;},_0x295f(_0x42bdf0,_0x59136b);}p=E([S(0x0,c[_0x1c049f(0x1ef)](b[_0x1c049f(0x1fa)])),S(0x1,c[_0x1c049f(0x1ef)](M[_0x1c049f(0x200)])),S(0x2,c['Inject'](c[_0x1c049f(0x241)])),S(0x3,c[_0x1c049f(0x1ef)](c[_0x1c049f(0x226)]))],p);const q=_0x1c049f(0x224),D={};function _0x3a23(){const _0x39e43f=['DependentOn','userID','/add','reply','merge','Edit','size','_threadCommentDataSource','commentUpdate$','subscribe','7sHNXZb','getUnit','values','9088200CoDAmi','312126ZIpefL','resolved','1872936pqGvzS','UniverThreadCommentDataSourcePlugin','CustomRangeType','updateComment','COMMENT','solved','@univerjs-pro/license','error','22210sLKBRO','/universer-api/comment/unit/','threadId','deleteComment','filter','/list','symbol','getMemberID','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','11066WyHweg','Delete','find','Inject','rangeId','setConfig','Disposable','Add','_injector','user','CollaborationSessionService','delete','comments','_sessionService','CommentService','addComment','defineProperty','12fFcnTV','_threadCommentDataSourceService','add','ThreadCommentModel','Solved','1239760gIlYEl','IConfigService','rxjs','/delete','get','root','listComments','_initUserSync','getUser','@univerjs/network','_config','@univerjs/thread-comment-ui','rangeType','parse','OpenOrReOpen','slice','toStringTag','1074115nzMcrj','type','replies','format','payload','2LvgukQ','UNRECOGNIZED','disposeWithMe','body','@univerjs/thread-comment','userId','/solved','1196496gfAYTr','@univerjs-pro/collaboration-client','requireSession','Reply','onStarting','thread-comment-data-source.config','Module','Injector','Solve','Plugin','bufferTime','/universer-api/user/list','getComment','parentId','UniverCollaborationClientPlugin','pipe','replyId','post','code','saveCommentToSnapshot','users','YYYY/MM/DD\x20HH:mm','map','syncUpdateMutationToColla','unitId','content','_threadCommentModel','forEach','/reply','_commentService','_userService','personId','UniverInstanceType','HTTPService','UserManagerService','dayjs','@univerjs/core','_configService','getOwnPropertyDescriptor','_httpService','UNIVER_UNKNOWN','addUser','customRanges','_init','length','stringify','createTimestamp','_initDataSource','/edit'];_0x3a23=function(){return _0x39e43f;};return _0x3a23();}var A=Object[_0x1c049f(0x245)],x=(_0x36a081,_0x5a5e4f,_0x165fcd,_0x344a7c)=>{const _0x742887=_0x1c049f;for(var _0x2cdee2=_0x344a7c>0x1?void 0x0:_0x344a7c?A(_0x5a5e4f,_0x165fcd):_0x5a5e4f,_0x360c16=_0x36a081[_0x742887(0x24b)]-0x1,_0x22f6bf;_0x360c16>=0x0;_0x360c16--)(_0x22f6bf=_0x36a081[_0x360c16])&&(_0x2cdee2=_0x22f6bf(_0x2cdee2)||_0x2cdee2);return _0x2cdee2;},_=(_0x3892a9,_0x5ae2b2)=>(_0x19826c,_0x280b8d)=>_0x5ae2b2(_0x19826c,_0x280b8d,_0x3892a9);function Y(_0x537a1e,_0x4920ac){const _0x2dbc2f=_0x1c049f,_0x522b7e=_0x537a1e['replies'][0x0];return{..._0x4920ac,'id':_0x522b7e['replyId'],'resolved':_0x537a1e['solved']===0x1,'dT':f(_0x522b7e['createTimestamp']),'personId':_0x522b7e[_0x2dbc2f(0x21d)],'threadId':_0x522b7e[_0x2dbc2f(0x26a)]};}function G(_0x48a56e,_0x33eabf,_0x142b4c){const _0x9834a4=_0x1c049f;var _0xf2a003,_0x5197b1;if(((_0x5197b1=(_0xf2a003=_0x48a56e==null?void 0x0:_0x48a56e[_0x9834a4(0x215)])==null?void 0x0:_0xf2a003[_0x9834a4(0x24b)])!=null?_0x5197b1:0x0)>0x0){const _0x13c3f0=(_0x54cc15,_0x657fc9)=>({'id':_0x54cc15[_0x9834a4(0x22f)],'threadId':_0x54cc15[_0x9834a4(0x26a)],'dT':f(_0x54cc15[_0x9834a4(0x24d)]),'personId':_0x54cc15[_0x9834a4(0x21d)],'resolved':_0x48a56e['solved']===I['Solved'],'unitId':_0x33eabf,'subUnitId':_0x142b4c,'text':JSON[_0x9834a4(0x20f)](_0x54cc15['content']),'parentId':_0x657fc9}),_0x1d14fa=_0x13c3f0(_0x48a56e[_0x9834a4(0x215)][0x0]);return{..._0x1d14fa,'children':_0x48a56e['replies'][_0x9834a4(0x211)](0x1)['map'](_0xeeb172=>_0x13c3f0(_0xeeb172,_0x1d14fa['id']))};}return null;}let g=class{constructor(_0x1f6da3,_0x35e71a,_0x14812c,_0x483cdc){const _0x504ef0=_0x1c049f;this['_httpService']=_0x1f6da3,this[_0x504ef0(0x23d)]=_0x35e71a,this['_sessionService']=_0x14812c,this[_0x504ef0(0x1f4)]=_0x483cdc;}async[_0x1c049f(0x1fb)](_0x1b65f9){const _0x47f937=_0x1c049f;var _0x45c763,_0x402541;const {parentId:_0x4c685c,unitId:_0x3f16fc,text:_0x5a2ff2,threadId:_0x429710}=_0x1b65f9,_0x3a7bce=(_0x402541=(_0x45c763=_0x5a2ff2[_0x47f937(0x249)])==null?void 0x0:_0x45c763[_0x47f937(0x1e7)](_0x76bc75=>_0x76bc75['rangeType']===c[_0x47f937(0x262)][_0x47f937(0x264)])[_0x47f937(0x235)](_0x98bb4d=>_0x98bb4d[_0x47f937(0x1f0)]))!=null?_0x402541:[],_0x1faa0f=JSON[_0x47f937(0x24c)](_0x5a2ff2),_0x9cc9a9=(await this['_sessionService']['requireSession'](_0x3f16fc))['getMemberID']();if(_0x4c685c){const _0xe089ed={'memberId':_0x9cc9a9,'unitId':_0x3f16fc,'content':_0x1faa0f,'mention':_0x3a7bce,'threadId':_0x429710},_0x113f7d=(await this[_0x47f937(0x246)]['post']('/universer-api/comment/unit/'+_0x3f16fc+_0x47f937(0x23b),{'body':_0xe089ed}))[_0x47f937(0x21b)][_0x47f937(0x253)];return{..._0x1b65f9,'id':_0x113f7d[_0x47f937(0x22f)],'dT':c[_0x47f937(0x242)](+_0x113f7d[_0x47f937(0x24d)])[_0x47f937(0x216)](_0x47f937(0x234)),'personId':_0x113f7d[_0x47f937(0x21d)]};}else{const _0x396d3e={'memberId':_0x9cc9a9,'unitId':_0x3f16fc,'content':_0x1faa0f,'mention':_0x3a7bce},_0x107925=await this['_httpService'][_0x47f937(0x230)](_0x47f937(0x269)+_0x3f16fc+_0x47f937(0x252),{'body':_0x396d3e});return Y(_0x107925[_0x47f937(0x21b)]['comment'],_0x1b65f9);}}async['updateComment'](_0x24a4ef){const _0x4541b7=_0x1c049f;var _0x49a692,_0x2c5511;const {text:_0x3ed37f,unitId:_0x3f41bd}=_0x24a4ef,_0x28942b=(_0x2c5511=(_0x49a692=_0x3ed37f[_0x4541b7(0x249)])==null?void 0x0:_0x49a692[_0x4541b7(0x1e7)](_0x217bde=>_0x217bde[_0x4541b7(0x20e)]===c['CustomRangeType'][_0x4541b7(0x264)])['map'](_0x59197b=>_0x59197b[_0x4541b7(0x1f0)]))!=null?_0x2c5511:[],_0x4c3ce4=JSON[_0x4541b7(0x24c)](_0x3ed37f),_0x5b3d7d=_0x24a4ef[_0x4541b7(0x26a)],_0x3f241f=_0x24a4ef['id'],_0x579dfe={'memberId':(await this[_0x4541b7(0x1f9)][_0x4541b7(0x221)](_0x3f41bd))[_0x4541b7(0x1ea)](),'unitId':_0x3f41bd,'threadId':_0x5b3d7d,'mention':_0x28942b,'content':_0x4c3ce4,'replyId':_0x3f241f},_0x3c776c=await this['_httpService'][_0x4541b7(0x230)](_0x4541b7(0x269)+_0x3f41bd+_0x4541b7(0x24f),{'body':_0x579dfe});return!_0x3c776c[_0x4541b7(0x21b)][_0x4541b7(0x267)]||_0x3c776c[_0x4541b7(0x21b)][_0x4541b7(0x267)][_0x4541b7(0x231)]===0x1;}async['resolveComment'](_0x23756e){const _0x45bd41=_0x1c049f,{unitId:_0x37476e}=_0x23756e,_0x106657=_0x23756e[_0x45bd41(0x26a)],_0x503d49={'memberId':this[_0x45bd41(0x23d)]['getCurrentUser']()[_0x45bd41(0x251)],'unitId':_0x37476e,'threadId':_0x106657,'solved':_0x23756e[_0x45bd41(0x25f)]?I[_0x45bd41(0x201)]:I[_0x45bd41(0x210)]},_0x1fbc7e=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x37476e+_0x45bd41(0x21e),{'body':_0x503d49});return!_0x1fbc7e[_0x45bd41(0x21b)][_0x45bd41(0x267)]||_0x1fbc7e[_0x45bd41(0x21b)][_0x45bd41(0x267)]['code']===0x1;}async['deleteComment'](_0x495a87,_0x2ac28d,_0x4429f6,_0x30956c){const _0x5c9a82=_0x1c049f,_0x2d5a85={'memberId':(await this[_0x5c9a82(0x1f9)][_0x5c9a82(0x221)](_0x495a87))[_0x5c9a82(0x1ea)](),'threadId':_0x4429f6,'replyId':_0x30956c,'unitId':_0x495a87},_0x3fe0c5=await this[_0x5c9a82(0x246)][_0x5c9a82(0x230)]('/universer-api/comment/unit/'+_0x495a87+_0x5c9a82(0x205),{'body':_0x2d5a85});return!_0x3fe0c5[_0x5c9a82(0x21b)][_0x5c9a82(0x267)]||_0x3fe0c5['body'][_0x5c9a82(0x267)][_0x5c9a82(0x231)]===0x1;}async[_0x1c049f(0x208)](_0x29fab2,_0x108610,_0x3c90e3){const _0x40fc23=_0x1c049f,_0x23a6e5={'unitId':_0x29fab2,'threadId':_0x3c90e3},_0x58ed17=await this[_0x40fc23(0x246)][_0x40fc23(0x230)]('/universer-api/comment/unit/'+_0x29fab2+_0x40fc23(0x1e8),{'body':_0x23a6e5}),_0x52bf03=_0x3c90e3[_0x40fc23(0x235)](_0x3eeb61=>G(_0x58ed17[_0x40fc23(0x21b)][_0x40fc23(0x1f8)][_0x3eeb61],_0x29fab2,_0x108610))['filter'](Boolean);return Object[_0x40fc23(0x25c)](_0x58ed17[_0x40fc23(0x21b)]['users'])[_0x40fc23(0x23a)](_0x49e7c3=>{const _0x4d1128=_0x40fc23;this[_0x4d1128(0x23d)][_0x4d1128(0x248)](_0x49e7c3);}),_0x52bf03;}[_0x1c049f(0x232)](_0x329722){return{'id':_0x329722['id'],'threadId':_0x329722['threadId'],'ref':_0x329722['ref']};}};g=x([_(0x0,c[_0x1c049f(0x1ef)](P[_0x1c049f(0x240)])),_(0x1,c[_0x1c049f(0x1ef)](c[_0x1c049f(0x241)])),_(0x2,c[_0x1c049f(0x1ef)](b[_0x1c049f(0x1f6)])),_(0x3,c['Inject'](c[_0x1c049f(0x226)]))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x5616a2,_0x216993,_0x577467,_0x3e73f2)=>{for(var _0xac1d11=_0x3e73f2>0x1?void 0x0:_0x3e73f2?H(_0x216993,_0x577467):_0x216993,_0x26a4f6=_0x5616a2['length']-0x1,_0x4ea80c;_0x26a4f6>=0x0;_0x26a4f6--)(_0x4ea80c=_0x5616a2[_0x26a4f6])&&(_0xac1d11=_0x4ea80c(_0xac1d11)||_0xac1d11);return _0xac1d11;},y=(_0xa4cba3,_0x17cc9e)=>(_0x58f0fe,_0x19e3c0)=>_0x17cc9e(_0x58f0fe,_0x19e3c0,_0xa4cba3);let C=class extends c[_0x1c049f(0x1f2)]{constructor(_0x4ba7f6,_0x2f1bc8){const _0x377630=_0x1c049f;super(),this[_0x377630(0x1fe)]=_0x4ba7f6,this[_0x377630(0x257)]=_0x2f1bc8,this['_initDataSource']();}[_0x1c049f(0x24e)](){const _0x47c5e6=_0x1c049f;this[_0x47c5e6(0x1fe)]['dataSource']=this[_0x47c5e6(0x257)],this[_0x47c5e6(0x1fe)][_0x47c5e6(0x236)]=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x1c049f(0x1ef)](g))],C);var F=Object[_0x1c049f(0x1fc)],L=Object[_0x1c049f(0x245)],Z=(_0x4fcf00,_0x521c59,_0x3c594f)=>_0x521c59 in _0x4fcf00?F(_0x4fcf00,_0x521c59,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3c594f}):_0x4fcf00[_0x521c59]=_0x3c594f,W=(_0x5f4ee3,_0x588ac1,_0x23387b,_0x232baa)=>{for(var _0x220a25=_0x232baa>0x1?void 0x0:_0x232baa?L(_0x588ac1,_0x23387b):_0x588ac1,_0x4bce83=_0x5f4ee3['length']-0x1,_0x3ac253;_0x4bce83>=0x0;_0x4bce83--)(_0x3ac253=_0x5f4ee3[_0x4bce83])&&(_0x220a25=_0x3ac253(_0x220a25)||_0x220a25);return _0x220a25;},O=(_0x2ed981,_0x3e24fe)=>(_0x486f96,_0x437855)=>_0x3e24fe(_0x486f96,_0x437855,_0x2ed981),N=(_0x5482bd,_0x2a145b,_0x306916)=>Z(_0x5482bd,typeof _0x2a145b!=_0x1c049f(0x1e9)?_0x2a145b+'':_0x2a145b,_0x306916);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x1c049f(0x228)]{constructor(_0x5aa8c9=D,_0x325dc9,_0x6e69ce){const _0x17907e=_0x1c049f;super(),this[_0x17907e(0x20c)]=_0x5aa8c9,this['_injector']=_0x325dc9,this['_configService']=_0x6e69ce;const {..._0x542964}=c[_0x17907e(0x254)]({},D,this['_config']);this[_0x17907e(0x244)][_0x17907e(0x1f1)](q,_0x542964);}[_0x1c049f(0x223)](){[[g],[C],[p]]['forEach'](_0x21353c=>{const _0x4ce1b0=_0x295f;this[_0x4ce1b0(0x1f4)][_0x4ce1b0(0x1ff)](_0x21353c);});}['onReady'](){const _0x5761ff=_0x1c049f;this[_0x5761ff(0x1f4)][_0x5761ff(0x206)](C),this[_0x5761ff(0x1f4)]['get'](p);}},N(exports['UniverThreadCommentDataSourcePlugin'],'pluginName',U),N(exports[_0x1c049f(0x261)],_0x1c049f(0x214),c[_0x1c049f(0x23f)][_0x1c049f(0x247)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x1c049f(0x250)](j['UniverThreadCommentUIPlugin'],b[_0x1c049f(0x22d)],T['UniverLicensePlugin']),O(0x1,c[_0x1c049f(0x1ef)](c[_0x1c049f(0x226)])),O(0x2,c[_0x1c049f(0x203)])],exports['UniverThreadCommentDataSourcePlugin']);
1
+ 'use strict';const _0x3b22f3=_0x71fa;function _0x71fa(_0xd82213,_0x454498){const _0x4ec559=_0x4ec5();return _0x71fa=function(_0x71fa1e,_0x1e8b3b){_0x71fa1e=_0x71fa1e-0xad;let _0x5af1f5=_0x4ec559[_0x71fa1e];return _0x5af1f5;},_0x71fa(_0xd82213,_0x454498);}(function(_0x9a32a6,_0x31834e){const _0x2ba18c=_0x71fa,_0x1b0e53=_0x9a32a6();while(!![]){try{const _0x18dcca=-parseInt(_0x2ba18c(0x122))/0x1*(parseInt(_0x2ba18c(0xc6))/0x2)+parseInt(_0x2ba18c(0x105))/0x3*(-parseInt(_0x2ba18c(0x118))/0x4)+-parseInt(_0x2ba18c(0x108))/0x5+-parseInt(_0x2ba18c(0xe8))/0x6+-parseInt(_0x2ba18c(0xae))/0x7+-parseInt(_0x2ba18c(0x111))/0x8+parseInt(_0x2ba18c(0xcf))/0x9*(parseInt(_0x2ba18c(0x123))/0xa);if(_0x18dcca===_0x31834e)break;else _0x1b0e53['push'](_0x1b0e53['shift']());}catch(_0x4f0ff9){_0x1b0e53['push'](_0x1b0e53['shift']());}}}(_0x4ec5,0x5de12));Object['defineProperty'](exports,Symbol['toStringTag'],{'value':_0x3b22f3(0xb6)});const b=require(_0x3b22f3(0x10e)),T=require('@univerjs-pro/license'),c=require(_0x3b22f3(0x110)),j=require(_0x3b22f3(0xbe)),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require(_0x3b22f3(0xe1)),U=_0x3b22f3(0xbb);var I=(_0x3eb959=>(_0x3eb959[_0x3eb959[_0x3b22f3(0xd9)]=0x0]='OpenOrReOpen',_0x3eb959[_0x3eb959[_0x3b22f3(0xb9)]=0x1]=_0x3b22f3(0xb9),_0x3eb959[_0x3eb959['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x3eb959))(I||{}),v=(_0x28099f=>(_0x28099f[_0x28099f['Unknown']=0x0]=_0x3b22f3(0xd7),_0x28099f[_0x28099f[_0x3b22f3(0xdd)]=0x1]='Add',_0x28099f[_0x28099f[_0x3b22f3(0xf5)]=0x2]='Reply',_0x28099f[_0x28099f[_0x3b22f3(0xfd)]=0x3]='Edit',_0x28099f[_0x28099f[_0x3b22f3(0xe5)]=0x4]=_0x3b22f3(0xe5),_0x28099f[_0x28099f[_0x3b22f3(0xb8)]=0x5]=_0x3b22f3(0xb8),_0x28099f[_0x28099f[_0x3b22f3(0xb4)]=-0x1]=_0x3b22f3(0xb4),_0x28099f))(v||{});const f=_0x5d1449=>c[_0x3b22f3(0x107)](new Date(+_0x5d1449))['format'](_0x3b22f3(0x103)),R=async(_0xdc93a2,_0x21ec94)=>{const _0x53e0a6=_0x3b22f3,_0x1374a5=_0xdc93a2['get'](c[_0x53e0a6(0x115)]),_0x553545=_0xdc93a2[_0x53e0a6(0xc4)](P[_0x53e0a6(0xfc)]);_0x21ec94[_0x53e0a6(0xcc)](_0x419095=>{const _0x4ab1bb=_0x53e0a6;_0x1374a5[_0x4ab1bb(0xb2)](_0x419095)&&_0x21ec94[_0x4ab1bb(0xe7)](_0x419095);}),_0x21ec94[_0x53e0a6(0xf4)]&&(await _0x553545[_0x53e0a6(0xc4)](_0x53e0a6(0x126),{'params':{'userIDs':[..._0x21ec94]}}))[_0x53e0a6(0x113)]['users'][_0x53e0a6(0xcc)](_0x56a575=>{const _0x4fdb33=_0x53e0a6;_0x56a575&&_0x1374a5[_0x4fdb33(0xcb)](_0x56a575);});};var $=Object['getOwnPropertyDescriptor'],E=(_0xf68bf7,_0x4045eb,_0x231dc7,_0x366575)=>{for(var _0x3ba9c2=_0x366575>0x1?void 0x0:_0x366575?$(_0x4045eb,_0x231dc7):_0x4045eb,_0x444a29=_0xf68bf7['length']-0x1,_0x121ce7;_0x444a29>=0x0;_0x444a29--)(_0x121ce7=_0xf68bf7[_0x444a29])&&(_0x3ba9c2=_0x121ce7(_0x3ba9c2)||_0x3ba9c2);return _0x3ba9c2;},S=(_0x2655d3,_0x4ec943)=>(_0x1a8839,_0x1492ea)=>_0x4ec943(_0x1a8839,_0x1492ea,_0x2655d3);let p=class extends c[_0x3b22f3(0xdb)]{constructor(_0x2cade8,_0x5bec11,_0x59447a,_0xbf18dd){const _0xd5fd9a=_0x3b22f3;super(),this[_0xd5fd9a(0xf9)]=_0x2cade8,this['_threadCommentModel']=_0x5bec11,this[_0xd5fd9a(0x102)]=_0x59447a,this[_0xd5fd9a(0x106)]=_0xbf18dd,this[_0xd5fd9a(0x121)](),this[_0xd5fd9a(0xc7)]();}[_0x3b22f3(0xc7)](){const _0x11611c=_0x3b22f3;this[_0x11611c(0xb5)](this[_0x11611c(0xd6)][_0x11611c(0x109)][_0x11611c(0xe4)](w['bufferTime'](0x10))[_0x11611c(0xcd)](_0x3653d9=>{const _0x9d002a=_0x11611c,_0x556af7=new Set();_0x3653d9[_0x9d002a(0xcc)](_0x1336b9=>{const _0x11beac=_0x9d002a;switch(_0x1336b9[_0x11beac(0x124)]){case _0x11beac(0xf0):{const _0x465cb7=_0x1336b9['payload'][_0x11beac(0xe6)];_0x556af7[_0x11beac(0xf0)](_0x465cb7);break;}}}),R(this['_injector'],_0x556af7);}));}['_init'](){const _0x431ef0=_0x3b22f3;this[_0x431ef0(0xb5)](this['_commentService'][_0x431ef0(0x109)]['subscribe'](async _0x218b28=>{const _0x12f6fb=_0x431ef0;var _0xadf202,_0x344eee,_0x54ad40,_0x31516f;const _0x200991=(_0xadf202=this['_threadCommentModel'][_0x12f6fb(0xc5)](_0x218b28[_0x12f6fb(0xf2)])['find'](_0x1b159e=>_0x1b159e[_0x12f6fb(0x11b)]===_0x218b28['threadId']))==null?void 0x0:_0xadf202[_0x12f6fb(0x10b)];if(!_0x200991)return;const {unitId:_0x2efd13,subUnitId:_0x247e9a}=_0x200991;switch(_0x218b28[_0x12f6fb(0xdf)]&&this[_0x12f6fb(0x102)][_0x12f6fb(0xcb)](_0x218b28[_0x12f6fb(0xdf)]),_0x218b28[_0x12f6fb(0x124)]){case v[_0x12f6fb(0xdd)]:break;case v[_0x12f6fb(0xf5)]:{this[_0x12f6fb(0xd6)][_0x12f6fb(0xde)](_0x2efd13,_0x247e9a,{'unitId':_0x2efd13,'subUnitId':_0x247e9a,'ref':'','id':_0x218b28[_0x12f6fb(0xec)],'dT':f(+_0x218b28[_0x12f6fb(0xe3)]),'threadId':_0x218b28[_0x12f6fb(0x11b)],'personId':(_0x54ad40=(_0x344eee=_0x218b28['user'])==null?void 0x0:_0x344eee[_0x12f6fb(0x112)])!=null?_0x54ad40:_0x218b28[_0x12f6fb(0x125)],'text':JSON[_0x12f6fb(0xdc)](_0x218b28[_0x12f6fb(0xc8)]),'parentId':_0x200991['id']});break;}case v[_0x12f6fb(0xe5)]:{const _0x2acfbf=this[_0x12f6fb(0xd6)]['getComment'](_0x2efd13,_0x247e9a,_0x218b28[_0x12f6fb(0xec)]);_0x2acfbf&&_0x2acfbf[_0x12f6fb(0xda)]&&this[_0x12f6fb(0xd6)][_0x12f6fb(0xb0)](_0x2efd13,_0x247e9a,_0x218b28[_0x12f6fb(0xec)]);break;}case v['Edit']:{this['_threadCommentModel'][_0x12f6fb(0xed)](_0x2efd13,_0x247e9a,{'commentId':_0x218b28[_0x12f6fb(0xec)],'text':JSON[_0x12f6fb(0xdc)](_0x218b28[_0x12f6fb(0xc8)])});break;}case v[_0x12f6fb(0xb8)]:{const _0x48ccf5=(_0x31516f=this[_0x12f6fb(0xd6)]['getUnit'](_0x218b28[_0x12f6fb(0xf2)])[_0x12f6fb(0x11a)](_0x9dace9=>_0x9dace9[_0x12f6fb(0x11b)]===_0x218b28[_0x12f6fb(0x11b)]))==null?void 0x0:_0x31516f[_0x12f6fb(0x10b)];_0x48ccf5&&this[_0x12f6fb(0xd6)][_0x12f6fb(0xbd)](_0x2efd13,_0x247e9a,_0x48ccf5['id'],_0x218b28[_0x12f6fb(0xbf)]===I[_0x12f6fb(0xb9)]);break;}}}));}};p=E([S(0x0,c['Inject'](b[_0x3b22f3(0xb1)])),S(0x1,c[_0x3b22f3(0xd0)](M['ThreadCommentModel'])),S(0x2,c[_0x3b22f3(0xd0)](c[_0x3b22f3(0x115)])),S(0x3,c[_0x3b22f3(0xd0)](c['Injector']))],p);const q=_0x3b22f3(0xfe),D={};var A=Object[_0x3b22f3(0x10c)],x=(_0x165636,_0x291d60,_0x3e54f5,_0x8629cd)=>{const _0x25909e=_0x3b22f3;for(var _0x2c4f52=_0x8629cd>0x1?void 0x0:_0x8629cd?A(_0x291d60,_0x3e54f5):_0x291d60,_0x432e1c=_0x165636[_0x25909e(0xb7)]-0x1,_0x23ff40;_0x432e1c>=0x0;_0x432e1c--)(_0x23ff40=_0x165636[_0x432e1c])&&(_0x2c4f52=_0x23ff40(_0x2c4f52)||_0x2c4f52);return _0x2c4f52;},_=(_0x5d16cc,_0x3338d1)=>(_0x17b351,_0x24ad47)=>_0x3338d1(_0x17b351,_0x24ad47,_0x5d16cc);function Y(_0x230df6,_0x2f879b){const _0x4bbf62=_0x3b22f3,_0x17eca0=_0x230df6[_0x4bbf62(0xc1)][0x0];return{..._0x2f879b,'id':_0x17eca0[_0x4bbf62(0xec)],'resolved':_0x230df6[_0x4bbf62(0xbf)]===0x1,'dT':f(_0x17eca0['createTimestamp']),'personId':_0x17eca0['userId'],'threadId':_0x17eca0[_0x4bbf62(0x11b)]};}function G(_0x4ffa34,_0x3dd48e,_0x455b08){const _0x4f72d3=_0x3b22f3;var _0x18c0c4,_0x1ddae8;if(((_0x1ddae8=(_0x18c0c4=_0x4ffa34==null?void 0x0:_0x4ffa34[_0x4f72d3(0xc1)])==null?void 0x0:_0x18c0c4[_0x4f72d3(0xb7)])!=null?_0x1ddae8:0x0)>0x0){const _0x581937=(_0x42ca44,_0x34c7eb)=>({'id':_0x42ca44['replyId'],'threadId':_0x42ca44[_0x4f72d3(0x11b)],'dT':f(_0x42ca44[_0x4f72d3(0xe3)]),'personId':_0x42ca44[_0x4f72d3(0x125)],'resolved':_0x4ffa34[_0x4f72d3(0xbf)]===I['Solved'],'unitId':_0x3dd48e,'subUnitId':_0x455b08,'text':JSON[_0x4f72d3(0xdc)](_0x42ca44[_0x4f72d3(0xc8)]),'parentId':_0x34c7eb}),_0x3b4819=_0x581937(_0x4ffa34[_0x4f72d3(0xc1)][0x0]);return{..._0x3b4819,'children':_0x4ffa34[_0x4f72d3(0xc1)]['slice'](0x1)[_0x4f72d3(0xd8)](_0x26f150=>_0x581937(_0x26f150,_0x3b4819['id']))};}return null;}function _0x4ec5(){const _0x2ddb3e=['/delete','_commentService','getCurrentUser','syncUpdateMutationToColla','HTTPService','Edit','thread-comment-data-source.config','CollaborationSessionService','Plugin','UNIVER_UNKNOWN','_userService','YYYY/MM/DD\x20HH:mm','dataSource','12hnxkEQ','_injector','dayjs','3411430krrGAy','commentUpdate$','rangeId','root','getOwnPropertyDescriptor','comments','@univerjs-pro/collaboration-client','/edit','@univerjs/core','5543160zjxtZi','userID','body','comment','UserManagerService','requireSession','listComments','670504XZGiLV','rangeType','find','threadId','/universer-api/comment/unit/','merge','users','/solved','filter','_init','664252gsbnoO','180GTnXfK','type','userId','/universer-api/user/list','_threadCommentDataSource','_configService','reply','3107846lbOjIi','/add','deleteComment','CommentService','getUser','UniverLicensePlugin','UNRECOGNIZED','disposeWithMe','Module','length','Solve','Solved','pluginName','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','UniverThreadCommentDataSourcePlugin','resolveComment','@univerjs/thread-comment-ui','solved','error','replies','_sessionService','ref','get','getUnit','2muVsxV','_initUserSync','content','Injector','CustomRangeType','addUser','forEach','subscribe','format','2003031aNWDRk','Inject','_initDataSource','_config','IConfigService','onReady','stringify','_threadCommentModel','Unknown','map','OpenOrReOpen','parentId','Disposable','parse','Add','addComment','user','_threadCommentDataSourceService','@univerjs/network','setConfig','createTimestamp','pipe','Delete','personId','delete','2805702WBOHra','onStarting','/list','COMMENT','replyId','updateComment','customRanges','getMemberID','add','_httpService','unitId','IThreadCommentDataSourceService','size','Reply','post','code'];_0x4ec5=function(){return _0x2ddb3e;};return _0x4ec5();}let g=class{constructor(_0x52d356,_0x29fbe8,_0x48c260,_0x1532ac){const _0x465256=_0x3b22f3;this[_0x465256(0xf1)]=_0x52d356,this[_0x465256(0x102)]=_0x29fbe8,this[_0x465256(0xc2)]=_0x48c260,this[_0x465256(0x106)]=_0x1532ac;}async['addComment'](_0x334bf6){const _0x10267c=_0x3b22f3;var _0x45e890,_0x4fc035;const {parentId:_0xa22467,unitId:_0x461964,text:_0x706879,threadId:_0x1bb77d}=_0x334bf6,_0x52b02a=(_0x4fc035=(_0x45e890=_0x706879['customRanges'])==null?void 0x0:_0x45e890[_0x10267c(0x120)](_0x51e3b0=>_0x51e3b0[_0x10267c(0x119)]===c[_0x10267c(0xca)][_0x10267c(0xeb)])['map'](_0x5bcefc=>_0x5bcefc[_0x10267c(0x10a)]))!=null?_0x4fc035:[],_0x226520=JSON[_0x10267c(0xd5)](_0x706879),_0x14b381=(await this['_sessionService'][_0x10267c(0x116)](_0x461964))[_0x10267c(0xef)]();if(_0xa22467){const _0x57eedf={'memberId':_0x14b381,'unitId':_0x461964,'content':_0x226520,'mention':_0x52b02a,'threadId':_0x1bb77d},_0x44105b=(await this[_0x10267c(0xf1)][_0x10267c(0xf6)]('/universer-api/comment/unit/'+_0x461964+'/reply',{'body':_0x57eedf}))[_0x10267c(0x113)][_0x10267c(0xad)];return{..._0x334bf6,'id':_0x44105b[_0x10267c(0xec)],'dT':c[_0x10267c(0x107)](+_0x44105b[_0x10267c(0xe3)])[_0x10267c(0xce)](_0x10267c(0x103)),'personId':_0x44105b['userId']};}else{const _0xb2715b={'memberId':_0x14b381,'unitId':_0x461964,'content':_0x226520,'mention':_0x52b02a},_0x36e6b5=await this[_0x10267c(0xf1)][_0x10267c(0xf6)](_0x10267c(0x11c)+_0x461964+_0x10267c(0xaf),{'body':_0xb2715b});return Y(_0x36e6b5[_0x10267c(0x113)][_0x10267c(0x114)],_0x334bf6);}}async[_0x3b22f3(0xed)](_0x5d40fb){const _0x56399c=_0x3b22f3;var _0x62fe94,_0x4da103;const {text:_0x4eb3d1,unitId:_0x446db8}=_0x5d40fb,_0x624b76=(_0x4da103=(_0x62fe94=_0x4eb3d1[_0x56399c(0xee)])==null?void 0x0:_0x62fe94['filter'](_0x51b3cf=>_0x51b3cf[_0x56399c(0x119)]===c['CustomRangeType'][_0x56399c(0xeb)])[_0x56399c(0xd8)](_0x9db7c2=>_0x9db7c2[_0x56399c(0x10a)]))!=null?_0x4da103:[],_0x38e530=JSON['stringify'](_0x4eb3d1),_0x576ca9=_0x5d40fb[_0x56399c(0x11b)],_0x3a0e08=_0x5d40fb['id'],_0x45d8d2={'memberId':(await this[_0x56399c(0xc2)][_0x56399c(0x116)](_0x446db8))[_0x56399c(0xef)](),'unitId':_0x446db8,'threadId':_0x576ca9,'mention':_0x624b76,'content':_0x38e530,'replyId':_0x3a0e08},_0x339e7c=await this[_0x56399c(0xf1)][_0x56399c(0xf6)](_0x56399c(0x11c)+_0x446db8+_0x56399c(0x10f),{'body':_0x45d8d2});return!_0x339e7c[_0x56399c(0x113)][_0x56399c(0xc0)]||_0x339e7c[_0x56399c(0x113)][_0x56399c(0xc0)]['code']===0x1;}async['resolveComment'](_0x153c3f){const _0x276aaf=_0x3b22f3,{unitId:_0x2845aa}=_0x153c3f,_0x469e57=_0x153c3f[_0x276aaf(0x11b)],_0x2b6929={'memberId':this[_0x276aaf(0x102)][_0x276aaf(0xfa)]()[_0x276aaf(0x112)],'unitId':_0x2845aa,'threadId':_0x469e57,'solved':_0x153c3f['resolved']?I['Solved']:I[_0x276aaf(0xd9)]},_0x434bfc=await this[_0x276aaf(0xf1)]['post'](_0x276aaf(0x11c)+_0x2845aa+_0x276aaf(0x11f),{'body':_0x2b6929});return!_0x434bfc[_0x276aaf(0x113)][_0x276aaf(0xc0)]||_0x434bfc['body'][_0x276aaf(0xc0)][_0x276aaf(0xf7)]===0x1;}async['deleteComment'](_0x1649c3,_0x55b40f,_0x1a0d8a,_0x16aa99){const _0x43e9fa=_0x3b22f3,_0x4e7609={'memberId':(await this[_0x43e9fa(0xc2)][_0x43e9fa(0x116)](_0x1649c3))[_0x43e9fa(0xef)](),'threadId':_0x1a0d8a,'replyId':_0x16aa99,'unitId':_0x1649c3},_0x2e7416=await this[_0x43e9fa(0xf1)][_0x43e9fa(0xf6)](_0x43e9fa(0x11c)+_0x1649c3+_0x43e9fa(0xf8),{'body':_0x4e7609});return!_0x2e7416[_0x43e9fa(0x113)][_0x43e9fa(0xc0)]||_0x2e7416[_0x43e9fa(0x113)][_0x43e9fa(0xc0)][_0x43e9fa(0xf7)]===0x1;}async[_0x3b22f3(0x117)](_0x5fee09,_0x2dff52,_0x376f6e){const _0x37569b=_0x3b22f3,_0x3dadf8={'unitId':_0x5fee09,'threadId':_0x376f6e},_0x4cd51d=await this[_0x37569b(0xf1)]['post'](_0x37569b(0x11c)+_0x5fee09+_0x37569b(0xea),{'body':_0x3dadf8}),_0x3a64c6=_0x376f6e[_0x37569b(0xd8)](_0x3e7bf3=>G(_0x4cd51d[_0x37569b(0x113)][_0x37569b(0x10d)][_0x3e7bf3],_0x5fee09,_0x2dff52))[_0x37569b(0x120)](Boolean);return Object['values'](_0x4cd51d[_0x37569b(0x113)][_0x37569b(0x11e)])['forEach'](_0x1368e0=>{const _0x5118ef=_0x37569b;this[_0x5118ef(0x102)][_0x5118ef(0xcb)](_0x1368e0);}),_0x3a64c6;}['saveCommentToSnapshot'](_0xb2a01d){const _0x4ddec4=_0x3b22f3;return{'id':_0xb2a01d['id'],'threadId':_0xb2a01d[_0x4ddec4(0x11b)],'ref':_0xb2a01d[_0x4ddec4(0xc3)]};}};g=x([_(0x0,c[_0x3b22f3(0xd0)](P[_0x3b22f3(0xfc)])),_(0x1,c['Inject'](c['UserManagerService'])),_(0x2,c['Inject'](b[_0x3b22f3(0xff)])),_(0x3,c['Inject'](c['Injector']))],g);var H=Object[_0x3b22f3(0x10c)],J=(_0x21c944,_0x2bcd09,_0x342fb1,_0x25b29b)=>{const _0x19c23f=_0x3b22f3;for(var _0x594246=_0x25b29b>0x1?void 0x0:_0x25b29b?H(_0x2bcd09,_0x342fb1):_0x2bcd09,_0x346edc=_0x21c944[_0x19c23f(0xb7)]-0x1,_0x324c43;_0x346edc>=0x0;_0x346edc--)(_0x324c43=_0x21c944[_0x346edc])&&(_0x594246=_0x324c43(_0x594246)||_0x594246);return _0x594246;},y=(_0x2b9b1e,_0x14d127)=>(_0x133f28,_0x52161a)=>_0x14d127(_0x133f28,_0x52161a,_0x2b9b1e);let C=class extends c[_0x3b22f3(0xdb)]{constructor(_0xadeea,_0xeb7e3b){const _0x21057e=_0x3b22f3;super(),this[_0x21057e(0xe0)]=_0xadeea,this[_0x21057e(0x127)]=_0xeb7e3b,this[_0x21057e(0xd1)]();}[_0x3b22f3(0xd1)](){const _0x3adcb5=_0x3b22f3;this[_0x3adcb5(0xe0)][_0x3adcb5(0x104)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x3adcb5(0xfb)]=!0x1;}};C=J([y(0x0,M[_0x3b22f3(0xf3)]),y(0x1,c[_0x3b22f3(0xd0)](g))],C);var F=Object['defineProperty'],L=Object['getOwnPropertyDescriptor'],Z=(_0x1be736,_0x4cddaf,_0x56b4ca)=>_0x4cddaf in _0x1be736?F(_0x1be736,_0x4cddaf,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x56b4ca}):_0x1be736[_0x4cddaf]=_0x56b4ca,W=(_0x4ffee6,_0x50178c,_0x4841fa,_0x3922c9)=>{for(var _0x392c8c=_0x3922c9>0x1?void 0x0:_0x3922c9?L(_0x50178c,_0x4841fa):_0x50178c,_0x26aa8e=_0x4ffee6['length']-0x1,_0xfafd15;_0x26aa8e>=0x0;_0x26aa8e--)(_0xfafd15=_0x4ffee6[_0x26aa8e])&&(_0x392c8c=_0xfafd15(_0x392c8c)||_0x392c8c);return _0x392c8c;},O=(_0x1bea6f,_0x417882)=>(_0x4cc2f4,_0x3e6407)=>_0x417882(_0x4cc2f4,_0x3e6407,_0x1bea6f),N=(_0x1777c9,_0x12a953,_0x251850)=>Z(_0x1777c9,typeof _0x12a953!='symbol'?_0x12a953+'':_0x12a953,_0x251850);exports[_0x3b22f3(0xbc)]=class extends c[_0x3b22f3(0x100)]{constructor(_0x5a5159=D,_0x548120,_0x523fa5){const _0x45db36=_0x3b22f3;super(),this['_config']=_0x5a5159,this[_0x45db36(0x106)]=_0x548120,this[_0x45db36(0x128)]=_0x523fa5;const {..._0x54c8f2}=c[_0x45db36(0x11d)]({},D,this[_0x45db36(0xd2)]);this['_configService'][_0x45db36(0xe2)](q,_0x54c8f2);}[_0x3b22f3(0xe9)](){const _0x2fcb05=_0x3b22f3;[[g],[C],[p]][_0x2fcb05(0xcc)](_0x44b28c=>{this['_injector']['add'](_0x44b28c);});}[_0x3b22f3(0xd4)](){const _0x34ab38=_0x3b22f3;this[_0x34ab38(0x106)][_0x34ab38(0xc4)](C),this[_0x34ab38(0x106)]['get'](p);}},N(exports[_0x3b22f3(0xbc)],_0x3b22f3(0xba),U),N(exports[_0x3b22f3(0xbc)],'type',c['UniverInstanceType'][_0x3b22f3(0x101)]),exports[_0x3b22f3(0xbc)]=W([c['DependentOn'](j['UniverThreadCommentUIPlugin'],b['UniverCollaborationClientPlugin'],T[_0x3b22f3(0xb3)]),O(0x1,c[_0x3b22f3(0xd0)](c[_0x3b22f3(0xc9)])),O(0x2,c[_0x3b22f3(0xd3)])],exports['UniverThreadCommentDataSourcePlugin']);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x170a12=_0x413c;(function(_0x28507b,_0x41102d){const _0xef12a7=_0x413c,_0x436a77=_0x28507b();while(!![]){try{const _0x1b8321=-parseInt(_0xef12a7(0xd0))/0x1*(parseInt(_0xef12a7(0x11c))/0x2)+parseInt(_0xef12a7(0x10d))/0x3+parseInt(_0xef12a7(0x101))/0x4*(parseInt(_0xef12a7(0xc0))/0x5)+parseInt(_0xef12a7(0xf3))/0x6*(parseInt(_0xef12a7(0xea))/0x7)+-parseInt(_0xef12a7(0xe7))/0x8+-parseInt(_0xef12a7(0xb5))/0x9*(-parseInt(_0xef12a7(0xee))/0xa)+-parseInt(_0xef12a7(0xdf))/0xb;if(_0x1b8321===_0x41102d)break;else _0x436a77['push'](_0x436a77['shift']());}catch(_0x3b80fc){_0x436a77['push'](_0x436a77['shift']());}}}(_0x49b9,0xbcfa2));function _0x49b9(){const _0xb5011a=['UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','4673024EKTpjc','commentUpdate$','code','40082sBcgsl','format','onStarting','threadId','944310OLszVk','getMemberID','values','/reply','getOwnPropertyDescriptor','390nrEsLG','/delete','root','Solve','replyId','_httpService','_sessionService','_initDataSource','/universer-api/user/list','rangeId','/list','_threadCommentDataSource','/solved','Edit','1764712lnPhdQ','delete','customRanges','Reply','/universer-api/comment/unit/','userID','unitId','ref','post','error','updateComment','subscribe','4386057eVrRpB','Unknown','symbol','dataSource','parentId','comment','_configService','body','getUser','addUser','/add','_injector','thread-comment-data-source.config','length','getUnit','4xpdRxZ','comments','solved','_commentService','27kMBEXG','user','pluginName','pipe','resolved','requireSession','disposeWithMe','deleteComment','_config','find','YYYY/MM/DD\x20HH:mm','15LzHtzI','UNRECOGNIZED','payload','size','addComment','map','personId','OpenOrReOpen','add','getCurrentUser','COMMENT','Add','content','createTimestamp','_threadCommentModel','parse','628010HIVSuh','get','saveCommentToSnapshot','forEach','Solved','resolveComment','_threadCommentDataSourceService','_init','stringify','_userService','_initUserSync','UNIVER_UNKNOWN','/edit','Delete','users','9095218EURhJb','userId','rangeType','filter','replies','type','setConfig'];_0x49b9=function(){return _0xb5011a;};return _0x49b9();}import{CommentService as _0x4c2ad4,CollaborationSessionService as _0x2c13ff,UniverCollaborationClientPlugin as _0xd73538}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x38ebb4}from'@univerjs-pro/license';import{dayjs as _0x2f8643,UserManagerService as _0x25c551,Inject as _0x359cb5,Injector as _0x1b2434,Disposable as _0x1f8f54,CustomRangeType as _0x556bf3,UniverInstanceType as _0x516c80,DependentOn as _0x5794d3,IConfigService as _0x58e04f,Plugin as _0x27fb9a,merge as _0x16d744}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x17c15e}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x4b2a67,IThreadCommentDataSourceService as _0x66404b}from'@univerjs/thread-comment';import{bufferTime as _0x3e468c}from'rxjs';import{HTTPService as _0x52d944}from'@univerjs/network';const W=_0x170a12(0xe6);var I=(_0x241ee0=>(_0x241ee0[_0x241ee0['OpenOrReOpen']=0x0]=_0x170a12(0xc7),_0x241ee0[_0x241ee0[_0x170a12(0xd4)]=0x1]=_0x170a12(0xd4),_0x241ee0[_0x241ee0[_0x170a12(0xc1)]=-0x1]=_0x170a12(0xc1),_0x241ee0))(I||{}),v=(_0x58b0d4=>(_0x58b0d4[_0x58b0d4[_0x170a12(0x10e)]=0x0]=_0x170a12(0x10e),_0x58b0d4[_0x58b0d4['Add']=0x1]=_0x170a12(0xcb),_0x58b0d4[_0x58b0d4[_0x170a12(0x104)]=0x2]=_0x170a12(0x104),_0x58b0d4[_0x58b0d4[_0x170a12(0x100)]=0x3]=_0x170a12(0x100),_0x58b0d4[_0x58b0d4[_0x170a12(0xdd)]=0x4]=_0x170a12(0xdd),_0x58b0d4[_0x58b0d4[_0x170a12(0xf6)]=0x5]=_0x170a12(0xf6),_0x58b0d4[_0x58b0d4[_0x170a12(0xc1)]=-0x1]=_0x170a12(0xc1),_0x58b0d4))(v||{});const D=_0xcf989e=>_0x2f8643(new Date(+_0xcf989e))[_0x170a12(0xeb)](_0x170a12(0xbf)),B=async(_0x2ab184,_0xba09b0)=>{const _0x9176a0=_0x170a12,_0x4cc8ca=_0x2ab184[_0x9176a0(0xd1)](_0x25c551),_0x405f43=_0x2ab184['get'](_0x52d944);_0xba09b0[_0x9176a0(0xd3)](_0x1c6072=>{const _0x12f205=_0x9176a0;_0x4cc8ca[_0x12f205(0x115)](_0x1c6072)&&_0xba09b0[_0x12f205(0x102)](_0x1c6072);}),_0xba09b0[_0x9176a0(0xc3)]&&(await _0x405f43[_0x9176a0(0xd1)](_0x9176a0(0xfb),{'params':{'userIDs':[..._0xba09b0]}}))[_0x9176a0(0x114)][_0x9176a0(0xde)][_0x9176a0(0xd3)](_0x5ecb2b=>{const _0x10c4c1=_0x9176a0;_0x5ecb2b&&_0x4cc8ca[_0x10c4c1(0x116)](_0x5ecb2b);});};var K=Object['getOwnPropertyDescriptor'],V=(_0xd9722c,_0x2dcda6,_0x2b91bb,_0x9f4534)=>{const _0x11b6b9=_0x170a12;for(var _0x1298b3=_0x9f4534>0x1?void 0x0:_0x9f4534?K(_0x2dcda6,_0x2b91bb):_0x2dcda6,_0xd9d81b=_0xd9722c[_0x11b6b9(0x11a)]-0x1,_0x1ad9e0;_0xd9d81b>=0x0;_0xd9d81b--)(_0x1ad9e0=_0xd9722c[_0xd9d81b])&&(_0x1298b3=_0x1ad9e0(_0x1298b3)||_0x1298b3);return _0x1298b3;},p=(_0x4d7fdd,_0x728472)=>(_0x5665d8,_0x1f955f)=>_0x728472(_0x5665d8,_0x1f955f,_0x4d7fdd);let S=class extends _0x1f8f54{constructor(_0x8a3a2b,_0x2eda73,_0x41a41e,_0x4bae05){const _0x23aba6=_0x170a12;super(),this[_0x23aba6(0xb4)]=_0x8a3a2b,this[_0x23aba6(0xce)]=_0x2eda73,this['_userService']=_0x41a41e,this['_injector']=_0x4bae05,this[_0x23aba6(0xd7)](),this[_0x23aba6(0xda)]();}[_0x170a12(0xda)](){const _0x1bbd66=_0x170a12;this[_0x1bbd66(0xbb)](this[_0x1bbd66(0xce)][_0x1bbd66(0xe8)][_0x1bbd66(0xb8)](_0x3e468c(0x10))[_0x1bbd66(0x10c)](_0x4c5b61=>{const _0x1d82c3=_0x1bbd66,_0x1fb7eb=new Set();_0x4c5b61[_0x1d82c3(0xd3)](_0x1b3870=>{const _0x1a1701=_0x1d82c3;switch(_0x1b3870['type']){case _0x1a1701(0xc8):{const _0x3f3e2b=_0x1b3870[_0x1a1701(0xc2)][_0x1a1701(0xc6)];_0x1fb7eb[_0x1a1701(0xc8)](_0x3f3e2b);break;}}}),B(this[_0x1d82c3(0x118)],_0x1fb7eb);}));}[_0x170a12(0xd7)](){const _0x39e942=_0x170a12;this[_0x39e942(0xbb)](this['_commentService'][_0x39e942(0xe8)][_0x39e942(0x10c)](async _0x3df873=>{const _0x517ed4=_0x39e942;var _0x42f004,_0x11e5d0,_0x2f72ae,_0x1fe7aa;const _0x33d73e=(_0x42f004=this[_0x517ed4(0xce)][_0x517ed4(0x11b)](_0x3df873[_0x517ed4(0x107)])[_0x517ed4(0xbe)](_0x39a088=>_0x39a088[_0x517ed4(0xed)]===_0x3df873[_0x517ed4(0xed)]))==null?void 0x0:_0x42f004[_0x517ed4(0xf5)];if(!_0x33d73e)return;const {unitId:_0x22c859,subUnitId:_0x2504c1}=_0x33d73e;switch(_0x3df873['user']&&this['_userService'][_0x517ed4(0x116)](_0x3df873[_0x517ed4(0xb6)]),_0x3df873[_0x517ed4(0xe4)]){case v['Add']:break;case v['Reply']:{this[_0x517ed4(0xce)]['addComment'](_0x22c859,_0x2504c1,{'unitId':_0x22c859,'subUnitId':_0x2504c1,'ref':'','id':_0x3df873[_0x517ed4(0xf7)],'dT':D(+_0x3df873[_0x517ed4(0xcd)]),'threadId':_0x3df873[_0x517ed4(0xed)],'personId':(_0x2f72ae=(_0x11e5d0=_0x3df873[_0x517ed4(0xb6)])==null?void 0x0:_0x11e5d0[_0x517ed4(0x106)])!=null?_0x2f72ae:_0x3df873[_0x517ed4(0xe0)],'text':JSON[_0x517ed4(0xcf)](_0x3df873['content']),'parentId':_0x33d73e['id']});break;}case v[_0x517ed4(0xdd)]:{const _0x4257b6=this[_0x517ed4(0xce)]['getComment'](_0x22c859,_0x2504c1,_0x3df873[_0x517ed4(0xf7)]);_0x4257b6&&_0x4257b6[_0x517ed4(0x111)]&&this[_0x517ed4(0xce)][_0x517ed4(0xbc)](_0x22c859,_0x2504c1,_0x3df873[_0x517ed4(0xf7)]);break;}case v[_0x517ed4(0x100)]:{this[_0x517ed4(0xce)][_0x517ed4(0x10b)](_0x22c859,_0x2504c1,{'commentId':_0x3df873['replyId'],'text':JSON[_0x517ed4(0xcf)](_0x3df873[_0x517ed4(0xcc)])});break;}case v[_0x517ed4(0xf6)]:{const _0x5a87c0=(_0x1fe7aa=this['_threadCommentModel']['getUnit'](_0x3df873[_0x517ed4(0x107)])[_0x517ed4(0xbe)](_0x5d611=>_0x5d611['threadId']===_0x3df873[_0x517ed4(0xed)]))==null?void 0x0:_0x1fe7aa[_0x517ed4(0xf5)];_0x5a87c0&&this['_threadCommentModel']['resolveComment'](_0x22c859,_0x2504c1,_0x5a87c0['id'],_0x3df873[_0x517ed4(0xb3)]===I[_0x517ed4(0xd4)]);break;}}}));}};S=V([p(0x0,_0x359cb5(_0x4c2ad4)),p(0x1,_0x359cb5(_0x4b2a67)),p(0x2,_0x359cb5(_0x25c551)),p(0x3,_0x359cb5(_0x1b2434))],S);const z=_0x170a12(0x119),M={};var k=Object[_0x170a12(0xf2)],Q=(_0x546307,_0x4f484d,_0x1349d8,_0x352bf1)=>{const _0x174430=_0x170a12;for(var _0x190015=_0x352bf1>0x1?void 0x0:_0x352bf1?k(_0x4f484d,_0x1349d8):_0x4f484d,_0x598dc9=_0x546307[_0x174430(0x11a)]-0x1,_0x4e334e;_0x598dc9>=0x0;_0x598dc9--)(_0x4e334e=_0x546307[_0x598dc9])&&(_0x190015=_0x4e334e(_0x190015)||_0x190015);return _0x190015;},_=(_0x5bc900,_0x24dd49)=>(_0x1658df,_0x133e2e)=>_0x24dd49(_0x1658df,_0x133e2e,_0x5bc900);function X(_0x3d36a3,_0x34add5){const _0x420bab=_0x170a12,_0x344159=_0x3d36a3['replies'][0x0];return{..._0x34add5,'id':_0x344159[_0x420bab(0xf7)],'resolved':_0x3d36a3[_0x420bab(0xb3)]===0x1,'dT':D(_0x344159[_0x420bab(0xcd)]),'personId':_0x344159[_0x420bab(0xe0)],'threadId':_0x344159[_0x420bab(0xed)]};}function ee(_0x17b22a,_0x564788,_0xba524e){const _0x4c4b0c=_0x170a12;var _0x1b09df,_0x42baad;if(((_0x42baad=(_0x1b09df=_0x17b22a==null?void 0x0:_0x17b22a[_0x4c4b0c(0xe3)])==null?void 0x0:_0x1b09df[_0x4c4b0c(0x11a)])!=null?_0x42baad:0x0)>0x0){const _0x34064b=(_0x3597e0,_0x3b0880)=>({'id':_0x3597e0[_0x4c4b0c(0xf7)],'threadId':_0x3597e0['threadId'],'dT':D(_0x3597e0[_0x4c4b0c(0xcd)]),'personId':_0x3597e0[_0x4c4b0c(0xe0)],'resolved':_0x17b22a[_0x4c4b0c(0xb3)]===I['Solved'],'unitId':_0x564788,'subUnitId':_0xba524e,'text':JSON[_0x4c4b0c(0xcf)](_0x3597e0[_0x4c4b0c(0xcc)]),'parentId':_0x3b0880}),_0x1e3a3f=_0x34064b(_0x17b22a[_0x4c4b0c(0xe3)][0x0]);return{..._0x1e3a3f,'children':_0x17b22a[_0x4c4b0c(0xe3)]['slice'](0x1)[_0x4c4b0c(0xc5)](_0x5abb7c=>_0x34064b(_0x5abb7c,_0x1e3a3f['id']))};}return null;}let f=class{constructor(_0x33345f,_0x55fa38,_0x6d15d5,_0x5c4ee0){const _0x52d859=_0x170a12;this[_0x52d859(0xf8)]=_0x33345f,this[_0x52d859(0xd9)]=_0x55fa38,this[_0x52d859(0xf9)]=_0x6d15d5,this[_0x52d859(0x118)]=_0x5c4ee0;}async[_0x170a12(0xc4)](_0x4228b8){const _0x216388=_0x170a12;var _0x5e3840,_0xcd2e7d;const {parentId:_0x352f3f,unitId:_0x55c7cd,text:_0x44d758,threadId:_0x433dd7}=_0x4228b8,_0x5dfeb6=(_0xcd2e7d=(_0x5e3840=_0x44d758['customRanges'])==null?void 0x0:_0x5e3840[_0x216388(0xe2)](_0x55d5d5=>_0x55d5d5[_0x216388(0xe1)]===_0x556bf3[_0x216388(0xca)])['map'](_0x52dfeb=>_0x52dfeb[_0x216388(0xfc)]))!=null?_0xcd2e7d:[],_0x5cf39d=JSON[_0x216388(0xd8)](_0x44d758),_0x3bcad8=(await this['_sessionService'][_0x216388(0xba)](_0x55c7cd))[_0x216388(0xef)]();if(_0x352f3f){const _0x2773e3={'memberId':_0x3bcad8,'unitId':_0x55c7cd,'content':_0x5cf39d,'mention':_0x5dfeb6,'threadId':_0x433dd7},_0x35bc00=(await this['_httpService'][_0x216388(0x109)](_0x216388(0x105)+_0x55c7cd+_0x216388(0xf1),{'body':_0x2773e3}))[_0x216388(0x114)]['reply'];return{..._0x4228b8,'id':_0x35bc00['replyId'],'dT':_0x2f8643(+_0x35bc00[_0x216388(0xcd)])[_0x216388(0xeb)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x35bc00['userId']};}else{const _0x3e6a59={'memberId':_0x3bcad8,'unitId':_0x55c7cd,'content':_0x5cf39d,'mention':_0x5dfeb6},_0x3de87e=await this['_httpService'][_0x216388(0x109)](_0x216388(0x105)+_0x55c7cd+_0x216388(0x117),{'body':_0x3e6a59});return X(_0x3de87e[_0x216388(0x114)][_0x216388(0x112)],_0x4228b8);}}async['updateComment'](_0x2c0855){const _0x539810=_0x170a12;var _0x363707,_0x25e5c5;const {text:_0x13edc0,unitId:_0x2eee87}=_0x2c0855,_0x28cbd1=(_0x25e5c5=(_0x363707=_0x13edc0[_0x539810(0x103)])==null?void 0x0:_0x363707[_0x539810(0xe2)](_0x45c916=>_0x45c916['rangeType']===_0x556bf3[_0x539810(0xca)])[_0x539810(0xc5)](_0x1cecfd=>_0x1cecfd[_0x539810(0xfc)]))!=null?_0x25e5c5:[],_0x38dc71=JSON[_0x539810(0xd8)](_0x13edc0),_0x137032=_0x2c0855['threadId'],_0x5c0be0=_0x2c0855['id'],_0x24bc66={'memberId':(await this[_0x539810(0xf9)][_0x539810(0xba)](_0x2eee87))[_0x539810(0xef)](),'unitId':_0x2eee87,'threadId':_0x137032,'mention':_0x28cbd1,'content':_0x38dc71,'replyId':_0x5c0be0},_0x342009=await this['_httpService']['post'](_0x539810(0x105)+_0x2eee87+_0x539810(0xdc),{'body':_0x24bc66});return!_0x342009['body'][_0x539810(0x10a)]||_0x342009['body'][_0x539810(0x10a)][_0x539810(0xe9)]===0x1;}async[_0x170a12(0xd5)](_0x38e51b){const _0x344364=_0x170a12,{unitId:_0x4b7b1e}=_0x38e51b,_0x3378b8=_0x38e51b[_0x344364(0xed)],_0x26b591={'memberId':this[_0x344364(0xd9)][_0x344364(0xc9)]()[_0x344364(0x106)],'unitId':_0x4b7b1e,'threadId':_0x3378b8,'solved':_0x38e51b[_0x344364(0xb9)]?I['Solved']:I['OpenOrReOpen']},_0x53fd1a=await this['_httpService'][_0x344364(0x109)](_0x344364(0x105)+_0x4b7b1e+_0x344364(0xff),{'body':_0x26b591});return!_0x53fd1a['body']['error']||_0x53fd1a[_0x344364(0x114)]['error'][_0x344364(0xe9)]===0x1;}async[_0x170a12(0xbc)](_0x20ca4f,_0x4a6258,_0x2558b8,_0x3793f8){const _0x1e042b=_0x170a12,_0x1ab9d4={'memberId':(await this['_sessionService'][_0x1e042b(0xba)](_0x20ca4f))[_0x1e042b(0xef)](),'threadId':_0x2558b8,'replyId':_0x3793f8,'unitId':_0x20ca4f},_0xd4c3ad=await this[_0x1e042b(0xf8)][_0x1e042b(0x109)](_0x1e042b(0x105)+_0x20ca4f+_0x1e042b(0xf4),{'body':_0x1ab9d4});return!_0xd4c3ad[_0x1e042b(0x114)][_0x1e042b(0x10a)]||_0xd4c3ad['body'][_0x1e042b(0x10a)][_0x1e042b(0xe9)]===0x1;}async['listComments'](_0x105d0b,_0x25fe3b,_0x38b90d){const _0xfae800=_0x170a12,_0xf485c={'unitId':_0x105d0b,'threadId':_0x38b90d},_0xbc3581=await this[_0xfae800(0xf8)][_0xfae800(0x109)](_0xfae800(0x105)+_0x105d0b+_0xfae800(0xfd),{'body':_0xf485c}),_0x396810=_0x38b90d[_0xfae800(0xc5)](_0x3a33c2=>ee(_0xbc3581['body'][_0xfae800(0x11d)][_0x3a33c2],_0x105d0b,_0x25fe3b))[_0xfae800(0xe2)](Boolean);return Object[_0xfae800(0xf0)](_0xbc3581[_0xfae800(0x114)][_0xfae800(0xde)])[_0xfae800(0xd3)](_0x91cdc3=>{const _0x57e83e=_0xfae800;this[_0x57e83e(0xd9)][_0x57e83e(0x116)](_0x91cdc3);}),_0x396810;}[_0x170a12(0xd2)](_0x4f9356){const _0x35825f=_0x170a12;return{'id':_0x4f9356['id'],'threadId':_0x4f9356[_0x35825f(0xed)],'ref':_0x4f9356[_0x35825f(0x108)]};}};f=Q([_(0x0,_0x359cb5(_0x52d944)),_(0x1,_0x359cb5(_0x25c551)),_(0x2,_0x359cb5(_0x2c13ff)),_(0x3,_0x359cb5(_0x1b2434))],f);var re=Object[_0x170a12(0xf2)],te=(_0x394000,_0x4c0a39,_0x3ae398,_0x27ec62)=>{const _0x42ea85=_0x170a12;for(var _0x5b53f3=_0x27ec62>0x1?void 0x0:_0x27ec62?re(_0x4c0a39,_0x3ae398):_0x4c0a39,_0x10c12f=_0x394000[_0x42ea85(0x11a)]-0x1,_0x2b1fe8;_0x10c12f>=0x0;_0x10c12f--)(_0x2b1fe8=_0x394000[_0x10c12f])&&(_0x5b53f3=_0x2b1fe8(_0x5b53f3)||_0x5b53f3);return _0x5b53f3;},N=(_0x4fad23,_0x467e74)=>(_0x1d3cf4,_0x48f888)=>_0x467e74(_0x1d3cf4,_0x48f888,_0x4fad23);let g=class extends _0x1f8f54{constructor(_0x33d743,_0x21ff61){const _0xd3c28e=_0x170a12;super(),this[_0xd3c28e(0xd6)]=_0x33d743,this[_0xd3c28e(0xfe)]=_0x21ff61,this['_initDataSource']();}[_0x170a12(0xfa)](){const _0x473d85=_0x170a12;this['_threadCommentDataSourceService'][_0x473d85(0x110)]=this[_0x473d85(0xfe)],this[_0x473d85(0xd6)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x66404b),N(0x1,_0x359cb5(f))],g);var se=Object['defineProperty'],oe=Object[_0x170a12(0xf2)],ne=(_0x232b58,_0xa60be5,_0x532a00)=>_0xa60be5 in _0x232b58?se(_0x232b58,_0xa60be5,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x532a00}):_0x232b58[_0xa60be5]=_0x532a00,ie=(_0x26d43c,_0x38630f,_0x370d62,_0x55cd90)=>{const _0x40222c=_0x170a12;for(var _0x3adefa=_0x55cd90>0x1?void 0x0:_0x55cd90?oe(_0x38630f,_0x370d62):_0x38630f,_0x2e3f5e=_0x26d43c[_0x40222c(0x11a)]-0x1,_0x5152db;_0x2e3f5e>=0x0;_0x2e3f5e--)(_0x5152db=_0x26d43c[_0x2e3f5e])&&(_0x3adefa=_0x5152db(_0x3adefa)||_0x3adefa);return _0x3adefa;},w=(_0x14b0fd,_0x408e0d)=>(_0x2f3157,_0x1c7a01)=>_0x408e0d(_0x2f3157,_0x1c7a01,_0x14b0fd),$=(_0xbc54a0,_0x53455b,_0x5420c0)=>ne(_0xbc54a0,typeof _0x53455b!=_0x170a12(0x10f)?_0x53455b+'':_0x53455b,_0x5420c0);function _0x413c(_0x3fa5f7,_0x522b94){const _0x49b987=_0x49b9();return _0x413c=function(_0x413c9d,_0x49abca){_0x413c9d=_0x413c9d-0xb3;let _0x5bd89a=_0x49b987[_0x413c9d];return _0x5bd89a;},_0x413c(_0x3fa5f7,_0x522b94);}let b=class extends _0x27fb9a{constructor(_0x935635=M,_0x66f983,_0x1ea46c){const _0x4d2b5b=_0x170a12;super(),this[_0x4d2b5b(0xbd)]=_0x935635,this[_0x4d2b5b(0x118)]=_0x66f983,this[_0x4d2b5b(0x113)]=_0x1ea46c;const {..._0x18b5f8}=_0x16d744({},M,this[_0x4d2b5b(0xbd)]);this[_0x4d2b5b(0x113)][_0x4d2b5b(0xe5)](z,_0x18b5f8);}[_0x170a12(0xec)](){const _0x551f9a=_0x170a12;[[f],[g],[S]][_0x551f9a(0xd3)](_0x445c9d=>{const _0x159eba=_0x551f9a;this[_0x159eba(0x118)]['add'](_0x445c9d);});}['onReady'](){const _0x869f5d=_0x170a12;this[_0x869f5d(0x118)][_0x869f5d(0xd1)](g),this[_0x869f5d(0x118)][_0x869f5d(0xd1)](S);}};$(b,_0x170a12(0xb7),W),$(b,_0x170a12(0xe4),_0x516c80[_0x170a12(0xdb)]),b=ie([_0x5794d3(_0x17c15e,_0xd73538,_0x38ebb4),w(0x1,_0x359cb5(_0x1b2434)),w(0x2,_0x58e04f)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x88c252=_0x54f6;(function(_0x325260,_0x22d3f1){const _0x4996fb=_0x54f6,_0x2e4316=_0x325260();while(!![]){try{const _0x3be9ae=-parseInt(_0x4996fb(0xd7))/0x1+parseInt(_0x4996fb(0x9d))/0x2+parseInt(_0x4996fb(0xd0))/0x3+parseInt(_0x4996fb(0xe1))/0x4+-parseInt(_0x4996fb(0xdc))/0x5+-parseInt(_0x4996fb(0xac))/0x6*(-parseInt(_0x4996fb(0xa4))/0x7)+parseInt(_0x4996fb(0xb9))/0x8*(-parseInt(_0x4996fb(0xd4))/0x9);if(_0x3be9ae===_0x22d3f1)break;else _0x2e4316['push'](_0x2e4316['shift']());}catch(_0x37d5ba){_0x2e4316['push'](_0x2e4316['shift']());}}}(_0x38dc,0xee8e5));import{CommentService as _0x29a1f1,CollaborationSessionService as _0x2b9727,UniverCollaborationClientPlugin as _0x2f5b82}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x802055}from'@univerjs-pro/license';import{dayjs as _0x587e27,UserManagerService as _0x1d01f8,Inject as _0xff23a0,Injector as _0x145b8a,Disposable as _0x28cf76,CustomRangeType as _0x1c7e16,UniverInstanceType as _0x82bea5,DependentOn as _0x5e7b4e,IConfigService as _0x5904ab,Plugin as _0x249cfc,merge as _0x19b49a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1ccc86}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x3f14f7,IThreadCommentDataSourceService as _0x22d45b}from'@univerjs/thread-comment';import{bufferTime as _0x4a89db}from'rxjs';import{HTTPService as _0x87bad4}from'@univerjs/network';const W=_0x88c252(0xe0);var I=(_0x3ff0bc=>(_0x3ff0bc[_0x3ff0bc[_0x88c252(0xbe)]=0x0]='OpenOrReOpen',_0x3ff0bc[_0x3ff0bc[_0x88c252(0xc4)]=0x1]=_0x88c252(0xc4),_0x3ff0bc[_0x3ff0bc['UNRECOGNIZED']=-0x1]=_0x88c252(0xc7),_0x3ff0bc))(I||{}),v=(_0x2c9027=>(_0x2c9027[_0x2c9027[_0x88c252(0xd2)]=0x0]='Unknown',_0x2c9027[_0x2c9027[_0x88c252(0xe3)]=0x1]=_0x88c252(0xe3),_0x2c9027[_0x2c9027[_0x88c252(0xc8)]=0x2]=_0x88c252(0xc8),_0x2c9027[_0x2c9027[_0x88c252(0xe4)]=0x3]=_0x88c252(0xe4),_0x2c9027[_0x2c9027[_0x88c252(0xd5)]=0x4]=_0x88c252(0xd5),_0x2c9027[_0x2c9027[_0x88c252(0x9c)]=0x5]=_0x88c252(0x9c),_0x2c9027[_0x2c9027[_0x88c252(0xc7)]=-0x1]=_0x88c252(0xc7),_0x2c9027))(v||{});const D=_0x5351ca=>_0x587e27(new Date(+_0x5351ca))['format']('YYYY/MM/DD\x20HH:mm'),B=async(_0x5a5049,_0x113ab9)=>{const _0x18d92b=_0x88c252,_0x410e72=_0x5a5049['get'](_0x1d01f8),_0x3bab84=_0x5a5049[_0x18d92b(0xe5)](_0x87bad4);_0x113ab9[_0x18d92b(0x93)](_0x2fcdf9=>{const _0x377f91=_0x18d92b;_0x410e72[_0x377f91(0x99)](_0x2fcdf9)&&_0x113ab9[_0x377f91(0xca)](_0x2fcdf9);}),_0x113ab9[_0x18d92b(0xdd)]&&(await _0x3bab84[_0x18d92b(0xe5)]('/universer-api/user/list',{'params':{'userIDs':[..._0x113ab9]}}))['body'][_0x18d92b(0xd8)][_0x18d92b(0x93)](_0xfacd6e=>{const _0xf1e9c=_0x18d92b;_0xfacd6e&&_0x410e72[_0xf1e9c(0xd9)](_0xfacd6e);});};var K=Object[_0x88c252(0xbd)],V=(_0x43cc44,_0x1daacc,_0x1d64d9,_0x44907e)=>{for(var _0x5cbf24=_0x44907e>0x1?void 0x0:_0x44907e?K(_0x1daacc,_0x1d64d9):_0x1daacc,_0x2c4e60=_0x43cc44['length']-0x1,_0x54b9fd;_0x2c4e60>=0x0;_0x2c4e60--)(_0x54b9fd=_0x43cc44[_0x2c4e60])&&(_0x5cbf24=_0x54b9fd(_0x5cbf24)||_0x5cbf24);return _0x5cbf24;},p=(_0x41f21f,_0x1aa085)=>(_0x401d9f,_0x1b4f82)=>_0x1aa085(_0x401d9f,_0x1b4f82,_0x41f21f);function _0x54f6(_0x2fb803,_0x54fd3c){const _0x38dc9d=_0x38dc();return _0x54f6=function(_0x54f66b,_0x425ca8){_0x54f66b=_0x54f66b-0x8a;let _0x5dc8aa=_0x38dc9d[_0x54f66b];return _0x5dc8aa;},_0x54f6(_0x2fb803,_0x54fd3c);}let S=class extends _0x28cf76{constructor(_0x4ac549,_0x1b9672,_0x4dfebe,_0x161a4f){const _0x2a4ead=_0x88c252;super(),this[_0x2a4ead(0xaf)]=_0x4ac549,this['_threadCommentModel']=_0x1b9672,this[_0x2a4ead(0x9a)]=_0x4dfebe,this[_0x2a4ead(0xce)]=_0x161a4f,this[_0x2a4ead(0xbb)](),this['_initUserSync']();}['_initUserSync'](){const _0x1446ae=_0x88c252;this[_0x1446ae(0xc6)](this[_0x1446ae(0xb7)][_0x1446ae(0x95)][_0x1446ae(0xa7)](_0x4a89db(0x10))[_0x1446ae(0x92)](_0x5a81c5=>{const _0x3bf988=_0x1446ae,_0x1722be=new Set();_0x5a81c5[_0x3bf988(0x93)](_0x560be3=>{const _0x27de50=_0x3bf988;switch(_0x560be3[_0x27de50(0xc9)]){case _0x27de50(0xda):{const _0x3e5161=_0x560be3[_0x27de50(0x90)]['personId'];_0x1722be[_0x27de50(0xda)](_0x3e5161);break;}}}),B(this[_0x3bf988(0xce)],_0x1722be);}));}[_0x88c252(0xbb)](){const _0x2b1959=_0x88c252;this[_0x2b1959(0xc6)](this['_commentService']['commentUpdate$'][_0x2b1959(0x92)](async _0x3fd97f=>{const _0x54ac12=_0x2b1959;var _0x394602,_0x32fa22,_0x302bb0,_0x4d800d;const _0x2847ce=(_0x394602=this[_0x54ac12(0xb7)][_0x54ac12(0x9f)](_0x3fd97f['unitId'])[_0x54ac12(0x97)](_0x453d1e=>_0x453d1e[_0x54ac12(0xc2)]===_0x3fd97f[_0x54ac12(0xc2)]))==null?void 0x0:_0x394602[_0x54ac12(0xc3)];if(!_0x2847ce)return;const {unitId:_0x2a4d18,subUnitId:_0x1558cd}=_0x2847ce;switch(_0x3fd97f[_0x54ac12(0x98)]&&this[_0x54ac12(0x9a)]['addUser'](_0x3fd97f['user']),_0x3fd97f[_0x54ac12(0xc9)]){case v[_0x54ac12(0xe3)]:break;case v[_0x54ac12(0xc8)]:{this['_threadCommentModel'][_0x54ac12(0xe2)](_0x2a4d18,_0x1558cd,{'unitId':_0x2a4d18,'subUnitId':_0x1558cd,'ref':'','id':_0x3fd97f[_0x54ac12(0xa5)],'dT':D(+_0x3fd97f[_0x54ac12(0xea)]),'threadId':_0x3fd97f[_0x54ac12(0xc2)],'personId':(_0x302bb0=(_0x32fa22=_0x3fd97f[_0x54ac12(0x98)])==null?void 0x0:_0x32fa22[_0x54ac12(0xaa)])!=null?_0x302bb0:_0x3fd97f[_0x54ac12(0xa0)],'text':JSON[_0x54ac12(0x94)](_0x3fd97f[_0x54ac12(0xdf)]),'parentId':_0x2847ce['id']});break;}case v[_0x54ac12(0xd5)]:{const _0x35af6a=this[_0x54ac12(0xb7)][_0x54ac12(0x96)](_0x2a4d18,_0x1558cd,_0x3fd97f[_0x54ac12(0xa5)]);_0x35af6a&&_0x35af6a['parentId']&&this[_0x54ac12(0xb7)][_0x54ac12(0xd6)](_0x2a4d18,_0x1558cd,_0x3fd97f[_0x54ac12(0xa5)]);break;}case v[_0x54ac12(0xe4)]:{this[_0x54ac12(0xb7)][_0x54ac12(0xcc)](_0x2a4d18,_0x1558cd,{'commentId':_0x3fd97f[_0x54ac12(0xa5)],'text':JSON['parse'](_0x3fd97f['content'])});break;}case v['Solve']:{const _0x33e13b=(_0x4d800d=this['_threadCommentModel'][_0x54ac12(0x9f)](_0x3fd97f[_0x54ac12(0xc5)])['find'](_0x2f6279=>_0x2f6279[_0x54ac12(0xc2)]===_0x3fd97f[_0x54ac12(0xc2)]))==null?void 0x0:_0x4d800d[_0x54ac12(0xc3)];_0x33e13b&&this[_0x54ac12(0xb7)][_0x54ac12(0xcb)](_0x2a4d18,_0x1558cd,_0x33e13b['id'],_0x3fd97f[_0x54ac12(0xe6)]===I[_0x54ac12(0xc4)]);break;}}}));}};function _0x38dc(){const _0x1497dc=['map','resolved','_threadCommentModel','onReady','4280rYRgNZ','stringify','_init','ref','getOwnPropertyDescriptor','OpenOrReOpen','COMMENT','body','thread-comment-data-source.config','threadId','root','Solved','unitId','disposeWithMe','UNRECOGNIZED','Reply','type','delete','resolveComment','updateComment','setConfig','_injector','_sessionService','478704LOxVnW','/delete','Unknown','filter','28287nYFRzo','Delete','deleteComment','144137sVfIJx','users','addUser','add','code','7758860qoYhmv','size','error','content','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','2891564dbgNrJ','addComment','Add','Edit','get','solved','syncUpdateMutationToColla','comment','_config','createTimestamp','_initDataSource','getMemberID','slice','getCurrentUser','dataSource','YYYY/MM/DD\x20HH:mm','comments','UNIVER_UNKNOWN','onStarting','values','payload','_threadCommentDataSource','subscribe','forEach','parse','commentUpdate$','getComment','find','user','getUser','_userService','saveCommentToSnapshot','Solve','3589474OGcnEb','symbol','getUnit','userId','_threadCommentDataSourceService','rangeType','reply','7sOBqfV','replyId','_httpService','pipe','/reply','post','userID','/add','10064058jrZtWT','/edit','rangeId','_commentService','_configService','replies','length','requireSession','/universer-api/comment/unit/'];_0x38dc=function(){return _0x1497dc;};return _0x38dc();}S=V([p(0x0,_0xff23a0(_0x29a1f1)),p(0x1,_0xff23a0(_0x3f14f7)),p(0x2,_0xff23a0(_0x1d01f8)),p(0x3,_0xff23a0(_0x145b8a))],S);const z=_0x88c252(0xc1),M={};var k=Object[_0x88c252(0xbd)],Q=(_0x51dfe7,_0x952733,_0x484844,_0xee3faf)=>{for(var _0xbfdf47=_0xee3faf>0x1?void 0x0:_0xee3faf?k(_0x952733,_0x484844):_0x952733,_0x24e4e6=_0x51dfe7['length']-0x1,_0x50321d;_0x24e4e6>=0x0;_0x24e4e6--)(_0x50321d=_0x51dfe7[_0x24e4e6])&&(_0xbfdf47=_0x50321d(_0xbfdf47)||_0xbfdf47);return _0xbfdf47;},_=(_0x46bdd9,_0x57b415)=>(_0x504c69,_0x340846)=>_0x57b415(_0x504c69,_0x340846,_0x46bdd9);function X(_0x4badcb,_0x171569){const _0x62407a=_0x88c252,_0x17d726=_0x4badcb[_0x62407a(0xb1)][0x0];return{..._0x171569,'id':_0x17d726[_0x62407a(0xa5)],'resolved':_0x4badcb[_0x62407a(0xe6)]===0x1,'dT':D(_0x17d726['createTimestamp']),'personId':_0x17d726[_0x62407a(0xa0)],'threadId':_0x17d726['threadId']};}function ee(_0x837349,_0x31038c,_0x245dd8){const _0x2b4d30=_0x88c252;var _0x4f0e35,_0x340f51;if(((_0x340f51=(_0x4f0e35=_0x837349==null?void 0x0:_0x837349['replies'])==null?void 0x0:_0x4f0e35['length'])!=null?_0x340f51:0x0)>0x0){const _0x270fe0=(_0x53a033,_0x196b21)=>({'id':_0x53a033[_0x2b4d30(0xa5)],'threadId':_0x53a033['threadId'],'dT':D(_0x53a033[_0x2b4d30(0xea)]),'personId':_0x53a033[_0x2b4d30(0xa0)],'resolved':_0x837349[_0x2b4d30(0xe6)]===I[_0x2b4d30(0xc4)],'unitId':_0x31038c,'subUnitId':_0x245dd8,'text':JSON[_0x2b4d30(0x94)](_0x53a033[_0x2b4d30(0xdf)]),'parentId':_0x196b21}),_0x435625=_0x270fe0(_0x837349['replies'][0x0]);return{..._0x435625,'children':_0x837349[_0x2b4d30(0xb1)][_0x2b4d30(0xed)](0x1)[_0x2b4d30(0xb5)](_0x2bb9b4=>_0x270fe0(_0x2bb9b4,_0x435625['id']))};}return null;}let f=class{constructor(_0x15a2e6,_0x30053c,_0x2c4f57,_0x44ea1f){const _0x2b48e0=_0x88c252;this[_0x2b48e0(0xa6)]=_0x15a2e6,this[_0x2b48e0(0x9a)]=_0x30053c,this[_0x2b48e0(0xcf)]=_0x2c4f57,this[_0x2b48e0(0xce)]=_0x44ea1f;}async[_0x88c252(0xe2)](_0x40d71d){const _0x3ec8ec=_0x88c252;var _0x283359,_0x26f4c6;const {parentId:_0x4e8f03,unitId:_0x42a1e0,text:_0x58af55,threadId:_0x22446b}=_0x40d71d,_0x506b5f=(_0x26f4c6=(_0x283359=_0x58af55['customRanges'])==null?void 0x0:_0x283359[_0x3ec8ec(0xd3)](_0x531e3e=>_0x531e3e[_0x3ec8ec(0xa2)]===_0x1c7e16['COMMENT'])[_0x3ec8ec(0xb5)](_0x5a1bb0=>_0x5a1bb0['rangeId']))!=null?_0x26f4c6:[],_0x157d09=JSON[_0x3ec8ec(0xba)](_0x58af55),_0x190663=(await this[_0x3ec8ec(0xcf)][_0x3ec8ec(0xb3)](_0x42a1e0))[_0x3ec8ec(0xec)]();if(_0x4e8f03){const _0x33a9a2={'memberId':_0x190663,'unitId':_0x42a1e0,'content':_0x157d09,'mention':_0x506b5f,'threadId':_0x22446b},_0x535d5a=(await this['_httpService']['post'](_0x3ec8ec(0xb4)+_0x42a1e0+_0x3ec8ec(0xa8),{'body':_0x33a9a2}))[_0x3ec8ec(0xc0)][_0x3ec8ec(0xa3)];return{..._0x40d71d,'id':_0x535d5a[_0x3ec8ec(0xa5)],'dT':_0x587e27(+_0x535d5a[_0x3ec8ec(0xea)])['format'](_0x3ec8ec(0x8b)),'personId':_0x535d5a['userId']};}else{const _0x42caf5={'memberId':_0x190663,'unitId':_0x42a1e0,'content':_0x157d09,'mention':_0x506b5f},_0x3efab2=await this[_0x3ec8ec(0xa6)][_0x3ec8ec(0xa9)](_0x3ec8ec(0xb4)+_0x42a1e0+_0x3ec8ec(0xab),{'body':_0x42caf5});return X(_0x3efab2['body'][_0x3ec8ec(0xe8)],_0x40d71d);}}async[_0x88c252(0xcc)](_0x36b2df){const _0x47d04e=_0x88c252;var _0xdb6bdd,_0x41507d;const {text:_0x18ce6f,unitId:_0x339cff}=_0x36b2df,_0x1b4c44=(_0x41507d=(_0xdb6bdd=_0x18ce6f['customRanges'])==null?void 0x0:_0xdb6bdd['filter'](_0x1fae81=>_0x1fae81['rangeType']===_0x1c7e16[_0x47d04e(0xbf)])[_0x47d04e(0xb5)](_0x364aa4=>_0x364aa4[_0x47d04e(0xae)]))!=null?_0x41507d:[],_0x2147e8=JSON[_0x47d04e(0xba)](_0x18ce6f),_0x337c9b=_0x36b2df[_0x47d04e(0xc2)],_0x4b8025=_0x36b2df['id'],_0x4d3794={'memberId':(await this[_0x47d04e(0xcf)][_0x47d04e(0xb3)](_0x339cff))['getMemberID'](),'unitId':_0x339cff,'threadId':_0x337c9b,'mention':_0x1b4c44,'content':_0x2147e8,'replyId':_0x4b8025},_0x6e95da=await this[_0x47d04e(0xa6)][_0x47d04e(0xa9)](_0x47d04e(0xb4)+_0x339cff+_0x47d04e(0xad),{'body':_0x4d3794});return!_0x6e95da[_0x47d04e(0xc0)]['error']||_0x6e95da[_0x47d04e(0xc0)][_0x47d04e(0xde)][_0x47d04e(0xdb)]===0x1;}async[_0x88c252(0xcb)](_0x34287f){const _0x2de5f9=_0x88c252,{unitId:_0x247581}=_0x34287f,_0x281e5b=_0x34287f[_0x2de5f9(0xc2)],_0x5f03e3={'memberId':this['_userService'][_0x2de5f9(0xee)]()[_0x2de5f9(0xaa)],'unitId':_0x247581,'threadId':_0x281e5b,'solved':_0x34287f[_0x2de5f9(0xb6)]?I[_0x2de5f9(0xc4)]:I[_0x2de5f9(0xbe)]},_0x3703cd=await this[_0x2de5f9(0xa6)][_0x2de5f9(0xa9)](_0x2de5f9(0xb4)+_0x247581+'/solved',{'body':_0x5f03e3});return!_0x3703cd['body'][_0x2de5f9(0xde)]||_0x3703cd[_0x2de5f9(0xc0)][_0x2de5f9(0xde)][_0x2de5f9(0xdb)]===0x1;}async['deleteComment'](_0x3d5139,_0x300ae0,_0xf11501,_0x415f79){const _0x725b03=_0x88c252,_0x2360ad={'memberId':(await this['_sessionService'][_0x725b03(0xb3)](_0x3d5139))[_0x725b03(0xec)](),'threadId':_0xf11501,'replyId':_0x415f79,'unitId':_0x3d5139},_0x1ef26a=await this[_0x725b03(0xa6)]['post'](_0x725b03(0xb4)+_0x3d5139+_0x725b03(0xd1),{'body':_0x2360ad});return!_0x1ef26a[_0x725b03(0xc0)][_0x725b03(0xde)]||_0x1ef26a['body'][_0x725b03(0xde)][_0x725b03(0xdb)]===0x1;}async['listComments'](_0x1e6eb3,_0x1855e6,_0xf622c3){const _0x11afa4=_0x88c252,_0x7ddee8={'unitId':_0x1e6eb3,'threadId':_0xf622c3},_0x20b549=await this[_0x11afa4(0xa6)][_0x11afa4(0xa9)](_0x11afa4(0xb4)+_0x1e6eb3+'/list',{'body':_0x7ddee8}),_0x4a5e53=_0xf622c3[_0x11afa4(0xb5)](_0x4b6aab=>ee(_0x20b549[_0x11afa4(0xc0)][_0x11afa4(0x8c)][_0x4b6aab],_0x1e6eb3,_0x1855e6))[_0x11afa4(0xd3)](Boolean);return Object[_0x11afa4(0x8f)](_0x20b549[_0x11afa4(0xc0)][_0x11afa4(0xd8)])['forEach'](_0x18c960=>{const _0x2d6b4e=_0x11afa4;this[_0x2d6b4e(0x9a)][_0x2d6b4e(0xd9)](_0x18c960);}),_0x4a5e53;}[_0x88c252(0x9b)](_0x65b017){const _0x55c081=_0x88c252;return{'id':_0x65b017['id'],'threadId':_0x65b017[_0x55c081(0xc2)],'ref':_0x65b017[_0x55c081(0xbc)]};}};f=Q([_(0x0,_0xff23a0(_0x87bad4)),_(0x1,_0xff23a0(_0x1d01f8)),_(0x2,_0xff23a0(_0x2b9727)),_(0x3,_0xff23a0(_0x145b8a))],f);var re=Object[_0x88c252(0xbd)],te=(_0x17df79,_0x3383bc,_0x29dd30,_0x553ff7)=>{for(var _0x5d5828=_0x553ff7>0x1?void 0x0:_0x553ff7?re(_0x3383bc,_0x29dd30):_0x3383bc,_0x8956cb=_0x17df79['length']-0x1,_0xce97e5;_0x8956cb>=0x0;_0x8956cb--)(_0xce97e5=_0x17df79[_0x8956cb])&&(_0x5d5828=_0xce97e5(_0x5d5828)||_0x5d5828);return _0x5d5828;},N=(_0x3773fa,_0x44082f)=>(_0x5387e1,_0x127f81)=>_0x44082f(_0x5387e1,_0x127f81,_0x3773fa);let g=class extends _0x28cf76{constructor(_0x34059b,_0x3c9d3f){const _0x2893a6=_0x88c252;super(),this[_0x2893a6(0xa1)]=_0x34059b,this['_threadCommentDataSource']=_0x3c9d3f,this[_0x2893a6(0xeb)]();}['_initDataSource'](){const _0x54b3d3=_0x88c252;this[_0x54b3d3(0xa1)][_0x54b3d3(0x8a)]=this[_0x54b3d3(0x91)],this[_0x54b3d3(0xa1)][_0x54b3d3(0xe7)]=!0x1;}};g=te([N(0x0,_0x22d45b),N(0x1,_0xff23a0(f))],g);var se=Object['defineProperty'],oe=Object[_0x88c252(0xbd)],ne=(_0x4aa71e,_0x20681a,_0x18f496)=>_0x20681a in _0x4aa71e?se(_0x4aa71e,_0x20681a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x18f496}):_0x4aa71e[_0x20681a]=_0x18f496,ie=(_0x5393a4,_0x562271,_0xfe57fe,_0x5910e7)=>{const _0x1f59dd=_0x88c252;for(var _0x100e18=_0x5910e7>0x1?void 0x0:_0x5910e7?oe(_0x562271,_0xfe57fe):_0x562271,_0x2b80c0=_0x5393a4[_0x1f59dd(0xb2)]-0x1,_0x50ea37;_0x2b80c0>=0x0;_0x2b80c0--)(_0x50ea37=_0x5393a4[_0x2b80c0])&&(_0x100e18=_0x50ea37(_0x100e18)||_0x100e18);return _0x100e18;},w=(_0x4a066e,_0x47f1c7)=>(_0x444f1e,_0x15ccb2)=>_0x47f1c7(_0x444f1e,_0x15ccb2,_0x4a066e),$=(_0x189ca4,_0x3a9e49,_0x4640a6)=>ne(_0x189ca4,typeof _0x3a9e49!=_0x88c252(0x9e)?_0x3a9e49+'':_0x3a9e49,_0x4640a6);let b=class extends _0x249cfc{constructor(_0x16602f=M,_0x9a0046,_0x5e5071){const _0x14286e=_0x88c252;super(),this[_0x14286e(0xe9)]=_0x16602f,this[_0x14286e(0xce)]=_0x9a0046,this[_0x14286e(0xb0)]=_0x5e5071;const {..._0x338286}=_0x19b49a({},M,this[_0x14286e(0xe9)]);this[_0x14286e(0xb0)][_0x14286e(0xcd)](z,_0x338286);}[_0x88c252(0x8e)](){[[f],[g],[S]]['forEach'](_0x48068e=>{const _0x1e278a=_0x54f6;this[_0x1e278a(0xce)]['add'](_0x48068e);});}[_0x88c252(0xb8)](){const _0x1d9ad9=_0x88c252;this['_injector'][_0x1d9ad9(0xe5)](g),this[_0x1d9ad9(0xce)][_0x1d9ad9(0xe5)](S);}};$(b,'pluginName',W),$(b,_0x88c252(0xc9),_0x82bea5[_0x88c252(0x8d)]),b=ie([_0x5e7b4e(_0x1ccc86,_0x2f5b82,_0x802055),w(0x1,_0xff23a0(_0x145b8a)),w(0x2,_0x5904ab)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x170a12=_0x413c;(function(_0x28507b,_0x41102d){const _0xef12a7=_0x413c,_0x436a77=_0x28507b();while(!![]){try{const _0x1b8321=-parseInt(_0xef12a7(0xd0))/0x1*(parseInt(_0xef12a7(0x11c))/0x2)+parseInt(_0xef12a7(0x10d))/0x3+parseInt(_0xef12a7(0x101))/0x4*(parseInt(_0xef12a7(0xc0))/0x5)+parseInt(_0xef12a7(0xf3))/0x6*(parseInt(_0xef12a7(0xea))/0x7)+-parseInt(_0xef12a7(0xe7))/0x8+-parseInt(_0xef12a7(0xb5))/0x9*(-parseInt(_0xef12a7(0xee))/0xa)+-parseInt(_0xef12a7(0xdf))/0xb;if(_0x1b8321===_0x41102d)break;else _0x436a77['push'](_0x436a77['shift']());}catch(_0x3b80fc){_0x436a77['push'](_0x436a77['shift']());}}}(_0x49b9,0xbcfa2));function _0x49b9(){const _0xb5011a=['UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','4673024EKTpjc','commentUpdate$','code','40082sBcgsl','format','onStarting','threadId','944310OLszVk','getMemberID','values','/reply','getOwnPropertyDescriptor','390nrEsLG','/delete','root','Solve','replyId','_httpService','_sessionService','_initDataSource','/universer-api/user/list','rangeId','/list','_threadCommentDataSource','/solved','Edit','1764712lnPhdQ','delete','customRanges','Reply','/universer-api/comment/unit/','userID','unitId','ref','post','error','updateComment','subscribe','4386057eVrRpB','Unknown','symbol','dataSource','parentId','comment','_configService','body','getUser','addUser','/add','_injector','thread-comment-data-source.config','length','getUnit','4xpdRxZ','comments','solved','_commentService','27kMBEXG','user','pluginName','pipe','resolved','requireSession','disposeWithMe','deleteComment','_config','find','YYYY/MM/DD\x20HH:mm','15LzHtzI','UNRECOGNIZED','payload','size','addComment','map','personId','OpenOrReOpen','add','getCurrentUser','COMMENT','Add','content','createTimestamp','_threadCommentModel','parse','628010HIVSuh','get','saveCommentToSnapshot','forEach','Solved','resolveComment','_threadCommentDataSourceService','_init','stringify','_userService','_initUserSync','UNIVER_UNKNOWN','/edit','Delete','users','9095218EURhJb','userId','rangeType','filter','replies','type','setConfig'];_0x49b9=function(){return _0xb5011a;};return _0x49b9();}import{CommentService as _0x4c2ad4,CollaborationSessionService as _0x2c13ff,UniverCollaborationClientPlugin as _0xd73538}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x38ebb4}from'@univerjs-pro/license';import{dayjs as _0x2f8643,UserManagerService as _0x25c551,Inject as _0x359cb5,Injector as _0x1b2434,Disposable as _0x1f8f54,CustomRangeType as _0x556bf3,UniverInstanceType as _0x516c80,DependentOn as _0x5794d3,IConfigService as _0x58e04f,Plugin as _0x27fb9a,merge as _0x16d744}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x17c15e}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x4b2a67,IThreadCommentDataSourceService as _0x66404b}from'@univerjs/thread-comment';import{bufferTime as _0x3e468c}from'rxjs';import{HTTPService as _0x52d944}from'@univerjs/network';const W=_0x170a12(0xe6);var I=(_0x241ee0=>(_0x241ee0[_0x241ee0['OpenOrReOpen']=0x0]=_0x170a12(0xc7),_0x241ee0[_0x241ee0[_0x170a12(0xd4)]=0x1]=_0x170a12(0xd4),_0x241ee0[_0x241ee0[_0x170a12(0xc1)]=-0x1]=_0x170a12(0xc1),_0x241ee0))(I||{}),v=(_0x58b0d4=>(_0x58b0d4[_0x58b0d4[_0x170a12(0x10e)]=0x0]=_0x170a12(0x10e),_0x58b0d4[_0x58b0d4['Add']=0x1]=_0x170a12(0xcb),_0x58b0d4[_0x58b0d4[_0x170a12(0x104)]=0x2]=_0x170a12(0x104),_0x58b0d4[_0x58b0d4[_0x170a12(0x100)]=0x3]=_0x170a12(0x100),_0x58b0d4[_0x58b0d4[_0x170a12(0xdd)]=0x4]=_0x170a12(0xdd),_0x58b0d4[_0x58b0d4[_0x170a12(0xf6)]=0x5]=_0x170a12(0xf6),_0x58b0d4[_0x58b0d4[_0x170a12(0xc1)]=-0x1]=_0x170a12(0xc1),_0x58b0d4))(v||{});const D=_0xcf989e=>_0x2f8643(new Date(+_0xcf989e))[_0x170a12(0xeb)](_0x170a12(0xbf)),B=async(_0x2ab184,_0xba09b0)=>{const _0x9176a0=_0x170a12,_0x4cc8ca=_0x2ab184[_0x9176a0(0xd1)](_0x25c551),_0x405f43=_0x2ab184['get'](_0x52d944);_0xba09b0[_0x9176a0(0xd3)](_0x1c6072=>{const _0x12f205=_0x9176a0;_0x4cc8ca[_0x12f205(0x115)](_0x1c6072)&&_0xba09b0[_0x12f205(0x102)](_0x1c6072);}),_0xba09b0[_0x9176a0(0xc3)]&&(await _0x405f43[_0x9176a0(0xd1)](_0x9176a0(0xfb),{'params':{'userIDs':[..._0xba09b0]}}))[_0x9176a0(0x114)][_0x9176a0(0xde)][_0x9176a0(0xd3)](_0x5ecb2b=>{const _0x10c4c1=_0x9176a0;_0x5ecb2b&&_0x4cc8ca[_0x10c4c1(0x116)](_0x5ecb2b);});};var K=Object['getOwnPropertyDescriptor'],V=(_0xd9722c,_0x2dcda6,_0x2b91bb,_0x9f4534)=>{const _0x11b6b9=_0x170a12;for(var _0x1298b3=_0x9f4534>0x1?void 0x0:_0x9f4534?K(_0x2dcda6,_0x2b91bb):_0x2dcda6,_0xd9d81b=_0xd9722c[_0x11b6b9(0x11a)]-0x1,_0x1ad9e0;_0xd9d81b>=0x0;_0xd9d81b--)(_0x1ad9e0=_0xd9722c[_0xd9d81b])&&(_0x1298b3=_0x1ad9e0(_0x1298b3)||_0x1298b3);return _0x1298b3;},p=(_0x4d7fdd,_0x728472)=>(_0x5665d8,_0x1f955f)=>_0x728472(_0x5665d8,_0x1f955f,_0x4d7fdd);let S=class extends _0x1f8f54{constructor(_0x8a3a2b,_0x2eda73,_0x41a41e,_0x4bae05){const _0x23aba6=_0x170a12;super(),this[_0x23aba6(0xb4)]=_0x8a3a2b,this[_0x23aba6(0xce)]=_0x2eda73,this['_userService']=_0x41a41e,this['_injector']=_0x4bae05,this[_0x23aba6(0xd7)](),this[_0x23aba6(0xda)]();}[_0x170a12(0xda)](){const _0x1bbd66=_0x170a12;this[_0x1bbd66(0xbb)](this[_0x1bbd66(0xce)][_0x1bbd66(0xe8)][_0x1bbd66(0xb8)](_0x3e468c(0x10))[_0x1bbd66(0x10c)](_0x4c5b61=>{const _0x1d82c3=_0x1bbd66,_0x1fb7eb=new Set();_0x4c5b61[_0x1d82c3(0xd3)](_0x1b3870=>{const _0x1a1701=_0x1d82c3;switch(_0x1b3870['type']){case _0x1a1701(0xc8):{const _0x3f3e2b=_0x1b3870[_0x1a1701(0xc2)][_0x1a1701(0xc6)];_0x1fb7eb[_0x1a1701(0xc8)](_0x3f3e2b);break;}}}),B(this[_0x1d82c3(0x118)],_0x1fb7eb);}));}[_0x170a12(0xd7)](){const _0x39e942=_0x170a12;this[_0x39e942(0xbb)](this['_commentService'][_0x39e942(0xe8)][_0x39e942(0x10c)](async _0x3df873=>{const _0x517ed4=_0x39e942;var _0x42f004,_0x11e5d0,_0x2f72ae,_0x1fe7aa;const _0x33d73e=(_0x42f004=this[_0x517ed4(0xce)][_0x517ed4(0x11b)](_0x3df873[_0x517ed4(0x107)])[_0x517ed4(0xbe)](_0x39a088=>_0x39a088[_0x517ed4(0xed)]===_0x3df873[_0x517ed4(0xed)]))==null?void 0x0:_0x42f004[_0x517ed4(0xf5)];if(!_0x33d73e)return;const {unitId:_0x22c859,subUnitId:_0x2504c1}=_0x33d73e;switch(_0x3df873['user']&&this['_userService'][_0x517ed4(0x116)](_0x3df873[_0x517ed4(0xb6)]),_0x3df873[_0x517ed4(0xe4)]){case v['Add']:break;case v['Reply']:{this[_0x517ed4(0xce)]['addComment'](_0x22c859,_0x2504c1,{'unitId':_0x22c859,'subUnitId':_0x2504c1,'ref':'','id':_0x3df873[_0x517ed4(0xf7)],'dT':D(+_0x3df873[_0x517ed4(0xcd)]),'threadId':_0x3df873[_0x517ed4(0xed)],'personId':(_0x2f72ae=(_0x11e5d0=_0x3df873[_0x517ed4(0xb6)])==null?void 0x0:_0x11e5d0[_0x517ed4(0x106)])!=null?_0x2f72ae:_0x3df873[_0x517ed4(0xe0)],'text':JSON[_0x517ed4(0xcf)](_0x3df873['content']),'parentId':_0x33d73e['id']});break;}case v[_0x517ed4(0xdd)]:{const _0x4257b6=this[_0x517ed4(0xce)]['getComment'](_0x22c859,_0x2504c1,_0x3df873[_0x517ed4(0xf7)]);_0x4257b6&&_0x4257b6[_0x517ed4(0x111)]&&this[_0x517ed4(0xce)][_0x517ed4(0xbc)](_0x22c859,_0x2504c1,_0x3df873[_0x517ed4(0xf7)]);break;}case v[_0x517ed4(0x100)]:{this[_0x517ed4(0xce)][_0x517ed4(0x10b)](_0x22c859,_0x2504c1,{'commentId':_0x3df873['replyId'],'text':JSON[_0x517ed4(0xcf)](_0x3df873[_0x517ed4(0xcc)])});break;}case v[_0x517ed4(0xf6)]:{const _0x5a87c0=(_0x1fe7aa=this['_threadCommentModel']['getUnit'](_0x3df873[_0x517ed4(0x107)])[_0x517ed4(0xbe)](_0x5d611=>_0x5d611['threadId']===_0x3df873[_0x517ed4(0xed)]))==null?void 0x0:_0x1fe7aa[_0x517ed4(0xf5)];_0x5a87c0&&this['_threadCommentModel']['resolveComment'](_0x22c859,_0x2504c1,_0x5a87c0['id'],_0x3df873[_0x517ed4(0xb3)]===I[_0x517ed4(0xd4)]);break;}}}));}};S=V([p(0x0,_0x359cb5(_0x4c2ad4)),p(0x1,_0x359cb5(_0x4b2a67)),p(0x2,_0x359cb5(_0x25c551)),p(0x3,_0x359cb5(_0x1b2434))],S);const z=_0x170a12(0x119),M={};var k=Object[_0x170a12(0xf2)],Q=(_0x546307,_0x4f484d,_0x1349d8,_0x352bf1)=>{const _0x174430=_0x170a12;for(var _0x190015=_0x352bf1>0x1?void 0x0:_0x352bf1?k(_0x4f484d,_0x1349d8):_0x4f484d,_0x598dc9=_0x546307[_0x174430(0x11a)]-0x1,_0x4e334e;_0x598dc9>=0x0;_0x598dc9--)(_0x4e334e=_0x546307[_0x598dc9])&&(_0x190015=_0x4e334e(_0x190015)||_0x190015);return _0x190015;},_=(_0x5bc900,_0x24dd49)=>(_0x1658df,_0x133e2e)=>_0x24dd49(_0x1658df,_0x133e2e,_0x5bc900);function X(_0x3d36a3,_0x34add5){const _0x420bab=_0x170a12,_0x344159=_0x3d36a3['replies'][0x0];return{..._0x34add5,'id':_0x344159[_0x420bab(0xf7)],'resolved':_0x3d36a3[_0x420bab(0xb3)]===0x1,'dT':D(_0x344159[_0x420bab(0xcd)]),'personId':_0x344159[_0x420bab(0xe0)],'threadId':_0x344159[_0x420bab(0xed)]};}function ee(_0x17b22a,_0x564788,_0xba524e){const _0x4c4b0c=_0x170a12;var _0x1b09df,_0x42baad;if(((_0x42baad=(_0x1b09df=_0x17b22a==null?void 0x0:_0x17b22a[_0x4c4b0c(0xe3)])==null?void 0x0:_0x1b09df[_0x4c4b0c(0x11a)])!=null?_0x42baad:0x0)>0x0){const _0x34064b=(_0x3597e0,_0x3b0880)=>({'id':_0x3597e0[_0x4c4b0c(0xf7)],'threadId':_0x3597e0['threadId'],'dT':D(_0x3597e0[_0x4c4b0c(0xcd)]),'personId':_0x3597e0[_0x4c4b0c(0xe0)],'resolved':_0x17b22a[_0x4c4b0c(0xb3)]===I['Solved'],'unitId':_0x564788,'subUnitId':_0xba524e,'text':JSON[_0x4c4b0c(0xcf)](_0x3597e0[_0x4c4b0c(0xcc)]),'parentId':_0x3b0880}),_0x1e3a3f=_0x34064b(_0x17b22a[_0x4c4b0c(0xe3)][0x0]);return{..._0x1e3a3f,'children':_0x17b22a[_0x4c4b0c(0xe3)]['slice'](0x1)[_0x4c4b0c(0xc5)](_0x5abb7c=>_0x34064b(_0x5abb7c,_0x1e3a3f['id']))};}return null;}let f=class{constructor(_0x33345f,_0x55fa38,_0x6d15d5,_0x5c4ee0){const _0x52d859=_0x170a12;this[_0x52d859(0xf8)]=_0x33345f,this[_0x52d859(0xd9)]=_0x55fa38,this[_0x52d859(0xf9)]=_0x6d15d5,this[_0x52d859(0x118)]=_0x5c4ee0;}async[_0x170a12(0xc4)](_0x4228b8){const _0x216388=_0x170a12;var _0x5e3840,_0xcd2e7d;const {parentId:_0x352f3f,unitId:_0x55c7cd,text:_0x44d758,threadId:_0x433dd7}=_0x4228b8,_0x5dfeb6=(_0xcd2e7d=(_0x5e3840=_0x44d758['customRanges'])==null?void 0x0:_0x5e3840[_0x216388(0xe2)](_0x55d5d5=>_0x55d5d5[_0x216388(0xe1)]===_0x556bf3[_0x216388(0xca)])['map'](_0x52dfeb=>_0x52dfeb[_0x216388(0xfc)]))!=null?_0xcd2e7d:[],_0x5cf39d=JSON[_0x216388(0xd8)](_0x44d758),_0x3bcad8=(await this['_sessionService'][_0x216388(0xba)](_0x55c7cd))[_0x216388(0xef)]();if(_0x352f3f){const _0x2773e3={'memberId':_0x3bcad8,'unitId':_0x55c7cd,'content':_0x5cf39d,'mention':_0x5dfeb6,'threadId':_0x433dd7},_0x35bc00=(await this['_httpService'][_0x216388(0x109)](_0x216388(0x105)+_0x55c7cd+_0x216388(0xf1),{'body':_0x2773e3}))[_0x216388(0x114)]['reply'];return{..._0x4228b8,'id':_0x35bc00['replyId'],'dT':_0x2f8643(+_0x35bc00[_0x216388(0xcd)])[_0x216388(0xeb)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x35bc00['userId']};}else{const _0x3e6a59={'memberId':_0x3bcad8,'unitId':_0x55c7cd,'content':_0x5cf39d,'mention':_0x5dfeb6},_0x3de87e=await this['_httpService'][_0x216388(0x109)](_0x216388(0x105)+_0x55c7cd+_0x216388(0x117),{'body':_0x3e6a59});return X(_0x3de87e[_0x216388(0x114)][_0x216388(0x112)],_0x4228b8);}}async['updateComment'](_0x2c0855){const _0x539810=_0x170a12;var _0x363707,_0x25e5c5;const {text:_0x13edc0,unitId:_0x2eee87}=_0x2c0855,_0x28cbd1=(_0x25e5c5=(_0x363707=_0x13edc0[_0x539810(0x103)])==null?void 0x0:_0x363707[_0x539810(0xe2)](_0x45c916=>_0x45c916['rangeType']===_0x556bf3[_0x539810(0xca)])[_0x539810(0xc5)](_0x1cecfd=>_0x1cecfd[_0x539810(0xfc)]))!=null?_0x25e5c5:[],_0x38dc71=JSON[_0x539810(0xd8)](_0x13edc0),_0x137032=_0x2c0855['threadId'],_0x5c0be0=_0x2c0855['id'],_0x24bc66={'memberId':(await this[_0x539810(0xf9)][_0x539810(0xba)](_0x2eee87))[_0x539810(0xef)](),'unitId':_0x2eee87,'threadId':_0x137032,'mention':_0x28cbd1,'content':_0x38dc71,'replyId':_0x5c0be0},_0x342009=await this['_httpService']['post'](_0x539810(0x105)+_0x2eee87+_0x539810(0xdc),{'body':_0x24bc66});return!_0x342009['body'][_0x539810(0x10a)]||_0x342009['body'][_0x539810(0x10a)][_0x539810(0xe9)]===0x1;}async[_0x170a12(0xd5)](_0x38e51b){const _0x344364=_0x170a12,{unitId:_0x4b7b1e}=_0x38e51b,_0x3378b8=_0x38e51b[_0x344364(0xed)],_0x26b591={'memberId':this[_0x344364(0xd9)][_0x344364(0xc9)]()[_0x344364(0x106)],'unitId':_0x4b7b1e,'threadId':_0x3378b8,'solved':_0x38e51b[_0x344364(0xb9)]?I['Solved']:I['OpenOrReOpen']},_0x53fd1a=await this['_httpService'][_0x344364(0x109)](_0x344364(0x105)+_0x4b7b1e+_0x344364(0xff),{'body':_0x26b591});return!_0x53fd1a['body']['error']||_0x53fd1a[_0x344364(0x114)]['error'][_0x344364(0xe9)]===0x1;}async[_0x170a12(0xbc)](_0x20ca4f,_0x4a6258,_0x2558b8,_0x3793f8){const _0x1e042b=_0x170a12,_0x1ab9d4={'memberId':(await this['_sessionService'][_0x1e042b(0xba)](_0x20ca4f))[_0x1e042b(0xef)](),'threadId':_0x2558b8,'replyId':_0x3793f8,'unitId':_0x20ca4f},_0xd4c3ad=await this[_0x1e042b(0xf8)][_0x1e042b(0x109)](_0x1e042b(0x105)+_0x20ca4f+_0x1e042b(0xf4),{'body':_0x1ab9d4});return!_0xd4c3ad[_0x1e042b(0x114)][_0x1e042b(0x10a)]||_0xd4c3ad['body'][_0x1e042b(0x10a)][_0x1e042b(0xe9)]===0x1;}async['listComments'](_0x105d0b,_0x25fe3b,_0x38b90d){const _0xfae800=_0x170a12,_0xf485c={'unitId':_0x105d0b,'threadId':_0x38b90d},_0xbc3581=await this[_0xfae800(0xf8)][_0xfae800(0x109)](_0xfae800(0x105)+_0x105d0b+_0xfae800(0xfd),{'body':_0xf485c}),_0x396810=_0x38b90d[_0xfae800(0xc5)](_0x3a33c2=>ee(_0xbc3581['body'][_0xfae800(0x11d)][_0x3a33c2],_0x105d0b,_0x25fe3b))[_0xfae800(0xe2)](Boolean);return Object[_0xfae800(0xf0)](_0xbc3581[_0xfae800(0x114)][_0xfae800(0xde)])[_0xfae800(0xd3)](_0x91cdc3=>{const _0x57e83e=_0xfae800;this[_0x57e83e(0xd9)][_0x57e83e(0x116)](_0x91cdc3);}),_0x396810;}[_0x170a12(0xd2)](_0x4f9356){const _0x35825f=_0x170a12;return{'id':_0x4f9356['id'],'threadId':_0x4f9356[_0x35825f(0xed)],'ref':_0x4f9356[_0x35825f(0x108)]};}};f=Q([_(0x0,_0x359cb5(_0x52d944)),_(0x1,_0x359cb5(_0x25c551)),_(0x2,_0x359cb5(_0x2c13ff)),_(0x3,_0x359cb5(_0x1b2434))],f);var re=Object[_0x170a12(0xf2)],te=(_0x394000,_0x4c0a39,_0x3ae398,_0x27ec62)=>{const _0x42ea85=_0x170a12;for(var _0x5b53f3=_0x27ec62>0x1?void 0x0:_0x27ec62?re(_0x4c0a39,_0x3ae398):_0x4c0a39,_0x10c12f=_0x394000[_0x42ea85(0x11a)]-0x1,_0x2b1fe8;_0x10c12f>=0x0;_0x10c12f--)(_0x2b1fe8=_0x394000[_0x10c12f])&&(_0x5b53f3=_0x2b1fe8(_0x5b53f3)||_0x5b53f3);return _0x5b53f3;},N=(_0x4fad23,_0x467e74)=>(_0x1d3cf4,_0x48f888)=>_0x467e74(_0x1d3cf4,_0x48f888,_0x4fad23);let g=class extends _0x1f8f54{constructor(_0x33d743,_0x21ff61){const _0xd3c28e=_0x170a12;super(),this[_0xd3c28e(0xd6)]=_0x33d743,this[_0xd3c28e(0xfe)]=_0x21ff61,this['_initDataSource']();}[_0x170a12(0xfa)](){const _0x473d85=_0x170a12;this['_threadCommentDataSourceService'][_0x473d85(0x110)]=this[_0x473d85(0xfe)],this[_0x473d85(0xd6)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x66404b),N(0x1,_0x359cb5(f))],g);var se=Object['defineProperty'],oe=Object[_0x170a12(0xf2)],ne=(_0x232b58,_0xa60be5,_0x532a00)=>_0xa60be5 in _0x232b58?se(_0x232b58,_0xa60be5,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x532a00}):_0x232b58[_0xa60be5]=_0x532a00,ie=(_0x26d43c,_0x38630f,_0x370d62,_0x55cd90)=>{const _0x40222c=_0x170a12;for(var _0x3adefa=_0x55cd90>0x1?void 0x0:_0x55cd90?oe(_0x38630f,_0x370d62):_0x38630f,_0x2e3f5e=_0x26d43c[_0x40222c(0x11a)]-0x1,_0x5152db;_0x2e3f5e>=0x0;_0x2e3f5e--)(_0x5152db=_0x26d43c[_0x2e3f5e])&&(_0x3adefa=_0x5152db(_0x3adefa)||_0x3adefa);return _0x3adefa;},w=(_0x14b0fd,_0x408e0d)=>(_0x2f3157,_0x1c7a01)=>_0x408e0d(_0x2f3157,_0x1c7a01,_0x14b0fd),$=(_0xbc54a0,_0x53455b,_0x5420c0)=>ne(_0xbc54a0,typeof _0x53455b!=_0x170a12(0x10f)?_0x53455b+'':_0x53455b,_0x5420c0);function _0x413c(_0x3fa5f7,_0x522b94){const _0x49b987=_0x49b9();return _0x413c=function(_0x413c9d,_0x49abca){_0x413c9d=_0x413c9d-0xb3;let _0x5bd89a=_0x49b987[_0x413c9d];return _0x5bd89a;},_0x413c(_0x3fa5f7,_0x522b94);}let b=class extends _0x27fb9a{constructor(_0x935635=M,_0x66f983,_0x1ea46c){const _0x4d2b5b=_0x170a12;super(),this[_0x4d2b5b(0xbd)]=_0x935635,this[_0x4d2b5b(0x118)]=_0x66f983,this[_0x4d2b5b(0x113)]=_0x1ea46c;const {..._0x18b5f8}=_0x16d744({},M,this[_0x4d2b5b(0xbd)]);this[_0x4d2b5b(0x113)][_0x4d2b5b(0xe5)](z,_0x18b5f8);}[_0x170a12(0xec)](){const _0x551f9a=_0x170a12;[[f],[g],[S]][_0x551f9a(0xd3)](_0x445c9d=>{const _0x159eba=_0x551f9a;this[_0x159eba(0x118)]['add'](_0x445c9d);});}['onReady'](){const _0x869f5d=_0x170a12;this[_0x869f5d(0x118)][_0x869f5d(0xd1)](g),this[_0x869f5d(0x118)][_0x869f5d(0xd1)](S);}};$(b,_0x170a12(0xb7),W),$(b,_0x170a12(0xe4),_0x516c80[_0x170a12(0xdb)]),b=ie([_0x5794d3(_0x17c15e,_0xd73538,_0x38ebb4),w(0x1,_0x359cb5(_0x1b2434)),w(0x2,_0x58e04f)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x88c252=_0x54f6;(function(_0x325260,_0x22d3f1){const _0x4996fb=_0x54f6,_0x2e4316=_0x325260();while(!![]){try{const _0x3be9ae=-parseInt(_0x4996fb(0xd7))/0x1+parseInt(_0x4996fb(0x9d))/0x2+parseInt(_0x4996fb(0xd0))/0x3+parseInt(_0x4996fb(0xe1))/0x4+-parseInt(_0x4996fb(0xdc))/0x5+-parseInt(_0x4996fb(0xac))/0x6*(-parseInt(_0x4996fb(0xa4))/0x7)+parseInt(_0x4996fb(0xb9))/0x8*(-parseInt(_0x4996fb(0xd4))/0x9);if(_0x3be9ae===_0x22d3f1)break;else _0x2e4316['push'](_0x2e4316['shift']());}catch(_0x37d5ba){_0x2e4316['push'](_0x2e4316['shift']());}}}(_0x38dc,0xee8e5));import{CommentService as _0x29a1f1,CollaborationSessionService as _0x2b9727,UniverCollaborationClientPlugin as _0x2f5b82}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x802055}from'@univerjs-pro/license';import{dayjs as _0x587e27,UserManagerService as _0x1d01f8,Inject as _0xff23a0,Injector as _0x145b8a,Disposable as _0x28cf76,CustomRangeType as _0x1c7e16,UniverInstanceType as _0x82bea5,DependentOn as _0x5e7b4e,IConfigService as _0x5904ab,Plugin as _0x249cfc,merge as _0x19b49a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1ccc86}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x3f14f7,IThreadCommentDataSourceService as _0x22d45b}from'@univerjs/thread-comment';import{bufferTime as _0x4a89db}from'rxjs';import{HTTPService as _0x87bad4}from'@univerjs/network';const W=_0x88c252(0xe0);var I=(_0x3ff0bc=>(_0x3ff0bc[_0x3ff0bc[_0x88c252(0xbe)]=0x0]='OpenOrReOpen',_0x3ff0bc[_0x3ff0bc[_0x88c252(0xc4)]=0x1]=_0x88c252(0xc4),_0x3ff0bc[_0x3ff0bc['UNRECOGNIZED']=-0x1]=_0x88c252(0xc7),_0x3ff0bc))(I||{}),v=(_0x2c9027=>(_0x2c9027[_0x2c9027[_0x88c252(0xd2)]=0x0]='Unknown',_0x2c9027[_0x2c9027[_0x88c252(0xe3)]=0x1]=_0x88c252(0xe3),_0x2c9027[_0x2c9027[_0x88c252(0xc8)]=0x2]=_0x88c252(0xc8),_0x2c9027[_0x2c9027[_0x88c252(0xe4)]=0x3]=_0x88c252(0xe4),_0x2c9027[_0x2c9027[_0x88c252(0xd5)]=0x4]=_0x88c252(0xd5),_0x2c9027[_0x2c9027[_0x88c252(0x9c)]=0x5]=_0x88c252(0x9c),_0x2c9027[_0x2c9027[_0x88c252(0xc7)]=-0x1]=_0x88c252(0xc7),_0x2c9027))(v||{});const D=_0x5351ca=>_0x587e27(new Date(+_0x5351ca))['format']('YYYY/MM/DD\x20HH:mm'),B=async(_0x5a5049,_0x113ab9)=>{const _0x18d92b=_0x88c252,_0x410e72=_0x5a5049['get'](_0x1d01f8),_0x3bab84=_0x5a5049[_0x18d92b(0xe5)](_0x87bad4);_0x113ab9[_0x18d92b(0x93)](_0x2fcdf9=>{const _0x377f91=_0x18d92b;_0x410e72[_0x377f91(0x99)](_0x2fcdf9)&&_0x113ab9[_0x377f91(0xca)](_0x2fcdf9);}),_0x113ab9[_0x18d92b(0xdd)]&&(await _0x3bab84[_0x18d92b(0xe5)]('/universer-api/user/list',{'params':{'userIDs':[..._0x113ab9]}}))['body'][_0x18d92b(0xd8)][_0x18d92b(0x93)](_0xfacd6e=>{const _0xf1e9c=_0x18d92b;_0xfacd6e&&_0x410e72[_0xf1e9c(0xd9)](_0xfacd6e);});};var K=Object[_0x88c252(0xbd)],V=(_0x43cc44,_0x1daacc,_0x1d64d9,_0x44907e)=>{for(var _0x5cbf24=_0x44907e>0x1?void 0x0:_0x44907e?K(_0x1daacc,_0x1d64d9):_0x1daacc,_0x2c4e60=_0x43cc44['length']-0x1,_0x54b9fd;_0x2c4e60>=0x0;_0x2c4e60--)(_0x54b9fd=_0x43cc44[_0x2c4e60])&&(_0x5cbf24=_0x54b9fd(_0x5cbf24)||_0x5cbf24);return _0x5cbf24;},p=(_0x41f21f,_0x1aa085)=>(_0x401d9f,_0x1b4f82)=>_0x1aa085(_0x401d9f,_0x1b4f82,_0x41f21f);function _0x54f6(_0x2fb803,_0x54fd3c){const _0x38dc9d=_0x38dc();return _0x54f6=function(_0x54f66b,_0x425ca8){_0x54f66b=_0x54f66b-0x8a;let _0x5dc8aa=_0x38dc9d[_0x54f66b];return _0x5dc8aa;},_0x54f6(_0x2fb803,_0x54fd3c);}let S=class extends _0x28cf76{constructor(_0x4ac549,_0x1b9672,_0x4dfebe,_0x161a4f){const _0x2a4ead=_0x88c252;super(),this[_0x2a4ead(0xaf)]=_0x4ac549,this['_threadCommentModel']=_0x1b9672,this[_0x2a4ead(0x9a)]=_0x4dfebe,this[_0x2a4ead(0xce)]=_0x161a4f,this[_0x2a4ead(0xbb)](),this['_initUserSync']();}['_initUserSync'](){const _0x1446ae=_0x88c252;this[_0x1446ae(0xc6)](this[_0x1446ae(0xb7)][_0x1446ae(0x95)][_0x1446ae(0xa7)](_0x4a89db(0x10))[_0x1446ae(0x92)](_0x5a81c5=>{const _0x3bf988=_0x1446ae,_0x1722be=new Set();_0x5a81c5[_0x3bf988(0x93)](_0x560be3=>{const _0x27de50=_0x3bf988;switch(_0x560be3[_0x27de50(0xc9)]){case _0x27de50(0xda):{const _0x3e5161=_0x560be3[_0x27de50(0x90)]['personId'];_0x1722be[_0x27de50(0xda)](_0x3e5161);break;}}}),B(this[_0x3bf988(0xce)],_0x1722be);}));}[_0x88c252(0xbb)](){const _0x2b1959=_0x88c252;this[_0x2b1959(0xc6)](this['_commentService']['commentUpdate$'][_0x2b1959(0x92)](async _0x3fd97f=>{const _0x54ac12=_0x2b1959;var _0x394602,_0x32fa22,_0x302bb0,_0x4d800d;const _0x2847ce=(_0x394602=this[_0x54ac12(0xb7)][_0x54ac12(0x9f)](_0x3fd97f['unitId'])[_0x54ac12(0x97)](_0x453d1e=>_0x453d1e[_0x54ac12(0xc2)]===_0x3fd97f[_0x54ac12(0xc2)]))==null?void 0x0:_0x394602[_0x54ac12(0xc3)];if(!_0x2847ce)return;const {unitId:_0x2a4d18,subUnitId:_0x1558cd}=_0x2847ce;switch(_0x3fd97f[_0x54ac12(0x98)]&&this[_0x54ac12(0x9a)]['addUser'](_0x3fd97f['user']),_0x3fd97f[_0x54ac12(0xc9)]){case v[_0x54ac12(0xe3)]:break;case v[_0x54ac12(0xc8)]:{this['_threadCommentModel'][_0x54ac12(0xe2)](_0x2a4d18,_0x1558cd,{'unitId':_0x2a4d18,'subUnitId':_0x1558cd,'ref':'','id':_0x3fd97f[_0x54ac12(0xa5)],'dT':D(+_0x3fd97f[_0x54ac12(0xea)]),'threadId':_0x3fd97f[_0x54ac12(0xc2)],'personId':(_0x302bb0=(_0x32fa22=_0x3fd97f[_0x54ac12(0x98)])==null?void 0x0:_0x32fa22[_0x54ac12(0xaa)])!=null?_0x302bb0:_0x3fd97f[_0x54ac12(0xa0)],'text':JSON[_0x54ac12(0x94)](_0x3fd97f[_0x54ac12(0xdf)]),'parentId':_0x2847ce['id']});break;}case v[_0x54ac12(0xd5)]:{const _0x35af6a=this[_0x54ac12(0xb7)][_0x54ac12(0x96)](_0x2a4d18,_0x1558cd,_0x3fd97f[_0x54ac12(0xa5)]);_0x35af6a&&_0x35af6a['parentId']&&this[_0x54ac12(0xb7)][_0x54ac12(0xd6)](_0x2a4d18,_0x1558cd,_0x3fd97f[_0x54ac12(0xa5)]);break;}case v[_0x54ac12(0xe4)]:{this[_0x54ac12(0xb7)][_0x54ac12(0xcc)](_0x2a4d18,_0x1558cd,{'commentId':_0x3fd97f[_0x54ac12(0xa5)],'text':JSON['parse'](_0x3fd97f['content'])});break;}case v['Solve']:{const _0x33e13b=(_0x4d800d=this['_threadCommentModel'][_0x54ac12(0x9f)](_0x3fd97f[_0x54ac12(0xc5)])['find'](_0x2f6279=>_0x2f6279[_0x54ac12(0xc2)]===_0x3fd97f[_0x54ac12(0xc2)]))==null?void 0x0:_0x4d800d[_0x54ac12(0xc3)];_0x33e13b&&this[_0x54ac12(0xb7)][_0x54ac12(0xcb)](_0x2a4d18,_0x1558cd,_0x33e13b['id'],_0x3fd97f[_0x54ac12(0xe6)]===I[_0x54ac12(0xc4)]);break;}}}));}};function _0x38dc(){const _0x1497dc=['map','resolved','_threadCommentModel','onReady','4280rYRgNZ','stringify','_init','ref','getOwnPropertyDescriptor','OpenOrReOpen','COMMENT','body','thread-comment-data-source.config','threadId','root','Solved','unitId','disposeWithMe','UNRECOGNIZED','Reply','type','delete','resolveComment','updateComment','setConfig','_injector','_sessionService','478704LOxVnW','/delete','Unknown','filter','28287nYFRzo','Delete','deleteComment','144137sVfIJx','users','addUser','add','code','7758860qoYhmv','size','error','content','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','2891564dbgNrJ','addComment','Add','Edit','get','solved','syncUpdateMutationToColla','comment','_config','createTimestamp','_initDataSource','getMemberID','slice','getCurrentUser','dataSource','YYYY/MM/DD\x20HH:mm','comments','UNIVER_UNKNOWN','onStarting','values','payload','_threadCommentDataSource','subscribe','forEach','parse','commentUpdate$','getComment','find','user','getUser','_userService','saveCommentToSnapshot','Solve','3589474OGcnEb','symbol','getUnit','userId','_threadCommentDataSourceService','rangeType','reply','7sOBqfV','replyId','_httpService','pipe','/reply','post','userID','/add','10064058jrZtWT','/edit','rangeId','_commentService','_configService','replies','length','requireSession','/universer-api/comment/unit/'];_0x38dc=function(){return _0x1497dc;};return _0x38dc();}S=V([p(0x0,_0xff23a0(_0x29a1f1)),p(0x1,_0xff23a0(_0x3f14f7)),p(0x2,_0xff23a0(_0x1d01f8)),p(0x3,_0xff23a0(_0x145b8a))],S);const z=_0x88c252(0xc1),M={};var k=Object[_0x88c252(0xbd)],Q=(_0x51dfe7,_0x952733,_0x484844,_0xee3faf)=>{for(var _0xbfdf47=_0xee3faf>0x1?void 0x0:_0xee3faf?k(_0x952733,_0x484844):_0x952733,_0x24e4e6=_0x51dfe7['length']-0x1,_0x50321d;_0x24e4e6>=0x0;_0x24e4e6--)(_0x50321d=_0x51dfe7[_0x24e4e6])&&(_0xbfdf47=_0x50321d(_0xbfdf47)||_0xbfdf47);return _0xbfdf47;},_=(_0x46bdd9,_0x57b415)=>(_0x504c69,_0x340846)=>_0x57b415(_0x504c69,_0x340846,_0x46bdd9);function X(_0x4badcb,_0x171569){const _0x62407a=_0x88c252,_0x17d726=_0x4badcb[_0x62407a(0xb1)][0x0];return{..._0x171569,'id':_0x17d726[_0x62407a(0xa5)],'resolved':_0x4badcb[_0x62407a(0xe6)]===0x1,'dT':D(_0x17d726['createTimestamp']),'personId':_0x17d726[_0x62407a(0xa0)],'threadId':_0x17d726['threadId']};}function ee(_0x837349,_0x31038c,_0x245dd8){const _0x2b4d30=_0x88c252;var _0x4f0e35,_0x340f51;if(((_0x340f51=(_0x4f0e35=_0x837349==null?void 0x0:_0x837349['replies'])==null?void 0x0:_0x4f0e35['length'])!=null?_0x340f51:0x0)>0x0){const _0x270fe0=(_0x53a033,_0x196b21)=>({'id':_0x53a033[_0x2b4d30(0xa5)],'threadId':_0x53a033['threadId'],'dT':D(_0x53a033[_0x2b4d30(0xea)]),'personId':_0x53a033[_0x2b4d30(0xa0)],'resolved':_0x837349[_0x2b4d30(0xe6)]===I[_0x2b4d30(0xc4)],'unitId':_0x31038c,'subUnitId':_0x245dd8,'text':JSON[_0x2b4d30(0x94)](_0x53a033[_0x2b4d30(0xdf)]),'parentId':_0x196b21}),_0x435625=_0x270fe0(_0x837349['replies'][0x0]);return{..._0x435625,'children':_0x837349[_0x2b4d30(0xb1)][_0x2b4d30(0xed)](0x1)[_0x2b4d30(0xb5)](_0x2bb9b4=>_0x270fe0(_0x2bb9b4,_0x435625['id']))};}return null;}let f=class{constructor(_0x15a2e6,_0x30053c,_0x2c4f57,_0x44ea1f){const _0x2b48e0=_0x88c252;this[_0x2b48e0(0xa6)]=_0x15a2e6,this[_0x2b48e0(0x9a)]=_0x30053c,this[_0x2b48e0(0xcf)]=_0x2c4f57,this[_0x2b48e0(0xce)]=_0x44ea1f;}async[_0x88c252(0xe2)](_0x40d71d){const _0x3ec8ec=_0x88c252;var _0x283359,_0x26f4c6;const {parentId:_0x4e8f03,unitId:_0x42a1e0,text:_0x58af55,threadId:_0x22446b}=_0x40d71d,_0x506b5f=(_0x26f4c6=(_0x283359=_0x58af55['customRanges'])==null?void 0x0:_0x283359[_0x3ec8ec(0xd3)](_0x531e3e=>_0x531e3e[_0x3ec8ec(0xa2)]===_0x1c7e16['COMMENT'])[_0x3ec8ec(0xb5)](_0x5a1bb0=>_0x5a1bb0['rangeId']))!=null?_0x26f4c6:[],_0x157d09=JSON[_0x3ec8ec(0xba)](_0x58af55),_0x190663=(await this[_0x3ec8ec(0xcf)][_0x3ec8ec(0xb3)](_0x42a1e0))[_0x3ec8ec(0xec)]();if(_0x4e8f03){const _0x33a9a2={'memberId':_0x190663,'unitId':_0x42a1e0,'content':_0x157d09,'mention':_0x506b5f,'threadId':_0x22446b},_0x535d5a=(await this['_httpService']['post'](_0x3ec8ec(0xb4)+_0x42a1e0+_0x3ec8ec(0xa8),{'body':_0x33a9a2}))[_0x3ec8ec(0xc0)][_0x3ec8ec(0xa3)];return{..._0x40d71d,'id':_0x535d5a[_0x3ec8ec(0xa5)],'dT':_0x587e27(+_0x535d5a[_0x3ec8ec(0xea)])['format'](_0x3ec8ec(0x8b)),'personId':_0x535d5a['userId']};}else{const _0x42caf5={'memberId':_0x190663,'unitId':_0x42a1e0,'content':_0x157d09,'mention':_0x506b5f},_0x3efab2=await this[_0x3ec8ec(0xa6)][_0x3ec8ec(0xa9)](_0x3ec8ec(0xb4)+_0x42a1e0+_0x3ec8ec(0xab),{'body':_0x42caf5});return X(_0x3efab2['body'][_0x3ec8ec(0xe8)],_0x40d71d);}}async[_0x88c252(0xcc)](_0x36b2df){const _0x47d04e=_0x88c252;var _0xdb6bdd,_0x41507d;const {text:_0x18ce6f,unitId:_0x339cff}=_0x36b2df,_0x1b4c44=(_0x41507d=(_0xdb6bdd=_0x18ce6f['customRanges'])==null?void 0x0:_0xdb6bdd['filter'](_0x1fae81=>_0x1fae81['rangeType']===_0x1c7e16[_0x47d04e(0xbf)])[_0x47d04e(0xb5)](_0x364aa4=>_0x364aa4[_0x47d04e(0xae)]))!=null?_0x41507d:[],_0x2147e8=JSON[_0x47d04e(0xba)](_0x18ce6f),_0x337c9b=_0x36b2df[_0x47d04e(0xc2)],_0x4b8025=_0x36b2df['id'],_0x4d3794={'memberId':(await this[_0x47d04e(0xcf)][_0x47d04e(0xb3)](_0x339cff))['getMemberID'](),'unitId':_0x339cff,'threadId':_0x337c9b,'mention':_0x1b4c44,'content':_0x2147e8,'replyId':_0x4b8025},_0x6e95da=await this[_0x47d04e(0xa6)][_0x47d04e(0xa9)](_0x47d04e(0xb4)+_0x339cff+_0x47d04e(0xad),{'body':_0x4d3794});return!_0x6e95da[_0x47d04e(0xc0)]['error']||_0x6e95da[_0x47d04e(0xc0)][_0x47d04e(0xde)][_0x47d04e(0xdb)]===0x1;}async[_0x88c252(0xcb)](_0x34287f){const _0x2de5f9=_0x88c252,{unitId:_0x247581}=_0x34287f,_0x281e5b=_0x34287f[_0x2de5f9(0xc2)],_0x5f03e3={'memberId':this['_userService'][_0x2de5f9(0xee)]()[_0x2de5f9(0xaa)],'unitId':_0x247581,'threadId':_0x281e5b,'solved':_0x34287f[_0x2de5f9(0xb6)]?I[_0x2de5f9(0xc4)]:I[_0x2de5f9(0xbe)]},_0x3703cd=await this[_0x2de5f9(0xa6)][_0x2de5f9(0xa9)](_0x2de5f9(0xb4)+_0x247581+'/solved',{'body':_0x5f03e3});return!_0x3703cd['body'][_0x2de5f9(0xde)]||_0x3703cd[_0x2de5f9(0xc0)][_0x2de5f9(0xde)][_0x2de5f9(0xdb)]===0x1;}async['deleteComment'](_0x3d5139,_0x300ae0,_0xf11501,_0x415f79){const _0x725b03=_0x88c252,_0x2360ad={'memberId':(await this['_sessionService'][_0x725b03(0xb3)](_0x3d5139))[_0x725b03(0xec)](),'threadId':_0xf11501,'replyId':_0x415f79,'unitId':_0x3d5139},_0x1ef26a=await this[_0x725b03(0xa6)]['post'](_0x725b03(0xb4)+_0x3d5139+_0x725b03(0xd1),{'body':_0x2360ad});return!_0x1ef26a[_0x725b03(0xc0)][_0x725b03(0xde)]||_0x1ef26a['body'][_0x725b03(0xde)][_0x725b03(0xdb)]===0x1;}async['listComments'](_0x1e6eb3,_0x1855e6,_0xf622c3){const _0x11afa4=_0x88c252,_0x7ddee8={'unitId':_0x1e6eb3,'threadId':_0xf622c3},_0x20b549=await this[_0x11afa4(0xa6)][_0x11afa4(0xa9)](_0x11afa4(0xb4)+_0x1e6eb3+'/list',{'body':_0x7ddee8}),_0x4a5e53=_0xf622c3[_0x11afa4(0xb5)](_0x4b6aab=>ee(_0x20b549[_0x11afa4(0xc0)][_0x11afa4(0x8c)][_0x4b6aab],_0x1e6eb3,_0x1855e6))[_0x11afa4(0xd3)](Boolean);return Object[_0x11afa4(0x8f)](_0x20b549[_0x11afa4(0xc0)][_0x11afa4(0xd8)])['forEach'](_0x18c960=>{const _0x2d6b4e=_0x11afa4;this[_0x2d6b4e(0x9a)][_0x2d6b4e(0xd9)](_0x18c960);}),_0x4a5e53;}[_0x88c252(0x9b)](_0x65b017){const _0x55c081=_0x88c252;return{'id':_0x65b017['id'],'threadId':_0x65b017[_0x55c081(0xc2)],'ref':_0x65b017[_0x55c081(0xbc)]};}};f=Q([_(0x0,_0xff23a0(_0x87bad4)),_(0x1,_0xff23a0(_0x1d01f8)),_(0x2,_0xff23a0(_0x2b9727)),_(0x3,_0xff23a0(_0x145b8a))],f);var re=Object[_0x88c252(0xbd)],te=(_0x17df79,_0x3383bc,_0x29dd30,_0x553ff7)=>{for(var _0x5d5828=_0x553ff7>0x1?void 0x0:_0x553ff7?re(_0x3383bc,_0x29dd30):_0x3383bc,_0x8956cb=_0x17df79['length']-0x1,_0xce97e5;_0x8956cb>=0x0;_0x8956cb--)(_0xce97e5=_0x17df79[_0x8956cb])&&(_0x5d5828=_0xce97e5(_0x5d5828)||_0x5d5828);return _0x5d5828;},N=(_0x3773fa,_0x44082f)=>(_0x5387e1,_0x127f81)=>_0x44082f(_0x5387e1,_0x127f81,_0x3773fa);let g=class extends _0x28cf76{constructor(_0x34059b,_0x3c9d3f){const _0x2893a6=_0x88c252;super(),this[_0x2893a6(0xa1)]=_0x34059b,this['_threadCommentDataSource']=_0x3c9d3f,this[_0x2893a6(0xeb)]();}['_initDataSource'](){const _0x54b3d3=_0x88c252;this[_0x54b3d3(0xa1)][_0x54b3d3(0x8a)]=this[_0x54b3d3(0x91)],this[_0x54b3d3(0xa1)][_0x54b3d3(0xe7)]=!0x1;}};g=te([N(0x0,_0x22d45b),N(0x1,_0xff23a0(f))],g);var se=Object['defineProperty'],oe=Object[_0x88c252(0xbd)],ne=(_0x4aa71e,_0x20681a,_0x18f496)=>_0x20681a in _0x4aa71e?se(_0x4aa71e,_0x20681a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x18f496}):_0x4aa71e[_0x20681a]=_0x18f496,ie=(_0x5393a4,_0x562271,_0xfe57fe,_0x5910e7)=>{const _0x1f59dd=_0x88c252;for(var _0x100e18=_0x5910e7>0x1?void 0x0:_0x5910e7?oe(_0x562271,_0xfe57fe):_0x562271,_0x2b80c0=_0x5393a4[_0x1f59dd(0xb2)]-0x1,_0x50ea37;_0x2b80c0>=0x0;_0x2b80c0--)(_0x50ea37=_0x5393a4[_0x2b80c0])&&(_0x100e18=_0x50ea37(_0x100e18)||_0x100e18);return _0x100e18;},w=(_0x4a066e,_0x47f1c7)=>(_0x444f1e,_0x15ccb2)=>_0x47f1c7(_0x444f1e,_0x15ccb2,_0x4a066e),$=(_0x189ca4,_0x3a9e49,_0x4640a6)=>ne(_0x189ca4,typeof _0x3a9e49!=_0x88c252(0x9e)?_0x3a9e49+'':_0x3a9e49,_0x4640a6);let b=class extends _0x249cfc{constructor(_0x16602f=M,_0x9a0046,_0x5e5071){const _0x14286e=_0x88c252;super(),this[_0x14286e(0xe9)]=_0x16602f,this[_0x14286e(0xce)]=_0x9a0046,this[_0x14286e(0xb0)]=_0x5e5071;const {..._0x338286}=_0x19b49a({},M,this[_0x14286e(0xe9)]);this[_0x14286e(0xb0)][_0x14286e(0xcd)](z,_0x338286);}[_0x88c252(0x8e)](){[[f],[g],[S]]['forEach'](_0x48068e=>{const _0x1e278a=_0x54f6;this[_0x1e278a(0xce)]['add'](_0x48068e);});}[_0x88c252(0xb8)](){const _0x1d9ad9=_0x88c252;this['_injector'][_0x1d9ad9(0xe5)](g),this[_0x1d9ad9(0xce)][_0x1d9ad9(0xe5)](S);}};$(b,'pluginName',W),$(b,_0x88c252(0xc9),_0x82bea5[_0x88c252(0x8d)]),b=ie([_0x5e7b4e(_0x1ccc86,_0x2f5b82,_0x802055),w(0x1,_0xff23a0(_0x145b8a)),w(0x2,_0x5904ab)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x5ab6(){const _0x5948fe=['YYYY/MM/DD\x20HH:mm','1820064XYFeAu','5419519OnEWqD','map','values','Solve','/reply','userID','defineProperty','subscribe','onReady','Injector','updateComment','toStringTag','Unknown','Delete','_httpService','replies','@univerjs-pro/collaboration-client','deleteComment','@univerjs/network','_configService','/universer-api/user/list','payload','comments','161084bpTCHt','UniverInstanceType','OpenOrReOpen','@univerjs/core','/universer-api/comment/unit/','ref','UniverProThreadCommentDatasource','merge','CollaborationSessionService','/add','threadId','dayjs','640840GmOLTW','amd','_threadCommentModel','unitId','type','_initUserSync','getCurrentUser','_userService','_threadCommentDataSourceService','filter','getUser','@univerjs/thread-comment','content','listComments','Add','parse','58QsVbop','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_threadCommentDataSource','onStarting','Inject','rangeId','commentUpdate$','pluginName','UniverCollaborationClientPlugin','DependentOn','UserManagerService','resolved','4487505pAOErU','IConfigService','reply','addUser','code','_sessionService','Disposable','Reply','bufferTime','resolveComment','UniverCore','get','getMemberID','/edit','user','_injector','root','requireSession','_init','UniverThreadCommentUi','Solved','customRanges','createTimestamp','length','/list','size','ThreadCommentModel','function','UniverProLicense','@univerjs-pro/license','add','UNRECOGNIZED','replyId','_config','delete','UniverThreadCommentUIPlugin','Plugin','UniverNetwork','parentId','rxjs','solved','48315hmkAaV','forEach','addComment','find','UniverThreadCommentDataSourcePlugin','UniverLicensePlugin','userId','_commentService','HTTPService','6HtcHKt','post','CustomRangeType','rangeType','slice','getOwnPropertyDescriptor','_initDataSource','IThreadCommentDataSourceService','7531353ydVDGs','error','personId','body','getUnit','format','stringify','Edit','thread-comment-data-source.config','dataSource','exports','/delete','pipe'];_0x5ab6=function(){return _0x5948fe;};return _0x5ab6();}function _0x1a47(_0xda2925,_0x273348){const _0x5ab6d6=_0x5ab6();return _0x1a47=function(_0x1a47cb,_0x1f685a){_0x1a47cb=_0x1a47cb-0x89;let _0x2375f1=_0x5ab6d6[_0x1a47cb];return _0x2375f1;},_0x1a47(_0xda2925,_0x273348);}(function(_0x2b9ede,_0x1d0a80){const _0x346a42=_0x1a47,_0x3d8802=_0x2b9ede();while(!![]){try{const _0x5814e0=-parseInt(_0x346a42(0xd6))/0x1+parseInt(_0x346a42(0xf2))/0x2*(-parseInt(_0x346a42(0x9f))/0x3)+parseInt(_0x346a42(0xe2))/0x4+parseInt(_0x346a42(0xfe))/0x5+parseInt(_0x346a42(0xa8))/0x6*(-parseInt(_0x346a42(0xbf))/0x7)+parseInt(_0x346a42(0xbe))/0x8+parseInt(_0x346a42(0xb0))/0x9;if(_0x5814e0===_0x1d0a80)break;else _0x3d8802['push'](_0x3d8802['shift']());}catch(_0x1c5e11){_0x3d8802['push'](_0x3d8802['shift']());}}}(_0x5ab6,0xafb4a),function(_0x196604,_0x55e28a){const _0xc4d601=_0x1a47;typeof exports=='object'&&typeof module<'u'?_0x55e28a(exports,require(_0xc4d601(0xcf)),require(_0xc4d601(0x93)),require(_0xc4d601(0xd9)),require('@univerjs/thread-comment-ui'),require(_0xc4d601(0xed)),require(_0xc4d601(0x9d)),require(_0xc4d601(0xd1))):typeof define==_0xc4d601(0x91)&&define[_0xc4d601(0xe3)]?define([_0xc4d601(0xba),_0xc4d601(0xcf),_0xc4d601(0x93),_0xc4d601(0xd9),'@univerjs/thread-comment-ui',_0xc4d601(0xed),_0xc4d601(0x9d),_0xc4d601(0xd1)],_0x55e28a):(_0x196604=typeof globalThis<'u'?globalThis:_0x196604||self,_0x55e28a(_0x196604[_0xc4d601(0xdc)]={},_0x196604['UniverProCollaborationClient'],_0x196604[_0xc4d601(0x92)],_0x196604[_0xc4d601(0x108)],_0x196604[_0xc4d601(0x89)],_0x196604['UniverThreadComment'],_0x196604[_0xc4d601(0x9d)],_0x196604[_0xc4d601(0x9b)]));}(this,function(_0x594425,_0x468d22,_0x280668,_0x5715d9,_0x5a9834,_0x4257e4,_0x79533f,_0x1c12d2){'use strict';const _0x1be135=_0x1a47;const _0x3871d9=_0x1be135(0xf3);var _0x174176=(_0x537992=>(_0x537992[_0x537992[_0x1be135(0xd8)]=0x0]=_0x1be135(0xd8),_0x537992[_0x537992[_0x1be135(0x8a)]=0x1]=_0x1be135(0x8a),_0x537992[_0x537992['UNRECOGNIZED']=-0x1]=_0x1be135(0x95),_0x537992))(_0x174176||{}),_0x2ad31f=(_0x32fcfa=>(_0x32fcfa[_0x32fcfa['Unknown']=0x0]=_0x1be135(0xcb),_0x32fcfa[_0x32fcfa[_0x1be135(0xf0)]=0x1]='Add',_0x32fcfa[_0x32fcfa['Reply']=0x2]=_0x1be135(0x105),_0x32fcfa[_0x32fcfa[_0x1be135(0xb7)]=0x3]=_0x1be135(0xb7),_0x32fcfa[_0x32fcfa['Delete']=0x4]=_0x1be135(0xcc),_0x32fcfa[_0x32fcfa[_0x1be135(0xc2)]=0x5]=_0x1be135(0xc2),_0x32fcfa[_0x32fcfa[_0x1be135(0x95)]=-0x1]=_0x1be135(0x95),_0x32fcfa))(_0x2ad31f||{});const _0x1330ee=_0x1c6a0e=>_0x5715d9['dayjs'](new Date(+_0x1c6a0e))[_0x1be135(0xb5)](_0x1be135(0xbd)),_0x51811a=async(_0x4acc8c,_0x31f3ab)=>{const _0x3cc8d2=_0x1be135,_0x4297f5=_0x4acc8c['get'](_0x5715d9[_0x3cc8d2(0xfc)]),_0x5676f2=_0x4acc8c['get'](_0x1c12d2[_0x3cc8d2(0xa7)]);_0x31f3ab[_0x3cc8d2(0xa0)](_0x3dea4c=>{const _0x383233=_0x3cc8d2;_0x4297f5[_0x383233(0xec)](_0x3dea4c)&&_0x31f3ab[_0x383233(0x98)](_0x3dea4c);}),_0x31f3ab[_0x3cc8d2(0x8f)]&&(await _0x5676f2[_0x3cc8d2(0x109)](_0x3cc8d2(0xd3),{'params':{'userIDs':[..._0x31f3ab]}}))['body']['users'][_0x3cc8d2(0xa0)](_0x3f7b0e=>{const _0x431695=_0x3cc8d2;_0x3f7b0e&&_0x4297f5[_0x431695(0x101)](_0x3f7b0e);});};var _0x4a9638=Object[_0x1be135(0xad)],_0x4f4e15=(_0x5dd294,_0x32673c,_0x3f7f9b,_0x201b22)=>{const _0x284d9e=_0x1be135;for(var _0x5ac52b=_0x201b22>0x1?void 0x0:_0x201b22?_0x4a9638(_0x32673c,_0x3f7f9b):_0x32673c,_0x4be631=_0x5dd294[_0x284d9e(0x8d)]-0x1,_0x3646d9;_0x4be631>=0x0;_0x4be631--)(_0x3646d9=_0x5dd294[_0x4be631])&&(_0x5ac52b=_0x3646d9(_0x5ac52b)||_0x5ac52b);return _0x5ac52b;},_0x3d3bb4=(_0x4ec865,_0x3a5db0)=>(_0x5c591d,_0x4d7d45)=>_0x3a5db0(_0x5c591d,_0x4d7d45,_0x4ec865);let _0x55c5b2=class extends _0x5715d9['Disposable']{constructor(_0x233bd3,_0x43b62f,_0x52e9b2,_0x18dee5){const _0x2e2cc6=_0x1be135;super(),this[_0x2e2cc6(0xa6)]=_0x233bd3,this[_0x2e2cc6(0xe4)]=_0x43b62f,this['_userService']=_0x52e9b2,this[_0x2e2cc6(0x10d)]=_0x18dee5,this[_0x2e2cc6(0x110)](),this[_0x2e2cc6(0xe7)]();}[_0x1be135(0xe7)](){const _0x151bf7=_0x1be135;this['disposeWithMe'](this[_0x151bf7(0xe4)]['commentUpdate$'][_0x151bf7(0xbc)](_0x79533f[_0x151bf7(0x106)](0x10))[_0x151bf7(0xc6)](_0x51026d=>{const _0x214c37=_0x151bf7,_0x3dbd4a=new Set();_0x51026d[_0x214c37(0xa0)](_0x6c9e66=>{const _0xaaf8d7=_0x214c37;switch(_0x6c9e66[_0xaaf8d7(0xe6)]){case _0xaaf8d7(0x94):{const _0x5a1cc5=_0x6c9e66[_0xaaf8d7(0xd4)][_0xaaf8d7(0xb2)];_0x3dbd4a[_0xaaf8d7(0x94)](_0x5a1cc5);break;}}}),_0x51811a(this[_0x214c37(0x10d)],_0x3dbd4a);}));}[_0x1be135(0x110)](){const _0x2572a4=_0x1be135;this['disposeWithMe'](this[_0x2572a4(0xa6)][_0x2572a4(0xf8)][_0x2572a4(0xc6)](async _0x429f1a=>{const _0x34e56c=_0x2572a4;var _0x3e6d28,_0x4e1794,_0x16972c,_0x297aba;const _0x17e388=(_0x3e6d28=this[_0x34e56c(0xe4)][_0x34e56c(0xb4)](_0x429f1a['unitId'])[_0x34e56c(0xa2)](_0x14271c=>_0x14271c[_0x34e56c(0xe0)]===_0x429f1a['threadId']))==null?void 0x0:_0x3e6d28[_0x34e56c(0x10e)];if(!_0x17e388)return;const {unitId:_0x8de14f,subUnitId:_0x392cc7}=_0x17e388;switch(_0x429f1a['user']&&this[_0x34e56c(0xe9)][_0x34e56c(0x101)](_0x429f1a[_0x34e56c(0x10c)]),_0x429f1a['type']){case _0x2ad31f[_0x34e56c(0xf0)]:break;case _0x2ad31f[_0x34e56c(0x105)]:{this[_0x34e56c(0xe4)][_0x34e56c(0xa1)](_0x8de14f,_0x392cc7,{'unitId':_0x8de14f,'subUnitId':_0x392cc7,'ref':'','id':_0x429f1a[_0x34e56c(0x96)],'dT':_0x1330ee(+_0x429f1a[_0x34e56c(0x8c)]),'threadId':_0x429f1a[_0x34e56c(0xe0)],'personId':(_0x16972c=(_0x4e1794=_0x429f1a[_0x34e56c(0x10c)])==null?void 0x0:_0x4e1794[_0x34e56c(0xc4)])!=null?_0x16972c:_0x429f1a[_0x34e56c(0xa5)],'text':JSON[_0x34e56c(0xf1)](_0x429f1a[_0x34e56c(0xee)]),'parentId':_0x17e388['id']});break;}case _0x2ad31f[_0x34e56c(0xcc)]:{const _0x2f82e6=this['_threadCommentModel']['getComment'](_0x8de14f,_0x392cc7,_0x429f1a['replyId']);_0x2f82e6&&_0x2f82e6[_0x34e56c(0x9c)]&&this[_0x34e56c(0xe4)][_0x34e56c(0xd0)](_0x8de14f,_0x392cc7,_0x429f1a['replyId']);break;}case _0x2ad31f[_0x34e56c(0xb7)]:{this[_0x34e56c(0xe4)][_0x34e56c(0xc9)](_0x8de14f,_0x392cc7,{'commentId':_0x429f1a[_0x34e56c(0x96)],'text':JSON[_0x34e56c(0xf1)](_0x429f1a['content'])});break;}case _0x2ad31f['Solve']:{const _0x263712=(_0x297aba=this[_0x34e56c(0xe4)][_0x34e56c(0xb4)](_0x429f1a[_0x34e56c(0xe5)])['find'](_0x2296f4=>_0x2296f4[_0x34e56c(0xe0)]===_0x429f1a[_0x34e56c(0xe0)]))==null?void 0x0:_0x297aba[_0x34e56c(0x10e)];_0x263712&&this['_threadCommentModel'][_0x34e56c(0x107)](_0x8de14f,_0x392cc7,_0x263712['id'],_0x429f1a[_0x34e56c(0x9e)]===_0x174176[_0x34e56c(0x8a)]);break;}}}));}};_0x55c5b2=_0x4f4e15([_0x3d3bb4(0x0,_0x5715d9['Inject'](_0x468d22['CommentService'])),_0x3d3bb4(0x1,_0x5715d9[_0x1be135(0xf6)](_0x4257e4[_0x1be135(0x90)])),_0x3d3bb4(0x2,_0x5715d9[_0x1be135(0xf6)](_0x5715d9['UserManagerService'])),_0x3d3bb4(0x3,_0x5715d9['Inject'](_0x5715d9['Injector']))],_0x55c5b2);const _0x7522ca=_0x1be135(0xb8),_0x1cc121={};var _0x2120c9=Object[_0x1be135(0xad)],_0x5056b3=(_0x33f925,_0x5088e1,_0xf88159,_0x4a2651)=>{const _0xc746af=_0x1be135;for(var _0x9b87fc=_0x4a2651>0x1?void 0x0:_0x4a2651?_0x2120c9(_0x5088e1,_0xf88159):_0x5088e1,_0x5862ed=_0x33f925[_0xc746af(0x8d)]-0x1,_0x438977;_0x5862ed>=0x0;_0x5862ed--)(_0x438977=_0x33f925[_0x5862ed])&&(_0x9b87fc=_0x438977(_0x9b87fc)||_0x9b87fc);return _0x9b87fc;},_0x4a8e54=(_0x12ec0c,_0x1c81e1)=>(_0x186777,_0x1393be)=>_0x1c81e1(_0x186777,_0x1393be,_0x12ec0c);function _0xbfdbe8(_0x1d97ae,_0x441c68){const _0x268d35=_0x1be135,_0x136d1b=_0x1d97ae['replies'][0x0];return{..._0x441c68,'id':_0x136d1b[_0x268d35(0x96)],'resolved':_0x1d97ae[_0x268d35(0x9e)]===0x1,'dT':_0x1330ee(_0x136d1b[_0x268d35(0x8c)]),'personId':_0x136d1b[_0x268d35(0xa5)],'threadId':_0x136d1b[_0x268d35(0xe0)]};}function _0xfddaac(_0x1c86e3,_0x28a2bc,_0x1ec27d){const _0x5c461c=_0x1be135;var _0x4ba368,_0x2b2486;if(((_0x2b2486=(_0x4ba368=_0x1c86e3==null?void 0x0:_0x1c86e3[_0x5c461c(0xce)])==null?void 0x0:_0x4ba368['length'])!=null?_0x2b2486:0x0)>0x0){const _0x4cbd08=(_0x423066,_0x31bb8e)=>({'id':_0x423066[_0x5c461c(0x96)],'threadId':_0x423066[_0x5c461c(0xe0)],'dT':_0x1330ee(_0x423066['createTimestamp']),'personId':_0x423066['userId'],'resolved':_0x1c86e3[_0x5c461c(0x9e)]===_0x174176[_0x5c461c(0x8a)],'unitId':_0x28a2bc,'subUnitId':_0x1ec27d,'text':JSON[_0x5c461c(0xf1)](_0x423066[_0x5c461c(0xee)]),'parentId':_0x31bb8e}),_0x49b695=_0x4cbd08(_0x1c86e3[_0x5c461c(0xce)][0x0]);return{..._0x49b695,'children':_0x1c86e3[_0x5c461c(0xce)][_0x5c461c(0xac)](0x1)[_0x5c461c(0xc0)](_0x2eb501=>_0x4cbd08(_0x2eb501,_0x49b695['id']))};}return null;}let _0x3f0acf=class{constructor(_0x125949,_0x37a335,_0x1e8045,_0x215d66){const _0x5183df=_0x1be135;this[_0x5183df(0xcd)]=_0x125949,this[_0x5183df(0xe9)]=_0x37a335,this[_0x5183df(0x103)]=_0x1e8045,this[_0x5183df(0x10d)]=_0x215d66;}async[_0x1be135(0xa1)](_0x2b28f4){const _0x183539=_0x1be135;var _0x1f080d,_0x5ae676;const {parentId:_0x1548e3,unitId:_0x5643e9,text:_0x55766e,threadId:_0x18ecba}=_0x2b28f4,_0x4045b0=(_0x5ae676=(_0x1f080d=_0x55766e[_0x183539(0x8b)])==null?void 0x0:_0x1f080d[_0x183539(0xeb)](_0x228982=>_0x228982[_0x183539(0xab)]===_0x5715d9[_0x183539(0xaa)]['COMMENT'])[_0x183539(0xc0)](_0x493b08=>_0x493b08[_0x183539(0xf7)]))!=null?_0x5ae676:[],_0x511084=JSON['stringify'](_0x55766e),_0x1fb059=(await this['_sessionService'][_0x183539(0x10f)](_0x5643e9))['getMemberID']();if(_0x1548e3){const _0x336afe={'memberId':_0x1fb059,'unitId':_0x5643e9,'content':_0x511084,'mention':_0x4045b0,'threadId':_0x18ecba},_0x4d01b6=(await this['_httpService'][_0x183539(0xa9)](_0x183539(0xda)+_0x5643e9+_0x183539(0xc3),{'body':_0x336afe}))[_0x183539(0xb3)][_0x183539(0x100)];return{..._0x2b28f4,'id':_0x4d01b6[_0x183539(0x96)],'dT':_0x5715d9[_0x183539(0xe1)](+_0x4d01b6['createTimestamp'])[_0x183539(0xb5)](_0x183539(0xbd)),'personId':_0x4d01b6['userId']};}else{const _0x31bcb6={'memberId':_0x1fb059,'unitId':_0x5643e9,'content':_0x511084,'mention':_0x4045b0},_0x517b40=await this[_0x183539(0xcd)]['post'](_0x183539(0xda)+_0x5643e9+_0x183539(0xdf),{'body':_0x31bcb6});return _0xbfdbe8(_0x517b40['body']['comment'],_0x2b28f4);}}async[_0x1be135(0xc9)](_0x45dc71){const _0x575e87=_0x1be135;var _0x4511dd,_0x19519c;const {text:_0x112378,unitId:_0x55a24f}=_0x45dc71,_0x563702=(_0x19519c=(_0x4511dd=_0x112378['customRanges'])==null?void 0x0:_0x4511dd[_0x575e87(0xeb)](_0x3315ec=>_0x3315ec[_0x575e87(0xab)]===_0x5715d9['CustomRangeType']['COMMENT'])['map'](_0x3fbd68=>_0x3fbd68['rangeId']))!=null?_0x19519c:[],_0x28bf41=JSON[_0x575e87(0xb6)](_0x112378),_0x4c8269=_0x45dc71[_0x575e87(0xe0)],_0x169e2f=_0x45dc71['id'],_0x37c2fc={'memberId':(await this[_0x575e87(0x103)][_0x575e87(0x10f)](_0x55a24f))[_0x575e87(0x10a)](),'unitId':_0x55a24f,'threadId':_0x4c8269,'mention':_0x563702,'content':_0x28bf41,'replyId':_0x169e2f},_0x829f6e=await this[_0x575e87(0xcd)]['post'](_0x575e87(0xda)+_0x55a24f+_0x575e87(0x10b),{'body':_0x37c2fc});return!_0x829f6e['body']['error']||_0x829f6e['body'][_0x575e87(0xb1)][_0x575e87(0x102)]===0x1;}async['resolveComment'](_0x899de){const _0x1d2a52=_0x1be135,{unitId:_0x4e4ac6}=_0x899de,_0x20a929=_0x899de['threadId'],_0x21a376={'memberId':this[_0x1d2a52(0xe9)][_0x1d2a52(0xe8)]()[_0x1d2a52(0xc4)],'unitId':_0x4e4ac6,'threadId':_0x20a929,'solved':_0x899de[_0x1d2a52(0xfd)]?_0x174176[_0x1d2a52(0x8a)]:_0x174176[_0x1d2a52(0xd8)]},_0x34096a=await this[_0x1d2a52(0xcd)][_0x1d2a52(0xa9)]('/universer-api/comment/unit/'+_0x4e4ac6+'/solved',{'body':_0x21a376});return!_0x34096a[_0x1d2a52(0xb3)][_0x1d2a52(0xb1)]||_0x34096a[_0x1d2a52(0xb3)][_0x1d2a52(0xb1)][_0x1d2a52(0x102)]===0x1;}async[_0x1be135(0xd0)](_0x412a93,_0x13acd6,_0x18f4ad,_0x5e5b36){const _0x21364d=_0x1be135,_0x4e5474={'memberId':(await this[_0x21364d(0x103)][_0x21364d(0x10f)](_0x412a93))['getMemberID'](),'threadId':_0x18f4ad,'replyId':_0x5e5b36,'unitId':_0x412a93},_0x4a681f=await this[_0x21364d(0xcd)]['post']('/universer-api/comment/unit/'+_0x412a93+_0x21364d(0xbb),{'body':_0x4e5474});return!_0x4a681f[_0x21364d(0xb3)]['error']||_0x4a681f[_0x21364d(0xb3)]['error'][_0x21364d(0x102)]===0x1;}async[_0x1be135(0xef)](_0x2b4075,_0x58129a,_0x29acb4){const _0x4ebb15=_0x1be135,_0x393a56={'unitId':_0x2b4075,'threadId':_0x29acb4},_0x6f30d7=await this[_0x4ebb15(0xcd)][_0x4ebb15(0xa9)](_0x4ebb15(0xda)+_0x2b4075+_0x4ebb15(0x8e),{'body':_0x393a56}),_0x3893e9=_0x29acb4[_0x4ebb15(0xc0)](_0x289174=>_0xfddaac(_0x6f30d7['body'][_0x4ebb15(0xd5)][_0x289174],_0x2b4075,_0x58129a))[_0x4ebb15(0xeb)](Boolean);return Object[_0x4ebb15(0xc1)](_0x6f30d7[_0x4ebb15(0xb3)]['users'])[_0x4ebb15(0xa0)](_0x24f05e=>{const _0x2a8c1c=_0x4ebb15;this[_0x2a8c1c(0xe9)][_0x2a8c1c(0x101)](_0x24f05e);}),_0x3893e9;}['saveCommentToSnapshot'](_0x424a1e){const _0x46214c=_0x1be135;return{'id':_0x424a1e['id'],'threadId':_0x424a1e[_0x46214c(0xe0)],'ref':_0x424a1e[_0x46214c(0xdb)]};}};_0x3f0acf=_0x5056b3([_0x4a8e54(0x0,_0x5715d9[_0x1be135(0xf6)](_0x1c12d2[_0x1be135(0xa7)])),_0x4a8e54(0x1,_0x5715d9[_0x1be135(0xf6)](_0x5715d9[_0x1be135(0xfc)])),_0x4a8e54(0x2,_0x5715d9[_0x1be135(0xf6)](_0x468d22[_0x1be135(0xde)])),_0x4a8e54(0x3,_0x5715d9[_0x1be135(0xf6)](_0x5715d9[_0x1be135(0xc8)]))],_0x3f0acf);var _0x39bb44=Object['getOwnPropertyDescriptor'],_0x21c4b0=(_0x16aa49,_0x5741df,_0x51926d,_0x21edbb)=>{for(var _0x538d47=_0x21edbb>0x1?void 0x0:_0x21edbb?_0x39bb44(_0x5741df,_0x51926d):_0x5741df,_0x232595=_0x16aa49['length']-0x1,_0x11fb82;_0x232595>=0x0;_0x232595--)(_0x11fb82=_0x16aa49[_0x232595])&&(_0x538d47=_0x11fb82(_0x538d47)||_0x538d47);return _0x538d47;},_0xdec002=(_0xd4dc7d,_0x1b9acb)=>(_0x5827dc,_0xa8fcf1)=>_0x1b9acb(_0x5827dc,_0xa8fcf1,_0xd4dc7d);let _0x4b7063=class extends _0x5715d9[_0x1be135(0x104)]{constructor(_0x2645e4,_0x4da71c){const _0x55e8ce=_0x1be135;super(),this['_threadCommentDataSourceService']=_0x2645e4,this[_0x55e8ce(0xf4)]=_0x4da71c,this[_0x55e8ce(0xae)]();}[_0x1be135(0xae)](){const _0x5ee56d=_0x1be135;this['_threadCommentDataSourceService'][_0x5ee56d(0xb9)]=this[_0x5ee56d(0xf4)],this[_0x5ee56d(0xea)]['syncUpdateMutationToColla']=!0x1;}};_0x4b7063=_0x21c4b0([_0xdec002(0x0,_0x4257e4[_0x1be135(0xaf)]),_0xdec002(0x1,_0x5715d9[_0x1be135(0xf6)](_0x3f0acf))],_0x4b7063);var _0x27dfff=Object[_0x1be135(0xc5)],_0x37ba32=Object[_0x1be135(0xad)],_0x26a8d0=(_0x47e2aa,_0x46ceb0,_0x309e46)=>_0x46ceb0 in _0x47e2aa?_0x27dfff(_0x47e2aa,_0x46ceb0,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x309e46}):_0x47e2aa[_0x46ceb0]=_0x309e46,_0x558711=(_0x4608dc,_0xed1637,_0x1a566a,_0x330c8f)=>{const _0x32f4fb=_0x1be135;for(var _0x55016a=_0x330c8f>0x1?void 0x0:_0x330c8f?_0x37ba32(_0xed1637,_0x1a566a):_0xed1637,_0x2042d4=_0x4608dc[_0x32f4fb(0x8d)]-0x1,_0x4c59a8;_0x2042d4>=0x0;_0x2042d4--)(_0x4c59a8=_0x4608dc[_0x2042d4])&&(_0x55016a=_0x4c59a8(_0x55016a)||_0x55016a);return _0x55016a;},_0x4e7e88=(_0x5825b2,_0x138d9b)=>(_0x4ded52,_0x1085fe)=>_0x138d9b(_0x4ded52,_0x1085fe,_0x5825b2),_0xcd3589=(_0x51d4c3,_0x10cd50,_0xa5cda3)=>_0x26a8d0(_0x51d4c3,typeof _0x10cd50!='symbol'?_0x10cd50+'':_0x10cd50,_0xa5cda3);_0x594425[_0x1be135(0xa3)]=class extends _0x5715d9[_0x1be135(0x9a)]{constructor(_0x4d5664=_0x1cc121,_0x23d1e1,_0x4d221e){const _0x1f413b=_0x1be135;super(),this[_0x1f413b(0x97)]=_0x4d5664,this[_0x1f413b(0x10d)]=_0x23d1e1,this[_0x1f413b(0xd2)]=_0x4d221e;const {..._0xb43379}=_0x5715d9[_0x1f413b(0xdd)]({},_0x1cc121,this[_0x1f413b(0x97)]);this[_0x1f413b(0xd2)]['setConfig'](_0x7522ca,_0xb43379);}[_0x1be135(0xf5)](){const _0x148f1e=_0x1be135;[[_0x3f0acf],[_0x4b7063],[_0x55c5b2]][_0x148f1e(0xa0)](_0x26406f=>{const _0x54a58b=_0x148f1e;this['_injector'][_0x54a58b(0x94)](_0x26406f);});}[_0x1be135(0xc7)](){const _0x127e97=_0x1be135;this[_0x127e97(0x10d)][_0x127e97(0x109)](_0x4b7063),this[_0x127e97(0x10d)]['get'](_0x55c5b2);}},_0xcd3589(_0x594425[_0x1be135(0xa3)],_0x1be135(0xf9),_0x3871d9),_0xcd3589(_0x594425[_0x1be135(0xa3)],_0x1be135(0xe6),_0x5715d9[_0x1be135(0xd7)]['UNIVER_UNKNOWN']),_0x594425[_0x1be135(0xa3)]=_0x558711([_0x5715d9[_0x1be135(0xfb)](_0x5a9834[_0x1be135(0x99)],_0x468d22[_0x1be135(0xfa)],_0x280668[_0x1be135(0xa4)]),_0x4e7e88(0x1,_0x5715d9[_0x1be135(0xf6)](_0x5715d9[_0x1be135(0xc8)])),_0x4e7e88(0x2,_0x5715d9[_0x1be135(0xff)])],_0x594425['UniverThreadCommentDataSourcePlugin']),Object['defineProperty'](_0x594425,Symbol[_0x1be135(0xca)],{'value':'Module'});}));
1
+ function _0x6057(){const _0x133ab9=['_threadCommentDataSource','solved','post','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','907275iVNiHF','listComments','resolveComment','Delete','setConfig','length','UniverThreadCommentUIPlugin','_config','customRanges','@univerjs-pro/license','Add','@univerjs/thread-comment-ui','threadId','_sessionService','_httpService','reply','/delete','addComment','_threadCommentDataSourceService','error','OpenOrReOpen','saveCommentToSnapshot','UniverProThreadCommentDatasource','root','@univerjs/thread-comment','createTimestamp','UniverInstanceType','parse','function','_userService','Inject','Unknown','@univerjs/core','resolved','getCurrentUser','/list','Injector','pluginName','replyId','Solve','89395yoxRvf','map','UserManagerService','user','pipe','users','13469157PJpxIx','syncUpdateMutationToColla','unitId','replies','HTTPService','CollaborationSessionService','Disposable','UniverNetwork','YYYY/MM/DD\x20HH:mm','subscribe','slice','8FLPaiK','commentUpdate$','_initUserSync','7160480oIGJul','stringify','1374762PaJEtJ','code','UniverProLicense','delete','UniverProCollaborationClient','/universer-api/comment/unit/','userId','_commentService','disposeWithMe','IConfigService','body','getMemberID','addUser','Reply','UniverLicensePlugin','Module','/solved','format','439762TclnXG','thread-comment-data-source.config','deleteComment','userID','3vfwSDl','rxjs','@univerjs-pro/collaboration-client','Solved','rangeId','_threadCommentModel','rangeType','forEach','_init','size','UNRECOGNIZED','type','CommentService','_injector','@univerjs/network','getComment','1391768UGoMxo','UniverThreadCommentDataSourcePlugin','content','values','filter','ThreadCommentModel','personId','UniverThreadCommentUi','Edit','/universer-api/user/list','add','defineProperty','COMMENT','requireSession','UniverCore','getUnit','/edit','exports','onReady','Plugin','ref','comments','get','getOwnPropertyDescriptor'];_0x6057=function(){return _0x133ab9;};return _0x6057();}function _0x5ae5(_0x38d34e,_0x1bcf9){const _0x60571a=_0x6057();return _0x5ae5=function(_0x5ae5c1,_0xe2a48b){_0x5ae5c1=_0x5ae5c1-0xf3;let _0x1ed3ac=_0x60571a[_0x5ae5c1];return _0x1ed3ac;},_0x5ae5(_0x38d34e,_0x1bcf9);}(function(_0x237eef,_0x2bd2a7){const _0x238f37=_0x5ae5,_0x1966c8=_0x237eef();while(!![]){try{const _0x508e4f=parseInt(_0x238f37(0x10f))/0x1*(parseInt(_0x238f37(0x10b))/0x2)+-parseInt(_0x238f37(0x13b))/0x3*(parseInt(_0x238f37(0xf4))/0x4)+parseInt(_0x238f37(0x163))/0x5+-parseInt(_0x238f37(0xf9))/0x6+parseInt(_0x238f37(0x11f))/0x7+-parseInt(_0x238f37(0xf7))/0x8+parseInt(_0x238f37(0x169))/0x9;if(_0x508e4f===_0x2bd2a7)break;else _0x1966c8['push'](_0x1966c8['shift']());}catch(_0x319636){_0x1966c8['push'](_0x1966c8['shift']());}}}(_0x6057,0x9d32a),function(_0x19a642,_0x270093){const _0x5bc7e4=_0x5ae5;typeof exports=='object'&&typeof module<'u'?_0x270093(exports,require(_0x5bc7e4(0x111)),require(_0x5bc7e4(0x144)),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require(_0x5bc7e4(0x153)),require(_0x5bc7e4(0x110)),require(_0x5bc7e4(0x11d))):typeof define==_0x5bc7e4(0x157)&&define['amd']?define([_0x5bc7e4(0x130),_0x5bc7e4(0x111),_0x5bc7e4(0x144),_0x5bc7e4(0x15b),_0x5bc7e4(0x146),'@univerjs/thread-comment',_0x5bc7e4(0x110),'@univerjs/network'],_0x270093):(_0x19a642=typeof globalThis<'u'?globalThis:_0x19a642||self,_0x270093(_0x19a642[_0x5bc7e4(0x151)]={},_0x19a642[_0x5bc7e4(0xfd)],_0x19a642[_0x5bc7e4(0xfb)],_0x19a642[_0x5bc7e4(0x12d)],_0x19a642[_0x5bc7e4(0x126)],_0x19a642['UniverThreadComment'],_0x19a642[_0x5bc7e4(0x110)],_0x19a642[_0x5bc7e4(0x170)]));}(this,function(_0x4c5a1d,_0x5db40d,_0x49175c,_0x4dad87,_0x363a5d,_0xa8d050,_0x4250f1,_0x3449f0){'use strict';const _0x24d34b=_0x5ae5;const _0x402554=_0x24d34b(0x13a);var _0x3560d6=(_0x58ea7b=>(_0x58ea7b[_0x58ea7b[_0x24d34b(0x14f)]=0x0]='OpenOrReOpen',_0x58ea7b[_0x58ea7b['Solved']=0x1]=_0x24d34b(0x112),_0x58ea7b[_0x58ea7b[_0x24d34b(0x119)]=-0x1]='UNRECOGNIZED',_0x58ea7b))(_0x3560d6||{}),_0x307f58=(_0x8e97c5=>(_0x8e97c5[_0x8e97c5['Unknown']=0x0]=_0x24d34b(0x15a),_0x8e97c5[_0x8e97c5[_0x24d34b(0x145)]=0x1]=_0x24d34b(0x145),_0x8e97c5[_0x8e97c5['Reply']=0x2]=_0x24d34b(0x106),_0x8e97c5[_0x8e97c5[_0x24d34b(0x127)]=0x3]=_0x24d34b(0x127),_0x8e97c5[_0x8e97c5[_0x24d34b(0x13e)]=0x4]=_0x24d34b(0x13e),_0x8e97c5[_0x8e97c5[_0x24d34b(0x162)]=0x5]='Solve',_0x8e97c5[_0x8e97c5[_0x24d34b(0x119)]=-0x1]=_0x24d34b(0x119),_0x8e97c5))(_0x307f58||{});const _0x1e5699=_0x534ad3=>_0x4dad87['dayjs'](new Date(+_0x534ad3))['format']('YYYY/MM/DD\x20HH:mm'),_0x3d55f4=async(_0x401617,_0x1bb1c9)=>{const _0x5b2b8e=_0x24d34b,_0x1610c5=_0x401617['get'](_0x4dad87['UserManagerService']),_0x56f041=_0x401617['get'](_0x3449f0[_0x5b2b8e(0x16d)]);_0x1bb1c9[_0x5b2b8e(0x116)](_0x160b93=>{const _0x578227=_0x5b2b8e;_0x1610c5['getUser'](_0x160b93)&&_0x1bb1c9[_0x578227(0xfc)](_0x160b93);}),_0x1bb1c9[_0x5b2b8e(0x118)]&&(await _0x56f041['get'](_0x5b2b8e(0x128),{'params':{'userIDs':[..._0x1bb1c9]}}))[_0x5b2b8e(0x103)][_0x5b2b8e(0x168)][_0x5b2b8e(0x116)](_0x558ee1=>{const _0x18adb1=_0x5b2b8e;_0x558ee1&&_0x1610c5[_0x18adb1(0x105)](_0x558ee1);});};var _0x3fe12d=Object[_0x24d34b(0x136)],_0x188212=(_0x10285a,_0x5d68f2,_0x5056bf,_0x560009)=>{for(var _0x42e59a=_0x560009>0x1?void 0x0:_0x560009?_0x3fe12d(_0x5d68f2,_0x5056bf):_0x5d68f2,_0x6399fb=_0x10285a['length']-0x1,_0x54e201;_0x6399fb>=0x0;_0x6399fb--)(_0x54e201=_0x10285a[_0x6399fb])&&(_0x42e59a=_0x54e201(_0x42e59a)||_0x42e59a);return _0x42e59a;},_0x2e6f16=(_0x183293,_0x39087b)=>(_0x5cb4e2,_0x19b797)=>_0x39087b(_0x5cb4e2,_0x19b797,_0x183293);let _0x5d559c=class extends _0x4dad87[_0x24d34b(0x16f)]{constructor(_0x469e38,_0x1ac95d,_0x5688d3,_0x3d42c1){const _0x4ae873=_0x24d34b;super(),this[_0x4ae873(0x100)]=_0x469e38,this[_0x4ae873(0x114)]=_0x1ac95d,this['_userService']=_0x5688d3,this[_0x4ae873(0x11c)]=_0x3d42c1,this[_0x4ae873(0x117)](),this[_0x4ae873(0xf6)]();}[_0x24d34b(0xf6)](){const _0xb3fd1=_0x24d34b;this[_0xb3fd1(0x101)](this[_0xb3fd1(0x114)]['commentUpdate$'][_0xb3fd1(0x167)](_0x4250f1['bufferTime'](0x10))[_0xb3fd1(0x172)](_0xd7e23d=>{const _0x5babd1=_0xb3fd1,_0xd27f0b=new Set();_0xd7e23d[_0x5babd1(0x116)](_0x42e423=>{const _0x32d241=_0x5babd1;switch(_0x42e423[_0x32d241(0x11a)]){case'add':{const _0x2181a7=_0x42e423['payload'][_0x32d241(0x125)];_0xd27f0b[_0x32d241(0x129)](_0x2181a7);break;}}}),_0x3d55f4(this['_injector'],_0xd27f0b);}));}[_0x24d34b(0x117)](){const _0x533cc2=_0x24d34b;this[_0x533cc2(0x101)](this[_0x533cc2(0x100)][_0x533cc2(0xf5)]['subscribe'](async _0x518074=>{const _0xab6a48=_0x533cc2;var _0x3a8f38,_0x341156,_0x2cefe5,_0x209ca8;const _0x44fc57=(_0x3a8f38=this[_0xab6a48(0x114)][_0xab6a48(0x12e)](_0x518074[_0xab6a48(0x16b)])['find'](_0x158ee2=>_0x158ee2[_0xab6a48(0x147)]===_0x518074[_0xab6a48(0x147)]))==null?void 0x0:_0x3a8f38[_0xab6a48(0x152)];if(!_0x44fc57)return;const {unitId:_0x94028f,subUnitId:_0x30a0e9}=_0x44fc57;switch(_0x518074[_0xab6a48(0x166)]&&this[_0xab6a48(0x158)]['addUser'](_0x518074[_0xab6a48(0x166)]),_0x518074[_0xab6a48(0x11a)]){case _0x307f58[_0xab6a48(0x145)]:break;case _0x307f58['Reply']:{this[_0xab6a48(0x114)][_0xab6a48(0x14c)](_0x94028f,_0x30a0e9,{'unitId':_0x94028f,'subUnitId':_0x30a0e9,'ref':'','id':_0x518074[_0xab6a48(0x161)],'dT':_0x1e5699(+_0x518074[_0xab6a48(0x154)]),'threadId':_0x518074[_0xab6a48(0x147)],'personId':(_0x2cefe5=(_0x341156=_0x518074[_0xab6a48(0x166)])==null?void 0x0:_0x341156[_0xab6a48(0x10e)])!=null?_0x2cefe5:_0x518074[_0xab6a48(0xff)],'text':JSON[_0xab6a48(0x156)](_0x518074[_0xab6a48(0x121)]),'parentId':_0x44fc57['id']});break;}case _0x307f58[_0xab6a48(0x13e)]:{const _0x34f765=this[_0xab6a48(0x114)][_0xab6a48(0x11e)](_0x94028f,_0x30a0e9,_0x518074[_0xab6a48(0x161)]);_0x34f765&&_0x34f765['parentId']&&this[_0xab6a48(0x114)]['deleteComment'](_0x94028f,_0x30a0e9,_0x518074[_0xab6a48(0x161)]);break;}case _0x307f58[_0xab6a48(0x127)]:{this['_threadCommentModel']['updateComment'](_0x94028f,_0x30a0e9,{'commentId':_0x518074[_0xab6a48(0x161)],'text':JSON[_0xab6a48(0x156)](_0x518074[_0xab6a48(0x121)])});break;}case _0x307f58['Solve']:{const _0x529107=(_0x209ca8=this[_0xab6a48(0x114)][_0xab6a48(0x12e)](_0x518074['unitId'])['find'](_0x4becb6=>_0x4becb6[_0xab6a48(0x147)]===_0x518074[_0xab6a48(0x147)]))==null?void 0x0:_0x209ca8[_0xab6a48(0x152)];_0x529107&&this[_0xab6a48(0x114)][_0xab6a48(0x13d)](_0x94028f,_0x30a0e9,_0x529107['id'],_0x518074[_0xab6a48(0x138)]===_0x3560d6[_0xab6a48(0x112)]);break;}}}));}};_0x5d559c=_0x188212([_0x2e6f16(0x0,_0x4dad87[_0x24d34b(0x159)](_0x5db40d[_0x24d34b(0x11b)])),_0x2e6f16(0x1,_0x4dad87[_0x24d34b(0x159)](_0xa8d050[_0x24d34b(0x124)])),_0x2e6f16(0x2,_0x4dad87[_0x24d34b(0x159)](_0x4dad87[_0x24d34b(0x165)])),_0x2e6f16(0x3,_0x4dad87[_0x24d34b(0x159)](_0x4dad87[_0x24d34b(0x15f)]))],_0x5d559c);const _0x2e3917=_0x24d34b(0x10c),_0x58d64e={};var _0x20c029=Object['getOwnPropertyDescriptor'],_0x11874d=(_0x45eb13,_0x59d278,_0x752376,_0x503e6f)=>{const _0x11da0a=_0x24d34b;for(var _0x348df2=_0x503e6f>0x1?void 0x0:_0x503e6f?_0x20c029(_0x59d278,_0x752376):_0x59d278,_0x50966d=_0x45eb13[_0x11da0a(0x140)]-0x1,_0x6714f2;_0x50966d>=0x0;_0x50966d--)(_0x6714f2=_0x45eb13[_0x50966d])&&(_0x348df2=_0x6714f2(_0x348df2)||_0x348df2);return _0x348df2;},_0x5527e9=(_0x21e5cb,_0x3f72f0)=>(_0x1ca4c6,_0x2745a9)=>_0x3f72f0(_0x1ca4c6,_0x2745a9,_0x21e5cb);function _0x16da18(_0x4ed909,_0xf64923){const _0xacd31e=_0x24d34b,_0x348853=_0x4ed909[_0xacd31e(0x16c)][0x0];return{..._0xf64923,'id':_0x348853[_0xacd31e(0x161)],'resolved':_0x4ed909[_0xacd31e(0x138)]===0x1,'dT':_0x1e5699(_0x348853[_0xacd31e(0x154)]),'personId':_0x348853[_0xacd31e(0xff)],'threadId':_0x348853[_0xacd31e(0x147)]};}function _0x250e8d(_0x262900,_0x1483ec,_0x4b4420){const _0x3fbddf=_0x24d34b;var _0x2c2202,_0x15242a;if(((_0x15242a=(_0x2c2202=_0x262900==null?void 0x0:_0x262900['replies'])==null?void 0x0:_0x2c2202[_0x3fbddf(0x140)])!=null?_0x15242a:0x0)>0x0){const _0x2e1bc2=(_0x3b13d4,_0x8e57f3)=>({'id':_0x3b13d4['replyId'],'threadId':_0x3b13d4[_0x3fbddf(0x147)],'dT':_0x1e5699(_0x3b13d4['createTimestamp']),'personId':_0x3b13d4['userId'],'resolved':_0x262900[_0x3fbddf(0x138)]===_0x3560d6[_0x3fbddf(0x112)],'unitId':_0x1483ec,'subUnitId':_0x4b4420,'text':JSON['parse'](_0x3b13d4[_0x3fbddf(0x121)]),'parentId':_0x8e57f3}),_0x2df3f2=_0x2e1bc2(_0x262900[_0x3fbddf(0x16c)][0x0]);return{..._0x2df3f2,'children':_0x262900[_0x3fbddf(0x16c)][_0x3fbddf(0xf3)](0x1)['map'](_0x566648=>_0x2e1bc2(_0x566648,_0x2df3f2['id']))};}return null;}let _0x535911=class{constructor(_0x3d26cc,_0x46150c,_0x1bba98,_0x22c7ff){const _0x3223d4=_0x24d34b;this[_0x3223d4(0x149)]=_0x3d26cc,this[_0x3223d4(0x158)]=_0x46150c,this[_0x3223d4(0x148)]=_0x1bba98,this['_injector']=_0x22c7ff;}async[_0x24d34b(0x14c)](_0x514df3){const _0x568633=_0x24d34b;var _0x168eda,_0x477322;const {parentId:_0x298b2b,unitId:_0x4f7afc,text:_0x305c2a,threadId:_0x3803e2}=_0x514df3,_0x12f86c=(_0x477322=(_0x168eda=_0x305c2a[_0x568633(0x143)])==null?void 0x0:_0x168eda[_0x568633(0x123)](_0xfd360c=>_0xfd360c[_0x568633(0x115)]===_0x4dad87['CustomRangeType'][_0x568633(0x12b)])[_0x568633(0x164)](_0x397965=>_0x397965[_0x568633(0x113)]))!=null?_0x477322:[],_0x5da794=JSON[_0x568633(0xf8)](_0x305c2a),_0x2c90fc=(await this[_0x568633(0x148)][_0x568633(0x12c)](_0x4f7afc))[_0x568633(0x104)]();if(_0x298b2b){const _0x4081b5={'memberId':_0x2c90fc,'unitId':_0x4f7afc,'content':_0x5da794,'mention':_0x12f86c,'threadId':_0x3803e2},_0xfa7659=(await this[_0x568633(0x149)][_0x568633(0x139)]('/universer-api/comment/unit/'+_0x4f7afc+'/reply',{'body':_0x4081b5}))[_0x568633(0x103)][_0x568633(0x14a)];return{..._0x514df3,'id':_0xfa7659['replyId'],'dT':_0x4dad87['dayjs'](+_0xfa7659['createTimestamp'])[_0x568633(0x10a)](_0x568633(0x171)),'personId':_0xfa7659[_0x568633(0xff)]};}else{const _0x559aa9={'memberId':_0x2c90fc,'unitId':_0x4f7afc,'content':_0x5da794,'mention':_0x12f86c},_0x4c5b1f=await this['_httpService'][_0x568633(0x139)](_0x568633(0xfe)+_0x4f7afc+'/add',{'body':_0x559aa9});return _0x16da18(_0x4c5b1f[_0x568633(0x103)]['comment'],_0x514df3);}}async['updateComment'](_0xc73557){const _0x520cba=_0x24d34b;var _0x917cdf,_0x13a142;const {text:_0x1eca22,unitId:_0xc40cbb}=_0xc73557,_0x59d2cd=(_0x13a142=(_0x917cdf=_0x1eca22[_0x520cba(0x143)])==null?void 0x0:_0x917cdf[_0x520cba(0x123)](_0x30954c=>_0x30954c[_0x520cba(0x115)]===_0x4dad87['CustomRangeType'][_0x520cba(0x12b)])[_0x520cba(0x164)](_0x172db6=>_0x172db6[_0x520cba(0x113)]))!=null?_0x13a142:[],_0x2d7011=JSON['stringify'](_0x1eca22),_0x1bf5dd=_0xc73557[_0x520cba(0x147)],_0x182b8b=_0xc73557['id'],_0x28c5bd={'memberId':(await this['_sessionService'][_0x520cba(0x12c)](_0xc40cbb))[_0x520cba(0x104)](),'unitId':_0xc40cbb,'threadId':_0x1bf5dd,'mention':_0x59d2cd,'content':_0x2d7011,'replyId':_0x182b8b},_0x544af1=await this[_0x520cba(0x149)][_0x520cba(0x139)](_0x520cba(0xfe)+_0xc40cbb+_0x520cba(0x12f),{'body':_0x28c5bd});return!_0x544af1[_0x520cba(0x103)][_0x520cba(0x14e)]||_0x544af1['body'][_0x520cba(0x14e)][_0x520cba(0xfa)]===0x1;}async[_0x24d34b(0x13d)](_0xae486f){const _0x5ce4d7=_0x24d34b,{unitId:_0xacbe96}=_0xae486f,_0x38e619=_0xae486f[_0x5ce4d7(0x147)],_0x4b459f={'memberId':this['_userService'][_0x5ce4d7(0x15d)]()[_0x5ce4d7(0x10e)],'unitId':_0xacbe96,'threadId':_0x38e619,'solved':_0xae486f[_0x5ce4d7(0x15c)]?_0x3560d6[_0x5ce4d7(0x112)]:_0x3560d6[_0x5ce4d7(0x14f)]},_0x4b0ff3=await this[_0x5ce4d7(0x149)]['post'](_0x5ce4d7(0xfe)+_0xacbe96+_0x5ce4d7(0x109),{'body':_0x4b459f});return!_0x4b0ff3[_0x5ce4d7(0x103)][_0x5ce4d7(0x14e)]||_0x4b0ff3['body']['error'][_0x5ce4d7(0xfa)]===0x1;}async[_0x24d34b(0x10d)](_0x515600,_0x2a6b28,_0x1c9654,_0x7f3971){const _0x568546=_0x24d34b,_0x107f70={'memberId':(await this[_0x568546(0x148)][_0x568546(0x12c)](_0x515600))[_0x568546(0x104)](),'threadId':_0x1c9654,'replyId':_0x7f3971,'unitId':_0x515600},_0x35fec4=await this[_0x568546(0x149)]['post'](_0x568546(0xfe)+_0x515600+_0x568546(0x14b),{'body':_0x107f70});return!_0x35fec4[_0x568546(0x103)][_0x568546(0x14e)]||_0x35fec4[_0x568546(0x103)]['error'][_0x568546(0xfa)]===0x1;}async[_0x24d34b(0x13c)](_0x6e2e26,_0x3fff67,_0x1a9553){const _0x31cf5a=_0x24d34b,_0x25bfcd={'unitId':_0x6e2e26,'threadId':_0x1a9553},_0x5e6c91=await this['_httpService'][_0x31cf5a(0x139)](_0x31cf5a(0xfe)+_0x6e2e26+_0x31cf5a(0x15e),{'body':_0x25bfcd}),_0x461779=_0x1a9553[_0x31cf5a(0x164)](_0x3e3360=>_0x250e8d(_0x5e6c91[_0x31cf5a(0x103)][_0x31cf5a(0x134)][_0x3e3360],_0x6e2e26,_0x3fff67))[_0x31cf5a(0x123)](Boolean);return Object[_0x31cf5a(0x122)](_0x5e6c91['body'][_0x31cf5a(0x168)])['forEach'](_0x178998=>{const _0x213dbb=_0x31cf5a;this[_0x213dbb(0x158)][_0x213dbb(0x105)](_0x178998);}),_0x461779;}[_0x24d34b(0x150)](_0x25d319){const _0x30f6ea=_0x24d34b;return{'id':_0x25d319['id'],'threadId':_0x25d319[_0x30f6ea(0x147)],'ref':_0x25d319[_0x30f6ea(0x133)]};}};_0x535911=_0x11874d([_0x5527e9(0x0,_0x4dad87[_0x24d34b(0x159)](_0x3449f0[_0x24d34b(0x16d)])),_0x5527e9(0x1,_0x4dad87[_0x24d34b(0x159)](_0x4dad87[_0x24d34b(0x165)])),_0x5527e9(0x2,_0x4dad87[_0x24d34b(0x159)](_0x5db40d[_0x24d34b(0x16e)])),_0x5527e9(0x3,_0x4dad87[_0x24d34b(0x159)](_0x4dad87['Injector']))],_0x535911);var _0x1bb9de=Object[_0x24d34b(0x136)],_0x3c7974=(_0x5e1cc4,_0x348c2b,_0x3132b6,_0x52a118)=>{const _0x30511a=_0x24d34b;for(var _0x341a2e=_0x52a118>0x1?void 0x0:_0x52a118?_0x1bb9de(_0x348c2b,_0x3132b6):_0x348c2b,_0x232bfe=_0x5e1cc4[_0x30511a(0x140)]-0x1,_0xa50cdc;_0x232bfe>=0x0;_0x232bfe--)(_0xa50cdc=_0x5e1cc4[_0x232bfe])&&(_0x341a2e=_0xa50cdc(_0x341a2e)||_0x341a2e);return _0x341a2e;},_0x4340cf=(_0x29dac1,_0x45b115)=>(_0x51dc86,_0x57096b)=>_0x45b115(_0x51dc86,_0x57096b,_0x29dac1);let _0xe6cef6=class extends _0x4dad87[_0x24d34b(0x16f)]{constructor(_0x562637,_0x57da4f){const _0x4a3cc8=_0x24d34b;super(),this['_threadCommentDataSourceService']=_0x562637,this[_0x4a3cc8(0x137)]=_0x57da4f,this['_initDataSource']();}['_initDataSource'](){const _0x5e2852=_0x24d34b;this['_threadCommentDataSourceService']['dataSource']=this[_0x5e2852(0x137)],this[_0x5e2852(0x14d)][_0x5e2852(0x16a)]=!0x1;}};_0xe6cef6=_0x3c7974([_0x4340cf(0x0,_0xa8d050['IThreadCommentDataSourceService']),_0x4340cf(0x1,_0x4dad87[_0x24d34b(0x159)](_0x535911))],_0xe6cef6);var _0x2fd057=Object[_0x24d34b(0x12a)],_0x5dac66=Object[_0x24d34b(0x136)],_0x50df60=(_0x2f811c,_0x1db823,_0x330916)=>_0x1db823 in _0x2f811c?_0x2fd057(_0x2f811c,_0x1db823,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x330916}):_0x2f811c[_0x1db823]=_0x330916,_0x1fd31e=(_0x49294b,_0x51351a,_0x34f392,_0x101668)=>{const _0x2dcd9c=_0x24d34b;for(var _0x7a0e38=_0x101668>0x1?void 0x0:_0x101668?_0x5dac66(_0x51351a,_0x34f392):_0x51351a,_0xa87f0b=_0x49294b[_0x2dcd9c(0x140)]-0x1,_0x4f561c;_0xa87f0b>=0x0;_0xa87f0b--)(_0x4f561c=_0x49294b[_0xa87f0b])&&(_0x7a0e38=_0x4f561c(_0x7a0e38)||_0x7a0e38);return _0x7a0e38;},_0x4a3b06=(_0x2f3c1b,_0x2c7c12)=>(_0x163be0,_0x5f28de)=>_0x2c7c12(_0x163be0,_0x5f28de,_0x2f3c1b),_0x205de5=(_0x21b01c,_0x8e8a62,_0x4c8259)=>_0x50df60(_0x21b01c,typeof _0x8e8a62!='symbol'?_0x8e8a62+'':_0x8e8a62,_0x4c8259);_0x4c5a1d[_0x24d34b(0x120)]=class extends _0x4dad87[_0x24d34b(0x132)]{constructor(_0x535747=_0x58d64e,_0x55cbe1,_0x117e0f){const _0x29f169=_0x24d34b;super(),this[_0x29f169(0x142)]=_0x535747,this[_0x29f169(0x11c)]=_0x55cbe1,this['_configService']=_0x117e0f;const {..._0x3b139e}=_0x4dad87['merge']({},_0x58d64e,this[_0x29f169(0x142)]);this['_configService'][_0x29f169(0x13f)](_0x2e3917,_0x3b139e);}['onStarting'](){[[_0x535911],[_0xe6cef6],[_0x5d559c]]['forEach'](_0x56f73c=>{const _0x27932a=_0x5ae5;this[_0x27932a(0x11c)][_0x27932a(0x129)](_0x56f73c);});}[_0x24d34b(0x131)](){const _0x7abfa6=_0x24d34b;this[_0x7abfa6(0x11c)][_0x7abfa6(0x135)](_0xe6cef6),this['_injector'][_0x7abfa6(0x135)](_0x5d559c);}},_0x205de5(_0x4c5a1d[_0x24d34b(0x120)],_0x24d34b(0x160),_0x402554),_0x205de5(_0x4c5a1d[_0x24d34b(0x120)],'type',_0x4dad87[_0x24d34b(0x155)]['UNIVER_UNKNOWN']),_0x4c5a1d[_0x24d34b(0x120)]=_0x1fd31e([_0x4dad87['DependentOn'](_0x363a5d[_0x24d34b(0x141)],_0x5db40d['UniverCollaborationClientPlugin'],_0x49175c[_0x24d34b(0x107)]),_0x4a3b06(0x1,_0x4dad87[_0x24d34b(0x159)](_0x4dad87[_0x24d34b(0x15f)])),_0x4a3b06(0x2,_0x4dad87[_0x24d34b(0x102)])],_0x4c5a1d[_0x24d34b(0x120)]),Object[_0x24d34b(0x12a)](_0x4c5a1d,Symbol['toStringTag'],{'value':_0x24d34b(0x108)});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.6.10-nightly.202504151606",
3
+ "version": "0.6.10-nightly.202504161609",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,18 +45,18 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/license": "0.6.10-nightly.202504151606",
49
- "@univerjs/core": "0.6.10-nightly.202504151606",
50
- "@univerjs/network": "0.6.10-nightly.202504151606",
51
- "@univerjs-pro/collaboration-client": "0.6.10-nightly.202504151606",
52
- "@univerjs/thread-comment-ui": "0.6.10-nightly.202504151606",
53
- "@univerjs/thread-comment": "0.6.10-nightly.202504151606",
54
- "@univerjs/protocol": "0.1.46-alpha.3"
48
+ "@univerjs-pro/collaboration-client": "0.6.10-nightly.202504161609",
49
+ "@univerjs-pro/license": "0.6.10-nightly.202504161609",
50
+ "@univerjs/network": "0.6.10-nightly.202504161609",
51
+ "@univerjs/core": "0.6.10-nightly.202504161609",
52
+ "@univerjs/thread-comment": "0.6.10-nightly.202504161609",
53
+ "@univerjs/protocol": "0.1.46-alpha.3",
54
+ "@univerjs/thread-comment-ui": "0.6.10-nightly.202504161609"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "^7.8.1",
58
58
  "typescript": "^5.8.3",
59
- "vite": "^6.2.6",
59
+ "vite": "^6.3.0",
60
60
  "vitest": "^3.1.1",
61
61
  "@univerjs-infra/shared": "0.6.10-alpha.0"
62
62
  },